@kyle-test/zto-react-kit 0.0.0-alpha.1 → 0.0.0-alpha.3

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/README.md CHANGED
@@ -1,22 +1,22 @@
1
- # @zto/react-kit
1
+ # @ztolabs/react-kit
2
2
 
3
3
  A modern React component library built with TypeScript, Tailwind CSS, and Radix UI primitives.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @zto/react-kit
8
+ npm install @ztolabs/react-kit
9
9
  # or
10
- yarn add @zto/react-kit
10
+ yarn add @ztolabs/react-kit
11
11
  # or
12
- pnpm add @zto/react-kit
12
+ pnpm add @ztolabs/react-kit
13
13
  ```
14
14
 
15
15
  ## Usage
16
16
 
17
17
  ```tsx
18
- import { Badge, Breadcrumb, Button } from '@zto/react-kit';
19
- import '@zto/react-kit/styles';
18
+ import { Badge, Breadcrumb, Button } from '@ztolabs/react-kit';
19
+ import '@ztolabs/react-kit/styles';
20
20
 
21
21
  function App() {
22
22
  return (
@@ -42,7 +42,7 @@ function App() {
42
42
  This library uses Tailwind CSS. Make sure to include the styles:
43
43
 
44
44
  ```tsx
45
- import '@zto/react-kit/styles';
45
+ import '@ztolabs/react-kit/styles';
46
46
  ```
47
47
 
48
48
  ## TypeScript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyle-test/zto-react-kit",
3
- "version": "0.0.0-alpha.1",
3
+ "version": "0.0.0-alpha.3",
4
4
  "type": "module",
5
5
  "description": "A React component library with modern UI components",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
+ "sideEffects": false,
12
13
  "exports": {
13
14
  ".": {
14
15
  "import": "./dist/index.js",
@@ -29,6 +30,5 @@
29
30
  "react-kit"
30
31
  ],
31
32
  "author": "ZTO",
32
- "license": "Apache-2.0",
33
- "packageManager": "pnpm@9"
33
+ "license": "Apache-2.0"
34
34
  }
@@ -1,66 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { Badge } from '.';
3
- type BadgeProps = Parameters<typeof Badge>[0];
4
- interface CssVariablesProps {
5
- cssGap?: string;
6
- cssPaddingSm?: string;
7
- cssPaddingMd?: string;
8
- }
9
- declare const meta: {
10
- title: string;
11
- component: typeof Badge;
12
- parameters: {
13
- layout: string;
14
- docs: {
15
- description: {
16
- component: string;
17
- };
18
- };
19
- };
20
- argTypes: {
21
- variant: {
22
- control: {
23
- type: "select";
24
- };
25
- options: string[];
26
- description: string;
27
- };
28
- type: {
29
- control: {
30
- type: "select";
31
- };
32
- options: string[];
33
- description: string;
34
- };
35
- size: {
36
- control: {
37
- type: "select";
38
- };
39
- options: string[];
40
- description: string;
41
- };
42
- includeDot: {
43
- control: {
44
- type: "boolean";
45
- };
46
- description: string;
47
- };
48
- children: {
49
- control: {
50
- type: "text";
51
- };
52
- description: string;
53
- };
54
- className: {
55
- control: {
56
- type: "text";
57
- };
58
- description: string;
59
- };
60
- };
61
- render: ({ cssGap, cssPaddingSm, cssPaddingMd, ...args }: BadgeProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
62
- tags: string[];
63
- };
64
- export default meta;
65
- type Story = StoryObj<typeof meta>;
66
- export declare const Default: Story;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
- import { Breadcrumb } from '.';
3
- declare const meta: Meta<typeof Breadcrumb>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;
@@ -1,69 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { Button } from '.';
3
- type ButtonProps = Parameters<typeof Button>[0];
4
- interface CssVariablesProps {
5
- cssButtonGap?: string;
6
- cssButtonBorderRadius?: string;
7
- cssButtonPaddingXs?: string;
8
- cssButtonPaddingSm?: string;
9
- cssButtonPaddingMd?: string;
10
- cssButtonPaddingLg?: string;
11
- }
12
- declare const meta: {
13
- title: string;
14
- component: typeof Button;
15
- parameters: {
16
- layout: string;
17
- docs: {
18
- description: {
19
- component: string;
20
- };
21
- };
22
- };
23
- argTypes: {
24
- variant: {
25
- control: {
26
- type: "select";
27
- };
28
- options: string[];
29
- description: string;
30
- };
31
- size: {
32
- control: {
33
- type: "select";
34
- };
35
- options: string[];
36
- description: string;
37
- };
38
- width: {
39
- control: {
40
- type: "select";
41
- };
42
- options: string[];
43
- description: string;
44
- };
45
- disabled: {
46
- control: {
47
- type: "boolean";
48
- };
49
- description: string;
50
- };
51
- tooltip: {
52
- control: {
53
- type: "text";
54
- };
55
- description: string;
56
- };
57
- children: {
58
- control: {
59
- type: "text";
60
- };
61
- description: string;
62
- };
63
- };
64
- render: ({ cssButtonGap, cssButtonBorderRadius, cssButtonPaddingXs, cssButtonPaddingSm, cssButtonPaddingMd, cssButtonPaddingLg, ...args }: ButtonProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
65
- tags: string[];
66
- };
67
- export default meta;
68
- type Story = StoryObj<typeof meta>;
69
- export declare const Default: Story;
@@ -1,62 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { CenterLoading } from '.';
3
- type CenterLoadingProps = Parameters<typeof CenterLoading>[0];
4
- interface CssVariablesProps {
5
- cssLoadingColorRgb?: string;
6
- }
7
- declare const meta: {
8
- title: string;
9
- component: ({ isFullPage, loaderSize, dataTestId, description, className, descriptionClassName, ...rest }: import(".").CenterLoadingProps) => import("react/jsx-runtime").JSX.Element;
10
- parameters: {
11
- layout: string;
12
- docs: {
13
- description: {
14
- component: string;
15
- };
16
- };
17
- };
18
- argTypes: {
19
- isFullPage: {
20
- control: {
21
- type: "boolean";
22
- };
23
- description: string;
24
- };
25
- loaderSize: {
26
- control: {
27
- type: "select";
28
- };
29
- options: string[];
30
- description: string;
31
- };
32
- description: {
33
- control: {
34
- type: "text";
35
- };
36
- description: string;
37
- };
38
- dataTestId: {
39
- control: {
40
- type: "text";
41
- };
42
- description: string;
43
- };
44
- className: {
45
- control: {
46
- type: "text";
47
- };
48
- description: string;
49
- };
50
- descriptionClassName: {
51
- control: {
52
- type: "text";
53
- };
54
- description: string;
55
- };
56
- };
57
- render: ({ cssLoadingColorRgb, ...args }: CenterLoadingProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
58
- tags: string[];
59
- };
60
- export default meta;
61
- type Story = StoryObj<typeof meta>;
62
- export declare const Default: Story;
@@ -1,36 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { FormGroup } from '.';
3
- declare const meta: {
4
- title: string;
5
- component: typeof FormGroup;
6
- parameters: {
7
- layout: string;
8
- docs: {
9
- description: {
10
- component: string;
11
- };
12
- };
13
- };
14
- argTypes: {
15
- size: {
16
- control: {
17
- type: "select";
18
- };
19
- options: string[];
20
- description: string;
21
- };
22
- required: {
23
- control: {
24
- type: "boolean";
25
- };
26
- description: string;
27
- };
28
- children: {
29
- description: string;
30
- };
31
- };
32
- tags: string[];
33
- };
34
- export default meta;
35
- type Story = StoryObj<typeof meta>;
36
- export declare const Default: Story;
@@ -1,81 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import React from 'react';
3
- import { Input } from '.';
4
- type InputProps = Parameters<typeof Input>[0];
5
- interface CssVariablesProps {
6
- cssInputPaddingSm?: string;
7
- cssInputPaddingMd?: string;
8
- cssInputPaddingLg?: string;
9
- cssInputPlaceholderColor?: string;
10
- }
11
- declare const meta: {
12
- title: string;
13
- component: React.ForwardRefExoticComponent<import(".").InputProps & React.RefAttributes<HTMLInputElement>>;
14
- parameters: {
15
- layout: string;
16
- docs: {
17
- description: {
18
- component: string;
19
- };
20
- };
21
- };
22
- argTypes: {
23
- size: {
24
- control: {
25
- type: "select";
26
- };
27
- options: string[];
28
- description: string;
29
- };
30
- error: {
31
- control: {
32
- type: "boolean";
33
- };
34
- description: string;
35
- };
36
- placeholder: {
37
- control: {
38
- type: "text";
39
- };
40
- description: string;
41
- };
42
- disabled: {
43
- control: {
44
- type: "boolean";
45
- };
46
- description: string;
47
- };
48
- addonStart: {
49
- control: {
50
- type: "object";
51
- };
52
- description: string;
53
- };
54
- addonEnd: {
55
- control: {
56
- type: "object";
57
- };
58
- description: string;
59
- };
60
- className: {
61
- control: {
62
- type: "text";
63
- };
64
- description: string;
65
- };
66
- containerClassName: {
67
- control: {
68
- type: "text";
69
- };
70
- description: string;
71
- };
72
- };
73
- render: ({ cssInputPaddingSm, cssInputPaddingMd, cssInputPaddingLg, cssInputPlaceholderColor, ...args }: InputProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
74
- tags: string[];
75
- };
76
- export default meta;
77
- type Story = StoryObj<typeof meta>;
78
- export declare const Default: Story;
79
- export declare const WithAddonStart: Story;
80
- export declare const WithAddonEnd: Story;
81
- export declare const WithBothAddons: Story;
@@ -1,39 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { Label } from '.';
3
- type LabelProps = Parameters<typeof Label>[0];
4
- interface CssVariablesProps {
5
- cssLabelFontSize?: string;
6
- cssLabelFontWeight?: string;
7
- cssLabelFontColor?: string;
8
- }
9
- declare const meta: {
10
- title: string;
11
- component: typeof Label;
12
- parameters: {
13
- layout: string;
14
- docs: {
15
- description: {
16
- component: string;
17
- };
18
- };
19
- };
20
- argTypes: {
21
- children: {
22
- control: {
23
- type: "text";
24
- };
25
- description: string;
26
- };
27
- className: {
28
- control: {
29
- type: "text";
30
- };
31
- description: string;
32
- };
33
- };
34
- render: ({ cssLabelFontSize, cssLabelFontWeight, cssLabelFontColor, ...args }: LabelProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
35
- tags: string[];
36
- };
37
- export default meta;
38
- type Story = StoryObj<typeof meta>;
39
- export declare const Default: Story;
@@ -1,98 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { NumberInput } from './index';
3
- type NumberInputProps = Parameters<typeof NumberInput>[0];
4
- declare const meta: {
5
- title: string;
6
- component: import("react").ForwardRefExoticComponent<import("./index").NumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
7
- parameters: {
8
- layout: string;
9
- docs: {
10
- description: {
11
- component: string;
12
- };
13
- };
14
- };
15
- argTypes: {
16
- value: {
17
- control: {
18
- type: "text";
19
- };
20
- description: string;
21
- };
22
- onChange: {
23
- description: string;
24
- };
25
- size: {
26
- control: {
27
- type: "select";
28
- };
29
- options: string[];
30
- description: string;
31
- };
32
- min: {
33
- control: {
34
- type: "number";
35
- };
36
- description: string;
37
- };
38
- max: {
39
- control: {
40
- type: "number";
41
- };
42
- description: string;
43
- };
44
- step: {
45
- control: {
46
- type: "number";
47
- };
48
- description: string;
49
- };
50
- decimalScale: {
51
- control: {
52
- type: "number";
53
- };
54
- description: string;
55
- };
56
- disabled: {
57
- control: {
58
- type: "boolean";
59
- };
60
- description: string;
61
- };
62
- readOnly: {
63
- control: {
64
- type: "boolean";
65
- };
66
- description: string;
67
- };
68
- hasError: {
69
- control: {
70
- type: "boolean";
71
- };
72
- description: string;
73
- };
74
- isInvalid: {
75
- control: {
76
- type: "boolean";
77
- };
78
- description: string;
79
- };
80
- numberOnly: {
81
- control: {
82
- type: "boolean";
83
- };
84
- description: string;
85
- };
86
- placeholder: {
87
- control: {
88
- type: "text";
89
- };
90
- description: string;
91
- };
92
- };
93
- render: (args: NumberInputProps) => import("react/jsx-runtime").JSX.Element;
94
- tags: string[];
95
- };
96
- export default meta;
97
- type Story = StoryObj<typeof meta>;
98
- export declare const Default: Story;
@@ -1,69 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { FormSelect } from '.';
3
- type SelectProps = Parameters<typeof FormSelect>[0];
4
- interface CssVariablesProps {
5
- cssSelectPlaceholderColor?: string;
6
- }
7
- declare const meta: {
8
- title: string;
9
- component: typeof FormSelect;
10
- parameters: {
11
- layout: string;
12
- docs: {
13
- description: {
14
- component: string;
15
- };
16
- };
17
- };
18
- argTypes: {
19
- size: {
20
- control: {
21
- type: "select";
22
- };
23
- options: string[];
24
- description: string;
25
- };
26
- hasError: {
27
- control: {
28
- type: "boolean";
29
- };
30
- description: string;
31
- };
32
- disabled: {
33
- control: {
34
- type: "boolean";
35
- };
36
- description: string;
37
- };
38
- placeholder: {
39
- control: {
40
- type: "text";
41
- };
42
- description: string;
43
- };
44
- showSearch: {
45
- control: {
46
- type: "boolean";
47
- };
48
- description: string;
49
- };
50
- optionRenderType: {
51
- control: {
52
- type: "select";
53
- };
54
- options: string[];
55
- description: string;
56
- };
57
- className: {
58
- control: {
59
- type: "text";
60
- };
61
- description: string;
62
- };
63
- };
64
- render: ({ cssSelectPlaceholderColor, ...args }: SelectProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
65
- tags: string[];
66
- };
67
- export default meta;
68
- type Story = StoryObj<typeof meta>;
69
- export declare const Default: Story;
@@ -1,68 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: import("react").ForwardRefExoticComponent<Omit<import(".").TextareaAutosizeProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
5
- parameters: {
6
- layout: string;
7
- docs: {
8
- description: {
9
- component: string;
10
- };
11
- };
12
- };
13
- argTypes: {
14
- size: {
15
- control: {
16
- type: "select";
17
- };
18
- options: string[];
19
- description: string;
20
- };
21
- error: {
22
- control: {
23
- type: "boolean";
24
- };
25
- description: string;
26
- };
27
- placeholder: {
28
- control: {
29
- type: "text";
30
- };
31
- description: string;
32
- };
33
- disabled: {
34
- control: {
35
- type: "boolean";
36
- };
37
- description: string;
38
- };
39
- rows: {
40
- control: {
41
- type: "number";
42
- };
43
- description: string;
44
- };
45
- minRows: {
46
- control: {
47
- type: "number";
48
- };
49
- description: string;
50
- };
51
- maxRows: {
52
- control: {
53
- type: "number";
54
- };
55
- description: string;
56
- };
57
- className: {
58
- control: {
59
- type: "text";
60
- };
61
- description: string;
62
- };
63
- };
64
- tags: string[];
65
- };
66
- export default meta;
67
- type Story = StoryObj<typeof meta>;
68
- export declare const Default: Story;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
- import { IconButton } from '.';
3
- declare const meta: Meta<typeof IconButton>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;
@@ -1,53 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { Loader } from '.';
3
- type LoaderProps = Parameters<typeof Loader>[0];
4
- interface CssVariablesProps {
5
- cssLoadingColorRgb?: string;
6
- }
7
- declare const meta: {
8
- title: string;
9
- component: typeof Loader;
10
- parameters: {
11
- layout: string;
12
- docs: {
13
- description: {
14
- component: string;
15
- };
16
- };
17
- };
18
- argTypes: {
19
- size: {
20
- control: {
21
- type: "select";
22
- };
23
- options: string[];
24
- description: string;
25
- };
26
- color: {
27
- control: {
28
- type: "color";
29
- };
30
- description: string;
31
- };
32
- duration: {
33
- control: {
34
- type: "range";
35
- min: number;
36
- max: number;
37
- step: number;
38
- };
39
- description: string;
40
- };
41
- className: {
42
- control: {
43
- type: "text";
44
- };
45
- description: string;
46
- };
47
- };
48
- render: ({ cssLoadingColorRgb, ...args }: LoaderProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
49
- tags: string[];
50
- };
51
- export default meta;
52
- type Story = StoryObj<typeof meta>;
53
- export declare const Default: Story;
@@ -1,39 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: ({ children, lineClamp, tooltipContentProps, portalProps, ...rest }: import(".").TruncateTextProps) => import("react/jsx-runtime").JSX.Element;
5
- parameters: {
6
- layout: string;
7
- docs: {
8
- description: {
9
- component: string;
10
- };
11
- };
12
- };
13
- argTypes: {
14
- lineClamp: {
15
- control: {
16
- type: "number";
17
- min: number;
18
- max: number;
19
- };
20
- description: string;
21
- };
22
- children: {
23
- control: {
24
- type: "text";
25
- };
26
- description: string;
27
- };
28
- className: {
29
- control: {
30
- type: "text";
31
- };
32
- description: string;
33
- };
34
- };
35
- tags: string[];
36
- };
37
- export default meta;
38
- type Story = StoryObj<typeof meta>;
39
- export declare const Default: Story;
@@ -1,49 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { WithIcon } from '.';
3
- type WithIconProps = Parameters<typeof WithIcon>[0];
4
- interface CssVariablesProps {
5
- cssWithIconGap?: string;
6
- }
7
- declare const meta: {
8
- title: string;
9
- component: typeof WithIcon;
10
- parameters: {
11
- layout: string;
12
- docs: {
13
- description: {
14
- component: string;
15
- };
16
- };
17
- };
18
- argTypes: {
19
- children: {
20
- control: {
21
- type: "text";
22
- };
23
- description: string;
24
- };
25
- className: {
26
- control: {
27
- type: "text";
28
- };
29
- description: string;
30
- };
31
- iconClassName: {
32
- control: {
33
- type: "text";
34
- };
35
- description: string;
36
- };
37
- contentClassName: {
38
- control: {
39
- type: "text";
40
- };
41
- description: string;
42
- };
43
- };
44
- render: ({ cssWithIconGap, ...args }: WithIconProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
45
- tags: string[];
46
- };
47
- export default meta;
48
- type Story = StoryObj<typeof meta>;
49
- export declare const Default: Story;
@@ -1,56 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { WithLabel } from '.';
3
- type WithLabelProps = Parameters<typeof WithLabel>[0];
4
- interface CssVariablesProps {
5
- cssWithLabelGap?: string;
6
- }
7
- declare const meta: {
8
- title: string;
9
- component: typeof WithLabel;
10
- parameters: {
11
- layout: string;
12
- docs: {
13
- description: {
14
- component: string;
15
- };
16
- };
17
- };
18
- argTypes: {
19
- label: {
20
- control: {
21
- type: "text";
22
- };
23
- description: string;
24
- };
25
- direction: {
26
- control: {
27
- type: "select";
28
- };
29
- options: string[];
30
- description: string;
31
- };
32
- className: {
33
- control: {
34
- type: "text";
35
- };
36
- description: string;
37
- };
38
- labelClassName: {
39
- control: {
40
- type: "text";
41
- };
42
- description: string;
43
- };
44
- labelProps: {
45
- control: {
46
- type: "object";
47
- };
48
- description: string;
49
- };
50
- };
51
- render: ({ cssWithLabelGap, ...args }: WithLabelProps & CssVariablesProps) => import("react/jsx-runtime").JSX.Element;
52
- tags: string[];
53
- };
54
- export default meta;
55
- type Story = StoryObj<typeof meta>;
56
- export declare const Default: Story;
@@ -1,60 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: import("react").FC<{
5
- children: React.ReactNode;
6
- content: React.ReactNode;
7
- tooltipContentClassName?: string;
8
- textContentClassName?: string;
9
- triggerClassName?: string;
10
- disabled?: boolean;
11
- portalProps?: React.ComponentPropsWithoutRef<import("react").FC<import("@radix-ui/react-tooltip").TooltipPortalProps>>;
12
- contentProps?: React.ComponentPropsWithoutRef<import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-tooltip").TooltipContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("class-variance-authority").VariantProps<(props?: ({
13
- variant?: "default" | "light" | null | undefined;
14
- } & import("class-variance-authority/types").ClassProp) | undefined) => string> & import("react").RefAttributes<HTMLDivElement>>>;
15
- }>;
16
- parameters: {
17
- layout: string;
18
- docs: {
19
- description: {
20
- component: string;
21
- };
22
- };
23
- };
24
- argTypes: {
25
- content: {
26
- control: {
27
- type: "text";
28
- };
29
- description: string;
30
- };
31
- disabled: {
32
- control: {
33
- type: "boolean";
34
- };
35
- description: string;
36
- };
37
- tooltipContentClassName: {
38
- control: {
39
- type: "text";
40
- };
41
- description: string;
42
- };
43
- textContentClassName: {
44
- control: {
45
- type: "text";
46
- };
47
- description: string;
48
- };
49
- triggerClassName: {
50
- control: {
51
- type: "text";
52
- };
53
- description: string;
54
- };
55
- };
56
- tags: string[];
57
- };
58
- export default meta;
59
- type Story = StoryObj<typeof meta>;
60
- export declare const Default: Story;