@pixpilot/shadcn-ui 0.29.0 → 0.31.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/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/icon-selector/IconPicker.cjs +67 -38
- package/dist/icon-selector/IconPicker.d.cts +23 -1
- package/dist/icon-selector/IconPicker.d.ts +23 -1
- package/dist/icon-selector/IconPicker.js +66 -39
- package/dist/icon-selector/icon-picker-container.cjs +8 -2
- package/dist/icon-selector/icon-picker-container.js +8 -2
- package/dist/input/Input.d.cts +2 -2
- package/dist/input/Input.d.ts +2 -2
- package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
- package/dist/theme-toggle/ThemeModeToggleButton.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUploadProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 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_runtime12.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_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,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_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 };
|
|
@@ -5,6 +5,10 @@ require('../hooks/index.cjs');
|
|
|
5
5
|
const require_constants = require('./constants.cjs');
|
|
6
6
|
const require_icon_picker_container = require('./icon-picker-container.cjs');
|
|
7
7
|
const require_icon_picker_content = require('./icon-picker-content.cjs');
|
|
8
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
9
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
10
|
+
let lucide_react = require("lucide-react");
|
|
11
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
8
12
|
let react = require("react");
|
|
9
13
|
react = require_rolldown_runtime.__toESM(react);
|
|
10
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -13,7 +17,8 @@ let __iconify_react = require("@iconify/react");
|
|
|
13
17
|
__iconify_react = require_rolldown_runtime.__toESM(__iconify_react);
|
|
14
18
|
|
|
15
19
|
//#region src/icon-selector/IconPicker.tsx
|
|
16
|
-
const
|
|
20
|
+
const ICON_SIZE = "!h-4 !w-4";
|
|
21
|
+
const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popover, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
|
|
17
22
|
const [isOpen, setIsOpen] = (0, react.useState)(false);
|
|
18
23
|
const isMobile = require_use_media_query.useMediaQuery({ maxWidth: 768 });
|
|
19
24
|
const handleSelectIcon = (0, react.useCallback)((iconName) => {
|
|
@@ -21,15 +26,25 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
|
|
|
21
26
|
setIsOpen(false);
|
|
22
27
|
onOpenChange?.(false);
|
|
23
28
|
}, [onChange, onOpenChange]);
|
|
29
|
+
const handleClearIcon = (0, react.useCallback)(() => {
|
|
30
|
+
onChange?.("");
|
|
31
|
+
setIsOpen(false);
|
|
32
|
+
onOpenChange?.(false);
|
|
33
|
+
}, [onChange, onOpenChange]);
|
|
24
34
|
const hasValue = typeof value === "string" && value.length > 0;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
const renderIconDisplay = (emptyClassName, ariaHidden) => {
|
|
36
|
+
if (hasValue) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__iconify_react.Icon, {
|
|
37
|
+
icon: value,
|
|
38
|
+
width: "20",
|
|
39
|
+
height: "20"
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
42
|
+
"aria-hidden": ariaHidden,
|
|
43
|
+
className: (0, __pixpilot_shadcn.cn)("min-w-6 text-muted-foreground flex items-center justify-center", emptyClassName),
|
|
44
|
+
children: emptyText
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const displayIcon = renderIconDisplay("text-sm");
|
|
33
48
|
const selectorContent = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icon_picker_content.default, {
|
|
34
49
|
providers: providersProp,
|
|
35
50
|
onChange: handleSelectIcon,
|
|
@@ -42,50 +57,64 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
|
|
|
42
57
|
else effectiveMode = pickerMode;
|
|
43
58
|
const isIconButtonVariant = variant === "icon-button";
|
|
44
59
|
const iconButtonLabel = hasValue ? `Change selected icon (${value})` : "Select an icon";
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
width: "20",
|
|
48
|
-
height: "20"
|
|
49
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
50
|
-
"aria-hidden": "true",
|
|
51
|
-
className: "text-muted-foreground text-lg",
|
|
52
|
-
children: "+"
|
|
53
|
-
});
|
|
60
|
+
const shouldShowClearButton = showClearButton && hasValue;
|
|
61
|
+
const iconButtonContent = renderIconDisplay("text-lg", true);
|
|
54
62
|
if (isIconButtonVariant) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icon_picker_container.IconPickerContainer, {
|
|
55
63
|
effectiveMode,
|
|
56
64
|
isOpen,
|
|
57
65
|
setIsOpen,
|
|
58
66
|
selectorContent,
|
|
59
67
|
popover,
|
|
60
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.
|
|
68
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Button.Button, {
|
|
61
69
|
type: "button",
|
|
62
70
|
variant: "outline",
|
|
63
|
-
className: "p-2",
|
|
64
71
|
"aria-label": iconButtonLabel,
|
|
65
|
-
|
|
72
|
+
className: (0, __pixpilot_shadcn.cn)("p-2 min-w-10", slots?.preview?.className),
|
|
73
|
+
children: [iconButtonContent, shouldShowClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
|
|
74
|
+
type: "button",
|
|
75
|
+
title: "Clear selected icon",
|
|
76
|
+
className: (0, __pixpilot_shadcn.cn)(`absolute -right-1 -top-1 inline-flex ${ICON_SIZE} items-center justify-center rounded-full !p-1`, "border border-border bg-background text-foreground", "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", slots?.clearIcon?.className),
|
|
77
|
+
"aria-label": "Clear icon",
|
|
78
|
+
onClick: (event) => {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
event.stopPropagation();
|
|
81
|
+
handleClearIcon();
|
|
82
|
+
},
|
|
83
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "!h-3 !w-3" })
|
|
84
|
+
})]
|
|
66
85
|
})
|
|
67
86
|
});
|
|
68
87
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
69
|
-
className: "flex items-center gap-2",
|
|
70
|
-
children: [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
className: (0, __pixpilot_shadcn.cn)("flex items-center gap-2", slots?.root?.className),
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
91
|
+
className: (0, __pixpilot_shadcn.cn)("flex items-center gap-2 rounded-md border border-input bg-background px-3 py-2", slots?.preview?.className),
|
|
92
|
+
children: [displayIcon, showValueText && hasValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
93
|
+
className: (0, __pixpilot_shadcn.cn)("text-sm text-muted-foreground", slots?.valueText?.className),
|
|
94
|
+
children: value
|
|
95
|
+
})]
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icon_picker_container.IconPickerContainer, {
|
|
98
|
+
effectiveMode,
|
|
99
|
+
isOpen,
|
|
100
|
+
setIsOpen,
|
|
101
|
+
selectorContent,
|
|
102
|
+
popover,
|
|
103
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
|
|
104
|
+
type: "button",
|
|
105
|
+
variant: "outline",
|
|
106
|
+
className: (0, __pixpilot_shadcn.cn)("whitespace-nowrap", slots?.trigger?.className),
|
|
107
|
+
children: hasValue ? "Change Icon" : "Select Icon"
|
|
108
|
+
})
|
|
109
|
+
}),
|
|
110
|
+
shouldShowClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
|
|
83
111
|
type: "button",
|
|
84
112
|
variant: "outline",
|
|
85
|
-
className: "whitespace-nowrap",
|
|
86
|
-
|
|
113
|
+
className: (0, __pixpilot_shadcn.cn)("whitespace-nowrap", slots?.clearButton?.className),
|
|
114
|
+
onClick: handleClearIcon,
|
|
115
|
+
children: "Clear"
|
|
87
116
|
})
|
|
88
|
-
|
|
117
|
+
]
|
|
89
118
|
});
|
|
90
119
|
};
|
|
91
120
|
|
|
@@ -5,7 +5,6 @@ import { FC } from "react";
|
|
|
5
5
|
//#region src/icon-selector/IconPicker.d.ts
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Mount type for the icon selector picker
|
|
9
8
|
* - 'dialog': Always display as a modal dialog
|
|
10
9
|
* - 'popover': Always display as a popover anchored to the trigger button
|
|
11
10
|
*/
|
|
@@ -28,6 +27,29 @@ interface IconPickerProps {
|
|
|
28
27
|
prefix: string;
|
|
29
28
|
name: string;
|
|
30
29
|
}>) => void;
|
|
30
|
+
showValueText?: boolean;
|
|
31
|
+
emptyText?: React.ReactNode;
|
|
32
|
+
showClearButton?: boolean;
|
|
33
|
+
slots?: {
|
|
34
|
+
root?: {
|
|
35
|
+
className?: string;
|
|
36
|
+
};
|
|
37
|
+
preview?: {
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
trigger?: {
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
clearButton?: {
|
|
44
|
+
className?: string;
|
|
45
|
+
};
|
|
46
|
+
valueText?: {
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
clearIcon?: {
|
|
50
|
+
className?: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
31
53
|
}
|
|
32
54
|
declare const IconPicker: FC<IconPickerProps>;
|
|
33
55
|
//#endregion
|
|
@@ -5,7 +5,6 @@ import { FC } from "react";
|
|
|
5
5
|
//#region src/icon-selector/IconPicker.d.ts
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Mount type for the icon selector picker
|
|
9
8
|
* - 'dialog': Always display as a modal dialog
|
|
10
9
|
* - 'popover': Always display as a popover anchored to the trigger button
|
|
11
10
|
*/
|
|
@@ -28,6 +27,29 @@ interface IconPickerProps {
|
|
|
28
27
|
prefix: string;
|
|
29
28
|
name: string;
|
|
30
29
|
}>) => void;
|
|
30
|
+
showValueText?: boolean;
|
|
31
|
+
emptyText?: React.ReactNode;
|
|
32
|
+
showClearButton?: boolean;
|
|
33
|
+
slots?: {
|
|
34
|
+
root?: {
|
|
35
|
+
className?: string;
|
|
36
|
+
};
|
|
37
|
+
preview?: {
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
trigger?: {
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
clearButton?: {
|
|
44
|
+
className?: string;
|
|
45
|
+
};
|
|
46
|
+
valueText?: {
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
clearIcon?: {
|
|
50
|
+
className?: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
31
53
|
}
|
|
32
54
|
declare const IconPicker: FC<IconPickerProps>;
|
|
33
55
|
//#endregion
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { Button } from "../Button.js";
|
|
1
|
+
import { Button as Button$1 } from "../Button.js";
|
|
2
2
|
import { useMediaQuery } from "../hooks/use-media-query.js";
|
|
3
3
|
import "../hooks/index.js";
|
|
4
4
|
import { ICON_SELECTOR_ERROR_MESSAGE } from "./constants.js";
|
|
5
5
|
import { IconPickerContainer } from "./icon-picker-container.js";
|
|
6
6
|
import icon_picker_content_default from "./icon-picker-content.js";
|
|
7
|
+
import { cn } from "@pixpilot/shadcn";
|
|
8
|
+
import { Plus, X } from "lucide-react";
|
|
7
9
|
import { useCallback, useState } from "react";
|
|
8
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
11
|
import { Icon } from "@iconify/react";
|
|
10
12
|
|
|
11
13
|
//#region src/icon-selector/IconPicker.tsx
|
|
12
|
-
const
|
|
14
|
+
const ICON_SIZE = "!h-4 !w-4";
|
|
15
|
+
const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popover, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ jsx(Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
|
|
13
16
|
const [isOpen, setIsOpen] = useState(false);
|
|
14
17
|
const isMobile = useMediaQuery({ maxWidth: 768 });
|
|
15
18
|
const handleSelectIcon = useCallback((iconName) => {
|
|
@@ -17,15 +20,25 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
|
|
|
17
20
|
setIsOpen(false);
|
|
18
21
|
onOpenChange?.(false);
|
|
19
22
|
}, [onChange, onOpenChange]);
|
|
23
|
+
const handleClearIcon = useCallback(() => {
|
|
24
|
+
onChange?.("");
|
|
25
|
+
setIsOpen(false);
|
|
26
|
+
onOpenChange?.(false);
|
|
27
|
+
}, [onChange, onOpenChange]);
|
|
20
28
|
const hasValue = typeof value === "string" && value.length > 0;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
const renderIconDisplay = (emptyClassName, ariaHidden) => {
|
|
30
|
+
if (hasValue) return /* @__PURE__ */ jsx(Icon, {
|
|
31
|
+
icon: value,
|
|
32
|
+
width: "20",
|
|
33
|
+
height: "20"
|
|
34
|
+
});
|
|
35
|
+
return /* @__PURE__ */ jsx("span", {
|
|
36
|
+
"aria-hidden": ariaHidden,
|
|
37
|
+
className: cn("min-w-6 text-muted-foreground flex items-center justify-center", emptyClassName),
|
|
38
|
+
children: emptyText
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const displayIcon = renderIconDisplay("text-sm");
|
|
29
42
|
const selectorContent = /* @__PURE__ */ jsx(icon_picker_content_default, {
|
|
30
43
|
providers: providersProp,
|
|
31
44
|
onChange: handleSelectIcon,
|
|
@@ -37,50 +50,64 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
|
|
|
37
50
|
else effectiveMode = pickerMode;
|
|
38
51
|
const isIconButtonVariant = variant === "icon-button";
|
|
39
52
|
const iconButtonLabel = hasValue ? `Change selected icon (${value})` : "Select an icon";
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
width: "20",
|
|
43
|
-
height: "20"
|
|
44
|
-
}) : /* @__PURE__ */ jsx("span", {
|
|
45
|
-
"aria-hidden": "true",
|
|
46
|
-
className: "text-muted-foreground text-lg",
|
|
47
|
-
children: "+"
|
|
48
|
-
});
|
|
53
|
+
const shouldShowClearButton = showClearButton && hasValue;
|
|
54
|
+
const iconButtonContent = renderIconDisplay("text-lg", true);
|
|
49
55
|
if (isIconButtonVariant) return /* @__PURE__ */ jsx(IconPickerContainer, {
|
|
50
56
|
effectiveMode,
|
|
51
57
|
isOpen,
|
|
52
58
|
setIsOpen,
|
|
53
59
|
selectorContent,
|
|
54
60
|
popover,
|
|
55
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ jsxs(Button$1, {
|
|
56
62
|
type: "button",
|
|
57
63
|
variant: "outline",
|
|
58
|
-
className: "p-2",
|
|
59
64
|
"aria-label": iconButtonLabel,
|
|
60
|
-
|
|
65
|
+
className: cn("p-2 min-w-10", slots?.preview?.className),
|
|
66
|
+
children: [iconButtonContent, shouldShowClearButton && /* @__PURE__ */ jsx(Button$1, {
|
|
67
|
+
type: "button",
|
|
68
|
+
title: "Clear selected icon",
|
|
69
|
+
className: cn(`absolute -right-1 -top-1 inline-flex ${ICON_SIZE} items-center justify-center rounded-full !p-1`, "border border-border bg-background text-foreground", "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", slots?.clearIcon?.className),
|
|
70
|
+
"aria-label": "Clear icon",
|
|
71
|
+
onClick: (event) => {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
event.stopPropagation();
|
|
74
|
+
handleClearIcon();
|
|
75
|
+
},
|
|
76
|
+
children: /* @__PURE__ */ jsx(X, { className: "!h-3 !w-3" })
|
|
77
|
+
})]
|
|
61
78
|
})
|
|
62
79
|
});
|
|
63
80
|
return /* @__PURE__ */ jsxs("div", {
|
|
64
|
-
className: "flex items-center gap-2",
|
|
65
|
-
children: [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
className: cn("flex items-center gap-2", slots?.root?.className),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: cn("flex items-center gap-2 rounded-md border border-input bg-background px-3 py-2", slots?.preview?.className),
|
|
85
|
+
children: [displayIcon, showValueText && hasValue && /* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: cn("text-sm text-muted-foreground", slots?.valueText?.className),
|
|
87
|
+
children: value
|
|
88
|
+
})]
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx(IconPickerContainer, {
|
|
91
|
+
effectiveMode,
|
|
92
|
+
isOpen,
|
|
93
|
+
setIsOpen,
|
|
94
|
+
selectorContent,
|
|
95
|
+
popover,
|
|
96
|
+
children: /* @__PURE__ */ jsx(Button$1, {
|
|
97
|
+
type: "button",
|
|
98
|
+
variant: "outline",
|
|
99
|
+
className: cn("whitespace-nowrap", slots?.trigger?.className),
|
|
100
|
+
children: hasValue ? "Change Icon" : "Select Icon"
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
shouldShowClearButton && /* @__PURE__ */ jsx(Button$1, {
|
|
78
104
|
type: "button",
|
|
79
105
|
variant: "outline",
|
|
80
|
-
className: "whitespace-nowrap",
|
|
81
|
-
|
|
106
|
+
className: cn("whitespace-nowrap", slots?.clearButton?.className),
|
|
107
|
+
onClick: handleClearIcon,
|
|
108
|
+
children: "Clear"
|
|
82
109
|
})
|
|
83
|
-
|
|
110
|
+
]
|
|
84
111
|
});
|
|
85
112
|
};
|
|
86
113
|
|
|
@@ -22,11 +22,17 @@ const IconPickerContainer = ({ effectiveMode, isOpen, setIsOpen, selectorContent
|
|
|
22
22
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverTrigger, {
|
|
23
23
|
asChild: true,
|
|
24
24
|
children
|
|
25
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.
|
|
25
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.PopoverContent, {
|
|
26
26
|
side: "right",
|
|
27
27
|
...popover,
|
|
28
28
|
className: (0, __pixpilot_shadcn.cn)("w-full min-w-sm lg:min-w-lg p-4", "max-h-dvh md:max-h-auto", popover?.className),
|
|
29
|
-
children:
|
|
29
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
30
|
+
className: "mb-4",
|
|
31
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
32
|
+
className: "text-lg font-semibold",
|
|
33
|
+
children: "Select an Icon"
|
|
34
|
+
})
|
|
35
|
+
}), selectorContent]
|
|
30
36
|
})]
|
|
31
37
|
})] });
|
|
32
38
|
};
|
|
@@ -19,11 +19,17 @@ const IconPickerContainer = ({ effectiveMode, isOpen, setIsOpen, selectorContent
|
|
|
19
19
|
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
20
20
|
asChild: true,
|
|
21
21
|
children
|
|
22
|
-
}), /* @__PURE__ */
|
|
22
|
+
}), /* @__PURE__ */ jsxs(PopoverContent, {
|
|
23
23
|
side: "right",
|
|
24
24
|
...popover,
|
|
25
25
|
className: cn("w-full min-w-sm lg:min-w-lg p-4", "max-h-dvh md:max-h-auto", popover?.className),
|
|
26
|
-
children:
|
|
26
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: "mb-4",
|
|
28
|
+
children: /* @__PURE__ */ jsx("h3", {
|
|
29
|
+
className: "text-lg font-semibold",
|
|
30
|
+
children: "Select an Icon"
|
|
31
|
+
})
|
|
32
|
+
}), selectorContent]
|
|
27
33
|
})]
|
|
28
34
|
})] });
|
|
29
35
|
};
|
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_runtime8 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_runtime8.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input$1 as Input, InputProps$1 as InputProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 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_runtime9.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_runtime10 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_runtime10.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_runtime11 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_runtime11.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_runtime8 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_runtime8.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.31.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",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"react-dom": "19.2.0",
|
|
58
58
|
"tsdown": "^0.15.12",
|
|
59
59
|
"typescript": "^5.9.3",
|
|
60
|
-
"@internal/hooks": "0.0.0",
|
|
61
60
|
"@internal/eslint-config": "0.3.0",
|
|
61
|
+
"@internal/hooks": "0.0.0",
|
|
62
62
|
"@internal/prettier-config": "0.0.1",
|
|
63
|
-
"@internal/tsdown-config": "0.1.0",
|
|
64
63
|
"@internal/tsconfig": "0.1.0",
|
|
64
|
+
"@internal/tsdown-config": "0.1.0",
|
|
65
65
|
"@internal/vitest-config": "0.1.0"
|
|
66
66
|
},
|
|
67
67
|
"prettier": "@internal/prettier-config",
|