@pixpilot/shadcn-ui 1.28.0 → 1.29.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/dist/Button.cjs +5 -2
- package/dist/Button.js +4 -2
- package/dist/ButtonExtended.cjs +5 -2
- package/dist/ButtonExtended.js +4 -2
- package/dist/dialog/Dialog.d.cts +4 -4
- package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
- package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
- package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
- package/dist/file-upload-root/FileUploadRoot.d.ts +2 -2
- package/package.json +3 -2
package/dist/Button.cjs
CHANGED
|
@@ -6,16 +6,19 @@ let react = require("react");
|
|
|
6
6
|
react = require_rolldown_runtime.__toESM(react);
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
9
|
+
let __radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
10
|
+
__radix_ui_react_slot = require_rolldown_runtime.__toESM(__radix_ui_react_slot);
|
|
9
11
|
|
|
10
12
|
//#region src/Button.tsx
|
|
11
13
|
function Button(props) {
|
|
12
|
-
const { children, disabled, onClick, onDisabledClick, title, slots, className, variant, size, ref,...rest } = props;
|
|
14
|
+
const { children, disabled, onClick, onDisabledClick, title, slots, className, variant, size, asChild, ref,...rest } = props;
|
|
13
15
|
const handleClick = (0, react.useCallback)((e) => {
|
|
14
16
|
if (onClick && !disabled) onClick(e);
|
|
15
17
|
}, [disabled, onClick]);
|
|
16
18
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
|
|
17
19
|
...rest,
|
|
18
20
|
ref,
|
|
21
|
+
asChild,
|
|
19
22
|
disabled,
|
|
20
23
|
onClick: handleClick,
|
|
21
24
|
className: (0, __pixpilot_shadcn.cn)("relative", className),
|
|
@@ -29,7 +32,7 @@ function Button(props) {
|
|
|
29
32
|
pointerEvents: "all",
|
|
30
33
|
cursor: "not-allowed"
|
|
31
34
|
}
|
|
32
|
-
}), children]
|
|
35
|
+
}), asChild ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slot.Slottable, { children }) : children]
|
|
33
36
|
});
|
|
34
37
|
}
|
|
35
38
|
Button.displayName = "Button";
|
package/dist/Button.js
CHANGED
|
@@ -2,16 +2,18 @@ import { AbsoluteFill } from "./AbsoluteFill.js";
|
|
|
2
2
|
import { Button, cn } from "@pixpilot/shadcn";
|
|
3
3
|
import React, { useCallback } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
5
6
|
|
|
6
7
|
//#region src/Button.tsx
|
|
7
8
|
function Button$1(props) {
|
|
8
|
-
const { children, disabled, onClick, onDisabledClick, title, slots, className, variant, size, ref,...rest } = props;
|
|
9
|
+
const { children, disabled, onClick, onDisabledClick, title, slots, className, variant, size, asChild, ref,...rest } = props;
|
|
9
10
|
const handleClick = useCallback((e) => {
|
|
10
11
|
if (onClick && !disabled) onClick(e);
|
|
11
12
|
}, [disabled, onClick]);
|
|
12
13
|
return /* @__PURE__ */ jsxs(Button, {
|
|
13
14
|
...rest,
|
|
14
15
|
ref,
|
|
16
|
+
asChild,
|
|
15
17
|
disabled,
|
|
16
18
|
onClick: handleClick,
|
|
17
19
|
className: cn("relative", className),
|
|
@@ -25,7 +27,7 @@ function Button$1(props) {
|
|
|
25
27
|
pointerEvents: "all",
|
|
26
28
|
cursor: "not-allowed"
|
|
27
29
|
}
|
|
28
|
-
}), children]
|
|
30
|
+
}), asChild ? /* @__PURE__ */ jsx(Slottable, { children }) : children]
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
Button$1.displayName = "Button";
|
package/dist/ButtonExtended.cjs
CHANGED
|
@@ -8,6 +8,8 @@ let react = require("react");
|
|
|
8
8
|
react = require_rolldown_runtime.__toESM(react);
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
11
|
+
let __radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
12
|
+
__radix_ui_react_slot = require_rolldown_runtime.__toESM(__radix_ui_react_slot);
|
|
11
13
|
|
|
12
14
|
//#region src/ButtonExtended.tsx
|
|
13
15
|
const LOADER_SIZE_SM = 14;
|
|
@@ -30,7 +32,7 @@ function renderTooltipContent(content) {
|
|
|
30
32
|
return content;
|
|
31
33
|
}
|
|
32
34
|
function ButtonExtended(props) {
|
|
33
|
-
const { children, disabled, onClick, disabledTooltip, loading, loaderProps, onDisabledClick, tooltip, title, slots, className, variant, size, ref,...rest } = props;
|
|
35
|
+
const { children, disabled, onClick, disabledTooltip, loading, loaderProps, onDisabledClick, tooltip, title, slots, className, variant, size, asChild, ref,...rest } = props;
|
|
34
36
|
const { placement: loaderPlacement = "end" } = loaderProps || {};
|
|
35
37
|
const handleClick = (0, react.useCallback)((e) => {
|
|
36
38
|
if (onClick && !disabled) onClick(e);
|
|
@@ -56,6 +58,7 @@ function ButtonExtended(props) {
|
|
|
56
58
|
const buttonContent = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
|
|
57
59
|
...rest,
|
|
58
60
|
ref,
|
|
61
|
+
asChild,
|
|
59
62
|
disabled: isDisabled,
|
|
60
63
|
onClick: handleClick,
|
|
61
64
|
className: (0, __pixpilot_shadcn.cn)("relative", className),
|
|
@@ -81,7 +84,7 @@ function ButtonExtended(props) {
|
|
|
81
84
|
})]
|
|
82
85
|
}),
|
|
83
86
|
loading && loaderPlacement === "start" && Loader,
|
|
84
|
-
children,
|
|
87
|
+
asChild ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slot.Slottable, { children }) : children,
|
|
85
88
|
loading && (loaderPlacement === "end" || loaderPlacement === "center") && Loader
|
|
86
89
|
]
|
|
87
90
|
});
|
package/dist/ButtonExtended.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Button, Tooltip, TooltipContent, TooltipTrigger, cn } from "@pixpilot/s
|
|
|
3
3
|
import { Loader2 } from "lucide-react";
|
|
4
4
|
import React, { useCallback } from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
6
7
|
|
|
7
8
|
//#region src/ButtonExtended.tsx
|
|
8
9
|
const LOADER_SIZE_SM = 14;
|
|
@@ -25,7 +26,7 @@ function renderTooltipContent(content) {
|
|
|
25
26
|
return content;
|
|
26
27
|
}
|
|
27
28
|
function ButtonExtended(props) {
|
|
28
|
-
const { children, disabled, onClick, disabledTooltip, loading, loaderProps, onDisabledClick, tooltip, title, slots, className, variant, size, ref,...rest } = props;
|
|
29
|
+
const { children, disabled, onClick, disabledTooltip, loading, loaderProps, onDisabledClick, tooltip, title, slots, className, variant, size, asChild, ref,...rest } = props;
|
|
29
30
|
const { placement: loaderPlacement = "end" } = loaderProps || {};
|
|
30
31
|
const handleClick = useCallback((e) => {
|
|
31
32
|
if (onClick && !disabled) onClick(e);
|
|
@@ -51,6 +52,7 @@ function ButtonExtended(props) {
|
|
|
51
52
|
const buttonContent = /* @__PURE__ */ jsxs(Button, {
|
|
52
53
|
...rest,
|
|
53
54
|
ref,
|
|
55
|
+
asChild,
|
|
54
56
|
disabled: isDisabled,
|
|
55
57
|
onClick: handleClick,
|
|
56
58
|
className: cn("relative", className),
|
|
@@ -76,7 +78,7 @@ function ButtonExtended(props) {
|
|
|
76
78
|
})]
|
|
77
79
|
}),
|
|
78
80
|
loading && loaderPlacement === "start" && Loader,
|
|
79
|
-
children,
|
|
81
|
+
asChild ? /* @__PURE__ */ jsx(Slottable, { children }) : children,
|
|
80
82
|
loading && (loaderPlacement === "end" || loaderPlacement === "center") && Loader
|
|
81
83
|
]
|
|
82
84
|
});
|
package/dist/dialog/Dialog.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
import { DialogContent } from "@pixpilot/shadcn";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
@@ -13,14 +13,14 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<Omit<_radix_ui_
|
|
|
13
13
|
declare function DialogHeader({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
16
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
|
|
17
17
|
declare function DialogBody({
|
|
18
18
|
className,
|
|
19
19
|
...props
|
|
20
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
20
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
|
|
21
21
|
declare function DialogFooter({
|
|
22
22
|
className,
|
|
23
23
|
...props
|
|
24
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
24
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { DialogBody, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-inline/FileUploadInline.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadInline(props: FileUploadInlineProps):
|
|
8
|
+
declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime9.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FileUploadInline };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-inline/FileUploadInline.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadInline(props: FileUploadInlineProps):
|
|
8
|
+
declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime12.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FileUploadInline };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileUploadRootProps } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-root/FileUploadRoot.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadRoot(props: FileUploadRootProps):
|
|
8
|
+
declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime10.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileUploadRootProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-root/FileUploadRoot.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadRoot(props: FileUploadRootProps):
|
|
8
|
+
declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime13.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixpilot/shadcn-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.29.0",
|
|
5
5
|
"description": "Custom UI components and utilities built with shadcn/ui.",
|
|
6
6
|
"author": "m.doaie <m.doaie@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@iconify/react": "^6.0.2",
|
|
35
35
|
"@pixpilot/hash": "^0.2.0",
|
|
36
36
|
"@pixpilot/string": "^3.0.0",
|
|
37
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
37
38
|
"@tailwindcss/typography": "^0.5.19",
|
|
38
39
|
"@tanstack/react-virtual": "^3.13.23",
|
|
39
40
|
"@tiptap/core": "^3.22.3",
|
|
@@ -65,8 +66,8 @@
|
|
|
65
66
|
"typescript": "^5.9.3",
|
|
66
67
|
"@internal/eslint-config": "0.3.0",
|
|
67
68
|
"@internal/hooks": "0.0.0",
|
|
68
|
-
"@internal/tsconfig": "0.1.0",
|
|
69
69
|
"@internal/prettier-config": "0.0.1",
|
|
70
|
+
"@internal/tsconfig": "0.1.0",
|
|
70
71
|
"@internal/tsdown-config": "0.1.0",
|
|
71
72
|
"@internal/vitest-config": "0.1.0"
|
|
72
73
|
},
|