@krosoft/react 0.0.380 → 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 +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,29 @@
|
|
|
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 * as i from "@radix-ui/react-scroll-area";
|
|
5
|
+
//#region src/components/ui/scroll-area.tsx
|
|
6
|
+
var a = t.forwardRef(({ className: t, viewportClassName: a, children: s, ...c }, l) => /* @__PURE__ */ r(i.Root, {
|
|
7
|
+
ref: l,
|
|
8
|
+
className: e("relative overflow-hidden", t),
|
|
9
|
+
...c,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ n(i.Viewport, {
|
|
12
|
+
className: e("h-full w-full rounded-[inherit]", a),
|
|
13
|
+
children: s
|
|
14
|
+
}),
|
|
15
|
+
/* @__PURE__ */ n(o, {}),
|
|
16
|
+
/* @__PURE__ */ n(i.Corner, {})
|
|
17
|
+
]
|
|
18
|
+
}));
|
|
19
|
+
a.displayName = i.Root.displayName;
|
|
20
|
+
var o = t.forwardRef(({ className: t, orientation: r = "vertical", ...a }, o) => /* @__PURE__ */ n(i.ScrollAreaScrollbar, {
|
|
21
|
+
ref: o,
|
|
22
|
+
orientation: r,
|
|
23
|
+
className: e("flex touch-none select-none transition-colors", r === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", t),
|
|
24
|
+
...a,
|
|
25
|
+
children: /* @__PURE__ */ n(i.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
26
|
+
}));
|
|
27
|
+
o.displayName = i.ScrollAreaScrollbar.displayName;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { a as ScrollArea, o as ScrollBar };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import { controlTriggerClass as t } from "./control.js";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
import { CheckIcon as a, ChevronDownIcon as o, ChevronUpIcon as s, XIcon as c } from "lucide-react";
|
|
@@ -78,4 +78,4 @@ var y = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(l.Separato
|
|
|
78
78
|
}));
|
|
79
79
|
y.displayName = l.Separator.displayName;
|
|
80
80
|
//#endregion
|
|
81
|
-
export {
|
|
81
|
+
export { u as Select, g as SelectContent, d as SelectGroup, v as SelectItem, _ as SelectLabel, h as SelectScrollDownButton, m as SelectScrollUpButton, y as SelectSeparator, p as SelectTrigger, f as SelectValue };
|
|
@@ -0,0 +1,15 @@
|
|
|
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 * as r from "@radix-ui/react-separator";
|
|
5
|
+
//#region src/components/ui/separator.tsx
|
|
6
|
+
var i = t.forwardRef(({ className: t, orientation: i = "horizontal", decorative: a = !0, ...o }, s) => /* @__PURE__ */ n(r.Root, {
|
|
7
|
+
ref: s,
|
|
8
|
+
decorative: a,
|
|
9
|
+
orientation: i,
|
|
10
|
+
className: e("shrink-0 bg-border", i === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", t),
|
|
11
|
+
...o
|
|
12
|
+
}));
|
|
13
|
+
i.displayName = r.Root.displayName;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as Separator };
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { cva as a } from "class-variance-authority";
|
|
6
|
+
import * as o from "@radix-ui/react-dialog";
|
|
7
|
+
//#region src/components/ui/sheet.tsx
|
|
8
|
+
var s = o.Root, c = o.Trigger, l = o.Close, u = o.Portal, d = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(o.Overlay, {
|
|
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
|
+
ref: i
|
|
12
|
+
}));
|
|
13
|
+
d.displayName = o.Overlay.displayName;
|
|
14
|
+
var f = a("fixed z-[70] gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
|
|
15
|
+
variants: { side: {
|
|
16
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
17
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
18
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
19
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { side: "right" }
|
|
22
|
+
}), p = t.forwardRef(({ side: t = "right", className: a, children: s, ...c }, l) => /* @__PURE__ */ r(u, { children: [/* @__PURE__ */ n(d, {}), /* @__PURE__ */ r(o.Content, {
|
|
23
|
+
ref: l,
|
|
24
|
+
className: e(f({ side: t }), a),
|
|
25
|
+
...c,
|
|
26
|
+
children: [s, /* @__PURE__ */ r(o.Close, {
|
|
27
|
+
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
|
|
28
|
+
children: [/* @__PURE__ */ n(i, { className: "size-4" }), /* @__PURE__ */ n("span", {
|
|
29
|
+
className: "sr-only",
|
|
30
|
+
children: "Close"
|
|
31
|
+
})]
|
|
32
|
+
})]
|
|
33
|
+
})] }));
|
|
34
|
+
p.displayName = o.Content.displayName;
|
|
35
|
+
var m = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
36
|
+
className: e("flex flex-col space-y-2 text-center sm:text-left", t),
|
|
37
|
+
...r
|
|
38
|
+
});
|
|
39
|
+
m.displayName = "SheetHeader";
|
|
40
|
+
var h = ({ className: t, ...r }) => /* @__PURE__ */ n("div", {
|
|
41
|
+
className: e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
|
|
42
|
+
...r
|
|
43
|
+
});
|
|
44
|
+
h.displayName = "SheetFooter";
|
|
45
|
+
var g = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(o.Title, {
|
|
46
|
+
ref: i,
|
|
47
|
+
className: e("text-lg font-semibold text-foreground", t),
|
|
48
|
+
...r
|
|
49
|
+
}));
|
|
50
|
+
g.displayName = o.Title.displayName;
|
|
51
|
+
var _ = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(o.Description, {
|
|
52
|
+
ref: i,
|
|
53
|
+
className: e("text-sm text-muted-foreground", t),
|
|
54
|
+
...r
|
|
55
|
+
}));
|
|
56
|
+
_.displayName = o.Description.displayName;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { s as Sheet, l as SheetClose, p as SheetContent, _ as SheetDescription, h as SheetFooter, m as SheetHeader, d as SheetOverlay, u as SheetPortal, g as SheetTitle, c as SheetTrigger };
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
//#region src/components/ui/simple-table.tsx
|
|
5
|
+
var r = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("div", {
|
|
6
|
+
className: "relative w-full max-w-full overflow-auto",
|
|
7
|
+
children: /* @__PURE__ */ n("table", {
|
|
8
|
+
ref: i,
|
|
9
|
+
className: e("w-full caption-bottom text-sm", t),
|
|
10
|
+
...r
|
|
11
|
+
})
|
|
12
|
+
}));
|
|
13
|
+
r.displayName = "SimpleTable";
|
|
14
|
+
var i = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("thead", {
|
|
15
|
+
ref: i,
|
|
16
|
+
className: e("[&_tr]:border-b", t),
|
|
17
|
+
...r
|
|
18
|
+
}));
|
|
19
|
+
i.displayName = "SimpleTableHeader";
|
|
20
|
+
var a = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("tbody", {
|
|
21
|
+
ref: i,
|
|
22
|
+
className: e("[&_tr:last-child]:border-0", t),
|
|
23
|
+
...r
|
|
24
|
+
}));
|
|
25
|
+
a.displayName = "SimpleTableBody";
|
|
26
|
+
var o = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("tfoot", {
|
|
27
|
+
ref: i,
|
|
28
|
+
className: e("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", t),
|
|
29
|
+
...r
|
|
30
|
+
}));
|
|
31
|
+
o.displayName = "SimpleTableFooter";
|
|
32
|
+
var s = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("tr", {
|
|
33
|
+
ref: i,
|
|
34
|
+
className: e("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", t),
|
|
35
|
+
...r
|
|
36
|
+
}));
|
|
37
|
+
s.displayName = "SimpleTableRow";
|
|
38
|
+
var c = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("th", {
|
|
39
|
+
ref: i,
|
|
40
|
+
className: e("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", t),
|
|
41
|
+
...r
|
|
42
|
+
}));
|
|
43
|
+
c.displayName = "SimpleTableHead";
|
|
44
|
+
var l = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("td", {
|
|
45
|
+
ref: i,
|
|
46
|
+
className: e("p-4 align-middle [&:has([role=checkbox])]:pr-0", t),
|
|
47
|
+
...r
|
|
48
|
+
}));
|
|
49
|
+
l.displayName = "SimpleTableCell";
|
|
50
|
+
var u = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("caption", {
|
|
51
|
+
ref: i,
|
|
52
|
+
className: e("mt-4 text-sm text-muted-foreground", t),
|
|
53
|
+
...r
|
|
54
|
+
}));
|
|
55
|
+
u.displayName = "SimpleTableCaption";
|
|
56
|
+
//#endregion
|
|
57
|
+
export { r as SimpleTable, a as SimpleTableBody, u as SimpleTableCaption, l as SimpleTableCell, o as SimpleTableFooter, c as SimpleTableHead, i as SimpleTableHeader, s as SimpleTableRow };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/ui/skeleton.tsx
|
|
4
4
|
function n({ className: n, ...r }) {
|
|
@@ -8,4 +8,4 @@ function n({ className: n, ...r }) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { n as
|
|
11
|
+
export { n as Skeleton };
|
|
@@ -0,0 +1,17 @@
|
|
|
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 * as i from "@radix-ui/react-slider";
|
|
5
|
+
//#region src/components/ui/slider.tsx
|
|
6
|
+
var a = t.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ r(i.Root, {
|
|
7
|
+
ref: o,
|
|
8
|
+
className: e("relative flex w-full touch-none select-none items-center", t),
|
|
9
|
+
...a,
|
|
10
|
+
children: [/* @__PURE__ */ n(i.Track, {
|
|
11
|
+
className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
|
|
12
|
+
children: /* @__PURE__ */ n(i.Range, { className: "absolute h-full bg-primary" })
|
|
13
|
+
}), /* @__PURE__ */ n(i.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })]
|
|
14
|
+
}));
|
|
15
|
+
a.displayName = i.Root.displayName;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { a as Slider };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { XIcon as t } from "lucide-react";
|
|
3
|
+
import { useTheme as n } from "next-themes";
|
|
4
|
+
import { Toaster as r, toast as i } from "sonner";
|
|
5
|
+
//#region src/components/ui/sonner.tsx
|
|
6
|
+
var a = ({ ...i }) => {
|
|
7
|
+
let { theme: a = "system" } = n();
|
|
8
|
+
return /* @__PURE__ */ e(r, {
|
|
9
|
+
theme: a,
|
|
10
|
+
className: "toaster group",
|
|
11
|
+
icons: { close: /* @__PURE__ */ e(t, { className: "size-4" }) },
|
|
12
|
+
toastOptions: { classNames: {
|
|
13
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
14
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
15
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground !rounded-control",
|
|
16
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground !rounded-control",
|
|
17
|
+
closeButton: "!static !order-last !size-6 !transform-none !rounded-control !border-0 !bg-transparent !text-foreground/60 !opacity-100 hover:!bg-muted hover:!text-foreground focus-visible:!ring-2 focus-visible:!ring-ring"
|
|
18
|
+
} },
|
|
19
|
+
...i
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { a as Toaster, i as toast };
|
|
@@ -0,0 +1,14 @@
|
|
|
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 * as r from "@radix-ui/react-switch";
|
|
5
|
+
//#region src/components/ui/switch.tsx
|
|
6
|
+
var i = t.forwardRef(({ className: t, ...i }, a) => /* @__PURE__ */ n(r.Root, {
|
|
7
|
+
className: e("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", t),
|
|
8
|
+
...i,
|
|
9
|
+
ref: a,
|
|
10
|
+
children: /* @__PURE__ */ n(r.Thumb, { className: e("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
|
|
11
|
+
}));
|
|
12
|
+
i.displayName = r.Root.displayName;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i as Switch };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import { useScrollFade as t } from "../../hooks/ui/useScrollFade.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { cva as i } from "class-variance-authority";
|
|
6
|
+
import * as a from "@radix-ui/react-tabs";
|
|
7
|
+
//#region src/components/ui/tabs.tsx
|
|
8
|
+
var o = a.Root, s = i("text-muted-foreground [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", {
|
|
9
|
+
variants: { variant: {
|
|
10
|
+
line: "inline-flex h-10 w-full items-center justify-start gap-6 overflow-x-auto overscroll-x-contain border-b border-border bg-transparent p-0",
|
|
11
|
+
solid: "inline-flex h-10 w-fit items-center justify-center gap-1 rounded-control bg-muted p-1",
|
|
12
|
+
outline: "inline-flex h-10 w-fit items-center justify-center gap-1 bg-transparent p-0",
|
|
13
|
+
ghost: "inline-flex h-10 w-fit items-center justify-center gap-1 bg-transparent p-0"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { variant: "line" }
|
|
16
|
+
}), c = i("relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap text-sm font-medium text-muted-foreground ring-offset-background cursor-pointer transition-colors data-[state=inactive]:hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground [&_svg]:h-4 [&_svg]:w-4", {
|
|
17
|
+
variants: { variant: {
|
|
18
|
+
line: "rounded-none border-b-2 border-transparent bg-transparent px-1 pb-2.5 pt-2 -mb-px data-[state=active]:border-primary data-[state=active]:shadow-none",
|
|
19
|
+
solid: "rounded-control px-3 py-1.5 data-[state=active]:bg-background data-[state=active]:shadow-sm",
|
|
20
|
+
outline: "rounded-control border border-transparent px-3 py-1.5 data-[state=inactive]:hover:bg-muted data-[state=active]:border-primary data-[state=active]:text-primary data-[state=active]:font-medium data-[state=active]:shadow-none",
|
|
21
|
+
ghost: "rounded-control px-3 py-1.5 data-[state=inactive]:hover:bg-accent data-[state=active]:text-primary data-[state=active]:font-medium data-[state=active]:shadow-none"
|
|
22
|
+
} },
|
|
23
|
+
defaultVariants: { variant: "line" }
|
|
24
|
+
}), l = n.createContext("line"), u = n.forwardRef(({ className: i, style: o, variant: c, ...u }, d) => {
|
|
25
|
+
let f = c ?? "line", p = n.useRef(null), m = n.useCallback((e) => {
|
|
26
|
+
p.current = e, typeof d == "function" ? d(e) : d && (d.current = e);
|
|
27
|
+
}, [d]), h = t(p);
|
|
28
|
+
return /* @__PURE__ */ r(l.Provider, {
|
|
29
|
+
value: f,
|
|
30
|
+
children: /* @__PURE__ */ r(a.List, {
|
|
31
|
+
ref: m,
|
|
32
|
+
style: {
|
|
33
|
+
...o,
|
|
34
|
+
...h
|
|
35
|
+
},
|
|
36
|
+
className: e(s({ variant: f }), i),
|
|
37
|
+
...u
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
u.displayName = a.List.displayName;
|
|
42
|
+
var d = n.forwardRef(({ className: t, variant: i, ...o }, s) => {
|
|
43
|
+
let u = n.useContext(l);
|
|
44
|
+
return /* @__PURE__ */ r(a.Trigger, {
|
|
45
|
+
ref: s,
|
|
46
|
+
className: e(c({ variant: i ?? u }), t),
|
|
47
|
+
...o
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
d.displayName = a.Trigger.displayName;
|
|
51
|
+
var f = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Content, {
|
|
52
|
+
ref: i,
|
|
53
|
+
className: e("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", t),
|
|
54
|
+
...n
|
|
55
|
+
}));
|
|
56
|
+
f.displayName = a.Content.displayName;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { o as Tabs, f as TabsContent, u as TabsList, d as TabsTrigger, s as tabsListVariants, c as tabsTriggerVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
//#region src/components/ui/textarea.tsx
|
|
5
|
+
var r = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("textarea", {
|
|
6
|
+
className: e("flex min-h-[80px] w-full rounded-control border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
7
|
+
ref: i,
|
|
8
|
+
...r
|
|
9
|
+
}));
|
|
10
|
+
r.displayName = "Textarea";
|
|
11
|
+
//#endregion
|
|
12
|
+
export { r as Textarea };
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { XIcon as r } from "lucide-react";
|
|
5
|
+
import { cva as i } from "class-variance-authority";
|
|
6
|
+
import * as a from "@radix-ui/react-toast";
|
|
7
|
+
//#region src/components/ui/toast.tsx
|
|
8
|
+
var o = a.Provider, s = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Viewport, {
|
|
9
|
+
ref: i,
|
|
10
|
+
className: e("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", t),
|
|
11
|
+
...r
|
|
12
|
+
}));
|
|
13
|
+
s.displayName = a.Viewport.displayName;
|
|
14
|
+
var c = i("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-surface border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
|
|
15
|
+
variants: { variant: {
|
|
16
|
+
default: "border bg-background text-foreground",
|
|
17
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
18
|
+
} },
|
|
19
|
+
defaultVariants: { variant: "default" }
|
|
20
|
+
}), l = t.forwardRef(({ className: t, variant: r, ...i }, o) => /* @__PURE__ */ n(a.Root, {
|
|
21
|
+
ref: o,
|
|
22
|
+
className: e(c({ variant: r }), t),
|
|
23
|
+
...i
|
|
24
|
+
}));
|
|
25
|
+
l.displayName = a.Root.displayName;
|
|
26
|
+
var u = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Action, {
|
|
27
|
+
ref: i,
|
|
28
|
+
className: e("inline-flex h-8 shrink-0 items-center justify-center rounded-control border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50", t),
|
|
29
|
+
...r
|
|
30
|
+
}));
|
|
31
|
+
u.displayName = a.Action.displayName;
|
|
32
|
+
var d = t.forwardRef(({ className: t, ...i }, o) => /* @__PURE__ */ n(a.Close, {
|
|
33
|
+
ref: o,
|
|
34
|
+
className: e("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", t),
|
|
35
|
+
"toast-close": "",
|
|
36
|
+
...i,
|
|
37
|
+
children: /* @__PURE__ */ n(r, { className: "size-4" })
|
|
38
|
+
}));
|
|
39
|
+
d.displayName = a.Close.displayName;
|
|
40
|
+
var f = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Title, {
|
|
41
|
+
ref: i,
|
|
42
|
+
className: e("text-sm font-semibold", t),
|
|
43
|
+
...r
|
|
44
|
+
}));
|
|
45
|
+
f.displayName = a.Title.displayName;
|
|
46
|
+
var p = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Description, {
|
|
47
|
+
ref: i,
|
|
48
|
+
className: e("text-sm opacity-90", t),
|
|
49
|
+
...r
|
|
50
|
+
}));
|
|
51
|
+
p.displayName = a.Description.displayName;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { l as Toast, u as ToastAction, d as ToastClose, p as ToastDescription, o as ToastProvider, f as ToastTitle, s as ToastViewport };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Toast as e, ToastClose as t, ToastDescription as n, ToastProvider as r, ToastTitle as i, ToastViewport as a } from "./toast.js";
|
|
2
|
+
import { useToast as o } from "../../hooks/ui/useToast.js";
|
|
3
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ui/toaster.tsx
|
|
5
|
+
function l() {
|
|
6
|
+
let { toasts: l } = o();
|
|
7
|
+
return /* @__PURE__ */ c(r, { children: [l.map(function({ id: r, title: a, description: o, action: l, ...u }) {
|
|
8
|
+
return /* @__PURE__ */ c(e, {
|
|
9
|
+
...u,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ c("div", {
|
|
12
|
+
className: "grid gap-1",
|
|
13
|
+
children: [a && /* @__PURE__ */ s(i, { children: a }), o && /* @__PURE__ */ s(n, { children: o })]
|
|
14
|
+
}),
|
|
15
|
+
l,
|
|
16
|
+
/* @__PURE__ */ s(t, {})
|
|
17
|
+
]
|
|
18
|
+
}, r);
|
|
19
|
+
}), /* @__PURE__ */ s(a, {})] });
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { l as Toaster };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn as e } from "../../helpers/tailwind.helper.js";
|
|
2
|
+
import { toggleVariants as t } from "./toggle.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import * as i from "@radix-ui/react-toggle-group";
|
|
6
|
+
//#region src/components/ui/toggle-group.tsx
|
|
7
|
+
var a = n.createContext({
|
|
8
|
+
size: "default",
|
|
9
|
+
variant: "default"
|
|
10
|
+
}), o = n.forwardRef(({ className: t, variant: n, size: o, children: s, ...c }, l) => /* @__PURE__ */ r(i.Root, {
|
|
11
|
+
ref: l,
|
|
12
|
+
className: e("flex items-center justify-center gap-1", t),
|
|
13
|
+
...c,
|
|
14
|
+
children: /* @__PURE__ */ r(a.Provider, {
|
|
15
|
+
value: {
|
|
16
|
+
variant: n,
|
|
17
|
+
size: o
|
|
18
|
+
},
|
|
19
|
+
children: s
|
|
20
|
+
})
|
|
21
|
+
}));
|
|
22
|
+
o.displayName = i.Root.displayName;
|
|
23
|
+
var s = n.forwardRef(({ className: o, children: s, variant: c, size: l, ...u }, d) => {
|
|
24
|
+
let f = n.useContext(a);
|
|
25
|
+
return /* @__PURE__ */ r(i.Item, {
|
|
26
|
+
ref: d,
|
|
27
|
+
className: e(t({
|
|
28
|
+
variant: f.variant || c,
|
|
29
|
+
size: f.size || l
|
|
30
|
+
}), o),
|
|
31
|
+
...u,
|
|
32
|
+
children: s
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
s.displayName = i.Item.displayName;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { o as ToggleGroup, s as ToggleGroupItem };
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { cva as r } from "class-variance-authority";
|
|
5
|
+
import * as i from "@radix-ui/react-toggle";
|
|
6
|
+
//#region src/components/ui/toggle.tsx
|
|
7
|
+
var a = r("inline-flex items-center justify-center rounded-control text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-10 px-3",
|
|
15
|
+
sm: "h-9 px-2.5",
|
|
16
|
+
lg: "h-11 px-5"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default"
|
|
22
|
+
}
|
|
23
|
+
}), o = t.forwardRef(({ className: t, variant: r, size: o, ...s }, c) => /* @__PURE__ */ n(i.Root, {
|
|
24
|
+
ref: c,
|
|
25
|
+
className: e(a({
|
|
26
|
+
variant: r,
|
|
27
|
+
size: o,
|
|
28
|
+
className: t
|
|
29
|
+
})),
|
|
30
|
+
...s
|
|
31
|
+
}));
|
|
32
|
+
o.displayName = i.Root.displayName;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { o as Toggle, a as toggleVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
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 * as r from "@radix-ui/react-tooltip";
|
|
5
|
+
//#region src/components/ui/tooltip.tsx
|
|
6
|
+
var i = r.Provider, a = r.Root, o = r.Trigger, s = t.forwardRef(({ className: t, sideOffset: i = 4, ...a }, o) => /* @__PURE__ */ n(r.Content, {
|
|
7
|
+
ref: o,
|
|
8
|
+
sideOffset: i,
|
|
9
|
+
className: e("z-50 overflow-hidden rounded-surface border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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),
|
|
10
|
+
...a
|
|
11
|
+
}));
|
|
12
|
+
s.displayName = r.Content.displayName;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { a as Tooltip, s as TooltipContent, i as TooltipProvider, o as TooltipTrigger };
|
package/dist/constants/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#endregion
|
|
5
|
-
export { r as pageDefault, t as pageSizeDefault, n as pagesSizes, e as pagesSizesForCard, i as searchDebounceMs };
|
|
1
|
+
import { pageDefault as e, pageSizeDefault as t, pagesSizes as n, pagesSizesForCard as r } from "./datatable.js";
|
|
2
|
+
import { searchDebounceMs as i } from "./search.js";
|
|
3
|
+
export { e as pageDefault, t as pageSizeDefault, n as pagesSizes, r as pagesSizesForCard, i as searchDebounceMs };
|
package/dist/contexts/index.js
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//#region src/helpers/changelog.helper.ts
|
|
2
|
+
var e = /^## +(.+?)\s*$/, t = /^(?:\[v?([^\]]+)\]\s*[-–]\s*)?(\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2})?)(?:\s*[-–]\s*(.+))?$/, n = /^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}))?/, r = (e) => e.trim().toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu, "").replace(/\s/g, "-"), i = (e) => {
|
|
3
|
+
let t = n.exec(e);
|
|
4
|
+
if (!t) return { hasTime: !1 };
|
|
5
|
+
let [, r, i, a, o, s] = t, c = o !== void 0 && s !== void 0, l = new Date(Number(r), Number(i) - 1, Number(a), c ? Number(o) : 0, c ? Number(s) : 0);
|
|
6
|
+
return Number.isNaN(l.getTime()) ? { hasTime: !1 } : {
|
|
7
|
+
date: l,
|
|
8
|
+
hasTime: c
|
|
9
|
+
};
|
|
10
|
+
}, a = (e) => {
|
|
11
|
+
let n = t.exec(e);
|
|
12
|
+
if (!n) return {
|
|
13
|
+
title: e,
|
|
14
|
+
hasTime: !1,
|
|
15
|
+
anchorSource: e
|
|
16
|
+
};
|
|
17
|
+
let [, r, a, o] = n;
|
|
18
|
+
return {
|
|
19
|
+
...r === void 0 ? {} : { version: r.trim() },
|
|
20
|
+
...o === void 0 ? {} : { title: o.trim() },
|
|
21
|
+
...i(a),
|
|
22
|
+
anchorSource: a
|
|
23
|
+
};
|
|
24
|
+
}, o = (t) => {
|
|
25
|
+
let n = [], i = /* @__PURE__ */ new Map(), o, s = () => {
|
|
26
|
+
if (!o) return;
|
|
27
|
+
let { anchorSource: e, ...t } = a(o.heading), s = r(e), c = i.get(s) ?? 0;
|
|
28
|
+
i.set(s, c + 1), n.push({
|
|
29
|
+
id: c === 0 ? s : `${s}-${String(c)}`,
|
|
30
|
+
heading: o.heading,
|
|
31
|
+
...t,
|
|
32
|
+
content: o.lines.join("\n").trim()
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
for (let n of t.split(/\r?\n/)) {
|
|
36
|
+
let t = e.exec(n)?.[1];
|
|
37
|
+
t === void 0 ? o?.lines.push(n) : (s(), o = {
|
|
38
|
+
heading: t,
|
|
39
|
+
lines: []
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return s(), n;
|
|
43
|
+
}, s = /^\*\*([^*\n]+?)\*\*\s*:\s*/, c = (e) => e.charAt(0).toLocaleUpperCase() + e.slice(1), l = (e) => {
|
|
44
|
+
let t = [], n = e.split(/\r?\n\s*\r?\n/).map((e) => e.trim()).filter(Boolean);
|
|
45
|
+
for (let e of n) {
|
|
46
|
+
let n = s.exec(e), r = t.length > 0 ? t[t.length - 1] : void 0;
|
|
47
|
+
n ? t.push({
|
|
48
|
+
tag: n[1].trim(),
|
|
49
|
+
content: c(e.slice(n[0].length))
|
|
50
|
+
}) : r ? r.content = `${r.content}\n\n${e}` : t.push({ content: e });
|
|
51
|
+
}
|
|
52
|
+
return t;
|
|
53
|
+
}, u = (e) => e.normalize("NFD").replace(/\p{M}/gu, "").toLowerCase(), d = (e, t, n = []) => {
|
|
54
|
+
let r = u(t).split(/\s+/).filter(Boolean);
|
|
55
|
+
return r.length === 0 && n.length === 0 ? e : e.filter((e) => {
|
|
56
|
+
if (n.length > 0 && !l(e.content).some((e) => e.tag !== void 0 && n.includes(e.tag))) return !1;
|
|
57
|
+
let t = u(`${e.heading}\n${e.content}`);
|
|
58
|
+
return r.every((e) => t.includes(e));
|
|
59
|
+
});
|
|
60
|
+
}, f = (e) => [...new Set(e.flatMap((e) => l(e.content).flatMap((e) => e.tag === void 0 ? [] : [e.tag])))].sort((e, t) => e.localeCompare(t)), p = (e, t) => {
|
|
61
|
+
let n = /* @__PURE__ */ new Map();
|
|
62
|
+
return t.map((t) => {
|
|
63
|
+
if (t.tag === void 0) return;
|
|
64
|
+
let i = `${e}-${r(t.tag)}`, a = (n.get(i) ?? 0) + 1;
|
|
65
|
+
return n.set(i, a), a === 1 ? i : `${i}-${String(a)}`;
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { d as filterChangelog, p as getChangelogItemAnchors, f as getChangelogTags, o as parseChangelog, r as slugifyChangelogTitle, l as splitChangelogItems };
|