@krosoft/react 0.0.381 → 0.0.382
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 +3 -3
- 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,115 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import { Button as t } from "./button.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { ArrowLeft as a, ArrowRight as o } from "lucide-react";
|
|
6
|
+
import s from "embla-carousel-react";
|
|
7
|
+
//#region src/components/ui/carousel.tsx
|
|
8
|
+
var c = n.createContext(null);
|
|
9
|
+
function l() {
|
|
10
|
+
let e = n.useContext(c);
|
|
11
|
+
if (!e) throw Error("useCarousel must be used within a <Carousel />");
|
|
12
|
+
return e;
|
|
13
|
+
}
|
|
14
|
+
var u = n.forwardRef(({ orientation: t = "horizontal", opts: i, setApi: a, plugins: o, className: l, children: u, ...d }, f) => {
|
|
15
|
+
let [p, m] = s({
|
|
16
|
+
...i,
|
|
17
|
+
axis: t === "horizontal" ? "x" : "y"
|
|
18
|
+
}, o), [h, g] = n.useState(!1), [_, v] = n.useState(!1), y = n.useCallback((e) => {
|
|
19
|
+
e && (g(e.canScrollPrev()), v(e.canScrollNext()));
|
|
20
|
+
}, []), b = n.useCallback(() => {
|
|
21
|
+
m?.scrollPrev();
|
|
22
|
+
}, [m]), x = n.useCallback(() => {
|
|
23
|
+
m?.scrollNext();
|
|
24
|
+
}, [m]), S = n.useCallback((e) => {
|
|
25
|
+
e.key === "ArrowLeft" ? (e.preventDefault(), b()) : e.key === "ArrowRight" && (e.preventDefault(), x());
|
|
26
|
+
}, [b, x]);
|
|
27
|
+
return n.useEffect(() => {
|
|
28
|
+
m && a && a(m);
|
|
29
|
+
}, [m, a]), n.useEffect(() => {
|
|
30
|
+
if (m) return y(m), m.on("reInit", y), m.on("select", y), () => {
|
|
31
|
+
m?.off("select", y);
|
|
32
|
+
};
|
|
33
|
+
}, [m, y]), /* @__PURE__ */ r(c.Provider, {
|
|
34
|
+
value: {
|
|
35
|
+
carouselRef: p,
|
|
36
|
+
api: m,
|
|
37
|
+
opts: i,
|
|
38
|
+
orientation: t || (i?.axis === "y" ? "vertical" : "horizontal"),
|
|
39
|
+
scrollPrev: b,
|
|
40
|
+
scrollNext: x,
|
|
41
|
+
canScrollPrev: h,
|
|
42
|
+
canScrollNext: _
|
|
43
|
+
},
|
|
44
|
+
children: /* @__PURE__ */ r("div", {
|
|
45
|
+
ref: f,
|
|
46
|
+
onKeyDownCapture: S,
|
|
47
|
+
className: e("relative", l),
|
|
48
|
+
role: "region",
|
|
49
|
+
"aria-roledescription": "carousel",
|
|
50
|
+
...d,
|
|
51
|
+
children: u
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
u.displayName = "Carousel";
|
|
56
|
+
var d = n.forwardRef(({ className: t, ...n }, i) => {
|
|
57
|
+
let { carouselRef: a, orientation: o } = l();
|
|
58
|
+
return /* @__PURE__ */ r("div", {
|
|
59
|
+
ref: a,
|
|
60
|
+
className: "overflow-hidden",
|
|
61
|
+
children: /* @__PURE__ */ r("div", {
|
|
62
|
+
ref: i,
|
|
63
|
+
className: e("flex", o === "horizontal" ? "-ml-4" : "-mt-4 flex-col", t),
|
|
64
|
+
...n
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
d.displayName = "CarouselContent";
|
|
69
|
+
var f = n.forwardRef(({ className: t, ...n }, i) => {
|
|
70
|
+
let { orientation: a } = l();
|
|
71
|
+
return /* @__PURE__ */ r("div", {
|
|
72
|
+
ref: i,
|
|
73
|
+
role: "group",
|
|
74
|
+
"aria-roledescription": "slide",
|
|
75
|
+
className: e("min-w-0 shrink-0 grow-0 basis-full", a === "horizontal" ? "pl-4" : "pt-4", t),
|
|
76
|
+
...n
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
f.displayName = "CarouselItem";
|
|
80
|
+
var p = n.forwardRef(({ className: n, variant: o = "outline", size: s = "icon", ...c }, u) => {
|
|
81
|
+
let { orientation: d, scrollPrev: f, canScrollPrev: p } = l();
|
|
82
|
+
return /* @__PURE__ */ i(t, {
|
|
83
|
+
ref: u,
|
|
84
|
+
variant: o,
|
|
85
|
+
size: s,
|
|
86
|
+
className: e("absolute h-8 w-8 rounded-control", d === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", n),
|
|
87
|
+
disabled: !p,
|
|
88
|
+
onClick: f,
|
|
89
|
+
...c,
|
|
90
|
+
children: [/* @__PURE__ */ r(a, { className: "size-4" }), /* @__PURE__ */ r("span", {
|
|
91
|
+
className: "sr-only",
|
|
92
|
+
children: "Previous slide"
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
p.displayName = "CarouselPrevious";
|
|
97
|
+
var m = n.forwardRef(({ className: n, variant: a = "outline", size: s = "icon", ...c }, u) => {
|
|
98
|
+
let { orientation: d, scrollNext: f, canScrollNext: p } = l();
|
|
99
|
+
return /* @__PURE__ */ i(t, {
|
|
100
|
+
ref: u,
|
|
101
|
+
variant: a,
|
|
102
|
+
size: s,
|
|
103
|
+
className: e("absolute h-8 w-8 rounded-control", d === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", n),
|
|
104
|
+
disabled: !p,
|
|
105
|
+
onClick: f,
|
|
106
|
+
...c,
|
|
107
|
+
children: [/* @__PURE__ */ r(o, { className: "size-4" }), /* @__PURE__ */ r("span", {
|
|
108
|
+
className: "sr-only",
|
|
109
|
+
children: "Next slide"
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
m.displayName = "CarouselNext";
|
|
114
|
+
//#endregion
|
|
115
|
+
export { u as Carousel, d as CarouselContent, f as CarouselItem, m as CarouselNext, p as CarouselPrevious };
|
|
@@ -1,75 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import * as a from "recharts";
|
|
5
|
-
//#region src/components/ui/card.tsx
|
|
6
|
-
var o = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("div", {
|
|
7
|
-
ref: i,
|
|
8
|
-
className: e("rounded-surface border bg-card text-card-foreground shadow-sm", t),
|
|
9
|
-
...n
|
|
10
|
-
}));
|
|
11
|
-
o.displayName = "Card";
|
|
12
|
-
var s = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("div", {
|
|
13
|
-
ref: i,
|
|
14
|
-
className: e("flex flex-col space-y-1.5 p-6", t),
|
|
15
|
-
...n
|
|
16
|
-
}));
|
|
17
|
-
s.displayName = "CardHeader";
|
|
18
|
-
var c = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("h3", {
|
|
19
|
-
ref: i,
|
|
20
|
-
className: e("text-2xl font-semibold leading-none tracking-tight", t),
|
|
21
|
-
...n
|
|
22
|
-
}));
|
|
23
|
-
c.displayName = "CardTitle";
|
|
24
|
-
var l = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("p", {
|
|
25
|
-
ref: i,
|
|
26
|
-
className: e("text-sm text-muted-foreground", t),
|
|
27
|
-
...n
|
|
28
|
-
}));
|
|
29
|
-
l.displayName = "CardDescription";
|
|
30
|
-
var u = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("div", {
|
|
31
|
-
ref: i,
|
|
32
|
-
className: e("p-6 pt-0", t),
|
|
33
|
-
...n
|
|
34
|
-
}));
|
|
35
|
-
u.displayName = "CardContent";
|
|
36
|
-
var d = t.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r("div", {
|
|
37
|
-
ref: i,
|
|
38
|
-
className: e("flex items-center p-6 pt-0", t),
|
|
39
|
-
...n
|
|
40
|
-
}));
|
|
41
|
-
d.displayName = "CardFooter";
|
|
42
|
-
//#endregion
|
|
43
5
|
//#region src/components/ui/chart.tsx
|
|
44
|
-
var
|
|
6
|
+
var o = {
|
|
45
7
|
light: "",
|
|
46
8
|
dark: ".dark"
|
|
47
|
-
},
|
|
48
|
-
function
|
|
49
|
-
let e = t.useContext(
|
|
9
|
+
}, s = t.createContext(null);
|
|
10
|
+
function c() {
|
|
11
|
+
let e = t.useContext(s);
|
|
50
12
|
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
51
13
|
return e;
|
|
52
14
|
}
|
|
53
|
-
var
|
|
54
|
-
let
|
|
55
|
-
return /* @__PURE__ */ r(
|
|
56
|
-
value: { config:
|
|
15
|
+
var l = t.forwardRef(({ id: n, className: o, children: c, config: l, ...d }, f) => {
|
|
16
|
+
let p = t.useId(), m = `chart-${n || p.replace(/:/g, "")}`;
|
|
17
|
+
return /* @__PURE__ */ r(s.Provider, {
|
|
18
|
+
value: { config: l },
|
|
57
19
|
children: /* @__PURE__ */ i("div", {
|
|
58
|
-
"data-chart":
|
|
59
|
-
ref:
|
|
20
|
+
"data-chart": m,
|
|
21
|
+
ref: f,
|
|
60
22
|
className: e("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", o),
|
|
61
|
-
...
|
|
62
|
-
children: [/* @__PURE__ */ r(
|
|
63
|
-
id:
|
|
64
|
-
config:
|
|
65
|
-
}), /* @__PURE__ */ r(a.ResponsiveContainer, { children:
|
|
23
|
+
...d,
|
|
24
|
+
children: [/* @__PURE__ */ r(u, {
|
|
25
|
+
id: m,
|
|
26
|
+
config: l
|
|
27
|
+
}), /* @__PURE__ */ r(a.ResponsiveContainer, { children: c })]
|
|
66
28
|
})
|
|
67
29
|
});
|
|
68
30
|
});
|
|
69
|
-
|
|
70
|
-
var
|
|
31
|
+
l.displayName = "Chart";
|
|
32
|
+
var u = ({ id: e, config: t }) => {
|
|
71
33
|
let n = Object.entries(t).filter(([e, t]) => t.theme || t.color);
|
|
72
|
-
return n.length ? /* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: Object.entries(
|
|
34
|
+
return n.length ? /* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: Object.entries(o).map(([t, r]) => `
|
|
73
35
|
${r} [data-chart=${e}] {
|
|
74
36
|
${n.map(([e, n]) => {
|
|
75
37
|
let r = n.theme?.[t] || n.color;
|
|
@@ -77,47 +39,47 @@ ${n.map(([e, n]) => {
|
|
|
77
39
|
}).join("\n")}
|
|
78
40
|
}
|
|
79
41
|
`).join("\n") } }) : null;
|
|
80
|
-
},
|
|
81
|
-
let { config:
|
|
82
|
-
if (
|
|
83
|
-
let [t] = o, n = `${
|
|
84
|
-
return
|
|
85
|
-
className: e("font-medium",
|
|
86
|
-
children:
|
|
42
|
+
}, d = a.Tooltip, f = t.forwardRef(({ active: a, payload: o = [], className: s, indicator: l = "dot", hideLabel: u = !1, hideIndicator: d = !1, label: f = "", labelFormatter: p, labelClassName: m, formatter: g, color: _, nameKey: v, labelKey: y }, b) => {
|
|
43
|
+
let { config: x } = c(), S = t.useMemo(() => {
|
|
44
|
+
if (u || !o?.length) return null;
|
|
45
|
+
let [t] = o, n = `${y || t.dataKey || t.name || "value"}`, i = h(x, t, n), a = !y && typeof f == "string" ? x[f]?.label || f : i?.label;
|
|
46
|
+
return p ? /* @__PURE__ */ r("div", {
|
|
47
|
+
className: e("font-medium", m),
|
|
48
|
+
children: p(a, o)
|
|
87
49
|
}) : a ? /* @__PURE__ */ r("div", {
|
|
88
|
-
className: e("font-medium",
|
|
50
|
+
className: e("font-medium", m),
|
|
89
51
|
children: a
|
|
90
52
|
}) : null;
|
|
91
53
|
}, [
|
|
92
|
-
d,
|
|
93
54
|
f,
|
|
94
|
-
o,
|
|
95
|
-
l,
|
|
96
55
|
p,
|
|
97
|
-
|
|
98
|
-
|
|
56
|
+
o,
|
|
57
|
+
u,
|
|
58
|
+
m,
|
|
59
|
+
x,
|
|
60
|
+
y
|
|
99
61
|
]);
|
|
100
62
|
if (!a || !o?.length) return null;
|
|
101
|
-
let C = o.length === 1 &&
|
|
63
|
+
let C = o.length === 1 && l !== "dot";
|
|
102
64
|
return /* @__PURE__ */ i("div", {
|
|
103
|
-
ref:
|
|
65
|
+
ref: b,
|
|
104
66
|
className: e("grid min-w-[8rem] items-start gap-1.5 rounded-surface border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", s),
|
|
105
67
|
children: [C ? null : S, /* @__PURE__ */ r("div", {
|
|
106
68
|
className: "grid gap-1.5",
|
|
107
69
|
children: o.map((t, a) => {
|
|
108
|
-
let o = `${
|
|
70
|
+
let o = `${v || t.name || t.dataKey || "value"}`, s = h(x, t, o), c = _ || t.payload.fill || t.color;
|
|
109
71
|
return /* @__PURE__ */ r("div", {
|
|
110
|
-
className: e("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
111
|
-
children:
|
|
72
|
+
className: e("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", l === "dot" && "items-center"),
|
|
73
|
+
children: g && t?.value !== void 0 && t.name ? g(t.value, t.name, t, a, t.payload) : /* @__PURE__ */ i(n, { children: [s?.icon ? /* @__PURE__ */ r(s.icon, {}) : !d && /* @__PURE__ */ r("div", {
|
|
112
74
|
className: e("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
113
|
-
"h-2.5 w-2.5":
|
|
114
|
-
"w-1":
|
|
115
|
-
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
116
|
-
"my-0.5": C &&
|
|
75
|
+
"h-2.5 w-2.5": l === "dot",
|
|
76
|
+
"w-1": l === "line",
|
|
77
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": l === "dashed",
|
|
78
|
+
"my-0.5": C && l === "dashed"
|
|
117
79
|
}),
|
|
118
80
|
style: {
|
|
119
|
-
"--color-bg":
|
|
120
|
-
"--color-border":
|
|
81
|
+
"--color-bg": c,
|
|
82
|
+
"--color-border": c
|
|
121
83
|
}
|
|
122
84
|
}), /* @__PURE__ */ i("div", {
|
|
123
85
|
className: e("flex flex-1 justify-between leading-none", C ? "items-end" : "items-center"),
|
|
@@ -137,14 +99,14 @@ ${n.map(([e, n]) => {
|
|
|
137
99
|
})]
|
|
138
100
|
});
|
|
139
101
|
});
|
|
140
|
-
|
|
141
|
-
var
|
|
142
|
-
let { config:
|
|
102
|
+
f.displayName = "ChartTooltip";
|
|
103
|
+
var p = a.Legend, m = t.forwardRef(({ className: t, hideIcon: n = !1, payload: a, verticalAlign: o = "bottom", nameKey: s }, l) => {
|
|
104
|
+
let { config: u } = c();
|
|
143
105
|
return !a || !Array.isArray(a) || !a.length ? null : /* @__PURE__ */ r("div", {
|
|
144
|
-
ref:
|
|
106
|
+
ref: l,
|
|
145
107
|
className: e("flex items-center justify-center gap-4", o === "top" ? "pb-3" : "pt-3", t),
|
|
146
108
|
children: Array.isArray(a) && a.map((t) => {
|
|
147
|
-
let a = `${s || t.dataKey || "value"}`, o =
|
|
109
|
+
let a = `${s || t.dataKey || "value"}`, o = h(u, t, a);
|
|
148
110
|
return /* @__PURE__ */ i("div", {
|
|
149
111
|
className: e("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
150
112
|
children: [o?.icon && !n ? /* @__PURE__ */ r(o.icon, {}) : /* @__PURE__ */ r("div", {
|
|
@@ -155,11 +117,11 @@ var y = a.Legend, b = t.forwardRef(({ className: t, hideIcon: n = !1, payload: a
|
|
|
155
117
|
})
|
|
156
118
|
});
|
|
157
119
|
});
|
|
158
|
-
|
|
159
|
-
function
|
|
120
|
+
m.displayName = "ChartLegend";
|
|
121
|
+
function h(e, t, n) {
|
|
160
122
|
if (typeof t != "object" || !t) return;
|
|
161
123
|
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
162
124
|
return n in t && typeof t[n] == "string" ? i = t[n] : r && n in r && typeof r[n] == "string" && (i = r[n]), i in e ? e[i] : e[n];
|
|
163
125
|
}
|
|
164
126
|
//#endregion
|
|
165
|
-
export {
|
|
127
|
+
export { l as ChartContainer, p as ChartLegend, m as ChartLegendContent, u as ChartStyle, d as ChartTooltip, f as ChartTooltipContent };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { CheckIcon as r } from "lucide-react";
|
|
5
|
+
import * as i from "@radix-ui/react-checkbox";
|
|
6
|
+
//#region src/components/ui/checkbox.tsx
|
|
7
|
+
var a = t.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ n(i.Root, {
|
|
8
|
+
ref: o,
|
|
9
|
+
className: e("peer size-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground", t),
|
|
10
|
+
...a,
|
|
11
|
+
children: /* @__PURE__ */ n(i.Indicator, {
|
|
12
|
+
className: e("flex items-center justify-center text-current"),
|
|
13
|
+
children: a.checked === "indeterminate" ? /* @__PURE__ */ n("svg", {
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
fill: "none",
|
|
17
|
+
stroke: "currentColor",
|
|
18
|
+
strokeWidth: 3,
|
|
19
|
+
className: "size-3",
|
|
20
|
+
children: /* @__PURE__ */ n("line", {
|
|
21
|
+
x1: "5",
|
|
22
|
+
y1: "12",
|
|
23
|
+
x2: "19",
|
|
24
|
+
y2: "12"
|
|
25
|
+
})
|
|
26
|
+
}) : /* @__PURE__ */ n(r, { className: "size-3" })
|
|
27
|
+
})
|
|
28
|
+
}));
|
|
29
|
+
a.displayName = i.Root.displayName;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { a as Checkbox };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import { useKrosoftTranslation as t } from "../../i18n/useKrosoftTranslation.js";
|
|
3
|
+
import { Dialog as n, DialogContent as r, DialogDescription as i, DialogTitle as a } from "./dialog.js";
|
|
4
|
+
import * as o from "react";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
import { SearchIcon as l } from "lucide-react";
|
|
7
|
+
import { Command as u } from "cmdk";
|
|
8
|
+
//#region src/components/ui/command.tsx
|
|
9
|
+
var d = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ s(u, {
|
|
10
|
+
ref: r,
|
|
11
|
+
className: e("flex h-full w-full flex-col overflow-hidden rounded-surface bg-popover text-popover-foreground", t),
|
|
12
|
+
...n
|
|
13
|
+
}));
|
|
14
|
+
d.displayName = u.displayName;
|
|
15
|
+
var f = ({ title: o, description: l, shouldFilter: u, className: f, children: p, ...m }) => {
|
|
16
|
+
let { t: h } = t();
|
|
17
|
+
return /* @__PURE__ */ s(n, {
|
|
18
|
+
...m,
|
|
19
|
+
children: /* @__PURE__ */ c(r, {
|
|
20
|
+
className: "flex flex-col overflow-hidden p-0 shadow-lg",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ s(a, {
|
|
23
|
+
className: "sr-only",
|
|
24
|
+
children: o ?? h("search.commandTitle")
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ s(i, {
|
|
27
|
+
className: "sr-only",
|
|
28
|
+
children: l ?? h("search.commandDescription")
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ s(d, {
|
|
31
|
+
shouldFilter: u,
|
|
32
|
+
className: e("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3", "[&_[cmdk-list]]:max-h-none [&_[cmdk-list]]:min-h-0 [&_[cmdk-list]]:flex-1 sm:[&_[cmdk-list]]:max-h-[300px] sm:[&_[cmdk-list]]:flex-none", f),
|
|
33
|
+
children: p
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}, p = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ c("div", {
|
|
39
|
+
className: "flex items-center border-b px-3",
|
|
40
|
+
"cmdk-input-wrapper": "",
|
|
41
|
+
children: [/* @__PURE__ */ s(l, { className: "mr-2 size-4 shrink-0 opacity-50" }), /* @__PURE__ */ s(u.Input, {
|
|
42
|
+
ref: r,
|
|
43
|
+
className: e("flex h-11 w-full rounded-control bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
44
|
+
...n
|
|
45
|
+
})]
|
|
46
|
+
}));
|
|
47
|
+
p.displayName = u.Input.displayName;
|
|
48
|
+
var m = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ s(u.List, {
|
|
49
|
+
ref: r,
|
|
50
|
+
className: e("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
|
|
51
|
+
...n
|
|
52
|
+
}));
|
|
53
|
+
m.displayName = u.List.displayName;
|
|
54
|
+
var h = o.forwardRef((e, t) => /* @__PURE__ */ s(u.Empty, {
|
|
55
|
+
ref: t,
|
|
56
|
+
className: "py-6 text-center text-sm",
|
|
57
|
+
...e
|
|
58
|
+
}));
|
|
59
|
+
h.displayName = u.Empty.displayName;
|
|
60
|
+
var g = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ s(u.Group, {
|
|
61
|
+
ref: r,
|
|
62
|
+
className: e("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", t),
|
|
63
|
+
...n
|
|
64
|
+
}));
|
|
65
|
+
g.displayName = u.Group.displayName;
|
|
66
|
+
var _ = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ s(u.Separator, {
|
|
67
|
+
ref: r,
|
|
68
|
+
className: e("-mx-1 h-px bg-border", t),
|
|
69
|
+
...n
|
|
70
|
+
}));
|
|
71
|
+
_.displayName = u.Separator.displayName;
|
|
72
|
+
var v = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ s(u.Item, {
|
|
73
|
+
ref: r,
|
|
74
|
+
className: e("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50", t),
|
|
75
|
+
...n
|
|
76
|
+
}));
|
|
77
|
+
v.displayName = u.Item.displayName;
|
|
78
|
+
var y = ({ className: t, ...n }) => /* @__PURE__ */ s("span", {
|
|
79
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
|
|
80
|
+
...n
|
|
81
|
+
});
|
|
82
|
+
y.displayName = "CommandShortcut";
|
|
83
|
+
//#endregion
|
|
84
|
+
export { d as Command, f as CommandDialog, h as CommandEmpty, g as CommandGroup, p as CommandInput, v as CommandItem, m as CommandList, _ as CommandSeparator, y as CommandShortcut };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Check as i, ChevronRight as a, Circle as o } from "lucide-react";
|
|
5
|
+
import * as s from "@radix-ui/react-context-menu";
|
|
6
|
+
//#region src/components/ui/context-menu.tsx
|
|
7
|
+
var c = s.Root, l = s.Trigger, u = s.Group, d = s.Portal, f = s.Sub, p = s.RadioGroup, m = t.forwardRef(({ className: t, inset: i, children: o, ...c }, l) => /* @__PURE__ */ r(s.SubTrigger, {
|
|
8
|
+
ref: l,
|
|
9
|
+
className: e("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", i && "pl-8", t),
|
|
10
|
+
...c,
|
|
11
|
+
children: [o, /* @__PURE__ */ n(a, { className: "ml-auto size-4" })]
|
|
12
|
+
}));
|
|
13
|
+
m.displayName = s.SubTrigger.displayName;
|
|
14
|
+
var h = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(s.SubContent, {
|
|
15
|
+
ref: i,
|
|
16
|
+
className: e("z-50 min-w-[8rem] overflow-hidden rounded-surface border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", t),
|
|
17
|
+
...r
|
|
18
|
+
}));
|
|
19
|
+
h.displayName = s.SubContent.displayName;
|
|
20
|
+
var g = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(s.Portal, { children: /* @__PURE__ */ n(s.Content, {
|
|
21
|
+
ref: i,
|
|
22
|
+
className: e("z-50 min-w-[8rem] overflow-hidden rounded-surface border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", t),
|
|
23
|
+
...r
|
|
24
|
+
}) }));
|
|
25
|
+
g.displayName = s.Content.displayName;
|
|
26
|
+
var _ = t.forwardRef(({ className: t, inset: r, ...i }, a) => /* @__PURE__ */ n(s.Item, {
|
|
27
|
+
ref: a,
|
|
28
|
+
className: e("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r && "pl-8", t),
|
|
29
|
+
...i
|
|
30
|
+
}));
|
|
31
|
+
_.displayName = s.Item.displayName;
|
|
32
|
+
var v = t.forwardRef(({ className: t, children: a, checked: o, ...c }, l) => /* @__PURE__ */ r(s.CheckboxItem, {
|
|
33
|
+
ref: l,
|
|
34
|
+
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", t),
|
|
35
|
+
checked: o,
|
|
36
|
+
...c,
|
|
37
|
+
children: [/* @__PURE__ */ n("span", {
|
|
38
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
39
|
+
children: /* @__PURE__ */ n(s.ItemIndicator, { children: /* @__PURE__ */ n(i, { className: "size-4" }) })
|
|
40
|
+
}), a]
|
|
41
|
+
}));
|
|
42
|
+
v.displayName = s.CheckboxItem.displayName;
|
|
43
|
+
var y = t.forwardRef(({ className: t, children: i, ...a }, c) => /* @__PURE__ */ r(s.RadioItem, {
|
|
44
|
+
ref: c,
|
|
45
|
+
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", t),
|
|
46
|
+
...a,
|
|
47
|
+
children: [/* @__PURE__ */ n("span", {
|
|
48
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
49
|
+
children: /* @__PURE__ */ n(s.ItemIndicator, { children: /* @__PURE__ */ n(o, { className: "h-2 w-2 fill-current" }) })
|
|
50
|
+
}), i]
|
|
51
|
+
}));
|
|
52
|
+
y.displayName = s.RadioItem.displayName;
|
|
53
|
+
var b = t.forwardRef(({ className: t, inset: r, ...i }, a) => /* @__PURE__ */ n(s.Label, {
|
|
54
|
+
ref: a,
|
|
55
|
+
className: e("px-2 py-1.5 text-sm font-semibold text-foreground", r && "pl-8", t),
|
|
56
|
+
...i
|
|
57
|
+
}));
|
|
58
|
+
b.displayName = s.Label.displayName;
|
|
59
|
+
var x = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(s.Separator, {
|
|
60
|
+
ref: i,
|
|
61
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
62
|
+
...r
|
|
63
|
+
}));
|
|
64
|
+
x.displayName = s.Separator.displayName;
|
|
65
|
+
var S = ({ className: t, ...r }) => /* @__PURE__ */ n("span", {
|
|
66
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
|
|
67
|
+
...r
|
|
68
|
+
});
|
|
69
|
+
S.displayName = "ContextMenuShortcut";
|
|
70
|
+
//#endregion
|
|
71
|
+
export { c as ContextMenu, v as ContextMenuCheckboxItem, g as ContextMenuContent, u as ContextMenuGroup, _ as ContextMenuItem, b as ContextMenuLabel, d as ContextMenuPortal, p as ContextMenuRadioGroup, y as ContextMenuRadioItem, x as ContextMenuSeparator, S as ContextMenuShortcut, f as ContextMenuSub, h as ContextMenuSubContent, m as ContextMenuSubTrigger, l as ContextMenuTrigger };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
//#region src/components/ui/control.ts
|
|
3
|
+
var t = "h-10 rounded-control border border-input bg-background px-3 py-2 text-sm ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", n = e(t, "flex items-center justify-between outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 [&>span]:line-clamp-1"), r = "w-full md:w-[200px]";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as controlBaseClass, r as controlFilterWidthClass, n as controlTriggerClass };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { X as i } from "lucide-react";
|
|
5
|
+
import * as a from "@radix-ui/react-dialog";
|
|
6
|
+
//#region src/components/ui/dialog.tsx
|
|
7
|
+
var o = a.Root, s = a.Trigger, c = a.Portal, l = a.Close, u = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Overlay, {
|
|
8
|
+
ref: i,
|
|
9
|
+
className: e("fixed inset-0 z-[70] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t),
|
|
10
|
+
...r
|
|
11
|
+
}));
|
|
12
|
+
u.displayName = a.Overlay.displayName;
|
|
13
|
+
var d = "w-full max-w-none h-[100dvh] max-h-[100dvh] content-start rounded-none sm:h-auto sm:max-h-[95vh] sm:max-w-lg sm:rounded-surface", f = t.forwardRef(({ className: t, children: o, ...s }, l) => /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(u, {}), /* @__PURE__ */ r(a.Content, {
|
|
14
|
+
ref: l,
|
|
15
|
+
className: e("fixed left-[50%] top-[50%] z-[70] grid overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]", d, t),
|
|
16
|
+
...s,
|
|
17
|
+
children: [o, /* @__PURE__ */ r(a.Close, {
|
|
18
|
+
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
|
|
19
|
+
children: [/* @__PURE__ */ n(i, { className: "size-4" }), /* @__PURE__ */ n("span", {
|
|
20
|
+
className: "sr-only",
|
|
21
|
+
children: "Close"
|
|
22
|
+
})]
|
|
23
|
+
})]
|
|
24
|
+
})] }));
|
|
25
|
+
f.displayName = a.Content.displayName;
|
|
26
|
+
var p = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
27
|
+
className: e("flex flex-col space-y-1.5 text-center sm:text-left", t),
|
|
28
|
+
...r
|
|
29
|
+
});
|
|
30
|
+
p.displayName = "DialogHeader";
|
|
31
|
+
var m = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
32
|
+
className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
|
|
33
|
+
...r
|
|
34
|
+
});
|
|
35
|
+
m.displayName = "DialogFooter";
|
|
36
|
+
var h = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Title, {
|
|
37
|
+
ref: i,
|
|
38
|
+
className: e("text-lg font-semibold leading-none tracking-tight", t),
|
|
39
|
+
...r
|
|
40
|
+
}));
|
|
41
|
+
h.displayName = a.Title.displayName;
|
|
42
|
+
var g = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Description, {
|
|
43
|
+
ref: i,
|
|
44
|
+
className: e("text-sm text-muted-foreground", t),
|
|
45
|
+
...r
|
|
46
|
+
}));
|
|
47
|
+
g.displayName = a.Description.displayName;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { o as Dialog, l as DialogClose, f as DialogContent, g as DialogDescription, m as DialogFooter, p as DialogHeader, u as DialogOverlay, c as DialogPortal, h as DialogTitle, s as DialogTrigger };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Drawer as i } from "vaul";
|
|
5
|
+
//#region src/components/ui/drawer.tsx
|
|
6
|
+
var a = ({ shouldScaleBackground: e = !0, ...t }) => /* @__PURE__ */ n(i.Root, {
|
|
7
|
+
shouldScaleBackground: e,
|
|
8
|
+
...t
|
|
9
|
+
});
|
|
10
|
+
a.displayName = "Drawer";
|
|
11
|
+
var o = i.Trigger, s = i.Portal, c = i.Close, l = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Overlay, {
|
|
12
|
+
ref: a,
|
|
13
|
+
className: e("fixed inset-0 z-50 bg-black/80", t),
|
|
14
|
+
...r
|
|
15
|
+
}));
|
|
16
|
+
l.displayName = i.Overlay.displayName;
|
|
17
|
+
var u = t.forwardRef(({ className: t, children: a, ...o }, c) => /* @__PURE__ */ r(s, { children: [/* @__PURE__ */ n(l, {}), /* @__PURE__ */ r(i.Content, {
|
|
18
|
+
ref: c,
|
|
19
|
+
className: e("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-surface border bg-background", t),
|
|
20
|
+
...o,
|
|
21
|
+
children: [/* @__PURE__ */ n("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }), a]
|
|
22
|
+
})] }));
|
|
23
|
+
u.displayName = "DrawerContent";
|
|
24
|
+
var d = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
25
|
+
className: e("grid gap-1.5 p-4 text-center sm:text-left", t),
|
|
26
|
+
...r
|
|
27
|
+
});
|
|
28
|
+
d.displayName = "DrawerHeader";
|
|
29
|
+
var f = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
30
|
+
className: e("mt-auto flex flex-col gap-2 p-4", t),
|
|
31
|
+
...r
|
|
32
|
+
});
|
|
33
|
+
f.displayName = "DrawerFooter";
|
|
34
|
+
var p = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Title, {
|
|
35
|
+
ref: a,
|
|
36
|
+
className: e("text-lg font-semibold leading-none tracking-tight", t),
|
|
37
|
+
...r
|
|
38
|
+
}));
|
|
39
|
+
p.displayName = i.Title.displayName;
|
|
40
|
+
var m = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Description, {
|
|
41
|
+
ref: a,
|
|
42
|
+
className: e("text-sm text-muted-foreground", t),
|
|
43
|
+
...r
|
|
44
|
+
}));
|
|
45
|
+
m.displayName = i.Description.displayName;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { a as Drawer, c as DrawerClose, u as DrawerContent, m as DrawerDescription, f as DrawerFooter, d as DrawerHeader, l as DrawerOverlay, s as DrawerPortal, p as DrawerTitle, o as DrawerTrigger };
|