designer-system-agroe 0.0.3 → 0.0.4
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/App.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/main.d.ts +1 -0
- package/dist/stories/badges/badge.stories.d.ts +17 -0
- package/dist/stories/badges/index.d.ts +7 -0
- package/dist/stories/buttons/Button.stories.d.ts +18 -0
- package/dist/stories/buttons/index.d.ts +8 -0
- package/dist/stories/forms/inputs/input-quantity/index.d.ts +11 -0
- package/dist/stories/forms/inputs/input-quantity/input-quantity.stories.d.ts +3 -0
- package/dist/stories/modais/index.d.ts +23 -0
- package/dist/stories/modais/modal.stories.d.ts +20 -0
- package/dist/stories/totalizadores/index.d.ts +12 -0
- package/dist/stories/totalizadores/totalizador.stories.d.ts +20 -0
- package/dist/utils/cn.d.ts +1 -0
- package/package.json +4 -2
package/dist/App.d.ts
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Badge } from './stories/badges';
|
|
2
|
+
export { Button } from './stories/buttons';
|
|
3
|
+
export { InputQuantity } from './stories/forms/inputs/input-quantity';
|
|
4
|
+
export { Modal, ModalTrigger, ModalContent, ModalHeader, ModalBody, ModalFooter, ModalTitle, ModalDescription, ModalClose, } from './stories/modais';
|
|
5
|
+
export { Totalizador } from './stories/totalizadores';
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.css';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Badge } from '.';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Badge;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Success: Story;
|
|
14
|
+
export declare const Danger: Story;
|
|
15
|
+
export declare const Warning: Story;
|
|
16
|
+
export declare const Info: Story;
|
|
17
|
+
export declare const Details: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface BadgeProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
variant?: 'success' | 'danger' | 'warning' | 'info' | 'details';
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function Badge({ className, variant, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Button } from '.';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Button;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
args: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Primary: Story;
|
|
18
|
+
export declare const Secondary: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ButtonProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
variant?: 'primary' | 'secondary';
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function Button({ className, variant, label, onClick }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface InputQuantityProps {
|
|
2
|
+
id: string;
|
|
3
|
+
field: {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
};
|
|
7
|
+
unit: 'kg' | 'sc' | 'ton';
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const InputQuantity: import("react").ForwardRefExoticComponent<InputQuantityProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ComponentProps, HTMLAttributes } from 'react';
|
|
2
|
+
import { Dialog } from 'radix-ui';
|
|
3
|
+
type ModalRootProps = ComponentProps<typeof Dialog.Root>;
|
|
4
|
+
type ModalTriggerProps = ComponentProps<typeof Dialog.Trigger>;
|
|
5
|
+
interface ModalContentProps extends ComponentProps<typeof Dialog.Content> {
|
|
6
|
+
showCloseButton?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ModalSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface ModalCloseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare function Modal(props: ModalRootProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ModalTrigger({ className, children, ...props }: ModalTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function ModalContent({ children, className, showCloseButton, ...props }: ModalContentProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ModalHeader({ className, children, ...props }: ModalSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function ModalBody({ className, children, ...props }: ModalSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function ModalFooter({ className, children, ...props }: ModalSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function ModalTitle({ className, children, ...props }: ComponentProps<typeof Dialog.Title>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function ModalDescription({ className, children, ...props }: ComponentProps<typeof Dialog.Description>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ModalClose({ className, children, ...props }: ModalCloseProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Modal } from '.';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Modal;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
defaultOpen: {
|
|
12
|
+
control: "boolean";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Default: Story;
|
|
19
|
+
export declare const Opened: Story;
|
|
20
|
+
export declare const LongContent: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface TotalizadorProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
description: string;
|
|
6
|
+
variant?: 'success' | 'warning' | 'danger' | 'info' | 'details';
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function Totalizador({ className, title, subtitle, description, variant, selected, loading, onClick, }: TotalizadorProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Totalizador } from '.';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Totalizador;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const Success: Story;
|
|
15
|
+
export declare const Warning: Story;
|
|
16
|
+
export declare const Danger: Story;
|
|
17
|
+
export declare const Info: Story;
|
|
18
|
+
export declare const Details: Story;
|
|
19
|
+
export declare const Selected: Story;
|
|
20
|
+
export declare const Loading: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cn(...inputs: (string | undefined | null)[]): string;
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "designer-system-agroe",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
8
9
|
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
11
13
|
"import": "./dist/index.mjs",
|
|
12
14
|
"require": "./dist/index.cjs"
|
|
13
15
|
},
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
|
|
21
23
|
"scripts": {
|
|
22
24
|
"dev": "vite",
|
|
23
|
-
"build": "
|
|
25
|
+
"build": "vite build && tsc -b",
|
|
24
26
|
"prepublishOnly": "npm run build",
|
|
25
27
|
"lint": "eslint .",
|
|
26
28
|
"preview": "vite preview",
|