@pixpilot/shadcn-ui 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button.cjs +7 -6
- package/dist/Button.d.cts +2 -2
- package/dist/Button.d.ts +2 -2
- package/dist/Button.js +7 -6
- package/dist/IconToggle.cjs +5 -5
- package/dist/IconToggle.js +5 -5
- package/dist/dialog/Dialog.cjs +42 -0
- package/dist/dialog/Dialog.d.cts +22 -0
- package/dist/dialog/Dialog.d.ts +22 -0
- package/dist/dialog/Dialog.js +35 -0
- package/dist/dialog/index.cjs +4 -0
- package/dist/dialog/index.d.cts +3 -0
- package/dist/dialog/index.d.ts +3 -0
- package/dist/dialog/index.js +4 -0
- package/dist/file-upload/FileUpload.d.cts +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 +11 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/input/Input.d.cts +2 -2
- package/dist/input/Input.d.ts +2 -2
- package/dist/rich-text-editor/RichTextEditor.cjs +3 -2
- package/dist/rich-text-editor/RichTextEditor.d.cts +6 -0
- package/dist/rich-text-editor/RichTextEditor.d.ts +6 -0
- package/dist/rich-text-editor/RichTextEditor.js +3 -2
- package/dist/rich-text-editor/RichTextEditorToolbar.cjs +3 -1
- package/dist/rich-text-editor/RichTextEditorToolbar.js +3 -1
- package/dist/rich-text-editor/ToolbarButton.cjs +6 -5
- package/dist/rich-text-editor/ToolbarButton.d.cts +6 -0
- package/dist/rich-text-editor/ToolbarButton.d.ts +6 -0
- package/dist/rich-text-editor/ToolbarButton.js +8 -7
- 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/Button.cjs
CHANGED
|
@@ -22,16 +22,16 @@ function getLoaderSize(size) {
|
|
|
22
22
|
return LOADER_SIZE_DEFAULT;
|
|
23
23
|
}
|
|
24
24
|
function Button(props) {
|
|
25
|
-
const { children, disabled, onClick, disabledTooltip, loading,
|
|
26
|
-
const { placement: loaderPlacement = "end" } =
|
|
25
|
+
const { children, disabled, onClick, disabledTooltip, loading, loaderProps, onDisabledClick, tooltip, title, tooltipProps, className, variant, size, ref,...rest } = props;
|
|
26
|
+
const { placement: loaderPlacement = "end" } = loaderProps || {};
|
|
27
27
|
const handleClick = (0, react.useCallback)((e) => {
|
|
28
28
|
if (onClick && !disabled) onClick(e);
|
|
29
29
|
}, [disabled, onClick]);
|
|
30
30
|
const isDisabled = disabled || loading;
|
|
31
|
-
const hasTooltip = Boolean(tooltip)
|
|
31
|
+
const hasTooltip = Boolean(tooltip);
|
|
32
32
|
const hasDisabledTooltip = Boolean(disabledTooltip) && isDisabled;
|
|
33
33
|
const showTooltip = hasTooltip || hasDisabledTooltip;
|
|
34
|
-
const tooltipContent = hasDisabledTooltip ? disabledTooltip ?? "" : tooltip ??
|
|
34
|
+
const tooltipContent = hasDisabledTooltip ? disabledTooltip ?? "" : tooltip ?? "";
|
|
35
35
|
const Loader = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36
36
|
"data-slot": "button-loader",
|
|
37
37
|
className: (0, __pixpilot_shadcn.cn)("flex items-center justify-center", loaderPlacement === "center" && "rounded-0 absolute inset-0", loaderPlacement === "start" && "mr-1", loaderPlacement === "end" && "ml-1"),
|
|
@@ -51,9 +51,10 @@ function Button(props) {
|
|
|
51
51
|
className: (0, __pixpilot_shadcn.cn)("relative", className),
|
|
52
52
|
variant,
|
|
53
53
|
size,
|
|
54
|
+
title,
|
|
54
55
|
children: [
|
|
55
56
|
Boolean(disabledTooltip) && isDisabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Tooltip, {
|
|
56
|
-
...
|
|
57
|
+
...tooltipProps,
|
|
57
58
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipTrigger, {
|
|
58
59
|
asChild: true,
|
|
59
60
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AbsoluteFill.AbsoluteFill, {
|
|
@@ -71,7 +72,7 @@ function Button(props) {
|
|
|
71
72
|
]
|
|
72
73
|
});
|
|
73
74
|
if (showTooltip && !(Boolean(disabledTooltip) && isDisabled)) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Tooltip, {
|
|
74
|
-
...
|
|
75
|
+
...tooltipProps,
|
|
75
76
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipTrigger, {
|
|
76
77
|
asChild: true,
|
|
77
78
|
children: buttonContent
|
package/dist/Button.d.cts
CHANGED
|
@@ -27,7 +27,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
|
|
|
27
27
|
/**
|
|
28
28
|
* Loader configuration
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
loaderProps?: ButtonLoaderProps;
|
|
31
31
|
/**
|
|
32
32
|
* Click handler for when disabled button is clicked
|
|
33
33
|
*/
|
|
@@ -35,7 +35,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
|
|
|
35
35
|
/**
|
|
36
36
|
* Props to pass to the tooltip component
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
tooltipProps?: Omit<React.ComponentProps<typeof Tooltip>, 'children' | 'delayDuration'>;
|
|
39
39
|
}
|
|
40
40
|
declare function Button$1(props: ButtonProps & {
|
|
41
41
|
ref?: React.Ref<HTMLButtonElement>;
|
package/dist/Button.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
|
|
|
27
27
|
/**
|
|
28
28
|
* Loader configuration
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
loaderProps?: ButtonLoaderProps;
|
|
31
31
|
/**
|
|
32
32
|
* Click handler for when disabled button is clicked
|
|
33
33
|
*/
|
|
@@ -35,7 +35,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
|
|
|
35
35
|
/**
|
|
36
36
|
* Props to pass to the tooltip component
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
tooltipProps?: Omit<React.ComponentProps<typeof Tooltip>, 'children' | 'delayDuration'>;
|
|
39
39
|
}
|
|
40
40
|
declare function Button$1(props: ButtonProps & {
|
|
41
41
|
ref?: React.Ref<HTMLButtonElement>;
|
package/dist/Button.js
CHANGED
|
@@ -17,16 +17,16 @@ function getLoaderSize(size) {
|
|
|
17
17
|
return LOADER_SIZE_DEFAULT;
|
|
18
18
|
}
|
|
19
19
|
function Button$1(props) {
|
|
20
|
-
const { children, disabled, onClick, disabledTooltip, loading,
|
|
21
|
-
const { placement: loaderPlacement = "end" } =
|
|
20
|
+
const { children, disabled, onClick, disabledTooltip, loading, loaderProps, onDisabledClick, tooltip, title, tooltipProps, className, variant, size, ref,...rest } = props;
|
|
21
|
+
const { placement: loaderPlacement = "end" } = loaderProps || {};
|
|
22
22
|
const handleClick = useCallback((e) => {
|
|
23
23
|
if (onClick && !disabled) onClick(e);
|
|
24
24
|
}, [disabled, onClick]);
|
|
25
25
|
const isDisabled = disabled || loading;
|
|
26
|
-
const hasTooltip = Boolean(tooltip)
|
|
26
|
+
const hasTooltip = Boolean(tooltip);
|
|
27
27
|
const hasDisabledTooltip = Boolean(disabledTooltip) && isDisabled;
|
|
28
28
|
const showTooltip = hasTooltip || hasDisabledTooltip;
|
|
29
|
-
const tooltipContent = hasDisabledTooltip ? disabledTooltip ?? "" : tooltip ??
|
|
29
|
+
const tooltipContent = hasDisabledTooltip ? disabledTooltip ?? "" : tooltip ?? "";
|
|
30
30
|
const Loader = /* @__PURE__ */ jsx("div", {
|
|
31
31
|
"data-slot": "button-loader",
|
|
32
32
|
className: cn("flex items-center justify-center", loaderPlacement === "center" && "rounded-0 absolute inset-0", loaderPlacement === "start" && "mr-1", loaderPlacement === "end" && "ml-1"),
|
|
@@ -46,9 +46,10 @@ function Button$1(props) {
|
|
|
46
46
|
className: cn("relative", className),
|
|
47
47
|
variant,
|
|
48
48
|
size,
|
|
49
|
+
title,
|
|
49
50
|
children: [
|
|
50
51
|
Boolean(disabledTooltip) && isDisabled && /* @__PURE__ */ jsxs(Tooltip, {
|
|
51
|
-
...
|
|
52
|
+
...tooltipProps,
|
|
52
53
|
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
53
54
|
asChild: true,
|
|
54
55
|
children: /* @__PURE__ */ jsx(AbsoluteFill, {
|
|
@@ -66,7 +67,7 @@ function Button$1(props) {
|
|
|
66
67
|
]
|
|
67
68
|
});
|
|
68
69
|
if (showTooltip && !(Boolean(disabledTooltip) && isDisabled)) return /* @__PURE__ */ jsxs(Tooltip, {
|
|
69
|
-
...
|
|
70
|
+
...tooltipProps,
|
|
70
71
|
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
71
72
|
asChild: true,
|
|
72
73
|
children: buttonContent
|
package/dist/IconToggle.cjs
CHANGED
|
@@ -66,20 +66,20 @@ const IconToggle = react.default.forwardRef(({ checked: controlledChecked, defau
|
|
|
66
66
|
ghost: "hover:bg-accent hover:text-accent-foreground data-[state=checked]:bg-primary/10 data-[state=checked]:text-primary"
|
|
67
67
|
};
|
|
68
68
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
69
|
-
ref,
|
|
70
69
|
type: "button",
|
|
71
70
|
role: "switch",
|
|
72
|
-
"aria-checked": checked,
|
|
73
|
-
"data-state": checked ? "checked" : "unchecked",
|
|
74
71
|
"data-slot": "icon-toggle",
|
|
72
|
+
...props,
|
|
75
73
|
disabled,
|
|
74
|
+
ref,
|
|
75
|
+
"aria-checked": checked,
|
|
76
|
+
onClick: handleClick,
|
|
77
|
+
"data-state": checked ? "checked" : "unchecked",
|
|
76
78
|
className: (0, __pixpilot_shadcn.cn)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg:not([class*=\"size-\"])]:size-[var(--icon-toggle-icon-size)] [&_svg]:shrink-0", sizeClasses[size], variantClasses[variant], className),
|
|
77
79
|
style: {
|
|
78
80
|
...styleProp ?? {},
|
|
79
81
|
["--icon-toggle-icon-size"]: resolvedIconSize
|
|
80
82
|
},
|
|
81
|
-
onClick: handleClick,
|
|
82
|
-
...props,
|
|
83
83
|
children: checked ? renderIcon(checkedIcon) : renderIcon(uncheckedIcon)
|
|
84
84
|
});
|
|
85
85
|
});
|
package/dist/IconToggle.js
CHANGED
|
@@ -62,20 +62,20 @@ const IconToggle = React.forwardRef(({ checked: controlledChecked, defaultChecke
|
|
|
62
62
|
ghost: "hover:bg-accent hover:text-accent-foreground data-[state=checked]:bg-primary/10 data-[state=checked]:text-primary"
|
|
63
63
|
};
|
|
64
64
|
return /* @__PURE__ */ jsx("button", {
|
|
65
|
-
ref,
|
|
66
65
|
type: "button",
|
|
67
66
|
role: "switch",
|
|
68
|
-
"aria-checked": checked,
|
|
69
|
-
"data-state": checked ? "checked" : "unchecked",
|
|
70
67
|
"data-slot": "icon-toggle",
|
|
68
|
+
...props,
|
|
71
69
|
disabled,
|
|
70
|
+
ref,
|
|
71
|
+
"aria-checked": checked,
|
|
72
|
+
onClick: handleClick,
|
|
73
|
+
"data-state": checked ? "checked" : "unchecked",
|
|
72
74
|
className: cn("inline-flex items-center justify-center rounded-md text-sm font-medium transition-all outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg:not([class*=\"size-\"])]:size-[var(--icon-toggle-icon-size)] [&_svg]:shrink-0", sizeClasses[size], variantClasses[variant], className),
|
|
73
75
|
style: {
|
|
74
76
|
...styleProp ?? {},
|
|
75
77
|
["--icon-toggle-icon-size"]: resolvedIconSize
|
|
76
78
|
},
|
|
77
|
-
onClick: handleClick,
|
|
78
|
-
...props,
|
|
79
79
|
children: checked ? renderIcon(checkedIcon) : renderIcon(uncheckedIcon)
|
|
80
80
|
});
|
|
81
81
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
3
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
|
|
9
|
+
//#region src/dialog/Dialog.tsx
|
|
10
|
+
const DialogContent = react.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DialogContent, {
|
|
11
|
+
ref,
|
|
12
|
+
className: (0, __pixpilot_shadcn.cn)("max-h-[85vh] sm:max-h-[90vh] flex flex-col p-0 gap-0", className),
|
|
13
|
+
...props
|
|
14
|
+
}));
|
|
15
|
+
DialogContent.displayName = "DialogContent";
|
|
16
|
+
function DialogHeader({ className,...props }) {
|
|
17
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
18
|
+
"data-slot": "header",
|
|
19
|
+
className: (0, __pixpilot_shadcn.cn)("flex flex-col space-y-1.5 px-6 py-4", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function DialogBody({ className,...props }) {
|
|
24
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
25
|
+
"data-slot": "body",
|
|
26
|
+
className: (0, __pixpilot_shadcn.cn)("flex-1 overflow-y-auto px-6 py-2", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function DialogFooter({ className,...props }) {
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
32
|
+
"data-slot": "footer",
|
|
33
|
+
className: (0, __pixpilot_shadcn.cn)("flex justify-end space-x-2 px-6 py-4", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.DialogBody = DialogBody;
|
|
40
|
+
exports.DialogContent = DialogContent;
|
|
41
|
+
exports.DialogFooter = DialogFooter;
|
|
42
|
+
exports.DialogHeader = DialogHeader;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
4
|
+
|
|
5
|
+
//#region src/dialog/Dialog.d.ts
|
|
6
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement> & {
|
|
7
|
+
showCloseButton?: boolean;
|
|
8
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare function DialogHeader({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
|
|
13
|
+
declare function DialogBody({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
|
|
17
|
+
declare function DialogFooter({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { DialogBody, DialogContent, DialogFooter, DialogHeader };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
|
+
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
4
|
+
|
|
5
|
+
//#region src/dialog/Dialog.d.ts
|
|
6
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement> & {
|
|
7
|
+
showCloseButton?: boolean;
|
|
8
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare function DialogHeader({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime8.JSX.Element;
|
|
13
|
+
declare function DialogBody({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime8.JSX.Element;
|
|
17
|
+
declare function DialogFooter({
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime8.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { DialogBody, DialogContent, DialogFooter, DialogHeader };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DialogContent, cn } from "@pixpilot/shadcn";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/dialog/Dialog.tsx
|
|
6
|
+
const DialogContent$1 = React$1.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(DialogContent, {
|
|
7
|
+
ref,
|
|
8
|
+
className: cn("max-h-[85vh] sm:max-h-[90vh] flex flex-col p-0 gap-0", className),
|
|
9
|
+
...props
|
|
10
|
+
}));
|
|
11
|
+
DialogContent$1.displayName = "DialogContent";
|
|
12
|
+
function DialogHeader$1({ className,...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
"data-slot": "header",
|
|
15
|
+
className: cn("flex flex-col space-y-1.5 px-6 py-4", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function DialogBody({ className,...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx("div", {
|
|
21
|
+
"data-slot": "body",
|
|
22
|
+
className: cn("flex-1 overflow-y-auto px-6 py-2", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function DialogFooter$1({ className,...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("div", {
|
|
28
|
+
"data-slot": "footer",
|
|
29
|
+
className: cn("flex justify-end space-x-2 px-6 py-4", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { DialogBody, DialogContent$1 as DialogContent, DialogFooter$1 as DialogFooter, DialogHeader$1 as DialogHeader };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DialogBody, DialogContent as DialogContent$1, DialogFooter as DialogFooter$1, DialogHeader as DialogHeader$1 } from "./Dialog.js";
|
|
2
|
+
import { Dialog as Dialog$1, DialogClose as DialogClose$1, DialogDescription as DialogDescription$1, DialogTitle as DialogTitle$1, DialogTrigger as DialogTrigger$1 } from "@pixpilot/shadcn";
|
|
3
|
+
export { Dialog$1 as Dialog, DialogClose$1 as DialogClose, DialogDescription$1 as DialogDescription, DialogTitle$1 as DialogTitle, DialogTrigger$1 as DialogTrigger };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DialogBody, DialogContent as DialogContent$1, DialogFooter as DialogFooter$1, DialogHeader as DialogHeader$1 } from "./Dialog.js";
|
|
2
|
+
import { Dialog as Dialog$1, DialogClose as DialogClose$1, DialogDescription as DialogDescription$1, DialogTitle as DialogTitle$1, DialogTrigger as DialogTrigger$1 } from "@pixpilot/shadcn";
|
|
3
|
+
|
|
4
|
+
export { Dialog$1 as Dialog, DialogClose$1 as DialogClose, DialogDescription$1 as DialogDescription, DialogTitle$1 as DialogTitle, DialogTrigger$1 as DialogTrigger };
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.cjs";
|
|
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 };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FileUploadInlineProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime11 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_runtime11.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { FileUploadInline };
|
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,8 @@ const require_DialogProvider = require('./confirmation-dialog/DialogProvider.cjs
|
|
|
22
22
|
require('./confirmation-dialog/index.cjs');
|
|
23
23
|
const require_ContentCard = require('./ContentCard.cjs');
|
|
24
24
|
const require_DatePicker = require('./DatePicker.cjs');
|
|
25
|
+
const require_Dialog = require('./dialog/Dialog.cjs');
|
|
26
|
+
require('./dialog/index.cjs');
|
|
25
27
|
const require_FileUploadInline = require('./file-upload-inline/FileUploadInline.cjs');
|
|
26
28
|
require('./file-upload-inline/index.cjs');
|
|
27
29
|
const require_use_media_query = require('./hooks/use-media-query.cjs');
|
|
@@ -82,7 +84,16 @@ exports.Combobox = require_Combobox.Combobox;
|
|
|
82
84
|
exports.ContentCard = require_ContentCard.ContentCard;
|
|
83
85
|
exports.DEFAULT_ALERT_DURATION = require_toast.DEFAULT_ALERT_DURATION;
|
|
84
86
|
exports.DatePicker = require_DatePicker.DatePicker;
|
|
87
|
+
exports.Dialog = __pixpilot_shadcn.Dialog;
|
|
88
|
+
exports.DialogBody = require_Dialog.DialogBody;
|
|
89
|
+
exports.DialogClose = __pixpilot_shadcn.DialogClose;
|
|
90
|
+
exports.DialogContent = require_Dialog.DialogContent;
|
|
91
|
+
exports.DialogDescription = __pixpilot_shadcn.DialogDescription;
|
|
92
|
+
exports.DialogFooter = require_Dialog.DialogFooter;
|
|
93
|
+
exports.DialogHeader = require_Dialog.DialogHeader;
|
|
85
94
|
exports.DialogProvider = require_DialogProvider.DialogProvider;
|
|
95
|
+
exports.DialogTitle = __pixpilot_shadcn.DialogTitle;
|
|
96
|
+
exports.DialogTrigger = __pixpilot_shadcn.DialogTrigger;
|
|
86
97
|
exports.FileUpload = require_FileUpload.FileUpload;
|
|
87
98
|
exports.FileUploadInline = require_FileUploadInline.FileUploadInline;
|
|
88
99
|
exports.IconPicker = require_IconPicker.IconPicker;
|
package/dist/index.d.cts
CHANGED
|
@@ -21,6 +21,8 @@ import { DialogProvider, DialogProviderProps } from "./confirmation-dialog/Dialo
|
|
|
21
21
|
import "./confirmation-dialog/index.cjs";
|
|
22
22
|
import { ContentCard } from "./ContentCard.cjs";
|
|
23
23
|
import { DatePicker, DatePickerProps } from "./DatePicker.cjs";
|
|
24
|
+
import { DialogBody, DialogContent, DialogFooter, DialogHeader } from "./dialog/Dialog.cjs";
|
|
25
|
+
import { Dialog, DialogClose, DialogDescription, DialogTitle, DialogTrigger } from "./dialog/index.cjs";
|
|
24
26
|
import { FileUploadInlineBaseProps, FileUploadInlineProps } from "./file-upload-inline/types.cjs";
|
|
25
27
|
import { FileUploadInline } from "./file-upload-inline/FileUploadInline.cjs";
|
|
26
28
|
import "./file-upload-inline/index.cjs";
|
|
@@ -69,4 +71,4 @@ import { Toaster } from "./toast/ToastProvider.cjs";
|
|
|
69
71
|
import "./toast/index.cjs";
|
|
70
72
|
import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.cjs";
|
|
71
73
|
import { cn } from "@pixpilot/shadcn";
|
|
72
|
-
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, 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, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, PresetColor, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastMessage, Toaster, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
|
74
|
+
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, PresetColor, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastMessage, Toaster, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ import { DialogProvider, DialogProviderProps } from "./confirmation-dialog/Dialo
|
|
|
23
23
|
import "./confirmation-dialog/index.js";
|
|
24
24
|
import { ContentCard } from "./ContentCard.js";
|
|
25
25
|
import { DatePicker, DatePickerProps } from "./DatePicker.js";
|
|
26
|
+
import { DialogBody, DialogContent, DialogFooter, DialogHeader } from "./dialog/Dialog.js";
|
|
27
|
+
import { Dialog, DialogClose, DialogDescription, DialogTitle, DialogTrigger } from "./dialog/index.js";
|
|
26
28
|
import { FileUploadInlineBaseProps, FileUploadInlineProps } from "./file-upload-inline/types.js";
|
|
27
29
|
import { FileUploadInline } from "./file-upload-inline/FileUploadInline.js";
|
|
28
30
|
import "./file-upload-inline/index.js";
|
|
@@ -71,4 +73,4 @@ import { Toaster } from "./toast/ToastProvider.js";
|
|
|
71
73
|
import "./toast/index.js";
|
|
72
74
|
import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.js";
|
|
73
75
|
import { cn } from "@pixpilot/shadcn";
|
|
74
|
-
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, 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, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, PresetColor, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastMessage, Toaster, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
|
76
|
+
export { AbsoluteFill, Alert, AlertBaseProps, AlertProps, AlertVariant, AvatarUpload, AvatarUploadProps, BaseTabsTriggerProps, Button, ButtonLoaderProps, ButtonProps, CircleLoader, CircleLoaderProps, CloseButtonAbsolute, CloseButtonRounded, CloseButtonRoundedProps, ColorPicker, ColorPickerBase, ColorPickerBaseProps, ColorPickerBaseSection, ColorPickerProps, ColorSelect, ColorSelectOption, BaseColorSelectProps as ColorSelectProps, Combobox, ConfirmationDialogProps, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DatePickerProps, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogProviderProps, DialogTitle, DialogTrigger, type FileMetadata, FileUpload, FileUploadBaseProps, FileUploadInline, FileUploadInlineBaseProps, FileUploadInlineProps, type FileUploadProgressCallBacks, type FileUploadProps, IconPicker, IconPickerProps, IconPickerVariant, IconProvider, IconProviderLoader, IconProviderProps, IconToggle, IconToggleProps, Input, InputProps, Layout, LayoutFooter, LayoutFooterProps, LayoutHeader, LayoutHeaderProps, LayoutMain, LayoutMainProps, LayoutProps, LoaderProps, LoadingOverlay, MultiFileUploadProps, OnChangeMultipleFiles, OnChangeSingleFile, Pagination, PaginationProps, PopoverCloseButtonProps, PresetColor, RichTextEditor, RichTextEditorProps, RichTextEditorSlots, ScaledPreview, ScaledPreviewProps, ScaledPreviewSize, Select, SelectOption, SingleFileUploadProps, Slider, SliderInput, SliderInputProps, SliderProps, SliderSelect, SliderSelectOption, SliderSelectProps, SliderSelectValue, Tabs, TabsContent, TabsContext, TabsContextValue, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TabsVariant, TagsInput, TagsInputProps, ThemeModeDropdown, ThemeModeDropdownProps, ThemeModeSwitchInside, ThemeModeSwitchInsideProps, ThemeModeSwitchInsideSize, ThemeModeSwitchOutside, ThemeModeSwitchOutsideProps, ThemeModeToggleButton, ThemeModeToggleButtonProps, ThemeProvider, ThemeProviderProps, ToastMessage, Toaster, ToolbarItems, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,8 @@ import { DialogProvider } from "./confirmation-dialog/DialogProvider.js";
|
|
|
21
21
|
import "./confirmation-dialog/index.js";
|
|
22
22
|
import { ContentCard } from "./ContentCard.js";
|
|
23
23
|
import { DatePicker } from "./DatePicker.js";
|
|
24
|
+
import { DialogBody, DialogContent, DialogFooter, DialogHeader } from "./dialog/Dialog.js";
|
|
25
|
+
import { Dialog, DialogClose, DialogDescription, DialogTitle, DialogTrigger } from "./dialog/index.js";
|
|
24
26
|
import { FileUploadInline } from "./file-upload-inline/FileUploadInline.js";
|
|
25
27
|
import "./file-upload-inline/index.js";
|
|
26
28
|
import { useMediaQuery } from "./hooks/use-media-query.js";
|
|
@@ -66,4 +68,4 @@ import { Toaster } from "./toast/ToastProvider.js";
|
|
|
66
68
|
import "./toast/index.js";
|
|
67
69
|
import { cn } from "@pixpilot/shadcn";
|
|
68
70
|
|
|
69
|
-
export { AbsoluteFill, Alert, AvatarUpload, Button, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerBase, ColorSelect, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DialogProvider, FileUpload, FileUploadInline, IconPicker, IconToggle, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, ThemeModeDropdown, ThemeModeSwitchInside, ThemeModeSwitchOutside, ThemeModeToggleButton, ThemeProvider, Toaster, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
|
71
|
+
export { AbsoluteFill, Alert, AvatarUpload, Button, CircleLoader, CloseButtonAbsolute, CloseButtonRounded, ColorPicker, ColorPickerBase, ColorSelect, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogProvider, DialogTitle, DialogTrigger, FileUpload, FileUploadInline, IconPicker, IconToggle, Input, Layout, LayoutFooter, LayoutHeader, LayoutMain, LoadingOverlay, Pagination, RichTextEditor, ScaledPreview, Select, Slider, SliderInput, SliderSelect, Tabs, TabsContent, TabsContext, TabsList, TabsTrigger, TagsInput, ThemeModeDropdown, ThemeModeSwitchInside, ThemeModeSwitchOutside, ThemeModeToggleButton, ThemeProvider, Toaster, cn, isSvgMarkupString, showConfirmDialog, svgMarkupToMaskUrl, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useSelectKeyboard, useTabsContext, useTheme };
|
package/dist/input/Input.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 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_runtime7.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input, InputProps$1 as InputProps };
|
package/dist/input/Input.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputProps } from "@pixpilot/shadcn";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/input/Input.d.ts
|
|
6
6
|
type InputProps$1 = InputProps & {
|
|
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
|
|
|
10
10
|
prefixClassName?: string;
|
|
11
11
|
suffixClassName?: string;
|
|
12
12
|
};
|
|
13
|
-
declare function Input$1(props: InputProps$1):
|
|
13
|
+
declare function Input$1(props: InputProps$1): react_jsx_runtime7.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input$1 as Input, InputProps$1 as InputProps };
|
|
@@ -51,7 +51,7 @@ function useEditorProps(slots, customEditorProps) {
|
|
|
51
51
|
}
|
|
52
52
|
}), [defaultEditorProps, customEditorProps]);
|
|
53
53
|
}
|
|
54
|
-
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false }) => {
|
|
54
|
+
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false, tooltipMode = "native" }) => {
|
|
55
55
|
const [renderTick, forceRender] = react.default.useReducer((x) => x + 1, 0);
|
|
56
56
|
const mergedEditorProps = useEditorProps(slots, customEditorProps);
|
|
57
57
|
const onChangeRef = react.default.useRef(onChange);
|
|
@@ -101,7 +101,8 @@ const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, edita
|
|
|
101
101
|
toolbarItems,
|
|
102
102
|
slots,
|
|
103
103
|
showToolbar,
|
|
104
|
-
renderTick
|
|
104
|
+
renderTick,
|
|
105
|
+
tooltipMode
|
|
105
106
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__tiptap_react.EditorContent, { editor: editorInstance })]
|
|
106
107
|
});
|
|
107
108
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ToolbarButtonTooltipMode } from "./ToolbarButton.cjs";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Editor, Extension } from "@tiptap/core";
|
|
3
4
|
import { UseEditorOptions } from "@tiptap/react";
|
|
@@ -76,6 +77,11 @@ interface RichTextEditorProps {
|
|
|
76
77
|
* @default false
|
|
77
78
|
*/
|
|
78
79
|
immediatelyRender?: UseEditorOptions['immediatelyRender'];
|
|
80
|
+
/**
|
|
81
|
+
* Tooltip mode for toolbar buttons
|
|
82
|
+
* @default 'native'
|
|
83
|
+
*/
|
|
84
|
+
tooltipMode?: ToolbarButtonTooltipMode;
|
|
79
85
|
}
|
|
80
86
|
declare const RichTextEditor: React.FC<RichTextEditorProps>;
|
|
81
87
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ToolbarButtonTooltipMode } from "./ToolbarButton.js";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { UseEditorOptions } from "@tiptap/react";
|
|
3
4
|
import { Editor, Extension } from "@tiptap/core";
|
|
@@ -76,6 +77,11 @@ interface RichTextEditorProps {
|
|
|
76
77
|
* @default false
|
|
77
78
|
*/
|
|
78
79
|
immediatelyRender?: UseEditorOptions['immediatelyRender'];
|
|
80
|
+
/**
|
|
81
|
+
* Tooltip mode for toolbar buttons
|
|
82
|
+
* @default 'native'
|
|
83
|
+
*/
|
|
84
|
+
tooltipMode?: ToolbarButtonTooltipMode;
|
|
79
85
|
}
|
|
80
86
|
declare const RichTextEditor: React.FC<RichTextEditorProps>;
|
|
81
87
|
//#endregion
|
|
@@ -43,7 +43,7 @@ function useEditorProps(slots, customEditorProps) {
|
|
|
43
43
|
}
|
|
44
44
|
}), [defaultEditorProps, customEditorProps]);
|
|
45
45
|
}
|
|
46
|
-
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false }) => {
|
|
46
|
+
const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, editable = true, slots, showToolbar = true, toolbarItems = defaultToolbarItems, editorProps: customEditorProps, immediatelyRender = false, tooltipMode = "native" }) => {
|
|
47
47
|
const [renderTick, forceRender] = React.useReducer((x) => x + 1, 0);
|
|
48
48
|
const mergedEditorProps = useEditorProps(slots, customEditorProps);
|
|
49
49
|
const onChangeRef = React.useRef(onChange);
|
|
@@ -93,7 +93,8 @@ const RichTextEditor = ({ value, onChange, extensions = defaultExtensions, edita
|
|
|
93
93
|
toolbarItems,
|
|
94
94
|
slots,
|
|
95
95
|
showToolbar,
|
|
96
|
-
renderTick
|
|
96
|
+
renderTick,
|
|
97
|
+
tooltipMode
|
|
97
98
|
}), /* @__PURE__ */ jsx(EditorContent, { editor: editorInstance })]
|
|
98
99
|
});
|
|
99
100
|
};
|
|
@@ -9,7 +9,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
9
9
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
10
|
|
|
11
11
|
//#region src/rich-text-editor/RichTextEditorToolbar.tsx
|
|
12
|
-
const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolbar, renderTick }) => {
|
|
12
|
+
const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolbar, renderTick, tooltipMode }) => {
|
|
13
13
|
if (!showToolbar) return null;
|
|
14
14
|
const handleCommand = (commandFn) => {
|
|
15
15
|
try {
|
|
@@ -35,6 +35,7 @@ const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolb
|
|
|
35
35
|
isActive: isEditorFocused && (predefinedOption.isActive?.(editor) ?? false),
|
|
36
36
|
tooltip: predefinedOption.tooltip,
|
|
37
37
|
className: slots?.toolbar?.button?.className,
|
|
38
|
+
tooltipMode,
|
|
38
39
|
children: predefinedOption.icon
|
|
39
40
|
}, option);
|
|
40
41
|
}
|
|
@@ -45,6 +46,7 @@ const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolb
|
|
|
45
46
|
isActive: isEditorFocused && (customOption.isActive?.(editor) ?? false),
|
|
46
47
|
tooltip: customOption.tooltip,
|
|
47
48
|
className: slots?.toolbar?.button?.className,
|
|
49
|
+
tooltipMode,
|
|
48
50
|
children: customOption.icon
|
|
49
51
|
}, `custom-${customCount}-${customOption.tooltip}`);
|
|
50
52
|
})
|
|
@@ -5,7 +5,7 @@ import React from "react";
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/rich-text-editor/RichTextEditorToolbar.tsx
|
|
8
|
-
const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolbar, renderTick }) => {
|
|
8
|
+
const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolbar, renderTick, tooltipMode }) => {
|
|
9
9
|
if (!showToolbar) return null;
|
|
10
10
|
const handleCommand = (commandFn) => {
|
|
11
11
|
try {
|
|
@@ -31,6 +31,7 @@ const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolb
|
|
|
31
31
|
isActive: isEditorFocused && (predefinedOption.isActive?.(editor) ?? false),
|
|
32
32
|
tooltip: predefinedOption.tooltip,
|
|
33
33
|
className: slots?.toolbar?.button?.className,
|
|
34
|
+
tooltipMode,
|
|
34
35
|
children: predefinedOption.icon
|
|
35
36
|
}, option);
|
|
36
37
|
}
|
|
@@ -41,6 +42,7 @@ const RichTextEditorToolbarComponent = ({ editor, toolbarItems, slots, showToolb
|
|
|
41
42
|
isActive: isEditorFocused && (customOption.isActive?.(editor) ?? false),
|
|
42
43
|
tooltip: customOption.tooltip,
|
|
43
44
|
className: slots?.toolbar?.button?.className,
|
|
45
|
+
tooltipMode,
|
|
44
46
|
children: customOption.icon
|
|
45
47
|
}, `custom-${customCount}-${customOption.tooltip}`);
|
|
46
48
|
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_Button = require('../Button.cjs');
|
|
2
3
|
const require_svg = require('../utils/svg.cjs');
|
|
3
4
|
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
4
5
|
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
@@ -8,9 +9,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
8
9
|
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
9
10
|
|
|
10
11
|
//#region src/rich-text-editor/ToolbarButton.tsx
|
|
11
|
-
const ToolbarButton = ({ onClick, isActive, disabled, className, children, tooltip }) =>
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const ToolbarButton = ({ onClick, isActive, disabled, className, children, tooltip, tooltipMode }) => {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
|
|
14
|
+
...tooltipMode === "native" ? { title: tooltip } : { tooltip },
|
|
14
15
|
type: "button",
|
|
15
16
|
variant: isActive ? "default" : "ghost",
|
|
16
17
|
size: "sm",
|
|
@@ -36,8 +37,8 @@ const ToolbarButton = ({ onClick, isActive, disabled, className, children, toolt
|
|
|
36
37
|
maskSize: "contain"
|
|
37
38
|
}
|
|
38
39
|
}) : children
|
|
39
|
-
})
|
|
40
|
-
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
41
42
|
|
|
42
43
|
//#endregion
|
|
43
44
|
exports.ToolbarButton = ToolbarButton;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { Button as Button$1 } from "../Button.js";
|
|
1
2
|
import { isSvgMarkupString, svgMarkupToMaskUrl } from "../utils/svg.js";
|
|
2
|
-
import {
|
|
3
|
+
import { cn } from "@pixpilot/shadcn";
|
|
3
4
|
import React from "react";
|
|
4
|
-
import { jsx
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
|
|
6
7
|
//#region src/rich-text-editor/ToolbarButton.tsx
|
|
7
|
-
const ToolbarButton = ({ onClick, isActive, disabled, className, children, tooltip }) =>
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const ToolbarButton = ({ onClick, isActive, disabled, className, children, tooltip, tooltipMode }) => {
|
|
9
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
10
|
+
...tooltipMode === "native" ? { title: tooltip } : { tooltip },
|
|
10
11
|
type: "button",
|
|
11
12
|
variant: isActive ? "default" : "ghost",
|
|
12
13
|
size: "sm",
|
|
@@ -32,8 +33,8 @@ const ToolbarButton = ({ onClick, isActive, disabled, className, children, toolt
|
|
|
32
33
|
maskSize: "contain"
|
|
33
34
|
}
|
|
34
35
|
}) : children
|
|
35
|
-
})
|
|
36
|
-
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
37
38
|
|
|
38
39
|
//#endregion
|
|
39
40
|
export { ToolbarButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 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_runtime13.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_runtime13 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_runtime13.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_runtime14 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_runtime14.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_runtime14 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_runtime14.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_runtime15 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_runtime15.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_runtime15 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_runtime15.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_runtime12 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_runtime12.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_runtime12 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_runtime12.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": "0.
|
|
4
|
+
"version": "0.39.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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"pretty-bytes": "^7.1.0",
|
|
47
47
|
"react-responsive": "^10.0.1",
|
|
48
48
|
"sonner": "2.0.7",
|
|
49
|
-
"@pixpilot/shadcn": "0.7.
|
|
49
|
+
"@pixpilot/shadcn": "0.7.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@storybook/react": "^8.6.14",
|