ingred-ui 12.0.0 → 13.0.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.d.ts +10 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +17 -0
- package/dist/components/Accordion/__tests__/Accordion.test.d.ts +1 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/styled.d.ts +14 -0
- package/dist/components/ActionButton/ActionButton.stories.d.ts +5 -5
- package/dist/components/Backdrop/Backdrop.stories.d.ts +3 -3
- package/dist/components/Badge/Badge.stories.d.ts +9 -9
- package/dist/components/Button/Button.stories.d.ts +11 -11
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +5 -5
- package/dist/components/Card/Card.stories.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/components/ClickAwayListener/ClickAwayListener.stories.d.ts +3 -3
- package/dist/components/ConfirmModal/ConfirmModal.stories.d.ts +196 -8
- package/dist/components/ContextMenu/ContextMenu.stories.d.ts +5 -5
- package/dist/components/CreatableSelect/CreatableSelect.d.ts +2 -2
- package/dist/components/CreatableSelect/CreatableSelect.stories.d.ts +3 -3
- package/dist/components/DataTable/DataTable.d.ts +14 -14
- package/dist/components/DataTable/DataTable.stories.d.ts +15 -13
- package/dist/components/DatePicker/DatePicker.stories.d.ts +5 -5
- package/dist/components/DateRangePicker/DateRangePicker.stories.d.ts +5 -6
- package/dist/components/Divider/Divider.stories.d.ts +6 -6
- package/dist/components/DropdownButton/DropdownButton.stories.d.ts +18 -5
- package/dist/components/ErrorText/ErrorText.stories.d.ts +3 -3
- package/dist/components/Fade/Fade.stories.d.ts +1 -1
- package/dist/components/FileUploader/FileUploader.stories.d.ts +4 -4
- package/dist/components/FixedPanel/FixedPanel.stories.d.ts +3 -3
- package/dist/components/Flex/Flex.stories.d.ts +3 -3
- package/dist/components/FullSizeConfirmModal/FullSizeConfirmModal.stories.d.ts +197 -8
- package/dist/components/Grow/Grow.stories.d.ts +1 -1
- package/dist/components/Input/Input.stories.d.ts +4 -4
- package/dist/components/ItemEmpty/ItemEmpty.stories.d.ts +3 -3
- package/dist/components/LoadingBar/LoadingBar.stories.d.ts +1 -1
- package/dist/components/LocaleProvider/LocaleProvider.stories.d.ts +3 -3
- package/dist/components/Menu/Menu.stories.d.ts +61 -4
- package/dist/components/MenuList/MenuList.stories.d.ts +565 -4
- package/dist/components/Modal/Modal.stories.d.ts +3 -3
- package/dist/components/MultipleFilter/MultipleFilter.stories.d.ts +3 -3
- package/dist/components/NavigationRail/NavigationRail.stories.d.ts +3 -3
- package/dist/components/NotificationBadge/NotificationBadge.stories.d.ts +4 -4
- package/dist/components/Pager/Pager.stories.d.ts +4 -5
- package/dist/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/components/RadioButton/RadioButton.stories.d.ts +3 -3
- package/dist/components/ScrollArea/ScrollArea.stories.d.ts +3 -3
- package/dist/components/Select/Select.d.ts +2 -2
- package/dist/components/Select/Select.stories.d.ts +8 -8
- package/dist/components/Slide/Slide.stories.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.stories.d.ts +73 -5
- package/dist/components/Spacer/Spacer.stories.d.ts +3 -3
- package/dist/components/Spinner/Spinner.stories.d.ts +3 -3
- package/dist/components/Switch/Switch.stories.d.ts +4 -4
- package/dist/components/TextField/TextField.stories.d.ts +4 -4
- package/dist/components/Toast/Toast.stories.d.ts +109 -6
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +3 -3
- package/dist/components/Typography/Typography.stories.d.ts +4 -4
- package/dist/components/index.d.ts +2 -0
- package/dist/index.es.js +8 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export type AccordionProps = {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
expanded?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onChange?: (event: React.SyntheticEvent, expanded: boolean) => void;
|
|
7
|
+
children: ReactNode | ReactNode[];
|
|
8
|
+
};
|
|
9
|
+
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default Accordion;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import { AccordionProps } from "./Accordion";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
args: {
|
|
8
|
+
title: string;
|
|
9
|
+
children: string;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
expanded: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const Example: StoryObj<AccordionProps>;
|
|
16
|
+
export declare const Multiple: StoryObj<AccordionProps>;
|
|
17
|
+
export declare const Controlled: StoryObj<AccordionProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/extend-expect";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const AccordionTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Flex").FlexProps & {
|
|
2
|
+
expanded: boolean;
|
|
3
|
+
disabled?: boolean | undefined;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const AccordionTitleChildren: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const IconContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const IconButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
expanded: boolean;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const DropdownIndicator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
+
export declare const AccordionContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
12
|
+
expanded: boolean;
|
|
13
|
+
height: number;
|
|
14
|
+
}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ActionButtonProps } from "./ActionButton";
|
|
4
4
|
declare const _default: {
|
|
@@ -15,13 +15,13 @@ declare const _default: {
|
|
|
15
15
|
parameters: {
|
|
16
16
|
docs: {
|
|
17
17
|
source: {
|
|
18
|
-
|
|
18
|
+
language: string;
|
|
19
19
|
};
|
|
20
20
|
page: () => JSX.Element;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
export default _default;
|
|
25
|
-
export declare const Primary:
|
|
26
|
-
export declare const Warning:
|
|
27
|
-
export declare const Disabled:
|
|
25
|
+
export declare const Primary: StoryObj<ActionButtonProps>;
|
|
26
|
+
export declare const Warning: StoryObj<ActionButtonProps>;
|
|
27
|
+
export declare const Disabled: StoryObj<ActionButtonProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
3
|
import { BackdropProps } from "./Backdrop";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
@@ -15,11 +15,11 @@ declare const _default: {
|
|
|
15
15
|
parameters: {
|
|
16
16
|
docs: {
|
|
17
17
|
source: {
|
|
18
|
-
|
|
18
|
+
language: string;
|
|
19
19
|
};
|
|
20
20
|
page: () => JSX.Element;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
export default _default;
|
|
25
|
-
export declare const Example:
|
|
25
|
+
export declare const Example: StoryObj<BackdropProps>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
import Badge from "./Badge";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
components: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement | HTMLAnchorElement>>;
|
|
6
|
+
components: React.ForwardRefExoticComponent<import("./Badge").BadgeProps & React.RefAttributes<HTMLSpanElement | HTMLAnchorElement>>;
|
|
7
7
|
parameters: {
|
|
8
8
|
docs: {
|
|
9
9
|
source: {
|
|
10
|
-
|
|
10
|
+
language: string;
|
|
11
11
|
};
|
|
12
12
|
page: () => JSX.Element;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
|
-
export declare const Primary:
|
|
18
|
-
export declare const Secondary:
|
|
19
|
-
export declare const Success:
|
|
20
|
-
export declare const Warning:
|
|
21
|
-
export declare const Danger:
|
|
17
|
+
export declare const Primary: StoryObj<typeof Badge>;
|
|
18
|
+
export declare const Secondary: StoryObj<typeof Badge>;
|
|
19
|
+
export declare const Success: StoryObj<typeof Badge>;
|
|
20
|
+
export declare const Warning: StoryObj<typeof Badge>;
|
|
21
|
+
export declare const Danger: StoryObj<typeof Badge>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
3
|
import { ButtonProps } from "./Button";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
@@ -19,19 +19,19 @@ declare const _default: {
|
|
|
19
19
|
parameters: {
|
|
20
20
|
docs: {
|
|
21
21
|
source: {
|
|
22
|
-
|
|
22
|
+
language: string;
|
|
23
23
|
};
|
|
24
24
|
page: () => JSX.Element;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
export default _default;
|
|
29
|
-
export declare const Primary:
|
|
30
|
-
export declare const Secondary:
|
|
31
|
-
export declare const Danger:
|
|
32
|
-
export declare const Clear:
|
|
33
|
-
export declare const Small:
|
|
34
|
-
export declare const Medium:
|
|
35
|
-
export declare const Large:
|
|
36
|
-
export declare const Disabled:
|
|
37
|
-
export declare const UseHrefProps:
|
|
29
|
+
export declare const Primary: StoryObj<ButtonProps>;
|
|
30
|
+
export declare const Secondary: StoryObj<ButtonProps>;
|
|
31
|
+
export declare const Danger: StoryObj<ButtonProps>;
|
|
32
|
+
export declare const Clear: StoryObj<ButtonProps>;
|
|
33
|
+
export declare const Small: StoryObj<ButtonProps>;
|
|
34
|
+
export declare const Medium: StoryObj<ButtonProps>;
|
|
35
|
+
export declare const Large: StoryObj<ButtonProps>;
|
|
36
|
+
export declare const Disabled: StoryObj<ButtonProps>;
|
|
37
|
+
export declare const UseHrefProps: StoryObj<ButtonProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
3
|
import { ButtonGroupProps } from "./ButtonGroup";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
@@ -21,7 +21,7 @@ declare const _default: {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export default _default;
|
|
24
|
-
export declare const Example:
|
|
25
|
-
export declare const DesignSamples:
|
|
26
|
-
export declare const DisablePartially:
|
|
27
|
-
export declare const LinkMixed:
|
|
24
|
+
export declare const Example: StoryObj<ButtonGroupProps>;
|
|
25
|
+
export declare const DesignSamples: StoryObj;
|
|
26
|
+
export declare const DisablePartially: StoryObj<ButtonGroupProps>;
|
|
27
|
+
export declare const LinkMixed: StoryObj<ButtonGroupProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
3
|
import { CardProps } from "./Card";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
@@ -16,11 +16,11 @@ declare const _default: {
|
|
|
16
16
|
parameters: {
|
|
17
17
|
docs: {
|
|
18
18
|
source: {
|
|
19
|
-
|
|
19
|
+
language: string;
|
|
20
20
|
};
|
|
21
21
|
page: () => JSX.Element;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
export default _default;
|
|
26
|
-
export declare const Example:
|
|
26
|
+
export declare const Example: StoryObj<CardProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
3
|
import { CheckBoxProps } from "./Checkbox";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
@@ -15,5 +15,5 @@ declare const _default: {
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
18
|
-
export declare const Example:
|
|
19
|
-
export declare const DesignSamples:
|
|
18
|
+
export declare const Example: StoryObj<CheckBoxProps>;
|
|
19
|
+
export declare const DesignSamples: StoryObj;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
@@ -6,11 +6,11 @@ declare const _default: {
|
|
|
6
6
|
parameters: {
|
|
7
7
|
docs: {
|
|
8
8
|
source: {
|
|
9
|
-
|
|
9
|
+
language: string;
|
|
10
10
|
};
|
|
11
11
|
page: () => JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
|
16
|
-
export declare const Basic:
|
|
16
|
+
export declare const Basic: StoryObj;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Story } from "@storybook/react/types-6-0";
|
|
3
2
|
import { ConfirmModalProps } from "./ConfirmModal";
|
|
4
3
|
declare const _default: {
|
|
5
4
|
title: string;
|
|
@@ -11,16 +10,205 @@ declare const _default: {
|
|
|
11
10
|
parameters: {
|
|
12
11
|
docs: {
|
|
13
12
|
source: {
|
|
14
|
-
|
|
13
|
+
language: string;
|
|
15
14
|
};
|
|
16
15
|
page: () => JSX.Element;
|
|
17
16
|
};
|
|
18
17
|
};
|
|
19
18
|
};
|
|
20
19
|
export default _default;
|
|
21
|
-
export declare const Basic:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
export declare const Basic: {
|
|
21
|
+
args: {
|
|
22
|
+
children: string;
|
|
23
|
+
onSubmit: import("@storybook/addon-actions").HandlerFunction;
|
|
24
|
+
};
|
|
25
|
+
decorators?: import("@storybook/types").DecoratorFunction<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
26
|
+
title: string;
|
|
27
|
+
confirmText?: string | undefined;
|
|
28
|
+
cancelText?: string | undefined;
|
|
29
|
+
onClose?: ((event: React.MouseEvent<Element, MouseEvent> | React.MouseEvent<HTMLButtonElement, MouseEvent>, reason: "backdropClick" | import("./ConfirmModal").ConfirmModalCloseReason) => void) | undefined;
|
|
30
|
+
onSubmit?: ((event: React.FormEvent<HTMLFormElement>) => void) | undefined;
|
|
31
|
+
buttonColor?: import("../Button/Button").ButtonColor | undefined;
|
|
32
|
+
isOpen?: boolean | undefined;
|
|
33
|
+
disabled?: boolean | undefined;
|
|
34
|
+
loading?: boolean | undefined;
|
|
35
|
+
overflowYScroll?: boolean | undefined;
|
|
36
|
+
disableHorizontalPadding?: boolean | undefined;
|
|
37
|
+
subActions?: React.ReactNode[] | undefined;
|
|
38
|
+
modalProps?: import("..").ModalProps | undefined;
|
|
39
|
+
fadeProps?: import("../../utils/reactTransitionGroup").CSSTransitionProps | undefined;
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
}>[] | undefined;
|
|
42
|
+
parameters?: import("@storybook/types").Parameters | undefined;
|
|
43
|
+
argTypes?: Partial<import("@storybook/types").ArgTypes<ConfirmModalProps>> | undefined;
|
|
44
|
+
loaders?: import("@storybook/types").LoaderFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps>[] | undefined;
|
|
45
|
+
render?: import("@storybook/types").ArgsStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
storyName?: string | undefined;
|
|
48
|
+
play?: import("@storybook/types").PlayFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
49
|
+
tags?: string[] | undefined;
|
|
50
|
+
story?: Omit<import("@storybook/types").StoryAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps, Partial<ConfirmModalProps>>, "story"> | undefined;
|
|
51
|
+
};
|
|
52
|
+
export declare const WithOneSubAction: {
|
|
53
|
+
args: {
|
|
54
|
+
children: string;
|
|
55
|
+
onSubmit: import("@storybook/addon-actions").HandlerFunction;
|
|
56
|
+
subActions: JSX.Element[];
|
|
57
|
+
};
|
|
58
|
+
decorators?: import("@storybook/types").DecoratorFunction<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
59
|
+
title: string;
|
|
60
|
+
confirmText?: string | undefined;
|
|
61
|
+
cancelText?: string | undefined;
|
|
62
|
+
onClose?: ((event: React.MouseEvent<Element, MouseEvent> | React.MouseEvent<HTMLButtonElement, MouseEvent>, reason: "backdropClick" | import("./ConfirmModal").ConfirmModalCloseReason) => void) | undefined;
|
|
63
|
+
onSubmit?: ((event: React.FormEvent<HTMLFormElement>) => void) | undefined;
|
|
64
|
+
buttonColor?: import("../Button/Button").ButtonColor | undefined;
|
|
65
|
+
isOpen?: boolean | undefined;
|
|
66
|
+
disabled?: boolean | undefined;
|
|
67
|
+
loading?: boolean | undefined;
|
|
68
|
+
overflowYScroll?: boolean | undefined;
|
|
69
|
+
disableHorizontalPadding?: boolean | undefined;
|
|
70
|
+
subActions?: React.ReactNode[] | undefined;
|
|
71
|
+
modalProps?: import("..").ModalProps | undefined;
|
|
72
|
+
fadeProps?: import("../../utils/reactTransitionGroup").CSSTransitionProps | undefined;
|
|
73
|
+
children?: React.ReactNode;
|
|
74
|
+
}>[] | undefined;
|
|
75
|
+
parameters?: import("@storybook/types").Parameters | undefined;
|
|
76
|
+
argTypes?: Partial<import("@storybook/types").ArgTypes<ConfirmModalProps>> | undefined;
|
|
77
|
+
loaders?: import("@storybook/types").LoaderFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps>[] | undefined;
|
|
78
|
+
render?: import("@storybook/types").ArgsStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
79
|
+
name?: string | undefined;
|
|
80
|
+
storyName?: string | undefined;
|
|
81
|
+
play?: import("@storybook/types").PlayFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
82
|
+
tags?: string[] | undefined;
|
|
83
|
+
story?: Omit<import("@storybook/types").StoryAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps, Partial<ConfirmModalProps>>, "story"> | undefined;
|
|
84
|
+
};
|
|
85
|
+
export declare const WithTwoSubActions: {
|
|
86
|
+
children: string;
|
|
87
|
+
onSubmit: import("@storybook/addon-actions").HandlerFunction;
|
|
88
|
+
subActions: JSX.Element[];
|
|
89
|
+
decorators?: import("@storybook/types").DecoratorFunction<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
90
|
+
title: string;
|
|
91
|
+
confirmText?: string | undefined;
|
|
92
|
+
cancelText?: string | undefined;
|
|
93
|
+
onClose?: ((event: React.MouseEvent<Element, MouseEvent> | React.MouseEvent<HTMLButtonElement, MouseEvent>, reason: "backdropClick" | import("./ConfirmModal").ConfirmModalCloseReason) => void) | undefined;
|
|
94
|
+
onSubmit?: ((event: React.FormEvent<HTMLFormElement>) => void) | undefined;
|
|
95
|
+
buttonColor?: import("../Button/Button").ButtonColor | undefined;
|
|
96
|
+
isOpen?: boolean | undefined;
|
|
97
|
+
disabled?: boolean | undefined;
|
|
98
|
+
loading?: boolean | undefined;
|
|
99
|
+
overflowYScroll?: boolean | undefined;
|
|
100
|
+
disableHorizontalPadding?: boolean | undefined;
|
|
101
|
+
subActions?: React.ReactNode[] | undefined;
|
|
102
|
+
modalProps?: import("..").ModalProps | undefined;
|
|
103
|
+
fadeProps?: import("../../utils/reactTransitionGroup").CSSTransitionProps | undefined;
|
|
104
|
+
children?: React.ReactNode;
|
|
105
|
+
}>[] | undefined;
|
|
106
|
+
parameters?: import("@storybook/types").Parameters | undefined;
|
|
107
|
+
args?: Partial<ConfirmModalProps> | undefined;
|
|
108
|
+
argTypes?: Partial<import("@storybook/types").ArgTypes<ConfirmModalProps>> | undefined;
|
|
109
|
+
loaders?: import("@storybook/types").LoaderFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps>[] | undefined;
|
|
110
|
+
render?: import("@storybook/types").ArgsStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
111
|
+
name?: string | undefined;
|
|
112
|
+
storyName?: string | undefined;
|
|
113
|
+
play?: import("@storybook/types").PlayFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
114
|
+
tags?: string[] | undefined;
|
|
115
|
+
story?: Omit<import("@storybook/types").StoryAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps, Partial<ConfirmModalProps>>, "story"> | undefined;
|
|
116
|
+
};
|
|
117
|
+
export declare const Loading: {
|
|
118
|
+
args: {
|
|
119
|
+
children: string;
|
|
120
|
+
onSubmit: () => void;
|
|
121
|
+
loading: boolean;
|
|
122
|
+
};
|
|
123
|
+
decorators?: import("@storybook/types").DecoratorFunction<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
124
|
+
title: string;
|
|
125
|
+
confirmText?: string | undefined;
|
|
126
|
+
cancelText?: string | undefined;
|
|
127
|
+
onClose?: ((event: React.MouseEvent<Element, MouseEvent> | React.MouseEvent<HTMLButtonElement, MouseEvent>, reason: "backdropClick" | import("./ConfirmModal").ConfirmModalCloseReason) => void) | undefined;
|
|
128
|
+
onSubmit?: ((event: React.FormEvent<HTMLFormElement>) => void) | undefined;
|
|
129
|
+
buttonColor?: import("../Button/Button").ButtonColor | undefined;
|
|
130
|
+
isOpen?: boolean | undefined;
|
|
131
|
+
disabled?: boolean | undefined;
|
|
132
|
+
loading?: boolean | undefined;
|
|
133
|
+
overflowYScroll?: boolean | undefined;
|
|
134
|
+
disableHorizontalPadding?: boolean | undefined;
|
|
135
|
+
subActions?: React.ReactNode[] | undefined;
|
|
136
|
+
modalProps?: import("..").ModalProps | undefined;
|
|
137
|
+
fadeProps?: import("../../utils/reactTransitionGroup").CSSTransitionProps | undefined;
|
|
138
|
+
children?: React.ReactNode;
|
|
139
|
+
}>[] | undefined;
|
|
140
|
+
parameters?: import("@storybook/types").Parameters | undefined;
|
|
141
|
+
argTypes?: Partial<import("@storybook/types").ArgTypes<ConfirmModalProps>> | undefined;
|
|
142
|
+
loaders?: import("@storybook/types").LoaderFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps>[] | undefined;
|
|
143
|
+
render?: import("@storybook/types").ArgsStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
144
|
+
name?: string | undefined;
|
|
145
|
+
storyName?: string | undefined;
|
|
146
|
+
play?: import("@storybook/types").PlayFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
147
|
+
tags?: string[] | undefined;
|
|
148
|
+
story?: Omit<import("@storybook/types").StoryAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps, Partial<ConfirmModalProps>>, "story"> | undefined;
|
|
149
|
+
};
|
|
150
|
+
export declare const OverflowYScroll: {
|
|
151
|
+
args: {
|
|
152
|
+
children: JSX.Element;
|
|
153
|
+
onSubmit: import("@storybook/addon-actions").HandlerFunction;
|
|
154
|
+
overflowYScroll: boolean;
|
|
155
|
+
};
|
|
156
|
+
decorators?: import("@storybook/types").DecoratorFunction<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
157
|
+
title: string;
|
|
158
|
+
confirmText?: string | undefined;
|
|
159
|
+
cancelText?: string | undefined;
|
|
160
|
+
onClose?: ((event: React.MouseEvent<Element, MouseEvent> | React.MouseEvent<HTMLButtonElement, MouseEvent>, reason: "backdropClick" | import("./ConfirmModal").ConfirmModalCloseReason) => void) | undefined;
|
|
161
|
+
onSubmit?: ((event: React.FormEvent<HTMLFormElement>) => void) | undefined;
|
|
162
|
+
buttonColor?: import("../Button/Button").ButtonColor | undefined;
|
|
163
|
+
isOpen?: boolean | undefined;
|
|
164
|
+
disabled?: boolean | undefined;
|
|
165
|
+
loading?: boolean | undefined;
|
|
166
|
+
overflowYScroll?: boolean | undefined;
|
|
167
|
+
disableHorizontalPadding?: boolean | undefined;
|
|
168
|
+
subActions?: React.ReactNode[] | undefined;
|
|
169
|
+
modalProps?: import("..").ModalProps | undefined;
|
|
170
|
+
fadeProps?: import("../../utils/reactTransitionGroup").CSSTransitionProps | undefined;
|
|
171
|
+
children?: React.ReactNode;
|
|
172
|
+
}>[] | undefined;
|
|
173
|
+
parameters?: import("@storybook/types").Parameters | undefined;
|
|
174
|
+
argTypes?: Partial<import("@storybook/types").ArgTypes<ConfirmModalProps>> | undefined;
|
|
175
|
+
loaders?: import("@storybook/types").LoaderFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps>[] | undefined;
|
|
176
|
+
render?: import("@storybook/types").ArgsStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
177
|
+
name?: string | undefined;
|
|
178
|
+
storyName?: string | undefined;
|
|
179
|
+
play?: import("@storybook/types").PlayFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
180
|
+
tags?: string[] | undefined;
|
|
181
|
+
story?: Omit<import("@storybook/types").StoryAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps, Partial<ConfirmModalProps>>, "story"> | undefined;
|
|
182
|
+
};
|
|
183
|
+
export declare const WithoutFooter: {
|
|
184
|
+
args: {
|
|
185
|
+
children: string;
|
|
186
|
+
onSubmit: undefined;
|
|
187
|
+
};
|
|
188
|
+
decorators?: import("@storybook/types").DecoratorFunction<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
189
|
+
title: string;
|
|
190
|
+
confirmText?: string | undefined;
|
|
191
|
+
cancelText?: string | undefined;
|
|
192
|
+
onClose?: ((event: React.MouseEvent<Element, MouseEvent> | React.MouseEvent<HTMLButtonElement, MouseEvent>, reason: "backdropClick" | import("./ConfirmModal").ConfirmModalCloseReason) => void) | undefined;
|
|
193
|
+
onSubmit?: ((event: React.FormEvent<HTMLFormElement>) => void) | undefined;
|
|
194
|
+
buttonColor?: import("../Button/Button").ButtonColor | undefined;
|
|
195
|
+
isOpen?: boolean | undefined;
|
|
196
|
+
disabled?: boolean | undefined;
|
|
197
|
+
loading?: boolean | undefined;
|
|
198
|
+
overflowYScroll?: boolean | undefined;
|
|
199
|
+
disableHorizontalPadding?: boolean | undefined;
|
|
200
|
+
subActions?: React.ReactNode[] | undefined;
|
|
201
|
+
modalProps?: import("..").ModalProps | undefined;
|
|
202
|
+
fadeProps?: import("../../utils/reactTransitionGroup").CSSTransitionProps | undefined;
|
|
203
|
+
children?: React.ReactNode;
|
|
204
|
+
}>[] | undefined;
|
|
205
|
+
parameters?: import("@storybook/types").Parameters | undefined;
|
|
206
|
+
argTypes?: Partial<import("@storybook/types").ArgTypes<ConfirmModalProps>> | undefined;
|
|
207
|
+
loaders?: import("@storybook/types").LoaderFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps>[] | undefined;
|
|
208
|
+
render?: import("@storybook/types").ArgsStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
209
|
+
name?: string | undefined;
|
|
210
|
+
storyName?: string | undefined;
|
|
211
|
+
play?: import("@storybook/types").PlayFunction<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps> | undefined;
|
|
212
|
+
tags?: string[] | undefined;
|
|
213
|
+
story?: Omit<import("@storybook/types").StoryAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ConfirmModalProps, Partial<ConfirmModalProps>>, "story"> | undefined;
|
|
214
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
3
|
import { ContextMenuProps } from "./ContextMenu";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
@@ -7,13 +7,13 @@ declare const _default: {
|
|
|
7
7
|
parameters: {
|
|
8
8
|
docs: {
|
|
9
9
|
source: {
|
|
10
|
-
|
|
10
|
+
language: string;
|
|
11
11
|
};
|
|
12
12
|
page: () => JSX.Element;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
|
-
export declare const Basic:
|
|
18
|
-
export declare const Disabled:
|
|
19
|
-
export declare const Warning:
|
|
17
|
+
export declare const Basic: StoryObj<ContextMenuProps>;
|
|
18
|
+
export declare const Disabled: StoryObj<ContextMenuProps>;
|
|
19
|
+
export declare const Warning: StoryObj<ContextMenuProps>;
|
|
@@ -16,7 +16,7 @@ declare const _default: <T>(props: {
|
|
|
16
16
|
error?: boolean | undefined;
|
|
17
17
|
emptyMessage?: string | undefined;
|
|
18
18
|
addMessage?: string | undefined;
|
|
19
|
-
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<OptionType<T>, boolean, GroupBase<OptionType<T>>>, "
|
|
19
|
+
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<OptionType<T>, boolean, GroupBase<OptionType<T>>>, "theme" | "form" | "value" | "name" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "autoFocus" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
20
20
|
placeholder?: React.ReactNode;
|
|
21
21
|
tabIndex?: number | undefined;
|
|
22
22
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
@@ -62,7 +62,7 @@ declare const _default: <T>(props: {
|
|
|
62
62
|
styles?: import("react-select").StylesConfig<OptionType<T>, boolean, GroupBase<OptionType<T>>> | undefined;
|
|
63
63
|
tabSelectsValue?: boolean | undefined;
|
|
64
64
|
unstyled?: boolean | undefined;
|
|
65
|
-
} & {}, "value" | "onChange" | "menuIsOpen" | "inputValue" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<OptionType<T>, boolean, GroupBase<OptionType<T>>>, "
|
|
65
|
+
} & {}, "value" | "onChange" | "menuIsOpen" | "inputValue" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<OptionType<T>, boolean, GroupBase<OptionType<T>>>, "theme" | "form" | "value" | "name" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "autoFocus" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
66
66
|
placeholder?: React.ReactNode;
|
|
67
67
|
tabIndex?: number | undefined;
|
|
68
68
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
@@ -7,7 +7,7 @@ declare const _default: {
|
|
|
7
7
|
error?: boolean | undefined;
|
|
8
8
|
emptyMessage?: string | undefined;
|
|
9
9
|
addMessage?: string | undefined;
|
|
10
|
-
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<import("..").OptionType<T>, boolean, import("react-select").GroupBase<import("..").OptionType<T>>>, "
|
|
10
|
+
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<import("..").OptionType<T>, boolean, import("react-select").GroupBase<import("..").OptionType<T>>>, "theme" | "form" | "value" | "name" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "autoFocus" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
11
11
|
placeholder?: React.ReactNode;
|
|
12
12
|
tabIndex?: number | undefined;
|
|
13
13
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
@@ -53,7 +53,7 @@ declare const _default: {
|
|
|
53
53
|
styles?: import("react-select").StylesConfig<import("..").OptionType<T>, boolean, import("react-select").GroupBase<import("..").OptionType<T>>> | undefined;
|
|
54
54
|
tabSelectsValue?: boolean | undefined;
|
|
55
55
|
unstyled?: boolean | undefined;
|
|
56
|
-
} & {}, "value" | "onChange" | "menuIsOpen" | "inputValue" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<import("..").OptionType<T>, boolean, import("react-select").GroupBase<import("..").OptionType<T>>>, "
|
|
56
|
+
} & {}, "value" | "onChange" | "menuIsOpen" | "inputValue" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<import("..").OptionType<T>, boolean, import("react-select").GroupBase<import("..").OptionType<T>>>, "theme" | "form" | "value" | "name" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "autoFocus" | "required" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
57
57
|
placeholder?: React.ReactNode;
|
|
58
58
|
tabIndex?: number | undefined;
|
|
59
59
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
@@ -103,7 +103,7 @@ declare const _default: {
|
|
|
103
103
|
ref?: React.ForwardedRef<HTMLDivElement> | undefined;
|
|
104
104
|
}) => React.ReactElement<import("./CreatableSelect").CreatableSelectProps<unknown>, string | React.JSXElementConstructor<any>>;
|
|
105
105
|
source: {
|
|
106
|
-
|
|
106
|
+
language: string;
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
export default _default;
|
|
@@ -3,10 +3,6 @@ import { LabelDisplayRows } from "./internal/CountChanger";
|
|
|
3
3
|
import { TypographyProps } from "../Typography";
|
|
4
4
|
import { ItemEmptyProps } from "../ItemEmpty";
|
|
5
5
|
import { VerticalSpacing } from "./internal/Table/Row";
|
|
6
|
-
export type DataTableBaseData = {
|
|
7
|
-
id: number;
|
|
8
|
-
selectDisabled?: boolean;
|
|
9
|
-
};
|
|
10
6
|
export type Column<T> = {
|
|
11
7
|
name: string;
|
|
12
8
|
selector: (data: T) => string | number;
|
|
@@ -22,11 +18,15 @@ type Tab<T> = {
|
|
|
22
18
|
filter: (data: T[]) => T[];
|
|
23
19
|
disabledCheck?: boolean;
|
|
24
20
|
};
|
|
25
|
-
export type DataTableProps<T> = {
|
|
21
|
+
export type DataTableProps<T, K extends keyof T> = {
|
|
26
22
|
/**
|
|
27
|
-
* Array of some object that has
|
|
23
|
+
* Array of some object that has unique property.
|
|
28
24
|
*/
|
|
29
25
|
data: T[];
|
|
26
|
+
/**
|
|
27
|
+
* Specifies a unique key for each object in the `data`. This key is used to identify each object.
|
|
28
|
+
*/
|
|
29
|
+
dataKey: K;
|
|
30
30
|
/**
|
|
31
31
|
* Define column of table. Please refer to the samples below.
|
|
32
32
|
*/
|
|
@@ -34,16 +34,14 @@ export type DataTableProps<T> = {
|
|
|
34
34
|
enablePagination?: boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Enable to use checkbox in table.
|
|
37
|
-
* The argument `rows` is array of `id: number` defined in `data` props.
|
|
38
37
|
* **Don't use with `onRadioChange={true}`**
|
|
39
38
|
*/
|
|
40
|
-
onSelectRowsChange?: (rows:
|
|
39
|
+
onSelectRowsChange?: (rows: T[K][]) => void;
|
|
41
40
|
/**
|
|
42
41
|
* Enable to use radio button in table.
|
|
43
|
-
* The argument `radio` is `id: number` defined in `data` props.
|
|
44
42
|
* **Don't use with `onSelectRowsChange={true}`**
|
|
45
43
|
*/
|
|
46
|
-
onRadioChange?: (radio:
|
|
44
|
+
onRadioChange?: (radio: T[K]) => void;
|
|
47
45
|
/**
|
|
48
46
|
* Define tabs of table. Please refer to the samples below.
|
|
49
47
|
*/
|
|
@@ -70,11 +68,11 @@ export type DataTableProps<T> = {
|
|
|
70
68
|
/**
|
|
71
69
|
* Specify checked rows.
|
|
72
70
|
*/
|
|
73
|
-
selectedRows?:
|
|
71
|
+
selectedRows?: T[K][];
|
|
74
72
|
/**
|
|
75
73
|
* Specify checked row.
|
|
76
74
|
*/
|
|
77
|
-
selectedRow?:
|
|
75
|
+
selectedRow?: T[K];
|
|
78
76
|
/**
|
|
79
77
|
* Add vertical line in table.
|
|
80
78
|
*/
|
|
@@ -93,8 +91,10 @@ export type DataTableProps<T> = {
|
|
|
93
91
|
labelRowsPerPage?: string;
|
|
94
92
|
labelDisplayedRows?: LabelDisplayRows;
|
|
95
93
|
};
|
|
96
|
-
declare const DataTable: <T extends
|
|
97
|
-
|
|
94
|
+
declare const DataTable: <T extends {
|
|
95
|
+
selectDisabled?: boolean | undefined;
|
|
96
|
+
}, K extends keyof T>({ data: sourceData, dataKey, columns, enablePagination, onSelectRowsChange, onRadioChange, tabs, itemEmptyProps, per, defaultSortField, defaultSortOrder, selectedRows, selectedRow, enableRuledLine, verticalSpacing, fullWidth, disableCheckWhenClickRow, tableMaxHeight, horizontalScrollable, labelRowsPerPage, labelDisplayedRows, }: DataTableProps<T, K>, ref?: React.ForwardedRef<HTMLDivElement>) => JSX.Element;
|
|
97
|
+
declare const _default: <T, K extends keyof T>(props: DataTableProps<T, K> & {
|
|
98
98
|
ref?: React.ForwardedRef<HTMLDivElement> | undefined;
|
|
99
99
|
}) => ReturnType<typeof DataTable>;
|
|
100
100
|
export default _default;
|