@volverjs/ui-vue 0.0.3 → 0.0.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.
Files changed (145) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +52 -13
  3. package/dist/Volver.d.ts +5 -1
  4. package/dist/components/VvAccordion/VvAccordion.es.js +113 -66
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +159 -101
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  8. package/dist/components/VvAction/VvAction.es.js +170 -0
  9. package/dist/components/VvAction/VvAction.umd.js +1 -0
  10. package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
  11. package/dist/components/VvAction/index.d.ts +24 -0
  12. package/dist/components/VvBadge/VvBadge.es.js +86 -16
  13. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  14. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +97 -41
  15. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  16. package/dist/components/VvButton/VvButton.es.js +434 -251
  17. package/dist/components/VvButton/VvButton.umd.js +1 -1
  18. package/dist/components/VvButton/VvButton.vue.d.ts +50 -50
  19. package/dist/components/VvButton/index.d.ts +22 -67
  20. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +118 -43
  21. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  22. package/dist/components/VvCard/VvCard.es.js +38 -25
  23. package/dist/components/VvCard/VvCard.umd.js +1 -1
  24. package/dist/components/VvCheckbox/VvCheckbox.es.js +334 -154
  25. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  26. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
  27. package/dist/components/VvCheckbox/index.d.ts +1 -1
  28. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +401 -204
  29. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
  31. package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
  32. package/dist/components/VvCombobox/VvCombobox.es.js +950 -594
  33. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  34. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +54 -30
  35. package/dist/components/VvCombobox/index.d.ts +18 -13
  36. package/dist/components/VvDialog/VvDialog.es.js +139 -64
  37. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +276 -158
  39. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  40. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +9 -9
  41. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
  42. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
  43. package/dist/components/VvDropdown/index.d.ts +6 -9
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +251 -0
  45. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
  46. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +30 -15
  47. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +176 -0
  49. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
  50. package/dist/components/VvIcon/VvIcon.es.js +48 -32
  51. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  52. package/dist/components/VvInputText/VvInputText.es.js +508 -344
  53. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  54. package/dist/components/VvInputText/VvInputText.vue.d.ts +11 -4
  55. package/dist/components/VvInputText/index.d.ts +13 -2
  56. package/dist/components/VvProgress/VvProgress.es.js +90 -20
  57. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  58. package/dist/components/VvRadio/VvRadio.es.js +305 -125
  59. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  60. package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
  61. package/dist/components/VvRadio/index.d.ts +1 -1
  62. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +372 -175
  63. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  64. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
  65. package/dist/components/VvRadioGroup/index.d.ts +1 -1
  66. package/dist/components/VvSelect/VvSelect.es.js +371 -216
  67. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  68. package/dist/components/VvSelect/VvSelect.vue.d.ts +11 -4
  69. package/dist/components/VvSelect/index.d.ts +5 -5
  70. package/dist/components/VvTextarea/VvTextarea.es.js +408 -244
  71. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  72. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -4
  73. package/dist/components/VvTextarea/index.d.ts +5 -5
  74. package/dist/components/VvTooltip/VvTooltip.es.js +88 -18
  75. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  76. package/dist/components/index.es.js +1913 -1521
  77. package/dist/components/index.umd.js +1 -1
  78. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  79. package/dist/composables/dropdown/useProvideDropdown.d.ts +2 -2
  80. package/dist/constants.d.ts +30 -0
  81. package/dist/directives/index.es.js +128 -0
  82. package/dist/directives/index.umd.js +1 -0
  83. package/dist/directives/v-tooltip.es.js +126 -0
  84. package/dist/directives/v-tooltip.umd.js +1 -0
  85. package/dist/icons.es.js +3 -3
  86. package/dist/icons.umd.js +1 -1
  87. package/dist/index.es.js +2102 -1761
  88. package/dist/index.umd.js +1 -1
  89. package/dist/props/index.d.ts +179 -11
  90. package/dist/resolvers/unplugin.d.ts +8 -8
  91. package/dist/resolvers/unplugin.es.js +51 -30
  92. package/dist/resolvers/unplugin.umd.js +1 -1
  93. package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
  94. package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
  95. package/package.json +60 -34
  96. package/src/Volver.ts +12 -5
  97. package/src/assets/icons/detailed.json +1 -1
  98. package/src/assets/icons/normal.json +1 -1
  99. package/src/assets/icons/simple.json +1 -1
  100. package/src/components/VvAction/VvAction.vue +144 -0
  101. package/src/components/VvAction/index.ts +5 -0
  102. package/src/components/VvButton/VvButton.vue +31 -114
  103. package/src/components/VvButton/index.ts +6 -79
  104. package/src/components/VvCombobox/VvCombobox.vue +54 -42
  105. package/src/components/VvCombobox/index.ts +11 -9
  106. package/src/components/VvDropdown/VvDropdownAction.vue +44 -0
  107. package/src/components/VvDropdown/VvDropdownOption.vue +65 -0
  108. package/src/components/VvDropdown/index.ts +4 -9
  109. package/src/components/VvSelect/index.ts +2 -4
  110. package/src/composables/dropdown/useInjectDropdown.ts +1 -1
  111. package/src/composables/dropdown/useProvideDropdown.ts +7 -9
  112. package/src/composables/useModifiers.ts +4 -7
  113. package/src/constants.ts +36 -0
  114. package/src/props/index.ts +106 -14
  115. package/src/resolvers/unplugin.ts +81 -48
  116. package/src/stories/Accordion/AccordionSlots.stories.mdx +2 -2
  117. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +2 -1
  118. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
  119. package/src/stories/Button/Button.stories.mdx +4 -2
  120. package/src/stories/Button/Button.test.ts +3 -1
  121. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  122. package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
  123. package/src/stories/Button/ButtonState.stories.mdx +2 -11
  124. package/src/stories/Card/Card.stories.mdx +2 -1
  125. package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
  126. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
  127. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
  128. package/src/stories/Combobox/Combobox.settings.ts +44 -0
  129. package/src/stories/Combobox/Combobox.stories.mdx +40 -1
  130. package/src/stories/Dialog/Dialog.stories.mdx +2 -1
  131. package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
  132. package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
  133. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
  134. package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
  135. package/src/stories/Icon/Icon.stories.mdx +2 -1
  136. package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
  137. package/src/stories/InputText/InputText.stories.mdx +2 -1
  138. package/src/stories/Progress/Progress.stories.mdx +2 -1
  139. package/src/stories/Radio/Radio.stories.mdx +2 -1
  140. package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
  141. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
  142. package/src/stories/Select/Select.stories.mdx +2 -1
  143. package/src/stories/Textarea/Textarea.stories.mdx +2 -1
  144. package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
  145. package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
@@ -1,41 +1,62 @@
1
- function u(r, e) {
2
- if (typeof r != "string")
1
+ function n(o, e) {
2
+ if (typeof o != "string")
3
3
  throw new TypeError("expected a string");
4
- return r.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\W/g, (o) => /[À-ž]/.test(o) ? o : "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, (o) => e != null && e.condense ? "-" : o).toLowerCase();
4
+ return o.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\W/g, (r) => /[À-ž]/.test(r) ? r : "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, (r) => e != null && e.condense ? "-" : r).toLowerCase();
5
5
  }
6
- const d = ["vv-icon"], s = "vv", p = function(r) {
7
- if (!d.includes(r))
8
- return r === "vv-dropdown" ? ["vv-dropdown", "vv-dropdown-action"] : r === "vv-combobox" ? ["vv-select", "vv-dropdown", "vv-dropdown-action"] : r === "vv-accordion-group" ? ["vv-accordion-group", "vv-accordion"] : r === "vv-checkbox-group" ? ["vv-checkbox-group", "vv-checkbox"] : r === "vv-radio-group" ? ["vv-radio-group", "vv-radio"] : [r];
6
+ const i = ["vv-icon", "vv-action"], c = "vv", u = ["v-tooltip"], d = function(o) {
7
+ if (!i.includes(o))
8
+ return o === "vv-dropdown" ? ["vv-dropdown", "vv-dropdown-option", "vv-dropdown-action"] : o === "vv-combobox" ? [
9
+ "vv-select",
10
+ "vv-dropdown",
11
+ "vv-dropdown-option",
12
+ "vv-dropdown-action"
13
+ ] : o === "vv-accordion-group" ? ["vv-accordion-group", "vv-accordion"] : o === "vv-checkbox-group" ? ["vv-checkbox-group", "vv-checkbox"] : o === "vv-radio-group" ? ["vv-radio-group", "vv-radio"] : o === "v-tooltip" ? ["vv-tooltip"] : [o];
14
+ }, s = function(o, e) {
15
+ const r = [];
16
+ if (!e)
17
+ return r;
18
+ const v = d(o);
19
+ return v && v.forEach((t) => {
20
+ r.push(
21
+ `@volverjs/style/${e === "scss" ? "scss/" : ""}components/${t}`
22
+ );
23
+ }), r;
9
24
  };
10
25
  function f({
11
- prefix: r = s,
26
+ prefix: o = c,
12
27
  importStyle: e,
13
- customStylePath: o
28
+ directives: r
14
29
  } = {}) {
15
- return {
16
- type: "component",
17
- resolve: (c) => {
18
- if (!r || !c.toLowerCase().startsWith(r.toLowerCase()))
19
- return;
20
- const v = [], n = u(c).replace(
21
- `${r}-`,
22
- `${s}-`
23
- );
24
- if (e) {
25
- o && v.push(o);
26
- const t = p(n);
27
- t && t.forEach((i) => {
28
- v.push(
29
- `@volverjs/style/${e === "scss" ? "scss/" : ""}components/${i}`
30
- );
31
- });
30
+ return [
31
+ {
32
+ type: "component",
33
+ resolve: (v) => {
34
+ if (!o || !v.toLowerCase().startsWith(o.toLowerCase()))
35
+ return;
36
+ const t = n(v).replace(
37
+ `${o}-`,
38
+ `${c}-`
39
+ );
40
+ return {
41
+ from: `@volverjs/ui-vue/${t}`,
42
+ sideEffects: s(t, e)
43
+ };
44
+ }
45
+ },
46
+ {
47
+ type: "directive",
48
+ resolve: (v) => {
49
+ if (!r)
50
+ return;
51
+ const t = `v-${n(v)}`;
52
+ if (u.includes(t))
53
+ return {
54
+ from: `@volverjs/ui-vue/${t}`,
55
+ sideEffects: s(t, e)
56
+ };
32
57
  }
33
- return {
34
- from: `@volverjs/ui-vue/${n}`,
35
- sideEffects: v
36
- };
37
58
  }
38
- };
59
+ ];
39
60
  }
40
61
  export {
41
62
  f as VolverResolver
@@ -1 +1 @@
1
- (function(r,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(r=typeof globalThis<"u"?globalThis:r||self,t(r.components={}))})(this,function(r){"use strict";function t(e,n){if(typeof e!="string")throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\W/g,o=>/[À-ž]/.test(o)?o:"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,o=>n!=null&&n.condense?"-":o).toLowerCase()}const d=["vv-icon"],c="vv",f=function(e){if(!d.includes(e))return e==="vv-dropdown"?["vv-dropdown","vv-dropdown-action"]:e==="vv-combobox"?["vv-select","vv-dropdown","vv-dropdown-action"]:e==="vv-accordion-group"?["vv-accordion-group","vv-accordion"]:e==="vv-checkbox-group"?["vv-checkbox-group","vv-checkbox"]:e==="vv-radio-group"?["vv-radio-group","vv-radio"]:[e]};function p({prefix:e=c,importStyle:n,customStylePath:o}={}){return{type:"component",resolve:s=>{if(!e||!s.toLowerCase().startsWith(e.toLowerCase()))return;const v=[],i=t(s).replace(`${e}-`,`${c}-`);if(n){o&&v.push(o);const u=f(i);u&&u.forEach(l=>{v.push(`@volverjs/style/${n==="scss"?"scss/":""}components/${l}`)})}return{from:`@volverjs/ui-vue/${i}`,sideEffects:v}}}}r.VolverResolver=p,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
1
+ (function(v,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(v=typeof globalThis<"u"?globalThis:v||self,c(v.components={}))})(this,function(v){"use strict";function c(e,r){if(typeof e!="string")throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\W/g,o=>/[À-ž]/.test(o)?o:"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,o=>r!=null&&r.condense?"-":o).toLowerCase()}const u=["vv-icon","vv-action"],i="vv",d=["v-tooltip"],f=function(e){if(!u.includes(e))return e==="vv-dropdown"?["vv-dropdown","vv-dropdown-option","vv-dropdown-action"]:e==="vv-combobox"?["vv-select","vv-dropdown","vv-dropdown-option","vv-dropdown-action"]:e==="vv-accordion-group"?["vv-accordion-group","vv-accordion"]:e==="vv-checkbox-group"?["vv-checkbox-group","vv-checkbox"]:e==="vv-radio-group"?["vv-radio-group","vv-radio"]:e==="v-tooltip"?["vv-tooltip"]:[e]},s=function(e,r){const o=[];if(!r)return o;const n=f(e);return n&&n.forEach(t=>{o.push(`@volverjs/style/${r==="scss"?"scss/":""}components/${t}`)}),o};function p({prefix:e=i,importStyle:r,directives:o}={}){return[{type:"component",resolve:n=>{if(!e||!n.toLowerCase().startsWith(e.toLowerCase()))return;const t=c(n).replace(`${e}-`,`${i}-`);return{from:`@volverjs/ui-vue/${t}`,sideEffects:s(t,r)}}},{type:"directive",resolve:n=>{if(!o)return;const t=`v-${c(n)}`;if(d.includes(t))return{from:`@volverjs/ui-vue/${t}`,sideEffects:s(t,r)}}}]}v.VolverResolver=p,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
@@ -177,6 +177,28 @@ export declare const argTypes: {
177
177
  };
178
178
  };
179
179
  };
180
+ 'dropdown::before': {
181
+ control: {
182
+ type: string;
183
+ };
184
+ table: {
185
+ category: string;
186
+ type: {
187
+ summary: string;
188
+ };
189
+ };
190
+ };
191
+ 'dropdown::after': {
192
+ control: {
193
+ type: string;
194
+ };
195
+ table: {
196
+ category: string;
197
+ type: {
198
+ summary: string;
199
+ };
200
+ };
201
+ };
180
202
  value: {
181
203
  control: {
182
204
  type: string;
@@ -199,6 +221,28 @@ export declare const argTypes: {
199
221
  };
200
222
  };
201
223
  };
224
+ 'no-options': {
225
+ control: {
226
+ type: string;
227
+ };
228
+ table: {
229
+ category: string;
230
+ type: {
231
+ summary: string;
232
+ };
233
+ };
234
+ };
235
+ 'no-results': {
236
+ control: {
237
+ type: string;
238
+ };
239
+ table: {
240
+ category: string;
241
+ type: {
242
+ summary: string;
243
+ };
244
+ };
245
+ };
202
246
  placement: {
203
247
  description: string;
204
248
  options: (import("../../constants").Side | import("../../constants").Placement)[];
@@ -1,10 +1,11 @@
1
+ import { DropdownRole } from '@/constants';
1
2
  export declare const defaultArgs: {
2
3
  [x: string]: unknown;
3
4
  };
4
5
  export declare const argTypes: {
5
6
  role: {
6
7
  description: string;
7
- options: readonly ["listbox", "menu"];
8
+ options: DropdownRole[];
8
9
  control: {
9
10
  type: string;
10
11
  };
@@ -64,7 +65,7 @@ export declare const argTypes: {
64
65
  };
65
66
  placement: {
66
67
  description: string;
67
- options: (import("../../constants").Side | import("../../constants").Placement)[];
68
+ options: (import("@/constants").Side | import("@/constants").Placement)[];
68
69
  control: {
69
70
  type: string;
70
71
  };
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "bugs": {
20
20
  "url": "https://github.com/volverjs/ui-vue/issues"
21
21
  },
22
- "version": "0.0.3",
22
+ "version": "0.0.4",
23
23
  "engines": {
24
24
  "node": ">= 16.x"
25
25
  },
@@ -38,6 +38,7 @@
38
38
  "*.d.ts"
39
39
  ],
40
40
  "dependencies": {
41
+ "@volverjs/style": "0.1.8",
41
42
  "@floating-ui/vue": "^0.2.0",
42
43
  "@iconify/tools": "^2.2.2",
43
44
  "@iconify/vue": "^4.1.0",
@@ -45,48 +46,48 @@
45
46
  "jsdom": "^21.1.0",
46
47
  "mitt": "^3.0.0",
47
48
  "nanoid": "^4.0.0",
48
- "vue": "^3.2.45"
49
+ "vue": "^3.2.47"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@babel/core": "^7.20.12",
52
53
  "@babel/preset-env": "^7.20.2",
54
+ "@babel/preset-typescript": "^7.18.6",
53
55
  "@iconify/types": "^2.0.0",
54
56
  "@iconify/utils": "^2.1.0",
55
57
  "@mdx-js/react": "^2.2.1",
56
58
  "@rushstack/eslint-patch": "^1.2.0",
57
- "@storybook/addon-a11y": "7.0.0-beta.29",
58
- "@storybook/addon-actions": "7.0.0-beta.29",
59
- "@storybook/addon-docs": "7.0.0-beta.29",
60
- "@storybook/addon-essentials": "7.0.0-beta.29",
61
- "@storybook/addon-interactions": "7.0.0-beta.29",
62
- "@storybook/addon-links": "7.0.0-beta.29",
63
- "@storybook/addons": "7.0.0-beta.29",
64
- "@storybook/builder-vite": "7.0.0-beta.29",
65
- "@storybook/channel-postmessage": "7.0.0-beta.29",
66
- "@storybook/channel-websocket": "7.0.0-beta.29",
67
- "@storybook/cli": "7.0.0-beta.29",
68
- "@storybook/client-api": "7.0.0-beta.29",
69
- "@storybook/client-logger": "7.0.0-beta.29",
70
- "@storybook/core-common": "7.0.0-beta.29",
71
- "@storybook/jest": "^0.0.10",
72
- "@storybook/preview-api": "7.0.0-beta.29",
73
- "@storybook/preview-web": "7.0.0-beta.29",
74
- "@storybook/test-runner": "^0.9.3",
75
- "@storybook/testing-library": "^0.0.13",
76
- "@storybook/theming": "7.0.0-beta.29",
77
- "@storybook/vue3": "7.0.0-beta.29",
78
- "@storybook/vue3-vite": "7.0.0-beta.29",
59
+ "@storybook/addon-a11y": "7.0.0-beta.40",
60
+ "@storybook/addon-actions": "7.0.0-beta.40",
61
+ "@storybook/addon-docs": "7.0.0-beta.40",
62
+ "@storybook/addon-essentials": "7.0.0-beta.40",
63
+ "@storybook/addon-interactions": "7.0.0-beta.40",
64
+ "@storybook/addon-links": "7.0.0-beta.40",
65
+ "@storybook/addons": "7.0.0-beta.40",
66
+ "@storybook/builder-vite": "7.0.0-beta.40",
67
+ "@storybook/channel-postmessage": "7.0.0-beta.40",
68
+ "@storybook/channel-websocket": "7.0.0-beta.40",
69
+ "@storybook/cli": "7.0.0-beta.40",
70
+ "@storybook/client-api": "7.0.0-beta.40",
71
+ "@storybook/client-logger": "7.0.0-beta.40",
72
+ "@storybook/core-common": "7.0.0-beta.40",
73
+ "@storybook/jest": "^0.0.11-next.0",
74
+ "@storybook/preview-api": "7.0.0-beta.40",
75
+ "@storybook/preview-web": "7.0.0-beta.40",
76
+ "@storybook/test-runner": "^0.10.0-next.8",
77
+ "@storybook/testing-library": "^0.0.14-next.1",
78
+ "@storybook/theming": "7.0.0-beta.40",
79
+ "@storybook/vue3": "7.0.0-beta.40",
80
+ "@storybook/vue3-vite": "7.0.0-beta.40",
79
81
  "@types/jest-axe": "^3.5.5",
80
82
  "@types/jsdom": "^20.0.1",
81
83
  "@types/node": "18.11.18",
82
84
  "@types/react": "^18.0.27",
83
85
  "@types/yargs": "^17.0.22",
84
86
  "@vitejs/plugin-vue": "^4.0.0",
85
- "@volverjs/style": "0.1.7",
86
- "@vue/compiler-sfc": "^3.2.45",
87
+ "@vue/compiler-sfc": "^3.2.47",
87
88
  "@vue/eslint-config-prettier": "^7.0.0",
88
89
  "@vue/eslint-config-typescript": "^11.0.2",
89
- "@vue/test-utils": "^2.2.8",
90
+ "@vue/test-utils": "^2.2.10",
90
91
  "@vue/tsconfig": "^0.1.3",
91
92
  "change-case": "^4.1.2",
92
93
  "eslint": "^8.33.0",
@@ -109,7 +110,7 @@
109
110
  "remark": "^14.0.2",
110
111
  "sass": "^1.58.0",
111
112
  "sass-loader": "^13.2.0",
112
- "storybook": "7.0.0-beta.29",
113
+ "storybook": "7.0.0-beta.40",
113
114
  "storybook-addon-markdown-docs": "^1.0.5",
114
115
  "storybook-dark-mode": "^2.0.5",
115
116
  "storybook-version": "^0.1.1",
@@ -117,7 +118,7 @@
117
118
  "typescript": "~4.9.5",
118
119
  "unplugin-auto-import": "^0.13.0",
119
120
  "unplugin-vue-components": "^0.23.0",
120
- "vite": "^4.0.4",
121
+ "vite": "^4.1.1",
121
122
  "vite-plugin-eslint": "^1.8.1",
122
123
  "vite-plugin-externalize-deps": "^0.5.0",
123
124
  "vue-loader": "^17.0.1",
@@ -145,11 +146,6 @@
145
146
  },
146
147
  "./src/*": "./src/*",
147
148
  "./dist/*": "./dist/*",
148
- "./components": {
149
- "types": "./dist/components/index.d.ts",
150
- "import": "./dist/components/index.es.js",
151
- "default": "./dist/components/index.umd.js"
152
- },
153
149
  "./resolvers/unplugin": {
154
150
  "types": "./dist/resolvers/unplugin.d.ts",
155
151
  "import": "./dist/resolvers/unplugin.es.js",
@@ -160,6 +156,21 @@
160
156
  "import": "./dist/icons.es.js",
161
157
  "default": "./dist/icons.umd.js"
162
158
  },
159
+ "./directives": {
160
+ "types": "./dist/directives/index.d.ts",
161
+ "import": "./dist/directives/index.es.js",
162
+ "default": "./dist/directives/index.umd.js"
163
+ },
164
+ "./v-tooltip": {
165
+ "types": "./dist/directives/v-tooltip.d.ts",
166
+ "import": "./dist/directives/v-tooltip.es.js",
167
+ "default": "./dist/directives/v-tooltip.umd.js"
168
+ },
169
+ "./components": {
170
+ "types": "./dist/components/index.d.ts",
171
+ "import": "./dist/components/index.es.js",
172
+ "default": "./dist/components/index.umd.js"
173
+ },
163
174
  "./vv-accordion": {
164
175
  "types": "./dist/components/VvAccordion/VvAccordion.vue.d.ts",
165
176
  "import": "./dist/components/VvAccordion/VvAccordion.es.js",
@@ -170,6 +181,11 @@
170
181
  "import": "./dist/components/VvAccordionGroup/VvAccordionGroup.es.js",
171
182
  "default": "./dist/components/VvAccordionGroup/VvAccordionGroup.umd.js"
172
183
  },
184
+ "./vv-action": {
185
+ "types": "./dist/components/VvAction/VvAction.vue.d.ts",
186
+ "import": "./dist/components/VvAction/VvAction.es.js",
187
+ "default": "./dist/components/VvAction/VvAction.umd.js"
188
+ },
173
189
  "./vv-badge": {
174
190
  "types": "./dist/components/VvBadge/VvBadge.vue.d.ts",
175
191
  "import": "./dist/components/VvBadge/VvBadge.es.js",
@@ -220,11 +236,21 @@
220
236
  "import": "./dist/components/VvDropdown/VvDropdown.es.js",
221
237
  "default": "./dist/components/VvDropdown/VvDropdown.umd.js"
222
238
  },
239
+ "./vv-dropdown-action": {
240
+ "types": "./dist/components/VvDropdownAction/VvDropdownAction.vue.d.ts",
241
+ "import": "./dist/components/VvDropdownAction/VvDropdownAction.es.js",
242
+ "default": "./dist/components/VvDropdownAction/VvDropdownAction.umd.js"
243
+ },
223
244
  "./vv-dropdown-item": {
224
245
  "types": "./dist/components/VvDropdownItem/VvDropdownItem.vue.d.ts",
225
246
  "import": "./dist/components/VvDropdownItem/VvDropdownItem.es.js",
226
247
  "default": "./dist/components/VvDropdownItem/VvDropdownItem.umd.js"
227
248
  },
249
+ "./vv-dropdown-option": {
250
+ "types": "./dist/components/VvDropdownOption/VvDropdownOption.vue.d.ts",
251
+ "import": "./dist/components/VvDropdownOption/VvDropdownOption.es.js",
252
+ "default": "./dist/components/VvDropdownOption/VvDropdownOption.umd.js"
253
+ },
228
254
  "./vv-icon": {
229
255
  "types": "./dist/components/VvIcon/VvIcon.vue.d.ts",
230
256
  "import": "./dist/components/VvIcon/VvIcon.es.js",
package/src/Volver.ts CHANGED
@@ -6,9 +6,8 @@ import {
6
6
  type IconifyJSON,
7
7
  type PartialIconifyAPIConfig,
8
8
  } from '@iconify/vue'
9
- import type { App, Component, Plugin } from 'vue'
9
+ import type { App, Component, Directive, Plugin } from 'vue'
10
10
  import { DEFAULT_ICONIFY_PROVIDER, INJECTION_KEY_VOLVER } from '@/constants'
11
- import directives from '@/directives'
12
11
 
13
12
  export function useDefaultProps(
14
13
  component: Component,
@@ -93,6 +92,10 @@ export type VolverOptions = {
93
92
  * Alias to install
94
93
  */
95
94
  aliases?: Record<string, Component>
95
+ /**
96
+ * Directives to install
97
+ */
98
+ directives?: Record<string, Directive>
96
99
  /**
97
100
  * Default props for components
98
101
  */
@@ -224,6 +227,7 @@ const VolverPlugin: Plugin = {
224
227
  // register global methods
225
228
  app.config.globalProperties.$vv = volver
226
229
 
230
+ // register components
227
231
  if (options.components) {
228
232
  Object.entries(options.components).forEach(([name, component]) => {
229
233
  app.component(
@@ -233,6 +237,7 @@ const VolverPlugin: Plugin = {
233
237
  })
234
238
  }
235
239
 
240
+ // register aliases
236
241
  if (options.aliases) {
237
242
  Object.entries(options.aliases).forEach(([name, component]) => {
238
243
  app.component(
@@ -243,9 +248,11 @@ const VolverPlugin: Plugin = {
243
248
  }
244
249
 
245
250
  // register directives
246
- Object.entries(directives).forEach(([name, directive]) => {
247
- app.directive(name, directive)
248
- })
251
+ if (options.directives) {
252
+ Object.entries(options.directives).forEach(([name, directive]) => {
253
+ app.directive(name, directive)
254
+ })
255
+ }
249
256
 
250
257
  // provide volver to components
251
258
  app.provide(INJECTION_KEY_VOLVER, volver)