@weni/unnnic-system 3.12.3-alpha.0 → 3.12.3-alpha.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.
Files changed (27) hide show
  1. package/dist/components/MultiSelect/MultSelectOption.vue.d.ts +17 -0
  2. package/dist/components/MultiSelect/MultSelectOption.vue.d.ts.map +1 -0
  3. package/dist/components/MultiSelect/index.vue.d.ts +44 -0
  4. package/dist/components/MultiSelect/index.vue.d.ts.map +1 -0
  5. package/dist/components/index.d.ts +23720 -0
  6. package/dist/components/index.d.ts.map +1 -0
  7. package/dist/{es-59933601.mjs → es-239c29c2.mjs} +1 -1
  8. package/dist/{index-4fe9253b.mjs → index-40e176e4.mjs} +5124 -5130
  9. package/dist/{pt-br-10db3200.mjs → pt-br-5004a35e.mjs} +1 -1
  10. package/dist/style.css +1 -1
  11. package/dist/unnnic.mjs +1 -1
  12. package/dist/unnnic.umd.js +30 -30
  13. package/package.json +1 -1
  14. package/src/components/{MultiSelectV2 → MultiSelect}/MultSelectOption.vue +0 -18
  15. package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +81 -0
  16. package/src/components/MultiSelect/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +51 -0
  17. package/src/components/index.ts +3 -3
  18. package/src/stories/MultiSelect.stories.js +142 -46
  19. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +0 -163
  20. package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +0 -1
  21. package/src/components/MultiSelect/MultiSelect.vue +0 -297
  22. package/src/components/MultiSelectV2/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -121
  23. package/src/components/MultiSelectV2/__tests__/__snapshots__/MultiSelectOption.spec.js.snap +0 -51
  24. package/src/stories/MultiSelectV2.stories.js +0 -158
  25. /package/src/components/{MultiSelectV2 → MultiSelect}/__tests__/MultiSelect.spec.js +0 -0
  26. /package/src/components/{MultiSelectV2 → MultiSelect}/__tests__/MultiSelectOption.spec.js +0 -0
  27. /package/src/components/{MultiSelectV2 → MultiSelect}/index.vue +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weni/unnnic-system",
3
- "version": "3.12.3-alpha.0",
3
+ "version": "3.12.3-alpha.1",
4
4
  "type": "commonjs",
5
5
  "files": [
6
6
  "dist",
@@ -43,25 +43,7 @@ const props = withDefaults(defineProps<SelectOptionProps>(), {
43
43
  }
44
44
 
45
45
  .unnnic-multi-select-option {
46
- // cursor: pointer;
47
46
  border-radius: $unnnic-radius-1;
48
47
  font: $unnnic-font-emphasis;
49
-
50
- // TODO: remove variations styles?
51
- // &:hover:not(&--active):not(&--disabled),
52
- // &--focused {
53
- // background-color: $unnnic-color-bg-soft;
54
- // }
55
-
56
- // &--active {
57
- // background-color: $unnnic-color-bg-active;
58
- // color: $unnnic-color-fg-inverted;
59
- // }
60
-
61
- // &--disabled {
62
- // color: $unnnic-color-fg-muted;
63
- // background-color: $unnnic-color-bg-muted;
64
- // cursor: not-allowed;
65
- // }
66
48
  }
67
49
  </style>
@@ -0,0 +1,81 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`UnnnicMultiSelect.vue > snapshot testing > matches snapshot with default props 1`] = `
4
+ "<div data-v-03c7fb50="" class="unnnic-multi-select"><button data-v-9d52eef8="" data-v-03c7fb50="" class="unnnic-popover-trigger" id="reka-popover-trigger-v-0" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="" data-state="closed">
5
+ <section data-v-9f8d6c86="" data-v-d890ad85="" data-v-03c7fb50="" class="unnnic-form-element unnnic-form md unnnic-multi-select__input" data-testid="form-element">
6
+ <!--v-if-->
7
+ <div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-multi-select__input unnnic-form-input" hascloudycolor="false" mask=""><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-multi-select__input unnnic-form-input input-itself input size-md normal input--has-icon-right input--has-clear-icon unnnic-multi-select__input unnnic-form-input input-itself" hascloudycolor="false" placeholder="" iconleft="" iconright="keyboard_arrow_down" iconleftclickable="false" iconrightclickable="false" showclear="true" type="text" readonly="" value="">
8
+ <!--v-if-->
9
+ <section data-v-a0d36167="" class="icon-right-container"><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-clear" data-testid="material-icon" translate="no">close</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant icon-right" data-testid="material-icon" translate="no">keyboard_arrow_down</span></section>
10
+ </div>
11
+ <!--v-if-->
12
+ </section>
13
+ </button>
14
+ <!--teleport start-->
15
+ <!--teleport end-->
16
+ </div>"
17
+ `;
18
+
19
+ exports[`UnnnicMultiSelect.vue > snapshot testing > matches snapshot with disabled state 1`] = `
20
+ "<div data-v-03c7fb50="" class="unnnic-multi-select"><button data-v-9d52eef8="" data-v-03c7fb50="" class="unnnic-popover-trigger" id="reka-popover-trigger-v-0" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="" data-state="closed">
21
+ <section data-v-9f8d6c86="" data-v-d890ad85="" data-v-03c7fb50="" class="unnnic-form-element unnnic-form-element--disabled unnnic-form md unnnic-multi-select__input" data-testid="form-element">
22
+ <!--v-if-->
23
+ <div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-multi-select__input unnnic-form-input" hascloudycolor="false" mask=""><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-multi-select__input unnnic-form-input input-itself input size-md normal input--has-icon-right input--has-clear-icon unnnic-multi-select__input unnnic-form-input input-itself" hascloudycolor="false" placeholder="" iconleft="" iconright="keyboard_arrow_down" iconleftclickable="false" iconrightclickable="false" showclear="true" type="text" readonly="" value="" disabled="">
24
+ <!--v-if-->
25
+ <section data-v-a0d36167="" class="icon-right-container"><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-muted unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-clear" data-testid="material-icon" translate="no">close</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-muted unnnic-icon-size--ant unnnic-icon__size--ant icon-right" data-testid="material-icon" translate="no">keyboard_arrow_down</span></section>
26
+ </div>
27
+ <!--v-if-->
28
+ </section>
29
+ </button>
30
+ <!--teleport start-->
31
+ <!--teleport end-->
32
+ </div>"
33
+ `;
34
+
35
+ exports[`UnnnicMultiSelect.vue > snapshot testing > matches snapshot with multiple selected values 1`] = `
36
+ "<div data-v-03c7fb50="" class="unnnic-multi-select"><button data-v-9d52eef8="" data-v-03c7fb50="" class="unnnic-popover-trigger" id="reka-popover-trigger-v-0" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="" data-state="closed">
37
+ <section data-v-9f8d6c86="" data-v-d890ad85="" data-v-03c7fb50="" class="unnnic-form-element unnnic-form md unnnic-multi-select__input" data-testid="form-element">
38
+ <!--v-if-->
39
+ <div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-multi-select__input unnnic-form-input" hascloudycolor="false" mask=""><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-multi-select__input unnnic-form-input input-itself input size-md normal input--has-icon-right input--has-clear-icon unnnic-multi-select__input unnnic-form-input input-itself" hascloudycolor="false" placeholder="" iconleft="" iconright="keyboard_arrow_down" iconleftclickable="false" iconrightclickable="false" showclear="true" type="text" readonly="" value="Option 1, Option 2">
40
+ <!--v-if-->
41
+ <section data-v-a0d36167="" class="icon-right-container"><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-clear" data-testid="material-icon" translate="no">close</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant icon-right" data-testid="material-icon" translate="no">keyboard_arrow_down</span></section>
42
+ </div>
43
+ <!--v-if-->
44
+ </section>
45
+ </button>
46
+ <!--teleport start-->
47
+ <!--teleport end-->
48
+ </div>"
49
+ `;
50
+
51
+ exports[`UnnnicMultiSelect.vue > snapshot testing > matches snapshot with search enabled 1`] = `
52
+ "<div data-v-03c7fb50="" class="unnnic-multi-select"><button data-v-9d52eef8="" data-v-03c7fb50="" class="unnnic-popover-trigger" id="reka-popover-trigger-v-0" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="" data-state="closed">
53
+ <section data-v-9f8d6c86="" data-v-d890ad85="" data-v-03c7fb50="" class="unnnic-form-element unnnic-form md unnnic-multi-select__input" data-testid="form-element">
54
+ <!--v-if-->
55
+ <div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-multi-select__input unnnic-form-input" hascloudycolor="false" mask=""><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-multi-select__input unnnic-form-input input-itself input size-md normal input--has-icon-right input--has-clear-icon unnnic-multi-select__input unnnic-form-input input-itself" hascloudycolor="false" placeholder="" iconleft="" iconright="keyboard_arrow_down" iconleftclickable="false" iconrightclickable="false" showclear="true" type="text" readonly="" value="">
56
+ <!--v-if-->
57
+ <section data-v-a0d36167="" class="icon-right-container"><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-clear" data-testid="material-icon" translate="no">close</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant icon-right" data-testid="material-icon" translate="no">keyboard_arrow_down</span></section>
58
+ </div>
59
+ <!--v-if-->
60
+ </section>
61
+ </button>
62
+ <!--teleport start-->
63
+ <!--teleport end-->
64
+ </div>"
65
+ `;
66
+
67
+ exports[`UnnnicMultiSelect.vue > snapshot testing > matches snapshot with selected values 1`] = `
68
+ "<div data-v-03c7fb50="" class="unnnic-multi-select"><button data-v-9d52eef8="" data-v-03c7fb50="" class="unnnic-popover-trigger" id="reka-popover-trigger-v-0" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="" data-state="closed">
69
+ <section data-v-9f8d6c86="" data-v-d890ad85="" data-v-03c7fb50="" class="unnnic-form-element unnnic-form md unnnic-multi-select__input" data-testid="form-element">
70
+ <!--v-if-->
71
+ <div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-multi-select__input unnnic-form-input" hascloudycolor="false" mask=""><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-multi-select__input unnnic-form-input input-itself input size-md normal input--has-icon-right input--has-clear-icon unnnic-multi-select__input unnnic-form-input input-itself" hascloudycolor="false" placeholder="" iconleft="" iconright="keyboard_arrow_down" iconleftclickable="false" iconrightclickable="false" showclear="true" type="text" readonly="" value="Option 1">
72
+ <!--v-if-->
73
+ <section data-v-a0d36167="" class="icon-right-container"><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant unnnic--clickable icon-clear" data-testid="material-icon" translate="no">close</span><span data-v-26446d8e="" data-v-a0d36167="" class="unnnic-icon material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic-icon__size--ant icon-right" data-testid="material-icon" translate="no">keyboard_arrow_down</span></section>
74
+ </div>
75
+ <!--v-if-->
76
+ </section>
77
+ </button>
78
+ <!--teleport start-->
79
+ <!--teleport end-->
80
+ </div>"
81
+ `;
@@ -0,0 +1,51 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`MultiSelectOption.vue > snapshot testing > matches snapshot with active state 1`] = `
4
+ "<div data-v-d2b97c58="" class="unnnic-multi-select-option">
5
+ <section data-v-18939422="" data-v-d2b97c58="" class="unnnic-checkbox"><label data-v-18939422="" class="unnnic-checkbox__input-wrapper"><input data-v-18939422="" class="unnnic-checkbox__input" type="checkbox" checked="">
6
+ <p data-v-18939422="" class="unnnic-checkbox__label" data-testid="checkbox-text-right">Test Option</p>
7
+ </label>
8
+ <!--v-if-->
9
+ </section>
10
+ </div>"
11
+ `;
12
+
13
+ exports[`MultiSelectOption.vue > snapshot testing > matches snapshot with both active and disabled states 1`] = `
14
+ "<div data-v-d2b97c58="" class="unnnic-multi-select-option">
15
+ <section data-v-18939422="" data-v-d2b97c58="" class="unnnic-checkbox"><label data-v-18939422="" class="unnnic-checkbox__input-wrapper unnnic-checkbox__input-wrapper--disabled"><input data-v-18939422="" class="unnnic-checkbox__input" type="checkbox" disabled="" checked="">
16
+ <p data-v-18939422="" class="unnnic-checkbox__label unnnic-checkbox__label--disabled" data-testid="checkbox-text-right">Test Option</p>
17
+ </label>
18
+ <!--v-if-->
19
+ </section>
20
+ </div>"
21
+ `;
22
+
23
+ exports[`MultiSelectOption.vue > snapshot testing > matches snapshot with default props 1`] = `
24
+ "<div data-v-d2b97c58="" class="unnnic-multi-select-option">
25
+ <section data-v-18939422="" data-v-d2b97c58="" class="unnnic-checkbox"><label data-v-18939422="" class="unnnic-checkbox__input-wrapper"><input data-v-18939422="" class="unnnic-checkbox__input" type="checkbox">
26
+ <p data-v-18939422="" class="unnnic-checkbox__label" data-testid="checkbox-text-right">Test Option</p>
27
+ </label>
28
+ <!--v-if-->
29
+ </section>
30
+ </div>"
31
+ `;
32
+
33
+ exports[`MultiSelectOption.vue > snapshot testing > matches snapshot with disabled state 1`] = `
34
+ "<div data-v-d2b97c58="" class="unnnic-multi-select-option">
35
+ <section data-v-18939422="" data-v-d2b97c58="" class="unnnic-checkbox"><label data-v-18939422="" class="unnnic-checkbox__input-wrapper unnnic-checkbox__input-wrapper--disabled"><input data-v-18939422="" class="unnnic-checkbox__input" type="checkbox" disabled="">
36
+ <p data-v-18939422="" class="unnnic-checkbox__label unnnic-checkbox__label--disabled" data-testid="checkbox-text-right">Test Option</p>
37
+ </label>
38
+ <!--v-if-->
39
+ </section>
40
+ </div>"
41
+ `;
42
+
43
+ exports[`MultiSelectOption.vue > snapshot testing > matches snapshot with focused state 1`] = `
44
+ "<div data-v-d2b97c58="" class="unnnic-multi-select-option">
45
+ <section data-v-18939422="" data-v-d2b97c58="" class="unnnic-checkbox"><label data-v-18939422="" class="unnnic-checkbox__input-wrapper"><input data-v-18939422="" class="unnnic-checkbox__input" type="checkbox">
46
+ <p data-v-18939422="" class="unnnic-checkbox__label" data-testid="checkbox-text-right">Test Option</p>
47
+ </label>
48
+ <!--v-if-->
49
+ </section>
50
+ </div>"
51
+ `;
@@ -36,7 +36,7 @@ import selectSmart from './SelectSmart/SelectSmart.vue';
36
36
  import select from './Select/index.vue';
37
37
  import selectItem from './Select/SelectItem.vue';
38
38
  // import selectListItem from './SelectListItem/SelectListItem.vue';
39
- import multiSelect from './MultiSelect/MultiSelect.vue';
39
+ import multiSelect from './MultiSelect/index.vue';
40
40
  import alert from './Alert/Alert.vue';
41
41
  // import autocomplete from './Input/Autocomplete.vue';
42
42
  // import autocompleteSelect from './AutocompleteSelect/AutocompleteSelect.vue';
@@ -171,7 +171,7 @@ export const components: ComponentsMap = {
171
171
  unnnicSelect: select,
172
172
  unnnicSelectItem: selectItem,
173
173
  // unnnicSelectListItem: selectListItem,
174
- unnnicMultiSelect: multiSelect,
174
+ unnnicMultiSelect: multiSelect as VueComponent,
175
175
  unnnicAlert: alert,
176
176
  unnnicCallAlert: callAlert,
177
177
  unnnicCallModal: callModal,
@@ -264,7 +264,7 @@ export const unnnicFontSize = fontSize;
264
264
  export const unnnicFormElement = formElement;
265
265
  export const unnnicInput = input;
266
266
  export const unnnicInputNext = inputNext;
267
- export const unnnicInputDatePicker = inputDatePicker;
267
+ export const unnnicInputDatePicker = inputDatePicker as VueComponent;
268
268
  export const unnnicButton = button;
269
269
  export const unnnicButtonIcon = buttonIcon;
270
270
  export const unnnicSidebar = sidebar;
@@ -1,62 +1,158 @@
1
- import UnnnicMultiSelect from '../components/MultiSelect/MultiSelect.vue';
1
+ import UnnnicMultiSelect from '../components/MultiSelect/index.vue';
2
+
3
+ const options = [
4
+ { label: 'Option 1', value: 'option1', altValue: 'alt_value_option1' },
5
+ { label: 'Option 2', value: 'option2', altValue: 'alt_value_option2' },
6
+ { label: 'Option 3', value: 'option3', altValue: 'alt_value_option3' },
7
+ { label: 'Option 4', value: 'option4', altValue: 'alt_value_option4' },
8
+ { label: 'Option 5', value: 'option5', altValue: 'alt_value_option5' },
9
+ { label: 'Option 6', value: 'option6', altValue: 'alt_value_option6' },
10
+ { label: 'Option 7', value: 'option7', altValue: 'alt_value_option7' },
11
+ { label: 'Option 8', value: 'option8', altValue: 'alt_value_option8' },
12
+ { label: 'Option 9', value: 'option9', altValue: 'alt_value_option9' },
13
+ { label: 'Option 10', value: 'option10', disabled: true },
14
+ ];
2
15
 
3
16
  export default {
4
17
  title: 'Form/MultiSelect',
5
18
  component: UnnnicMultiSelect,
6
- argTypes: {},
7
- render: (args) => ({
8
- components: {
9
- UnnnicMultiSelect,
19
+ tags: ['autodocs'],
20
+ parameters: {
21
+ docs: {
22
+ description: {
23
+ component:
24
+ 'MultiSelect is designed to solve common problems related to multiple option selection.',
25
+ },
26
+ },
27
+ },
28
+ argTypes: {
29
+ options: {
30
+ description:
31
+ 'List of items to be displayed in the options. If an item has a `disabled` key set to `true`, that item will be disabled. By default, the component looks for the `label` and `value` keys to display and update the model, but these are not required if you wish to customize them using the `itemLabel` and `itemValue` props, respectively.',
32
+ },
33
+ placeholder: {
34
+ description: 'Text to be displayed in the placeholder.',
35
+ },
36
+ label: {
37
+ description: 'Text to be displayed in the label.',
38
+ },
39
+ modelValue: {
40
+ description:
41
+ 'Model variable. Its type will always match a list of the return type of the key specified by `itemValue`, or the entire options object when the `returnObject` property is set to `true`.',
42
+ },
43
+ returnObject: {
44
+ description:
45
+ 'Prop to indicate that the full option object should be returned in the v-model.',
46
+ },
47
+ itemLabel: {
48
+ description:
49
+ 'Field of the option item that should be used to render the option label.',
50
+ },
51
+ itemValue: {
52
+ description:
53
+ 'Field of the option item that should be used to return value to v-model.',
54
+ },
55
+ type: {
56
+ description: 'Select state type',
57
+ },
58
+ errors: {
59
+ description:
60
+ "Error message or messages. When it's an array, the messages will be separated by commas.",
61
+ },
62
+ message: {
63
+ description: 'Help or hint message.',
64
+ },
65
+ size: {
66
+ description: 'Select size',
67
+ },
68
+ optionsLines: {
69
+ description:
70
+ 'Number of options to display at most; if exceeded, scrolling will be enabled.',
71
+ },
72
+ enableSearch: {
73
+ description:
74
+ 'If true, enables a search field displayed inside the options popover. The `update:search` event is emitted on each input.',
75
+ },
76
+ search: {
77
+ description: 'Search value.',
10
78
  },
79
+ locale: {
80
+ description: 'Locale for i18n translations.',
81
+ },
82
+ disabled: {
83
+ description: 'Disable the select.',
84
+ },
85
+ },
86
+ render: (args) => ({
87
+ components: { UnnnicMultiSelect },
11
88
  setup() {
12
- return { args };
89
+ const handleSearch = (value) => {
90
+ args.search = value;
91
+ };
92
+ return { args, handleSearch };
13
93
  },
14
94
  data() {
15
95
  return {
16
- groups: [
17
- {
18
- title: 'Permissões Gerais',
19
- selected: 0,
20
- items: [
21
- {
22
- title: 'Moderador',
23
- description:
24
- 'Gerencia membros do projeto e administra o rocket',
25
- },
26
- {
27
- title: 'Contribuidor',
28
- description: 'Consegue editar o projeto',
29
- },
30
- {
31
- title: 'Vizualizador',
32
- description: 'Apenas vizualiza o projeto',
33
- },
34
- ],
35
- },
36
- {
37
- title: 'Permissões do módulo chat',
38
- selected: 0,
39
- items: [
40
- {
41
- title: 'Gerente de Atendimento',
42
- description:
43
- 'Consegue responder mensagens e criar grupos no Rocket',
44
- },
45
- {
46
- title: 'Agente',
47
- description: 'Consegue responder mensagens no Rocket',
48
- },
49
- ],
50
- },
51
- ],
96
+ exampleValue: [],
52
97
  };
53
98
  },
54
99
  template: `
55
- <div>
56
- <UnnnicMultiSelect v-bind="args" v-model="groups" />
57
- </div>
100
+ <p>modelValue: {{ exampleValue }}</p>
101
+ <unnnic-multi-select v-model="exampleValue" v-bind="args" @update:search="handleSearch" />
58
102
  `,
59
103
  }),
60
104
  };
61
105
 
62
- export const Medium = { args: {} };
106
+ export const Default = {
107
+ args: {
108
+ placeholder: 'Placeholder',
109
+ label: 'Label',
110
+ options,
111
+ },
112
+ };
113
+
114
+ export const ReturnObject = {
115
+ args: {
116
+ returnObject: true,
117
+ placeholder: 'Placeholder',
118
+ label: 'Label',
119
+ options,
120
+ },
121
+ };
122
+
123
+ export const AlternativeValueKey = {
124
+ args: {
125
+ itemValue: 'altValue',
126
+ placeholder: 'Placeholder',
127
+ label: 'Label',
128
+ options,
129
+ },
130
+ };
131
+
132
+ export const AlternativeValueLabel = {
133
+ args: {
134
+ itemLabel: 'altValue',
135
+ placeholder: 'Placeholder',
136
+ label: 'Label',
137
+ options,
138
+ },
139
+ };
140
+
141
+ export const Disabled = {
142
+ args: {
143
+ placeholder: 'Placeholder',
144
+ label: 'Label',
145
+ options,
146
+ disabled: true,
147
+ },
148
+ };
149
+
150
+ export const WithSearch = {
151
+ args: {
152
+ placeholder: 'Placeholder',
153
+ label: 'Label',
154
+ options,
155
+ enableSearch: true,
156
+ search: '',
157
+ },
158
+ };
@@ -1,163 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- isOpen: {
3
- default: boolean;
4
- };
5
- expand: {
6
- default: boolean;
7
- };
8
- label: {
9
- type: StringConstructor;
10
- default: string;
11
- };
12
- modelValue: {
13
- type: ArrayConstructor;
14
- default: () => never[];
15
- };
16
- inputTitle: {
17
- type: StringConstructor;
18
- default: string;
19
- };
20
- hideRadio: {
21
- type: BooleanConstructor;
22
- default: boolean;
23
- };
24
- hideGroupTitle: {
25
- type: BooleanConstructor;
26
- default: boolean;
27
- };
28
- unselectable: {
29
- type: BooleanConstructor;
30
- default: boolean;
31
- };
32
- }>, {}, {
33
- active: boolean;
34
- }, {}, {
35
- handleIsOpenKeyboard(event: any): void;
36
- onClickOutside(): void;
37
- change(indexGroup: any, indexSelected: any): void;
38
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
39
- isOpen: {
40
- default: boolean;
41
- };
42
- expand: {
43
- default: boolean;
44
- };
45
- label: {
46
- type: StringConstructor;
47
- default: string;
48
- };
49
- modelValue: {
50
- type: ArrayConstructor;
51
- default: () => never[];
52
- };
53
- inputTitle: {
54
- type: StringConstructor;
55
- default: string;
56
- };
57
- hideRadio: {
58
- type: BooleanConstructor;
59
- default: boolean;
60
- };
61
- hideGroupTitle: {
62
- type: BooleanConstructor;
63
- default: boolean;
64
- };
65
- unselectable: {
66
- type: BooleanConstructor;
67
- default: boolean;
68
- };
69
- }>> & Readonly<{}>, {
70
- label: string;
71
- modelValue: unknown[];
72
- isOpen: boolean;
73
- expand: boolean;
74
- inputTitle: string;
75
- hideRadio: boolean;
76
- hideGroupTitle: boolean;
77
- unselectable: boolean;
78
- }, {}, {
79
- UnnnicIcon: import('vue').DefineComponent<import('../Icon.vue').IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
80
- click: (event: Event) => any;
81
- mousedown: (event: Event) => any;
82
- mouseup: (event: Event) => any;
83
- }, string, import('vue').PublicProps, Readonly<import('../Icon.vue').IconProps> & Readonly<{
84
- onClick?: ((event: Event) => any) | undefined;
85
- onMousedown?: ((event: Event) => any) | undefined;
86
- onMouseup?: ((event: Event) => any) | undefined;
87
- }>, {
88
- size: import('../Icon.vue').IconSize;
89
- filled: boolean;
90
- icon: string | null;
91
- clickable: boolean;
92
- scheme: import('../Icon.vue').SchemeColor;
93
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
94
- UnnnicRadio: {
95
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
96
- $emit: (event: "update:modelValue", ...args: any[]) => void;
97
- disabled: boolean;
98
- label: string;
99
- name: string;
100
- modelValue: string | number;
101
- value: string | number;
102
- helper: string;
103
- $props: {
104
- readonly disabled?: boolean | undefined;
105
- readonly label?: string | undefined;
106
- readonly name?: string | undefined;
107
- readonly modelValue?: string | number | undefined;
108
- readonly value?: string | number | undefined;
109
- readonly helper?: string | undefined;
110
- };
111
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLElement, import('vue').ComponentProvideOptions, {
112
- P: {};
113
- B: {};
114
- D: {};
115
- C: {};
116
- M: {};
117
- Defaults: {};
118
- }, Readonly<{}> & Readonly<{}>, {
119
- $emit: (event: "update:modelValue", ...args: any[]) => void;
120
- disabled: boolean;
121
- label: string;
122
- name: string;
123
- modelValue: string | number;
124
- value: string | number;
125
- helper: string;
126
- $props: {
127
- readonly disabled?: boolean | undefined;
128
- readonly label?: string | undefined;
129
- readonly name?: string | undefined;
130
- readonly modelValue?: string | number | undefined;
131
- readonly value?: string | number | undefined;
132
- readonly helper?: string | undefined;
133
- };
134
- }, {}, {}, {}, {}>;
135
- __isFragment?: never;
136
- __isTeleport?: never;
137
- __isSuspense?: never;
138
- } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
139
- $emit: (event: "update:modelValue", ...args: any[]) => void;
140
- disabled: boolean;
141
- label: string;
142
- name: string;
143
- modelValue: string | number;
144
- value: string | number;
145
- helper: string;
146
- $props: {
147
- readonly disabled?: boolean | undefined;
148
- readonly label?: string | undefined;
149
- readonly name?: string | undefined;
150
- readonly modelValue?: string | number | undefined;
151
- readonly value?: string | number | undefined;
152
- readonly helper?: string | undefined;
153
- };
154
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
155
- $slots: {
156
- default?(_: {}): any;
157
- };
158
- });
159
- }, {
160
- onClickOutside: any;
161
- }, string, import('vue').ComponentProvideOptions, true, {}, any>;
162
- export default _default;
163
- //# sourceMappingURL=MultiSelect.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MultiSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSelect/MultiSelect.vue"],"names":[],"mappings":"AA6EA;"}