@mantis-core/ui 0.3.0 → 0.4.0
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/components/Forms/ColorPickerInput.d.ts +10 -0
- package/dist/components/Forms/ColorPickerInput.d.ts.map +1 -0
- package/dist/components/Forms/ColorPickerInput.js +13 -0
- package/dist/components/Forms/ColorPickerInput.js.map +1 -0
- package/dist/components/Forms/Combobox.d.ts +10 -0
- package/dist/components/Forms/Combobox.d.ts.map +1 -0
- package/dist/components/Forms/Combobox.js +11 -0
- package/dist/components/Forms/Combobox.js.map +1 -0
- package/dist/components/Forms/DatePresets.d.ts +14 -0
- package/dist/components/Forms/DatePresets.d.ts.map +1 -0
- package/dist/components/Forms/DatePresets.js +55 -0
- package/dist/components/Forms/DatePresets.js.map +1 -0
- package/dist/components/Forms/OtpInput.d.ts +11 -0
- package/dist/components/Forms/OtpInput.d.ts.map +1 -0
- package/dist/components/Forms/OtpInput.js +11 -0
- package/dist/components/Forms/OtpInput.js.map +1 -0
- package/dist/components/Forms/PasswordInput.d.ts +12 -0
- package/dist/components/Forms/PasswordInput.d.ts.map +1 -0
- package/dist/components/Forms/PasswordInput.js +31 -0
- package/dist/components/Forms/PasswordInput.js.map +1 -0
- package/dist/components/Forms/RatingInput.d.ts +11 -0
- package/dist/components/Forms/RatingInput.d.ts.map +1 -0
- package/dist/components/Forms/RatingInput.js +11 -0
- package/dist/components/Forms/RatingInput.js.map +1 -0
- package/dist/components/Forms/TagsInput.d.ts +10 -0
- package/dist/components/Forms/TagsInput.d.ts.map +1 -0
- package/dist/components/Forms/TagsInput.js +11 -0
- package/dist/components/Forms/TagsInput.js.map +1 -0
- package/dist/components/auth/ChangePasswordForm.d.ts +16 -0
- package/dist/components/auth/ChangePasswordForm.d.ts.map +1 -0
- package/dist/components/auth/ChangePasswordForm.js +23 -0
- package/dist/components/auth/ChangePasswordForm.js.map +1 -0
- package/dist/components/auth/ForgotPasswordForm.d.ts +15 -0
- package/dist/components/auth/ForgotPasswordForm.d.ts.map +1 -0
- package/dist/components/auth/ForgotPasswordForm.js +14 -0
- package/dist/components/auth/ForgotPasswordForm.js.map +1 -0
- package/dist/components/auth/LoginForm.d.ts +22 -0
- package/dist/components/auth/LoginForm.d.ts.map +1 -0
- package/dist/components/auth/LoginForm.js +20 -0
- package/dist/components/auth/LoginForm.js.map +1 -0
- package/dist/components/auth/ResetPasswordForm.d.ts +16 -0
- package/dist/components/auth/ResetPasswordForm.d.ts.map +1 -0
- package/dist/components/auth/ResetPasswordForm.js +23 -0
- package/dist/components/auth/ResetPasswordForm.js.map +1 -0
- package/dist/components/auth/UserMenu.d.ts +22 -0
- package/dist/components/auth/UserMenu.d.ts.map +1 -0
- package/dist/components/auth/UserMenu.js +95 -0
- package/dist/components/auth/UserMenu.js.map +1 -0
- package/dist/components/auth/index.d.ts +11 -0
- package/dist/components/auth/index.d.ts.map +1 -0
- package/dist/components/auth/index.js +6 -0
- package/dist/components/auth/index.js.map +1 -0
- package/dist/components/charts/BarChart.d.ts +20 -0
- package/dist/components/charts/BarChart.d.ts.map +1 -0
- package/dist/components/charts/BarChart.js +28 -0
- package/dist/components/charts/BarChart.js.map +1 -0
- package/dist/components/charts/DonutChart.d.ts +21 -0
- package/dist/components/charts/DonutChart.d.ts.map +1 -0
- package/dist/components/charts/DonutChart.js +26 -0
- package/dist/components/charts/DonutChart.js.map +1 -0
- package/dist/components/charts/LineChart.d.ts +20 -0
- package/dist/components/charts/LineChart.d.ts.map +1 -0
- package/dist/components/charts/LineChart.js +27 -0
- package/dist/components/charts/LineChart.js.map +1 -0
- package/dist/components/charts/chart-setup.d.ts +3 -0
- package/dist/components/charts/chart-setup.d.ts.map +1 -0
- package/dist/components/charts/chart-setup.js +10 -0
- package/dist/components/charts/chart-setup.js.map +1 -0
- package/dist/components/charts/defaults.d.ts +13 -0
- package/dist/components/charts/defaults.d.ts.map +1 -0
- package/dist/components/charts/defaults.js +54 -0
- package/dist/components/charts/defaults.js.map +1 -0
- package/dist/components/charts/index.d.ts +9 -0
- package/dist/components/charts/index.d.ts.map +1 -0
- package/dist/components/charts/index.js +6 -0
- package/dist/components/charts/index.js.map +1 -0
- package/dist/components/data/DescriptionList.d.ts +11 -0
- package/dist/components/data/DescriptionList.d.ts.map +1 -0
- package/dist/components/data/DescriptionList.js +23 -0
- package/dist/components/data/DescriptionList.js.map +1 -0
- package/dist/components/data/StatCard.d.ts +14 -0
- package/dist/components/data/StatCard.d.ts.map +1 -0
- package/dist/components/data/StatCard.js +39 -0
- package/dist/components/data/StatCard.js.map +1 -0
- package/dist/components/data/Timeline.d.ts +15 -0
- package/dist/components/data/Timeline.d.ts.map +1 -0
- package/dist/components/data/Timeline.js +20 -0
- package/dist/components/data/Timeline.js.map +1 -0
- package/dist/components/feedback/Avatar.d.ts +9 -0
- package/dist/components/feedback/Avatar.d.ts.map +1 -0
- package/dist/components/feedback/Avatar.js +15 -0
- package/dist/components/feedback/Avatar.js.map +1 -0
- package/dist/components/feedback/CardSkeleton.d.ts +6 -0
- package/dist/components/feedback/CardSkeleton.d.ts.map +1 -0
- package/dist/components/feedback/CardSkeleton.js +7 -0
- package/dist/components/feedback/CardSkeleton.js.map +1 -0
- package/dist/components/feedback/EmptyState.d.ts +9 -0
- package/dist/components/feedback/EmptyState.d.ts.map +1 -0
- package/dist/components/feedback/EmptyState.js +6 -0
- package/dist/components/feedback/EmptyState.js.map +1 -0
- package/dist/components/feedback/ErrorBoundary.d.ts +18 -0
- package/dist/components/feedback/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/feedback/ErrorBoundary.js +24 -0
- package/dist/components/feedback/ErrorBoundary.js.map +1 -0
- package/dist/components/feedback/TableSkeleton.d.ts +7 -0
- package/dist/components/feedback/TableSkeleton.d.ts.map +1 -0
- package/dist/components/feedback/TableSkeleton.js +7 -0
- package/dist/components/feedback/TableSkeleton.js.map +1 -0
- package/dist/components/feedback/Tag.d.ts +6 -0
- package/dist/components/feedback/Tag.d.ts.map +1 -0
- package/dist/components/feedback/Tag.js +7 -0
- package/dist/components/feedback/Tag.js.map +1 -0
- package/dist/components/navigation/CommandPalette.d.ts +17 -0
- package/dist/components/navigation/CommandPalette.d.ts.map +1 -0
- package/dist/components/navigation/CommandPalette.js +73 -0
- package/dist/components/navigation/CommandPalette.js.map +1 -0
- package/dist/components/navigation/PageTabs.d.ts +14 -0
- package/dist/components/navigation/PageTabs.d.ts.map +1 -0
- package/dist/components/navigation/PageTabs.js +21 -0
- package/dist/components/navigation/PageTabs.js.map +1 -0
- package/dist/components/overlays/Drawer.d.ts +6 -0
- package/dist/components/overlays/Drawer.d.ts.map +1 -0
- package/dist/components/overlays/Drawer.js +8 -0
- package/dist/components/overlays/Drawer.js.map +1 -0
- package/dist/components/overlays/Modal.d.ts +6 -0
- package/dist/components/overlays/Modal.d.ts.map +1 -0
- package/dist/components/overlays/Modal.js +8 -0
- package/dist/components/overlays/Modal.js.map +1 -0
- package/dist/components/pages/app-shell/AppShell.d.ts.map +1 -1
- package/dist/components/pages/app-shell/AppShell.js +11 -9
- package/dist/components/pages/app-shell/AppShell.js.map +1 -1
- package/dist/components/pages/app-shell/types.d.ts +4 -0
- package/dist/components/pages/app-shell/types.d.ts.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +3 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/rules.d.ts +10 -0
- package/dist/validation/rules.d.ts.map +1 -0
- package/dist/validation/rules.js +39 -0
- package/dist/validation/rules.js.map +1 -0
- package/dist/validation/zod.d.ts +2 -0
- package/dist/validation/zod.d.ts.map +1 -0
- package/dist/validation/zod.js +3 -0
- package/dist/validation/zod.js.map +1 -0
- package/package.json +39 -3
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { PrimeIcons } from 'primereact/api';
|
|
5
|
+
import { useEffect, useRef, useState } from 'react';
|
|
6
|
+
const UserMenu = ({ user, items, onSignOut, signOutLabel = 'Cerrar sesión', className, }) => {
|
|
7
|
+
const [open, setOpen] = useState(false);
|
|
8
|
+
const wrapperRef = useRef(null);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const handler = (e) => {
|
|
11
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
12
|
+
setOpen(false);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
document.addEventListener('mousedown', handler);
|
|
16
|
+
return () => document.removeEventListener('mousedown', handler);
|
|
17
|
+
}, []);
|
|
18
|
+
const initial = (user.name ?? user.email ?? '?')[0].toUpperCase();
|
|
19
|
+
return (_jsxs("div", { ref: wrapperRef, className: classNames('mantis-core-user-menu', className), style: { position: 'relative', display: 'inline-block' }, children: [_jsx("button", { type: "button", onClick: () => setOpen((v) => !v), "aria-haspopup": "true", "aria-expanded": open, style: {
|
|
20
|
+
background: 'none',
|
|
21
|
+
border: 'none',
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
padding: '0',
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
gap: '0.5rem',
|
|
27
|
+
}, children: user.avatarUrl ? (_jsx("img", { src: user.avatarUrl, alt: user.name ?? user.email ?? 'Avatar', style: {
|
|
28
|
+
width: '2rem',
|
|
29
|
+
height: '2rem',
|
|
30
|
+
borderRadius: '50%',
|
|
31
|
+
objectFit: 'cover',
|
|
32
|
+
} })) : (_jsx("span", { style: {
|
|
33
|
+
width: '2rem',
|
|
34
|
+
height: '2rem',
|
|
35
|
+
borderRadius: '50%',
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
backgroundColor: 'var(--primary-color)',
|
|
40
|
+
color: 'var(--primary-color-text)',
|
|
41
|
+
fontWeight: 600,
|
|
42
|
+
fontSize: '0.875rem',
|
|
43
|
+
}, children: initial })) }), open && (_jsxs("div", { className: "mantis-core-user-menu__dropdown", style: {
|
|
44
|
+
position: 'absolute',
|
|
45
|
+
right: 0,
|
|
46
|
+
top: 'calc(100% + 0.5rem)',
|
|
47
|
+
minWidth: '14rem',
|
|
48
|
+
backgroundColor: 'var(--surface-overlay)',
|
|
49
|
+
border: '1px solid var(--surface-border)',
|
|
50
|
+
borderRadius: 'var(--border-radius)',
|
|
51
|
+
boxShadow: 'var(--card-shadow)',
|
|
52
|
+
zIndex: 1000,
|
|
53
|
+
overflow: 'hidden',
|
|
54
|
+
}, children: [_jsxs("div", { style: {
|
|
55
|
+
padding: '0.75rem 1rem',
|
|
56
|
+
borderBottom: '1px solid var(--surface-border)',
|
|
57
|
+
}, children: [user.name && (_jsx("p", { style: { margin: 0, fontWeight: 600, color: 'var(--text-color)' }, children: user.name })), user.email && (_jsx("p", { style: { margin: 0, fontSize: '0.8125rem', color: 'var(--text-color-secondary)' }, children: user.email }))] }), items && items.length > 0 && (_jsx("div", { style: { padding: '0.25rem 0' }, children: items.map((item, i) => item.href ? (_jsxs("a", { href: item.href, onClick: () => setOpen(false), style: {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
gap: '0.5rem',
|
|
61
|
+
padding: '0.5rem 1rem',
|
|
62
|
+
color: 'var(--text-color)',
|
|
63
|
+
textDecoration: 'none',
|
|
64
|
+
}, children: [item.icon, item.label] }, i)) : (_jsxs("button", { type: "button", onClick: () => {
|
|
65
|
+
setOpen(false);
|
|
66
|
+
item.onClick?.();
|
|
67
|
+
}, style: {
|
|
68
|
+
display: 'flex',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
gap: '0.5rem',
|
|
71
|
+
padding: '0.5rem 1rem',
|
|
72
|
+
width: '100%',
|
|
73
|
+
background: 'none',
|
|
74
|
+
border: 'none',
|
|
75
|
+
cursor: 'pointer',
|
|
76
|
+
color: 'var(--text-color)',
|
|
77
|
+
textAlign: 'left',
|
|
78
|
+
}, children: [item.icon, item.label] }, i))) })), onSignOut && (_jsx("div", { style: { borderTop: '1px solid var(--surface-border)', padding: '0.25rem 0' }, children: _jsxs("button", { type: "button", onClick: () => {
|
|
79
|
+
setOpen(false);
|
|
80
|
+
onSignOut();
|
|
81
|
+
}, style: {
|
|
82
|
+
display: 'flex',
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
gap: '0.5rem',
|
|
85
|
+
padding: '0.5rem 1rem',
|
|
86
|
+
width: '100%',
|
|
87
|
+
background: 'none',
|
|
88
|
+
border: 'none',
|
|
89
|
+
cursor: 'pointer',
|
|
90
|
+
color: 'var(--text-color)',
|
|
91
|
+
textAlign: 'left',
|
|
92
|
+
}, children: [_jsx("i", { className: PrimeIcons.SIGN_OUT, style: { fontSize: '0.875rem' } }), signOutLabel] }) }))] }))] }));
|
|
93
|
+
};
|
|
94
|
+
export default UserMenu;
|
|
95
|
+
//# sourceMappingURL=UserMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserMenu.js","sourceRoot":"","sources":["../../../src/components/auth/UserMenu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAuB3D,MAAM,QAAQ,GAA4B,CAAC,EACzC,IAAI,EACJ,KAAK,EACL,SAAS,EACT,YAAY,GAAG,eAAe,EAC9B,SAAS,GACV,EAAE,EAAE;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,CAAC,CAAa,EAAE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CAAC,CAAC;gCACf,SAAS,EAAE,CAAC;4BACd,CAAC,EACD,KAAK,EAAE;gCACL,OAAO,EAAE,MAAM;gCACf,UAAU,EAAE,QAAQ;gCACpB,GAAG,EAAE,QAAQ;gCACb,OAAO,EAAE,aAAa;gCACtB,KAAK,EAAE,MAAM;gCACb,UAAU,EAAE,MAAM;gCAClB,MAAM,EAAE,MAAM;gCACd,MAAM,EAAE,SAAS;gCACjB,KAAK,EAAE,mBAAmB;gCAC1B,SAAS,EAAE,MAAM;6BAClB,aAED,YAAG,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAI,EACrE,YAAY,IACN,GACL,CACP,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as LoginForm } from './LoginForm';
|
|
2
|
+
export type { LoginFormProps, LoginFormValues } from './LoginForm';
|
|
3
|
+
export { default as ForgotPasswordForm } from './ForgotPasswordForm';
|
|
4
|
+
export type { ForgotPasswordFormProps, ForgotPasswordFormValues } from './ForgotPasswordForm';
|
|
5
|
+
export { default as ResetPasswordForm } from './ResetPasswordForm';
|
|
6
|
+
export type { ResetPasswordFormProps, ResetPasswordFormValues } from './ResetPasswordForm';
|
|
7
|
+
export { default as ChangePasswordForm } from './ChangePasswordForm';
|
|
8
|
+
export type { ChangePasswordFormProps, ChangePasswordFormValues } from './ChangePasswordForm';
|
|
9
|
+
export { default as UserMenu } from './UserMenu';
|
|
10
|
+
export type { UserMenuProps, UserMenuUser, UserMenuItem } from './UserMenu';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as LoginForm } from './LoginForm';
|
|
2
|
+
export { default as ForgotPasswordForm } from './ForgotPasswordForm';
|
|
3
|
+
export { default as ResetPasswordForm } from './ResetPasswordForm';
|
|
4
|
+
export { default as ChangePasswordForm } from './ChangePasswordForm';
|
|
5
|
+
export { default as UserMenu } from './UserMenu';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Bar } from "react-chartjs-2";
|
|
3
|
+
import type { ChartOptions, ChartDataset } from "chart.js";
|
|
4
|
+
export type BarChartDataset = Omit<ChartDataset<"bar">, "data"> & {
|
|
5
|
+
data: number[];
|
|
6
|
+
};
|
|
7
|
+
export interface BarChartProps extends Omit<React.ComponentProps<typeof Bar>, "data" | "options"> {
|
|
8
|
+
labels: string[];
|
|
9
|
+
datasets: BarChartDataset[];
|
|
10
|
+
/** Deep-merged over sensible defaults. */
|
|
11
|
+
options?: ChartOptions<"bar">;
|
|
12
|
+
/** Color palette applied to datasets that don't specify their own colors. */
|
|
13
|
+
colors?: string[];
|
|
14
|
+
/** Container height in px. Default: 300. */
|
|
15
|
+
height?: number;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const BarChart: React.FC<BarChartProps>;
|
|
19
|
+
export default BarChart;
|
|
20
|
+
//# sourceMappingURL=BarChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/components/charts/BarChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,EAAa,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAOtE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,GAAG;IAChE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,0CAA0C;IAC1C,OAAO,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IAC9B,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmCrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Bar } from "react-chartjs-2";
|
|
4
|
+
import classNames from "classnames";
|
|
5
|
+
import { registerCharts } from "./chart-setup";
|
|
6
|
+
import { DEFAULT_COLORS, defaultBarOptions } from "./defaults";
|
|
7
|
+
registerCharts();
|
|
8
|
+
const BarChart = ({ labels, datasets, options, colors = DEFAULT_COLORS, height = 300, className, ...rest }) => {
|
|
9
|
+
const data = {
|
|
10
|
+
labels,
|
|
11
|
+
datasets: datasets.map((ds, i) => ({
|
|
12
|
+
backgroundColor: colors[i % colors.length] + "cc", // 80% opacity
|
|
13
|
+
borderColor: colors[i % colors.length],
|
|
14
|
+
borderWidth: 1,
|
|
15
|
+
borderRadius: 4,
|
|
16
|
+
...ds,
|
|
17
|
+
})),
|
|
18
|
+
};
|
|
19
|
+
const mergedOptions = {
|
|
20
|
+
...defaultBarOptions,
|
|
21
|
+
...options,
|
|
22
|
+
plugins: { ...defaultBarOptions.plugins, ...options?.plugins },
|
|
23
|
+
scales: { ...defaultBarOptions.scales, ...options?.scales },
|
|
24
|
+
};
|
|
25
|
+
return (_jsx("div", { className: classNames("mantis-core-chart mantis-core-chart--bar", className), style: { height }, children: _jsx(Bar, { data: data, options: mergedOptions, ...rest }) }));
|
|
26
|
+
};
|
|
27
|
+
export default BarChart;
|
|
28
|
+
//# sourceMappingURL=BarChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarChart.js","sourceRoot":"","sources":["../../../src/components/charts/BarChart.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/D,cAAc,EAAE,CAAC;AAmBjB,MAAM,QAAQ,GAA4B,CAAC,EACzC,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,GAAG,cAAc,EACvB,MAAM,GAAG,GAAG,EACZ,SAAS,EACT,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,IAAI,GAAqB;QAC7B,MAAM;QACN,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,eAAe,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,cAAc;YACjE,WAAW,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;YACtC,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;YACf,GAAG,EAAE;SACN,CAAC,CAAC;KACJ,CAAC;IAEF,MAAM,aAAa,GAAwB;QACzC,GAAG,iBAAiB;QACpB,GAAG,OAAO;QACV,OAAO,EAAE,EAAE,GAAG,iBAAiB,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;QAC9D,MAAM,EAAE,EAAE,GAAG,iBAAiB,CAAC,MAAM,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE;KAC5D,CAAC;IAEF,OAAO,CACL,cACE,SAAS,EAAE,UAAU,CAAC,0CAA0C,EAAE,SAAS,CAAC,EAC5E,KAAK,EAAE,EAAE,MAAM,EAAE,YAEjB,KAAC,GAAG,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,KAAM,IAAI,GAAI,GACjD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Doughnut } from "react-chartjs-2";
|
|
3
|
+
import type { ChartOptions } from "chart.js";
|
|
4
|
+
export interface DonutChartProps extends Omit<React.ComponentProps<typeof Doughnut>, "data" | "options"> {
|
|
5
|
+
labels: string[];
|
|
6
|
+
/** One value per label/slice. */
|
|
7
|
+
datasets: {
|
|
8
|
+
data: number[];
|
|
9
|
+
label?: string;
|
|
10
|
+
}[];
|
|
11
|
+
/** Deep-merged over sensible defaults. */
|
|
12
|
+
options?: ChartOptions<"doughnut">;
|
|
13
|
+
/** Color palette for slices. */
|
|
14
|
+
colors?: string[];
|
|
15
|
+
/** Container height in px. Default: 300. */
|
|
16
|
+
height?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const DonutChart: React.FC<DonutChartProps>;
|
|
20
|
+
export default DonutChart;
|
|
21
|
+
//# sourceMappingURL=DonutChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DonutChart.d.ts","sourceRoot":"","sources":["../../../src/components/charts/DonutChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,UAAU,CAAC;AAOxD,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/C,0CAA0C;IAC1C,OAAO,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiCzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Doughnut } from "react-chartjs-2";
|
|
4
|
+
import classNames from "classnames";
|
|
5
|
+
import { registerCharts } from "./chart-setup";
|
|
6
|
+
import { DEFAULT_COLORS, defaultDonutOptions } from "./defaults";
|
|
7
|
+
registerCharts();
|
|
8
|
+
const DonutChart = ({ labels, datasets, options, colors = DEFAULT_COLORS, height = 300, className, ...rest }) => {
|
|
9
|
+
const data = {
|
|
10
|
+
labels,
|
|
11
|
+
datasets: datasets.map((ds) => ({
|
|
12
|
+
backgroundColor: labels.map((_, i) => colors[i % colors.length] + "cc"),
|
|
13
|
+
borderColor: labels.map((_, i) => colors[i % colors.length]),
|
|
14
|
+
borderWidth: 1,
|
|
15
|
+
...ds,
|
|
16
|
+
})),
|
|
17
|
+
};
|
|
18
|
+
const mergedOptions = {
|
|
19
|
+
...defaultDonutOptions,
|
|
20
|
+
...options,
|
|
21
|
+
plugins: { ...defaultDonutOptions.plugins, ...options?.plugins },
|
|
22
|
+
};
|
|
23
|
+
return (_jsx("div", { className: classNames("mantis-core-chart mantis-core-chart--donut", className), style: { height }, children: _jsx(Doughnut, { data: data, options: mergedOptions, ...rest }) }));
|
|
24
|
+
};
|
|
25
|
+
export default DonutChart;
|
|
26
|
+
//# sourceMappingURL=DonutChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DonutChart.js","sourceRoot":"","sources":["../../../src/components/charts/DonutChart.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjE,cAAc,EAAE,CAAC;AAgBjB,MAAM,UAAU,GAA8B,CAAC,EAC7C,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,GAAG,cAAc,EACvB,MAAM,GAAG,GAAG,EACZ,SAAS,EACT,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,IAAI,GAA0B;QAClC,MAAM;QACN,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YAC9B,eAAe,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;YACvE,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5D,WAAW,EAAE,CAAC;YACd,GAAG,EAAE;SACN,CAAC,CAAC;KACJ,CAAC;IAEF,MAAM,aAAa,GAA6B;QAC9C,GAAG,mBAAmB;QACtB,GAAG,OAAO;QACV,OAAO,EAAE,EAAE,GAAG,mBAAmB,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;KACjE,CAAC;IAEF,OAAO,CACL,cACE,SAAS,EAAE,UAAU,CAAC,4CAA4C,EAAE,SAAS,CAAC,EAC9E,KAAK,EAAE,EAAE,MAAM,EAAE,YAEjB,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,KAAM,IAAI,GAAI,GACtD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Line } from "react-chartjs-2";
|
|
3
|
+
import type { ChartOptions, ChartDataset } from "chart.js";
|
|
4
|
+
export type LineChartDataset = Omit<ChartDataset<"line">, "data"> & {
|
|
5
|
+
data: number[];
|
|
6
|
+
};
|
|
7
|
+
export interface LineChartProps extends Omit<React.ComponentProps<typeof Line>, "data" | "options"> {
|
|
8
|
+
labels: string[];
|
|
9
|
+
datasets: LineChartDataset[];
|
|
10
|
+
/** Deep-merged over sensible defaults. */
|
|
11
|
+
options?: ChartOptions<"line">;
|
|
12
|
+
/** Color palette applied to datasets that don't specify their own colors. */
|
|
13
|
+
colors?: string[];
|
|
14
|
+
/** Container height in px. Default: 300. */
|
|
15
|
+
height?: number;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const LineChart: React.FC<LineChartProps>;
|
|
19
|
+
export default LineChart;
|
|
20
|
+
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/components/charts/LineChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,EAAa,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAOtE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG;IAClE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,0CAA0C;IAC1C,OAAO,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC/B,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkCvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Line } from "react-chartjs-2";
|
|
4
|
+
import classNames from "classnames";
|
|
5
|
+
import { registerCharts } from "./chart-setup";
|
|
6
|
+
import { DEFAULT_COLORS, defaultLineOptions } from "./defaults";
|
|
7
|
+
registerCharts();
|
|
8
|
+
const LineChart = ({ labels, datasets, options, colors = DEFAULT_COLORS, height = 300, className, ...rest }) => {
|
|
9
|
+
const data = {
|
|
10
|
+
labels,
|
|
11
|
+
datasets: datasets.map((ds, i) => ({
|
|
12
|
+
borderColor: colors[i % colors.length],
|
|
13
|
+
backgroundColor: colors[i % colors.length] + "33", // 20% opacity fill
|
|
14
|
+
tension: 0.3,
|
|
15
|
+
...ds,
|
|
16
|
+
})),
|
|
17
|
+
};
|
|
18
|
+
const mergedOptions = {
|
|
19
|
+
...defaultLineOptions,
|
|
20
|
+
...options,
|
|
21
|
+
plugins: { ...defaultLineOptions.plugins, ...options?.plugins },
|
|
22
|
+
scales: { ...defaultLineOptions.scales, ...options?.scales },
|
|
23
|
+
};
|
|
24
|
+
return (_jsx("div", { className: classNames("mantis-core-chart mantis-core-chart--line", className), style: { height }, children: _jsx(Line, { data: data, options: mergedOptions, ...rest }) }));
|
|
25
|
+
};
|
|
26
|
+
export default LineChart;
|
|
27
|
+
//# sourceMappingURL=LineChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.js","sourceRoot":"","sources":["../../../src/components/charts/LineChart.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhE,cAAc,EAAE,CAAC;AAmBjB,MAAM,SAAS,GAA6B,CAAC,EAC3C,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,GAAG,cAAc,EACvB,MAAM,GAAG,GAAG,EACZ,SAAS,EACT,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,IAAI,GAAsB;QAC9B,MAAM;QACN,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACjC,WAAW,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;YACtC,eAAe,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,mBAAmB;YACtE,OAAO,EAAE,GAAG;YACZ,GAAG,EAAE;SACN,CAAC,CAAC;KACJ,CAAC;IAEF,MAAM,aAAa,GAAyB;QAC1C,GAAG,kBAAkB;QACrB,GAAG,OAAO;QACV,OAAO,EAAE,EAAE,GAAG,kBAAkB,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;QAC/D,MAAM,EAAE,EAAE,GAAG,kBAAkB,CAAC,MAAM,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE;KAC7D,CAAC;IAEF,OAAO,CACL,cACE,SAAS,EAAE,UAAU,CAAC,2CAA2C,EAAE,SAAS,CAAC,EAC7E,KAAK,EAAE,EAAE,MAAM,EAAE,YAEjB,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,KAAM,IAAI,GAAI,GAClD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-setup.d.ts","sourceRoot":"","sources":["../../../src/components/charts/chart-setup.ts"],"names":[],"mappings":"AAgBA,sEAAsE;AACtE,wBAAgB,cAAc,IAAI,IAAI,CAerC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement, BarElement, ArcElement, Title, Tooltip, Legend, Filler, } from "chart.js";
|
|
2
|
+
let registered = false;
|
|
3
|
+
/** Register chart.js controllers/elements/scales once. Idempotent. */
|
|
4
|
+
export function registerCharts() {
|
|
5
|
+
if (registered)
|
|
6
|
+
return;
|
|
7
|
+
ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, BarElement, ArcElement, Title, Tooltip, Legend, Filler);
|
|
8
|
+
registered = true;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=chart-setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-setup.js","sourceRoot":"","sources":["../../../src/components/charts/chart-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,OAAO,EAChB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,GACP,MAAM,UAAU,CAAC;AAElB,IAAI,UAAU,GAAG,KAAK,CAAC;AAEvB,sEAAsE;AACtE,MAAM,UAAU,cAAc;IAC5B,IAAI,UAAU;QAAE,OAAO;IACvB,OAAO,CAAC,QAAQ,CACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,CACP,CAAC;IACF,UAAU,GAAG,IAAI,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ChartOptions } from "chart.js";
|
|
2
|
+
/** Default color palette (hex). Override via `colors` prop or CSS tokens at runtime. */
|
|
3
|
+
export declare const DEFAULT_COLORS: string[];
|
|
4
|
+
/**
|
|
5
|
+
* Resolve a CSS custom property value at runtime (browser-only).
|
|
6
|
+
* Returns null when called on the server or when the property is not set.
|
|
7
|
+
* // ponytail: guard keeps this SSR-safe; token resolution is a nicety
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveCssToken(token: string): string | null;
|
|
10
|
+
export declare const defaultLineOptions: ChartOptions<"line">;
|
|
11
|
+
export declare const defaultBarOptions: ChartOptions<"bar">;
|
|
12
|
+
export declare const defaultDonutOptions: ChartOptions<"doughnut">;
|
|
13
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/components/charts/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,wFAAwF;AACxF,eAAO,MAAM,cAAc,UAS1B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG5D;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,MAAM,CAWnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,KAAK,CAWjD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,UAAU,CAOxD,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Default color palette (hex). Override via `colors` prop or CSS tokens at runtime. */
|
|
2
|
+
export const DEFAULT_COLORS = [
|
|
3
|
+
"#6366f1", // indigo
|
|
4
|
+
"#22d3ee", // cyan
|
|
5
|
+
"#f59e0b", // amber
|
|
6
|
+
"#10b981", // emerald
|
|
7
|
+
"#f43f5e", // rose
|
|
8
|
+
"#a78bfa", // violet
|
|
9
|
+
"#fb923c", // orange
|
|
10
|
+
"#34d399", // green
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* Resolve a CSS custom property value at runtime (browser-only).
|
|
14
|
+
* Returns null when called on the server or when the property is not set.
|
|
15
|
+
* // ponytail: guard keeps this SSR-safe; token resolution is a nicety
|
|
16
|
+
*/
|
|
17
|
+
export function resolveCssToken(token) {
|
|
18
|
+
if (typeof window === "undefined")
|
|
19
|
+
return null;
|
|
20
|
+
return getComputedStyle(document.documentElement).getPropertyValue(token).trim() || null;
|
|
21
|
+
}
|
|
22
|
+
export const defaultLineOptions = {
|
|
23
|
+
responsive: true,
|
|
24
|
+
maintainAspectRatio: false,
|
|
25
|
+
plugins: {
|
|
26
|
+
legend: { position: "top" },
|
|
27
|
+
tooltip: { mode: "index", intersect: false },
|
|
28
|
+
},
|
|
29
|
+
scales: {
|
|
30
|
+
x: { grid: { display: false } },
|
|
31
|
+
y: { beginAtZero: true },
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export const defaultBarOptions = {
|
|
35
|
+
responsive: true,
|
|
36
|
+
maintainAspectRatio: false,
|
|
37
|
+
plugins: {
|
|
38
|
+
legend: { position: "top" },
|
|
39
|
+
tooltip: { mode: "index", intersect: false },
|
|
40
|
+
},
|
|
41
|
+
scales: {
|
|
42
|
+
x: { grid: { display: false } },
|
|
43
|
+
y: { beginAtZero: true },
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export const defaultDonutOptions = {
|
|
47
|
+
responsive: true,
|
|
48
|
+
maintainAspectRatio: false,
|
|
49
|
+
plugins: {
|
|
50
|
+
legend: { position: "right" },
|
|
51
|
+
tooltip: { mode: "nearest" },
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/components/charts/defaults.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,QAAQ;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC;AAC3F,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAyB;IACtD,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,KAAK;IAC1B,OAAO,EAAE;QACP,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;KAC7C;IACD,MAAM,EAAE;QACN,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QAC/B,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;KACzB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,KAAK;IAC1B,OAAO,EAAE;QACP,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;KAC7C;IACD,MAAM,EAAE;QACN,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QAC/B,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;KACzB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAA6B;IAC3D,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,KAAK;IAC1B,OAAO,EAAE;QACP,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;QAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC7B;CACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as LineChart } from "./LineChart";
|
|
2
|
+
export type { LineChartProps, LineChartDataset } from "./LineChart";
|
|
3
|
+
export { default as BarChart } from "./BarChart";
|
|
4
|
+
export type { BarChartProps, BarChartDataset } from "./BarChart";
|
|
5
|
+
export { default as DonutChart } from "./DonutChart";
|
|
6
|
+
export type { DonutChartProps } from "./DonutChart";
|
|
7
|
+
export { registerCharts } from "./chart-setup";
|
|
8
|
+
export { DEFAULT_COLORS } from "./defaults";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as LineChart } from "./LineChart";
|
|
2
|
+
export { default as BarChart } from "./BarChart";
|
|
3
|
+
export { default as DonutChart } from "./DonutChart";
|
|
4
|
+
export { registerCharts } from "./chart-setup";
|
|
5
|
+
export { DEFAULT_COLORS } from "./defaults";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAGnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
type DescriptionListProps = React.HTMLAttributes<HTMLDListElement> & {
|
|
3
|
+
items: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: ReactNode;
|
|
6
|
+
}[];
|
|
7
|
+
columns?: 1 | 2 | 3;
|
|
8
|
+
};
|
|
9
|
+
declare const DescriptionList: React.FC<DescriptionListProps>;
|
|
10
|
+
export default DescriptionList;
|
|
11
|
+
//# sourceMappingURL=DescriptionList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionList.d.ts","sourceRoot":"","sources":["../../../src/components/data/DescriptionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9C,KAAK,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,GAAG;IACnE,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,EAAE,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB,CAAC;AAQF,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmCnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
const colTemplates = {
|
|
4
|
+
1: "1fr",
|
|
5
|
+
2: "1fr 1fr",
|
|
6
|
+
3: "1fr 1fr 1fr",
|
|
7
|
+
};
|
|
8
|
+
const DescriptionList = ({ items, columns = 1, className, ...rest }) => (_jsx("dl", { className: classNames("mantis-core-description-list", className), style: {
|
|
9
|
+
display: "grid",
|
|
10
|
+
gridTemplateColumns: colTemplates[columns],
|
|
11
|
+
gap: "12px 24px",
|
|
12
|
+
margin: 0,
|
|
13
|
+
padding: 0,
|
|
14
|
+
}, ...rest, children: items.map((item, i) => (_jsxs("div", { children: [_jsx("dt", { style: {
|
|
15
|
+
fontSize: "12px",
|
|
16
|
+
fontWeight: 600,
|
|
17
|
+
textTransform: "uppercase",
|
|
18
|
+
letterSpacing: "0.05em",
|
|
19
|
+
color: "var(--muted-foreground)",
|
|
20
|
+
marginBottom: "2px",
|
|
21
|
+
}, children: item.label }), _jsx("dd", { style: { margin: 0, fontSize: "14px" }, children: item.value })] }, i))) }));
|
|
22
|
+
export default DescriptionList;
|
|
23
|
+
//# sourceMappingURL=DescriptionList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DescriptionList.js","sourceRoot":"","sources":["../../../src/components/data/DescriptionList.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AAOpC,MAAM,YAAY,GAA8B;IAC9C,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,aAAa;CACjB,CAAC;AAEF,MAAM,eAAe,GAAmC,CAAC,EACvD,KAAK,EACL,OAAO,GAAG,CAAC,EACX,SAAS,EACT,GAAG,IAAI,EACR,EAAE,EAAE,CAAC,CACJ,aACE,SAAS,EAAE,UAAU,CAAC,8BAA8B,EAAE,SAAS,CAAC,EAChE,KAAK,EAAE;QACL,OAAO,EAAE,MAAM;QACf,mBAAmB,EAAE,YAAY,CAAC,OAAO,CAAC;QAC1C,GAAG,EAAE,WAAW;QAChB,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;KACX,KACG,IAAI,YAEP,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,0BACE,aACE,KAAK,EAAE;oBACL,QAAQ,EAAE,MAAM;oBAChB,UAAU,EAAE,GAAG;oBACf,aAAa,EAAE,WAAW;oBAC1B,aAAa,EAAE,QAAQ;oBACvB,KAAK,EAAE,yBAAyB;oBAChC,YAAY,EAAE,KAAK;iBACpB,YAEA,IAAI,CAAC,KAAK,GACR,EACL,aAAI,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAG,IAAI,CAAC,KAAK,GAAM,KAbrD,CAAC,CAcL,CACP,CAAC,GACC,CACN,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
type StatCardProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
label: string;
|
|
4
|
+
value: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
trend?: {
|
|
7
|
+
value: number;
|
|
8
|
+
direction: "up" | "down";
|
|
9
|
+
};
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
declare const StatCard: React.FC<StatCardProps>;
|
|
13
|
+
export default StatCard;
|
|
14
|
+
//# sourceMappingURL=StatCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatCard.d.ts","sourceRoot":"","sources":["../../../src/components/data/StatCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9C,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,IAAI,GAAG,MAAM,CAAA;KAAE,CAAC;IACpD,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
const StatCard = ({ label, value, icon, trend, footer, className, ...rest }) => (_jsxs("div", { className: classNames("mantis-core-stat-card", className), style: {
|
|
4
|
+
background: "var(--card)",
|
|
5
|
+
border: "1px solid var(--border)",
|
|
6
|
+
borderRadius: "8px",
|
|
7
|
+
padding: "20px",
|
|
8
|
+
}, ...rest, children: [_jsxs("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "12px" }, children: [_jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [_jsx("p", { style: {
|
|
9
|
+
margin: 0,
|
|
10
|
+
fontSize: "12px",
|
|
11
|
+
fontWeight: 600,
|
|
12
|
+
textTransform: "uppercase",
|
|
13
|
+
letterSpacing: "0.05em",
|
|
14
|
+
color: "var(--muted-foreground)",
|
|
15
|
+
}, children: label }), _jsx("p", { style: {
|
|
16
|
+
margin: "6px 0 0",
|
|
17
|
+
fontSize: "28px",
|
|
18
|
+
fontWeight: 700,
|
|
19
|
+
lineHeight: 1.1,
|
|
20
|
+
color: "var(--foreground, inherit)",
|
|
21
|
+
}, children: value })] }), icon && (_jsx("span", { style: {
|
|
22
|
+
flexShrink: 0,
|
|
23
|
+
color: "var(--primary)",
|
|
24
|
+
display: "flex",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
}, children: icon }))] }), trend && (_jsxs("p", { style: {
|
|
27
|
+
margin: "10px 0 0",
|
|
28
|
+
fontSize: "13px",
|
|
29
|
+
fontWeight: 500,
|
|
30
|
+
color: trend.direction === "up" ? "green" : "red",
|
|
31
|
+
}, children: [trend.direction === "up" ? "▲" : "▼", " ", trend.value, "%"] })), footer && (_jsx("div", { style: {
|
|
32
|
+
marginTop: "12px",
|
|
33
|
+
paddingTop: "12px",
|
|
34
|
+
borderTop: "1px solid var(--border)",
|
|
35
|
+
color: "var(--muted-foreground)",
|
|
36
|
+
fontSize: "13px",
|
|
37
|
+
}, children: footer }))] }));
|
|
38
|
+
export default StatCard;
|
|
39
|
+
//# sourceMappingURL=StatCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatCard.js","sourceRoot":"","sources":["../../../src/components/data/StatCard.tsx"],"names":[],"mappings":";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EAAE,GAAG;gBACf,KAAK,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;aAClD,aAEA,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,OAAG,KAAK,CAAC,KAAK,SACjD,CACL,EAEA,MAAM,IAAI,CACT,cACE,KAAK,EAAE;gBACL,SAAS,EAAE,MAAM;gBACjB,UAAU,EAAE,MAAM;gBAClB,SAAS,EAAE,yBAAyB;gBACpC,KAAK,EAAE,yBAAyB;gBAChC,QAAQ,EAAE,MAAM;aACjB,YAEA,MAAM,GACH,CACP,IACG,CACP,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
import { type TimelineProps as PrimeTimelineProps } from "primereact/timeline";
|
|
3
|
+
type TimelineItem = {
|
|
4
|
+
date?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
color?: string;
|
|
9
|
+
};
|
|
10
|
+
type TimelineProps = Omit<PrimeTimelineProps, "value" | "content" | "marker"> & {
|
|
11
|
+
items: TimelineItem[];
|
|
12
|
+
};
|
|
13
|
+
declare const Timeline: React.FC<TimelineProps>;
|
|
14
|
+
export default Timeline;
|
|
15
|
+
//# sourceMappingURL=Timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../src/components/data/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAA6B,KAAK,aAAa,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE1G,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,aAAa,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC,GAAG;IAC9E,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkDrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Timeline as PrimeTimeline } from "primereact/timeline";
|
|
3
|
+
const Timeline = ({ items, ...rest }) => (_jsx("div", { className: "mantis-core-timeline", children: _jsx(PrimeTimeline, { value: items, content: (item) => (_jsxs("div", { style: { paddingBottom: "12px" }, children: [_jsx("p", { style: { margin: 0, fontWeight: 600, fontSize: "14px" }, children: item.title }), item.description && (_jsx("p", { style: { margin: "4px 0 0", fontSize: "13px", color: "var(--muted-foreground)" }, children: item.description })), item.date && (_jsx("p", { style: { margin: "4px 0 0", fontSize: "12px", color: "var(--muted-foreground)" }, children: item.date }))] })), marker: (item) => item.icon ? (_jsx("span", { style: {
|
|
4
|
+
display: "flex",
|
|
5
|
+
alignItems: "center",
|
|
6
|
+
justifyContent: "center",
|
|
7
|
+
width: "28px",
|
|
8
|
+
height: "28px",
|
|
9
|
+
borderRadius: "50%",
|
|
10
|
+
background: item.color ?? "var(--primary)",
|
|
11
|
+
color: "white",
|
|
12
|
+
}, children: item.icon })) : (_jsx("span", { style: {
|
|
13
|
+
display: "block",
|
|
14
|
+
width: "12px",
|
|
15
|
+
height: "12px",
|
|
16
|
+
borderRadius: "50%",
|
|
17
|
+
background: item.color ?? "var(--primary)",
|
|
18
|
+
} })), ...rest }) }));
|
|
19
|
+
export default Timeline;
|
|
20
|
+
//# sourceMappingURL=Timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../../../src/components/data/Timeline.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,IAAI,aAAa,EAA4C,MAAM,qBAAqB,CAAC;AAc1G,MAAM,QAAQ,GAA4B,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAChE,cAAK,SAAS,EAAC,sBAAsB,YACnC,KAAC,aAAa,IACZ,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,CAAC,IAAkB,EAAE,EAAE,CAAC,CAC/B,eAAK,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,aACnC,YAAG,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAG,IAAI,CAAC,KAAK,GAAK,EAC3E,IAAI,CAAC,WAAW,IAAI,CACnB,YAAG,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAChF,IAAI,CAAC,WAAW,GACf,CACL,EACA,IAAI,CAAC,IAAI,IAAI,CACZ,YAAG,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAChF,IAAI,CAAC,IAAI,GACR,CACL,IACG,CACP,EACD,MAAM,EAAE,CAAC,IAAkB,EAAE,EAAE,CAC7B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACV,eACE,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,QAAQ;gBACxB,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gB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