@maltjoy/mcp-server 0.3.2 → 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.
Files changed (103) hide show
  1. package/README.md +21 -2
  2. package/dist/doc/VJoyAdminBanner/metadata.json +2 -1
  3. package/dist/doc/VJoyAvailability/metadata.json +2 -1
  4. package/dist/doc/VJoyAvatar/metadata.json +2 -1
  5. package/dist/doc/VJoyAvatarsList/metadata.json +2 -1
  6. package/dist/doc/VJoyBadge/metadata.json +2 -1
  7. package/dist/doc/VJoyBadgeLevel/metadata.json +2 -1
  8. package/dist/doc/VJoyBlockSkeleton/metadata.json +2 -1
  9. package/dist/doc/VJoyBottomSheet/metadata.json +2 -1
  10. package/dist/doc/VJoyBottomSheetTrigger/metadata.json +1 -0
  11. package/dist/doc/VJoyButton/metadata.json +2 -1
  12. package/dist/doc/VJoyButtonCard/JoyButtonCard.types.ts +15 -0
  13. package/dist/doc/VJoyButtonCard/metadata.json +78 -0
  14. package/dist/doc/VJoyCheckbox/JoyCheckbox.types.ts +26 -0
  15. package/dist/doc/VJoyCheckbox/metadata.json +29 -28
  16. package/dist/doc/VJoyCheckboxCard/JoyCheckboxCard.types.ts +8 -0
  17. package/dist/doc/VJoyCheckboxCard/metadata.json +221 -0
  18. package/dist/doc/VJoyCheckboxGroup/metadata.json +338 -0
  19. package/dist/doc/VJoyCollapse/metadata.json +2 -1
  20. package/dist/doc/VJoyCollapseItem/metadata.json +2 -1
  21. package/dist/doc/VJoyCompanyAvatar/metadata.json +1 -0
  22. package/dist/doc/VJoyDialog/metadata.json +2 -1
  23. package/dist/doc/VJoyDialogTrigger/metadata.json +1 -0
  24. package/dist/doc/VJoyDot/metadata.json +2 -1
  25. package/dist/doc/VJoyDrawer/metadata.json +2 -1
  26. package/dist/doc/VJoyDrawerTrigger/metadata.json +1 -0
  27. package/dist/doc/VJoyDropdown/metadata.json +76 -75
  28. package/dist/doc/VJoyDropdownList/metadata.json +2 -1
  29. package/dist/doc/VJoyDropzone/metadata.json +2 -1
  30. package/dist/doc/VJoyFilterBar/metadata.json +2 -1
  31. package/dist/doc/VJoyFilterBarButton/metadata.json +1 -0
  32. package/dist/doc/VJoyFloatingActionsBar/metadata.json +70 -0
  33. package/dist/doc/VJoyFormError/metadata.json +2 -1
  34. package/dist/doc/VJoyFormFieldSkeleton/metadata.json +2 -1
  35. package/dist/doc/VJoyFormGroup/metadata.json +2 -1
  36. package/dist/doc/VJoyFunnel/metadata.json +2 -1
  37. package/dist/doc/VJoyFunnelFooter/metadata.json +1 -0
  38. package/dist/doc/VJoyFunnelHeader/metadata.json +1 -0
  39. package/dist/doc/VJoyHighlight/metadata.json +2 -1
  40. package/dist/doc/VJoyIcon/metadata.json +2 -1
  41. package/dist/doc/VJoyIconButton/JoyIconButton.types.ts +6 -0
  42. package/dist/doc/VJoyIconButton/metadata.json +116 -0
  43. package/dist/doc/VJoyIndicator/metadata.json +1 -0
  44. package/dist/doc/VJoyIndicators/metadata.json +2 -1
  45. package/dist/doc/VJoyInput/metadata.json +12 -11
  46. package/dist/doc/VJoyInputDigit/metadata.json +2 -1
  47. package/dist/doc/VJoyInputNumber/metadata.json +286 -0
  48. package/dist/doc/VJoyInputPassword/metadata.json +33 -32
  49. package/dist/doc/VJoyLabel/metadata.json +6 -5
  50. package/dist/doc/VJoyLink/metadata.json +11 -10
  51. package/dist/doc/VJoyListItem/metadata.json +2 -1
  52. package/dist/doc/VJoyMenu/metadata.json +2 -1
  53. package/dist/doc/VJoyMenuItem/metadata.json +2 -1
  54. package/dist/doc/VJoyMultiCheckbox/metadata.json +193 -13
  55. package/dist/doc/VJoyPagination/metadata.json +2 -1
  56. package/dist/doc/VJoyPanel/metadata.json +2 -1
  57. package/dist/doc/VJoyPanelSection/metadata.json +1 -0
  58. package/dist/doc/VJoyPasswordRequirement/metadata.json +2 -1
  59. package/dist/doc/VJoyProductTour/metadata.json +2 -1
  60. package/dist/doc/VJoyProductTourTrigger/metadata.json +1 -0
  61. package/dist/doc/VJoyProgressBar/metadata.json +2 -6
  62. package/dist/doc/VJoyRadio/metadata.json +1 -0
  63. package/dist/doc/VJoyRadioGroup/metadata.json +4 -3
  64. package/dist/doc/VJoyRatingStars/metadata.json +2 -1
  65. package/dist/doc/VJoyScreenLoader/metadata.json +2 -1
  66. package/dist/doc/VJoySelect/metadata.json +34 -33
  67. package/dist/doc/VJoySelectableItem/metadata.json +1 -0
  68. package/dist/doc/VJoySelectableItemGroup/metadata.json +2 -1
  69. package/dist/doc/VJoySeparator/metadata.json +2 -1
  70. package/dist/doc/VJoySnackbar/metadata.json +2 -1
  71. package/dist/doc/VJoySpinner/metadata.json +2 -1
  72. package/dist/doc/VJoyStep/metadata.json +1 -0
  73. package/dist/doc/VJoyStepper/metadata.json +2 -1
  74. package/dist/doc/VJoyTab/metadata.json +1 -0
  75. package/dist/doc/VJoyTabs/metadata.json +2 -1
  76. package/dist/doc/VJoyTag/metadata.json +6 -5
  77. package/dist/doc/VJoyTagsInput/metadata.json +2 -1
  78. package/dist/doc/VJoyTagsList/metadata.json +19 -18
  79. package/dist/doc/VJoyTemplate/metadata.json +2 -1
  80. package/dist/doc/VJoyText/metadata.json +2 -1
  81. package/dist/doc/VJoyTextarea/metadata.json +25 -24
  82. package/dist/doc/VJoyTitleBrand/metadata.json +2 -1
  83. package/dist/doc/VJoyToggle/metadata.json +15 -14
  84. package/dist/doc/VJoyTooltip/metadata.json +2 -1
  85. package/dist/doc/VJoyUserCard/metadata.json +2 -1
  86. package/dist/doc/VJoyWalkthrough/metadata.json +2 -1
  87. package/dist/doc/VJoyWalkthroughTrigger/metadata.json +1 -0
  88. package/dist/doc/VJoyWrapper/metadata.json +20 -19
  89. package/dist/doc/css-classes.json +2 -0
  90. package/dist/doc/design-tokens.json +30 -30
  91. package/dist/doc/index.json +206 -78
  92. package/dist/parser.d.ts +3 -0
  93. package/dist/parser.d.ts.map +1 -1
  94. package/dist/parser.js +3 -0
  95. package/dist/parser.js.map +1 -1
  96. package/dist/tools/get-component-info.js +1 -1
  97. package/dist/tools/get-component-info.js.map +1 -1
  98. package/dist/tools/list-components.d.ts +1 -4
  99. package/dist/tools/list-components.d.ts.map +1 -1
  100. package/dist/tools/list-components.js +22 -5
  101. package/dist/tools/list-components.js.map +1 -1
  102. package/package.json +3 -2
  103. package/dist/doc/VJoyTemplateShape/metadata.json +0 -10
package/README.md CHANGED
@@ -218,7 +218,7 @@ joy-mcp-server/
218
218
  ├── src/
219
219
  │ ├── index.ts # Main server entry point
220
220
  │ ├── parser.ts # JSON documentation parser
221
- │ ├── json-metadata-generator.mjs # Generates component metadata
221
+ │ ├── json-metadata-generator.mjs # Generates MCP metadata from component markdown
222
222
  │ └── tools/
223
223
  │ ├── list-components.ts # Component listing tool
224
224
  │ ├── get-component-info.ts # Component info retrieval tool
@@ -238,7 +238,26 @@ joy-mcp-server/
238
238
  └── README.md
239
239
  ```
240
240
 
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`. Component descriptions are extracted from JSDoc comments in Storybook story files.
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
+
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
+ ```
242
261
 
243
262
  ## Development
244
263
 
@@ -1,7 +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. It 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.",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "label",
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "JoyAvailability",
3
3
  "displayName": "VJoyAvailability",
4
- "description": "A status indicator component for displaying user availability information. Features colored dots and optional labels to communicate different availability states such as available, not available, available soon, or partially available. Can be displayed as a simple dot indicator or with descriptive text labels that handle long content gracefully.",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "label",
@@ -1,7 +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. Supports 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. Can be styled as clickable links and includes empty states for various use cases.",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "size",
@@ -1,7 +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. Provides consistent spacing and alignment for avatar collections, with an optional compressed mode for more compact displays. Designed to work seamlessly with VJoyAvatar components.",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "compress",
@@ -1,7 +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. Supports various color variants for different semantic meanings, optional bulletpoint dots for visual emphasis, and can display either text labels or numeric values. Perfect for status indicators, tags, and notification counters.",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "label",
@@ -1,7 +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. Features custom SVG icons for different categories including SuperMalter levels (with crown icons), High Potential badges (with diamond icons), verified status, and special designations like Malt Linker. Can display icons only or with accompanying text labels for different user recognition levels.",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "superMalterLevel",
@@ -1,7 +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. Features customizable dimensions, circle variant for avatars, and smooth shimmer animations to improve perceived performance. More flexible than VJoyFormFieldSkeleton and integrates seamlessly with VJoyWrapper for responsive layouts.",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "circle",
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "JoyBottomSheet",
3
3
  "displayName": "VJoyBottomSheet",
4
- "description": "",
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",
5
6
  "props": [
6
7
  {
7
8
  "name": "closeLabel",
@@ -2,6 +2,7 @@
2
2
  "name": "JoyBottomSheetTrigger",
3
3
  "displayName": "VJoyBottomSheetTrigger",
4
4
  "description": "",
5
+ "category": "Overlays",
5
6
  "props": [
6
7
  {
7
8
  "name": "bottomSheet",
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "JoyButton",
3
3
  "displayName": "VJoyButton",
4
- "description": "A button component supporting multiple variants, sizes, and states. Features icon support, loading states and can function as either a button or link element. Includes ripple effects and comprehensive styling options for different use cases from primary actions to subtle ghost buttons. **Tips:** set a \"href\" attribute to make the button a link.",
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",
5
6
  "props": [
6
7
  {
7
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,58 +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. Features accessible labeling, focus indicators, form integration with validation feedback, and additional content slots. Supports both single selections scenarios with proper event handling and state management.",
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",
5
6
  "props": [
6
7
  {
7
- "name": "invalid",
8
+ "name": "indeterminate",
8
9
  "type": "boolean | undefined",
9
10
  "required": false,
10
11
  "default": "false",
11
- "description": "Invalid state of the component\n\nNote: A checked checkbox cannot be invalid (the `checked` state takes priority over `invalid` state).",
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",
12
13
  "possibleValues": [
13
14
  "false",
14
15
  "true"
15
16
  ]
16
17
  },
17
18
  {
18
- "name": "required",
19
+ "name": "displayFocus",
19
20
  "type": "boolean | undefined",
20
21
  "required": false,
21
- "default": "false",
22
- "description": "",
22
+ "default": "true",
23
+ "description": "Internal purpose in order to prevent double focus mark on selectable-item",
23
24
  "possibleValues": [
24
25
  "false",
25
26
  "true"
26
27
  ]
27
28
  },
28
29
  {
29
- "name": "indeterminate",
30
- "type": "boolean | undefined",
30
+ "name": "label",
31
+ "type": "string | undefined",
31
32
  "required": false,
32
- "default": "false",
33
- "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",
34
34
  "possibleValues": [
35
- "false",
36
- "true"
35
+ "string"
37
36
  ]
38
37
  },
39
38
  {
40
- "name": "displayFocus",
39
+ "name": "checked",
41
40
  "type": "boolean | undefined",
42
41
  "required": false,
43
- "default": "true",
44
- "description": "Internal purpose in order to prevent double focus mark on selectable-item",
42
+ "default": "false",
43
+ "description": "Checked state of the component",
45
44
  "possibleValues": [
46
45
  "false",
47
46
  "true"
48
47
  ]
49
48
  },
50
49
  {
51
- "name": "checked",
50
+ "name": "invalid",
52
51
  "type": "boolean | undefined",
53
52
  "required": false,
54
53
  "default": "false",
55
- "description": "Checked state of the component",
54
+ "description": "Invalid state of the component\n\nNote: A checked checkbox cannot be invalid (the `checked` state takes priority over `invalid` state).",
56
55
  "possibleValues": [
57
56
  "false",
58
57
  "true"
@@ -80,16 +79,16 @@
80
79
  ]
81
80
  },
82
81
  {
83
- "name": "label",
82
+ "name": "id",
84
83
  "type": "string | undefined",
85
84
  "required": false,
86
- "description": "Use it to replace the default slot",
85
+ "description": "",
87
86
  "possibleValues": [
88
87
  "string"
89
88
  ]
90
89
  },
91
90
  {
92
- "name": "id",
91
+ "name": "name",
93
92
  "type": "string | undefined",
94
93
  "required": false,
95
94
  "description": "",
@@ -98,12 +97,14 @@
98
97
  ]
99
98
  },
100
99
  {
101
- "name": "name",
102
- "type": "string | undefined",
100
+ "name": "required",
101
+ "type": "boolean | undefined",
103
102
  "required": false,
103
+ "default": "false",
104
104
  "description": "",
105
105
  "possibleValues": [
106
- "string"
106
+ "false",
107
+ "true"
107
108
  ]
108
109
  }
109
110
  ],
@@ -145,6 +146,11 @@
145
146
  "type": "boolean",
146
147
  "isMethod": false
147
148
  },
149
+ {
150
+ "name": "disabled",
151
+ "type": "boolean",
152
+ "isMethod": false
153
+ },
148
154
  {
149
155
  "name": "indeterminate",
150
156
  "type": "boolean",
@@ -165,11 +171,6 @@
165
171
  "type": "string",
166
172
  "isMethod": false
167
173
  },
168
- {
169
- "name": "disabled",
170
- "type": "boolean",
171
- "isMethod": false
172
- },
173
174
  {
174
175
  "name": "label",
175
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
+ }
@@ -0,0 +1,221 @@
1
+ {
2
+ "name": "JoyCheckboxCard",
3
+ "displayName": "VJoyCheckboxCard",
4
+ "description": "",
5
+ "category": "Forms",
6
+ "props": [
7
+ {
8
+ "name": "subLabel",
9
+ "type": "string | undefined",
10
+ "required": false,
11
+ "default": "\"\"",
12
+ "description": "Secondary label displayed below the main label",
13
+ "possibleValues": [
14
+ "string"
15
+ ]
16
+ },
17
+ {
18
+ "name": "fitContent",
19
+ "type": "boolean | undefined",
20
+ "required": false,
21
+ "default": "false",
22
+ "description": "Whether the checkbox card should fit its content",
23
+ "possibleValues": [
24
+ "false",
25
+ "true"
26
+ ]
27
+ },
28
+ {
29
+ "name": "invalid",
30
+ "type": "boolean | undefined",
31
+ "required": false,
32
+ "default": "false",
33
+ "description": "Invalid state of the component\n\nNote: A checked checkbox cannot be invalid (the `checked` state takes priority over `invalid` state).",
34
+ "possibleValues": [
35
+ "false",
36
+ "true"
37
+ ]
38
+ },
39
+ {
40
+ "name": "label",
41
+ "type": "string | undefined",
42
+ "required": false,
43
+ "description": "Use it to replace the default slot",
44
+ "possibleValues": [
45
+ "string"
46
+ ]
47
+ },
48
+ {
49
+ "name": "required",
50
+ "type": "boolean | undefined",
51
+ "required": false,
52
+ "default": "false",
53
+ "description": "",
54
+ "possibleValues": [
55
+ "false",
56
+ "true"
57
+ ]
58
+ },
59
+ {
60
+ "name": "id",
61
+ "type": "string | undefined",
62
+ "required": false,
63
+ "description": "",
64
+ "possibleValues": [
65
+ "string"
66
+ ]
67
+ },
68
+ {
69
+ "name": "disabled",
70
+ "type": "boolean | undefined",
71
+ "required": false,
72
+ "default": "false",
73
+ "description": "Removes any interactivity if disabled",
74
+ "possibleValues": [
75
+ "false",
76
+ "true"
77
+ ]
78
+ },
79
+ {
80
+ "name": "indeterminate",
81
+ "type": "boolean | undefined",
82
+ "required": false,
83
+ "default": "false",
84
+ "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",
85
+ "possibleValues": [
86
+ "false",
87
+ "true"
88
+ ]
89
+ },
90
+ {
91
+ "name": "checked",
92
+ "type": "boolean | undefined",
93
+ "required": false,
94
+ "default": "false",
95
+ "description": "Checked state of the component",
96
+ "possibleValues": [
97
+ "false",
98
+ "true"
99
+ ]
100
+ },
101
+ {
102
+ "name": "value",
103
+ "type": "string | undefined",
104
+ "required": false,
105
+ "default": "\"on\"",
106
+ "description": "The value is used in multiselection context in order to build array of values.",
107
+ "possibleValues": [
108
+ "string"
109
+ ]
110
+ },
111
+ {
112
+ "name": "name",
113
+ "type": "string | undefined",
114
+ "required": false,
115
+ "description": "",
116
+ "possibleValues": [
117
+ "string"
118
+ ]
119
+ }
120
+ ],
121
+ "events": [
122
+ {
123
+ "name": "blur",
124
+ "description": "",
125
+ "signature": "(event: \"blur\"): void"
126
+ },
127
+ {
128
+ "name": "focus",
129
+ "description": "",
130
+ "signature": "(event: \"focus\"): void"
131
+ },
132
+ {
133
+ "name": "update:checked",
134
+ "description": "",
135
+ "signature": "(event: \"update:checked\", value: boolean): void"
136
+ }
137
+ ],
138
+ "slots": [
139
+ {
140
+ "name": "header-right",
141
+ "description": "Right aligned free slot, displayed next to the main label."
142
+ },
143
+ {
144
+ "name": "checkbox-card-content",
145
+ "description": "Free content slot, displayed below label and sublabel."
146
+ }
147
+ ],
148
+ "exposed": [
149
+ {
150
+ "name": "invalid",
151
+ "type": "boolean",
152
+ "isMethod": false
153
+ },
154
+ {
155
+ "name": "required",
156
+ "type": "boolean",
157
+ "isMethod": false
158
+ },
159
+ {
160
+ "name": "disabled",
161
+ "type": "boolean",
162
+ "isMethod": false
163
+ },
164
+ {
165
+ "name": "indeterminate",
166
+ "type": "boolean",
167
+ "isMethod": false
168
+ },
169
+ {
170
+ "name": "checked",
171
+ "type": "boolean",
172
+ "isMethod": false
173
+ },
174
+ {
175
+ "name": "value",
176
+ "type": "string",
177
+ "isMethod": false
178
+ },
179
+ {
180
+ "name": "subLabel",
181
+ "type": "string",
182
+ "isMethod": false
183
+ },
184
+ {
185
+ "name": "fitContent",
186
+ "type": "boolean",
187
+ "isMethod": false
188
+ },
189
+ {
190
+ "name": "label",
191
+ "type": "string | undefined",
192
+ "isMethod": false
193
+ },
194
+ {
195
+ "name": "id",
196
+ "type": "string | undefined",
197
+ "isMethod": false
198
+ },
199
+ {
200
+ "name": "name",
201
+ "type": "string | undefined",
202
+ "isMethod": false
203
+ },
204
+ {
205
+ "name": "onBlur",
206
+ "type": "(() => any) | undefined",
207
+ "isMethod": true
208
+ },
209
+ {
210
+ "name": "onFocus",
211
+ "type": "(() => any) | undefined",
212
+ "isMethod": true
213
+ },
214
+ {
215
+ "name": "onUpdate:checked",
216
+ "type": "((value: boolean) => any) | undefined",
217
+ "isMethod": true
218
+ }
219
+ ],
220
+ "hasVModel": true
221
+ }