-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathweb-types.json
282 lines (282 loc) · 11.2 KB
/
web-types.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
{
"framework": "vue",
"name": "@singularit/multiselect",
"version": "0.0.0",
"contributions": {
"html": {
"description-markup": "markdown",
"types-syntax": "typescript",
"tags": [
{
"name": "SMultiselect",
"description": "",
"attributes": [
{
"name": "multiple",
"required": false,
"description": "Allows selecting multiple options. If true, the model value will be an array of selected values,\notherwise it is a single value.",
"value": {
"kind": "expression",
"type": "boolean"
},
"default": "false"
},
{
"name": "modelValue",
"required": false,
"description": "Is the value, that's used externally.",
"value": {
"kind": "expression",
"type": "unknown"
},
"default": "(props: {multiple: boolean}) => props.multiple ? [] as unknown[] : undefined as unknown"
},
{
"name": "selectOptions",
"required": false,
"description": "Array of options that can be selected.\nAn Option should look like this:\n<pre><code>\n {value: \\<any>, label: \\<String>, ...}.\n</code></pre>",
"value": {
"kind": "expression",
"type": "Array<Option | unknown>"
},
"default": "() => ([])"
},
{
"name": "optionValue",
"required": false,
"description": "Function that determines which attribute of the option object should be used as value.\nThe passed parameters are an option and an array of all selected options.\nBy default, it returns the value attribute of the passed option.",
"value": {
"kind": "expression",
"type": "(option: Option | unknown) => unknown"
},
"default": "(option: Option | unknown) => {\r\n if (option)\r\n return (option as Option).value\r\n else\r\n return null\r\n}"
},
{
"name": "noOptionsText",
"required": false,
"description": "Text that is displayed if no options are given.",
"value": {
"kind": "expression",
"type": "string"
},
"default": "'The list is empty.'"
},
{
"name": "placeholder",
"required": false,
"description": "The placeholder string will be displayed if no option is selected.",
"value": {
"kind": "expression",
"type": "string"
},
"default": "''"
},
{
"name": "optionLabel",
"required": false,
"description": "Function that determines which attribute of the option object should be displayed as label.\nThe passed parameters are an option and an array of all selected options.\nBy default, it returns the label attribute of the passed option.",
"value": {
"kind": "expression",
"type": "(option: Option | unknown, selectedOptions?: Array<Option | unknown>) => string"
},
"default": "(option: Option | unknown) => {\r\n if (option)\r\n return (option as Option).label\r\n else\r\n return ''\r\n}"
},
{
"name": "optionDisabled",
"required": false,
"description": "Function which determines if an option is disabled.\nThe passed parameters are an option and an array of all selected options.\nBy default, it returns the disabled attribute of the passed option.",
"value": {
"kind": "expression",
"type": "(option: Option | unknown, selectedOptions?: Array<Option | unknown>) => boolean"
},
"default": "(option: Option | unknown) => {\r\n return (option as Option).disabled\r\n}"
},
{
"name": "displaySelectedValues",
"required": false,
"description": "Alters the displayed label if multiple selection mode is active.\nCan be a string or a function returning a string.\nThe passed parameter of the function is an array of the selected options.\nBy default, it displays the amount of selected options",
"value": {
"kind": "expression",
"type": "((options: Array<Option | unknown>) => string) | string"
},
"default": "undefined"
},
{
"name": "clearable",
"required": false,
"description": "Allows clearing all selected options",
"value": {
"kind": "expression",
"type": "boolean"
},
"default": "true"
},
{
"name": "disabled",
"required": false,
"description": "Disables the component. Values can still be pushed into model value externally.",
"value": {
"kind": "expression",
"type": "boolean"
},
"default": "false"
},
{
"name": "selectProps",
"required": false,
"description": "Allows passing HTML select attributes to the hidden select element.",
"value": {
"kind": "expression",
"type": "SelectHTMLAttributes"
},
"default": "undefined"
},
{
"name": "searchable",
"required": false,
"description": "Allows searching options.",
"value": {
"kind": "expression",
"type": "boolean"
},
"default": "false"
},
{
"name": "searchProps",
"required": false,
"description": "Allows passing HTML input attributes to the search input element.",
"value": {
"kind": "expression",
"type": "InputHTMLAttributes"
},
"default": "undefined"
},
{
"name": "optionSearchValue",
"required": false,
"description": "Determines which value of the option Object is searched.\nIt is a function which returns the value of an option that is tracked by the search input.\nThe passed parameters are an option and an array of all selected options.\nBy default, it returns the label of the passed option.",
"value": {
"kind": "expression",
"type": "(option: Option | unknown) => string"
},
"default": "(option: Option | unknown) => {\r\n if (option)\r\n return (option as Option).label\r\n else\r\n return null\r\n}"
},
{
"name": "noResultsText",
"required": false,
"description": "Text that is displayed if there are no search results.",
"value": {
"kind": "expression",
"type": "string"
},
"default": "'No results found.'"
},
{
"name": "closeOnSelect",
"required": false,
"description": "The selection dropdown will be automatically closed after selecting/deselecting an option if this prop is set to true.",
"value": {
"kind": "expression",
"type": "boolean"
},
"default": "false"
},
{
"name": "classes",
"required": false,
"description": "Used to style the component via tailwind classes. To alter only a few tings like color or size of single elements,\nimport baseStyle from 'src/utils/defaultTheme' and use it like this:\n<pre><code>\n:classes={\n container: [baseStyle.container, 'bg-gray-100'],\n option: [baseStyle.option, 'bg-white text-black h-5'],\n ...\n}\n</code></pre>\nTailwind classes won't overwrite the basic style though, so already existing styles\nin the baseStyle can't be changed with this method.\nTo completely restyle the elements you can just ignore the baseStyle.\nThe following classes can be used:\n<pre><code>\n container,\n containerDisabled,\n containerOpen,\n containerActive,\n label,\n search,\n placeholder,\n clear,\n clearIcon,\n dropdown,\n dropdownHidden,\n options,\n option,\n optionSelected,\n optionNotShown,\n spacer\n</code></pre>",
"value": {
"kind": "expression",
"type": "Classes"
},
"default": "() => ({})"
},
{
"name": "infinite",
"required": false,
"description": "When set to true, `loadMore` will be emitted if you scroll to the bottom of the option dropdown.",
"value": {
"kind": "expression",
"type": "boolean"
},
"default": "false"
},
{
"name": "maxOptions",
"required": false,
"description": "Is the maximum amount of options for infinite scrolling. If it is reached `loadMore` won't be emitted when scrolling\nto the bottom of the dropdown while `infinite` is true.",
"value": {
"kind": "expression",
"type": "number"
},
"default": "1000"
},
{
"name": "loadingOptions",
"required": false,
"description": "Whether the options are loading. Displays a loading spinner in the dropdown if set to true.",
"value": {
"kind": "expression",
"type": "boolean"
},
"default": "false"
}
],
"events": [
{
"name": "open"
},
{
"name": "close"
},
{
"name": "select"
},
{
"name": "deselect"
},
{
"name": "search-change"
},
{
"name": "update:modelValue"
},
{
"name": "clear"
},
{
"name": "loadMore"
}
],
"slots": [
{
"name": "placeholder"
},
{
"name": "value-display"
},
{
"name": "option-label"
},
{
"name": "loading-options"
},
{
"name": "no-options"
},
{
"name": "no-results"
},
{
"name": "clear"
}
],
"source": {
"module": "./src/Multiselect.vue",
"symbol": "default"
}
}
]
}
}
}