analytica-frontend-lib 1.2.25 → 1.2.29
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/Accordation/index.d.ts +4 -5
- package/dist/Accordation/index.d.ts.map +1 -0
- package/dist/ActivityDetails/index.css +19293 -0
- package/dist/ActivityDetails/index.css.map +1 -0
- package/dist/ActivityDetails/index.d.ts +31 -0
- package/dist/ActivityDetails/index.d.ts.map +1 -0
- package/dist/ActivityDetails/index.js +7389 -0
- package/dist/ActivityDetails/index.js.map +1 -0
- package/dist/ActivityDetails/index.mjs +7438 -0
- package/dist/ActivityDetails/index.mjs.map +1 -0
- package/dist/ActivityFilters/index.css +112 -0
- package/dist/ActivityFilters/index.css.map +1 -1
- package/dist/ActivityFilters/index.d.ts +44 -5
- package/dist/ActivityFilters/index.d.ts.map +1 -0
- package/dist/ActivityFilters/index.js +67 -33
- package/dist/ActivityFilters/index.js.map +1 -1
- package/dist/ActivityFilters/index.mjs +89 -55
- package/dist/ActivityFilters/index.mjs.map +1 -1
- package/dist/Alert/index.d.ts +3 -5
- package/dist/Alert/index.d.ts.map +1 -0
- package/dist/AlertDialog/index.d.ts +2 -4
- package/dist/AlertDialog/index.d.ts.map +1 -0
- package/dist/AlertManager/index.css +112 -0
- package/dist/AlertManager/index.css.map +1 -1
- package/dist/AlertManager/index.d.ts +4 -8
- package/dist/AlertManager/index.d.ts.map +1 -0
- package/dist/AlertManager/index.js +56 -22
- package/dist/AlertManager/index.js.map +1 -1
- package/dist/AlertManager/index.mjs +78 -44
- package/dist/AlertManager/index.mjs.map +1 -1
- package/dist/AlertManagerView/index.d.ts +6 -10
- package/dist/AlertManagerView/index.d.ts.map +1 -0
- package/dist/Alternative/index.d.ts +6 -9
- package/dist/Alternative/index.d.ts.map +1 -0
- package/dist/Auth/AuthProvider/index.d.ts +324 -3
- package/dist/Auth/AuthProvider/index.d.ts.map +1 -0
- package/dist/Auth/ProtectedRoute/index.d.ts +324 -3
- package/dist/Auth/ProtectedRoute/index.d.ts.map +1 -0
- package/dist/Auth/PublicRoute/index.d.ts +324 -3
- package/dist/Auth/PublicRoute/index.d.ts.map +1 -0
- package/dist/Auth/getRootDomain/index.d.ts +324 -3
- package/dist/Auth/getRootDomain/index.d.ts.map +1 -0
- package/dist/Auth/index.d.ts +24 -26
- package/dist/Auth/index.d.ts.map +1 -0
- package/dist/Auth/useApiConfig/index.d.ts +3 -3
- package/dist/Auth/useApiConfig/index.d.ts.map +1 -0
- package/dist/Auth/useAuth/index.d.ts +324 -3
- package/dist/Auth/useAuth/index.d.ts.map +1 -0
- package/dist/Auth/useAuthGuard/index.d.ts +324 -3
- package/dist/Auth/useAuthGuard/index.d.ts.map +1 -0
- package/dist/Auth/useRouteAuth/index.d.ts +324 -3
- package/dist/Auth/useRouteAuth/index.d.ts.map +1 -0
- package/dist/Auth/useUrlAuthentication/index.d.ts +3 -4
- package/dist/Auth/useUrlAuthentication/index.d.ts.map +1 -0
- package/dist/Auth/withAuth/index.d.ts +324 -3
- package/dist/Auth/withAuth/index.d.ts.map +1 -0
- package/dist/Auth/zustandAuthAdapter/index.d.ts +2 -3
- package/dist/Auth/zustandAuthAdapter/index.d.ts.map +1 -0
- package/dist/Badge/index.d.ts +4 -6
- package/dist/Badge/index.d.ts.map +1 -0
- package/dist/BreadcrumbMenu/breadcrumbStore/index.d.ts +5 -7
- package/dist/BreadcrumbMenu/breadcrumbStore/index.d.ts.map +1 -0
- package/dist/BreadcrumbMenu/index.d.ts +4 -8
- package/dist/BreadcrumbMenu/index.d.ts.map +1 -0
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.ts +7 -10
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.ts.map +1 -0
- package/dist/BreadcrumbMenu/useUrlParams/index.d.ts +3 -4
- package/dist/BreadcrumbMenu/useUrlParams/index.d.ts.map +1 -0
- package/dist/Button/index.d.ts +4 -6
- package/dist/Button/index.d.ts.map +1 -0
- package/dist/Calendar/index.d.ts +9 -11
- package/dist/Calendar/index.d.ts.map +1 -0
- package/dist/Card/index.d.ts +17 -19
- package/dist/Card/index.d.ts.map +1 -0
- package/dist/CheckBox/index.d.ts +6 -8
- package/dist/CheckBox/index.d.ts.map +1 -0
- package/dist/Chips/index.d.ts +4 -6
- package/dist/Chips/index.d.ts.map +1 -0
- package/dist/CorrectActivityModal/index.d.ts +39 -0
- package/dist/CorrectActivityModal/index.d.ts.map +1 -0
- package/dist/CorrectActivityModal/index.js +3674 -0
- package/dist/CorrectActivityModal/index.js.map +1 -0
- package/dist/CorrectActivityModal/index.mjs +3689 -0
- package/dist/CorrectActivityModal/index.mjs.map +1 -0
- package/dist/Divider/index.d.ts +3 -5
- package/dist/Divider/index.d.ts.map +1 -0
- package/dist/DownloadButton/index.d.ts +5 -7
- package/dist/DownloadButton/index.d.ts.map +1 -0
- package/dist/DropdownMenu/index.d.ts +26 -28
- package/dist/DropdownMenu/index.d.ts.map +1 -0
- package/dist/EmptyState/index.d.ts +5 -7
- package/dist/EmptyState/index.d.ts.map +1 -0
- package/dist/FileAttachment/index.d.ts +72 -0
- package/dist/FileAttachment/index.d.ts.map +1 -0
- package/dist/FileAttachment/index.js +239 -0
- package/dist/FileAttachment/index.js.map +1 -0
- package/dist/FileAttachment/index.mjs +213 -0
- package/dist/FileAttachment/index.mjs.map +1 -0
- package/dist/IconButton/index.d.ts +6 -8
- package/dist/IconButton/index.d.ts.map +1 -0
- package/dist/IconRender/index.d.ts +5 -6
- package/dist/IconRender/index.d.ts.map +1 -0
- package/dist/IconRoundedButton/index.d.ts +4 -6
- package/dist/IconRoundedButton/index.d.ts.map +1 -0
- package/dist/Input/index.d.ts +5 -7
- package/dist/Input/index.d.ts.map +1 -0
- package/dist/LatexRenderer/index.d.ts +5 -6
- package/dist/LatexRenderer/index.d.ts.map +1 -0
- package/dist/LoadingModal/index.d.ts +3 -5
- package/dist/LoadingModal/index.d.ts.map +1 -0
- package/dist/Menu/index.d.ts +12 -14
- package/dist/Menu/index.d.ts.map +1 -0
- package/dist/Modal/index.d.ts +3 -5
- package/dist/Modal/index.d.ts.map +1 -0
- package/dist/Modal/utils/videoUtils/index.d.ts +4 -5
- package/dist/Modal/utils/videoUtils/index.d.ts.map +1 -0
- package/dist/MultipleChoice/index.d.ts +2 -4
- package/dist/MultipleChoice/index.d.ts.map +1 -0
- package/dist/NavButton/index.d.ts +5 -7
- package/dist/NavButton/index.d.ts.map +1 -0
- package/dist/NoSearchResult/index.d.ts +4 -6
- package/dist/NoSearchResult/index.d.ts.map +1 -0
- package/dist/NotFound/index.d.ts +4 -6
- package/dist/NotFound/index.d.ts.map +1 -0
- package/dist/NotificationCard/index.d.ts +218 -3
- package/dist/NotificationCard/index.d.ts.map +1 -0
- package/dist/ProgressBar/index.d.ts +4 -6
- package/dist/ProgressBar/index.d.ts.map +1 -0
- package/dist/ProgressCircle/index.d.ts +4 -6
- package/dist/ProgressCircle/index.d.ts.map +1 -0
- package/dist/Quiz/index.d.ts +19 -23
- package/dist/Quiz/index.d.ts.map +1 -0
- package/dist/Quiz/useQuizStore/index.d.ts +14 -17
- package/dist/Quiz/useQuizStore/index.d.ts.map +1 -0
- package/dist/Radio/index.d.ts +14 -15
- package/dist/Radio/index.d.ts.map +1 -0
- package/dist/Search/index.d.ts +4 -6
- package/dist/Search/index.d.ts.map +1 -0
- package/dist/Select/index.d.ts +12 -14
- package/dist/Select/index.d.ts.map +1 -0
- package/dist/SelectionButton/index.d.ts +5 -7
- package/dist/SelectionButton/index.d.ts.map +1 -0
- package/dist/Skeleton/index.d.ts +10 -12
- package/dist/Skeleton/index.d.ts.map +1 -0
- package/dist/StatisticsCard/index.d.ts +3 -5
- package/dist/StatisticsCard/index.d.ts.map +1 -0
- package/dist/Stepper/index.d.ts +6 -8
- package/dist/Stepper/index.d.ts.map +1 -0
- package/dist/SubjectInfo/index.d.ts +17 -2
- package/dist/SubjectInfo/index.d.ts.map +1 -0
- package/dist/Support/TicketModal/index.d.ts +14 -0
- package/dist/Support/TicketModal/index.d.ts.map +1 -0
- package/dist/Support/TicketModal/index.js +1279 -0
- package/dist/Support/TicketModal/index.js.map +1 -0
- package/dist/Support/TicketModal/index.mjs +1248 -0
- package/dist/Support/TicketModal/index.mjs.map +1 -0
- package/dist/Support/index.d.ts +8 -0
- package/dist/Support/index.d.ts.map +1 -0
- package/dist/Support/index.js +2686 -0
- package/dist/Support/index.js.map +1 -0
- package/dist/Support/index.mjs +2676 -0
- package/dist/Support/index.mjs.map +1 -0
- package/dist/Table/TablePagination/index.d.ts +4 -6
- package/dist/Table/TablePagination/index.d.ts.map +1 -0
- package/dist/Table/index.d.ts +18 -19
- package/dist/Table/index.d.ts.map +1 -0
- package/dist/TableProvider/index.css +112 -0
- package/dist/TableProvider/index.css.map +1 -1
- package/dist/TableProvider/index.d.ts +198 -4
- package/dist/TableProvider/index.d.ts.map +1 -0
- package/dist/TableProvider/index.js +56 -22
- package/dist/TableProvider/index.js.map +1 -1
- package/dist/TableProvider/index.mjs +78 -44
- package/dist/TableProvider/index.mjs.map +1 -1
- package/dist/Text/index.d.ts +4 -6
- package/dist/Text/index.d.ts.map +1 -0
- package/dist/TextArea/index.d.ts +6 -8
- package/dist/TextArea/index.d.ts.map +1 -0
- package/dist/ThemeToggle/index.d.ts +4 -8
- package/dist/ThemeToggle/index.d.ts.map +1 -0
- package/dist/Toast/ToastStore/index.d.ts +3 -5
- package/dist/Toast/ToastStore/index.d.ts.map +1 -0
- package/dist/Toast/Toaster/index.d.ts +4 -6
- package/dist/Toast/Toaster/index.d.ts.map +1 -0
- package/dist/Toast/index.d.ts +3 -5
- package/dist/Toast/index.d.ts.map +1 -0
- package/dist/VideoPlayer/index.d.ts +4 -6
- package/dist/VideoPlayer/index.d.ts.map +1 -0
- package/dist/Whiteboard/index.d.ts +5 -7
- package/dist/Whiteboard/index.d.ts.map +1 -0
- package/dist/assets/icons/subjects/BookOpenText.d.ts +5 -0
- package/dist/assets/icons/subjects/BookOpenText.d.ts.map +1 -0
- package/dist/assets/icons/subjects/ChatEN.d.ts +5 -0
- package/dist/assets/icons/subjects/ChatEN.d.ts.map +1 -0
- package/dist/assets/icons/subjects/ChatES.d.ts +5 -0
- package/dist/assets/icons/subjects/ChatES.d.ts.map +1 -0
- package/dist/assets/icons/subjects/ChatPT.d.ts +5 -0
- package/dist/assets/icons/subjects/ChatPT.d.ts.map +1 -0
- package/dist/assets/icons/subjects/HeadCircuit.d.ts +5 -0
- package/dist/assets/icons/subjects/HeadCircuit.d.ts.map +1 -0
- package/dist/assets/icons/subjects/Microscope.d.ts +5 -0
- package/dist/assets/icons/subjects/Microscope.d.ts.map +1 -0
- package/dist/enums/SubjectEnum.d.ts +19 -0
- package/dist/enums/SubjectEnum.d.ts.map +1 -0
- package/dist/hooks/useAppContent.d.ts +55 -0
- package/dist/hooks/useAppContent.d.ts.map +1 -0
- package/dist/hooks/useAppInitialization.d.ts +21 -0
- package/dist/hooks/useAppInitialization.d.ts.map +1 -0
- package/dist/hooks/useInstitution.d.ts +2 -0
- package/dist/hooks/useInstitution.d.ts.map +1 -0
- package/dist/hooks/useMobile/index.d.ts +4 -5
- package/dist/hooks/useMobile/index.d.ts.map +1 -0
- package/dist/hooks/useNotificationStore.d.ts +34 -0
- package/dist/hooks/useNotificationStore.d.ts.map +1 -0
- package/dist/hooks/useNotifications.d.ts +129 -0
- package/dist/hooks/useNotifications.d.ts.map +1 -0
- package/dist/hooks/useScreen.d.ts +38 -0
- package/dist/hooks/useScreen.d.ts.map +1 -0
- package/dist/hooks/useTheme/index.d.ts +4 -7
- package/dist/hooks/useTheme/index.d.ts.map +1 -0
- package/dist/index.css +112 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +127 -789
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9031 -7012
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9093 -7085
- package/dist/index.mjs.map +1 -1
- package/dist/store/appStore.d.ts +27 -0
- package/dist/store/appStore.d.ts.map +1 -0
- package/dist/store/authStore.d.ts +75 -0
- package/dist/store/authStore.d.ts.map +1 -0
- package/dist/store/notificationStore.d.ts +89 -0
- package/dist/store/notificationStore.d.ts.map +1 -0
- package/dist/{themeStore-P2X64zC-.d.ts → store/themeStore.d.ts} +8 -12
- package/dist/store/themeStore.d.ts.map +1 -0
- package/dist/styles.css +112 -0
- package/dist/styles.css.map +1 -1
- package/dist/suporthistory-W5LBGAUP.png +0 -0
- package/dist/types/activityDetails.d.ts +127 -0
- package/dist/types/activityDetails.d.ts.map +1 -0
- package/dist/types/activityFilters.d.ts +51 -0
- package/dist/types/activityFilters.d.ts.map +1 -0
- package/dist/types/auth.d.ts +53 -0
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/notifications.d.ts +199 -0
- package/dist/types/notifications.d.ts.map +1 -0
- package/dist/types/questionTypes.d.ts +6 -0
- package/dist/types/questionTypes.d.ts.map +1 -0
- package/dist/types/studentActivityCorrection.d.ts +57 -0
- package/dist/types/studentActivityCorrection.d.ts.map +1 -0
- package/dist/types/support/index.d.ts +111 -0
- package/dist/types/support/index.d.ts.map +1 -0
- package/dist/types/support/index.js +115 -0
- package/dist/types/support/index.js.map +1 -0
- package/dist/types/support/index.mjs +84 -0
- package/dist/types/support/index.mjs.map +1 -0
- package/dist/utils/activityFilters.d.ts +23 -0
- package/dist/utils/activityFilters.d.ts.map +1 -0
- package/dist/utils/dropdown.d.ts +12 -0
- package/dist/utils/dropdown.d.ts.map +1 -0
- package/dist/utils/index.d.ts +6 -43
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/keys.d.ts +24 -0
- package/dist/utils/keys.d.ts.map +1 -0
- package/package.json +20 -4
- package/dist/Accordation/index.d.mts +0 -15
- package/dist/ActivityFilters/index.d.mts +0 -5
- package/dist/ActivityFilters-Cs3TpGAY.d.ts +0 -97
- package/dist/ActivityFilters-CsX8y41f.d.mts +0 -97
- package/dist/Alert/index.d.mts +0 -13
- package/dist/AlertDialog/index.d.mts +0 -36
- package/dist/AlertManager/index.d.mts +0 -17
- package/dist/AlertManagerView/index.d.mts +0 -31
- package/dist/Alternative/index.d.mts +0 -81
- package/dist/Auth/AuthProvider/index.d.mts +0 -3
- package/dist/Auth/ProtectedRoute/index.d.mts +0 -3
- package/dist/Auth/PublicRoute/index.d.mts +0 -3
- package/dist/Auth/getRootDomain/index.d.mts +0 -3
- package/dist/Auth/index.d.mts +0 -326
- package/dist/Auth/useApiConfig/index.d.mts +0 -43
- package/dist/Auth/useAuth/index.d.mts +0 -3
- package/dist/Auth/useAuthGuard/index.d.mts +0 -3
- package/dist/Auth/useRouteAuth/index.d.mts +0 -3
- package/dist/Auth/useUrlAuthentication/index.d.mts +0 -69
- package/dist/Auth/withAuth/index.d.mts +0 -3
- package/dist/Auth/zustandAuthAdapter/index.d.mts +0 -75
- package/dist/Badge/index.d.mts +0 -46
- package/dist/BreadcrumbMenu/breadcrumbStore/index.d.mts +0 -77
- package/dist/BreadcrumbMenu/index.d.mts +0 -31
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.mts +0 -48
- package/dist/BreadcrumbMenu/useUrlParams/index.d.mts +0 -28
- package/dist/Button/index.d.mts +0 -45
- package/dist/Calendar/index.d.mts +0 -60
- package/dist/Card/index.d.mts +0 -150
- package/dist/CheckBox/index.d.mts +0 -74
- package/dist/CheckBoxGroup-9n5C0OH4.d.mts +0 -24
- package/dist/CheckBoxGroup-9n5C0OH4.d.ts +0 -24
- package/dist/Chips/index.d.mts +0 -41
- package/dist/Divider/index.d.mts +0 -32
- package/dist/DownloadButton/index.d.mts +0 -46
- package/dist/DropdownMenu/index.d.mts +0 -82
- package/dist/EmptyState/index.d.mts +0 -65
- package/dist/IconButton/index.d.mts +0 -76
- package/dist/IconRender/index.d.mts +0 -36
- package/dist/IconRoundedButton/index.d.mts +0 -34
- package/dist/Input/index.d.mts +0 -27
- package/dist/LatexRenderer/index.d.mts +0 -50
- package/dist/LoadingModal/index.d.mts +0 -11
- package/dist/Menu/index.d.mts +0 -48
- package/dist/Modal/index.d.mts +0 -76
- package/dist/Modal/utils/videoUtils/index.d.mts +0 -28
- package/dist/MultipleChoice/index.d.mts +0 -20
- package/dist/NavButton/index.d.mts +0 -57
- package/dist/NoSearchResult/index.d.mts +0 -37
- package/dist/NotFound/index.d.mts +0 -58
- package/dist/NotificationCard/index.d.mts +0 -3
- package/dist/NotificationCard-4GgB0Nsf.d.mts +0 -417
- package/dist/NotificationCard-4GgB0Nsf.d.ts +0 -417
- package/dist/ProgressBar/index.d.mts +0 -95
- package/dist/ProgressCircle/index.d.mts +0 -60
- package/dist/Quiz/index.d.mts +0 -55
- package/dist/Quiz/useQuizStore/index.d.mts +0 -258
- package/dist/Radio/index.d.mts +0 -203
- package/dist/Search/index.d.mts +0 -27
- package/dist/Select/index.d.mts +0 -59
- package/dist/SelectionButton/index.d.mts +0 -57
- package/dist/Skeleton/index.d.mts +0 -40
- package/dist/StatisticsCard/index.d.mts +0 -79
- package/dist/Stepper/index.d.mts +0 -169
- package/dist/SubjectInfo/index.d.mts +0 -2
- package/dist/SubjectInfo-Dvt0OodP.d.mts +0 -37
- package/dist/SubjectInfo-Dvt0OodP.d.ts +0 -37
- package/dist/Table/TablePagination/index.d.mts +0 -64
- package/dist/Table/index.d.mts +0 -93
- package/dist/TableProvider/index.d.mts +0 -4
- package/dist/TableProvider-BnAnv3OV.d.mts +0 -239
- package/dist/TableProvider-GfPlLqzg.d.ts +0 -239
- package/dist/Text/index.d.mts +0 -58
- package/dist/TextArea/index.d.mts +0 -74
- package/dist/ThemeToggle/index.d.mts +0 -12
- package/dist/Toast/ToastStore/index.d.mts +0 -19
- package/dist/Toast/Toaster/index.d.mts +0 -16
- package/dist/Toast/index.d.mts +0 -17
- package/dist/VideoPlayer/index.d.mts +0 -52
- package/dist/Whiteboard/index.d.mts +0 -34
- package/dist/hooks/useMobile/index.d.mts +0 -29
- package/dist/hooks/useTheme/index.d.mts +0 -17
- package/dist/index.d.mts +0 -789
- package/dist/styles.d.mts +0 -2
- package/dist/styles.d.ts +0 -2
- package/dist/themeStore-P2X64zC-.d.mts +0 -79
- package/dist/types-DqZRjqxh.d.ts +0 -67
- package/dist/types-pd3QVhSu.d.mts +0 -67
- package/dist/utils/index.d.mts +0 -51
package/dist/Divider/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { HTMLAttributes } from 'react';
|
|
3
|
-
|
|
4
2
|
/**
|
|
5
3
|
* Divider component props interface
|
|
6
4
|
*/
|
|
@@ -27,6 +25,6 @@ type DividerProps = {
|
|
|
27
25
|
* <Divider orientation="vertical" className="h-8" />
|
|
28
26
|
* ```
|
|
29
27
|
*/
|
|
30
|
-
declare const Divider: ({ orientation, className, ...props }: DividerProps) =>
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
declare const Divider: ({ orientation, className, ...props }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export default Divider;
|
|
30
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/components/Divider/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGvC;;GAEG;AACH,KAAK,YAAY,GAAG;IAClB,iCAAiC;IACjC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAElC;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,OAAO,GAAI,sCAId,YAAY,4CAed,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Download content interface for lesson materials
|
|
5
3
|
*/
|
|
6
|
-
interface DownloadContent {
|
|
4
|
+
export interface DownloadContent {
|
|
7
5
|
/** Document URL (PDF) */
|
|
8
6
|
urlDoc?: string;
|
|
9
7
|
/** Initial frame image URL */
|
|
@@ -18,7 +16,7 @@ interface DownloadContent {
|
|
|
18
16
|
/**
|
|
19
17
|
* Props for DownloadButton component
|
|
20
18
|
*/
|
|
21
|
-
interface DownloadButtonProps {
|
|
19
|
+
export interface DownloadButtonProps {
|
|
22
20
|
/** Content URLs to download */
|
|
23
21
|
content: DownloadContent;
|
|
24
22
|
/** Additional CSS classes */
|
|
@@ -41,6 +39,6 @@ interface DownloadButtonProps {
|
|
|
41
39
|
* @param props - DownloadButton component props
|
|
42
40
|
* @returns Download button element
|
|
43
41
|
*/
|
|
44
|
-
declare const DownloadButton: ({ content, className, onDownloadStart, onDownloadComplete, onDownloadError, lessonTitle, disabled, }: DownloadButtonProps) =>
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
declare const DownloadButton: ({ content, className, onDownloadStart, onDownloadComplete, onDownloadError, lessonTitle, disabled, }: DownloadButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
export default DownloadButton;
|
|
44
|
+
//# sourceMappingURL=DownloadButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadButton.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadButton/DownloadButton.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,OAAO,EAAE,eAAe,CAAC;IACzB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,yCAAyC;IACzC,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9D,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA2HD;;;;;;GAMG;AACH,QAAA,MAAM,cAAc,GAAI,sGAQrB,mBAAmB,mDA8IrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
|
+
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
4
2
|
import { StoreApi } from 'zustand';
|
|
5
|
-
|
|
6
3
|
interface DropdownStore {
|
|
7
4
|
open: boolean;
|
|
8
5
|
setOpen: (open: boolean) => void;
|
|
9
6
|
}
|
|
10
7
|
type DropdownStoreApi = StoreApi<DropdownStore>;
|
|
11
|
-
declare function createDropdownStore(): DropdownStoreApi;
|
|
12
|
-
declare const useDropdownStore: (externalStore?: DropdownStoreApi) => DropdownStoreApi;
|
|
8
|
+
export declare function createDropdownStore(): DropdownStoreApi;
|
|
9
|
+
export declare const useDropdownStore: (externalStore?: DropdownStoreApi) => DropdownStoreApi;
|
|
13
10
|
interface DropdownMenuProps {
|
|
14
11
|
children: ReactNode;
|
|
15
12
|
open?: boolean;
|
|
16
13
|
onOpenChange?: (open: boolean) => void;
|
|
17
14
|
}
|
|
18
|
-
declare const DropdownMenu: ({ children, open: propOpen, onOpenChange, }: DropdownMenuProps) =>
|
|
15
|
+
declare const DropdownMenu: ({ children, open: propOpen, onOpenChange, }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
16
|
declare const DropdownMenuTrigger: {
|
|
20
17
|
({ className, children, onClick, store: externalStore, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
21
18
|
disabled?: boolean;
|
|
22
19
|
store?: DropdownStoreApi;
|
|
23
|
-
}):
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
21
|
displayName: string;
|
|
25
22
|
};
|
|
26
|
-
declare const MenuLabel: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
23
|
+
declare const MenuLabel: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
27
24
|
inset?: boolean;
|
|
28
25
|
store?: DropdownStoreApi;
|
|
29
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
declare const DropdownMenuContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
26
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const DropdownMenuContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
31
28
|
align?: "start" | "center" | "end";
|
|
32
29
|
side?: "top" | "right" | "bottom" | "left";
|
|
33
30
|
variant?: "menu" | "profile";
|
|
34
31
|
sideOffset?: number;
|
|
35
32
|
store?: DropdownStoreApi;
|
|
36
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
declare const DropdownMenuItem: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
33
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
declare const DropdownMenuItem: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
38
35
|
inset?: boolean;
|
|
39
36
|
size?: "small" | "medium";
|
|
40
37
|
iconLeft?: ReactNode;
|
|
@@ -43,40 +40,41 @@ declare const DropdownMenuItem: react.ForwardRefExoticComponent<HTMLAttributes<H
|
|
|
43
40
|
variant?: "profile" | "menu";
|
|
44
41
|
store?: DropdownStoreApi;
|
|
45
42
|
preventClose?: boolean;
|
|
46
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
47
|
-
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
43
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
declare const DropdownMenuSeparator: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
48
45
|
store?: DropdownStoreApi;
|
|
49
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
declare const ProfileMenuTrigger: react.ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
46
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const ProfileMenuTrigger: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
51
48
|
store?: DropdownStoreApi;
|
|
52
|
-
} & react.RefAttributes<HTMLButtonElement>>;
|
|
53
|
-
declare const ProfileMenuHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
49
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
declare const ProfileMenuHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
54
51
|
name: string;
|
|
55
52
|
email: string;
|
|
56
53
|
photoUrl?: string | null;
|
|
57
54
|
store?: DropdownStoreApi;
|
|
58
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
59
|
-
declare const ProfileMenuInfo: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
55
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
|
+
declare const ProfileMenuInfo: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
60
57
|
schoolName: string;
|
|
61
58
|
classYearName: string;
|
|
62
59
|
schoolYearName: string;
|
|
63
60
|
store?: DropdownStoreApi;
|
|
64
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
65
62
|
declare const ProfileToggleTheme: {
|
|
66
63
|
({ store: externalStore, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
67
64
|
store?: DropdownStoreApi;
|
|
68
|
-
}):
|
|
65
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
69
66
|
displayName: string;
|
|
70
67
|
};
|
|
71
|
-
declare const ProfileMenuSection: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
68
|
+
declare const ProfileMenuSection: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
72
69
|
store?: DropdownStoreApi;
|
|
73
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
74
71
|
declare const ProfileMenuFooter: {
|
|
75
72
|
({ className, disabled, onClick, store: externalStore, ...props }: HTMLAttributes<HTMLButtonElement> & {
|
|
76
73
|
disabled?: boolean;
|
|
77
74
|
store?: DropdownStoreApi;
|
|
78
|
-
}):
|
|
75
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
79
76
|
displayName: string;
|
|
80
77
|
};
|
|
81
|
-
|
|
82
|
-
export { DropdownMenuContent, DropdownMenuItem,
|
|
78
|
+
export default DropdownMenu;
|
|
79
|
+
export { DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, MenuLabel, DropdownMenuSeparator, ProfileMenuTrigger, ProfileMenuHeader, ProfileMenuSection, ProfileMenuFooter, ProfileToggleTheme, ProfileMenuInfo, };
|
|
80
|
+
//# sourceMapp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AAQ;eACd,SAAS;gBACR,SAAS;eACV,OAAO;cACR,SAAS,GAAG,MAAM;YACpB,gBAAgB;mBACT,OAAO;kDA8FzB,CAAC;AAGF,QAAA,MAAM,qBAAqB;YAEkB,gBAAgB;kDAO3D,CAAC;AAIH,QAAA,MAAM,kBAAkB;YAE8B,gBAAgB;qDA0BpE,CAAC;AAGH,QAAA,MAAM,iBAAiB;UAGb,MAAM;WACL,MAAM;eACF,MAAM,GAAG,IAAI;YAChB,gBAAgB;kDAuC1B,CAAC;AAGH,QAAA,MAAM,eAAe;gBAGL,MAAM;mBACH,MAAM;oBACL,MAAM;YACd,gBAAgB;kDAwC3B,CAAC;AAGF,QAAA,MAAM,kBAAkB;yCAGrB,cAAc,CAAC,cAAc,CAAC,GAAG;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE;;CAuF/D,CAAC;AAGF,QAAA,MAAM,kBAAkB;YAEqB,gBAAgB;kDAO3D,CAAC;AAGH,QAAA,MAAM,iBAAiB;uEAMpB,cAAc,CAAC,iBAAiB,CAAC,GAAG;QACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE,gBAAgB,CAAC;KAC1B;;CAqBA,CAAC;AAIF,eAAe,YAAY,CAAC;AAC5B,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EAGrB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GAChB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
interface EmptyStateProps {
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface EmptyStateProps {
|
|
5
3
|
/**
|
|
6
4
|
* Image source for the illustration (optional)
|
|
7
5
|
*/
|
|
@@ -60,6 +58,6 @@ interface EmptyStateProps {
|
|
|
60
58
|
* />
|
|
61
59
|
* ```
|
|
62
60
|
*/
|
|
63
|
-
declare const EmptyState: ({ image, title, description, buttonText, buttonIcon, onButtonClick, buttonVariant, buttonAction, }: EmptyStateProps) =>
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
declare const EmptyState: ({ image, title, description, buttonText, buttonIcon, onButtonClick, buttonVariant, buttonAction, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export default EmptyState;
|
|
63
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;CACpD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,UAAU,GAAI,oGASjB,eAAe,4CA2CjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an attached file with unique identifier
|
|
3
|
+
*/
|
|
4
|
+
export interface AttachedFile {
|
|
5
|
+
/** The file object */
|
|
6
|
+
file: File;
|
|
7
|
+
/** Unique identifier for the file */
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Props for the FileAttachment component
|
|
12
|
+
*/
|
|
13
|
+
export interface FileAttachmentProps {
|
|
14
|
+
/** List of attached files */
|
|
15
|
+
files: AttachedFile[];
|
|
16
|
+
/** Callback when files are added */
|
|
17
|
+
onFilesAdd: (files: File[]) => void;
|
|
18
|
+
/** Callback when a file is removed */
|
|
19
|
+
onFileRemove: (id: string) => void;
|
|
20
|
+
/** Whether the files are read-only (no removal allowed) */
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
/** Text for the attach button */
|
|
23
|
+
buttonLabel?: string;
|
|
24
|
+
/** Whether to accept multiple files */
|
|
25
|
+
multiple?: boolean;
|
|
26
|
+
/** Additional CSS class */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Whether to hide the attach button */
|
|
29
|
+
hideButton?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Formats file size to human-readable string
|
|
33
|
+
* @param bytes - File size in bytes
|
|
34
|
+
* @returns Formatted string (e.g., "1.5 MB")
|
|
35
|
+
*/
|
|
36
|
+
declare const formatFileSize: (bytes: number) => string;
|
|
37
|
+
/**
|
|
38
|
+
* Generates a unique ID for file tracking
|
|
39
|
+
* @returns Unique string identifier
|
|
40
|
+
*/
|
|
41
|
+
declare const generateFileId: () => string;
|
|
42
|
+
/**
|
|
43
|
+
* Reusable file attachment component
|
|
44
|
+
*
|
|
45
|
+
* Allows users to attach multiple files with preview and removal functionality.
|
|
46
|
+
* No file size or type restrictions are applied on the client side.
|
|
47
|
+
*
|
|
48
|
+
* @param props - Component props
|
|
49
|
+
* @returns JSX element
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* const [files, setFiles] = useState<AttachedFile[]>([]);
|
|
54
|
+
*
|
|
55
|
+
* <FileAttachment
|
|
56
|
+
* files={files}
|
|
57
|
+
* onFilesAdd={(newFiles) => {
|
|
58
|
+
* const attachedFiles = newFiles.map(file => ({
|
|
59
|
+
* file,
|
|
60
|
+
* id: generateFileId()
|
|
61
|
+
* }));
|
|
62
|
+
* setFiles(prev => [...prev, ...attachedFiles]);
|
|
63
|
+
* }}
|
|
64
|
+
* onFileRemove={(id) => setFiles(prev => prev.filter(f => f.id !== id))}
|
|
65
|
+
* multiple
|
|
66
|
+
* />
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare const FileAttachment: ({ files, onFilesAdd, onFileRemove, readOnly, buttonLabel, multiple, className, hideButton, }: FileAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export { generateFileId, formatFileSize };
|
|
71
|
+
export default FileAttachment;
|
|
72
|
+
//# sourceMappingURL=FileAttachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileAttachment.d.ts","sourceRoot":"","sources":["../../../src/components/FileAttachment/FileAttachment.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,sBAAsB;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,oCAAoC;IACpC,UAAU,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACpC,sCAAsC;IACtC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,QAAA,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAMvC,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,QAAO,MAE1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,cAAc,GAAI,8FASrB,mBAAmB,4CAmFrB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AAC1C,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/components/FileAttachment/FileAttachment.tsx
|
|
21
|
+
var FileAttachment_exports = {};
|
|
22
|
+
__export(FileAttachment_exports, {
|
|
23
|
+
default: () => FileAttachment_default,
|
|
24
|
+
formatFileSize: () => formatFileSize,
|
|
25
|
+
generateFileId: () => generateFileId
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(FileAttachment_exports);
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
var import_phosphor_react = require("phosphor-react");
|
|
30
|
+
|
|
31
|
+
// src/utils/utils.ts
|
|
32
|
+
var import_clsx = require("clsx");
|
|
33
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
34
|
+
function cn(...inputs) {
|
|
35
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/components/Button/Button.tsx
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var VARIANT_ACTION_CLASSES = {
|
|
41
|
+
solid: {
|
|
42
|
+
primary: "bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
43
|
+
positive: "bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
44
|
+
negative: "bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
45
|
+
},
|
|
46
|
+
outline: {
|
|
47
|
+
primary: "bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
48
|
+
positive: "bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
49
|
+
negative: "bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
50
|
+
},
|
|
51
|
+
link: {
|
|
52
|
+
primary: "bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
53
|
+
positive: "bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
54
|
+
negative: "bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var SIZE_CLASSES = {
|
|
58
|
+
"extra-small": "text-xs px-3.5 py-2",
|
|
59
|
+
small: "text-sm px-4 py-2.5",
|
|
60
|
+
medium: "text-md px-5 py-2.5",
|
|
61
|
+
large: "text-lg px-6 py-3",
|
|
62
|
+
"extra-large": "text-lg px-7 py-3.5"
|
|
63
|
+
};
|
|
64
|
+
var Button = ({
|
|
65
|
+
children,
|
|
66
|
+
iconLeft,
|
|
67
|
+
iconRight,
|
|
68
|
+
size = "medium",
|
|
69
|
+
variant = "solid",
|
|
70
|
+
action = "primary",
|
|
71
|
+
className = "",
|
|
72
|
+
disabled,
|
|
73
|
+
type = "button",
|
|
74
|
+
...props
|
|
75
|
+
}) => {
|
|
76
|
+
const sizeClasses = SIZE_CLASSES[size];
|
|
77
|
+
const variantClasses = VARIANT_ACTION_CLASSES[variant][action];
|
|
78
|
+
const baseClasses = "inline-flex items-center justify-center rounded-full cursor-pointer font-medium";
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
className: cn(baseClasses, variantClasses, sizeClasses, className),
|
|
83
|
+
disabled,
|
|
84
|
+
type,
|
|
85
|
+
...props,
|
|
86
|
+
children: [
|
|
87
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mr-2 flex items-center", children: iconLeft }),
|
|
88
|
+
children,
|
|
89
|
+
iconRight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-2 flex items-center", children: iconRight })
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
var Button_default = Button;
|
|
95
|
+
|
|
96
|
+
// src/components/Text/Text.tsx
|
|
97
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
98
|
+
var Text = ({
|
|
99
|
+
children,
|
|
100
|
+
size = "md",
|
|
101
|
+
weight = "normal",
|
|
102
|
+
color = "text-text-950",
|
|
103
|
+
as,
|
|
104
|
+
className = "",
|
|
105
|
+
...props
|
|
106
|
+
}) => {
|
|
107
|
+
let sizeClasses = "";
|
|
108
|
+
let weightClasses = "";
|
|
109
|
+
const sizeClassMap = {
|
|
110
|
+
"2xs": "text-2xs",
|
|
111
|
+
xs: "text-xs",
|
|
112
|
+
sm: "text-sm",
|
|
113
|
+
md: "text-md",
|
|
114
|
+
lg: "text-lg",
|
|
115
|
+
xl: "text-xl",
|
|
116
|
+
"2xl": "text-2xl",
|
|
117
|
+
"3xl": "text-3xl",
|
|
118
|
+
"4xl": "text-4xl",
|
|
119
|
+
"5xl": "text-5xl",
|
|
120
|
+
"6xl": "text-6xl"
|
|
121
|
+
};
|
|
122
|
+
sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
|
|
123
|
+
const weightClassMap = {
|
|
124
|
+
hairline: "font-hairline",
|
|
125
|
+
light: "font-light",
|
|
126
|
+
normal: "font-normal",
|
|
127
|
+
medium: "font-medium",
|
|
128
|
+
semibold: "font-semibold",
|
|
129
|
+
bold: "font-bold",
|
|
130
|
+
extrabold: "font-extrabold",
|
|
131
|
+
black: "font-black"
|
|
132
|
+
};
|
|
133
|
+
weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
|
|
134
|
+
const baseClasses = "font-primary";
|
|
135
|
+
const Component = as ?? "p";
|
|
136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
137
|
+
Component,
|
|
138
|
+
{
|
|
139
|
+
className: cn(baseClasses, sizeClasses, weightClasses, color, className),
|
|
140
|
+
...props,
|
|
141
|
+
children
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
};
|
|
145
|
+
var Text_default = Text;
|
|
146
|
+
|
|
147
|
+
// src/components/FileAttachment/FileAttachment.tsx
|
|
148
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
149
|
+
var formatFileSize = (bytes) => {
|
|
150
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
151
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
152
|
+
if (bytes < 1024 * 1024 * 1024)
|
|
153
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
154
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
155
|
+
};
|
|
156
|
+
var generateFileId = () => {
|
|
157
|
+
return crypto.randomUUID();
|
|
158
|
+
};
|
|
159
|
+
var FileAttachment = ({
|
|
160
|
+
files,
|
|
161
|
+
onFilesAdd,
|
|
162
|
+
onFileRemove,
|
|
163
|
+
readOnly = false,
|
|
164
|
+
buttonLabel = "Anexar",
|
|
165
|
+
multiple = true,
|
|
166
|
+
className,
|
|
167
|
+
hideButton = false
|
|
168
|
+
}) => {
|
|
169
|
+
const fileInputRef = (0, import_react.useRef)(null);
|
|
170
|
+
const handleFileChange = (event) => {
|
|
171
|
+
const selectedFiles = event.target.files;
|
|
172
|
+
if (selectedFiles && selectedFiles.length > 0) {
|
|
173
|
+
const filesArray = Array.from(selectedFiles);
|
|
174
|
+
onFilesAdd(filesArray);
|
|
175
|
+
}
|
|
176
|
+
if (fileInputRef.current) {
|
|
177
|
+
fileInputRef.current.value = "";
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const handleAttachClick = () => {
|
|
181
|
+
fileInputRef.current?.click();
|
|
182
|
+
};
|
|
183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
185
|
+
"input",
|
|
186
|
+
{
|
|
187
|
+
type: "file",
|
|
188
|
+
ref: fileInputRef,
|
|
189
|
+
className: "hidden",
|
|
190
|
+
onChange: handleFileChange,
|
|
191
|
+
multiple,
|
|
192
|
+
"aria-label": "Selecionar arquivos"
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
!readOnly && !hideButton && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
196
|
+
Button_default,
|
|
197
|
+
{
|
|
198
|
+
type: "button",
|
|
199
|
+
variant: "outline",
|
|
200
|
+
size: "small",
|
|
201
|
+
onClick: handleAttachClick,
|
|
202
|
+
className: "self-start flex items-center gap-2",
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react.Paperclip, { size: 16 }),
|
|
205
|
+
buttonLabel
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex flex-wrap gap-2", children: files.map((attachedFile) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
210
|
+
"div",
|
|
211
|
+
{
|
|
212
|
+
className: "flex items-center gap-2 bg-background-50 px-3 py-2 rounded-lg border border-border-100",
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react.FileText, { size: 16, className: "text-text-500 shrink-0" }),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text_default, { className: "text-sm text-text-700 truncate max-w-[200px]", children: attachedFile.file.name }),
|
|
216
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text_default, { className: "text-xs text-text-400 shrink-0", children: formatFileSize(attachedFile.file.size) }),
|
|
217
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
type: "button",
|
|
221
|
+
onClick: () => onFileRemove(attachedFile.id),
|
|
222
|
+
className: "text-text-400 hover:text-error-500 transition-colors shrink-0",
|
|
223
|
+
"aria-label": `Remover ${attachedFile.file.name}`,
|
|
224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react.X, { size: 14 })
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
attachedFile.id
|
|
230
|
+
)) })
|
|
231
|
+
] });
|
|
232
|
+
};
|
|
233
|
+
var FileAttachment_default = FileAttachment;
|
|
234
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
235
|
+
0 && (module.exports = {
|
|
236
|
+
formatFileSize,
|
|
237
|
+
generateFileId
|
|
238
|
+
});
|
|
239
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/FileAttachment/FileAttachment.tsx","../../src/utils/utils.ts","../../src/components/Button/Button.tsx","../../src/components/Text/Text.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { Paperclip, FileText, X } from 'phosphor-react';\nimport Button from '../Button/Button';\nimport Text from '../Text/Text';\nimport { cn } from '../../utils/utils';\n\n/**\n * Represents an attached file with unique identifier\n */\nexport interface AttachedFile {\n /** The file object */\n file: File;\n /** Unique identifier for the file */\n id: string;\n}\n\n/**\n * Props for the FileAttachment component\n */\nexport interface FileAttachmentProps {\n /** List of attached files */\n files: AttachedFile[];\n /** Callback when files are added */\n onFilesAdd: (files: File[]) => void;\n /** Callback when a file is removed */\n onFileRemove: (id: string) => void;\n /** Whether the files are read-only (no removal allowed) */\n readOnly?: boolean;\n /** Text for the attach button */\n buttonLabel?: string;\n /** Whether to accept multiple files */\n multiple?: boolean;\n /** Additional CSS class */\n className?: string;\n /** Whether to hide the attach button */\n hideButton?: boolean;\n}\n\n/**\n * Formats file size to human-readable string\n * @param bytes - File size in bytes\n * @returns Formatted string (e.g., \"1.5 MB\")\n */\nconst formatFileSize = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;\n};\n\n/**\n * Generates a unique ID for file tracking\n * @returns Unique string identifier\n */\nconst generateFileId = (): string => {\n return crypto.randomUUID();\n};\n\n/**\n * Reusable file attachment component\n *\n * Allows users to attach multiple files with preview and removal functionality.\n * No file size or type restrictions are applied on the client side.\n *\n * @param props - Component props\n * @returns JSX element\n *\n * @example\n * ```tsx\n * const [files, setFiles] = useState<AttachedFile[]>([]);\n *\n * <FileAttachment\n * files={files}\n * onFilesAdd={(newFiles) => {\n * const attachedFiles = newFiles.map(file => ({\n * file,\n * id: generateFileId()\n * }));\n * setFiles(prev => [...prev, ...attachedFiles]);\n * }}\n * onFileRemove={(id) => setFiles(prev => prev.filter(f => f.id !== id))}\n * multiple\n * />\n * ```\n */\nconst FileAttachment = ({\n files,\n onFilesAdd,\n onFileRemove,\n readOnly = false,\n buttonLabel = 'Anexar',\n multiple = true,\n className,\n hideButton = false,\n}: FileAttachmentProps) => {\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n /**\n * Handle file input change\n * @param event - Input change event\n */\n const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const selectedFiles = event.target.files;\n if (selectedFiles && selectedFiles.length > 0) {\n const filesArray: File[] = Array.from(selectedFiles);\n onFilesAdd(filesArray);\n }\n // Reset input to allow selecting the same file again\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n };\n\n /**\n * Trigger file input click\n */\n const handleAttachClick = () => {\n fileInputRef.current?.click();\n };\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {/* Hidden file input */}\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n onChange={handleFileChange}\n multiple={multiple}\n aria-label=\"Selecionar arquivos\"\n />\n\n {/* Attach button */}\n {!readOnly && !hideButton && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"small\"\n onClick={handleAttachClick}\n className=\"self-start flex items-center gap-2\"\n >\n <Paperclip size={16} />\n {buttonLabel}\n </Button>\n )}\n\n {/* Attached files list */}\n {files.length > 0 && (\n <div className=\"flex flex-wrap gap-2\">\n {files.map((attachedFile) => (\n <div\n key={attachedFile.id}\n className=\"flex items-center gap-2 bg-background-50 px-3 py-2 rounded-lg border border-border-100\"\n >\n <FileText size={16} className=\"text-text-500 shrink-0\" />\n <Text className=\"text-sm text-text-700 truncate max-w-[200px]\">\n {attachedFile.file.name}\n </Text>\n <Text className=\"text-xs text-text-400 shrink-0\">\n {formatFileSize(attachedFile.file.size)}\n </Text>\n {!readOnly && (\n <button\n type=\"button\"\n onClick={() => onFileRemove(attachedFile.id)}\n className=\"text-text-400 hover:text-error-500 transition-colors shrink-0\"\n aria-label={`Remover ${attachedFile.file.name}`}\n >\n <X size={14} />\n </button>\n )}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n\nexport { generateFileId, formatFileSize };\nexport default FileAttachment;\n","import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport { syncDropdownState } from './dropdown';\nexport {\n getSelectedIdsFromCategories,\n toggleArrayItem,\n toggleSingleValue,\n} from './activityFilters';\n\n/**\n * Retorna a cor hexadecimal com opacidade 0.3 (4d) se não estiver em dark mode.\n * Se estiver em dark mode, retorna a cor original.\n *\n * @param hexColor - Cor hexadecimal (ex: \"#0066b8\" ou \"0066b8\")\n * @param isDark - booleano indicando se está em dark mode\n * @returns string - cor hexadecimal com opacidade se necessário\n */\nexport function getSubjectColorWithOpacity(\n hexColor: string | undefined,\n isDark: boolean\n): string | undefined {\n if (!hexColor) return undefined;\n // Remove o '#' se existir\n let color = hexColor.replace(/^#/, '').toLowerCase();\n\n if (isDark) {\n // Se está em dark mode, sempre remove opacidade se existir\n if (color.length === 8) {\n color = color.slice(0, 6);\n }\n return `#${color}`;\n } else {\n // Se não está em dark mode (light mode)\n let resultColor: string;\n if (color.length === 6) {\n // Adiciona opacidade 0.3 (4D) para cores de 6 dígitos\n resultColor = `#${color}4d`;\n } else if (color.length === 8) {\n // Já tem opacidade, retorna como está\n resultColor = `#${color}`;\n } else {\n // Para outros tamanhos (3, 4, 5 dígitos), retorna como está\n resultColor = `#${color}`;\n }\n return resultColor;\n }\n}\n","import { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { cn } from '../../utils/utils';\n\n/**\n * Lookup table for variant and action class combinations\n */\nconst VARIANT_ACTION_CLASSES = {\n solid: {\n primary:\n 'bg-primary-950 text-text border border-primary-950 hover:bg-primary-800 hover:border-primary-800 focus-visible:outline-none focus-visible:bg-primary-950 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-primary-700 active:border-primary-700 disabled:bg-primary-500 disabled:border-primary-500 disabled:opacity-40 disabled:cursor-not-allowed',\n positive:\n 'bg-success-500 text-text border border-success-500 hover:bg-success-600 hover:border-success-600 focus-visible:outline-none focus-visible:bg-success-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-success-700 active:border-success-700 disabled:bg-success-500 disabled:border-success-500 disabled:opacity-40 disabled:cursor-not-allowed',\n negative:\n 'bg-error-500 text-text border border-error-500 hover:bg-error-600 hover:border-error-600 focus-visible:outline-none focus-visible:bg-error-500 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:bg-error-700 active:border-error-700 disabled:bg-error-500 disabled:border-error-500 disabled:opacity-40 disabled:cursor-not-allowed',\n },\n outline: {\n primary:\n 'bg-transparent text-primary-950 border border-primary-950 hover:bg-background-50 hover:text-primary-400 hover:border-primary-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 active:border-primary-700 disabled:opacity-40 disabled:cursor-not-allowed',\n positive:\n 'bg-transparent text-success-500 border border-success-300 hover:bg-background-50 hover:text-success-400 hover:border-success-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 active:border-success-700 disabled:opacity-40 disabled:cursor-not-allowed',\n negative:\n 'bg-transparent text-error-500 border border-error-300 hover:bg-background-50 hover:text-error-400 hover:border-error-400 focus-visible:border-0 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 active:border-error-700 disabled:opacity-40 disabled:cursor-not-allowed',\n },\n link: {\n primary:\n 'bg-transparent text-primary-950 hover:text-primary-400 focus-visible:outline-none focus-visible:text-primary-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-primary-700 disabled:opacity-40 disabled:cursor-not-allowed',\n positive:\n 'bg-transparent text-success-500 hover:text-success-400 focus-visible:outline-none focus-visible:text-success-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-success-700 disabled:opacity-40 disabled:cursor-not-allowed',\n negative:\n 'bg-transparent text-error-500 hover:text-error-400 focus-visible:outline-none focus-visible:text-error-600 focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-indicator-info active:text-error-700 disabled:opacity-40 disabled:cursor-not-allowed',\n },\n} as const;\n\n/**\n * Lookup table for size classes\n */\nconst SIZE_CLASSES = {\n 'extra-small': 'text-xs px-3.5 py-2',\n small: 'text-sm px-4 py-2.5',\n medium: 'text-md px-5 py-2.5',\n large: 'text-lg px-6 py-3',\n 'extra-large': 'text-lg px-7 py-3.5',\n} as const;\n\n/**\n * Button component props interface\n */\ntype ButtonProps = {\n /** Content to be displayed inside the button */\n children: ReactNode;\n /** Ícone à esquerda do texto */\n iconLeft?: ReactNode;\n /** Ícone à direita do texto */\n iconRight?: ReactNode;\n /** Size of the button */\n size?: 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';\n /** Visual variant of the button */\n variant?: 'solid' | 'outline' | 'link';\n /** Action type of the button */\n action?: 'primary' | 'positive' | 'negative';\n /** Additional CSS classes to apply */\n className?: string;\n} & ButtonHTMLAttributes<HTMLButtonElement>;\n\n/**\n * Button component for Analytica Ensino platforms\n *\n * A flexible button component with multiple variants, sizes and actions.\n *\n * @param children - The content to display inside the button\n * @param size - The size variant (extra-small, small, medium, large, extra-large)\n * @param variant - The visual style variant (solid, outline, link)\n * @param action - The action type (primary, positive, negative)\n * @param className - Additional CSS classes\n * @param props - All other standard button HTML attributes\n * @returns A styled button element\n *\n * @example\n * ```tsx\n * <Button variant=\"solid\" action=\"primary\" size=\"medium\" onClick={() => console.log('clicked')}>\n * Click me\n * </Button>\n * ```\n */\nconst Button = ({\n children,\n iconLeft,\n iconRight,\n size = 'medium',\n variant = 'solid',\n action = 'primary',\n className = '',\n disabled,\n type = 'button',\n ...props\n}: ButtonProps) => {\n // Get classes from lookup tables\n const sizeClasses = SIZE_CLASSES[size];\n const variantClasses = VARIANT_ACTION_CLASSES[variant][action];\n\n const baseClasses =\n 'inline-flex items-center justify-center rounded-full cursor-pointer font-medium';\n\n return (\n <button\n className={cn(baseClasses, variantClasses, sizeClasses, className)}\n disabled={disabled}\n type={type}\n {...props}\n >\n {iconLeft && <span className=\"mr-2 flex items-center\">{iconLeft}</span>}\n {children}\n {iconRight && <span className=\"ml-2 flex items-center\">{iconRight}</span>}\n </button>\n );\n};\n\nexport default Button;\n","import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';\nimport { cn } from '../../utils/utils';\n\n/**\n * Base text component props\n */\ntype BaseTextProps = {\n /** Content to be displayed */\n children?: ReactNode;\n /** Text size variant */\n size?:\n | '2xs'\n | 'xs'\n | 'sm'\n | 'md'\n | 'lg'\n | 'xl'\n | '2xl'\n | '3xl'\n | '4xl'\n | '5xl'\n | '6xl';\n /** Font weight variant */\n weight?:\n | 'hairline'\n | 'light'\n | 'normal'\n | 'medium'\n | 'semibold'\n | 'bold'\n | 'extrabold'\n | 'black';\n /** Color variant - white for light backgrounds, black for dark backgrounds */\n color?: string;\n /** Additional CSS classes to apply */\n className?: string;\n};\n\n/**\n * Polymorphic text component props that ensures type safety based on the 'as' prop\n */\ntype TextProps<T extends ElementType = 'p'> = BaseTextProps & {\n /** HTML tag to render */\n as?: T;\n} & Omit<ComponentPropsWithoutRef<T>, keyof BaseTextProps>;\n\n/**\n * Text component for Analytica Ensino platforms\n *\n * A flexible polymorphic text component with multiple sizes, weights, and colors.\n * Automatically adapts to dark and light themes with full type safety.\n *\n * @param children - The content to display\n * @param size - The text size variant (2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl, 6xl)\n * @param weight - The font weight variant (hairline, light, normal, medium, semibold, bold, extrabold, black)\n * @param color - The color variant - adapts to theme\n * @param as - The HTML tag to render - determines allowed attributes via TypeScript\n * @param className - Additional CSS classes\n * @param props - HTML attributes valid for the chosen tag only\n * @returns A styled text element with type-safe attributes\n *\n * @example\n * ```tsx\n * <Text size=\"lg\" weight=\"bold\" color=\"text-info-800\">\n * This is a large, bold text\n * </Text>\n *\n * <Text as=\"a\" href=\"/link\" target=\"_blank\">\n * Link with type-safe anchor attributes\n * </Text>\n *\n * <Text as=\"button\" onClick={handleClick} disabled>\n * Button with type-safe button attributes\n * </Text>\n * ```\n */\nconst Text = <T extends ElementType = 'p'>({\n children,\n size = 'md',\n weight = 'normal',\n color = 'text-text-950',\n as,\n className = '',\n ...props\n}: TextProps<T>) => {\n let sizeClasses = '';\n let weightClasses = '';\n\n // Text size classes mapping\n const sizeClassMap = {\n '2xs': 'text-2xs',\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-md',\n lg: 'text-lg',\n xl: 'text-xl',\n '2xl': 'text-2xl',\n '3xl': 'text-3xl',\n '4xl': 'text-4xl',\n '5xl': 'text-5xl',\n '6xl': 'text-6xl',\n } as const;\n\n sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;\n\n // Font weight classes mapping\n const weightClassMap = {\n hairline: 'font-hairline',\n light: 'font-light',\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n extrabold: 'font-extrabold',\n black: 'font-black',\n } as const;\n\n weightClasses = weightClassMap[weight] ?? weightClassMap.normal;\n\n const baseClasses = 'font-primary';\n const Component = as ?? ('p' as ElementType);\n\n return (\n <Component\n className={cn(baseClasses, sizeClasses, weightClasses, color, className)}\n {...props}\n >\n {children}\n </Component>\n );\n};\n\nexport default Text;\n"],"mappings":";;;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