vue3-extended-multiselect 2.3.10 → 3.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 CHANGED
@@ -1,201 +1,242 @@
1
- # vue3-extended-multiselect v2.3.10
1
+ # vue3-extended-multiselect v3.0.0
2
2
 
3
- ***
3
+ ---
4
4
 
5
5
  ### Brief annotation
6
6
 
7
- Vue3 extended multiselect is a component that was created for simplification of custom settings of built-in select element. This component allows developer to escape writing many excess css-rules by using built-in themes and to escape problems with different kinds of provided options. Various decoration of options list by some extra slots will help developer to make it more informative and obvious. More thorough filtering of raw options list given by developer excludes sudden errors if kind of option is not intended for extended multiselect. Switchable useful warnings will help to catch possible errors that may occur while working with options. Tools for working with selected options will allow user to control amount of displayed options and quickly deselect them. Such tools also can be customized by developer. Various slots can help developer to customize to his liking options list, elements with selected options in multiple select or some other interaction elements. You can use this component in your web-applications based on Vue 3 framework.
7
+ **vue3-extended-multiselect** is a component designed to simplify the custom configuration of the built-in select element. By leveraging its built-in themes, this component allows developers to avoid writing extensive CSS rules. It also eliminates common issues associated with handling different types of option data.
8
+
9
+ The component enhances the options list with various decorative slots, enabling developers to create a more informative and intuitive interface. Furthermore, it performs thorough filtering on the raw options list provided by the developer, preventing unexpected errors from unintended option formats. Switchable, helpful warnings assist in identifying potential errors during development.
10
+
11
+ For user convenience, the component includes tools to manage selected options, controlling the number displayed and allowing for quick deselection. Developers can also customize these tools to fit their specific needs. With various slots available, developers can freely customize the options list, the selected tags in multiple-select mode, and other interactive elements.
12
+
13
+ You can integrate this component into your web applications built with the Vue 3 framework.\*\*
8
14
 
9
15
  ### Page with live examples
16
+
10
17
  https://vue3-extended-multiselect.surge.sh/
11
18
 
12
19
  ### Installation with npm
13
20
 
14
- ``npm install --save vue3-extended-multiselect``
21
+ ```bash
22
+ npm install vue3-extended-multiselect
23
+ ```
15
24
 
16
25
  ### Installation with yarn
17
26
 
18
- ``yarn add vue3-extended-multiselect``
27
+ ```bash
28
+ yarn add vue3-extended-multiselect
29
+ ```
30
+
31
+ ### Installation with pnpm
32
+
33
+ ```bash
34
+ pnpm add vue3-extended-multiselect
35
+ ```
19
36
 
20
37
  ### Importing
21
38
 
22
39
  ```js
23
- import Vue3ExtendedMultiselect from "vue3-extended-multiselect"
40
+ import Vue3ExtendedMultiselect from "vue3-extended-multiselect";
24
41
  ```
25
42
 
26
43
  ### Importing types
27
44
 
28
45
  ```js
29
- import { UnionOptionType } from "vue3-extended-multiselect/types"
46
+ import type { UnionOptionType } from "vue3-extended-multiselect";
47
+ ```
48
+
49
+ ### Usage with UMD
50
+
51
+ _Somewhere in your markup..._
52
+
53
+ ```html
54
+ <script src="./public/scripts/vue3-extended-multiselect/index.umd.js"></script>
55
+ ```
56
+
57
+ _Somewhere in your script below..._
58
+
59
+ ```js
60
+ const YourComponent = defineComponent({
61
+ name: "YourComponent",
62
+ components: {
63
+ Vue3ExtendedMultiselect: window.Vue3ExtendedMultiselect,
64
+ },
65
+ });
30
66
  ```
31
67
 
32
68
  ## Table of contents
33
- * [Props list](#props-list)
34
- * [Slots list](#slots-list)
35
- * [Events list](#events-list)
36
- * [Styling with css](#styling-with-css)
37
- * [Styling with props](#styling-with-props)
38
- * [License](#license)
69
+
70
+ - [Props list](#props-list)
71
+ - [Slots list](#slots-list)
72
+ - [Events list](#events-list)
73
+ - [Styling with css](#styling-with-css)
74
+ - [Styling with props](#styling-with-props)
75
+ - [License](#license)
39
76
 
40
77
  ## Props list
41
- Prop name | Prop type | Prop appointment | Prop default value | Prop values
42
- ----------|-----------|------------------|--------------------|------------
43
- **autoSelect<br/>CreatedOption**|Boolean|Determines whether to select just now created option automatically.|false|&mdash;|
44
- **autoSelect<br/>SearchValue**|Boolean|Determines whether to take search value from current selected option if "multiple" prop equals false.|false|&mdash;|
45
- **clearBySelect<br/>WhenMultiple**|Boolean|Determines whether to clear search field by option selection.|false|&mdash;|
46
- **createOnThe<br/>Go**|Boolean|Allows user to create new options from search field.|false|&mdash;|
47
- **default<br/>Expanded**|Boolean|Determines whether options list should be expanded by default.|false|&mdash;|
48
- **disabled**|Boolean|Disables extended multiselect.|false|&mdash;|
49
- **dropdownDisabled**|Boolean|Disables dropdown toggle.|false|&mdash;|
50
- **highlight<br/>Options**|Boolean|Switches options highlighting while hovering.|true|&mdash;|
51
- **loading**|Boolean|Switches loading state of extended multiselect.|false|&mdash;|
52
- **multiple**|Boolean|Allows user to select multiple options.|false|&mdash;|
53
- **noResults<br/>BlockShown**|Boolean|Determines whether to show special hint if no options were found.|true|&mdash;|
54
- **resetSearch<br/>ByValue**|Boolean|Determines whether to clear search field by selection/deselection of options.|true|&mdash;|
55
- **searchFilter<br/>Active**|Boolean|Allows user to use internal search for options.|true|&mdash;|
56
- **simpleEvents**|Boolean|Switches full payload of extended multiselect events.|true|&mdash;|
57
- **selected<br/>Options<br/>Shown**|Boolean|Determines whether to show selected options in options list.|false|&mdash;|
58
- **showClearIcon**|Boolean|Allows user to deselect all options by special icon.|false|&mdash;|
59
- **showDeselect<br/>IconLoader**|Boolean|Determines whether to show loader icon in multiple options block if "loading" prop equals true|true|&mdash;|
60
- **showInsert<br/>Warnings**|Boolean|Determines whether to show useful internal warnings in console.|false|&mdash;|
61
- **showMarker**|Boolean|Determines whether to show slot with special marker beside option in options list.|false|&mdash;|
62
- **showSearch<br/>Field**|Boolean|Determines whether to show search field which allows user to search for options with internal search.|true|&mdash;|
63
- **toggleMultiple<br/>BlocksLimit**|Boolean|Allows user to increase limit of shown elements with selected options by special icon.|false|&mdash;|
64
- **toggleOptions<br/>BySelect**|Boolean|Determines whether to roll up options list by selection of option.|true|&mdash;|
65
- **togglingSaves<br/>SearchValue**|Boolean|Determines whether to save current search value if display of options list was toggled.|true|&mdash;|
66
- **wrongCurrent<br/>Value**|Boolean|Determines whether to define special class for extended multiselect if value is wrong or if irregularity of value is defined by user.|false|&mdash;|
67
- **createOption<br/>Placeholder**|String|Placeholder for the search field to be used if user is allowed to create new options.|"Select or create features"|&mdash;|
68
- **createOption<br/>Type**|String|Defines kind for all options which will be created by user.|"primitive"| "primitive", "array", "object"|
69
- **disableByField**|String|Determines a field in options of type "object" which value will be used to disable such options.|"disabled"|&mdash;|
70
- **emptyObjects<br/>Placeholder**|String|Placeholder for options of type "object" or Array instances which length/keys length equals 0.|"Empty Object/<br/>Array"|&mdash;|
71
- **errorBorder<br/>Color**|String|Defines "border-color" css-property for extended multiselect with wrong value.|"#FF0000"|&mdash;|
72
- **iconFilter**|String|Defines svg-filter with color settings for all icons except loader.|"basic"|"basic", "black", "green"|
73
- **iconSize**|String|Defines sizes for all icons in pixels except loader.|"large"|"large", "medium", "small"|
74
- **label**|String|Defines field in options of type "object" that will be the label of option.|"label"|&mdash;|
75
- **loaderIcon<br/>Filter**|String|Defines svg-filter with color settings for loader icon.|"loader-default"|"loader-default", "basic", "slate-grey", "slate-blue", "teal",<br/> "strict"|
76
- **placeholder**|String|Placeholder for search field to be used if user is not allowed to create new options.|"Select features"|&mdash;|
77
- **searchByField**|String|Determines field in options of type "object" to use in internal search.|""|&mdash;|
78
- **themeType**|String|Defines overall color theme for extended multiselect.|"basic"|"basic", "slate-grey", "slate-blue", "teal",<br/> "strict"|
79
- **toggle<br/>Appearance<br/>Side**|String|Defines which side options list will be displayed on.|"auto"|"auto", "atop", "under"|
80
- **toggleIcon**|String|Defines kind of toggle icon from icons collection.|"base-arrow"|"base-arrow", "double-arrow", "wide-arrow", "circle-arrow", "inner-arrow", "triangle-arrow", "triangle-circle-arrow"|
81
- **anyOption<br/>Wrapper<br/>BlockHeight**|Number|Defines "height" css-property for each option in options list.|30|&mdash;|
82
- **increase<br/>Display<br/>By**|Number|Defines gap which increases limit of displayed elements with selected options.|5|&mdash;|
83
- **maxOptions<br/>Count**|Number|Maximal limit of selected options.|null|&mdash;|
84
- **minOptions<br/>Count**|Number|Minimal limit of selected options.|null|&mdash;|
85
- **multipleBlocks<br/>Limit**|Number|Defines limit of displayed elements with selected options.|null|&mdash;|
86
- **optionsCount<br/>Restriction**|Number|Defines maximal limit of options list length.|null|&mdash;|
87
- **toggleMax<br/>Height**|Number|Defines maximal value in pixels of "max-height" css-property for options list.|400|&mdash;|
88
- **toggleMin<br/>Height**|Number|Defines minimal value in pixels of "max-height" css-property for options list.|null|&mdash;|
89
- **createOption<br/>Fields**|Array|Defines a list of fields for options of type "object" created by user.|["label"]|&mdash;|
90
- **disabled<br/>Primitive<br/>Options**|Array|Defines a list of primitive options which will be disabled for selection.|[]|&mdash;|
91
- **options**|Array|Raw options list.|[]|&mdash;|
92
- **optionsPadding**|Array|Defines a list with "padding-top", "padding-left", "padding-bottom" and "padding-right" css-properties for options in options list. Property "padding-top" matches index zero. Property "padding-right" matches index three.|[]|&mdash;|
93
- **preselected<br/>Options**|Array|Defines a list of options that will be select by default.|[]|&mdash;|
94
- **specialKeys<br/>Block**|Array|Defines a list of keys which in combination with mouse buttons or "enter" key will prevent selection of option.|[]|"alt",<br/> "ctrl",<br/> "shift"|
95
- **createCustom<br/>OptionLabel**|Function|Defines function that creates custom label for each option.|(option) => null|&mdash;|
96
- **multipleBlocks<br/>LimitMessage**|Function|Defines function that creates notification when maximal limit of selected options has been reached.|(number) => \`and ${number} more items\`|&mdash;|
97
- **inputId**|String, Number|"id" attribute of search field.|null|&mdash;|
98
- **preselected<br/>Option**|UnionPropType (from types)|Defines options that will be select by default.|null|&mdash;|
99
- **value**|Array|Defines value of extended multiselect that can be used in "v-model".|[]|&mdash;|
78
+
79
+ | Prop name | Prop type | Prop appointment | Prop default value | Prop values |
80
+ | ----------------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
81
+ | **autoSelect<br/>CreatedOption** | Boolean | Determines whether to select just now created option automatically. | false | &mdash; |
82
+ | **autoSelect<br/>SearchValue** | Boolean | Determines whether to take search value from current selected option if "multiple" prop equals false. | false | &mdash; |
83
+ | **clearBySelect<br/>WhenMultiple** | Boolean | Determines whether to clear search field by option selection. | false | &mdash; |
84
+ | **createOnThe<br/>Go** | Boolean | Allows user to create new options from search field. | false | &mdash; |
85
+ | **default<br/>Expanded** | Boolean | Determines whether options list should be expanded by default. | false | &mdash; |
86
+ | **disabled** | Boolean | Disables extended multiselect. | false | &mdash; |
87
+ | **dropdownDisabled** | Boolean | Disables dropdown toggle. | false | &mdash; |
88
+ | **highlight<br/>Options** | Boolean | Switches options highlighting while hovering. | true | &mdash; |
89
+ | **loading** | Boolean | Switches loading state of extended multiselect. | false | &mdash; |
90
+ | **multiple** | Boolean | Allows user to select multiple options. | false | &mdash; |
91
+ | **noResults<br/>BlockShown** | Boolean | Determines whether to show special hint if no options were found. | true | &mdash; |
92
+ | **resetSearch<br/>ByValue** | Boolean | Determines whether to clear search field by selection/deselection of options. | true | &mdash; |
93
+ | **searchFilter<br/>Active** | Boolean | Allows user to use internal search for options. | true | &mdash; |
94
+ | **simpleEvents** | Boolean | Switches full payload of extended multiselect events. | true | &mdash; |
95
+ | **selected<br/>Options<br/>Shown** | Boolean | Determines whether to show selected options in options list. | false | &mdash; |
96
+ | **showClearIcon** | Boolean | Allows user to deselect all options by special icon. | false | &mdash; |
97
+ | **showDeselect<br/>IconLoader** | Boolean | Determines whether to show loader icon in multiple options block if "loading" prop equals true | true | &mdash; |
98
+ | **showInsert<br/>Warnings** | Boolean | Determines whether to show useful internal warnings in console. | false | &mdash; |
99
+ | **showMarker** | Boolean | Determines whether to show slot with special marker beside option in options list. | false | &mdash; |
100
+ | **showSearch<br/>Field** | Boolean | Determines whether to show search field which allows user to search for options with internal search. | true | &mdash; |
101
+ | **toggleMultiple<br/>BlocksLimit** | Boolean | Allows user to increase limit of shown elements with selected options by special icon. | false | &mdash; |
102
+ | **toggleOptions<br/>BySelect** | Boolean | Determines whether to roll up options list by selection of option. | true | &mdash; |
103
+ | **togglingSaves<br/>SearchValue** | Boolean | Determines whether to save current search value if display of options list was toggled. | true | &mdash; |
104
+ | **wrongCurrent<br/>Value** | Boolean | Determines whether to define special class for extended multiselect if value is wrong or if irregularity of value is defined by user. | false | &mdash; |
105
+ | **createOption<br/>Placeholder** | String | Placeholder for the search field to be used if user is allowed to create new options. | "Select or create features" | &mdash; |
106
+ | **createOption<br/>Type** | String | Defines kind for all options which will be created by user. | "primitive" | "primitive", "array", "object" |
107
+ | **disableByField** | String | Determines a field in options of type "object" which value will be used to disable such options. | "disabled" | &mdash; |
108
+ | **emptyObjects<br/>Placeholder** | String | Placeholder for options of type "object" or Array instances which length/keys length equals 0. | "Empty Object/<br/>Array" | &mdash; |
109
+ | **errorBorder<br/>Color** | String | Defines "border-color" css-property for extended multiselect with wrong value. | "#FF0000" | &mdash; |
110
+ | **iconFilter** | String | Defines svg-filter with color settings for all icons except loader. | "basic" | "basic", "black", "green" |
111
+ | **iconSize** | String | Defines sizes for all icons in pixels except loader. | "large" | "large", "medium", "small" |
112
+ | **label** | String | Defines field in options of type "object" that will be the label of option. | "label" | &mdash; |
113
+ | **loaderIcon<br/>Filter** | String | Defines svg-filter with color settings for loader icon. | "loader-default" | "loader-default", "basic", "slate-grey", "slate-blue", "teal",<br/> "strict" |
114
+ | **placeholder** | String | Placeholder for search field to be used if user is not allowed to create new options. | "Select features" | &mdash; |
115
+ | **searchByField** | String | Determines field in options of type "object" to use in internal search. | "" | &mdash; |
116
+ | **themeType** | String | Defines overall color theme for extended multiselect. | "basic" | "basic", "slate-grey", "slate-blue", "teal",<br/> "strict" |
117
+ | **toggle<br/>Appearance<br/>Side** | String | Defines which side options list will be displayed on. | "auto" | "auto", "atop", "under" |
118
+ | **toggleIcon** | String | Defines kind of toggle icon from icons collection. | "base-arrow" | "base-arrow", "double-arrow", "wide-arrow", "circle-arrow", "inner-arrow", "triangle-arrow", "triangle-circle-arrow" |
119
+ | **anyOption<br/>Wrapper<br/>BlockHeight** | Number | Defines "height" css-property for each option in options list. | 30 | &mdash; |
120
+ | **increase<br/>Display<br/>By** | Number | Defines gap which increases limit of displayed elements with selected options. | 5 | &mdash; |
121
+ | **maxOptions<br/>Count** | Number | Maximal limit of selected options. | null | &mdash; |
122
+ | **minOptions<br/>Count** | Number | Minimal limit of selected options. | null | &mdash; |
123
+ | **multipleBlocks<br/>Limit** | Number | Defines limit of displayed elements with selected options. | null | &mdash; |
124
+ | **optionsCount<br/>Restriction** | Number | Defines maximal limit of options list length. | null | &mdash; |
125
+ | **toggleMax<br/>Height** | Number | Defines maximal value in pixels of "max-height" css-property for options list. | 400 | &mdash; |
126
+ | **toggleMin<br/>Height** | Number | Defines minimal value in pixels of "max-height" css-property for options list. | null | &mdash; |
127
+ | **createOption<br/>Fields** | Array | Defines a list of fields for options of type "object" created by user. | ["label"] | &mdash; |
128
+ | **disabled<br/>Primitive<br/>Options** | Array | Defines a list of primitive options which will be disabled for selection. | [] | &mdash; |
129
+ | **options** | Array | Raw options list. | [] | &mdash; |
130
+ | **optionsPadding** | Array | Defines a list with "padding-top", "padding-left", "padding-bottom" and "padding-right" css-properties for options in options list. Property "padding-top" matches index zero. Property "padding-right" matches index three. | [] | &mdash; |
131
+ | **preselected<br/>Options** | Array | Defines a list of options that will be select by default. | [] | &mdash; |
132
+ | **specialKeys<br/>Block** | Array | Defines a list of keys which in combination with mouse buttons or "enter" key will prevent selection of option. | [] | "alt",<br/> "ctrl",<br/> "shift" |
133
+ | **createCustom<br/>OptionLabel** | Function | Defines function that creates custom label for each option. | (option) => null | &mdash; |
134
+ | **multipleBlocks<br/>LimitMessage** | Function | Defines function that creates notification when maximal limit of selected options has been reached. | (number) => \`and ${number} more items\` | &mdash; |
135
+ | **inputId** | String, Number | "id" attribute of search field. | null | &mdash; |
136
+ | **preselected<br/>Option** | UnionPropType (from types) | Defines options that will be select by default. | null | &mdash; |
137
+ | **value** | Array | Defines value of extended multiselect that can be used in "v-model". | [] | &mdash; |
100
138
 
101
139
  ## Slots list
102
- Slot name | Slot appointment | Slot scope
103
- ----------|------------------|-----------
104
- **cancel**|Button that deselects all options.|``cancel`` — function that deselects all options|
105
- **labelBlock**|Element with single selected option that is shown if search field display is disabled.|``labelBlockValue`` — option label|
106
- **lessThanLimit**|Message displayed if minimal limit of selected options has not been reached.|&mdash;|
107
- **listHeader**|Element at the top of options list for information content.|&mdash;|
108
- **listFooter**|Element at the bottom of options list for information content.|&mdash;|
109
- **marker**|Marker that indicates state of option selection.|``selected`` — flag to determine markers for selected options|
110
- **maxElements**|Message displayed if maximal limit of elements with selected options has been shown.|&mdash;|
111
- **moreThanLimit**|Message displayed if maximal limit of selected options has been reached.|&mdash;|
112
- **multipleBlocks**|Block with selected options and other multiple select slots|``selectedOptions`` — list of selected options,<br/>``deselectBlock`` — function that deselects option and removes element that contained it|
113
- **noResults**|Message displayed if no options have been found by internal search.|&mdash;|
114
- **noOptions**|Message displayed if given options list is empty.|&mdash;|
115
- **option**|Option in options list with its label.|``option`` — option from options list,<br/>``createCustomOptionLabel`` — function that creates custom label for each option|
116
- **optionBlock**|Element with selected option and its label.|``label`` — option label,<br/>``deselectBlock`` — function that deselects option and removes element that contained it,<br/>``index`` — option index|
117
- **showMore**|Button that increases limit of displayed elements with selected options.|``showMoreOptions`` — function that increases limit of displayed elements with selected options|
118
- **toggle**|Button that toggles options list display.|``toggleOptionsList`` — function that toggles options list display|
140
+
141
+ | Slot name | Slot appointment | Slot scope |
142
+ | ------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
143
+ | **cancel** | Button that deselects all options. | `cancel` — function that deselects all options |
144
+ | **labelBlock** | Element with single selected option that is shown if search field display is disabled. | `labelBlockValue` — option label |
145
+ | **lessThanLimit** | Message displayed if minimal limit of selected options has not been reached. | &mdash; |
146
+ | **listHeader** | Element at the top of options list for information content. | &mdash; |
147
+ | **listFooter** | Element at the bottom of options list for information content. | &mdash; |
148
+ | **marker** | Marker that indicates state of option selection. | `selected` — flag to determine markers for selected options |
149
+ | **maxElements** | Message displayed if maximal limit of elements with selected options has been shown. | &mdash; |
150
+ | **moreThanLimit** | Message displayed if maximal limit of selected options has been reached. | &mdash; |
151
+ | **multipleBlocks** | Block with selected options and other multiple select slots | `selectedOptions` — list of selected options,<br/>`deselectBlock` — function that deselects option and removes element that contained it |
152
+ | **noResults** | Message displayed if no options have been found by internal search. | &mdash; |
153
+ | **noOptions** | Message displayed if given options list is empty. | &mdash; |
154
+ | **option** | Option in options list with its label. | `option` — option from options list,<br/>`createCustomOptionLabel` — function that creates custom label for each option |
155
+ | **optionBlock** | Element with selected option and its label. | `label` — option label,<br/>`deselectBlock` — function that deselects option and removes element that contained it,<br/>`index` — option index |
156
+ | **showMore** | Button that increases limit of displayed elements with selected options. | `showMoreOptions` — function that increases limit of displayed elements with selected options |
157
+ | **toggle** | Button that toggles options list display. | `toggleOptionsList` — function that toggles options list display |
119
158
 
120
159
  ## Events list
121
- Event name | Event appointment | Listener method | Simplified event payload | Fields of object with full event payload |
122
- -----------|-------------------|-----------------|--------------------------|-----------------------------------------|
123
- **pattern-changed**|Change value of search field.|@pattern-changed|``value`` — pattern of inner search for available options|``value`` — pattern of inner search for available options,<br/>``inputId`` — id of search field set by "id" prop|
124
- **select**|Selection of option.|@select|``option`` — just now selected option|``option`` — just now selected option,<br/>``inputId`` — id of search field set by "id" prop|
125
- **clean**|Removal of all options or singe option.|@clean|``option/options`` — just now deselected option or array with just now deselected options|``option/options`` — just now deselected option or array with just now deselected options,<br/>``inputId`` — id of search field set by "id" prop|
126
- **option-created**|Creation of new option by user.|@option-created|``option`` — option created by user|``option/options`` — option created by user,<br/>``inputId`` — id of search field set by "id" prop|
127
- **active**|Dropdown options list expanding.|@active|&mdash;|``inputId`` — id of search field set by "id" prop|
128
- **close**|Rolling up dropdown options list.|@close|``options`` — array of selected options|``options`` — array of selected options,<br/>``inputId`` — id of search field set by "id" prop|
129
- **increase**|Increasing current limit of displayed elements with selected options.|@increase|``limit`` — current limit of options to be shown next|``limit`` — current limit of options to be shown next,<br/>``inputId`` — id of search field set by "id" prop|
160
+
161
+ | Event name | Event appointment | Listener method | Simplified event payload | Fields of object with full event payload |
162
+ | ------------------- | --------------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
163
+ | **pattern-changed** | Change value of search field. | @pattern-changed | `value` — pattern of inner search for available options | `value` — pattern of inner search for available options,<br/>`inputId` — id of search field set by "id" prop |
164
+ | **select** | Selection of option. | @select | `option` — just now selected option | `option` — just now selected option,<br/>`inputId` — id of search field set by "id" prop |
165
+ | **clean** | Removal of all options or singe option. | @clean | `option/options` — just now deselected option or array with just now deselected options | `option/options` — just now deselected option or array with just now deselected options,<br/>`inputId` — id of search field set by "id" prop |
166
+ | **option-created** | Creation of new option by user. | @option-created | `option` — option created by user | `option/options` — option created by user,<br/>`inputId` — id of search field set by "id" prop |
167
+ | **active** | Dropdown options list expanding. | @active | &mdash; | `inputId` — id of search field set by "id" prop |
168
+ | **close** | Rolling up dropdown options list. | @close | `options` — array of selected options | `options` — array of selected options,<br/>`inputId` — id of search field set by "id" prop |
169
+ | **increase** | Increasing current limit of displayed elements with selected options. | @increase | `limit` — current limit of options to be shown next | `limit` — current limit of options to be shown next,<br/>`inputId` — id of search field set by "id" prop |
130
170
 
131
171
  ## Styling with css
132
172
 
133
173
  Vue3 extended multiselect provides following css-variables:
134
174
 
135
175
  ```css
136
- --basic-color: #708090;
137
- --basic-transparent: rgba(112, 128, 144, 0.6);
138
- --cancel: #B22222;
139
- --cancel-backgound-color: rgba(179, 33, 33, 0.1);
140
- --dark-slate-blue: #483D8B;
141
- --dark-slate-blue-transparent: rgba(72, 61, 139, 0.6);
142
- --dark-slate-grey: #2F4F4F;
143
- --dark-slate-grey-transparent: rgba(47, 79, 79, 0.6);
144
- --disabled: rgba(176, 176, 176, 0.6);
145
- --hover-color: #FFFFFF;
146
- --loader-color: #00BFFF;
147
- --strict: #000000;
148
- --strict-transparent: rgba(0, 0, 0, 0.6);
149
- --teal: #008080;
150
- --teal-transparent: rgba(0, 128, 128, 0.6);
151
-
152
- --block-border-radius: 4px;
153
- --block-cancel-padding: 4px;
154
- --block-gap: 6px;
155
- --block-padding: 1px 3px 1px 7px;
156
- --border-radius: 6px;
157
- --border-radius-small: 3px;
158
- --cancel-padding: 3px 8px;
159
- --grid-columns: 1fr 36px 36px;
160
- --grid-rows: 1fr 36px;
161
- --half-size: 50%;
162
- --icon-size-block: 14px;
163
- --icon-size-large: 18px;
164
- --icon-size-medium: 15px;
165
- --icon-size-small: 12px;
166
- --increaser-padding: 3px 7px;
167
- --max-size: 100%;
168
- --min-block-height: 25px;
169
- --options-padding: 6px 0;
170
- --outer-gap: 10px;
171
- --root-padding: 6px 10px;
172
- --toggle-icon-gap: 1px;
173
- --wide-text: 700;
174
- --wrapper-padding: 5px 10px;
175
- --z-index-options: 10;
176
-
177
- --border: 1px solid;
178
- --default-cursor: default;
179
- --icons-align-self: center;
180
- --icons-justify-self: center;
181
- --pointer-cursor: pointer;
182
- --wrapper-transition: border-top-left-radius 250ms ease 0s, border-top-right-radius 250ms ease 0s,
183
- border-bottom-left-radius 250ms ease-out, border-bottom-right-radius 250ms ease-out;
176
+ --basic-color: #708090;
177
+ --basic-transparent: rgba(112, 128, 144, 0.6);
178
+ --cancel: #b22222;
179
+ --cancel-backgound-color: rgba(179, 33, 33, 0.1);
180
+ --dark-slate-blue: #483d8b;
181
+ --dark-slate-blue-transparent: rgba(72, 61, 139, 0.6);
182
+ --dark-slate-grey: #2f4f4f;
183
+ --dark-slate-grey-transparent: rgba(47, 79, 79, 0.6);
184
+ --disabled: rgba(176, 176, 176, 0.6);
185
+ --hover-color: #ffffff;
186
+ --loader-color: #00bfff;
187
+ --strict: #000000;
188
+ --strict-transparent: rgba(0, 0, 0, 0.6);
189
+ --teal: #008080;
190
+ --teal-transparent: rgba(0, 128, 128, 0.6);
191
+
192
+ --block-border-radius: 4px;
193
+ --block-cancel-padding: 4px;
194
+ --block-gap: 6px;
195
+ --block-padding: 1px 3px 1px 7px;
196
+ --border-radius: 6px;
197
+ --border-radius-small: 3px;
198
+ --cancel-padding: 3px 8px;
199
+ --grid-columns: 1fr 36px 36px;
200
+ --grid-rows: 1fr 36px;
201
+ --half-size: 50%;
202
+ --icon-size-block: 14px;
203
+ --icon-size-large: 18px;
204
+ --icon-size-medium: 15px;
205
+ --icon-size-small: 12px;
206
+ --increaser-padding: 3px 7px;
207
+ --max-size: 100%;
208
+ --min-block-height: 25px;
209
+ --options-padding: 6px 0;
210
+ --outer-gap: 10px;
211
+ --root-padding: 6px 10px;
212
+ --toggle-icon-gap: 1px;
213
+ --wide-text: 700;
214
+ --wrapper-padding: 5px 10px;
215
+ --z-index-options: 10;
216
+
217
+ --border: 1px solid;
218
+ --default-cursor: default;
219
+ --icons-align-self: center;
220
+ --icons-justify-self: center;
221
+ --pointer-cursor: pointer;
222
+ --wrapper-transition: border-top-left-radius 250ms ease 0s, border-top-right-radius 250ms
223
+ ease 0s, border-bottom-left-radius 250ms ease-out, border-bottom-right-radius 250ms
224
+ ease-out;
184
225
  ```
185
226
 
186
227
  You can override it globally or by particular instance class name.
187
228
 
188
229
  ```html
189
- <vue3-extended-multiselect class="instance-class" />
230
+ <vue3-extended-multiselect class="instance-class" />
190
231
  ```
191
232
 
192
233
  ```html
193
234
  <style scoped>
194
- .instance-class {
195
- --basic-color: purple;
196
- --outer-gap: 2rem;
197
- --border: 1px dotted;
198
- }
235
+ .instance-class {
236
+ --basic-color: purple;
237
+ --outer-gap: 2rem;
238
+ --border: 1px dotted;
239
+ }
199
240
  </style>
200
241
  ```
201
242
 
@@ -203,63 +244,70 @@ You can override it globally or by particular instance class name.
203
244
 
204
245
  Vue3 extended multiselect provides following props for customizing:
205
246
 
206
- * errorBorderColor
207
- * iconFilter
208
- * iconSize
209
- * loaderIconFilter
210
- * themeType
211
- * toggleIcon
212
- * anyOptionWrapperBlockHeight
213
- * toggleMaxHeight
214
- * toggleMinHeight
247
+ - errorBorderColor
248
+ - iconFilter
249
+ - iconSize
250
+ - loaderIconFilter
251
+ - themeType
252
+ - toggleIcon
253
+ - anyOptionWrapperBlockHeight
254
+ - toggleMaxHeight
255
+ - toggleMinHeight
215
256
 
216
257
  #### Customizing examples
217
258
 
218
259
  Changing border color when extended multiselect value is invalid.
219
260
 
220
261
  ```html
221
- <vue3-extended-multiselect error-border-color="#8B0000" />
262
+ <vue3-extended-multiselect error-border-color="#8B0000" />
222
263
  ```
264
+
223
265
  Changing svg color filter for icons.
224
266
 
225
267
  ```html
226
- <vue3-extended-multiselect icon-filter="green" />
268
+ <vue3-extended-multiselect icon-filter="green" />
227
269
  ```
270
+
228
271
  Resizing icons.
229
272
 
230
273
  ```html
231
- <vue3-extended-multiselect icon-size="small" />
274
+ <vue3-extended-multiselect icon-size="small" />
232
275
  ```
276
+
233
277
  Changing svg color filter for loader icon.
234
278
 
235
279
  ```html
236
- <vue3-extended-multiselect icon-size="small" />
280
+ <vue3-extended-multiselect icon-size="small" />
237
281
  ```
282
+
238
283
  Changing general color theme of extended multiselect.
239
284
 
240
285
  ```html
241
- <vue3-extended-multiselect theme-type="slate-blue" />
286
+ <vue3-extended-multiselect theme-type="slate-blue" />
242
287
  ```
288
+
243
289
  Changing toggle icon form.
244
290
 
245
291
  ```html
246
- <vue3-extended-multiselect toggle-icon="triangle-arrow" />
292
+ <vue3-extended-multiselect toggle-icon="triangle-arrow" />
247
293
  ```
294
+
248
295
  Resizing option blocks in options list.
249
296
 
250
297
  ```html
251
- <vue3-extended-multiselect :any-option-wrapper-block-height="60" />
298
+ <vue3-extended-multiselect :any-option-wrapper-block-height="60" />
252
299
  ```
300
+
253
301
  Changing "max-height" css-property of options list.
254
302
 
255
303
  ```html
256
- <vue3-extended-multiselect :toggle-max-height="500" />
304
+ <vue3-extended-multiselect :toggle-max-height="500" />
257
305
  ```
258
306
 
259
307
  Changing "min-height" css-property of options list.
260
308
 
261
309
  ```html
262
- <vue3-extended-multiselect :toggle-min-height="500" />
310
+ <vue3-extended-multiselect :toggle-min-height="500" />
263
311
  ```
264
312
 
265
313
  ## License