analytica-frontend-lib 1.0.44 → 1.0.45

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.mts CHANGED
@@ -19,9 +19,73 @@ 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 Calendar } from './Calendar/index.mjs';
22
+ import * as react_jsx_runtime from 'react/jsx-runtime';
23
+ import { ReactNode } from 'react';
22
24
  export { default as DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuContent, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.mjs';
23
25
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
24
26
  export { default as Menu, MenuItem, MenuSeparator } from './Menu/index.mjs';
25
- import 'react/jsx-runtime';
26
- import 'react';
27
27
  import 'zustand';
28
+
29
+ /**
30
+ * Modal component props interface
31
+ */
32
+ type ModalProps = {
33
+ /** Whether the modal is open */
34
+ isOpen: boolean;
35
+ /** Function to close the modal */
36
+ onClose: () => void;
37
+ /** Modal title */
38
+ title: string;
39
+ /** Modal description/content */
40
+ children: ReactNode;
41
+ /** Size of the modal */
42
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
43
+ /** Additional CSS classes for the modal content */
44
+ className?: string;
45
+ /** Whether clicking the backdrop should close the modal */
46
+ closeOnBackdropClick?: boolean;
47
+ /** Whether pressing Escape should close the modal */
48
+ closeOnEscape?: boolean;
49
+ /** Footer content (typically buttons) */
50
+ footer?: ReactNode;
51
+ /** Hide the close button */
52
+ hideCloseButton?: boolean;
53
+ };
54
+ /**
55
+ * Modal component for Analytica Ensino platforms
56
+ *
57
+ * A flexible modal component with multiple size variants and customizable behavior.
58
+ *
59
+ * @param isOpen - Whether the modal is currently open
60
+ * @param onClose - Callback function called when the modal should be closed
61
+ * @param title - The title displayed at the top of the modal
62
+ * @param children - The main content of the modal
63
+ * @param size - The size variant (xs, sm, md, lg, xl)
64
+ * @param className - Additional CSS classes for the modal content
65
+ * @param closeOnBackdropClick - Whether clicking the backdrop closes the modal (default: true)
66
+ * @param closeOnEscape - Whether pressing Escape closes the modal (default: true)
67
+ * @param footer - Footer content, typically action buttons
68
+ * @param hideCloseButton - Whether to hide the X close button (default: false)
69
+ * @returns A modal overlay with content
70
+ *
71
+ * @example
72
+ * ```tsx
73
+ * <Modal
74
+ * isOpen={isModalOpen}
75
+ * onClose={() => setIsModalOpen(false)}
76
+ * title="Invite your team"
77
+ * size="md"
78
+ * footer={
79
+ * <div className="flex gap-3">
80
+ * <Button variant="outline" onClick={() => setIsModalOpen(false)}>Cancel</Button>
81
+ * <Button variant="solid" onClick={handleExplore}>Explore</Button>
82
+ * </div>
83
+ * }
84
+ * >
85
+ * Elevate user interactions with our versatile modals.
86
+ * </Modal>
87
+ * ```
88
+ */
89
+ declare const Modal: ({ isOpen, onClose, title, children, size, className, closeOnBackdropClick, closeOnEscape, footer, hideCloseButton, }: ModalProps) => react_jsx_runtime.JSX.Element | null;
90
+
91
+ export { Modal };
package/dist/index.d.ts CHANGED
@@ -19,9 +19,73 @@ 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 Calendar } from './Calendar/index.js';
22
+ import * as react_jsx_runtime from 'react/jsx-runtime';
23
+ import { ReactNode } from 'react';
22
24
  export { default as DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuContent, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.js';
23
25
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
24
26
  export { default as Menu, MenuItem, MenuSeparator } from './Menu/index.js';
25
- import 'react/jsx-runtime';
26
- import 'react';
27
27
  import 'zustand';
28
+
29
+ /**
30
+ * Modal component props interface
31
+ */
32
+ type ModalProps = {
33
+ /** Whether the modal is open */
34
+ isOpen: boolean;
35
+ /** Function to close the modal */
36
+ onClose: () => void;
37
+ /** Modal title */
38
+ title: string;
39
+ /** Modal description/content */
40
+ children: ReactNode;
41
+ /** Size of the modal */
42
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
43
+ /** Additional CSS classes for the modal content */
44
+ className?: string;
45
+ /** Whether clicking the backdrop should close the modal */
46
+ closeOnBackdropClick?: boolean;
47
+ /** Whether pressing Escape should close the modal */
48
+ closeOnEscape?: boolean;
49
+ /** Footer content (typically buttons) */
50
+ footer?: ReactNode;
51
+ /** Hide the close button */
52
+ hideCloseButton?: boolean;
53
+ };
54
+ /**
55
+ * Modal component for Analytica Ensino platforms
56
+ *
57
+ * A flexible modal component with multiple size variants and customizable behavior.
58
+ *
59
+ * @param isOpen - Whether the modal is currently open
60
+ * @param onClose - Callback function called when the modal should be closed
61
+ * @param title - The title displayed at the top of the modal
62
+ * @param children - The main content of the modal
63
+ * @param size - The size variant (xs, sm, md, lg, xl)
64
+ * @param className - Additional CSS classes for the modal content
65
+ * @param closeOnBackdropClick - Whether clicking the backdrop closes the modal (default: true)
66
+ * @param closeOnEscape - Whether pressing Escape closes the modal (default: true)
67
+ * @param footer - Footer content, typically action buttons
68
+ * @param hideCloseButton - Whether to hide the X close button (default: false)
69
+ * @returns A modal overlay with content
70
+ *
71
+ * @example
72
+ * ```tsx
73
+ * <Modal
74
+ * isOpen={isModalOpen}
75
+ * onClose={() => setIsModalOpen(false)}
76
+ * title="Invite your team"
77
+ * size="md"
78
+ * footer={
79
+ * <div className="flex gap-3">
80
+ * <Button variant="outline" onClick={() => setIsModalOpen(false)}>Cancel</Button>
81
+ * <Button variant="solid" onClick={handleExplore}>Explore</Button>
82
+ * </div>
83
+ * }
84
+ * >
85
+ * Elevate user interactions with our versatile modals.
86
+ * </Modal>
87
+ * ```
88
+ */
89
+ declare const Modal: ({ isOpen, onClose, title, children, size, className, closeOnBackdropClick, closeOnEscape, footer, hideCloseButton, }: ModalProps) => react_jsx_runtime.JSX.Element | null;
90
+
91
+ export { Modal };