@volverjs/ui-vue 0.0.10-beta.26 → 0.0.10-beta.28
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/VvAccordionGroup/VvAccordionGroup.es.js +2 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.es.js +17 -4
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +7 -7
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +17 -4
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +30 -7
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +30 -7
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +5 -5
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +6 -6
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -4
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +11 -11
- package/dist/components/VvInputFile/VvInputFile.es.js +30 -7
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +1 -1
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNav.es.js +17 -4
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +3 -3
- package/dist/components/VvNavItem/VvNavItem.es.js +17 -4
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
- package/dist/components/VvTab/VvTab.es.js +17 -4
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -1
- package/dist/components/index.es.js +33 -9
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +3 -2
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/usePersistence.d.ts +1 -1
- package/dist/icons.es.js +226 -226
- package/dist/icons.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +6 -6
- package/package.json +47 -47
- 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/VvAccordionGroup/VvAccordionGroup.vue +1 -0
- package/src/components/VvAction/VvAction.vue +13 -3
- package/src/components/VvButton/VvButton.vue +11 -1
- package/src/components/VvInputText/VvInputText.vue +10 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});const l=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),s=Symbol.for("dropdownAction"),u={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});const l=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),s=Symbol.for("dropdownAction"),u={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},v={current:{type:Boolean,default:!1}},m={pressed:{type:Boolean,default:!1}},p={label:{type:[String,Number],default:void 0}},f={modifiers:{type:[String,Array],default:void 0}};r.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...p,...m,...c,...v,...u,type:{type:String,default:a.button,validator:e=>Object.values(a).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:n.button}},y={items:{type:Array,default:()=>[]}};t.local;const k={...f,navModifiers:{type:[String,Array]},modelValue:{type:String,default:""},items:{type:Array,default:()=>[]}},g={...f,...y},B=b;const h=e.defineComponent({name:"VvAction",props:B,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const a=t,u=r,d=e.getCurrentInstance(),c=e.inject(l),v=e.ref(null);o({$el:v});const{reference:m,bus:p,aria:f,expanded:b}=e.inject(i,{});e.watch((()=>v.value),(e=>{m&&(m.value=e)}));const y=e.computed((()=>a.pressed||(null==b?void 0:b.value))),{role:k}=e.inject(s,{}),g=e.computed((()=>{switch(!0){case a.disabled:return n.button;case void 0!==a.to:return(null==c?void 0:c.nuxt)?n.nuxtLink:n.routerLink;case void 0!==a.href:return n.a;default:return a.defaultTag}})),B=e.computed((()=>{const e={...null==f?void 0:f.value,ariaPressed:!!y.value||void 0,ariaLabel:a.ariaLabel,role:null==k?void 0:k.value};switch(g.value){case n.a:return{...e,href:a.href,target:a.target,rel:a.rel};case n.routerLink:case n.nuxtLink:return{...e,to:a.to,target:a.target};case n.button:return{...e,type:a.type,disabled:a.disabled};default:return e}})),h=e=>{var t;a.disabled?e.preventDefault():(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onClick)?u("click",e):null==p||p.emit("click",e)},x=e=>{var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseover)?u("mouseover",e):null==p||p.emit("mouseover",e)},S=e=>{var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseleave)?u("mouseleave",e):null==p||p.emit("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g)),e.mergeProps(e.unref(B),{ref_key:"element",ref:v,class:{active:t.active,pressed:e.unref(y),disabled:t.disabled,current:t.current},onClickPassive:h,onMouseoverPassive:x,onMouseleavePassive:S}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),x={class:"vv-nav__item",role:"presentation"},S=e.defineComponent({name:"VvNavItem",inheritAttrs:!1,setup:t=>(t,o)=>(e.openBlock(),e.createElementBlock("li",x,[e.createVNode(h,e.mergeProps(t.$attrs,{class:"vv-nav__item-label"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default")])),_:3},16)]))});function C(t,o,r){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{a[`${t}--${o}`]=e.unref(r.value[o])})),a}))}const _=e.defineComponent({__name:"VvNav",props:g,emits:["click"],setup(t,{emit:o}){const r=t,{modifiers:a}=e.toRefs(r),n=o,l=e=>{var t;const o=e.target;if(null==o?void 0:o.dataset.index){const e=parseInt(o.dataset.index),a=null==(t=r.items)?void 0:t[e];if(!a||(null==a?void 0:a.disabled))return;n("click",a)}},i=C("vv-nav",a);return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i))},[e.createElementVNode("ul",{class:"vv-nav__menu",role:"menu","aria-busy":"true",onClick:e.withModifiers(l,["stop"])},[e.renderSlot(t.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(({on:o={},data:r,...a},n)=>(e.openBlock(),e.createBlock(S,e.mergeProps({key:n,"data-index":n},a,e.toHandlers(o)),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"item",e.normalizeProps(e.guardReactiveProps({item:a,data:r,index:n})))])),_:2},1040,["data-index"])))),128))]))])],2))}});return e.defineComponent({__name:"VvTab",props:k,emits:["update:modelValue"],setup(t,{emit:o}){const r=t,a=o,{modifiers:n,items:l}=e.toRefs(r),i=e.computed((()=>l.value.reduce(((e,t)=>(t.tab&&e.push(t.tab),e)),[]))),s=e.ref(),u=e.computed({get:()=>{var e;return r.modelValue||s.value||(null==(e=i.value)?void 0:e[0])},set:e=>{s.value=e,a("update:modelValue",e)}}),d=e.computed((()=>{var e;return["tabs",...Array.isArray(r.navModifiers)?r.navModifiers:(null==(e=r.navModifiers)?void 0:e.split(" "))??[]]})),c=e=>{e.tab&&(u.value=e.tab)},v=e.computed((()=>r.items.map((e=>({current:e.tab===u.value,...e}))))),m=C("vv-tab",n);return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(m))},[e.createVNode(_,e.mergeProps({items:e.unref(v),modifiers:e.unref(d)},{onClick:c}),{item:e.withCtx((({item:o,data:r,index:a})=>[e.renderSlot(t.$slots,"nav-item",e.normalizeProps(e.guardReactiveProps({item:o,data:r,index:a})))])),_:3},16),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),((o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[o.tab?(e.openBlock(),e.createElementBlock("article",{key:0,class:e.normalizeClass([{target:e.unref(u)===o.tab},"vv-tab__panel"])},[e.renderSlot(t.$slots,`panel::${o.tab}`)],2)):e.createCommentVNode("v-if",!0)],64)))),128))],2))}})}));
|
|
@@ -241,9 +241,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
241
241
|
label: string | number;
|
|
242
242
|
disabled: boolean;
|
|
243
243
|
modifiers: string | string[];
|
|
244
|
-
required: boolean;
|
|
245
244
|
icon: string | import("../VvIcon").VvIconProps;
|
|
246
245
|
iconPosition: "before" | "after";
|
|
246
|
+
required: boolean;
|
|
247
247
|
loading: boolean;
|
|
248
248
|
loadingLabel: string;
|
|
249
249
|
readonly: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, computed, toRef, unref, defineComponent, useAttrs, toRefs, ref, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, reactive, onMounted, nextTick, Fragment, renderList, createBlock, mergeProps, createSlots, withCtx, resolveDynamicComponent, mergeDefaults, createCommentVNode, createVNode, TransitionGroup, toHandlers, useSlots, h, withDirectives, vModelCheckbox, Transition, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio } from "vue";
|
|
1
|
+
import { inject, computed, toRef, unref, defineComponent, useAttrs, toRefs, ref, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, reactive, onMounted, nextTick, Fragment, renderList, createBlock, mergeProps, createSlots, withCtx, getCurrentInstance, resolveDynamicComponent, mergeDefaults, createCommentVNode, createVNode, TransitionGroup, toHandlers, useSlots, h, withDirectives, vModelCheckbox, Transition, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio } from "vue";
|
|
2
2
|
import { uid } from "uid";
|
|
3
3
|
import { useVModel, useStorage, useMutationObserver, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
|
|
4
4
|
import mitt from "mitt";
|
|
@@ -1005,7 +1005,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1005
1005
|
const accordionNames = reactive(/* @__PURE__ */ new Set());
|
|
1006
1006
|
const storageModelValue = usePersistence(
|
|
1007
1007
|
storageKey,
|
|
1008
|
-
storageType
|
|
1008
|
+
storageType,
|
|
1009
|
+
[]
|
|
1009
1010
|
);
|
|
1010
1011
|
const localModelValue = computed({
|
|
1011
1012
|
get: () => {
|
|
@@ -1228,6 +1229,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1228
1229
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1229
1230
|
const props = __props;
|
|
1230
1231
|
const emit = __emit;
|
|
1232
|
+
const instance = getCurrentInstance();
|
|
1231
1233
|
const volver = useVolver();
|
|
1232
1234
|
const element = ref(null);
|
|
1233
1235
|
__expose({ $el: element });
|
|
@@ -1294,20 +1296,32 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1294
1296
|
}
|
|
1295
1297
|
});
|
|
1296
1298
|
const onClick = (e) => {
|
|
1299
|
+
var _a;
|
|
1297
1300
|
if (props.disabled) {
|
|
1298
1301
|
e.preventDefault();
|
|
1299
1302
|
return;
|
|
1300
1303
|
}
|
|
1304
|
+
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick) {
|
|
1305
|
+
emit("click", e);
|
|
1306
|
+
return;
|
|
1307
|
+
}
|
|
1301
1308
|
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
|
|
1302
|
-
emit("click", e);
|
|
1303
1309
|
};
|
|
1304
1310
|
const onMouseover = (e) => {
|
|
1311
|
+
var _a;
|
|
1312
|
+
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
|
|
1313
|
+
emit("mouseover", e);
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1305
1316
|
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
|
|
1306
|
-
emit("mouseover", e);
|
|
1307
1317
|
};
|
|
1308
1318
|
const onMouseleave = (e) => {
|
|
1319
|
+
var _a;
|
|
1320
|
+
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
|
|
1321
|
+
emit("mouseleave", e);
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1309
1324
|
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
|
|
1310
|
-
emit("mouseleave", e);
|
|
1311
1325
|
};
|
|
1312
1326
|
return (_ctx, _cache) => {
|
|
1313
1327
|
return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
|
|
@@ -2417,7 +2431,8 @@ const _hoisted_2$b = {
|
|
|
2417
2431
|
class: "vv-button__label"
|
|
2418
2432
|
};
|
|
2419
2433
|
const __default__$j = {
|
|
2420
|
-
name: "VvButton"
|
|
2434
|
+
name: "VvButton",
|
|
2435
|
+
inheritAttrs: false
|
|
2421
2436
|
};
|
|
2422
2437
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2423
2438
|
...__default__$j,
|
|
@@ -2475,6 +2490,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2475
2490
|
const toggleValue = computed(() => {
|
|
2476
2491
|
return props.value !== void 0 ? props.value : name.value;
|
|
2477
2492
|
});
|
|
2493
|
+
const hasListeners = computed(() => {
|
|
2494
|
+
if (!toggle.value) {
|
|
2495
|
+
return void 0;
|
|
2496
|
+
}
|
|
2497
|
+
return {
|
|
2498
|
+
onClick
|
|
2499
|
+
};
|
|
2500
|
+
});
|
|
2478
2501
|
const onClick = () => {
|
|
2479
2502
|
if (toggle.value) {
|
|
2480
2503
|
if (Array.isArray(modelValue.value)) {
|
|
@@ -2498,6 +2521,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2498
2521
|
};
|
|
2499
2522
|
return (_ctx, _cache) => {
|
|
2500
2523
|
return openBlock(), createBlock(_sfc_main$v, mergeProps({
|
|
2524
|
+
...unref(attrs),
|
|
2525
|
+
...unref(hasListeners),
|
|
2501
2526
|
disabled: unref(disabled),
|
|
2502
2527
|
pressed: unref(pressed),
|
|
2503
2528
|
active: _ctx.active,
|
|
@@ -2511,8 +2536,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2511
2536
|
id: unref(hasId),
|
|
2512
2537
|
ref_key: "element",
|
|
2513
2538
|
ref: element,
|
|
2514
|
-
class: unref(bemCssClasses)
|
|
2515
|
-
onClick
|
|
2539
|
+
class: unref(bemCssClasses)
|
|
2516
2540
|
}), {
|
|
2517
2541
|
default: withCtx(() => [
|
|
2518
2542
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
@@ -6074,7 +6098,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6074
6098
|
}
|
|
6075
6099
|
return [...suggestions.value].filter(
|
|
6076
6100
|
(suggestion) => isEmpty(localModelValue.value) || `${suggestion}`.toLowerCase().includes(`${localModelValue.value}`.toLowerCase()) && suggestion !== localModelValue.value
|
|
6077
|
-
);
|
|
6101
|
+
).reverse();
|
|
6078
6102
|
});
|
|
6079
6103
|
const hasSuggestions = computed(
|
|
6080
6104
|
() => (storageKey == null ? void 0 : storageKey.value) && suggestions.value && suggestions.value.size > 0
|