analytica-frontend-lib 1.0.24 → 1.0.26
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/{chunk-JNPCNN67.mjs → Alert/Alert.mjs} +1 -2
- package/dist/{components/Badge → Badge}/Badge.js +2 -2
- package/dist/{chunk-GSEO6POW.mjs → Badge/Badge.mjs} +2 -3
- package/dist/{chunk-IB4IJ3GF.mjs → Button/Button.mjs} +0 -1
- package/dist/{chunk-LYOJCBOM.mjs → CheckBox/CheckBox.mjs} +2 -2
- package/dist/{chunk-KT6HNGRV.mjs → DropdownMenu/DropdownMenu.mjs} +3 -2
- package/dist/{chunk-RPYPJ5O5.mjs → IconButton/IconButton.mjs} +0 -1
- package/dist/{chunk-QOFMTSHE.mjs → IconRoundedButton/IconRoundedButton.mjs} +0 -1
- package/dist/{chunk-CETSS3RA.mjs → NavButton/NavButton.mjs} +0 -1
- package/dist/{chunk-SESX5OEP.mjs → SelectionButton/SelectionButton.mjs} +0 -1
- package/dist/{chunk-NWGRQN6R.mjs → Table/Table.mjs} +4 -5
- package/dist/{components/Text → Text}/Text.mjs +1 -1
- package/dist/{chunk-QODEDLAX.mjs → TextArea/TextArea.mjs} +2 -2
- package/dist/{components/Toast → Toast}/Toast.js +2 -2
- package/dist/{components/Toast → Toast}/Toast.mjs +1 -1
- package/dist/{components/Toast → Toast}/utils/ToastStore.d.mts +1 -1
- package/dist/{components/Toast → Toast}/utils/ToastStore.d.ts +1 -1
- package/dist/{components/Toast → Toast}/utils/ToastStore.mjs +1 -1
- package/dist/Toast/utils/Toaster.d.mts +16 -0
- package/dist/Toast/utils/Toaster.d.ts +16 -0
- package/dist/{components/Toast → Toast}/utils/Toaster.js +2 -2
- package/dist/{chunk-IH5TEC64.mjs → Toast/utils/Toaster.mjs} +3 -3
- package/dist/{chunk-MI5FIRHM.mjs → chunk-XYTNJU4A.mjs} +2 -2
- package/dist/index.css +14 -10
- package/dist/index.d.mts +154 -26
- package/dist/index.d.ts +154 -26
- package/dist/index.js +695 -134
- package/dist/index.mjs +673 -91
- package/package.json +19 -8
- package/dist/client-components.d.mts +0 -9
- package/dist/client-components.d.ts +0 -9
- package/dist/client-components.js +0 -755
- package/dist/client-components.mjs +0 -39
- package/dist/components/Alert/Alert.mjs +0 -7
- package/dist/components/Badge/Badge.mjs +0 -6
- package/dist/components/Button/Button.mjs +0 -6
- package/dist/components/CheckBox/CheckBox.mjs +0 -8
- package/dist/components/DropdownMenu/DropdownMenu.mjs +0 -17
- package/dist/components/IconButton/IconButton.mjs +0 -6
- package/dist/components/IconRoundedButton/IconRoundedButton.mjs +0 -6
- package/dist/components/NavButton/NavButton.mjs +0 -6
- package/dist/components/SelectionButton/SelectionButton.mjs +0 -6
- package/dist/components/Table/Table.mjs +0 -20
- package/dist/components/TextArea/TextArea.mjs +0 -8
- package/dist/components/Toast/utils/Toaster.d.mts +0 -11
- package/dist/components/Toast/utils/Toaster.d.ts +0 -11
- package/dist/components/Toast/utils/Toaster.mjs +0 -11
- package/dist/server-components.d.mts +0 -11
- package/dist/server-components.d.ts +0 -11
- package/dist/server-components.js +0 -629
- package/dist/server-components.mjs +0 -52
- /package/dist/{components/Alert → Alert}/Alert.d.mts +0 -0
- /package/dist/{components/Alert → Alert}/Alert.d.ts +0 -0
- /package/dist/{components/Alert → Alert}/Alert.js +0 -0
- /package/dist/{components/Badge → Badge}/Badge.d.mts +0 -0
- /package/dist/{components/Badge → Badge}/Badge.d.ts +0 -0
- /package/dist/{components/Button → Button}/Button.d.mts +0 -0
- /package/dist/{components/Button → Button}/Button.d.ts +0 -0
- /package/dist/{components/Button → Button}/Button.js +0 -0
- /package/dist/{components/CheckBox → CheckBox}/CheckBox.d.mts +0 -0
- /package/dist/{components/CheckBox → CheckBox}/CheckBox.d.ts +0 -0
- /package/dist/{components/CheckBox → CheckBox}/CheckBox.js +0 -0
- /package/dist/{components/DropdownMenu → DropdownMenu}/DropdownMenu.d.mts +0 -0
- /package/dist/{components/DropdownMenu → DropdownMenu}/DropdownMenu.d.ts +0 -0
- /package/dist/{components/DropdownMenu → DropdownMenu}/DropdownMenu.js +0 -0
- /package/dist/{components/IconButton → IconButton}/IconButton.d.mts +0 -0
- /package/dist/{components/IconButton → IconButton}/IconButton.d.ts +0 -0
- /package/dist/{components/IconButton → IconButton}/IconButton.js +0 -0
- /package/dist/{components/IconRoundedButton → IconRoundedButton}/IconRoundedButton.d.mts +0 -0
- /package/dist/{components/IconRoundedButton → IconRoundedButton}/IconRoundedButton.d.ts +0 -0
- /package/dist/{components/IconRoundedButton → IconRoundedButton}/IconRoundedButton.js +0 -0
- /package/dist/{components/NavButton → NavButton}/NavButton.d.mts +0 -0
- /package/dist/{components/NavButton → NavButton}/NavButton.d.ts +0 -0
- /package/dist/{components/NavButton → NavButton}/NavButton.js +0 -0
- /package/dist/{components/SelectionButton → SelectionButton}/SelectionButton.d.mts +0 -0
- /package/dist/{components/SelectionButton → SelectionButton}/SelectionButton.d.ts +0 -0
- /package/dist/{components/SelectionButton → SelectionButton}/SelectionButton.js +0 -0
- /package/dist/{components/Table → Table}/Table.d.mts +0 -0
- /package/dist/{components/Table → Table}/Table.d.ts +0 -0
- /package/dist/{components/Table → Table}/Table.js +0 -0
- /package/dist/{components/Text → Text}/Text.d.mts +0 -0
- /package/dist/{components/Text → Text}/Text.d.ts +0 -0
- /package/dist/{components/Text → Text}/Text.js +0 -0
- /package/dist/{components/TextArea → TextArea}/TextArea.d.mts +0 -0
- /package/dist/{components/TextArea → TextArea}/TextArea.d.ts +0 -0
- /package/dist/{components/TextArea → TextArea}/TextArea.js +0 -0
- /package/dist/{components/Toast → Toast}/Toast.d.mts +0 -0
- /package/dist/{components/Toast → Toast}/Toast.d.ts +0 -0
- /package/dist/{components/Toast → Toast}/utils/ToastStore.js +0 -0
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 { ElementType, ReactNode, ComponentPropsWithoutRef, ButtonHTMLAttributes, HTMLAttributes,
|
|
3
|
+
import react__default, { ElementType, ReactNode, ComponentPropsWithoutRef, ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes } from 'react';
|
|
4
|
+
import * as zustand from 'zustand';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Base text component props
|
|
@@ -151,19 +152,6 @@ type AlertProps = {
|
|
|
151
152
|
} & HTMLAttributes<HTMLDivElement>;
|
|
152
153
|
declare const Alert: ({ variant, title, description, action, className, ...props }: AlertProps) => react_jsx_runtime.JSX.Element;
|
|
153
154
|
|
|
154
|
-
/**
|
|
155
|
-
* IconButton component props interface
|
|
156
|
-
*/
|
|
157
|
-
type IconButtonProps = {
|
|
158
|
-
/** Ícone a ser exibido no botão */
|
|
159
|
-
icon: ReactNode;
|
|
160
|
-
/** Tamanho do botão */
|
|
161
|
-
size?: 'sm' | 'md';
|
|
162
|
-
/** Estado de seleção/ativo do botão - permanece ativo até ser clicado novamente ou outro botão ser ativado */
|
|
163
|
-
active?: boolean;
|
|
164
|
-
/** Additional CSS classes to apply */
|
|
165
|
-
className?: string;
|
|
166
|
-
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
167
155
|
/**
|
|
168
156
|
* IconButton component for Analytica Ensino platforms
|
|
169
157
|
*
|
|
@@ -363,17 +351,157 @@ declare const SelectionButton: react.ForwardRefExoticComponent<{
|
|
|
363
351
|
className?: string;
|
|
364
352
|
} & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
|
|
365
353
|
|
|
366
|
-
type TableRowState = 'default' | 'selected' | 'invalid' | 'disabled';
|
|
367
|
-
interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
368
|
-
state?: TableRowState;
|
|
369
|
-
}
|
|
370
354
|
declare const Table: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
371
|
-
declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
372
|
-
declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
373
|
-
declare const TableFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
374
|
-
declare const TableRow: react.ForwardRefExoticComponent<TableRowProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
375
|
-
declare const TableHead: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
|
|
376
|
-
declare const TableCell: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
|
|
377
|
-
declare const TableCaption: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & react.RefAttributes<HTMLTableCaptionElement>>;
|
|
378
355
|
|
|
379
|
-
|
|
356
|
+
/**
|
|
357
|
+
* CheckBox size variants
|
|
358
|
+
*/
|
|
359
|
+
type CheckBoxSize = 'small' | 'medium' | 'large';
|
|
360
|
+
/**
|
|
361
|
+
* CheckBox visual state
|
|
362
|
+
*/
|
|
363
|
+
type CheckBoxState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
|
|
364
|
+
/**
|
|
365
|
+
* CheckBox component for Analytica Ensino platforms
|
|
366
|
+
*
|
|
367
|
+
* A checkbox component with essential states, sizes and themes.
|
|
368
|
+
* Uses the Analytica Ensino Design System colors from styles.css with automatic
|
|
369
|
+
* light/dark mode support. Includes Text component integration for consistent typography.
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```tsx
|
|
373
|
+
* // Basic checkbox
|
|
374
|
+
* <CheckBox label="Option" />
|
|
375
|
+
*
|
|
376
|
+
* // Small size
|
|
377
|
+
* <CheckBox size="small" label="Small option" />
|
|
378
|
+
*
|
|
379
|
+
* // Invalid state
|
|
380
|
+
* <CheckBox state="invalid" label="Required field" />
|
|
381
|
+
*
|
|
382
|
+
* // Disabled state
|
|
383
|
+
* <CheckBox disabled label="Disabled option" />
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
declare const CheckBox: react.ForwardRefExoticComponent<{
|
|
387
|
+
/** Label text to display next to the checkbox */
|
|
388
|
+
label?: ReactNode;
|
|
389
|
+
/** Size variant of the checkbox */
|
|
390
|
+
size?: CheckBoxSize;
|
|
391
|
+
/** Visual state of the checkbox */
|
|
392
|
+
state?: CheckBoxState;
|
|
393
|
+
/** Indeterminate state for partial selections */
|
|
394
|
+
indeterminate?: boolean;
|
|
395
|
+
/** Error message to display */
|
|
396
|
+
errorMessage?: string;
|
|
397
|
+
/** Helper text to display */
|
|
398
|
+
helperText?: string;
|
|
399
|
+
/** Additional CSS classes */
|
|
400
|
+
className?: string;
|
|
401
|
+
/** Label CSS classes */
|
|
402
|
+
labelClassName?: string;
|
|
403
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & react.RefAttributes<HTMLInputElement>>;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* TextArea size variants
|
|
407
|
+
*/
|
|
408
|
+
type TextAreaSize = 'small' | 'medium' | 'large' | 'extraLarge';
|
|
409
|
+
/**
|
|
410
|
+
* TextArea visual state
|
|
411
|
+
*/
|
|
412
|
+
type TextAreaState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled';
|
|
413
|
+
/**
|
|
414
|
+
* TextArea component for Analytica Ensino platforms
|
|
415
|
+
*
|
|
416
|
+
* A textarea component with essential states, sizes and themes.
|
|
417
|
+
* Uses exact design specifications with 288px width, 96px height, and specific
|
|
418
|
+
* color values. Includes Text component integration for consistent typography.
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* ```tsx
|
|
422
|
+
* // Basic textarea
|
|
423
|
+
* <TextArea label="Description" placeholder="Enter description..." />
|
|
424
|
+
*
|
|
425
|
+
* // Small size
|
|
426
|
+
* <TextArea size="small" label="Comment" />
|
|
427
|
+
*
|
|
428
|
+
* // Invalid state
|
|
429
|
+
* <TextArea state="invalid" label="Required field" errorMessage="This field is required" />
|
|
430
|
+
*
|
|
431
|
+
* // Disabled state
|
|
432
|
+
* <TextArea disabled label="Read-only field" />
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
435
|
+
declare const TextArea: react__default.ForwardRefExoticComponent<{
|
|
436
|
+
/** Label text to display above the textarea */
|
|
437
|
+
label?: ReactNode;
|
|
438
|
+
/** Size variant of the textarea */
|
|
439
|
+
size?: TextAreaSize;
|
|
440
|
+
/** Visual state of the textarea */
|
|
441
|
+
state?: TextAreaState;
|
|
442
|
+
/** Error message to display */
|
|
443
|
+
errorMessage?: string;
|
|
444
|
+
/** Helper text to display */
|
|
445
|
+
helperMessage?: string;
|
|
446
|
+
/** Additional CSS classes */
|
|
447
|
+
className?: string;
|
|
448
|
+
/** Label CSS classes */
|
|
449
|
+
labelClassName?: string;
|
|
450
|
+
} & Omit<react__default.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> & react__default.RefAttributes<HTMLTextAreaElement>>;
|
|
451
|
+
|
|
452
|
+
interface DropdownMenuProps {
|
|
453
|
+
children: ReactNode;
|
|
454
|
+
open?: boolean;
|
|
455
|
+
onOpenChange?: (open: boolean) => void;
|
|
456
|
+
}
|
|
457
|
+
declare const DropdownMenu: ({ children, open, onOpenChange }: DropdownMenuProps) => react_jsx_runtime.JSX.Element;
|
|
458
|
+
declare const DropdownMenuTrigger: react.ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>>;
|
|
459
|
+
declare const MenuLabel: react.ForwardRefExoticComponent<HTMLAttributes<HTMLFieldSetElement> & {
|
|
460
|
+
inset?: boolean;
|
|
461
|
+
} & react.RefAttributes<HTMLFieldSetElement>>;
|
|
462
|
+
declare const MenuContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
463
|
+
align?: "start" | "center" | "end";
|
|
464
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
465
|
+
sideOffset?: number;
|
|
466
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
467
|
+
declare const MenuItem: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
468
|
+
inset?: boolean;
|
|
469
|
+
size?: "small" | "medium";
|
|
470
|
+
iconLeft?: ReactNode;
|
|
471
|
+
iconRight?: ReactNode;
|
|
472
|
+
disabled?: boolean;
|
|
473
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
474
|
+
declare const MenuSeparator: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
475
|
+
|
|
476
|
+
type ToastPosition$1 = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
|
|
477
|
+
type ToastProps = {
|
|
478
|
+
title: string;
|
|
479
|
+
description?: string;
|
|
480
|
+
onClose: () => void;
|
|
481
|
+
/** Visual variant of the badge */
|
|
482
|
+
variant?: 'solid' | 'outlined';
|
|
483
|
+
/** Action type of the badge */
|
|
484
|
+
action?: 'warning' | 'success' | 'info';
|
|
485
|
+
position?: ToastPosition$1;
|
|
486
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
487
|
+
declare const Toast: ({ variant, action, className, onClose, title, description, position, ...props }: ToastProps) => react_jsx_runtime.JSX.Element;
|
|
488
|
+
|
|
489
|
+
declare const Toaster: () => react_jsx_runtime.JSX.Element;
|
|
490
|
+
|
|
491
|
+
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'default';
|
|
492
|
+
type ToastData = {
|
|
493
|
+
id: string;
|
|
494
|
+
title: string;
|
|
495
|
+
description?: string;
|
|
496
|
+
variant?: 'solid' | 'outlined';
|
|
497
|
+
action?: 'warning' | 'success' | 'info';
|
|
498
|
+
position?: ToastPosition;
|
|
499
|
+
};
|
|
500
|
+
type ToastStore = {
|
|
501
|
+
toasts: ToastData[];
|
|
502
|
+
addToast: (toast: Omit<ToastData, 'id'>) => void;
|
|
503
|
+
removeToast: (id: string) => void;
|
|
504
|
+
};
|
|
505
|
+
declare const useToastStore: zustand.UseBoundStore<zustand.StoreApi<ToastStore>>;
|
|
506
|
+
|
|
507
|
+
export { Alert, Badge, Button, CheckBox, DropdownMenu, MenuContent as DropdownMenuContent, MenuItem as DropdownMenuItem, MenuLabel as DropdownMenuLabel, MenuSeparator as DropdownMenuSeparator, DropdownMenuTrigger, IconButton, IconRoundedButton, NavButton, SelectionButton, Table, Text, TextArea, Toast, Toaster, useToastStore };
|