@volverjs/ui-vue 0.0.10-beta.31 → 0.0.10-beta.33
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/dist/components/VvAccordion/VvAccordion.vue.d.ts +1 -131
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +4 -3
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +5 -5
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +6 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +1 -6
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +4 -8
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +2 -8
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -8
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +0 -22
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +16 -7
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +7 -0
- package/dist/components/VvButtonGroup/index.d.ts +3 -0
- package/dist/components/VvCard/VvCard.es.js +1 -6
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +2 -23
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +6 -24
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +12 -31
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +29 -23
- package/dist/components/VvCombobox/index.d.ts +7 -7
- package/dist/components/VvDialog/VvDialog.es.js +1 -6
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +23 -23
- package/dist/components/VvDropdown/index.d.ts +7 -7
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +0 -5
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +1 -6
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +0 -22
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +16 -4
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvNav/VvNav.es.js +8 -10
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +4 -1
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +3 -3
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +0 -22
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +4 -23
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvTab/VvTab.es.js +7 -9
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/index.es.js +87 -69
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +7 -7
- package/dist/stories/Accordion/Accordion.settings.d.ts +2 -57
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +2 -66
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -181
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +370 -11
- package/dist/stories/Alert/Alert.settings.d.ts +2 -109
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +2 -85
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +2 -38
- package/dist/stories/Badge/Badge.settings.d.ts +2 -26
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +2 -18
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +2 -193
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +2 -40
- package/dist/stories/Card/Card.settings.d.ts +2 -63
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +2 -132
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -141
- package/dist/stories/Combobox/Combobox.settings.d.ts +2 -617
- package/dist/stories/Dialog/Dialog.settings.d.ts +2 -47
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +2 -205
- package/dist/stories/Icon/Icon.settings.d.ts +2 -68
- package/dist/stories/InputFile/InputFile.settings.d.ts +2 -52
- package/dist/stories/InputText/InputText.settings.d.ts +2 -438
- package/dist/stories/Nav/Nav.settings.d.ts +2 -10
- package/dist/stories/Progress/Progress.settings.d.ts +2 -27
- package/dist/stories/Radio/Radio.settings.d.ts +1 -110
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -141
- package/dist/stories/Select/Select.settings.d.ts +2 -246
- package/dist/stories/Textarea/Textarea.settings.d.ts +2 -287
- package/dist/stories/argTypes.d.ts +27 -866
- package/package.json +45 -45
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAlert/index.ts +4 -4
- package/src/components/VvAlertGroup/VvAlertGroup.vue +0 -1
- package/src/components/VvBadge/VvBadge.vue +1 -1
- package/src/components/VvButtonGroup/VvButtonGroup.vue +11 -2
- package/src/components/VvButtonGroup/index.ts +1 -0
- package/src/components/VvCheckbox/VvCheckbox.vue +2 -5
- package/src/components/VvCombobox/VvCombobox.vue +2 -1
- package/src/components/VvInputText/VvInputText.vue +18 -3
- package/src/components/VvNav/VvNav.vue +1 -6
- package/src/components/VvNav/VvNavItem.vue +1 -1
- package/src/components/VvProgress/VvProgress.vue +0 -1
- package/src/composables/alert/useAlert.ts +3 -3
- package/src/stories/Accordion/Accordion.settings.ts +3 -2
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +4 -3
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +4 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +2 -6
- package/src/stories/Alert/Alert.settings.ts +8 -7
- package/src/stories/Alert/Alert.test.ts +1 -3
- package/src/stories/AlertGroup/AlertGroup.settings.ts +3 -1
- package/src/stories/AlertGroup/AlertGroup.test.ts +5 -7
- package/src/stories/Avatar/Avatar.test.ts +1 -3
- package/src/stories/Avatar/AvatarModifiers.stories.ts +1 -0
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +2 -1
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -3
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +1 -0
- package/src/stories/Badge/Badge.settings.ts +2 -1
- package/src/stories/Badge/Badge.stories.ts +2 -2
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +2 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +1 -1
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
- package/src/stories/Button/Button.settings.ts +6 -6
- package/src/stories/Button/Button.stories.ts +1 -1
- package/src/stories/Button/Button.test.ts +1 -3
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +11 -1
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +2 -6
- package/src/stories/Card/Card.settings.ts +2 -1
- package/src/stories/Card/Card.test.ts +1 -3
- package/src/stories/Checkbox/Checkbox.settings.ts +5 -3
- package/src/stories/Checkbox/Checkbox.test.ts +2 -6
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -6
- package/src/stories/Combobox/Combobox.settings.ts +10 -10
- package/src/stories/Combobox/Combobox.test.ts +2 -6
- package/src/stories/Dialog/Dialog.settings.ts +2 -1
- package/src/stories/Dialog/Dialog.test.ts +3 -8
- package/src/stories/Dropdown/Dropdown.settings.ts +2 -1
- package/src/stories/Dropdown/Dropdown.test.ts +2 -6
- package/src/stories/Dropdown/DropdownSlots.stories.ts +1 -1
- package/src/stories/Icon/Icon.settings.ts +2 -1
- package/src/stories/Icon/Icon.stories.ts +0 -1
- package/src/stories/InputFile/InputFile.settings.ts +2 -1
- package/src/stories/InputText/InputText.settings.ts +8 -6
- package/src/stories/InputText/InputText.test.ts +2 -6
- package/src/stories/InputText/InputTextMinMax.stories.ts +1 -1
- package/src/stories/Nav/Nav.settings.ts +2 -2
- package/src/stories/Nav/Nav.stories.ts +1 -1
- package/src/stories/Nav/Nav.test.ts +2 -4
- package/src/stories/Progress/Progress.settings.ts +2 -1
- package/src/stories/Radio/Radio.test.ts +2 -6
- package/src/stories/RadioGroup/RadioGroup.stories.ts +1 -2
- package/src/stories/RadioGroup/RadioGroup.test.ts +2 -6
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +1 -1
- package/src/stories/Select/Select.settings.ts +4 -3
- package/src/stories/Select/Select.test.ts +3 -9
- package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
- package/src/stories/Select/SelectOptions.stories.ts +0 -1
- package/src/stories/Tab/Tab.test.ts +3 -5
- package/src/stories/Textarea/Textarea.settings.ts +5 -3
- package/src/stories/Textarea/Textarea.test.ts +2 -6
- package/src/stories/Tooltip/Tooltip.settings.ts +1 -1
- package/src/stories/Tooltip/Tooltip.test.ts +3 -5
- package/src/stories/argTypes.ts +47 -46
|
@@ -5,12 +5,8 @@ import { within } from '@storybook/test'
|
|
|
5
5
|
export async function defaultTest(
|
|
6
6
|
{ canvasElement, args }: PlayAttributes = {} as PlayAttributes,
|
|
7
7
|
) {
|
|
8
|
-
const buttonGroup =
|
|
9
|
-
|
|
10
|
-
)) as HTMLElement
|
|
11
|
-
const firstButton = (await within(canvasElement).findByTestId(
|
|
12
|
-
'first-button',
|
|
13
|
-
)) as HTMLElement
|
|
8
|
+
const buttonGroup = await within(canvasElement).findByTestId('button-group')
|
|
9
|
+
const firstButton = await within(canvasElement).findByTestId('first-button')
|
|
14
10
|
const modifiers =
|
|
15
11
|
!args.modifiers || Array.isArray(args.modifiers)
|
|
16
12
|
? args.modifiers
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DefaultSlotArgTypes, ModifiersArgTypes } from '@/stories/argTypes'
|
|
2
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
2
3
|
|
|
3
4
|
export const defaultArgs = {
|
|
4
5
|
title: 'Card title',
|
|
@@ -6,7 +7,7 @@ export const defaultArgs = {
|
|
|
6
7
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean turpis diam, tempor non sem ut, suscipit gravida mi.',
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const argTypes = {
|
|
10
|
+
export const argTypes: ArgTypes = {
|
|
10
11
|
modifiers: {
|
|
11
12
|
...ModifiersArgTypes.modifiers,
|
|
12
13
|
options: ['glass'],
|
|
@@ -3,9 +3,7 @@ import { expect } from '@/test/expect'
|
|
|
3
3
|
import { within } from '@storybook/test'
|
|
4
4
|
|
|
5
5
|
export async function defaulTest({ canvasElement, args }: PlayAttributes) {
|
|
6
|
-
const element =
|
|
7
|
-
'card',
|
|
8
|
-
)) as HTMLElement
|
|
6
|
+
const element = await within(canvasElement).findByTestId('card')
|
|
9
7
|
const modifiers =
|
|
10
8
|
!args.modifiers || Array.isArray(args.modifiers)
|
|
11
9
|
? args.modifiers
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CheckboxRadioArgTypes } from '@/stories/argTypes'
|
|
2
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
2
3
|
|
|
3
4
|
export const defaultArgs = {
|
|
4
5
|
name: 'checkbox',
|
|
@@ -14,13 +15,14 @@ export const defaultArgs = {
|
|
|
14
15
|
uncheckedValue: undefined,
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
export const argTypes: ArgTypes = {
|
|
18
20
|
...CheckboxRadioArgTypes,
|
|
19
21
|
indeterminate: {
|
|
20
22
|
description: 'If true, the input will be indeterminated',
|
|
21
23
|
table: {
|
|
22
24
|
defaultValue: {
|
|
23
|
-
summary: false,
|
|
25
|
+
summary: 'false',
|
|
24
26
|
},
|
|
25
27
|
},
|
|
26
28
|
},
|
|
@@ -34,7 +36,7 @@ export const argTypes = {
|
|
|
34
36
|
description: 'If true, the input will be displayed as a switch.',
|
|
35
37
|
table: {
|
|
36
38
|
defaultValue: {
|
|
37
|
-
summary: false,
|
|
39
|
+
summary: 'false',
|
|
38
40
|
},
|
|
39
41
|
},
|
|
40
42
|
},
|
|
@@ -4,12 +4,8 @@ import { sleep } from '@/test/sleep'
|
|
|
4
4
|
import { within } from '@storybook/test'
|
|
5
5
|
|
|
6
6
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
7
|
-
const element =
|
|
8
|
-
|
|
9
|
-
)) as HTMLElement
|
|
10
|
-
const value = (await within(canvasElement).findByTestId(
|
|
11
|
-
'value',
|
|
12
|
-
)) as HTMLElement
|
|
7
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
8
|
+
const value = await within(canvasElement).findByTestId('value')
|
|
13
9
|
const input = element.getElementsByTagName('input')[0]
|
|
14
10
|
const hint = element.getElementsByClassName('vv-checkbox__hint')[0]
|
|
15
11
|
|
|
@@ -5,12 +5,8 @@ import { within } from '@storybook/test'
|
|
|
5
5
|
import { getOptionValue } from '@/test/options'
|
|
6
6
|
|
|
7
7
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
8
|
-
const element =
|
|
9
|
-
|
|
10
|
-
)) as HTMLElement
|
|
11
|
-
const value = (await within(canvasElement).findByTestId(
|
|
12
|
-
'value',
|
|
13
|
-
)) as HTMLElement
|
|
8
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
9
|
+
const value = await within(canvasElement).findByTestId('value')
|
|
14
10
|
const checkbox = element.getElementsByClassName('vv-checkbox')[0]
|
|
15
11
|
const input = checkbox.getElementsByTagName('input')[0]
|
|
16
12
|
const hint = element.getElementsByClassName('vv-checkbox-group__hint')[0]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VvCombobox } from '@/components'
|
|
2
|
-
import type { Meta } from '@storybook/vue3'
|
|
2
|
+
import type { ArgTypes, Meta } from '@storybook/vue3'
|
|
3
3
|
import {
|
|
4
4
|
ValidArgTypes,
|
|
5
5
|
InvalidArgTypes,
|
|
@@ -48,7 +48,7 @@ export const defaultArgs: Meta<typeof VvCombobox>['args'] = {
|
|
|
48
48
|
strategy: 'fixed',
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export const argTypes = {
|
|
51
|
+
export const argTypes: ArgTypes = {
|
|
52
52
|
...TabindexArgTypes,
|
|
53
53
|
...ValidArgTypes,
|
|
54
54
|
...InvalidArgTypes,
|
|
@@ -66,7 +66,7 @@ export const argTypes = {
|
|
|
66
66
|
...DropdownArgTypes.triggerWidth,
|
|
67
67
|
table: {
|
|
68
68
|
defaultValue: {
|
|
69
|
-
summary: true,
|
|
69
|
+
summary: 'true',
|
|
70
70
|
},
|
|
71
71
|
},
|
|
72
72
|
},
|
|
@@ -75,7 +75,7 @@ export const argTypes = {
|
|
|
75
75
|
' This Boolean attribute indicates that multiple options can be selected in the list.',
|
|
76
76
|
table: {
|
|
77
77
|
defaultValue: {
|
|
78
|
-
summary: false,
|
|
78
|
+
summary: 'false',
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
},
|
|
@@ -183,7 +183,7 @@ export const argTypes = {
|
|
|
183
183
|
description: 'Enable search in options',
|
|
184
184
|
table: {
|
|
185
185
|
defaultValue: {
|
|
186
|
-
summary: false,
|
|
186
|
+
summary: 'false',
|
|
187
187
|
},
|
|
188
188
|
},
|
|
189
189
|
},
|
|
@@ -235,7 +235,7 @@ export const argTypes = {
|
|
|
235
235
|
description: 'Show native select',
|
|
236
236
|
table: {
|
|
237
237
|
defaultValue: {
|
|
238
|
-
summary: false,
|
|
238
|
+
summary: 'false',
|
|
239
239
|
},
|
|
240
240
|
},
|
|
241
241
|
},
|
|
@@ -243,7 +243,7 @@ export const argTypes = {
|
|
|
243
243
|
description: 'Show badges for selected values',
|
|
244
244
|
table: {
|
|
245
245
|
defaultValue: {
|
|
246
|
-
summary: false,
|
|
246
|
+
summary: 'false',
|
|
247
247
|
},
|
|
248
248
|
},
|
|
249
249
|
},
|
|
@@ -284,7 +284,7 @@ export const argTypes = {
|
|
|
284
284
|
description: 'Open dropdown on focus',
|
|
285
285
|
table: {
|
|
286
286
|
defaultValue: {
|
|
287
|
-
summary: false,
|
|
287
|
+
summary: 'false',
|
|
288
288
|
},
|
|
289
289
|
},
|
|
290
290
|
},
|
|
@@ -292,7 +292,7 @@ export const argTypes = {
|
|
|
292
292
|
description: 'Keep open dropdown on signle select',
|
|
293
293
|
table: {
|
|
294
294
|
defaultValue: {
|
|
295
|
-
summary: false,
|
|
295
|
+
summary: 'false',
|
|
296
296
|
},
|
|
297
297
|
},
|
|
298
298
|
},
|
|
@@ -300,7 +300,7 @@ export const argTypes = {
|
|
|
300
300
|
description: 'Autofocus first option on open dropdown',
|
|
301
301
|
table: {
|
|
302
302
|
defaultValue: {
|
|
303
|
-
summary: true,
|
|
303
|
+
summary: 'true',
|
|
304
304
|
},
|
|
305
305
|
},
|
|
306
306
|
},
|
|
@@ -11,12 +11,8 @@ export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
|
11
11
|
return
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const element =
|
|
15
|
-
|
|
16
|
-
)) as HTMLElement
|
|
17
|
-
const value = (await within(canvasElement).findByTestId(
|
|
18
|
-
'value',
|
|
19
|
-
)) as HTMLElement
|
|
14
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
15
|
+
const value = await within(canvasElement).findByTestId('value')
|
|
20
16
|
const dropdown = element.getElementsByClassName(
|
|
21
17
|
'vv-dropdown',
|
|
22
18
|
)[0] as HTMLElement
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DefaultSlotArgTypes } from '@/stories/argTypes'
|
|
2
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
2
3
|
|
|
3
4
|
export const defaultArgs = {
|
|
4
5
|
id: 'dialog',
|
|
@@ -9,7 +10,7 @@ export const defaultArgs = {
|
|
|
9
10
|
default: 'Default slot content',
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export const argTypes = {
|
|
13
|
+
export const argTypes: ArgTypes = {
|
|
13
14
|
title: { control: 'text' },
|
|
14
15
|
transition: {
|
|
15
16
|
control: 'radio',
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import type { PlayAttributes } from '@/test/types'
|
|
2
2
|
import { expect } from '@/test/expect'
|
|
3
|
-
import { userEvent } from '@storybook/test'
|
|
4
|
-
import { within } from '@storybook/test'
|
|
3
|
+
import { userEvent, within } from '@storybook/test'
|
|
5
4
|
import { sleep } from '@/test/sleep'
|
|
6
5
|
|
|
7
6
|
export async function defaultTest(
|
|
8
7
|
{ canvasElement, args }: PlayAttributes = {} as PlayAttributes,
|
|
9
8
|
) {
|
|
10
|
-
const element =
|
|
11
|
-
|
|
12
|
-
)) as HTMLDialogElement
|
|
13
|
-
const button = (await within(canvasElement).findByTestId(
|
|
14
|
-
'button',
|
|
15
|
-
)) as HTMLButtonElement
|
|
9
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
10
|
+
const button = await within(canvasElement).findByTestId('button')
|
|
16
11
|
|
|
17
12
|
// hidden
|
|
18
13
|
await expect(element?.style.display).toEqual('none')
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { VvDropdownProps } from '@/components/VvDropdown'
|
|
2
2
|
import { DropdownRole } from '@/constants'
|
|
3
3
|
import { DropdownArgTypes } from '../argTypes'
|
|
4
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
4
5
|
|
|
5
6
|
export const defaultArgs = {
|
|
6
7
|
...propsToObject(VvDropdownProps),
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const argTypes = {
|
|
10
|
+
export const argTypes: ArgTypes = {
|
|
10
11
|
...DropdownArgTypes,
|
|
11
12
|
role: {
|
|
12
13
|
description: 'Dropdown role',
|
|
@@ -4,12 +4,8 @@ import { sleep } from '@/test/sleep'
|
|
|
4
4
|
import { within } from '@storybook/test'
|
|
5
5
|
|
|
6
6
|
export async function defaultTest({ canvasElement }: PlayAttributes) {
|
|
7
|
-
const wrapper =
|
|
8
|
-
|
|
9
|
-
)) as HTMLElement
|
|
10
|
-
const trigger = (await within(canvasElement).findByTestId(
|
|
11
|
-
'trigger',
|
|
12
|
-
)) as HTMLElement
|
|
7
|
+
const wrapper = await within(canvasElement).findByTestId('wrapper')
|
|
8
|
+
const trigger = await within(canvasElement).findByTestId('trigger')
|
|
13
9
|
|
|
14
10
|
await expect(trigger).toBeClicked()
|
|
15
11
|
await sleep(100)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { VvIconPropsDefaults } from '@/components/VvIcon'
|
|
2
2
|
import normal from '@/assets/icons/normal.json'
|
|
3
3
|
import { ModifiersArgTypes } from '@/stories/argTypes'
|
|
4
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
4
5
|
|
|
5
6
|
export const defaultArgs = {
|
|
6
7
|
...VvIconPropsDefaults,
|
|
@@ -8,7 +9,7 @@ export const defaultArgs = {
|
|
|
8
9
|
width: 48,
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export const argTypes = {
|
|
12
|
+
export const argTypes: ArgTypes = {
|
|
12
13
|
name: {
|
|
13
14
|
options: Object.keys(normal.icons),
|
|
14
15
|
control: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HintArgTypes, ModifiersArgTypes } from '@/stories/argTypes'
|
|
2
2
|
import { VvInputFileProps } from '@/components/VvInputFile'
|
|
3
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
3
4
|
|
|
4
5
|
export const defaultArgs = {
|
|
5
6
|
...propsToObject(VvInputFileProps),
|
|
@@ -7,7 +8,7 @@ export const defaultArgs = {
|
|
|
7
8
|
label: 'Upload file',
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
export const argTypes = {
|
|
11
|
+
export const argTypes: ArgTypes = {
|
|
11
12
|
...HintArgTypes,
|
|
12
13
|
modifiers: {
|
|
13
14
|
...ModifiersArgTypes.modifiers,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HintArgTypes, InputTextareaArgTypes } from '@/stories/argTypes'
|
|
2
2
|
import { VvInputTextProps } from '@/components/VvInputText'
|
|
3
3
|
import normal from '@/assets/icons/normal.json'
|
|
4
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
4
5
|
|
|
5
6
|
export const defaultArgs = {
|
|
6
7
|
...propsToObject(VvInputTextProps),
|
|
@@ -13,7 +14,8 @@ export const defaultArgs = {
|
|
|
13
14
|
maxlength: undefined,
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
export const argTypes: ArgTypes = {
|
|
17
19
|
...InputTextareaArgTypes,
|
|
18
20
|
...HintArgTypes,
|
|
19
21
|
type: {
|
|
@@ -61,7 +63,7 @@ export const argTypes = {
|
|
|
61
63
|
'Incremental values that are valid. Available for input types: date, month, week, time, datetime-local and number.',
|
|
62
64
|
table: {
|
|
63
65
|
defaultValue: {
|
|
64
|
-
summary: 1,
|
|
66
|
+
summary: '1',
|
|
65
67
|
},
|
|
66
68
|
},
|
|
67
69
|
},
|
|
@@ -77,7 +79,7 @@ export const argTypes = {
|
|
|
77
79
|
'Whether to allow multiple values. Available for input type email.',
|
|
78
80
|
table: {
|
|
79
81
|
defaultValue: {
|
|
80
|
-
summary: false,
|
|
82
|
+
summary: 'false',
|
|
81
83
|
},
|
|
82
84
|
},
|
|
83
85
|
},
|
|
@@ -193,7 +195,7 @@ export const argTypes = {
|
|
|
193
195
|
},
|
|
194
196
|
table: {
|
|
195
197
|
defaultValue: {
|
|
196
|
-
summary: false,
|
|
198
|
+
summary: 'false',
|
|
197
199
|
},
|
|
198
200
|
type: {
|
|
199
201
|
summary: 'boolean',
|
|
@@ -207,7 +209,7 @@ export const argTypes = {
|
|
|
207
209
|
},
|
|
208
210
|
table: {
|
|
209
211
|
defaultValue: {
|
|
210
|
-
summary: false,
|
|
212
|
+
summary: 'false',
|
|
211
213
|
},
|
|
212
214
|
type: {
|
|
213
215
|
summary: 'boolean',
|
|
@@ -227,7 +229,7 @@ export const argTypes = {
|
|
|
227
229
|
},
|
|
228
230
|
table: {
|
|
229
231
|
defaultValue: {
|
|
230
|
-
summary: false,
|
|
232
|
+
summary: 'false',
|
|
231
233
|
},
|
|
232
234
|
type: {
|
|
233
235
|
summary: 'boolean',
|
|
@@ -50,12 +50,8 @@ const valueByType = (type: InputType, mask?: string, id?: string) => {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
53
|
-
const element =
|
|
54
|
-
|
|
55
|
-
)) as HTMLElement
|
|
56
|
-
const value = (await within(canvasElement).findByTestId(
|
|
57
|
-
'value',
|
|
58
|
-
)) as HTMLElement
|
|
53
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
54
|
+
const value = await within(canvasElement).findByTestId('value')
|
|
59
55
|
const input = element.getElementsByTagName('input')[0]
|
|
60
56
|
const hint = element.getElementsByClassName('vv-input-text__hint')[0]
|
|
61
57
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/vue3'
|
|
1
|
+
import type { ArgTypes, Meta } from '@storybook/vue3'
|
|
2
2
|
import type { VvNav } from '@/components'
|
|
3
3
|
import { VvNavProps } from '@/components/VvNav'
|
|
4
4
|
import { ModifiersArgTypes } from '@/stories/argTypes'
|
|
@@ -27,7 +27,7 @@ export const defaultArgs: Meta<typeof VvNav>['args'] = {
|
|
|
27
27
|
modifiers: 'sidebar',
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export const argTypes = {
|
|
30
|
+
export const argTypes: ArgTypes = {
|
|
31
31
|
modifiers: {
|
|
32
32
|
...ModifiersArgTypes.modifiers,
|
|
33
33
|
options: ['sidebar', 'aside', 'tabs', 'full'],
|
|
@@ -3,13 +3,11 @@ import { expect } from '@/test/expect'
|
|
|
3
3
|
import { within } from '@storybook/test'
|
|
4
4
|
|
|
5
5
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
6
|
-
const element =
|
|
7
|
-
'element',
|
|
8
|
-
)) as HTMLElement
|
|
6
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
9
7
|
|
|
10
8
|
const menuEl = element.getElementsByClassName('vv-nav__menu')[0]
|
|
11
9
|
|
|
12
|
-
if (!args.items
|
|
10
|
+
if (!args.items?.length) {
|
|
13
11
|
throw new Error('No items passed')
|
|
14
12
|
}
|
|
15
13
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ModifiersArgTypes } from '@/stories/argTypes'
|
|
2
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
2
3
|
|
|
3
4
|
export const defaultArgs = {
|
|
4
5
|
max: undefined,
|
|
5
6
|
value: undefined,
|
|
6
7
|
label: 'Progress bar',
|
|
7
8
|
}
|
|
8
|
-
export const argTypes = {
|
|
9
|
+
export const argTypes: ArgTypes = {
|
|
9
10
|
...ModifiersArgTypes,
|
|
10
11
|
max: {
|
|
11
12
|
description:
|
|
@@ -4,12 +4,8 @@ import { sleep } from '@/test/sleep'
|
|
|
4
4
|
import { within } from '@storybook/test'
|
|
5
5
|
|
|
6
6
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
7
|
-
const element =
|
|
8
|
-
|
|
9
|
-
)) as HTMLElement
|
|
10
|
-
const value = (await within(canvasElement).findByTestId(
|
|
11
|
-
'value',
|
|
12
|
-
)) as HTMLElement
|
|
7
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
8
|
+
const value = await within(canvasElement).findByTestId('value')
|
|
13
9
|
const input = element.getElementsByTagName('input')[0]
|
|
14
10
|
const hint = element.getElementsByClassName('vv-radio__hint')[0]
|
|
15
11
|
|
|
@@ -5,12 +5,8 @@ import { within } from '@storybook/test'
|
|
|
5
5
|
import { getOptionValue } from '@/test/options'
|
|
6
6
|
|
|
7
7
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
8
|
-
const element =
|
|
9
|
-
|
|
10
|
-
)) as HTMLElement
|
|
11
|
-
const value = (await within(canvasElement).findByTestId(
|
|
12
|
-
'value',
|
|
13
|
-
)) as HTMLElement
|
|
8
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
9
|
+
const value = await within(canvasElement).findByTestId('value')
|
|
14
10
|
const radio = element.getElementsByClassName('vv-radio')[0]
|
|
15
11
|
const input = radio.getElementsByTagName('input')[0]
|
|
16
12
|
const hint = element.getElementsByClassName('vv-radio-group__hint')[0]
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
AutocompleteArgTypes,
|
|
17
17
|
} from '@/stories/argTypes'
|
|
18
18
|
import { VvSelectProps } from '@/components/VvSelect'
|
|
19
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
19
20
|
|
|
20
21
|
export const defaultArgs = {
|
|
21
22
|
...propsToObject(VvSelectProps),
|
|
@@ -24,7 +25,7 @@ export const defaultArgs = {
|
|
|
24
25
|
placeholder: 'Select an option',
|
|
25
26
|
label: 'Select label',
|
|
26
27
|
}
|
|
27
|
-
export const argTypes = {
|
|
28
|
+
export const argTypes: ArgTypes = {
|
|
28
29
|
...IdNameArgTypes,
|
|
29
30
|
...AutofocusArgTypes,
|
|
30
31
|
...AutocompleteArgTypes,
|
|
@@ -45,7 +46,7 @@ export const argTypes = {
|
|
|
45
46
|
'This Boolean attribute indicates that multiple options can be selected in the list.',
|
|
46
47
|
table: {
|
|
47
48
|
defaultValue: {
|
|
48
|
-
summary: false,
|
|
49
|
+
summary: 'false',
|
|
49
50
|
},
|
|
50
51
|
},
|
|
51
52
|
},
|
|
@@ -54,7 +55,7 @@ export const argTypes = {
|
|
|
54
55
|
'A Boolean attribute indicating that an option with a non-empty string value must be selected.',
|
|
55
56
|
table: {
|
|
56
57
|
defaultValue: {
|
|
57
|
-
summary: false,
|
|
58
|
+
summary: 'false',
|
|
58
59
|
},
|
|
59
60
|
},
|
|
60
61
|
},
|
|
@@ -4,15 +4,9 @@ import { expect } from '@/test/expect'
|
|
|
4
4
|
import { sleep } from '@/test/sleep'
|
|
5
5
|
|
|
6
6
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
7
|
-
const element =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const value = (await within(canvasElement).findByTestId(
|
|
11
|
-
'value',
|
|
12
|
-
)) as HTMLElement
|
|
13
|
-
const select = element.getElementsByTagName(
|
|
14
|
-
'select',
|
|
15
|
-
)[0] as HTMLSelectElement
|
|
7
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
8
|
+
const value = await within(canvasElement).findByTestId('value')
|
|
9
|
+
const select = element.getElementsByTagName('select')[0]
|
|
16
10
|
const hint = element.getElementsByClassName('vv-select__hint')[0]
|
|
17
11
|
|
|
18
12
|
const { getOptionValue } = useOptions(args)
|
|
@@ -22,7 +22,7 @@ export const DefaultIconPosition: Story = {
|
|
|
22
22
|
},
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export const After: Story ={
|
|
25
|
+
export const After: Story = {
|
|
26
26
|
...Default,
|
|
27
27
|
args: {
|
|
28
28
|
...Default.args,
|
|
@@ -40,4 +40,4 @@ export const Src: Story = {
|
|
|
40
40
|
src: 'https://raw.githubusercontent.com/google/material-design-icons/master/src/social/engineering/materialicons/24px.svg',
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
-
}
|
|
43
|
+
}
|
|
@@ -3,11 +3,9 @@ import { expect } from '@/test/expect'
|
|
|
3
3
|
import { within } from '@storybook/test'
|
|
4
4
|
|
|
5
5
|
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
6
|
-
const element =
|
|
7
|
-
'element',
|
|
8
|
-
)) as HTMLElement
|
|
6
|
+
const element = await within(canvasElement).findByTestId('element')
|
|
9
7
|
|
|
10
|
-
if (!args.items
|
|
8
|
+
if (!args.items?.length) {
|
|
11
9
|
throw new Error('No items passed')
|
|
12
10
|
}
|
|
13
11
|
|
|
@@ -17,7 +15,7 @@ export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
|
17
15
|
|
|
18
16
|
// take firse and second elements
|
|
19
17
|
const firstNavItemLabelEl =
|
|
20
|
-
|
|
18
|
+
element.getElementsByClassName('vv-nav__item-label')?.[0]
|
|
21
19
|
await expect(firstNavItemLabelEl.classList.contains('current')).toBe(true)
|
|
22
20
|
|
|
23
21
|
// check tab content to include "Tab 1"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HintArgTypes, InputTextareaArgTypes } from '@/stories/argTypes'
|
|
2
2
|
import { VvTextareaProps } from '@/components/VvTextarea'
|
|
3
|
+
import type { ArgTypes } from '@storybook/vue3'
|
|
3
4
|
|
|
4
5
|
export const defaultArgs = {
|
|
5
6
|
...propsToObject(VvTextareaProps),
|
|
@@ -10,7 +11,8 @@ export const defaultArgs = {
|
|
|
10
11
|
maxlength: undefined,
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
export const argTypes: ArgTypes = {
|
|
14
16
|
...InputTextareaArgTypes,
|
|
15
17
|
...HintArgTypes,
|
|
16
18
|
cols: {
|
|
@@ -21,7 +23,7 @@ export const argTypes = {
|
|
|
21
23
|
},
|
|
22
24
|
table: {
|
|
23
25
|
defaultValue: {
|
|
24
|
-
summary: 20,
|
|
26
|
+
summary: '20',
|
|
25
27
|
},
|
|
26
28
|
},
|
|
27
29
|
},
|
|
@@ -33,7 +35,7 @@ export const argTypes = {
|
|
|
33
35
|
},
|
|
34
36
|
table: {
|
|
35
37
|
defaultValue: {
|
|
36
|
-
summary: 2,
|
|
38
|
+
summary: '2',
|
|
37
39
|
},
|
|
38
40
|
},
|
|
39
41
|
},
|