@koaris/bloom-ui 1.1.1 → 1.2.0

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
@@ -10,12 +10,16 @@ Install the following package:
10
10
  npm i @koaris/bloom-ui
11
11
  ```
12
12
  ## Usage
13
- View docs [here](https://guilhermesalviano.github.io/bloom-ui).
14
-
15
- Import design system css in your css file:
13
+ This design system is built with Tailwind, and you can import it into your project as follows:
14
+ In your CSS file:
16
15
  ```css
17
- @import "@koaris/bloom-ui/dist/tailwind.css";
16
+ @import "@koaris/bloom-ui/tailwind.css";
17
+ ```
18
+ Or in your JavaScript file:
19
+ ```js
20
+ import '@koaris/bloom-ui/tailwind.css'
18
21
  ```
22
+
19
23
  Components usage:
20
24
  ```tsx
21
25
  import { Text } from '@koaris/bloom-ui'
package/package.json CHANGED
@@ -1,29 +1,38 @@
1
1
  {
2
2
  "name": "@koaris/bloom-ui",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
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
- "main": "./dist/index.js",
6
+ "type": "module",
7
+ "main": "dist/index.mjs",
7
8
  "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.ts",
9
+ "types": "dist/index.d.ts",
9
10
  "scripts": {
10
- "build": "tailwindcss -i ./src/styles/tailwind.css -o ./dist/tailwind.css -c ./tailwind.config.ts --minify && tsup src/index.tsx --format esm,cjs --dts --external react",
11
- "dev": "concurrently --kill-others \"tailwindcss -i ./src/styles/tailwind.css -o ./dist/tailwind.css -c ./tailwind.config.ts --minify --watch \" \"tsup src/index.tsx --format esm, cjs --dts --external react --watch\"",
11
+ "build": "NODE_ENV=production tailwindcss -i ./src/styles/tailwind.css -o ./tailwind.css -c ./tailwind.config.ts --minify && tsup",
12
+ "dev": "concurrently --kill-others \"tailwindcss -i ./src/styles/tailwind.css -o ./tailwind.css -c ./tailwind.config.ts --minify --watch \" \"tsup --watch\"",
12
13
  "lint": "eslint src/**/*.ts* --fix"
13
14
  },
14
- "files": [
15
- "dist",
16
- "README.md"
17
- ],
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/index.mjs",
18
+ "require": "./dist/index.d.ts"
19
+ },
20
+ "./tailwind.css": "./tailwind.css"
21
+ },
18
22
  "keywords": [
19
23
  "design-system",
20
24
  "react"
21
25
  ],
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "tailwind.css"
30
+ ],
22
31
  "author": "guilhermesalviano",
23
32
  "homepage": "https://guilhermesalviano.github.io/bloom-ui",
24
33
  "repository": {
25
34
  "type": "git",
26
- "url": "https://github.com/guilhermesalviano/bloom-ui.git"
35
+ "url": "git+https://github.com/guilhermesalviano/bloom-ui.git"
27
36
  },
28
37
  "license": "GPL-3.0-only",
29
38
  "devDependencies": {
package/dist/index.d.mts DELETED
@@ -1,145 +0,0 @@
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 };