@ucdjs-internal/shared-ui 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 +27 -0
- package/dist/components/shiki-code.d.mts +50 -0
- package/dist/components/shiki-code.mjs +76 -0
- package/dist/components/theme-toggle.d.mts +6 -0
- package/dist/components/theme-toggle.mjs +75 -0
- package/dist/hooks/index.d.mts +3 -0
- package/dist/hooks/index.mjs +4 -0
- package/dist/hooks/use-mobile.d.mts +4 -0
- package/dist/hooks/use-mobile.mjs +41 -0
- package/dist/hooks/use-theme.d.mts +11 -0
- package/dist/hooks/use-theme.mjs +105 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +4 -0
- package/dist/lib/theme-script.d.mts +5 -0
- package/dist/lib/theme-script.mjs +26 -0
- package/dist/lib/utils.d.mts +6 -0
- package/dist/lib/utils.mjs +10 -0
- package/dist/styles/globals.css +219 -0
- package/dist/styles/shadcn-vendored.css +95 -0
- package/dist/ui/alert-dialog.d.mts +58 -0
- package/dist/ui/alert-dialog.mjs +387 -0
- package/dist/ui/avatar.d.mts +34 -0
- package/dist/ui/avatar.mjs +208 -0
- package/dist/ui/badge.d.mts +17 -0
- package/dist/ui/badge.mjs +76 -0
- package/dist/ui/breadcrumb.d.mts +37 -0
- package/dist/ui/breadcrumb.mjs +281 -0
- package/dist/ui/button.d.mts +18 -0
- package/dist/ui/button.mjs +82 -0
- package/dist/ui/card.d.mts +37 -0
- package/dist/ui/card.mjs +239 -0
- package/dist/ui/checkbox.d.mts +10 -0
- package/dist/ui/checkbox.mjs +52 -0
- package/dist/ui/collapsible.d.mts +15 -0
- package/dist/ui/collapsible.mjs +65 -0
- package/dist/ui/combobox.d.mts +81 -0
- package/dist/ui/combobox.mjs +641 -0
- package/dist/ui/command.d.mts +55 -0
- package/dist/ui/command.mjs +378 -0
- package/dist/ui/context-menu.d.mts +86 -0
- package/dist/ui/context-menu.mjs +520 -0
- package/dist/ui/dialog.d.mts +51 -0
- package/dist/ui/dialog.mjs +331 -0
- package/dist/ui/dropdown-menu.d.mts +84 -0
- package/dist/ui/dropdown-menu.mjs +534 -0
- package/dist/ui/field.d.mts +64 -0
- package/dist/ui/field.mjs +425 -0
- package/dist/ui/input-group.d.mts +45 -0
- package/dist/ui/input-group.mjs +254 -0
- package/dist/ui/input.d.mts +11 -0
- package/dist/ui/input.mjs +47 -0
- package/dist/ui/label.d.mts +10 -0
- package/dist/ui/label.mjs +41 -0
- package/dist/ui/scroll-area.d.mts +16 -0
- package/dist/ui/scroll-area.mjs +120 -0
- package/dist/ui/select.d.mts +55 -0
- package/dist/ui/select.mjs +414 -0
- package/dist/ui/separator.d.mts +11 -0
- package/dist/ui/separator.mjs +47 -0
- package/dist/ui/sheet.d.mts +42 -0
- package/dist/ui/sheet.mjs +318 -0
- package/dist/ui/sidebar.d.mts +160 -0
- package/dist/ui/sidebar.mjs +1258 -0
- package/dist/ui/skeleton.d.mts +9 -0
- package/dist/ui/skeleton.mjs +40 -0
- package/dist/ui/table.d.mts +38 -0
- package/dist/ui/table.mjs +269 -0
- package/dist/ui/textarea.d.mts +10 -0
- package/dist/ui/textarea.mjs +41 -0
- package/dist/ui/tooltip.d.mts +25 -0
- package/dist/ui/tooltip.mjs +149 -0
- package/package.json +111 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/ui/input.d.ts
|
|
5
|
+
declare function Input({
|
|
6
|
+
className,
|
|
7
|
+
type,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<"input">): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Input };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { Input as Input$1 } from "@base-ui/react/input";
|
|
6
|
+
|
|
7
|
+
//#region src/ui/input.tsx
|
|
8
|
+
function Input(t0) {
|
|
9
|
+
const $ = c(10);
|
|
10
|
+
let className;
|
|
11
|
+
let props;
|
|
12
|
+
let type;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, type, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = className;
|
|
17
|
+
$[2] = props;
|
|
18
|
+
$[3] = type;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
props = $[2];
|
|
22
|
+
type = $[3];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[4] !== className) {
|
|
26
|
+
t1 = cn("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", className);
|
|
27
|
+
$[4] = className;
|
|
28
|
+
$[5] = t1;
|
|
29
|
+
} else t1 = $[5];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[6] !== props || $[7] !== t1 || $[8] !== type) {
|
|
32
|
+
t2 = /* @__PURE__ */ jsx(Input$1, {
|
|
33
|
+
type,
|
|
34
|
+
"data-slot": "input",
|
|
35
|
+
className: t1,
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
$[6] = props;
|
|
39
|
+
$[7] = t1;
|
|
40
|
+
$[8] = type;
|
|
41
|
+
$[9] = t2;
|
|
42
|
+
} else t2 = $[9];
|
|
43
|
+
return t2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Input };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/ui/label.d.ts
|
|
5
|
+
declare function Label({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<"label">): react_jsx_runtime0.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Label };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/ui/label.tsx
|
|
7
|
+
function Label(t0) {
|
|
8
|
+
const $ = c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== className) {
|
|
22
|
+
t1 = cn("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed", className);
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
28
|
+
t2 = /* @__PURE__ */ jsx("label", {
|
|
29
|
+
"data-slot": "label",
|
|
30
|
+
className: t1,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
$[5] = props;
|
|
34
|
+
$[6] = t1;
|
|
35
|
+
$[7] = t2;
|
|
36
|
+
} else t2 = $[7];
|
|
37
|
+
return t2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Label };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
3
|
+
|
|
4
|
+
//#region src/ui/scroll-area.d.ts
|
|
5
|
+
declare function ScrollArea({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}: ScrollArea$1.Root.Props): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare function ScrollBar({
|
|
11
|
+
className,
|
|
12
|
+
orientation,
|
|
13
|
+
...props
|
|
14
|
+
}: ScrollArea$1.Scrollbar.Props): react_jsx_runtime0.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
6
|
+
|
|
7
|
+
//#region src/ui/scroll-area.tsx
|
|
8
|
+
function ScrollArea(t0) {
|
|
9
|
+
const $ = c(14);
|
|
10
|
+
let children;
|
|
11
|
+
let className;
|
|
12
|
+
let props;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, children, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = children;
|
|
17
|
+
$[2] = className;
|
|
18
|
+
$[3] = props;
|
|
19
|
+
} else {
|
|
20
|
+
children = $[1];
|
|
21
|
+
className = $[2];
|
|
22
|
+
props = $[3];
|
|
23
|
+
}
|
|
24
|
+
let t1;
|
|
25
|
+
if ($[4] !== className) {
|
|
26
|
+
t1 = cn("relative", className);
|
|
27
|
+
$[4] = className;
|
|
28
|
+
$[5] = t1;
|
|
29
|
+
} else t1 = $[5];
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[6] !== children) {
|
|
32
|
+
t2 = /* @__PURE__ */ jsx(ScrollArea$1.Viewport, {
|
|
33
|
+
"data-slot": "scroll-area-viewport",
|
|
34
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
35
|
+
children
|
|
36
|
+
});
|
|
37
|
+
$[6] = children;
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else t2 = $[7];
|
|
40
|
+
let t3;
|
|
41
|
+
let t4;
|
|
42
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
43
|
+
t3 = /* @__PURE__ */ jsx(ScrollBar, {});
|
|
44
|
+
t4 = /* @__PURE__ */ jsx(ScrollArea$1.Corner, {});
|
|
45
|
+
$[8] = t3;
|
|
46
|
+
$[9] = t4;
|
|
47
|
+
} else {
|
|
48
|
+
t3 = $[8];
|
|
49
|
+
t4 = $[9];
|
|
50
|
+
}
|
|
51
|
+
let t5;
|
|
52
|
+
if ($[10] !== props || $[11] !== t1 || $[12] !== t2) {
|
|
53
|
+
t5 = /* @__PURE__ */ jsxs(ScrollArea$1.Root, {
|
|
54
|
+
"data-slot": "scroll-area",
|
|
55
|
+
className: t1,
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
t2,
|
|
59
|
+
t3,
|
|
60
|
+
t4
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
$[10] = props;
|
|
64
|
+
$[11] = t1;
|
|
65
|
+
$[12] = t2;
|
|
66
|
+
$[13] = t5;
|
|
67
|
+
} else t5 = $[13];
|
|
68
|
+
return t5;
|
|
69
|
+
}
|
|
70
|
+
function ScrollBar(t0) {
|
|
71
|
+
const $ = c(11);
|
|
72
|
+
let className;
|
|
73
|
+
let props;
|
|
74
|
+
let t1;
|
|
75
|
+
if ($[0] !== t0) {
|
|
76
|
+
({className, orientation: t1, ...props} = t0);
|
|
77
|
+
$[0] = t0;
|
|
78
|
+
$[1] = className;
|
|
79
|
+
$[2] = props;
|
|
80
|
+
$[3] = t1;
|
|
81
|
+
} else {
|
|
82
|
+
className = $[1];
|
|
83
|
+
props = $[2];
|
|
84
|
+
t1 = $[3];
|
|
85
|
+
}
|
|
86
|
+
const orientation = t1 === void 0 ? "vertical" : t1;
|
|
87
|
+
let t2;
|
|
88
|
+
if ($[4] !== className) {
|
|
89
|
+
t2 = cn("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none", className);
|
|
90
|
+
$[4] = className;
|
|
91
|
+
$[5] = t2;
|
|
92
|
+
} else t2 = $[5];
|
|
93
|
+
let t3;
|
|
94
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
95
|
+
t3 = /* @__PURE__ */ jsx(ScrollArea$1.Thumb, {
|
|
96
|
+
"data-slot": "scroll-area-thumb",
|
|
97
|
+
className: "rounded-full bg-border relative flex-1"
|
|
98
|
+
});
|
|
99
|
+
$[6] = t3;
|
|
100
|
+
} else t3 = $[6];
|
|
101
|
+
let t4;
|
|
102
|
+
if ($[7] !== orientation || $[8] !== props || $[9] !== t2) {
|
|
103
|
+
t4 = /* @__PURE__ */ jsx(ScrollArea$1.Scrollbar, {
|
|
104
|
+
"data-slot": "scroll-area-scrollbar",
|
|
105
|
+
"data-orientation": orientation,
|
|
106
|
+
orientation,
|
|
107
|
+
className: t2,
|
|
108
|
+
...props,
|
|
109
|
+
children: t3
|
|
110
|
+
});
|
|
111
|
+
$[7] = orientation;
|
|
112
|
+
$[8] = props;
|
|
113
|
+
$[9] = t2;
|
|
114
|
+
$[10] = t4;
|
|
115
|
+
} else t4 = $[10];
|
|
116
|
+
return t4;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//#endregion
|
|
120
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { Select as Select$1 } from "@base-ui/react/select";
|
|
4
|
+
|
|
5
|
+
//#region src/ui/select.d.ts
|
|
6
|
+
declare const Select: typeof Select$1.Root;
|
|
7
|
+
declare function SelectGroup({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: Select$1.Group.Props): react_jsx_runtime0.JSX.Element;
|
|
11
|
+
declare function SelectValue({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: Select$1.Value.Props): react_jsx_runtime0.JSX.Element;
|
|
15
|
+
declare function SelectTrigger({
|
|
16
|
+
className,
|
|
17
|
+
size,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
}: Select$1.Trigger.Props & {
|
|
21
|
+
size?: "sm" | "default";
|
|
22
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
23
|
+
declare function SelectContent({
|
|
24
|
+
className,
|
|
25
|
+
children,
|
|
26
|
+
side,
|
|
27
|
+
sideOffset,
|
|
28
|
+
align,
|
|
29
|
+
alignOffset,
|
|
30
|
+
alignItemWithTrigger,
|
|
31
|
+
...props
|
|
32
|
+
}: Select$1.Popup.Props & Pick<Select$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): react_jsx_runtime0.JSX.Element;
|
|
33
|
+
declare function SelectLabel({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: Select$1.GroupLabel.Props): react_jsx_runtime0.JSX.Element;
|
|
37
|
+
declare function SelectItem({
|
|
38
|
+
className,
|
|
39
|
+
children,
|
|
40
|
+
...props
|
|
41
|
+
}: Select$1.Item.Props): react_jsx_runtime0.JSX.Element;
|
|
42
|
+
declare function SelectSeparator({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}: Select$1.Separator.Props): react_jsx_runtime0.JSX.Element;
|
|
46
|
+
declare function SelectScrollUpButton({
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<typeof Select$1.ScrollUpArrow>): react_jsx_runtime0.JSX.Element;
|
|
50
|
+
declare function SelectScrollDownButton({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: React.ComponentProps<typeof Select$1.ScrollDownArrow>): react_jsx_runtime0.JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|