@weni/unnnic-system 3.2.9-alpha.11 → 3.2.9-alpha.12

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 (38) hide show
  1. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  2. package/dist/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue.d.ts.map +1 -1
  3. package/dist/components/Input/TextInput.vue.d.ts.map +1 -1
  4. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +1 -1
  5. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  6. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -1
  7. package/dist/components/index.d.ts +2 -2
  8. package/dist/{es-dcef703d.js → es-66126ef1.mjs} +1 -1
  9. package/dist/{index-6ddf8580.js → index-f6e9b879.mjs} +15 -15
  10. package/dist/{pt-br-485ef253.js → pt-br-3b5a8852.mjs} +1 -1
  11. package/dist/style.css +1 -1
  12. package/dist/{unnnic.js → unnnic.mjs} +1 -1
  13. package/dist/{unnnic.umd.cjs → unnnic.umd.js} +5 -5
  14. package/package.json +2 -2
  15. package/src/components/Button/Button.vue +4 -7
  16. package/src/components/ChartFunnel/DefaultFunnel/ChartDefaultFunnelBase.vue +2 -1
  17. package/src/components/ChartFunnel/SvgFunnel/ChartFunnelTwoRows.vue +61 -60
  18. package/src/components/Chip/Chip.vue +1 -1
  19. package/src/components/Input/BaseInput.vue +4 -4
  20. package/src/components/Input/Input.vue +1 -1
  21. package/src/components/Input/TextInput.vue +3 -2
  22. package/src/components/ModalDialog/ModalDialog.vue +26 -29
  23. package/src/components/Popover/__tests__/Popover.spec.js +18 -18
  24. package/src/components/Popover/index.vue +78 -93
  25. package/src/components/Select/SelectOption.vue +37 -43
  26. package/src/components/Select/__tests__/Select.spec.js +36 -41
  27. package/src/components/Select/__tests__/SelectItem.spec.js +15 -35
  28. package/src/components/Select/__tests__/SelectOption.spec.js +3 -6
  29. package/src/components/Select/index.vue +142 -192
  30. package/src/components/TemplatePreview/TemplatePreview.vue +25 -28
  31. package/src/components/TemplatePreview/TemplatePreviewModal.vue +10 -10
  32. package/src/components/TemplatePreview/types.d.ts +3 -3
  33. package/src/stories/Button.stories.js +7 -1
  34. package/src/stories/Input.stories.js +4 -4
  35. package/src/stories/Popover.stories.js +9 -9
  36. package/src/stories/Select.stories.js +39 -39
  37. package/src/stories/TemplatePreview.stories.js +27 -27
  38. package/src/stories/TemplatePreviewModal.stories.js +31 -31
@@ -1,146 +1,131 @@
1
1
  <template>
2
- <section
3
- class="unnnic-popover"
4
- ref="popover"
5
- >
6
- <div
7
- class="unnnic-popover__trigger"
8
- data-testid="popover-trigger"
9
- @click="toggleOpen()"
10
- >
11
- <slot name="trigger" />
12
- </div>
13
- <div
14
- v-if="open"
15
- class="unnnic-popover__balloon"
16
- data-testid="popover-balloon"
17
- >
18
- <slot name="content" />
19
- </div>
20
- </section>
2
+ <section class="unnnic-popover" ref="popover">
3
+ <div class="unnnic-popover__trigger" data-testid="popover-trigger" @click="toggleOpen()">
4
+ <slot name="trigger" />
5
+ </div>
6
+ <div v-if="open" class="unnnic-popover__balloon" data-testid="popover-balloon">
7
+ <slot name="content" />
8
+ </div>
9
+ </section>
21
10
  </template>
22
11
 
23
12
  <script setup lang="ts">
24
13
  import { computed, onMounted, ref, useTemplateRef, watch } from 'vue';
25
14
  import { onClickOutside, useResizeObserver } from '@vueuse/core';
26
15
 
27
- const target = useTemplateRef<HTMLDivElement>('popover');
16
+ const target = useTemplateRef<HTMLDivElement>('popover')
28
17
 
29
- const popoverWidth = ref<string>('');
18
+ const popoverWidth = ref<string>('')
30
19
 
31
20
  useResizeObserver(target, (entries) => {
32
- const entry = entries[0];
33
- const { width } = entry.contentRect;
34
- popoverWidth.value = `${width}px`;
35
- });
21
+ const entry = entries[0]
22
+ const { width } = entry.contentRect
23
+ popoverWidth.value = `${width}px`
24
+ })
36
25
 
37
26
  onClickOutside(target, () => {
38
- if (props.persistent) return;
39
- open.value = false;
40
- });
27
+ if (props.persistent) return;
28
+ open.value = false;
29
+ })
41
30
 
42
31
  defineOptions({
43
- name: 'UnnnicPopover',
44
- });
32
+ name: "UnnnicPopover"
33
+ })
45
34
 
46
35
  interface PopoverBalloonProps {
47
- width?: string;
48
- height?: string;
49
- maxHeight?: string;
36
+ width?: string;
37
+ height?: string;
38
+ maxHeight?: string;
50
39
  }
51
40
 
52
41
  interface PopoverProps {
53
- modelValue?: boolean;
54
- persistent?: boolean;
55
- popoverBalloonProps?: PopoverBalloonProps;
42
+ modelValue?: boolean;
43
+ persistent?: boolean;
44
+ popoverBalloonProps?: PopoverBalloonProps;
56
45
  }
57
46
 
58
47
  const props = withDefaults(defineProps<PopoverProps>(), {
59
- modelValue: undefined,
60
- persistent: false,
48
+ modelValue: undefined,
49
+ persistent: false,
61
50
  });
62
51
 
63
52
  const emit = defineEmits<{
64
- 'update:modelValue': [value: boolean];
65
- }>();
53
+ 'update:modelValue': [value: boolean];
54
+ }>()
66
55
 
67
56
  const useModelValue = computed(() => props.modelValue !== undefined);
68
57
 
69
- const open = ref<boolean>(
70
- useModelValue.value ? Boolean(props.modelValue) : false,
71
- );
58
+ const open = ref<boolean>(useModelValue.value ? Boolean(props.modelValue) : false);
72
59
 
73
60
  const toggleOpen = () => {
74
- open.value = !open.value;
75
- };
61
+ open.value = !open.value;
62
+ }
76
63
 
77
64
  const calculatedPopoverWidth = computed(() => {
78
- return props.popoverBalloonProps?.width || popoverWidth.value;
79
- });
65
+ return props.popoverBalloonProps?.width || popoverWidth.value
66
+ })
80
67
 
81
68
  const popoverHeight = computed(() => {
82
- return props.popoverBalloonProps?.height || 'unset';
83
- });
69
+ return props.popoverBalloonProps?.height || 'unset'
70
+ })
84
71
 
85
72
  const popoverMaxHeight = computed(() => {
86
- return props.popoverBalloonProps?.maxHeight || 'unset';
87
- });
73
+ return props.popoverBalloonProps?.maxHeight || 'unset'
74
+ })
88
75
 
89
76
  onMounted(() => {
90
- if (useModelValue.value) {
91
- open.value = Boolean(props.modelValue);
92
- }
93
- });
77
+ if (useModelValue.value) {
78
+ open.value = Boolean(props.modelValue);
79
+ }
80
+ })
94
81
 
95
82
  watch(open, (value) => {
96
- if (useModelValue.value) {
97
- emit('update:modelValue', value);
98
- }
99
- });
83
+ if (useModelValue.value) {
84
+ emit('update:modelValue', value);
85
+ }
86
+ })
100
87
 
101
- watch(
102
- () => props.modelValue,
103
- (value) => {
88
+ watch(() => props.modelValue, (value) => {
104
89
  open.value = !!value;
105
- },
106
- );
90
+ })
91
+
107
92
  </script>
108
93
 
109
94
  <style lang="scss" scoped>
110
95
  @use '@/assets/scss/unnnic' as *;
111
96
 
112
97
  * {
113
- margin: 0;
114
- padding: 0;
115
- box-sizing: border-box;
98
+ margin: 0;
99
+ padding: 0;
100
+ box-sizing: border-box;
116
101
  }
117
102
 
118
103
  .unnnic-popover {
119
- &__balloon {
120
- border-radius: $unnnic-radius-2;
121
- padding: $unnnic-space-4;
122
- background: $unnnic-color-bg-base;
123
- box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.16);
124
- // margin-top: $unnnic-space-1;
125
- position: fixed;
126
- width: v-bind(calculatedPopoverWidth);
127
- height: v-bind(popoverHeight);
128
- max-height: v-bind(popoverMaxHeight);
129
- overflow: auto;
130
-
131
- &::-webkit-scrollbar {
132
- width: $unnnic-spacing-inline-nano;
133
- }
134
-
135
- &::-webkit-scrollbar-thumb {
136
- background: $unnnic-color-neutral-cleanest;
137
- border-radius: $unnnic-border-radius-pill;
138
- }
139
-
140
- &::-webkit-scrollbar-track {
141
- background: $unnnic-color-neutral-soft;
142
- border-radius: $unnnic-border-radius-pill;
104
+ &__balloon {
105
+ border-radius: $unnnic-radius-2;
106
+ padding: $unnnic-space-4;
107
+ background: $unnnic-color-bg-base;
108
+ box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.16);
109
+ // margin-top: $unnnic-space-1;
110
+ position: fixed;
111
+ width: v-bind(calculatedPopoverWidth);
112
+ height: v-bind(popoverHeight);
113
+ max-height: v-bind(popoverMaxHeight);
114
+ overflow: auto;
115
+
116
+ &::-webkit-scrollbar {
117
+ width: $unnnic-spacing-inline-nano;
118
+ }
119
+
120
+ &::-webkit-scrollbar-thumb {
121
+ background: $unnnic-color-neutral-cleanest;
122
+ border-radius: $unnnic-border-radius-pill;
123
+ }
124
+
125
+ &::-webkit-scrollbar-track {
126
+ background: $unnnic-color-neutral-soft;
127
+ border-radius: $unnnic-border-radius-pill;
128
+ }
143
129
  }
144
- }
145
130
  }
146
- </style>
131
+ </style>
@@ -1,65 +1,59 @@
1
1
  <template>
2
- <div
3
- :class="[
4
- 'unnnic-select-option',
5
- {
2
+ <div :class="['unnnic-select-option', {
6
3
  'unnnic-select-option--disabled': props.disabled,
7
4
  'unnnic-select-option--active': props.active,
8
5
  'unnnic-select-option--focused': props.focused,
9
- },
10
- ]"
11
- >
12
- <p class="unnnic-select-option__label">{{ props.label }}</p>
13
- </div>
6
+ }]">
7
+ <p class="unnnic-select-option__label">{{ props.label }}</p>
8
+ </div>
14
9
  </template>
15
10
 
16
11
  <script setup lang="ts">
17
12
  defineOptions({
18
- name: 'UnnnicSelectOption',
19
- });
13
+ name: "UnnnicSelectOption"
14
+ })
20
15
 
21
16
  interface SelectOptionProps {
22
- label: string;
23
- disabled?: boolean;
24
- active?: boolean;
25
- focused?: boolean;
17
+ label: string;
18
+ disabled?: boolean;
19
+ active?: boolean;
20
+ focused?: boolean;
26
21
  }
27
22
 
28
23
  const props = withDefaults(defineProps<SelectOptionProps>(), {
29
- disabled: false,
30
- active: false,
31
- focused: false,
32
- });
24
+ disabled: false,
25
+ active: false,
26
+ focused: false,
27
+ })
33
28
  </script>
34
29
 
35
30
  <style lang="scss" scoped>
36
31
  @use '@/assets/scss/unnnic' as *;
37
32
  * {
38
- margin: 0;
39
- padding: 0;
40
- box-sizing: border-box;
33
+ margin: 0;
34
+ padding: 0;
35
+ box-sizing: border-box;
41
36
  }
42
37
 
43
38
  .unnnic-select-option {
44
- cursor: pointer;
45
- border-radius: $unnnic-radius-1;
46
- padding: $unnnic-space-2 $unnnic-space-4;
47
- font: $unnnic-font-emphasis;
48
-
49
- &:hover:not(&--active):not(&--disabled),
50
- &--focused {
51
- background-color: $unnnic-color-bg-soft;
52
- }
53
-
54
- &--active {
55
- background-color: $unnnic-color-bg-active;
56
- color: $unnnic-color-fg-inverted;
57
- }
58
-
59
- &--disabled {
60
- color: $unnnic-color-fg-muted;
61
- background-color: $unnnic-color-bg-muted;
62
- cursor: not-allowed;
63
- }
39
+ cursor: pointer;
40
+ border-radius: $unnnic-radius-1;
41
+ padding: $unnnic-space-2 $unnnic-space-4;
42
+ font: $unnnic-font-emphasis;
43
+
44
+ &:hover:not(&--active):not(&--disabled), &--focused {
45
+ background-color: $unnnic-color-bg-soft;
46
+ }
47
+
48
+ &--active {
49
+ background-color: $unnnic-color-bg-active;
50
+ color: $unnnic-color-fg-inverted;
51
+ }
52
+
53
+ &--disabled {
54
+ color: $unnnic-color-fg-muted;
55
+ background-color: $unnnic-color-bg-muted;
56
+ cursor: not-allowed;
57
+ }
64
58
  }
65
- </style>
59
+ </style>
@@ -5,9 +5,9 @@ import UnnnicSelect from '../index.vue';
5
5
  vi.mock('../../mixins/i18n', () => ({
6
6
  default: {
7
7
  methods: {
8
- $t: (key) => key,
9
- },
10
- },
8
+ $t: (key) => key
9
+ }
10
+ }
11
11
  }));
12
12
 
13
13
  describe('UnnnicSelect.vue', () => {
@@ -17,23 +17,23 @@ describe('UnnnicSelect.vue', () => {
17
17
  options: [
18
18
  { label: 'Option 1', value: 'option1' },
19
19
  { label: 'Option 2', value: 'option2' },
20
- { label: 'Option 3', value: 'option3' },
20
+ { label: 'Option 3', value: 'option3' }
21
21
  ],
22
- modelValue: null,
22
+ modelValue: null
23
23
  };
24
24
 
25
25
  const mountWrapper = (props = {}, slots = {}) => {
26
26
  return mount(UnnnicSelect, {
27
27
  props: {
28
28
  ...defaultProps,
29
- ...props,
29
+ ...props
30
30
  },
31
31
  global: {
32
32
  mocks: {
33
- $t: (key) => key,
34
- },
33
+ $t: (key) => key
34
+ }
35
35
  },
36
- slots,
36
+ slots
37
37
  });
38
38
  };
39
39
 
@@ -119,10 +119,10 @@ describe('UnnnicSelect.vue', () => {
119
119
 
120
120
  test('input shows correct icon based on popover state', async () => {
121
121
  const input = wrapper.findComponent({ name: 'UnnnicInput' });
122
-
122
+
123
123
  // Initially closed
124
124
  expect(input.props('iconRight')).toBe('keyboard_arrow_down');
125
-
125
+
126
126
  // When popover is open
127
127
  wrapper.vm.openPopover = true;
128
128
  await wrapper.vm.$nextTick();
@@ -135,9 +135,9 @@ describe('UnnnicSelect.vue', () => {
135
135
  wrapper.vm.openPopover = true;
136
136
  await wrapper.vm.$nextTick();
137
137
  const options = wrapper.findAllComponents({ name: 'UnnnicSelectOption' });
138
-
138
+
139
139
  await options[0].vm.$emit('click');
140
-
140
+
141
141
  expect(wrapper.emitted('update:modelValue')).toBeTruthy();
142
142
  expect(wrapper.emitted('update:modelValue')[0]).toEqual(['option1']);
143
143
  });
@@ -147,12 +147,10 @@ describe('UnnnicSelect.vue', () => {
147
147
  wrapper.vm.openPopover = true;
148
148
  await wrapper.vm.$nextTick();
149
149
  const options = wrapper.findAllComponents({ name: 'UnnnicSelectOption' });
150
-
150
+
151
151
  await options[0].vm.$emit('click');
152
-
153
- expect(wrapper.emitted('update:modelValue')[0]).toEqual([
154
- { label: 'Option 1', value: 'option1' },
155
- ]);
152
+
153
+ expect(wrapper.emitted('update:modelValue')[0]).toEqual([{ label: 'Option 1', value: 'option1' }]);
156
154
  });
157
155
 
158
156
  test('does not emit when same option is selected', async () => {
@@ -160,25 +158,25 @@ describe('UnnnicSelect.vue', () => {
160
158
  wrapper.vm.openPopover = true;
161
159
  await wrapper.vm.$nextTick();
162
160
  const options = wrapper.findAllComponents({ name: 'UnnnicSelectOption' });
163
-
161
+
164
162
  await options[0].vm.$emit('click');
165
-
163
+
166
164
  expect(wrapper.emitted('update:modelValue')).toBeFalsy();
167
165
  });
168
166
 
169
167
  test('does not emit when disabled option is clicked', async () => {
170
168
  const disabledOptions = [
171
169
  { label: 'Option 1', value: 'option1' },
172
- { label: 'Disabled Option', value: 'disabled', disabled: true },
170
+ { label: 'Disabled Option', value: 'disabled', disabled: true }
173
171
  ];
174
-
172
+
175
173
  await wrapper.setProps({ options: disabledOptions });
176
174
  wrapper.vm.openPopover = true;
177
175
  await wrapper.vm.$nextTick();
178
176
  const options = wrapper.findAllComponents({ name: 'UnnnicSelectOption' });
179
-
177
+
180
178
  await options[1].vm.$emit('click');
181
-
179
+
182
180
  expect(wrapper.emitted('update:modelValue')).toBeFalsy();
183
181
  });
184
182
  });
@@ -199,20 +197,20 @@ describe('UnnnicSelect.vue', () => {
199
197
  });
200
198
 
201
199
  test('emits update:search when search input changes', async () => {
202
- await wrapper.setProps({ enableSearch: true });
200
+ await wrapper.setProps({ enableSearch: true});
203
201
  wrapper.vm.openPopover = true;
204
202
  await wrapper.vm.$nextTick();
205
203
  const searchInput = wrapper.findAllComponents({ name: 'UnnnicInput' })[1];
206
-
204
+
207
205
  await searchInput.vm.$emit('update:modelValue', 'test search');
208
-
206
+
209
207
  expect(wrapper.emitted('update:search')).toBeTruthy();
210
208
  expect(wrapper.emitted('update:search')[0]).toEqual(['test search']);
211
209
  });
212
210
 
213
211
  test('filters options based on search term', async () => {
214
212
  await wrapper.setProps({ enableSearch: true, search: 'Option 1' });
215
-
213
+
216
214
  const filteredOptions = wrapper.vm.filteredOptions;
217
215
  expect(filteredOptions.length).toBe(1);
218
216
  expect(filteredOptions[0].label).toBe('Option 1');
@@ -220,7 +218,7 @@ describe('UnnnicSelect.vue', () => {
220
218
 
221
219
  test('filters options by both label and value', async () => {
222
220
  await wrapper.setProps({ enableSearch: true, search: 'option1' });
223
-
221
+
224
222
  const filteredOptions = wrapper.vm.filteredOptions;
225
223
  expect(filteredOptions.length).toBe(1);
226
224
  expect(filteredOptions[0].value).toBe('option1');
@@ -228,7 +226,7 @@ describe('UnnnicSelect.vue', () => {
228
226
 
229
227
  test('shows all options when search is empty', async () => {
230
228
  await wrapper.setProps({ enableSearch: true, search: '' });
231
-
229
+
232
230
  const filteredOptions = wrapper.vm.filteredOptions;
233
231
  expect(filteredOptions.length).toBe(3);
234
232
  });
@@ -261,10 +259,7 @@ describe('UnnnicSelect.vue', () => {
261
259
 
262
260
  test('selectedItem returns modelValue for returnObject true', async () => {
263
261
  const selectedOption = { label: 'Option 2', value: 'option2' };
264
- await wrapper.setProps({
265
- returnObject: true,
266
- modelValue: selectedOption,
267
- });
262
+ await wrapper.setProps({ returnObject: true, modelValue: selectedOption });
268
263
  const selectedItem = wrapper.vm.selectedItem;
269
264
  expect(selectedItem).toStrictEqual(selectedOption);
270
265
  });
@@ -331,16 +326,16 @@ describe('UnnnicSelect.vue', () => {
331
326
  test('uses custom itemLabel and itemValue', async () => {
332
327
  const customOptions = [
333
328
  { name: 'Custom 1', id: 'custom1' },
334
- { name: 'Custom 2', id: 'custom2' },
329
+ { name: 'Custom 2', id: 'custom2' }
335
330
  ];
336
-
337
- await wrapper.setProps({
338
- options: customOptions,
339
- itemLabel: 'name',
331
+
332
+ await wrapper.setProps({
333
+ options: customOptions,
334
+ itemLabel: 'name',
340
335
  itemValue: 'id',
341
- modelValue: 'custom1',
336
+ modelValue: 'custom1'
342
337
  });
343
-
338
+
344
339
  const inputValue = wrapper.vm.inputValue;
345
340
  expect(inputValue).toBe('Custom 1');
346
341
  });
@@ -3,9 +3,9 @@ import { beforeEach, describe, expect, test } from 'vitest';
3
3
  import SelectItem from '../SelectItem.vue';
4
4
 
5
5
  const createWrapper = (props = {}, slots = {}) => {
6
- return mount(SelectItem, {
6
+ return mount(SelectItem, {
7
7
  props,
8
- slots: slots.default ? { default: slots.default } : {},
8
+ slots: slots.default ? { default: slots.default } : {}
9
9
  });
10
10
  };
11
11
 
@@ -76,12 +76,8 @@ describe('SelectItem.vue', () => {
76
76
  test('does not apply size class when size is empty', async () => {
77
77
  await wrapper.setProps({ size: '' });
78
78
  const labelElement = wrapper.find('.unnnic-select-item__label');
79
- expect(labelElement.classes()).not.toContain(
80
- 'unnnic-select-item__label--md',
81
- );
82
- expect(labelElement.classes()).not.toContain(
83
- 'unnnic-select-item__label--sm',
84
- );
79
+ expect(labelElement.classes()).not.toContain('unnnic-select-item__label--md');
80
+ expect(labelElement.classes()).not.toContain('unnnic-select-item__label--sm');
85
81
  });
86
82
  });
87
83
 
@@ -132,10 +128,7 @@ describe('SelectItem.vue', () => {
132
128
  });
133
129
 
134
130
  test('emits click event even when selectable is false', async () => {
135
- const clickWrapper = createWrapper(
136
- { selectable: false },
137
- { default: 'Test Item' },
138
- );
131
+ const clickWrapper = createWrapper({ selectable: false }, { default: 'Test Item' });
139
132
  await clickWrapper.trigger('click');
140
133
  expect(clickWrapper.emitted('click')).toBeTruthy();
141
134
  expect(clickWrapper.emitted('click').length).toBeGreaterThanOrEqual(1);
@@ -201,7 +194,7 @@ describe('SelectItem.vue', () => {
201
194
  test('has proper semantic structure', () => {
202
195
  const div = wrapper.find('.unnnic-select-item');
203
196
  const span = wrapper.find('.unnnic-select-item__label');
204
-
197
+
205
198
  expect(div.exists()).toBe(true);
206
199
  expect(span.exists()).toBe(true);
207
200
  expect(span.element.tagName).toBe('SPAN');
@@ -221,8 +214,7 @@ describe('SelectItem.vue', () => {
221
214
  });
222
215
 
223
216
  test('handles long slot content', async () => {
224
- const longText =
225
- 'This is a very long text content that should be handled properly by the component';
217
+ const longText = 'This is a very long text content that should be handled properly by the component';
226
218
  const longWrapper = createWrapper({}, { default: longText });
227
219
  const labelElement = longWrapper.find('.unnnic-select-item__label');
228
220
  expect(labelElement.text()).toBe(longText);
@@ -245,12 +237,8 @@ describe('SelectItem.vue', () => {
245
237
 
246
238
  describe('CSS class combinations', () => {
247
239
  test('applies correct classes for non-selectable inactive item', async () => {
248
- await wrapper.setProps({
249
- selectable: false,
250
- active: false,
251
- textFocused: false,
252
- });
253
-
240
+ await wrapper.setProps({ selectable: false, active: false, textFocused: false });
241
+
254
242
  expect(wrapper.classes()).toContain('unnnic-select-item');
255
243
  expect(wrapper.classes()).not.toContain('unnnic-select-item--selectable');
256
244
  expect(wrapper.classes()).not.toContain('unnnic--clickable');
@@ -259,12 +247,8 @@ describe('SelectItem.vue', () => {
259
247
  });
260
248
 
261
249
  test('applies correct classes for selectable active item', async () => {
262
- await wrapper.setProps({
263
- selectable: true,
264
- active: true,
265
- textFocused: false,
266
- });
267
-
250
+ await wrapper.setProps({ selectable: true, active: true, textFocused: false });
251
+
268
252
  expect(wrapper.classes()).toContain('unnnic-select-item');
269
253
  expect(wrapper.classes()).toContain('unnnic-select-item--selectable');
270
254
  expect(wrapper.classes()).toContain('unnnic--clickable');
@@ -273,12 +257,8 @@ describe('SelectItem.vue', () => {
273
257
  });
274
258
 
275
259
  test('applies correct classes for text-focused item', async () => {
276
- await wrapper.setProps({
277
- selectable: true,
278
- active: false,
279
- textFocused: true,
280
- });
281
-
260
+ await wrapper.setProps({ selectable: true, active: false, textFocused: true });
261
+
282
262
  expect(wrapper.classes()).toContain('unnnic-select-item');
283
263
  expect(wrapper.classes()).toContain('unnnic-select-item--selectable');
284
264
  expect(wrapper.classes()).toContain('unnnic--clickable');
@@ -318,11 +298,11 @@ describe('SelectItem.vue', () => {
318
298
  });
319
299
 
320
300
  test('matches snapshot with all states combined', async () => {
321
- await wrapper.setProps({
301
+ await wrapper.setProps({
322
302
  size: 'md',
323
303
  selectable: true,
324
304
  active: true,
325
- textFocused: true,
305
+ textFocused: true
326
306
  });
327
307
  expect(wrapper.html()).toMatchSnapshot();
328
308
  });
@@ -89,9 +89,7 @@ describe('SelectOption.vue', () => {
89
89
  disabled: false,
90
90
  });
91
91
 
92
- expect(wrapper.find('.unnnic-select-option__label').text()).toBe(
93
- 'Complex Option',
94
- );
92
+ expect(wrapper.find('.unnnic-select-option__label').text()).toBe('Complex Option');
95
93
  expect(wrapper.classes()).toContain('unnnic-select-option--active');
96
94
  expect(wrapper.classes()).not.toContain('unnnic-select-option--disabled');
97
95
  });
@@ -116,7 +114,7 @@ describe('SelectOption.vue', () => {
116
114
  test('has proper semantic structure', () => {
117
115
  const div = wrapper.find('.unnnic-select-option');
118
116
  const p = wrapper.find('.unnnic-select-option__label');
119
-
117
+
120
118
  expect(div.exists()).toBe(true);
121
119
  expect(p.exists()).toBe(true);
122
120
  expect(p.element.tagName).toBe('P');
@@ -136,8 +134,7 @@ describe('SelectOption.vue', () => {
136
134
  });
137
135
 
138
136
  test('handles long label text', async () => {
139
- const longText =
140
- 'This is a very long label text that should be handled properly by the component';
137
+ const longText = 'This is a very long label text that should be handled properly by the component';
141
138
  await wrapper.setProps({ label: longText });
142
139
  const labelElement = wrapper.find('.unnnic-select-option__label');
143
140
  expect(labelElement.text()).toBe(longText);