analytica-frontend-lib 1.0.31 → 1.0.33

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.ts CHANGED
@@ -8,16 +8,72 @@ export { default as NavButton } from './NavButton/index.js';
8
8
  export { default as SelectionButton } from './SelectionButton/index.js';
9
9
  export { default as Table } from './Table/index.js';
10
10
  export { default as CheckBox } from './CheckBox/index.js';
11
+ import * as react from 'react';
12
+ import { ReactNode, InputHTMLAttributes, HTMLAttributes, ButtonHTMLAttributes } from 'react';
11
13
  export { default as TextArea } from './TextArea/index.js';
12
14
  export { default as Toast } from './Toast/index.js';
13
15
  export { default as Toaster } from './Toast/Toaster/index.js';
14
16
  import * as react_jsx_runtime from 'react/jsx-runtime';
15
- import * as react from 'react';
16
- import { HTMLAttributes, ReactNode, InputHTMLAttributes } from 'react';
17
17
  export { default as useToastStore } from './Toast/ToastStore/index.js';
18
18
  export { default as DropdownMenu, MenuContent as DropdownMenuContent, MenuItem as DropdownMenuItem, MenuLabel as DropdownMenuLabel, MenuSeparator as DropdownMenuSeparator, DropdownMenuTrigger } from './DropdownMenu/index.js';
19
19
  import 'zustand';
20
20
 
21
+ /**
22
+ * Radio size variants
23
+ */
24
+ type RadioSize = 'small' | 'medium' | 'large' | 'extraLarge';
25
+ /**
26
+ * Radio visual state
27
+ */
28
+ type RadioState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
29
+ /**
30
+ * Radio component for Analytica Ensino platforms
31
+ *
32
+ * A radio button component with essential states, sizes and themes.
33
+ * Uses the Analytica Ensino Design System colors from styles.css with automatic
34
+ * light/dark mode support. Includes Text component integration for consistent typography.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * // Basic radio
39
+ * <Radio name="option" value="1" label="Option 1" />
40
+ *
41
+ * // Small size
42
+ * <Radio size="small" name="option" value="2" label="Small option" />
43
+ *
44
+ * // Invalid state
45
+ * <Radio state="invalid" name="option" value="3" label="Required field" />
46
+ *
47
+ * // Disabled state
48
+ * <Radio disabled name="option" value="4" label="Disabled option" />
49
+ *
50
+ * // Default checked (uncontrolled)
51
+ * <Radio defaultChecked name="option" value="5" label="Initially checked" />
52
+ * ```
53
+ */
54
+ declare const Radio: react.ForwardRefExoticComponent<{
55
+ /** Label text to display next to the radio */
56
+ label?: ReactNode;
57
+ /** Size variant of the radio */
58
+ size?: RadioSize;
59
+ /** Visual state of the radio */
60
+ state?: RadioState;
61
+ /** Error message to display */
62
+ errorMessage?: string;
63
+ /** Helper text to display */
64
+ helperText?: string;
65
+ /** Additional CSS classes */
66
+ className?: string;
67
+ /** Label CSS classes */
68
+ labelClassName?: string;
69
+ /** Radio group name */
70
+ name?: string;
71
+ /** Radio value */
72
+ value?: string;
73
+ /** Default checked state for uncontrolled radios */
74
+ defaultChecked?: boolean;
75
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "defaultChecked" | "type"> & react.RefAttributes<HTMLInputElement>>;
76
+
21
77
  /**
22
78
  * Divider component props interface
23
79
  */
@@ -69,4 +125,41 @@ declare const Input: react.ForwardRefExoticComponent<{
69
125
  containerClassName?: string;
70
126
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & react.RefAttributes<HTMLInputElement>>;
71
127
 
72
- export { Divider, Input };
128
+ /**
129
+ * Chips component props interface
130
+ */
131
+ type ChipsProps = {
132
+ /** Content to be displayed inside the chip */
133
+ children: ReactNode;
134
+ /** Se o chip está selecionado (mostra check automaticamente) */
135
+ selected?: boolean;
136
+ /** Additional CSS classes to apply */
137
+ className?: string;
138
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>;
139
+ /**
140
+ * Chips component for Analytica Ensino platforms
141
+ *
142
+ * Um componente de chip seguindo exatamente o design do Figma.
143
+ * Suporte a dois estados principais: default (sem ícone) e selected (com ícone de check).
144
+ * Quando selecionado, automaticamente mostra o ícone de check.
145
+ *
146
+ * @param children - O conteúdo a ser exibido dentro do chip
147
+ * @param selected - Se o chip está selecionado (mostra check automaticamente)
148
+ * @param className - Classes CSS adicionais
149
+ * @param props - Todos os outros atributos padrão de button HTML
150
+ * @returns Um elemento de chip estilizado
151
+ *
152
+ * @example
153
+ * ```tsx
154
+ * <Chips onClick={() => console.log('clicked')}>
155
+ * Label
156
+ * </Chips>
157
+ *
158
+ * <Chips selected onClick={() => console.log('selected')}>
159
+ * Selected Label
160
+ * </Chips>
161
+ * ```
162
+ */
163
+ declare const Chips: ({ children, selected, className, disabled, type, ...props }: ChipsProps) => react_jsx_runtime.JSX.Element;
164
+
165
+ export { Chips, Divider, Input, Radio };