@pixpilot/shadcn-ui 0.5.1 → 0.7.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/avatar-upload/AvatarUpload.cjs +83 -0
- package/dist/avatar-upload/AvatarUpload.d.cts +16 -0
- package/dist/avatar-upload/AvatarUpload.d.ts +16 -0
- package/dist/avatar-upload/AvatarUpload.js +78 -0
- package/dist/avatar-upload/AvatarUploadComponents.cjs +42 -0
- package/dist/avatar-upload/AvatarUploadComponents.js +35 -0
- package/dist/avatar-upload/AvatarUploadItem.cjs +58 -0
- package/dist/avatar-upload/AvatarUploadItem.js +54 -0
- package/dist/avatar-upload/index.cjs +1 -0
- package/dist/avatar-upload/index.d.cts +1 -0
- package/dist/avatar-upload/index.d.ts +1 -0
- package/dist/avatar-upload/index.js +1 -0
- package/dist/avatar-upload/types.d.cts +14 -0
- package/dist/avatar-upload/types.d.ts +14 -0
- package/dist/{spinner/spinner.cjs → circle-loader/circle-loader.cjs} +6 -6
- package/dist/{spinner/spinner.d.cts → circle-loader/circle-loader.d.cts} +7 -7
- package/dist/{spinner/spinner.d.ts → circle-loader/circle-loader.d.ts} +7 -7
- package/dist/{spinner/spinner.js → circle-loader/circle-loader.js} +6 -6
- package/dist/circle-loader/index.cjs +1 -0
- package/dist/circle-loader/index.d.cts +1 -0
- package/dist/circle-loader/index.d.ts +1 -0
- package/dist/circle-loader/index.js +1 -0
- package/dist/{spinner → circle-loader}/styles.cjs +1 -1
- package/dist/{spinner → circle-loader}/styles.js +1 -1
- package/dist/file-upload/FileUpload.d.cts +2 -2
- package/dist/file-upload/FileUpload.d.ts +2 -2
- package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
- package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
- package/dist/index.cjs +6 -3
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -3
- package/package.json +1 -1
- package/dist/spinner/index.cjs +0 -1
- package/dist/spinner/index.d.cts +0 -1
- package/dist/spinner/index.d.ts +0 -1
- package/dist/spinner/index.js +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../shadcn/src/lib/utils.cjs');
|
|
3
|
+
require('../shadcn/src/lib/index.cjs');
|
|
4
|
+
const require_AvatarUploadComponents = require('./AvatarUploadComponents.cjs');
|
|
5
|
+
const require_AvatarUploadItem = require('./AvatarUploadItem.cjs');
|
|
6
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
7
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
10
|
+
let react = require("react");
|
|
11
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
12
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
14
|
+
|
|
15
|
+
//#region src/avatar-upload/AvatarUpload.tsx
|
|
16
|
+
const sizeClasses = {
|
|
17
|
+
sm: {
|
|
18
|
+
avatar: "h-20 w-20",
|
|
19
|
+
icon: "h-5 w-5",
|
|
20
|
+
dropZone: "p-3",
|
|
21
|
+
main: "space-y-2"
|
|
22
|
+
},
|
|
23
|
+
md: {
|
|
24
|
+
main: "space-y-2.5",
|
|
25
|
+
avatar: "h-28 w-28",
|
|
26
|
+
icon: "h-6 w-6 bottom-1 right-1",
|
|
27
|
+
dropZone: "p-4"
|
|
28
|
+
},
|
|
29
|
+
lg: {
|
|
30
|
+
avatar: "h-40 w-40",
|
|
31
|
+
icon: "h-7 w-7 bottom-1.5 right-1.5",
|
|
32
|
+
dropZone: "p-5",
|
|
33
|
+
main: "space-y-3"
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const AvatarUpload = (props) => {
|
|
37
|
+
const { className, messages, value, onAccept, onChange, size = "md",...rest } = props;
|
|
38
|
+
const { upload = "Upload", change = "Change" } = messages || {};
|
|
39
|
+
const currentSize = sizeClasses[size];
|
|
40
|
+
const [files, setFiles] = react.default.useState([]);
|
|
41
|
+
const imageUrl = value?.url;
|
|
42
|
+
const handleAccept = react.default.useCallback((acceptedFiles) => {
|
|
43
|
+
setFiles(acceptedFiles.map((file) => {
|
|
44
|
+
return {
|
|
45
|
+
file,
|
|
46
|
+
id: `${file.name}-${file.lastModified.toString()}`
|
|
47
|
+
};
|
|
48
|
+
}));
|
|
49
|
+
onAccept?.(acceptedFiles);
|
|
50
|
+
}, [onAccept]);
|
|
51
|
+
const hasImageUrl = imageUrl != null;
|
|
52
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUpload, {
|
|
53
|
+
...rest,
|
|
54
|
+
onAccept: handleAccept,
|
|
55
|
+
className: require_utils.cn("w-fit", className),
|
|
56
|
+
accept: "image/*",
|
|
57
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadDropzone, {
|
|
58
|
+
className: currentSize.dropZone,
|
|
59
|
+
children: files.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadList, { children: files.map(({ file, id }, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AvatarUploadItem.AvatarUploadItem, {
|
|
60
|
+
file,
|
|
61
|
+
index: i,
|
|
62
|
+
currentSize,
|
|
63
|
+
change,
|
|
64
|
+
onChange
|
|
65
|
+
}, id)) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_AvatarUploadComponents.MainWrapper, {
|
|
66
|
+
currentSize,
|
|
67
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AvatarUploadComponents.AvatarWrap, {
|
|
68
|
+
className: currentSize.avatar,
|
|
69
|
+
iconClass: currentSize.icon,
|
|
70
|
+
showChangeIcon: hasImageUrl,
|
|
71
|
+
children: hasImageUrl ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AvatarUploadComponents.Image, { src: imageUrl }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.UserCircle2, {
|
|
72
|
+
className: "text-muted-foreground w-full h-full",
|
|
73
|
+
strokeWidth: 1
|
|
74
|
+
})
|
|
75
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AvatarUploadComponents.MessageComponent, { message: hasImageUrl != null ? change : upload })]
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
AvatarUpload.displayName = "AvatarUpload";
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
exports.AvatarUpload = AvatarUpload;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SingleFileUploadProps } from "../file-upload/types/index.cjs";
|
|
2
|
+
import "../file-upload/index.cjs";
|
|
3
|
+
import { ComponentSizes } from "./types.cjs";
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/avatar-upload/AvatarUpload.d.ts
|
|
7
|
+
interface AvatarUploadProps extends SingleFileUploadProps {
|
|
8
|
+
messages?: {
|
|
9
|
+
upload?: string;
|
|
10
|
+
change?: string;
|
|
11
|
+
};
|
|
12
|
+
size?: keyof ComponentSizes;
|
|
13
|
+
}
|
|
14
|
+
declare const AvatarUpload: React.FC<AvatarUploadProps>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { AvatarUpload, AvatarUploadProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SingleFileUploadProps } from "../file-upload/types/index.js";
|
|
2
|
+
import "../file-upload/index.js";
|
|
3
|
+
import { ComponentSizes } from "./types.js";
|
|
4
|
+
import React from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/avatar-upload/AvatarUpload.d.ts
|
|
7
|
+
interface AvatarUploadProps extends SingleFileUploadProps {
|
|
8
|
+
messages?: {
|
|
9
|
+
upload?: string;
|
|
10
|
+
change?: string;
|
|
11
|
+
};
|
|
12
|
+
size?: keyof ComponentSizes;
|
|
13
|
+
}
|
|
14
|
+
declare const AvatarUpload: React.FC<AvatarUploadProps>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { AvatarUpload, AvatarUploadProps };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { cn as cn$1 } from "../shadcn/src/lib/utils.js";
|
|
2
|
+
import "../shadcn/src/lib/index.js";
|
|
3
|
+
import { AvatarWrap, Image, MainWrapper, MessageComponent } from "./AvatarUploadComponents.js";
|
|
4
|
+
import { AvatarUploadItem } from "./AvatarUploadItem.js";
|
|
5
|
+
import { FileUpload, FileUploadDropzone, FileUploadList } from "@pixpilot/shadcn";
|
|
6
|
+
import { UserCircle2 } from "lucide-react";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/avatar-upload/AvatarUpload.tsx
|
|
11
|
+
const sizeClasses = {
|
|
12
|
+
sm: {
|
|
13
|
+
avatar: "h-20 w-20",
|
|
14
|
+
icon: "h-5 w-5",
|
|
15
|
+
dropZone: "p-3",
|
|
16
|
+
main: "space-y-2"
|
|
17
|
+
},
|
|
18
|
+
md: {
|
|
19
|
+
main: "space-y-2.5",
|
|
20
|
+
avatar: "h-28 w-28",
|
|
21
|
+
icon: "h-6 w-6 bottom-1 right-1",
|
|
22
|
+
dropZone: "p-4"
|
|
23
|
+
},
|
|
24
|
+
lg: {
|
|
25
|
+
avatar: "h-40 w-40",
|
|
26
|
+
icon: "h-7 w-7 bottom-1.5 right-1.5",
|
|
27
|
+
dropZone: "p-5",
|
|
28
|
+
main: "space-y-3"
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const AvatarUpload = (props) => {
|
|
32
|
+
const { className, messages, value, onAccept, onChange, size = "md",...rest } = props;
|
|
33
|
+
const { upload = "Upload", change = "Change" } = messages || {};
|
|
34
|
+
const currentSize = sizeClasses[size];
|
|
35
|
+
const [files, setFiles] = React.useState([]);
|
|
36
|
+
const imageUrl = value?.url;
|
|
37
|
+
const handleAccept = React.useCallback((acceptedFiles) => {
|
|
38
|
+
setFiles(acceptedFiles.map((file) => {
|
|
39
|
+
return {
|
|
40
|
+
file,
|
|
41
|
+
id: `${file.name}-${file.lastModified.toString()}`
|
|
42
|
+
};
|
|
43
|
+
}));
|
|
44
|
+
onAccept?.(acceptedFiles);
|
|
45
|
+
}, [onAccept]);
|
|
46
|
+
const hasImageUrl = imageUrl != null;
|
|
47
|
+
return /* @__PURE__ */ jsx(FileUpload, {
|
|
48
|
+
...rest,
|
|
49
|
+
onAccept: handleAccept,
|
|
50
|
+
className: cn$1("w-fit", className),
|
|
51
|
+
accept: "image/*",
|
|
52
|
+
children: /* @__PURE__ */ jsx(FileUploadDropzone, {
|
|
53
|
+
className: currentSize.dropZone,
|
|
54
|
+
children: files.length > 0 ? /* @__PURE__ */ jsx(FileUploadList, { children: files.map(({ file, id }, i) => /* @__PURE__ */ jsx(AvatarUploadItem, {
|
|
55
|
+
file,
|
|
56
|
+
index: i,
|
|
57
|
+
currentSize,
|
|
58
|
+
change,
|
|
59
|
+
onChange
|
|
60
|
+
}, id)) }) : /* @__PURE__ */ jsxs(MainWrapper, {
|
|
61
|
+
currentSize,
|
|
62
|
+
children: [/* @__PURE__ */ jsx(AvatarWrap, {
|
|
63
|
+
className: currentSize.avatar,
|
|
64
|
+
iconClass: currentSize.icon,
|
|
65
|
+
showChangeIcon: hasImageUrl,
|
|
66
|
+
children: hasImageUrl ? /* @__PURE__ */ jsx(Image, { src: imageUrl }) : /* @__PURE__ */ jsx(UserCircle2, {
|
|
67
|
+
className: "text-muted-foreground w-full h-full",
|
|
68
|
+
strokeWidth: 1
|
|
69
|
+
})
|
|
70
|
+
}), /* @__PURE__ */ jsx(MessageComponent, { message: hasImageUrl != null ? change : upload })]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
AvatarUpload.displayName = "AvatarUpload";
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { AvatarUpload };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../shadcn/src/lib/utils.cjs');
|
|
3
|
+
require('../shadcn/src/lib/index.cjs');
|
|
4
|
+
let lucide_react = require("lucide-react");
|
|
5
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
+
|
|
11
|
+
//#region src/avatar-upload/AvatarUploadComponents.tsx
|
|
12
|
+
const MessageComponent = ({ message, className }) => {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
14
|
+
className: require_utils.cn("text-sm text-muted-foreground", className),
|
|
15
|
+
children: message
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const AvatarWrap = ({ children, className, iconClass, showChangeIcon }) => {
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20
|
+
className: require_utils.cn("relative", className),
|
|
21
|
+
children: [children, showChangeIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Pencil, { className: require_utils.cn(`absolute bottom-0 right-0 bg-secondary text-secondary-foreground rounded-full p-1.5 shadow-md`, iconClass) })]
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const Image = ({ src, className }) => {
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
26
|
+
src,
|
|
27
|
+
alt: "Avatar preview",
|
|
28
|
+
className: require_utils.cn("rounded-full object-cover w-full h-full", className)
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const MainWrapper = ({ children, className, currentSize }) => {
|
|
32
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
33
|
+
className: require_utils.cn("flex flex-col items-center relative", className, currentSize.main),
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.AvatarWrap = AvatarWrap;
|
|
40
|
+
exports.Image = Image;
|
|
41
|
+
exports.MainWrapper = MainWrapper;
|
|
42
|
+
exports.MessageComponent = MessageComponent;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cn } from "../shadcn/src/lib/utils.js";
|
|
2
|
+
import "../shadcn/src/lib/index.js";
|
|
3
|
+
import { Pencil } from "lucide-react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/avatar-upload/AvatarUploadComponents.tsx
|
|
8
|
+
const MessageComponent = ({ message, className }) => {
|
|
9
|
+
return /* @__PURE__ */ jsx("p", {
|
|
10
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
11
|
+
children: message
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const AvatarWrap = ({ children, className, iconClass, showChangeIcon }) => {
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: cn("relative", className),
|
|
17
|
+
children: [children, showChangeIcon && /* @__PURE__ */ jsx(Pencil, { className: cn(`absolute bottom-0 right-0 bg-secondary text-secondary-foreground rounded-full p-1.5 shadow-md`, iconClass) })]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const Image = ({ src, className }) => {
|
|
21
|
+
return /* @__PURE__ */ jsx("img", {
|
|
22
|
+
src,
|
|
23
|
+
alt: "Avatar preview",
|
|
24
|
+
className: cn("rounded-full object-cover w-full h-full", className)
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const MainWrapper = ({ children, className, currentSize }) => {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
className: cn("flex flex-col items-center relative", className, currentSize.main),
|
|
30
|
+
children
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { AvatarWrap, Image, MainWrapper, MessageComponent };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_use_file_error = require('../file-upload/hooks/use-file-error.cjs');
|
|
3
|
+
const require_use_file_upload_progress_callbacks = require('../file-upload/hooks/use-file-upload-progress-callbacks.cjs');
|
|
4
|
+
require('../file-upload/index.cjs');
|
|
5
|
+
const require_AvatarUploadComponents = require('./AvatarUploadComponents.cjs');
|
|
6
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
7
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
12
|
+
|
|
13
|
+
//#region src/avatar-upload/AvatarUploadItem.tsx
|
|
14
|
+
const AvatarUploadItem = (props) => {
|
|
15
|
+
const { file, currentSize, change } = props;
|
|
16
|
+
require_use_file_upload_progress_callbacks.useFileUploadProgressCallbacks(file, props);
|
|
17
|
+
const fileError = require_use_file_error.useFileError(file);
|
|
18
|
+
const isUploading = (0, __pixpilot_shadcn.useFileUpload)((store) => {
|
|
19
|
+
if (fileError != null) return false;
|
|
20
|
+
if (store.files.get(file)?.status === "uploading") return true;
|
|
21
|
+
return false;
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadItem, {
|
|
24
|
+
value: file,
|
|
25
|
+
className: "p-0 border-0 m-0",
|
|
26
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_AvatarUploadComponents.MainWrapper, {
|
|
27
|
+
currentSize,
|
|
28
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
29
|
+
className: (0, __pixpilot_shadcn.cn)("relative"),
|
|
30
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AvatarUploadComponents.AvatarWrap, {
|
|
31
|
+
className: currentSize.avatar,
|
|
32
|
+
showChangeIcon: true,
|
|
33
|
+
iconClass: currentSize.icon,
|
|
34
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AvatarUploadComponents.Image, { src: URL.createObjectURL(file) })
|
|
35
|
+
}), fileError != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipTrigger, {
|
|
36
|
+
asChild: true,
|
|
37
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
className: "absolute -top-2 -right-2 p-1",
|
|
40
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.AlertCircle, { className: "h-5 w-5 text-red-500" })
|
|
41
|
+
})
|
|
42
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipContent, { children: fileError })] }) })]
|
|
43
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
44
|
+
className: "w-full flex items-center justify-center relative",
|
|
45
|
+
children: [fileError == null && isUploading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadItemProgress, {
|
|
46
|
+
variant: "linear",
|
|
47
|
+
className: "absolute"
|
|
48
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AvatarUploadComponents.MessageComponent, {
|
|
49
|
+
message: change,
|
|
50
|
+
className: (0, __pixpilot_shadcn.cn)({ "opacity-0": isUploading })
|
|
51
|
+
})]
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
exports.AvatarUploadItem = AvatarUploadItem;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useFileError } from "../file-upload/hooks/use-file-error.js";
|
|
2
|
+
import { useFileUploadProgressCallbacks } from "../file-upload/hooks/use-file-upload-progress-callbacks.js";
|
|
3
|
+
import "../file-upload/index.js";
|
|
4
|
+
import { AvatarWrap, Image, MainWrapper, MessageComponent } from "./AvatarUploadComponents.js";
|
|
5
|
+
import { FileUploadItem, FileUploadItemProgress, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, cn, useFileUpload } from "@pixpilot/shadcn";
|
|
6
|
+
import { AlertCircle } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/avatar-upload/AvatarUploadItem.tsx
|
|
10
|
+
const AvatarUploadItem = (props) => {
|
|
11
|
+
const { file, currentSize, change } = props;
|
|
12
|
+
useFileUploadProgressCallbacks(file, props);
|
|
13
|
+
const fileError = useFileError(file);
|
|
14
|
+
const isUploading = useFileUpload((store) => {
|
|
15
|
+
if (fileError != null) return false;
|
|
16
|
+
if (store.files.get(file)?.status === "uploading") return true;
|
|
17
|
+
return false;
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ jsx(FileUploadItem, {
|
|
20
|
+
value: file,
|
|
21
|
+
className: "p-0 border-0 m-0",
|
|
22
|
+
children: /* @__PURE__ */ jsxs(MainWrapper, {
|
|
23
|
+
currentSize,
|
|
24
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: cn("relative"),
|
|
26
|
+
children: [/* @__PURE__ */ jsx(AvatarWrap, {
|
|
27
|
+
className: currentSize.avatar,
|
|
28
|
+
showChangeIcon: true,
|
|
29
|
+
iconClass: currentSize.icon,
|
|
30
|
+
children: /* @__PURE__ */ jsx(Image, { src: URL.createObjectURL(file) })
|
|
31
|
+
}), fileError != null && /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
32
|
+
asChild: true,
|
|
33
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
34
|
+
type: "button",
|
|
35
|
+
className: "absolute -top-2 -right-2 p-1",
|
|
36
|
+
children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-5 w-5 text-red-500" })
|
|
37
|
+
})
|
|
38
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: fileError })] }) })]
|
|
39
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
40
|
+
className: "w-full flex items-center justify-center relative",
|
|
41
|
+
children: [fileError == null && isUploading && /* @__PURE__ */ jsx(FileUploadItemProgress, {
|
|
42
|
+
variant: "linear",
|
|
43
|
+
className: "absolute"
|
|
44
|
+
}), /* @__PURE__ */ jsx(MessageComponent, {
|
|
45
|
+
message: change,
|
|
46
|
+
className: cn({ "opacity-0": isUploading })
|
|
47
|
+
})]
|
|
48
|
+
})]
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { AvatarUploadItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const require_AvatarUpload = require('./AvatarUpload.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { AvatarUpload, AvatarUploadProps } from "./AvatarUpload.cjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { AvatarUpload, AvatarUploadProps } from "./AvatarUpload.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { AvatarUpload } from "./AvatarUpload.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/avatar-upload/types.d.ts
|
|
2
|
+
interface ComponentSize {
|
|
3
|
+
avatar: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
dropZone: string;
|
|
6
|
+
main: string;
|
|
7
|
+
}
|
|
8
|
+
interface ComponentSizes {
|
|
9
|
+
sm: ComponentSize;
|
|
10
|
+
md: ComponentSize;
|
|
11
|
+
lg: ComponentSize;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ComponentSizes };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/avatar-upload/types.d.ts
|
|
2
|
+
interface ComponentSize {
|
|
3
|
+
avatar: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
dropZone: string;
|
|
6
|
+
main: string;
|
|
7
|
+
}
|
|
8
|
+
interface ComponentSizes {
|
|
9
|
+
sm: ComponentSize;
|
|
10
|
+
md: ComponentSize;
|
|
11
|
+
lg: ComponentSize;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ComponentSizes };
|
|
@@ -5,8 +5,8 @@ react = require_rolldown_runtime.__toESM(react);
|
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
7
7
|
|
|
8
|
-
//#region src/
|
|
9
|
-
const
|
|
8
|
+
//#region src/circle-loader/circle-loader.tsx
|
|
9
|
+
const CircleLoaderSize = {
|
|
10
10
|
sm: 24,
|
|
11
11
|
md: 40,
|
|
12
12
|
lg: 64,
|
|
@@ -20,8 +20,8 @@ const DEFAULT_COLOR = "currentColor";
|
|
|
20
20
|
const VIEWBOX_STROKE_REF = 40;
|
|
21
21
|
const PERCENT_MULTIPLIER = 100;
|
|
22
22
|
let spinnerIdCounter = 0;
|
|
23
|
-
const
|
|
24
|
-
const size = typeof sizeProp === "string" ?
|
|
23
|
+
const CircleLoader = ({ size: sizeProp = DEFAULT_SIZE, strokeWidth: strokeWidthProp, speed = DEFAULT_SPEED, color = DEFAULT_COLOR, colors, className = "" }) => {
|
|
24
|
+
const size = typeof sizeProp === "string" ? CircleLoaderSize[sizeProp] : sizeProp;
|
|
25
25
|
const strokeWidth = strokeWidthProp ?? Math.max(MIN_STROKE_WIDTH, Math.round(size * STROKE_WIDTH_RATIO));
|
|
26
26
|
const uniqueId = (0, react.useMemo)(() => `spinner-${++spinnerIdCounter}-${Date.now()}`, []);
|
|
27
27
|
const viewBoxStrokeWidth = strokeWidth / size * VIEWBOX_STROKE_REF;
|
|
@@ -68,7 +68,7 @@ const Spinner = ({ size: sizeProp = DEFAULT_SIZE, strokeWidth: strokeWidthProp,
|
|
|
68
68
|
})
|
|
69
69
|
})] });
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
CircleLoader.displayName = "CircleLoader";
|
|
72
72
|
|
|
73
73
|
//#endregion
|
|
74
|
-
exports.
|
|
74
|
+
exports.CircleLoader = CircleLoader;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
//#region src/
|
|
4
|
-
declare const
|
|
3
|
+
//#region src/circle-loader/circle-loader.d.ts
|
|
4
|
+
declare const CircleLoaderSize: {
|
|
5
5
|
readonly sm: 24;
|
|
6
6
|
readonly md: 40;
|
|
7
7
|
readonly lg: 64;
|
|
8
8
|
readonly xl: 96;
|
|
9
9
|
};
|
|
10
|
-
type
|
|
11
|
-
interface
|
|
10
|
+
type CircleLoaderSizeKey = keyof typeof CircleLoaderSize;
|
|
11
|
+
interface CircleLoaderProps {
|
|
12
12
|
/**
|
|
13
13
|
* Size of the spinner - can be a preset ('sm', 'md', 'lg', 'xl') or a number in pixels
|
|
14
14
|
* @default 'md' (40px)
|
|
15
15
|
*/
|
|
16
|
-
size?:
|
|
16
|
+
size?: CircleLoaderSizeKey | number;
|
|
17
17
|
/**
|
|
18
18
|
* Width of the spinner stroke in pixels
|
|
19
19
|
* If not provided, automatically calculated as 10% of size (minimum 2px)
|
|
@@ -41,6 +41,6 @@ interface SpinnerProps {
|
|
|
41
41
|
*/
|
|
42
42
|
className?: string;
|
|
43
43
|
}
|
|
44
|
-
declare const
|
|
44
|
+
declare const CircleLoader: React.FC<CircleLoaderProps>;
|
|
45
45
|
//#endregion
|
|
46
|
-
export {
|
|
46
|
+
export { CircleLoader, CircleLoaderProps };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
//#region src/
|
|
4
|
-
declare const
|
|
3
|
+
//#region src/circle-loader/circle-loader.d.ts
|
|
4
|
+
declare const CircleLoaderSize: {
|
|
5
5
|
readonly sm: 24;
|
|
6
6
|
readonly md: 40;
|
|
7
7
|
readonly lg: 64;
|
|
8
8
|
readonly xl: 96;
|
|
9
9
|
};
|
|
10
|
-
type
|
|
11
|
-
interface
|
|
10
|
+
type CircleLoaderSizeKey = keyof typeof CircleLoaderSize;
|
|
11
|
+
interface CircleLoaderProps {
|
|
12
12
|
/**
|
|
13
13
|
* Size of the spinner - can be a preset ('sm', 'md', 'lg', 'xl') or a number in pixels
|
|
14
14
|
* @default 'md' (40px)
|
|
15
15
|
*/
|
|
16
|
-
size?:
|
|
16
|
+
size?: CircleLoaderSizeKey | number;
|
|
17
17
|
/**
|
|
18
18
|
* Width of the spinner stroke in pixels
|
|
19
19
|
* If not provided, automatically calculated as 10% of size (minimum 2px)
|
|
@@ -41,6 +41,6 @@ interface SpinnerProps {
|
|
|
41
41
|
*/
|
|
42
42
|
className?: string;
|
|
43
43
|
}
|
|
44
|
-
declare const
|
|
44
|
+
declare const CircleLoader: React.FC<CircleLoaderProps>;
|
|
45
45
|
//#endregion
|
|
46
|
-
export {
|
|
46
|
+
export { CircleLoader, CircleLoaderProps };
|
|
@@ -2,8 +2,8 @@ import { getGlobalStyles } from "./styles.js";
|
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
//#region src/
|
|
6
|
-
const
|
|
5
|
+
//#region src/circle-loader/circle-loader.tsx
|
|
6
|
+
const CircleLoaderSize = {
|
|
7
7
|
sm: 24,
|
|
8
8
|
md: 40,
|
|
9
9
|
lg: 64,
|
|
@@ -17,8 +17,8 @@ const DEFAULT_COLOR = "currentColor";
|
|
|
17
17
|
const VIEWBOX_STROKE_REF = 40;
|
|
18
18
|
const PERCENT_MULTIPLIER = 100;
|
|
19
19
|
let spinnerIdCounter = 0;
|
|
20
|
-
const
|
|
21
|
-
const size = typeof sizeProp === "string" ?
|
|
20
|
+
const CircleLoader = ({ size: sizeProp = DEFAULT_SIZE, strokeWidth: strokeWidthProp, speed = DEFAULT_SPEED, color = DEFAULT_COLOR, colors, className = "" }) => {
|
|
21
|
+
const size = typeof sizeProp === "string" ? CircleLoaderSize[sizeProp] : sizeProp;
|
|
22
22
|
const strokeWidth = strokeWidthProp ?? Math.max(MIN_STROKE_WIDTH, Math.round(size * STROKE_WIDTH_RATIO));
|
|
23
23
|
const uniqueId = useMemo(() => `spinner-${++spinnerIdCounter}-${Date.now()}`, []);
|
|
24
24
|
const viewBoxStrokeWidth = strokeWidth / size * VIEWBOX_STROKE_REF;
|
|
@@ -65,7 +65,7 @@ const Spinner = ({ size: sizeProp = DEFAULT_SIZE, strokeWidth: strokeWidthProp,
|
|
|
65
65
|
})
|
|
66
66
|
})] });
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
CircleLoader.displayName = "CircleLoader";
|
|
69
69
|
|
|
70
70
|
//#endregion
|
|
71
|
-
export {
|
|
71
|
+
export { CircleLoader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const require_circle_loader = require('./circle-loader.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CircleLoader, CircleLoaderProps } from "./circle-loader.cjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CircleLoader, CircleLoaderProps } from "./circle-loader.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CircleLoader } from "./circle-loader.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUploadProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime6 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_runtime6.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_runtime7 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_runtime7.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FileUpload };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime7 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_runtime7.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_runtime6 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_runtime6.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FileUploadInline };
|
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,11 @@ const require_FileUpload = require('./file-upload/FileUpload.cjs');
|
|
|
3
3
|
require('./file-upload/index.cjs');
|
|
4
4
|
const require_AbsoluteFill = require('./AbsoluteFill.cjs');
|
|
5
5
|
const require_Alert = require('./Alert.cjs');
|
|
6
|
+
const require_AvatarUpload = require('./avatar-upload/AvatarUpload.cjs');
|
|
7
|
+
require('./avatar-upload/index.cjs');
|
|
6
8
|
const require_Button = require('./Button.cjs');
|
|
9
|
+
const require_circle_loader = require('./circle-loader/circle-loader.cjs');
|
|
10
|
+
require('./circle-loader/index.cjs');
|
|
7
11
|
const require_CloseButtonRounded = require('./CloseButtonRounded.cjs');
|
|
8
12
|
const require_CloseButtonAbsolute = require('./CloseButtonAbsolute.cjs');
|
|
9
13
|
const require_Combobox = require('./Combobox.cjs');
|
|
@@ -25,8 +29,6 @@ const require_RichTextEditor = require('./rich-text-editor/RichTextEditor.cjs');
|
|
|
25
29
|
require('./rich-text-editor/index.cjs');
|
|
26
30
|
const require_Select = require('./Select.cjs');
|
|
27
31
|
const require_Slider = require('./Slider.cjs');
|
|
28
|
-
const require_spinner = require('./spinner/spinner.cjs');
|
|
29
|
-
require('./spinner/index.cjs');
|
|
30
32
|
const require_tags_input = require('./tags-input.cjs');
|
|
31
33
|
const require_ThemeProvider = require('./theme-provider/ThemeProvider.cjs');
|
|
32
34
|
require('./theme-provider/index.cjs');
|
|
@@ -40,7 +42,9 @@ next_themes = require_rolldown_runtime.__toESM(next_themes);
|
|
|
40
42
|
|
|
41
43
|
exports.AbsoluteFill = require_AbsoluteFill.AbsoluteFill;
|
|
42
44
|
exports.Alert = require_Alert.Alert;
|
|
45
|
+
exports.AvatarUpload = require_AvatarUpload.AvatarUpload;
|
|
43
46
|
exports.Button = require_Button.Button;
|
|
47
|
+
exports.CircleLoader = require_circle_loader.CircleLoader;
|
|
44
48
|
exports.CloseButtonAbsolute = require_CloseButtonAbsolute.CloseButtonAbsolute;
|
|
45
49
|
exports.CloseButtonRounded = require_CloseButtonRounded.CloseButtonRounded;
|
|
46
50
|
exports.Combobox = require_Combobox.Combobox;
|
|
@@ -56,7 +60,6 @@ exports.Pagination = require_Pagination.Pagination;
|
|
|
56
60
|
exports.RichTextEditor = require_RichTextEditor.RichTextEditor;
|
|
57
61
|
exports.Select = require_Select.Select;
|
|
58
62
|
exports.Slider = require_Slider.Slider;
|
|
59
|
-
exports.Spinner = require_spinner.Spinner;
|
|
60
63
|
exports.TagsInput = require_tags_input.TagsInput;
|
|
61
64
|
exports.ThemeProvider = require_ThemeProvider.ThemeProvider;
|
|
62
65
|
exports.ThemeToggle = require_ThemeToggle.ThemeToggle;
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,11 @@ import { FileUpload } from "./file-upload/FileUpload.cjs";
|
|
|
3
3
|
import "./file-upload/index.cjs";
|
|
4
4
|
import { AbsoluteFill } from "./AbsoluteFill.cjs";
|
|
5
5
|
import { Alert, AlertBaseProps, AlertProps, AlertVariant } from "./Alert.cjs";
|
|
6
|
+
import { AvatarUpload, AvatarUploadProps } from "./avatar-upload/AvatarUpload.cjs";
|
|
7
|
+
import "./avatar-upload/index.cjs";
|
|
6
8
|
import { Button, ButtonLoaderProps, ButtonProps } from "./Button.cjs";
|
|
9
|
+
import { CircleLoader, CircleLoaderProps } from "./circle-loader/circle-loader.cjs";
|
|
10
|
+
import "./circle-loader/index.cjs";
|
|
7
11
|
import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.cjs";
|
|
8
12
|
import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.cjs";
|
|
9
13
|
import { Combobox } from "./Combobox.cjs";
|
|
@@ -27,8 +31,6 @@ import { RichTextEditor, RichTextEditorProps, ToolbarOption } from "./rich-text-
|
|
|
27
31
|
import "./rich-text-editor/index.cjs";
|
|
28
32
|
import { Select, SelectOption } from "./Select.cjs";
|
|
29
33
|
import { Slider, SliderProps } from "./Slider.cjs";
|
|
30
|
-
import { Spinner, SpinnerProps } from "./spinner/spinner.cjs";
|
|
31
|
-
import "./spinner/index.cjs";
|
|
32
34
|
import { TagsInput, TagsInputProps } from "./tags-input.cjs";
|
|
33
35
|
import { ThemeProvider, ThemeProviderProps } from "./theme-provider/ThemeProvider.cjs";
|
|
34
36
|
import { useTheme } from "./theme-provider/index.cjs";
|
|
@@ -36,4 +38,4 @@ import { ThemeToggle } from "./ThemeToggle.cjs";
|
|
|
36
38
|
import { DEFAULT_ALERT_DURATION, ToastMessage, toast, toastError, toastInfo, toastSuccess, toastWarning } from "./toast/toast.cjs";
|
|
37
39
|
import "./toast/index.cjs";
|
|
38
40
|
import { cn } from "@pixpilot/shadcn";
|
|
39
|
-
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, Button, ButtonLoaderProps, ButtonProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, RichTextEditor, RichTextEditorProps, Select, SelectOption, SingleFileUploadProps, Slider, SliderProps,
|
|
41
|
+
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, RichTextEditor, RichTextEditorProps, Select, SelectOption, SingleFileUploadProps, Slider, SliderProps, TagsInput, TagsInputProps, ThemeProvider, ThemeProviderProps, ThemeToggle, ToastMessage, ToolbarOption, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,11 @@ import { FileUpload } from "./file-upload/FileUpload.js";
|
|
|
3
3
|
import "./file-upload/index.js";
|
|
4
4
|
import { AbsoluteFill } from "./AbsoluteFill.js";
|
|
5
5
|
import { Alert, AlertBaseProps, AlertProps, AlertVariant } from "./Alert.js";
|
|
6
|
+
import { AvatarUpload, AvatarUploadProps } from "./avatar-upload/AvatarUpload.js";
|
|
7
|
+
import "./avatar-upload/index.js";
|
|
6
8
|
import { Button, ButtonLoaderProps, ButtonProps } from "./Button.js";
|
|
9
|
+
import { CircleLoader, CircleLoaderProps } from "./circle-loader/circle-loader.js";
|
|
10
|
+
import "./circle-loader/index.js";
|
|
7
11
|
import { CloseButtonRounded, CloseButtonRoundedProps } from "./CloseButtonRounded.js";
|
|
8
12
|
import { CloseButtonAbsolute, PopoverCloseButtonProps } from "./CloseButtonAbsolute.js";
|
|
9
13
|
import { Combobox } from "./Combobox.js";
|
|
@@ -28,8 +32,6 @@ import { RichTextEditor, RichTextEditorProps, ToolbarOption } from "./rich-text-
|
|
|
28
32
|
import "./rich-text-editor/index.js";
|
|
29
33
|
import { Select, SelectOption } from "./Select.js";
|
|
30
34
|
import { Slider, SliderProps } from "./Slider.js";
|
|
31
|
-
import { Spinner, SpinnerProps } from "./spinner/spinner.js";
|
|
32
|
-
import "./spinner/index.js";
|
|
33
35
|
import { TagsInput, TagsInputProps } from "./tags-input.js";
|
|
34
36
|
import { ThemeProvider, ThemeProviderProps } from "./theme-provider/ThemeProvider.js";
|
|
35
37
|
import { useTheme } from "./theme-provider/index.js";
|
|
@@ -37,4 +39,4 @@ import { ThemeToggle } from "./ThemeToggle.js";
|
|
|
37
39
|
import { DEFAULT_ALERT_DURATION, ToastMessage, toast, toastError, toastInfo, toastSuccess, toastWarning } from "./toast/toast.js";
|
|
38
40
|
import "./toast/index.js";
|
|
39
41
|
import { cn } from "@pixpilot/shadcn";
|
|
40
|
-
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, Button, ButtonLoaderProps, ButtonProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, RichTextEditor, RichTextEditorProps, Select, SelectOption, SingleFileUploadProps, Slider, SliderProps,
|
|
42
|
+
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, DialogProvider, DialogProviderProps, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, RichTextEditor, RichTextEditorProps, Select, SelectOption, SingleFileUploadProps, Slider, SliderProps, TagsInput, TagsInputProps, ThemeProvider, ThemeProviderProps, ThemeToggle, ToastMessage, ToolbarOption, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,11 @@ import { FileUpload } from "./file-upload/FileUpload.js";
|
|
|
2
2
|
import "./file-upload/index.js";
|
|
3
3
|
import { AbsoluteFill } from "./AbsoluteFill.js";
|
|
4
4
|
import { Alert } from "./Alert.js";
|
|
5
|
+
import { AvatarUpload } from "./avatar-upload/AvatarUpload.js";
|
|
6
|
+
import "./avatar-upload/index.js";
|
|
5
7
|
import { Button } from "./Button.js";
|
|
8
|
+
import { CircleLoader } from "./circle-loader/circle-loader.js";
|
|
9
|
+
import "./circle-loader/index.js";
|
|
6
10
|
import { CloseButtonRounded } from "./CloseButtonRounded.js";
|
|
7
11
|
import { CloseButtonAbsolute } from "./CloseButtonAbsolute.js";
|
|
8
12
|
import { Combobox } from "./Combobox.js";
|
|
@@ -24,8 +28,6 @@ import { RichTextEditor } from "./rich-text-editor/RichTextEditor.js";
|
|
|
24
28
|
import "./rich-text-editor/index.js";
|
|
25
29
|
import { Select } from "./Select.js";
|
|
26
30
|
import { Slider } from "./Slider.js";
|
|
27
|
-
import { Spinner } from "./spinner/spinner.js";
|
|
28
|
-
import "./spinner/index.js";
|
|
29
31
|
import { TagsInput } from "./tags-input.js";
|
|
30
32
|
import { ThemeProvider } from "./theme-provider/ThemeProvider.js";
|
|
31
33
|
import { useTheme } from "./theme-provider/index.js";
|
|
@@ -34,4 +36,4 @@ import { DEFAULT_ALERT_DURATION, toast, toastError, toastInfo, toastSuccess, toa
|
|
|
34
36
|
import "./toast/index.js";
|
|
35
37
|
import { cn } from "@pixpilot/shadcn";
|
|
36
38
|
|
|
37
|
-
export { AbsoluteFill, Alert, Button, CloseButtonAbsolute, CloseButtonRounded, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DialogProvider, FileUpload, FileUploadInline, IconPicker, LoadingOverlay, Pagination, RichTextEditor, Select, Slider,
|
|
39
|
+
export { AbsoluteFill, Alert, AvatarUpload, Button, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DialogProvider, FileUpload, FileUploadInline, IconPicker, LoadingOverlay, Pagination, RichTextEditor, Select, Slider, TagsInput, ThemeProvider, ThemeToggle, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useTheme };
|
package/package.json
CHANGED
package/dist/spinner/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const require_spinner = require('./spinner.cjs');
|
package/dist/spinner/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { Spinner, SpinnerProps } from "./spinner.cjs";
|
package/dist/spinner/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { Spinner, SpinnerProps } from "./spinner.js";
|
package/dist/spinner/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { Spinner } from "./spinner.js";
|