@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
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_runtime13 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_runtime13.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { Input$1 as Input, InputProps$1 as InputProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/input/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Input",
|
|
6
|
+
category: "Forms",
|
|
7
|
+
description: "A text input that renders as a plain shadcn input, or as an input group with prefix/suffix addons when either is provided.",
|
|
8
|
+
htmlElement: "input",
|
|
9
|
+
props: defineProps({
|
|
10
|
+
prefix: "Content rendered as an addon before the input (e.g. an icon or \"$\").",
|
|
11
|
+
suffix: "Content rendered as an addon after the input (e.g. a unit or button).",
|
|
12
|
+
groupClassName: "Class applied to the input group wrapper when prefix/suffix is used.",
|
|
13
|
+
prefixClassName: "Class applied to the prefix addon element.",
|
|
14
|
+
suffixClassName: "Class applied to the suffix addon element."
|
|
15
|
+
}),
|
|
16
|
+
examples: [{
|
|
17
|
+
title: "Plain input",
|
|
18
|
+
code: "<Input placeholder=\"Email\" value={email} onChange={(e) => setEmail(e.target.value)} />"
|
|
19
|
+
}, {
|
|
20
|
+
title: "Input with addons",
|
|
21
|
+
code: "<Input prefix=\"$\" suffix=\"USD\" placeholder=\"0.00\" />"
|
|
22
|
+
}],
|
|
23
|
+
keywords: [
|
|
24
|
+
"input",
|
|
25
|
+
"text",
|
|
26
|
+
"field",
|
|
27
|
+
"form",
|
|
28
|
+
"addon"
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { meta };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/layout/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Layout",
|
|
6
|
+
category: "Layout",
|
|
7
|
+
description: "A full-height flex column page shell that handles mobile browser chrome, composed with LayoutHeader, LayoutMain, and LayoutFooter.",
|
|
8
|
+
htmlElement: "div",
|
|
9
|
+
props: defineProps({ as: {
|
|
10
|
+
description: "Element or component type to render as the layout container.",
|
|
11
|
+
type: "React.ElementType",
|
|
12
|
+
defaultValue: "\"div\""
|
|
13
|
+
} }),
|
|
14
|
+
notes: ["Compose with LayoutHeader, LayoutMain, and LayoutFooter for the standard app shell."],
|
|
15
|
+
examples: [{
|
|
16
|
+
title: "App shell",
|
|
17
|
+
code: "<Layout>\n <LayoutHeader>{nav}</LayoutHeader>\n <LayoutMain>{content}</LayoutMain>\n <LayoutFooter>{footer}</LayoutFooter>\n</Layout>"
|
|
18
|
+
}],
|
|
19
|
+
keywords: [
|
|
20
|
+
"layout",
|
|
21
|
+
"shell",
|
|
22
|
+
"page",
|
|
23
|
+
"flex",
|
|
24
|
+
"container"
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { meta };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/loading-overlay/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "LoadingOverlay",
|
|
6
|
+
category: "Feedback",
|
|
7
|
+
description: "A spinner overlay that fades in over its container or the full viewport while a task is loading, with optional message and show/hide delays.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
show: {
|
|
10
|
+
description: "Whether the overlay is visible.",
|
|
11
|
+
type: "boolean"
|
|
12
|
+
},
|
|
13
|
+
backdrop: {
|
|
14
|
+
description: "Shows a semi-transparent backdrop behind the spinner.",
|
|
15
|
+
type: "boolean",
|
|
16
|
+
defaultValue: "true"
|
|
17
|
+
},
|
|
18
|
+
placement: {
|
|
19
|
+
description: "Vertical alignment of the loader within the overlay.",
|
|
20
|
+
type: "\"top\" | \"bottom\" | \"center\"",
|
|
21
|
+
defaultValue: "\"center\""
|
|
22
|
+
},
|
|
23
|
+
message: "Optional message rendered below the spinner.",
|
|
24
|
+
inDelay: {
|
|
25
|
+
description: "Delay in milliseconds before showing the loader.",
|
|
26
|
+
type: "number",
|
|
27
|
+
defaultValue: "0"
|
|
28
|
+
},
|
|
29
|
+
outDelay: {
|
|
30
|
+
description: "Delay in milliseconds before hiding the loader after `show` becomes false.",
|
|
31
|
+
type: "number",
|
|
32
|
+
defaultValue: "0"
|
|
33
|
+
},
|
|
34
|
+
scope: {
|
|
35
|
+
description: "Whether the overlay fills its relative parent (\"container\") or the viewport (\"fullscreen\").",
|
|
36
|
+
type: "\"container\" | \"fullscreen\"",
|
|
37
|
+
defaultValue: "\"container\""
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
description: "Spinner size.",
|
|
41
|
+
type: "\"sm\" | \"default\" | \"lg\"",
|
|
42
|
+
defaultValue: "\"default\""
|
|
43
|
+
},
|
|
44
|
+
slots: "Props forwarded to the inner spinner, message, and content elements.",
|
|
45
|
+
className: "Additional CSS class applied to the overlay wrapper."
|
|
46
|
+
}),
|
|
47
|
+
examples: [{
|
|
48
|
+
title: "Container overlay",
|
|
49
|
+
code: "<div className=\"relative\">{content}<LoadingOverlay show={isLoading} message=\"Loading…\" /></div>"
|
|
50
|
+
}, {
|
|
51
|
+
title: "Fullscreen overlay",
|
|
52
|
+
code: "<LoadingOverlay show={isLoading} scope=\"fullscreen\" />"
|
|
53
|
+
}],
|
|
54
|
+
keywords: [
|
|
55
|
+
"loading",
|
|
56
|
+
"overlay",
|
|
57
|
+
"spinner",
|
|
58
|
+
"busy",
|
|
59
|
+
"feedback"
|
|
60
|
+
]
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { meta };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/pagination/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Pagination",
|
|
6
|
+
category: "Navigation",
|
|
7
|
+
description: "A page navigation control with full, simple, and compact variants, ellipsis handling, and optional page-info text.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
id: "Optional id attribute applied to the pagination navigation element.",
|
|
10
|
+
className: "Additional CSS class applied to the pagination navigation element.",
|
|
11
|
+
page: {
|
|
12
|
+
description: "Current page number (1-indexed).",
|
|
13
|
+
type: "number"
|
|
14
|
+
},
|
|
15
|
+
totalPages: {
|
|
16
|
+
description: "Total number of pages. The component renders nothing when this is <= 1.",
|
|
17
|
+
type: "number"
|
|
18
|
+
},
|
|
19
|
+
onPageChange: {
|
|
20
|
+
description: "Called with the event and the next page number when a page is selected.",
|
|
21
|
+
type: "(event: React.ChangeEvent<unknown>, page: number) => void"
|
|
22
|
+
},
|
|
23
|
+
maxVisiblePages: {
|
|
24
|
+
description: "Maximum page numbers to display before using ellipsis. Set to 0 to show only prev/next.",
|
|
25
|
+
type: "number",
|
|
26
|
+
defaultValue: "4"
|
|
27
|
+
},
|
|
28
|
+
variant: {
|
|
29
|
+
description: "Layout style: \"full\" (numbers), \"simple\" (prev/next only), or \"compact\" (page indicator with all nav buttons).",
|
|
30
|
+
type: "\"full\" | \"simple\" | \"compact\"",
|
|
31
|
+
defaultValue: "\"full\""
|
|
32
|
+
},
|
|
33
|
+
size: {
|
|
34
|
+
description: "Size of the pagination control.",
|
|
35
|
+
type: "\"small\" | \"medium\" | \"large\"",
|
|
36
|
+
defaultValue: "\"medium\""
|
|
37
|
+
},
|
|
38
|
+
showFirstLastButtons: {
|
|
39
|
+
description: "Whether to show first/last page buttons.",
|
|
40
|
+
type: "boolean",
|
|
41
|
+
defaultValue: "true"
|
|
42
|
+
},
|
|
43
|
+
showPageInfo: {
|
|
44
|
+
description: "Whether to show \"Page X of Y\" text (used with the \"simple\" variant).",
|
|
45
|
+
type: "boolean",
|
|
46
|
+
defaultValue: "false"
|
|
47
|
+
}
|
|
48
|
+
}),
|
|
49
|
+
examples: [{
|
|
50
|
+
title: "Full pagination",
|
|
51
|
+
code: "<Pagination page={page} totalPages={10} onPageChange={(_, next) => setPage(next)} />"
|
|
52
|
+
}, {
|
|
53
|
+
title: "Compact pagination",
|
|
54
|
+
code: "<Pagination page={page} totalPages={10} onPageChange={(_, next) => setPage(next)} variant=\"compact\" />"
|
|
55
|
+
}],
|
|
56
|
+
keywords: [
|
|
57
|
+
"pagination",
|
|
58
|
+
"pager",
|
|
59
|
+
"pages",
|
|
60
|
+
"navigation"
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { meta };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/popover/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Popover",
|
|
6
|
+
category: "Overlays",
|
|
7
|
+
description: "A floating popover built on Radix, composed of Popover, PopoverTrigger, and PopoverContent, with content pre-sized to the available viewport space and a styleless PopoverContentUnstyled variant.",
|
|
8
|
+
props: defineProps({}),
|
|
9
|
+
examples: [{
|
|
10
|
+
title: "Basic popover",
|
|
11
|
+
code: "<Popover>\n <PopoverTrigger asChild><Button variant=\"outline\">Open</Button></PopoverTrigger>\n <PopoverContent>Popover body</PopoverContent>\n</Popover>"
|
|
12
|
+
}, {
|
|
13
|
+
title: "Unstyled content",
|
|
14
|
+
code: "<Popover>\n <PopoverTrigger>Open</PopoverTrigger>\n <PopoverContentUnstyled>{custom}</PopoverContentUnstyled>\n</Popover>"
|
|
15
|
+
}],
|
|
16
|
+
notes: ["PopoverContent forwards all Radix PopoverContent props (align, side, sideOffset, etc.)."],
|
|
17
|
+
related: ["Combobox", "Tooltip"],
|
|
18
|
+
keywords: [
|
|
19
|
+
"popover",
|
|
20
|
+
"overlay",
|
|
21
|
+
"floating",
|
|
22
|
+
"dropdown"
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { meta };
|
package/dist/rating/Rating.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
@@ -35,7 +35,7 @@ declare function RatingButton({
|
|
|
35
35
|
index,
|
|
36
36
|
className,
|
|
37
37
|
...props
|
|
38
|
-
}: RatingButtonProps):
|
|
38
|
+
}: RatingButtonProps): react_jsx_runtime15.JSX.Element;
|
|
39
39
|
declare function Rating({
|
|
40
40
|
value: valueProp,
|
|
41
41
|
defaultValue,
|
|
@@ -53,6 +53,6 @@ declare function Rating({
|
|
|
53
53
|
children,
|
|
54
54
|
id,
|
|
55
55
|
...props
|
|
56
|
-
}: React$1.PropsWithChildren<RatingProps>):
|
|
56
|
+
}: React$1.PropsWithChildren<RatingProps>): react_jsx_runtime15.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps };
|
package/dist/rating/Rating.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
@@ -35,7 +35,7 @@ declare function RatingButton({
|
|
|
35
35
|
index,
|
|
36
36
|
className,
|
|
37
37
|
...props
|
|
38
|
-
}: RatingButtonProps):
|
|
38
|
+
}: RatingButtonProps): react_jsx_runtime20.JSX.Element;
|
|
39
39
|
declare function Rating({
|
|
40
40
|
value: valueProp,
|
|
41
41
|
defaultValue,
|
|
@@ -53,6 +53,6 @@ declare function Rating({
|
|
|
53
53
|
children,
|
|
54
54
|
id,
|
|
55
55
|
...props
|
|
56
|
-
}: React$1.PropsWithChildren<RatingProps>):
|
|
56
|
+
}: React$1.PropsWithChildren<RatingProps>): react_jsx_runtime20.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { Rating, RatingButton, RatingButtonProps, RatingColor, RatingOption, RatingProps };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/rating/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Rating",
|
|
6
|
+
category: "Forms",
|
|
7
|
+
description: "An accessible star/circle rating input supporting controlled or uncontrolled value, hover preview, keyboard navigation, and a hidden form field.",
|
|
8
|
+
htmlElement: "div",
|
|
9
|
+
props: defineProps({
|
|
10
|
+
value: {
|
|
11
|
+
description: "Controlled rating value.",
|
|
12
|
+
type: "number"
|
|
13
|
+
},
|
|
14
|
+
defaultValue: {
|
|
15
|
+
description: "Initial value when uncontrolled.",
|
|
16
|
+
type: "number"
|
|
17
|
+
},
|
|
18
|
+
onValueChange: {
|
|
19
|
+
description: "Called with the new rating value when the selection changes.",
|
|
20
|
+
type: "(value: number) => void"
|
|
21
|
+
},
|
|
22
|
+
max: {
|
|
23
|
+
description: "Number of rating items when `options` is not provided.",
|
|
24
|
+
type: "number",
|
|
25
|
+
defaultValue: "5"
|
|
26
|
+
},
|
|
27
|
+
options: "Explicit rating items as `{ label, value }[]`; overrides `max` and provides accessible labels.",
|
|
28
|
+
iconType: {
|
|
29
|
+
description: "Glyph used for each rating item.",
|
|
30
|
+
type: "\"star\" | \"circle\"",
|
|
31
|
+
defaultValue: "\"star\""
|
|
32
|
+
},
|
|
33
|
+
size: {
|
|
34
|
+
description: "Icon size.",
|
|
35
|
+
type: "\"sm\" | \"default\" | \"lg\" | \"xl\"",
|
|
36
|
+
defaultValue: "\"default\""
|
|
37
|
+
},
|
|
38
|
+
readOnly: {
|
|
39
|
+
description: "Renders the rating as non-interactive display only.",
|
|
40
|
+
type: "boolean",
|
|
41
|
+
defaultValue: "false"
|
|
42
|
+
},
|
|
43
|
+
disabled: {
|
|
44
|
+
description: "Disables interaction and dims the control.",
|
|
45
|
+
type: "boolean",
|
|
46
|
+
defaultValue: "false"
|
|
47
|
+
},
|
|
48
|
+
name: "Name for the hidden input, so the value participates in native form submission.",
|
|
49
|
+
required: "Marks the hidden form input as required.",
|
|
50
|
+
color: {
|
|
51
|
+
description: "Color theme applied to the filled icons.",
|
|
52
|
+
type: "\"default\" | \"primary\" | \"secondary\" | \"destructive\" | \"foreground\" | \"accent\" | \"muted\" | \"ring\"",
|
|
53
|
+
defaultValue: "\"default\""
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
56
|
+
examples: [{
|
|
57
|
+
title: "Controlled rating",
|
|
58
|
+
code: "<Rating value={rating} onValueChange={setRating} max={5} />"
|
|
59
|
+
}, {
|
|
60
|
+
title: "Read-only circles",
|
|
61
|
+
code: "<Rating value={4} readOnly iconType=\"circle\" color=\"primary\" />"
|
|
62
|
+
}],
|
|
63
|
+
keywords: [
|
|
64
|
+
"rating",
|
|
65
|
+
"stars",
|
|
66
|
+
"review",
|
|
67
|
+
"score",
|
|
68
|
+
"form"
|
|
69
|
+
]
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
export { meta };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/rich-text-editor/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "RichTextEditor",
|
|
6
|
+
category: "Forms",
|
|
7
|
+
description: "A TipTap-based WYSIWYG editor with a configurable toolbar (bold, italic, headings, lists, links, alignment, code) that reads and writes HTML.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
value: {
|
|
10
|
+
description: "HTML content of the editor (React-style value, mapped to TipTap content).",
|
|
11
|
+
type: "string"
|
|
12
|
+
},
|
|
13
|
+
onChange: {
|
|
14
|
+
description: "Called with the editor HTML whenever the content changes.",
|
|
15
|
+
type: "(content: string) => void"
|
|
16
|
+
},
|
|
17
|
+
editable: {
|
|
18
|
+
description: "Whether the editor accepts input.",
|
|
19
|
+
type: "boolean",
|
|
20
|
+
defaultValue: "true"
|
|
21
|
+
},
|
|
22
|
+
showToolbar: {
|
|
23
|
+
description: "Whether the formatting toolbar is shown.",
|
|
24
|
+
type: "boolean",
|
|
25
|
+
defaultValue: "true"
|
|
26
|
+
},
|
|
27
|
+
toolbarItems: "Explicit toolbar items: predefined command strings, \"|\" separators, or custom button objects.",
|
|
28
|
+
extensions: "Additional TipTap extensions to add to the editor.",
|
|
29
|
+
editorProps: "Custom TipTap editorProps merged into the defaults.",
|
|
30
|
+
slots: "Class overrides for the root, toolbar (and its buttons/separators), and content area.",
|
|
31
|
+
placeholder: "Placeholder text shown when the editor is empty.",
|
|
32
|
+
tooltipMode: {
|
|
33
|
+
description: "How toolbar button tooltips are rendered.",
|
|
34
|
+
type: "ToolbarButtonTooltipMode",
|
|
35
|
+
defaultValue: "\"native\""
|
|
36
|
+
},
|
|
37
|
+
immediatelyRender: {
|
|
38
|
+
description: "Render the editor immediately on mount (helps with SSR/hydration).",
|
|
39
|
+
type: "boolean",
|
|
40
|
+
defaultValue: "false"
|
|
41
|
+
},
|
|
42
|
+
allowLinkTarget: {
|
|
43
|
+
description: "Whether the link popover exposes target controls.",
|
|
44
|
+
type: "boolean",
|
|
45
|
+
defaultValue: "false"
|
|
46
|
+
},
|
|
47
|
+
openOnClick: {
|
|
48
|
+
description: "Whether clicking a link opens it inside the editor.",
|
|
49
|
+
type: "boolean",
|
|
50
|
+
defaultValue: "false"
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
dependencies: [{
|
|
54
|
+
name: "@tiptap/react",
|
|
55
|
+
type: "peer"
|
|
56
|
+
}, {
|
|
57
|
+
name: "@tiptap/starter-kit",
|
|
58
|
+
type: "peer"
|
|
59
|
+
}],
|
|
60
|
+
examples: [{
|
|
61
|
+
title: "Basic editor",
|
|
62
|
+
code: "<RichTextEditor value={html} onChange={setHtml} placeholder=\"Write something…\" />"
|
|
63
|
+
}, {
|
|
64
|
+
title: "Custom toolbar",
|
|
65
|
+
code: "<RichTextEditor value={html} onChange={setHtml} toolbarItems={[\"bold\", \"italic\", \"|\", \"bulletList\"]} />"
|
|
66
|
+
}],
|
|
67
|
+
keywords: [
|
|
68
|
+
"rich text",
|
|
69
|
+
"editor",
|
|
70
|
+
"wysiwyg",
|
|
71
|
+
"tiptap",
|
|
72
|
+
"html",
|
|
73
|
+
"form"
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { meta };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/scaled-preview/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "ScaledPreview",
|
|
6
|
+
category: "Layout",
|
|
7
|
+
description: "Renders fixed-size content scaled to fit a smaller preview box, keeping the content centered — useful for thumbnails and design previews.",
|
|
8
|
+
htmlElement: "div",
|
|
9
|
+
props: defineProps({
|
|
10
|
+
scaleFactor: {
|
|
11
|
+
description: "Scale factor for the preview box relative to baseSize (e.g. 0.5 = 50%). Ignored when previewBoxSize is set.",
|
|
12
|
+
type: "number"
|
|
13
|
+
},
|
|
14
|
+
baseSize: {
|
|
15
|
+
description: "Intrinsic content dimensions being scaled.",
|
|
16
|
+
type: "{ width: number; height: number }",
|
|
17
|
+
defaultValue: "{ width: 1000, height: 1000 }"
|
|
18
|
+
},
|
|
19
|
+
previewBoxSize: {
|
|
20
|
+
description: "Explicit preview box size. When provided, overrides scaleFactor.",
|
|
21
|
+
type: "{ width: number; height: number }"
|
|
22
|
+
},
|
|
23
|
+
padding: {
|
|
24
|
+
description: "Padding in pixels that reduces the space available for the scaled content.",
|
|
25
|
+
type: "number",
|
|
26
|
+
defaultValue: "0"
|
|
27
|
+
},
|
|
28
|
+
forceScale: {
|
|
29
|
+
description: "Manual content scale override that bypasses the automatic fit calculation.",
|
|
30
|
+
type: "number"
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
examples: [{
|
|
34
|
+
title: "Half-scale preview",
|
|
35
|
+
code: "<ScaledPreview scaleFactor={0.25} baseSize={{ width: 1080, height: 1080 }}>\n {content}\n</ScaledPreview>"
|
|
36
|
+
}],
|
|
37
|
+
keywords: [
|
|
38
|
+
"preview",
|
|
39
|
+
"scale",
|
|
40
|
+
"thumbnail",
|
|
41
|
+
"zoom",
|
|
42
|
+
"layout"
|
|
43
|
+
]
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { meta };
|
package/dist/select/Select.cjs
CHANGED
|
@@ -12,7 +12,7 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
|
12
12
|
|
|
13
13
|
//#region src/select/Select.tsx
|
|
14
14
|
function Select(props) {
|
|
15
|
-
const { options, value = "", onChange, placeholder, contentProps, keyboardMode = "dropdown", open: openProp, onOpenChange: onOpenChangeProp, position, clearable = false, disabled, className, id,...
|
|
15
|
+
const { options, value = "", onChange, placeholder, contentProps, keyboardMode = "dropdown", open: openProp, onOpenChange: onOpenChangeProp, position, clearable = false, disabled, name, required, className, id,...triggerProps } = props;
|
|
16
16
|
const [uncontrolledOpen, setUncontrolledOpen] = react.default.useState(false);
|
|
17
17
|
const open = openProp ?? uncontrolledOpen;
|
|
18
18
|
const handleOpenChange = (nextOpen) => {
|
|
@@ -28,14 +28,16 @@ function Select(props) {
|
|
|
28
28
|
getValue: (option) => String(option.value)
|
|
29
29
|
});
|
|
30
30
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Select, {
|
|
31
|
-
...restProps,
|
|
32
31
|
value,
|
|
33
32
|
open,
|
|
34
33
|
onValueChange: onChange,
|
|
35
34
|
onOpenChange: handleOpenChange,
|
|
35
|
+
name,
|
|
36
|
+
required,
|
|
36
37
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
37
38
|
className: "relative w-full",
|
|
38
39
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.SelectTrigger, {
|
|
40
|
+
...triggerProps,
|
|
39
41
|
id,
|
|
40
42
|
className: (0, __pixpilot_shadcn.cn)("w-full", className),
|
|
41
43
|
onKeyDown: handleTriggerKeyDown,
|
package/dist/select/Select.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Select, SelectContent } from "@pixpilot/shadcn";
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
|
+
import { Select, SelectContent, SelectTrigger } from "@pixpilot/shadcn";
|
|
3
3
|
import React, { ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/select/Select.d.ts
|
|
@@ -45,12 +45,21 @@ type BaseSelectProps = {
|
|
|
45
45
|
* Whether to show a clear button when a value is selected
|
|
46
46
|
*/
|
|
47
47
|
clearable?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Controlled open state of the dropdown
|
|
50
|
+
*/
|
|
51
|
+
open?: ComponentProps<typeof Select>['open'];
|
|
52
|
+
/**
|
|
53
|
+
* Callback function called when the open state changes
|
|
54
|
+
*/
|
|
55
|
+
onOpenChange?: ComponentProps<typeof Select>['onOpenChange'];
|
|
48
56
|
id?: string;
|
|
49
57
|
disabled?: boolean;
|
|
50
58
|
name?: string;
|
|
51
59
|
required?: boolean;
|
|
60
|
+
/** Styles the visible trigger. */
|
|
52
61
|
className?: string;
|
|
53
|
-
} & Omit<ComponentProps<typeof
|
|
54
|
-
declare function Select$1(props: BaseSelectProps):
|
|
62
|
+
} & Omit<ComponentProps<typeof SelectTrigger>, 'onChange' | 'value'>;
|
|
63
|
+
declare function Select$1(props: BaseSelectProps): react_jsx_runtime17.JSX.Element;
|
|
55
64
|
//#endregion
|
|
56
65
|
export { BaseSelectProps, Select$1 as Select, SelectContentProps, SelectOption };
|
package/dist/select/Select.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Select, SelectContent } from "@pixpilot/shadcn";
|
|
1
|
+
import { Select, SelectContent, SelectTrigger } from "@pixpilot/shadcn";
|
|
2
2
|
import React, { ComponentProps } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/select/Select.d.ts
|
|
6
6
|
interface SelectOption {
|
|
@@ -45,12 +45,21 @@ type BaseSelectProps = {
|
|
|
45
45
|
* Whether to show a clear button when a value is selected
|
|
46
46
|
*/
|
|
47
47
|
clearable?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Controlled open state of the dropdown
|
|
50
|
+
*/
|
|
51
|
+
open?: ComponentProps<typeof Select>['open'];
|
|
52
|
+
/**
|
|
53
|
+
* Callback function called when the open state changes
|
|
54
|
+
*/
|
|
55
|
+
onOpenChange?: ComponentProps<typeof Select>['onOpenChange'];
|
|
48
56
|
id?: string;
|
|
49
57
|
disabled?: boolean;
|
|
50
58
|
name?: string;
|
|
51
59
|
required?: boolean;
|
|
60
|
+
/** Styles the visible trigger. */
|
|
52
61
|
className?: string;
|
|
53
|
-
} & Omit<ComponentProps<typeof
|
|
54
|
-
declare function Select$1(props: BaseSelectProps):
|
|
62
|
+
} & Omit<ComponentProps<typeof SelectTrigger>, 'onChange' | 'value'>;
|
|
63
|
+
declare function Select$1(props: BaseSelectProps): react_jsx_runtime22.JSX.Element;
|
|
55
64
|
//#endregion
|
|
56
65
|
export { BaseSelectProps, Select$1 as Select, SelectContentProps, SelectOption };
|
package/dist/select/Select.js
CHANGED
|
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
|
|
8
8
|
//#region src/select/Select.tsx
|
|
9
9
|
function Select$1(props) {
|
|
10
|
-
const { options, value = "", onChange, placeholder, contentProps, keyboardMode = "dropdown", open: openProp, onOpenChange: onOpenChangeProp, position, clearable = false, disabled, className, id,...
|
|
10
|
+
const { options, value = "", onChange, placeholder, contentProps, keyboardMode = "dropdown", open: openProp, onOpenChange: onOpenChangeProp, position, clearable = false, disabled, name, required, className, id,...triggerProps } = props;
|
|
11
11
|
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
|
|
12
12
|
const open = openProp ?? uncontrolledOpen;
|
|
13
13
|
const handleOpenChange = (nextOpen) => {
|
|
@@ -23,14 +23,16 @@ function Select$1(props) {
|
|
|
23
23
|
getValue: (option) => String(option.value)
|
|
24
24
|
});
|
|
25
25
|
return /* @__PURE__ */ jsxs(Select, {
|
|
26
|
-
...restProps,
|
|
27
26
|
value,
|
|
28
27
|
open,
|
|
29
28
|
onValueChange: onChange,
|
|
30
29
|
onOpenChange: handleOpenChange,
|
|
30
|
+
name,
|
|
31
|
+
required,
|
|
31
32
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
32
33
|
className: "relative w-full",
|
|
33
34
|
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
35
|
+
...triggerProps,
|
|
34
36
|
id,
|
|
35
37
|
className: cn("w-full", className),
|
|
36
38
|
onKeyDown: handleTriggerKeyDown,
|