@ucdjs-internal/shared-ui 0.1.6 → 0.1.8
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/README.md +0 -3
- package/dist/components/shiki-code.d.mts +2 -2
- package/dist/components/shiki-code.mjs +1 -3
- package/dist/components/theme-toggle.d.mts +3 -3
- package/dist/components/theme-toggle.mjs +1 -3
- package/dist/components/ucd-logo.d.mts +10 -0
- package/dist/components/ucd-logo.mjs +61 -0
- package/dist/components.d.mts +30 -0
- package/dist/components.mjs +30 -0
- package/dist/hooks/index.mjs +2 -3
- package/dist/hooks/use-clipboard.mjs +2 -4
- package/dist/hooks/use-mobile.mjs +1 -3
- package/dist/hooks/use-theme.mjs +1 -3
- package/dist/index.mjs +2 -3
- package/dist/lib/theme-script.mjs +1 -2
- package/dist/lib/utils.mjs +1 -3
- package/dist/ui/alert-dialog.d.mts +17 -17
- package/dist/ui/alert-dialog.mjs +12 -13
- package/dist/ui/avatar.d.mts +11 -11
- package/dist/ui/avatar.mjs +7 -8
- package/dist/ui/badge.d.mts +4 -4
- package/dist/ui/badge.mjs +1 -3
- package/dist/ui/breadcrumb.d.mts +7 -7
- package/dist/ui/breadcrumb.mjs +2 -3
- package/dist/ui/button.d.mts +8 -8
- package/dist/ui/button.mjs +4 -6
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/card.mjs +2 -3
- package/dist/ui/checkbox.d.mts +5 -5
- package/dist/ui/checkbox.mjs +5 -7
- package/dist/ui/collapsible.d.mts +7 -7
- package/dist/ui/collapsible.mjs +6 -8
- package/dist/ui/combobox.d.mts +20 -20
- package/dist/ui/combobox.mjs +21 -23
- package/dist/ui/command.d.mts +55 -16
- package/dist/ui/command.mjs +327 -89
- package/dist/ui/context-menu.d.mts +24 -24
- package/dist/ui/context-menu.mjs +20 -21
- package/dist/ui/dialog.d.mts +17 -15
- package/dist/ui/dialog.mjs +52 -42
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/dropdown-menu.mjs +2 -3
- package/dist/ui/field.d.mts +13 -13
- package/dist/ui/field.mjs +1 -3
- package/dist/ui/input-group.d.mts +10 -10
- package/dist/ui/input-group.mjs +2 -3
- package/dist/ui/input.d.mts +2 -2
- package/dist/ui/input.mjs +5 -6
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/label.mjs +2 -3
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/scroll-area.mjs +9 -10
- package/dist/ui/select.d.mts +14 -14
- package/dist/ui/select.mjs +18 -19
- package/dist/ui/separator.d.mts +5 -5
- package/dist/ui/separator.mjs +4 -6
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sheet.mjs +2 -3
- package/dist/ui/sidebar.d.mts +23 -23
- package/dist/ui/sidebar.mjs +4 -6
- package/dist/ui/skeleton.d.mts +2 -2
- package/dist/ui/skeleton.mjs +1 -3
- package/dist/ui/table.d.mts +9 -9
- package/dist/ui/table.mjs +2 -3
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/textarea.mjs +2 -3
- package/dist/ui/tooltip.d.mts +8 -8
- package/dist/ui/tooltip.mjs +9 -11
- package/dist/vscode/syntaxes/ucd.tmLanguage.mjs +1 -2
- package/package.json +22 -44
- package/dist/components/index.d.mts +0 -3
- package/dist/components/index.mjs +0 -4
- package/dist/vendor/cmdk/command-score.mjs +0 -62
- package/dist/vendor/cmdk/index.d.mts +0 -181
- package/dist/vendor/cmdk/index.mjs +0 -713
package/dist/ui/sidebar.d.mts
CHANGED
|
@@ -3,10 +3,10 @@ import { Input } from "./input.mjs";
|
|
|
3
3
|
import { Separator } from "./separator.mjs";
|
|
4
4
|
import { TooltipContent } from "./tooltip.mjs";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
7
|
import { VariantProps } from "class-variance-authority";
|
|
8
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
9
|
-
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
9
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
10
10
|
|
|
11
11
|
//#region src/ui/sidebar.d.ts
|
|
12
12
|
interface SidebarContextProps {
|
|
@@ -31,7 +31,7 @@ declare function SidebarProvider({
|
|
|
31
31
|
defaultOpen?: boolean;
|
|
32
32
|
open?: boolean;
|
|
33
33
|
onOpenChange?: (open: boolean) => void;
|
|
34
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
34
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
35
35
|
declare function Sidebar({
|
|
36
36
|
side,
|
|
37
37
|
variant,
|
|
@@ -43,44 +43,44 @@ declare function Sidebar({
|
|
|
43
43
|
side?: "left" | "right";
|
|
44
44
|
variant?: "sidebar" | "floating" | "inset";
|
|
45
45
|
collapsible?: "offExamples" | "icon" | "none";
|
|
46
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
46
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
47
47
|
declare function SidebarTrigger({
|
|
48
48
|
className,
|
|
49
49
|
onClick,
|
|
50
50
|
...props
|
|
51
|
-
}: React.ComponentProps<typeof Button>): react_jsx_runtime0.JSX.Element;
|
|
51
|
+
}: React.ComponentProps<typeof Button>): _$react_jsx_runtime0.JSX.Element;
|
|
52
52
|
declare function SidebarRail({
|
|
53
53
|
className,
|
|
54
54
|
...props
|
|
55
|
-
}: React.ComponentProps<"button">): react_jsx_runtime0.JSX.Element;
|
|
55
|
+
}: React.ComponentProps<"button">): _$react_jsx_runtime0.JSX.Element;
|
|
56
56
|
declare function SidebarInset({
|
|
57
57
|
className,
|
|
58
58
|
...props
|
|
59
|
-
}: React.ComponentProps<"main">): react_jsx_runtime0.JSX.Element;
|
|
59
|
+
}: React.ComponentProps<"main">): _$react_jsx_runtime0.JSX.Element;
|
|
60
60
|
declare function SidebarInput({
|
|
61
61
|
className,
|
|
62
62
|
...props
|
|
63
|
-
}: React.ComponentProps<typeof Input>): react_jsx_runtime0.JSX.Element;
|
|
63
|
+
}: React.ComponentProps<typeof Input>): _$react_jsx_runtime0.JSX.Element;
|
|
64
64
|
declare function SidebarHeader({
|
|
65
65
|
className,
|
|
66
66
|
...props
|
|
67
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
67
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
68
68
|
declare function SidebarFooter({
|
|
69
69
|
className,
|
|
70
70
|
...props
|
|
71
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
71
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
72
72
|
declare function SidebarSeparator({
|
|
73
73
|
className,
|
|
74
74
|
...props
|
|
75
|
-
}: React.ComponentProps<typeof Separator>): react_jsx_runtime0.JSX.Element;
|
|
75
|
+
}: React.ComponentProps<typeof Separator>): _$react_jsx_runtime0.JSX.Element;
|
|
76
76
|
declare function SidebarContent({
|
|
77
77
|
className,
|
|
78
78
|
...props
|
|
79
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
79
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
80
80
|
declare function SidebarGroup({
|
|
81
81
|
className,
|
|
82
82
|
...props
|
|
83
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
83
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
84
84
|
declare function SidebarGroupLabel({
|
|
85
85
|
className,
|
|
86
86
|
render,
|
|
@@ -94,19 +94,19 @@ declare function SidebarGroupAction({
|
|
|
94
94
|
declare function SidebarGroupContent({
|
|
95
95
|
className,
|
|
96
96
|
...props
|
|
97
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
97
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
98
98
|
declare function SidebarMenu({
|
|
99
99
|
className,
|
|
100
100
|
...props
|
|
101
|
-
}: React.ComponentProps<"ul">): react_jsx_runtime0.JSX.Element;
|
|
101
|
+
}: React.ComponentProps<"ul">): _$react_jsx_runtime0.JSX.Element;
|
|
102
102
|
declare function SidebarMenuItem({
|
|
103
103
|
className,
|
|
104
104
|
...props
|
|
105
|
-
}: React.ComponentProps<"li">): react_jsx_runtime0.JSX.Element;
|
|
105
|
+
}: React.ComponentProps<"li">): _$react_jsx_runtime0.JSX.Element;
|
|
106
106
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
107
107
|
variant?: "default" | "outline" | null | undefined;
|
|
108
|
-
size?: "
|
|
109
|
-
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
108
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
109
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
110
110
|
declare function SidebarMenuButton({
|
|
111
111
|
render,
|
|
112
112
|
isActive,
|
|
@@ -118,7 +118,7 @@ declare function SidebarMenuButton({
|
|
|
118
118
|
}: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
|
|
119
119
|
isActive?: boolean;
|
|
120
120
|
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
121
|
-
} & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime0.JSX.Element;
|
|
121
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
122
122
|
declare function SidebarMenuAction({
|
|
123
123
|
className,
|
|
124
124
|
render,
|
|
@@ -130,22 +130,22 @@ declare function SidebarMenuAction({
|
|
|
130
130
|
declare function SidebarMenuBadge({
|
|
131
131
|
className,
|
|
132
132
|
...props
|
|
133
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
133
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
134
134
|
declare function SidebarMenuSkeleton({
|
|
135
135
|
className,
|
|
136
136
|
showIcon,
|
|
137
137
|
...props
|
|
138
138
|
}: React.ComponentProps<"div"> & {
|
|
139
139
|
showIcon?: boolean;
|
|
140
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
140
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
141
141
|
declare function SidebarMenuSub({
|
|
142
142
|
className,
|
|
143
143
|
...props
|
|
144
|
-
}: React.ComponentProps<"ul">): react_jsx_runtime0.JSX.Element;
|
|
144
|
+
}: React.ComponentProps<"ul">): _$react_jsx_runtime0.JSX.Element;
|
|
145
145
|
declare function SidebarMenuSubItem({
|
|
146
146
|
className,
|
|
147
147
|
...props
|
|
148
|
-
}: React.ComponentProps<"li">): react_jsx_runtime0.JSX.Element;
|
|
148
|
+
}: React.ComponentProps<"li">): _$react_jsx_runtime0.JSX.Element;
|
|
149
149
|
declare function SidebarMenuSubButton({
|
|
150
150
|
render,
|
|
151
151
|
size,
|
package/dist/ui/sidebar.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
2
|
import { Button } from "./button.mjs";
|
|
3
|
-
import { useIsMobile } from "../hooks/use-mobile.mjs";
|
|
4
3
|
import { Input } from "./input.mjs";
|
|
5
4
|
import { Separator } from "./separator.mjs";
|
|
6
5
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.mjs";
|
|
6
|
+
import { useIsMobile } from "../hooks/use-mobile.mjs";
|
|
7
7
|
import { Skeleton } from "./skeleton.mjs";
|
|
8
8
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
|
|
9
9
|
import * as React from "react";
|
|
@@ -13,11 +13,10 @@ import { Menu } from "lucide-react";
|
|
|
13
13
|
import { cva } from "class-variance-authority";
|
|
14
14
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
15
15
|
import { useRender } from "@base-ui/react/use-render";
|
|
16
|
-
|
|
17
16
|
//#region src/ui/sidebar.tsx
|
|
18
17
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
19
18
|
const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
|
|
20
|
-
const SIDEBAR_WIDTH = "
|
|
19
|
+
const SIDEBAR_WIDTH = "18rem";
|
|
21
20
|
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
22
21
|
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
23
22
|
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
@@ -1143,7 +1142,7 @@ function SidebarMenuSub(t0) {
|
|
|
1143
1142
|
}
|
|
1144
1143
|
let t1;
|
|
1145
1144
|
if ($[3] !== className) {
|
|
1146
|
-
t1 = cn("border-sidebar-border
|
|
1145
|
+
t1 = cn("border-sidebar-border ml-3 translate-x-px gap-0.5 border-l pl-2 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col", className);
|
|
1147
1146
|
$[3] = className;
|
|
1148
1147
|
$[4] = t1;
|
|
1149
1148
|
} else t1 = $[4];
|
|
@@ -1253,6 +1252,5 @@ function SidebarMenuSubButton(t0) {
|
|
|
1253
1252
|
} else t5 = $[14];
|
|
1254
1253
|
return t3(t5);
|
|
1255
1254
|
}
|
|
1256
|
-
|
|
1257
1255
|
//#endregion
|
|
1258
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
1256
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
package/dist/ui/skeleton.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/ui/skeleton.d.ts
|
|
4
4
|
declare function Skeleton({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
7
|
-
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
7
|
+
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Skeleton };
|
package/dist/ui/skeleton.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
|
|
5
4
|
//#region src/ui/skeleton.tsx
|
|
6
5
|
function Skeleton(t0) {
|
|
7
6
|
const $ = c(8);
|
|
@@ -35,6 +34,5 @@ function Skeleton(t0) {
|
|
|
35
34
|
} else t2 = $[7];
|
|
36
35
|
return t2;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
//#endregion
|
|
40
|
-
export { Skeleton };
|
|
38
|
+
export { Skeleton };
|
package/dist/ui/table.d.mts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/ui/table.d.ts
|
|
5
5
|
declare function Table({
|
|
6
6
|
className,
|
|
7
7
|
...props
|
|
8
|
-
}: React.ComponentProps<"table">): react_jsx_runtime0.JSX.Element;
|
|
8
|
+
}: React.ComponentProps<"table">): _$react_jsx_runtime0.JSX.Element;
|
|
9
9
|
declare function TableHeader({
|
|
10
10
|
className,
|
|
11
11
|
...props
|
|
12
|
-
}: React.ComponentProps<"thead">): react_jsx_runtime0.JSX.Element;
|
|
12
|
+
}: React.ComponentProps<"thead">): _$react_jsx_runtime0.JSX.Element;
|
|
13
13
|
declare function TableBody({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: React.ComponentProps<"tbody">): react_jsx_runtime0.JSX.Element;
|
|
16
|
+
}: React.ComponentProps<"tbody">): _$react_jsx_runtime0.JSX.Element;
|
|
17
17
|
declare function TableFooter({
|
|
18
18
|
className,
|
|
19
19
|
...props
|
|
20
|
-
}: React.ComponentProps<"tfoot">): react_jsx_runtime0.JSX.Element;
|
|
20
|
+
}: React.ComponentProps<"tfoot">): _$react_jsx_runtime0.JSX.Element;
|
|
21
21
|
declare function TableRow({
|
|
22
22
|
className,
|
|
23
23
|
...props
|
|
24
|
-
}: React.ComponentProps<"tr">): react_jsx_runtime0.JSX.Element;
|
|
24
|
+
}: React.ComponentProps<"tr">): _$react_jsx_runtime0.JSX.Element;
|
|
25
25
|
declare function TableHead({
|
|
26
26
|
className,
|
|
27
27
|
...props
|
|
28
|
-
}: React.ComponentProps<"th">): react_jsx_runtime0.JSX.Element;
|
|
28
|
+
}: React.ComponentProps<"th">): _$react_jsx_runtime0.JSX.Element;
|
|
29
29
|
declare function TableCell({
|
|
30
30
|
className,
|
|
31
31
|
...props
|
|
32
|
-
}: React.ComponentProps<"td">): react_jsx_runtime0.JSX.Element;
|
|
32
|
+
}: React.ComponentProps<"td">): _$react_jsx_runtime0.JSX.Element;
|
|
33
33
|
declare function TableCaption({
|
|
34
34
|
className,
|
|
35
35
|
...props
|
|
36
|
-
}: React.ComponentProps<"caption">): react_jsx_runtime0.JSX.Element;
|
|
36
|
+
}: React.ComponentProps<"caption">): _$react_jsx_runtime0.JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
package/dist/ui/table.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
|
|
5
5
|
//#region src/ui/table.tsx
|
|
6
6
|
function Table(t0) {
|
|
7
7
|
const $ = c(8);
|
|
@@ -263,6 +263,5 @@ function TableCaption(t0) {
|
|
|
263
263
|
} else t2 = $[7];
|
|
264
264
|
return t2;
|
|
265
265
|
}
|
|
266
|
-
|
|
267
266
|
//#endregion
|
|
268
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
267
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
package/dist/ui/textarea.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/ui/textarea.d.ts
|
|
5
5
|
declare function Textarea({
|
|
6
6
|
className,
|
|
7
7
|
...props
|
|
8
|
-
}: React.ComponentProps<"textarea">): react_jsx_runtime0.JSX.Element;
|
|
8
|
+
}: React.ComponentProps<"textarea">): _$react_jsx_runtime0.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Textarea };
|
package/dist/ui/textarea.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
|
|
5
5
|
//#region src/ui/textarea.tsx
|
|
6
6
|
function Textarea(t0) {
|
|
7
7
|
const $ = c(8);
|
|
@@ -35,6 +35,5 @@ function Textarea(t0) {
|
|
|
35
35
|
} else t2 = $[7];
|
|
36
36
|
return t2;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
38
|
//#endregion
|
|
40
|
-
export { Textarea };
|
|
39
|
+
export { Textarea };
|
package/dist/ui/tooltip.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import { Tooltip
|
|
1
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
3
3
|
|
|
4
4
|
//#region src/ui/tooltip.d.ts
|
|
5
5
|
declare function TooltipProvider({
|
|
6
6
|
delay,
|
|
7
7
|
...props
|
|
8
|
-
}: Tooltip
|
|
9
|
-
declare function Tooltip({
|
|
8
|
+
}: Tooltip.Provider.Props): _$react_jsx_runtime0.JSX.Element;
|
|
9
|
+
declare function Tooltip$1({
|
|
10
10
|
...props
|
|
11
|
-
}: Tooltip
|
|
11
|
+
}: Tooltip.Root.Props): _$react_jsx_runtime0.JSX.Element;
|
|
12
12
|
declare function TooltipTrigger({
|
|
13
13
|
...props
|
|
14
|
-
}: Tooltip
|
|
14
|
+
}: Tooltip.Trigger.Props): _$react_jsx_runtime0.JSX.Element;
|
|
15
15
|
declare function TooltipContent({
|
|
16
16
|
className,
|
|
17
17
|
side,
|
|
@@ -20,6 +20,6 @@ declare function TooltipContent({
|
|
|
20
20
|
alignOffset,
|
|
21
21
|
children,
|
|
22
22
|
...props
|
|
23
|
-
}: Tooltip
|
|
23
|
+
}: Tooltip.Popup.Props & Pick<Tooltip.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): _$react_jsx_runtime0.JSX.Element;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
25
|
+
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/ui/tooltip.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.mjs";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { Tooltip
|
|
5
|
-
|
|
4
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
6
5
|
//#region src/ui/tooltip.tsx
|
|
7
6
|
function TooltipProvider(t0) {
|
|
8
7
|
const $ = c(6);
|
|
@@ -20,7 +19,7 @@ function TooltipProvider(t0) {
|
|
|
20
19
|
const delay = t1 === void 0 ? 0 : t1;
|
|
21
20
|
let t2;
|
|
22
21
|
if ($[3] !== delay || $[4] !== props) {
|
|
23
|
-
t2 = /* @__PURE__ */ jsx(Tooltip
|
|
22
|
+
t2 = /* @__PURE__ */ jsx(Tooltip.Provider, {
|
|
24
23
|
"data-slot": "tooltip-provider",
|
|
25
24
|
delay,
|
|
26
25
|
...props
|
|
@@ -31,7 +30,7 @@ function TooltipProvider(t0) {
|
|
|
31
30
|
} else t2 = $[5];
|
|
32
31
|
return t2;
|
|
33
32
|
}
|
|
34
|
-
function Tooltip(t0) {
|
|
33
|
+
function Tooltip$1(t0) {
|
|
35
34
|
const $ = c(4);
|
|
36
35
|
let props;
|
|
37
36
|
if ($[0] !== t0) {
|
|
@@ -41,7 +40,7 @@ function Tooltip(t0) {
|
|
|
41
40
|
} else props = $[1];
|
|
42
41
|
let t1;
|
|
43
42
|
if ($[2] !== props) {
|
|
44
|
-
t1 = /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(Tooltip
|
|
43
|
+
t1 = /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(Tooltip.Root, {
|
|
45
44
|
"data-slot": "tooltip",
|
|
46
45
|
...props
|
|
47
46
|
}) });
|
|
@@ -60,7 +59,7 @@ function TooltipTrigger(t0) {
|
|
|
60
59
|
} else props = $[1];
|
|
61
60
|
let t1;
|
|
62
61
|
if ($[2] !== props) {
|
|
63
|
-
t1 = /* @__PURE__ */ jsx(Tooltip
|
|
62
|
+
t1 = /* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
64
63
|
"data-slot": "tooltip-trigger",
|
|
65
64
|
...props
|
|
66
65
|
});
|
|
@@ -109,12 +108,12 @@ function TooltipContent(t0) {
|
|
|
109
108
|
} else t5 = $[9];
|
|
110
109
|
let t6;
|
|
111
110
|
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
112
|
-
t6 = /* @__PURE__ */ jsx(Tooltip
|
|
111
|
+
t6 = /* @__PURE__ */ jsx(Tooltip.Arrow, { className: "size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" });
|
|
113
112
|
$[10] = t6;
|
|
114
113
|
} else t6 = $[10];
|
|
115
114
|
let t7;
|
|
116
115
|
if ($[11] !== children || $[12] !== props || $[13] !== t5) {
|
|
117
|
-
t7 = /* @__PURE__ */ jsxs(Tooltip
|
|
116
|
+
t7 = /* @__PURE__ */ jsxs(Tooltip.Popup, {
|
|
118
117
|
"data-slot": "tooltip-content",
|
|
119
118
|
className: t5,
|
|
120
119
|
...props,
|
|
@@ -127,7 +126,7 @@ function TooltipContent(t0) {
|
|
|
127
126
|
} else t7 = $[14];
|
|
128
127
|
let t8;
|
|
129
128
|
if ($[15] !== align || $[16] !== alignOffset || $[17] !== side || $[18] !== sideOffset || $[19] !== t7) {
|
|
130
|
-
t8 = /* @__PURE__ */ jsx(Tooltip
|
|
129
|
+
t8 = /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
131
130
|
align,
|
|
132
131
|
alignOffset,
|
|
133
132
|
side,
|
|
@@ -144,6 +143,5 @@ function TooltipContent(t0) {
|
|
|
144
143
|
} else t8 = $[20];
|
|
145
144
|
return t8;
|
|
146
145
|
}
|
|
147
|
-
|
|
148
146
|
//#endregion
|
|
149
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
147
|
+
export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ucdjs-internal/shared-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Nørgård",
|
|
@@ -17,45 +17,22 @@
|
|
|
17
17
|
"bugs": {
|
|
18
18
|
"url": "https://github.com/ucdjs/ucd/issues"
|
|
19
19
|
},
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"*.css",
|
|
22
|
+
"dist/styles/**"
|
|
23
|
+
],
|
|
20
24
|
"imports": {
|
|
21
25
|
"#components/*": "./src/components/*.tsx",
|
|
22
26
|
"#ui/*": "./src/ui/*.tsx",
|
|
23
27
|
"#lib/*": "./src/lib/*.ts",
|
|
24
|
-
"#hooks/*": "./src/hooks/*.ts"
|
|
25
|
-
"#vendor/cmdk": "./src/vendor/cmdk/index.tsx"
|
|
28
|
+
"#hooks/*": "./src/hooks/*.ts"
|
|
26
29
|
},
|
|
27
30
|
"exports": {
|
|
28
31
|
".": "./dist/index.mjs",
|
|
29
|
-
"./components": "./dist/components
|
|
32
|
+
"./components": "./dist/components.mjs",
|
|
30
33
|
"./hooks": "./dist/hooks/index.mjs",
|
|
31
34
|
"./lib/theme-script": "./dist/lib/theme-script.mjs",
|
|
32
35
|
"./lib/utils": "./dist/lib/utils.mjs",
|
|
33
|
-
"./ui/alert-dialog": "./dist/ui/alert-dialog.mjs",
|
|
34
|
-
"./ui/avatar": "./dist/ui/avatar.mjs",
|
|
35
|
-
"./ui/badge": "./dist/ui/badge.mjs",
|
|
36
|
-
"./ui/breadcrumb": "./dist/ui/breadcrumb.mjs",
|
|
37
|
-
"./ui/button": "./dist/ui/button.mjs",
|
|
38
|
-
"./ui/card": "./dist/ui/card.mjs",
|
|
39
|
-
"./ui/checkbox": "./dist/ui/checkbox.mjs",
|
|
40
|
-
"./ui/collapsible": "./dist/ui/collapsible.mjs",
|
|
41
|
-
"./ui/combobox": "./dist/ui/combobox.mjs",
|
|
42
|
-
"./ui/command": "./dist/ui/command.mjs",
|
|
43
|
-
"./ui/context-menu": "./dist/ui/context-menu.mjs",
|
|
44
|
-
"./ui/dialog": "./dist/ui/dialog.mjs",
|
|
45
|
-
"./ui/dropdown-menu": "./dist/ui/dropdown-menu.mjs",
|
|
46
|
-
"./ui/field": "./dist/ui/field.mjs",
|
|
47
|
-
"./ui/input": "./dist/ui/input.mjs",
|
|
48
|
-
"./ui/input-group": "./dist/ui/input-group.mjs",
|
|
49
|
-
"./ui/label": "./dist/ui/label.mjs",
|
|
50
|
-
"./ui/scroll-area": "./dist/ui/scroll-area.mjs",
|
|
51
|
-
"./ui/select": "./dist/ui/select.mjs",
|
|
52
|
-
"./ui/separator": "./dist/ui/separator.mjs",
|
|
53
|
-
"./ui/sheet": "./dist/ui/sheet.mjs",
|
|
54
|
-
"./ui/sidebar": "./dist/ui/sidebar.mjs",
|
|
55
|
-
"./ui/skeleton": "./dist/ui/skeleton.mjs",
|
|
56
|
-
"./ui/table": "./dist/ui/table.mjs",
|
|
57
|
-
"./ui/textarea": "./dist/ui/textarea.mjs",
|
|
58
|
-
"./ui/tooltip": "./dist/ui/tooltip.mjs",
|
|
59
36
|
"./styles.css": "./dist/styles/globals.css",
|
|
60
37
|
"./package.json": "./package.json"
|
|
61
38
|
},
|
|
@@ -67,36 +44,37 @@
|
|
|
67
44
|
"node": ">=24.13"
|
|
68
45
|
},
|
|
69
46
|
"dependencies": {
|
|
70
|
-
"@base-ui/react": "1.
|
|
71
|
-
"@base-ui/utils": "0.2.
|
|
47
|
+
"@base-ui/react": "1.3.0",
|
|
48
|
+
"@base-ui/utils": "0.2.6",
|
|
49
|
+
"@cmdi/base-ui": "0.0.1",
|
|
72
50
|
"@fontsource-variable/inter": "5.2.8",
|
|
73
51
|
"class-variance-authority": "0.7.1",
|
|
74
52
|
"clsx": "2.1.1",
|
|
75
|
-
"lucide-react": "
|
|
53
|
+
"lucide-react": "1.7.0",
|
|
76
54
|
"react": "19.2.4",
|
|
77
55
|
"react-dom": "19.2.4",
|
|
78
|
-
"shiki": "
|
|
56
|
+
"shiki": "4.0.2",
|
|
79
57
|
"tailwind-merge": "3.5.0",
|
|
80
|
-
"tailwindcss": "4.2.
|
|
58
|
+
"tailwindcss": "4.2.2",
|
|
81
59
|
"tw-animate-css": "1.4.0",
|
|
82
60
|
"zod": "4.3.6"
|
|
83
61
|
},
|
|
84
62
|
"devDependencies": {
|
|
85
|
-
"@eslint-react/eslint-plugin": "
|
|
86
|
-
"@luxass/eslint-config": "7.2
|
|
87
|
-
"@rollup/plugin-babel": "
|
|
63
|
+
"@eslint-react/eslint-plugin": "3.0.0",
|
|
64
|
+
"@luxass/eslint-config": "7.4.2",
|
|
65
|
+
"@rollup/plugin-babel": "7.0.0",
|
|
88
66
|
"@types/react": "19.2.14",
|
|
89
67
|
"@types/react-dom": "19.2.3",
|
|
90
68
|
"babel-plugin-react-compiler": "1.0.0",
|
|
91
|
-
"eslint": "10.0
|
|
69
|
+
"eslint": "10.1.0",
|
|
92
70
|
"eslint-plugin-format": "2.0.1",
|
|
93
71
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
94
72
|
"eslint-plugin-react-refresh": "0.5.2",
|
|
95
|
-
"publint": "0.3.
|
|
96
|
-
"tsdown": "0.
|
|
97
|
-
"typescript": "
|
|
98
|
-
"@ucdjs-tooling/
|
|
99
|
-
"@ucdjs-tooling/
|
|
73
|
+
"publint": "0.3.18",
|
|
74
|
+
"tsdown": "0.21.7",
|
|
75
|
+
"typescript": "6.0.2",
|
|
76
|
+
"@ucdjs-tooling/tsdown-config": "1.0.0",
|
|
77
|
+
"@ucdjs-tooling/tsconfig": "1.0.0"
|
|
100
78
|
},
|
|
101
79
|
"publishConfig": {
|
|
102
80
|
"access": "public"
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
//#region src/vendor/cmdk/command-score.ts
|
|
2
|
-
const SCORE_CONTINUE_MATCH = 1;
|
|
3
|
-
const SCORE_SPACE_WORD_JUMP = .9;
|
|
4
|
-
const SCORE_NON_SPACE_WORD_JUMP = .8;
|
|
5
|
-
const SCORE_CHARACTER_JUMP = .17;
|
|
6
|
-
const SCORE_TRANSPOSITION = .1;
|
|
7
|
-
const PENALTY_SKIPPED = .999;
|
|
8
|
-
const PENALTY_CASE_MISMATCH = .9999;
|
|
9
|
-
const PENALTY_NOT_COMPLETE = .99;
|
|
10
|
-
const IS_GAP_REGEXP = /[\\/_+.#"@[({&]/;
|
|
11
|
-
const COUNT_GAPS_REGEXP = /[\\/_+.#"@[({&]/g;
|
|
12
|
-
const IS_SPACE_REGEXP = /[\s-]/;
|
|
13
|
-
const COUNT_SPACE_REGEXP = /[\s-]/g;
|
|
14
|
-
function commandScoreInner(value, abbreviation, lowerString, lowerAbbreviation, stringIndex, abbreviationIndex, memoizedResults) {
|
|
15
|
-
if (abbreviationIndex === abbreviation.length) {
|
|
16
|
-
if (stringIndex === value.length) return SCORE_CONTINUE_MATCH;
|
|
17
|
-
return PENALTY_NOT_COMPLETE;
|
|
18
|
-
}
|
|
19
|
-
const memoizeKey = `${stringIndex},${abbreviationIndex}`;
|
|
20
|
-
if (memoizedResults[memoizeKey] !== void 0) return memoizedResults[memoizeKey];
|
|
21
|
-
const abbreviationChar = lowerAbbreviation.charAt(abbreviationIndex);
|
|
22
|
-
let index = lowerString.indexOf(abbreviationChar, stringIndex);
|
|
23
|
-
let highScore = 0;
|
|
24
|
-
let score, transposedScore, wordBreaks, spaceBreaks;
|
|
25
|
-
while (index >= 0) {
|
|
26
|
-
score = commandScoreInner(value, abbreviation, lowerString, lowerAbbreviation, index + 1, abbreviationIndex + 1, memoizedResults);
|
|
27
|
-
if (score > highScore) {
|
|
28
|
-
if (index === stringIndex) score *= SCORE_CONTINUE_MATCH;
|
|
29
|
-
else if (IS_GAP_REGEXP.test(value.charAt(index - 1))) {
|
|
30
|
-
score *= SCORE_NON_SPACE_WORD_JUMP;
|
|
31
|
-
wordBreaks = value.slice(stringIndex, index - 1).match(COUNT_GAPS_REGEXP);
|
|
32
|
-
if (wordBreaks && stringIndex > 0) score *= PENALTY_SKIPPED ** wordBreaks.length;
|
|
33
|
-
} else if (IS_SPACE_REGEXP.test(value.charAt(index - 1))) {
|
|
34
|
-
score *= SCORE_SPACE_WORD_JUMP;
|
|
35
|
-
spaceBreaks = value.slice(stringIndex, index - 1).match(COUNT_SPACE_REGEXP);
|
|
36
|
-
if (spaceBreaks && stringIndex > 0) score *= PENALTY_SKIPPED ** spaceBreaks.length;
|
|
37
|
-
} else {
|
|
38
|
-
score *= SCORE_CHARACTER_JUMP;
|
|
39
|
-
if (stringIndex > 0) score *= PENALTY_SKIPPED ** (index - stringIndex);
|
|
40
|
-
}
|
|
41
|
-
if (value.charAt(index) !== abbreviation.charAt(abbreviationIndex)) score *= PENALTY_CASE_MISMATCH;
|
|
42
|
-
}
|
|
43
|
-
if (score < SCORE_TRANSPOSITION && lowerString.charAt(index - 1) === lowerAbbreviation.charAt(abbreviationIndex + 1) || lowerAbbreviation.charAt(abbreviationIndex + 1) === lowerAbbreviation.charAt(abbreviationIndex) && lowerString.charAt(index - 1) !== lowerAbbreviation.charAt(abbreviationIndex)) {
|
|
44
|
-
transposedScore = commandScoreInner(value, abbreviation, lowerString, lowerAbbreviation, index + 1, abbreviationIndex + 2, memoizedResults);
|
|
45
|
-
if (transposedScore * SCORE_TRANSPOSITION > score) score = transposedScore * SCORE_TRANSPOSITION;
|
|
46
|
-
}
|
|
47
|
-
if (score > highScore) highScore = score;
|
|
48
|
-
index = lowerString.indexOf(abbreviationChar, index + 1);
|
|
49
|
-
}
|
|
50
|
-
memoizedResults[memoizeKey] = highScore;
|
|
51
|
-
return highScore;
|
|
52
|
-
}
|
|
53
|
-
function formatInput(value) {
|
|
54
|
-
return value.toLowerCase().replace(COUNT_SPACE_REGEXP, " ");
|
|
55
|
-
}
|
|
56
|
-
function commandScore(string, abbreviation, aliases) {
|
|
57
|
-
string = aliases && aliases.length > 0 ? `${`${string} ${aliases.join(" ")}`}` : string;
|
|
58
|
-
return commandScoreInner(string, abbreviation, formatInput(string), formatInput(abbreviation), 0, 0, {});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
export { commandScore };
|