@maltjoy/mcp-server 0.2.0 → 0.3.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 +34 -3
- package/dist/doc/VJoyAvailability/JoyAvailability.types.ts +1 -0
- package/dist/doc/VJoyAvatar/JoyAvatar.types.ts +6 -0
- package/dist/doc/VJoyAvatar/metadata.json +2 -1
- package/dist/doc/VJoyBadge/JoyBadge.types.ts +3 -0
- package/dist/doc/VJoyBadge/metadata.json +0 -14
- package/dist/doc/VJoyBadgeLevel/JoyBadgeLevel.types.ts +15 -0
- package/dist/doc/VJoyButton/JoyButton.types.ts +10 -0
- package/dist/doc/VJoyButton/metadata.json +1 -1
- package/dist/doc/VJoyCollapseItem/JoyCollapseItem.types.ts +8 -0
- package/dist/doc/VJoyCollapseItem/metadata.json +1 -1
- package/dist/doc/VJoyCompanyAvatar/JoyCompanyAvatar.types.ts +3 -0
- package/dist/doc/VJoyDialog/JoyDialog.types.ts +3 -0
- package/dist/doc/VJoyDot/VJoyDot.types.ts +1 -0
- package/dist/doc/VJoyDot/metadata.json +13 -14
- package/dist/doc/VJoyDrawer/JoyDrawer.types.ts +1 -0
- package/dist/doc/VJoyDropdown/JoyDropdown.types.ts +21 -0
- package/dist/doc/VJoyDropdownList/JoyDropdownList.types.ts +3 -0
- package/dist/doc/VJoyDropzone/metadata.json +11 -0
- package/dist/doc/VJoyFormError/metadata.json +16 -0
- package/dist/doc/VJoyFormGroup/metadata.json +14 -0
- package/dist/doc/VJoyFunnel/JoyFunnel.types.ts +5 -0
- package/dist/doc/VJoyHighlight/JoyHighlight.types.ts +4 -0
- package/dist/doc/VJoyHighlight/metadata.json +1 -1
- package/dist/doc/VJoyIcon/JoyIcon.types.ts +8 -0
- package/dist/doc/VJoyIcon/metadata.json +3 -3
- package/dist/doc/VJoyIndicators/JoyIndicators.types.ts +1 -0
- package/dist/doc/VJoyInput/JoyInput.types.ts +40 -0
- package/dist/doc/VJoyInput/metadata.json +5 -1
- package/dist/doc/VJoyInputDigit/JoyInputDigit.types.ts +14 -0
- package/dist/doc/VJoyInputDigit/metadata.json +154 -0
- package/dist/doc/VJoyInputPassword/metadata.json +257 -0
- package/dist/doc/VJoyLabel/JoyLabel.types.ts +4 -0
- package/dist/doc/VJoyLink/JoyLink.types.ts +2 -0
- package/dist/doc/VJoyLink/metadata.json +1 -1
- package/dist/doc/VJoyListItem/metadata.json +1 -1
- package/dist/doc/VJoyMenu/JoyMenu.types.ts +14 -0
- package/dist/doc/VJoyMenu/metadata.json +3 -0
- package/dist/doc/VJoyMenuItem/JoyMenuItem.types.ts +14 -0
- package/dist/doc/VJoyMenuItem/metadata.json +2 -2
- package/dist/doc/VJoyPanel/JoyPanel.types.ts +6 -0
- package/dist/doc/VJoyPasswordRequirement/JoyPasswordRequirement.types.ts +8 -0
- package/dist/doc/VJoyPasswordRequirement/metadata.json +39 -0
- package/dist/doc/VJoyProductTour/JoyProductTour.types.ts +45 -0
- package/dist/doc/VJoyProductTour/metadata.json +1 -1
- package/dist/doc/VJoyProgressBar/JoyProgressBar.types.ts +3 -0
- package/dist/doc/VJoyRadio/JoyRadio.types.ts +1 -0
- package/dist/doc/VJoyRadio/metadata.json +16 -0
- package/dist/doc/VJoyRadioGroup/JoyRadioGroup.types.ts +1 -0
- package/dist/doc/VJoyRadioGroup/metadata.json +16 -0
- package/dist/doc/VJoyRatingStars/JoyRatingStars.types.ts +3 -0
- package/dist/doc/VJoyScreenLoader/VJoyScreenLoader.types.ts +1 -0
- package/dist/doc/VJoySelect/JoySelect.types.ts +3 -0
- package/dist/doc/VJoySelectableItem/VJoySelectableItem.types.ts +10 -0
- package/dist/doc/VJoySelectableItem/metadata.json +1 -1
- package/dist/doc/VJoySeparator/JoySeparator.types.ts +4 -0
- package/dist/doc/VJoySnackbar/JoySnackbar.types.ts +23 -0
- package/dist/doc/VJoySpinner/JoySpinner.types.ts +1 -0
- package/dist/doc/VJoyStep/TJoyStep.types.ts +1 -0
- package/dist/doc/VJoyTag/JoyTag.types.ts +19 -0
- package/dist/doc/VJoyTag/metadata.json +1 -0
- package/dist/doc/VJoyTagsInput/JoyTagsInput.types.ts +4 -0
- package/dist/doc/VJoyTagsInput/metadata.json +1 -0
- package/dist/doc/VJoyTagsList/JoyTagsList.types.ts +5 -0
- package/dist/doc/VJoyTagsList/metadata.json +1 -0
- package/dist/doc/VJoyTemplate/JoyTemplate.types.ts +1 -0
- package/dist/doc/VJoyText/JoyText.types.ts +14 -0
- package/dist/doc/VJoyWalkthrough/metadata.json +1 -1
- package/dist/doc/VJoyWalkthroughTrigger/metadata.json +1 -1
- package/dist/doc/VJoyWrapper/JoyWrapper.types.ts +9 -0
- package/dist/doc/index.json +44 -12
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/tools/get-component-types.d.ts +31 -0
- package/dist/tools/get-component-types.d.ts.map +1 -0
- package/dist/tools/get-component-types.js +60 -0
- package/dist/tools/get-component-types.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ MCP (Model Context Protocol) server for the Joy Design System. This server expos
|
|
|
6
6
|
|
|
7
7
|
- 🔍 List all 74 available Joy Vue3 components
|
|
8
8
|
- 📚 Access component documentation (props, events, slots, exposed members)
|
|
9
|
+
- 🏷️ Retrieve TypeScript types definitions for component props (variants, sizes, etc.)
|
|
9
10
|
- 🎨 List 132 design tokens (colors, spacing, typography, etc.)
|
|
10
11
|
- 💅 List 272 CSS utility classes
|
|
11
12
|
- 🤖 AI-friendly interface through MCP protocol
|
|
@@ -109,7 +110,35 @@ Retrieves detailed information about a specific Joy Vue3 component including pro
|
|
|
109
110
|
}
|
|
110
111
|
```
|
|
111
112
|
|
|
112
|
-
### 3. `
|
|
113
|
+
### 3. `joy_get_component_types`
|
|
114
|
+
|
|
115
|
+
Retrieves the TypeScript types definition files associated with a specific Joy Vue3 component. These types define the allowed values for props (variants, sizes, etc.).
|
|
116
|
+
|
|
117
|
+
**Parameters:**
|
|
118
|
+
- `componentName` (string, required): The exact name of the component (e.g., "VJoyButton", "VJoyMenu")
|
|
119
|
+
|
|
120
|
+
**Returns:**
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"componentName": "VJoyButton",
|
|
124
|
+
"files": [
|
|
125
|
+
{
|
|
126
|
+
"filename": "JoyButton.types.ts",
|
|
127
|
+
"content": "import {TGenericVariants, TPositions, TSizes} from '../../types';\n\nexport type TJoyDefaultButtonVariants = TGenericVariants | 'main' | 'admin' | 'ghost';\nexport type TJoyButtonVariants = TJoyDefaultButtonVariants | ...;\nexport type TJoyButtonSizes = Exclude<TSizes, 'xlarge'>;\nexport type TJoyButtonIconPositions = TPositions;\n"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Error Response:**
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"error": "No types file found for component \"VJoyNonExistent\". Use joy_list_components to get a list of available components."
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 4. `joy_list_design_tokens`
|
|
141
|
+
|
|
113
142
|
|
|
114
143
|
Lists all available Joy design tokens (CSS custom properties) organized by domain.
|
|
115
144
|
|
|
@@ -129,7 +158,7 @@ Lists all available Joy design tokens (CSS custom properties) organized by domai
|
|
|
129
158
|
}
|
|
130
159
|
```
|
|
131
160
|
|
|
132
|
-
###
|
|
161
|
+
### 5. `joy_list_css_classes`
|
|
133
162
|
|
|
134
163
|
Lists all available Joy CSS utility classes organized by domain.
|
|
135
164
|
|
|
@@ -192,6 +221,7 @@ joy-mcp-server/
|
|
|
192
221
|
│ └── tools/
|
|
193
222
|
│ ├── list-components.ts # Component listing tool
|
|
194
223
|
│ ├── get-component-info.ts # Component info retrieval tool
|
|
224
|
+
│ ├── get-component-types.ts # Component types retrieval tool
|
|
195
225
|
│ ├── list-design-tokens.ts # Design tokens tool
|
|
196
226
|
│ └── list-css-classes.ts # CSS classes tool
|
|
197
227
|
├── dist/
|
|
@@ -200,7 +230,8 @@ joy-mcp-server/
|
|
|
200
230
|
│ ├── design-tokens.json # All design tokens
|
|
201
231
|
│ ├── css-classes.json # All CSS classes
|
|
202
232
|
│ └── VJoy*/ # Component directories
|
|
203
|
-
│
|
|
233
|
+
│ ├── metadata.json # Component metadata
|
|
234
|
+
│ └── *.types.ts # Component TypeScript types
|
|
204
235
|
├── package.json
|
|
205
236
|
├── tsconfig.json
|
|
206
237
|
├── README.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TJoyAvailabilityStatus = 'AVAILABLE' | 'AVAILABLE_AND_VERIFIED' | 'NOT_AVAILABLE_WITH_DATE' | 'AVAILABLE_SOON' | 'NOT_AVAILABLE';
|
|
@@ -40,15 +40,6 @@
|
|
|
40
40
|
"dark-blue",
|
|
41
41
|
"yellow"
|
|
42
42
|
]
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "number",
|
|
46
|
-
"type": "number | undefined",
|
|
47
|
-
"required": false,
|
|
48
|
-
"description": "",
|
|
49
|
-
"possibleValues": [
|
|
50
|
-
"number"
|
|
51
|
-
]
|
|
52
43
|
}
|
|
53
44
|
],
|
|
54
45
|
"events": [],
|
|
@@ -73,11 +64,6 @@
|
|
|
73
64
|
"name": "variant",
|
|
74
65
|
"type": "TJoyDotVariants",
|
|
75
66
|
"isMethod": false
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "number",
|
|
79
|
-
"type": "number | undefined",
|
|
80
|
-
"isMethod": false
|
|
81
67
|
}
|
|
82
68
|
],
|
|
83
69
|
"hasVModel": false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export enum JoyBadgeLevelEnum {
|
|
2
|
+
// Should be replaced by JoyBadgeLevelEnum.HIGH_POTENTIAL_AUTO OR JoyBadgeProgramEnum.HIGH_POTENTIAL
|
|
3
|
+
HIGH_POTENTIAL = 'highpotential',
|
|
4
|
+
HIGH_POTENTIAL_AUTO = 'high-potential-auto',
|
|
5
|
+
MALT_LINKER = 'maltlinker',
|
|
6
|
+
NEW = 'new',
|
|
7
|
+
SUPER_MALTER = 'supermalter',
|
|
8
|
+
VERIFIED = 'verified',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum JoyBadgeProgramEnum {
|
|
12
|
+
HIGH_POTENTIAL = 'program_high-potential',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type TJoyBadges = `${JoyBadgeLevelEnum | JoyBadgeProgramEnum}`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {TGenericVariants, TPositions, TSizes} from '../../types';
|
|
2
|
+
|
|
3
|
+
export type TJoyDefaultButtonVariants = TGenericVariants | 'main' | 'admin' | 'ghost';
|
|
4
|
+
export type TJoyAIButtonVariants = `${TJoyDefaultButtonVariants}-ai`;
|
|
5
|
+
|
|
6
|
+
export type TJoyButtonVariants = TJoyDefaultButtonVariants | Exclude<TJoyAIButtonVariants, 'admin-ai'>;
|
|
7
|
+
|
|
8
|
+
export type TJoyButtonSizes = Extract<TSizes, 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large'>;
|
|
9
|
+
|
|
10
|
+
export type TJoyButtonIconPositions = TPositions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import VJoyCollapseItem from './VJoyCollapseItem.vue';
|
|
2
|
+
|
|
3
|
+
export type TJoyCollapseItemProps = InstanceType<typeof VJoyCollapseItem>['$props'];
|
|
4
|
+
|
|
5
|
+
export type TJoyCollapseItems = TJoyCollapseItemProps[];
|
|
6
|
+
|
|
7
|
+
export const COLLAPSE_ITEM_MODES = ['outline', 'default'] as const;
|
|
8
|
+
export type TJoyCollapseItemModes = (typeof COLLAPSE_ITEM_MODES)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TJoyDotVariants = 'info' | 'gray' | 'green' | 'orange' | 'red' | 'teal' | 'pink' | 'dark-blue' | 'yellow';
|
|
@@ -2,12 +2,20 @@
|
|
|
2
2
|
"name": "JoyDot",
|
|
3
3
|
"displayName": "VJoyDot",
|
|
4
4
|
"props": [
|
|
5
|
+
{
|
|
6
|
+
"name": "number",
|
|
7
|
+
"type": "any",
|
|
8
|
+
"required": false,
|
|
9
|
+
"default": "undefined",
|
|
10
|
+
"description": "number: set a number or a string to display inside the dot, for badge-style dots with numbers.",
|
|
11
|
+
"possibleValues": null
|
|
12
|
+
},
|
|
5
13
|
{
|
|
6
14
|
"name": "variant",
|
|
7
15
|
"type": "TJoyDotVariants | undefined",
|
|
8
16
|
"required": false,
|
|
9
17
|
"default": "\"info\"",
|
|
10
|
-
"description": "",
|
|
18
|
+
"description": "variant: the color variant for the dot. You can use the TJoyDotVariants type.",
|
|
11
19
|
"possibleValues": [
|
|
12
20
|
"info",
|
|
13
21
|
"gray",
|
|
@@ -19,28 +27,19 @@
|
|
|
19
27
|
"dark-blue",
|
|
20
28
|
"yellow"
|
|
21
29
|
]
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "number",
|
|
25
|
-
"type": "number | undefined",
|
|
26
|
-
"required": false,
|
|
27
|
-
"description": "",
|
|
28
|
-
"possibleValues": [
|
|
29
|
-
"number"
|
|
30
|
-
]
|
|
31
30
|
}
|
|
32
31
|
],
|
|
33
32
|
"events": [],
|
|
34
33
|
"slots": [],
|
|
35
34
|
"exposed": [
|
|
36
35
|
{
|
|
37
|
-
"name": "
|
|
38
|
-
"type": "
|
|
36
|
+
"name": "number",
|
|
37
|
+
"type": "any",
|
|
39
38
|
"isMethod": false
|
|
40
39
|
},
|
|
41
40
|
{
|
|
42
|
-
"name": "
|
|
43
|
-
"type": "
|
|
41
|
+
"name": "variant",
|
|
42
|
+
"type": "TJoyDotVariants",
|
|
44
43
|
"isMethod": false
|
|
45
44
|
}
|
|
46
45
|
],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TJoyDrawerSizes = 'default' | 'large';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {TPositions} from '../../types';
|
|
2
|
+
|
|
3
|
+
export type TJoyDropdownDirections = 'up' | 'down';
|
|
4
|
+
|
|
5
|
+
export type TJoyDropdownJustify = TPositions;
|
|
6
|
+
|
|
7
|
+
export interface TJoyDropdownOption {
|
|
8
|
+
id: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
label: string;
|
|
11
|
+
href?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
[k: string]: any;
|
|
21
|
+
}
|
|
@@ -102,6 +102,17 @@
|
|
|
102
102
|
"possibleValues": [
|
|
103
103
|
"string"
|
|
104
104
|
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "canDelete",
|
|
108
|
+
"type": "boolean | undefined",
|
|
109
|
+
"required": false,
|
|
110
|
+
"default": "true",
|
|
111
|
+
"description": "Enable delete file button.",
|
|
112
|
+
"possibleValues": [
|
|
113
|
+
"false",
|
|
114
|
+
"true"
|
|
115
|
+
]
|
|
105
116
|
}
|
|
106
117
|
],
|
|
107
118
|
"events": [],
|
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
"true"
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"name": "noMargin",
|
|
18
|
+
"type": "boolean | undefined",
|
|
19
|
+
"required": false,
|
|
20
|
+
"default": "false",
|
|
21
|
+
"description": "Allows to remove any bottom margin on the component",
|
|
22
|
+
"possibleValues": [
|
|
23
|
+
"false",
|
|
24
|
+
"true"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
16
27
|
{
|
|
17
28
|
"name": "noHtmlErrorText",
|
|
18
29
|
"type": "string | undefined",
|
|
@@ -51,6 +62,11 @@
|
|
|
51
62
|
"type": "boolean",
|
|
52
63
|
"isMethod": false
|
|
53
64
|
},
|
|
65
|
+
{
|
|
66
|
+
"name": "noMargin",
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"isMethod": false
|
|
69
|
+
},
|
|
54
70
|
{
|
|
55
71
|
"name": "noHtmlErrorText",
|
|
56
72
|
"type": "string | undefined",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "JoyFormGroup",
|
|
3
|
+
"displayName": "VJoyFormGroup",
|
|
4
|
+
"props": [],
|
|
5
|
+
"events": [],
|
|
6
|
+
"slots": [
|
|
7
|
+
{
|
|
8
|
+
"name": "default",
|
|
9
|
+
"description": "Use it to render the content of the form group. Most of the time JoyLabel, any form component, and JoyFormError."
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"exposed": [],
|
|
13
|
+
"hasVModel": false
|
|
14
|
+
}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"type": "string",
|
|
55
55
|
"required": false,
|
|
56
56
|
"description": "Based on maltjoy/icons availabilities. Works in pair with displayIcon boolean prop.",
|
|
57
|
-
"possibleValues": "TJoyIconsNames (
|
|
57
|
+
"possibleValues": "TJoyIconsNames (220 values)"
|
|
58
58
|
}
|
|
59
59
|
],
|
|
60
60
|
"events": [],
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type {JoyIconsId} from '@maltjoy/icons';
|
|
2
|
+
import {TSizes, TLevels} from '../../types';
|
|
3
|
+
|
|
4
|
+
export type TJoyIconsColors = TLevels | 'neutral-50' | 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'brand-primary' | 'brand-secondary' | 'white';
|
|
5
|
+
|
|
6
|
+
export type TJoyIconSizes = Extract<TSizes, 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'>;
|
|
7
|
+
|
|
8
|
+
export type TJoyIconsNames = JoyIconsId;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"props": [
|
|
5
5
|
{
|
|
6
6
|
"name": "size",
|
|
7
|
-
"type": "
|
|
7
|
+
"type": "TJoyIconSizes | undefined",
|
|
8
8
|
"required": false,
|
|
9
9
|
"default": "\"xsmall\"",
|
|
10
10
|
"description": "Use `TJoyIconSizes`",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"key",
|
|
66
66
|
"user-photo",
|
|
67
67
|
"link",
|
|
68
|
-
"... (
|
|
68
|
+
"... (210 more)"
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
{
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"exposed": [
|
|
102
102
|
{
|
|
103
103
|
"name": "size",
|
|
104
|
-
"type": "
|
|
104
|
+
"type": "TJoyIconSizes",
|
|
105
105
|
"isMethod": false
|
|
106
106
|
},
|
|
107
107
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TJoyIndicatorsVariants = 'default' | 'light';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {TSizes} from '../../types';
|
|
2
|
+
import {TJoyIconsNames} from '../JoyIcon/JoyIcon.types';
|
|
3
|
+
import {TJoyLabelSizes} from '../JoyLabel/JoyLabel.types';
|
|
4
|
+
|
|
5
|
+
export type TJoyInputSizes = Extract<TSizes, 'small' | 'medium' | 'large'>;
|
|
6
|
+
|
|
7
|
+
export interface VJoyInputProps {
|
|
8
|
+
autofocus?: boolean;
|
|
9
|
+
modelValue?: string | number | null;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
id?: string;
|
|
12
|
+
invalid?: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
/** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Overrides the default label size. See JoyLabel stories */
|
|
18
|
+
labelSize?: TJoyLabelSizes;
|
|
19
|
+
/** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
|
|
20
|
+
optionalLabel?: string;
|
|
21
|
+
/** Depending on context, we can add a "*" after the label to specify it's mandatory. */
|
|
22
|
+
requiredMark?: boolean;
|
|
23
|
+
modelModifiers?: Partial<Record<'number' | 'trim' | 'lazy', boolean>>;
|
|
24
|
+
/** Display a cross icon on the right that enables to clear the field */
|
|
25
|
+
clearable?: boolean;
|
|
26
|
+
/** Add a JoyIcon / joy-icon with given name on left-side. */
|
|
27
|
+
icon?: TJoyIconsNames;
|
|
28
|
+
size?: TJoyInputSizes;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Password mode is deprecated on VJoyInput.
|
|
31
|
+
* Use VJoyInputPassword for password fields and toggle behavior.
|
|
32
|
+
*/
|
|
33
|
+
type?: string;
|
|
34
|
+
/** Adds a legend like symbol on the right of the component. Made for number based values */
|
|
35
|
+
unit?: string;
|
|
36
|
+
/** Activates the readonly mode for the input */
|
|
37
|
+
readonly?: boolean;
|
|
38
|
+
/** When using the clearable property, you have to specific an aria-label for accessibility. */
|
|
39
|
+
clearAriaLabel?: string;
|
|
40
|
+
}
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"type": "string",
|
|
141
141
|
"required": false,
|
|
142
142
|
"description": "Add a JoyIcon / joy-icon with given name on left-side.",
|
|
143
|
-
"possibleValues": "TJoyIconsNames (
|
|
143
|
+
"possibleValues": "TJoyIconsNames (220 values)"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"name": "size",
|
|
@@ -204,6 +204,10 @@
|
|
|
204
204
|
{
|
|
205
205
|
"name": "default",
|
|
206
206
|
"description": "DEPRECATED. Default slot to display a label on top of the element. You can use label property as well"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "right-action",
|
|
210
|
+
"description": "Slot used to inject a custom action on the right side of the input wrapper."
|
|
207
211
|
}
|
|
208
212
|
],
|
|
209
213
|
"exposed": [
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface VJoyInputDigitProps {
|
|
2
|
+
/** Joined value of all input slots. */
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
/** Number of displayed input slots. */
|
|
5
|
+
length?: number;
|
|
6
|
+
/** Applies invalid visual state on every slot. */
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
/** Disables all input slots. */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Name prefix used for each generated input. */
|
|
11
|
+
name?: string;
|
|
12
|
+
/** Base aria-label used for each input, indexed automatically (e.g. "Digit 1 of 6"). */
|
|
13
|
+
inputAriaLabel?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "JoyInputDigit",
|
|
3
|
+
"displayName": "VJoyInputDigit",
|
|
4
|
+
"props": [
|
|
5
|
+
{
|
|
6
|
+
"name": "modelValue",
|
|
7
|
+
"type": "string | undefined",
|
|
8
|
+
"required": false,
|
|
9
|
+
"default": "\"\"",
|
|
10
|
+
"description": "Joined value of all input slots.",
|
|
11
|
+
"possibleValues": [
|
|
12
|
+
"string"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "length",
|
|
17
|
+
"type": "number | undefined",
|
|
18
|
+
"required": false,
|
|
19
|
+
"default": "6",
|
|
20
|
+
"description": "Number of displayed input slots.",
|
|
21
|
+
"possibleValues": [
|
|
22
|
+
"number"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "invalid",
|
|
27
|
+
"type": "boolean | undefined",
|
|
28
|
+
"required": false,
|
|
29
|
+
"default": "false",
|
|
30
|
+
"description": "Applies invalid visual state on every slot.",
|
|
31
|
+
"possibleValues": [
|
|
32
|
+
"false",
|
|
33
|
+
"true"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "disabled",
|
|
38
|
+
"type": "boolean | undefined",
|
|
39
|
+
"required": false,
|
|
40
|
+
"default": "false",
|
|
41
|
+
"description": "Disables all input slots.",
|
|
42
|
+
"possibleValues": [
|
|
43
|
+
"false",
|
|
44
|
+
"true"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "name",
|
|
49
|
+
"type": "string | undefined",
|
|
50
|
+
"required": false,
|
|
51
|
+
"default": "\"joy-input-digit\"",
|
|
52
|
+
"description": "Name prefix used for each generated input.",
|
|
53
|
+
"possibleValues": [
|
|
54
|
+
"string"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "inputAriaLabel",
|
|
59
|
+
"type": "string | undefined",
|
|
60
|
+
"required": false,
|
|
61
|
+
"default": "\"Digit\"",
|
|
62
|
+
"description": "Base aria-label used for each input, indexed automatically (e.g. \"Digit 1 of 6\").",
|
|
63
|
+
"possibleValues": [
|
|
64
|
+
"string"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"events": [
|
|
69
|
+
{
|
|
70
|
+
"name": "blur",
|
|
71
|
+
"description": "",
|
|
72
|
+
"signature": "(event: \"blur\", event: FocusEvent): void"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "change",
|
|
76
|
+
"description": "",
|
|
77
|
+
"signature": "(event: \"change\", value: string, event: Event): void"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "focus",
|
|
81
|
+
"description": "",
|
|
82
|
+
"signature": "(event: \"focus\", event: FocusEvent): void"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "update:modelValue",
|
|
86
|
+
"description": "",
|
|
87
|
+
"signature": "(event: \"update:modelValue\", value: string): void"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"slots": [],
|
|
91
|
+
"exposed": [
|
|
92
|
+
{
|
|
93
|
+
"name": "invalid",
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"isMethod": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "length",
|
|
99
|
+
"type": "number",
|
|
100
|
+
"isMethod": false
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "disabled",
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"isMethod": false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "name",
|
|
109
|
+
"type": "string",
|
|
110
|
+
"isMethod": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "modelValue",
|
|
114
|
+
"type": "string",
|
|
115
|
+
"isMethod": false
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "inputAriaLabel",
|
|
119
|
+
"type": "string",
|
|
120
|
+
"isMethod": false
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "onBlur",
|
|
124
|
+
"type": "((event: FocusEvent) => any) | undefined",
|
|
125
|
+
"isMethod": true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "onFocus",
|
|
129
|
+
"type": "((event: FocusEvent) => any) | undefined",
|
|
130
|
+
"isMethod": true
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "onUpdate:modelValue",
|
|
134
|
+
"type": "((value: string) => any) | undefined",
|
|
135
|
+
"isMethod": true
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "onChange",
|
|
139
|
+
"type": "((value: string, event: Event) => any) | undefined",
|
|
140
|
+
"isMethod": true
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "focusInput",
|
|
144
|
+
"type": "(index: number) => void",
|
|
145
|
+
"isMethod": true
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "tokens",
|
|
149
|
+
"type": "string[]",
|
|
150
|
+
"isMethod": false
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"hasVModel": true
|
|
154
|
+
}
|