@koaris/bloom-ui 1.3.2 → 1.3.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/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import react__default, { DetailedHTMLProps, HTMLAttributes, ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, FormHTMLAttributes } from 'react';
4
3
 
@@ -19,7 +18,7 @@ interface CardProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement
19
18
  hoverable?: boolean;
20
19
  }
21
20
  declare const Card: {
22
- ({ className, selected, direction, size, disabled, image, imageSize, imageAlt, title, content, onClick, footer, hoverable, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
21
+ ({ className, selected, direction, size, disabled, image, imageSize, imageAlt, title, content, onClick, footer, hoverable, ...rest }: CardProps): react.JSX.Element;
23
22
  displayName: string;
24
23
  };
25
24
 
@@ -46,25 +45,25 @@ interface LinkProps extends DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorEle
46
45
  disabled?: boolean;
47
46
  children: string | JSX.Element;
48
47
  }
49
- declare const Link: ({ className, disabled, url, newPage, onClick, ...rest }: LinkProps) => react_jsx_runtime.JSX.Element;
48
+ declare const Link: ({ className, disabled, url, newPage, ...rest }: LinkProps) => react.JSX.Element;
50
49
 
51
- declare const options: {
50
+ type RadioOption = {
52
51
  id: number;
53
52
  value: string;
54
53
  label: string;
55
- }[];
54
+ };
56
55
  interface RadioGroupProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
57
56
  disabled?: boolean;
58
- options: typeof options;
57
+ options: RadioOption[];
59
58
  required?: boolean;
60
59
  }
61
- declare const RadioGroup: ({ disabled, options, required, className, }: RadioGroupProps) => react_jsx_runtime.JSX.Element;
60
+ declare const RadioGroup: ({ disabled, options, required, className, }: RadioGroupProps) => react.JSX.Element;
62
61
 
63
62
  interface CheckboxProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
64
63
  disabled?: boolean;
65
64
  required?: boolean;
66
65
  }
67
- declare const Checkbox: ({ className, required, disabled }: CheckboxProps) => react_jsx_runtime.JSX.Element;
66
+ declare const Checkbox: ({ className, required, disabled }: CheckboxProps) => react.JSX.Element;
68
67
 
69
68
  type InputType = 'text' | 'password' | 'date' | 'datePicker' | 'cpf' | 'phone' | 'cnpj' | 'cep' | 'email';
70
69
  interface PasswordValidation {
@@ -146,7 +145,7 @@ interface TextProps extends DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLE
146
145
  htmlFor?: string;
147
146
  }
148
147
  declare const Text: {
149
- ({ children, size, tag, weight, leading, alignment, truncate, italic, uppercase, lowercase, capitalize, className, ...rest }: TextProps): react_jsx_runtime.JSX.Element;
148
+ ({ children, size, tag, weight, leading, alignment, truncate, italic, uppercase, lowercase, capitalize, className, ...rest }: TextProps): react.JSX.Element;
150
149
  displayName: string;
151
150
  };
152
151
 
@@ -160,7 +159,7 @@ interface HeadingProps extends DetailedHTMLProps<HTMLAttributes<HTMLHeadingEleme
160
159
  truncate?: boolean;
161
160
  uppercase?: boolean;
162
161
  }
163
- declare const Heading: ({ children, size, tag, weight, tracking, alignment, truncate, uppercase, className, ...rest }: HeadingProps) => react_jsx_runtime.JSX.Element;
162
+ declare const Heading: ({ children, size, tag, weight, tracking, alignment, truncate, uppercase, className, ...rest }: HeadingProps) => react.JSX.Element;
164
163
 
165
164
  type BoxVariant = 'primary' | 'secondary' | 'ghost' | 'outline';
166
165
  type BoxSize = 'sm' | 'md' | 'lg' | 'xl';
@@ -182,20 +181,20 @@ interface FormProps extends DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement
182
181
  orientation?: 'row' | 'col';
183
182
  handleSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
184
183
  }
185
- declare const Form: ({ className, children, variant, orientation, ...rest }: FormProps) => react_jsx_runtime.JSX.Element;
184
+ declare const Form: ({ className, children, variant, orientation, ...rest }: FormProps) => react.JSX.Element;
186
185
 
187
186
  interface AvatarProps {
188
187
  src?: string;
189
188
  alt?: string;
190
189
  className?: string;
191
190
  }
192
- declare const Avatar: ({ className, ...rest }: AvatarProps) => react_jsx_runtime.JSX.Element;
191
+ declare const Avatar: ({ className, src, alt, ...rest }: AvatarProps) => react.JSX.Element;
193
192
 
194
193
  interface MultiStepProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
195
194
  size: number;
196
195
  currentStep?: number;
197
196
  }
198
- declare const MultiStep: ({ className, size, currentStep }: MultiStepProps) => react_jsx_runtime.JSX.Element;
197
+ declare const MultiStep: ({ className, size, currentStep }: MultiStepProps) => react.JSX.Element;
199
198
 
200
199
  interface ToggleProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
201
200
  disabled?: boolean;
@@ -206,7 +205,7 @@ interface ToggleProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>,
206
205
  hideLabel?: boolean;
207
206
  id?: string;
208
207
  }
209
- declare const Toggle: ({ className, disabled, active, label, setActive, size, hideLabel, id, ...rest }: ToggleProps) => react_jsx_runtime.JSX.Element;
208
+ declare const Toggle: ({ className, disabled, active, label, setActive, size, hideLabel, id, ...rest }: ToggleProps) => react.JSX.Element;
210
209
 
211
210
  interface SkeletonProps {
212
211
  width?: string | number;
@@ -241,7 +240,7 @@ interface ModalProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, H
241
240
  closeOnEsc?: boolean;
242
241
  footer?: ReactNode;
243
242
  }
244
- declare const Modal: ({ className, isOpen, onClose, title, size, children, showCloseButton, closeOnOutsideClick, closeOnEsc, footer, ...rest }: ModalProps) => react_jsx_runtime.JSX.Element | null;
243
+ declare const Modal: ({ className, isOpen, onClose, title, size, children, showCloseButton, closeOnOutsideClick, closeOnEsc, footer, ...rest }: ModalProps) => react.JSX.Element | null;
245
244
 
246
245
  type ToastVariant = 'success' | 'error' | 'warning' | 'info';
247
246
  type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
@@ -259,13 +258,11 @@ interface ToastContainerProps {
259
258
  position?: ToastPosition;
260
259
  className?: string;
261
260
  }
261
+ type ToastListener = (nextToasts: ToastProps[]) => void;
262
262
  declare class ToastService {
263
- private static instance;
264
263
  private listeners;
265
264
  private toasts;
266
- private constructor();
267
- static getInstance(): ToastService;
268
- subscribe(listener: (toasts: ToastProps[]) => void): () => void;
265
+ subscribe(listener: ToastListener): () => void;
269
266
  private notify;
270
267
  showToast(toast: Omit<ToastProps, 'id' | 'onDismiss'>): string;
271
268
  hideToast(id: string): void;
@@ -285,4 +282,4 @@ declare const ToastProvider: react__default.FC<{
285
282
  children: react__default.ReactNode;
286
283
  }>;
287
284
 
288
- export { Avatar, type AvatarProps, Box, type BoxProps, type BoxSize, type BoxVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardDirection, type CardProps, type CardSize, Checkbox, type CheckboxProps, Form, type FormProps, Heading, type HeadingProps, Input, type InputProps, type InputType, Link, type LinkProps, Loading, type LoadingColor, type LoadingProps, type LoadingSize, Modal, type ModalProps, MultiStep, type MultiStepProps, type PasswordValidation, type PhoneFormat, RadioGroup, type RadioGroupProps, Skeleton, type SkeletonProps, Text, TextArea, type TextAreaProps, type TextAreaSize, type TextAreaType, type TextAreaVariant, TextInput, type TextInputProps, type TextProps, Toast, ToastContainer, type ToastContainerProps, type ToastPosition, type ToastProps, ToastProvider, type ToastVariant, Toggle, type ToggleProps, toastService, useToast };
285
+ export { Avatar, type AvatarProps, Box, type BoxProps, type BoxSize, type BoxVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardDirection, type CardProps, type CardSize, Checkbox, type CheckboxProps, Form, type FormProps, Heading, type HeadingProps, Input, type InputProps, type InputType, Link, type LinkProps, Loading, type LoadingColor, type LoadingProps, type LoadingSize, Modal, type ModalProps, MultiStep, type MultiStepProps, type PasswordValidation, type PhoneFormat, RadioGroup, type RadioGroupProps, type RadioOption, Skeleton, type SkeletonProps, Text, TextArea, type TextAreaProps, type TextAreaSize, type TextAreaType, type TextAreaVariant, TextInput, type TextInputProps, type TextProps, Toast, ToastContainer, type ToastContainerProps, type ToastPosition, type ToastProps, ToastProvider, type ToastVariant, Toggle, type ToggleProps, toastService, useToast };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import react__default, { DetailedHTMLProps, HTMLAttributes, ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, FormHTMLAttributes } from 'react';
4
3
 
@@ -19,7 +18,7 @@ interface CardProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement
19
18
  hoverable?: boolean;
20
19
  }
21
20
  declare const Card: {
22
- ({ className, selected, direction, size, disabled, image, imageSize, imageAlt, title, content, onClick, footer, hoverable, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
21
+ ({ className, selected, direction, size, disabled, image, imageSize, imageAlt, title, content, onClick, footer, hoverable, ...rest }: CardProps): react.JSX.Element;
23
22
  displayName: string;
24
23
  };
25
24
 
@@ -46,25 +45,25 @@ interface LinkProps extends DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorEle
46
45
  disabled?: boolean;
47
46
  children: string | JSX.Element;
48
47
  }
49
- declare const Link: ({ className, disabled, url, newPage, onClick, ...rest }: LinkProps) => react_jsx_runtime.JSX.Element;
48
+ declare const Link: ({ className, disabled, url, newPage, ...rest }: LinkProps) => react.JSX.Element;
50
49
 
51
- declare const options: {
50
+ type RadioOption = {
52
51
  id: number;
53
52
  value: string;
54
53
  label: string;
55
- }[];
54
+ };
56
55
  interface RadioGroupProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
57
56
  disabled?: boolean;
58
- options: typeof options;
57
+ options: RadioOption[];
59
58
  required?: boolean;
60
59
  }
61
- declare const RadioGroup: ({ disabled, options, required, className, }: RadioGroupProps) => react_jsx_runtime.JSX.Element;
60
+ declare const RadioGroup: ({ disabled, options, required, className, }: RadioGroupProps) => react.JSX.Element;
62
61
 
63
62
  interface CheckboxProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
64
63
  disabled?: boolean;
65
64
  required?: boolean;
66
65
  }
67
- declare const Checkbox: ({ className, required, disabled }: CheckboxProps) => react_jsx_runtime.JSX.Element;
66
+ declare const Checkbox: ({ className, required, disabled }: CheckboxProps) => react.JSX.Element;
68
67
 
69
68
  type InputType = 'text' | 'password' | 'date' | 'datePicker' | 'cpf' | 'phone' | 'cnpj' | 'cep' | 'email';
70
69
  interface PasswordValidation {
@@ -146,7 +145,7 @@ interface TextProps extends DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLE
146
145
  htmlFor?: string;
147
146
  }
148
147
  declare const Text: {
149
- ({ children, size, tag, weight, leading, alignment, truncate, italic, uppercase, lowercase, capitalize, className, ...rest }: TextProps): react_jsx_runtime.JSX.Element;
148
+ ({ children, size, tag, weight, leading, alignment, truncate, italic, uppercase, lowercase, capitalize, className, ...rest }: TextProps): react.JSX.Element;
150
149
  displayName: string;
151
150
  };
152
151
 
@@ -160,7 +159,7 @@ interface HeadingProps extends DetailedHTMLProps<HTMLAttributes<HTMLHeadingEleme
160
159
  truncate?: boolean;
161
160
  uppercase?: boolean;
162
161
  }
163
- declare const Heading: ({ children, size, tag, weight, tracking, alignment, truncate, uppercase, className, ...rest }: HeadingProps) => react_jsx_runtime.JSX.Element;
162
+ declare const Heading: ({ children, size, tag, weight, tracking, alignment, truncate, uppercase, className, ...rest }: HeadingProps) => react.JSX.Element;
164
163
 
165
164
  type BoxVariant = 'primary' | 'secondary' | 'ghost' | 'outline';
166
165
  type BoxSize = 'sm' | 'md' | 'lg' | 'xl';
@@ -182,20 +181,20 @@ interface FormProps extends DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement
182
181
  orientation?: 'row' | 'col';
183
182
  handleSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
184
183
  }
185
- declare const Form: ({ className, children, variant, orientation, ...rest }: FormProps) => react_jsx_runtime.JSX.Element;
184
+ declare const Form: ({ className, children, variant, orientation, ...rest }: FormProps) => react.JSX.Element;
186
185
 
187
186
  interface AvatarProps {
188
187
  src?: string;
189
188
  alt?: string;
190
189
  className?: string;
191
190
  }
192
- declare const Avatar: ({ className, ...rest }: AvatarProps) => react_jsx_runtime.JSX.Element;
191
+ declare const Avatar: ({ className, src, alt, ...rest }: AvatarProps) => react.JSX.Element;
193
192
 
194
193
  interface MultiStepProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
195
194
  size: number;
196
195
  currentStep?: number;
197
196
  }
198
- declare const MultiStep: ({ className, size, currentStep }: MultiStepProps) => react_jsx_runtime.JSX.Element;
197
+ declare const MultiStep: ({ className, size, currentStep }: MultiStepProps) => react.JSX.Element;
199
198
 
200
199
  interface ToggleProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
201
200
  disabled?: boolean;
@@ -206,7 +205,7 @@ interface ToggleProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>,
206
205
  hideLabel?: boolean;
207
206
  id?: string;
208
207
  }
209
- declare const Toggle: ({ className, disabled, active, label, setActive, size, hideLabel, id, ...rest }: ToggleProps) => react_jsx_runtime.JSX.Element;
208
+ declare const Toggle: ({ className, disabled, active, label, setActive, size, hideLabel, id, ...rest }: ToggleProps) => react.JSX.Element;
210
209
 
211
210
  interface SkeletonProps {
212
211
  width?: string | number;
@@ -241,7 +240,7 @@ interface ModalProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, H
241
240
  closeOnEsc?: boolean;
242
241
  footer?: ReactNode;
243
242
  }
244
- declare const Modal: ({ className, isOpen, onClose, title, size, children, showCloseButton, closeOnOutsideClick, closeOnEsc, footer, ...rest }: ModalProps) => react_jsx_runtime.JSX.Element | null;
243
+ declare const Modal: ({ className, isOpen, onClose, title, size, children, showCloseButton, closeOnOutsideClick, closeOnEsc, footer, ...rest }: ModalProps) => react.JSX.Element | null;
245
244
 
246
245
  type ToastVariant = 'success' | 'error' | 'warning' | 'info';
247
246
  type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
@@ -259,13 +258,11 @@ interface ToastContainerProps {
259
258
  position?: ToastPosition;
260
259
  className?: string;
261
260
  }
261
+ type ToastListener = (nextToasts: ToastProps[]) => void;
262
262
  declare class ToastService {
263
- private static instance;
264
263
  private listeners;
265
264
  private toasts;
266
- private constructor();
267
- static getInstance(): ToastService;
268
- subscribe(listener: (toasts: ToastProps[]) => void): () => void;
265
+ subscribe(listener: ToastListener): () => void;
269
266
  private notify;
270
267
  showToast(toast: Omit<ToastProps, 'id' | 'onDismiss'>): string;
271
268
  hideToast(id: string): void;
@@ -285,4 +282,4 @@ declare const ToastProvider: react__default.FC<{
285
282
  children: react__default.ReactNode;
286
283
  }>;
287
284
 
288
- export { Avatar, type AvatarProps, Box, type BoxProps, type BoxSize, type BoxVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardDirection, type CardProps, type CardSize, Checkbox, type CheckboxProps, Form, type FormProps, Heading, type HeadingProps, Input, type InputProps, type InputType, Link, type LinkProps, Loading, type LoadingColor, type LoadingProps, type LoadingSize, Modal, type ModalProps, MultiStep, type MultiStepProps, type PasswordValidation, type PhoneFormat, RadioGroup, type RadioGroupProps, Skeleton, type SkeletonProps, Text, TextArea, type TextAreaProps, type TextAreaSize, type TextAreaType, type TextAreaVariant, TextInput, type TextInputProps, type TextProps, Toast, ToastContainer, type ToastContainerProps, type ToastPosition, type ToastProps, ToastProvider, type ToastVariant, Toggle, type ToggleProps, toastService, useToast };
285
+ export { Avatar, type AvatarProps, Box, type BoxProps, type BoxSize, type BoxVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardDirection, type CardProps, type CardSize, Checkbox, type CheckboxProps, Form, type FormProps, Heading, type HeadingProps, Input, type InputProps, type InputType, Link, type LinkProps, Loading, type LoadingColor, type LoadingProps, type LoadingSize, Modal, type ModalProps, MultiStep, type MultiStepProps, type PasswordValidation, type PhoneFormat, RadioGroup, type RadioGroupProps, type RadioOption, Skeleton, type SkeletonProps, Text, TextArea, type TextAreaProps, type TextAreaSize, type TextAreaType, type TextAreaVariant, TextInput, type TextInputProps, type TextProps, Toast, ToastContainer, type ToastContainerProps, type ToastPosition, type ToastProps, ToastProvider, type ToastVariant, Toggle, type ToggleProps, toastService, useToast };