@pixpilot/shadcn-ui 1.6.0 → 1.8.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/Rating.d.cts +1 -1
- package/dist/Rating.d.ts +1 -1
- package/dist/avatar-upload/AvatarUpload.cjs +6 -4
- package/dist/avatar-upload/AvatarUpload.js +6 -4
- package/dist/avatar-upload/AvatarUploadItem.cjs +2 -2
- package/dist/avatar-upload/AvatarUploadItem.js +2 -2
- package/dist/dialog/Dialog.d.cts +4 -4
- package/dist/dialog/Dialog.d.ts +4 -4
- package/dist/file-upload/FileUpload.cjs +8 -3
- package/dist/file-upload/FileUpload.d.cts +2 -2
- package/dist/file-upload/FileUpload.d.ts +2 -2
- package/dist/file-upload/FileUpload.js +8 -3
- package/dist/file-upload/FileUploadItems.cjs +4 -2
- package/dist/file-upload/FileUploadItems.js +4 -2
- package/dist/file-upload/FileUploadListItem.cjs +7 -1
- package/dist/file-upload/FileUploadListItem.js +7 -1
- package/dist/file-upload/hooks/index.cjs +1 -1
- package/dist/file-upload/hooks/index.js +1 -1
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +3 -3
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +3 -3
- package/dist/file-upload/index.cjs +2 -2
- package/dist/file-upload/index.d.cts +1 -1
- package/dist/file-upload/index.d.ts +1 -1
- package/dist/file-upload/index.js +2 -2
- package/dist/file-upload/types/index.d.cts +14 -7
- package/dist/file-upload/types/index.d.ts +14 -7
- package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
- package/dist/file-upload-root/FileUploadRoot.cjs +5 -1
- package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
- package/dist/file-upload-root/FileUploadRoot.js +5 -1
- package/dist/file-upload-root/FileUploadRootItem.cjs +2 -2
- package/dist/file-upload-root/FileUploadRootItem.d.cts +2 -3
- package/dist/file-upload-root/FileUploadRootItem.d.ts +2 -3
- package/dist/file-upload-root/FileUploadRootItem.js +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/input/Input.d.cts +2 -2
- package/dist/tags-input/TagsInput.d.cts +2 -2
- package/dist/tags-input/TagsInput.d.ts +2 -2
- package/dist/tags-input/TagsInputInline.d.cts +2 -2
- package/dist/tags-input/TagsInputInline.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeDropdown.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeToggleButton.d.ts +2 -2
- package/package.json +2 -2
package/dist/Rating.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ interface RatingOption {
|
|
|
10
10
|
value: number;
|
|
11
11
|
}
|
|
12
12
|
declare const ratingVariants: (props?: ({
|
|
13
|
-
size?: "
|
|
13
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
15
15
|
type RatingSize = VariantProps<typeof ratingVariants>['size'];
|
|
16
16
|
type IconType = 'star' | 'circle';
|
package/dist/Rating.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ interface RatingOption {
|
|
|
10
10
|
value: number;
|
|
11
11
|
}
|
|
12
12
|
declare const ratingVariants: (props?: ({
|
|
13
|
-
size?: "
|
|
13
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
15
15
|
type RatingSize = VariantProps<typeof ratingVariants>['size'];
|
|
16
16
|
type IconType = 'star' | 'circle';
|
|
@@ -33,23 +33,25 @@ const sizeClasses = {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
const AvatarUpload = (props) => {
|
|
36
|
-
const { className, messages, value, onAccept,
|
|
36
|
+
const { className, messages, value, onAccept, onSuccess, onError, size = "md",...rest } = props;
|
|
37
37
|
const { upload = "Upload", change = "Change" } = messages || {};
|
|
38
38
|
const currentSize = sizeClasses[size];
|
|
39
39
|
const [files, setFiles] = react.default.useState([]);
|
|
40
40
|
const imageUrl = value?.url;
|
|
41
41
|
const handleAccept = react.default.useCallback((acceptedFiles) => {
|
|
42
|
-
|
|
42
|
+
const nextFiles = acceptedFiles.slice(0, 1);
|
|
43
|
+
setFiles(nextFiles.map((file) => {
|
|
43
44
|
return {
|
|
44
45
|
file,
|
|
45
46
|
id: `${file.name}-${file.lastModified.toString()}`
|
|
46
47
|
};
|
|
47
48
|
}));
|
|
48
|
-
onAccept?.(
|
|
49
|
+
onAccept?.(nextFiles);
|
|
49
50
|
}, [onAccept]);
|
|
50
51
|
const hasImageUrl = imageUrl != null;
|
|
51
52
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUpload, {
|
|
52
53
|
...rest,
|
|
54
|
+
multiple: false,
|
|
53
55
|
onAccept: handleAccept,
|
|
54
56
|
className: require_utils.cn("w-fit", className),
|
|
55
57
|
accept: "image/*",
|
|
@@ -60,7 +62,7 @@ const AvatarUpload = (props) => {
|
|
|
60
62
|
index: i,
|
|
61
63
|
currentSize,
|
|
62
64
|
change,
|
|
63
|
-
|
|
65
|
+
onSuccess,
|
|
64
66
|
onError
|
|
65
67
|
}, id)) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_AvatarUploadComponents.MainWrapper, {
|
|
66
68
|
currentSize,
|
|
@@ -28,23 +28,25 @@ const sizeClasses = {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
const AvatarUpload = (props) => {
|
|
31
|
-
const { className, messages, value, onAccept,
|
|
31
|
+
const { className, messages, value, onAccept, onSuccess, onError, size = "md",...rest } = props;
|
|
32
32
|
const { upload = "Upload", change = "Change" } = messages || {};
|
|
33
33
|
const currentSize = sizeClasses[size];
|
|
34
34
|
const [files, setFiles] = React.useState([]);
|
|
35
35
|
const imageUrl = value?.url;
|
|
36
36
|
const handleAccept = React.useCallback((acceptedFiles) => {
|
|
37
|
-
|
|
37
|
+
const nextFiles = acceptedFiles.slice(0, 1);
|
|
38
|
+
setFiles(nextFiles.map((file) => {
|
|
38
39
|
return {
|
|
39
40
|
file,
|
|
40
41
|
id: `${file.name}-${file.lastModified.toString()}`
|
|
41
42
|
};
|
|
42
43
|
}));
|
|
43
|
-
onAccept?.(
|
|
44
|
+
onAccept?.(nextFiles);
|
|
44
45
|
}, [onAccept]);
|
|
45
46
|
const hasImageUrl = imageUrl != null;
|
|
46
47
|
return /* @__PURE__ */ jsx(FileUpload, {
|
|
47
48
|
...rest,
|
|
49
|
+
multiple: false,
|
|
48
50
|
onAccept: handleAccept,
|
|
49
51
|
className: cn$1("w-fit", className),
|
|
50
52
|
accept: "image/*",
|
|
@@ -55,7 +57,7 @@ const AvatarUpload = (props) => {
|
|
|
55
57
|
index: i,
|
|
56
58
|
currentSize,
|
|
57
59
|
change,
|
|
58
|
-
|
|
60
|
+
onSuccess,
|
|
59
61
|
onError
|
|
60
62
|
}, id)) }) : /* @__PURE__ */ jsxs(MainWrapper, {
|
|
61
63
|
currentSize,
|
|
@@ -12,9 +12,9 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
12
12
|
|
|
13
13
|
//#region src/avatar-upload/AvatarUploadItem.tsx
|
|
14
14
|
const AvatarUploadItem = (props) => {
|
|
15
|
-
const { file, currentSize, change,
|
|
15
|
+
const { file, currentSize, change, onSuccess, onError } = props;
|
|
16
16
|
require_use_file_upload_progress_callbacks.useFileUploadProgressCallbacks(file, {
|
|
17
|
-
|
|
17
|
+
onSuccess,
|
|
18
18
|
onError
|
|
19
19
|
});
|
|
20
20
|
const fileError = require_use_file_error.useFileError(file);
|
|
@@ -8,9 +8,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
|
|
9
9
|
//#region src/avatar-upload/AvatarUploadItem.tsx
|
|
10
10
|
const AvatarUploadItem = (props) => {
|
|
11
|
-
const { file, currentSize, change,
|
|
11
|
+
const { file, currentSize, change, onSuccess, onError } = props;
|
|
12
12
|
useFileUploadProgressCallbacks(file, {
|
|
13
|
-
|
|
13
|
+
onSuccess,
|
|
14
14
|
onError
|
|
15
15
|
});
|
|
16
16
|
const fileError = useFileError(file);
|
package/dist/dialog/Dialog.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 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_runtime9.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_runtime9.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_runtime9.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { DialogBody, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
|
package/dist/dialog/Dialog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DialogContent } from "@pixpilot/shadcn";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
4
4
|
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
5
5
|
|
|
6
6
|
//#region src/dialog/Dialog.d.ts
|
|
@@ -13,14 +13,14 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<Omit<_radix_ui_
|
|
|
13
13
|
declare function DialogHeader$1({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
16
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.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_runtime9.JSX.Element;
|
|
21
21
|
declare function DialogFooter$1({
|
|
22
22
|
className,
|
|
23
23
|
...props
|
|
24
|
-
}: React$1.HTMLAttributes<HTMLDivElement>):
|
|
24
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { DialogBody, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter$1 as DialogFooter, DialogHeader$1 as DialogHeader };
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
-
const require_FileUploadItems = require('./FileUploadItems.cjs');
|
|
6
5
|
const require_use_file_upload_store = require('./hooks/use-file-upload-store.cjs');
|
|
6
|
+
const require_FileUploadItems = require('./FileUploadItems.cjs');
|
|
7
7
|
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
8
8
|
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
9
9
|
let lucide_react = require("lucide-react");
|
|
@@ -15,7 +15,10 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
15
15
|
|
|
16
16
|
//#region src/file-upload/FileUpload.tsx
|
|
17
17
|
function FileUpload(props) {
|
|
18
|
-
const { value, onChange, className,
|
|
18
|
+
const { value, onChange, className, onAccept, maxFiles, preventDuplicates, onFileReject, onSuccess: singleOnSuccess, onError: singleOnError, onFileSuccess, onFileError,...rest } = props;
|
|
19
|
+
const multiple = props.multiple ?? true;
|
|
20
|
+
const onSuccess = multiple ? onFileSuccess : singleOnSuccess;
|
|
21
|
+
const onError = multiple ? onFileError : singleOnError;
|
|
19
22
|
const { handleAccept, displayFiles, deleteFile, getFile, orgValue } = require_use_file_upload_store.useFileUploadStore({
|
|
20
23
|
value,
|
|
21
24
|
onChange,
|
|
@@ -31,7 +34,7 @@ function FileUpload(props) {
|
|
|
31
34
|
const handleError = react.useCallback((file, message) => {
|
|
32
35
|
if (onFileReject) onFileReject(file, message);
|
|
33
36
|
if (onError) onError(file, message);
|
|
34
|
-
}, []);
|
|
37
|
+
}, [onError, onFileReject]);
|
|
35
38
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUpload, {
|
|
36
39
|
...rest,
|
|
37
40
|
value: orgValue,
|
|
@@ -63,6 +66,8 @@ function FileUpload(props) {
|
|
|
63
66
|
getFile,
|
|
64
67
|
maxFiles,
|
|
65
68
|
itemSize,
|
|
69
|
+
onSuccess,
|
|
70
|
+
onError,
|
|
66
71
|
className: containerClasses
|
|
67
72
|
})
|
|
68
73
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUploadProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload/FileUpload.d.ts
|
|
5
|
-
declare function FileUpload(props: FileUploadProps):
|
|
5
|
+
declare function FileUpload(props: FileUploadProps): react_jsx_runtime8.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FileUpload };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUploadProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload/FileUpload.d.ts
|
|
5
|
-
declare function FileUpload(props: FileUploadProps):
|
|
5
|
+
declare function FileUpload(props: FileUploadProps): react_jsx_runtime8.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FileUpload };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import { FileUploadItems } from "./FileUploadItems.js";
|
|
5
4
|
import { useFileUploadStore } from "./hooks/use-file-upload-store.js";
|
|
5
|
+
import { FileUploadItems } from "./FileUploadItems.js";
|
|
6
6
|
import { FileUpload, FileUploadDropzone, cn } from "@pixpilot/shadcn";
|
|
7
7
|
import { Upload } from "lucide-react";
|
|
8
8
|
import * as React$1 from "react";
|
|
@@ -10,7 +10,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
|
|
11
11
|
//#region src/file-upload/FileUpload.tsx
|
|
12
12
|
function FileUpload$1(props) {
|
|
13
|
-
const { value, onChange, className,
|
|
13
|
+
const { value, onChange, className, onAccept, maxFiles, preventDuplicates, onFileReject, onSuccess: singleOnSuccess, onError: singleOnError, onFileSuccess, onFileError,...rest } = props;
|
|
14
|
+
const multiple = props.multiple ?? true;
|
|
15
|
+
const onSuccess = multiple ? onFileSuccess : singleOnSuccess;
|
|
16
|
+
const onError = multiple ? onFileError : singleOnError;
|
|
14
17
|
const { handleAccept, displayFiles, deleteFile, getFile, orgValue } = useFileUploadStore({
|
|
15
18
|
value,
|
|
16
19
|
onChange,
|
|
@@ -26,7 +29,7 @@ function FileUpload$1(props) {
|
|
|
26
29
|
const handleError = React$1.useCallback((file, message) => {
|
|
27
30
|
if (onFileReject) onFileReject(file, message);
|
|
28
31
|
if (onError) onError(file, message);
|
|
29
|
-
}, []);
|
|
32
|
+
}, [onError, onFileReject]);
|
|
30
33
|
return /* @__PURE__ */ jsx(FileUpload, {
|
|
31
34
|
...rest,
|
|
32
35
|
value: orgValue,
|
|
@@ -58,6 +61,8 @@ function FileUpload$1(props) {
|
|
|
58
61
|
getFile,
|
|
59
62
|
maxFiles,
|
|
60
63
|
itemSize,
|
|
64
|
+
onSuccess,
|
|
65
|
+
onError,
|
|
61
66
|
className: containerClasses
|
|
62
67
|
})
|
|
63
68
|
})
|
|
@@ -11,7 +11,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
11
11
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
12
12
|
|
|
13
13
|
//#region src/file-upload/FileUploadItems.tsx
|
|
14
|
-
function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize, className }) {
|
|
14
|
+
function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize, onSuccess, onError, className }) {
|
|
15
15
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.FileUploadList, {
|
|
16
16
|
orientation: "horizontal",
|
|
17
17
|
forceMount: true,
|
|
@@ -23,7 +23,9 @@ function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize
|
|
|
23
23
|
fileMeta,
|
|
24
24
|
deleteFile,
|
|
25
25
|
getFile,
|
|
26
|
-
itemSize
|
|
26
|
+
itemSize,
|
|
27
|
+
onSuccess,
|
|
28
|
+
onError
|
|
27
29
|
}, key);
|
|
28
30
|
}), maxFiles === void 0 || displayFiles.length < maxFiles ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
29
31
|
className: (0, __pixpilot_shadcn.cn)(itemSize, "flex items-center justify-center border-2 border-dashed rounded-md"),
|
|
@@ -7,7 +7,7 @@ import { Plus } from "lucide-react";
|
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/file-upload/FileUploadItems.tsx
|
|
10
|
-
function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize, className }) {
|
|
10
|
+
function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize, onSuccess, onError, className }) {
|
|
11
11
|
return /* @__PURE__ */ jsxs(FileUploadList, {
|
|
12
12
|
orientation: "horizontal",
|
|
13
13
|
forceMount: true,
|
|
@@ -19,7 +19,9 @@ function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize
|
|
|
19
19
|
fileMeta,
|
|
20
20
|
deleteFile,
|
|
21
21
|
getFile,
|
|
22
|
-
itemSize
|
|
22
|
+
itemSize,
|
|
23
|
+
onSuccess,
|
|
24
|
+
onError
|
|
23
25
|
}, key);
|
|
24
26
|
}), maxFiles === void 0 || displayFiles.length < maxFiles ? /* @__PURE__ */ jsx("div", {
|
|
25
27
|
className: cn(itemSize, "flex items-center justify-center border-2 border-dashed rounded-md"),
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_use_file_upload_progress_callbacks = require('./hooks/use-file-upload-progress-callbacks.cjs');
|
|
6
|
+
require('./hooks/index.cjs');
|
|
5
7
|
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
6
8
|
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
7
9
|
let lucide_react = require("lucide-react");
|
|
@@ -20,8 +22,12 @@ const Backdrop = ({ className, children }) => {
|
|
|
20
22
|
children
|
|
21
23
|
});
|
|
22
24
|
};
|
|
23
|
-
const FileUploadListItem = react.default.memo(({ fileMeta, deleteFile, getFile, itemSize }) => {
|
|
25
|
+
const FileUploadListItem = react.default.memo(({ fileMeta, deleteFile, getFile, itemSize, onSuccess, onError }) => {
|
|
24
26
|
const file = getFile(fileMeta);
|
|
27
|
+
require_use_file_upload_progress_callbacks.useFileUploadProgressCallbacks(file, {
|
|
28
|
+
onSuccess,
|
|
29
|
+
onError
|
|
30
|
+
});
|
|
25
31
|
const storeFile = (0, __pixpilot_shadcn.useFileUpload)((store) => store.files.get(file));
|
|
26
32
|
const hasError = storeFile?.error != null;
|
|
27
33
|
const url = typeof fileMeta.url === "string" ? fileMeta.url : "";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
import { useFileUploadProgressCallbacks } from "./hooks/use-file-upload-progress-callbacks.js";
|
|
5
|
+
import "./hooks/index.js";
|
|
4
6
|
import { Button, FileUploadItem, FileUploadItemMetadata, FileUploadItemPreview, FileUploadItemProgress, Tooltip, TooltipContent, TooltipTrigger, cn, useFileUpload } from "@pixpilot/shadcn";
|
|
5
7
|
import { AlertTriangle, X } from "lucide-react";
|
|
6
8
|
import React from "react";
|
|
@@ -14,8 +16,12 @@ const Backdrop = ({ className, children }) => {
|
|
|
14
16
|
children
|
|
15
17
|
});
|
|
16
18
|
};
|
|
17
|
-
const FileUploadListItem = React.memo(({ fileMeta, deleteFile, getFile, itemSize }) => {
|
|
19
|
+
const FileUploadListItem = React.memo(({ fileMeta, deleteFile, getFile, itemSize, onSuccess, onError }) => {
|
|
18
20
|
const file = getFile(fileMeta);
|
|
21
|
+
useFileUploadProgressCallbacks(file, {
|
|
22
|
+
onSuccess,
|
|
23
|
+
onError
|
|
24
|
+
});
|
|
19
25
|
const storeFile = useFileUpload((store) => store.files.get(file));
|
|
20
26
|
const hasError = storeFile?.error != null;
|
|
21
27
|
const url = typeof fileMeta.url === "string" ? fileMeta.url : "";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const require_use_file_upload_store = require('./use-file-upload-store.cjs');
|
|
2
1
|
const require_use_file_error = require('./use-file-error.cjs');
|
|
3
2
|
const require_use_file_upload_progress_callbacks = require('./use-file-upload-progress-callbacks.cjs');
|
|
3
|
+
const require_use_file_upload_store = require('./use-file-upload-store.cjs');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { useFileUploadStore } from "./use-file-upload-store.js";
|
|
2
1
|
import { useFileError } from "./use-file-error.js";
|
|
3
2
|
import { useFileUploadProgressCallbacks } from "./use-file-upload-progress-callbacks.js";
|
|
3
|
+
import { useFileUploadStore } from "./use-file-upload-store.js";
|
|
@@ -7,7 +7,7 @@ react = require_rolldown_runtime.__toESM(react);
|
|
|
7
7
|
|
|
8
8
|
//#region src/file-upload/hooks/use-file-upload-progress-callbacks.ts
|
|
9
9
|
function useFileUploadProgressCallbacks(file, callBacks) {
|
|
10
|
-
const {
|
|
10
|
+
const { onSuccess, onError } = callBacks;
|
|
11
11
|
const fileMeta = (0, react.useMemo)(() => require_get_file_meta.getFileMeta(file), [file]);
|
|
12
12
|
const isChangeTrigged = (0, react.useRef)(false);
|
|
13
13
|
const isErrorTriggered = (0, react.useRef)(false);
|
|
@@ -27,11 +27,11 @@ function useFileUploadProgressCallbacks(file, callBacks) {
|
|
|
27
27
|
(0, react.useEffect)(() => {
|
|
28
28
|
if (isUploadSuccess && !isChangeTrigged.current) {
|
|
29
29
|
isChangeTrigged.current = true;
|
|
30
|
-
|
|
30
|
+
onSuccess?.(fileMeta);
|
|
31
31
|
}
|
|
32
32
|
}, [
|
|
33
33
|
isUploadSuccess,
|
|
34
|
-
|
|
34
|
+
onSuccess,
|
|
35
35
|
fileMeta
|
|
36
36
|
]);
|
|
37
37
|
(0, react.useEffect)(() => {
|
|
@@ -4,7 +4,7 @@ import { useEffect, useMemo, useRef } from "react";
|
|
|
4
4
|
|
|
5
5
|
//#region src/file-upload/hooks/use-file-upload-progress-callbacks.ts
|
|
6
6
|
function useFileUploadProgressCallbacks(file, callBacks) {
|
|
7
|
-
const {
|
|
7
|
+
const { onSuccess, onError } = callBacks;
|
|
8
8
|
const fileMeta = useMemo(() => getFileMeta(file), [file]);
|
|
9
9
|
const isChangeTrigged = useRef(false);
|
|
10
10
|
const isErrorTriggered = useRef(false);
|
|
@@ -24,11 +24,11 @@ function useFileUploadProgressCallbacks(file, callBacks) {
|
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
if (isUploadSuccess && !isChangeTrigged.current) {
|
|
26
26
|
isChangeTrigged.current = true;
|
|
27
|
-
|
|
27
|
+
onSuccess?.(fileMeta);
|
|
28
28
|
}
|
|
29
29
|
}, [
|
|
30
30
|
isUploadSuccess,
|
|
31
|
-
|
|
31
|
+
onSuccess,
|
|
32
32
|
fileMeta
|
|
33
33
|
]);
|
|
34
34
|
useEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_file_upload_store = require('./hooks/use-file-upload-store.cjs');
|
|
2
|
-
const require_FileUpload = require('./FileUpload.cjs');
|
|
3
1
|
const require_use_file_error = require('./hooks/use-file-error.cjs');
|
|
4
2
|
const require_use_file_upload_progress_callbacks = require('./hooks/use-file-upload-progress-callbacks.cjs');
|
|
3
|
+
const require_use_file_upload_store = require('./hooks/use-file-upload-store.cjs');
|
|
5
4
|
require('./hooks/index.cjs');
|
|
5
|
+
const require_FileUpload = require('./FileUpload.cjs');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps } from "./types/index.cjs";
|
|
1
|
+
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps, UseFileCallbacks } from "./types/index.cjs";
|
|
2
2
|
import { FileUpload } from "./FileUpload.cjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps } from "./types/index.js";
|
|
1
|
+
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps, UseFileCallbacks } from "./types/index.js";
|
|
2
2
|
import { FileUpload } from "./FileUpload.js";
|
|
3
3
|
import "./hooks/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFileUploadStore } from "./hooks/use-file-upload-store.js";
|
|
2
|
-
import { FileUpload } from "./FileUpload.js";
|
|
3
1
|
import { useFileError } from "./hooks/use-file-error.js";
|
|
4
2
|
import { useFileUploadProgressCallbacks } from "./hooks/use-file-upload-progress-callbacks.js";
|
|
3
|
+
import { useFileUploadStore } from "./hooks/use-file-upload-store.js";
|
|
5
4
|
import "./hooks/index.js";
|
|
5
|
+
import { FileUpload } from "./FileUpload.js";
|
|
@@ -8,29 +8,36 @@ interface FileMetadata {
|
|
|
8
8
|
url?: string;
|
|
9
9
|
lastModified: number;
|
|
10
10
|
}
|
|
11
|
+
interface UseFileCallbacks {
|
|
12
|
+
onSuccess?: (fileMeta: FileMetadata) => void;
|
|
13
|
+
onError?: (file: File, error: string) => void;
|
|
14
|
+
}
|
|
15
|
+
interface MultiFileCallbacks {
|
|
16
|
+
onFileSuccess?: (fileMeta: FileMetadata) => void;
|
|
17
|
+
onFileError?: (file: File, error: string) => void;
|
|
18
|
+
}
|
|
11
19
|
type OnChangeSingleFile = (file: FileMetadata | null) => void;
|
|
12
20
|
type OnChangeMultipleFiles = (files: FileMetadata[]) => void;
|
|
13
21
|
type MainFileUploadProps = Omit<FileUploadProps, 'value' | 'onError'>;
|
|
14
22
|
interface FileUploadBaseProps extends MainFileUploadProps {
|
|
15
23
|
preventDuplicates?: boolean;
|
|
16
|
-
onError?: (file: File, error: string) => void;
|
|
17
24
|
}
|
|
18
25
|
type FileUploadProps$1 = ({
|
|
19
26
|
multiple: true;
|
|
20
27
|
value?: FileMetadata[];
|
|
21
28
|
onChange?: OnChangeMultipleFiles;
|
|
22
|
-
} & FileUploadBaseProps) | ({
|
|
29
|
+
} & FileUploadBaseProps & MultiFileCallbacks) | ({
|
|
23
30
|
multiple?: false;
|
|
24
31
|
value?: FileMetadata | null;
|
|
25
32
|
onChange?: OnChangeSingleFile;
|
|
26
|
-
} & FileUploadBaseProps);
|
|
27
|
-
interface MultiFileUploadProps extends FileUploadBaseProps {
|
|
33
|
+
} & FileUploadBaseProps & UseFileCallbacks);
|
|
34
|
+
interface MultiFileUploadProps extends FileUploadBaseProps, MultiFileCallbacks {
|
|
28
35
|
value?: FileMetadata[];
|
|
29
36
|
onChange?: OnChangeMultipleFiles;
|
|
30
37
|
}
|
|
31
|
-
interface SingleFileUploadProps extends Omit<FileUploadBaseProps, 'multiple'
|
|
38
|
+
interface SingleFileUploadProps extends Omit<FileUploadBaseProps, 'multiple'>, UseFileCallbacks {
|
|
32
39
|
value?: FileMetadata | null;
|
|
33
|
-
onChange?:
|
|
40
|
+
onChange?: OnChangeSingleFile;
|
|
34
41
|
}
|
|
35
42
|
interface FileUploadProgressCallBacks {
|
|
36
43
|
onProgress: (file: File, progress: number) => void;
|
|
@@ -38,4 +45,4 @@ interface FileUploadProgressCallBacks {
|
|
|
38
45
|
onError: (file: File, error: Error) => void;
|
|
39
46
|
}
|
|
40
47
|
//#endregion
|
|
41
|
-
export { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps$1 as FileUploadProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps };
|
|
48
|
+
export { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps$1 as FileUploadProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps, UseFileCallbacks };
|
|
@@ -8,29 +8,36 @@ interface FileMetadata {
|
|
|
8
8
|
url?: string;
|
|
9
9
|
lastModified: number;
|
|
10
10
|
}
|
|
11
|
+
interface UseFileCallbacks {
|
|
12
|
+
onSuccess?: (fileMeta: FileMetadata) => void;
|
|
13
|
+
onError?: (file: File, error: string) => void;
|
|
14
|
+
}
|
|
15
|
+
interface MultiFileCallbacks {
|
|
16
|
+
onFileSuccess?: (fileMeta: FileMetadata) => void;
|
|
17
|
+
onFileError?: (file: File, error: string) => void;
|
|
18
|
+
}
|
|
11
19
|
type OnChangeSingleFile = (file: FileMetadata | null) => void;
|
|
12
20
|
type OnChangeMultipleFiles = (files: FileMetadata[]) => void;
|
|
13
21
|
type MainFileUploadProps = Omit<FileUploadProps, 'value' | 'onError'>;
|
|
14
22
|
interface FileUploadBaseProps extends MainFileUploadProps {
|
|
15
23
|
preventDuplicates?: boolean;
|
|
16
|
-
onError?: (file: File, error: string) => void;
|
|
17
24
|
}
|
|
18
25
|
type FileUploadProps$1 = ({
|
|
19
26
|
multiple: true;
|
|
20
27
|
value?: FileMetadata[];
|
|
21
28
|
onChange?: OnChangeMultipleFiles;
|
|
22
|
-
} & FileUploadBaseProps) | ({
|
|
29
|
+
} & FileUploadBaseProps & MultiFileCallbacks) | ({
|
|
23
30
|
multiple?: false;
|
|
24
31
|
value?: FileMetadata | null;
|
|
25
32
|
onChange?: OnChangeSingleFile;
|
|
26
|
-
} & FileUploadBaseProps);
|
|
27
|
-
interface MultiFileUploadProps extends FileUploadBaseProps {
|
|
33
|
+
} & FileUploadBaseProps & UseFileCallbacks);
|
|
34
|
+
interface MultiFileUploadProps extends FileUploadBaseProps, MultiFileCallbacks {
|
|
28
35
|
value?: FileMetadata[];
|
|
29
36
|
onChange?: OnChangeMultipleFiles;
|
|
30
37
|
}
|
|
31
|
-
interface SingleFileUploadProps extends Omit<FileUploadBaseProps, 'multiple'
|
|
38
|
+
interface SingleFileUploadProps extends Omit<FileUploadBaseProps, 'multiple'>, UseFileCallbacks {
|
|
32
39
|
value?: FileMetadata | null;
|
|
33
|
-
onChange?:
|
|
40
|
+
onChange?: OnChangeSingleFile;
|
|
34
41
|
}
|
|
35
42
|
interface FileUploadProgressCallBacks {
|
|
36
43
|
onProgress: (file: File, progress: number) => void;
|
|
@@ -38,4 +45,4 @@ interface FileUploadProgressCallBacks {
|
|
|
38
45
|
onError: (file: File, error: Error) => void;
|
|
39
46
|
}
|
|
40
47
|
//#endregion
|
|
41
|
-
export { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps$1 as FileUploadProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps };
|
|
48
|
+
export { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps$1 as FileUploadProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps, UseFileCallbacks };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.cjs";
|
|
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 };
|
|
@@ -17,7 +17,10 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
17
17
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
18
18
|
*/
|
|
19
19
|
function FileUploadRoot(props) {
|
|
20
|
-
const { value, onChange,
|
|
20
|
+
const { value, onChange, className, disabled, children, onAccept, preventDuplicates, slots, onSuccess: singleOnSuccess, onError: singleOnError, onFileSuccess, onFileError,...rest } = props;
|
|
21
|
+
const multiple = props.multiple ?? false;
|
|
22
|
+
const onSuccess = multiple ? onFileSuccess : singleOnSuccess;
|
|
23
|
+
const onError = multiple ? onFileError : singleOnError;
|
|
21
24
|
const { handleAccept, displayFiles, deleteFile, getFile, orgValue } = require_use_file_upload_store.useFileUploadStore({
|
|
22
25
|
value,
|
|
23
26
|
onChange,
|
|
@@ -57,6 +60,7 @@ function FileUploadRoot(props) {
|
|
|
57
60
|
file: getFile(data),
|
|
58
61
|
disabled,
|
|
59
62
|
onDelete: deleteFile,
|
|
63
|
+
onSuccess,
|
|
60
64
|
onError,
|
|
61
65
|
...slots?.fileItem || {}
|
|
62
66
|
}, key);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileUploadRootProps } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime14 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_runtime14.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -13,7 +13,10 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
14
14
|
*/
|
|
15
15
|
function FileUploadRoot(props) {
|
|
16
|
-
const { value, onChange,
|
|
16
|
+
const { value, onChange, className, disabled, children, onAccept, preventDuplicates, slots, onSuccess: singleOnSuccess, onError: singleOnError, onFileSuccess, onFileError,...rest } = props;
|
|
17
|
+
const multiple = props.multiple ?? false;
|
|
18
|
+
const onSuccess = multiple ? onFileSuccess : singleOnSuccess;
|
|
19
|
+
const onError = multiple ? onFileError : singleOnError;
|
|
17
20
|
const { handleAccept, displayFiles, deleteFile, getFile, orgValue } = useFileUploadStore({
|
|
18
21
|
value,
|
|
19
22
|
onChange,
|
|
@@ -51,6 +54,7 @@ function FileUploadRoot(props) {
|
|
|
51
54
|
file: getFile(data),
|
|
52
55
|
disabled,
|
|
53
56
|
onDelete: deleteFile,
|
|
57
|
+
onSuccess,
|
|
54
58
|
onError,
|
|
55
59
|
...slots?.fileItem || {}
|
|
56
60
|
}, key);
|
|
@@ -55,9 +55,9 @@ const FileItemInnerWrapper = ({ children }) => {
|
|
|
55
55
|
children
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
|
-
const FileUploadRootItem = react.default.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onError }) => {
|
|
58
|
+
const FileUploadRootItem = react.default.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onError, onSuccess }) => {
|
|
59
59
|
require_use_file_upload_progress_callbacks.useFileUploadProgressCallbacks(file, {
|
|
60
|
-
|
|
60
|
+
onSuccess,
|
|
61
61
|
onError
|
|
62
62
|
});
|
|
63
63
|
const fileError = require_use_file_error.useFileError(file);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { FileMetadata } from "../file-upload/types/index.cjs";
|
|
1
|
+
import { FileMetadata, UseFileCallbacks } from "../file-upload/types/index.cjs";
|
|
2
2
|
import { FileWithMetadata } from "../file-upload/utils/merge-file-metadata.cjs";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/file-upload-root/FileUploadRootItem.d.ts
|
|
6
|
-
interface FileUploadRootItemProps extends Partial<FileMetadata
|
|
6
|
+
interface FileUploadRootItemProps extends Partial<FileMetadata>, UseFileCallbacks {
|
|
7
7
|
file: File;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
onDelete: (file: FileWithMetadata) => void;
|
|
10
|
-
onError?: (file: File, error: string) => void;
|
|
11
10
|
}
|
|
12
11
|
declare const FileUploadRootItem: React.FC<FileUploadRootItemProps>;
|
|
13
12
|
//#endregion
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { FileMetadata } from "../file-upload/types/index.js";
|
|
1
|
+
import { FileMetadata, UseFileCallbacks } from "../file-upload/types/index.js";
|
|
2
2
|
import { FileWithMetadata } from "../file-upload/utils/merge-file-metadata.js";
|
|
3
3
|
import "../file-upload/utils/index.js";
|
|
4
4
|
import React from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/file-upload-root/FileUploadRootItem.d.ts
|
|
7
|
-
interface FileUploadRootItemProps extends Partial<FileMetadata
|
|
7
|
+
interface FileUploadRootItemProps extends Partial<FileMetadata>, UseFileCallbacks {
|
|
8
8
|
file: File;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
onDelete: (file: FileWithMetadata) => void;
|
|
11
|
-
onError?: (file: File, error: string) => void;
|
|
12
11
|
}
|
|
13
12
|
declare const FileUploadRootItem: React.FC<FileUploadRootItemProps>;
|
|
14
13
|
//#endregion
|
|
@@ -49,9 +49,9 @@ const FileItemInnerWrapper = ({ children }) => {
|
|
|
49
49
|
children
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
const FileUploadRootItem = React.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onError }) => {
|
|
52
|
+
const FileUploadRootItem = React.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onError, onSuccess }) => {
|
|
53
53
|
useFileUploadProgressCallbacks(file, {
|
|
54
|
-
|
|
54
|
+
onSuccess,
|
|
55
55
|
onError
|
|
56
56
|
});
|
|
57
57
|
const fileError = useFileError(file);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps } from "./file-upload/types/index.cjs";
|
|
1
|
+
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps, UseFileCallbacks } from "./file-upload/types/index.cjs";
|
|
2
2
|
import { FileUpload } from "./file-upload/FileUpload.cjs";
|
|
3
3
|
import "./file-upload/index.cjs";
|
|
4
4
|
import { AbsoluteFill } from "./AbsoluteFill.cjs";
|
|
@@ -100,4 +100,4 @@ import "./toast/index.cjs";
|
|
|
100
100
|
import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue } from "./ToggleGroup.cjs";
|
|
101
101
|
import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.cjs";
|
|
102
102
|
import { cn } from "@pixpilot/shadcn";
|
|
103
|
-
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
|
103
|
+
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, UseFileCallbacks, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps } from "./file-upload/types/index.js";
|
|
1
|
+
import { FileMetadata, FileUploadBaseProps, FileUploadProgressCallBacks, FileUploadProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, SingleFileUploadProps, UseFileCallbacks } from "./file-upload/types/index.js";
|
|
2
2
|
import { FileUpload } from "./file-upload/FileUpload.js";
|
|
3
3
|
import "./file-upload/index.js";
|
|
4
4
|
import { AbsoluteFill } from "./AbsoluteFill.js";
|
|
@@ -100,4 +100,4 @@ import "./toast/index.js";
|
|
|
100
100
|
import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue } from "./ToggleGroup.js";
|
|
101
101
|
import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.js";
|
|
102
102
|
import { cn } from "@pixpilot/shadcn";
|
|
103
|
-
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
|
103
|
+
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertToastProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonExtended, ButtonExtendedLoaderProps, ButtonExtendedProps, ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, ButtonProps, COLOR_PICKER_PALETTE_BUTTON_CLASSES, COMMON_COLORS, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerButton, ColorPickerButtonProps, ColorPickerColorPalette, ColorPickerColorPaletteProps, ColorPickerCompactControls, ColorPickerCompactControlsProps, ColorPickerContent, ColorPickerContext, Consumer as ColorPickerContextContextConsumer, Provider as ColorPickerContextContextProvider, ColorPickerContextStates, ColorPickerControls, ColorPickerControlsProps, ColorPickerEyeDropper, ColorPickerFormatControls, ColorPickerFormatControlsProps, ColorPickerFormatInput, ColorPickerFormatInputProps, ColorPickerFormatSelect, ColorPickerFullControls, ColorPickerFullControlsProps, ColorPickerHueSlider, ColorPickerInput, ColorPickerInputProps, ColorPickerPaletteButton, ColorPickerPaletteButtonProps, ColorPickerPaletteSwatch, ColorPickerProps, ColorPickerRoot, ColorPickerRootProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, FileUploadRoot, FileUploadRootItem, FileUploadRootItemProps, FileUploadRootProps, FileUploadRootPropsBaseProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoadingOverlay, LoadingOverlayProps, MultiFileCallbacks, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverContentUnstyled, PopoverTrigger, PresetColor, Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectContentProps, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputInline, TagsInputInlineItem, TagsInputInlineProps, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastFunction, ToastMessage, Toaster, ToggleButton, ToggleButtonProps, ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps, ToggleGroupValue, ToolbarItems, UseFileCallbacks, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, useColorPickerContext, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
package/dist/input/Input.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { InputProps } from "@pixpilot/shadcn";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
|
|
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
|
|
|
10
10
|
prefixClassName?: string;
|
|
11
11
|
suffixClassName?: string;
|
|
12
12
|
};
|
|
13
|
-
declare function Input(props: InputProps$1):
|
|
13
|
+
declare function Input(props: InputProps$1): react_jsx_runtime13.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input, InputProps$1 as InputProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandOptionListItem } from "../CommandOptionList.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input/TagsInput.d.ts
|
|
5
5
|
interface TagsInputProps {
|
|
@@ -57,6 +57,6 @@ declare function TagsInput({
|
|
|
57
57
|
addOnTab,
|
|
58
58
|
onValidate,
|
|
59
59
|
addButtonVisibility
|
|
60
|
-
}: TagsInputProps):
|
|
60
|
+
}: TagsInputProps): react_jsx_runtime16.JSX.Element;
|
|
61
61
|
//#endregion
|
|
62
62
|
export { TagsInput, TagsInputProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandOptionListItem } from "../CommandOptionList.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input/TagsInput.d.ts
|
|
5
5
|
interface TagsInputProps {
|
|
@@ -57,6 +57,6 @@ declare function TagsInput({
|
|
|
57
57
|
addOnTab,
|
|
58
58
|
onValidate,
|
|
59
59
|
addButtonVisibility
|
|
60
|
-
}: TagsInputProps):
|
|
60
|
+
}: TagsInputProps): react_jsx_runtime15.JSX.Element;
|
|
61
61
|
//#endregion
|
|
62
62
|
export { TagsInput, TagsInputProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
2
|
import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input/TagsInputInline.d.ts
|
|
@@ -75,6 +75,6 @@ declare function TagsInputInline({
|
|
|
75
75
|
canAddCurrentValue,
|
|
76
76
|
onAddCurrentInput,
|
|
77
77
|
showClear
|
|
78
|
-
}: TagsInputInlineProps):
|
|
78
|
+
}: TagsInputInlineProps): react_jsx_runtime15.JSX.Element;
|
|
79
79
|
//#endregion
|
|
80
80
|
export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input/TagsInputInline.d.ts
|
|
5
5
|
interface TagsInputInlineItem {
|
|
@@ -75,6 +75,6 @@ declare function TagsInputInline({
|
|
|
75
75
|
canAddCurrentValue,
|
|
76
76
|
onAddCurrentInput,
|
|
77
77
|
showClear
|
|
78
|
-
}: TagsInputInlineProps):
|
|
78
|
+
}: TagsInputInlineProps): react_jsx_runtime16.JSX.Element;
|
|
79
79
|
//#endregion
|
|
80
80
|
export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeDropdown.d.ts
|
|
4
4
|
interface ThemeModeDropdownProps {
|
|
@@ -17,7 +17,7 @@ interface ThemeModeDropdownProps {
|
|
|
17
17
|
* Provides Light / Dark / System options.
|
|
18
18
|
* Pure component - requires themeValue and onChange props.
|
|
19
19
|
*/
|
|
20
|
-
declare function ThemeModeDropdown(props: ThemeModeDropdownProps):
|
|
20
|
+
declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime18.JSX.Element;
|
|
21
21
|
declare namespace ThemeModeDropdown {
|
|
22
22
|
var displayName: string;
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeDropdown.d.ts
|
|
4
4
|
interface ThemeModeDropdownProps {
|
|
@@ -17,7 +17,7 @@ interface ThemeModeDropdownProps {
|
|
|
17
17
|
* Provides Light / Dark / System options.
|
|
18
18
|
* Pure component - requires themeValue and onChange props.
|
|
19
19
|
*/
|
|
20
|
-
declare function ThemeModeDropdown(props: ThemeModeDropdownProps):
|
|
20
|
+
declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime17.JSX.Element;
|
|
21
21
|
declare namespace ThemeModeDropdown {
|
|
22
22
|
var displayName: string;
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchInside.d.ts
|
|
4
4
|
type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
|
|
@@ -25,7 +25,7 @@ interface ThemeModeSwitchInsideProps {
|
|
|
25
25
|
* Icons are embedded within the switch control.
|
|
26
26
|
* Pure component - requires value and onChange props.
|
|
27
27
|
*/
|
|
28
|
-
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps):
|
|
28
|
+
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime19.JSX.Element;
|
|
29
29
|
declare namespace ThemeModeSwitchInside {
|
|
30
30
|
var displayName: string;
|
|
31
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchInside.d.ts
|
|
4
4
|
type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
|
|
@@ -25,7 +25,7 @@ interface ThemeModeSwitchInsideProps {
|
|
|
25
25
|
* Icons are embedded within the switch control.
|
|
26
26
|
* Pure component - requires value and onChange props.
|
|
27
27
|
*/
|
|
28
|
-
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps):
|
|
28
|
+
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime18.JSX.Element;
|
|
29
29
|
declare namespace ThemeModeSwitchInside {
|
|
30
30
|
var displayName: string;
|
|
31
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
|
|
4
4
|
interface ThemeModeSwitchOutsideProps {
|
|
@@ -22,7 +22,7 @@ interface ThemeModeSwitchOutsideProps {
|
|
|
22
22
|
* Icons flank the switch control on either side.
|
|
23
23
|
* Pure component - requires value and onChange props.
|
|
24
24
|
*/
|
|
25
|
-
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps):
|
|
25
|
+
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime20.JSX.Element;
|
|
26
26
|
declare namespace ThemeModeSwitchOutside {
|
|
27
27
|
var displayName: string;
|
|
28
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
|
|
4
4
|
interface ThemeModeSwitchOutsideProps {
|
|
@@ -22,7 +22,7 @@ interface ThemeModeSwitchOutsideProps {
|
|
|
22
22
|
* Icons flank the switch control on either side.
|
|
23
23
|
* Pure component - requires value and onChange props.
|
|
24
24
|
*/
|
|
25
|
-
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps):
|
|
25
|
+
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime19.JSX.Element;
|
|
26
26
|
declare namespace ThemeModeSwitchOutside {
|
|
27
27
|
var displayName: string;
|
|
28
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeToggleButton.d.ts
|
|
4
4
|
interface ThemeModeToggleButtonProps {
|
|
@@ -13,7 +13,7 @@ interface ThemeModeToggleButtonProps {
|
|
|
13
13
|
* Light/Dark toggle button.
|
|
14
14
|
* Pure component - toggles between light and dark.
|
|
15
15
|
*/
|
|
16
|
-
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps):
|
|
16
|
+
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime17.JSX.Element;
|
|
17
17
|
declare namespace ThemeModeToggleButton {
|
|
18
18
|
var displayName: string;
|
|
19
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeToggleButton.d.ts
|
|
4
4
|
interface ThemeModeToggleButtonProps {
|
|
@@ -13,7 +13,7 @@ interface ThemeModeToggleButtonProps {
|
|
|
13
13
|
* Light/Dark toggle button.
|
|
14
14
|
* Pure component - toggles between light and dark.
|
|
15
15
|
*/
|
|
16
|
-
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps):
|
|
16
|
+
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime20.JSX.Element;
|
|
17
17
|
declare namespace ThemeModeToggleButton {
|
|
18
18
|
var displayName: string;
|
|
19
19
|
}
|
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.8.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",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"react-dom": "19.2.0",
|
|
61
61
|
"tsdown": "^0.15.12",
|
|
62
62
|
"typescript": "^5.9.3",
|
|
63
|
+
"@internal/eslint-config": "0.3.0",
|
|
63
64
|
"@internal/hooks": "0.0.0",
|
|
64
65
|
"@internal/prettier-config": "0.0.1",
|
|
65
|
-
"@internal/eslint-config": "0.3.0",
|
|
66
66
|
"@internal/tsconfig": "0.1.0",
|
|
67
67
|
"@internal/tsdown-config": "0.1.0",
|
|
68
68
|
"@internal/vitest-config": "0.1.0"
|