@volverjs/ui-vue 0.0.9-beta.1 → 0.0.9-beta.3

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 (79) hide show
  1. package/dist/components/VvAccordion/VvAccordion.es.js +7 -0
  2. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +7 -0
  3. package/dist/components/VvAction/VvAction.es.js +9 -1
  4. package/dist/components/VvAction/VvAction.umd.js +1 -1
  5. package/dist/components/VvAction/VvAction.vue.d.ts +9 -0
  6. package/dist/components/VvAction/index.d.ts +4 -0
  7. package/dist/components/VvAlert/VvAlert.es.js +7 -0
  8. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +7 -0
  9. package/dist/components/VvAvatar/VvAvatar.es.js +7 -0
  10. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +7 -0
  11. package/dist/components/VvBadge/VvBadge.es.js +7 -0
  12. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +7 -0
  13. package/dist/components/VvButton/VvButton.es.js +11 -2
  14. package/dist/components/VvButton/VvButton.umd.js +1 -1
  15. package/dist/components/VvButton/VvButton.vue.d.ts +9 -0
  16. package/dist/components/VvButton/index.d.ts +4 -0
  17. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -0
  18. package/dist/components/VvCard/VvCard.es.js +7 -0
  19. package/dist/components/VvCheckbox/VvCheckbox.es.js +7 -0
  20. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +7 -0
  21. package/dist/components/VvCombobox/VvCombobox.es.js +17 -10
  22. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  23. package/dist/components/VvDialog/VvDialog.es.js +7 -0
  24. package/dist/components/VvDropdown/VvDropdown.es.js +19 -8
  25. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  26. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -9
  27. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +9 -0
  28. package/dist/components/VvDropdown/index.d.ts +1 -7
  29. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +9 -1
  30. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  31. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -0
  32. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +7 -0
  33. package/dist/components/VvInputText/VvInputText.es.js +7 -0
  34. package/dist/components/VvNav/VvNav.es.js +10 -2
  35. package/dist/components/VvNav/VvNav.umd.js +1 -1
  36. package/dist/components/VvNav/index.d.ts +1 -1
  37. package/dist/components/VvProgress/VvProgress.es.js +7 -0
  38. package/dist/components/VvRadio/VvRadio.es.js +7 -0
  39. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +7 -0
  40. package/dist/components/VvSelect/VvSelect.es.js +7 -0
  41. package/dist/components/VvTab/VvTab.es.js +10 -2
  42. package/dist/components/VvTab/VvTab.umd.js +1 -1
  43. package/dist/components/VvTextarea/VvTextarea.es.js +7 -0
  44. package/dist/components/VvTooltip/VvTooltip.es.js +7 -0
  45. package/dist/components/index.d.ts +5 -0
  46. package/dist/components/index.es.js +714 -314
  47. package/dist/components/index.umd.js +1 -1
  48. package/dist/directives/index.es.js +7 -0
  49. package/dist/directives/v-tooltip.es.js +7 -0
  50. package/dist/icons.es.js +3 -3
  51. package/dist/icons.umd.js +1 -1
  52. package/dist/props/index.d.ts +7 -0
  53. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +43 -258
  54. package/dist/stories/Alert/Alert.settings.d.ts +3 -7
  55. package/dist/stories/Button/Button.settings.d.ts +3 -13
  56. package/dist/stories/Combobox/Combobox.settings.d.ts +3 -7
  57. package/dist/stories/Nav/Nav.settings.d.ts +3 -21
  58. package/package.json +28 -28
  59. package/src/assets/icons/detailed.json +1 -1
  60. package/src/assets/icons/normal.json +1 -1
  61. package/src/assets/icons/simple.json +1 -1
  62. package/src/components/VvAction/VvAction.vue +2 -1
  63. package/src/components/VvButton/VvButton.vue +1 -0
  64. package/src/components/VvDropdown/VvDropdown.vue +5 -1
  65. package/src/components/VvDropdown/index.ts +2 -8
  66. package/src/components/VvNav/VvNav.vue +1 -1
  67. package/src/components/VvNav/index.ts +1 -1
  68. package/src/components/index.ts +5 -0
  69. package/src/props/index.ts +7 -0
  70. package/src/stories/Alert/Alert.settings.ts +3 -1
  71. package/src/stories/Button/Button.settings.ts +5 -3
  72. package/src/stories/Combobox/Combobox.settings.ts +4 -1
  73. package/src/stories/Nav/Nav.settings.ts +3 -1
  74. package/src/stories/Tab/Tab.stories.ts +3 -3
  75. package/src/stories/Textarea/TextareaLength.stories.ts +1 -1
  76. /package/dist/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue.d.ts +0 -0
  77. /package/dist/components/{VvNavSeparator → VvNav}/VvNavSeparator.d.ts +0 -0
  78. /package/src/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue +0 -0
  79. /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
- 'aria-pressed': pressed.value ? true : undefined,
69
+ ariaPressed: pressed.value ? true : undefined,
70
+ ariaLabel: props.ariaLabel,
70
71
  role: role?.value,
71
72
  }
72
73
  switch (hasTag.value) {
@@ -118,6 +118,7 @@
118
118
  href,
119
119
  target,
120
120
  rel,
121
+ ariaLabel,
121
122
  }"
122
123
  :id="hasId"
123
124
  ref="element"
@@ -161,7 +161,11 @@
161
161
  referenceEl,
162
162
  floatingEl,
163
163
  {
164
- whileElementsMounted: autoUpdate,
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,
@@ -1,17 +1,11 @@
1
1
  import type { PropType } from 'vue'
2
- import { DropdownProps, IdProps } from '../../props'
2
+ import { DropdownProps, IdProps, ModifiersProps } from '../../props'
3
3
  import { DropdownRole } from '../../constants'
4
4
 
5
5
  export const VvDropdownProps = {
6
6
  ...IdProps,
7
7
  ...DropdownProps,
8
- /**
9
- * Component BEM modifiers
10
- */
11
- modifiers: {
12
- type: [String, Array] as PropType<string | string[]>,
13
- default: 'mobile',
14
- },
8
+ ...ModifiersProps,
15
9
  /**
16
10
  * Show / hide dropdown programmatically
17
11
  */
@@ -55,7 +55,7 @@
55
55
  disabled: navItem.disabled,
56
56
  }"
57
57
  class="vv-nav__item-label"
58
- v-on="navItem.on || {}"
58
+ v-on="navItem.on"
59
59
  @click="onClick(navItem)"
60
60
  >
61
61
  {{ navItem.title }}
@@ -6,7 +6,7 @@ export type NavItem = {
6
6
  to?: string | { [key: string]: unknown }
7
7
  href?: string
8
8
  disabled?: boolean
9
- on: () => void
9
+ on?: Record<string, () => void>
10
10
  }
11
11
 
12
12
  export const VvNavProps = {
@@ -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'
@@ -457,4 +457,11 @@ export const ActionProps = {
457
457
  validator: (value: ButtonType) =>
458
458
  Object.values(ButtonType).includes(value),
459
459
  },
460
+ /**
461
+ * Button aria-label
462
+ */
463
+ ariaLabel: {
464
+ type: String,
465
+ default: undefined,
466
+ },
460
467
  }
@@ -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
- modifiers: {
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
  }
@@ -35,7 +35,7 @@ export const Count: Story = {
35
35
  args: {
36
36
  ...Default.args,
37
37
  count: true,
38
- minLength: 100,
38
+ minlength: 100,
39
39
  },
40
40
  }
41
41