@volverjs/ui-vue 0.0.9-beta.2 → 0.0.9-beta.4
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.es.js +7 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +7 -0
- package/dist/components/VvAction/VvAction.es.js +9 -1
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +9 -0
- package/dist/components/VvAction/index.d.ts +4 -0
- package/dist/components/VvAlert/VvAlert.es.js +7 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +7 -0
- package/dist/components/VvAvatar/VvAvatar.es.js +7 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +7 -0
- package/dist/components/VvBadge/VvBadge.es.js +7 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +7 -0
- package/dist/components/VvButton/VvButton.es.js +11 -2
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +9 -0
- package/dist/components/VvButton/index.d.ts +4 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -0
- package/dist/components/VvCard/VvCard.es.js +7 -0
- package/dist/components/VvCheckbox/VvCheckbox.es.js +7 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +7 -0
- package/dist/components/VvCombobox/VvCombobox.es.js +17 -4
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.es.js +22 -15
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +13 -2
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +9 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +9 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +7 -0
- package/dist/components/VvInputText/VvInputText.es.js +7 -0
- package/dist/components/VvNav/VvNav.es.js +10 -2
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/index.d.ts +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +7 -0
- package/dist/components/VvRadio/VvRadio.es.js +7 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +7 -0
- package/dist/components/VvSelect/VvSelect.es.js +7 -0
- package/dist/components/VvTab/VvTab.es.js +10 -2
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +7 -0
- package/dist/components/VvTooltip/VvTooltip.es.js +7 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.es.js +728 -322
- package/dist/components/index.umd.js +1 -1
- package/dist/directives/index.es.js +7 -0
- package/dist/directives/v-tooltip.es.js +7 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +7 -0
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +43 -258
- package/dist/stories/Alert/Alert.settings.d.ts +3 -7
- package/dist/stories/Button/Button.settings.d.ts +3 -13
- package/dist/stories/Combobox/Combobox.settings.d.ts +3 -7
- package/dist/stories/Nav/Nav.settings.d.ts +3 -21
- package/package.json +28 -28
- 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/VvAction/VvAction.vue +2 -1
- package/src/components/VvButton/VvButton.vue +1 -0
- package/src/components/VvDialog/VvDialog.vue +14 -14
- package/src/components/VvDropdown/VvDropdown.vue +6 -2
- package/src/components/VvNav/VvNav.vue +1 -1
- package/src/components/VvNav/index.ts +1 -1
- package/src/components/index.ts +5 -0
- package/src/props/index.ts +7 -0
- package/src/stories/Alert/Alert.settings.ts +3 -1
- package/src/stories/Button/Button.settings.ts +5 -3
- package/src/stories/Combobox/Combobox.settings.ts +4 -1
- package/src/stories/Nav/Nav.settings.ts +3 -1
- package/src/stories/Tab/Tab.stories.ts +3 -3
- package/src/stories/Textarea/TextareaLength.stories.ts +1 -1
- /package/dist/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue.d.ts +0 -0
- /package/dist/components/{VvNavSeparator → VvNav}/VvNavSeparator.d.ts +0 -0
- /package/src/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue +0 -0
- /package/src/components/{VvNavSeparator → VvNav}/VvNavSeparator.ts +0 -0
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
const hasProps = computed(() => {
|
|
67
67
|
const toReturn = {
|
|
68
68
|
...dropdownAria?.value,
|
|
69
|
-
|
|
69
|
+
ariaPressed: pressed.value ? true : undefined,
|
|
70
|
+
ariaLabel: props.ariaLabel,
|
|
70
71
|
role: role?.value,
|
|
71
72
|
}
|
|
72
73
|
switch (hasTag.value) {
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
const dialogEl: Ref<HTMLDialogElement | undefined> = ref()
|
|
16
16
|
|
|
17
17
|
// data
|
|
18
|
+
const modelValue = useVModel(props, 'modelValue', emit)
|
|
18
19
|
const localModelValue = ref(false)
|
|
19
|
-
const
|
|
20
|
-
get()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
localModelValue.value = value
|
|
20
|
+
const opened = computed({
|
|
21
|
+
get: () => modelValue.value ?? localModelValue.value,
|
|
22
|
+
set: (newValue) => {
|
|
23
|
+
if (modelValue.value === undefined) {
|
|
24
|
+
localModelValue.value = newValue
|
|
25
|
+
return
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
modelValue.value = newValue
|
|
28
28
|
},
|
|
29
29
|
})
|
|
30
30
|
|
|
@@ -80,24 +80,24 @@
|
|
|
80
80
|
|
|
81
81
|
// methods
|
|
82
82
|
onClickOutside(modalWrapper, () => {
|
|
83
|
-
if (!props.keepOpen) {
|
|
84
|
-
|
|
83
|
+
if (!props.keepOpen && opened.value) {
|
|
84
|
+
opened.value = false
|
|
85
85
|
}
|
|
86
86
|
})
|
|
87
87
|
|
|
88
88
|
function close() {
|
|
89
|
-
|
|
89
|
+
opened.value = false
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
function open() {
|
|
93
|
-
|
|
93
|
+
opened.value = true
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
defineExpose({ close, open })
|
|
97
97
|
|
|
98
98
|
// keyboard
|
|
99
99
|
onKeyStroke('Escape', (e) => {
|
|
100
|
-
if (
|
|
100
|
+
if (opened.value) {
|
|
101
101
|
e.preventDefault()
|
|
102
102
|
close()
|
|
103
103
|
}
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
<template>
|
|
108
108
|
<Transition :name="transitioName" v-on="dialogTransitionHandlers">
|
|
109
109
|
<dialog
|
|
110
|
-
v-show="
|
|
110
|
+
v-show="opened"
|
|
111
111
|
v-bind="dialogAttrs"
|
|
112
112
|
ref="dialogEl"
|
|
113
113
|
:class="dialogClass"
|
|
@@ -161,7 +161,11 @@
|
|
|
161
161
|
referenceEl,
|
|
162
162
|
floatingEl,
|
|
163
163
|
{
|
|
164
|
-
whileElementsMounted:
|
|
164
|
+
whileElementsMounted: (...args) => {
|
|
165
|
+
return autoUpdate(...args, {
|
|
166
|
+
animationFrame: props.strategy === 'fixed',
|
|
167
|
+
})
|
|
168
|
+
},
|
|
165
169
|
placement: computed(() => props.placement),
|
|
166
170
|
strategy: computed(() => props.strategy),
|
|
167
171
|
middleware,
|
|
@@ -266,7 +270,7 @@
|
|
|
266
270
|
onClickOutside(
|
|
267
271
|
floatingEl,
|
|
268
272
|
() => {
|
|
269
|
-
if (!props.keepOpen) {
|
|
273
|
+
if (!props.keepOpen && expanded.value) {
|
|
270
274
|
expanded.value = false
|
|
271
275
|
}
|
|
272
276
|
},
|
package/src/components/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as VvAccordion } from './VvAccordion/VvAccordion.vue'
|
|
2
2
|
export { default as VvAccordionGroup } from './VvAccordionGroup/VvAccordionGroup.vue'
|
|
3
|
+
export { default as VvAction } from './VvAction/VvAction.vue'
|
|
4
|
+
export { default as VvAlert } from './VvAlert/VvAlert.vue'
|
|
3
5
|
export { default as VvBadge } from './VvBadge/VvBadge.vue'
|
|
4
6
|
export { default as VvBreadcrumb } from './VvBreadcrumb/VvBreadcrumb.vue'
|
|
5
7
|
export { default as VvButton } from './VvButton/VvButton.vue'
|
|
@@ -12,8 +14,11 @@ export { default as VvDialog } from './VvDialog/VvDialog.vue'
|
|
|
12
14
|
export { default as VvDropdown } from './VvDropdown/VvDropdown.vue'
|
|
13
15
|
export { default as VvIcon } from './VvIcon/VvIcon.vue'
|
|
14
16
|
export { default as VvInputText } from './VvInputText/VvInputText.vue'
|
|
17
|
+
export { default as VvNav } from './VvNav/VvNav.vue'
|
|
15
18
|
export { default as VvProgress } from './VvProgress/VvProgress.vue'
|
|
16
19
|
export { default as VvRadio } from './VvRadio/VvRadio.vue'
|
|
17
20
|
export { default as VvRadioGroup } from './VvRadioGroup/VvRadioGroup.vue'
|
|
18
21
|
export { default as VvSelect } from './VvSelect/VvSelect.vue'
|
|
22
|
+
export { default as VvTab } from './VvTab/VvTab.vue'
|
|
19
23
|
export { default as VvTextarea } from './VvTextarea/VvTextarea.vue'
|
|
24
|
+
export { default as VvTooltip } from './VvTooltip/VvTooltip.vue'
|
package/src/props/index.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue3'
|
|
2
|
+
import type { VvAlert } from '@/components'
|
|
1
3
|
import { IconArgTypes } from '../argTypes'
|
|
2
4
|
import { ModifiersArgTypes } from '../argTypes'
|
|
3
5
|
|
|
4
|
-
export const defaultArgs = {
|
|
6
|
+
export const defaultArgs: Meta<typeof VvAlert>['args'] = {
|
|
5
7
|
title: 'Alert title!',
|
|
6
8
|
content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
7
9
|
dismissable: false,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue3'
|
|
2
|
+
import type { VvButton } from '@/components'
|
|
1
3
|
import {
|
|
2
4
|
DefaultSlotArgTypes,
|
|
3
5
|
ModifiersArgTypes,
|
|
@@ -7,7 +9,7 @@ import {
|
|
|
7
9
|
} from '@/stories/argTypes'
|
|
8
10
|
import normal from '@/assets/icons/normal.json'
|
|
9
11
|
|
|
10
|
-
export const defaultArgs = {
|
|
12
|
+
export const defaultArgs: Meta<typeof VvButton>['args'] = {
|
|
11
13
|
label: 'Button',
|
|
12
14
|
type: 'button',
|
|
13
15
|
toggle: false,
|
|
@@ -22,7 +24,7 @@ export const defaultArgs = {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export const argTypes = {
|
|
25
|
-
|
|
27
|
+
modifiers: {
|
|
26
28
|
...ModifiersArgTypes.modifiers,
|
|
27
29
|
options: [
|
|
28
30
|
'primary',
|
|
@@ -153,5 +155,5 @@ export const argTypes = {
|
|
|
153
155
|
summary: 'html',
|
|
154
156
|
},
|
|
155
157
|
},
|
|
156
|
-
},
|
|
158
|
+
},
|
|
157
159
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { VvCombobox } from '@/components'
|
|
2
|
+
import type { Meta } from '@storybook/vue3'
|
|
1
3
|
import {
|
|
2
4
|
ValidArgTypes,
|
|
3
5
|
InvalidArgTypes,
|
|
@@ -15,7 +17,7 @@ import {
|
|
|
15
17
|
} from '@/stories/argTypes'
|
|
16
18
|
import { VvComboboxProps } from '@/components/VvCombobox'
|
|
17
19
|
|
|
18
|
-
export const defaultArgs = {
|
|
20
|
+
export const defaultArgs: Meta<typeof VvCombobox>['args'] = {
|
|
19
21
|
...propsToObject(VvComboboxProps),
|
|
20
22
|
name: 'vv-combobox',
|
|
21
23
|
maxValues: undefined,
|
|
@@ -43,6 +45,7 @@ export const defaultArgs = {
|
|
|
43
45
|
],
|
|
44
46
|
placeholder: 'Select an option',
|
|
45
47
|
label: 'Combobox label',
|
|
48
|
+
strategy: 'fixed',
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
export const argTypes = {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue3'
|
|
2
|
+
import type { VvNav } from '@/components'
|
|
1
3
|
import { VvNavProps } from '@/components/VvNav'
|
|
2
4
|
import { ModifiersArgTypes } from '@/stories/argTypes'
|
|
3
5
|
|
|
4
|
-
export const defaultArgs = {
|
|
6
|
+
export const defaultArgs: Meta<typeof VvNav>['args'] = {
|
|
5
7
|
...propsToObject(VvNavProps),
|
|
6
8
|
items: [
|
|
7
9
|
{
|
|
@@ -20,9 +20,9 @@ export const Default: Story = {
|
|
|
20
20
|
...defaultArgs,
|
|
21
21
|
},
|
|
22
22
|
render: (args) => ({
|
|
23
|
-
components: {VvTab},
|
|
23
|
+
components: { VvTab },
|
|
24
24
|
setup() {
|
|
25
|
-
return {args}
|
|
25
|
+
return { args }
|
|
26
26
|
},
|
|
27
27
|
template: /* html */ `
|
|
28
28
|
<div class="m-md w-1/2">
|
|
@@ -64,7 +64,7 @@ export const Default: Story = {
|
|
|
64
64
|
</p>
|
|
65
65
|
</template>
|
|
66
66
|
</vv-tab>
|
|
67
|
-
</div
|
|
67
|
+
</div>`,
|
|
68
68
|
}),
|
|
69
69
|
play: defaultTest,
|
|
70
70
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|