@rock10/ui 1.0.17 → 1.0.19
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/charts.d.ts +1 -0
- package/dist/charts.es.js +433 -0
- package/dist/cn-D4DU2yxV.js +3818 -0
- package/dist/components/AppShell.d.ts +29 -0
- package/dist/components/Button.d.ts +9 -2
- package/dist/components/CopyButton.d.ts +14 -0
- package/dist/components/HighlightVideoCard.d.ts +23 -0
- package/dist/components/PageHeader.d.ts +6 -1
- package/dist/components/Pagination.d.ts +12 -0
- package/dist/components/PixPaymentModal.d.ts +17 -0
- package/dist/components/ReceiptModal.d.ts +20 -0
- package/dist/components/ShareLinkModal.d.ts +14 -0
- package/dist/components/StatCard.d.ts +7 -1
- package/dist/components/VideoPreviewModal.d.ts +30 -0
- package/dist/components/charts/TimelineDrilldownChart.d.ts +33 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.es.js +3518 -5138
- package/dist/style.css +1 -1
- package/dist/utils/cpfValidator.d.ts +6 -0
- package/dist/utils/image.d.ts +12 -0
- package/package.json +25 -12
- package/dist/index.umd.js +0 -175
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AppShellProps {
|
|
4
|
+
sidebar: ReactNode;
|
|
5
|
+
header: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
footer?: ReactNode;
|
|
8
|
+
sidebarOpen?: boolean;
|
|
9
|
+
onSidebarOpenChange?: (open: boolean) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function AppShell({ sidebar, header, children, footer, sidebarOpen: controlledOpen, onSidebarOpenChange, className, }: AppShellProps): import("react").JSX.Element;
|
|
13
|
+
export interface AppHeaderProps {
|
|
14
|
+
title?: ReactNode;
|
|
15
|
+
onToggleSidebar?: () => void;
|
|
16
|
+
actions?: ReactNode;
|
|
17
|
+
userSlot?: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function AppHeader({ title, onToggleSidebar, actions, userSlot, className, }: AppHeaderProps): import("react").JSX.Element;
|
|
21
|
+
export interface AppSidebarProps {
|
|
22
|
+
brand: ReactNode;
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
footer?: ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
onNavigate?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function AppSidebar({ brand, children, footer, className, onNavigate }: AppSidebarProps): import("react").JSX.Element;
|
|
29
|
+
export default AppShell;
|
|
@@ -9,8 +9,15 @@ declare const buttonVariants: (props?: ({
|
|
|
9
9
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
isLoading?: boolean;
|
|
12
|
-
leftIcon?: ReactNode
|
|
13
|
-
|
|
12
|
+
leftIcon?: ReactNode | React.ComponentType<{
|
|
13
|
+
className?: string;
|
|
14
|
+
}>;
|
|
15
|
+
rightIcon?: ReactNode | React.ComponentType<{
|
|
16
|
+
className?: string;
|
|
17
|
+
}>;
|
|
18
|
+
icon?: ReactNode | React.ComponentType<{
|
|
19
|
+
className?: string;
|
|
20
|
+
}>;
|
|
14
21
|
}
|
|
15
22
|
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
16
23
|
export default Button;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CopyButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onCopy'> {
|
|
4
|
+
text: string;
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
copiedLabel?: ReactNode;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'icon';
|
|
9
|
+
size?: 'xs' | 'sm' | 'md';
|
|
10
|
+
onCopy?: (text: string) => void;
|
|
11
|
+
onError?: (error: unknown) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function CopyButton({ text, label, copiedLabel, timeout, variant, size, className, onCopy, onError, disabled, title, ...props }: CopyButtonProps): import("react").JSX.Element;
|
|
14
|
+
export default CopyButton;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface HighlightVideoData {
|
|
4
|
+
nome: string;
|
|
5
|
+
poster?: string | null;
|
|
6
|
+
arena_nome?: string;
|
|
7
|
+
quadra_nome?: string;
|
|
8
|
+
dthr?: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export interface HighlightVideoCardProps {
|
|
12
|
+
title: string;
|
|
13
|
+
metricName: string;
|
|
14
|
+
value: number;
|
|
15
|
+
icon: ReactNode;
|
|
16
|
+
accentColor?: 'blue' | 'red' | 'purple' | 'emerald' | 'amber';
|
|
17
|
+
video?: HighlightVideoData | null;
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
onPlay?: () => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const HighlightVideoCard: React.FC<HighlightVideoCardProps>;
|
|
23
|
+
export default HighlightVideoCard;
|
|
@@ -3,10 +3,15 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
export interface PageHeaderProps {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: ReactNode;
|
|
6
|
+
subtitle?: ReactNode;
|
|
7
|
+
icon?: ReactNode | React.ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
6
10
|
badge?: ReactNode;
|
|
11
|
+
action?: ReactNode;
|
|
7
12
|
actions?: ReactNode;
|
|
8
13
|
breadcrumb?: ReactNode;
|
|
9
14
|
className?: string;
|
|
10
15
|
}
|
|
11
|
-
export declare function PageHeader({ title, description, badge, actions, breadcrumb, className, }: PageHeaderProps): import("react").JSX.Element;
|
|
16
|
+
export declare function PageHeader({ title, description, subtitle, icon, badge, action, actions, breadcrumb, className, }: PageHeaderProps): import("react").JSX.Element;
|
|
12
17
|
export default PageHeader;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
page: number;
|
|
3
|
+
totalPages: number;
|
|
4
|
+
totalItems?: number;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
onPageChange: (page: number) => void;
|
|
7
|
+
showEdges?: boolean;
|
|
8
|
+
maxVisiblePages?: number;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function Pagination({ page, totalPages, totalItems, pageSize, onPageChange, showEdges, maxVisiblePages, className, }: PaginationProps): import("react").JSX.Element | null;
|
|
12
|
+
export default Pagination;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface PixPaymentModalProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
title?: string;
|
|
5
|
+
documentNumber?: string | null;
|
|
6
|
+
competence?: string | null;
|
|
7
|
+
payerName: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
dueDate?: string | null;
|
|
10
|
+
pixPayload?: string | null;
|
|
11
|
+
pixQrCode?: string | null;
|
|
12
|
+
invoiceUrl?: string | null;
|
|
13
|
+
whatsappPhone?: string | null;
|
|
14
|
+
arenaName?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function PixPaymentModal({ isOpen, onClose, title, documentNumber, competence, payerName, amount, dueDate, pixPayload, pixQrCode, invoiceUrl, whatsappPhone, arenaName, }: PixPaymentModalProps): import("react").JSX.Element | null;
|
|
17
|
+
export default PixPaymentModal;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ReceiptModalProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
receiptNumber: string | number;
|
|
5
|
+
issuerName: string;
|
|
6
|
+
issuerSubtitle?: string | null;
|
|
7
|
+
payerName: string;
|
|
8
|
+
payerDocument?: string | null;
|
|
9
|
+
amountPaid: number;
|
|
10
|
+
totalAmount?: number | null;
|
|
11
|
+
paymentDate?: string | null;
|
|
12
|
+
paymentMethod?: string | null;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
documentNumber?: string | null;
|
|
15
|
+
competence?: string | null;
|
|
16
|
+
operatorName?: string | null;
|
|
17
|
+
onPrint?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function ReceiptModal({ isOpen, onClose, receiptNumber, issuerName, issuerSubtitle, payerName, payerDocument, amountPaid, totalAmount, paymentDate, paymentMethod, description, documentNumber, competence, operatorName, onPrint, }: ReceiptModalProps): import("react").JSX.Element | null;
|
|
20
|
+
export default ReceiptModal;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ShareLinkModalProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
title?: string;
|
|
5
|
+
badgeText?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
entityName: string;
|
|
8
|
+
url: string;
|
|
9
|
+
qrCodeFileName?: string;
|
|
10
|
+
whatsAppMessage?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function ShareLinkModal({ isOpen, onClose, title, badgeText, subtitle, entityName, url, qrCodeFileName, whatsAppMessage, className, }: ShareLinkModalProps): import("react").JSX.Element | null;
|
|
14
|
+
export default ShareLinkModal;
|
|
@@ -46,12 +46,18 @@ export interface StatCardProps {
|
|
|
46
46
|
title: string;
|
|
47
47
|
value: number | string;
|
|
48
48
|
subtitle?: ReactNode;
|
|
49
|
+
description?: ReactNode;
|
|
50
|
+
trend?: {
|
|
51
|
+
value: number | string;
|
|
52
|
+
isPositive?: boolean;
|
|
53
|
+
};
|
|
49
54
|
icon?: ReactNode;
|
|
50
55
|
color?: keyof typeof colorThemes;
|
|
56
|
+
variant?: 'default' | 'horizontal' | 'compact';
|
|
51
57
|
isLoading?: boolean;
|
|
52
58
|
animateValue?: boolean;
|
|
53
59
|
className?: string;
|
|
54
60
|
onClick?: () => void;
|
|
55
61
|
}
|
|
56
|
-
export declare function StatCard({ title, value, subtitle, icon, color, isLoading, animateValue, className, onClick, }: StatCardProps): import("react").JSX.Element;
|
|
62
|
+
export declare function StatCard({ title, value, subtitle, description, trend, icon, color, variant, isLoading, animateValue, className, onClick, }: StatCardProps): import("react").JSX.Element;
|
|
57
63
|
export default StatCard;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface VideoPreviewItem {
|
|
4
|
+
id?: string | number;
|
|
5
|
+
nome: string;
|
|
6
|
+
url: string;
|
|
7
|
+
poster?: string | null;
|
|
8
|
+
is_vertical?: boolean;
|
|
9
|
+
dthr?: string;
|
|
10
|
+
grupo_nome?: string;
|
|
11
|
+
grupo_slug?: string;
|
|
12
|
+
arena_nome?: string;
|
|
13
|
+
quadra_nome?: string;
|
|
14
|
+
visualizacoes?: number;
|
|
15
|
+
curtidas?: number;
|
|
16
|
+
downloads?: number;
|
|
17
|
+
compartilhamentos?: number;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
export interface VideoPreviewModalProps {
|
|
21
|
+
isOpen: boolean;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
video: VideoPreviewItem | null;
|
|
24
|
+
/** Custom title override */
|
|
25
|
+
title?: string;
|
|
26
|
+
/** Custom additional action elements */
|
|
27
|
+
extraActions?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare const VideoPreviewModal: React.FC<VideoPreviewModalProps>;
|
|
30
|
+
export default VideoPreviewModal;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface TimelineItem {
|
|
2
|
+
key?: number;
|
|
3
|
+
label: string;
|
|
4
|
+
month?: number;
|
|
5
|
+
day?: number;
|
|
6
|
+
hour?: number;
|
|
7
|
+
videos: number;
|
|
8
|
+
visualizacoes: number;
|
|
9
|
+
downloads: number;
|
|
10
|
+
curtidas: number;
|
|
11
|
+
compartilhamentos: number;
|
|
12
|
+
prev_videos?: number;
|
|
13
|
+
prev_visualizacoes?: number;
|
|
14
|
+
prev_downloads?: number;
|
|
15
|
+
prev_curtidas?: number;
|
|
16
|
+
prev_compartilhamentos?: number;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
export interface TimelineFetchParams {
|
|
20
|
+
year: number;
|
|
21
|
+
compare_year?: number;
|
|
22
|
+
month?: number;
|
|
23
|
+
day?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface TimelineDrilldownChartProps {
|
|
26
|
+
title?: string;
|
|
27
|
+
titleSuffix?: string;
|
|
28
|
+
onFetchData: (params: TimelineFetchParams) => Promise<TimelineItem[]>;
|
|
29
|
+
initialYear?: number;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function TimelineDrilldownChart({ title, titleSuffix, onFetchData, initialYear, className, }: TimelineDrilldownChartProps): import("react").JSX.Element;
|
|
33
|
+
export default TimelineDrilldownChart;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { cn } from './utils/cn';
|
|
2
|
+
export { cleanCpf, formatCpf, isValidCpf } from './utils/cpfValidator';
|
|
3
|
+
export { getImageDimensions, lerDimensoesImagem, type ImageDimensions } from './utils/image';
|
|
2
4
|
export { Button, type ButtonProps } from './components/Button';
|
|
5
|
+
export { CopyButton, type CopyButtonProps } from './components/CopyButton';
|
|
3
6
|
export { Input, type InputProps } from './components/Input';
|
|
4
7
|
export { Select, type SelectProps, type SelectOption } from './components/Select';
|
|
5
8
|
export { Textarea, type TextareaProps } from './components/Textarea';
|
|
@@ -9,6 +12,7 @@ export { Badge, type BadgeProps } from './components/Badge';
|
|
|
9
12
|
export { Skeleton, type SkeletonProps } from './components/Skeleton';
|
|
10
13
|
export { IconButton, type IconButtonProps, type IconButtonVariant, type IconButtonSize } from './components/IconButton';
|
|
11
14
|
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, type CardProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, } from './components/Card';
|
|
15
|
+
export { AppShell, AppHeader, AppSidebar, type AppShellProps, type AppHeaderProps, type AppSidebarProps, } from './components/AppShell';
|
|
12
16
|
export { StatCard, type StatCardProps } from './components/StatCard';
|
|
13
17
|
export { Alert, type AlertProps } from './components/Alert';
|
|
14
18
|
export { TableContainer, Table, TableHeader, TableBody, TableRow, TableCell, TableHead, type TableContainerProps, type TableProps, } from './components/Table';
|
|
@@ -28,6 +32,9 @@ export { HeroBanner, type HeroBannerProps, type HeroAction } from './components/
|
|
|
28
32
|
export { BannerCTA, type BannerCTAProps } from './components/BannerCTA';
|
|
29
33
|
export { StepCards, type StepCardsProps, type StepItem } from './components/StepCards';
|
|
30
34
|
export { CourtSelector, type CourtSelectorProps, type CourtItem } from './components/CourtSelector';
|
|
35
|
+
export { Pagination, type PaginationProps } from './components/Pagination';
|
|
36
|
+
export { VideoPreviewModal, type VideoPreviewModalProps, type VideoPreviewItem } from './components/VideoPreviewModal';
|
|
37
|
+
export { HighlightVideoCard, type HighlightVideoCardProps, type HighlightVideoData } from './components/HighlightVideoCard';
|
|
31
38
|
export { VideoCard, type VideoCardProps, type VideoData } from './components/VideoCard';
|
|
32
39
|
export { ArenaCard, type ArenaCardProps, type ArenaData } from './components/ArenaCard';
|
|
33
40
|
export { ArenaPosterCard, type ArenaPosterCardProps } from './components/ArenaPosterCard';
|
|
@@ -36,3 +43,6 @@ export { SponsorCarousel, type SponsorCarouselProps, type SponsorItem } from './
|
|
|
36
43
|
export { LikeButton, type LikeButtonProps } from './components/LikeButton';
|
|
37
44
|
export { DownloadButton, type DownloadButtonProps } from './components/DownloadButton';
|
|
38
45
|
export { Logo, type LogoProps } from './components/Logo';
|
|
46
|
+
export { ShareLinkModal, type ShareLinkModalProps } from './components/ShareLinkModal';
|
|
47
|
+
export { PixPaymentModal, type PixPaymentModalProps } from './components/PixPaymentModal';
|
|
48
|
+
export { ReceiptModal, type ReceiptModalProps } from './components/ReceiptModal';
|