@axtec/components 0.1.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/Accordion/Accordion.d.ts +12 -0
- package/dist/components/ActionBar/ActionBar.d.ts +10 -0
- package/dist/components/ActionBar/index.d.ts +1 -0
- package/dist/components/ActionLayout/ActionLayout.d.ts +15 -0
- package/dist/components/ActionLayout/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +9 -0
- package/dist/components/AlertBox/AlertBox.d.ts +15 -0
- package/dist/components/AlertBox/index.d.ts +1 -0
- package/dist/components/AlertModal/AlertModal.d.ts +14 -0
- package/dist/components/AlertModal/index.d.ts +1 -0
- package/dist/components/AutoComplete/AutoComplete.d.ts +17 -0
- package/dist/components/AutoComplete/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +8 -0
- package/dist/components/AvatarCard/AvatarCard.d.ts +27 -0
- package/dist/components/AvatarCard/index.d.ts +1 -0
- package/dist/components/AverageRating/AverageRating.d.ts +8 -0
- package/dist/components/AverageRating/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +9 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +15 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +11 -0
- package/dist/components/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +56 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/ConfirmModal/ConfirmModal.d.ts +18 -0
- package/dist/components/ConfirmModal/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +10 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +21 -0
- package/dist/components/EmptyData/EmptyData.d.ts +9 -0
- package/dist/components/EmptyData/index.d.ts +1 -0
- package/dist/components/FileUploader/FileUploader.d.ts +10 -0
- package/dist/components/FileUploader/index.d.ts +1 -0
- package/dist/components/IconButton/IconButton.d.ts +7 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +13 -0
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/ImageGrid/ImageGrid.d.ts +19 -0
- package/dist/components/ImageGrid/index.d.ts +1 -0
- package/dist/components/ImageUploading/ImageUploading.d.ts +7 -0
- package/dist/components/ImageUploading/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +7 -0
- package/dist/components/LinkButton/LinkButton.d.ts +15 -0
- package/dist/components/LinkButton/index.d.ts +1 -0
- package/dist/components/Loader/Loader.d.ts +6 -0
- package/dist/components/LoadingModal/LoadingModal.d.ts +6 -0
- package/dist/components/LoadingModal/index.d.ts +1 -0
- package/dist/components/Logo/AxtecLogo.d.ts +5 -0
- package/dist/components/Logo/MyHomeVaultLogo.d.ts +5 -0
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/LogoLoader/LogoLoader.d.ts +5 -0
- package/dist/components/LogoLoader/index.d.ts +1 -0
- package/dist/components/MenuText/MenuText.d.ts +7 -0
- package/dist/components/MenuText/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +10 -0
- package/dist/components/MultiItemSelect/MultiItemSelect.d.ts +13 -0
- package/dist/components/MultiItemSelect/index.d.ts +1 -0
- package/dist/components/Notification/Notification.d.ts +11 -0
- package/dist/components/Notification/index.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +8 -0
- package/dist/components/Panel/Panel.d.ts +40 -0
- package/dist/components/Panel/index.d.ts +1 -0
- package/dist/components/PhotoLibrary/PhotoLibrary.d.ts +14 -0
- package/dist/components/PhotoLibrary/index.d.ts +1 -0
- package/dist/components/Pill/Pill.d.ts +11 -0
- package/dist/components/Pill/index.d.ts +1 -0
- package/dist/components/Progress/Progress.d.ts +10 -0
- package/dist/components/QuickActions/QuickActions.d.ts +8 -0
- package/dist/components/QuickActions/index.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +15 -0
- package/dist/components/Rating/Rating.d.ts +11 -0
- package/dist/components/Rating/index.d.ts +1 -0
- package/dist/components/Row/Row.d.ts +10 -0
- package/dist/components/Row/index.d.ts +1 -0
- package/dist/components/ScrollableModal/ScrollableModal.d.ts +17 -0
- package/dist/components/ScrollableModal/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Skeleton/Skeleton.d.ts +18 -0
- package/dist/components/StatisticsChart/StatisticsChart.d.ts +43 -0
- package/dist/components/StatisticsChart/index.d.ts +1 -0
- package/dist/components/StatisticsLegend/StatisticsLegend.d.ts +22 -0
- package/dist/components/StatisticsLegend/index.d.ts +1 -0
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +21 -0
- package/dist/components/StatusIndicator/index.d.ts +1 -0
- package/dist/components/StepList/StepList.d.ts +8 -0
- package/dist/components/StepList/index.d.ts +1 -0
- package/dist/components/TabView/TabView.d.ts +17 -0
- package/dist/components/TabView/index.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +19 -0
- package/dist/components/Tabs/Tabs.d.ts +16 -0
- package/dist/components/TaskList/TaskList.d.ts +20 -0
- package/dist/components/TaskList/index.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +7 -0
- package/dist/components/Toggle/Toggle.d.ts +10 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +8 -0
- package/dist/components/ToggleButton/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +9 -0
- package/dist/components/TrendIndicator/TrendIndicator.d.ts +8 -0
- package/dist/components/TrendIndicator/index.d.ts +1 -0
- package/dist/components/Typography/CardHeading.d.ts +6 -0
- package/dist/components/Typography/PageHeading.d.ts +6 -0
- package/dist/components/Typography/SectionHeading.d.ts +10 -0
- package/dist/components/Typography/SubsectionHeading.d.ts +6 -0
- package/dist/components/Typography/Text.d.ts +10 -0
- package/dist/components/Typography/index.d.ts +5 -0
- package/dist/components/index.d.ts +62 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/index10.js +104 -0
- package/dist/index10.js.map +1 -0
- package/dist/index11.js +42 -0
- package/dist/index11.js.map +1 -0
- package/dist/index12.js +82 -0
- package/dist/index12.js.map +1 -0
- package/dist/index13.js +28 -0
- package/dist/index13.js.map +1 -0
- package/dist/index14.js +22 -0
- package/dist/index14.js.map +1 -0
- package/dist/index15.js +42 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.js +76 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.js +53 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.js +16 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.js +157 -0
- package/dist/index19.js.map +1 -0
- package/dist/index20.js +21 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.js +49 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.js +53 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.js +82 -0
- package/dist/index23.js.map +1 -0
- package/dist/index24.js +223 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.js +55 -0
- package/dist/index25.js.map +1 -0
- package/dist/index26.js +81 -0
- package/dist/index26.js.map +1 -0
- package/dist/index27.js +27 -0
- package/dist/index27.js.map +1 -0
- package/dist/index28.js +81 -0
- package/dist/index28.js.map +1 -0
- package/dist/index29.js +36 -0
- package/dist/index29.js.map +1 -0
- package/dist/index3.js +9 -0
- package/dist/index3.js.map +1 -0
- package/dist/index30.js +95 -0
- package/dist/index30.js.map +1 -0
- package/dist/index31.js +63 -0
- package/dist/index31.js.map +1 -0
- package/dist/index32.js +48 -0
- package/dist/index32.js.map +1 -0
- package/dist/index33.js +51 -0
- package/dist/index33.js.map +1 -0
- package/dist/index34.js +55 -0
- package/dist/index34.js.map +1 -0
- package/dist/index35.js +31 -0
- package/dist/index35.js.map +1 -0
- package/dist/index36.js +57 -0
- package/dist/index36.js.map +1 -0
- package/dist/index37.js +52 -0
- package/dist/index37.js.map +1 -0
- package/dist/index38.js +16 -0
- package/dist/index38.js.map +1 -0
- package/dist/index39.js +85 -0
- package/dist/index39.js.map +1 -0
- package/dist/index4.js +36 -0
- package/dist/index4.js.map +1 -0
- package/dist/index40.js +52 -0
- package/dist/index40.js.map +1 -0
- package/dist/index41.js +22 -0
- package/dist/index41.js.map +1 -0
- package/dist/index42.js +37 -0
- package/dist/index42.js.map +1 -0
- package/dist/index43.js +18 -0
- package/dist/index43.js.map +1 -0
- package/dist/index44.js +94 -0
- package/dist/index44.js.map +1 -0
- package/dist/index45.js +72 -0
- package/dist/index45.js.map +1 -0
- package/dist/index46.js +125 -0
- package/dist/index46.js.map +1 -0
- package/dist/index47.js +43 -0
- package/dist/index47.js.map +1 -0
- package/dist/index48.js +59 -0
- package/dist/index48.js.map +1 -0
- package/dist/index49.js +19 -0
- package/dist/index49.js.map +1 -0
- package/dist/index5.js +24 -0
- package/dist/index5.js.map +1 -0
- package/dist/index50.js +68 -0
- package/dist/index50.js.map +1 -0
- package/dist/index51.js +57 -0
- package/dist/index51.js.map +1 -0
- package/dist/index52.js +40 -0
- package/dist/index52.js.map +1 -0
- package/dist/index53.js +69 -0
- package/dist/index53.js.map +1 -0
- package/dist/index54.js +25 -0
- package/dist/index54.js.map +1 -0
- package/dist/index55.js +107 -0
- package/dist/index55.js.map +1 -0
- package/dist/index56.js +71 -0
- package/dist/index56.js.map +1 -0
- package/dist/index57.js +239 -0
- package/dist/index57.js.map +1 -0
- package/dist/index58.js +105 -0
- package/dist/index58.js.map +1 -0
- package/dist/index59.js +39 -0
- package/dist/index59.js.map +1 -0
- package/dist/index6.js +47 -0
- package/dist/index6.js.map +1 -0
- package/dist/index60.js +21 -0
- package/dist/index60.js.map +1 -0
- package/dist/index61.js +63 -0
- package/dist/index61.js.map +1 -0
- package/dist/index62.js +64 -0
- package/dist/index62.js.map +1 -0
- package/dist/index63.js +78 -0
- package/dist/index63.js.map +1 -0
- package/dist/index64.js +112 -0
- package/dist/index64.js.map +1 -0
- package/dist/index65.js +43 -0
- package/dist/index65.js.map +1 -0
- package/dist/index66.js +51 -0
- package/dist/index66.js.map +1 -0
- package/dist/index67.js +79 -0
- package/dist/index67.js.map +1 -0
- package/dist/index68.js +57 -0
- package/dist/index68.js.map +1 -0
- package/dist/index69.js +71 -0
- package/dist/index69.js.map +1 -0
- package/dist/index7.js +80 -0
- package/dist/index7.js.map +1 -0
- package/dist/index70.js +39 -0
- package/dist/index70.js.map +1 -0
- package/dist/index71.js +17 -0
- package/dist/index71.js.map +1 -0
- package/dist/index72.js +2267 -0
- package/dist/index72.js.map +1 -0
- package/dist/index8.js +82 -0
- package/dist/index8.js.map +1 -0
- package/dist/index9.js +97 -0
- package/dist/index9.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/logos/axtec-logo.png +0 -0
- package/dist/logos/mhv-icon.svg +5 -0
- package/dist/logos/mhv-logo.png +0 -0
- package/dist/logos/mhv-logo.svg +23 -0
- package/package.json +63 -0
package/dist/index7.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as e } from "./index3.js";
|
|
3
|
+
import { InformationCircleIcon as m, ExclamationTriangleIcon as d, ExclamationCircleIcon as x, CheckCircleIcon as b, XMarkIcon as f } from "@heroicons/react/20/solid";
|
|
4
|
+
const g = {
|
|
5
|
+
success: {
|
|
6
|
+
container: "bg-green-50 border-green-200",
|
|
7
|
+
icon: "text-green-500",
|
|
8
|
+
title: "text-green-800",
|
|
9
|
+
content: "text-green-700"
|
|
10
|
+
},
|
|
11
|
+
error: {
|
|
12
|
+
container: "bg-red-50 border-red-200",
|
|
13
|
+
icon: "text-red-500",
|
|
14
|
+
title: "text-red-800",
|
|
15
|
+
content: "text-red-700"
|
|
16
|
+
},
|
|
17
|
+
warning: {
|
|
18
|
+
container: "bg-yellow-50 border-yellow-200",
|
|
19
|
+
icon: "text-yellow-500",
|
|
20
|
+
title: "text-yellow-800",
|
|
21
|
+
content: "text-yellow-700"
|
|
22
|
+
},
|
|
23
|
+
info: {
|
|
24
|
+
container: "bg-blue-50 border-blue-200",
|
|
25
|
+
icon: "text-blue-500",
|
|
26
|
+
title: "text-blue-800",
|
|
27
|
+
content: "text-blue-700"
|
|
28
|
+
}
|
|
29
|
+
}, u = {
|
|
30
|
+
success: b,
|
|
31
|
+
error: x,
|
|
32
|
+
warning: d,
|
|
33
|
+
info: m
|
|
34
|
+
};
|
|
35
|
+
function y({
|
|
36
|
+
variant: c = "info",
|
|
37
|
+
title: o,
|
|
38
|
+
children: l,
|
|
39
|
+
onClose: i,
|
|
40
|
+
className: s
|
|
41
|
+
}) {
|
|
42
|
+
const n = g[c], a = u[c];
|
|
43
|
+
return /* @__PURE__ */ r(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
className: e(
|
|
47
|
+
"flex gap-3 p-4 rounded-lg border",
|
|
48
|
+
n.container,
|
|
49
|
+
s
|
|
50
|
+
),
|
|
51
|
+
role: "alert",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ t(a, { className: e("h-5 w-5 flex-shrink-0 mt-0.5", n.icon) }),
|
|
54
|
+
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
|
|
55
|
+
o && /* @__PURE__ */ t("h3", { className: e("text-sm font-semibold", n.title), children: o }),
|
|
56
|
+
l && /* @__PURE__ */ t("div", { className: e("text-sm", n.content, o && "mt-1"), children: l })
|
|
57
|
+
] }),
|
|
58
|
+
i && /* @__PURE__ */ r(
|
|
59
|
+
"button",
|
|
60
|
+
{
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: i,
|
|
63
|
+
className: e(
|
|
64
|
+
"flex-shrink-0 p-1 rounded-lg transition-colors duration-200",
|
|
65
|
+
"hover:bg-black/5 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500"
|
|
66
|
+
),
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ t(f, { className: e("h-5 w-5", n.icon) }),
|
|
69
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: "Dismiss" })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
y as Alert
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=index7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index7.js","sources":["../src/components/Alert/Alert.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\nimport {\n CheckCircleIcon,\n ExclamationCircleIcon,\n ExclamationTriangleIcon,\n InformationCircleIcon,\n XMarkIcon,\n} from '@heroicons/react/20/solid'\nimport type { ReactNode } from 'react'\n\nexport interface AlertProps {\n variant?: 'success' | 'error' | 'warning' | 'info'\n title?: string\n children?: ReactNode\n onClose?: () => void\n className?: string\n}\n\nconst variantStyles = {\n success: {\n container: 'bg-green-50 border-green-200',\n icon: 'text-green-500',\n title: 'text-green-800',\n content: 'text-green-700',\n },\n error: {\n container: 'bg-red-50 border-red-200',\n icon: 'text-red-500',\n title: 'text-red-800',\n content: 'text-red-700',\n },\n warning: {\n container: 'bg-yellow-50 border-yellow-200',\n icon: 'text-yellow-500',\n title: 'text-yellow-800',\n content: 'text-yellow-700',\n },\n info: {\n container: 'bg-blue-50 border-blue-200',\n icon: 'text-blue-500',\n title: 'text-blue-800',\n content: 'text-blue-700',\n },\n}\n\nconst icons = {\n success: CheckCircleIcon,\n error: ExclamationCircleIcon,\n warning: ExclamationTriangleIcon,\n info: InformationCircleIcon,\n}\n\nexport function Alert({\n variant = 'info',\n title,\n children,\n onClose,\n className,\n}: AlertProps) {\n const styles = variantStyles[variant]\n const Icon = icons[variant]\n\n return (\n <div\n className={cn(\n 'flex gap-3 p-4 rounded-lg border',\n styles.container,\n className\n )}\n role=\"alert\"\n >\n <Icon className={cn('h-5 w-5 flex-shrink-0 mt-0.5', styles.icon)} />\n <div className=\"flex-1 min-w-0\">\n {title && (\n <h3 className={cn('text-sm font-semibold', styles.title)}>{title}</h3>\n )}\n {children && (\n <div className={cn('text-sm', styles.content, title && 'mt-1')}>\n {children}\n </div>\n )}\n </div>\n {onClose && (\n <button\n type=\"button\"\n onClick={onClose}\n className={cn(\n 'flex-shrink-0 p-1 rounded-lg transition-colors duration-200',\n 'hover:bg-black/5 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500'\n )}\n >\n <XMarkIcon className={cn('h-5 w-5', styles.icon)} />\n <span className=\"sr-only\">Dismiss</span>\n </button>\n )}\n </div>\n )\n}\n"],"names":["variantStyles","icons","CheckCircleIcon","ExclamationCircleIcon","ExclamationTriangleIcon","InformationCircleIcon","Alert","variant","title","children","onClose","className","styles","Icon","jsxs","cn","jsx","XMarkIcon"],"mappings":";;;AAkBA,MAAMA,IAAgB;AAAA,EACpB,SAAS;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,OAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,SAAS;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,MAAM;AAAA,IACJ,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAEb,GAEMC,IAAQ;AAAA,EACZ,SAASC;AAAA,EACT,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,MAAMC;AACR;AAEO,SAASC,EAAM;AAAA,EACpB,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,GAAe;AACb,QAAMC,IAASZ,EAAcO,CAAO,GAC9BM,IAAOZ,EAAMM,CAAO;AAE1B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAH,EAAO;AAAA,QACPD;AAAA,MAAA;AAAA,MAEF,MAAK;AAAA,MAEL,UAAA;AAAA,QAAA,gBAAAK,EAACH,KAAK,WAAWE,EAAG,gCAAgCH,EAAO,IAAI,GAAG;AAAA,QAClE,gBAAAE,EAAC,OAAA,EAAI,WAAU,kBACZ,UAAA;AAAA,UAAAN,KACC,gBAAAQ,EAAC,QAAG,WAAWD,EAAG,yBAAyBH,EAAO,KAAK,GAAI,UAAAJ,EAAA,CAAM;AAAA,UAElEC,KACC,gBAAAO,EAAC,OAAA,EAAI,WAAWD,EAAG,WAAWH,EAAO,SAASJ,KAAS,MAAM,GAC1D,UAAAC,EAAA,CACH;AAAA,QAAA,GAEJ;AAAA,QACCC,KACC,gBAAAI;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASJ;AAAA,YACT,WAAWK;AAAA,cACT;AAAA,cACA;AAAA,YAAA;AAAA,YAGF,UAAA;AAAA,cAAA,gBAAAC,EAACC,KAAU,WAAWF,EAAG,WAAWH,EAAO,IAAI,GAAG;AAAA,cAClD,gBAAAI,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,UAAA,CAAO;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACnC;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
package/dist/index70.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "./index3.js";
|
|
3
|
+
import { ArrowTrendingUpIcon as d, ArrowTrendingDownIcon as l, MinusIcon as a } from "@heroicons/react/24/solid";
|
|
4
|
+
const p = {
|
|
5
|
+
sm: { text: "text-xs", icon: "w-3 h-3" },
|
|
6
|
+
md: { text: "text-sm", icon: "w-4 h-4" },
|
|
7
|
+
lg: { text: "text-base", icon: "w-5 h-5" }
|
|
8
|
+
}, w = {
|
|
9
|
+
up: "text-green-600",
|
|
10
|
+
down: "text-red-500",
|
|
11
|
+
stable: "text-slate-500"
|
|
12
|
+
}, u = ({
|
|
13
|
+
direction: t,
|
|
14
|
+
value: e,
|
|
15
|
+
showIcon: s = !0,
|
|
16
|
+
size: r = "md",
|
|
17
|
+
className: c
|
|
18
|
+
}) => {
|
|
19
|
+
const n = p[r], i = t === "up" ? d : t === "down" ? l : a;
|
|
20
|
+
return /* @__PURE__ */ m(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
className: x(
|
|
24
|
+
"inline-flex items-center gap-1 font-medium",
|
|
25
|
+
n.text,
|
|
26
|
+
w[t],
|
|
27
|
+
c
|
|
28
|
+
),
|
|
29
|
+
children: [
|
|
30
|
+
s && /* @__PURE__ */ o(i, { className: n.icon }),
|
|
31
|
+
e !== void 0 && /* @__PURE__ */ o("span", { children: e })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
u as TrendIndicator
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index70.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index70.js","sources":["../src/components/TrendIndicator/TrendIndicator.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\nimport { ArrowTrendingUpIcon, ArrowTrendingDownIcon, MinusIcon } from '@heroicons/react/24/solid'\n\nexport interface TrendIndicatorProps {\n direction: 'up' | 'down' | 'stable'\n value?: string | number\n showIcon?: boolean\n size?: 'sm' | 'md' | 'lg'\n className?: string\n}\n\nconst sizeStyles = {\n sm: { text: 'text-xs', icon: 'w-3 h-3' },\n md: { text: 'text-sm', icon: 'w-4 h-4' },\n lg: { text: 'text-base', icon: 'w-5 h-5' },\n}\n\nconst directionStyles = {\n up: 'text-green-600',\n down: 'text-red-500',\n stable: 'text-slate-500',\n}\n\nexport const TrendIndicator = ({\n direction,\n value,\n showIcon = true,\n size = 'md',\n className,\n}: TrendIndicatorProps) => {\n const styles = sizeStyles[size]\n\n const Icon = direction === 'up'\n ? ArrowTrendingUpIcon\n : direction === 'down'\n ? ArrowTrendingDownIcon\n : MinusIcon\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1 font-medium',\n styles.text,\n directionStyles[direction],\n className\n )}\n >\n {showIcon && <Icon className={styles.icon} />}\n {value !== undefined && <span>{value}</span>}\n </span>\n )\n}\n"],"names":["sizeStyles","directionStyles","TrendIndicator","direction","value","showIcon","size","className","styles","Icon","ArrowTrendingUpIcon","ArrowTrendingDownIcon","MinusIcon","jsxs","cn","jsx"],"mappings":";;;AAWA,MAAMA,IAAa;AAAA,EACjB,IAAI,EAAE,MAAM,WAAW,MAAM,UAAA;AAAA,EAC7B,IAAI,EAAE,MAAM,WAAW,MAAM,UAAA;AAAA,EAC7B,IAAI,EAAE,MAAM,aAAa,MAAM,UAAA;AACjC,GAEMC,IAAkB;AAAA,EACtB,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,QAAQ;AACV,GAEaC,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,MAA2B;AACzB,QAAMC,IAASR,EAAWM,CAAI,GAExBG,IAAON,MAAc,OACvBO,IACAP,MAAc,SACZQ,IACAC;AAEN,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAN,EAAO;AAAA,QACPP,EAAgBE,CAAS;AAAA,QACzBI;AAAA,MAAA;AAAA,MAGD,UAAA;AAAA,QAAAF,KAAY,gBAAAU,EAACN,GAAA,EAAK,WAAWD,EAAO,MAAM;AAAA,QAC1CJ,MAAU,UAAa,gBAAAW,EAAC,QAAA,EAAM,UAAAX,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG3C;"}
|
package/dist/index71.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function i(r) {
|
|
2
|
+
var f, n, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (f = 0; f < o; f++) r[f] && (n = i(r[f])) && (t && (t += " "), t += n);
|
|
7
|
+
} else for (n in r) r[n] && (t && (t += " "), t += n);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function a() {
|
|
11
|
+
for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = i(r)) && (t && (t += " "), t += f);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as clsx
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index71.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index71.js","sources":["../node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":["r","e","t","f","n","clsx"],"mappings":"AAAA,SAASA,EAAEC,GAAE;AAAC,MAAIC,GAAEC,GAAEC,IAAE;AAAG,MAAa,OAAOH,KAAjB,YAA8B,OAAOA,KAAjB,SAAmB,CAAAG,KAAGH;AAAA,WAAoB,OAAOA,KAAjB,SAAmB,KAAG,MAAM,QAAQA,CAAC,GAAE;AAAC,QAAI,IAAEA,EAAE;AAAO,SAAIC,IAAE,GAAEA,IAAE,GAAEA,IAAI,CAAAD,EAAEC,CAAC,MAAIC,IAAEH,EAAEC,EAAEC,CAAC,CAAC,OAAKE,MAAIA,KAAG,MAAKA,KAAGD;AAAA,EAAE,MAAM,MAAIA,KAAKF,EAAE,CAAAA,EAAEE,CAAC,MAAIC,MAAIA,KAAG,MAAKA,KAAGD;AAAG,SAAOC;AAAC;AAAQ,SAASC,IAAM;AAAC,WAAQJ,GAAEC,GAAEC,IAAE,GAAEC,IAAE,IAAG,IAAE,UAAU,QAAOD,IAAE,GAAEA,IAAI,EAACF,IAAE,UAAUE,CAAC,OAAKD,IAAEF,EAAEC,CAAC,OAAKG,MAAIA,KAAG,MAAKA,KAAGF;AAAG,SAAOE;AAAC;","x_google_ignoreList":[0]}
|