@volverjs/ui-vue 0.0.10 → 0.0.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 (94) hide show
  1. package/bin/icons.js +1 -93
  2. package/dist/components/VvAccordion/VvAccordion.es.js +1 -366
  3. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -1
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -702
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +3 -2
  6. package/dist/components/VvAction/VvAction.es.js +1 -302
  7. package/dist/components/VvAction/VvAction.vue.d.ts +2 -1
  8. package/dist/components/VvAlert/VvAlert.es.js +1 -527
  9. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  10. package/dist/components/VvAlert/VvAlert.vue.d.ts +2 -1
  11. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +1 -730
  12. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  13. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +2 -1
  14. package/dist/components/VvAvatar/VvAvatar.es.js +1 -132
  15. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -1
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +1 -250
  17. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -1
  18. package/dist/components/VvBadge/VvBadge.es.js +1 -131
  19. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -1
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -410
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -1
  22. package/dist/components/VvButton/VvButton.es.js +1 -882
  23. package/dist/components/VvButton/VvButton.umd.js +1 -1
  24. package/dist/components/VvButton/VvButton.vue.d.ts +2 -1
  25. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -214
  26. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -1
  27. package/dist/components/VvCard/VvCard.es.js +1 -152
  28. package/dist/components/VvCard/VvCard.vue.d.ts +2 -1
  29. package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -741
  30. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -2
  31. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -981
  32. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -1
  33. package/dist/components/VvCombobox/VvCombobox.es.js +1 -3463
  34. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  35. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +263 -317
  36. package/dist/components/VvDialog/VvDialog.es.js +1 -317
  37. package/dist/components/VvDialog/VvDialog.vue.d.ts +2 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +1 -750
  39. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -1
  40. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +5 -4
  41. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -1
  42. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +10 -2
  43. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -1
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -448
  45. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +1 -149
  46. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +1 -104
  47. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -281
  49. package/dist/components/VvIcon/VvIcon.es.js +1 -143
  50. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  51. package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -1
  52. package/dist/components/VvInputFile/VvInputFile.es.js +1 -1704
  53. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  54. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +2 -1
  55. package/dist/components/VvInputText/VvInputText.es.js +4 -2790
  56. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  57. package/dist/components/VvInputText/VvInputText.vue.d.ts +2 -1
  58. package/dist/components/VvNav/VvNav.es.js +1 -438
  59. package/dist/components/VvNav/VvNav.vue.d.ts +2 -1
  60. package/dist/components/VvNav/VvNavItem.vue.d.ts +2 -1
  61. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -1
  62. package/dist/components/VvNavItem/VvNavItem.es.js +1 -337
  63. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -24
  64. package/dist/components/VvProgress/VvProgress.es.js +1 -163
  65. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -1
  66. package/dist/components/VvRadio/VvRadio.es.js +1 -661
  67. package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -2
  68. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -901
  69. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -1
  70. package/dist/components/VvSelect/VvSelect.es.js +1 -1103
  71. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  72. package/dist/components/VvSelect/VvSelect.vue.d.ts +130 -71
  73. package/dist/components/VvTab/VvTab.es.js +1 -558
  74. package/dist/components/VvTab/VvTab.vue.d.ts +2 -1
  75. package/dist/components/VvTextarea/VvTextarea.es.js +2 -1989
  76. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  77. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -1
  78. package/dist/components/VvTooltip/VvTooltip.es.js +1 -154
  79. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -1
  80. package/dist/components/index.es.js +6 -8558
  81. package/dist/components/index.umd.js +1 -1
  82. package/dist/composables/index.es.js +2 -247
  83. package/dist/composables/index.umd.js +1 -1
  84. package/dist/directives/index.es.js +2 -311
  85. package/dist/directives/index.umd.js +1 -1
  86. package/dist/directives/v-contextmenu.es.js +2 -142
  87. package/dist/directives/v-contextmenu.umd.js +1 -1
  88. package/dist/directives/v-tooltip.es.js +1 -172
  89. package/dist/icons.es.js +1 -39
  90. package/dist/icons.umd.js +1 -1
  91. package/dist/index.es.js +1 -219
  92. package/dist/resolvers/unplugin.es.js +1 -187
  93. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +14 -14
  94. package/package.json +37 -37
@@ -1,4 +1,4 @@
1
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
1
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
2
  modelValue: {
3
3
  type: PropType<string | string[] | undefined>;
4
4
  default: undefined;
@@ -83,9 +83,10 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
83
83
  default?: (props: {
84
84
  expandedAccordions: Set<string>;
85
85
  expand: (name?: string | string[]) => void;
86
- collapse: boolean & ((name?: string | string[]) => void);
86
+ collapse: (name?: string | string[]) => void;
87
87
  }) => any;
88
88
  }>;
89
+ declare const _default: typeof __VLS_export;
89
90
  export default _default;
90
91
  type __VLS_WithSlots<T, S> = T & {
91
92
  new (): {
@@ -1,302 +1 @@
1
- import { inject, defineComponent, getCurrentInstance, ref, watch, computed, resolveComponent, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString } from "vue";
2
- var StorageType = /* @__PURE__ */ ((StorageType2) => {
3
- StorageType2["local"] = "local";
4
- StorageType2["session"] = "session";
5
- return StorageType2;
6
- })(StorageType || {});
7
- var Side = /* @__PURE__ */ ((Side2) => {
8
- Side2["left"] = "left";
9
- Side2["right"] = "right";
10
- Side2["top"] = "top";
11
- Side2["bottom"] = "bottom";
12
- return Side2;
13
- })(Side || {});
14
- var Position = /* @__PURE__ */ ((Position2) => {
15
- Position2["before"] = "before";
16
- Position2["after"] = "after";
17
- return Position2;
18
- })(Position || {});
19
- var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
20
- ButtonType2["button"] = "button";
21
- ButtonType2["submit"] = "submit";
22
- ButtonType2["reset"] = "reset";
23
- return ButtonType2;
24
- })(ButtonType || {});
25
- var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
26
- ActionTag2["nuxtLink"] = "nuxt-link";
27
- ActionTag2["routerLink"] = "router-link";
28
- ActionTag2["a"] = "a";
29
- ActionTag2["button"] = "button";
30
- return ActionTag2;
31
- })(ActionTag || {});
32
- const INJECTION_KEY_VOLVER = Symbol.for("volver");
33
- const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
34
- "dropdownTrigger"
35
- );
36
- const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
37
- "dropdownAction"
38
- );
39
- const LinkProps = {
40
- /**
41
- * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
42
- * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
43
- */
44
- to: {
45
- type: [String, Object]
46
- },
47
- /**
48
- * Anchor href
49
- */
50
- href: String,
51
- /**
52
- * Anchor target
53
- */
54
- target: String,
55
- /**
56
- * Anchor rel
57
- */
58
- rel: {
59
- type: String,
60
- default: "noopener noreferrer"
61
- }
62
- };
63
- const DisabledProps = {
64
- /**
65
- * Whether the form control is disabled
66
- */
67
- disabled: {
68
- type: Boolean,
69
- default: false
70
- }
71
- };
72
- const ActiveProps = {
73
- /**
74
- * Whether the item is active
75
- */
76
- active: {
77
- type: Boolean,
78
- default: false
79
- }
80
- };
81
- const CurrentProps = {
82
- /**
83
- * Whether the item is current
84
- */
85
- current: {
86
- type: Boolean,
87
- default: false
88
- }
89
- };
90
- const PressedProps = {
91
- /**
92
- * Whether the item is pressed
93
- */
94
- pressed: {
95
- type: Boolean,
96
- default: false
97
- }
98
- };
99
- const LabelProps = {
100
- /**
101
- * The item label
102
- */
103
- label: {
104
- type: [String, Number],
105
- default: void 0
106
- }
107
- };
108
- ({
109
- /**
110
- * VvIcon position
111
- */
112
- iconPosition: {
113
- default: Position.before
114
- }
115
- });
116
- ({
117
- /**
118
- * Dropdown placement
119
- */
120
- placement: {
121
- default: Side.bottom
122
- }
123
- });
124
- const ActionProps = {
125
- ...DisabledProps,
126
- ...LabelProps,
127
- ...PressedProps,
128
- ...ActiveProps,
129
- ...CurrentProps,
130
- ...LinkProps,
131
- /**
132
- * Button type
133
- */
134
- type: {
135
- type: String,
136
- default: ButtonType.button,
137
- validator: (value) => Object.values(ButtonType).includes(value)
138
- },
139
- /**
140
- * Button aria-label
141
- */
142
- ariaLabel: {
143
- type: String,
144
- default: void 0
145
- },
146
- /**
147
- * Default tag for the action
148
- */
149
- defaultTag: {
150
- type: String,
151
- default: ActionTag.button
152
- }
153
- };
154
- ({
155
- storageType: {
156
- default: StorageType.local
157
- }
158
- });
159
- const VvActionEvents = ["click", "mouseover", "mouseleave"];
160
- const VvActionProps = ActionProps;
161
- function useVolver() {
162
- return inject(INJECTION_KEY_VOLVER, void 0);
163
- }
164
- function useInjectedDropdownTrigger() {
165
- return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
166
- }
167
- function useInjectedDropdownAction() {
168
- return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
169
- }
170
- const __default__ = {
171
- name: "VvAction"
172
- };
173
- const _sfc_main = /* @__PURE__ */ defineComponent({
174
- ...__default__,
175
- props: VvActionProps,
176
- emits: VvActionEvents,
177
- setup(__props, { expose: __expose, emit: __emit }) {
178
- const props = __props;
179
- const emit = __emit;
180
- const instance = getCurrentInstance();
181
- const volver = useVolver();
182
- const element = ref(null);
183
- __expose({ $el: element });
184
- const {
185
- reference: dropdownTriggerReference,
186
- bus: dropdownEventBus,
187
- aria: dropdownAria,
188
- expanded: dropdownExpanded
189
- } = useInjectedDropdownTrigger();
190
- watch(
191
- () => element.value,
192
- (newValue) => {
193
- if (dropdownTriggerReference) {
194
- dropdownTriggerReference.value = newValue;
195
- }
196
- }
197
- );
198
- const pressed = computed(() => {
199
- return props.pressed || dropdownExpanded?.value;
200
- });
201
- const { role } = useInjectedDropdownAction();
202
- const hasTag = computed(() => {
203
- switch (true) {
204
- case props.disabled:
205
- return ActionTag.button;
206
- case props.to !== void 0:
207
- return volver?.nuxt ? resolveComponent(ActionTag.nuxtLink) : ActionTag.routerLink;
208
- case props.href !== void 0:
209
- return ActionTag.a;
210
- default:
211
- return props.defaultTag;
212
- }
213
- });
214
- const hasProps = computed(() => {
215
- const toReturn = {
216
- ...dropdownAria?.value,
217
- ariaPressed: pressed.value ? true : void 0,
218
- ariaLabel: props.ariaLabel,
219
- role: role?.value
220
- };
221
- switch (hasTag.value) {
222
- case ActionTag.a:
223
- return {
224
- ...toReturn,
225
- href: props.href,
226
- target: props.target,
227
- rel: props.rel
228
- };
229
- case ActionTag.routerLink:
230
- case ActionTag.nuxtLink:
231
- return {
232
- ...toReturn,
233
- to: props.to,
234
- target: props.target
235
- };
236
- case ActionTag.button:
237
- return {
238
- ...toReturn,
239
- type: props.type,
240
- disabled: props.disabled
241
- };
242
- default:
243
- return toReturn;
244
- }
245
- });
246
- function onClick(e) {
247
- if (props.disabled) {
248
- e.preventDefault();
249
- return;
250
- }
251
- if (instance?.vnode.props?.onClick) {
252
- emit("click", e);
253
- return;
254
- }
255
- dropdownEventBus?.emit("click", e);
256
- }
257
- function onMouseover(e) {
258
- if (instance?.vnode.props?.onMouseover) {
259
- emit("mouseover", e);
260
- return;
261
- }
262
- dropdownEventBus?.emit("mouseover", e);
263
- }
264
- function onMouseleave(e) {
265
- if (instance?.vnode.props?.onMouseleave) {
266
- emit("mouseleave", e);
267
- return;
268
- }
269
- dropdownEventBus?.emit("mouseleave", e);
270
- }
271
- return (_ctx, _cache) => {
272
- return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
273
- ref_key: "element",
274
- ref: element,
275
- class: {
276
- active: _ctx.active,
277
- pressed: unref(pressed),
278
- disabled: _ctx.disabled,
279
- current: _ctx.current
280
- },
281
- onClickPassive: onClick,
282
- onMouseoverPassive: onMouseover,
283
- onMouseleavePassive: onMouseleave
284
- }), {
285
- default: withCtx(() => [
286
- renderSlot(_ctx.$slots, "default", {}, () => [
287
- createTextVNode(
288
- toDisplayString(_ctx.label),
289
- 1
290
- /* TEXT */
291
- )
292
- ])
293
- ]),
294
- _: 3
295
- /* FORWARDED */
296
- }, 16, ["class"]);
297
- };
298
- }
299
- });
300
- export {
301
- _sfc_main as default
302
- };
1
+ import{inject as e,defineComponent as t,getCurrentInstance as o,ref as r,watch as a,computed as n,resolveComponent as l,createBlock as u,openBlock as s,resolveDynamicComponent as i,unref as d,mergeProps as c,withCtx as v,renderSlot as f,createTextVNode as b,toDisplayString as p}from"vue";var m=/* @__PURE__ */(e=>(e.local="local",e.session="session",e))(m||{}),g=/* @__PURE__ */(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(g||{}),y=/* @__PURE__ */(e=>(e.before="before",e.after="after",e))(y||{}),k=/* @__PURE__ */(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(k||{}),S=/* @__PURE__ */(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(S||{});const L=Symbol.for("volver"),h=Symbol.for("dropdownTrigger"),x=Symbol.for("dropdownAction"),w={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},B={disabled:{type:Boolean,default:!1}},M={active:{type:Boolean,default:!1}},P={current:{type:Boolean,default:!1}},T={pressed:{type:Boolean,default:!1}},j={label:{type:[String,Number],default:void 0}};y.before,g.bottom;const A={...B,...j,...T,...M,...P,...w,type:{type:String,default:k.button,validator:e=>Object.values(k).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:S.button}};m.local;const C=/* @__PURE__ */t({name:"VvAction",props:A,emits:["click","mouseover","mouseleave"],setup(t,{expose:m,emit:g}){const y=t,k=g,w=o(),B=e(L,void 0),M=r(null);m({$el:M});const{reference:P,bus:T,aria:j,expanded:A}=e(h,{});a(()=>M.value,e=>{P&&(P.value=e)});const C=n(()=>y.pressed||A?.value),{role:O}=e(x,{}),$=n(()=>{switch(!0){case y.disabled:return S.button;case void 0!==y.to:return B?.nuxt?l(S.nuxtLink):S.routerLink;case void 0!==y.href:return S.a;default:return y.defaultTag}}),_=n(()=>{const e={...j?.value,ariaPressed:!!C.value||void 0,ariaLabel:y.ariaLabel,role:O?.value};switch($.value){case S.a:return{...e,href:y.href,target:y.target,rel:y.rel};case S.routerLink:case S.nuxtLink:return{...e,to:y.to,target:y.target};case S.button:return{...e,type:y.type,disabled:y.disabled};default:return e}});function D(e){y.disabled?e.preventDefault():w?.vnode.props?.onClick?k("click",e):T?.emit("click",e)}function N(e){w?.vnode.props?.onMouseover?k("mouseover",e):T?.emit("mouseover",e)}function V(e){w?.vnode.props?.onMouseleave?k("mouseleave",e):T?.emit("mouseleave",e)}return(e,t)=>(s(),u(i(d($)),c(d(_),{ref_key:"element",ref:M,class:{active:e.active,pressed:d(C),disabled:e.disabled,current:e.current},onClickPassive:D,onMouseoverPassive:N,onMouseleavePassive:V}),{default:v(()=>[f(e.$slots,"default",{},()=>[b(p(e.label),1)])]),_:3},16,["class"]))}});export{C as default};
@@ -1,5 +1,5 @@
1
1
  import { ActionTag } from '../../constants';
2
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
3
3
  type: {
4
4
  type: PropType<`${import("../../constants").ButtonType}`>;
5
5
  default: import("../../constants").ButtonType;
@@ -100,6 +100,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
100
100
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
101
101
  default?: (props: {}) => any;
102
102
  }>;
103
+ declare const _default: typeof __VLS_export;
103
104
  export default _default;
104
105
  type __VLS_WithSlots<T, S> = T & {
105
106
  new (): {