@cmdniels/uikit 1.4.3 → 1.4.6
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/out/components/combobox/ComboboxList.js +1 -1
- package/out/components/dialog/DialogContent.js +1 -1
- package/out/components/select/Select.d.ts +2 -2
- package/out/components/select/Select.js +19 -2
- package/out/components/select/SelectItem.d.ts +1 -1
- package/out/components/select/SelectItem.js +11 -2
- package/out/components/sidebar/SidebarContent.js +1 -1
- package/out/components/textarea/TextArea.js +1 -1
- package/out/components/typography/TypographyPre.js +1 -1
- package/out/components/typography/TypographyTable.js +1 -1
- package/package.json +93 -85
- package/tailwind.css +57 -3
|
@@ -15,5 +15,5 @@ import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
|
15
15
|
import cn from "../../cn";
|
|
16
16
|
export default function ComboboxList(_a) {
|
|
17
17
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18
|
-
return (_jsx(ComboboxPrimitive.List, Object.assign({ "data-slot": "combobox-list", className: cn("scrollbar-
|
|
18
|
+
return (_jsx(ComboboxPrimitive.List, Object.assign({ "data-slot": "combobox-list", className: cn("scrollbar-none max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", className) }, props)));
|
|
19
19
|
}
|
|
@@ -19,5 +19,5 @@ import DialogOverlay from "./DialogOverlay";
|
|
|
19
19
|
import DialogPortal from "./DialogPortal";
|
|
20
20
|
export default function DialogContent(_a) {
|
|
21
21
|
var { className, children, showCloseButton = true } = _a, props = __rest(_a, ["className", "children", "showCloseButton"]);
|
|
22
|
-
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}),
|
|
22
|
+
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogPrimitive.Popup, Object.assign({ "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 flex h-fit max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-1/2 overflow-hidden rounded-xl ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className) }, props, { children: _jsxs("div", { className: cn("max-h-[calc(100%-2rem)]", "grid w-full gap-6 overflow-y-auto rounded-xl bg-background p-6 text-sm", "scrollbar-track-background scrollbar-thumb-border scrollbar"), children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm" }), children: [_jsx(IconX, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }) }))] }));
|
|
23
23
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
2
|
-
declare const
|
|
3
|
-
export default Select;
|
|
2
|
+
export declare const SelectRegistryContext: import("react").Context<Map<unknown, string> | null>;
|
|
3
|
+
export default function Select({ children, ...props }: SelectPrimitive.Root.Props<unknown, boolean | undefined>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
14
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
3
|
-
|
|
4
|
-
export
|
|
15
|
+
import { createContext, useRef } from "react";
|
|
16
|
+
export const SelectRegistryContext = createContext(null);
|
|
17
|
+
export default function Select(_a) {
|
|
18
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
19
|
+
const registryRef = useRef(new Map());
|
|
20
|
+
return (_jsx(SelectRegistryContext.Provider, { value: registryRef.current, children: _jsx(SelectPrimitive.Root, Object.assign({}, props, { itemToStringLabel: (value) => { var _a; return (_a = registryRef.current.get(value)) !== null && _a !== void 0 ? _a : String(value); }, children: children })) }));
|
|
21
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
2
|
-
export default function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function SelectItem({ className, children, value, ...props }: SelectPrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,8 +13,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
15
15
|
import { IconCheck } from "@tabler/icons-react";
|
|
16
|
+
import { useContext, useEffect } from "react";
|
|
16
17
|
import cn from "../../cn";
|
|
18
|
+
import { SelectRegistryContext } from "./Select";
|
|
17
19
|
export default function SelectItem(_a) {
|
|
18
|
-
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
19
|
-
|
|
20
|
+
var { className, children, value } = _a, props = __rest(_a, ["className", "children", "value"]);
|
|
21
|
+
const registry = useContext(SelectRegistryContext);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (registry && value !== undefined) {
|
|
24
|
+
const label = typeof children === "string" ? children : String(children);
|
|
25
|
+
registry.set(value, label);
|
|
26
|
+
}
|
|
27
|
+
}, [registry, value, children]);
|
|
28
|
+
return (_jsxs(SelectPrimitive.Item, Object.assign({ "data-slot": "select-item", className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className), value: value }, props, { children: [_jsx(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children: children }), _jsx(SelectPrimitive.ItemIndicator, { render: _jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }), children: _jsx(IconCheck, { className: "pointer-events-none" }) })] })));
|
|
20
29
|
}
|
|
@@ -13,5 +13,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import cn from "../../cn";
|
|
14
14
|
export default function SidebarContent(_a) {
|
|
15
15
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
-
return (_jsx("div", Object.assign({ "data-slot": "sidebar-content", "data-sidebar": "content", className: cn("scrollbar-
|
|
16
|
+
return (_jsx("div", Object.assign({ "data-slot": "sidebar-content", "data-sidebar": "content", className: cn("scrollbar-none flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className) }, props)));
|
|
17
17
|
}
|
|
@@ -13,5 +13,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import cn from "../../cn";
|
|
14
14
|
export default function TextArea(_a) {
|
|
15
15
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
-
return (_jsx("textarea", Object.assign({ "data-slot": "textarea", className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-border bg-card px-2.5 py-2 text-base break-all shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 md:text-sm", className) }, props)));
|
|
16
|
+
return (_jsx("textarea", Object.assign({ "data-slot": "textarea", className: cn("flex field-sizing-content max-h-full min-h-16 w-full rounded-md border border-border bg-card px-2.5 py-2 text-base break-all shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 md:text-sm", className) }, props)));
|
|
17
17
|
}
|
|
@@ -14,7 +14,7 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import cn from "../../cn";
|
|
15
15
|
const TypographyPre = forwardRef((_a, ref) => {
|
|
16
16
|
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
17
|
-
return (_jsx("pre", Object.assign({ ref: ref, className: cn("scrollbar-
|
|
17
|
+
return (_jsx("pre", Object.assign({ ref: ref, className: cn("scrollbar-none min-w-0 overflow-x-auto px-4 py-3.5 outline-none has-data-highlighted-line:px-0 has-data-line-numbers:px-0 has-data-[slot=tabs]:p-0", className) }, props, { children: children })));
|
|
18
18
|
});
|
|
19
19
|
TypographyPre.displayName = "TypographyPre";
|
|
20
20
|
export default TypographyPre;
|
|
@@ -14,7 +14,7 @@ import { forwardRef } from "react";
|
|
|
14
14
|
import cn from "../../cn";
|
|
15
15
|
const TypographyTable = forwardRef((_a, ref) => {
|
|
16
16
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
-
return (_jsx("div", { className: "my-6 scrollbar-
|
|
17
|
+
return (_jsx("div", { className: "my-6 scrollbar-none w-full overflow-y-auto rounded-lg border", children: _jsx("table", Object.assign({ ref: ref, className: cn("relative w-full overflow-hidden border-none text-sm [&_tbody_tr:last-child]:border-b-0", className) }, props)) }));
|
|
18
18
|
});
|
|
19
19
|
TypographyTable.displayName = "TypographyTable";
|
|
20
20
|
export default TypographyTable;
|
package/package.json
CHANGED
|
@@ -1,86 +1,94 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
2
|
+
"name": "@cmdniels/uikit",
|
|
3
|
+
"version": "1.4.6",
|
|
4
|
+
"private": false,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./out/index.js",
|
|
8
|
+
"types": "./out/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./out/index.d.ts",
|
|
12
|
+
"import": "./out/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./cn": {
|
|
15
|
+
"types": "./out/cn.d.ts",
|
|
16
|
+
"import": "./out/cn.js"
|
|
17
|
+
},
|
|
18
|
+
"./clerk": {
|
|
19
|
+
"types": "./out/clerk.d.ts",
|
|
20
|
+
"import": "./out/clerk.js"
|
|
21
|
+
},
|
|
22
|
+
"./tailwind.css": "./tailwind.css"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"out",
|
|
26
|
+
"tailwind.css",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"scripts": {
|
|
32
|
+
"format": "bunx prettier --write .",
|
|
33
|
+
"lint": "bunx eslint .",
|
|
34
|
+
"lint:fix": "bunx eslint --fix .",
|
|
35
|
+
"fix": "bun run lint:fix && bun run format",
|
|
36
|
+
"dev": "bunx ladle serve",
|
|
37
|
+
"build:docs": "bunx ladle build",
|
|
38
|
+
"preview": "bunx ladle preview",
|
|
39
|
+
"build": "bun run build:clean && bun run build:tsc && bun run build:alias",
|
|
40
|
+
"build:clean": "bunx rimraf out",
|
|
41
|
+
"build:tsc": "bunx tsc --project tsconfig.build.json",
|
|
42
|
+
"build:alias": "bunx tsc-alias -p tsconfig.build.json",
|
|
43
|
+
"prepublishOnly": "bun run build"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@clerk/themes": "^2.4.46",
|
|
47
|
+
"next": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
48
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
49
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
50
|
+
"recharts": "^3.6.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@base-ui/react": "^1.0.0",
|
|
54
|
+
"@dnd-kit/core": "^6.3.1",
|
|
55
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
56
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
57
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
58
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
59
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
60
|
+
"@tabler/icons-react": "^3.35.0",
|
|
61
|
+
"@tailwindcss/postcss": "^4",
|
|
62
|
+
"class-variance-authority": "^0.7.1",
|
|
63
|
+
"clsx": "^2.1.1",
|
|
64
|
+
"date-fns": "^4.1.0",
|
|
65
|
+
"motion": "^12.23.26",
|
|
66
|
+
"next-themes": "^0.4.6",
|
|
67
|
+
"react-day-picker": "^9.12.0",
|
|
68
|
+
"sonner": "^2.0.7",
|
|
69
|
+
"tailwind-merge": "^3.4.0",
|
|
70
|
+
"tailwindcss": "^4",
|
|
71
|
+
"tw-animate-css": "^1.4.0"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@clerk/themes": "^2.4.46",
|
|
75
|
+
"@cmdniels/eslint-config": "^1.0.1",
|
|
76
|
+
"@ladle/react": "^5.1.1",
|
|
77
|
+
"@types/node": "24.10.1",
|
|
78
|
+
"@types/react": "^19.2.7",
|
|
79
|
+
"@types/react-dom": "^19.2.3",
|
|
80
|
+
"eslint": "9.39.1",
|
|
81
|
+
"next": "^16.0.10",
|
|
82
|
+
"prettier": "~3.7.4",
|
|
83
|
+
"react": "19.2.1",
|
|
84
|
+
"react-dom": "19.2.1",
|
|
85
|
+
"shadcn": "^3.6.1",
|
|
86
|
+
"tsc-alias": "^1.8.16",
|
|
87
|
+
"typescript": "^5",
|
|
88
|
+
"vite": "^5.4.21"
|
|
89
|
+
},
|
|
90
|
+
"packageManager": "bun@1.3.0",
|
|
91
|
+
"engines": {
|
|
92
|
+
"bun": ">=1.3.0"
|
|
93
|
+
}
|
|
94
|
+
}
|
package/tailwind.css
CHANGED
|
@@ -118,11 +118,65 @@
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
scrollbar-
|
|
121
|
+
/* Scrollbar Classes */
|
|
122
|
+
@theme {
|
|
123
|
+
--scrollbar-thumb-color: var(--color-border);
|
|
124
|
+
--scrollbar-track-color: var(--color-background);
|
|
125
|
+
--scrollbar-gutter-modifier: "";
|
|
126
|
+
}
|
|
124
127
|
|
|
128
|
+
@utility scrollbar-none {
|
|
129
|
+
scrollbar-width: none;
|
|
125
130
|
&::-webkit-scrollbar {
|
|
126
131
|
display: none;
|
|
127
132
|
}
|
|
128
133
|
}
|
|
134
|
+
|
|
135
|
+
@utility scrollbar {
|
|
136
|
+
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
|
|
137
|
+
&::-webkit-scrollbar-thumb {
|
|
138
|
+
background-color: var(--scrollbar-thumb-color);
|
|
139
|
+
}
|
|
140
|
+
&::-webkit-scrollbar-track {
|
|
141
|
+
background-color: var(--scrollbar-track-color);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@utility scrollbar-stable {
|
|
146
|
+
scrollbar-gutter: stable var(--scrollbar-gutter-modifier);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@utility scrollbar-both-edges {
|
|
150
|
+
--scrollbar-gutter-modifier: both-edges;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@utility scrollbar-thumb-* {
|
|
154
|
+
--scrollbar-thumb-color: --value(--color-*);
|
|
155
|
+
|
|
156
|
+
scrollbar-arrow-color: var(--scrollbar-thumb-color);
|
|
157
|
+
&::-webkit-scrollbar-thumb {
|
|
158
|
+
background-color: var(--scrollbar-thumb-color);
|
|
159
|
+
}
|
|
160
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
161
|
+
background-color: var(--scrollbar-thumb-color);
|
|
162
|
+
}
|
|
163
|
+
&::-webkit-scrollbar-thumb:active {
|
|
164
|
+
background-color: var(--scrollbar-thumb-color);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@utility scrollbar-track-* {
|
|
169
|
+
--scrollbar-track-color: --value(--color-*);
|
|
170
|
+
|
|
171
|
+
scrollbar-track-color: var(--scrollbar-track-color);
|
|
172
|
+
scrollbar-darkshadow-color: var(--scrollbar-track-color);
|
|
173
|
+
&::-webkit-scrollbar-track {
|
|
174
|
+
background-color: var(--scrollbar-track-color);
|
|
175
|
+
}
|
|
176
|
+
&::-webkit-scrollbar-track:hover {
|
|
177
|
+
background-color: var(--scrollbar-track-color);
|
|
178
|
+
}
|
|
179
|
+
&::-webkit-scrollbar-track:active {
|
|
180
|
+
background-color: var(--scrollbar-track-color);
|
|
181
|
+
}
|
|
182
|
+
}
|