@inntechcorp/it-design 2.0.16 → 2.0.18
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/index.cjs.js +70 -70
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +14 -10
- package/dist/index.esm.js +70 -70
- package/dist/stories/CheckboxGroup.stories.d.ts +2 -5
- package/dist/stories/CheckboxGroupControl.d.ts +2 -0
- package/dist/stories/CheckboxGroupControl.stories.d.ts +18 -0
- package/dist/stories/Input.stories.d.ts +2 -4
- package/dist/stories/Select.d.ts +3 -0
- package/dist/stories/Select.stories.d.ts +20 -0
- package/dist/table/styled.d.ts +2 -1
- package/dist/types/ButtonProps.d.ts +2 -2
- package/dist/types/ITDProps.d.ts +2 -0
- package/dist/types/InputProps.d.ts +4 -2
- package/dist/types/SelectProps.d.ts +4 -2
- package/dist/types/StatusProps.d.ts +3 -1
- package/dist/types/TableProps.d.ts +2 -2
- package/dist/utils/GetIconSizeBySize.d.ts +2 -0
- package/dist/utils/GetSizeBySizeSlug.d.ts +2 -0
- package/dist/utils/GetSizeSlugBySize.d.ts +2 -0
- package/dist/utils/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -14,8 +14,5 @@ declare const meta: {
|
|
|
14
14
|
};
|
|
15
15
|
export default meta;
|
|
16
16
|
type Story = StoryObj<typeof meta>;
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const Warning: Story;
|
|
20
|
-
export declare const Success: Story;
|
|
21
|
-
export declare const Error: Story;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const DisabledChildren: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<any>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {};
|
|
11
|
+
args: {
|
|
12
|
+
onClick: import("@vitest/spy").Mock<any, any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const DisabledChildren: Story;
|
|
@@ -15,8 +15,6 @@ declare const meta: {
|
|
|
15
15
|
export default meta;
|
|
16
16
|
type Story = StoryObj<typeof meta>;
|
|
17
17
|
export declare const Default: Story;
|
|
18
|
+
export declare const Filled: Story;
|
|
19
|
+
export declare const Dashed: Story;
|
|
18
20
|
export declare const MaskFormat: Story;
|
|
19
|
-
export declare const Outline: Story;
|
|
20
|
-
export declare const Ghost: Story;
|
|
21
|
-
export declare const Link: Story;
|
|
22
|
-
export declare const Small: Story;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<any>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {};
|
|
11
|
+
args: {
|
|
12
|
+
onClick: import("@vitest/spy").Mock<any, any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const Filled: Story;
|
|
19
|
+
export declare const Dashed: Story;
|
|
20
|
+
export declare const MaskFormat: Story;
|
package/dist/table/styled.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ITDSize } from "../index";
|
|
2
3
|
declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
-
$size:
|
|
4
|
+
$size: ITDSize;
|
|
4
5
|
$noGaps: boolean;
|
|
5
6
|
}>> & string;
|
|
6
7
|
export { Wrapper };
|
|
@@ -2,6 +2,7 @@ import { DetailedHTMLProps, HTMLAttributes, MouseEvent } from "react";
|
|
|
2
2
|
import { ChildrenProps } from "./ChildrenProps";
|
|
3
3
|
import { IStyledComponent } from "styled-components";
|
|
4
4
|
import { Substitute } from "styled-components/dist/types";
|
|
5
|
+
import { ITDSize } from "../index";
|
|
5
6
|
export type ButtonProps = {
|
|
6
7
|
id?: string;
|
|
7
8
|
disabled?: boolean;
|
|
@@ -14,7 +15,7 @@ export type ButtonProps = {
|
|
|
14
15
|
type?: ButtonType;
|
|
15
16
|
variant?: ButtonVariant;
|
|
16
17
|
state?: ButtonState;
|
|
17
|
-
size?:
|
|
18
|
+
size?: ITDSize;
|
|
18
19
|
icon?: string | ChildrenProps | SVGElement;
|
|
19
20
|
href?: string;
|
|
20
21
|
target?: string;
|
|
@@ -25,7 +26,6 @@ export type ButtonProps = {
|
|
|
25
26
|
export type ButtonType = "button" | "submit" | "reset";
|
|
26
27
|
export type ButtonVariant = "default" | "solid" | "filled" | "outline" | "ghost" | "link" | "statable" | "custom";
|
|
27
28
|
export type ButtonState = "primary" | "secondary" | "request" | "approve" | "reject" | "pending" | "requested" | string | null;
|
|
28
|
-
export type ButtonSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
|
|
29
29
|
export type ButtonContentPosition = "left" | "right";
|
|
30
30
|
export type StyledElementProps = IStyledComponent<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any>>;
|
|
31
31
|
export interface IIcon {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FocusEventHandler, KeyboardEvent, MutableRefObject } from "react";
|
|
2
2
|
import { ChildrenProps } from "./ChildrenProps";
|
|
3
|
+
import { ITDSize } from "../index";
|
|
3
4
|
export type InputProps = {
|
|
4
5
|
id?: string;
|
|
5
6
|
placeholder?: string;
|
|
@@ -7,8 +8,8 @@ export type InputProps = {
|
|
|
7
8
|
defaultValue?: string;
|
|
8
9
|
type?: string;
|
|
9
10
|
className?: string;
|
|
10
|
-
size?:
|
|
11
|
-
variant?:
|
|
11
|
+
size?: ITDSize;
|
|
12
|
+
variant?: InputVariant;
|
|
12
13
|
prefix?: ChildrenProps;
|
|
13
14
|
suffix?: ChildrenProps;
|
|
14
15
|
addonBefore?: ChildrenProps;
|
|
@@ -31,3 +32,4 @@ export type InputProps = {
|
|
|
31
32
|
onKeyDown?: ((event: KeyboardEvent) => void) | null;
|
|
32
33
|
children?: ChildrenProps;
|
|
33
34
|
};
|
|
35
|
+
export type InputVariant = "default" | "filled" | "dashed";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
import { ChildrenProps } from "./ChildrenProps";
|
|
3
|
+
import { ITDSize } from "../index";
|
|
3
4
|
export type SelectProps = {
|
|
4
5
|
id?: string;
|
|
5
6
|
defaultValue?: string | number;
|
|
@@ -8,8 +9,8 @@ export type SelectProps = {
|
|
|
8
9
|
position?: string;
|
|
9
10
|
direction?: string;
|
|
10
11
|
mode?: string;
|
|
11
|
-
size?:
|
|
12
|
-
variant?:
|
|
12
|
+
size?: ITDSize;
|
|
13
|
+
variant?: SelectVariant;
|
|
13
14
|
className?: string;
|
|
14
15
|
placeholder?: string;
|
|
15
16
|
icon?: string;
|
|
@@ -21,6 +22,7 @@ export type SelectProps = {
|
|
|
21
22
|
onChange?: ((value: any) => void) | null;
|
|
22
23
|
onUpdate?: ((value: any, update: any, validation: boolean) => void) | null;
|
|
23
24
|
};
|
|
25
|
+
export type SelectVariant = "default" | "solid" | "filled" | "outline" | "custom";
|
|
24
26
|
export type SelectOptionProps = {
|
|
25
27
|
value: string;
|
|
26
28
|
text: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ITDSize } from "../index";
|
|
2
3
|
export type TableColumnType<T> = {
|
|
3
4
|
key: keyof T | string;
|
|
4
5
|
title: string;
|
|
@@ -9,10 +10,9 @@ export type TableColumnType<T> = {
|
|
|
9
10
|
export type TableProps<T> = {
|
|
10
11
|
columns: TableColumnType<T>[];
|
|
11
12
|
data: T[];
|
|
12
|
-
size?:
|
|
13
|
+
size?: ITDSize;
|
|
13
14
|
headless?: boolean;
|
|
14
15
|
bordered?: boolean;
|
|
15
16
|
dashed?: boolean;
|
|
16
17
|
noGaps?: boolean;
|
|
17
18
|
};
|
|
18
|
-
export type TableSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
|