analytica-frontend-lib 1.1.94 → 1.1.96

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.
@@ -69,6 +69,6 @@ declare const CheckBox: react.ForwardRefExoticComponent<{
69
69
  className?: string;
70
70
  /** Label CSS classes */
71
71
  labelClassName?: string;
72
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & react.RefAttributes<HTMLInputElement>>;
72
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & react.RefAttributes<HTMLInputElement>>;
73
73
 
74
74
  export { type CheckBoxProps, CheckBox as default };
@@ -69,6 +69,6 @@ declare const CheckBox: react.ForwardRefExoticComponent<{
69
69
  className?: string;
70
70
  /** Label CSS classes */
71
71
  labelClassName?: string;
72
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & react.RefAttributes<HTMLInputElement>>;
72
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & react.RefAttributes<HTMLInputElement>>;
73
73
 
74
74
  export { type CheckBoxProps, CheckBox as default };
@@ -81,7 +81,7 @@ declare const Radio: react.ForwardRefExoticComponent<{
81
81
  value?: string;
82
82
  /** Default checked state for uncontrolled radios */
83
83
  defaultChecked?: boolean;
84
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "defaultChecked" | "type"> & react.RefAttributes<HTMLInputElement>>;
84
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "type" | "size"> & react.RefAttributes<HTMLInputElement>>;
85
85
  /**
86
86
  * RadioGroup store interface
87
87
  */
@@ -198,6 +198,6 @@ declare const RadioGroupItem: react.ForwardRefExoticComponent<{
198
198
  state?: RadioState;
199
199
  /** Additional CSS classes */
200
200
  className?: string;
201
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
201
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "name" | "type" | "size" | "value" | "checked"> & react.RefAttributes<HTMLInputElement>>;
202
202
 
203
203
  export { RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, Radio as default, useRadioGroupStore };
@@ -81,7 +81,7 @@ declare const Radio: react.ForwardRefExoticComponent<{
81
81
  value?: string;
82
82
  /** Default checked state for uncontrolled radios */
83
83
  defaultChecked?: boolean;
84
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "defaultChecked" | "type"> & react.RefAttributes<HTMLInputElement>>;
84
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "type" | "size"> & react.RefAttributes<HTMLInputElement>>;
85
85
  /**
86
86
  * RadioGroup store interface
87
87
  */
@@ -198,6 +198,6 @@ declare const RadioGroupItem: react.ForwardRefExoticComponent<{
198
198
  state?: RadioState;
199
199
  /** Additional CSS classes */
200
200
  className?: string;
201
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
201
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "name" | "type" | "size" | "value" | "checked"> & react.RefAttributes<HTMLInputElement>>;
202
202
 
203
203
  export { RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, Radio as default, useRadioGroupStore };
@@ -22,6 +22,6 @@ declare const Search: react.ForwardRefExoticComponent<{
22
22
  containerClassName?: string;
23
23
  /** Callback when clear button is clicked */
24
24
  onClear?: () => void;
25
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onSelect"> & react.RefAttributes<HTMLInputElement>>;
25
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "onSelect" | "size"> & react.RefAttributes<HTMLInputElement>>;
26
26
 
27
27
  export { Search as default };
@@ -22,6 +22,6 @@ declare const Search: react.ForwardRefExoticComponent<{
22
22
  containerClassName?: string;
23
23
  /** Callback when clear button is clicked */
24
24
  onClear?: () => void;
25
- } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onSelect"> & react.RefAttributes<HTMLInputElement>>;
25
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "onSelect" | "size"> & react.RefAttributes<HTMLInputElement>>;
26
26
 
27
27
  export { Search as default };
@@ -0,0 +1,79 @@
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
+ /** Show placeholder "-" in values when true (for created items without data yet) */
23
+ showPlaceholder?: boolean;
24
+ /** Message shown in empty state */
25
+ emptyStateMessage?: string;
26
+ /** Text for the empty state button */
27
+ emptyStateButtonText?: string;
28
+ /** Callback when empty state button is clicked */
29
+ onEmptyStateButtonClick?: () => void;
30
+ /** Optional dropdown options for filtering */
31
+ dropdownOptions?: Array<{
32
+ label: string;
33
+ value: string;
34
+ }>;
35
+ /** Currently selected dropdown value */
36
+ selectedDropdownValue?: string;
37
+ /** Callback when dropdown value changes */
38
+ onDropdownChange?: (value: string) => void;
39
+ /** Placeholder text for the dropdown select */
40
+ selectPlaceholder?: string;
41
+ /** Accessible label for the dropdown select */
42
+ dropdownAriaLabel?: string;
43
+ /** Additional CSS classes */
44
+ className?: string;
45
+ }
46
+ /**
47
+ * StatisticsCard component - displays statistics with empty state support
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * // With data
52
+ * <StatisticsCard
53
+ * title="Estatística das atividades"
54
+ * data={[
55
+ * { label: 'Acertos', value: '85%', variant: 'high' },
56
+ * { label: 'Em andamento', value: 12, variant: 'medium' },
57
+ * { label: 'Erros', value: '15%', variant: 'low' },
58
+ * { label: 'Concluídas', value: 24, variant: 'total' }
59
+ * ]}
60
+ * dropdownOptions={[
61
+ * { label: '1 ano', value: '1year' },
62
+ * { label: '6 meses', value: '6months' }
63
+ * ]}
64
+ * selectedDropdownValue="1year"
65
+ * onDropdownChange={(value) => console.log(value)}
66
+ * />
67
+ *
68
+ * // Empty state
69
+ * <StatisticsCard
70
+ * title="Estatística das atividades"
71
+ * emptyStateMessage="Sem dados por enquanto. Crie uma atividade para que os resultados apareçam aqui."
72
+ * emptyStateButtonText="Criar atividade"
73
+ * onEmptyStateButtonClick={() => console.log('Create activity')}
74
+ * />
75
+ * ```
76
+ */
77
+ declare const StatisticsCard: ({ title, data, showPlaceholder, emptyStateMessage, emptyStateButtonText, onEmptyStateButtonClick, dropdownOptions, selectedDropdownValue, onDropdownChange, selectPlaceholder, dropdownAriaLabel, className, }: StatisticsCardProps) => react_jsx_runtime.JSX.Element;
78
+
79
+ export { StatisticsCard };
@@ -0,0 +1,79 @@
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
+ /** Show placeholder "-" in values when true (for created items without data yet) */
23
+ showPlaceholder?: boolean;
24
+ /** Message shown in empty state */
25
+ emptyStateMessage?: string;
26
+ /** Text for the empty state button */
27
+ emptyStateButtonText?: string;
28
+ /** Callback when empty state button is clicked */
29
+ onEmptyStateButtonClick?: () => void;
30
+ /** Optional dropdown options for filtering */
31
+ dropdownOptions?: Array<{
32
+ label: string;
33
+ value: string;
34
+ }>;
35
+ /** Currently selected dropdown value */
36
+ selectedDropdownValue?: string;
37
+ /** Callback when dropdown value changes */
38
+ onDropdownChange?: (value: string) => void;
39
+ /** Placeholder text for the dropdown select */
40
+ selectPlaceholder?: string;
41
+ /** Accessible label for the dropdown select */
42
+ dropdownAriaLabel?: string;
43
+ /** Additional CSS classes */
44
+ className?: string;
45
+ }
46
+ /**
47
+ * StatisticsCard component - displays statistics with empty state support
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * // With data
52
+ * <StatisticsCard
53
+ * title="Estatística das atividades"
54
+ * data={[
55
+ * { label: 'Acertos', value: '85%', variant: 'high' },
56
+ * { label: 'Em andamento', value: 12, variant: 'medium' },
57
+ * { label: 'Erros', value: '15%', variant: 'low' },
58
+ * { label: 'Concluídas', value: 24, variant: 'total' }
59
+ * ]}
60
+ * dropdownOptions={[
61
+ * { label: '1 ano', value: '1year' },
62
+ * { label: '6 meses', value: '6months' }
63
+ * ]}
64
+ * selectedDropdownValue="1year"
65
+ * onDropdownChange={(value) => console.log(value)}
66
+ * />
67
+ *
68
+ * // Empty state
69
+ * <StatisticsCard
70
+ * title="Estatística das atividades"
71
+ * emptyStateMessage="Sem dados por enquanto. Crie uma atividade para que os resultados apareçam aqui."
72
+ * emptyStateButtonText="Criar atividade"
73
+ * onEmptyStateButtonClick={() => console.log('Create activity')}
74
+ * />
75
+ * ```
76
+ */
77
+ declare const StatisticsCard: ({ title, data, showPlaceholder, emptyStateMessage, emptyStateButtonText, onEmptyStateButtonClick, dropdownOptions, selectedDropdownValue, onDropdownChange, selectPlaceholder, dropdownAriaLabel, className, }: StatisticsCardProps) => react_jsx_runtime.JSX.Element;
78
+
79
+ export { StatisticsCard };