@genispace/geniapp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +153 -0
- package/dist/CrossAppRecordPicker-BXchXcK5.js +624 -0
- package/dist/CrossAppRecordPicker-BXchXcK5.js.map +1 -0
- package/dist/Page-wHZrMN17.js +24 -0
- package/dist/Page-wHZrMN17.js.map +1 -0
- package/dist/ai/adopt/AiSuggestionPanel.d.ts +30 -0
- package/dist/ai/adopt/BusinessGuidancePanel.d.ts +31 -0
- package/dist/ai/adopt/DetailPageAiLayout.d.ts +7 -0
- package/dist/ai/adopt/adoptPresets.d.ts +11 -0
- package/dist/ai/adopt/guidanceContent.d.ts +27 -0
- package/dist/ai/adopt/parseAiSummary.d.ts +7 -0
- package/dist/ai/components/AgentJobProgress.d.ts +124 -0
- package/dist/ai/components/AsyncCombobox.d.ts +44 -0
- package/dist/ai/components/BulkActionBar.d.ts +44 -0
- package/dist/ai/components/EntityRef.d.ts +39 -0
- package/dist/ai/components/JobProgress.d.ts +64 -0
- package/dist/ai/components/ServerDataTable.d.ts +89 -0
- package/dist/ai/components/Timeline.d.ts +35 -0
- package/dist/ai/components/useInfiniteRows.d.ts +25 -0
- package/dist/ai/errors/userFacingError.d.ts +14 -0
- package/dist/ai/errors/userFacingError.js +48 -0
- package/dist/ai/errors/userFacingError.js.map +1 -0
- package/dist/ai/index.d.ts +34 -0
- package/dist/ai/integrations/partner/createPartnerRecordPickerHook.d.ts +15 -0
- package/dist/ai/integrations/partner/partnerRecordPicker.d.ts +20 -0
- package/dist/ai/layout/ModalWithAiLayout.d.ts +11 -0
- package/dist/ai/layout/aiUi.d.ts +16 -0
- package/dist/ai/layout/layoutConstants.d.ts +19 -0
- package/dist/ai/layout/modalSizeForAi.d.ts +5 -0
- package/dist/ai/locales/sharedAiCopy.d.ts +6 -0
- package/dist/ai/managed-data/DatasourceReadonlyTable.d.ts +11 -0
- package/dist/ai/managed-data/createTableClient.d.ts +7 -0
- package/dist/ai/managed-data/emitManagedEvent.d.ts +18 -0
- package/dist/ai/managed-data/executeManagedDatasource.d.ts +21 -0
- package/dist/ai/managed-data/queryManagedDatasource.d.ts +28 -0
- package/dist/ai/providers/AppUiProviders.d.ts +6 -0
- package/dist/ai/types/app-ai.types.d.ts +29 -0
- package/dist/ai/types/index.d.ts +1 -0
- package/dist/ai.d.ts +1 -0
- package/dist/ai.js +1817 -0
- package/dist/ai.js.map +1 -0
- package/dist/case-workspace/domain.d.ts +41 -0
- package/dist/case-workspace/domain.js +24 -0
- package/dist/case-workspace/domain.js.map +1 -0
- package/dist/case-workspace/index.d.ts +91 -0
- package/dist/case-workspace.d.ts +1 -0
- package/dist/case-workspace.js +392 -0
- package/dist/case-workspace.js.map +1 -0
- package/dist/cn-B6yFEsav.js +9 -0
- package/dist/cn-B6yFEsav.js.map +1 -0
- package/dist/components/ui/calendar.css +7 -0
- package/dist/cookieSettings-D_v3KS02.js +97 -0
- package/dist/cookieSettings-D_v3KS02.js.map +1 -0
- package/dist/dashboard/index.d.ts +16 -0
- package/dist/dashboard/src/ChartFrame.d.ts +18 -0
- package/dist/dashboard/src/ChartTooltip.d.ts +38 -0
- package/dist/dashboard/src/FilterBar.d.ts +23 -0
- package/dist/dashboard/src/KpiStatCard.d.ts +29 -0
- package/dist/dashboard/src/StatGrid.d.ts +15 -0
- package/dist/dashboard/src/TimeRangePicker.d.ts +14 -0
- package/dist/dashboard/src/chart.d.ts +10 -0
- package/dist/dashboard/src/format.d.ts +16 -0
- package/dist/dashboard/src/links.d.ts +2 -0
- package/dist/dashboard/src/useDashboardRange.d.ts +27 -0
- package/dist/dashboard.d.ts +1 -0
- package/dist/dashboard.js +361 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/fonts.css +15 -0
- package/dist/hooks/access/AppAccessGate.d.ts +20 -0
- package/dist/hooks/access/AppAccessNotice.d.ts +8 -0
- package/dist/hooks/access/useAppAccess.d.ts +26 -0
- package/dist/hooks/config/businessLocale.d.ts +12 -0
- package/dist/hooks/config/currencies.d.ts +9 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/picker/CrossAppRecordPicker.d.ts +37 -0
- package/dist/hooks/picker/managedAppPicker.d.ts +21 -0
- package/dist/hooks/picker/partnerPayload.d.ts +6 -0
- package/dist/hooks/routing/draftEntityId.d.ts +5 -0
- package/dist/hooks/routing/useRefetchOnRouteMatch.d.ts +6 -0
- package/dist/hooks/shell/resolveApiRoot.d.ts +13 -0
- package/dist/hooks/shell/shell.d.ts +4 -0
- package/dist/hooks/shell/useGenispacePlatformClient.d.ts +7 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +42 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/dist/kit.d.ts +50 -0
- package/dist/kit.js +2067 -0
- package/dist/kit.js.map +1 -0
- package/dist/page.d.ts +1 -0
- package/dist/page.js +5 -0
- package/dist/page.js.map +1 -0
- package/dist/shell-DIHnXIUb.js +6 -0
- package/dist/shell-DIHnXIUb.js.map +1 -0
- package/dist/shell.d.ts +30 -0
- package/dist/shell.js +104 -0
- package/dist/shell.js.map +1 -0
- package/dist/storage/assetPreview.d.ts +12 -0
- package/dist/storage/components/AssetThumbnail.d.ts +15 -0
- package/dist/storage/components/CopyStorageLinkButton.d.ts +13 -0
- package/dist/storage/components/StorageImage.d.ts +9 -0
- package/dist/storage/components/StoragePreviewContent.d.ts +22 -0
- package/dist/storage/components/StorageVideo.d.ts +9 -0
- package/dist/storage/copyTextToClipboard.d.ts +5 -0
- package/dist/storage/hooks/useAuthenticatedStorageBlobs.d.ts +3 -0
- package/dist/storage/hooks/useImageThumbnailBlobs.d.ts +4 -0
- package/dist/storage/hooks/useShareableStorageLink.d.ts +7 -0
- package/dist/storage/index.d.ts +12 -0
- package/dist/storage/openUrlInNewTab.d.ts +6 -0
- package/dist/storage/platformStorage.d.ts +43 -0
- package/dist/storage.d.ts +1 -0
- package/dist/storage.js +605 -0
- package/dist/storage.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/styles/base.css +616 -0
- package/dist/styles/reduced-motion.css +14 -0
- package/dist/styles/tailwind-preset.js +269 -0
- package/dist/task-workspace/domain.d.ts +35 -0
- package/dist/task-workspace/domain.js +45 -0
- package/dist/task-workspace/domain.js.map +1 -0
- package/dist/task-workspace/experience.d.ts +50 -0
- package/dist/task-workspace/index.d.ts +172 -0
- package/dist/task-workspace.d.ts +1 -0
- package/dist/task-workspace.js +626 -0
- package/dist/task-workspace.js.map +1 -0
- package/dist/ui/components/features/app/AppCheckboxInput.d.ts +9 -0
- package/dist/ui/components/features/app/AppConfirmDialog.d.ts +12 -0
- package/dist/ui/components/features/app/AppDashboardSkeleton.d.ts +9 -0
- package/dist/ui/components/features/app/AppDatePicker.d.ts +69 -0
- package/dist/ui/components/features/app/AppModal.d.ts +27 -0
- package/dist/ui/components/features/app/AppPageStates.d.ts +17 -0
- package/dist/ui/components/features/app/AppSelectInput.d.ts +10 -0
- package/dist/ui/components/features/app/AppTemporalInput.d.ts +19 -0
- package/dist/ui/components/features/app/Page.d.ts +14 -0
- package/dist/ui/components/features/app/QueryErrorAlert.d.ts +7 -0
- package/dist/ui/components/features/app/Sidebar.d.ts +47 -0
- package/dist/ui/components/features/app/index.d.ts +17 -0
- package/dist/ui/components/features/user/UserAvatar.d.ts +17 -0
- package/dist/ui/components/features/user/UserDisplay.d.ts +10 -0
- package/dist/ui/components/features/user/UserSelect.d.ts +14 -0
- package/dist/ui/components/features/user/useUserDirectory.d.ts +13 -0
- package/dist/ui/components/features/user/userDirectoryTypes.d.ts +18 -0
- package/dist/ui/components/patterns/form-section.d.ts +11 -0
- package/dist/ui/components/primitives/feedback/index.d.ts +2 -0
- package/dist/ui/components/primitives/feedback/toaster.d.ts +1 -0
- package/dist/ui/components/primitives/feedback/use-toast.d.ts +46 -0
- package/dist/ui/components/primitives/page-skeleton/ChartAreaSkeleton.d.ts +13 -0
- package/dist/ui/components/primitives/page-skeleton/ChartEmptyState.d.ts +14 -0
- package/dist/ui/components/primitives/page-skeleton/ComponentSkeletonShell.d.ts +16 -0
- package/dist/ui/components/primitives/page-skeleton/ConfigEditorSkeleton.d.ts +5 -0
- package/dist/ui/components/primitives/page-skeleton/DetailTabsSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/EmptyStateBadge.d.ts +13 -0
- package/dist/ui/components/primitives/page-skeleton/FormCardSkeleton.d.ts +7 -0
- package/dist/ui/components/primitives/page-skeleton/FormFieldSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/FormPageSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/GridCardsSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/ListSkeleton.d.ts +26 -0
- package/dist/ui/components/primitives/page-skeleton/PageHeaderSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/SplitPaneSkeleton.d.ts +4 -0
- package/dist/ui/components/primitives/page-skeleton/StatsRowSkeleton.d.ts +5 -0
- package/dist/ui/components/primitives/page-skeleton/TableEmptyState.d.ts +27 -0
- package/dist/ui/components/primitives/page-skeleton/TablePageSkeleton.d.ts +8 -0
- package/dist/ui/components/primitives/page-skeleton/TabsBarSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/index.d.ts +24 -0
- package/dist/ui/components/primitives/page-skeleton/skeletonMetrics.d.ts +9 -0
- package/dist/ui/components/primitives/page-skeleton/useVisibleCenter.d.ts +34 -0
- package/dist/ui/components/ui/accordion.d.ts +7 -0
- package/dist/ui/components/ui/ai-draft-banner.d.ts +21 -0
- package/dist/ui/components/ui/alert-dialog.d.ts +48 -0
- package/dist/ui/components/ui/alert.d.ts +8 -0
- package/dist/ui/components/ui/avatar.d.ts +6 -0
- package/dist/ui/components/ui/badge.d.ts +9 -0
- package/dist/ui/components/ui/breadcrumb.d.ts +19 -0
- package/dist/ui/components/ui/button.d.ts +11 -0
- package/dist/ui/components/ui/calendar.d.ts +8 -0
- package/dist/ui/components/ui/card.d.ts +8 -0
- package/dist/ui/components/ui/chart.d.ts +16 -0
- package/dist/ui/components/ui/checkbox.d.ts +4 -0
- package/dist/ui/components/ui/collapsible.d.ts +5 -0
- package/dist/ui/components/ui/column-config.d.ts +42 -0
- package/dist/ui/components/ui/date-picker.d.ts +9 -0
- package/dist/ui/components/ui/date-range-filter.d.ts +32 -0
- package/dist/ui/components/ui/date-range-picker.d.ts +11 -0
- package/dist/ui/components/ui/dialog-input.d.ts +17 -0
- package/dist/ui/components/ui/dialog-safe-select.d.ts +13 -0
- package/dist/ui/components/ui/dialog.d.ts +25 -0
- package/dist/ui/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/ui/components/ui/feature-guide.d.ts +43 -0
- package/dist/ui/components/ui/form.d.ts +25 -0
- package/dist/ui/components/ui/help-tip.d.ts +29 -0
- package/dist/ui/components/ui/hint-notice.d.ts +22 -0
- package/dist/ui/components/ui/index.d.ts +6 -0
- package/dist/ui/components/ui/input.d.ts +3 -0
- package/dist/ui/components/ui/label.d.ts +5 -0
- package/dist/ui/components/ui/modal-container.d.ts +56 -0
- package/dist/ui/components/ui/modal-templates.d.ts +46 -0
- package/dist/ui/components/ui/multi-select.d.ts +20 -0
- package/dist/ui/components/ui/pagination.d.ts +28 -0
- package/dist/ui/components/ui/popover.d.ts +7 -0
- package/dist/ui/components/ui/progress.d.ts +7 -0
- package/dist/ui/components/ui/radio-button-group.d.ts +18 -0
- package/dist/ui/components/ui/radio-group.d.ts +5 -0
- package/dist/ui/components/ui/scroll-area.d.ts +5 -0
- package/dist/ui/components/ui/select.d.ts +16 -0
- package/dist/ui/components/ui/separator.d.ts +7 -0
- package/dist/ui/components/ui/sheet.d.ts +25 -0
- package/dist/ui/components/ui/sidebar-rail.d.ts +9 -0
- package/dist/ui/components/ui/skeleton.d.ts +2 -0
- package/dist/ui/components/ui/slider.d.ts +13 -0
- package/dist/ui/components/ui/switch.d.ts +4 -0
- package/dist/ui/components/ui/table.d.ts +10 -0
- package/dist/ui/components/ui/tabs.d.ts +10 -0
- package/dist/ui/components/ui/textarea.d.ts +3 -0
- package/dist/ui/components/ui/toast.d.ts +21 -0
- package/dist/ui/components/ui/toggle-group.d.ts +12 -0
- package/dist/ui/components/ui/toggle.d.ts +12 -0
- package/dist/ui/components/ui/tooltip.d.ts +7 -0
- package/dist/ui/components/ui/typography.d.ts +15 -0
- package/dist/ui/components/ui/underline-tabs.d.ts +13 -0
- package/dist/ui/components/ui/view-mode-toggle.d.ts +9 -0
- package/dist/ui/hooks/useIsMobile.d.ts +16 -0
- package/dist/ui/styles/design-tokens.d.ts +189 -0
- package/dist/ui/styles/z-index-layers.d.ts +46 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.js +35 -0
- package/dist/ui.js.map +1 -0
- package/dist/useUserDirectory-CqkyCQoR.js +2377 -0
- package/dist/useUserDirectory-CqkyCQoR.js.map +1 -0
- package/dist/utils/cookieSettings.d.ts +12 -0
- package/dist/utils/data/countryCodes.d.ts +26 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/utils/appPath.d.ts +5 -0
- package/dist/utils/utils/chunkLoadRecovery.d.ts +7 -0
- package/dist/utils/utils/cn.d.ts +3 -0
- package/dist/utils/utils/crossApp.d.ts +71 -0
- package/dist/utils/utils/debounce.d.ts +1 -0
- package/dist/utils/utils/formatUserLabel.d.ts +8 -0
- package/dist/utils/utils/formatting.d.ts +18 -0
- package/dist/utils/utils/logoutNotification.d.ts +28 -0
- package/dist/utils/utils/operatorLocale.d.ts +32 -0
- package/dist/utils/utils/routeLocalePrefetch.d.ts +5 -0
- package/dist/utils/utils/shellIframeUrl.d.ts +20 -0
- package/dist/utils/utils/spaceSettings.d.ts +20 -0
- package/dist/utils/utils/sso.d.ts +42 -0
- package/dist/utils/utils/throttle.d.ts +1 -0
- package/dist/utils/utils/timezones.d.ts +14 -0
- package/dist/utils/utils/toDateInputValue.d.ts +5 -0
- package/dist/utils/utils/watermark.d.ts +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +1334 -0
- package/dist/utils.js.map +1 -0
- package/dist/vite.d.ts +22 -0
- package/dist/vite.js +74 -0
- package/dist/vite.js.map +1 -0
- package/package.json +191 -0
package/dist/kit.js
ADDED
|
@@ -0,0 +1,2067 @@
|
|
|
1
|
+
import { Z as O, r as ae, s as oe, v as ne, B as H, w as Z, c as _e, M as Oe, x as Ee, y as Ve, z as Le, E as je, H as Be } from "./useUserDirectory-CqkyCQoR.js";
|
|
2
|
+
import { A as sa, a as ia, b as la, d as da, e as ca, f as ua, g as ma, h as fa, i as pa, j as ga, k as ha, l as ba, I as va, J as xa, C as wa, K as ya, D as Na, L as ka, N as Ca, O as Ta, R as Sa, V as Ra, W as Da, X as Aa, Y as Ia, _ as Ma, $ as Pa, a0 as _a, F as Oa, G as Ea, a1 as Va, a2 as La, P as ja, a3 as Ba, Q as za, a4 as Ua, a5 as Ga, a6 as $a, a7 as Fa, a8 as Ha, a9 as Xa, aa as Ka, ab as Ya, ac as qa, ad as Qa, ae as Ja, af as Wa, ag as Za, S as eo, m as to, T as ro, U as ao, n as oo, ah as no, o as so, p as io, q as lo, t as co, u as uo } from "./useUserDirectory-CqkyCQoR.js";
|
|
3
|
+
import { jsx as a, jsxs as u, Fragment as ze } from "react/jsx-runtime";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import Ue, { useState as Ge, useEffect as $e } from "react";
|
|
6
|
+
import { cn as i } from "@genispace/geniapp/utils";
|
|
7
|
+
import { cva as I } from "class-variance-authority";
|
|
8
|
+
import * as se from "@radix-ui/react-label";
|
|
9
|
+
import * as $ from "@radix-ui/react-switch";
|
|
10
|
+
import { AlertTriangle as ie, Info as le, HelpCircle as Fe, ArrowUpRight as ee, Sparkles as He, X, Check as K, ChevronDown as Y, ChevronUp as Xe, Circle as de, ChevronRight as Ke, XCircle as Ye, CheckCircle as qe, BookOpen as Qe, Settings2 as Je, RotateCcw as We } from "lucide-react";
|
|
11
|
+
import * as y from "@radix-ui/react-tabs";
|
|
12
|
+
import * as ce from "@radix-ui/react-toggle";
|
|
13
|
+
import * as z from "@radix-ui/react-toggle-group";
|
|
14
|
+
import * as q from "@radix-ui/react-collapsible";
|
|
15
|
+
import * as M from "@radix-ui/react-scroll-area";
|
|
16
|
+
import * as b from "@radix-ui/react-select";
|
|
17
|
+
import * as g from "@radix-ui/react-dropdown-menu";
|
|
18
|
+
import * as _ from "@radix-ui/react-tooltip";
|
|
19
|
+
import * as L from "@radix-ui/react-radio-group";
|
|
20
|
+
import { useTranslation as ue } from "react-i18next";
|
|
21
|
+
import * as Q from "recharts";
|
|
22
|
+
import { A as fo } from "./Page-wHZrMN17.js";
|
|
23
|
+
import * as N from "@radix-ui/react-toast";
|
|
24
|
+
import { c as go } from "./cn-B6yFEsav.js";
|
|
25
|
+
const me = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
ref: r,
|
|
29
|
+
className: i(
|
|
30
|
+
"rounded-xl border border-border bg-card text-card-foreground shadow",
|
|
31
|
+
e
|
|
32
|
+
),
|
|
33
|
+
...t
|
|
34
|
+
}
|
|
35
|
+
));
|
|
36
|
+
me.displayName = "Card";
|
|
37
|
+
const Ze = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref: r,
|
|
41
|
+
className: i("flex flex-col space-y-1.5 p-4 sm:p-6", e),
|
|
42
|
+
...t
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
Ze.displayName = "CardHeader";
|
|
46
|
+
const et = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref: r,
|
|
50
|
+
className: i("font-semibold leading-none tracking-tight", e),
|
|
51
|
+
...t
|
|
52
|
+
}
|
|
53
|
+
));
|
|
54
|
+
et.displayName = "CardTitle";
|
|
55
|
+
const tt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
ref: r,
|
|
59
|
+
className: i("text-sm text-muted-foreground", e),
|
|
60
|
+
...t
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
tt.displayName = "CardDescription";
|
|
64
|
+
const fe = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a("div", { ref: r, className: i("p-4 pt-0 sm:px-6 sm:pb-6", e), ...t }));
|
|
65
|
+
fe.displayName = "CardContent";
|
|
66
|
+
const rt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
ref: r,
|
|
70
|
+
className: i("flex items-center p-4 pt-0 sm:px-6 sm:pb-6", e),
|
|
71
|
+
...t
|
|
72
|
+
}
|
|
73
|
+
));
|
|
74
|
+
rt.displayName = "CardFooter";
|
|
75
|
+
const at = I(
|
|
76
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
77
|
+
{
|
|
78
|
+
variants: {
|
|
79
|
+
variant: {
|
|
80
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
81
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
82
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
83
|
+
outline: "text-foreground"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
defaultVariants: {
|
|
87
|
+
variant: "default"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
function Rr({ className: e, variant: t, ...r }) {
|
|
92
|
+
return /* @__PURE__ */ a("div", { className: i(at({ variant: t }), e), ...r });
|
|
93
|
+
}
|
|
94
|
+
const ot = I(
|
|
95
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
96
|
+
), nt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
97
|
+
se.Root,
|
|
98
|
+
{
|
|
99
|
+
ref: r,
|
|
100
|
+
className: i(ot(), e),
|
|
101
|
+
...t
|
|
102
|
+
}
|
|
103
|
+
));
|
|
104
|
+
nt.displayName = se.Root.displayName;
|
|
105
|
+
const st = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
106
|
+
"textarea",
|
|
107
|
+
{
|
|
108
|
+
className: i(
|
|
109
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
110
|
+
e
|
|
111
|
+
),
|
|
112
|
+
ref: r,
|
|
113
|
+
...t
|
|
114
|
+
}
|
|
115
|
+
));
|
|
116
|
+
st.displayName = "Textarea";
|
|
117
|
+
const it = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
118
|
+
$.Root,
|
|
119
|
+
{
|
|
120
|
+
className: i(
|
|
121
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm 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",
|
|
122
|
+
`relative ${O.STICKY_HEADER} touch-manipulation`,
|
|
123
|
+
e
|
|
124
|
+
),
|
|
125
|
+
...t,
|
|
126
|
+
ref: r,
|
|
127
|
+
children: /* @__PURE__ */ a(
|
|
128
|
+
$.Thumb,
|
|
129
|
+
{
|
|
130
|
+
className: i(
|
|
131
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
));
|
|
137
|
+
it.displayName = $.Root.displayName;
|
|
138
|
+
const lt = n.forwardRef(
|
|
139
|
+
({
|
|
140
|
+
value: e,
|
|
141
|
+
defaultValue: t = [0],
|
|
142
|
+
onValueChange: r,
|
|
143
|
+
min: o = 0,
|
|
144
|
+
max: s = 100,
|
|
145
|
+
step: l = 1,
|
|
146
|
+
className: d,
|
|
147
|
+
disabled: c = !1,
|
|
148
|
+
...m
|
|
149
|
+
}, h) => {
|
|
150
|
+
const [p, v] = n.useState(t), S = n.useRef(null), R = n.useRef(null), x = e || p, k = (x[0] - o) / (s - o) * 100, E = n.useCallback((D) => {
|
|
151
|
+
if (c) return;
|
|
152
|
+
const C = S.current;
|
|
153
|
+
if (!C) return;
|
|
154
|
+
const A = (T) => {
|
|
155
|
+
const J = C.getBoundingClientRect(), Me = Math.max(0, Math.min(1, (T - J.left) / J.width)), Pe = Math.round((o + Me * (s - o)) / l) * l, W = [Math.max(o, Math.min(s, Pe))];
|
|
156
|
+
v(W), r?.(W);
|
|
157
|
+
};
|
|
158
|
+
A(D.clientX);
|
|
159
|
+
const f = (T) => {
|
|
160
|
+
A(T.clientX);
|
|
161
|
+
}, w = () => {
|
|
162
|
+
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", w);
|
|
163
|
+
};
|
|
164
|
+
document.addEventListener("mousemove", f), document.addEventListener("mouseup", w);
|
|
165
|
+
}, [c, o, s, l, r]), P = n.useCallback((D) => {
|
|
166
|
+
if (c) return;
|
|
167
|
+
let C = x[0];
|
|
168
|
+
switch (D.key) {
|
|
169
|
+
case "ArrowLeft":
|
|
170
|
+
case "ArrowDown":
|
|
171
|
+
C = Math.max(o, x[0] - l);
|
|
172
|
+
break;
|
|
173
|
+
case "ArrowRight":
|
|
174
|
+
case "ArrowUp":
|
|
175
|
+
C = Math.min(s, x[0] + l);
|
|
176
|
+
break;
|
|
177
|
+
case "Home":
|
|
178
|
+
C = o;
|
|
179
|
+
break;
|
|
180
|
+
case "End":
|
|
181
|
+
C = s;
|
|
182
|
+
break;
|
|
183
|
+
default:
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
D.preventDefault();
|
|
187
|
+
const A = [C];
|
|
188
|
+
v(A), r?.(A);
|
|
189
|
+
}, [c, x, o, s, l, r]);
|
|
190
|
+
return /* @__PURE__ */ u(
|
|
191
|
+
"div",
|
|
192
|
+
{
|
|
193
|
+
ref: h,
|
|
194
|
+
className: i(
|
|
195
|
+
"relative flex w-full touch-none select-none items-center",
|
|
196
|
+
d
|
|
197
|
+
),
|
|
198
|
+
...m,
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ a(
|
|
201
|
+
"div",
|
|
202
|
+
{
|
|
203
|
+
ref: S,
|
|
204
|
+
className: "relative h-2 w-full grow overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-700 cursor-pointer",
|
|
205
|
+
onMouseDown: E,
|
|
206
|
+
children: /* @__PURE__ */ a(
|
|
207
|
+
"div",
|
|
208
|
+
{
|
|
209
|
+
className: "absolute h-full bg-brand-primary-light dark:bg-brand-primary transition-all duration-150 ease-out",
|
|
210
|
+
style: { width: `${k}%` }
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
/* @__PURE__ */ a(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
ref: R,
|
|
219
|
+
className: i(
|
|
220
|
+
"absolute block h-5 w-5 rounded-full border-2 border-brand-primary bg-white shadow-md transition-colors cursor-pointer",
|
|
221
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2",
|
|
222
|
+
c && "pointer-events-none opacity-50"
|
|
223
|
+
),
|
|
224
|
+
style: { left: `calc(${k}% - 10px)` },
|
|
225
|
+
tabIndex: c ? -1 : 0,
|
|
226
|
+
onKeyDown: P,
|
|
227
|
+
role: "slider",
|
|
228
|
+
"aria-valuemin": o,
|
|
229
|
+
"aria-valuemax": s,
|
|
230
|
+
"aria-valuenow": x[0]
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
lt.displayName = "Slider";
|
|
239
|
+
const dt = n.forwardRef(
|
|
240
|
+
({ className: e, value: t = 0, max: r = 100, ...o }, s) => {
|
|
241
|
+
const l = Math.min(Math.max(t / r * 100, 0), 100);
|
|
242
|
+
return /* @__PURE__ */ a(
|
|
243
|
+
"div",
|
|
244
|
+
{
|
|
245
|
+
ref: s,
|
|
246
|
+
className: i(
|
|
247
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
248
|
+
e
|
|
249
|
+
),
|
|
250
|
+
...o,
|
|
251
|
+
children: /* @__PURE__ */ a(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
className: "h-full w-full flex-1 bg-brand-primary-light transition-all duration-300 ease-in-out",
|
|
255
|
+
style: { transform: `translateX(-${100 - l}%)` }
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
dt.displayName = "Progress";
|
|
263
|
+
const ct = Ue.forwardRef(
|
|
264
|
+
({ className: e, orientation: t = "horizontal", ...r }, o) => /* @__PURE__ */ a(
|
|
265
|
+
"div",
|
|
266
|
+
{
|
|
267
|
+
ref: o,
|
|
268
|
+
className: i(
|
|
269
|
+
"shrink-0 bg-neutral-200 dark:bg-neutral-800",
|
|
270
|
+
t === "horizontal" ? "h-px w-full" : "w-px h-full",
|
|
271
|
+
e
|
|
272
|
+
),
|
|
273
|
+
...r
|
|
274
|
+
}
|
|
275
|
+
)
|
|
276
|
+
);
|
|
277
|
+
ct.displayName = "Separator";
|
|
278
|
+
const ut = I(
|
|
279
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
280
|
+
{
|
|
281
|
+
variants: {
|
|
282
|
+
variant: {
|
|
283
|
+
default: "bg-background text-foreground",
|
|
284
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
defaultVariants: {
|
|
288
|
+
variant: "default"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
), mt = n.forwardRef(({ className: e, variant: t, ...r }, o) => /* @__PURE__ */ a(
|
|
292
|
+
"div",
|
|
293
|
+
{
|
|
294
|
+
ref: o,
|
|
295
|
+
role: "alert",
|
|
296
|
+
className: i(ut({ variant: t }), e),
|
|
297
|
+
...r
|
|
298
|
+
}
|
|
299
|
+
));
|
|
300
|
+
mt.displayName = "Alert";
|
|
301
|
+
const ft = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
302
|
+
"h5",
|
|
303
|
+
{
|
|
304
|
+
ref: r,
|
|
305
|
+
className: i("mb-1 font-medium leading-none tracking-tight", e),
|
|
306
|
+
...t
|
|
307
|
+
}
|
|
308
|
+
));
|
|
309
|
+
ft.displayName = "AlertTitle";
|
|
310
|
+
const pt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
311
|
+
"div",
|
|
312
|
+
{
|
|
313
|
+
ref: r,
|
|
314
|
+
className: i("text-sm [&_p]:leading-relaxed", e),
|
|
315
|
+
...t
|
|
316
|
+
}
|
|
317
|
+
));
|
|
318
|
+
pt.displayName = "AlertDescription";
|
|
319
|
+
const gt = I("rounded-xl border shadow-sm", {
|
|
320
|
+
variants: {
|
|
321
|
+
variant: {
|
|
322
|
+
info: "border-sky-200/80 dark:border-sky-900/45 bg-sky-50/70 dark:bg-sky-950/30",
|
|
323
|
+
neutral: "border-neutral-200 dark:border-neutral-700 bg-neutral-50/70 dark:bg-neutral-900/35",
|
|
324
|
+
warning: "border-amber-200/80 dark:border-amber-900/40 bg-amber-50/60 dark:bg-amber-950/25"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
defaultVariants: {
|
|
328
|
+
variant: "info"
|
|
329
|
+
}
|
|
330
|
+
}), ht = I("shrink-0 mt-0.5", {
|
|
331
|
+
variants: {
|
|
332
|
+
variant: {
|
|
333
|
+
info: "text-sky-600 dark:text-sky-400",
|
|
334
|
+
neutral: "text-neutral-500 dark:text-neutral-400",
|
|
335
|
+
warning: "text-amber-600 dark:text-amber-500"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
defaultVariants: {
|
|
339
|
+
variant: "info"
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
function bt({ variant: e }) {
|
|
343
|
+
return e === "warning" ? /* @__PURE__ */ a(ie, { className: "h-4 w-4", "aria-hidden": !0 }) : /* @__PURE__ */ a(le, { className: "h-4 w-4", "aria-hidden": !0 });
|
|
344
|
+
}
|
|
345
|
+
const vt = n.forwardRef(
|
|
346
|
+
function({
|
|
347
|
+
className: t,
|
|
348
|
+
variant: r,
|
|
349
|
+
title: o,
|
|
350
|
+
children: s,
|
|
351
|
+
contentClassName: l,
|
|
352
|
+
showIcon: d = !0,
|
|
353
|
+
icon: c,
|
|
354
|
+
preserveWhitespace: m = !1,
|
|
355
|
+
...h
|
|
356
|
+
}, p) {
|
|
357
|
+
const v = r ?? "info";
|
|
358
|
+
return /* @__PURE__ */ a(me, { ref: p, className: i(gt({ variant: v }), t), ...h, children: /* @__PURE__ */ a(fe, { className: i("pt-5 pb-4", l), children: /* @__PURE__ */ u("div", { className: "flex gap-3", children: [
|
|
359
|
+
d ? /* @__PURE__ */ a("div", { className: i(ht({ variant: v })), children: c ?? /* @__PURE__ */ a(bt, { variant: v }) }) : null,
|
|
360
|
+
/* @__PURE__ */ u("div", { className: "min-w-0 space-y-2", children: [
|
|
361
|
+
o ? /* @__PURE__ */ a("p", { className: "text-sm font-medium text-neutral-900 dark:text-neutral-100", children: o }) : null,
|
|
362
|
+
/* @__PURE__ */ a(
|
|
363
|
+
"div",
|
|
364
|
+
{
|
|
365
|
+
className: i(
|
|
366
|
+
"text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed",
|
|
367
|
+
m && "whitespace-pre-line"
|
|
368
|
+
),
|
|
369
|
+
children: s
|
|
370
|
+
}
|
|
371
|
+
)
|
|
372
|
+
] })
|
|
373
|
+
] }) }) });
|
|
374
|
+
}
|
|
375
|
+
);
|
|
376
|
+
vt.displayName = "HintNotice";
|
|
377
|
+
function Dr({
|
|
378
|
+
title: e,
|
|
379
|
+
content: t,
|
|
380
|
+
moreHref: r,
|
|
381
|
+
onMore: o,
|
|
382
|
+
moreLabel: s = "Learn more",
|
|
383
|
+
label: l = "Help",
|
|
384
|
+
side: d = "top",
|
|
385
|
+
align: c = "center",
|
|
386
|
+
className: m,
|
|
387
|
+
contentClassName: h
|
|
388
|
+
}) {
|
|
389
|
+
const p = !!(r || o);
|
|
390
|
+
return /* @__PURE__ */ u(ae, { children: [
|
|
391
|
+
/* @__PURE__ */ a(oe, { asChild: !0, children: /* @__PURE__ */ a(
|
|
392
|
+
"button",
|
|
393
|
+
{
|
|
394
|
+
type: "button",
|
|
395
|
+
"aria-label": l,
|
|
396
|
+
className: i(
|
|
397
|
+
"inline-flex shrink-0 items-center justify-center rounded-full align-middle",
|
|
398
|
+
"text-muted-foreground transition-colors hover:text-foreground",
|
|
399
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
400
|
+
m
|
|
401
|
+
),
|
|
402
|
+
children: /* @__PURE__ */ a(Fe, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
|
|
403
|
+
}
|
|
404
|
+
) }),
|
|
405
|
+
/* @__PURE__ */ u(
|
|
406
|
+
ne,
|
|
407
|
+
{
|
|
408
|
+
side: d,
|
|
409
|
+
align: c,
|
|
410
|
+
className: i("w-auto max-w-[20rem] p-3 text-sm", h),
|
|
411
|
+
children: [
|
|
412
|
+
e ? /* @__PURE__ */ a("p", { className: "mb-1 font-semibold text-foreground", children: e }) : null,
|
|
413
|
+
/* @__PURE__ */ a("div", { className: "leading-relaxed text-muted-foreground", children: t }),
|
|
414
|
+
p ? /* @__PURE__ */ a("div", { className: "mt-2", children: r ? /* @__PURE__ */ u(
|
|
415
|
+
"a",
|
|
416
|
+
{
|
|
417
|
+
href: r,
|
|
418
|
+
target: "_blank",
|
|
419
|
+
rel: "noopener noreferrer",
|
|
420
|
+
onClick: o,
|
|
421
|
+
className: "inline-flex items-center gap-0.5 text-xs font-medium text-primary hover:underline",
|
|
422
|
+
children: [
|
|
423
|
+
s,
|
|
424
|
+
/* @__PURE__ */ a(ee, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
) : /* @__PURE__ */ u(
|
|
428
|
+
"button",
|
|
429
|
+
{
|
|
430
|
+
type: "button",
|
|
431
|
+
onClick: o,
|
|
432
|
+
className: "inline-flex items-center gap-0.5 text-xs font-medium text-primary hover:underline",
|
|
433
|
+
children: [
|
|
434
|
+
s,
|
|
435
|
+
/* @__PURE__ */ a(ee, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
) }) : null
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
)
|
|
442
|
+
] });
|
|
443
|
+
}
|
|
444
|
+
const xt = {
|
|
445
|
+
info: {
|
|
446
|
+
container: "border-status-info/40 bg-status-info/10",
|
|
447
|
+
icon: "text-status-info"
|
|
448
|
+
},
|
|
449
|
+
warning: {
|
|
450
|
+
container: "border-status-warning/40 bg-status-warning/10",
|
|
451
|
+
icon: "text-status-warning"
|
|
452
|
+
}
|
|
453
|
+
}, Ar = n.forwardRef(
|
|
454
|
+
function({
|
|
455
|
+
title: t,
|
|
456
|
+
description: r,
|
|
457
|
+
onDismiss: o,
|
|
458
|
+
dismissLabel: s,
|
|
459
|
+
tone: l = "info",
|
|
460
|
+
children: d,
|
|
461
|
+
className: c,
|
|
462
|
+
...m
|
|
463
|
+
}, h) {
|
|
464
|
+
const p = xt[l];
|
|
465
|
+
return /* @__PURE__ */ u(
|
|
466
|
+
"div",
|
|
467
|
+
{
|
|
468
|
+
ref: h,
|
|
469
|
+
role: "status",
|
|
470
|
+
className: i("rounded-lg border p-3", p.container, c),
|
|
471
|
+
...m,
|
|
472
|
+
children: [
|
|
473
|
+
/* @__PURE__ */ u("div", { className: "flex items-start gap-2.5", children: [
|
|
474
|
+
/* @__PURE__ */ a(He, { className: i("mt-0.5 h-4 w-4 shrink-0", p.icon), "aria-hidden": !0 }),
|
|
475
|
+
/* @__PURE__ */ u("div", { className: "min-w-0 flex-1 space-y-0.5", children: [
|
|
476
|
+
/* @__PURE__ */ a("p", { className: "text-sm font-medium text-foreground", children: t }),
|
|
477
|
+
r ? /* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: r }) : null
|
|
478
|
+
] }),
|
|
479
|
+
o ? /* @__PURE__ */ a(
|
|
480
|
+
"button",
|
|
481
|
+
{
|
|
482
|
+
type: "button",
|
|
483
|
+
"aria-label": s,
|
|
484
|
+
onClick: o,
|
|
485
|
+
className: i(
|
|
486
|
+
"shrink-0 rounded-sm p-0.5 text-muted-foreground transition-colors hover:text-foreground",
|
|
487
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
488
|
+
),
|
|
489
|
+
children: /* @__PURE__ */ a(X, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
|
|
490
|
+
}
|
|
491
|
+
) : null
|
|
492
|
+
] }),
|
|
493
|
+
d ? /* @__PURE__ */ a("div", { className: "mt-2 pl-[26px]", children: d }) : null
|
|
494
|
+
]
|
|
495
|
+
}
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
function wt({
|
|
500
|
+
onValueChange: e,
|
|
501
|
+
...t
|
|
502
|
+
}) {
|
|
503
|
+
return /* @__PURE__ */ a(
|
|
504
|
+
y.Root,
|
|
505
|
+
{
|
|
506
|
+
...t,
|
|
507
|
+
onValueChange: e ? (r) => {
|
|
508
|
+
n.startTransition(() => {
|
|
509
|
+
e(r);
|
|
510
|
+
});
|
|
511
|
+
} : void 0
|
|
512
|
+
}
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
wt.displayName = y.Root.displayName;
|
|
516
|
+
const yt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
517
|
+
y.List,
|
|
518
|
+
{
|
|
519
|
+
ref: r,
|
|
520
|
+
className: i(
|
|
521
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
522
|
+
e
|
|
523
|
+
),
|
|
524
|
+
...t
|
|
525
|
+
}
|
|
526
|
+
));
|
|
527
|
+
yt.displayName = y.List.displayName;
|
|
528
|
+
const Nt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
529
|
+
y.Trigger,
|
|
530
|
+
{
|
|
531
|
+
ref: r,
|
|
532
|
+
className: i(
|
|
533
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all 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]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
534
|
+
e
|
|
535
|
+
),
|
|
536
|
+
...t
|
|
537
|
+
}
|
|
538
|
+
));
|
|
539
|
+
Nt.displayName = y.Trigger.displayName;
|
|
540
|
+
const kt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
541
|
+
y.Content,
|
|
542
|
+
{
|
|
543
|
+
ref: r,
|
|
544
|
+
className: i(
|
|
545
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
546
|
+
e
|
|
547
|
+
),
|
|
548
|
+
...t
|
|
549
|
+
}
|
|
550
|
+
));
|
|
551
|
+
kt.displayName = y.Content.displayName;
|
|
552
|
+
const Ir = y.Root, Ct = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
553
|
+
y.List,
|
|
554
|
+
{
|
|
555
|
+
ref: r,
|
|
556
|
+
className: i(
|
|
557
|
+
"inline-flex h-auto items-stretch justify-start gap-0 rounded-none border-0 border-b border-border bg-transparent p-0 text-muted-foreground",
|
|
558
|
+
e
|
|
559
|
+
),
|
|
560
|
+
...t
|
|
561
|
+
}
|
|
562
|
+
));
|
|
563
|
+
Ct.displayName = "UnderlineTabsList";
|
|
564
|
+
const Tt = I(
|
|
565
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-none border-b-2 border-transparent bg-transparent px-4 py-2 text-sm font-medium text-muted-foreground ring-offset-background transition-colors 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 [&_svg]:shrink-0",
|
|
566
|
+
{
|
|
567
|
+
variants: {
|
|
568
|
+
variant: {
|
|
569
|
+
default: "data-[state=active]:border-primary data-[state=active]:text-foreground",
|
|
570
|
+
brand: "data-[state=active]:border-brand-primary data-[state=active]:text-brand-primary dark:data-[state=active]:border-blue-400 dark:data-[state=active]:text-blue-400 data-[state=active]:font-medium",
|
|
571
|
+
orange: "data-[state=active]:border-orange-500 data-[state=active]:text-orange-700 dark:data-[state=active]:text-orange-300 data-[state=active]:bg-white dark:data-[state=active]:bg-gray-900"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
defaultVariants: {
|
|
575
|
+
variant: "default"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
), St = n.forwardRef(({ className: e, variant: t, ...r }, o) => /* @__PURE__ */ a(
|
|
579
|
+
y.Trigger,
|
|
580
|
+
{
|
|
581
|
+
ref: o,
|
|
582
|
+
className: i(Tt({ variant: t, className: e })),
|
|
583
|
+
...r
|
|
584
|
+
}
|
|
585
|
+
));
|
|
586
|
+
St.displayName = "UnderlineTabsTrigger";
|
|
587
|
+
const Rt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
588
|
+
y.Content,
|
|
589
|
+
{
|
|
590
|
+
ref: r,
|
|
591
|
+
className: i(
|
|
592
|
+
"mt-0 outline-none ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=inactive]:hidden",
|
|
593
|
+
e
|
|
594
|
+
),
|
|
595
|
+
...t
|
|
596
|
+
}
|
|
597
|
+
));
|
|
598
|
+
Rt.displayName = y.Content.displayName;
|
|
599
|
+
const pe = I(
|
|
600
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
601
|
+
{
|
|
602
|
+
variants: {
|
|
603
|
+
variant: {
|
|
604
|
+
default: "bg-transparent",
|
|
605
|
+
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
606
|
+
},
|
|
607
|
+
size: {
|
|
608
|
+
default: "h-9 px-2 min-w-9",
|
|
609
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
610
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
defaultVariants: {
|
|
614
|
+
variant: "default",
|
|
615
|
+
size: "default"
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
), Dt = n.forwardRef(({ className: e, variant: t, size: r, ...o }, s) => /* @__PURE__ */ a(
|
|
619
|
+
ce.Root,
|
|
620
|
+
{
|
|
621
|
+
ref: s,
|
|
622
|
+
className: i(pe({ variant: t, size: r, className: e })),
|
|
623
|
+
...o
|
|
624
|
+
}
|
|
625
|
+
));
|
|
626
|
+
Dt.displayName = ce.Root.displayName;
|
|
627
|
+
const ge = n.createContext({
|
|
628
|
+
size: "default",
|
|
629
|
+
variant: "default"
|
|
630
|
+
}), At = n.forwardRef(({ className: e, variant: t, size: r, children: o, ...s }, l) => /* @__PURE__ */ a(
|
|
631
|
+
z.Root,
|
|
632
|
+
{
|
|
633
|
+
ref: l,
|
|
634
|
+
className: i("flex items-center justify-center gap-1", e),
|
|
635
|
+
...s,
|
|
636
|
+
children: /* @__PURE__ */ a(ge.Provider, { value: { variant: t, size: r }, children: o })
|
|
637
|
+
}
|
|
638
|
+
));
|
|
639
|
+
At.displayName = z.Root.displayName;
|
|
640
|
+
const It = n.forwardRef(({ className: e, children: t, variant: r, size: o, ...s }, l) => {
|
|
641
|
+
const d = n.useContext(ge);
|
|
642
|
+
return /* @__PURE__ */ a(
|
|
643
|
+
z.Item,
|
|
644
|
+
{
|
|
645
|
+
ref: l,
|
|
646
|
+
className: i(
|
|
647
|
+
pe({
|
|
648
|
+
variant: d.variant || r,
|
|
649
|
+
size: d.size || o
|
|
650
|
+
}),
|
|
651
|
+
e
|
|
652
|
+
),
|
|
653
|
+
...s,
|
|
654
|
+
children: t
|
|
655
|
+
}
|
|
656
|
+
);
|
|
657
|
+
});
|
|
658
|
+
It.displayName = z.Item.displayName;
|
|
659
|
+
const Mr = q.Root, Pr = q.CollapsibleTrigger, _r = q.CollapsibleContent, Mt = n.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ u(
|
|
660
|
+
M.Root,
|
|
661
|
+
{
|
|
662
|
+
ref: o,
|
|
663
|
+
className: i("relative overflow-hidden", e),
|
|
664
|
+
...r,
|
|
665
|
+
children: [
|
|
666
|
+
/* @__PURE__ */ a(M.Viewport, { className: "h-full w-full rounded-[inherit]", children: t }),
|
|
667
|
+
/* @__PURE__ */ a(he, {}),
|
|
668
|
+
/* @__PURE__ */ a(M.Corner, {})
|
|
669
|
+
]
|
|
670
|
+
}
|
|
671
|
+
));
|
|
672
|
+
Mt.displayName = M.Root.displayName;
|
|
673
|
+
const he = n.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ a(
|
|
674
|
+
M.ScrollAreaScrollbar,
|
|
675
|
+
{
|
|
676
|
+
ref: o,
|
|
677
|
+
orientation: t,
|
|
678
|
+
className: i(
|
|
679
|
+
"flex touch-none select-none transition-colors",
|
|
680
|
+
t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
681
|
+
t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
682
|
+
e
|
|
683
|
+
),
|
|
684
|
+
...r,
|
|
685
|
+
children: /* @__PURE__ */ a(M.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
686
|
+
}
|
|
687
|
+
));
|
|
688
|
+
he.displayName = M.ScrollAreaScrollbar.displayName;
|
|
689
|
+
const Or = b.Root, Er = b.Group, Vr = b.Value, Pt = n.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ u(
|
|
690
|
+
b.Trigger,
|
|
691
|
+
{
|
|
692
|
+
ref: o,
|
|
693
|
+
className: i(
|
|
694
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
695
|
+
e
|
|
696
|
+
),
|
|
697
|
+
...r,
|
|
698
|
+
children: [
|
|
699
|
+
t,
|
|
700
|
+
/* @__PURE__ */ a(b.Icon, { asChild: !0, children: /* @__PURE__ */ a(Y, { className: "h-4 w-4 opacity-50" }) })
|
|
701
|
+
]
|
|
702
|
+
}
|
|
703
|
+
));
|
|
704
|
+
Pt.displayName = b.Trigger.displayName;
|
|
705
|
+
const be = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
706
|
+
b.ScrollUpButton,
|
|
707
|
+
{
|
|
708
|
+
ref: r,
|
|
709
|
+
className: i(
|
|
710
|
+
"flex cursor-default items-center justify-center py-1",
|
|
711
|
+
e
|
|
712
|
+
),
|
|
713
|
+
...t,
|
|
714
|
+
children: /* @__PURE__ */ a(Xe, { className: "h-4 w-4" })
|
|
715
|
+
}
|
|
716
|
+
));
|
|
717
|
+
be.displayName = b.ScrollUpButton.displayName;
|
|
718
|
+
const ve = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
719
|
+
b.ScrollDownButton,
|
|
720
|
+
{
|
|
721
|
+
ref: r,
|
|
722
|
+
className: i(
|
|
723
|
+
"flex cursor-default items-center justify-center py-1",
|
|
724
|
+
e
|
|
725
|
+
),
|
|
726
|
+
...t,
|
|
727
|
+
children: /* @__PURE__ */ a(Y, { className: "h-4 w-4" })
|
|
728
|
+
}
|
|
729
|
+
));
|
|
730
|
+
ve.displayName = b.ScrollDownButton.displayName;
|
|
731
|
+
const _t = n.forwardRef(({ className: e, children: t, position: r = "popper", ...o }, s) => /* @__PURE__ */ a(b.Portal, { children: /* @__PURE__ */ u(
|
|
732
|
+
b.Content,
|
|
733
|
+
{
|
|
734
|
+
ref: s,
|
|
735
|
+
className: i(
|
|
736
|
+
`relative ${O.NESTED_MODAL} max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden custom-scrollbar rounded-md border bg-popover 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 origin-[--radix-select-content-transform-origin]`,
|
|
737
|
+
r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
738
|
+
e
|
|
739
|
+
),
|
|
740
|
+
position: r,
|
|
741
|
+
onCloseAutoFocus: (l) => {
|
|
742
|
+
l.preventDefault();
|
|
743
|
+
},
|
|
744
|
+
onPointerDownOutside: (l) => {
|
|
745
|
+
l.target.closest("[data-radix-dialog-content]") && l.preventDefault();
|
|
746
|
+
},
|
|
747
|
+
...o,
|
|
748
|
+
children: [
|
|
749
|
+
/* @__PURE__ */ a(be, {}),
|
|
750
|
+
/* @__PURE__ */ a(
|
|
751
|
+
b.Viewport,
|
|
752
|
+
{
|
|
753
|
+
className: i(
|
|
754
|
+
"p-1",
|
|
755
|
+
r === "popper" && "min-h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
756
|
+
),
|
|
757
|
+
children: t
|
|
758
|
+
}
|
|
759
|
+
),
|
|
760
|
+
/* @__PURE__ */ a(ve, {})
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
) }));
|
|
764
|
+
_t.displayName = b.Content.displayName;
|
|
765
|
+
const Ot = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
766
|
+
b.Label,
|
|
767
|
+
{
|
|
768
|
+
ref: r,
|
|
769
|
+
className: i("px-2 py-1.5 text-sm font-semibold", e),
|
|
770
|
+
...t
|
|
771
|
+
}
|
|
772
|
+
));
|
|
773
|
+
Ot.displayName = b.Label.displayName;
|
|
774
|
+
const Et = n.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ u(
|
|
775
|
+
b.Item,
|
|
776
|
+
{
|
|
777
|
+
ref: o,
|
|
778
|
+
className: i(
|
|
779
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
780
|
+
e
|
|
781
|
+
),
|
|
782
|
+
...r,
|
|
783
|
+
children: [
|
|
784
|
+
/* @__PURE__ */ a("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(b.ItemIndicator, { children: /* @__PURE__ */ a(K, { className: "h-4 w-4" }) }) }),
|
|
785
|
+
/* @__PURE__ */ a(b.ItemText, { children: t })
|
|
786
|
+
]
|
|
787
|
+
}
|
|
788
|
+
));
|
|
789
|
+
Et.displayName = b.Item.displayName;
|
|
790
|
+
const Vt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
791
|
+
b.Separator,
|
|
792
|
+
{
|
|
793
|
+
ref: r,
|
|
794
|
+
className: i("-mx-1 my-1 h-px bg-muted", e),
|
|
795
|
+
...t
|
|
796
|
+
}
|
|
797
|
+
));
|
|
798
|
+
Vt.displayName = b.Separator.displayName;
|
|
799
|
+
const Lt = g.Root, jt = g.Trigger, Lr = g.Group, jr = g.Portal, Br = g.Sub, zr = g.RadioGroup, Bt = n.forwardRef(({ className: e, inset: t, children: r, ...o }, s) => /* @__PURE__ */ u(
|
|
800
|
+
g.SubTrigger,
|
|
801
|
+
{
|
|
802
|
+
ref: s,
|
|
803
|
+
className: i(
|
|
804
|
+
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
805
|
+
t && "pl-8",
|
|
806
|
+
e
|
|
807
|
+
),
|
|
808
|
+
...o,
|
|
809
|
+
children: [
|
|
810
|
+
r,
|
|
811
|
+
/* @__PURE__ */ a(Ke, { className: "ml-auto" })
|
|
812
|
+
]
|
|
813
|
+
}
|
|
814
|
+
));
|
|
815
|
+
Bt.displayName = g.SubTrigger.displayName;
|
|
816
|
+
const zt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
817
|
+
g.SubContent,
|
|
818
|
+
{
|
|
819
|
+
ref: r,
|
|
820
|
+
className: i(
|
|
821
|
+
O.OVERLAY_POPOVER,
|
|
822
|
+
"min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
823
|
+
e
|
|
824
|
+
),
|
|
825
|
+
...t
|
|
826
|
+
}
|
|
827
|
+
));
|
|
828
|
+
zt.displayName = g.SubContent.displayName;
|
|
829
|
+
const xe = n.forwardRef(({ className: e, sideOffset: t = 4, ...r }, o) => /* @__PURE__ */ a(g.Portal, { children: /* @__PURE__ */ a(
|
|
830
|
+
g.Content,
|
|
831
|
+
{
|
|
832
|
+
ref: o,
|
|
833
|
+
sideOffset: t,
|
|
834
|
+
className: i(
|
|
835
|
+
O.OVERLAY_POPOVER,
|
|
836
|
+
"max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden custom-scrollbar rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
837
|
+
"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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
838
|
+
e
|
|
839
|
+
),
|
|
840
|
+
...r
|
|
841
|
+
}
|
|
842
|
+
) }));
|
|
843
|
+
xe.displayName = g.Content.displayName;
|
|
844
|
+
const we = n.forwardRef(({ className: e, inset: t, ...r }, o) => /* @__PURE__ */ a(
|
|
845
|
+
g.Item,
|
|
846
|
+
{
|
|
847
|
+
ref: o,
|
|
848
|
+
className: i(
|
|
849
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
850
|
+
t && "pl-8",
|
|
851
|
+
e
|
|
852
|
+
),
|
|
853
|
+
...r
|
|
854
|
+
}
|
|
855
|
+
));
|
|
856
|
+
we.displayName = g.Item.displayName;
|
|
857
|
+
const ye = n.forwardRef(({ className: e, children: t, checked: r, ...o }, s) => /* @__PURE__ */ u(
|
|
858
|
+
g.CheckboxItem,
|
|
859
|
+
{
|
|
860
|
+
ref: s,
|
|
861
|
+
className: i(
|
|
862
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
863
|
+
e
|
|
864
|
+
),
|
|
865
|
+
checked: r,
|
|
866
|
+
...o,
|
|
867
|
+
children: [
|
|
868
|
+
/* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(g.ItemIndicator, { children: /* @__PURE__ */ a(K, { className: "h-4 w-4" }) }) }),
|
|
869
|
+
t
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
));
|
|
873
|
+
ye.displayName = g.CheckboxItem.displayName;
|
|
874
|
+
const Ut = n.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ u(
|
|
875
|
+
g.RadioItem,
|
|
876
|
+
{
|
|
877
|
+
ref: o,
|
|
878
|
+
className: i(
|
|
879
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
880
|
+
e
|
|
881
|
+
),
|
|
882
|
+
...r,
|
|
883
|
+
children: [
|
|
884
|
+
/* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(g.ItemIndicator, { children: /* @__PURE__ */ a(de, { className: "h-2 w-2 fill-current" }) }) }),
|
|
885
|
+
t
|
|
886
|
+
]
|
|
887
|
+
}
|
|
888
|
+
));
|
|
889
|
+
Ut.displayName = g.RadioItem.displayName;
|
|
890
|
+
const Ne = n.forwardRef(({ className: e, inset: t, ...r }, o) => /* @__PURE__ */ a(
|
|
891
|
+
g.Label,
|
|
892
|
+
{
|
|
893
|
+
ref: o,
|
|
894
|
+
className: i(
|
|
895
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
896
|
+
t && "pl-8",
|
|
897
|
+
e
|
|
898
|
+
),
|
|
899
|
+
...r
|
|
900
|
+
}
|
|
901
|
+
));
|
|
902
|
+
Ne.displayName = g.Label.displayName;
|
|
903
|
+
const F = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
904
|
+
g.Separator,
|
|
905
|
+
{
|
|
906
|
+
ref: r,
|
|
907
|
+
className: i("-mx-1 my-1 h-px bg-muted", e),
|
|
908
|
+
...t
|
|
909
|
+
}
|
|
910
|
+
));
|
|
911
|
+
F.displayName = g.Separator.displayName;
|
|
912
|
+
const Gt = ({
|
|
913
|
+
className: e,
|
|
914
|
+
...t
|
|
915
|
+
}) => /* @__PURE__ */ a(
|
|
916
|
+
"span",
|
|
917
|
+
{
|
|
918
|
+
className: i("ml-auto text-xs tracking-widest opacity-60", e),
|
|
919
|
+
...t
|
|
920
|
+
}
|
|
921
|
+
);
|
|
922
|
+
Gt.displayName = "DropdownMenuShortcut";
|
|
923
|
+
const $t = n.forwardRef(
|
|
924
|
+
({
|
|
925
|
+
options: e,
|
|
926
|
+
value: t = [],
|
|
927
|
+
onChange: r,
|
|
928
|
+
placeholder: o = "Please select",
|
|
929
|
+
disabled: s = !1,
|
|
930
|
+
className: l,
|
|
931
|
+
triggerClassName: d,
|
|
932
|
+
contentClassName: c,
|
|
933
|
+
maxDisplayCount: m = 3,
|
|
934
|
+
showClearButton: h = !0,
|
|
935
|
+
emptyText: p = "No options"
|
|
936
|
+
}, v) => {
|
|
937
|
+
const [S, R] = n.useState(!1), x = n.useMemo(
|
|
938
|
+
() => Array.isArray(t) ? t : [],
|
|
939
|
+
[t]
|
|
940
|
+
), k = n.useMemo(() => e.filter((f) => x.includes(f.value)), [e, x]), E = () => {
|
|
941
|
+
if (k.length === 0)
|
|
942
|
+
return o;
|
|
943
|
+
if (k.length <= m)
|
|
944
|
+
return k.map((T) => T.label).join(", ");
|
|
945
|
+
const f = k.slice(0, m), w = k.length - m;
|
|
946
|
+
return `${f.map((T) => T.label).join(", ")} +${w}`;
|
|
947
|
+
}, P = (f) => {
|
|
948
|
+
if (s) return;
|
|
949
|
+
const w = x.includes(f) ? x.filter((T) => T !== f) : [...x, f];
|
|
950
|
+
r?.(w);
|
|
951
|
+
}, D = (f) => {
|
|
952
|
+
f.stopPropagation(), r?.([]);
|
|
953
|
+
}, C = () => {
|
|
954
|
+
const f = e.filter((w) => !w.disabled).map((w) => w.value);
|
|
955
|
+
x.length === f.length ? r?.([]) : r?.(f);
|
|
956
|
+
}, A = e.filter((f) => !f.disabled).length > 0 && x.length === e.filter((f) => !f.disabled).length;
|
|
957
|
+
return /* @__PURE__ */ u(ae, { open: S, onOpenChange: R, children: [
|
|
958
|
+
/* @__PURE__ */ a(oe, { asChild: !0, children: /* @__PURE__ */ u(
|
|
959
|
+
H,
|
|
960
|
+
{
|
|
961
|
+
ref: v,
|
|
962
|
+
variant: "outline",
|
|
963
|
+
role: "combobox",
|
|
964
|
+
"aria-expanded": S,
|
|
965
|
+
disabled: s,
|
|
966
|
+
className: i(
|
|
967
|
+
"h-9 w-full justify-between text-left font-normal",
|
|
968
|
+
!k.length && "text-muted-foreground",
|
|
969
|
+
d,
|
|
970
|
+
l
|
|
971
|
+
),
|
|
972
|
+
children: [
|
|
973
|
+
/* @__PURE__ */ a("span", { className: "truncate flex-1 text-left", children: E() }),
|
|
974
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-1 ml-2 shrink-0", children: [
|
|
975
|
+
h && k.length > 0 && /* @__PURE__ */ a(
|
|
976
|
+
X,
|
|
977
|
+
{
|
|
978
|
+
className: "h-4 w-4 opacity-50 hover:opacity-100 transition-opacity",
|
|
979
|
+
onClick: D
|
|
980
|
+
}
|
|
981
|
+
),
|
|
982
|
+
/* @__PURE__ */ a(Y, { className: "h-4 w-4 opacity-50 shrink-0" })
|
|
983
|
+
] })
|
|
984
|
+
]
|
|
985
|
+
}
|
|
986
|
+
) }),
|
|
987
|
+
/* @__PURE__ */ a(
|
|
988
|
+
ne,
|
|
989
|
+
{
|
|
990
|
+
className: i("w-[var(--radix-popover-trigger-width)] p-0", c),
|
|
991
|
+
align: "start",
|
|
992
|
+
onOpenAutoFocus: (f) => f.preventDefault(),
|
|
993
|
+
children: /* @__PURE__ */ a("div", { className: "max-h-[300px] overflow-y-auto", children: e.length === 0 ? /* @__PURE__ */ a("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: p }) : /* @__PURE__ */ u(ze, { children: [
|
|
994
|
+
e.filter((f) => !f.disabled).length > 0 && /* @__PURE__ */ a("div", { className: "px-2 py-1.5 border-b", children: /* @__PURE__ */ u(
|
|
995
|
+
"div",
|
|
996
|
+
{
|
|
997
|
+
className: "flex items-center gap-2 px-2 py-1.5 rounded-sm hover:bg-accent cursor-pointer",
|
|
998
|
+
onClick: C,
|
|
999
|
+
children: [
|
|
1000
|
+
/* @__PURE__ */ a(
|
|
1001
|
+
Z,
|
|
1002
|
+
{
|
|
1003
|
+
checked: A,
|
|
1004
|
+
onCheckedChange: C,
|
|
1005
|
+
onClick: (f) => f.stopPropagation()
|
|
1006
|
+
}
|
|
1007
|
+
),
|
|
1008
|
+
/* @__PURE__ */ a("span", { className: "text-sm font-medium", children: A ? "Deselect all" : "Select all" })
|
|
1009
|
+
]
|
|
1010
|
+
}
|
|
1011
|
+
) }),
|
|
1012
|
+
/* @__PURE__ */ a("div", { className: "p-1", children: e.map((f) => {
|
|
1013
|
+
const w = x.includes(f.value);
|
|
1014
|
+
return /* @__PURE__ */ u(
|
|
1015
|
+
"div",
|
|
1016
|
+
{
|
|
1017
|
+
className: i(
|
|
1018
|
+
"flex items-center gap-2 px-2 py-1.5 rounded-sm cursor-pointer hover:bg-accent transition-colors",
|
|
1019
|
+
f.disabled && "opacity-50 cursor-not-allowed"
|
|
1020
|
+
),
|
|
1021
|
+
onClick: () => !f.disabled && P(f.value),
|
|
1022
|
+
children: [
|
|
1023
|
+
/* @__PURE__ */ a(
|
|
1024
|
+
Z,
|
|
1025
|
+
{
|
|
1026
|
+
checked: w,
|
|
1027
|
+
disabled: f.disabled,
|
|
1028
|
+
onCheckedChange: () => !f.disabled && P(f.value),
|
|
1029
|
+
onClick: (T) => T.stopPropagation()
|
|
1030
|
+
}
|
|
1031
|
+
),
|
|
1032
|
+
/* @__PURE__ */ a("span", { className: "text-sm flex-1", children: f.label }),
|
|
1033
|
+
w && /* @__PURE__ */ a(K, { className: "h-4 w-4 text-primary shrink-0" })
|
|
1034
|
+
]
|
|
1035
|
+
},
|
|
1036
|
+
f.value
|
|
1037
|
+
);
|
|
1038
|
+
}) })
|
|
1039
|
+
] }) })
|
|
1040
|
+
}
|
|
1041
|
+
)
|
|
1042
|
+
] });
|
|
1043
|
+
}
|
|
1044
|
+
);
|
|
1045
|
+
$t.displayName = "MultiSelect";
|
|
1046
|
+
const Ur = _.Provider, Gr = _.Root, $r = _.Trigger, Ft = n.forwardRef(({ className: e, sideOffset: t = 4, ...r }, o) => /* @__PURE__ */ a(_.Portal, { children: /* @__PURE__ */ a(
|
|
1047
|
+
_.Content,
|
|
1048
|
+
{
|
|
1049
|
+
ref: o,
|
|
1050
|
+
sideOffset: t,
|
|
1051
|
+
className: i(
|
|
1052
|
+
`${O.TOOLTIP} overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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 origin-[--radix-tooltip-content-transform-origin]`,
|
|
1053
|
+
e
|
|
1054
|
+
),
|
|
1055
|
+
...r
|
|
1056
|
+
}
|
|
1057
|
+
) }));
|
|
1058
|
+
Ft.displayName = _.Content.displayName;
|
|
1059
|
+
const Ht = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1060
|
+
L.Root,
|
|
1061
|
+
{
|
|
1062
|
+
className: i("grid gap-2", e),
|
|
1063
|
+
...t,
|
|
1064
|
+
ref: r
|
|
1065
|
+
}
|
|
1066
|
+
));
|
|
1067
|
+
Ht.displayName = L.Root.displayName;
|
|
1068
|
+
const Xt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1069
|
+
L.Item,
|
|
1070
|
+
{
|
|
1071
|
+
ref: r,
|
|
1072
|
+
className: i(
|
|
1073
|
+
"aspect-square h-4 w-4 rounded-full border border-neutral-300 dark:border-neutral-700 text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50",
|
|
1074
|
+
e
|
|
1075
|
+
),
|
|
1076
|
+
...t,
|
|
1077
|
+
children: /* @__PURE__ */ a(L.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ a(de, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1078
|
+
}
|
|
1079
|
+
));
|
|
1080
|
+
Xt.displayName = L.Item.displayName;
|
|
1081
|
+
function Kt(e) {
|
|
1082
|
+
return e ? `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}` : "";
|
|
1083
|
+
}
|
|
1084
|
+
function Fr({ selected: e, onChange: t, placeholderText: r, className: o, compact: s = !1, locale: l }) {
|
|
1085
|
+
return /* @__PURE__ */ a(
|
|
1086
|
+
_e,
|
|
1087
|
+
{
|
|
1088
|
+
value: Kt(e),
|
|
1089
|
+
onChange: (d) => t?.(d ? /* @__PURE__ */ new Date(`${d}T00:00:00`) : void 0),
|
|
1090
|
+
placeholder: r,
|
|
1091
|
+
locale: l,
|
|
1092
|
+
className: o,
|
|
1093
|
+
triggerClassName: s ? "h-8 px-2 text-sm" : void 0
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
const Yt = {
|
|
1098
|
+
success: qe,
|
|
1099
|
+
error: Ye,
|
|
1100
|
+
warning: ie,
|
|
1101
|
+
info: le
|
|
1102
|
+
}, qt = {
|
|
1103
|
+
success: {
|
|
1104
|
+
iconColor: "text-green-500 dark:text-green-400",
|
|
1105
|
+
buttonColor: "bg-green-600 hover:bg-green-700 dark:bg-green-500 dark:hover:bg-green-600"
|
|
1106
|
+
},
|
|
1107
|
+
error: {
|
|
1108
|
+
iconColor: "text-red-500 dark:text-red-400",
|
|
1109
|
+
buttonColor: "bg-red-600 hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600"
|
|
1110
|
+
},
|
|
1111
|
+
warning: {
|
|
1112
|
+
iconColor: "text-orange-500 dark:text-orange-400",
|
|
1113
|
+
buttonColor: "bg-orange-600 hover:bg-orange-700 dark:bg-orange-500 dark:hover:bg-orange-600"
|
|
1114
|
+
},
|
|
1115
|
+
info: {
|
|
1116
|
+
iconColor: "text-brand-primary dark:text-neutral-400",
|
|
1117
|
+
buttonColor: "bg-brand-primary-light hover:bg-brand-primary dark:bg-brand-primary dark:hover:bg-brand-primary-light"
|
|
1118
|
+
}
|
|
1119
|
+
}, Qt = ({
|
|
1120
|
+
isOpen: e,
|
|
1121
|
+
onClose: t,
|
|
1122
|
+
type: r = "info",
|
|
1123
|
+
title: o,
|
|
1124
|
+
message: s,
|
|
1125
|
+
confirmText: l,
|
|
1126
|
+
onConfirm: d,
|
|
1127
|
+
showCancel: c = !1,
|
|
1128
|
+
cancelText: m,
|
|
1129
|
+
onCancel: h,
|
|
1130
|
+
loading: p = !1
|
|
1131
|
+
}) => {
|
|
1132
|
+
const { t: v } = ue("common"), S = Yt[r], R = qt[r], x = {
|
|
1133
|
+
success: v("dialog.title.success", "Success"),
|
|
1134
|
+
error: v("dialog.title.error", "Error"),
|
|
1135
|
+
warning: v("dialog.title.warning", "Warning"),
|
|
1136
|
+
info: v("dialog.title.info", "Information")
|
|
1137
|
+
}[r], k = l || v("dialog.button.confirm", "OK"), E = m || v("dialog.button.cancel", "Cancel"), P = () => {
|
|
1138
|
+
d ? d() : t();
|
|
1139
|
+
}, D = () => {
|
|
1140
|
+
h ? h() : t();
|
|
1141
|
+
};
|
|
1142
|
+
return /* @__PURE__ */ a(
|
|
1143
|
+
Oe,
|
|
1144
|
+
{
|
|
1145
|
+
size: "STANDARD",
|
|
1146
|
+
isOpen: e,
|
|
1147
|
+
onClose: t,
|
|
1148
|
+
showCloseButton: !1,
|
|
1149
|
+
closeOnOverlayClick: !p,
|
|
1150
|
+
contentClassName: "max-w-md shadow-2xl",
|
|
1151
|
+
children: /* @__PURE__ */ u("div", { className: "p-6 bg-white dark:bg-neutral-900 rounded-lg", children: [
|
|
1152
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-4 mb-4", children: [
|
|
1153
|
+
/* @__PURE__ */ a("div", { className: i("flex-shrink-0", R.iconColor), children: /* @__PURE__ */ a(S, { className: "w-8 h-8" }) }),
|
|
1154
|
+
/* @__PURE__ */ a("div", { className: "flex-1", children: (o || x) && /* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-neutral-900 dark:text-neutral-100 mb-1", children: o || x }) })
|
|
1155
|
+
] }),
|
|
1156
|
+
/* @__PURE__ */ a("div", { className: "mb-6", children: /* @__PURE__ */ a("p", { className: "text-neutral-700 dark:text-neutral-200 whitespace-pre-line leading-relaxed", children: s }) }),
|
|
1157
|
+
/* @__PURE__ */ u("div", { className: "flex items-center justify-end gap-3", children: [
|
|
1158
|
+
c && /* @__PURE__ */ a(
|
|
1159
|
+
"button",
|
|
1160
|
+
{
|
|
1161
|
+
type: "button",
|
|
1162
|
+
onClick: D,
|
|
1163
|
+
disabled: p,
|
|
1164
|
+
className: "px-4 py-2 text-sm font-medium text-neutral-700 dark:text-neutral-200 bg-white dark:bg-neutral-800 border border-neutral-300 dark:border-neutral-600 rounded-lg hover:bg-neutral-50 dark:hover:bg-neutral-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1165
|
+
children: E
|
|
1166
|
+
}
|
|
1167
|
+
),
|
|
1168
|
+
/* @__PURE__ */ u(
|
|
1169
|
+
"button",
|
|
1170
|
+
{
|
|
1171
|
+
type: "button",
|
|
1172
|
+
onClick: P,
|
|
1173
|
+
disabled: p,
|
|
1174
|
+
className: i(
|
|
1175
|
+
"px-4 py-2 text-sm font-medium text-white dark:text-white rounded-lg transition-colors flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900 shadow-sm",
|
|
1176
|
+
R.buttonColor
|
|
1177
|
+
),
|
|
1178
|
+
children: [
|
|
1179
|
+
p && /* @__PURE__ */ a("div", { className: "w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin" }),
|
|
1180
|
+
k
|
|
1181
|
+
]
|
|
1182
|
+
}
|
|
1183
|
+
)
|
|
1184
|
+
] })
|
|
1185
|
+
] })
|
|
1186
|
+
}
|
|
1187
|
+
);
|
|
1188
|
+
}, ke = n.createContext(void 0), Hr = ({ children: e }) => {
|
|
1189
|
+
const [t, r] = n.useState({
|
|
1190
|
+
isOpen: !1,
|
|
1191
|
+
type: "info",
|
|
1192
|
+
message: ""
|
|
1193
|
+
}), o = n.useCallback((c) => {
|
|
1194
|
+
r({
|
|
1195
|
+
...c,
|
|
1196
|
+
isOpen: !0
|
|
1197
|
+
});
|
|
1198
|
+
}, []), s = n.useCallback(() => {
|
|
1199
|
+
r((c) => ({
|
|
1200
|
+
...c,
|
|
1201
|
+
isOpen: !1
|
|
1202
|
+
}));
|
|
1203
|
+
}, []), l = n.useCallback((c) => {
|
|
1204
|
+
r((m) => ({
|
|
1205
|
+
...m,
|
|
1206
|
+
loading: c
|
|
1207
|
+
}));
|
|
1208
|
+
}, []), d = n.useMemo(() => ({
|
|
1209
|
+
showAlert: o,
|
|
1210
|
+
hideAlert: s,
|
|
1211
|
+
setLoading: l,
|
|
1212
|
+
state: t
|
|
1213
|
+
}), [o, s, l, t]);
|
|
1214
|
+
return /* @__PURE__ */ u(ke.Provider, { value: d, children: [
|
|
1215
|
+
e,
|
|
1216
|
+
/* @__PURE__ */ a(
|
|
1217
|
+
Qt,
|
|
1218
|
+
{
|
|
1219
|
+
isOpen: t.isOpen,
|
|
1220
|
+
onClose: s,
|
|
1221
|
+
type: t.type,
|
|
1222
|
+
title: t.title,
|
|
1223
|
+
message: t.message,
|
|
1224
|
+
confirmText: t.confirmText,
|
|
1225
|
+
onConfirm: t.onConfirm,
|
|
1226
|
+
showCancel: t.showCancel,
|
|
1227
|
+
cancelText: t.cancelText,
|
|
1228
|
+
onCancel: t.onCancel,
|
|
1229
|
+
loading: t.loading
|
|
1230
|
+
}
|
|
1231
|
+
)
|
|
1232
|
+
] });
|
|
1233
|
+
}, Jt = () => {
|
|
1234
|
+
const e = n.useContext(ke);
|
|
1235
|
+
if (!e)
|
|
1236
|
+
throw new Error("useAlert must be used within AlertProvider");
|
|
1237
|
+
return e;
|
|
1238
|
+
}, Xr = () => {
|
|
1239
|
+
const { showAlert: e, hideAlert: t, setLoading: r } = Jt(), { t: o } = ue("common");
|
|
1240
|
+
return n.useMemo(() => ({
|
|
1241
|
+
success: (s, l) => {
|
|
1242
|
+
e({
|
|
1243
|
+
type: "success",
|
|
1244
|
+
message: s,
|
|
1245
|
+
...l
|
|
1246
|
+
});
|
|
1247
|
+
},
|
|
1248
|
+
error: (s, l) => {
|
|
1249
|
+
e({
|
|
1250
|
+
type: "error",
|
|
1251
|
+
message: s,
|
|
1252
|
+
...l
|
|
1253
|
+
});
|
|
1254
|
+
},
|
|
1255
|
+
warning: (s, l) => {
|
|
1256
|
+
e({
|
|
1257
|
+
type: "warning",
|
|
1258
|
+
message: s,
|
|
1259
|
+
...l
|
|
1260
|
+
});
|
|
1261
|
+
},
|
|
1262
|
+
info: (s, l) => {
|
|
1263
|
+
e({
|
|
1264
|
+
type: "info",
|
|
1265
|
+
message: s,
|
|
1266
|
+
...l
|
|
1267
|
+
});
|
|
1268
|
+
},
|
|
1269
|
+
confirm: (s, l, d) => {
|
|
1270
|
+
e({
|
|
1271
|
+
type: d?.type || "warning",
|
|
1272
|
+
title: d?.title || o("dialog.title.confirm", "Confirm Operation"),
|
|
1273
|
+
message: s,
|
|
1274
|
+
onConfirm: async () => {
|
|
1275
|
+
const c = l();
|
|
1276
|
+
if (c instanceof Promise) {
|
|
1277
|
+
r(!0);
|
|
1278
|
+
try {
|
|
1279
|
+
await c, t();
|
|
1280
|
+
} catch (m) {
|
|
1281
|
+
throw r(!1), console.error("Confirm operation failed:", m), m;
|
|
1282
|
+
}
|
|
1283
|
+
} else
|
|
1284
|
+
t();
|
|
1285
|
+
},
|
|
1286
|
+
showCancel: !0,
|
|
1287
|
+
confirmText: d?.confirmText || o("dialog.button.confirm", "OK"),
|
|
1288
|
+
cancelText: d?.cancelText || o("dialog.button.cancel", "Cancel"),
|
|
1289
|
+
...d
|
|
1290
|
+
});
|
|
1291
|
+
},
|
|
1292
|
+
confirmDelete: (s, l, d) => {
|
|
1293
|
+
e({
|
|
1294
|
+
type: "error",
|
|
1295
|
+
title: d?.title || o("dialog.title.delete", "Delete Confirmation"),
|
|
1296
|
+
message: s,
|
|
1297
|
+
onConfirm: async () => {
|
|
1298
|
+
r(!0);
|
|
1299
|
+
try {
|
|
1300
|
+
await l(), t();
|
|
1301
|
+
} catch (c) {
|
|
1302
|
+
throw r(!1), console.error("Delete operation failed:", c), c;
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
showCancel: !0,
|
|
1306
|
+
confirmText: d?.confirmText || o("dialog.button.delete", "Delete"),
|
|
1307
|
+
cancelText: d?.cancelText || o("dialog.button.cancel", "Cancel"),
|
|
1308
|
+
...d
|
|
1309
|
+
});
|
|
1310
|
+
},
|
|
1311
|
+
hide: t
|
|
1312
|
+
}), [e, t, r, o]);
|
|
1313
|
+
}, Wt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ a(
|
|
1314
|
+
"table",
|
|
1315
|
+
{
|
|
1316
|
+
ref: r,
|
|
1317
|
+
className: i("w-full caption-bottom text-sm", e),
|
|
1318
|
+
...t
|
|
1319
|
+
}
|
|
1320
|
+
) }));
|
|
1321
|
+
Wt.displayName = "Table";
|
|
1322
|
+
const Zt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a("thead", { ref: r, className: i("[&_tr]:border-b", e), ...t }));
|
|
1323
|
+
Zt.displayName = "TableHeader";
|
|
1324
|
+
const er = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1325
|
+
"tbody",
|
|
1326
|
+
{
|
|
1327
|
+
ref: r,
|
|
1328
|
+
className: i("[&_tr:last-child]:border-0", e),
|
|
1329
|
+
...t
|
|
1330
|
+
}
|
|
1331
|
+
));
|
|
1332
|
+
er.displayName = "TableBody";
|
|
1333
|
+
const tr = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1334
|
+
"tfoot",
|
|
1335
|
+
{
|
|
1336
|
+
ref: r,
|
|
1337
|
+
className: i(
|
|
1338
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1339
|
+
e
|
|
1340
|
+
),
|
|
1341
|
+
...t
|
|
1342
|
+
}
|
|
1343
|
+
));
|
|
1344
|
+
tr.displayName = "TableFooter";
|
|
1345
|
+
const rr = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1346
|
+
"tr",
|
|
1347
|
+
{
|
|
1348
|
+
ref: r,
|
|
1349
|
+
className: i(
|
|
1350
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1351
|
+
e
|
|
1352
|
+
),
|
|
1353
|
+
...t
|
|
1354
|
+
}
|
|
1355
|
+
));
|
|
1356
|
+
rr.displayName = "TableRow";
|
|
1357
|
+
const ar = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1358
|
+
"th",
|
|
1359
|
+
{
|
|
1360
|
+
ref: r,
|
|
1361
|
+
className: i(
|
|
1362
|
+
"h-11 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1363
|
+
e
|
|
1364
|
+
),
|
|
1365
|
+
...t
|
|
1366
|
+
}
|
|
1367
|
+
));
|
|
1368
|
+
ar.displayName = "TableHead";
|
|
1369
|
+
const or = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1370
|
+
"td",
|
|
1371
|
+
{
|
|
1372
|
+
ref: r,
|
|
1373
|
+
className: i(
|
|
1374
|
+
"px-4 py-3 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1375
|
+
e
|
|
1376
|
+
),
|
|
1377
|
+
...t
|
|
1378
|
+
}
|
|
1379
|
+
));
|
|
1380
|
+
or.displayName = "TableCell";
|
|
1381
|
+
const nr = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1382
|
+
"caption",
|
|
1383
|
+
{
|
|
1384
|
+
ref: r,
|
|
1385
|
+
className: i("mt-4 text-sm text-muted-foreground", e),
|
|
1386
|
+
...t
|
|
1387
|
+
}
|
|
1388
|
+
));
|
|
1389
|
+
nr.displayName = "TableCaption";
|
|
1390
|
+
const Ce = n.createContext(null);
|
|
1391
|
+
function sr() {
|
|
1392
|
+
const e = n.useContext(Ce);
|
|
1393
|
+
if (!e)
|
|
1394
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1395
|
+
return e;
|
|
1396
|
+
}
|
|
1397
|
+
function Kr({
|
|
1398
|
+
id: e,
|
|
1399
|
+
className: t,
|
|
1400
|
+
children: r,
|
|
1401
|
+
config: o,
|
|
1402
|
+
...s
|
|
1403
|
+
}) {
|
|
1404
|
+
const l = n.useId(), d = `chart-${e ?? l.replace(/:/g, "")}`;
|
|
1405
|
+
return /* @__PURE__ */ a(Ce.Provider, { value: { config: o }, children: /* @__PURE__ */ u(
|
|
1406
|
+
"div",
|
|
1407
|
+
{
|
|
1408
|
+
"data-chart": d,
|
|
1409
|
+
className: i(
|
|
1410
|
+
'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',
|
|
1411
|
+
t
|
|
1412
|
+
),
|
|
1413
|
+
...s,
|
|
1414
|
+
children: [
|
|
1415
|
+
/* @__PURE__ */ a(ir, { id: d, config: o }),
|
|
1416
|
+
/* @__PURE__ */ a(Q.ResponsiveContainer, { children: r })
|
|
1417
|
+
]
|
|
1418
|
+
}
|
|
1419
|
+
) });
|
|
1420
|
+
}
|
|
1421
|
+
function ir({ id: e, config: t }) {
|
|
1422
|
+
return Object.entries(t).filter(([, o]) => o.color).length === 0 ? null : /* @__PURE__ */ a(
|
|
1423
|
+
"style",
|
|
1424
|
+
{
|
|
1425
|
+
dangerouslySetInnerHTML: {
|
|
1426
|
+
__html: Object.entries(t).filter(([, o]) => o.color).map(
|
|
1427
|
+
([o, s]) => `[data-chart=${e}] { --color-${o}: ${s.color}; }`
|
|
1428
|
+
).join(`
|
|
1429
|
+
`)
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
const Yr = Q.Tooltip;
|
|
1435
|
+
function qr({
|
|
1436
|
+
active: e,
|
|
1437
|
+
payload: t,
|
|
1438
|
+
label: r,
|
|
1439
|
+
className: o,
|
|
1440
|
+
hideLabel: s = !1
|
|
1441
|
+
}) {
|
|
1442
|
+
const { config: l } = sr();
|
|
1443
|
+
return !e || !t?.length ? null : /* @__PURE__ */ u(
|
|
1444
|
+
"div",
|
|
1445
|
+
{
|
|
1446
|
+
className: i(
|
|
1447
|
+
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
1448
|
+
o
|
|
1449
|
+
),
|
|
1450
|
+
children: [
|
|
1451
|
+
!s && r != null && /* @__PURE__ */ a("div", { className: "font-medium text-foreground", children: String(r) }),
|
|
1452
|
+
/* @__PURE__ */ a("div", { className: "grid gap-1.5", children: t.map((d, c) => {
|
|
1453
|
+
const m = `${String(d.name ?? d.dataKey ?? "value")}`, h = l[m], p = d.color ?? d.payload?.fill ?? h?.color;
|
|
1454
|
+
return /* @__PURE__ */ u(
|
|
1455
|
+
"div",
|
|
1456
|
+
{
|
|
1457
|
+
className: "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
1458
|
+
children: [
|
|
1459
|
+
/* @__PURE__ */ a(
|
|
1460
|
+
"div",
|
|
1461
|
+
{
|
|
1462
|
+
className: "shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
|
|
1463
|
+
style: {
|
|
1464
|
+
"--color-bg": p,
|
|
1465
|
+
"--color-border": p
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
),
|
|
1469
|
+
/* @__PURE__ */ u("div", { className: "flex flex-1 justify-between leading-none", children: [
|
|
1470
|
+
/* @__PURE__ */ a("span", { className: "text-muted-foreground", children: h?.label ?? d.name ?? m }),
|
|
1471
|
+
/* @__PURE__ */ a("span", { className: "font-mono font-medium tabular-nums text-foreground", children: typeof d.value == "number" ? d.value.toLocaleString() : String(d.value ?? "") })
|
|
1472
|
+
] })
|
|
1473
|
+
]
|
|
1474
|
+
},
|
|
1475
|
+
c
|
|
1476
|
+
);
|
|
1477
|
+
}) })
|
|
1478
|
+
]
|
|
1479
|
+
}
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
const Qr = Q.Legend;
|
|
1483
|
+
function Jr({
|
|
1484
|
+
open: e,
|
|
1485
|
+
onOpenChange: t,
|
|
1486
|
+
title: r,
|
|
1487
|
+
description: o,
|
|
1488
|
+
steps: s,
|
|
1489
|
+
footer: l,
|
|
1490
|
+
className: d
|
|
1491
|
+
}) {
|
|
1492
|
+
return /* @__PURE__ */ a(Ee, { open: e, onOpenChange: t, children: /* @__PURE__ */ u(
|
|
1493
|
+
Ve,
|
|
1494
|
+
{
|
|
1495
|
+
side: "right",
|
|
1496
|
+
className: i("flex w-full flex-col sm:max-w-md", d),
|
|
1497
|
+
children: [
|
|
1498
|
+
/* @__PURE__ */ u(Le, { children: [
|
|
1499
|
+
/* @__PURE__ */ a(je, { children: r }),
|
|
1500
|
+
o ? /* @__PURE__ */ a(Be, { children: o }) : null
|
|
1501
|
+
] }),
|
|
1502
|
+
/* @__PURE__ */ a("div", { className: "-mx-1 flex-1 overflow-y-auto px-1", children: /* @__PURE__ */ a("ol", { className: "space-y-6 py-2", children: s.map((c, m) => /* @__PURE__ */ u("li", { className: "flex gap-3", children: [
|
|
1503
|
+
/* @__PURE__ */ a(
|
|
1504
|
+
"span",
|
|
1505
|
+
{
|
|
1506
|
+
"aria-hidden": !0,
|
|
1507
|
+
className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground",
|
|
1508
|
+
children: m + 1
|
|
1509
|
+
}
|
|
1510
|
+
),
|
|
1511
|
+
/* @__PURE__ */ u("div", { className: "min-w-0 flex-1 space-y-1.5", children: [
|
|
1512
|
+
/* @__PURE__ */ a("p", { className: "text-sm font-semibold leading-6 text-foreground", children: c.title }),
|
|
1513
|
+
/* @__PURE__ */ a("div", { className: "text-sm leading-relaxed text-muted-foreground", children: c.body }),
|
|
1514
|
+
c.image ? /* @__PURE__ */ a(
|
|
1515
|
+
"img",
|
|
1516
|
+
{
|
|
1517
|
+
src: c.image,
|
|
1518
|
+
alt: c.imageAlt ?? "",
|
|
1519
|
+
loading: "lazy",
|
|
1520
|
+
className: "mt-2 w-full rounded-lg border object-cover"
|
|
1521
|
+
}
|
|
1522
|
+
) : null
|
|
1523
|
+
] })
|
|
1524
|
+
] }, m)) }) }),
|
|
1525
|
+
l ? /* @__PURE__ */ a("div", { className: "border-t pt-4", children: l }) : null
|
|
1526
|
+
]
|
|
1527
|
+
}
|
|
1528
|
+
) });
|
|
1529
|
+
}
|
|
1530
|
+
const Wr = n.forwardRef(function({ children: t = "Guide", className: r, ...o }, s) {
|
|
1531
|
+
return /* @__PURE__ */ u(H, { ref: s, type: "button", variant: "ghost", size: "sm", className: r, ...o, children: [
|
|
1532
|
+
/* @__PURE__ */ a(Qe, { className: "h-4 w-4", "aria-hidden": !0 }),
|
|
1533
|
+
t
|
|
1534
|
+
] });
|
|
1535
|
+
});
|
|
1536
|
+
function te(e, t) {
|
|
1537
|
+
if (typeof window > "u") return t;
|
|
1538
|
+
try {
|
|
1539
|
+
const r = window.localStorage.getItem(e);
|
|
1540
|
+
if (!r) return t;
|
|
1541
|
+
const o = JSON.parse(r);
|
|
1542
|
+
if (Array.isArray(o) && o.every((s) => typeof s == "string"))
|
|
1543
|
+
return o;
|
|
1544
|
+
} catch {
|
|
1545
|
+
}
|
|
1546
|
+
return t;
|
|
1547
|
+
}
|
|
1548
|
+
function Zr(e, t, r = []) {
|
|
1549
|
+
const o = n.useRef(r);
|
|
1550
|
+
o.current = r;
|
|
1551
|
+
const [s, l] = n.useState(
|
|
1552
|
+
() => te(e, r)
|
|
1553
|
+
);
|
|
1554
|
+
n.useEffect(() => {
|
|
1555
|
+
l(te(e, o.current));
|
|
1556
|
+
}, [e]);
|
|
1557
|
+
const d = n.useCallback(
|
|
1558
|
+
(p) => !s.includes(p),
|
|
1559
|
+
[s]
|
|
1560
|
+
), c = n.useCallback(
|
|
1561
|
+
(p) => {
|
|
1562
|
+
l((v) => {
|
|
1563
|
+
const S = v.includes(p) ? v.filter((R) => R !== p) : [...v, p];
|
|
1564
|
+
try {
|
|
1565
|
+
window.localStorage.setItem(e, JSON.stringify(S));
|
|
1566
|
+
} catch {
|
|
1567
|
+
}
|
|
1568
|
+
return S;
|
|
1569
|
+
});
|
|
1570
|
+
},
|
|
1571
|
+
[e]
|
|
1572
|
+
), m = n.useCallback(() => {
|
|
1573
|
+
l(o.current);
|
|
1574
|
+
try {
|
|
1575
|
+
window.localStorage.removeItem(e);
|
|
1576
|
+
} catch {
|
|
1577
|
+
}
|
|
1578
|
+
}, [e]);
|
|
1579
|
+
return { visibleKeys: n.useMemo(
|
|
1580
|
+
() => t.map((p) => p.key).filter((p) => !s.includes(p)),
|
|
1581
|
+
[t, s]
|
|
1582
|
+
), isVisible: d, toggle: c, reset: m };
|
|
1583
|
+
}
|
|
1584
|
+
function ea({
|
|
1585
|
+
columns: e,
|
|
1586
|
+
hook: t,
|
|
1587
|
+
label: r = "Configure columns",
|
|
1588
|
+
menuLabel: o = "Columns",
|
|
1589
|
+
resetLabel: s = "Reset columns",
|
|
1590
|
+
className: l
|
|
1591
|
+
}) {
|
|
1592
|
+
return /* @__PURE__ */ u(Lt, { children: [
|
|
1593
|
+
/* @__PURE__ */ a(jt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
1594
|
+
H,
|
|
1595
|
+
{
|
|
1596
|
+
type: "button",
|
|
1597
|
+
variant: "ghost",
|
|
1598
|
+
size: "icon",
|
|
1599
|
+
"aria-label": r,
|
|
1600
|
+
className: i("shrink-0", l),
|
|
1601
|
+
children: /* @__PURE__ */ a(Je, { className: "h-4 w-4", "aria-hidden": !0 })
|
|
1602
|
+
}
|
|
1603
|
+
) }),
|
|
1604
|
+
/* @__PURE__ */ u(xe, { align: "end", className: "w-52", children: [
|
|
1605
|
+
/* @__PURE__ */ a(Ne, { children: o }),
|
|
1606
|
+
/* @__PURE__ */ a(F, {}),
|
|
1607
|
+
e.map((d) => /* @__PURE__ */ a(
|
|
1608
|
+
ye,
|
|
1609
|
+
{
|
|
1610
|
+
checked: t.isVisible(d.key),
|
|
1611
|
+
onCheckedChange: () => t.toggle(d.key),
|
|
1612
|
+
onSelect: (c) => c.preventDefault(),
|
|
1613
|
+
children: d.label
|
|
1614
|
+
},
|
|
1615
|
+
d.key
|
|
1616
|
+
)),
|
|
1617
|
+
/* @__PURE__ */ a(F, {}),
|
|
1618
|
+
/* @__PURE__ */ u(we, { onSelect: () => t.reset(), children: [
|
|
1619
|
+
/* @__PURE__ */ a(We, { className: "mr-2 h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
1620
|
+
s
|
|
1621
|
+
] })
|
|
1622
|
+
] })
|
|
1623
|
+
] });
|
|
1624
|
+
}
|
|
1625
|
+
const lr = 1, dr = 1e3, cr = 5e3;
|
|
1626
|
+
let U = 0;
|
|
1627
|
+
function ur() {
|
|
1628
|
+
return U = (U + 1) % Number.MAX_SAFE_INTEGER, U.toString();
|
|
1629
|
+
}
|
|
1630
|
+
const G = /* @__PURE__ */ new Map(), re = (e) => {
|
|
1631
|
+
if (G.has(e))
|
|
1632
|
+
return;
|
|
1633
|
+
const t = setTimeout(() => {
|
|
1634
|
+
G.delete(e), V({
|
|
1635
|
+
type: "REMOVE_TOAST",
|
|
1636
|
+
toastId: e
|
|
1637
|
+
});
|
|
1638
|
+
}, dr);
|
|
1639
|
+
G.set(e, t);
|
|
1640
|
+
}, mr = (e, t) => {
|
|
1641
|
+
switch (t.type) {
|
|
1642
|
+
case "ADD_TOAST":
|
|
1643
|
+
return {
|
|
1644
|
+
...e,
|
|
1645
|
+
toasts: [t.toast, ...e.toasts].slice(0, lr)
|
|
1646
|
+
};
|
|
1647
|
+
case "UPDATE_TOAST":
|
|
1648
|
+
return {
|
|
1649
|
+
...e,
|
|
1650
|
+
toasts: e.toasts.map(
|
|
1651
|
+
(r) => r.id === t.toast.id ? { ...r, ...t.toast } : r
|
|
1652
|
+
)
|
|
1653
|
+
};
|
|
1654
|
+
case "DISMISS_TOAST": {
|
|
1655
|
+
const { toastId: r } = t;
|
|
1656
|
+
return r ? re(r) : e.toasts.forEach((o) => {
|
|
1657
|
+
re(o.id);
|
|
1658
|
+
}), {
|
|
1659
|
+
...e,
|
|
1660
|
+
toasts: e.toasts.map(
|
|
1661
|
+
(o) => o.id === r || r === void 0 ? {
|
|
1662
|
+
...o,
|
|
1663
|
+
open: !1
|
|
1664
|
+
} : o
|
|
1665
|
+
)
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
case "REMOVE_TOAST":
|
|
1669
|
+
return t.toastId === void 0 ? {
|
|
1670
|
+
...e,
|
|
1671
|
+
toasts: []
|
|
1672
|
+
} : {
|
|
1673
|
+
...e,
|
|
1674
|
+
toasts: e.toasts.filter((r) => r.id !== t.toastId)
|
|
1675
|
+
};
|
|
1676
|
+
}
|
|
1677
|
+
}, j = [];
|
|
1678
|
+
let B = { toasts: [] };
|
|
1679
|
+
function V(e) {
|
|
1680
|
+
B = mr(B, e), j.forEach((t) => {
|
|
1681
|
+
t(B);
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
function fr({ duration: e = cr, ...t }) {
|
|
1685
|
+
const r = ur(), o = (l) => V({
|
|
1686
|
+
type: "UPDATE_TOAST",
|
|
1687
|
+
toast: { ...l, id: r }
|
|
1688
|
+
}), s = () => V({ type: "DISMISS_TOAST", toastId: r });
|
|
1689
|
+
return e > 0 && setTimeout(() => {
|
|
1690
|
+
s();
|
|
1691
|
+
}, e), V({
|
|
1692
|
+
type: "ADD_TOAST",
|
|
1693
|
+
toast: {
|
|
1694
|
+
...t,
|
|
1695
|
+
id: r,
|
|
1696
|
+
duration: e,
|
|
1697
|
+
open: !0,
|
|
1698
|
+
onOpenChange: (l) => {
|
|
1699
|
+
l || s();
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
}), {
|
|
1703
|
+
id: r,
|
|
1704
|
+
dismiss: s,
|
|
1705
|
+
update: o
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
function pr() {
|
|
1709
|
+
const [e, t] = n.useState(B);
|
|
1710
|
+
return n.useEffect(() => (j.push(t), () => {
|
|
1711
|
+
const r = j.indexOf(t);
|
|
1712
|
+
r > -1 && j.splice(r, 1);
|
|
1713
|
+
}), [e]), {
|
|
1714
|
+
...e,
|
|
1715
|
+
toast: fr,
|
|
1716
|
+
dismiss: (r) => V({ type: "DISMISS_TOAST", toastId: r })
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
const gr = N.Provider, Te = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1720
|
+
N.Viewport,
|
|
1721
|
+
{
|
|
1722
|
+
ref: r,
|
|
1723
|
+
className: i(
|
|
1724
|
+
`fixed top-4 left-1/2 transform -translate-x-1/2 ${O.TOAST} flex max-h-screen w-[calc(100vw-2rem)] max-w-sm flex-col gap-2 p-0`,
|
|
1725
|
+
"sm:top-auto sm:bottom-4 sm:left-auto sm:right-4 sm:transform-none sm:translate-x-0 sm:w-full sm:max-w-[420px] sm:flex-col",
|
|
1726
|
+
e
|
|
1727
|
+
),
|
|
1728
|
+
...t
|
|
1729
|
+
}
|
|
1730
|
+
));
|
|
1731
|
+
Te.displayName = N.Viewport.displayName;
|
|
1732
|
+
const hr = I(
|
|
1733
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-3 overflow-hidden rounded-lg border 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 p-3 pr-5 sm:p-4 sm:pr-6 sm:space-x-4",
|
|
1734
|
+
{
|
|
1735
|
+
variants: {
|
|
1736
|
+
variant: {
|
|
1737
|
+
default: "border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 text-foreground",
|
|
1738
|
+
destructive: "destructive group border-destructive/50 bg-destructive/95 backdrop-blur supports-[backdrop-filter]:bg-destructive/60 text-destructive-foreground",
|
|
1739
|
+
success: "success group border-green-500/50 bg-green-500/95 backdrop-blur supports-[backdrop-filter]:bg-green-500/60 text-green-50 dark:border-green-600/50 dark:bg-green-600/95 dark:supports-[backdrop-filter]:bg-green-600/60 dark:text-green-50"
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
defaultVariants: {
|
|
1743
|
+
variant: "default"
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
), Se = n.forwardRef(({ className: e, variant: t, ...r }, o) => /* @__PURE__ */ a(
|
|
1747
|
+
N.Root,
|
|
1748
|
+
{
|
|
1749
|
+
ref: o,
|
|
1750
|
+
className: i(hr({ variant: t }), e),
|
|
1751
|
+
...r
|
|
1752
|
+
}
|
|
1753
|
+
));
|
|
1754
|
+
Se.displayName = N.Root.displayName;
|
|
1755
|
+
const br = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1756
|
+
N.Action,
|
|
1757
|
+
{
|
|
1758
|
+
ref: r,
|
|
1759
|
+
className: i(
|
|
1760
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
1761
|
+
e
|
|
1762
|
+
),
|
|
1763
|
+
...t
|
|
1764
|
+
}
|
|
1765
|
+
));
|
|
1766
|
+
br.displayName = N.Action.displayName;
|
|
1767
|
+
const Re = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1768
|
+
N.Close,
|
|
1769
|
+
{
|
|
1770
|
+
ref: r,
|
|
1771
|
+
className: i(
|
|
1772
|
+
"absolute right-1.5 top-1.5 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus-visible:ring-ring group-[.destructive]:focus:ring-offset-red-600 sm:right-2 sm:top-2",
|
|
1773
|
+
e
|
|
1774
|
+
),
|
|
1775
|
+
"toast-close": "",
|
|
1776
|
+
...t,
|
|
1777
|
+
children: /* @__PURE__ */ a(X, { className: "h-3.5 w-3.5 sm:h-4 sm:w-4" })
|
|
1778
|
+
}
|
|
1779
|
+
));
|
|
1780
|
+
Re.displayName = N.Close.displayName;
|
|
1781
|
+
const De = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1782
|
+
N.Title,
|
|
1783
|
+
{
|
|
1784
|
+
ref: r,
|
|
1785
|
+
className: i("text-sm font-semibold leading-tight [&+div]:text-xs sm:text-sm", e),
|
|
1786
|
+
...t
|
|
1787
|
+
}
|
|
1788
|
+
));
|
|
1789
|
+
De.displayName = N.Title.displayName;
|
|
1790
|
+
const Ae = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1791
|
+
N.Description,
|
|
1792
|
+
{
|
|
1793
|
+
ref: r,
|
|
1794
|
+
className: i("text-xs opacity-90 mt-0.5 leading-relaxed sm:text-sm", e),
|
|
1795
|
+
...t
|
|
1796
|
+
}
|
|
1797
|
+
));
|
|
1798
|
+
Ae.displayName = N.Description.displayName;
|
|
1799
|
+
const Ie = n.forwardRef(({ duration: e, variant: t = "default", onComplete: r }, o) => {
|
|
1800
|
+
const s = n.useRef(null), l = n.useRef(null), d = n.useRef();
|
|
1801
|
+
n.useEffect(() => {
|
|
1802
|
+
const m = () => {
|
|
1803
|
+
l.current && (window.matchMedia("(min-width: 640px)").matches ? (l.current.style.marginLeft = "-1rem", l.current.style.marginRight = "-1.5rem", l.current.style.width = "calc(100% + 1rem + 1.5rem)") : (l.current.style.marginLeft = "-0.75rem", l.current.style.marginRight = "-1.25rem", l.current.style.width = "calc(100% + 0.75rem + 1.25rem)"));
|
|
1804
|
+
};
|
|
1805
|
+
m();
|
|
1806
|
+
const h = window.matchMedia("(min-width: 640px)");
|
|
1807
|
+
return h.addEventListener("change", m), () => {
|
|
1808
|
+
h.removeEventListener("change", m);
|
|
1809
|
+
};
|
|
1810
|
+
}, []), n.useEffect(() => (s.current && (s.current.style.width = "100%", s.current.style.transformOrigin = "right center", requestAnimationFrame(() => {
|
|
1811
|
+
s.current && (s.current.style.width = "0%", s.current.style.transition = `width ${e}ms linear`);
|
|
1812
|
+
})), d.current = setTimeout(() => {
|
|
1813
|
+
r?.();
|
|
1814
|
+
}, e), () => {
|
|
1815
|
+
d.current && clearTimeout(d.current);
|
|
1816
|
+
}), [e, r]);
|
|
1817
|
+
const c = n.useMemo(() => {
|
|
1818
|
+
switch (t) {
|
|
1819
|
+
case "destructive":
|
|
1820
|
+
return "bg-destructive";
|
|
1821
|
+
case "success":
|
|
1822
|
+
return "bg-green-500 dark:bg-green-600";
|
|
1823
|
+
default:
|
|
1824
|
+
return "bg-primary";
|
|
1825
|
+
}
|
|
1826
|
+
}, [t]);
|
|
1827
|
+
return /* @__PURE__ */ a(
|
|
1828
|
+
"div",
|
|
1829
|
+
{
|
|
1830
|
+
ref: (m) => {
|
|
1831
|
+
l.current = m, typeof o == "function" ? o(m) : o && (o.current = m);
|
|
1832
|
+
},
|
|
1833
|
+
className: "absolute bottom-0 left-0 right-0 h-1 bg-black/10 dark:bg-white/10 overflow-hidden rounded-b-lg",
|
|
1834
|
+
children: /* @__PURE__ */ a(
|
|
1835
|
+
"div",
|
|
1836
|
+
{
|
|
1837
|
+
ref: s,
|
|
1838
|
+
className: i(
|
|
1839
|
+
"h-full absolute right-0",
|
|
1840
|
+
c
|
|
1841
|
+
),
|
|
1842
|
+
style: {
|
|
1843
|
+
width: "100%"
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
)
|
|
1847
|
+
}
|
|
1848
|
+
);
|
|
1849
|
+
});
|
|
1850
|
+
Ie.displayName = "ToastProgressBar";
|
|
1851
|
+
function ta() {
|
|
1852
|
+
const { toasts: e, dismiss: t } = pr();
|
|
1853
|
+
return /* @__PURE__ */ u(gr, { children: [
|
|
1854
|
+
e.map(function({ id: r, title: o, description: s, action: l, duration: d, variant: c, ...m }) {
|
|
1855
|
+
const h = c ?? void 0;
|
|
1856
|
+
return /* @__PURE__ */ u(Se, { variant: h, ...m, children: [
|
|
1857
|
+
/* @__PURE__ */ u("div", { className: "grid gap-1", children: [
|
|
1858
|
+
o && /* @__PURE__ */ a(De, { children: o }),
|
|
1859
|
+
s && /* @__PURE__ */ a(Ae, { children: s })
|
|
1860
|
+
] }),
|
|
1861
|
+
l,
|
|
1862
|
+
/* @__PURE__ */ a(Re, {}),
|
|
1863
|
+
d && d > 0 && /* @__PURE__ */ a(
|
|
1864
|
+
Ie,
|
|
1865
|
+
{
|
|
1866
|
+
duration: d,
|
|
1867
|
+
variant: h,
|
|
1868
|
+
onComplete: () => {
|
|
1869
|
+
t(r);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
)
|
|
1873
|
+
] }, r);
|
|
1874
|
+
}),
|
|
1875
|
+
/* @__PURE__ */ a(Te, {})
|
|
1876
|
+
] });
|
|
1877
|
+
}
|
|
1878
|
+
function ra({ title: e, description: t, children: r, className: o }) {
|
|
1879
|
+
return /* @__PURE__ */ u("section", { className: i("space-y-3 rounded-xl border border-border bg-card p-4 shadow-sm", o), children: [
|
|
1880
|
+
/* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
1881
|
+
/* @__PURE__ */ a("h3", { className: "text-sm font-semibold leading-none tracking-tight text-foreground", children: e }),
|
|
1882
|
+
t ? /* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: t }) : null
|
|
1883
|
+
] }),
|
|
1884
|
+
/* @__PURE__ */ a("div", { className: "space-y-3", children: r })
|
|
1885
|
+
] });
|
|
1886
|
+
}
|
|
1887
|
+
const vr = 640;
|
|
1888
|
+
function aa(e = vr) {
|
|
1889
|
+
const [t, r] = Ge(!1);
|
|
1890
|
+
return $e(() => {
|
|
1891
|
+
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
1892
|
+
const o = window.matchMedia(`(max-width: ${e - 0.02}px)`), s = () => r(o.matches);
|
|
1893
|
+
return s(), o.addEventListener("change", s), () => o.removeEventListener("change", s);
|
|
1894
|
+
}, [e]), t;
|
|
1895
|
+
}
|
|
1896
|
+
export {
|
|
1897
|
+
Ar as AiDraftBanner,
|
|
1898
|
+
mt as Alert,
|
|
1899
|
+
pt as AlertDescription,
|
|
1900
|
+
Qt as AlertDialog,
|
|
1901
|
+
Hr as AlertProvider,
|
|
1902
|
+
ft as AlertTitle,
|
|
1903
|
+
sa as AppCheckboxInput,
|
|
1904
|
+
ia as AppConfirmDialog,
|
|
1905
|
+
la as AppDashboardSkeleton,
|
|
1906
|
+
_e as AppDatePicker,
|
|
1907
|
+
da as AppDateRangePicker,
|
|
1908
|
+
ca as AppDateTimePicker,
|
|
1909
|
+
ua as AppHelpSheet,
|
|
1910
|
+
ma as AppModal,
|
|
1911
|
+
fo as AppPage,
|
|
1912
|
+
fa as AppPageStates,
|
|
1913
|
+
pa as AppSelectInput,
|
|
1914
|
+
ga as AppSidebar,
|
|
1915
|
+
ha as AppTemporalInput,
|
|
1916
|
+
ba as AppTimePicker,
|
|
1917
|
+
Rr as Badge,
|
|
1918
|
+
va as BaseModal,
|
|
1919
|
+
H as Button,
|
|
1920
|
+
xa as Calendar,
|
|
1921
|
+
me as Card,
|
|
1922
|
+
fe as CardContent,
|
|
1923
|
+
tt as CardDescription,
|
|
1924
|
+
rt as CardFooter,
|
|
1925
|
+
Ze as CardHeader,
|
|
1926
|
+
et as CardTitle,
|
|
1927
|
+
Kr as ChartContainer,
|
|
1928
|
+
Qr as ChartLegend,
|
|
1929
|
+
Yr as ChartTooltip,
|
|
1930
|
+
qr as ChartTooltipContent,
|
|
1931
|
+
Z as Checkbox,
|
|
1932
|
+
Mr as Collapsible,
|
|
1933
|
+
_r as CollapsibleContent,
|
|
1934
|
+
Pr as CollapsibleTrigger,
|
|
1935
|
+
ea as ColumnConfigMenu,
|
|
1936
|
+
wa as ConfigEditorSkeleton,
|
|
1937
|
+
ya as ConfirmModal,
|
|
1938
|
+
Fr as DatePicker,
|
|
1939
|
+
Na as DetailTabsSkeleton,
|
|
1940
|
+
ka as Dialog,
|
|
1941
|
+
Ca as DialogClose,
|
|
1942
|
+
Ta as DialogContent,
|
|
1943
|
+
Sa as DialogDescription,
|
|
1944
|
+
Ra as DialogFooter,
|
|
1945
|
+
Da as DialogHeader,
|
|
1946
|
+
Aa as DialogOverlay,
|
|
1947
|
+
Ia as DialogPortal,
|
|
1948
|
+
Or as DialogSafeSelect,
|
|
1949
|
+
_t as DialogSafeSelectContent,
|
|
1950
|
+
Er as DialogSafeSelectGroup,
|
|
1951
|
+
Et as DialogSafeSelectItem,
|
|
1952
|
+
Ot as DialogSafeSelectLabel,
|
|
1953
|
+
ve as DialogSafeSelectScrollDownButton,
|
|
1954
|
+
be as DialogSafeSelectScrollUpButton,
|
|
1955
|
+
Vt as DialogSafeSelectSeparator,
|
|
1956
|
+
Pt as DialogSafeSelectTrigger,
|
|
1957
|
+
Vr as DialogSafeSelectValue,
|
|
1958
|
+
Ma as DialogTitle,
|
|
1959
|
+
Pa as DialogTrigger,
|
|
1960
|
+
Lt as DropdownMenu,
|
|
1961
|
+
ye as DropdownMenuCheckboxItem,
|
|
1962
|
+
xe as DropdownMenuContent,
|
|
1963
|
+
Lr as DropdownMenuGroup,
|
|
1964
|
+
we as DropdownMenuItem,
|
|
1965
|
+
Ne as DropdownMenuLabel,
|
|
1966
|
+
jr as DropdownMenuPortal,
|
|
1967
|
+
zr as DropdownMenuRadioGroup,
|
|
1968
|
+
Ut as DropdownMenuRadioItem,
|
|
1969
|
+
F as DropdownMenuSeparator,
|
|
1970
|
+
Gt as DropdownMenuShortcut,
|
|
1971
|
+
Br as DropdownMenuSub,
|
|
1972
|
+
zt as DropdownMenuSubContent,
|
|
1973
|
+
Bt as DropdownMenuSubTrigger,
|
|
1974
|
+
jt as DropdownMenuTrigger,
|
|
1975
|
+
Jr as FeatureGuide,
|
|
1976
|
+
Wr as FeatureGuideTrigger,
|
|
1977
|
+
_a as FormModal,
|
|
1978
|
+
Oa as FormPageSkeleton,
|
|
1979
|
+
ra as FormSection,
|
|
1980
|
+
Ea as GridCardsSkeleton,
|
|
1981
|
+
Dr as HelpTip,
|
|
1982
|
+
vt as HintNotice,
|
|
1983
|
+
Va as Input,
|
|
1984
|
+
nt as Label,
|
|
1985
|
+
La as ListModal,
|
|
1986
|
+
vr as MOBILE_BREAKPOINT,
|
|
1987
|
+
$t as MultiSelect,
|
|
1988
|
+
ja as PageLoadingSkeleton,
|
|
1989
|
+
ae as Popover,
|
|
1990
|
+
Ba as PopoverAnchor,
|
|
1991
|
+
ne as PopoverContent,
|
|
1992
|
+
oe as PopoverTrigger,
|
|
1993
|
+
dt as Progress,
|
|
1994
|
+
za as QueryErrorAlert,
|
|
1995
|
+
Ht as RadioGroup,
|
|
1996
|
+
Xt as RadioGroupItem,
|
|
1997
|
+
Mt as ScrollArea,
|
|
1998
|
+
he as ScrollBar,
|
|
1999
|
+
Ua as Select,
|
|
2000
|
+
Ga as SelectContent,
|
|
2001
|
+
$a as SelectGroup,
|
|
2002
|
+
Fa as SelectItem,
|
|
2003
|
+
Ha as SelectLabel,
|
|
2004
|
+
Xa as SelectScrollDownButton,
|
|
2005
|
+
Ka as SelectScrollUpButton,
|
|
2006
|
+
Ya as SelectSeparator,
|
|
2007
|
+
qa as SelectTrigger,
|
|
2008
|
+
Qa as SelectValue,
|
|
2009
|
+
ct as Separator,
|
|
2010
|
+
Ee as Sheet,
|
|
2011
|
+
Ja as SheetClose,
|
|
2012
|
+
Ve as SheetContent,
|
|
2013
|
+
Be as SheetDescription,
|
|
2014
|
+
Wa as SheetFooter,
|
|
2015
|
+
Le as SheetHeader,
|
|
2016
|
+
je as SheetTitle,
|
|
2017
|
+
Za as SheetTrigger,
|
|
2018
|
+
eo as Skeleton,
|
|
2019
|
+
lt as Slider,
|
|
2020
|
+
to as StatsRowSkeleton,
|
|
2021
|
+
it as Switch,
|
|
2022
|
+
Wt as Table,
|
|
2023
|
+
er as TableBody,
|
|
2024
|
+
nr as TableCaption,
|
|
2025
|
+
or as TableCell,
|
|
2026
|
+
tr as TableFooter,
|
|
2027
|
+
ar as TableHead,
|
|
2028
|
+
Zt as TableHeader,
|
|
2029
|
+
ro as TablePageSkeleton,
|
|
2030
|
+
rr as TableRow,
|
|
2031
|
+
wt as Tabs,
|
|
2032
|
+
kt as TabsContent,
|
|
2033
|
+
yt as TabsList,
|
|
2034
|
+
Nt as TabsTrigger,
|
|
2035
|
+
st as Textarea,
|
|
2036
|
+
ta as Toaster,
|
|
2037
|
+
Dt as Toggle,
|
|
2038
|
+
At as ToggleGroup,
|
|
2039
|
+
It as ToggleGroupItem,
|
|
2040
|
+
Gr as Tooltip,
|
|
2041
|
+
Ft as TooltipContent,
|
|
2042
|
+
Ur as TooltipProvider,
|
|
2043
|
+
$r as TooltipTrigger,
|
|
2044
|
+
Ir as UnderlineTabs,
|
|
2045
|
+
Rt as UnderlineTabsContent,
|
|
2046
|
+
Ct as UnderlineTabsList,
|
|
2047
|
+
St as UnderlineTabsTrigger,
|
|
2048
|
+
ao as UserDisplay,
|
|
2049
|
+
oo as UserSelect,
|
|
2050
|
+
at as badgeVariants,
|
|
2051
|
+
no as buttonVariants,
|
|
2052
|
+
go as cn,
|
|
2053
|
+
so as formatBusinessDateValue,
|
|
2054
|
+
io as isTemporalInputType,
|
|
2055
|
+
lo as parseBusinessDate,
|
|
2056
|
+
co as temporalLabels,
|
|
2057
|
+
fr as toast,
|
|
2058
|
+
pe as toggleVariants,
|
|
2059
|
+
Tt as underlineTabsTriggerVariants,
|
|
2060
|
+
Jt as useAlert,
|
|
2061
|
+
Xr as useAlertDialog,
|
|
2062
|
+
Zr as useColumnConfig,
|
|
2063
|
+
aa as useIsMobile,
|
|
2064
|
+
pr as useToast,
|
|
2065
|
+
uo as useUserDirectory
|
|
2066
|
+
};
|
|
2067
|
+
//# sourceMappingURL=kit.js.map
|