@pixpilot/shadcn-ui 1.39.0 → 2.0.1
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.cts +2 -2
- 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/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/mcp.js +30 -0
- package/dist/date-picker/mcp.js +43 -0
- 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-inline/FileUploadInline.d.cts +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/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/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/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 +11 -2
- 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/ThemeModeToggleButton.d.cts +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 +4 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/theme-toggle/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "ThemeModeToggleButton",
|
|
6
|
+
category: "Utilities",
|
|
7
|
+
description: "A pure light/dark toggle icon button. The folder also exports ThemeModeDropdown, ThemeModeSwitchInside, and ThemeModeSwitchOutside for other theme-switching UIs.",
|
|
8
|
+
htmlElement: "button",
|
|
9
|
+
props: defineProps({
|
|
10
|
+
id: "Optional id attribute applied to the toggle button.",
|
|
11
|
+
className: "Additional CSS class applied to the toggle button.",
|
|
12
|
+
value: {
|
|
13
|
+
description: "The current resolved theme.",
|
|
14
|
+
type: "\"light\" | \"dark\""
|
|
15
|
+
},
|
|
16
|
+
onChange: {
|
|
17
|
+
description: "Called with the next theme when toggled.",
|
|
18
|
+
type: "(theme: string) => void"
|
|
19
|
+
},
|
|
20
|
+
disabled: "Disables the toggle button."
|
|
21
|
+
}),
|
|
22
|
+
notes: ["This is a controlled, presentation-only component; wire value/onChange to next-themes (e.g. via useTheme) yourself.", "Related components in this folder: ThemeModeDropdown, ThemeModeSwitchInside, ThemeModeSwitchOutside."],
|
|
23
|
+
examples: [{
|
|
24
|
+
title: "With next-themes",
|
|
25
|
+
code: "const { resolvedTheme, setTheme } = useTheme();\n<ThemeModeToggleButton value={resolvedTheme} onChange={setTheme} />"
|
|
26
|
+
}],
|
|
27
|
+
related: ["ThemeProvider"],
|
|
28
|
+
keywords: [
|
|
29
|
+
"theme",
|
|
30
|
+
"dark mode",
|
|
31
|
+
"toggle",
|
|
32
|
+
"light",
|
|
33
|
+
"switch"
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { meta };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/toast/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Toast",
|
|
6
|
+
category: "Feedback",
|
|
7
|
+
description: "An imperative toast notification API (built on sonner) with variant-styled alert toasts and dedupe/replacement per message. Mount ToastProvider once, then call toast(...).",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
title: "Bold heading of the toast.",
|
|
10
|
+
description: "Body message of the toast.",
|
|
11
|
+
variant: {
|
|
12
|
+
description: "Controls the toast color treatment and icon.",
|
|
13
|
+
type: "\"error\" | \"info\" | \"warning\" | \"success\" | \"default\"",
|
|
14
|
+
defaultValue: "\"default\""
|
|
15
|
+
},
|
|
16
|
+
duration: {
|
|
17
|
+
description: "How long the toast stays visible, in milliseconds.",
|
|
18
|
+
type: "number",
|
|
19
|
+
defaultValue: "10000"
|
|
20
|
+
},
|
|
21
|
+
position: "Screen position for the toast (forwarded to sonner, e.g. \"top-right\", \"bottom-center\").",
|
|
22
|
+
dismissible: {
|
|
23
|
+
description: "Whether the toast shows a close button and can be dismissed.",
|
|
24
|
+
type: "boolean",
|
|
25
|
+
defaultValue: "true"
|
|
26
|
+
},
|
|
27
|
+
id: "Stable id used to dedupe and replace a previous toast with the same id.",
|
|
28
|
+
className: "Additional CSS class applied to the toast alert.",
|
|
29
|
+
icon: {
|
|
30
|
+
description: "Custom icon element, or `false` to hide the variant icon.",
|
|
31
|
+
type: "React.JSX.Element | boolean"
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
notes: ["Render <ToastProvider /> once near the app root.", "Convenience helpers: toast.success, toast.error, toast.warning, toast.info, toast.custom, toast.dismiss(id), toast.dismissAll()."],
|
|
35
|
+
examples: [{
|
|
36
|
+
title: "Success toast",
|
|
37
|
+
code: "toast.success(\"Saved\", { description: \"Your changes were saved.\" });"
|
|
38
|
+
}, {
|
|
39
|
+
title: "Custom toast call",
|
|
40
|
+
code: "toast({ title: \"Heads up\", description: \"Something happened\", variant: \"warning\", duration: 5000 });"
|
|
41
|
+
}],
|
|
42
|
+
keywords: [
|
|
43
|
+
"toast",
|
|
44
|
+
"notification",
|
|
45
|
+
"sonner",
|
|
46
|
+
"alert",
|
|
47
|
+
"snackbar"
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { meta };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/toggle-button/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "ToggleButton",
|
|
6
|
+
category: "Actions",
|
|
7
|
+
description: "A button with an on/off state that swaps its content (and optionally its props) between checked and unchecked. Supports controlled and uncontrolled use.",
|
|
8
|
+
htmlElement: "button",
|
|
9
|
+
props: defineProps({
|
|
10
|
+
checked: {
|
|
11
|
+
description: "Controlled checked state.",
|
|
12
|
+
type: "boolean"
|
|
13
|
+
},
|
|
14
|
+
defaultChecked: {
|
|
15
|
+
description: "Initial checked state when uncontrolled.",
|
|
16
|
+
type: "boolean",
|
|
17
|
+
defaultValue: "false"
|
|
18
|
+
},
|
|
19
|
+
onChange: {
|
|
20
|
+
description: "Called with the next checked state when toggled.",
|
|
21
|
+
type: "(checked: boolean) => void"
|
|
22
|
+
},
|
|
23
|
+
checkedContent: "Content rendered while checked.",
|
|
24
|
+
uncheckedContent: "Content rendered while unchecked.",
|
|
25
|
+
checkedProps: "Button props applied while checked (e.g. a different variant).",
|
|
26
|
+
uncheckedProps: "Button props applied while unchecked.",
|
|
27
|
+
variant: {
|
|
28
|
+
description: "Visual button treatment inherited from the base button.",
|
|
29
|
+
type: "\"default\" | \"destructive\" | \"outline\" | \"secondary\" | \"ghost\" | \"link\"",
|
|
30
|
+
defaultValue: "\"outline\""
|
|
31
|
+
},
|
|
32
|
+
asChild: {
|
|
33
|
+
description: "Render behavior through the child element instead of a native button.",
|
|
34
|
+
type: "boolean",
|
|
35
|
+
defaultValue: "false"
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
description: "Controls the button dimensions, inherited from the base button.",
|
|
39
|
+
type: "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
40
|
+
defaultValue: "\"default\""
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
examples: [{
|
|
44
|
+
title: "Mute toggle",
|
|
45
|
+
code: "<ToggleButton checked={muted} onChange={setMuted} checkedContent=\"Muted\" uncheckedContent=\"Mute\" />"
|
|
46
|
+
}],
|
|
47
|
+
related: ["IconToggle", "ToggleGroup"],
|
|
48
|
+
keywords: [
|
|
49
|
+
"toggle",
|
|
50
|
+
"button",
|
|
51
|
+
"switch",
|
|
52
|
+
"on",
|
|
53
|
+
"off"
|
|
54
|
+
]
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { meta };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/toggle-group/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "ToggleGroup",
|
|
6
|
+
category: "Actions",
|
|
7
|
+
description: "A set of related toggle buttons that behave as a single- or multiple-selection group, composed with ToggleGroupItem.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
type: {
|
|
10
|
+
description: "Whether one item (\"single\") or many items (\"multiple\") can be selected.",
|
|
11
|
+
type: "\"single\" | \"multiple\""
|
|
12
|
+
},
|
|
13
|
+
value: {
|
|
14
|
+
description: "Controlled selection: a string for \"single\" type or a string[] for \"multiple\".",
|
|
15
|
+
type: "string | string[]"
|
|
16
|
+
},
|
|
17
|
+
defaultValue: "Uncontrolled initial selection (a string for \"single\" type, a string[] for \"multiple\").",
|
|
18
|
+
onValueChange: "Called with the new selection when it changes.",
|
|
19
|
+
variant: {
|
|
20
|
+
description: "Visual treatment applied to the items.",
|
|
21
|
+
type: "\"default\" | \"outline\""
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
description: "Size applied to the items.",
|
|
25
|
+
type: "\"default\" | \"sm\" | \"lg\""
|
|
26
|
+
},
|
|
27
|
+
spacing: {
|
|
28
|
+
description: "Spacing applied between items in the group.",
|
|
29
|
+
type: "\"default\" | \"sm\" | \"lg\""
|
|
30
|
+
},
|
|
31
|
+
disabled: "Disables the entire group.",
|
|
32
|
+
orientation: {
|
|
33
|
+
description: "Layout and arrow-key navigation orientation of the group.",
|
|
34
|
+
type: "\"horizontal\" | \"vertical\"",
|
|
35
|
+
defaultValue: "\"horizontal\""
|
|
36
|
+
},
|
|
37
|
+
rovingFocus: {
|
|
38
|
+
description: "When false, disables roving-focus arrow-key navigation between items.",
|
|
39
|
+
type: "boolean",
|
|
40
|
+
defaultValue: "true"
|
|
41
|
+
},
|
|
42
|
+
loop: {
|
|
43
|
+
description: "When true, keyboard navigation wraps around from the last item to the first.",
|
|
44
|
+
type: "boolean",
|
|
45
|
+
defaultValue: "true"
|
|
46
|
+
},
|
|
47
|
+
asChild: {
|
|
48
|
+
description: "Merge behavior and styles onto the child element instead of the default wrapper.",
|
|
49
|
+
type: "boolean",
|
|
50
|
+
defaultValue: "false"
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
examples: [{
|
|
54
|
+
title: "Single-select group",
|
|
55
|
+
code: "<ToggleGroup type=\"single\" value={align} onValueChange={setAlign}>\n <ToggleGroupItem value=\"left\">Left</ToggleGroupItem>\n <ToggleGroupItem value=\"center\">Center</ToggleGroupItem>\n <ToggleGroupItem value=\"right\">Right</ToggleGroupItem>\n</ToggleGroup>"
|
|
56
|
+
}],
|
|
57
|
+
related: ["ToggleButton", "IconToggle"],
|
|
58
|
+
keywords: [
|
|
59
|
+
"toggle",
|
|
60
|
+
"group",
|
|
61
|
+
"segmented",
|
|
62
|
+
"selection"
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { meta };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/tooltip/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "Tooltip",
|
|
6
|
+
category: "Overlays",
|
|
7
|
+
description: "A hover/focus tooltip built on Radix, composed of TooltipProvider, Tooltip, TooltipTrigger, and TooltipContent.",
|
|
8
|
+
props: defineProps({}),
|
|
9
|
+
notes: ["Wrap the app (or a subtree) in a single TooltipProvider to configure shared delayDuration.", "The Tooltip root forwards Radix props (open, defaultOpen, onOpenChange, delayDuration); TooltipContent forwards side, align, sideOffset, etc."],
|
|
10
|
+
examples: [{
|
|
11
|
+
title: "Basic tooltip",
|
|
12
|
+
code: "<TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild><Button variant=\"outline\">Hover</Button></TooltipTrigger>\n <TooltipContent>Helpful hint</TooltipContent>\n </Tooltip>\n</TooltipProvider>"
|
|
13
|
+
}],
|
|
14
|
+
related: ["Popover"],
|
|
15
|
+
keywords: [
|
|
16
|
+
"tooltip",
|
|
17
|
+
"hint",
|
|
18
|
+
"overlay",
|
|
19
|
+
"hover"
|
|
20
|
+
]
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { meta };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixpilot/shadcn-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
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",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-responsive": "^10.0.1",
|
|
55
55
|
"sonner": "2.0.7",
|
|
56
56
|
"zod": "^4.3.6",
|
|
57
|
-
"@pixpilot/shadcn": "1.4.
|
|
57
|
+
"@pixpilot/shadcn": "1.4.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@storybook/react": "^8.6.18",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"@internal/mcp": "0.0.0",
|
|
76
76
|
"@internal/prettier-config": "0.0.1",
|
|
77
77
|
"@internal/tsconfig": "0.1.0",
|
|
78
|
-
"@internal/
|
|
79
|
-
"@internal/
|
|
78
|
+
"@internal/tsdown-config": "0.1.0",
|
|
79
|
+
"@internal/vitest-config": "0.1.0"
|
|
80
80
|
},
|
|
81
81
|
"prettier": "@internal/prettier-config",
|
|
82
82
|
"scripts": {
|