@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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps } from "./TagsInputInline.cjs";
|
|
2
|
+
import { TagsInput, TagsInputProps } from "./TagsInput.cjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps } from "./TagsInputInline.js";
|
|
2
|
+
import { TagsInput, TagsInputProps } from "./TagsInput.js";
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/tags-input/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "TagsInput",
|
|
6
|
+
category: "Forms",
|
|
7
|
+
description: "An inline tags/multi-select input supporting free-text tags, an optional options dropdown, validation, paste parsing, and per-tag editing.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
id: "Optional id attribute applied to the input element.",
|
|
10
|
+
className: "Additional CSS class applied to the input wrapper.",
|
|
11
|
+
value: {
|
|
12
|
+
description: "Controlled list of tag values.",
|
|
13
|
+
type: "Array<string | number>"
|
|
14
|
+
},
|
|
15
|
+
onChange: {
|
|
16
|
+
description: "Called with the new list of tags when they change.",
|
|
17
|
+
type: "(value: Array<string | number>) => void"
|
|
18
|
+
},
|
|
19
|
+
options: "Optional selectable options as `{ label, value }[]`. When provided, a dropdown is shown.",
|
|
20
|
+
freeSolo: {
|
|
21
|
+
description: "Allows arbitrary tags not present in `options` (MUI Autocomplete style).",
|
|
22
|
+
type: "boolean",
|
|
23
|
+
defaultValue: "true"
|
|
24
|
+
},
|
|
25
|
+
placeholder: {
|
|
26
|
+
description: "Placeholder for the tag input.",
|
|
27
|
+
type: "string",
|
|
28
|
+
defaultValue: "\"Add tags...\""
|
|
29
|
+
},
|
|
30
|
+
emptyText: {
|
|
31
|
+
description: "Message shown when the options dropdown has no matches.",
|
|
32
|
+
type: "string",
|
|
33
|
+
defaultValue: "\"No options found.\""
|
|
34
|
+
},
|
|
35
|
+
disabled: "Disables the input.",
|
|
36
|
+
readOnly: "Renders tags without allowing edits.",
|
|
37
|
+
maxTags: "Maximum number of tags allowed.",
|
|
38
|
+
allowDuplicates: {
|
|
39
|
+
description: "Allows the same tag value to be added more than once.",
|
|
40
|
+
type: "boolean",
|
|
41
|
+
defaultValue: "false"
|
|
42
|
+
},
|
|
43
|
+
editable: {
|
|
44
|
+
description: "Allows editing an existing tag inline.",
|
|
45
|
+
type: "boolean",
|
|
46
|
+
defaultValue: "false"
|
|
47
|
+
},
|
|
48
|
+
label: "Optional label rendered above the input.",
|
|
49
|
+
showLabel: {
|
|
50
|
+
description: "Hides the label element while keeping the `label` value available.",
|
|
51
|
+
type: "boolean",
|
|
52
|
+
defaultValue: "true"
|
|
53
|
+
},
|
|
54
|
+
slots: {
|
|
55
|
+
description: "Per-part prop overrides for the inline input, e.g. `{ list, label, item, input, addButton, clear }`.",
|
|
56
|
+
type: "{ list?: { className?: string }; label?: object; item?: object; input?: object; addButton?: { className?: string }; clear?: object }"
|
|
57
|
+
},
|
|
58
|
+
delimiter: {
|
|
59
|
+
description: "Character that splits pasted or typed text into multiple tags.",
|
|
60
|
+
type: "string",
|
|
61
|
+
defaultValue: "\",\""
|
|
62
|
+
},
|
|
63
|
+
addOnPaste: {
|
|
64
|
+
description: "Adds tags when pasting delimited text.",
|
|
65
|
+
type: "boolean",
|
|
66
|
+
defaultValue: "true"
|
|
67
|
+
},
|
|
68
|
+
addOnTab: {
|
|
69
|
+
description: "Commits the current input as a tag when pressing Tab.",
|
|
70
|
+
type: "boolean",
|
|
71
|
+
defaultValue: "true"
|
|
72
|
+
},
|
|
73
|
+
onValidate: {
|
|
74
|
+
description: "Custom validator returning false to reject a candidate tag.",
|
|
75
|
+
type: "(value: string) => boolean"
|
|
76
|
+
},
|
|
77
|
+
addButtonVisibility: {
|
|
78
|
+
description: "When the inline add button is shown.",
|
|
79
|
+
type: "\"always\" | \"touch\" | \"never\"",
|
|
80
|
+
defaultValue: "\"touch\""
|
|
81
|
+
}
|
|
82
|
+
}),
|
|
83
|
+
examples: [{
|
|
84
|
+
title: "Free-text tags",
|
|
85
|
+
code: "<TagsInput value={tags} onChange={setTags} placeholder=\"Add tags…\" />"
|
|
86
|
+
}, {
|
|
87
|
+
title: "With options",
|
|
88
|
+
code: "<TagsInput value={tags} onChange={setTags} options={options} freeSolo={false} />"
|
|
89
|
+
}],
|
|
90
|
+
keywords: [
|
|
91
|
+
"tags",
|
|
92
|
+
"input",
|
|
93
|
+
"multi-select",
|
|
94
|
+
"chips",
|
|
95
|
+
"form"
|
|
96
|
+
]
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
export { meta };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineProps } from "../mcp/src/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/theme-provider/mcp.ts
|
|
4
|
+
const meta = {
|
|
5
|
+
name: "ThemeProvider",
|
|
6
|
+
category: "Utilities",
|
|
7
|
+
description: "A thin wrapper around the next-themes ThemeProvider preconfigured for class-based theming with system detection.",
|
|
8
|
+
props: defineProps({
|
|
9
|
+
children: "Application subtree that reads the current theme.",
|
|
10
|
+
attribute: {
|
|
11
|
+
description: "How the theme is applied to the html element.",
|
|
12
|
+
type: "string | string[]",
|
|
13
|
+
defaultValue: "\"class\""
|
|
14
|
+
},
|
|
15
|
+
defaultTheme: {
|
|
16
|
+
description: "Theme used when none is stored.",
|
|
17
|
+
type: "string",
|
|
18
|
+
defaultValue: "\"system\""
|
|
19
|
+
},
|
|
20
|
+
enableSystem: {
|
|
21
|
+
description: "Whether to follow the OS color-scheme preference.",
|
|
22
|
+
type: "boolean",
|
|
23
|
+
defaultValue: "true"
|
|
24
|
+
},
|
|
25
|
+
storageKey: "localStorage key used to persist the selected theme.",
|
|
26
|
+
themes: "List of available theme names.",
|
|
27
|
+
forcedTheme: "Forces a specific theme for the subtree, ignoring stored and system preferences.",
|
|
28
|
+
disableTransitionOnChange: {
|
|
29
|
+
description: "Disables CSS transitions while switching themes to avoid flashes.",
|
|
30
|
+
type: "boolean",
|
|
31
|
+
defaultValue: "false"
|
|
32
|
+
},
|
|
33
|
+
enableColorScheme: {
|
|
34
|
+
description: "Whether to set the `color-scheme` style so native UI (scrollbars, inputs) matches.",
|
|
35
|
+
type: "boolean",
|
|
36
|
+
defaultValue: "true"
|
|
37
|
+
},
|
|
38
|
+
value: "Mapping of theme name to the value written to the DOM attribute.",
|
|
39
|
+
nonce: "CSP nonce applied to the injected theme script.",
|
|
40
|
+
scriptProps: "Extra props spread onto the injected theme <script> tag."
|
|
41
|
+
}),
|
|
42
|
+
notes: ["All other next-themes ThemeProvider props are forwarded."],
|
|
43
|
+
examples: [{
|
|
44
|
+
title: "Wrap the app",
|
|
45
|
+
code: "<ThemeProvider>\n <App />\n</ThemeProvider>"
|
|
46
|
+
}],
|
|
47
|
+
related: ["ThemeModeToggleButton"],
|
|
48
|
+
keywords: [
|
|
49
|
+
"theme",
|
|
50
|
+
"dark mode",
|
|
51
|
+
"provider",
|
|
52
|
+
"next-themes"
|
|
53
|
+
]
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { meta };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeDropdown.d.ts
|
|
4
4
|
interface ThemeModeDropdownProps {
|
|
@@ -18,7 +18,7 @@ interface ThemeModeDropdownProps {
|
|
|
18
18
|
* Provides Light / Dark / System options.
|
|
19
19
|
* Pure component - requires themeValue and onChange props.
|
|
20
20
|
*/
|
|
21
|
-
declare function ThemeModeDropdown(props: ThemeModeDropdownProps):
|
|
21
|
+
declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime21.JSX.Element;
|
|
22
22
|
declare namespace ThemeModeDropdown {
|
|
23
23
|
var displayName: string;
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeDropdown.d.ts
|
|
4
4
|
interface ThemeModeDropdownProps {
|
|
@@ -18,7 +18,7 @@ interface ThemeModeDropdownProps {
|
|
|
18
18
|
* Provides Light / Dark / System options.
|
|
19
19
|
* Pure component - requires themeValue and onChange props.
|
|
20
20
|
*/
|
|
21
|
-
declare function ThemeModeDropdown(props: ThemeModeDropdownProps):
|
|
21
|
+
declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime15.JSX.Element;
|
|
22
22
|
declare namespace ThemeModeDropdown {
|
|
23
23
|
var displayName: string;
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchInside.d.ts
|
|
4
4
|
type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
|
|
@@ -26,7 +26,7 @@ interface ThemeModeSwitchInsideProps {
|
|
|
26
26
|
* Icons are embedded within the switch control.
|
|
27
27
|
* Pure component - requires value and onChange props.
|
|
28
28
|
*/
|
|
29
|
-
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps):
|
|
29
|
+
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime22.JSX.Element;
|
|
30
30
|
declare namespace ThemeModeSwitchInside {
|
|
31
31
|
var displayName: string;
|
|
32
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchInside.d.ts
|
|
4
4
|
type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
|
|
@@ -26,7 +26,7 @@ interface ThemeModeSwitchInsideProps {
|
|
|
26
26
|
* Icons are embedded within the switch control.
|
|
27
27
|
* Pure component - requires value and onChange props.
|
|
28
28
|
*/
|
|
29
|
-
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps):
|
|
29
|
+
declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime16.JSX.Element;
|
|
30
30
|
declare namespace ThemeModeSwitchInside {
|
|
31
31
|
var displayName: string;
|
|
32
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
|
|
4
4
|
interface ThemeModeSwitchOutsideProps {
|
|
@@ -23,7 +23,7 @@ interface ThemeModeSwitchOutsideProps {
|
|
|
23
23
|
* Icons flank the switch control on either side.
|
|
24
24
|
* Pure component - requires value and onChange props.
|
|
25
25
|
*/
|
|
26
|
-
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps):
|
|
26
|
+
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime23.JSX.Element;
|
|
27
27
|
declare namespace ThemeModeSwitchOutside {
|
|
28
28
|
var displayName: string;
|
|
29
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
|
|
4
4
|
interface ThemeModeSwitchOutsideProps {
|
|
@@ -23,7 +23,7 @@ interface ThemeModeSwitchOutsideProps {
|
|
|
23
23
|
* Icons flank the switch control on either side.
|
|
24
24
|
* Pure component - requires value and onChange props.
|
|
25
25
|
*/
|
|
26
|
-
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps):
|
|
26
|
+
declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime17.JSX.Element;
|
|
27
27
|
declare namespace ThemeModeSwitchOutside {
|
|
28
28
|
var displayName: string;
|
|
29
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeToggleButton.d.ts
|
|
4
4
|
interface ThemeModeToggleButtonProps {
|
|
@@ -14,7 +14,7 @@ interface ThemeModeToggleButtonProps {
|
|
|
14
14
|
* Light/Dark toggle button.
|
|
15
15
|
* Pure component - toggles between light and dark.
|
|
16
16
|
*/
|
|
17
|
-
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps):
|
|
17
|
+
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime20.JSX.Element;
|
|
18
18
|
declare namespace ThemeModeToggleButton {
|
|
19
19
|
var displayName: string;
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/theme-toggle/ThemeModeToggleButton.d.ts
|
|
4
4
|
interface ThemeModeToggleButtonProps {
|
|
@@ -14,7 +14,7 @@ interface ThemeModeToggleButtonProps {
|
|
|
14
14
|
* Light/Dark toggle button.
|
|
15
15
|
* Pure component - toggles between light and dark.
|
|
16
16
|
*/
|
|
17
|
-
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps):
|
|
17
|
+
declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime14.JSX.Element;
|
|
18
18
|
declare namespace ThemeModeToggleButton {
|
|
19
19
|
var displayName: string;
|
|
20
20
|
}
|
|
@@ -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.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",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"typescript": "^5.9.3",
|
|
73
73
|
"@internal/eslint-config": "0.3.0",
|
|
74
74
|
"@internal/hooks": "0.0.0",
|
|
75
|
-
"@internal/mcp": "0.0.0",
|
|
76
75
|
"@internal/prettier-config": "0.0.1",
|
|
76
|
+
"@internal/mcp": "0.0.0",
|
|
77
77
|
"@internal/tsconfig": "0.1.0",
|
|
78
78
|
"@internal/vitest-config": "0.1.0",
|
|
79
79
|
"@internal/tsdown-config": "0.1.0"
|