@koaris/bloom-ui 1.2.0 → 1.2.1
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 +3231 -0
- package/dist/index.d.cts +145 -0
- package/package.json +6 -5
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { DetailedHTMLProps, HTMLAttributes, ButtonHTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, ReactNode, FormHTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Primary UI component for user interaction
|
|
7
|
+
*/
|
|
8
|
+
interface CardProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, // Change the type to HTMLDivElement
|
|
9
|
+
HTMLDivElement> {
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
direction?: string;
|
|
13
|
+
size?: string;
|
|
14
|
+
imageSize: string;
|
|
15
|
+
image?: string;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
}
|
|
18
|
+
declare const Card: ({ className, selected, direction, size, disabled, imageSize, onClick, ...rest }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Primary UI component for user interaction
|
|
22
|
+
*/
|
|
23
|
+
interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
24
|
+
size?: 'sm' | 'md';
|
|
25
|
+
variant?: 'primary' | 'secondary';
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
children: string | JSX.Element;
|
|
28
|
+
}
|
|
29
|
+
declare const Button: ({ className, variant, size, disabled, onClick, ...rest }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Primary UI component for user interaction
|
|
33
|
+
*/
|
|
34
|
+
interface LinkProps extends DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> {
|
|
35
|
+
url: string;
|
|
36
|
+
newPage: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
children: string | JSX.Element;
|
|
39
|
+
}
|
|
40
|
+
declare const Link: ({ className, disabled, url, newPage, onClick, ...rest }: LinkProps) => react_jsx_runtime.JSX.Element;
|
|
41
|
+
|
|
42
|
+
declare const options: {
|
|
43
|
+
id: number;
|
|
44
|
+
value: string;
|
|
45
|
+
label: string;
|
|
46
|
+
}[];
|
|
47
|
+
interface RadioGroupProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
options: typeof options;
|
|
50
|
+
required?: boolean;
|
|
51
|
+
}
|
|
52
|
+
declare const RadioGroup: ({ disabled, options, required, className, }: RadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
53
|
+
|
|
54
|
+
interface CheckboxProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
required?: boolean;
|
|
57
|
+
}
|
|
58
|
+
declare const Checkbox: ({ className, required, disabled }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Primary UI component for user interaction
|
|
62
|
+
*/
|
|
63
|
+
interface InputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
placeholder?: string;
|
|
66
|
+
value?: string;
|
|
67
|
+
validated?: boolean;
|
|
68
|
+
error: boolean;
|
|
69
|
+
required?: boolean;
|
|
70
|
+
type: 'text' | 'password' | 'date' | 'cpf' | 'phone' | 'cnpj' | 'cep';
|
|
71
|
+
}
|
|
72
|
+
declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
73
|
+
|
|
74
|
+
interface TextInputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
placeholder?: string;
|
|
77
|
+
prefix?: string;
|
|
78
|
+
value?: string;
|
|
79
|
+
variant?: 'primary' | 'secondary';
|
|
80
|
+
validated?: boolean;
|
|
81
|
+
error: boolean;
|
|
82
|
+
required?: boolean;
|
|
83
|
+
type: 'text' | 'password' | 'date' | 'cpf' | 'phone' | 'cnpj' | 'cep';
|
|
84
|
+
}
|
|
85
|
+
declare const TextInput: react.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
86
|
+
|
|
87
|
+
interface TextAreaProps extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
|
|
88
|
+
disabled?: boolean;
|
|
89
|
+
reference?: React.RefObject<HTMLTextAreaElement>;
|
|
90
|
+
placeholder?: string;
|
|
91
|
+
value?: string;
|
|
92
|
+
validated?: boolean;
|
|
93
|
+
error: boolean;
|
|
94
|
+
required?: boolean;
|
|
95
|
+
resize?: boolean;
|
|
96
|
+
type: 'text' | 'password' | 'date' | 'cpf' | 'phone' | 'cnpj' | 'cep';
|
|
97
|
+
}
|
|
98
|
+
declare const TextArea: ({ className, disabled, reference, value, error, required, placeholder, resize, onClick, ...rest }: TextAreaProps) => react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
interface TextProps extends DetailedHTMLProps<HTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
101
|
+
children: ReactNode;
|
|
102
|
+
color?: string;
|
|
103
|
+
size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
|
|
104
|
+
tag?: 'p' | 'strong' | 'span' | 'label';
|
|
105
|
+
htmlFor?: string;
|
|
106
|
+
}
|
|
107
|
+
declare const Text: ({ children, color, size, tag, className, ...rest }: TextProps) => react_jsx_runtime.JSX.Element;
|
|
108
|
+
|
|
109
|
+
interface HeadingProps extends DetailedHTMLProps<HTMLAttributes<HTMLHeadElement>, HTMLHeadElement> {
|
|
110
|
+
children: React.ReactNode;
|
|
111
|
+
color?: string;
|
|
112
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
|
|
113
|
+
tag?: 'h1' | 'h2' | 'h3' | 'h4';
|
|
114
|
+
}
|
|
115
|
+
declare const Heading: ({ children, color, size, tag, className, }: HeadingProps) => react_jsx_runtime.JSX.Element;
|
|
116
|
+
|
|
117
|
+
interface BoxProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
118
|
+
children: React.ReactNode;
|
|
119
|
+
tag?: 'div' | 'section' | 'article' | 'aside' | 'header' | 'footer';
|
|
120
|
+
variant?: 'primary' | 'secondary';
|
|
121
|
+
}
|
|
122
|
+
declare const Box: ({ className, children, tag, variant, }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
123
|
+
|
|
124
|
+
interface FormProps extends DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement> {
|
|
125
|
+
children: React.ReactNode;
|
|
126
|
+
variant?: 'primary' | 'secondary';
|
|
127
|
+
orientation?: 'row' | 'col';
|
|
128
|
+
handleSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
129
|
+
}
|
|
130
|
+
declare const Form: ({ className, children, variant, orientation, ...rest }: FormProps) => react_jsx_runtime.JSX.Element;
|
|
131
|
+
|
|
132
|
+
interface AvatarProps {
|
|
133
|
+
src?: string;
|
|
134
|
+
alt?: string;
|
|
135
|
+
className?: string;
|
|
136
|
+
}
|
|
137
|
+
declare const Avatar: ({ className, ...rest }: AvatarProps) => react_jsx_runtime.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface MultiStepProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
140
|
+
size: number;
|
|
141
|
+
currentStep?: number;
|
|
142
|
+
}
|
|
143
|
+
declare const MultiStep: ({ className, size, currentStep }: MultiStepProps) => react_jsx_runtime.JSX.Element;
|
|
144
|
+
|
|
145
|
+
export { Avatar, type AvatarProps, Box, type BoxProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, Form, type FormProps, Heading, type HeadingProps, Input, type InputProps, Link, type LinkProps, MultiStep, type MultiStepProps, RadioGroup, type RadioGroupProps, Text, TextArea, type TextAreaProps, TextInput, type TextInputProps, type TextProps };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koaris/bloom-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Bloom-ui is a public design system from the Koaris Project developed with React, Typescript, and Tailwind.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"types": "./,dist/index.d.ts",
|
|
8
|
+
"main": "./dist/index.mjs",
|
|
9
|
+
"module": "./ist/index.mjs",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "NODE_ENV=production tailwindcss -i ./src/styles/tailwind.css -o ./tailwind.css -c ./tailwind.config.ts --minify && tsup",
|
|
12
12
|
"dev": "concurrently --kill-others \"tailwindcss -i ./src/styles/tailwind.css -o ./tailwind.css -c ./tailwind.config.ts --minify --watch \" \"tsup --watch\"",
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
17
18
|
"import": "./dist/index.mjs",
|
|
18
|
-
"require": "./dist/index.
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
19
20
|
},
|
|
20
21
|
"./tailwind.css": "./tailwind.css"
|
|
21
22
|
},
|