@rock10/ui 1.0.11 → 1.0.12
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/components/Alert.d.ts +12 -0
- package/dist/components/ArenaCard.d.ts +22 -0
- package/dist/components/Badge.d.ts +15 -0
- package/dist/components/Button.d.ts +16 -0
- package/dist/components/Card.d.ts +29 -0
- package/dist/components/Checkbox.d.ts +8 -0
- package/dist/components/FilterBar.d.ts +12 -0
- package/dist/components/Input.d.ts +15 -0
- package/dist/components/LikeButton.d.ts +4 -2
- package/dist/components/Logo.d.ts +9 -0
- package/dist/components/PageHeader.d.ts +12 -0
- package/dist/components/Select.d.ts +18 -0
- package/dist/components/Skeleton.d.ts +9 -0
- package/dist/components/StatCard.d.ts +57 -0
- package/dist/components/Switch.d.ts +9 -0
- package/dist/components/Table.d.ts +14 -0
- package/dist/components/Textarea.d.ts +10 -0
- package/dist/components/VideoCard.d.ts +30 -0
- package/dist/index.d.ts +19 -2
- package/dist/index.es.js +2809 -1402
- package/dist/index.umd.js +83 -23
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AlertProps {
|
|
4
|
+
variant?: 'info' | 'success' | 'warning' | 'danger';
|
|
5
|
+
title?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function Alert({ variant, title, children, icon, onClose, className, }: AlertProps): import("react").JSX.Element;
|
|
12
|
+
export default Alert;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ArenaData {
|
|
4
|
+
id: number;
|
|
5
|
+
nome: string;
|
|
6
|
+
slug?: string;
|
|
7
|
+
cidade?: string;
|
|
8
|
+
uf?: string;
|
|
9
|
+
logo_url?: string;
|
|
10
|
+
banner_url?: string;
|
|
11
|
+
total_quadras?: number;
|
|
12
|
+
ativo?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ArenaCardProps {
|
|
15
|
+
arena: ArenaData;
|
|
16
|
+
onClick?: (arena: ArenaData) => void;
|
|
17
|
+
actionText?: string;
|
|
18
|
+
extraBadge?: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function ArenaCard({ arena, onClick, actionText, extraBadge, className, }: ArenaCardProps): import("react").JSX.Element;
|
|
22
|
+
export default ArenaCard;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
declare const badgeVariants: (props?: ({
|
|
5
|
+
variant?: "primary" | "secondary" | "danger" | "success" | "purple" | "warning" | "info" | "neutral" | null | undefined;
|
|
6
|
+
size?: "sm" | "md" | null | undefined;
|
|
7
|
+
shape?: "pill" | "rounded" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
dot?: boolean;
|
|
12
|
+
pulseDot?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function Badge({ className, variant, size, shape, dot, pulseDot, children, ...props }: BadgeProps): import("react").JSX.Element;
|
|
15
|
+
export default Badge;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "primary" | "secondary" | "outline" | "ghost" | "danger" | "success" | "purple" | "link" | null | undefined;
|
|
6
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
fullWidth?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
leftIcon?: ReactNode;
|
|
13
|
+
rightIcon?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export default Button;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
hoverable?: boolean;
|
|
6
|
+
padded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
actions?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const CardHeader: import('react').ForwardRefExoticComponent<CardHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const CardTitle: import('react').ForwardRefExoticComponent<CardTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
export interface CardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const CardDescription: import('react').ForwardRefExoticComponent<CardDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare const CardContent: import('react').ForwardRefExoticComponent<CardContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare const CardFooter: import('react').ForwardRefExoticComponent<CardFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Checkbox: import('react').ForwardRefExoticComponent<CheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
8
|
+
export default Checkbox;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FilterBarProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
hasActiveFilters?: boolean;
|
|
6
|
+
activeFiltersCount?: number;
|
|
7
|
+
onClearFilters?: () => void;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function FilterBar({ title, hasActiveFilters, activeFiltersCount, onClearFilters, children, className, }: FilterBarProps): import("react").JSX.Element;
|
|
12
|
+
export default FilterBar;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
startIcon?: ReactNode;
|
|
8
|
+
endIcon?: ReactNode;
|
|
9
|
+
clearable?: boolean;
|
|
10
|
+
onClear?: () => void;
|
|
11
|
+
inputSize?: 'sm' | 'md' | 'lg';
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
15
|
+
export default Input;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export interface LikeButtonProps {
|
|
2
|
+
/** ID do vídeo opcional */
|
|
3
|
+
videoId?: number;
|
|
2
4
|
/** Número inicial de curtidas */
|
|
3
5
|
initialLikes?: number;
|
|
4
|
-
/** Função assíncrona chamada para registrar a curtida e retornar a nova contagem */
|
|
5
|
-
onLike
|
|
6
|
+
/** Função assíncrona opcional chamada para registrar a curtida e retornar a nova contagem */
|
|
7
|
+
onLike?: () => Promise<number>;
|
|
6
8
|
/** Callback opcional chamado quando o like muda localmente */
|
|
7
9
|
onLikeChange?: (newCount: number) => void;
|
|
8
10
|
/** Tamanho do botão */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface LogoProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
variant?: 'full' | 'icon';
|
|
5
|
+
themeMode?: 'auto' | 'light' | 'dark';
|
|
6
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
}
|
|
8
|
+
export declare function Logo({ variant, themeMode, size, className, ...props }: LogoProps): import("react").JSX.Element;
|
|
9
|
+
export default Logo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface PageHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
badge?: ReactNode;
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
breadcrumb?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function PageHeader({ title, description, badge, actions, breadcrumb, className, }: PageHeaderProps): import("react").JSX.Element;
|
|
12
|
+
export default PageHeader;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SelectHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
9
|
+
label?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
options?: SelectOption[];
|
|
13
|
+
selectSize?: 'sm' | 'md' | 'lg';
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const Select: import('react').ForwardRefExoticComponent<SelectProps & import('react').RefAttributes<HTMLSelectElement>>;
|
|
18
|
+
export default Select;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
variant?: 'text' | 'circular' | 'rectangular' | 'card';
|
|
5
|
+
width?: string | number;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
}
|
|
8
|
+
export declare function Skeleton({ className, variant, width, height, style, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
9
|
+
export default Skeleton;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const colorThemes: {
|
|
4
|
+
purple: {
|
|
5
|
+
text: string;
|
|
6
|
+
bg: string;
|
|
7
|
+
border: string;
|
|
8
|
+
};
|
|
9
|
+
blue: {
|
|
10
|
+
text: string;
|
|
11
|
+
bg: string;
|
|
12
|
+
border: string;
|
|
13
|
+
};
|
|
14
|
+
emerald: {
|
|
15
|
+
text: string;
|
|
16
|
+
bg: string;
|
|
17
|
+
border: string;
|
|
18
|
+
};
|
|
19
|
+
amber: {
|
|
20
|
+
text: string;
|
|
21
|
+
bg: string;
|
|
22
|
+
border: string;
|
|
23
|
+
};
|
|
24
|
+
red: {
|
|
25
|
+
text: string;
|
|
26
|
+
bg: string;
|
|
27
|
+
border: string;
|
|
28
|
+
};
|
|
29
|
+
cyan: {
|
|
30
|
+
text: string;
|
|
31
|
+
bg: string;
|
|
32
|
+
border: string;
|
|
33
|
+
};
|
|
34
|
+
pink: {
|
|
35
|
+
text: string;
|
|
36
|
+
bg: string;
|
|
37
|
+
border: string;
|
|
38
|
+
};
|
|
39
|
+
yellow: {
|
|
40
|
+
text: string;
|
|
41
|
+
bg: string;
|
|
42
|
+
border: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export interface StatCardProps {
|
|
46
|
+
title: string;
|
|
47
|
+
value: number | string;
|
|
48
|
+
subtitle?: ReactNode;
|
|
49
|
+
icon?: ReactNode;
|
|
50
|
+
color?: keyof typeof colorThemes;
|
|
51
|
+
isLoading?: boolean;
|
|
52
|
+
animateValue?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
onClick?: () => void;
|
|
55
|
+
}
|
|
56
|
+
export declare function StatCard({ title, value, subtitle, icon, color, isLoading, animateValue, className, onClick, }: StatCardProps): import("react").JSX.Element;
|
|
57
|
+
export default StatCard;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: string;
|
|
6
|
+
switchSize?: 'sm' | 'md' | 'lg';
|
|
7
|
+
}
|
|
8
|
+
export declare const Switch: import('react').ForwardRefExoticComponent<SwitchProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export default Switch;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TableContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
bordered?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const TableContainer: import('react').ForwardRefExoticComponent<TableContainerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
8
|
+
}
|
|
9
|
+
export declare const Table: import('react').ForwardRefExoticComponent<TableProps & import('react').RefAttributes<HTMLTableElement>>;
|
|
10
|
+
export declare const TableHeader: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
11
|
+
export declare const TableBody: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import('react').RefAttributes<HTMLTableSectionElement>>;
|
|
12
|
+
export declare const TableRow: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & import('react').RefAttributes<HTMLTableRowElement>>;
|
|
13
|
+
export declare const TableHead: import('react').ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & import('react').RefAttributes<HTMLTableCellElement>>;
|
|
14
|
+
export declare const TableCell: import('react').ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & import('react').RefAttributes<HTMLTableCellElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const Textarea: import('react').ForwardRefExoticComponent<TextareaProps & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
export default Textarea;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface VideoData {
|
|
4
|
+
id: number;
|
|
5
|
+
nome: string;
|
|
6
|
+
dthr: string;
|
|
7
|
+
poster: string;
|
|
8
|
+
url: string;
|
|
9
|
+
downloads: number;
|
|
10
|
+
curtidas: number;
|
|
11
|
+
visualizacoes?: number;
|
|
12
|
+
compartilhamentos?: number;
|
|
13
|
+
quadra_id?: number;
|
|
14
|
+
quadra_nome?: string;
|
|
15
|
+
arena_nome?: string;
|
|
16
|
+
is_vertical?: boolean | number;
|
|
17
|
+
}
|
|
18
|
+
export interface VideoCardProps {
|
|
19
|
+
video: VideoData;
|
|
20
|
+
showShare?: boolean;
|
|
21
|
+
onPlay?: (video: VideoData) => void;
|
|
22
|
+
onShare?: (video: VideoData) => void;
|
|
23
|
+
onLikeChange?: (videoId: number, liked: boolean) => void;
|
|
24
|
+
onDownloadComplete?: (videoId: number) => void;
|
|
25
|
+
onDownloadIncrement?: (videoId: number) => Promise<number>;
|
|
26
|
+
extraActions?: ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function VideoCard({ video, showShare, onPlay, onShare, onLikeChange, onDownloadComplete, onDownloadIncrement, extraActions, className, }: VideoCardProps): import("react").JSX.Element;
|
|
30
|
+
export default VideoCard;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
export { cn } from './utils/cn';
|
|
2
|
-
export {
|
|
2
|
+
export { Button, type ButtonProps } from './components/Button';
|
|
3
|
+
export { Input, type InputProps } from './components/Input';
|
|
4
|
+
export { Select, type SelectProps, type SelectOption } from './components/Select';
|
|
5
|
+
export { Textarea, type TextareaProps } from './components/Textarea';
|
|
6
|
+
export { Checkbox, type CheckboxProps } from './components/Checkbox';
|
|
7
|
+
export { Switch, type SwitchProps } from './components/Switch';
|
|
8
|
+
export { Badge, type BadgeProps } from './components/Badge';
|
|
9
|
+
export { Skeleton, type SkeletonProps } from './components/Skeleton';
|
|
3
10
|
export { IconButton, type IconButtonProps, type IconButtonVariant, type IconButtonSize } from './components/IconButton';
|
|
11
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, type CardProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, } from './components/Card';
|
|
12
|
+
export { StatCard, type StatCardProps } from './components/StatCard';
|
|
13
|
+
export { Alert, type AlertProps } from './components/Alert';
|
|
14
|
+
export { TableContainer, Table, TableHeader, TableBody, TableRow, TableCell, TableHead, type TableContainerProps, type TableProps, } from './components/Table';
|
|
15
|
+
export { FilterBar, type FilterBarProps } from './components/FilterBar';
|
|
16
|
+
export { PageHeader, type PageHeaderProps } from './components/PageHeader';
|
|
17
|
+
export { Loading, type LoadingProps } from './components/Loading';
|
|
4
18
|
export { Modal, type ModalProps } from './components/Modal';
|
|
5
19
|
export { ConfirmDialog, type ConfirmDialogProps } from './components/ConfirmDialog';
|
|
6
20
|
export { EmptyState, type EmptyStateProps } from './components/EmptyState';
|
|
7
21
|
export { SearchBar, type SearchBarProps } from './components/SearchBar';
|
|
8
22
|
export { DatePicker, type DatePickerProps } from './components/DatePicker';
|
|
9
23
|
export { DateSelector, type DateSelectorProps } from './components/DateSelector';
|
|
24
|
+
export { Tabs, type TabsProps, type TabItem } from './components/Tabs';
|
|
25
|
+
export { VideoCard, type VideoCardProps, type VideoData } from './components/VideoCard';
|
|
26
|
+
export { ArenaCard, type ArenaCardProps, type ArenaData } from './components/ArenaCard';
|
|
10
27
|
export { LikeButton, type LikeButtonProps } from './components/LikeButton';
|
|
11
28
|
export { DownloadButton, type DownloadButtonProps } from './components/DownloadButton';
|
|
12
|
-
export {
|
|
29
|
+
export { Logo, type LogoProps } from './components/Logo';
|