@maltjoy/mcp-server 0.3.1 → 0.4.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 +30 -28
- package/dist/doc/VJoyAdminBanner/metadata.json +2 -0
- package/dist/doc/VJoyAvailability/metadata.json +2 -0
- package/dist/doc/VJoyAvatar/metadata.json +2 -0
- package/dist/doc/VJoyAvatarsList/metadata.json +2 -0
- package/dist/doc/VJoyBadge/metadata.json +2 -0
- package/dist/doc/VJoyBadgeLevel/metadata.json +2 -0
- package/dist/doc/VJoyBlockSkeleton/metadata.json +2 -0
- package/dist/doc/VJoyBottomSheet/metadata.json +2 -0
- package/dist/doc/VJoyBottomSheetTrigger/metadata.json +2 -0
- package/dist/doc/VJoyButton/metadata.json +2 -0
- package/dist/doc/VJoyButtonCard/JoyButtonCard.types.ts +15 -0
- package/dist/doc/VJoyButtonCard/metadata.json +78 -0
- package/dist/doc/VJoyCheckbox/JoyCheckbox.types.ts +26 -0
- package/dist/doc/VJoyCheckbox/metadata.json +29 -27
- package/dist/doc/VJoyCheckboxCard/JoyCheckboxCard.types.ts +8 -0
- package/dist/doc/VJoyCheckboxCard/metadata.json +221 -0
- package/dist/doc/VJoyCheckboxGroup/metadata.json +338 -0
- package/dist/doc/VJoyCollapse/metadata.json +2 -0
- package/dist/doc/VJoyCollapseItem/metadata.json +2 -0
- package/dist/doc/VJoyCompanyAvatar/metadata.json +2 -0
- package/dist/doc/VJoyDialog/metadata.json +2 -0
- package/dist/doc/VJoyDialogTrigger/metadata.json +2 -0
- package/dist/doc/VJoyDot/metadata.json +2 -0
- package/dist/doc/VJoyDrawer/metadata.json +2 -0
- package/dist/doc/VJoyDrawerTrigger/metadata.json +2 -0
- package/dist/doc/VJoyDropdown/metadata.json +76 -74
- package/dist/doc/VJoyDropdownList/metadata.json +2 -0
- package/dist/doc/VJoyDropzone/metadata.json +2 -0
- package/dist/doc/VJoyFilterBar/metadata.json +2 -0
- package/dist/doc/VJoyFilterBarButton/metadata.json +2 -0
- package/dist/doc/VJoyFloatingActionsBar/metadata.json +70 -0
- package/dist/doc/VJoyFormError/metadata.json +2 -0
- package/dist/doc/VJoyFormFieldSkeleton/metadata.json +2 -0
- package/dist/doc/VJoyFormGroup/metadata.json +2 -0
- package/dist/doc/VJoyFunnel/metadata.json +2 -0
- package/dist/doc/VJoyFunnelFooter/metadata.json +2 -0
- package/dist/doc/VJoyFunnelHeader/metadata.json +2 -0
- package/dist/doc/VJoyHighlight/metadata.json +2 -0
- package/dist/doc/VJoyIcon/metadata.json +2 -0
- package/dist/doc/VJoyIconButton/JoyIconButton.types.ts +6 -0
- package/dist/doc/VJoyIconButton/metadata.json +116 -0
- package/dist/doc/VJoyIndicator/metadata.json +2 -0
- package/dist/doc/VJoyIndicators/metadata.json +2 -0
- package/dist/doc/VJoyInput/JoyInput.types.ts +1 -1
- package/dist/doc/VJoyInput/metadata.json +18 -14
- package/dist/doc/VJoyInputDigit/metadata.json +2 -0
- package/dist/doc/VJoyInputNumber/metadata.json +286 -0
- package/dist/doc/VJoyInputPassword/metadata.json +36 -32
- package/dist/doc/VJoyLabel/metadata.json +6 -4
- package/dist/doc/VJoyLink/metadata.json +11 -9
- package/dist/doc/VJoyListItem/metadata.json +2 -0
- package/dist/doc/VJoyMenu/metadata.json +2 -0
- package/dist/doc/VJoyMenuItem/metadata.json +3 -1
- package/dist/doc/VJoyMultiCheckbox/metadata.json +193 -12
- package/dist/doc/VJoyPagination/metadata.json +2 -0
- package/dist/doc/VJoyPanel/metadata.json +2 -0
- package/dist/doc/VJoyPanelSection/metadata.json +2 -0
- package/dist/doc/VJoyPasswordRequirement/metadata.json +2 -0
- package/dist/doc/VJoyProductTour/metadata.json +2 -0
- package/dist/doc/VJoyProductTourTrigger/metadata.json +2 -0
- package/dist/doc/VJoyProgressBar/metadata.json +2 -5
- package/dist/doc/VJoyRadio/metadata.json +2 -0
- package/dist/doc/VJoyRadioGroup/metadata.json +4 -2
- package/dist/doc/VJoyRatingStars/metadata.json +2 -0
- package/dist/doc/VJoyScreenLoader/metadata.json +2 -0
- package/dist/doc/VJoySelect/metadata.json +34 -32
- package/dist/doc/VJoySelectableItem/metadata.json +2 -0
- package/dist/doc/VJoySelectableItemGroup/metadata.json +2 -0
- package/dist/doc/VJoySeparator/metadata.json +2 -0
- package/dist/doc/VJoySnackbar/metadata.json +2 -0
- package/dist/doc/VJoySpinner/metadata.json +2 -0
- package/dist/doc/VJoyStep/metadata.json +2 -0
- package/dist/doc/VJoyStepper/metadata.json +2 -0
- package/dist/doc/VJoyTab/metadata.json +2 -0
- package/dist/doc/VJoyTabs/metadata.json +2 -0
- package/dist/doc/VJoyTag/metadata.json +6 -4
- package/dist/doc/VJoyTagsInput/metadata.json +2 -0
- package/dist/doc/VJoyTagsList/metadata.json +19 -17
- package/dist/doc/VJoyTemplate/metadata.json +2 -0
- package/dist/doc/VJoyText/metadata.json +2 -0
- package/dist/doc/VJoyTextarea/metadata.json +25 -23
- package/dist/doc/VJoyTitleBrand/metadata.json +2 -0
- package/dist/doc/VJoyToggle/metadata.json +15 -13
- package/dist/doc/VJoyTooltip/metadata.json +2 -0
- package/dist/doc/VJoyUserCard/metadata.json +2 -0
- package/dist/doc/VJoyWalkthrough/metadata.json +2 -0
- package/dist/doc/VJoyWalkthroughTrigger/metadata.json +2 -0
- package/dist/doc/VJoyWrapper/metadata.json +20 -18
- package/dist/doc/css-classes.json +2 -0
- package/dist/doc/design-tokens.json +30 -30
- package/dist/doc/index.json +223 -17
- package/dist/parser.d.ts +12 -0
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +25 -0
- package/dist/parser.js.map +1 -1
- package/dist/tools/get-component-info.js +1 -1
- package/dist/tools/get-component-info.js.map +1 -1
- package/dist/tools/list-components.d.ts +2 -4
- package/dist/tools/list-components.d.ts.map +1 -1
- package/dist/tools/list-components.js +24 -7
- package/dist/tools/list-components.js.map +1 -1
- package/package.json +3 -2
- package/dist/doc/VJoyTemplateShape/metadata.json +0 -9
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ MCP (Model Context Protocol) server for the Joy Design System. This server expos
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- 🔍 List all
|
|
7
|
+
- 🔍 List all available Joy Vue3 components with descriptions
|
|
8
8
|
- 📚 Access component documentation (props, events, slots, exposed members)
|
|
9
9
|
- 🏷️ Retrieve TypeScript types definitions for component props (variants, sizes, etc.)
|
|
10
10
|
- 🎨 List 132 design tokens (colors, spacing, typography, etc.)
|
|
@@ -20,7 +20,7 @@ pnpm install
|
|
|
20
20
|
pnpm build # This also generates component documentation JSON files
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
> **Note:** The build process automatically generates JSON documentation for all
|
|
23
|
+
> **Note:** The build process automatically generates JSON documentation for all components. This is required for the server to work.
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
@@ -43,7 +43,7 @@ pnpm dev
|
|
|
43
43
|
|
|
44
44
|
### 1. `joy_list_components`
|
|
45
45
|
|
|
46
|
-
Lists all available Joy Vue3 components from the @maltjoy/core-vue library.
|
|
46
|
+
Lists all available Joy Vue3 components from the @maltjoy/core-vue library, with descriptions extracted from Storybook stories.
|
|
47
47
|
|
|
48
48
|
**Parameters:** None
|
|
49
49
|
|
|
@@ -51,9 +51,10 @@ Lists all available Joy Vue3 components from the @maltjoy/core-vue library.
|
|
|
51
51
|
```json
|
|
52
52
|
{
|
|
53
53
|
"components": [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
{
|
|
55
|
+
"name": "VJoyButton",
|
|
56
|
+
"description": "A versatile button component supporting multiple variants, sizes, and states."
|
|
57
|
+
},
|
|
57
58
|
"..."
|
|
58
59
|
],
|
|
59
60
|
"count": 74
|
|
@@ -217,7 +218,7 @@ joy-mcp-server/
|
|
|
217
218
|
├── src/
|
|
218
219
|
│ ├── index.ts # Main server entry point
|
|
219
220
|
│ ├── parser.ts # JSON documentation parser
|
|
220
|
-
│ ├── json-metadata-generator.mjs # Generates component
|
|
221
|
+
│ ├── json-metadata-generator.mjs # Generates MCP metadata from component markdown
|
|
221
222
|
│ └── tools/
|
|
222
223
|
│ ├── list-components.ts # Component listing tool
|
|
223
224
|
│ ├── get-component-info.ts # Component info retrieval tool
|
|
@@ -234,12 +235,30 @@ joy-mcp-server/
|
|
|
234
235
|
│ └── *.types.ts # Component TypeScript types
|
|
235
236
|
├── package.json
|
|
236
237
|
├── tsconfig.json
|
|
237
|
-
|
|
238
|
-
└── TROUBLESHOOTING.md # Troubleshooting guide
|
|
238
|
+
└── README.md
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
The server reads the generated JSON documentation from `dist/doc/` which is automatically created during the build process by extracting metadata from Vue component files in `@maltjoy/core-vue`.
|
|
242
242
|
|
|
243
|
+
Component metadata is authored in `packages/core-vue/src/components/**/JoyComponentName.metadata.md` using Markdown with YAML frontmatter. This keeps a short structured summary in frontmatter while allowing richer Markdown content in the body for multiline descriptions and future code examples. Storybook and the MCP generator both consume the same Markdown source. Storybook JSDoc comments remain a fallback when a component metadata file does not provide a description yet.
|
|
244
|
+
|
|
245
|
+
Example:
|
|
246
|
+
|
|
247
|
+
```md
|
|
248
|
+
---
|
|
249
|
+
category: Buttons
|
|
250
|
+
description: >
|
|
251
|
+
Short summary used in list views and quick MCP responses.
|
|
252
|
+
ignoreMcpDocumentation: false
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
Longer Markdown documentation rendered in Storybook and exposed by the MCP.
|
|
256
|
+
|
|
257
|
+
```vue
|
|
258
|
+
<VJoyButton variant="primary">Save</VJoyButton>
|
|
259
|
+
```
|
|
260
|
+
```
|
|
261
|
+
|
|
243
262
|
## Development
|
|
244
263
|
|
|
245
264
|
To add new tools:
|
|
@@ -260,12 +279,6 @@ pnpm run dev
|
|
|
260
279
|
# Generate only documentation (no compilation)
|
|
261
280
|
pnpm run generate:components-docs:json
|
|
262
281
|
|
|
263
|
-
# Test the server locally
|
|
264
|
-
pnpm run test
|
|
265
|
-
|
|
266
|
-
# Reload the server (kill MCP process)
|
|
267
|
-
pnpm run reload
|
|
268
|
-
|
|
269
282
|
# Start the server
|
|
270
283
|
pnpm start
|
|
271
284
|
|
|
@@ -275,23 +288,12 @@ pnpm run inspector
|
|
|
275
288
|
|
|
276
289
|
## Troubleshooting
|
|
277
290
|
|
|
278
|
-
### MCP server returns 0 components in Cursor
|
|
279
|
-
|
|
280
|
-
If you're getting an empty list of components in Cursor but the server works fine locally:
|
|
281
|
-
|
|
282
|
-
1. **Quick fix:** Use Cursor Command Palette → `Developer: Reload Window`
|
|
283
|
-
|
|
284
|
-
2. **Or run:** `pnpm run reload` to kill the old server process
|
|
285
|
-
|
|
286
|
-
3. **Verify locally:** `pnpm run test` should show 74 components
|
|
287
|
-
|
|
288
|
-
For detailed troubleshooting steps, see [TROUBLESHOOTING.md](./TROUBLESHOOTING.md)
|
|
289
|
-
|
|
290
291
|
### Common Issues
|
|
291
292
|
|
|
292
293
|
- **Documentation not generated:** Run `pnpm run build` to compile and generate docs
|
|
293
|
-
- **Changes not taking effect:** Reload
|
|
294
|
+
- **Changes not taking effect:** Reload your editor window to restart the MCP server
|
|
294
295
|
- **Server fails to start:** Check that `dist/doc/index.json` exists
|
|
296
|
+
- **0 components returned:** Reload your editor window (`Developer: Reload Window` in Cursor/VS Code)
|
|
295
297
|
|
|
296
298
|
## License
|
|
297
299
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyAdminBanner",
|
|
3
3
|
"displayName": "VJoyAdminBanner",
|
|
4
|
+
"description": "The AdminBanner component displays a visual indicator when users are viewing the application in admin mode.\nIt features a distinctive banner with an eye icon and customizable label, typically positioned at the top of the interface to clearly communicate the current viewing context to administrators.",
|
|
5
|
+
"category": "Admin",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "label",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyAvailability",
|
|
3
3
|
"displayName": "VJoyAvailability",
|
|
4
|
+
"description": "A status indicator component for displaying user availability information.\nFeatures colored dots and optional labels to communicate different availability states such as available, not available, available soon, or partially available.\nCan be displayed as a simple dot indicator or with descriptive text labels that handle long content gracefully.",
|
|
5
|
+
"category": "View",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "label",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyAvatar",
|
|
3
3
|
"displayName": "VJoyAvatar",
|
|
4
|
+
"description": "A versatile avatar component for displaying user profile pictures, initials, or placeholders depending on given properties.\nSupports multiple sizes, fallback to initials when no photo is provided, anonymous states with icons, numeric indicators for \"more users\" displays, and special variants like strategy profiles and company avatars.\nCan be styled as clickable links and includes empty states for various use cases.",
|
|
5
|
+
"category": "View",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "size",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyAvatarsList",
|
|
3
3
|
"displayName": "VJoyAvatarsList",
|
|
4
|
+
"description": "A container component for displaying multiple avatars in a styled group layout.\nProvides consistent spacing and alignment for avatar collections, with an optional compressed mode for more compact displays.\nDesigned to work seamlessly with VJoyAvatar components.",
|
|
5
|
+
"category": "View",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "compress",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyBadge",
|
|
3
3
|
"displayName": "VJoyBadge",
|
|
4
|
+
"description": "A versatile badge component for labeling, categorizing, and highlighting content with colored indicators.\nSupports various color variants for different semantic meanings, optional bulletpoint dots for visual emphasis,\nand can display either text labels or numeric values. Perfect for status indicators, tags, and notification counters.",
|
|
5
|
+
"category": "View",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "label",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyBadgeLevel",
|
|
3
3
|
"displayName": "VJoyBadgeLevel",
|
|
4
|
+
"description": "A specialized badge component for displaying user achievement levels and status indicators.\nFeatures custom SVG icons for different categories including SuperMalter levels (with crown icons),\nHigh Potential badges (with diamond icons), verified status, and special designations like Malt Linker.\nCan display icons only or with accompanying text labels for different user recognition levels.",
|
|
5
|
+
"category": "View",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "superMalterLevel",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyBlockSkeleton",
|
|
3
3
|
"displayName": "VJoyBlockSkeleton",
|
|
4
|
+
"description": "A highly configurable skeleton loading component for creating placeholder blocks during content loading.\nFeatures customizable dimensions, circle variant for avatars, and smooth shimmer animations to improve perceived performance.\nMore flexible than VJoyFormFieldSkeleton and integrates seamlessly with VJoyWrapper for responsive layouts.",
|
|
5
|
+
"category": "Skeletons",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "circle",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyBottomSheet",
|
|
3
3
|
"displayName": "VJoyBottomSheet",
|
|
4
|
+
"description": "A mobile-optimized bottom sheet component that slides up from the bottom of the screen.\nFeatures drag-to-dismiss functionality, customizable content slots, and teleportation support.\n\n**IMPORTANT** : for documentation purpose, you can't hide the bottom sheets here.\n\nBy default, the component is teleported to the body root. You can override this by passing a teleport value.\n\nHow to use:\n\n```html\n<template>\n <VJoyBottomSheet ref=\"bottomSheet\">\n <template #bottom-sheet-content>\n The content\n </template>\n </VJoyBottomSheet>\n</template>\n\n<script lang=\"ts\" setup>\nimport {ref} from 'vue';\nimport {VJoyBottomSheet} from '@maltjoy/core-vue';\n\n// declare the VJoyBottomSheet ref using the component type definition\nconst bottomSheet = ref<InstanceType<typeof VJoyBottomSheet> | null>(null);\n\n// use this function when you need to (onMounted, when clicking on any trigger...)\nfunction openBottomSheet() {\n bottomSheet.value?.show();\n}\n\n</script>\n```\n\n> You can use the `VJoyBottomSheetTrigger` subcomponent if it's easier for you.",
|
|
5
|
+
"category": "Overlays",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "closeLabel",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyButton",
|
|
3
3
|
"displayName": "VJoyButton",
|
|
4
|
+
"description": "A button component supporting multiple variants, sizes, and states.\nFeatures icon support, loading states and can function as either a button or link element.\nIncludes ripple effects and comprehensive styling options for different use cases from primary actions to subtle ghost buttons.\n\n**Tips:** set a \"href\" attribute to make the button a link.",
|
|
5
|
+
"category": "Buttons",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
8
|
"name": "size",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type {Component} from 'vue';
|
|
2
|
+
|
|
3
|
+
export type TJoyButtonCardType = 'a' | 'button' | Component;
|
|
4
|
+
export type TJoyButtonCardAlign = 'left' | 'center' | 'right';
|
|
5
|
+
|
|
6
|
+
export interface VJoyButtonCardProps {
|
|
7
|
+
/** Disabled state */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Native href for anchor rendering */
|
|
10
|
+
href?: string;
|
|
11
|
+
/** HTML element or Vue component to render */
|
|
12
|
+
type?: TJoyButtonCardType;
|
|
13
|
+
/** Content alignment inside the card */
|
|
14
|
+
align?: TJoyButtonCardAlign;
|
|
15
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "JoyButtonCard",
|
|
3
|
+
"displayName": "VJoyButtonCard",
|
|
4
|
+
"description": "This component is a CTA or a link used to render complex interactive buttons.\n\nIf your goal is to only use a short string, use `VJoyButton` instead.\n\nPlease note that you have to deal with the content and its style by yourself.",
|
|
5
|
+
"category": "Buttons",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"name": "disabled",
|
|
9
|
+
"type": "boolean | undefined",
|
|
10
|
+
"required": false,
|
|
11
|
+
"default": "false",
|
|
12
|
+
"description": "Disabled state",
|
|
13
|
+
"possibleValues": [
|
|
14
|
+
"false",
|
|
15
|
+
"true"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "href",
|
|
20
|
+
"type": "string | undefined",
|
|
21
|
+
"required": false,
|
|
22
|
+
"description": "Native href for anchor rendering",
|
|
23
|
+
"possibleValues": [
|
|
24
|
+
"string"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "type",
|
|
29
|
+
"type": "TJoyButtonCardType | undefined",
|
|
30
|
+
"required": false,
|
|
31
|
+
"default": "\"button\"",
|
|
32
|
+
"description": "HTML element or Vue component to render",
|
|
33
|
+
"possibleValues": null
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "align",
|
|
37
|
+
"type": "TJoyButtonCardAlign | undefined",
|
|
38
|
+
"required": false,
|
|
39
|
+
"default": "\"left\"",
|
|
40
|
+
"description": "Content alignment inside the card",
|
|
41
|
+
"possibleValues": [
|
|
42
|
+
"left",
|
|
43
|
+
"right",
|
|
44
|
+
"center"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"events": [],
|
|
49
|
+
"slots": [
|
|
50
|
+
{
|
|
51
|
+
"name": "default",
|
|
52
|
+
"description": "Main content for the card"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"exposed": [
|
|
56
|
+
{
|
|
57
|
+
"name": "type",
|
|
58
|
+
"type": "TJoyButtonCardType",
|
|
59
|
+
"isMethod": false
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "disabled",
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"isMethod": false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "align",
|
|
68
|
+
"type": "TJoyButtonCardAlign",
|
|
69
|
+
"isMethod": false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "href",
|
|
73
|
+
"type": "string | undefined",
|
|
74
|
+
"isMethod": false
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"hasVModel": false
|
|
78
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface VJoyCheckboxProps {
|
|
2
|
+
/** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
|
|
3
|
+
indeterminate?: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Internal purpose in order to prevent double focus mark on selectable-item
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
displayFocus?: boolean;
|
|
9
|
+
/** Use it to replace the default slot */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Checked state of the component */
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Invalid state of the component
|
|
15
|
+
*
|
|
16
|
+
* Note: A checked checkbox cannot be invalid (the `checked` state takes priority over `invalid` state).
|
|
17
|
+
*/
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
/** The value is used in multiselection context in order to build array of values. */
|
|
20
|
+
value?: string;
|
|
21
|
+
/** Removes any interactivity if disabled */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
id?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "JoyCheckbox",
|
|
3
3
|
"displayName": "VJoyCheckbox",
|
|
4
|
+
"description": "A form checkbox component with support for standard, indeterminate, and disabled states.\nFeatures accessible labeling, focus indicators, form integration with validation feedback, and additional content slots.\nSupports both single selections scenarios with proper event handling and state management.",
|
|
5
|
+
"category": "Forms",
|
|
4
6
|
"props": [
|
|
5
7
|
{
|
|
6
|
-
"name": "
|
|
8
|
+
"name": "indeterminate",
|
|
7
9
|
"type": "boolean | undefined",
|
|
8
10
|
"required": false,
|
|
9
11
|
"default": "false",
|
|
10
|
-
"description": "
|
|
12
|
+
"description": "Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes",
|
|
11
13
|
"possibleValues": [
|
|
12
14
|
"false",
|
|
13
15
|
"true"
|
|
14
16
|
]
|
|
15
17
|
},
|
|
16
18
|
{
|
|
17
|
-
"name": "
|
|
19
|
+
"name": "displayFocus",
|
|
18
20
|
"type": "boolean | undefined",
|
|
19
21
|
"required": false,
|
|
20
|
-
"default": "
|
|
21
|
-
"description": "",
|
|
22
|
+
"default": "true",
|
|
23
|
+
"description": "Internal purpose in order to prevent double focus mark on selectable-item",
|
|
22
24
|
"possibleValues": [
|
|
23
25
|
"false",
|
|
24
26
|
"true"
|
|
25
27
|
]
|
|
26
28
|
},
|
|
27
29
|
{
|
|
28
|
-
"name": "
|
|
29
|
-
"type": "
|
|
30
|
+
"name": "label",
|
|
31
|
+
"type": "string | undefined",
|
|
30
32
|
"required": false,
|
|
31
|
-
"
|
|
32
|
-
"description": "Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes",
|
|
33
|
+
"description": "Use it to replace the default slot",
|
|
33
34
|
"possibleValues": [
|
|
34
|
-
"
|
|
35
|
-
"true"
|
|
35
|
+
"string"
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"name": "
|
|
39
|
+
"name": "checked",
|
|
40
40
|
"type": "boolean | undefined",
|
|
41
41
|
"required": false,
|
|
42
|
-
"default": "
|
|
43
|
-
"description": "
|
|
42
|
+
"default": "false",
|
|
43
|
+
"description": "Checked state of the component",
|
|
44
44
|
"possibleValues": [
|
|
45
45
|
"false",
|
|
46
46
|
"true"
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
"name": "
|
|
50
|
+
"name": "invalid",
|
|
51
51
|
"type": "boolean | undefined",
|
|
52
52
|
"required": false,
|
|
53
53
|
"default": "false",
|
|
54
|
-
"description": "
|
|
54
|
+
"description": "Invalid state of the component\n\nNote: A checked checkbox cannot be invalid (the `checked` state takes priority over `invalid` state).",
|
|
55
55
|
"possibleValues": [
|
|
56
56
|
"false",
|
|
57
57
|
"true"
|
|
@@ -79,16 +79,16 @@
|
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
|
-
"name": "
|
|
82
|
+
"name": "id",
|
|
83
83
|
"type": "string | undefined",
|
|
84
84
|
"required": false,
|
|
85
|
-
"description": "
|
|
85
|
+
"description": "",
|
|
86
86
|
"possibleValues": [
|
|
87
87
|
"string"
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
"name": "
|
|
91
|
+
"name": "name",
|
|
92
92
|
"type": "string | undefined",
|
|
93
93
|
"required": false,
|
|
94
94
|
"description": "",
|
|
@@ -97,12 +97,14 @@
|
|
|
97
97
|
]
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
"name": "
|
|
101
|
-
"type": "
|
|
100
|
+
"name": "required",
|
|
101
|
+
"type": "boolean | undefined",
|
|
102
102
|
"required": false,
|
|
103
|
+
"default": "false",
|
|
103
104
|
"description": "",
|
|
104
105
|
"possibleValues": [
|
|
105
|
-
"
|
|
106
|
+
"false",
|
|
107
|
+
"true"
|
|
106
108
|
]
|
|
107
109
|
}
|
|
108
110
|
],
|
|
@@ -144,6 +146,11 @@
|
|
|
144
146
|
"type": "boolean",
|
|
145
147
|
"isMethod": false
|
|
146
148
|
},
|
|
149
|
+
{
|
|
150
|
+
"name": "disabled",
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"isMethod": false
|
|
153
|
+
},
|
|
147
154
|
{
|
|
148
155
|
"name": "indeterminate",
|
|
149
156
|
"type": "boolean",
|
|
@@ -164,11 +171,6 @@
|
|
|
164
171
|
"type": "string",
|
|
165
172
|
"isMethod": false
|
|
166
173
|
},
|
|
167
|
-
{
|
|
168
|
-
"name": "disabled",
|
|
169
|
-
"type": "boolean",
|
|
170
|
-
"isMethod": false
|
|
171
|
-
},
|
|
172
174
|
{
|
|
173
175
|
"name": "label",
|
|
174
176
|
"type": "string | undefined",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type {VJoyCheckboxProps} from '../JoyCheckbox/JoyCheckbox.types';
|
|
2
|
+
|
|
3
|
+
export interface VJoyCheckboxCardProps extends Omit<VJoyCheckboxProps, 'displayFocus'> {
|
|
4
|
+
/** Secondary label displayed below the main label */
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
/** Whether the checkbox card should fit its content */
|
|
7
|
+
fitContent?: boolean;
|
|
8
|
+
}
|