analytica-frontend-lib 1.0.16 → 1.0.18

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
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef, HTMLAttributes, TdHTMLAttributes } from 'react';
3
+ import { ReactNode, ButtonHTMLAttributes, ElementType, ComponentPropsWithoutRef, HTMLAttributes, InputHTMLAttributes, TdHTMLAttributes } from 'react';
4
+ import * as zustand from 'zustand';
4
5
 
5
6
  /**
6
7
  * Button component props interface
@@ -184,6 +185,111 @@ type TextProps<T extends ElementType = 'p'> = BaseTextProps & {
184
185
  */
185
186
  declare const Text: <T extends ElementType = "p">({ children, size, weight, color, as, className, ...props }: TextProps<T>) => react_jsx_runtime.JSX.Element;
186
187
 
188
+ type ToastPosition$1 = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
189
+ type ToastProps = {
190
+ title: string;
191
+ description?: string;
192
+ onClose: () => void;
193
+ /** Visual variant of the badge */
194
+ variant?: 'solid' | 'outlined';
195
+ /** Action type of the badge */
196
+ action?: 'warning' | 'success' | 'info';
197
+ position?: ToastPosition$1;
198
+ } & HTMLAttributes<HTMLDivElement>;
199
+ declare const Toast: ({ variant, action, className, onClose, title, description, position, ...props }: ToastProps) => react_jsx_runtime.JSX.Element;
200
+
201
+ type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
202
+ type ToastData = {
203
+ id: string;
204
+ title: string;
205
+ description?: string;
206
+ variant?: 'solid' | 'outlined';
207
+ action?: 'warning' | 'success' | 'info';
208
+ position?: ToastPosition;
209
+ };
210
+ type ToastStore = {
211
+ toasts: ToastData[];
212
+ addToast: (toast: Omit<ToastData, 'id'>) => void;
213
+ removeToast: (id: string) => void;
214
+ };
215
+ declare const useToastStore: zustand.UseBoundStore<zustand.StoreApi<ToastStore>>;
216
+
217
+ declare const Toaster: () => react_jsx_runtime.JSX.Element;
218
+ declare const useToast: () => {
219
+ addToast: (toast: Omit<ToastData, "id">) => void;
220
+ removeToast: (id: string) => void;
221
+ };
222
+
223
+ /**
224
+ * CheckBox size variants
225
+ */
226
+ type CheckBoxSize = 'small' | 'medium' | 'large';
227
+ /**
228
+ * CheckBox visual state
229
+ */
230
+ type CheckBoxState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
231
+ /**
232
+ * CheckBox component props interface
233
+ */
234
+ type CheckBoxProps = {
235
+ /** Label text to display next to the checkbox */
236
+ label?: ReactNode;
237
+ /** Size variant of the checkbox */
238
+ size?: CheckBoxSize;
239
+ /** Visual state of the checkbox */
240
+ state?: CheckBoxState;
241
+ /** Indeterminate state for partial selections */
242
+ indeterminate?: boolean;
243
+ /** Error message to display */
244
+ errorMessage?: string;
245
+ /** Helper text to display */
246
+ helperText?: string;
247
+ /** Additional CSS classes */
248
+ className?: string;
249
+ /** Label CSS classes */
250
+ labelClassName?: string;
251
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>;
252
+ /**
253
+ * CheckBox component for Analytica Ensino platforms
254
+ *
255
+ * A checkbox component with essential states, sizes and themes.
256
+ * Uses the Analytica Ensino Design System colors from styles.css with automatic
257
+ * light/dark mode support. Includes Text component integration for consistent typography.
258
+ *
259
+ * @example
260
+ * ```tsx
261
+ * // Basic checkbox
262
+ * <CheckBox label="Option" />
263
+ *
264
+ * // Small size
265
+ * <CheckBox size="small" label="Small option" />
266
+ *
267
+ * // Invalid state
268
+ * <CheckBox state="invalid" label="Required field" />
269
+ *
270
+ * // Disabled state
271
+ * <CheckBox disabled label="Disabled option" />
272
+ * ```
273
+ */
274
+ declare const CheckBox: react.ForwardRefExoticComponent<{
275
+ /** Label text to display next to the checkbox */
276
+ label?: ReactNode;
277
+ /** Size variant of the checkbox */
278
+ size?: CheckBoxSize;
279
+ /** Visual state of the checkbox */
280
+ state?: CheckBoxState;
281
+ /** Indeterminate state for partial selections */
282
+ indeterminate?: boolean;
283
+ /** Error message to display */
284
+ errorMessage?: string;
285
+ /** Helper text to display */
286
+ helperText?: string;
287
+ /** Additional CSS classes */
288
+ className?: string;
289
+ /** Label CSS classes */
290
+ labelClassName?: string;
291
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & react.RefAttributes<HTMLInputElement>>;
292
+
187
293
  type TableRowState = 'default' | 'selected' | 'invalid' | 'disabled';
188
294
  interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
189
295
  state?: TableRowState;
@@ -348,4 +454,4 @@ declare const IconButton: react.ForwardRefExoticComponent<{
348
454
  className?: string;
349
455
  } & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
350
456
 
351
- export { Button, DropdownMenu, DropdownMenuTrigger, IconButton, type IconButtonProps, IconRoundedButton, MenuContent, MenuItem, MenuLabel, MenuSeparator, NavButton, SelectionButton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text };
457
+ export { Button, CheckBox, type CheckBoxProps, DropdownMenu, DropdownMenuTrigger, IconButton, type IconButtonProps, IconRoundedButton, MenuContent, MenuItem, MenuLabel, MenuSeparator, NavButton, SelectionButton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text, Toast, type ToastData, Toaster, useToast, useToastStore };