@vuer-ai/vuer-uikit 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2JCULHBM.js +58 -0
- package/dist/chunk-2TRYGIGT.mjs +76 -0
- package/dist/chunk-2YCL2ET2.js +431 -0
- package/dist/chunk-3FR3WKI4.mjs +24 -0
- package/dist/chunk-44KW6PTD.mjs +111 -0
- package/dist/chunk-5OUTEHVX.js +48 -0
- package/dist/chunk-5SR53QBZ.js +143 -0
- package/dist/chunk-5TVG5JK5.js +93 -0
- package/dist/chunk-5ZZC23M7.mjs +60 -0
- package/dist/chunk-6N5422RT.js +110 -0
- package/dist/chunk-AOUGWGQR.js +609 -0
- package/dist/chunk-B2E7AY66.mjs +86 -0
- package/dist/chunk-BOPZFNFS.mjs +54 -0
- package/dist/chunk-CLTLT5XW.js +27 -0
- package/dist/chunk-DDOX4EEM.mjs +46 -0
- package/dist/chunk-DZ4J7I7I.mjs +114 -0
- package/dist/chunk-E33MW663.js +179 -0
- package/dist/chunk-EAZQH4IX.mjs +27 -0
- package/dist/chunk-EFIRD3FN.js +69 -0
- package/dist/chunk-EOFYA6CS.js +53 -0
- package/dist/chunk-EUY74AXP.mjs +341 -0
- package/dist/chunk-EYIFKSU2.mjs +259 -0
- package/dist/chunk-F56ZKT7B.mjs +1 -0
- package/dist/chunk-F776EMXP.mjs +82 -0
- package/dist/chunk-FORVP7XH.js +164 -0
- package/dist/chunk-FP26SRGL.js +377 -0
- package/dist/chunk-FRT225GK.mjs +34 -0
- package/dist/chunk-G5KMD72J.mjs +162 -0
- package/dist/chunk-G6PRZVSE.mjs +71 -0
- package/dist/chunk-H5P4IX7R.js +67 -0
- package/dist/chunk-HLJ7PQA7.mjs +15 -0
- package/dist/chunk-IGBWUFZL.js +79 -0
- package/dist/chunk-IXHMIR5P.js +131 -0
- package/dist/chunk-JAMJUXBY.mjs +45 -0
- package/dist/chunk-JMPVDU2C.mjs +110 -0
- package/dist/chunk-KJ42IGH6.js +2 -0
- package/dist/chunk-KTNZSZ5Y.mjs +23 -0
- package/dist/chunk-LEPXSM36.mjs +46 -0
- package/dist/chunk-LLXRJYQB.mjs +31 -0
- package/dist/chunk-M4IVLZIH.mjs +1 -0
- package/dist/chunk-MRVMXKZO.mjs +106 -0
- package/dist/chunk-MZ4POL3U.js +301 -0
- package/dist/chunk-N7CINZS2.js +2 -0
- package/dist/chunk-NODFVSVC.mjs +39 -0
- package/dist/chunk-OOI3SJDU.mjs +206 -0
- package/dist/chunk-OQ237S4Z.js +94 -0
- package/dist/chunk-OTPUWWEB.js +98 -0
- package/dist/chunk-PIR7EZC6.js +187 -0
- package/dist/chunk-PVRQNCSJ.js +49 -0
- package/dist/chunk-Q5KEB4UK.mjs +51 -0
- package/dist/chunk-QEY7BWIR.js +208 -0
- package/dist/chunk-QJR6MCTR.js +32 -0
- package/dist/chunk-QVUX6LLD.mjs +270 -0
- package/dist/chunk-QYRRQ65X.mjs +115 -0
- package/dist/chunk-SKO72K64.js +118 -0
- package/dist/chunk-T3VSSE2L.mjs +165 -0
- package/dist/chunk-TMBKCIVQ.mjs +148 -0
- package/dist/chunk-U2ZLDPOE.js +261 -0
- package/dist/chunk-U7SNLMJR.js +110 -0
- package/dist/chunk-UFHMEEGL.js +113 -0
- package/dist/chunk-UKFVRXAR.mjs +409 -0
- package/dist/chunk-UPTTGNMB.js +41 -0
- package/dist/chunk-V4KNORQN.js +21 -0
- package/dist/chunk-VAXIFFOT.js +83 -0
- package/dist/chunk-VGCVIHBR.mjs +1 -0
- package/dist/chunk-VXHM7V6F.mjs +92 -0
- package/dist/chunk-WDUTW7HS.mjs +87 -0
- package/dist/chunk-WJ7T7FAH.js +135 -0
- package/dist/chunk-WO3WHXDP.mjs +66 -0
- package/dist/chunk-X55EAYE2.js +94 -0
- package/dist/chunk-XMG3IVGZ.mjs +95 -0
- package/dist/chunk-XWS4SIB5.js +2 -0
- package/dist/chunk-XXWQ4RVP.js +25 -0
- package/dist/chunk-Y5I2GI4V.js +33 -0
- package/dist/chunk-YXDJPCAF.js +99 -0
- package/dist/chunk-ZVG2UKKC.mjs +603 -0
- package/dist/highlight-cursor/cursor-context.d.mts +7 -0
- package/dist/highlight-cursor/cursor-context.d.ts +7 -0
- package/dist/highlight-cursor/cursor-context.js +14 -0
- package/dist/highlight-cursor/cursor-context.mjs +1 -0
- package/dist/highlight-cursor/cursor-provider.d.mts +7 -0
- package/dist/highlight-cursor/cursor-provider.d.ts +7 -0
- package/dist/highlight-cursor/cursor-provider.js +12 -0
- package/dist/highlight-cursor/cursor-provider.mjs +3 -0
- package/dist/highlight-cursor/enhanced-components.d.mts +20 -0
- package/dist/highlight-cursor/enhanced-components.d.ts +20 -0
- package/dist/highlight-cursor/enhanced-components.js +37 -0
- package/dist/highlight-cursor/enhanced-components.mjs +12 -0
- package/dist/highlight-cursor/index.d.mts +16 -0
- package/dist/highlight-cursor/index.d.ts +16 -0
- package/dist/highlight-cursor/index.js +51 -0
- package/dist/highlight-cursor/index.mjs +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.mts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.ts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.js +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.mjs +1 -0
- package/dist/highlight-cursor/types.d.mts +39 -0
- package/dist/highlight-cursor/types.d.ts +39 -0
- package/dist/highlight-cursor/types.js +2 -0
- package/dist/highlight-cursor/types.mjs +1 -0
- package/dist/highlight-cursor/with-cursor.d.mts +7 -0
- package/dist/highlight-cursor/with-cursor.d.ts +7 -0
- package/dist/highlight-cursor/with-cursor.js +11 -0
- package/dist/highlight-cursor/with-cursor.mjs +2 -0
- package/dist/index.css +318 -0
- package/dist/index.d.mts +55 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +131 -131
- package/dist/index.mjs +38 -0
- package/dist/styles/theme.css +192 -0
- package/dist/styles/theme.d.mts +2 -0
- package/dist/styles/theme.d.ts +2 -0
- package/dist/styles/toast.css +61 -0
- package/dist/styles/toast.d.mts +2 -0
- package/dist/styles/toast.d.ts +2 -0
- package/dist/styles/variables.css +188 -0
- package/dist/styles/variables.d.mts +2 -0
- package/dist/styles/variables.d.ts +2 -0
- package/dist/ui/avatar.d.mts +16 -0
- package/dist/ui/avatar.d.ts +16 -0
- package/dist/ui/avatar.js +25 -0
- package/dist/ui/avatar.mjs +4 -0
- package/dist/ui/badge.d.mts +14 -0
- package/dist/ui/badge.d.ts +14 -0
- package/dist/ui/badge.js +17 -0
- package/dist/ui/badge.mjs +4 -0
- package/dist/ui/button.d.mts +16 -0
- package/dist/ui/button.d.ts +16 -0
- package/dist/ui/button.js +13 -0
- package/dist/ui/button.mjs +4 -0
- package/dist/ui/card.d.mts +12 -0
- package/dist/ui/card.d.ts +12 -0
- package/dist/ui/card.js +37 -0
- package/dist/ui/card.mjs +4 -0
- package/dist/ui/checkbox.d.mts +11 -0
- package/dist/ui/checkbox.d.ts +11 -0
- package/dist/ui/checkbox.js +13 -0
- package/dist/ui/checkbox.mjs +4 -0
- package/dist/ui/collapsible.d.mts +9 -0
- package/dist/ui/collapsible.d.ts +9 -0
- package/dist/ui/collapsible.js +21 -0
- package/dist/ui/collapsible.mjs +4 -0
- package/dist/ui/dropdown.d.mts +28 -0
- package/dist/ui/dropdown.d.ts +28 -0
- package/dist/ui/dropdown.js +69 -0
- package/dist/ui/dropdown.mjs +4 -0
- package/dist/ui/index.d.mts +47 -0
- package/dist/ui/index.d.ts +47 -0
- package/dist/ui/index.js +414 -0
- package/dist/ui/index.mjs +33 -0
- package/dist/ui/input-numbers.d.mts +15 -0
- package/dist/ui/input-numbers.d.ts +15 -0
- package/dist/ui/input-numbers.js +14 -0
- package/dist/ui/input-numbers.mjs +5 -0
- package/dist/ui/input.d.mts +22 -0
- package/dist/ui/input.d.ts +22 -0
- package/dist/ui/input.js +17 -0
- package/dist/ui/input.mjs +4 -0
- package/dist/ui/layout.d.mts +12 -0
- package/dist/ui/layout.d.ts +12 -0
- package/dist/ui/layout.js +13 -0
- package/dist/ui/layout.mjs +4 -0
- package/dist/ui/modal.d.mts +28 -0
- package/dist/ui/modal.d.ts +28 -0
- package/dist/ui/modal.js +49 -0
- package/dist/ui/modal.mjs +4 -0
- package/dist/ui/popover.d.mts +10 -0
- package/dist/ui/popover.d.ts +10 -0
- package/dist/ui/popover.js +25 -0
- package/dist/ui/popover.mjs +4 -0
- package/dist/ui/radio-group.d.mts +8 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/radio-group.js +17 -0
- package/dist/ui/radio-group.mjs +4 -0
- package/dist/ui/select.d.mts +28 -0
- package/dist/ui/select.d.ts +28 -0
- package/dist/ui/select.js +49 -0
- package/dist/ui/select.mjs +4 -0
- package/dist/ui/sheet.d.mts +16 -0
- package/dist/ui/sheet.d.ts +16 -0
- package/dist/ui/sheet.js +39 -0
- package/dist/ui/sheet.mjs +2 -0
- package/dist/ui/slider.d.mts +10 -0
- package/dist/ui/slider.d.ts +10 -0
- package/dist/ui/slider.js +13 -0
- package/dist/ui/slider.mjs +4 -0
- package/dist/ui/switch.d.mts +7 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/switch.js +13 -0
- package/dist/ui/switch.mjs +4 -0
- package/dist/ui/tabs.d.mts +16 -0
- package/dist/ui/tabs.d.ts +16 -0
- package/dist/ui/tabs.js +26 -0
- package/dist/ui/tabs.mjs +5 -0
- package/dist/ui/textarea.d.mts +16 -0
- package/dist/ui/textarea.d.ts +16 -0
- package/dist/ui/textarea.js +13 -0
- package/dist/ui/textarea.mjs +4 -0
- package/dist/ui/theme-context.d.mts +17 -0
- package/dist/ui/theme-context.d.ts +17 -0
- package/dist/ui/theme-context.js +17 -0
- package/dist/ui/theme-context.mjs +4 -0
- package/dist/ui/timeline.d.mts +23 -0
- package/dist/ui/timeline.d.ts +23 -0
- package/dist/ui/timeline.js +15 -0
- package/dist/ui/timeline.mjs +6 -0
- package/dist/ui/toast.d.mts +7 -0
- package/dist/ui/toast.d.ts +7 -0
- package/dist/ui/toast.js +14 -0
- package/dist/ui/toast.mjs +1 -0
- package/dist/ui/toggle-group.d.mts +12 -0
- package/dist/ui/toggle-group.d.ts +12 -0
- package/dist/ui/toggle-group.js +18 -0
- package/dist/ui/toggle-group.mjs +5 -0
- package/dist/ui/toggle.d.mts +13 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.js +17 -0
- package/dist/ui/toggle.mjs +4 -0
- package/dist/ui/tooltip.d.mts +10 -0
- package/dist/ui/tooltip.d.ts +10 -0
- package/dist/ui/tooltip.js +25 -0
- package/dist/ui/tooltip.mjs +4 -0
- package/dist/ui/tree-view-v2.d.mts +25 -0
- package/dist/ui/tree-view-v2.d.ts +25 -0
- package/dist/ui/tree-view-v2.js +14 -0
- package/dist/ui/tree-view-v2.mjs +5 -0
- package/dist/ui/tree-view.d.mts +28 -0
- package/dist/ui/tree-view.d.ts +28 -0
- package/dist/ui/tree-view.js +11 -0
- package/dist/ui/tree-view.mjs +2 -0
- package/dist/ui/version-badge.d.mts +26 -0
- package/dist/ui/version-badge.d.ts +26 -0
- package/dist/ui/version-badge.js +14 -0
- package/dist/ui/version-badge.mjs +5 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +10 -0
- package/dist/utils/cn.mjs +1 -0
- package/dist/utils/index.d.mts +3 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +16 -0
- package/dist/utils/index.mjs +3 -0
- package/dist/utils/use-local-storage.d.mts +3 -0
- package/dist/utils/use-local-storage.d.ts +3 -0
- package/dist/utils/use-local-storage.js +10 -0
- package/dist/utils/use-local-storage.mjs +1 -0
- package/package.json +3 -2
- package/src/ui/version-badge.tsx +5 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
3
|
+
|
|
4
|
+
// src/utils/cn.ts
|
|
5
|
+
var twMerge = extendTailwindMerge({
|
|
6
|
+
override: {
|
|
7
|
+
classGroups: {
|
|
8
|
+
"font-size": [
|
|
9
|
+
"text-uk-xs",
|
|
10
|
+
"text-uk-sm",
|
|
11
|
+
"text-uk-md",
|
|
12
|
+
"text-uk-lg",
|
|
13
|
+
"text-uk-xl",
|
|
14
|
+
"text-uk-xxl"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
function cn(...inputs) {
|
|
20
|
+
return twMerge(clsx(inputs));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { cn };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useLocalStorage } from './chunk-Q5KEB4UK.mjs';
|
|
2
|
+
import { createContext, useEffect, useMemo, useContext } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var initialState = {
|
|
6
|
+
theme: "system",
|
|
7
|
+
setTheme: () => null
|
|
8
|
+
};
|
|
9
|
+
var ThemeProviderContext = createContext(initialState);
|
|
10
|
+
function ThemeProvider({
|
|
11
|
+
children,
|
|
12
|
+
defaultTheme = "system",
|
|
13
|
+
storageKey = "vuer-theme",
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
const [theme, setTheme] = useLocalStorage(storageKey, defaultTheme);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (typeof window === "undefined") return;
|
|
19
|
+
const root = window.document.documentElement;
|
|
20
|
+
root.classList.remove("light", "dark", "liquidlight", "liquiddark", "system");
|
|
21
|
+
root.removeAttribute("data-theme");
|
|
22
|
+
if (theme === "system") {
|
|
23
|
+
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
24
|
+
root.classList.add(systemTheme);
|
|
25
|
+
root.setAttribute("data-theme", "auto");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
root.classList.add(theme);
|
|
29
|
+
root.setAttribute("data-theme", theme);
|
|
30
|
+
}, [theme]);
|
|
31
|
+
const value = useMemo(
|
|
32
|
+
() => ({
|
|
33
|
+
theme,
|
|
34
|
+
setTheme
|
|
35
|
+
}),
|
|
36
|
+
[theme, setTheme]
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ jsx(ThemeProviderContext.Provider, { ...props, value, children });
|
|
39
|
+
}
|
|
40
|
+
var useTheme = () => {
|
|
41
|
+
const context = useContext(ThemeProviderContext);
|
|
42
|
+
if (context === void 0) throw new Error("useTheme must be used within a ThemeProvider");
|
|
43
|
+
return context;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { ThemeProvider, useTheme };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cn } from './chunk-KTNZSZ5Y.mjs';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Layout({
|
|
6
|
+
asChild,
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
align = "start",
|
|
10
|
+
orientation = "horizontal"
|
|
11
|
+
}) {
|
|
12
|
+
const Com = asChild ? Slot : "div";
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
Com,
|
|
15
|
+
{
|
|
16
|
+
className: cn(
|
|
17
|
+
{
|
|
18
|
+
"gap-xs flex flex-col": orientation === "horizontal",
|
|
19
|
+
"gap-xs grid grid-cols-[1fr_2fr] text-center": orientation === "vertical",
|
|
20
|
+
"items-baseline": align === "start",
|
|
21
|
+
"items-center": align === "center",
|
|
22
|
+
"items-end": align === "end"
|
|
23
|
+
},
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
children
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { Layout };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { cn } from './chunk-KTNZSZ5Y.mjs';
|
|
2
|
+
import { useTabsCursor, TabsCursorProvider } from './chunk-XMG3IVGZ.mjs';
|
|
3
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { createContext, useContext } from 'react';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var TabsContext = createContext(void 0);
|
|
9
|
+
var useTabsContext = () => {
|
|
10
|
+
const context = useContext(TabsContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error("Tabs components must be used within a Tabs component");
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
function Tabs({ className, size = "base", ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx(
|
|
18
|
+
TabsPrimitive.Root,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "tabs",
|
|
21
|
+
className: cn("flex w-full flex-col", className),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
25
|
+
}
|
|
26
|
+
var tabsListVariants = cva(["inline-flex", "items-center", "justify-center"], {
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
sm: "gap-xs",
|
|
30
|
+
base: "gap-sm",
|
|
31
|
+
lg: "gap-md"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
size: "base"
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
function TabsList({ className, ...props }) {
|
|
39
|
+
const { setCursorTarget } = useTabsCursor();
|
|
40
|
+
const { size } = useTabsContext();
|
|
41
|
+
return /* @__PURE__ */ jsx(TabsCursorProvider, { children: /* @__PURE__ */ jsx(
|
|
42
|
+
TabsPrimitive.List,
|
|
43
|
+
{
|
|
44
|
+
onMouseLeave: () => setCursorTarget(null),
|
|
45
|
+
"data-slot": "tabs-list",
|
|
46
|
+
className: cn(tabsListVariants({ size }), "justify-start", className),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
) });
|
|
50
|
+
}
|
|
51
|
+
var tabsTriggerVariants = cva(
|
|
52
|
+
[
|
|
53
|
+
"inline-flex",
|
|
54
|
+
"items-center",
|
|
55
|
+
"justify-center",
|
|
56
|
+
"font-medium",
|
|
57
|
+
"whitespace-nowrap",
|
|
58
|
+
"transition-all",
|
|
59
|
+
"disabled:pointer-events-none",
|
|
60
|
+
"disabled:bg-bg-tertiary",
|
|
61
|
+
"[&_svg]:pointer-events-none",
|
|
62
|
+
"[&_svg:not([class*='size-'])]:size-xl",
|
|
63
|
+
"shrink-0",
|
|
64
|
+
"[&_svg]:shrink-0",
|
|
65
|
+
"outline-none",
|
|
66
|
+
"text-text-primary",
|
|
67
|
+
"data-[state=active]:bg-bg-secondary"
|
|
68
|
+
],
|
|
69
|
+
{
|
|
70
|
+
variants: {
|
|
71
|
+
size: {
|
|
72
|
+
sm: "text-uk-sm leading-uk-sm px-md py-xs rounded-uk-sm",
|
|
73
|
+
base: "text-uk-md leading-uk-md px-lg py-sm rounded-uk-md",
|
|
74
|
+
lg: "text-uk-lg leading-uk-lg px-xl py-sm rounded-uk-md"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
defaultVariants: {
|
|
78
|
+
size: "base"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
function TabsTrigger({ className, ...props }) {
|
|
83
|
+
const { setCursorTarget } = useTabsCursor();
|
|
84
|
+
const { size } = useTabsContext();
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
TabsPrimitive.Trigger,
|
|
87
|
+
{
|
|
88
|
+
onMouseEnter: (e) => setCursorTarget(e.currentTarget),
|
|
89
|
+
"data-slot": "tabs-trigger",
|
|
90
|
+
className: cn(tabsTriggerVariants({ size }), className),
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
function TabsContent({ className, ...props }) {
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
TabsPrimitive.Content,
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "tabs-content",
|
|
100
|
+
className: cn("flex-1 outline-none", className),
|
|
101
|
+
...props
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXXWQ4RVP_js = require('./chunk-XXWQ4RVP.js');
|
|
4
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
28
|
+
|
|
29
|
+
function Select({ ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Root, { "data-slot": "select", ...props });
|
|
31
|
+
}
|
|
32
|
+
function SelectGroup({ className, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
+
SelectPrimitive__namespace.Group,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "select-group",
|
|
37
|
+
className: chunkXXWQ4RVP_js.cn("space-y-xs", className),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function SelectValue({ ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { "data-slot": "select-value", ...props });
|
|
44
|
+
}
|
|
45
|
+
var selectTriggerVariants = classVarianceAuthority.cva(
|
|
46
|
+
[
|
|
47
|
+
"flex",
|
|
48
|
+
"items-center",
|
|
49
|
+
"justify-between",
|
|
50
|
+
"gap-2",
|
|
51
|
+
"rounded-uk-sm",
|
|
52
|
+
"bg-bg-secondary",
|
|
53
|
+
"whitespace-nowrap",
|
|
54
|
+
"shadow-xs",
|
|
55
|
+
"transition-[color,box-shadow]",
|
|
56
|
+
"outline-none",
|
|
57
|
+
"*:data-[slot=select-value]:line-clamp-1",
|
|
58
|
+
"*:data-[slot=select-value]:flex",
|
|
59
|
+
"*:data-[slot=select-value]:items-center",
|
|
60
|
+
"*:data-[slot=select-value]:gap-2",
|
|
61
|
+
"[&_svg]:shrink-0",
|
|
62
|
+
"[&_svg]:pointer-events-none",
|
|
63
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground"
|
|
64
|
+
],
|
|
65
|
+
{
|
|
66
|
+
variants: {
|
|
67
|
+
state: {
|
|
68
|
+
default: ["hover:bg-bg-tertiary", "has-[input:focus]:bg-bg-quaternary"],
|
|
69
|
+
disabled: ["disabled:cursor-not-allowed", "bg-bg-tertiary", "text-text-tertiary"],
|
|
70
|
+
error: ["hover:bg-danger-primary/10", "bg-danger-primary/20"]
|
|
71
|
+
},
|
|
72
|
+
size: {
|
|
73
|
+
sm: "px-sm py-xs text-uk-sm h-5.5 [&_svg:not([class*='size-'])]:size-lg",
|
|
74
|
+
base: "px-md py-sm text-uk-md h-7 [&_svg:not([class*='size-'])]:size-[14px]",
|
|
75
|
+
lg: "px-lg py-sm text-uk-lg h-8 [&_svg:not([class*='size-'])]:size-xl"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
state: "default",
|
|
80
|
+
size: "base"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
function SelectTrigger({
|
|
85
|
+
className,
|
|
86
|
+
size,
|
|
87
|
+
children,
|
|
88
|
+
disabled,
|
|
89
|
+
state,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
93
|
+
SelectPrimitive__namespace.Trigger,
|
|
94
|
+
{
|
|
95
|
+
"data-slot": "select-trigger",
|
|
96
|
+
"data-size": size,
|
|
97
|
+
className: chunkXXWQ4RVP_js.cn(
|
|
98
|
+
selectTriggerVariants({ size, className, state: disabled ? "disabled" : state })
|
|
99
|
+
),
|
|
100
|
+
disabled,
|
|
101
|
+
...props,
|
|
102
|
+
children: [
|
|
103
|
+
children,
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "opacity-50" }) })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function SelectContent({
|
|
110
|
+
className,
|
|
111
|
+
children,
|
|
112
|
+
position = "item-aligned",
|
|
113
|
+
...props
|
|
114
|
+
}) {
|
|
115
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
116
|
+
SelectPrimitive__namespace.Content,
|
|
117
|
+
{
|
|
118
|
+
"data-slot": "select-content",
|
|
119
|
+
className: chunkXXWQ4RVP_js.cn(
|
|
120
|
+
[
|
|
121
|
+
"bg-bg-primary",
|
|
122
|
+
"data-[state=open]:animate-in",
|
|
123
|
+
"data-[state=closed]:animate-out",
|
|
124
|
+
"data-[state=closed]:fade-out-0",
|
|
125
|
+
"data-[state=open]:fade-in-0",
|
|
126
|
+
"data-[state=closed]:zoom-out-95",
|
|
127
|
+
"data-[state=open]:zoom-in-95",
|
|
128
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
129
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
130
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
131
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
132
|
+
"relative",
|
|
133
|
+
"z-50",
|
|
134
|
+
"max-h-(--radix-select-content-available-height)",
|
|
135
|
+
"min-w-[8rem]",
|
|
136
|
+
"origin-(--radix-select-content-transform-origin)",
|
|
137
|
+
"overflow-x-hidden",
|
|
138
|
+
"overflow-y-auto",
|
|
139
|
+
"rounded-uk-md",
|
|
140
|
+
"shadow-md",
|
|
141
|
+
"shadow-[0_8px_20px_0_rgba(0,0,0,.80)]",
|
|
142
|
+
"liquid:liquid-bg"
|
|
143
|
+
],
|
|
144
|
+
{
|
|
145
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1": position === "popper"
|
|
146
|
+
},
|
|
147
|
+
className
|
|
148
|
+
),
|
|
149
|
+
position,
|
|
150
|
+
...props,
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
153
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
154
|
+
SelectPrimitive__namespace.Viewport,
|
|
155
|
+
{
|
|
156
|
+
className: chunkXXWQ4RVP_js.cn("p-md", {
|
|
157
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1": position === "popper"
|
|
158
|
+
}),
|
|
159
|
+
children
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
) });
|
|
166
|
+
}
|
|
167
|
+
function SelectLabel({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
+
SelectPrimitive__namespace.Label,
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "select-label",
|
|
172
|
+
className: chunkXXWQ4RVP_js.cn("text-text-secondary text-uk-xs px-2 py-1.5", className),
|
|
173
|
+
...props
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
function SelectItem({ className, children, prefix, suffix, disabled, ...props }) {
|
|
178
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
179
|
+
SelectPrimitive__namespace.Item,
|
|
180
|
+
{
|
|
181
|
+
"data-slot": "select-item",
|
|
182
|
+
disabled,
|
|
183
|
+
className: chunkXXWQ4RVP_js.cn(
|
|
184
|
+
[
|
|
185
|
+
"group/select-item",
|
|
186
|
+
"w-full",
|
|
187
|
+
"flex",
|
|
188
|
+
"gap-md",
|
|
189
|
+
"items-center",
|
|
190
|
+
"px-md",
|
|
191
|
+
"py-xs",
|
|
192
|
+
"relative",
|
|
193
|
+
"cursor-default",
|
|
194
|
+
"rounded-uk-xs",
|
|
195
|
+
"text-uk-xs",
|
|
196
|
+
"outline-hidden",
|
|
197
|
+
"select-none",
|
|
198
|
+
"focus:bg-bg-secondary",
|
|
199
|
+
"data-[state=checked]:bg-brand-primary",
|
|
200
|
+
"data-[disabled]:pointer-events-none",
|
|
201
|
+
"data-[disabled]:text-bg-quaternary",
|
|
202
|
+
"[&_svg]:pointer-events-none",
|
|
203
|
+
"[&_svg]:shrink-0",
|
|
204
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
205
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
206
|
+
"*:[span]:last:flex",
|
|
207
|
+
"*:[span]:last:items-center",
|
|
208
|
+
"*:[span]:last:gap-2"
|
|
209
|
+
],
|
|
210
|
+
className
|
|
211
|
+
),
|
|
212
|
+
...props,
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
215
|
+
"p",
|
|
216
|
+
{
|
|
217
|
+
"data-disabled": disabled,
|
|
218
|
+
className: chunkXXWQ4RVP_js.cn([
|
|
219
|
+
"text-text-tertiary",
|
|
220
|
+
"flex",
|
|
221
|
+
"shrink-0",
|
|
222
|
+
"gap-0.5",
|
|
223
|
+
"data-[disabled=true]:text-bg-quaternary",
|
|
224
|
+
"group-data-[state=checked]/select-item:text-text-withbg"
|
|
225
|
+
]),
|
|
226
|
+
children: prefix
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children }),
|
|
230
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
231
|
+
"p",
|
|
232
|
+
{
|
|
233
|
+
"data-disabled": disabled,
|
|
234
|
+
className: chunkXXWQ4RVP_js.cn(
|
|
235
|
+
"text-text-tertiary",
|
|
236
|
+
"ml-auto",
|
|
237
|
+
"flex",
|
|
238
|
+
"shrink-0",
|
|
239
|
+
"gap-0.5",
|
|
240
|
+
"data-[disabled=true]:text-bg-quaternary",
|
|
241
|
+
"group-data-[state=checked]/select-item:text-text-withbg"
|
|
242
|
+
),
|
|
243
|
+
children: suffix
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
function SelectSeparator({
|
|
251
|
+
className,
|
|
252
|
+
...props
|
|
253
|
+
}) {
|
|
254
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
255
|
+
SelectPrimitive__namespace.Separator,
|
|
256
|
+
{
|
|
257
|
+
"data-slot": "select-separator",
|
|
258
|
+
className: chunkXXWQ4RVP_js.cn("bg-line-primary my-lg pointer-events-none -mx-1 h-px", className),
|
|
259
|
+
...props
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
function SelectScrollUpButton({
|
|
264
|
+
className,
|
|
265
|
+
...props
|
|
266
|
+
}) {
|
|
267
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
+
SelectPrimitive__namespace.ScrollUpButton,
|
|
269
|
+
{
|
|
270
|
+
"data-slot": "select-scroll-up-button",
|
|
271
|
+
className: chunkXXWQ4RVP_js.cn("flex cursor-default items-center justify-center py-1", className),
|
|
272
|
+
...props,
|
|
273
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
function SelectScrollDownButton({
|
|
278
|
+
className,
|
|
279
|
+
...props
|
|
280
|
+
}) {
|
|
281
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
282
|
+
SelectPrimitive__namespace.ScrollDownButton,
|
|
283
|
+
{
|
|
284
|
+
"data-slot": "select-scroll-down-button",
|
|
285
|
+
className: chunkXXWQ4RVP_js.cn("flex cursor-default items-center justify-center py-1", className),
|
|
286
|
+
...props,
|
|
287
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
exports.Select = Select;
|
|
293
|
+
exports.SelectContent = SelectContent;
|
|
294
|
+
exports.SelectGroup = SelectGroup;
|
|
295
|
+
exports.SelectItem = SelectItem;
|
|
296
|
+
exports.SelectLabel = SelectLabel;
|
|
297
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
298
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
299
|
+
exports.SelectSeparator = SelectSeparator;
|
|
300
|
+
exports.SelectTrigger = SelectTrigger;
|
|
301
|
+
exports.SelectValue = SelectValue;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Badge } from './chunk-WO3WHXDP.mjs';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var PACKAGE_VERSION = "0.0.21";
|
|
5
|
+
var PACKAGE_NAME = "@vuer-ai/vuer-uikit";
|
|
6
|
+
function VersionBadge({
|
|
7
|
+
className,
|
|
8
|
+
showPrefix = true,
|
|
9
|
+
linkable = true,
|
|
10
|
+
version: overrideVersion
|
|
11
|
+
}) {
|
|
12
|
+
const currentVersion = overrideVersion || PACKAGE_VERSION;
|
|
13
|
+
const displayVersion = showPrefix ? `v${currentVersion}` : currentVersion;
|
|
14
|
+
const npmUrl = `https://www.npmjs.com/package/${PACKAGE_NAME}/v/${currentVersion}`;
|
|
15
|
+
const badge = /* @__PURE__ */ jsx(
|
|
16
|
+
Badge,
|
|
17
|
+
{
|
|
18
|
+
variant: "accent",
|
|
19
|
+
className,
|
|
20
|
+
style: linkable ? { cursor: "pointer" } : void 0,
|
|
21
|
+
children: displayVersion
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
if (linkable) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"a",
|
|
27
|
+
{
|
|
28
|
+
href: npmUrl,
|
|
29
|
+
target: "_blank",
|
|
30
|
+
rel: "noopener noreferrer",
|
|
31
|
+
className: "no-underline hover:no-underline",
|
|
32
|
+
children: badge
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return badge;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { VersionBadge };
|