@pixpilot/shadcn-ui 1.39.0 → 2.0.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/README.md +1 -0
- package/dist/ColorPicker/mcp.js +105 -0
- package/dist/ColorPickerBase/mcp.js +97 -0
- package/dist/absolute-fill/AbsoluteFill.d.cts +2 -2
- package/dist/absolute-fill/mcp.js +23 -0
- package/dist/alert/mcp.js +41 -0
- package/dist/avatar-upload/mcp.js +86 -0
- package/dist/button/Button.d.ts +2 -2
- package/dist/button-extended/ButtonExtended.d.cts +2 -2
- package/dist/button-extended/ButtonExtended.d.ts +2 -2
- package/dist/button-extended/mcp.js +53 -0
- package/dist/button-group/mcp.js +28 -0
- package/dist/card/Card.d.cts +3 -3
- package/dist/card/Card.d.ts +3 -3
- package/dist/circle-loader/mcp.js +48 -0
- package/dist/close-button-absolute/mcp.js +39 -0
- package/dist/close-button-rounded/mcp.js +39 -0
- package/dist/color-select/ColorSelect.cjs +2 -2
- package/dist/color-select/ColorSelect.d.cts +3 -2
- package/dist/color-select/ColorSelect.d.ts +1 -0
- package/dist/color-select/ColorSelect.js +3 -3
- package/dist/color-select/mcp.js +59 -0
- package/dist/combobox/Combobox.cjs +4 -3
- package/dist/combobox/Combobox.d.cts +7 -3
- package/dist/combobox/Combobox.d.ts +7 -3
- package/dist/combobox/Combobox.js +5 -4
- package/dist/combobox/mcp.js +64 -0
- package/dist/confirmation-dialog/mcp.js +55 -0
- package/dist/content-card/ContentCard.d.cts +2 -2
- package/dist/content-card/ContentCard.d.ts +2 -2
- package/dist/content-card/mcp.js +30 -0
- package/dist/date-picker/DatePicker.d.cts +2 -2
- package/dist/date-picker/DatePicker.d.ts +2 -2
- package/dist/date-picker/mcp.js +43 -0
- package/dist/dialog/Dialog.d.cts +5 -5
- package/dist/dialog/Dialog.d.ts +5 -5
- package/dist/dialog/mcp.js +53 -0
- package/dist/dialog-provider/mcp.js +24 -0
- 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/file-upload-inline/mcp.js +89 -0
- package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
- package/dist/file-upload-root/FileUploadRoot.d.ts +2 -2
- package/dist/file-upload-root/mcp.js +84 -0
- package/dist/generated/mcp-registry.js +84 -6
- package/dist/icon-selector/IconPicker.cjs +2 -2
- package/dist/icon-selector/IconPicker.d.cts +1 -0
- package/dist/icon-selector/IconPicker.d.ts +1 -0
- package/dist/icon-selector/IconPicker.js +2 -2
- package/dist/icon-selector/mcp.js +60 -0
- package/dist/icon-toggle/mcp.js +62 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/input/Input.d.cts +2 -2
- package/dist/input/Input.d.ts +2 -2
- package/dist/input/mcp.js +33 -0
- package/dist/layout/mcp.js +29 -0
- package/dist/loading-overlay/mcp.js +64 -0
- package/dist/pagination/mcp.js +65 -0
- package/dist/popover/mcp.js +27 -0
- package/dist/rating/Rating.d.cts +3 -3
- package/dist/rating/Rating.d.ts +3 -3
- package/dist/rating/mcp.js +73 -0
- package/dist/rich-text-editor/mcp.js +78 -0
- package/dist/scaled-preview/mcp.js +47 -0
- package/dist/select/Select.cjs +4 -2
- package/dist/select/Select.d.cts +13 -4
- package/dist/select/Select.d.ts +13 -4
- package/dist/select/Select.js +4 -2
- package/dist/select/mcp.js +70 -0
- package/dist/slider/mcp.js +80 -0
- package/dist/tabs/mcp.js +51 -0
- package/dist/tags-input/TagsInput.cjs +67 -65
- package/dist/tags-input/TagsInput.d.cts +6 -33
- package/dist/tags-input/TagsInput.d.ts +5 -32
- package/dist/tags-input/TagsInput.js +68 -66
- package/dist/tags-input/TagsInputInline.d.cts +2 -2
- package/dist/tags-input/index.d.cts +2 -2
- package/dist/tags-input/index.d.ts +2 -2
- package/dist/tags-input/mcp.js +100 -0
- package/dist/theme-provider/mcp.js +57 -0
- 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/dist/theme-toggle/mcp.js +38 -0
- package/dist/toast/mcp.js +52 -0
- package/dist/toggle-button/mcp.js +58 -0
- package/dist/toggle-group/mcp.js +67 -0
- package/dist/tooltip/mcp.js +24 -0
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/dialog/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Dialog",
|
|
6
|
+
category: "Overlays",
|
|
7
|
+
description: "A modal dialog composed of DialogContent, DialogHeader, DialogBody, DialogFooter, and DialogClose, with a scrollable body and an optional fullscreen content mode.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
fullscreen: {
|
|
10
|
+
description: "When true, DialogContent expands to nearly fill the viewport instead of sizing to its content.",
|
|
11
|
+
type: "boolean",
|
|
12
|
+
defaultValue: "false"
|
|
13
|
+
},
|
|
14
|
+
asChild: {
|
|
15
|
+
description: "Merge behavior and styles onto the child element instead of the default content wrapper.",
|
|
16
|
+
type: "boolean",
|
|
17
|
+
defaultValue: "false"
|
|
18
|
+
},
|
|
19
|
+
forceMount: "Forces the content to render even when closed, so its mount can be controlled externally (e.g. for animations).",
|
|
20
|
+
onOpenAutoFocus: "Called when focus moves into the content on open; call preventDefault to opt out of autofocus.",
|
|
21
|
+
onCloseAutoFocus: "Called when focus returns to the trigger on close; call preventDefault to opt out.",
|
|
22
|
+
onEscapeKeyDown: "Called when the Escape key is pressed; call preventDefault to keep the dialog open.",
|
|
23
|
+
onPointerDownOutside: "Called when a pointer event occurs outside the content; call preventDefault to keep it open.",
|
|
24
|
+
onFocusOutside: "Called when focus moves outside the content; call preventDefault to keep it open.",
|
|
25
|
+
onInteractOutside: "Called on any interaction (pointer or focus) outside the content; call preventDefault to keep it open.",
|
|
26
|
+
showCloseButton: {
|
|
27
|
+
description: "Whether to render the built-in close (×) button in the top corner.",
|
|
28
|
+
type: "boolean",
|
|
29
|
+
defaultValue: "true"
|
|
30
|
+
},
|
|
31
|
+
disableOutsideClick: {
|
|
32
|
+
description: "When true, clicking or interacting outside the content does not close the dialog.",
|
|
33
|
+
type: "boolean",
|
|
34
|
+
defaultValue: "false"
|
|
35
|
+
},
|
|
36
|
+
container: "Portal container element the dialog content is rendered into (defaults to document.body)."
|
|
37
|
+
}),
|
|
38
|
+
notes: ["Compose with the Radix Dialog root, DialogTrigger, DialogTitle, and DialogDescription from the shadcn dialog primitives.", "DialogHeader, DialogBody, and DialogFooter accept all native <div> props; DialogContent forwards all Radix DialogContent props."],
|
|
39
|
+
examples: [{
|
|
40
|
+
title: "Dialog with body and footer",
|
|
41
|
+
code: "<Dialog>\n <DialogTrigger asChild><Button>Open</Button></DialogTrigger>\n <DialogContent>\n <DialogHeader><DialogTitle>Edit</DialogTitle></DialogHeader>\n <DialogBody>{form}</DialogBody>\n <DialogFooter><DialogClose asChild><Button>Save</Button></DialogClose></DialogFooter>\n </DialogContent>\n</Dialog>"
|
|
42
|
+
}],
|
|
43
|
+
related: ["ConfirmationDialog", "DialogProvider"],
|
|
44
|
+
keywords: [
|
|
45
|
+
"dialog",
|
|
46
|
+
"modal",
|
|
47
|
+
"overlay",
|
|
48
|
+
"popup"
|
|
49
|
+
]
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { meta };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/dialog-provider/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "DialogProvider",
|
|
6
|
+
category: "Overlays",
|
|
7
|
+
description: "Context provider that enables imperatively shown dialogs (e.g. ConfirmationDialog). Guards against nested providers so it is safe to mount once near the app root.",
|
|
8
|
+
props: defineProps({ children: "The application subtree that can show dialogs through the dialog helper." }),
|
|
9
|
+
notes: ["Nesting a second DialogProvider is a safe no-op; the inner one passes children through."],
|
|
10
|
+
examples: [{
|
|
11
|
+
title: "App-level provider",
|
|
12
|
+
code: "<DialogProvider>\n <App />\n</DialogProvider>"
|
|
13
|
+
}],
|
|
14
|
+
related: ["ConfirmationDialog", "Dialog"],
|
|
15
|
+
keywords: [
|
|
16
|
+
"dialog",
|
|
17
|
+
"provider",
|
|
18
|
+
"modal",
|
|
19
|
+
"context"
|
|
20
|
+
]
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { meta };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileUploadProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime14 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_runtime14.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_runtime23 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_runtime23.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_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 };
|
|
@@ -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 };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/file-upload-inline/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "FileUploadInline",
|
|
6
|
+
category: "Forms",
|
|
7
|
+
description: "A compact inline file upload rendered as a button with an optional icon and selected-file list, built on FileUploadRoot.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
buttonText: {
|
|
10
|
+
description: "Label shown on the upload button when no file is selected.",
|
|
11
|
+
type: "string"
|
|
12
|
+
},
|
|
13
|
+
showIcon: {
|
|
14
|
+
description: "Shows a file icon on the upload button.",
|
|
15
|
+
type: "boolean"
|
|
16
|
+
},
|
|
17
|
+
children: "Optional custom trigger content rendered inside the upload root.",
|
|
18
|
+
slots: "Props for the internal parts: `trigger` (button), `dropzone` (div), and `fileItem`.",
|
|
19
|
+
value: "Controlled file metadata value (array in multiple mode, single item/null otherwise).",
|
|
20
|
+
onChange: "Called with the new file metadata when the selection changes.",
|
|
21
|
+
multiple: {
|
|
22
|
+
description: "Whether multiple files can be selected.",
|
|
23
|
+
type: "boolean"
|
|
24
|
+
},
|
|
25
|
+
accept: {
|
|
26
|
+
description: "Accepted file types as a native input `accept` string, e.g. \"image/*\".",
|
|
27
|
+
type: "string"
|
|
28
|
+
},
|
|
29
|
+
maxFiles: {
|
|
30
|
+
description: "Maximum number of files allowed.",
|
|
31
|
+
type: "number"
|
|
32
|
+
},
|
|
33
|
+
maxSize: {
|
|
34
|
+
description: "Maximum size per file, in bytes.",
|
|
35
|
+
type: "number"
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
description: "Disables the uploader and its dropzone interactions.",
|
|
39
|
+
type: "boolean",
|
|
40
|
+
defaultValue: "false"
|
|
41
|
+
},
|
|
42
|
+
onValueChange: "Low-level callback fired with the raw `File[]` whenever the underlying upload value changes.",
|
|
43
|
+
onAccept: "Called with the accepted File(s) when files are selected.",
|
|
44
|
+
onFileAccept: "Called for each individual file that passes validation and is accepted.",
|
|
45
|
+
onFileReject: "Called when a single file is rejected, with the file and a reason message.",
|
|
46
|
+
onFilesReject: "Called when multiple files are rejected at once, with each file and its reason.",
|
|
47
|
+
onFileValidate: "Custom per-file validator; return an error message string to reject the file, or null/undefined to accept it.",
|
|
48
|
+
transformFile: "Optional async transform applied to each accepted file before it enters the store; return the same file or a replacement File.",
|
|
49
|
+
onUpload: "Async upload handler invoked with the accepted files and progress/success/error callbacks.",
|
|
50
|
+
name: "Form field name submitted with native form integration.",
|
|
51
|
+
label: "Accessible label for the upload control.",
|
|
52
|
+
asChild: {
|
|
53
|
+
description: "Merge behavior and props onto the child element instead of rendering the default wrapper.",
|
|
54
|
+
type: "boolean",
|
|
55
|
+
defaultValue: "false"
|
|
56
|
+
},
|
|
57
|
+
invalid: {
|
|
58
|
+
description: "Marks the control as invalid for styling and accessibility.",
|
|
59
|
+
type: "boolean",
|
|
60
|
+
defaultValue: "false"
|
|
61
|
+
},
|
|
62
|
+
required: {
|
|
63
|
+
description: "Marks the field as required for form submission.",
|
|
64
|
+
type: "boolean",
|
|
65
|
+
defaultValue: "false"
|
|
66
|
+
},
|
|
67
|
+
preventDuplicates: {
|
|
68
|
+
description: "Skips files that duplicate ones already present in the list.",
|
|
69
|
+
type: "boolean"
|
|
70
|
+
},
|
|
71
|
+
onFileSuccess: "Called with the file metadata after a file is successfully processed or uploaded.",
|
|
72
|
+
onFileError: "Called with the file and an error message when processing or upload fails."
|
|
73
|
+
}),
|
|
74
|
+
examples: [{
|
|
75
|
+
title: "Inline upload",
|
|
76
|
+
code: "<FileUploadInline buttonText=\"Attach file\" value={files} onChange={setFiles} />"
|
|
77
|
+
}],
|
|
78
|
+
related: ["FileUpload", "FileUploadRoot"],
|
|
79
|
+
keywords: [
|
|
80
|
+
"file",
|
|
81
|
+
"upload",
|
|
82
|
+
"inline",
|
|
83
|
+
"button",
|
|
84
|
+
"form"
|
|
85
|
+
]
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
export { meta };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileUploadRootProps } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-root/FileUploadRoot.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadRoot(props: FileUploadRootProps):
|
|
8
|
+
declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime12.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileUploadRootProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/file-upload-root/FileUploadRoot.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
7
7
|
*/
|
|
8
|
-
declare function FileUploadRoot(props: FileUploadRootProps):
|
|
8
|
+
declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime12.JSX.Element;
|
|
9
9
|
declare namespace FileUploadRoot {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/file-upload-root/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "FileUploadRoot",
|
|
6
|
+
category: "Forms",
|
|
7
|
+
description: "A composable file upload root that provides a trigger and dropzone via slots and a custom children trigger, on top of the managed FileUpload store.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
children: "Optional custom trigger content rendered inside the upload root.",
|
|
10
|
+
slots: "Props for the internal parts: `trigger` (button), `dropzone` (div), and `fileItem`.",
|
|
11
|
+
value: "Controlled file metadata value (array in multiple mode, single item/null otherwise).",
|
|
12
|
+
onChange: "Called with the new file metadata when the selection changes.",
|
|
13
|
+
multiple: {
|
|
14
|
+
description: "Whether multiple files can be selected.",
|
|
15
|
+
type: "boolean"
|
|
16
|
+
},
|
|
17
|
+
accept: {
|
|
18
|
+
description: "Accepted file types as a native input `accept` string, e.g. \"image/*\".",
|
|
19
|
+
type: "string"
|
|
20
|
+
},
|
|
21
|
+
maxFiles: {
|
|
22
|
+
description: "Maximum number of files allowed.",
|
|
23
|
+
type: "number"
|
|
24
|
+
},
|
|
25
|
+
maxSize: {
|
|
26
|
+
description: "Maximum size per file, in bytes.",
|
|
27
|
+
type: "number"
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
description: "Disables the uploader and its dropzone interactions.",
|
|
31
|
+
type: "boolean",
|
|
32
|
+
defaultValue: "false"
|
|
33
|
+
},
|
|
34
|
+
onValueChange: "Low-level callback fired with the raw `File[]` whenever the underlying upload value changes.",
|
|
35
|
+
onAccept: "Called with the accepted File(s) when files are selected.",
|
|
36
|
+
onFileAccept: "Called for each individual file that passes validation and is accepted.",
|
|
37
|
+
onFileReject: "Called when a single file is rejected, with the file and a reason message.",
|
|
38
|
+
onFilesReject: "Called when multiple files are rejected at once, with each file and its reason.",
|
|
39
|
+
onFileValidate: "Custom per-file validator; return an error message string to reject the file, or null/undefined to accept it.",
|
|
40
|
+
transformFile: "Optional async transform applied to each accepted file before it enters the store; return the same file or a replacement File.",
|
|
41
|
+
onUpload: "Async upload handler invoked with the accepted files and progress/success/error callbacks.",
|
|
42
|
+
name: "Form field name submitted with native form integration.",
|
|
43
|
+
label: "Accessible label for the upload control.",
|
|
44
|
+
asChild: {
|
|
45
|
+
description: "Merge behavior and props onto the child element instead of rendering the default wrapper.",
|
|
46
|
+
type: "boolean",
|
|
47
|
+
defaultValue: "false"
|
|
48
|
+
},
|
|
49
|
+
invalid: {
|
|
50
|
+
description: "Marks the control as invalid for styling and accessibility.",
|
|
51
|
+
type: "boolean",
|
|
52
|
+
defaultValue: "false"
|
|
53
|
+
},
|
|
54
|
+
required: {
|
|
55
|
+
description: "Marks the field as required for form submission.",
|
|
56
|
+
type: "boolean",
|
|
57
|
+
defaultValue: "false"
|
|
58
|
+
},
|
|
59
|
+
preventDuplicates: {
|
|
60
|
+
description: "Skips files that duplicate ones already present in the list.",
|
|
61
|
+
type: "boolean"
|
|
62
|
+
},
|
|
63
|
+
onFileSuccess: "Called with the file metadata after a file is successfully processed or uploaded.",
|
|
64
|
+
onFileError: "Called with the file and an error message when processing or upload fails."
|
|
65
|
+
}),
|
|
66
|
+
examples: [{
|
|
67
|
+
title: "Custom trigger",
|
|
68
|
+
code: "<FileUploadRoot value={files} onChange={setFiles} slots={{ trigger: { className: \"w-full\" } }}>\n <Button>Upload files</Button>\n</FileUploadRoot>"
|
|
69
|
+
}],
|
|
70
|
+
related: [
|
|
71
|
+
"FileUpload",
|
|
72
|
+
"FileUploadInline",
|
|
73
|
+
"AvatarUpload"
|
|
74
|
+
],
|
|
75
|
+
keywords: [
|
|
76
|
+
"file",
|
|
77
|
+
"upload",
|
|
78
|
+
"dropzone",
|
|
79
|
+
"form"
|
|
80
|
+
]
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export { meta };
|
|
@@ -1,6 +1,45 @@
|
|
|
1
|
-
import { meta } from "../
|
|
2
|
-
import { meta as meta$1 } from "../
|
|
3
|
-
import { meta as meta$2 } from "../
|
|
1
|
+
import { meta } from "../absolute-fill/mcp.js";
|
|
2
|
+
import { meta as meta$1 } from "../alert/mcp.js";
|
|
3
|
+
import { meta as meta$2 } from "../avatar-upload/mcp.js";
|
|
4
|
+
import { meta as meta$3 } from "../button/mcp.js";
|
|
5
|
+
import { meta as meta$4 } from "../button-extended/mcp.js";
|
|
6
|
+
import { meta as meta$5 } from "../button-group/mcp.js";
|
|
7
|
+
import { meta as meta$6 } from "../card/mcp.js";
|
|
8
|
+
import { meta as meta$7 } from "../circle-loader/mcp.js";
|
|
9
|
+
import { meta as meta$8 } from "../close-button-absolute/mcp.js";
|
|
10
|
+
import { meta as meta$9 } from "../close-button-rounded/mcp.js";
|
|
11
|
+
import { meta as meta$10 } from "../ColorPicker/mcp.js";
|
|
12
|
+
import { meta as meta$11 } from "../ColorPickerBase/mcp.js";
|
|
13
|
+
import { meta as meta$12 } from "../color-select/mcp.js";
|
|
14
|
+
import { meta as meta$13 } from "../combobox/mcp.js";
|
|
15
|
+
import { meta as meta$14 } from "../confirmation-dialog/mcp.js";
|
|
16
|
+
import { meta as meta$15 } from "../content-card/mcp.js";
|
|
17
|
+
import { meta as meta$16 } from "../date-picker/mcp.js";
|
|
18
|
+
import { meta as meta$17 } from "../dialog/mcp.js";
|
|
19
|
+
import { meta as meta$18 } from "../dialog-provider/mcp.js";
|
|
20
|
+
import { meta as meta$19 } from "../file-upload/mcp.js";
|
|
21
|
+
import { meta as meta$20 } from "../file-upload-inline/mcp.js";
|
|
22
|
+
import { meta as meta$21 } from "../file-upload-root/mcp.js";
|
|
23
|
+
import { meta as meta$22 } from "../icon-selector/mcp.js";
|
|
24
|
+
import { meta as meta$23 } from "../icon-toggle/mcp.js";
|
|
25
|
+
import { meta as meta$24 } from "../input/mcp.js";
|
|
26
|
+
import { meta as meta$25 } from "../layout/mcp.js";
|
|
27
|
+
import { meta as meta$26 } from "../loading-overlay/mcp.js";
|
|
28
|
+
import { meta as meta$27 } from "../pagination/mcp.js";
|
|
29
|
+
import { meta as meta$28 } from "../popover/mcp.js";
|
|
30
|
+
import { meta as meta$29 } from "../rating/mcp.js";
|
|
31
|
+
import { meta as meta$30 } from "../rich-text-editor/mcp.js";
|
|
32
|
+
import { meta as meta$31 } from "../scaled-preview/mcp.js";
|
|
33
|
+
import { meta as meta$32 } from "../select/mcp.js";
|
|
34
|
+
import { meta as meta$33 } from "../slider/mcp.js";
|
|
35
|
+
import { meta as meta$34 } from "../tabs/mcp.js";
|
|
36
|
+
import { meta as meta$35 } from "../tags-input/mcp.js";
|
|
37
|
+
import { meta as meta$36 } from "../theme-toggle/mcp.js";
|
|
38
|
+
import { meta as meta$37 } from "../theme-provider/mcp.js";
|
|
39
|
+
import { meta as meta$38 } from "../toast/mcp.js";
|
|
40
|
+
import { meta as meta$39 } from "../toggle-button/mcp.js";
|
|
41
|
+
import { meta as meta$40 } from "../toggle-group/mcp.js";
|
|
42
|
+
import { meta as meta$41 } from "../tooltip/mcp.js";
|
|
4
43
|
|
|
5
44
|
//#region src/generated/mcp-registry.ts
|
|
6
45
|
function withHtmlElementNote(comp) {
|
|
@@ -12,9 +51,48 @@ function withHtmlElementNote(comp) {
|
|
|
12
51
|
}
|
|
13
52
|
/** Generated component metadata map keyed by public component name. */
|
|
14
53
|
const mcpRegistry = {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
54
|
+
"AbsoluteFill": withHtmlElementNote(meta),
|
|
55
|
+
"Alert": withHtmlElementNote(meta$1),
|
|
56
|
+
"AvatarUpload": withHtmlElementNote(meta$2),
|
|
57
|
+
"Button": withHtmlElementNote(meta$3),
|
|
58
|
+
"ButtonExtended": withHtmlElementNote(meta$4),
|
|
59
|
+
"ButtonGroup": withHtmlElementNote(meta$5),
|
|
60
|
+
"Card": withHtmlElementNote(meta$6),
|
|
61
|
+
"CircleLoader": withHtmlElementNote(meta$7),
|
|
62
|
+
"CloseButtonAbsolute": withHtmlElementNote(meta$8),
|
|
63
|
+
"CloseButtonRounded": withHtmlElementNote(meta$9),
|
|
64
|
+
"ColorPicker": withHtmlElementNote(meta$10),
|
|
65
|
+
"ColorPickerBase": withHtmlElementNote(meta$11),
|
|
66
|
+
"ColorSelect": withHtmlElementNote(meta$12),
|
|
67
|
+
"Combobox": withHtmlElementNote(meta$13),
|
|
68
|
+
"ConfirmationDialog": withHtmlElementNote(meta$14),
|
|
69
|
+
"ContentCard": withHtmlElementNote(meta$15),
|
|
70
|
+
"DatePicker": withHtmlElementNote(meta$16),
|
|
71
|
+
"Dialog": withHtmlElementNote(meta$17),
|
|
72
|
+
"DialogProvider": withHtmlElementNote(meta$18),
|
|
73
|
+
"FileUpload": withHtmlElementNote(meta$19),
|
|
74
|
+
"FileUploadInline": withHtmlElementNote(meta$20),
|
|
75
|
+
"FileUploadRoot": withHtmlElementNote(meta$21),
|
|
76
|
+
"IconPicker": withHtmlElementNote(meta$22),
|
|
77
|
+
"IconToggle": withHtmlElementNote(meta$23),
|
|
78
|
+
"Input": withHtmlElementNote(meta$24),
|
|
79
|
+
"Layout": withHtmlElementNote(meta$25),
|
|
80
|
+
"LoadingOverlay": withHtmlElementNote(meta$26),
|
|
81
|
+
"Pagination": withHtmlElementNote(meta$27),
|
|
82
|
+
"Popover": withHtmlElementNote(meta$28),
|
|
83
|
+
"Rating": withHtmlElementNote(meta$29),
|
|
84
|
+
"RichTextEditor": withHtmlElementNote(meta$30),
|
|
85
|
+
"ScaledPreview": withHtmlElementNote(meta$31),
|
|
86
|
+
"Select": withHtmlElementNote(meta$32),
|
|
87
|
+
"Slider": withHtmlElementNote(meta$33),
|
|
88
|
+
"Tabs": withHtmlElementNote(meta$34),
|
|
89
|
+
"TagsInput": withHtmlElementNote(meta$35),
|
|
90
|
+
"ThemeModeToggleButton": withHtmlElementNote(meta$36),
|
|
91
|
+
"ThemeProvider": withHtmlElementNote(meta$37),
|
|
92
|
+
"Toast": withHtmlElementNote(meta$38),
|
|
93
|
+
"ToggleButton": withHtmlElementNote(meta$39),
|
|
94
|
+
"ToggleGroup": withHtmlElementNote(meta$40),
|
|
95
|
+
"Tooltip": withHtmlElementNote(meta$41)
|
|
18
96
|
};
|
|
19
97
|
|
|
20
98
|
//#endregion
|
|
@@ -20,7 +20,7 @@ __iconify_react = require_rolldown_runtime.__toESM(__iconify_react);
|
|
|
20
20
|
|
|
21
21
|
//#region src/icon-selector/IconPicker.tsx
|
|
22
22
|
const ICON_SIZE = "!h-4 !w-4";
|
|
23
|
-
const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
|
|
23
|
+
const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: ICON_SIZE }), showClearButton = true, slots, className }) => {
|
|
24
24
|
const [isOpen, setIsOpen] = (0, react.useState)(false);
|
|
25
25
|
const isMobile = require_use_media_query.useMediaQuery({ maxWidth: 768 });
|
|
26
26
|
const handleSelectIcon = (0, react.useCallback)((iconName) => {
|
|
@@ -73,7 +73,7 @@ const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog",
|
|
|
73
73
|
type: "button",
|
|
74
74
|
variant: "outline",
|
|
75
75
|
"aria-label": iconButtonLabel,
|
|
76
|
-
className: (0, __pixpilot_shadcn.cn)("p-2 min-w-10", slots?.preview?.className),
|
|
76
|
+
className: (0, __pixpilot_shadcn.cn)("p-2 min-w-10", slots?.preview?.className, className),
|
|
77
77
|
children: [iconButtonContent, shouldShowClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
|
|
78
78
|
id: require_get_id.getId(id, "clear-button"),
|
|
79
79
|
type: "button",
|
|
@@ -14,7 +14,7 @@ import { Icon } from "@iconify/react";
|
|
|
14
14
|
|
|
15
15
|
//#region src/icon-selector/IconPicker.tsx
|
|
16
16
|
const ICON_SIZE = "!h-4 !w-4";
|
|
17
|
-
const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ jsx(Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
|
|
17
|
+
const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ jsx(Plus, { className: ICON_SIZE }), showClearButton = true, slots, className }) => {
|
|
18
18
|
const [isOpen, setIsOpen] = useState(false);
|
|
19
19
|
const isMobile = useMediaQuery({ maxWidth: 768 });
|
|
20
20
|
const handleSelectIcon = useCallback((iconName) => {
|
|
@@ -66,7 +66,7 @@ const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog",
|
|
|
66
66
|
type: "button",
|
|
67
67
|
variant: "outline",
|
|
68
68
|
"aria-label": iconButtonLabel,
|
|
69
|
-
className: cn("p-2 min-w-10", slots?.preview?.className),
|
|
69
|
+
className: cn("p-2 min-w-10", slots?.preview?.className, className),
|
|
70
70
|
children: [iconButtonContent, shouldShowClearButton && /* @__PURE__ */ jsx(Button$1, {
|
|
71
71
|
id: getId(id, "clear-button"),
|
|
72
72
|
type: "button",
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/icon-selector/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "IconPicker",
|
|
6
|
+
category: "Forms",
|
|
7
|
+
description: "An icon selector that lets users browse and pick icons from one or more Iconify providers, shown in a dialog or popover with search and a virtualized grid.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
id: "Optional id attribute applied to the picker trigger element.",
|
|
10
|
+
value: "Controlled selected icon name (e.g. \"mdi:home\").",
|
|
11
|
+
onChange: "Called with the selected icon name, or \"\" when cleared.",
|
|
12
|
+
providers: "Icon providers to browse. Each is an IconProviderProps object or an async loader.",
|
|
13
|
+
pickerMode: {
|
|
14
|
+
description: "How the picker is shown (popover falls back to dialog on mobile).",
|
|
15
|
+
type: "\"dialog\" | \"popover\"",
|
|
16
|
+
defaultValue: "\"dialog\""
|
|
17
|
+
},
|
|
18
|
+
variant: {
|
|
19
|
+
description: "Trigger presentation.",
|
|
20
|
+
type: "\"default\" | \"icon-button\"",
|
|
21
|
+
defaultValue: "\"default\""
|
|
22
|
+
},
|
|
23
|
+
onOpenChange: "Called when the picker opens or closes.",
|
|
24
|
+
popoverProps: "Props forwarded to the popover content when in popover mode.",
|
|
25
|
+
isLoading: "Marks the providers as still loading.",
|
|
26
|
+
onProvidersLoaded: "Called with `{ prefix, name }[]` once async providers resolve.",
|
|
27
|
+
showValueText: {
|
|
28
|
+
description: "Shows the selected icon name next to the preview.",
|
|
29
|
+
type: "boolean",
|
|
30
|
+
defaultValue: "true"
|
|
31
|
+
},
|
|
32
|
+
emptyText: "Content shown in the preview when no icon is selected.",
|
|
33
|
+
showClearButton: {
|
|
34
|
+
description: "Shows a clear button when an icon is selected.",
|
|
35
|
+
type: "boolean",
|
|
36
|
+
defaultValue: "true"
|
|
37
|
+
},
|
|
38
|
+
slots: "Class overrides for the root, preview, trigger, clear button, and value text.",
|
|
39
|
+
className: "Class overrides for the root element."
|
|
40
|
+
}),
|
|
41
|
+
dependencies: [{
|
|
42
|
+
name: "@iconify/react",
|
|
43
|
+
type: "peer",
|
|
44
|
+
notes: "Renders the icons."
|
|
45
|
+
}],
|
|
46
|
+
examples: [{
|
|
47
|
+
title: "Icon picker",
|
|
48
|
+
code: "<IconPicker value={icon} onChange={setIcon} providers={[mdiProvider]} />"
|
|
49
|
+
}],
|
|
50
|
+
keywords: [
|
|
51
|
+
"icon",
|
|
52
|
+
"picker",
|
|
53
|
+
"selector",
|
|
54
|
+
"iconify",
|
|
55
|
+
"form"
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { meta };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/icon-toggle/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "IconToggle",
|
|
6
|
+
category: "Actions",
|
|
7
|
+
description: "A square toggle button that swaps between two icons for its checked and unchecked states. Icons may be React nodes or raw SVG markup strings.",
|
|
8
|
+
htmlElement: "button",
|
|
9
|
+
props: defineProps({
|
|
10
|
+
checkedIcon: {
|
|
11
|
+
description: "Icon shown when checked. Accepts a React node or an SVG markup string.",
|
|
12
|
+
type: "React.ReactNode | string"
|
|
13
|
+
},
|
|
14
|
+
uncheckedIcon: {
|
|
15
|
+
description: "Icon shown when unchecked. Accepts a React node or an SVG markup string.",
|
|
16
|
+
type: "React.ReactNode | string"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
description: "Controls the button and icon dimensions.",
|
|
20
|
+
type: "\"sm\" | \"default\" | \"lg\"",
|
|
21
|
+
defaultValue: "\"default\""
|
|
22
|
+
},
|
|
23
|
+
checked: {
|
|
24
|
+
description: "Controlled checked state.",
|
|
25
|
+
type: "boolean"
|
|
26
|
+
},
|
|
27
|
+
defaultChecked: {
|
|
28
|
+
description: "Initial checked state when uncontrolled.",
|
|
29
|
+
type: "boolean"
|
|
30
|
+
},
|
|
31
|
+
onChange: {
|
|
32
|
+
description: "Called with the next checked state when toggled.",
|
|
33
|
+
type: "(checked: boolean) => void"
|
|
34
|
+
},
|
|
35
|
+
variant: {
|
|
36
|
+
description: "Visual button treatment inherited from the base button.",
|
|
37
|
+
type: "\"default\" | \"destructive\" | \"outline\" | \"secondary\" | \"ghost\" | \"link\"",
|
|
38
|
+
defaultValue: "\"outline\""
|
|
39
|
+
},
|
|
40
|
+
asChild: {
|
|
41
|
+
description: "Render behavior and styles through the child element instead of a native button.",
|
|
42
|
+
type: "boolean",
|
|
43
|
+
defaultValue: "false"
|
|
44
|
+
},
|
|
45
|
+
checkedProps: "Extra props merged onto the button while it is in the checked state.",
|
|
46
|
+
uncheckedProps: "Extra props merged onto the button while it is in the unchecked state."
|
|
47
|
+
}),
|
|
48
|
+
examples: [{
|
|
49
|
+
title: "Favorite toggle",
|
|
50
|
+
code: "<IconToggle checked={fav} onChange={setFav} checkedIcon={<HeartFilled />} uncheckedIcon={<Heart />} />"
|
|
51
|
+
}],
|
|
52
|
+
related: ["ToggleButton"],
|
|
53
|
+
keywords: [
|
|
54
|
+
"toggle",
|
|
55
|
+
"icon",
|
|
56
|
+
"button",
|
|
57
|
+
"switch"
|
|
58
|
+
]
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { meta };
|
package/dist/index.d.cts
CHANGED
|
@@ -108,8 +108,8 @@ import { TabsContext, TabsContextValue, useTabsContext } from "./tabs/TabsContex
|
|
|
108
108
|
import { TabsList, TabsListProps } from "./tabs/TabsList.cjs";
|
|
109
109
|
import { TabsTrigger, TabsTriggerProps } from "./tabs/TabsTrigger.cjs";
|
|
110
110
|
import "./tabs/index.cjs";
|
|
111
|
-
import { TagsInput, TagsInputProps } from "./tags-input/TagsInput.cjs";
|
|
112
111
|
import { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps } from "./tags-input/TagsInputInline.cjs";
|
|
112
|
+
import { TagsInput, TagsInputProps } from "./tags-input/TagsInput.cjs";
|
|
113
113
|
import "./tags-input/index.cjs";
|
|
114
114
|
import { ThemeProvider, ThemeProviderProps } from "./theme-provider/ThemeProvider.cjs";
|
|
115
115
|
import { useTheme } from "./theme-provider/index.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -108,8 +108,8 @@ import { TabsContext, TabsContextValue, useTabsContext } from "./tabs/TabsContex
|
|
|
108
108
|
import { TabsList, TabsListProps } from "./tabs/TabsList.js";
|
|
109
109
|
import { TabsTrigger, TabsTriggerProps } from "./tabs/TabsTrigger.js";
|
|
110
110
|
import "./tabs/index.js";
|
|
111
|
-
import { TagsInput, TagsInputProps } from "./tags-input/TagsInput.js";
|
|
112
111
|
import { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps } from "./tags-input/TagsInputInline.js";
|
|
112
|
+
import { TagsInput, TagsInputProps } from "./tags-input/TagsInput.js";
|
|
113
113
|
import "./tags-input/index.js";
|
|
114
114
|
import { ThemeProvider, ThemeProviderProps } from "./theme-provider/ThemeProvider.js";
|
|
115
115
|
import { useTheme } from "./theme-provider/index.js";
|
package/dist/input/Input.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { InputProps } from "@pixpilot/shadcn";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
|
|
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
|
|
|
10
10
|
prefixClassName?: string;
|
|
11
11
|
suffixClassName?: string;
|
|
12
12
|
};
|
|
13
|
-
declare function Input(props: InputProps$1):
|
|
13
|
+
declare function Input(props: InputProps$1): react_jsx_runtime13.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input, InputProps$1 as InputProps };
|