@wonderflow/react-components 10.8.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.
- 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 +14 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +7 -0
- package/dist/components/accordion/accordion.module.css +1 -0
- package/dist/components/accordion/accordion.stories.d.ts +8 -0
- package/dist/components/accordion/accordion.stories.d.ts.map +1 -0
- package/dist/components/accordion/accordion.stories.js +18 -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 +10 -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 +14 -13
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Menu } from '../..';
|
|
3
|
+
import { SplitButton } from './split-button';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Actions/Split button',
|
|
6
|
+
component: SplitButton,
|
|
7
|
+
args: {
|
|
8
|
+
dimension: 'regular',
|
|
9
|
+
kind: 'primary',
|
|
10
|
+
label: 'Click me',
|
|
11
|
+
fullWidth: false,
|
|
12
|
+
disabled: true,
|
|
13
|
+
busy: false,
|
|
14
|
+
placement: 'auto-start',
|
|
15
|
+
offset: 8,
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
onClick: {
|
|
19
|
+
action: 'clicked',
|
|
20
|
+
table: {
|
|
21
|
+
disable: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
dimension: {
|
|
25
|
+
options: ['small', 'regular', 'big'],
|
|
26
|
+
control: { type: 'radio' },
|
|
27
|
+
},
|
|
28
|
+
kind: {
|
|
29
|
+
options: ['primary', 'secondary', 'flat'],
|
|
30
|
+
control: { type: 'radio' },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export default story;
|
|
35
|
+
const Template = args => (_jsx(SplitButton, { ...args, children: _jsxs(Menu, { children: [_jsx(Menu.Item, { value: "1", padding: false, children: "Option 1" }), _jsx(Menu.Item, { value: "2", padding: false, children: "Option 2" })] }) }));
|
|
36
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import { Stack } from './stack';
|
|
3
|
+
declare const story: ComponentMeta<typeof Stack>;
|
|
4
|
+
export default story;
|
|
5
|
+
export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("./stack").StackProps>>;
|
|
6
|
+
//# sourceMappingURL=stack.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.stories.d.ts","sourceRoot":"","sources":["../../../src/components/stack/stack.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CA8BtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgBrB,eAAO,MAAM,OAAO,4GAAoB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack } from './stack';
|
|
3
|
+
const story = {
|
|
4
|
+
title: 'Layouts/Stack',
|
|
5
|
+
component: Stack,
|
|
6
|
+
argTypes: {
|
|
7
|
+
inline: {
|
|
8
|
+
options: [true, false],
|
|
9
|
+
control: { type: 'inline-radio' },
|
|
10
|
+
},
|
|
11
|
+
wrap: {
|
|
12
|
+
options: [true, false],
|
|
13
|
+
control: { type: 'inline-radio' },
|
|
14
|
+
},
|
|
15
|
+
fill: {
|
|
16
|
+
options: [true, false],
|
|
17
|
+
control: { type: 'inline-radio' },
|
|
18
|
+
},
|
|
19
|
+
direction: {
|
|
20
|
+
options: ['row', 'column'],
|
|
21
|
+
control: { type: 'inline-radio' },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
args: {
|
|
25
|
+
direction: 'row',
|
|
26
|
+
vPadding: 16,
|
|
27
|
+
hPadding: 24,
|
|
28
|
+
columnGap: 16,
|
|
29
|
+
rowGap: 80,
|
|
30
|
+
wrap: true,
|
|
31
|
+
as: 'div',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export default story;
|
|
35
|
+
const Template = args => (_jsxs(Stack, { ...args, children: [_jsx("div", { className: "DivEx", children: "01" }), _jsx("div", { className: "DivEx", children: "02" }), _jsx("div", { className: "DivEx", children: "03" }), _jsx("div", { className: "DivEx", children: "04" }), _jsx("div", { className: "DivEx", children: "05" }), _jsx("div", { className: "DivEx", children: "06" }), _jsx("div", { className: "DivEx", children: "07" }), _jsx("div", { className: "DivEx", children: "08" }), _jsx("div", { className: "DivEx", children: "09" })] }));
|
|
36
|
+
export const Default = Template.bind({});
|
|
37
|
+
Default.args = {
|
|
38
|
+
hAlign: 'start',
|
|
39
|
+
vAlign: 'start',
|
|
40
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import { StarMeter } from './star-meter';
|
|
3
|
+
declare const story: ComponentMeta<typeof StarMeter>;
|
|
4
|
+
export default story;
|
|
5
|
+
export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("../..").StackProps & import("./star-meter").StarMeterProps>>;
|
|
6
|
+
export declare const CustomLabel: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("../..").StackProps & import("./star-meter").StarMeterProps>>;
|
|
7
|
+
//# sourceMappingURL=star-meter.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"star-meter.stories.d.ts","sourceRoot":"","sources":["../../../src/components/star-meter/star-meter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAa1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,kJAAoB,CAAC;AAEzC,eAAO,MAAM,WAAW,kJAAoB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack } from '../..';
|
|
3
|
+
import { StarMeter } from './star-meter';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Widgets/Star meter',
|
|
6
|
+
component: StarMeter,
|
|
7
|
+
args: {
|
|
8
|
+
dimension: 'regular',
|
|
9
|
+
value: 3.76,
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
dimension: {
|
|
13
|
+
options: ['small', 'regular', 'big'],
|
|
14
|
+
control: { type: 'radio' },
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default story;
|
|
19
|
+
const Template = args => _jsx(Stack, { children: _jsx(StarMeter, { ...args }) });
|
|
20
|
+
export const Default = Template.bind({});
|
|
21
|
+
export const CustomLabel = Template.bind({});
|
|
22
|
+
CustomLabel.args = {
|
|
23
|
+
label: 'Hello there 👋',
|
|
24
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Symbol } from './symbol';
|
|
4
|
+
declare const story: ComponentMeta<typeof Symbol>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Default: ComponentStory<React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement | SVGSVGElement> & {
|
|
7
|
+
source: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>>;
|
|
8
|
+
dimension?: 16 | 24 | 32 | 40 | 48 | 56 | 12 | 18 | undefined;
|
|
9
|
+
weight?: "solid" | "outline" | "duotone" | undefined;
|
|
10
|
+
} & React.RefAttributes<SVGSVGElement>>>;
|
|
11
|
+
export declare const CustomSymbol: ComponentStory<React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement | SVGSVGElement> & {
|
|
12
|
+
source: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
dimension?: 16 | 24 | 32 | 40 | 48 | 56 | 12 | 18 | undefined;
|
|
14
|
+
weight?: "solid" | "outline" | "duotone" | undefined;
|
|
15
|
+
} & React.RefAttributes<SVGSVGElement>>>;
|
|
16
|
+
//# sourceMappingURL=symbol.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol.stories.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/symbol.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,MAAM,CAgBvC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgBrB,eAAO,MAAM,OAAO;;;;wCAAoB,CAAC;AAKzC,eAAO,MAAM,YAAY;;;;wCAAoB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Symbol } from './symbol';
|
|
3
|
+
const story = {
|
|
4
|
+
title: 'Components/Widgets/Symbol',
|
|
5
|
+
component: Symbol,
|
|
6
|
+
args: {
|
|
7
|
+
weight: 'outline',
|
|
8
|
+
dimension: 24,
|
|
9
|
+
fill: 'currentColor',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
weight: {
|
|
13
|
+
control: {
|
|
14
|
+
options: ['solid', 'outline', 'duotone'],
|
|
15
|
+
type: 'inline-radio',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export default story;
|
|
21
|
+
const Template = args => _jsx(Symbol, { ...args });
|
|
22
|
+
const CustomReactIcon = ({ ...props }) => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 48, height: 48, viewBox: "0 0 256 256", ...props, children: _jsx("path", { d: "M128 16a96.2 96.2 0 0 0-96 96c0 24 12.6 55.1 33.6 83s44.5 45 62.4 45 41.2-16.8 62.4-45 33.6-59 33.6-83a96.2 96.2 0 0 0-96-96ZM64 116v-4a12 12 0 0 1 12-12 36 36 0 0 1 36 36v4a12 12 0 0 1-12 12 36 36 0 0 1-36-36Zm80 84h-32a8 8 0 0 1 0-16h32a8 8 0 0 1 0 16Zm48-84a36 36 0 0 1-36 36 12 12 0 0 1-12-12v-4a36 36 0 0 1 36-36 12 12 0 0 1 12 12Z" }) }));
|
|
23
|
+
export const Default = Template.bind({});
|
|
24
|
+
Default.args = {
|
|
25
|
+
source: 'comment',
|
|
26
|
+
};
|
|
27
|
+
export const CustomSymbol = Template.bind({});
|
|
28
|
+
CustomSymbol.args = {
|
|
29
|
+
source: _jsx(CustomReactIcon, {}),
|
|
30
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
|
+
import { Tab } from './tab';
|
|
4
|
+
declare const story: ComponentMeta<typeof Tab>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Default: ComponentStory<{
|
|
7
|
+
({ className, children, onValueChange, defaultValue, value, loop, dimension, ...otherProps }: import("./tab").TabProps): JSX.Element;
|
|
8
|
+
Panel: FCChildrenClass<import("./tabs-panel").TabPanelProps>;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const InitialTab: ComponentStory<{
|
|
11
|
+
({ className, children, onValueChange, defaultValue, value, loop, dimension, ...otherProps }: import("./tab").TabProps): JSX.Element;
|
|
12
|
+
Panel: FCChildrenClass<import("./tabs-panel").TabPanelProps>;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const ChangeEvent: ComponentStory<{
|
|
15
|
+
({ className, children, onValueChange, defaultValue, value, loop, dimension, ...otherProps }: import("./tab").TabProps): JSX.Element;
|
|
16
|
+
Panel: FCChildrenClass<import("./tabs-panel").TabPanelProps>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const ConditionalTab: () => JSX.Element;
|
|
19
|
+
export declare const DisabledTab: ComponentStory<typeof Tab>;
|
|
20
|
+
export declare const WithIcons: ComponentStory<typeof Tab>;
|
|
21
|
+
//# sourceMappingURL=tab.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.stories.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tab.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,GAAG,CAOpC,CAAC;AACF,eAAe,KAAK,CAAC;AAarB,eAAO,MAAM,OAAO;;;EAAoB,CAAC;AAEzC,eAAO,MAAM,UAAU;;;EAAoB,CAAC;AAwB5C,eAAO,MAAM,WAAW;;;EAAoB,CAAC;AAM7C,eAAO,MAAM,cAAc,mBAc1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,OAAO,GAAG,CASlD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cAAc,CAAC,OAAO,GAAG,CAShD,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Button } from '../..';
|
|
4
|
+
import { Tab } from './tab';
|
|
5
|
+
const story = {
|
|
6
|
+
title: 'Components/Navigation/Tab',
|
|
7
|
+
component: Tab,
|
|
8
|
+
args: {
|
|
9
|
+
defaultValue: '1',
|
|
10
|
+
dimension: 'regular',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
export default story;
|
|
14
|
+
const Template = args => (_jsxs(Tab, { ...args, children: [_jsx(Tab.Panel, { value: "1", label: "Tab 1", children: "Panel 1" }), _jsx(Tab.Panel, { value: "2", label: "Tab mid long 2", children: "Panel 2" }), _jsx(Tab.Panel, { value: "3", label: "Tab short 3", children: "Panel 3" }), _jsx(Tab.Panel, { value: "4", label: "Tab veryy long 4", children: "Panel 4" }), _jsx(Tab.Panel, { value: "5", label: "Tab 5", children: "Panel 5" }), _jsx(Tab.Panel, { value: "6", label: "Tab 6", children: "Panel 6" })] }));
|
|
15
|
+
export const Default = Template.bind({});
|
|
16
|
+
export const InitialTab = Template.bind({});
|
|
17
|
+
InitialTab.args = {
|
|
18
|
+
defaultValue: '3',
|
|
19
|
+
};
|
|
20
|
+
// export const ProgrammaticTab = () => {
|
|
21
|
+
// const [state, setState] = useState('1');
|
|
22
|
+
// return (
|
|
23
|
+
// <Tab value={state} onValueChange={val => setState(val)}>
|
|
24
|
+
// <Tab.Panel value="1" label="Tab 1">
|
|
25
|
+
// Tab panel 1
|
|
26
|
+
// <Button icon="sun-bright" onClick={() => setState('3')}>Go to tab 3</Button>
|
|
27
|
+
// </Tab.Panel>
|
|
28
|
+
// <Tab.Panel value="2" label="Tab 2">
|
|
29
|
+
// Tab panel 2
|
|
30
|
+
// </Tab.Panel>
|
|
31
|
+
// <Tab.Panel value="3" label="Tab 3">
|
|
32
|
+
// Tab panel 3
|
|
33
|
+
// </Tab.Panel>
|
|
34
|
+
// </Tab>
|
|
35
|
+
// );
|
|
36
|
+
// };
|
|
37
|
+
export const ChangeEvent = Template.bind({});
|
|
38
|
+
ChangeEvent.args = {
|
|
39
|
+
onValueChange: current => alert(`current is ${current}`),
|
|
40
|
+
};
|
|
41
|
+
export const ConditionalTab = () => {
|
|
42
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
43
|
+
return (_jsxs(Tab, { defaultValue: "1", children: [_jsx(Tab.Panel, { value: "1", label: "Tab 1", children: "Tab panel 1" }), _jsx(Tab.Panel, { value: "2", label: "Tab 2", children: _jsx(Button, { icon: "sun-bright", onClick: () => setIsVisible(!isVisible), children: "Toggle new tab" }) }), isVisible && _jsx(Tab.Panel, { value: "3", label: "Tab 3", children: "Tab panel 3" })] }));
|
|
44
|
+
};
|
|
45
|
+
export const DisabledTab = args => (_jsxs(Tab, { defaultValue: "1", ...args, children: [_jsx(Tab.Panel, { value: "1", label: "Tab 1", children: "Panel 1" }), _jsx(Tab.Panel, { value: "2", label: "Tab mid long 2", children: "Panel 2" }), _jsx(Tab.Panel, { value: "3", label: "Tab short 3", children: "Panel 3" }), _jsx(Tab.Panel, { disabled: true, value: "4", label: "Tab veryy long 4", children: "Panel 4" }), _jsx(Tab.Panel, { value: "5", label: "Tab 5", children: "Panel 5" }), _jsx(Tab.Panel, { value: "6", label: "Tab 6", children: "Panel 6" })] }));
|
|
46
|
+
export const WithIcons = args => (_jsxs(Tab, { defaultValue: "1", ...args, children: [_jsx(Tab.Panel, { icon: "star", value: "1", label: "Tab 1", children: "Panel 1" }), _jsx(Tab.Panel, { icon: "eye", value: "2", label: "Tab mid long 2", children: "Panel 2" }), _jsx(Tab.Panel, { icon: "sun-bright", value: "3", label: "Tab short 3", children: "Panel 3" }), _jsx(Tab.Panel, { icon: "moon", disabled: true, value: "4", label: "Tab veryy long 4", children: "Panel 4" }), _jsx(Tab.Panel, { icon: "magnifying-glass", value: "5", label: "Tab 5", children: "Panel 5" }), _jsx(Tab.Panel, { icon: "check", value: "6", label: "Tab 6", children: "Panel 6" })] }));
|
|
@@ -4,6 +4,7 @@ export declare type TabPanelProps = {
|
|
|
4
4
|
label: string;
|
|
5
5
|
icon?: SymbolProps['source'];
|
|
6
6
|
value: TabsPrimitive.TabsContentProps['value'];
|
|
7
|
+
disabled?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare const TabPanel: FCChildrenClass<TabPanelProps>;
|
|
9
10
|
//# sourceMappingURL=tabs-panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tabs-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,oBAAY,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tabs-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,oBAAY,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,eAAe,CAAC,aAAa,CAanD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
|
+
import { Table } from './table';
|
|
4
|
+
declare const story: ComponentMeta<typeof Table>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Simple: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
7
|
+
export declare const SelectedRows: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
8
|
+
export declare const HidingColumn: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
9
|
+
export declare const defaultHiddenColumns: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
10
|
+
export declare const Scrollable: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
11
|
+
export declare const WithTableActions: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
12
|
+
export declare const CustomExpandable: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
13
|
+
export declare const Pagination: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
14
|
+
export declare const RowActions: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
15
|
+
export declare const NoData: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
16
|
+
export declare const ManualPagination: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
17
|
+
export declare const Loading: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
18
|
+
export declare const ManualSorting: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
19
|
+
export declare const ManualPaginationFiltering: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
20
|
+
export declare const PreselectedRows: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
21
|
+
export declare const AsyncData: ComponentStory<(<T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
22
|
+
//# sourceMappingURL=table.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAWhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CA85BtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgCrB,eAAO,MAAM,MAAM,6jBAAoB,CAAC;AA0BxC,eAAO,MAAM,YAAY,6jBAA6B,CAAC;AAuCvD,eAAO,MAAM,YAAY,6jBAAgC,CAAC;AAM1D,eAAO,MAAM,oBAAoB,6jBAAoB,CAAC;AAOtD,eAAO,MAAM,UAAU,6jBAAoB,CAAC;AAS5C,eAAO,MAAM,gBAAgB,6jBAAoB,CAAC;AAQlD,eAAO,MAAM,gBAAgB,6jBAAoB,CAAC;AAQlD,eAAO,MAAM,UAAU,6jBAA6B,CAAC;AAuDrD,eAAO,MAAM,UAAU,6jBAA8B,CAAC;AAOtD,eAAO,MAAM,MAAM,6jBAAoB,CAAC;AAoDxC,eAAO,MAAM,gBAAgB,6jBAAoC,CAAC;AASlE,eAAO,MAAM,OAAO,6jBAAoB,CAAC;AAyDzC,eAAO,MAAM,aAAa,6jBAAiC,CAAC;AAmD5D,eAAO,MAAM,yBAAyB,6jBAA6C,CAAC;AAkCpF,eAAO,MAAM,eAAe,6jBAAmC,CAAC;AAmChE,eAAO,MAAM,SAAS,6jBAA6B,CAAC"}
|