analytica-frontend-lib 1.0.47 → 1.0.48
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/Modal/index.d.mts +66 -0
- package/dist/Modal/index.d.ts +66 -0
- package/dist/Modal/index.js +113 -0
- package/dist/Modal/index.js.map +1 -0
- package/dist/Modal/index.mjs +92 -0
- package/dist/Modal/index.mjs.map +1 -0
- package/dist/TextArea/index.js +1 -9
- package/dist/TextArea/index.js.map +1 -1
- package/dist/TextArea/index.mjs +1 -9
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/index.css +0 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -66
- package/dist/index.d.ts +3 -66
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -9
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -3
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -20,74 +20,11 @@ export { default as ProgressBar } from './ProgressBar/index.mjs';
|
|
|
20
20
|
export { default as ProgressCircle } from './ProgressCircle/index.mjs';
|
|
21
21
|
export { default as Stepper } from './Stepper/index.mjs';
|
|
22
22
|
export { default as Calendar } from './Calendar/index.mjs';
|
|
23
|
-
|
|
24
|
-
import { ReactNode } from 'react';
|
|
23
|
+
export { default as Modal } from './Modal/index.mjs';
|
|
25
24
|
export { default as DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuContent, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.mjs';
|
|
26
25
|
export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
|
|
27
26
|
export { default as Menu, MenuItem, MenuSeparator } from './Menu/index.mjs';
|
|
28
27
|
export { CardActivesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardStatus, CardTopic } from './Card/index.mjs';
|
|
28
|
+
import 'react/jsx-runtime';
|
|
29
|
+
import 'react';
|
|
29
30
|
import 'zustand';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Modal component props interface
|
|
33
|
-
*/
|
|
34
|
-
type ModalProps = {
|
|
35
|
-
/** Whether the modal is open */
|
|
36
|
-
isOpen: boolean;
|
|
37
|
-
/** Function to close the modal */
|
|
38
|
-
onClose: () => void;
|
|
39
|
-
/** Modal title */
|
|
40
|
-
title: string;
|
|
41
|
-
/** Modal description/content */
|
|
42
|
-
children: ReactNode;
|
|
43
|
-
/** Size of the modal */
|
|
44
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
45
|
-
/** Additional CSS classes for the modal content */
|
|
46
|
-
className?: string;
|
|
47
|
-
/** Whether clicking the backdrop should close the modal */
|
|
48
|
-
closeOnBackdropClick?: boolean;
|
|
49
|
-
/** Whether pressing Escape should close the modal */
|
|
50
|
-
closeOnEscape?: boolean;
|
|
51
|
-
/** Footer content (typically buttons) */
|
|
52
|
-
footer?: ReactNode;
|
|
53
|
-
/** Hide the close button */
|
|
54
|
-
hideCloseButton?: boolean;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Modal component for Analytica Ensino platforms
|
|
58
|
-
*
|
|
59
|
-
* A flexible modal component with multiple size variants and customizable behavior.
|
|
60
|
-
*
|
|
61
|
-
* @param isOpen - Whether the modal is currently open
|
|
62
|
-
* @param onClose - Callback function called when the modal should be closed
|
|
63
|
-
* @param title - The title displayed at the top of the modal
|
|
64
|
-
* @param children - The main content of the modal
|
|
65
|
-
* @param size - The size variant (xs, sm, md, lg, xl)
|
|
66
|
-
* @param className - Additional CSS classes for the modal content
|
|
67
|
-
* @param closeOnBackdropClick - Whether clicking the backdrop closes the modal (default: true)
|
|
68
|
-
* @param closeOnEscape - Whether pressing Escape closes the modal (default: true)
|
|
69
|
-
* @param footer - Footer content, typically action buttons
|
|
70
|
-
* @param hideCloseButton - Whether to hide the X close button (default: false)
|
|
71
|
-
* @returns A modal overlay with content
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* ```tsx
|
|
75
|
-
* <Modal
|
|
76
|
-
* isOpen={isModalOpen}
|
|
77
|
-
* onClose={() => setIsModalOpen(false)}
|
|
78
|
-
* title="Invite your team"
|
|
79
|
-
* size="md"
|
|
80
|
-
* footer={
|
|
81
|
-
* <div className="flex gap-3">
|
|
82
|
-
* <Button variant="outline" onClick={() => setIsModalOpen(false)}>Cancel</Button>
|
|
83
|
-
* <Button variant="solid" onClick={handleExplore}>Explore</Button>
|
|
84
|
-
* </div>
|
|
85
|
-
* }
|
|
86
|
-
* >
|
|
87
|
-
* Elevate user interactions with our versatile modals.
|
|
88
|
-
* </Modal>
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
|
-
declare const Modal: ({ isOpen, onClose, title, children, size, className, closeOnBackdropClick, closeOnEscape, footer, hideCloseButton, }: ModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
92
|
-
|
|
93
|
-
export { Modal };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,74 +20,11 @@ export { default as ProgressBar } from './ProgressBar/index.js';
|
|
|
20
20
|
export { default as ProgressCircle } from './ProgressCircle/index.js';
|
|
21
21
|
export { default as Stepper } from './Stepper/index.js';
|
|
22
22
|
export { default as Calendar } from './Calendar/index.js';
|
|
23
|
-
|
|
24
|
-
import { ReactNode } from 'react';
|
|
23
|
+
export { default as Modal } from './Modal/index.js';
|
|
25
24
|
export { default as DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuContent, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.js';
|
|
26
25
|
export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
|
|
27
26
|
export { default as Menu, MenuItem, MenuSeparator } from './Menu/index.js';
|
|
28
27
|
export { CardActivesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardStatus, CardTopic } from './Card/index.js';
|
|
28
|
+
import 'react/jsx-runtime';
|
|
29
|
+
import 'react';
|
|
29
30
|
import 'zustand';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Modal component props interface
|
|
33
|
-
*/
|
|
34
|
-
type ModalProps = {
|
|
35
|
-
/** Whether the modal is open */
|
|
36
|
-
isOpen: boolean;
|
|
37
|
-
/** Function to close the modal */
|
|
38
|
-
onClose: () => void;
|
|
39
|
-
/** Modal title */
|
|
40
|
-
title: string;
|
|
41
|
-
/** Modal description/content */
|
|
42
|
-
children: ReactNode;
|
|
43
|
-
/** Size of the modal */
|
|
44
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
45
|
-
/** Additional CSS classes for the modal content */
|
|
46
|
-
className?: string;
|
|
47
|
-
/** Whether clicking the backdrop should close the modal */
|
|
48
|
-
closeOnBackdropClick?: boolean;
|
|
49
|
-
/** Whether pressing Escape should close the modal */
|
|
50
|
-
closeOnEscape?: boolean;
|
|
51
|
-
/** Footer content (typically buttons) */
|
|
52
|
-
footer?: ReactNode;
|
|
53
|
-
/** Hide the close button */
|
|
54
|
-
hideCloseButton?: boolean;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Modal component for Analytica Ensino platforms
|
|
58
|
-
*
|
|
59
|
-
* A flexible modal component with multiple size variants and customizable behavior.
|
|
60
|
-
*
|
|
61
|
-
* @param isOpen - Whether the modal is currently open
|
|
62
|
-
* @param onClose - Callback function called when the modal should be closed
|
|
63
|
-
* @param title - The title displayed at the top of the modal
|
|
64
|
-
* @param children - The main content of the modal
|
|
65
|
-
* @param size - The size variant (xs, sm, md, lg, xl)
|
|
66
|
-
* @param className - Additional CSS classes for the modal content
|
|
67
|
-
* @param closeOnBackdropClick - Whether clicking the backdrop closes the modal (default: true)
|
|
68
|
-
* @param closeOnEscape - Whether pressing Escape closes the modal (default: true)
|
|
69
|
-
* @param footer - Footer content, typically action buttons
|
|
70
|
-
* @param hideCloseButton - Whether to hide the X close button (default: false)
|
|
71
|
-
* @returns A modal overlay with content
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* ```tsx
|
|
75
|
-
* <Modal
|
|
76
|
-
* isOpen={isModalOpen}
|
|
77
|
-
* onClose={() => setIsModalOpen(false)}
|
|
78
|
-
* title="Invite your team"
|
|
79
|
-
* size="md"
|
|
80
|
-
* footer={
|
|
81
|
-
* <div className="flex gap-3">
|
|
82
|
-
* <Button variant="outline" onClick={() => setIsModalOpen(false)}>Cancel</Button>
|
|
83
|
-
* <Button variant="solid" onClick={handleExplore}>Explore</Button>
|
|
84
|
-
* </div>
|
|
85
|
-
* }
|
|
86
|
-
* >
|
|
87
|
-
* Elevate user interactions with our versatile modals.
|
|
88
|
-
* </Modal>
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
|
-
declare const Modal: ({ isOpen, onClose, title, children, size, className, closeOnBackdropClick, closeOnEscape, footer, hideCloseButton, }: ModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
92
|
-
|
|
93
|
-
export { Modal };
|
package/dist/index.js
CHANGED
|
@@ -1035,29 +1035,21 @@ var import_react7 = require("react");
|
|
|
1035
1035
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1036
1036
|
var SIZE_CLASSES5 = {
|
|
1037
1037
|
small: {
|
|
1038
|
-
container: "w-72",
|
|
1039
|
-
// 288px width
|
|
1040
1038
|
textarea: "h-24 text-sm",
|
|
1041
1039
|
// 96px height, 14px font
|
|
1042
1040
|
textSize: "sm"
|
|
1043
1041
|
},
|
|
1044
1042
|
medium: {
|
|
1045
|
-
container: "w-72",
|
|
1046
|
-
// 288px width
|
|
1047
1043
|
textarea: "h-24 text-base",
|
|
1048
1044
|
// 96px height, 16px font
|
|
1049
1045
|
textSize: "md"
|
|
1050
1046
|
},
|
|
1051
1047
|
large: {
|
|
1052
|
-
container: "w-72",
|
|
1053
|
-
// 288px width
|
|
1054
1048
|
textarea: "h-24 text-lg",
|
|
1055
1049
|
// 96px height, 18px font
|
|
1056
1050
|
textSize: "lg"
|
|
1057
1051
|
},
|
|
1058
1052
|
extraLarge: {
|
|
1059
|
-
container: "w-72",
|
|
1060
|
-
// 288px width
|
|
1061
1053
|
textarea: "h-24 text-xl",
|
|
1062
1054
|
// 96px height, 20px font
|
|
1063
1055
|
textSize: "xl"
|
|
@@ -1127,7 +1119,7 @@ var TextArea = (0, import_react7.forwardRef)(
|
|
|
1127
1119
|
const sizeClasses = SIZE_CLASSES5[size];
|
|
1128
1120
|
const stateClasses = STATE_CLASSES3[currentState];
|
|
1129
1121
|
const textareaClasses = `${BASE_TEXTAREA_CLASSES} ${sizeClasses.textarea} ${stateClasses.base} ${stateClasses.hover} ${stateClasses.focus} ${className}`;
|
|
1130
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `flex flex-col
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `flex flex-col`, children: [
|
|
1131
1123
|
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1132
1124
|
Text_default,
|
|
1133
1125
|
{
|