@krosoft/react 0.0.381 → 0.0.383
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 +13 -0
- package/dist/components/core/cards/DashboardCard.js +18 -0
- package/dist/components/core/cards/KpiCard.js +36 -0
- package/dist/components/core/cards/KpiCards.js +29 -0
- package/dist/components/core/cards/MetricCard.js +63 -0
- package/dist/components/core/cards/SkeletonCard.js +13 -0
- package/dist/components/core/cards/SkeletonCards.js +11 -0
- package/dist/components/core/cards/index.js +7 -1
- package/dist/components/core/changelog/AppChangelog.js +123 -0
- package/dist/components/core/changelog/AppChangelogEntry.js +85 -0
- package/dist/components/core/changelog/AppChangelogNav.js +39 -0
- package/dist/components/core/changelog/AppChangelogTagFilter.js +39 -0
- package/dist/components/core/changelog/index.js +1 -1
- package/dist/components/core/charts/BarChartHorizontal.js +80 -0
- package/dist/components/core/charts/BarChartVertical.js +68 -0
- package/dist/components/core/charts/ChartCard.js +44 -0
- package/dist/components/core/charts/CircularGauge.js +58 -0
- package/dist/components/core/charts/LineChart.js +69 -0
- package/dist/components/core/charts/PieChart.js +55 -0
- package/dist/components/core/charts/chartColors.js +10 -0
- package/dist/components/core/charts/chartTooltip.helper.js +15 -0
- package/dist/components/core/charts/index.js +8 -1
- package/dist/components/core/dialogs/AboutDialog.js +59 -0
- package/dist/components/core/dialogs/AppDialog.js +81 -0
- package/dist/components/core/dialogs/ConfirmationDialog.js +42 -0
- package/dist/components/core/dialogs/FormDialog.js +105 -0
- package/dist/components/core/dialogs/index.js +7 -4
- package/dist/components/core/filters/ActiveFilters.js +69 -0
- package/dist/components/core/filters/AdvancedFilters.js +103 -0
- package/dist/components/core/filters/ConditionFilter.js +162 -0
- package/dist/components/core/filters/ConditionFilterGroup.js +44 -0
- package/dist/components/core/filters/FilterField.js +64 -0
- package/dist/components/core/filters/FilterPills.js +13 -0
- package/dist/components/core/filters/FilterPillsGroup.js +39 -0
- package/dist/components/core/filters/FiltersContainer.js +54 -0
- package/dist/components/core/filters/FiltersMobileDrawer.js +57 -0
- package/dist/components/core/filters/TableFilter.js +101 -0
- package/dist/components/core/filters/index.js +11 -645
- package/dist/{GenericForm-Dxd6k7l-.js → components/core/forms/GenericForm.js} +45 -43
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/icons/FlagFrIcon.js +28 -0
- package/dist/{icons-n0m_1w7z.js → components/core/icons/FlagGbIcon.js} +3 -26
- package/dist/components/core/icons/index.js +3 -1
- package/dist/components/core/index.js +71 -27
- package/dist/components/core/inputs/DatePicker.js +46 -0
- package/dist/components/core/inputs/DateRangePicker.js +92 -0
- package/dist/{inputs-CBojnClc.js → components/core/inputs/FileDropzone.js} +8 -37
- package/dist/{ImageInput-BeIOm3GY.js → components/core/inputs/ImageInput.js} +5 -5
- package/dist/components/core/inputs/MultiSelect.js +191 -0
- package/dist/components/core/inputs/RatingInput.js +36 -0
- package/dist/{SearchInput-IT_Rvthr.js → components/core/inputs/SearchInput.js} +4 -4
- package/dist/components/core/inputs/SingleSelect.js +198 -0
- package/dist/components/core/inputs/index.js +9 -6
- package/dist/components/core/inputs/select.helper.js +46 -0
- package/dist/{language-DY0EYabh.js → components/core/language/LanguageSelector.js} +13 -12
- package/dist/components/core/language/index.js +1 -1
- package/dist/{AppActions-8HjAaTQK.js → components/core/layouts/AppActions.js} +19 -19
- package/dist/components/core/layouts/AppPageHeader.js +44 -0
- package/dist/{AppSubTitle-DI62BaaB.js → components/core/layouts/AppSubTitle.js} +3 -3
- package/dist/{AppTitle-BXoTrXQc.js → components/core/layouts/AppTitle.js} +3 -3
- package/dist/components/core/layouts/KpiCardsLayout.js +8 -0
- package/dist/components/core/layouts/index.js +6 -50
- package/dist/components/core/markdown/AppMarkdown.js +134 -0
- package/dist/components/core/markdown/AppMarkdownHeading.js +45 -0
- package/dist/components/core/markdown/index.js +1 -1
- package/dist/components/core/navbar/GlobalSearch.js +128 -0
- package/dist/components/core/navbar/NotificationsBell.js +133 -0
- package/dist/components/core/navbar/Sidebar.js +99 -0
- package/dist/components/core/navbar/SidebarHeader.js +26 -0
- package/dist/components/core/navbar/SidebarNavItem.js +72 -0
- package/dist/components/core/navbar/Topbar.js +25 -0
- package/dist/components/core/navbar/index.js +7 -1
- package/dist/{ErrorAlert-cJnfBL8H.js → components/core/states/ErrorAlert.js} +5 -5
- package/dist/{states-CJ8xE_Nm.js → components/core/states/ErrorState.js} +4 -11
- package/dist/components/core/states/LoadingState.js +12 -0
- package/dist/components/core/states/index.js +3 -2
- package/dist/components/core/table/DataTable.js +108 -0
- package/dist/components/core/table/JsonTableOutput.js +75 -0
- package/dist/components/core/table/TableActions.js +75 -0
- package/dist/components/core/table/TableBody.js +130 -0
- package/dist/components/core/table/TableBulkActions.js +47 -0
- package/dist/components/core/table/TableHeader.js +103 -0
- package/dist/components/core/table/TablePagination.js +102 -0
- package/dist/components/core/table/TableSettings.js +117 -0
- package/dist/components/core/table/index.js +9 -709
- package/dist/components/core/tabs/AppTabContainer.js +17 -0
- package/dist/components/core/tabs/AppTabHeader.js +19 -0
- package/dist/components/core/tabs/AppTabs.js +56 -0
- package/dist/components/core/tabs/AppVerticalTabs.js +105 -0
- package/dist/components/core/tabs/index.js +5 -188
- package/dist/{theme-DSumNHLX.js → components/core/theme/ThemeSelector.js} +13 -12
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +117 -34
- package/dist/components/ui/accordion.js +34 -0
- package/dist/components/ui/alert-dialog.js +54 -0
- package/dist/{alert-REQGK9bR.js → components/ui/alert.js} +2 -2
- package/dist/components/ui/aspect-ratio.js +5 -0
- package/dist/components/ui/avatar.js +25 -0
- package/dist/components/ui/badge.js +22 -0
- package/dist/components/ui/breadcrumb.js +60 -0
- package/dist/{tooltip-_geGvbS7.js → components/ui/button.js} +7 -17
- package/dist/components/ui/calendar.js +44 -0
- package/dist/components/ui/card.js +42 -0
- package/dist/components/ui/carousel.js +115 -0
- package/dist/{chart-wW-fwL3s.js → components/ui/chart.js} +51 -89
- package/dist/components/ui/checkbox.js +31 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/command.js +84 -0
- package/dist/components/ui/context-menu.js +71 -0
- package/dist/components/ui/control.js +5 -0
- package/dist/components/ui/dialog.js +49 -0
- package/dist/components/ui/drawer.js +47 -0
- package/dist/components/ui/dropdown-menu.js +72 -0
- package/dist/components/ui/form.js +78 -0
- package/dist/components/ui/hover-card.js +15 -0
- package/dist/components/ui/index.js +49 -9
- package/dist/components/ui/input-otp.js +41 -0
- package/dist/components/ui/input.js +14 -0
- package/dist/components/ui/label.js +14 -0
- package/dist/components/ui/menubar.js +86 -0
- package/dist/components/ui/navigation-menu.js +58 -0
- package/dist/components/ui/pagination.js +62 -0
- package/dist/components/ui/popover.js +15 -0
- package/dist/components/ui/progress.js +17 -0
- package/dist/components/ui/radio-group.js +24 -0
- package/dist/components/ui/resizable.js +18 -0
- package/dist/components/ui/scroll-area.js +29 -0
- package/dist/{select-KWMg2_7Z.js → components/ui/select.js} +3 -3
- package/dist/components/ui/separator.js +15 -0
- package/dist/components/ui/sheet.js +58 -0
- package/dist/components/ui/simple-table.js +57 -0
- package/dist/{skeleton-D6Ga4BLw.js → components/ui/skeleton.js} +2 -2
- package/dist/components/ui/slider.js +17 -0
- package/dist/components/ui/sonner.js +23 -0
- package/dist/components/ui/switch.js +14 -0
- package/dist/components/ui/tabs.js +58 -0
- package/dist/components/ui/textarea.js +12 -0
- package/dist/components/ui/toast.js +53 -0
- package/dist/components/ui/toaster.js +22 -0
- package/dist/components/ui/toggle-group.js +37 -0
- package/dist/components/ui/toggle.js +34 -0
- package/dist/components/ui/tooltip.js +14 -0
- package/dist/{datatable-COQcYUrk.js → constants/datatable.js} +1 -1
- package/dist/constants/index.js +3 -5
- package/dist/constants/search.js +4 -0
- package/dist/contexts/index.js +3 -1
- package/dist/{sidebar.context-BahtU6hE.js → contexts/page.context.js} +2 -2
- package/dist/contexts/sidebar.context.js +5 -0
- package/dist/helpers/changelog.helper.js +69 -0
- package/dist/helpers/index.js +6 -166
- package/dist/{markdown.helper-YJE2H5KQ.js → helpers/markdown.helper.js} +1 -1
- package/dist/helpers/supabase.helper.js +41 -0
- package/dist/helpers/table.helper.js +56 -0
- package/dist/{tailwind.helper-CJaRYBmL.js → helpers/tailwind.helper.js} +1 -1
- package/dist/hooks/behavior/index.js +10 -1
- package/dist/hooks/behavior/useConfirmDeleteDialog.js +21 -0
- package/dist/hooks/behavior/useConfirmationDialog.js +23 -0
- package/dist/hooks/behavior/useDebounce.js +14 -0
- package/dist/hooks/behavior/useDebouncedValue.js +15 -0
- package/dist/hooks/behavior/useDialog.js +21 -0
- package/dist/hooks/behavior/usePage.js +10 -0
- package/dist/hooks/behavior/useSidebar.js +10 -0
- package/dist/hooks/behavior/useTable.js +83 -0
- package/dist/hooks/behavior/useUrlState.js +46 -0
- package/dist/hooks/index.js +20 -11
- package/dist/hooks/ui/index.js +11 -10
- package/dist/{useFixedColumns-Bo-Az3Hp.js → hooks/ui/useDataTable.js} +16 -52
- package/dist/{useDocumentTitle-VoQkict_.js → hooks/ui/useDocumentTitle.js} +2 -2
- package/dist/hooks/ui/useFixedColumns.js +38 -0
- package/dist/{useLanguage-DRnSb5H1.js → hooks/ui/useLanguage.js} +3 -3
- package/dist/{useMobile-pTQ8lWvt.js → hooks/ui/useMobile.js} +1 -1
- package/dist/{useNotifications-CyhTruIG.js → hooks/ui/useNotifications.js} +2 -2
- package/dist/{useScrollFade-D9kqJBDh.js → hooks/ui/useScrollFade.js} +1 -1
- package/dist/{ui-nQGnCss1.js → hooks/ui/useServerTable.js} +2 -2
- package/dist/{useTheme-DIZjiF5F.js → hooks/ui/useTheme.js} +3 -3
- package/dist/{useToast-UeDRLovh.js → hooks/ui/useToast.js} +1 -1
- package/dist/i18n/index.js +4 -1
- package/dist/i18n/krosoftLocales.js +13 -0
- package/dist/i18n/useDateFnsLocale.js +13 -0
- package/dist/i18n/useKrosoftTranslation.js +13 -0
- package/dist/locales/en.json.js +174 -0
- package/dist/locales/fr.json.js +174 -0
- package/dist/providers/SidebarProvider.js +42 -0
- package/dist/providers/index.js +1 -42
- package/dist/pwa/PwaUpdater.js +30 -0
- package/dist/pwa/index.js +3 -50
- package/dist/pwa/pwaUpdateToast.js +25 -0
- package/dist/seasonal/EffectSwitch.js +24 -0
- package/dist/seasonal/EmojiSnowfall.js +24 -0
- package/dist/seasonal/HalloweenEffect.js +17 -0
- package/dist/seasonal/SeasonalEffects.js +8 -0
- package/dist/seasonal/SeasonalEffectsSettings.js +35 -0
- package/dist/seasonal/SnowEffect.js +12 -0
- package/dist/seasonal/index.js +7 -120
- package/dist/seasonal/overlayStyle.js +12 -0
- package/dist/seasonal/seasons.js +7 -0
- package/dist/seasonal/useSeasonalEffects.js +20 -0
- package/dist/seasonal/useStoredToggle.js +21 -0
- package/dist/tailwind/index.js +7 -53
- package/dist/tokens/apply.js +16 -0
- package/dist/tokens/index.js +3 -38
- package/dist/tokens/radius.js +26 -0
- package/dist/types/index.js +0 -1
- package/dist/vendor/tailwindcss/lib/public/create-plugin.js +19 -0
- package/dist/vendor/tailwindcss/lib/util/createPlugin.js +30 -0
- package/dist/vendor/tailwindcss/plugin.js +10 -0
- package/package.json +4 -4
- package/dist/AppMarkdown-CAxm82x0.js +0 -171
- package/dist/MultiSelect-DPN046kI.js +0 -228
- package/dist/SingleSelect-DLY5WylQ.js +0 -313
- package/dist/behavior-B0BYivtN.js +0 -201
- package/dist/cards-DPzVebUM.js +0 -132
- package/dist/changelog-DyPFIscf.js +0 -257
- package/dist/charts-C7rKxkli.js +0 -342
- package/dist/dialogs-CG9Q7pqY.js +0 -269
- package/dist/i18n-BhLphJa3.js +0 -364
- package/dist/navbar-DD0V0pNE.js +0 -432
- package/dist/sheet-cWJO_wkT.js +0 -225
- package/dist/switch-DspImmo_.js +0 -24
- package/dist/ui-Fxy95kSJ.js +0 -1163
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useKrosoftTranslation as e } from "../../../i18n/useKrosoftTranslation.js";
|
|
2
|
+
import { Button as t } from "../../ui/button.js";
|
|
3
|
+
import { AppActions as n } from "./AppActions.js";
|
|
4
|
+
import { useDocumentTitle as r } from "../../../hooks/ui/useDocumentTitle.js";
|
|
5
|
+
import { AppTitle as i } from "./AppTitle.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
import { ArrowLeftIcon as s } from "lucide-react";
|
|
9
|
+
//#region src/components/core/layouts/AppPageHeader.tsx
|
|
10
|
+
function c({ icon: c, titleKey: l, descriptionKey: u, actions: d, onBack: f, renderPreActions: p, className: m, inline: h }) {
|
|
11
|
+
let { t: g } = e();
|
|
12
|
+
return r(g(l)), /* @__PURE__ */ o("div", {
|
|
13
|
+
className: "flex flex-row items-center justify-between gap-3 md:gap-4",
|
|
14
|
+
children: [/* @__PURE__ */ o("div", {
|
|
15
|
+
className: "flex min-w-0 items-center gap-3 md:gap-4",
|
|
16
|
+
children: [
|
|
17
|
+
f && /* @__PURE__ */ a(t, {
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
size: "icon",
|
|
20
|
+
className: "shrink-0",
|
|
21
|
+
onClick: f,
|
|
22
|
+
children: /* @__PURE__ */ a(s, { className: "h-4 w-4" })
|
|
23
|
+
}),
|
|
24
|
+
c && /* @__PURE__ */ a("div", {
|
|
25
|
+
className: "size-12 shrink-0 bg-blue-100 rounded-control flex items-center justify-center",
|
|
26
|
+
children: /* @__PURE__ */ a(c, { className: "h-6 w-6 text-blue-600" })
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ a(i, {
|
|
29
|
+
titleKey: l,
|
|
30
|
+
descriptionKey: u,
|
|
31
|
+
inline: h
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
}), /* @__PURE__ */ o("div", {
|
|
35
|
+
className: "flex shrink-0 items-center gap-2 md:gap-4",
|
|
36
|
+
children: [p && p(), /* @__PURE__ */ a(n, {
|
|
37
|
+
actions: d,
|
|
38
|
+
className: m
|
|
39
|
+
})]
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { c as AppPageHeader };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./AppActions
|
|
1
|
+
import { useKrosoftTranslation as e } from "../../../i18n/useKrosoftTranslation.js";
|
|
2
|
+
import { AppActions as t } from "./AppActions.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/core/layouts/AppSubTitle.tsx
|
|
5
5
|
function i({ titleKey: i, actions: a, className: o }) {
|
|
@@ -16,4 +16,4 @@ function i({ titleKey: i, actions: a, className: o }) {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
|
-
export { i as
|
|
19
|
+
export { i as AppSubTitle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "
|
|
1
|
+
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
|
+
import { useKrosoftTranslation as t } from "../../../i18n/useKrosoftTranslation.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/core/layouts/AppTitle.tsx
|
|
5
5
|
function i({ titleKey: i, descriptionKey: a, isSubTitle: o, inline: s }) {
|
|
@@ -25,4 +25,4 @@ function i({ titleKey: i, descriptionKey: a, isSubTitle: o, inline: s }) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
|
-
export { i as
|
|
28
|
+
export { i as AppTitle };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KpiCards as e } from "../cards/KpiCards.js";
|
|
2
|
+
import { SkeletonCards as t } from "../cards/SkeletonCards.js";
|
|
3
|
+
import { ErrorState as n } from "../states/ErrorState.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/core/layouts/KpiCardsLayout.tsx
|
|
6
|
+
var i = ({ stats: i, isLoading: a, error: o }) => a ? /* @__PURE__ */ r(t, { count: 4 }) : o ? /* @__PURE__ */ r(n, { message: o.message }) : /* @__PURE__ */ r(e, { stats: i });
|
|
7
|
+
//#endregion
|
|
8
|
+
export { i as KpiCardsLayout };
|
|
@@ -1,50 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { t as s } from "../../../AppTitle-BXoTrXQc.js";
|
|
8
|
-
import { n as c } from "../../../states-CJ8xE_Nm.js";
|
|
9
|
-
import "react";
|
|
10
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
-
import { ArrowLeftIcon as d } from "lucide-react";
|
|
12
|
-
//#region src/components/core/layouts/AppPageHeader.tsx
|
|
13
|
-
function f({ icon: t, titleKey: n, descriptionKey: a, actions: c, onBack: f, renderPreActions: p, className: m, inline: h }) {
|
|
14
|
-
let { t: g } = e();
|
|
15
|
-
return o(g(n)), /* @__PURE__ */ u("div", {
|
|
16
|
-
className: "flex flex-row items-center justify-between gap-3 md:gap-4",
|
|
17
|
-
children: [/* @__PURE__ */ u("div", {
|
|
18
|
-
className: "flex min-w-0 items-center gap-3 md:gap-4",
|
|
19
|
-
children: [
|
|
20
|
-
f && /* @__PURE__ */ l(r, {
|
|
21
|
-
variant: "ghost",
|
|
22
|
-
size: "icon",
|
|
23
|
-
className: "shrink-0",
|
|
24
|
-
onClick: f,
|
|
25
|
-
children: /* @__PURE__ */ l(d, { className: "h-4 w-4" })
|
|
26
|
-
}),
|
|
27
|
-
t && /* @__PURE__ */ l("div", {
|
|
28
|
-
className: "size-12 shrink-0 bg-blue-100 rounded-control flex items-center justify-center",
|
|
29
|
-
children: /* @__PURE__ */ l(t, { className: "h-6 w-6 text-blue-600" })
|
|
30
|
-
}),
|
|
31
|
-
/* @__PURE__ */ l(s, {
|
|
32
|
-
titleKey: n,
|
|
33
|
-
descriptionKey: a,
|
|
34
|
-
inline: h
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
}), /* @__PURE__ */ u("div", {
|
|
38
|
-
className: "flex shrink-0 items-center gap-2 md:gap-4",
|
|
39
|
-
children: [p && p(), /* @__PURE__ */ l(i, {
|
|
40
|
-
actions: c,
|
|
41
|
-
className: m
|
|
42
|
-
})]
|
|
43
|
-
})]
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/components/core/layouts/KpiCardsLayout.tsx
|
|
48
|
-
var p = ({ stats: e, isLoading: r, error: i }) => r ? /* @__PURE__ */ l(n, { count: 4 }) : i ? /* @__PURE__ */ l(c, { message: i.message }) : /* @__PURE__ */ l(t, { stats: e });
|
|
49
|
-
//#endregion
|
|
50
|
-
export { i as AppActions, f as AppPageHeader, a as AppSubTitle, s as AppTitle, p as KpiCardsLayout };
|
|
1
|
+
import { AppActions as e } from "./AppActions.js";
|
|
2
|
+
import { AppSubTitle as t } from "./AppSubTitle.js";
|
|
3
|
+
import { AppTitle as n } from "./AppTitle.js";
|
|
4
|
+
import { AppPageHeader as r } from "./AppPageHeader.js";
|
|
5
|
+
import { KpiCardsLayout as i } from "./KpiCardsLayout.js";
|
|
6
|
+
export { e as AppActions, r as AppPageHeader, t as AppSubTitle, n as AppTitle, i as KpiCardsLayout };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
|
+
import { rehypeVersionSlug as t } from "../../../helpers/markdown.helper.js";
|
|
3
|
+
import { AppMarkdownHeading as n } from "./AppMarkdownHeading.js";
|
|
4
|
+
import { useEffect as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { useLocation as a, useNavigate as o } from "react-router-dom";
|
|
7
|
+
import s from "react-markdown";
|
|
8
|
+
import c from "rehype-slug";
|
|
9
|
+
import l from "remark-gfm";
|
|
10
|
+
//#region src/components/core/markdown/AppMarkdown.tsx
|
|
11
|
+
var u = ({ content: u, headingAnchors: d = !0 }) => {
|
|
12
|
+
let f = a(), p = o(), { hash: m } = f;
|
|
13
|
+
r(() => {
|
|
14
|
+
if (!d || !m) return;
|
|
15
|
+
let e = decodeURIComponent(m.slice(1)), t = requestAnimationFrame(() => {
|
|
16
|
+
document.getElementById(e)?.scrollIntoView({
|
|
17
|
+
behavior: "smooth",
|
|
18
|
+
block: "start"
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
return () => {
|
|
22
|
+
cancelAnimationFrame(t);
|
|
23
|
+
};
|
|
24
|
+
}, [
|
|
25
|
+
d,
|
|
26
|
+
m,
|
|
27
|
+
u
|
|
28
|
+
]);
|
|
29
|
+
let h = (e, t) => {
|
|
30
|
+
let n = decodeURIComponent(t.slice(1)), r = document.getElementById(n);
|
|
31
|
+
r && (e.preventDefault(), d ? p({
|
|
32
|
+
search: f.search,
|
|
33
|
+
hash: t
|
|
34
|
+
}) : r.scrollIntoView({
|
|
35
|
+
behavior: "smooth",
|
|
36
|
+
block: "start"
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ i(s, {
|
|
40
|
+
remarkPlugins: [l],
|
|
41
|
+
rehypePlugins: [c, t],
|
|
42
|
+
components: {
|
|
43
|
+
h1: ({ id: e, children: t }) => /* @__PURE__ */ i("h1", {
|
|
44
|
+
id: e,
|
|
45
|
+
className: "text-2xl font-bold text-foreground mt-2 mb-4 first:mt-0 scroll-mt-4",
|
|
46
|
+
children: t
|
|
47
|
+
}),
|
|
48
|
+
h2: ({ id: t, children: r }) => /* @__PURE__ */ i(n, {
|
|
49
|
+
anchor: d,
|
|
50
|
+
level: 2,
|
|
51
|
+
id: t,
|
|
52
|
+
className: e("text-xl font-semibold text-foreground mt-8 mb-3 border-b pb-2 scroll-mt-4", !d && "first:mt-0"),
|
|
53
|
+
children: r
|
|
54
|
+
}),
|
|
55
|
+
h3: ({ id: e, children: t }) => /* @__PURE__ */ i(n, {
|
|
56
|
+
anchor: d,
|
|
57
|
+
level: 3,
|
|
58
|
+
id: e,
|
|
59
|
+
className: "text-base font-semibold text-foreground mt-6 mb-2 scroll-mt-4",
|
|
60
|
+
children: t
|
|
61
|
+
}),
|
|
62
|
+
h4: ({ id: e, children: t }) => /* @__PURE__ */ i(n, {
|
|
63
|
+
anchor: d,
|
|
64
|
+
level: 4,
|
|
65
|
+
id: e,
|
|
66
|
+
className: "text-sm font-semibold text-foreground mt-4 mb-2 scroll-mt-4",
|
|
67
|
+
children: t
|
|
68
|
+
}),
|
|
69
|
+
p: ({ children: e }) => /* @__PURE__ */ i("p", {
|
|
70
|
+
className: "text-sm text-foreground leading-relaxed mb-3",
|
|
71
|
+
children: e
|
|
72
|
+
}),
|
|
73
|
+
a: ({ href: e, children: t }) => {
|
|
74
|
+
let n = e?.startsWith("#");
|
|
75
|
+
return /* @__PURE__ */ i("a", {
|
|
76
|
+
href: e,
|
|
77
|
+
target: n ? void 0 : "_blank",
|
|
78
|
+
rel: n ? void 0 : "noopener noreferrer",
|
|
79
|
+
onClick: n && e ? (t) => {
|
|
80
|
+
h(t, e);
|
|
81
|
+
} : void 0,
|
|
82
|
+
className: "text-primary underline underline-offset-2 hover:opacity-80",
|
|
83
|
+
children: t
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
ul: ({ children: e }) => /* @__PURE__ */ i("ul", {
|
|
87
|
+
className: "list-disc pl-6 mb-3 space-y-1 text-sm text-foreground",
|
|
88
|
+
children: e
|
|
89
|
+
}),
|
|
90
|
+
ol: ({ children: e }) => /* @__PURE__ */ i("ol", {
|
|
91
|
+
className: "list-decimal pl-6 mb-3 space-y-1 text-sm text-foreground",
|
|
92
|
+
children: e
|
|
93
|
+
}),
|
|
94
|
+
blockquote: ({ children: e }) => /* @__PURE__ */ i("blockquote", {
|
|
95
|
+
className: "border-l-4 border-muted-foreground/30 bg-muted/50 px-4 py-2 mb-3 text-sm text-muted-foreground [&>p]:mb-0",
|
|
96
|
+
children: e
|
|
97
|
+
}),
|
|
98
|
+
code: ({ className: e, children: t }) => e ? /* @__PURE__ */ i("code", {
|
|
99
|
+
className: `${e} block text-xs font-mono`,
|
|
100
|
+
children: t
|
|
101
|
+
}) : /* @__PURE__ */ i("code", {
|
|
102
|
+
className: "text-xs font-mono bg-muted px-1.5 py-0.5 rounded",
|
|
103
|
+
children: t
|
|
104
|
+
}),
|
|
105
|
+
pre: ({ children: e }) => /* @__PURE__ */ i("pre", {
|
|
106
|
+
className: "bg-muted rounded-md p-4 mb-3 overflow-x-auto",
|
|
107
|
+
children: e
|
|
108
|
+
}),
|
|
109
|
+
table: ({ children: e }) => /* @__PURE__ */ i("div", {
|
|
110
|
+
className: "overflow-x-auto mb-3",
|
|
111
|
+
children: /* @__PURE__ */ i("table", {
|
|
112
|
+
className: "w-full text-sm border-collapse",
|
|
113
|
+
children: e
|
|
114
|
+
})
|
|
115
|
+
}),
|
|
116
|
+
thead: ({ children: e }) => /* @__PURE__ */ i("thead", {
|
|
117
|
+
className: "border-b",
|
|
118
|
+
children: e
|
|
119
|
+
}),
|
|
120
|
+
th: ({ children: e }) => /* @__PURE__ */ i("th", {
|
|
121
|
+
className: "text-left font-semibold text-foreground px-3 py-2",
|
|
122
|
+
children: e
|
|
123
|
+
}),
|
|
124
|
+
td: ({ children: e }) => /* @__PURE__ */ i("td", {
|
|
125
|
+
className: "border-b border-muted px-3 py-2 text-foreground",
|
|
126
|
+
children: e
|
|
127
|
+
}),
|
|
128
|
+
hr: () => /* @__PURE__ */ i("hr", { className: "my-6 border-muted" })
|
|
129
|
+
},
|
|
130
|
+
children: u
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { u as AppMarkdown };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
|
+
import { useKrosoftTranslation as t } from "../../../i18n/useKrosoftTranslation.js";
|
|
3
|
+
import { useNotifications as n } from "../../../hooks/ui/useNotifications.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { LinkIcon as a } from "lucide-react";
|
|
6
|
+
import { useLocation as o, useNavigate as s } from "react-router-dom";
|
|
7
|
+
//#region src/components/core/markdown/AppMarkdownHeading.tsx
|
|
8
|
+
var c = {
|
|
9
|
+
2: "h2",
|
|
10
|
+
3: "h3",
|
|
11
|
+
4: "h4"
|
|
12
|
+
}, l = ({ level: l, className: u, id: d, anchor: f = !0, children: p }) => {
|
|
13
|
+
let { t: m } = t(), { showSuccess: h, showError: g } = n(), _ = o(), v = s(), y = c[l];
|
|
14
|
+
if (!f || !d) return /* @__PURE__ */ r(y, {
|
|
15
|
+
id: d,
|
|
16
|
+
className: u,
|
|
17
|
+
children: p
|
|
18
|
+
});
|
|
19
|
+
let b = async () => {
|
|
20
|
+
v({
|
|
21
|
+
search: _.search,
|
|
22
|
+
hash: `#${d}`
|
|
23
|
+
}, { replace: !0 });
|
|
24
|
+
let e = `${window.location.origin}${_.pathname}${_.search}#${d}`;
|
|
25
|
+
try {
|
|
26
|
+
await navigator.clipboard.writeText(e), h(m("markdown.linkCopied"));
|
|
27
|
+
} catch {
|
|
28
|
+
g(m("markdown.linkCopyError"));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ i(y, {
|
|
32
|
+
id: d,
|
|
33
|
+
className: e("group", u),
|
|
34
|
+
children: [p, /* @__PURE__ */ r("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
onClick: () => void b(),
|
|
37
|
+
title: m("markdown.copyLink"),
|
|
38
|
+
"aria-label": m("markdown.copyLink"),
|
|
39
|
+
className: "ml-2 inline-flex align-middle text-muted-foreground transition-opacity hover:text-primary md:opacity-0 md:group-hover:opacity-100 md:focus-visible:opacity-100",
|
|
40
|
+
children: /* @__PURE__ */ r(a, { className: "size-4" })
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { l as AppMarkdownHeading };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { AppMarkdown } from "./AppMarkdown.js";
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
|
+
import { useKrosoftTranslation as t } from "../../../i18n/useKrosoftTranslation.js";
|
|
3
|
+
import { Button as n } from "../../ui/button.js";
|
|
4
|
+
import { CommandDialog as r, CommandEmpty as i, CommandGroup as a, CommandInput as o, CommandItem as s, CommandList as c } from "../../ui/command.js";
|
|
5
|
+
import * as l from "react";
|
|
6
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
import { ClockIcon as p, LoaderCircleIcon as m, SearchIcon as h, XIcon as g } from "lucide-react";
|
|
8
|
+
//#region src/components/core/navbar/GlobalSearch.tsx
|
|
9
|
+
var _ = ({ groups: _, search: v, onSearch: y, onSelect: b, loading: x = !1, open: S, onOpenChange: C, trigger: w = !0, triggerLabel: T, shortcut: E = !0, shortcutLabel: D = "Ctrl+K", history: O, onHistorySelect: k, onHistoryRemove: A, historyHeading: j, removeFromHistoryLabel: M, placeholder: N, emptyLabel: P, loadingLabel: F, title: I, description: L, hint: R, className: z }) => {
|
|
10
|
+
let { t: B } = t(), [V, H] = l.useState(!1), U = S !== void 0, W = U ? S : V, G = l.useCallback((e) => {
|
|
11
|
+
U || H(e), C?.(e);
|
|
12
|
+
}, [U, C]);
|
|
13
|
+
l.useEffect(() => {
|
|
14
|
+
if (!E) return;
|
|
15
|
+
let e = (e) => {
|
|
16
|
+
e.key.toLowerCase() === "k" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), G(!W));
|
|
17
|
+
};
|
|
18
|
+
return window.addEventListener("keydown", e), () => {
|
|
19
|
+
window.removeEventListener("keydown", e);
|
|
20
|
+
};
|
|
21
|
+
}, [
|
|
22
|
+
E,
|
|
23
|
+
W,
|
|
24
|
+
G
|
|
25
|
+
]);
|
|
26
|
+
let K = (e) => {
|
|
27
|
+
G(!1), y(""), b(e);
|
|
28
|
+
}, q = _.some((e) => e.items.length > 0), J = O ?? [], Y = v.trim() === "" && J.length > 0;
|
|
29
|
+
return /* @__PURE__ */ f(u, { children: [w && /* @__PURE__ */ d(n, {
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
size: "icon",
|
|
32
|
+
"aria-label": T ?? B("search.trigger"),
|
|
33
|
+
title: E ? `${T ?? B("search.trigger")} (${D})` : T ?? B("search.trigger"),
|
|
34
|
+
className: "rounded-full",
|
|
35
|
+
onClick: () => {
|
|
36
|
+
G(!0);
|
|
37
|
+
},
|
|
38
|
+
children: /* @__PURE__ */ d(h, { className: "size-4" })
|
|
39
|
+
}), /* @__PURE__ */ f(r, {
|
|
40
|
+
open: W,
|
|
41
|
+
onOpenChange: G,
|
|
42
|
+
title: I ?? B("search.globalTitle"),
|
|
43
|
+
description: L ?? B("search.globalDescription"),
|
|
44
|
+
shouldFilter: !1,
|
|
45
|
+
className: z,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ d(o, {
|
|
48
|
+
value: v,
|
|
49
|
+
onValueChange: y,
|
|
50
|
+
placeholder: N ?? B("search.placeholder")
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ f(c, { children: [
|
|
53
|
+
x && /* @__PURE__ */ f("div", {
|
|
54
|
+
className: "flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",
|
|
55
|
+
children: [/* @__PURE__ */ d(m, { className: "size-4 animate-spin" }), F ?? B("search.loading")]
|
|
56
|
+
}),
|
|
57
|
+
!q && !Y && !x && /* @__PURE__ */ d(i, { children: P ?? B("states.noResultDot") }),
|
|
58
|
+
Y && /* @__PURE__ */ d(a, {
|
|
59
|
+
heading: j ?? B("search.historyTitle"),
|
|
60
|
+
children: J.map((e) => /* @__PURE__ */ f(s, {
|
|
61
|
+
value: `history-${e}`,
|
|
62
|
+
className: "gap-3 px-2 py-2",
|
|
63
|
+
onSelect: () => {
|
|
64
|
+
k?.(e);
|
|
65
|
+
},
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ d("span", {
|
|
68
|
+
className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",
|
|
69
|
+
children: /* @__PURE__ */ d(p, { className: "size-4" })
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ d("span", {
|
|
72
|
+
className: "min-w-0 flex-1 truncate font-medium",
|
|
73
|
+
children: e
|
|
74
|
+
}),
|
|
75
|
+
A && /* @__PURE__ */ d(n, {
|
|
76
|
+
type: "button",
|
|
77
|
+
variant: "ghost",
|
|
78
|
+
size: "icon",
|
|
79
|
+
className: "size-7 shrink-0 text-muted-foreground hover:text-destructive",
|
|
80
|
+
"aria-label": M ?? B("search.removeFromHistory"),
|
|
81
|
+
title: M ?? B("search.removeFromHistory"),
|
|
82
|
+
onPointerDown: (e) => {
|
|
83
|
+
e.preventDefault(), e.stopPropagation();
|
|
84
|
+
},
|
|
85
|
+
onClick: (t) => {
|
|
86
|
+
t.stopPropagation(), A(e);
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ d(g, { className: "size-4" })
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
}, `history-${e}`))
|
|
92
|
+
}),
|
|
93
|
+
_.map((t) => t.items.length === 0 ? null : /* @__PURE__ */ d(a, {
|
|
94
|
+
heading: t.heading,
|
|
95
|
+
children: t.items.map((t) => {
|
|
96
|
+
let n = t.icon;
|
|
97
|
+
return /* @__PURE__ */ f(s, {
|
|
98
|
+
value: t.key,
|
|
99
|
+
className: "gap-3 px-2 py-2",
|
|
100
|
+
onSelect: () => {
|
|
101
|
+
K(t);
|
|
102
|
+
},
|
|
103
|
+
children: [n && /* @__PURE__ */ d("span", {
|
|
104
|
+
className: e("flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", t.iconClassName),
|
|
105
|
+
children: /* @__PURE__ */ d(n, { className: "size-4" })
|
|
106
|
+
}), /* @__PURE__ */ f("span", {
|
|
107
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
108
|
+
children: [/* @__PURE__ */ d("span", {
|
|
109
|
+
className: "truncate font-medium",
|
|
110
|
+
children: t.label
|
|
111
|
+
}), t.description !== void 0 && t.description !== "" && /* @__PURE__ */ d("span", {
|
|
112
|
+
className: "truncate text-xs text-muted-foreground",
|
|
113
|
+
children: t.description
|
|
114
|
+
})]
|
|
115
|
+
})]
|
|
116
|
+
}, t.key);
|
|
117
|
+
})
|
|
118
|
+
}, t.heading))
|
|
119
|
+
] }),
|
|
120
|
+
R !== void 0 && q && !x && /* @__PURE__ */ d("div", {
|
|
121
|
+
className: "border-t border-border p-2 text-center text-xs text-muted-foreground",
|
|
122
|
+
children: R
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
})] });
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { _ as GlobalSearch };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
|
+
import { useKrosoftTranslation as t } from "../../../i18n/useKrosoftTranslation.js";
|
|
3
|
+
import { Button as n } from "../../ui/button.js";
|
|
4
|
+
import { Popover as r, PopoverContent as i, PopoverTrigger as a } from "../../ui/popover.js";
|
|
5
|
+
import { ScrollArea as o } from "../../ui/scroll-area.js";
|
|
6
|
+
import * as s from "react";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { BellIcon as u, Trash2Icon as d } from "lucide-react";
|
|
9
|
+
//#region src/components/core/navbar/NotificationsBell.tsx
|
|
10
|
+
var f = 9, p = ({ items: p, onSelect: m, onMarkAllAsRead: h, onRemove: g, onSeeAll: _, isLoading: v = !1, unreadCount: y, maxBadgeCount: b = f, open: x, onOpenChange: S, triggerLabel: C, title: w, emptyLabel: T, loadingLabel: E, markAllAsReadLabel: D, removeLabel: O, seeAllLabel: k, className: A, contentClassName: j, badgeClassName: M, itemClassName: N, unreadItemClassName: P }) => {
|
|
11
|
+
let { t: F } = t(), [I, L] = s.useState(!1), R = x !== void 0, z = R ? x : I, B = (e) => {
|
|
12
|
+
R || L(e), S?.(e);
|
|
13
|
+
}, V = y ?? p.filter((e) => !e.read).length, H = C ?? F("notifications.trigger"), U = (e) => {
|
|
14
|
+
B(!1), m?.(e);
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ l(r, {
|
|
17
|
+
open: z,
|
|
18
|
+
onOpenChange: B,
|
|
19
|
+
children: [/* @__PURE__ */ c(a, {
|
|
20
|
+
asChild: !0,
|
|
21
|
+
children: /* @__PURE__ */ l(n, {
|
|
22
|
+
type: "button",
|
|
23
|
+
variant: "ghost",
|
|
24
|
+
size: "icon",
|
|
25
|
+
className: e("relative rounded-control", A),
|
|
26
|
+
"aria-label": V > 0 ? `${H} (${String(V)})` : H,
|
|
27
|
+
title: H,
|
|
28
|
+
children: [/* @__PURE__ */ c(u, { className: "size-4" }), V > 0 && /* @__PURE__ */ c("span", {
|
|
29
|
+
className: e("absolute right-1 top-1 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-bold leading-none text-primary-foreground", M),
|
|
30
|
+
children: V > b ? `${String(b)}+` : V
|
|
31
|
+
})]
|
|
32
|
+
})
|
|
33
|
+
}), /* @__PURE__ */ l(i, {
|
|
34
|
+
align: "end",
|
|
35
|
+
className: e("w-80 p-0", j),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ l("div", {
|
|
38
|
+
className: "flex items-center justify-between gap-2 border-b px-3 py-2",
|
|
39
|
+
children: [/* @__PURE__ */ c("span", {
|
|
40
|
+
className: "text-sm font-medium",
|
|
41
|
+
children: w ?? F("notifications.title")
|
|
42
|
+
}), h && V > 0 && /* @__PURE__ */ c(n, {
|
|
43
|
+
type: "button",
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
size: "sm",
|
|
46
|
+
className: "h-7 text-xs",
|
|
47
|
+
onClick: h,
|
|
48
|
+
children: D ?? F("notifications.markAllAsRead")
|
|
49
|
+
})]
|
|
50
|
+
}),
|
|
51
|
+
v && /* @__PURE__ */ c("p", {
|
|
52
|
+
className: "px-3 py-6 text-center text-sm text-muted-foreground",
|
|
53
|
+
children: E ?? F("states.loading")
|
|
54
|
+
}),
|
|
55
|
+
!v && p.length === 0 && /* @__PURE__ */ c("p", {
|
|
56
|
+
className: "px-3 py-6 text-center text-sm text-muted-foreground",
|
|
57
|
+
children: T ?? F("notifications.empty")
|
|
58
|
+
}),
|
|
59
|
+
!v && p.length > 0 && /* @__PURE__ */ c(o, {
|
|
60
|
+
viewportClassName: "max-h-96",
|
|
61
|
+
children: /* @__PURE__ */ c("ul", {
|
|
62
|
+
className: "divide-y",
|
|
63
|
+
children: p.map((t) => {
|
|
64
|
+
let r = t.icon;
|
|
65
|
+
return /* @__PURE__ */ l("li", {
|
|
66
|
+
className: e("flex items-start gap-2 px-3 py-2", !t.read && (P ?? "bg-accent/40"), N),
|
|
67
|
+
children: [/* @__PURE__ */ l("button", {
|
|
68
|
+
type: "button",
|
|
69
|
+
className: "flex min-w-0 flex-1 items-start gap-2 rounded-sm text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
70
|
+
onClick: () => {
|
|
71
|
+
U(t);
|
|
72
|
+
},
|
|
73
|
+
children: [r && /* @__PURE__ */ c("span", {
|
|
74
|
+
className: e("mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground", t.iconClassName),
|
|
75
|
+
children: /* @__PURE__ */ c(r, { className: "size-3.5" })
|
|
76
|
+
}), /* @__PURE__ */ l("span", {
|
|
77
|
+
className: "min-w-0 flex-1 space-y-0.5",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ l("span", {
|
|
80
|
+
className: "flex items-center gap-2",
|
|
81
|
+
children: [!t.read && /* @__PURE__ */ c("span", {
|
|
82
|
+
className: "size-1.5 shrink-0 rounded-full bg-primary",
|
|
83
|
+
"aria-hidden": !0
|
|
84
|
+
}), /* @__PURE__ */ c("span", {
|
|
85
|
+
className: e("truncate text-sm", !t.read && "font-medium"),
|
|
86
|
+
children: t.title
|
|
87
|
+
})]
|
|
88
|
+
}),
|
|
89
|
+
t.description && /* @__PURE__ */ c("span", {
|
|
90
|
+
className: "block text-xs text-muted-foreground",
|
|
91
|
+
children: t.description
|
|
92
|
+
}),
|
|
93
|
+
t.date && /* @__PURE__ */ c("span", {
|
|
94
|
+
className: "block text-xs text-muted-foreground/60",
|
|
95
|
+
children: t.date
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
})]
|
|
99
|
+
}), g && /* @__PURE__ */ c(n, {
|
|
100
|
+
type: "button",
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
size: "icon",
|
|
103
|
+
className: "size-7 shrink-0 text-muted-foreground hover:text-destructive",
|
|
104
|
+
onClick: () => {
|
|
105
|
+
g(t);
|
|
106
|
+
},
|
|
107
|
+
"aria-label": O ?? F("notifications.remove"),
|
|
108
|
+
title: O ?? F("notifications.remove"),
|
|
109
|
+
children: /* @__PURE__ */ c(d, { className: "size-3.5" })
|
|
110
|
+
})]
|
|
111
|
+
}, t.key);
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
}),
|
|
115
|
+
_ && /* @__PURE__ */ c("div", {
|
|
116
|
+
className: "border-t p-1",
|
|
117
|
+
children: /* @__PURE__ */ c(n, {
|
|
118
|
+
type: "button",
|
|
119
|
+
variant: "ghost",
|
|
120
|
+
size: "sm",
|
|
121
|
+
className: "h-8 w-full justify-center text-xs font-medium",
|
|
122
|
+
onClick: () => {
|
|
123
|
+
B(!1), _?.();
|
|
124
|
+
},
|
|
125
|
+
children: k ?? F("notifications.seeAll")
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
//#endregion
|
|
133
|
+
export { p as NotificationsBell };
|