@krosoft/react 0.0.391 → 0.0.392
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/_virtual/_rolldown/runtime.js +1 -2
- package/dist/components/core/cards/DashboardCard.js +7 -8
- package/dist/components/core/cards/KpiCard.js +13 -14
- package/dist/components/core/cards/KpiCards.js +1 -2
- package/dist/components/core/cards/MetricCard.js +1 -2
- package/dist/components/core/cards/SkeletonCard.js +1 -2
- package/dist/components/core/cards/SkeletonCards.js +1 -2
- package/dist/components/core/changelog/AppChangelog.js +13 -14
- package/dist/components/core/changelog/AppChangelogEntry.js +19 -20
- package/dist/components/core/changelog/AppChangelogNav.js +1 -2
- package/dist/components/core/changelog/AppChangelogTagFilter.js +11 -12
- package/dist/components/core/charts/BarChartHorizontal.js +6 -7
- package/dist/components/core/charts/BarChartVertical.js +6 -7
- package/dist/components/core/charts/ChartCard.js +7 -8
- package/dist/components/core/charts/CircularGauge.js +1 -2
- package/dist/components/core/charts/LineChart.js +6 -7
- package/dist/components/core/charts/PieChart.js +12 -13
- package/dist/components/core/charts/chartColors.js +1 -2
- package/dist/components/core/charts/chartTooltip.helper.js +1 -2
- package/dist/components/core/dialogs/AboutDialog.js +11 -12
- package/dist/components/core/dialogs/AppDialog.js +27 -28
- package/dist/components/core/dialogs/ConfirmationDialog.js +15 -16
- package/dist/components/core/dialogs/FormDialog.js +7 -8
- package/dist/components/core/dialogs/index.js +4 -4
- package/dist/components/core/filters/ActiveFilters.js +1 -2
- package/dist/components/core/filters/AdvancedFilters.js +1 -2
- package/dist/components/core/filters/ConditionFilter.js +19 -20
- package/dist/components/core/filters/ConditionFilterGroup.js +1 -2
- package/dist/components/core/filters/FilterField.js +9 -10
- package/dist/components/core/filters/FilterPills.js +1 -2
- package/dist/components/core/filters/FilterPillsGroup.js +1 -2
- package/dist/components/core/filters/FiltersContainer.js +6 -7
- package/dist/components/core/filters/FiltersMobileDrawer.js +1 -2
- package/dist/components/core/filters/TableFilter.js +5 -6
- package/dist/components/core/filters/index.js +7 -7
- package/dist/components/core/forms/GenericForm.js +119 -120
- package/dist/components/core/icons/FlagFrIcon.js +1 -2
- package/dist/components/core/icons/FlagGbIcon.js +1 -2
- package/dist/components/core/inputs/DatePicker.js +9 -10
- package/dist/components/core/inputs/DateRangePicker.js +19 -20
- package/dist/components/core/inputs/FileDropzone.js +2 -3
- package/dist/components/core/inputs/ImageInput.js +9 -10
- package/dist/components/core/inputs/MultiSelect.js +89 -90
- package/dist/components/core/inputs/RatingInput.js +1 -2
- package/dist/components/core/inputs/SearchInput.js +7 -8
- package/dist/components/core/inputs/SingleSelect.js +36 -37
- package/dist/components/core/inputs/index.js +5 -5
- package/dist/components/core/inputs/select.helper.js +1 -2
- package/dist/components/core/language/LanguageSelector.js +1 -2
- package/dist/components/core/layouts/AppActions.js +44 -45
- package/dist/components/core/layouts/AppPageHeader.js +9 -10
- package/dist/components/core/layouts/AppSubTitle.js +1 -2
- package/dist/components/core/layouts/AppTitle.js +1 -2
- package/dist/components/core/layouts/KpiCardsLayout.js +1 -2
- package/dist/components/core/layouts/index.js +4 -4
- package/dist/components/core/markdown/AppMarkdown.js +1 -2
- package/dist/components/core/markdown/AppMarkdownHeading.js +4 -5
- package/dist/components/core/navbar/GlobalSearch.js +16 -17
- package/dist/components/core/navbar/NotificationsBell.js +21 -22
- package/dist/components/core/navbar/Sidebar.js +32 -33
- package/dist/components/core/navbar/SidebarHeader.js +1 -2
- package/dist/components/core/navbar/SidebarNavItem.js +20 -21
- package/dist/components/core/navbar/Topbar.js +5 -6
- package/dist/components/core/navbar/index.js +4 -4
- package/dist/components/core/states/ErrorAlert.js +1 -2
- package/dist/components/core/states/ErrorState.js +1 -2
- package/dist/components/core/states/LoadingState.js +1 -2
- package/dist/components/core/table/DataTable.js +1 -2
- package/dist/components/core/table/JsonTableOutput.js +17 -18
- package/dist/components/core/table/TableActions.js +31 -32
- package/dist/components/core/table/TableBody.js +25 -26
- package/dist/components/core/table/TableBulkActions.js +11 -12
- package/dist/components/core/table/TableHeader.js +15 -16
- package/dist/components/core/table/TablePagination.js +1 -2
- package/dist/components/core/table/TableSettings.js +20 -21
- package/dist/components/core/table/index.js +7 -7
- package/dist/components/core/tabs/AppTabContainer.js +1 -2
- package/dist/components/core/tabs/AppTabHeader.js +1 -2
- package/dist/components/core/tabs/AppTabs.js +10 -11
- package/dist/components/core/tabs/AppVerticalTabs.js +10 -11
- package/dist/components/core/tabs/index.js +3 -3
- package/dist/components/core/theme/ThemeSelector.js +1 -2
- package/dist/components/ui/accordion.js +1 -2
- package/dist/components/ui/alert-dialog.js +1 -2
- package/dist/components/ui/alert.js +1 -2
- package/dist/components/ui/aspect-ratio.js +1 -2
- package/dist/components/ui/avatar.js +1 -2
- package/dist/components/ui/badge.js +1 -2
- package/dist/components/ui/breadcrumb.js +1 -2
- package/dist/components/ui/button.js +1 -2
- package/dist/components/ui/calendar.js +8 -9
- package/dist/components/ui/card.js +1 -2
- package/dist/components/ui/carousel.js +1 -2
- package/dist/components/ui/chart.js +1 -2
- package/dist/components/ui/checkbox.js +1 -2
- package/dist/components/ui/collapsible.js +1 -2
- package/dist/components/ui/command.js +19 -20
- package/dist/components/ui/context-menu.js +1 -2
- package/dist/components/ui/control.js +1 -2
- package/dist/components/ui/dialog.js +1 -2
- package/dist/components/ui/drawer.js +1 -2
- package/dist/components/ui/dropdown-menu.js +1 -2
- package/dist/components/ui/form.js +1 -2
- package/dist/components/ui/hover-card.js +1 -2
- package/dist/components/ui/index.js +19 -19
- package/dist/components/ui/input-otp.js +1 -2
- package/dist/components/ui/input.js +1 -2
- package/dist/components/ui/label.js +1 -2
- package/dist/components/ui/menubar.js +1 -2
- package/dist/components/ui/navigation-menu.js +1 -2
- package/dist/components/ui/pagination.js +1 -2
- package/dist/components/ui/popover.js +1 -2
- package/dist/components/ui/progress.js +1 -2
- package/dist/components/ui/radio-group.js +1 -2
- package/dist/components/ui/resizable.js +1 -2
- package/dist/components/ui/scroll-area.js +1 -2
- package/dist/components/ui/select.js +1 -2
- package/dist/components/ui/separator.js +1 -2
- package/dist/components/ui/sheet.js +1 -2
- package/dist/components/ui/simple-table.js +1 -2
- package/dist/components/ui/skeleton.js +1 -2
- package/dist/components/ui/slider.js +1 -2
- package/dist/components/ui/sonner.js +1 -2
- package/dist/components/ui/switch.js +1 -2
- package/dist/components/ui/tabs.js +1 -2
- package/dist/components/ui/textarea.js +1 -2
- package/dist/components/ui/toast.js +1 -2
- package/dist/components/ui/toaster.js +10 -11
- package/dist/components/ui/toggle-group.js +1 -2
- package/dist/components/ui/toggle.js +1 -2
- package/dist/components/ui/tooltip.js +1 -2
- package/dist/constants/datatable.js +1 -2
- package/dist/constants/search.js +1 -2
- package/dist/contexts/page.context.js +1 -2
- package/dist/contexts/sidebar.context.js +1 -2
- package/dist/helpers/changelog.helper.js +1 -2
- package/dist/helpers/markdown.helper.js +1 -2
- package/dist/helpers/supabase.helper.js +1 -2
- package/dist/helpers/table.helper.js +1 -2
- package/dist/helpers/tailwind.helper.js +1 -2
- package/dist/hooks/behavior/index.js +6 -6
- package/dist/hooks/behavior/useConfirmDeleteDialog.js +1 -2
- package/dist/hooks/behavior/useConfirmationDialog.js +1 -2
- package/dist/hooks/behavior/useDebounce.js +1 -2
- package/dist/hooks/behavior/useDebouncedValue.js +1 -2
- package/dist/hooks/behavior/useDialog.js +1 -2
- package/dist/hooks/behavior/usePage.js +1 -2
- package/dist/hooks/behavior/useSidebar.js +1 -2
- package/dist/hooks/behavior/useTable.js +1 -2
- package/dist/hooks/behavior/useUrlState.js +1 -2
- package/dist/hooks/ui/index.js +10 -10
- package/dist/hooks/ui/useDataTable.js +1 -2
- package/dist/hooks/ui/useDocumentTitle.js +1 -2
- package/dist/hooks/ui/useFixedColumns.js +1 -2
- package/dist/hooks/ui/useLanguage.js +1 -2
- package/dist/hooks/ui/useMobile.js +1 -2
- package/dist/hooks/ui/useNotifications.js +1 -2
- package/dist/hooks/ui/useScrollFade.js +1 -2
- package/dist/hooks/ui/useServerTable.js +1 -2
- package/dist/hooks/ui/useTheme.js +1 -2
- package/dist/hooks/ui/useToast.js +1 -2
- package/dist/i18n/krosoftLocales.js +1 -2
- package/dist/i18n/translateKrosoft.js +1 -2
- package/dist/i18n/useDateFnsLocale.js +1 -2
- package/dist/i18n/useKrosoftTranslation.js +1 -2
- package/dist/locales/en.json.js +1 -2
- package/dist/locales/fr.json.js +1 -2
- package/dist/providers/SidebarProvider.js +5 -6
- package/dist/pwa/PwaUpdater.js +1 -2
- package/dist/pwa/index.js +3 -3
- package/dist/pwa/pwaUpdateToast.js +1 -2
- package/dist/query/createQueryClient.js +1 -2
- package/dist/seasonal/EffectSwitch.js +1 -2
- package/dist/seasonal/EmojiSnowfall.js +1 -2
- package/dist/seasonal/HalloweenEffect.js +5 -6
- package/dist/seasonal/SeasonalEffects.js +4 -5
- package/dist/seasonal/SeasonalEffectsSettings.js +8 -9
- package/dist/seasonal/SnowEffect.js +5 -6
- package/dist/seasonal/overlayStyle.js +1 -2
- package/dist/seasonal/seasons.js +1 -2
- package/dist/seasonal/useSeasonalEffects.js +1 -2
- package/dist/seasonal/useStoredToggle.js +1 -2
- package/dist/tailwind/index.js +1 -2
- package/dist/tokens/apply.js +1 -2
- package/dist/tokens/radius.js +1 -2
- package/dist/vendor/tailwindcss/lib/public/create-plugin.js +1 -2
- package/dist/vendor/tailwindcss/lib/util/createPlugin.js +1 -2
- package/dist/vendor/tailwindcss/plugin.js +1 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, i, o, s) => {
|
|
3
3
|
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
4
|
get: ((e) => i[e]).bind(null, d),
|
|
@@ -9,5 +9,4 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
9
9
|
value: n,
|
|
10
10
|
enumerable: !0
|
|
11
11
|
}) : o, n));
|
|
12
|
-
//#endregion
|
|
13
12
|
export { o as __commonJSMin, c as __toESM };
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Card as e, CardContent as t, CardHeader as n, CardTitle as r } from "../../ui/card.js";
|
|
2
|
+
import { cn as i } from "../../../helpers/tailwind.helper.js";
|
|
3
3
|
import { useKrosoftTranslation as a } from "../../../i18n/useKrosoftTranslation.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/core/cards/DashboardCard.tsx
|
|
7
7
|
var c = ({ titleKey: c, icon: l, className: u, children: d }) => {
|
|
8
8
|
let { t: f } = a();
|
|
9
|
-
return /* @__PURE__ */ s(
|
|
10
|
-
className:
|
|
11
|
-
children: [/* @__PURE__ */ o(
|
|
9
|
+
return /* @__PURE__ */ s(e, {
|
|
10
|
+
className: i("bg-gray-50 dark:bg-gray-950", u),
|
|
11
|
+
children: [/* @__PURE__ */ o(n, { children: /* @__PURE__ */ s(r, {
|
|
12
12
|
className: "flex items-center gap-2",
|
|
13
13
|
children: [l && /* @__PURE__ */ o(l, { className: "mr-2 size-4" }), /* @__PURE__ */ o("span", { children: f(c) })]
|
|
14
|
-
}) }), /* @__PURE__ */ o(
|
|
14
|
+
}) }), /* @__PURE__ */ o(t, { children: d })]
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { c as DashboardCard };
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useKrosoftTranslation as e } from "../../../i18n/useKrosoftTranslation.js";
|
|
2
|
+
import { cn as t } from "../../../helpers/tailwind.helper.js";
|
|
3
|
+
import { Card as n, CardContent as r, CardHeader as i, CardTitle as a } from "../../ui/card.js";
|
|
4
4
|
import { Skeleton as o } from "../../ui/skeleton.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
import { formatNumber as u } from "@krosoft/core/helpers";
|
|
8
|
-
|
|
8
|
+
// src/components/core/cards/KpiCard.tsx
|
|
9
9
|
var d = ({ titleKey: d, value: f, valueClassName: p, icon: m, iconClassName: h, description: g, descriptionClassName: _, onClick: v, isLoading: y, error: b }) => {
|
|
10
|
-
let { t: x } =
|
|
11
|
-
return /* @__PURE__ */ l(
|
|
12
|
-
className:
|
|
10
|
+
let { t: x } = e();
|
|
11
|
+
return /* @__PURE__ */ l(n, {
|
|
12
|
+
className: t(v === void 0 ? "" : "hover:border-primary cursor-pointer"),
|
|
13
13
|
onClick: v,
|
|
14
|
-
children: [/* @__PURE__ */ l(
|
|
14
|
+
children: [/* @__PURE__ */ l(i, {
|
|
15
15
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
16
|
-
children: [/* @__PURE__ */ c(
|
|
16
|
+
children: [/* @__PURE__ */ c(a, {
|
|
17
17
|
className: "text-sm font-medium",
|
|
18
18
|
children: x(d)
|
|
19
|
-
}), /* @__PURE__ */ c(m, { className:
|
|
20
|
-
}), /* @__PURE__ */ c(
|
|
19
|
+
}), /* @__PURE__ */ c(m, { className: t("size-6 text-muted-foreground", h) })]
|
|
20
|
+
}), /* @__PURE__ */ c(r, { children: y ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(o, { className: "h-8 w-24 mb-1" }), /* @__PURE__ */ c(o, { className: "h-3 w-32" })] }) : b ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", {
|
|
21
21
|
className: "text-2xl font-bold text-destructive",
|
|
22
22
|
children: "—"
|
|
23
23
|
}), /* @__PURE__ */ c("p", {
|
|
24
24
|
className: "text-xs text-destructive",
|
|
25
25
|
children: b
|
|
26
26
|
})] }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", {
|
|
27
|
-
className:
|
|
27
|
+
className: t("text-2xl font-bold", p),
|
|
28
28
|
children: typeof f == "number" ? u(f) : f instanceof Date ? f.toLocaleDateString() : f
|
|
29
29
|
}), /* @__PURE__ */ c("p", {
|
|
30
|
-
className:
|
|
30
|
+
className: t("text-xs text-muted-foreground", _),
|
|
31
31
|
children: g
|
|
32
32
|
})] }) })]
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { d as KpiCard };
|
|
@@ -2,7 +2,7 @@ import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
|
2
2
|
import { KpiCard as t } from "./KpiCard.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/core/cards/KpiCards.tsx
|
|
6
6
|
var r = {
|
|
7
7
|
1: "lg:grid-cols-1",
|
|
8
8
|
2: "lg:grid-cols-2",
|
|
@@ -25,5 +25,4 @@ var r = {
|
|
|
25
25
|
error: c
|
|
26
26
|
}, e.titleKey))
|
|
27
27
|
});
|
|
28
|
-
//#endregion
|
|
29
28
|
export { a as KpiCards };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Card as e, CardContent as t, CardTitle as n } from "../../ui/card.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/core/cards/MetricCard.tsx
|
|
5
5
|
var a = {
|
|
6
6
|
blue: "bg-gradient-to-br from-blue-500 to-cyan-500 text-white",
|
|
7
7
|
green: "bg-gradient-to-br from-green-500 to-emerald-500 text-white",
|
|
@@ -59,5 +59,4 @@ var a = {
|
|
|
59
59
|
})
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
62
|
export { l as MetricCard };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Card as e, CardContent as t, CardHeader as n } from "../../ui/card.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/core/cards/SkeletonCard.tsx
|
|
5
5
|
var a = () => /* @__PURE__ */ i(e, {
|
|
6
6
|
className: "animate-pulse",
|
|
7
7
|
children: [/* @__PURE__ */ r(n, { children: /* @__PURE__ */ r("div", { className: "h-6 bg-muted rounded w-1/4" }) }), /* @__PURE__ */ r(t, { children: /* @__PURE__ */ i("div", {
|
|
@@ -9,5 +9,4 @@ var a = () => /* @__PURE__ */ i(e, {
|
|
|
9
9
|
children: [/* @__PURE__ */ r("div", { className: "h-4 bg-muted rounded" }), /* @__PURE__ */ r("div", { className: "h-4 bg-muted rounded w-3/4" })]
|
|
10
10
|
}) })]
|
|
11
11
|
});
|
|
12
|
-
//#endregion
|
|
13
12
|
export { a as SkeletonCard };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { SkeletonCard as e } from "./SkeletonCard.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/core/cards/SkeletonCards.tsx
|
|
5
5
|
var n = ({ count: n = 1 }) => /* @__PURE__ */ t("div", {
|
|
6
6
|
className: "grid gap-6",
|
|
7
7
|
style: { gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` },
|
|
8
8
|
children: Array.from({ length: n }).map((n, r) => /* @__PURE__ */ t(e, {}, r))
|
|
9
9
|
});
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as SkeletonCards };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { SearchInput as e } from "../inputs/SearchInput.js";
|
|
2
|
+
import { filterChangelog as t, getChangelogItemAnchors as n, getChangelogTags as r, parseChangelog as i, splitChangelogItems as a } from "../../../helpers/changelog.helper.js";
|
|
3
|
+
import { cn as o } from "../../../helpers/tailwind.helper.js";
|
|
4
|
+
import { useNotifications as s } from "../../../hooks/ui/useNotifications.js";
|
|
5
|
+
import { useKrosoftTranslation as c } from "../../../i18n/useKrosoftTranslation.js";
|
|
6
6
|
import { AppChangelogEntry as l } from "./AppChangelogEntry.js";
|
|
7
7
|
import { AppChangelogNav as u } from "./AppChangelogNav.js";
|
|
8
8
|
import { AppChangelogTagFilter as d } from "./AppChangelogTagFilter.js";
|
|
9
9
|
import { useEffect as f, useMemo as p, useState as m } from "react";
|
|
10
10
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
11
|
import { useLocation as _, useNavigate as v } from "react-router-dom";
|
|
12
|
-
|
|
12
|
+
// src/components/core/changelog/AppChangelog.tsx
|
|
13
13
|
var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S = !0 }) => {
|
|
14
|
-
let { t: C } =
|
|
14
|
+
let { t: C } = c(), { showSuccess: w, showError: T } = s(), E = _(), D = v(), [O, k] = m(""), [A, j] = m([]), [M, N] = m(), P = p(() => i(b), [b]), F = p(() => r(P), [P]), I = p(() => t(P, O, A), [
|
|
15
15
|
P,
|
|
16
16
|
O,
|
|
17
17
|
A
|
|
@@ -19,9 +19,9 @@ var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S =
|
|
|
19
19
|
j((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
20
20
|
}, R = p(() => {
|
|
21
21
|
let e = /* @__PURE__ */ new Map();
|
|
22
|
-
return I.forEach((
|
|
23
|
-
t
|
|
24
|
-
|
|
22
|
+
return I.forEach((t) => {
|
|
23
|
+
n(t.id, a(t.content)).forEach((n) => {
|
|
24
|
+
n !== void 0 && e.set(n, t.id);
|
|
25
25
|
});
|
|
26
26
|
}), e;
|
|
27
27
|
}, [I]), z = decodeURIComponent(E.hash.slice(1)), B = I.some((e) => e.id === z) ? z : R.get(z), V = B === void 0 ? void 0 : z, H = I.some((e) => e.id === M) ? M : B ?? I[0]?.id;
|
|
@@ -71,7 +71,7 @@ var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S =
|
|
|
71
71
|
});
|
|
72
72
|
let G = /* @__PURE__ */ g("div", {
|
|
73
73
|
className: "flex flex-col gap-4",
|
|
74
|
-
children: [/* @__PURE__ */ h(
|
|
74
|
+
children: [/* @__PURE__ */ h(e, {
|
|
75
75
|
search: O,
|
|
76
76
|
onSearch: k,
|
|
77
77
|
className: "md:w-full"
|
|
@@ -95,10 +95,10 @@ var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S =
|
|
|
95
95
|
className: "min-h-0 flex-1 overflow-y-auto"
|
|
96
96
|
}) : null]
|
|
97
97
|
}) : null, /* @__PURE__ */ g("div", {
|
|
98
|
-
className:
|
|
98
|
+
className: o("min-w-0 flex-1", x && "lg:border-l lg:pl-10"),
|
|
99
99
|
children: [
|
|
100
100
|
S ? /* @__PURE__ */ h("div", {
|
|
101
|
-
className:
|
|
101
|
+
className: o("mb-6 md:max-w-md", x && "lg:hidden"),
|
|
102
102
|
children: G
|
|
103
103
|
}) : null,
|
|
104
104
|
I.length === 0 ? /* @__PURE__ */ h("p", {
|
|
@@ -119,5 +119,4 @@ var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S =
|
|
|
119
119
|
})]
|
|
120
120
|
});
|
|
121
121
|
};
|
|
122
|
-
//#endregion
|
|
123
122
|
export { b as AppChangelog };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { AppMarkdown as e } from "../markdown/AppMarkdown.js";
|
|
2
|
+
import { getChangelogItemAnchors as t, splitChangelogItems as n } from "../../../helpers/changelog.helper.js";
|
|
3
|
+
import { cn as r } from "../../../helpers/tailwind.helper.js";
|
|
4
|
+
import { useDateFnsLocale as i } from "../../../i18n/useDateFnsLocale.js";
|
|
5
|
+
import { useKrosoftTranslation as a } from "../../../i18n/useKrosoftTranslation.js";
|
|
6
6
|
import { useMemo as o } from "react";
|
|
7
7
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
8
|
import { HashIcon as l, LinkIcon as u, TagIcon as d } from "lucide-react";
|
|
9
9
|
import { format as f } from "date-fns";
|
|
10
|
-
|
|
10
|
+
// src/components/core/changelog/AppChangelogEntry.tsx
|
|
11
11
|
var p = ({ entry: p, onSelect: m, onCopyLink: h, selectedTags: g, linkedId: _ }) => {
|
|
12
|
-
let { t: v } =
|
|
12
|
+
let { t: v } = a(), y = i(), b = o(() => n(p.content), [p.content]), x = o(() => t(p.id, b), [p.id, b]), S = p.date ? f(p.date, p.hasTime ? "d MMMM yyyy - HH:mm" : "d MMMM yyyy", { locale: y }) : void 0, C = (e) => {
|
|
13
13
|
e.preventDefault(), m(p.id);
|
|
14
14
|
}, w = /* @__PURE__ */ s("button", {
|
|
15
15
|
type: "button",
|
|
@@ -49,17 +49,17 @@ var p = ({ entry: p, onSelect: m, onCopyLink: h, selectedTags: g, linkedId: _ })
|
|
|
49
49
|
]
|
|
50
50
|
}), /* @__PURE__ */ s("div", {
|
|
51
51
|
className: "space-y-4 pl-4 sm:pl-6",
|
|
52
|
-
children: b.map((
|
|
53
|
-
let
|
|
52
|
+
children: b.map((t, n) => {
|
|
53
|
+
let i = x[n];
|
|
54
54
|
return /* @__PURE__ */ c("div", {
|
|
55
|
-
id:
|
|
56
|
-
className:
|
|
57
|
-
children: [
|
|
58
|
-
className:
|
|
55
|
+
id: i,
|
|
56
|
+
className: r("scroll-mt-4 rounded-md", i !== void 0 && i === _ && "-mx-3 bg-primary/5 px-3 py-2 ring-1 ring-primary/20"),
|
|
57
|
+
children: [t.tag === void 0 || i === void 0 ? null : /* @__PURE__ */ c("p", {
|
|
58
|
+
className: r("mb-1 flex items-center gap-1.5 text-sm font-semibold", g.includes(t.tag) ? "text-primary" : "text-foreground"),
|
|
59
59
|
children: [/* @__PURE__ */ s("button", {
|
|
60
60
|
type: "button",
|
|
61
61
|
onClick: () => {
|
|
62
|
-
h(
|
|
62
|
+
h(i);
|
|
63
63
|
},
|
|
64
64
|
title: v("markdown.copyLink"),
|
|
65
65
|
"aria-label": v("markdown.copyLink"),
|
|
@@ -68,18 +68,17 @@ var p = ({ entry: p, onSelect: m, onCopyLink: h, selectedTags: g, linkedId: _ })
|
|
|
68
68
|
className: "size-3.5",
|
|
69
69
|
"aria-hidden": "true"
|
|
70
70
|
})
|
|
71
|
-
}),
|
|
71
|
+
}), t.tag]
|
|
72
72
|
}), /* @__PURE__ */ s("div", {
|
|
73
|
-
className:
|
|
74
|
-
children: /* @__PURE__ */ s(
|
|
75
|
-
content:
|
|
73
|
+
className: r("min-w-0 [&>*:last-child]:mb-0", t.tag !== void 0 && "pl-5"),
|
|
74
|
+
children: /* @__PURE__ */ s(e, {
|
|
75
|
+
content: t.content,
|
|
76
76
|
headingAnchors: !1
|
|
77
77
|
})
|
|
78
78
|
})]
|
|
79
|
-
},
|
|
79
|
+
}, i ?? `item-${String(n)}`);
|
|
80
80
|
})
|
|
81
81
|
})]
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
|
-
//#endregion
|
|
85
84
|
export { p as AppChangelogEntry };
|
|
@@ -3,7 +3,7 @@ import { useDateFnsLocale as t } from "../../../i18n/useDateFnsLocale.js";
|
|
|
3
3
|
import { useKrosoftTranslation as n } from "../../../i18n/useKrosoftTranslation.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
import { format as a } from "date-fns";
|
|
6
|
-
|
|
6
|
+
// src/components/core/changelog/AppChangelogNav.tsx
|
|
7
7
|
var o = ({ entries: o, activeId: s, onSelect: c, className: l }) => {
|
|
8
8
|
let { t: u } = n(), d = t();
|
|
9
9
|
return /* @__PURE__ */ i("nav", {
|
|
@@ -35,5 +35,4 @@ var o = ({ entries: o, activeId: s, onSelect: c, className: l }) => {
|
|
|
35
35
|
})]
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { o as AppChangelogNav };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { badgeVariants as e } from "../../ui/badge.js";
|
|
2
|
+
import { cn as t } from "../../../helpers/tailwind.helper.js";
|
|
3
|
+
import { useKrosoftTranslation as n } from "../../../i18n/useKrosoftTranslation.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/core/changelog/AppChangelogTagFilter.tsx
|
|
6
6
|
var a = ({ tags: a, selected: o, onToggle: s, onClear: c, className: l }) => {
|
|
7
|
-
let { t: u } =
|
|
7
|
+
let { t: u } = n();
|
|
8
8
|
return /* @__PURE__ */ i("div", {
|
|
9
9
|
className: l,
|
|
10
10
|
children: [/* @__PURE__ */ i("div", {
|
|
@@ -20,20 +20,19 @@ var a = ({ tags: a, selected: o, onToggle: s, onClear: c, className: l }) => {
|
|
|
20
20
|
}) : null]
|
|
21
21
|
}), /* @__PURE__ */ r("div", {
|
|
22
22
|
className: "flex flex-wrap gap-1.5",
|
|
23
|
-
children: a.map((
|
|
24
|
-
let i = o.includes(
|
|
23
|
+
children: a.map((n) => {
|
|
24
|
+
let i = o.includes(n);
|
|
25
25
|
return /* @__PURE__ */ r("button", {
|
|
26
26
|
type: "button",
|
|
27
27
|
"aria-pressed": i,
|
|
28
28
|
onClick: () => {
|
|
29
|
-
s(
|
|
29
|
+
s(n);
|
|
30
30
|
},
|
|
31
|
-
className: e(
|
|
32
|
-
children:
|
|
33
|
-
},
|
|
31
|
+
className: t(e({ variant: i ? "default" : "outline" }), "cursor-pointer font-medium focus:ring-0 focus-visible:ring-2", !i && "hover:bg-muted"),
|
|
32
|
+
children: n
|
|
33
|
+
}, n);
|
|
34
34
|
})
|
|
35
35
|
})]
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { a as AppChangelogTagFilter };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ChartContainer as e, ChartTooltip as t, ChartTooltipContent as n } from "../../ui/chart.js";
|
|
2
|
+
import { cn as r } from "../../../helpers/tailwind.helper.js";
|
|
3
3
|
import { buildTooltipValueFormatter as i } from "./chartTooltip.helper.js";
|
|
4
4
|
import * as a from "react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { Bar as c, BarChart as l, CartesianGrid as u, Rectangle as d, XAxis as f, YAxis as p } from "recharts";
|
|
7
|
-
|
|
7
|
+
// src/components/core/charts/BarChartHorizontal.tsx
|
|
8
8
|
var m = .35, h = (e, t) => t > 0 && e.length > t ? `${e.slice(0, t)}…` : e, g = ({ data: g, label: _ = "Valeur", color: v = "hsl(var(--primary))", categoryWidth: y = 140, maxLabelLength: b = 22, valueFormatter: x, onSelect: S, className: C }) => {
|
|
9
9
|
let [w, T] = a.useState(null), E = a.useMemo(() => ({ value: {
|
|
10
10
|
label: _,
|
|
@@ -13,9 +13,9 @@ var m = .35, h = (e, t) => t > 0 && e.length > t ? `${e.slice(0, t)}…` : e, g
|
|
|
13
13
|
...e,
|
|
14
14
|
fill: e.color ?? v
|
|
15
15
|
})) : g, [g, v]);
|
|
16
|
-
return /* @__PURE__ */ o(
|
|
16
|
+
return /* @__PURE__ */ o(e, {
|
|
17
17
|
config: E,
|
|
18
|
-
className:
|
|
18
|
+
className: r("aspect-auto size-full", C),
|
|
19
19
|
children: /* @__PURE__ */ s(l, {
|
|
20
20
|
data: O,
|
|
21
21
|
layout: "vertical",
|
|
@@ -47,7 +47,7 @@ var m = .35, h = (e, t) => t > 0 && e.length > t ? `${e.slice(0, t)}…` : e, g
|
|
|
47
47
|
axisLine: !1,
|
|
48
48
|
tickFormatter: (e) => h(String(e), b)
|
|
49
49
|
}),
|
|
50
|
-
/* @__PURE__ */ o(
|
|
50
|
+
/* @__PURE__ */ o(t, { content: /* @__PURE__ */ o(n, { formatter: D }) }),
|
|
51
51
|
/* @__PURE__ */ o(c, {
|
|
52
52
|
dataKey: "value",
|
|
53
53
|
fill: "var(--color-value)",
|
|
@@ -76,5 +76,4 @@ var m = .35, h = (e, t) => t > 0 && e.length > t ? `${e.slice(0, t)}…` : e, g
|
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
export { g as BarChartHorizontal };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ChartContainer as e, ChartTooltip as t, ChartTooltipContent as n } from "../../ui/chart.js";
|
|
2
|
+
import { cn as r } from "../../../helpers/tailwind.helper.js";
|
|
3
3
|
import { buildTooltipValueFormatter as i } from "./chartTooltip.helper.js";
|
|
4
4
|
import * as a from "react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { Bar as c, BarChart as l, CartesianGrid as u, XAxis as d, YAxis as f } from "recharts";
|
|
7
|
-
|
|
7
|
+
// src/components/core/charts/BarChartVertical.tsx
|
|
8
8
|
var p = ({ data: p, label: m = "Valeur", color: h = "hsl(var(--primary))", labelAngle: g, valueFormatter: _, allowDecimals: v = !1, onSelect: y, className: b }) => {
|
|
9
9
|
let x = a.useMemo(() => ({ value: {
|
|
10
10
|
label: m,
|
|
@@ -13,9 +13,9 @@ var p = ({ data: p, label: m = "Valeur", color: h = "hsl(var(--primary))", label
|
|
|
13
13
|
...e,
|
|
14
14
|
fill: e.color ?? h
|
|
15
15
|
})) : p, [p, h]);
|
|
16
|
-
return /* @__PURE__ */ o(
|
|
16
|
+
return /* @__PURE__ */ o(e, {
|
|
17
17
|
config: x,
|
|
18
|
-
className:
|
|
18
|
+
className: r("aspect-auto size-full", b),
|
|
19
19
|
children: /* @__PURE__ */ s(l, {
|
|
20
20
|
data: w,
|
|
21
21
|
margin: {
|
|
@@ -45,7 +45,7 @@ var p = ({ data: p, label: m = "Valeur", color: h = "hsl(var(--primary))", label
|
|
|
45
45
|
width: _ ? 48 : 32,
|
|
46
46
|
tickFormatter: _ ? (e) => _(Number(e)) : void 0
|
|
47
47
|
}),
|
|
48
|
-
/* @__PURE__ */ o(
|
|
48
|
+
/* @__PURE__ */ o(t, { content: /* @__PURE__ */ o(n, { formatter: S }) }),
|
|
49
49
|
/* @__PURE__ */ o(c, {
|
|
50
50
|
dataKey: "value",
|
|
51
51
|
fill: "var(--color-value)",
|
|
@@ -64,5 +64,4 @@ var p = ({ data: p, label: m = "Valeur", color: h = "hsl(var(--primary))", label
|
|
|
64
64
|
})
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
-
//#endregion
|
|
68
67
|
export { p as BarChartVertical };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useKrosoftTranslation as e } from "../../../i18n/useKrosoftTranslation.js";
|
|
2
2
|
import { Card as t, CardContent as n, CardDescription as r, CardHeader as i, CardTitle as a } from "../../ui/card.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Skeleton as o } from "../../ui/skeleton.js";
|
|
4
|
+
import { cn as s } from "../../../helpers/tailwind.helper.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/core/charts/ChartCard.tsx
|
|
8
8
|
var u = ({ title: u, description: d, icon: f, actions: p, footer: m, isLoading: h = !1, isEmpty: g = !1, emptyLabel: _, height: v = 300, className: y, contentClassName: b, children: x }) => {
|
|
9
|
-
let { t: S } =
|
|
9
|
+
let { t: S } = e(), C = f;
|
|
10
10
|
return /* @__PURE__ */ l(t, {
|
|
11
11
|
className: y,
|
|
12
12
|
children: [/* @__PURE__ */ c(i, { children: /* @__PURE__ */ l("div", {
|
|
@@ -25,9 +25,9 @@ var u = ({ title: u, description: d, icon: f, actions: p, footer: m, isLoading:
|
|
|
25
25
|
children: p
|
|
26
26
|
})]
|
|
27
27
|
}) }), /* @__PURE__ */ l(n, { children: [/* @__PURE__ */ c("div", {
|
|
28
|
-
className:
|
|
28
|
+
className: s("w-full", b),
|
|
29
29
|
style: v === null ? void 0 : { height: v },
|
|
30
|
-
children: h ? /* @__PURE__ */ c(
|
|
30
|
+
children: h ? /* @__PURE__ */ c(o, { className: "size-full rounded-surface" }) : g ? /* @__PURE__ */ c("div", {
|
|
31
31
|
className: "flex size-full items-center justify-center",
|
|
32
32
|
children: /* @__PURE__ */ c("p", {
|
|
33
33
|
className: "text-sm text-muted-foreground",
|
|
@@ -40,5 +40,4 @@ var u = ({ title: u, description: d, icon: f, actions: p, footer: m, isLoading:
|
|
|
40
40
|
}) : null] })]
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
//#endregion
|
|
44
43
|
export { u as ChartCard };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/core/charts/CircularGauge.tsx
|
|
5
5
|
var r = {
|
|
6
6
|
warning: 50,
|
|
7
7
|
danger: 80
|
|
@@ -54,5 +54,4 @@ var r = {
|
|
|
54
54
|
}) : null]
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
-
//#endregion
|
|
58
57
|
export { a as CircularGauge };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ChartContainer as e, ChartTooltip as t, ChartTooltipContent as n } from "../../ui/chart.js";
|
|
2
|
+
import { cn as r } from "../../../helpers/tailwind.helper.js";
|
|
3
3
|
import { buildTooltipValueFormatter as i } from "./chartTooltip.helper.js";
|
|
4
4
|
import * as a from "react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { CartesianGrid as c, Line as l, LineChart as u, XAxis as d, YAxis as f } from "recharts";
|
|
7
|
-
|
|
7
|
+
// src/components/core/charts/LineChart.tsx
|
|
8
8
|
var p = ({ data: p, label: m = "Valeur", color: h = "hsl(var(--primary))", yAxisDomain: g, valueFormatter: _, labelFormatter: v, showDots: y = !0, className: b }) => {
|
|
9
9
|
let x = a.useMemo(() => ({ value: {
|
|
10
10
|
label: m,
|
|
11
11
|
color: h
|
|
12
12
|
} }), [m, h]), S = a.useMemo(() => i(_, m), [_, m]);
|
|
13
|
-
return /* @__PURE__ */ o(
|
|
13
|
+
return /* @__PURE__ */ o(e, {
|
|
14
14
|
config: x,
|
|
15
|
-
className:
|
|
15
|
+
className: r("aspect-auto size-full", b),
|
|
16
16
|
children: /* @__PURE__ */ s(u, {
|
|
17
17
|
data: p,
|
|
18
18
|
margin: {
|
|
@@ -41,7 +41,7 @@ var p = ({ data: p, label: m = "Valeur", color: h = "hsl(var(--primary))", yAxis
|
|
|
41
41
|
width: _ ? 48 : 32,
|
|
42
42
|
tickFormatter: _ ? (e) => _(Number(e)) : void 0
|
|
43
43
|
}),
|
|
44
|
-
/* @__PURE__ */ o(
|
|
44
|
+
/* @__PURE__ */ o(t, { content: /* @__PURE__ */ o(n, {
|
|
45
45
|
formatter: S,
|
|
46
46
|
labelFormatter: v ? (e) => v(String(e)) : void 0
|
|
47
47
|
}) }),
|
|
@@ -65,5 +65,4 @@ var p = ({ data: p, label: m = "Valeur", color: h = "hsl(var(--primary))", yAxis
|
|
|
65
65
|
})
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
//#endregion
|
|
69
68
|
export { p as LineChart };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ChartContainer as e, ChartLegend as t, ChartLegendContent as n, ChartTooltip as r, ChartTooltipContent as i } from "../../ui/chart.js";
|
|
2
|
+
import { cn as a } from "../../../helpers/tailwind.helper.js";
|
|
3
|
+
import { useMobile as o } from "../../../hooks/ui/useMobile.js";
|
|
4
4
|
import { getChartColor as s } from "./chartColors.js";
|
|
5
|
-
import {
|
|
5
|
+
import { buildTooltipValueFormatter as c } from "./chartTooltip.helper.js";
|
|
6
6
|
import * as l from "react";
|
|
7
7
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
8
|
import { Pie as f, PieChart as p, Sector as m } from "recharts";
|
|
9
|
-
|
|
9
|
+
// src/components/core/charts/PieChart.tsx
|
|
10
10
|
var h = 6, g = ({ data: g, innerRadius: _, outerRadius: v, showLegend: y = !0, showLabels: b = !1, valueFormatter: x, onSelect: S, className: C }) => {
|
|
11
|
-
let w =
|
|
11
|
+
let w = o(), T = l.useMemo(() => g.map((e, t) => ({
|
|
12
12
|
...e,
|
|
13
13
|
fill: e.color ?? s(t)
|
|
14
14
|
})), [g]), E = l.useMemo(() => Object.fromEntries(g.map((e, t) => [e.name, {
|
|
15
15
|
label: e.name,
|
|
16
16
|
color: e.color ?? s(t)
|
|
17
|
-
}])), [g]), D = l.useMemo(() =>
|
|
18
|
-
return /* @__PURE__ */ u(
|
|
17
|
+
}])), [g]), D = l.useMemo(() => c(x), [x]), O = _ ?? (w ? 45 : 60), k = v ?? (w ? 80 : 100);
|
|
18
|
+
return /* @__PURE__ */ u(e, {
|
|
19
19
|
config: E,
|
|
20
|
-
className:
|
|
20
|
+
className: a("aspect-auto size-full", C),
|
|
21
21
|
children: /* @__PURE__ */ d(p, { children: [
|
|
22
|
-
/* @__PURE__ */ u(
|
|
22
|
+
/* @__PURE__ */ u(r, { content: /* @__PURE__ */ u(i, {
|
|
23
23
|
nameKey: "name",
|
|
24
24
|
hideLabel: !0,
|
|
25
25
|
formatter: D
|
|
@@ -35,7 +35,7 @@ var h = 6, g = ({ data: g, innerRadius: _, outerRadius: v, showLegend: y = !0, s
|
|
|
35
35
|
paddingAngle: O > 0 ? 2 : 0,
|
|
36
36
|
label: b ? ({ name: e, value: t }) => `${String(e)} (${String(t)})` : void 0,
|
|
37
37
|
isAnimationActive: !1,
|
|
38
|
-
className:
|
|
38
|
+
className: a("stroke-background", S && "cursor-pointer"),
|
|
39
39
|
shape: (e) => /* @__PURE__ */ u(m, {
|
|
40
40
|
...e,
|
|
41
41
|
outerRadius: S && e.isActive ? e.outerRadius + h : e.outerRadius
|
|
@@ -44,12 +44,11 @@ var h = 6, g = ({ data: g, innerRadius: _, outerRadius: v, showLegend: y = !0, s
|
|
|
44
44
|
S(g[t], t);
|
|
45
45
|
} : void 0
|
|
46
46
|
}),
|
|
47
|
-
y && /* @__PURE__ */ u(
|
|
47
|
+
y && /* @__PURE__ */ u(t, { content: /* @__PURE__ */ u(n, {
|
|
48
48
|
nameKey: "name",
|
|
49
49
|
className: "flex-wrap text-muted-foreground"
|
|
50
50
|
}) })
|
|
51
51
|
] })
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
//#endregion
|
|
55
54
|
export { g as PieChart };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/core/charts/chartColors.ts
|
|
2
2
|
var e = [
|
|
3
3
|
"hsl(var(--k-chart-1))",
|
|
4
4
|
"hsl(var(--k-chart-2))",
|
|
@@ -6,5 +6,4 @@ var e = [
|
|
|
6
6
|
"hsl(var(--k-chart-4))",
|
|
7
7
|
"hsl(var(--k-chart-5))"
|
|
8
8
|
], t = (t) => e[t % e.length];
|
|
9
|
-
//#endregion
|
|
10
9
|
export { e as CHART_COLORS, t as getChartColor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/core/charts/chartTooltip.helper.tsx
|
|
4
4
|
var n = (n, r) => n ? (i, a) => /* @__PURE__ */ t("div", {
|
|
5
5
|
className: "flex flex-1 justify-between gap-4",
|
|
6
6
|
children: [/* @__PURE__ */ e("span", {
|
|
@@ -11,5 +11,4 @@ var n = (n, r) => n ? (i, a) => /* @__PURE__ */ t("div", {
|
|
|
11
11
|
children: n(Number(i))
|
|
12
12
|
})]
|
|
13
13
|
}) : void 0;
|
|
14
|
-
//#endregion
|
|
15
14
|
export { n as buildTooltipValueFormatter };
|