analytica-frontend-lib 1.1.94 → 1.1.95
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/StatisticsCard/index.d.mts +77 -0
- package/dist/StatisticsCard/index.d.ts +77 -0
- package/dist/StatisticsCard/index.js +608 -0
- package/dist/StatisticsCard/index.js.map +1 -0
- package/dist/StatisticsCard/index.mjs +589 -0
- package/dist/StatisticsCard/index.mjs.map +1 -0
- package/dist/index.css +38 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +459 -340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +447 -329
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +38 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Statistics data item
|
|
5
|
+
*/
|
|
6
|
+
interface StatItem {
|
|
7
|
+
/** Statistic label */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Statistic value */
|
|
10
|
+
value: string | number;
|
|
11
|
+
/** Color variant */
|
|
12
|
+
variant: 'high' | 'medium' | 'low' | 'total';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for StatisticsCard component
|
|
16
|
+
*/
|
|
17
|
+
interface StatisticsCardProps {
|
|
18
|
+
/** Title displayed at the top of the card */
|
|
19
|
+
title: string;
|
|
20
|
+
/** Statistics data to display */
|
|
21
|
+
data?: StatItem[];
|
|
22
|
+
/** Message shown in empty state */
|
|
23
|
+
emptyStateMessage?: string;
|
|
24
|
+
/** Text for the empty state button */
|
|
25
|
+
emptyStateButtonText?: string;
|
|
26
|
+
/** Callback when empty state button is clicked */
|
|
27
|
+
onEmptyStateButtonClick?: () => void;
|
|
28
|
+
/** Optional dropdown options for filtering */
|
|
29
|
+
dropdownOptions?: Array<{
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** Currently selected dropdown value */
|
|
34
|
+
selectedDropdownValue?: string;
|
|
35
|
+
/** Callback when dropdown value changes */
|
|
36
|
+
onDropdownChange?: (value: string) => void;
|
|
37
|
+
/** Placeholder text for the dropdown select */
|
|
38
|
+
selectPlaceholder?: string;
|
|
39
|
+
/** Accessible label for the dropdown select */
|
|
40
|
+
dropdownAriaLabel?: string;
|
|
41
|
+
/** Additional CSS classes */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* StatisticsCard component - displays statistics with empty state support
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* // With data
|
|
50
|
+
* <StatisticsCard
|
|
51
|
+
* title="Estatística das atividades"
|
|
52
|
+
* data={[
|
|
53
|
+
* { label: 'Acertos', value: '85%', variant: 'high' },
|
|
54
|
+
* { label: 'Em andamento', value: 12, variant: 'medium' },
|
|
55
|
+
* { label: 'Erros', value: '15%', variant: 'low' },
|
|
56
|
+
* { label: 'Concluídas', value: 24, variant: 'total' }
|
|
57
|
+
* ]}
|
|
58
|
+
* dropdownOptions={[
|
|
59
|
+
* { label: '1 ano', value: '1year' },
|
|
60
|
+
* { label: '6 meses', value: '6months' }
|
|
61
|
+
* ]}
|
|
62
|
+
* selectedDropdownValue="1year"
|
|
63
|
+
* onDropdownChange={(value) => console.log(value)}
|
|
64
|
+
* />
|
|
65
|
+
*
|
|
66
|
+
* // Empty state
|
|
67
|
+
* <StatisticsCard
|
|
68
|
+
* title="Estatística das atividades"
|
|
69
|
+
* emptyStateMessage="Sem dados por enquanto. Crie uma atividade para que os resultados apareçam aqui."
|
|
70
|
+
* emptyStateButtonText="Criar atividade"
|
|
71
|
+
* onEmptyStateButtonClick={() => console.log('Create activity')}
|
|
72
|
+
* />
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare const StatisticsCard: ({ title, data, emptyStateMessage, emptyStateButtonText, onEmptyStateButtonClick, dropdownOptions, selectedDropdownValue, onDropdownChange, selectPlaceholder, dropdownAriaLabel, className, }: StatisticsCardProps) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
export { StatisticsCard };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Statistics data item
|
|
5
|
+
*/
|
|
6
|
+
interface StatItem {
|
|
7
|
+
/** Statistic label */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Statistic value */
|
|
10
|
+
value: string | number;
|
|
11
|
+
/** Color variant */
|
|
12
|
+
variant: 'high' | 'medium' | 'low' | 'total';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for StatisticsCard component
|
|
16
|
+
*/
|
|
17
|
+
interface StatisticsCardProps {
|
|
18
|
+
/** Title displayed at the top of the card */
|
|
19
|
+
title: string;
|
|
20
|
+
/** Statistics data to display */
|
|
21
|
+
data?: StatItem[];
|
|
22
|
+
/** Message shown in empty state */
|
|
23
|
+
emptyStateMessage?: string;
|
|
24
|
+
/** Text for the empty state button */
|
|
25
|
+
emptyStateButtonText?: string;
|
|
26
|
+
/** Callback when empty state button is clicked */
|
|
27
|
+
onEmptyStateButtonClick?: () => void;
|
|
28
|
+
/** Optional dropdown options for filtering */
|
|
29
|
+
dropdownOptions?: Array<{
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** Currently selected dropdown value */
|
|
34
|
+
selectedDropdownValue?: string;
|
|
35
|
+
/** Callback when dropdown value changes */
|
|
36
|
+
onDropdownChange?: (value: string) => void;
|
|
37
|
+
/** Placeholder text for the dropdown select */
|
|
38
|
+
selectPlaceholder?: string;
|
|
39
|
+
/** Accessible label for the dropdown select */
|
|
40
|
+
dropdownAriaLabel?: string;
|
|
41
|
+
/** Additional CSS classes */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* StatisticsCard component - displays statistics with empty state support
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* // With data
|
|
50
|
+
* <StatisticsCard
|
|
51
|
+
* title="Estatística das atividades"
|
|
52
|
+
* data={[
|
|
53
|
+
* { label: 'Acertos', value: '85%', variant: 'high' },
|
|
54
|
+
* { label: 'Em andamento', value: 12, variant: 'medium' },
|
|
55
|
+
* { label: 'Erros', value: '15%', variant: 'low' },
|
|
56
|
+
* { label: 'Concluídas', value: 24, variant: 'total' }
|
|
57
|
+
* ]}
|
|
58
|
+
* dropdownOptions={[
|
|
59
|
+
* { label: '1 ano', value: '1year' },
|
|
60
|
+
* { label: '6 meses', value: '6months' }
|
|
61
|
+
* ]}
|
|
62
|
+
* selectedDropdownValue="1year"
|
|
63
|
+
* onDropdownChange={(value) => console.log(value)}
|
|
64
|
+
* />
|
|
65
|
+
*
|
|
66
|
+
* // Empty state
|
|
67
|
+
* <StatisticsCard
|
|
68
|
+
* title="Estatística das atividades"
|
|
69
|
+
* emptyStateMessage="Sem dados por enquanto. Crie uma atividade para que os resultados apareçam aqui."
|
|
70
|
+
* emptyStateButtonText="Criar atividade"
|
|
71
|
+
* onEmptyStateButtonClick={() => console.log('Create activity')}
|
|
72
|
+
* />
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare const StatisticsCard: ({ title, data, emptyStateMessage, emptyStateButtonText, onEmptyStateButtonClick, dropdownOptions, selectedDropdownValue, onDropdownChange, selectPlaceholder, dropdownAriaLabel, className, }: StatisticsCardProps) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
export { StatisticsCard };
|