@inntechcorp/it-design 2.0.16 → 2.0.17

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.
@@ -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 Info: Story;
18
- export declare const InfoWithoutTitle: Story;
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,2 @@
1
+ import { FC } from 'react';
2
+ export declare const CheckboxGroupControl: FC<any>;
@@ -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;
@@ -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: string;
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?: ButtonSize;
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 {
@@ -0,0 +1,2 @@
1
+ export type ITDSize = "x-small" | "small" | "medium" | "default" | "large" | "x-large";
2
+ export type ITDSizeSlug = "xs" | "sm" | "md" | "df" | "lg" | "xlg";
@@ -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?: string;
11
- variant?: string;
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,6 +1,8 @@
1
1
  import { ChildrenProps } from "./ChildrenProps";
2
+ import { ITDSize } from "../index";
2
3
  export type StatusProps = {
3
- variant: StatusVariant;
4
+ variant?: StatusVariant;
5
+ size?: ITDSize;
4
6
  children?: ChildrenProps;
5
7
  className?: string;
6
8
  };
@@ -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?: TableSize;
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";
@@ -0,0 +1,2 @@
1
+ import { ITDSize } from "../index";
2
+ export default function GetIconSizeBySize(size: ITDSize): "14" | "16" | "18" | "20" | "22" | "24";
@@ -0,0 +1,2 @@
1
+ import { ITDSizeSlug } from "../index";
2
+ export default function GetSizeBySizeSlug(size: ITDSizeSlug): "large" | "small" | "x-small" | "medium" | "default" | "x-large" | "df";
@@ -0,0 +1,2 @@
1
+ import { ITDSize } from "../index";
2
+ export default function GetSizeSlugBySize(size: ITDSize): "xs" | "sm" | "md" | "df" | "lg" | "xlg";
@@ -0,0 +1,3 @@
1
+ export { default as GetIconSizeBySize } from './GetIconSizeBySize';
2
+ export { default as GetSizeBySizeSlug } from './GetSizeBySizeSlug';
3
+ export { default as GetSizeSlugBySize } from './GetSizeSlugBySize';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "2.0.16",
3
+ "version": "2.0.17",
4
4
  "description": "All in one Design library for desktop applications.",
5
5
  "author": "Ali",
6
6
  "license": "ISC",