analytica-frontend-lib 1.0.38 → 1.0.39
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/README.md +1 -2
- package/dist/Alert/index.js.map +1 -1
- package/dist/Alert/index.mjs.map +1 -1
- package/dist/Badge/index.d.mts +0 -1
- package/dist/Badge/index.d.ts +0 -1
- package/dist/Badge/index.js.map +1 -1
- package/dist/Badge/index.mjs.map +1 -1
- package/dist/Button/index.d.mts +0 -1
- package/dist/Button/index.d.ts +0 -1
- package/dist/Button/index.js.map +1 -1
- package/dist/Button/index.mjs.map +1 -1
- package/dist/CheckBox/index.js +0 -1
- package/dist/CheckBox/index.js.map +1 -1
- package/dist/CheckBox/index.mjs +0 -2
- package/dist/CheckBox/index.mjs.map +1 -1
- package/dist/Chips/index.d.mts +41 -0
- package/dist/Chips/index.d.ts +41 -0
- package/dist/Chips/index.js +57 -0
- package/dist/Chips/index.js.map +1 -0
- package/dist/Chips/index.mjs +36 -0
- package/dist/Chips/index.mjs.map +1 -0
- package/dist/Divider/index.d.mts +32 -0
- package/dist/Divider/index.d.ts +32 -0
- package/dist/Divider/index.js +47 -0
- package/dist/Divider/index.js.map +1 -0
- package/dist/Divider/index.mjs +26 -0
- package/dist/Divider/index.mjs.map +1 -0
- package/dist/DropdownMenu/index.js +0 -1
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +0 -2
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/IconButton/index.d.mts +0 -1
- package/dist/IconButton/index.d.ts +0 -1
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButton/index.mjs.map +1 -1
- package/dist/IconRoundedButton/index.d.mts +0 -1
- package/dist/IconRoundedButton/index.d.ts +0 -1
- package/dist/IconRoundedButton/index.js.map +1 -1
- package/dist/IconRoundedButton/index.mjs.map +1 -1
- package/dist/Input/index.d.mts +27 -0
- package/dist/Input/index.d.ts +27 -0
- package/dist/Input/index.js +184 -0
- package/dist/Input/index.js.map +1 -0
- package/dist/Input/index.mjs +168 -0
- package/dist/Input/index.mjs.map +1 -0
- package/dist/NavButton/index.d.mts +0 -1
- package/dist/NavButton/index.d.ts +0 -1
- package/dist/NavButton/index.js.map +1 -1
- package/dist/NavButton/index.mjs.map +1 -1
- package/dist/ProgressBar/index.js +0 -1
- package/dist/ProgressBar/index.js.map +1 -1
- package/dist/ProgressBar/index.mjs +0 -2
- package/dist/ProgressBar/index.mjs.map +1 -1
- package/dist/ProgressCircle/index.js +0 -1
- package/dist/ProgressCircle/index.js.map +1 -1
- package/dist/ProgressCircle/index.mjs +0 -2
- package/dist/ProgressCircle/index.mjs.map +1 -1
- package/dist/Radio/index.js +0 -1
- package/dist/Radio/index.js.map +1 -1
- package/dist/Radio/index.mjs +0 -2
- package/dist/Radio/index.mjs.map +1 -1
- package/dist/Select/index.js +0 -1
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs +0 -2
- package/dist/Select/index.mjs.map +1 -1
- package/dist/SelectionButton/index.d.mts +0 -1
- package/dist/SelectionButton/index.d.ts +0 -1
- package/dist/SelectionButton/index.js.map +1 -1
- package/dist/SelectionButton/index.mjs.map +1 -1
- package/dist/Text/index.d.mts +0 -1
- package/dist/Text/index.d.ts +0 -1
- package/dist/Text/index.js.map +1 -1
- package/dist/Text/index.mjs.map +1 -1
- package/dist/TextArea/index.js +0 -1
- package/dist/TextArea/index.js.map +1 -1
- package/dist/TextArea/index.mjs +0 -2
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/Toast/Toaster/index.js +0 -1
- package/dist/Toast/Toaster/index.js.map +1 -1
- package/dist/Toast/Toaster/index.mjs +0 -2
- package/dist/Toast/Toaster/index.mjs.map +1 -1
- package/dist/Toast/index.js +0 -1
- package/dist/Toast/index.js.map +1 -1
- package/dist/Toast/index.mjs +0 -2
- package/dist/Toast/index.mjs.map +1 -1
- package/dist/index.d.mts +5 -93
- package/dist/index.d.ts +5 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -5
package/dist/Toast/index.js
CHANGED
package/dist/Toast/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Toast/Toast.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { HTMLAttributes } from 'react';\nimport { CheckCircle, WarningCircle, Info, X } from 'phosphor-react';\n\n/**\n * Lookup table for variant and action class combinations\n */\nconst VARIANT_ACTION_CLASSES = {\n solid: {\n warning:\n 'bg-warning text-warning-600 border-none focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border-none focus-visible:outline-none',\n info: 'bg-info text-info-600 border-none focus-visible:outline-none',\n },\n outlined: {\n warning:\n 'bg-warning text-warning-600 border border-warning-300 focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border border-success-200 focus-visible:outline-none',\n info: 'bg-info text-info-600 border border-info-600 focus-visible:outline-none',\n },\n} as const;\n\ntype ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'\n | 'default';\n\ntype ToastProps = {\n title: string;\n description?: string;\n onClose: () => void;\n /** Visual variant of the badge */\n variant?: 'solid' | 'outlined';\n /** Action type of the badge */\n action?: 'warning' | 'success' | 'info';\n position?: ToastPosition;\n} & HTMLAttributes<HTMLDivElement>;\n\nconst iconMap = {\n success: CheckCircle,\n info: Info,\n warning: WarningCircle,\n};\n\nconst Toast = ({\n variant = 'outlined',\n action = 'success',\n className = '',\n onClose,\n title,\n description,\n position = 'default',\n ...props\n}: ToastProps) => {\n // Get classes from lookup tables\n const variantClasses = VARIANT_ACTION_CLASSES[variant][action];\n\n const positionClasses: Record<ToastPosition, string> = {\n 'top-left': 'fixed top-4 left-4',\n 'top-center': 'fixed top-4 left-1/2 transform -translate-x-1/2',\n 'top-right': 'fixed top-4 right-4',\n 'bottom-left': 'fixed bottom-4 left-4',\n 'bottom-center': 'fixed bottom-4 left-1/2 transform -translate-x-1/2',\n 'bottom-right': 'fixed bottom-4 right-4',\n default: '',\n };\n\n const IconAction = iconMap[action] || iconMap['success'];\n\n const baseClasses =\n 'max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group';\n\n return (\n <div\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n className={`${baseClasses} ${positionClasses[position]} ${variantClasses} ${className}`}\n {...props}\n >\n <div className=\"flex flex-row items-start gap-3\">\n <span className=\"mt-1\" data-testid={`toast-icon-${action}`}>\n <IconAction />\n </span>\n <div className=\"flex flex-col items-start justify-start\">\n <p className=\"font-semibold text-md\">{title}</p>\n {description && (\n <p className=\"text-md text-text-900\">{description}</p>\n )}\n </div>\n </div>\n <button\n onClick={onClose}\n aria-label=\"Dismiss notification\"\n className=\"text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity\"\n >\n <X />\n </button>\n </div>\n );\n};\n\nexport default Toast;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAoD;AAsF1C;AAjFV,IAAM,yBAAyB;AAAA,EAC7B,OAAO;AAAA,IACL,SACE;AAAA,IACF,SACE;AAAA,IACF,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,SACE;AAAA,IACF,SACE;AAAA,IACF,MAAM;AAAA,EACR;AACF;AAsBA,IAAM,UAAU;AAAA,EACd,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AACX;AAEA,IAAM,QAAQ,CAAC;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,GAAG;AACL,MAAkB;AAEhB,QAAM,iBAAiB,uBAAuB,OAAO,EAAE,MAAM;AAE7D,QAAM,kBAAiD;AAAA,IACrD,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,aAAa;AAAA,IACb,eAAe;AAAA,IACf,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,SAAS;AAAA,EACX;AAEA,QAAM,aAAa,QAAQ,MAAM,KAAK,QAAQ,SAAS;AAEvD,QAAM,cACJ;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,eAAY;AAAA,MACZ,WAAW,GAAG,WAAW,IAAI,gBAAgB,QAAQ,CAAC,IAAI,cAAc,IAAI,SAAS;AAAA,MACpF,GAAG;AAAA,MAEJ;AAAA,qDAAC,SAAI,WAAU,mCACb;AAAA,sDAAC,UAAK,WAAU,QAAO,eAAa,cAAc,MAAM,IACtD,sDAAC,cAAW,GACd;AAAA,UACA,6CAAC,SAAI,WAAU,2CACb;AAAA,wDAAC,OAAE,WAAU,yBAAyB,iBAAM;AAAA,YAC3C,eACC,4CAAC,OAAE,WAAU,yBAAyB,uBAAY;AAAA,aAEtD;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS;AAAA,YACT,cAAW;AAAA,YACX,WAAU;AAAA,YAEV,sDAAC,2BAAE;AAAA;AAAA,QACL;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
|
package/dist/Toast/index.mjs
CHANGED
package/dist/Toast/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Toast/Toast.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { HTMLAttributes } from 'react';\nimport { CheckCircle, WarningCircle, Info, X } from 'phosphor-react';\n\n/**\n * Lookup table for variant and action class combinations\n */\nconst VARIANT_ACTION_CLASSES = {\n solid: {\n warning:\n 'bg-warning text-warning-600 border-none focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border-none focus-visible:outline-none',\n info: 'bg-info text-info-600 border-none focus-visible:outline-none',\n },\n outlined: {\n warning:\n 'bg-warning text-warning-600 border border-warning-300 focus-visible:outline-none',\n success:\n 'bg-success text-success-800 border border-success-200 focus-visible:outline-none',\n info: 'bg-info text-info-600 border border-info-600 focus-visible:outline-none',\n },\n} as const;\n\ntype ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'\n | 'default';\n\ntype ToastProps = {\n title: string;\n description?: string;\n onClose: () => void;\n /** Visual variant of the badge */\n variant?: 'solid' | 'outlined';\n /** Action type of the badge */\n action?: 'warning' | 'success' | 'info';\n position?: ToastPosition;\n} & HTMLAttributes<HTMLDivElement>;\n\nconst iconMap = {\n success: CheckCircle,\n info: Info,\n warning: WarningCircle,\n};\n\nconst Toast = ({\n variant = 'outlined',\n action = 'success',\n className = '',\n onClose,\n title,\n description,\n position = 'default',\n ...props\n}: ToastProps) => {\n // Get classes from lookup tables\n const variantClasses = VARIANT_ACTION_CLASSES[variant][action];\n\n const positionClasses: Record<ToastPosition, string> = {\n 'top-left': 'fixed top-4 left-4',\n 'top-center': 'fixed top-4 left-1/2 transform -translate-x-1/2',\n 'top-right': 'fixed top-4 right-4',\n 'bottom-left': 'fixed bottom-4 left-4',\n 'bottom-center': 'fixed bottom-4 left-1/2 transform -translate-x-1/2',\n 'bottom-right': 'fixed bottom-4 right-4',\n default: '',\n };\n\n const IconAction = iconMap[action] || iconMap['success'];\n\n const baseClasses =\n 'max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group';\n\n return (\n <div\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n className={`${baseClasses} ${positionClasses[position]} ${variantClasses} ${className}`}\n {...props}\n >\n <div className=\"flex flex-row items-start gap-3\">\n <span className=\"mt-1\" data-testid={`toast-icon-${action}`}>\n <IconAction />\n </span>\n <div className=\"flex flex-col items-start justify-start\">\n <p className=\"font-semibold text-md\">{title}</p>\n {description && (\n <p className=\"text-md text-text-900\">{description}</p>\n )}\n </div>\n </div>\n <button\n onClick={onClose}\n aria-label=\"Dismiss notification\"\n className=\"text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity\"\n >\n <X />\n </button>\n </div>\n );\n};\n\nexport default Toast;\n"],"mappings":";AACA,SAAS,aAAa,eAAe,MAAM,SAAS;AAsF1C,cAEF,YAFE;AAjFV,IAAM,yBAAyB;AAAA,EAC7B,OAAO;AAAA,IACL,SACE;AAAA,IACF,SACE;AAAA,IACF,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,SACE;AAAA,IACF,SACE;AAAA,IACF,MAAM;AAAA,EACR;AACF;AAsBA,IAAM,UAAU;AAAA,EACd,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AACX;AAEA,IAAM,QAAQ,CAAC;AAAA,EACb,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,GAAG;AACL,MAAkB;AAEhB,QAAM,iBAAiB,uBAAuB,OAAO,EAAE,MAAM;AAE7D,QAAM,kBAAiD;AAAA,IACrD,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,aAAa;AAAA,IACb,eAAe;AAAA,IACf,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,SAAS;AAAA,EACX;AAEA,QAAM,aAAa,QAAQ,MAAM,KAAK,QAAQ,SAAS;AAEvD,QAAM,cACJ;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,eAAY;AAAA,MACZ,WAAW,GAAG,WAAW,IAAI,gBAAgB,QAAQ,CAAC,IAAI,cAAc,IAAI,SAAS;AAAA,MACpF,GAAG;AAAA,MAEJ;AAAA,6BAAC,SAAI,WAAU,mCACb;AAAA,8BAAC,UAAK,WAAU,QAAO,eAAa,cAAc,MAAM,IACtD,8BAAC,cAAW,GACd;AAAA,UACA,qBAAC,SAAI,WAAU,2CACb;AAAA,gCAAC,OAAE,WAAU,yBAAyB,iBAAM;AAAA,YAC3C,eACC,oBAAC,OAAE,WAAU,yBAAyB,uBAAY;AAAA,aAEtD;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS;AAAA,YACT,cAAW;AAAA,YACX,WAAU;AAAA,YAEV,8BAAC,KAAE;AAAA;AAAA,QACL;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -12,102 +12,14 @@ export { default as Radio } from './Radio/index.mjs';
|
|
|
12
12
|
export { default as TextArea } from './TextArea/index.mjs';
|
|
13
13
|
export { default as Toast } from './Toast/index.mjs';
|
|
14
14
|
export { default as Toaster } from './Toast/Toaster/index.mjs';
|
|
15
|
-
|
|
16
|
-
import * as react from 'react';
|
|
17
|
-
import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
15
|
+
export { default as Divider } from './Divider/index.mjs';
|
|
18
16
|
export { default as useToastStore } from './Toast/ToastStore/index.mjs';
|
|
17
|
+
export { default as Input } from './Input/index.mjs';
|
|
18
|
+
export { default as Chips } from './Chips/index.mjs';
|
|
19
19
|
export { default as ProgressBar } from './ProgressBar/index.mjs';
|
|
20
20
|
export { default as ProgressCircle } from './ProgressCircle/index.mjs';
|
|
21
21
|
export { default as DropdownMenu, DropdownMenuTrigger, MenuContent, MenuItem, MenuLabel, MenuSeparator, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.mjs';
|
|
22
22
|
export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
|
|
23
|
+
import 'react/jsx-runtime';
|
|
24
|
+
import 'react';
|
|
23
25
|
import 'zustand';
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Divider component props interface
|
|
27
|
-
*/
|
|
28
|
-
type DividerProps = {
|
|
29
|
-
/** Orientation of the divider */
|
|
30
|
-
orientation?: 'horizontal' | 'vertical';
|
|
31
|
-
/** Additional CSS classes to apply */
|
|
32
|
-
className?: string;
|
|
33
|
-
} & HTMLAttributes<HTMLHRElement>;
|
|
34
|
-
/**
|
|
35
|
-
* Divider component for Analytica Ensino platforms
|
|
36
|
-
*
|
|
37
|
-
* A simple divider component that creates a visual separation between content sections.
|
|
38
|
-
* Can be used both horizontally and vertically.
|
|
39
|
-
*
|
|
40
|
-
* @param orientation - The orientation of the divider (horizontal or vertical)
|
|
41
|
-
* @param className - Additional CSS classes
|
|
42
|
-
* @param props - All other standard hr HTML attributes
|
|
43
|
-
* @returns A styled divider element
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```tsx
|
|
47
|
-
* <Divider orientation="horizontal" />
|
|
48
|
-
* <Divider orientation="vertical" className="h-8" />
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
declare const Divider: ({ orientation, className, ...props }: DividerProps) => react_jsx_runtime.JSX.Element;
|
|
52
|
-
|
|
53
|
-
declare const Input: react.ForwardRefExoticComponent<{
|
|
54
|
-
/** Label text displayed above the input */
|
|
55
|
-
label?: string;
|
|
56
|
-
/** Helper text displayed below the input */
|
|
57
|
-
helperText?: string;
|
|
58
|
-
/** Error message displayed below the input */
|
|
59
|
-
errorMessage?: string;
|
|
60
|
-
/** Size of the input */
|
|
61
|
-
size?: "small" | "medium" | "large" | "extra-large";
|
|
62
|
-
/** Visual variant of the input */
|
|
63
|
-
variant?: "outlined" | "underlined" | "rounded";
|
|
64
|
-
/** Current state of the input */
|
|
65
|
-
state?: "default" | "error" | "disabled" | "read-only";
|
|
66
|
-
/** Icon to display on the left side of the input */
|
|
67
|
-
iconLeft?: ReactNode;
|
|
68
|
-
/** Icon to display on the right side of the input */
|
|
69
|
-
iconRight?: ReactNode;
|
|
70
|
-
/** Additional CSS classes to apply to the input */
|
|
71
|
-
className?: string;
|
|
72
|
-
/** Additional CSS classes to apply to the container */
|
|
73
|
-
containerClassName?: string;
|
|
74
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & react.RefAttributes<HTMLInputElement>>;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Chips component props interface
|
|
78
|
-
*/
|
|
79
|
-
type ChipsProps = {
|
|
80
|
-
/** Content to be displayed inside the chip */
|
|
81
|
-
children: ReactNode;
|
|
82
|
-
/** Se o chip está selecionado (mostra check automaticamente) */
|
|
83
|
-
selected?: boolean;
|
|
84
|
-
/** Additional CSS classes to apply */
|
|
85
|
-
className?: string;
|
|
86
|
-
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>;
|
|
87
|
-
/**
|
|
88
|
-
* Chips component for Analytica Ensino platforms
|
|
89
|
-
*
|
|
90
|
-
* Um componente de chip seguindo exatamente o design do Figma.
|
|
91
|
-
* Suporte a dois estados principais: default (sem ícone) e selected (com ícone de check).
|
|
92
|
-
* Quando selecionado, automaticamente mostra o ícone de check.
|
|
93
|
-
*
|
|
94
|
-
* @param children - O conteúdo a ser exibido dentro do chip
|
|
95
|
-
* @param selected - Se o chip está selecionado (mostra check automaticamente)
|
|
96
|
-
* @param className - Classes CSS adicionais
|
|
97
|
-
* @param props - Todos os outros atributos padrão de button HTML
|
|
98
|
-
* @returns Um elemento de chip estilizado
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* ```tsx
|
|
102
|
-
* <Chips onClick={() => console.log('clicked')}>
|
|
103
|
-
* Label
|
|
104
|
-
* </Chips>
|
|
105
|
-
*
|
|
106
|
-
* <Chips selected onClick={() => console.log('selected')}>
|
|
107
|
-
* Selected Label
|
|
108
|
-
* </Chips>
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
declare const Chips: ({ children, selected, className, disabled, type, ...props }: ChipsProps) => react_jsx_runtime.JSX.Element;
|
|
112
|
-
|
|
113
|
-
export { Chips, Divider, Input };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,102 +12,14 @@ export { default as Radio } from './Radio/index.js';
|
|
|
12
12
|
export { default as TextArea } from './TextArea/index.js';
|
|
13
13
|
export { default as Toast } from './Toast/index.js';
|
|
14
14
|
export { default as Toaster } from './Toast/Toaster/index.js';
|
|
15
|
-
|
|
16
|
-
import * as react from 'react';
|
|
17
|
-
import { HTMLAttributes, ReactNode, InputHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
15
|
+
export { default as Divider } from './Divider/index.js';
|
|
18
16
|
export { default as useToastStore } from './Toast/ToastStore/index.js';
|
|
17
|
+
export { default as Input } from './Input/index.js';
|
|
18
|
+
export { default as Chips } from './Chips/index.js';
|
|
19
19
|
export { default as ProgressBar } from './ProgressBar/index.js';
|
|
20
20
|
export { default as ProgressCircle } from './ProgressCircle/index.js';
|
|
21
21
|
export { default as DropdownMenu, DropdownMenuTrigger, MenuContent, MenuItem, MenuLabel, MenuSeparator, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.js';
|
|
22
22
|
export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
|
|
23
|
+
import 'react/jsx-runtime';
|
|
24
|
+
import 'react';
|
|
23
25
|
import 'zustand';
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Divider component props interface
|
|
27
|
-
*/
|
|
28
|
-
type DividerProps = {
|
|
29
|
-
/** Orientation of the divider */
|
|
30
|
-
orientation?: 'horizontal' | 'vertical';
|
|
31
|
-
/** Additional CSS classes to apply */
|
|
32
|
-
className?: string;
|
|
33
|
-
} & HTMLAttributes<HTMLHRElement>;
|
|
34
|
-
/**
|
|
35
|
-
* Divider component for Analytica Ensino platforms
|
|
36
|
-
*
|
|
37
|
-
* A simple divider component that creates a visual separation between content sections.
|
|
38
|
-
* Can be used both horizontally and vertically.
|
|
39
|
-
*
|
|
40
|
-
* @param orientation - The orientation of the divider (horizontal or vertical)
|
|
41
|
-
* @param className - Additional CSS classes
|
|
42
|
-
* @param props - All other standard hr HTML attributes
|
|
43
|
-
* @returns A styled divider element
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```tsx
|
|
47
|
-
* <Divider orientation="horizontal" />
|
|
48
|
-
* <Divider orientation="vertical" className="h-8" />
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
declare const Divider: ({ orientation, className, ...props }: DividerProps) => react_jsx_runtime.JSX.Element;
|
|
52
|
-
|
|
53
|
-
declare const Input: react.ForwardRefExoticComponent<{
|
|
54
|
-
/** Label text displayed above the input */
|
|
55
|
-
label?: string;
|
|
56
|
-
/** Helper text displayed below the input */
|
|
57
|
-
helperText?: string;
|
|
58
|
-
/** Error message displayed below the input */
|
|
59
|
-
errorMessage?: string;
|
|
60
|
-
/** Size of the input */
|
|
61
|
-
size?: "small" | "medium" | "large" | "extra-large";
|
|
62
|
-
/** Visual variant of the input */
|
|
63
|
-
variant?: "outlined" | "underlined" | "rounded";
|
|
64
|
-
/** Current state of the input */
|
|
65
|
-
state?: "default" | "error" | "disabled" | "read-only";
|
|
66
|
-
/** Icon to display on the left side of the input */
|
|
67
|
-
iconLeft?: ReactNode;
|
|
68
|
-
/** Icon to display on the right side of the input */
|
|
69
|
-
iconRight?: ReactNode;
|
|
70
|
-
/** Additional CSS classes to apply to the input */
|
|
71
|
-
className?: string;
|
|
72
|
-
/** Additional CSS classes to apply to the container */
|
|
73
|
-
containerClassName?: string;
|
|
74
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & react.RefAttributes<HTMLInputElement>>;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Chips component props interface
|
|
78
|
-
*/
|
|
79
|
-
type ChipsProps = {
|
|
80
|
-
/** Content to be displayed inside the chip */
|
|
81
|
-
children: ReactNode;
|
|
82
|
-
/** Se o chip está selecionado (mostra check automaticamente) */
|
|
83
|
-
selected?: boolean;
|
|
84
|
-
/** Additional CSS classes to apply */
|
|
85
|
-
className?: string;
|
|
86
|
-
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>;
|
|
87
|
-
/**
|
|
88
|
-
* Chips component for Analytica Ensino platforms
|
|
89
|
-
*
|
|
90
|
-
* Um componente de chip seguindo exatamente o design do Figma.
|
|
91
|
-
* Suporte a dois estados principais: default (sem ícone) e selected (com ícone de check).
|
|
92
|
-
* Quando selecionado, automaticamente mostra o ícone de check.
|
|
93
|
-
*
|
|
94
|
-
* @param children - O conteúdo a ser exibido dentro do chip
|
|
95
|
-
* @param selected - Se o chip está selecionado (mostra check automaticamente)
|
|
96
|
-
* @param className - Classes CSS adicionais
|
|
97
|
-
* @param props - Todos os outros atributos padrão de button HTML
|
|
98
|
-
* @returns Um elemento de chip estilizado
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* ```tsx
|
|
102
|
-
* <Chips onClick={() => console.log('clicked')}>
|
|
103
|
-
* Label
|
|
104
|
-
* </Chips>
|
|
105
|
-
*
|
|
106
|
-
* <Chips selected onClick={() => console.log('selected')}>
|
|
107
|
-
* Selected Label
|
|
108
|
-
* </Chips>
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
declare const Chips: ({ children, selected, className, disabled, type, ...props }: ChipsProps) => react_jsx_runtime.JSX.Element;
|
|
112
|
-
|
|
113
|
-
export { Chips, Divider, Input };
|