@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.
- package/bin/icons.js +1 -93
- package/dist/components/VvAccordion/VvAccordion.es.js +1 -366
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +2 -702
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +3 -2
- package/dist/components/VvAction/VvAction.es.js +1 -302
- package/dist/components/VvAction/VvAction.vue.d.ts +2 -1
- package/dist/components/VvAlert/VvAlert.es.js +1 -527
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +2 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +1 -730
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +2 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +1 -132
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +1 -250
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -1
- package/dist/components/VvBadge/VvBadge.es.js +1 -131
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +1 -410
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +2 -1
- package/dist/components/VvButton/VvButton.es.js +1 -882
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +2 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -214
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -1
- package/dist/components/VvCard/VvCard.es.js +1 -152
- package/dist/components/VvCard/VvCard.vue.d.ts +2 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +1 -741
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -2
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +1 -981
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +1 -3463
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +263 -317
- package/dist/components/VvDialog/VvDialog.es.js +1 -317
- package/dist/components/VvDialog/VvDialog.vue.d.ts +2 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +1 -750
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -1
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +5 -4
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +10 -2
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +1 -448
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +1 -149
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +1 -104
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -281
- package/dist/components/VvIcon/VvIcon.es.js +1 -143
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +1 -1704
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +2 -1
- package/dist/components/VvInputText/VvInputText.es.js +4 -2790
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +2 -1
- package/dist/components/VvNav/VvNav.es.js +1 -438
- package/dist/components/VvNav/VvNav.vue.d.ts +2 -1
- package/dist/components/VvNav/VvNavItem.vue.d.ts +2 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +1 -337
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +1 -24
- package/dist/components/VvProgress/VvProgress.es.js +1 -163
- package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -1
- package/dist/components/VvRadio/VvRadio.es.js +1 -661
- package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +1 -901
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -1
- package/dist/components/VvSelect/VvSelect.es.js +1 -1103
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +130 -71
- package/dist/components/VvTab/VvTab.es.js +1 -558
- package/dist/components/VvTab/VvTab.vue.d.ts +2 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +2 -1989
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -1
- package/dist/components/VvTooltip/VvTooltip.es.js +1 -154
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -1
- package/dist/components/index.es.js +6 -8558
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +2 -247
- package/dist/composables/index.umd.js +1 -1
- package/dist/directives/index.es.js +2 -311
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +2 -142
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +1 -172
- package/dist/icons.es.js +1 -39
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +1 -219
- package/dist/resolvers/unplugin.es.js +1 -187
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +14 -14
- package/package.json +37 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","mitt","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAlertGroup=t(e.vue,e.mitt,e.vue$1)}(this,function(e,t,o){"use strict";const r={prefix:"normal"};var l=(e=>(e.local="local",e.session="session",e))(l||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{}),c=(e=>(e.alert="alert",e.alertdialog="alertdialog",e))(c||{});const u=Symbol.for("volver"),d=Symbol.for("alertGroup"),v={modifiers:{type:[String,Array],default:void 0}},f={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:a.before,validation:e=>Object.values(a).includes(e)}},p={id:[String,Number]};function m(t,o,r){return e.computed(()=>{const l={[t]:!0},n="string"==typeof o?.value?o.value.split(" "):o?.value;return n&&Array.isArray(n)&&n.forEach(e=>{e&&(l[`${t}--${e}`]=!0)}),r&&Object.keys(r.value).forEach(o=>{l[`${t}--${o}`]=e.unref(r.value[o])}),l})}n.bottom,i.button,s.button,l.local;const b={...v,name:{type:String,required:!0},items:{type:Array,default:()=>[]},stack:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},inline:{type:String,default:void 0},block:{type:String,default:void 0},position:{type:String,default:void 0},transition:{type:String,default:void 0}};function h(o,r){const l=function({name:o}){const r=t();return e.provide(d,{name:o,bus:r}),r}({name:e.computed(()=>o.name)});(o.block&&!o.inline||!o.block&&o.inline)&&console.warn("[VvAlertGroup]: block and inline props must coexist at the same time.");const n=e.computed(()=>{const t=[m("vv-alert-group",e.computed(()=>o.modifiers),e.computed(()=>({stack:o.stack,reverse:o.reverse,absolute:"absolute"===o.position,fixed:"fixed"===o.position}))).value];return o.inline&&o.block&&t.push(`vv-alert-group--${o.block}-${o.inline}`),t}),a=e.computed(()=>o.transition?o.transition:o.position?"start"===o.inline?"vv-alert--fade-inline-start":"end"===o.inline?"vv-alert--fade-inline-end":"top"===o.block?"vv-alert--fade-block-top":"bottom"===o.block?"vv-alert--fade-block-bottom":"vv-alert--fade":"vv-alert--fade");return l.on("close",e=>{r("close",e)}),{hasTransition:a,hasProps:e.computed(()=>({class:n.value}))}}const g={...p,...f,modifiers:{type:[String,Array],default:void 0},dismissable:{type:Boolean,default:!1},autoClose:{type:Number,default:0},closeLabel:{type:String,default:"Close"},title:{type:String,default:void 0},content:{type:String,default:void 0},footer:{type:String,default:void 0},role:{type:String,default:c.alert}};function y(t,o){const{bus:r}=e.inject(d,{}),l=(i=e.computed(()=>t.id),e.computed(()=>String(i?.value||e.useId())));var i;const s=e.computed(()=>`${l.value}-title`);let c;const u=()=>{c&&clearTimeout(c),o("close",l.value),r?.emit("close",l.value)};e.watch(()=>t.autoClose,e=>{e>0?c=setTimeout(u,e):c&&clearTimeout(c)},{immediate:!0});const v=e.ref(!1),f=()=>{v.value=!0,c&&clearTimeout(c)},p=()=>{v.value=!1,t.autoClose>0&&(c=setTimeout(u,t.autoClose))},{hasIcon:b}=function(t,o){const r=e.computed(()=>"string"==typeof t?.value?{name:t?.value}:t?.value),l=e.computed(()=>o?.value===a.before?r.value:void 0),i=e.computed(()=>o?.value===a.after?r.value:void 0),s=e.computed(()=>o?.value===n.left?r.value:void 0),c=e.computed(()=>o?.value===n.right?r.value:void 0),u=e.computed(()=>o?.value===n.top?r.value:void 0),d=e.computed(()=>o?.value===n.bottom?r.value:void 0);return{hasIcon:r,hasIconLeft:s,hasIconRight:c,hasIconTop:u,hasIconBottom:d,hasIconBefore:l,hasIconAfter:i}}(e.computed(()=>t.icon)),h=m("vv-alert",e.computed(()=>t.modifiers),e.computed(()=>({dismissable:t.autoClose>0||t.dismissable,"auto-close":t.autoClose>0,hover:v.value}))),g=e.computed(()=>({"--alert-duration":`${t.autoClose}ms`}));return{close:u,hasIcon:b,hasTitleId:s,hasProps:e.computed(()=>({onMouseover:f,onMouseleave:p,class:h.value,style:g.value,role:t.role,"aria-labelledby":s.value}))}}const k=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},r),setup(t){const r=t,l=e.computed(()=>"string"==typeof r.rotate?Number.parseFloat(r.rotate):r.rotate),n=e.ref(!0),a=e.inject(u,void 0),{modifiers:i}=e.toRefs(r),s=m("vv-icon",i),c=e.computed(()=>r.provider||a?.iconsProvider),d=e.computed(()=>{const e=r.name??"",t=`@${c.value}:${r.prefix}:${e}`;if(o.iconLoaded(t))return t;const l=a?.iconsCollections.find(t=>{const r=`@${c.value}:${t.prefix}:${e}`;return o.iconLoaded(r)});return l?`@${c.value}:${l.prefix}:${e}`:e});function v(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),l=t?.innerHTML.trim()||"";t&&l&&o.addIcon(`@${c.value}:${r.prefix}:${r.name}`,{body:l,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return a&&r.src&&!o.iconLoaded(`@${c.value}:${r.prefix}:${r.name}`)&&(n.value=!1,a.fetchIcon(r.src).then(e=>{e&&(v(e),n.value=!0)}).catch(e=>{throw new Error(`Error during fetch icon: ${e?.message}`)})),r.svg&&v(r.svg),(
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","mitt","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAlertGroup=t(e.vue,e.mitt,e.vue$1)}(this,function(e,t,o){"use strict";const r={prefix:"normal"};var l=(e=>(e.local="local",e.session="session",e))(l||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{}),c=(e=>(e.alert="alert",e.alertdialog="alertdialog",e))(c||{});const u=Symbol.for("volver"),d=Symbol.for("alertGroup"),v={modifiers:{type:[String,Array],default:void 0}},f={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:a.before,validation:e=>Object.values(a).includes(e)}},p={id:[String,Number]};function m(t,o,r){return e.computed(()=>{const l={[t]:!0},n="string"==typeof o?.value?o.value.split(" "):o?.value;return n&&Array.isArray(n)&&n.forEach(e=>{e&&(l[`${t}--${e}`]=!0)}),r&&Object.keys(r.value).forEach(o=>{l[`${t}--${o}`]=e.unref(r.value[o])}),l})}n.bottom,i.button,s.button,l.local;const b={...v,name:{type:String,required:!0},items:{type:Array,default:()=>[]},stack:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},inline:{type:String,default:void 0},block:{type:String,default:void 0},position:{type:String,default:void 0},transition:{type:String,default:void 0}};function h(o,r){const l=function({name:o}){const r=t();return e.provide(d,{name:o,bus:r}),r}({name:e.computed(()=>o.name)});(o.block&&!o.inline||!o.block&&o.inline)&&console.warn("[VvAlertGroup]: block and inline props must coexist at the same time.");const n=e.computed(()=>{const t=[m("vv-alert-group",e.computed(()=>o.modifiers),e.computed(()=>({stack:o.stack,reverse:o.reverse,absolute:"absolute"===o.position,fixed:"fixed"===o.position}))).value];return o.inline&&o.block&&t.push(`vv-alert-group--${o.block}-${o.inline}`),t}),a=e.computed(()=>o.transition?o.transition:o.position?"start"===o.inline?"vv-alert--fade-inline-start":"end"===o.inline?"vv-alert--fade-inline-end":"top"===o.block?"vv-alert--fade-block-top":"bottom"===o.block?"vv-alert--fade-block-bottom":"vv-alert--fade":"vv-alert--fade");return l.on("close",e=>{r("close",e)}),{hasTransition:a,hasProps:e.computed(()=>({class:n.value}))}}const g={...p,...f,modifiers:{type:[String,Array],default:void 0},dismissable:{type:Boolean,default:!1},autoClose:{type:Number,default:0},closeLabel:{type:String,default:"Close"},title:{type:String,default:void 0},content:{type:String,default:void 0},footer:{type:String,default:void 0},role:{type:String,default:c.alert}};function y(t,o){const{bus:r}=e.inject(d,{}),l=(i=e.computed(()=>t.id),e.computed(()=>String(i?.value||e.useId())));var i;const s=e.computed(()=>`${l.value}-title`);let c;const u=()=>{c&&clearTimeout(c),o("close",l.value),r?.emit("close",l.value)};e.watch(()=>t.autoClose,e=>{e>0?c=setTimeout(u,e):c&&clearTimeout(c)},{immediate:!0});const v=e.ref(!1),f=()=>{v.value=!0,c&&clearTimeout(c)},p=()=>{v.value=!1,t.autoClose>0&&(c=setTimeout(u,t.autoClose))},{hasIcon:b}=function(t,o){const r=e.computed(()=>"string"==typeof t?.value?{name:t?.value}:t?.value),l=e.computed(()=>o?.value===a.before?r.value:void 0),i=e.computed(()=>o?.value===a.after?r.value:void 0),s=e.computed(()=>o?.value===n.left?r.value:void 0),c=e.computed(()=>o?.value===n.right?r.value:void 0),u=e.computed(()=>o?.value===n.top?r.value:void 0),d=e.computed(()=>o?.value===n.bottom?r.value:void 0);return{hasIcon:r,hasIconLeft:s,hasIconRight:c,hasIconTop:u,hasIconBottom:d,hasIconBefore:l,hasIconAfter:i}}(e.computed(()=>t.icon)),h=m("vv-alert",e.computed(()=>t.modifiers),e.computed(()=>({dismissable:t.autoClose>0||t.dismissable,"auto-close":t.autoClose>0,hover:v.value}))),g=e.computed(()=>({"--alert-duration":`${t.autoClose}ms`}));return{close:u,hasIcon:b,hasTitleId:s,hasProps:e.computed(()=>({onMouseover:f,onMouseleave:p,class:h.value,style:g.value,role:t.role,"aria-labelledby":s.value}))}}const k=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},r),setup(t){const r=t,l=e.computed(()=>"string"==typeof r.rotate?Number.parseFloat(r.rotate):r.rotate),n=e.ref(!0),a=e.inject(u,void 0),{modifiers:i}=e.toRefs(r),s=m("vv-icon",i),c=e.computed(()=>r.provider||a?.iconsProvider),d=e.computed(()=>{const e=r.name??"",t=`@${c.value}:${r.prefix}:${e}`;if(o.iconLoaded(t))return t;const l=a?.iconsCollections.find(t=>{const r=`@${c.value}:${t.prefix}:${e}`;return o.iconLoaded(r)});return l?`@${c.value}:${l.prefix}:${e}`:e});function v(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),l=t?.innerHTML.trim()||"";t&&l&&o.addIcon(`@${c.value}:${r.prefix}:${r.name}`,{body:l,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return a&&r.src&&!o.iconLoaded(`@${c.value}:${r.prefix}:${r.name}`)&&(n.value=!1,a.fetchIcon(r.src).then(e=>{e&&(v(e),n.value=!0)}).catch(e=>{throw new Error(`Error during fetch icon: ${e?.message}`)})),r.svg&&v(r.svg),(r,a)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(s)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(l),color:t.color,icon:e.unref(d)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):e.createCommentVNode("v-if",!0)}}),$={key:0,class:"vv-alert__header"},S=["id"],B=["aria-label"],C={key:1,class:"vv-alert__content"},w={key:2,class:"vv-alert__footer"},x=e.defineComponent({name:"VvAlert",props:g,emits:["close"],setup(t,{expose:o,emit:r}){const l=t,n=r,{hasProps:a,hasTitleId:i,hasIcon:s,close:c}=y(l,n);return o({close:c}),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(e.unref(a))),[t.$slots.header||t.$slots.title||t.$slots.close||t.$slots["title::before"]||t.$slots["title::after"]||t.title||e.unref(s)||t.dismissable||t.autoClose?(e.openBlock(),e.createElementBlock("div",$,[e.unref(s)?(e.openBlock(),e.createBlock(k,e.mergeProps({key:0},e.unref(s),{class:"vv-alert__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"header",{},()=>[e.renderSlot(t.$slots,"title::before"),t.$slots.title||t.title?(e.openBlock(),e.createElementBlock("strong",{key:0,id:e.unref(i),class:"vv-alert__title"},[e.renderSlot(t.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],8,S)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"title::after")]),e.renderSlot(t.$slots,"close",e.normalizeProps(e.guardReactiveProps({close:e.unref(c)})),()=>[t.dismissable||t.autoClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"vv-alert__close",type:"button","aria-label":t.closeLabel,onClick:o[0]||(o[0]=e.withModifiers((...t)=>e.unref(c)&&e.unref(c)(...t),["stop"]))},[...o[1]||(o[1]=[e.createElementVNode("div",{class:"vv-alert__close-mask"},null,-1)])],8,B)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),t.$slots.default||t.content?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)])])):e.createCommentVNode("v-if",!0),t.$slots.footer||t.footer?(e.openBlock(),e.createElementBlock("div",w,[e.renderSlot(t.$slots,"footer",{},()=>[e.createTextVNode(e.toDisplayString(t.footer),1)])])):e.createCommentVNode("v-if",!0)],16))}});return e.defineComponent({name:"VvAlertGroup",props:b,emits:["close","beforeEnter","afterLeave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{emit:o}){const r=t,l=o,{hasProps:n,hasTransition:a}=h(r,l),i={"before-enter":()=>{l("beforeEnter")},"after-leave":()=>{l("afterLeave")},enter:()=>{l("enter")},"after-enter":()=>{l("afterEnter")},"enter-cancelled":()=>{l("enterCancelled")},"before-leave":()=>{l("beforeLeave")},leave:()=>{l("leave")},"leave-cancelled":()=>{l("leaveCancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(e.unref(n))),[e.renderSlot(t.$slots,"before"),e.createVNode(e.TransitionGroup,e.mergeProps({tag:"div",role:"group",name:e.unref(a),class:"vv-alert-group__list"},e.toHandlers(i)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,t=>(e.openBlock(),e.createBlock(x,e.mergeProps({ref_for:!0},t,{key:t.id}),null,16))),128))])]),_:3},16,["name"]),e.renderSlot(t.$slots,"after")],16))}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
name: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
required: boolean;
|
|
@@ -88,6 +88,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
88
88
|
} & {
|
|
89
89
|
after?: (props: {}) => any;
|
|
90
90
|
}>;
|
|
91
|
+
declare const _default: typeof __VLS_export;
|
|
91
92
|
export default _default;
|
|
92
93
|
type __VLS_WithSlots<T, S> = T & {
|
|
93
94
|
new (): {
|
|
@@ -1,132 +1 @@
|
|
|
1
|
-
import {
|
|
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 ModifiersProps = {
|
|
33
|
-
/**
|
|
34
|
-
* Component BEM modifiers
|
|
35
|
-
*/
|
|
36
|
-
modifiers: {
|
|
37
|
-
type: [String, Array],
|
|
38
|
-
default: void 0
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
({
|
|
42
|
-
/**
|
|
43
|
-
* VvIcon position
|
|
44
|
-
*/
|
|
45
|
-
iconPosition: {
|
|
46
|
-
default: Position.before
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
({
|
|
50
|
-
/**
|
|
51
|
-
* Dropdown placement
|
|
52
|
-
*/
|
|
53
|
-
placement: {
|
|
54
|
-
default: Side.bottom
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
({
|
|
58
|
-
/**
|
|
59
|
-
* Button type
|
|
60
|
-
*/
|
|
61
|
-
type: {
|
|
62
|
-
default: ButtonType.button
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* Default tag for the action
|
|
66
|
-
*/
|
|
67
|
-
defaultTag: {
|
|
68
|
-
default: ActionTag.button
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
({
|
|
72
|
-
storageType: {
|
|
73
|
-
default: StorageType.local
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const VvAvatarProps = {
|
|
77
|
-
...ModifiersProps,
|
|
78
|
-
/**
|
|
79
|
-
* Image src for avatar
|
|
80
|
-
*/
|
|
81
|
-
imgSrc: String
|
|
82
|
-
};
|
|
83
|
-
function useModifiers(prefix, modifiers, others) {
|
|
84
|
-
return computed(() => {
|
|
85
|
-
const toReturn = {
|
|
86
|
-
[prefix]: true
|
|
87
|
-
};
|
|
88
|
-
const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
|
|
89
|
-
if (modifiersArray) {
|
|
90
|
-
if (Array.isArray(modifiersArray)) {
|
|
91
|
-
modifiersArray.forEach((modifier) => {
|
|
92
|
-
if (modifier) {
|
|
93
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return toReturn;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
const _hoisted_1 = ["role", "aria-label"];
|
|
102
|
-
const _hoisted_2 = ["src"];
|
|
103
|
-
const __default__ = {
|
|
104
|
-
name: "VvAvatar"
|
|
105
|
-
};
|
|
106
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
107
|
-
...__default__,
|
|
108
|
-
props: VvAvatarProps,
|
|
109
|
-
setup(__props) {
|
|
110
|
-
const props = __props;
|
|
111
|
-
const { modifiers } = toRefs(props);
|
|
112
|
-
const bemCssClasses = useModifiers("vv-avatar", modifiers);
|
|
113
|
-
return (_ctx, _cache) => {
|
|
114
|
-
return openBlock(), createElementBlock("span", {
|
|
115
|
-
class: normalizeClass(unref(bemCssClasses)),
|
|
116
|
-
role: _ctx.imgSrc ? void 0 : "img",
|
|
117
|
-
"aria-label": _ctx.imgSrc ? void 0 : "avatar"
|
|
118
|
-
}, [
|
|
119
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
120
|
-
_ctx.imgSrc ? (openBlock(), createElementBlock("img", {
|
|
121
|
-
key: 0,
|
|
122
|
-
src: _ctx.imgSrc,
|
|
123
|
-
alt: "avatar"
|
|
124
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
125
|
-
])
|
|
126
|
-
], 10, _hoisted_1);
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
export {
|
|
131
|
-
_sfc_main as default
|
|
132
|
-
};
|
|
1
|
+
import{computed as t,defineComponent as r,toRefs as o,createElementBlock as a,openBlock as e,normalizeClass as i,unref as n,renderSlot as s,createCommentVNode as l}from"vue";var u=/* @__PURE__ */(t=>(t.local="local",t.session="session",t))(u||{}),c=/* @__PURE__ */(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(c||{}),f=/* @__PURE__ */(t=>(t.before="before",t.after="after",t))(f||{}),m=/* @__PURE__ */(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(m||{}),b=/* @__PURE__ */(t=>(t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t))(b||{});const v={modifiers:{type:[String,Array],default:void 0}};f.before,c.bottom,m.button,b.button,u.local;const g={...v,imgSrc:String};const p=["role","aria-label"],d=["src"],S=/* @__PURE__ */r({name:"VvAvatar",props:g,setup(r){const u=r,{modifiers:c}=o(u),f=function(r,o){return t(()=>{const t={[r]:!0},a="string"==typeof o?.value?o.value.split(" "):o?.value;return a&&Array.isArray(a)&&a.forEach(o=>{o&&(t[`${r}--${o}`]=!0)}),t})}("vv-avatar",c);return(t,r)=>(e(),a("span",{class:i(n(f)),role:t.imgSrc?void 0:"img","aria-label":t.imgSrc?void 0:"avatar"},[s(t.$slots,"default",{},()=>[t.imgSrc?(e(),a("img",{key:0,src:t.imgSrc,alt:"avatar"},null,8,d)):l("v-if",!0)])],10,p))}});export{S as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
imgSrc: StringConstructor;
|
|
3
3
|
modifiers: {
|
|
4
4
|
type: PropType<string | string[]>;
|
|
@@ -15,6 +15,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
16
16
|
default?: (props: {}) => any;
|
|
17
17
|
}>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
18
19
|
export default _default;
|
|
19
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
20
21
|
new (): {
|
|
@@ -1,250 +1 @@
|
|
|
1
|
-
import {
|
|
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 ModifiersProps = {
|
|
33
|
-
/**
|
|
34
|
-
* Component BEM modifiers
|
|
35
|
-
*/
|
|
36
|
-
modifiers: {
|
|
37
|
-
type: [String, Array],
|
|
38
|
-
default: void 0
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
({
|
|
42
|
-
/**
|
|
43
|
-
* VvIcon position
|
|
44
|
-
*/
|
|
45
|
-
iconPosition: {
|
|
46
|
-
default: Position.before
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
({
|
|
50
|
-
/**
|
|
51
|
-
* Dropdown placement
|
|
52
|
-
*/
|
|
53
|
-
placement: {
|
|
54
|
-
default: Side.bottom
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
({
|
|
58
|
-
/**
|
|
59
|
-
* Button type
|
|
60
|
-
*/
|
|
61
|
-
type: {
|
|
62
|
-
default: ButtonType.button
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* Default tag for the action
|
|
66
|
-
*/
|
|
67
|
-
defaultTag: {
|
|
68
|
-
default: ActionTag.button
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
({
|
|
72
|
-
storageType: {
|
|
73
|
-
default: StorageType.local
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const VvAvatarProps = {
|
|
77
|
-
...ModifiersProps,
|
|
78
|
-
/**
|
|
79
|
-
* Image src for avatar
|
|
80
|
-
*/
|
|
81
|
-
imgSrc: String
|
|
82
|
-
};
|
|
83
|
-
function useModifiers(prefix, modifiers, others) {
|
|
84
|
-
return computed(() => {
|
|
85
|
-
const toReturn = {
|
|
86
|
-
[prefix]: true
|
|
87
|
-
};
|
|
88
|
-
const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
|
|
89
|
-
if (modifiersArray) {
|
|
90
|
-
if (Array.isArray(modifiersArray)) {
|
|
91
|
-
modifiersArray.forEach((modifier) => {
|
|
92
|
-
if (modifier) {
|
|
93
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return toReturn;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
const _hoisted_1$1 = ["role", "aria-label"];
|
|
102
|
-
const _hoisted_2 = ["src"];
|
|
103
|
-
const __default__$1 = {
|
|
104
|
-
name: "VvAvatar"
|
|
105
|
-
};
|
|
106
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
107
|
-
...__default__$1,
|
|
108
|
-
props: VvAvatarProps,
|
|
109
|
-
setup(__props) {
|
|
110
|
-
const props = __props;
|
|
111
|
-
const { modifiers } = toRefs(props);
|
|
112
|
-
const bemCssClasses = useModifiers("vv-avatar", modifiers);
|
|
113
|
-
return (_ctx, _cache) => {
|
|
114
|
-
return openBlock(), createElementBlock("span", {
|
|
115
|
-
class: normalizeClass(unref(bemCssClasses)),
|
|
116
|
-
role: _ctx.imgSrc ? void 0 : "img",
|
|
117
|
-
"aria-label": _ctx.imgSrc ? void 0 : "avatar"
|
|
118
|
-
}, [
|
|
119
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
120
|
-
_ctx.imgSrc ? (openBlock(), createElementBlock("img", {
|
|
121
|
-
key: 0,
|
|
122
|
-
src: _ctx.imgSrc,
|
|
123
|
-
alt: "avatar"
|
|
124
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
125
|
-
])
|
|
126
|
-
], 10, _hoisted_1$1);
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
const VvAvatarGroupProps = {
|
|
131
|
-
...ModifiersProps,
|
|
132
|
-
/**
|
|
133
|
-
* avatar items
|
|
134
|
-
*/
|
|
135
|
-
items: {
|
|
136
|
-
type: Array,
|
|
137
|
-
default: () => [],
|
|
138
|
-
required: true
|
|
139
|
-
},
|
|
140
|
-
toShow: {
|
|
141
|
-
type: Number,
|
|
142
|
-
default: 3
|
|
143
|
-
},
|
|
144
|
-
totalItems: {
|
|
145
|
-
type: Number
|
|
146
|
-
},
|
|
147
|
-
avatarModifiers: [String, Array]
|
|
148
|
-
};
|
|
149
|
-
function useUniqueId(id) {
|
|
150
|
-
return computed(() => String(useId()));
|
|
151
|
-
}
|
|
152
|
-
const _hoisted_1 = { key: 0 };
|
|
153
|
-
const __default__ = {
|
|
154
|
-
name: "VvAvatarGroup"
|
|
155
|
-
};
|
|
156
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
157
|
-
...__default__,
|
|
158
|
-
props: VvAvatarGroupProps,
|
|
159
|
-
setup(__props) {
|
|
160
|
-
const props = __props;
|
|
161
|
-
const { modifiers, items, toShow, totalItems, avatarModifiers } = toRefs(props);
|
|
162
|
-
const bemCssClasses = useModifiers("vv-avatar-group", modifiers);
|
|
163
|
-
const stringModifiers = computed(() => {
|
|
164
|
-
if (avatarModifiers?.value && Array.isArray(avatarModifiers?.value)) {
|
|
165
|
-
return avatarModifiers.value.join(" ");
|
|
166
|
-
}
|
|
167
|
-
return avatarModifiers?.value || "";
|
|
168
|
-
});
|
|
169
|
-
const avatarItems = computed(() => {
|
|
170
|
-
return items.value.slice(0, toShow.value).map((item) => {
|
|
171
|
-
let modifiers2 = [];
|
|
172
|
-
let itemModifiers = [];
|
|
173
|
-
if (avatarModifiers?.value) {
|
|
174
|
-
modifiers2 = Array.isArray(avatarModifiers?.value) ? avatarModifiers?.value : [avatarModifiers?.value];
|
|
175
|
-
}
|
|
176
|
-
if (item.modifiers) {
|
|
177
|
-
itemModifiers = Array.isArray(item.modifiers) ? item.modifiers : [item.modifiers];
|
|
178
|
-
}
|
|
179
|
-
return {
|
|
180
|
-
...item,
|
|
181
|
-
key: item.key || useUniqueId().value,
|
|
182
|
-
modifiers: [...modifiers2, ...itemModifiers]
|
|
183
|
-
};
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
return (_ctx, _cache) => {
|
|
187
|
-
return openBlock(), createElementBlock(
|
|
188
|
-
"span",
|
|
189
|
-
{
|
|
190
|
-
class: normalizeClass(unref(bemCssClasses))
|
|
191
|
-
},
|
|
192
|
-
[
|
|
193
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
194
|
-
(openBlock(true), createElementBlock(
|
|
195
|
-
Fragment,
|
|
196
|
-
null,
|
|
197
|
-
renderList(unref(avatarItems), (avatarItem) => {
|
|
198
|
-
return openBlock(), createBlock(
|
|
199
|
-
_sfc_main$1,
|
|
200
|
-
mergeProps({
|
|
201
|
-
key: avatarItem.key
|
|
202
|
-
}, { ref_for: true }, {
|
|
203
|
-
modifiers: avatarItem.modifiers,
|
|
204
|
-
imgSrc: avatarItem.imgSrc
|
|
205
|
-
}),
|
|
206
|
-
{
|
|
207
|
-
default: withCtx(() => [
|
|
208
|
-
avatarItem.text ? (openBlock(), createElementBlock(
|
|
209
|
-
"span",
|
|
210
|
-
_hoisted_1,
|
|
211
|
-
toDisplayString(avatarItem.text),
|
|
212
|
-
1
|
|
213
|
-
/* TEXT */
|
|
214
|
-
)) : createCommentVNode("v-if", true)
|
|
215
|
-
]),
|
|
216
|
-
_: 2
|
|
217
|
-
/* DYNAMIC */
|
|
218
|
-
},
|
|
219
|
-
1040
|
|
220
|
-
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
221
|
-
);
|
|
222
|
-
}),
|
|
223
|
-
128
|
|
224
|
-
/* KEYED_FRAGMENT */
|
|
225
|
-
)),
|
|
226
|
-
(unref(totalItems) || unref(items).length) > unref(toShow) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
227
|
-
key: 0,
|
|
228
|
-
modifiers: `${unref(stringModifiers)} surface bordered`
|
|
229
|
-
}, {
|
|
230
|
-
default: withCtx(() => [
|
|
231
|
-
createTextVNode(
|
|
232
|
-
toDisplayString(`+${(unref(totalItems) || unref(items).length) - unref(toShow)}`),
|
|
233
|
-
1
|
|
234
|
-
/* TEXT */
|
|
235
|
-
)
|
|
236
|
-
]),
|
|
237
|
-
_: 1
|
|
238
|
-
/* STABLE */
|
|
239
|
-
}, 8, ["modifiers"])) : createCommentVNode("v-if", true)
|
|
240
|
-
])
|
|
241
|
-
],
|
|
242
|
-
2
|
|
243
|
-
/* CLASS */
|
|
244
|
-
);
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
export {
|
|
249
|
-
_sfc_main as default
|
|
250
|
-
};
|
|
1
|
+
import{computed as r,defineComponent as e,toRefs as t,createElementBlock as a,openBlock as i,normalizeClass as o,unref as s,renderSlot as l,createCommentVNode as u,useId as n,createBlock as f,Fragment as m,renderList as v,mergeProps as d,withCtx as c,toDisplayString as y,createTextVNode as p}from"vue";var b=/* @__PURE__ */(r=>(r.local="local",r.session="session",r))(b||{}),g=/* @__PURE__ */(r=>(r.left="left",r.right="right",r.top="top",r.bottom="bottom",r))(g||{}),A=/* @__PURE__ */(r=>(r.before="before",r.after="after",r))(A||{}),S=/* @__PURE__ */(r=>(r.button="button",r.submit="submit",r.reset="reset",r))(S||{}),k=/* @__PURE__ */(r=>(r.nuxtLink="nuxt-link",r.routerLink="router-link",r.a="a",r.button="button",r))(k||{});const h={modifiers:{type:[String,Array],default:void 0}};A.before,g.bottom,S.button,k.button,b.local;const x={...h,imgSrc:String};function $(e,t,a){return r(()=>{const r={[e]:!0},a="string"==typeof t?.value?t.value.split(" "):t?.value;return a&&Array.isArray(a)&&a.forEach(t=>{t&&(r[`${e}--${t}`]=!0)}),r})}const _=["role","aria-label"],w=["src"],I=/* @__PURE__ */e({name:"VvAvatar",props:x,setup(r){const e=r,{modifiers:n}=t(e),f=$("vv-avatar",n);return(r,e)=>(i(),a("span",{class:o(s(f)),role:r.imgSrc?void 0:"img","aria-label":r.imgSrc?void 0:"avatar"},[l(r.$slots,"default",{},()=>[r.imgSrc?(i(),a("img",{key:0,src:r.imgSrc,alt:"avatar"},null,8,w)):u("v-if",!0)])],10,_))}}),L={...h,items:{type:Array,default:()=>[],required:!0},toShow:{type:Number,default:3},totalItems:{type:Number},avatarModifiers:[String,Array]};const M={key:0},N=/* @__PURE__ */e({name:"VvAvatarGroup",props:L,setup(e){const b=e,{modifiers:g,items:A,toShow:S,totalItems:k,avatarModifiers:h}=t(b),x=$("vv-avatar-group",g),_=r(()=>h?.value&&Array.isArray(h?.value)?h.value.join(" "):h?.value||""),w=r(()=>A.value.slice(0,S.value).map(e=>{let t=[],a=[];return h?.value&&(t=Array.isArray(h?.value)?h?.value:[h?.value]),e.modifiers&&(a=Array.isArray(e.modifiers)?e.modifiers:[e.modifiers]),{...e,key:e.key||r(()=>String(n())).value,modifiers:[...t,...a]}}));return(r,e)=>(i(),a("span",{class:o(s(x))},[l(r.$slots,"default",{},()=>[(i(!0),a(m,null,v(s(w),r=>(i(),f(I,d({key:r.key},{ref_for:!0},{modifiers:r.modifiers,imgSrc:r.imgSrc}),{default:c(()=>[r.text?(i(),a("span",M,y(r.text),1)):u("v-if",!0)]),_:2},1040))),128)),(s(k)||s(A).length)>s(S)?(i(),f(I,{key:0,modifiers:`${s(_)} surface bordered`},{default:c(()=>[p(y("+"+((s(k)||s(A).length)-s(S))),1)]),_:1},8,["modifiers"])):u("v-if",!0)])],2))}});export{N as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
items: {
|
|
3
3
|
type: PropType<import("@/components/VvAvatarGroup").AvatarItem[]>;
|
|
4
4
|
default: () => never[];
|
|
@@ -41,6 +41,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
41
41
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
42
42
|
default?: (props: {}) => any;
|
|
43
43
|
}>;
|
|
44
|
+
declare const _default: typeof __VLS_export;
|
|
44
45
|
export default _default;
|
|
45
46
|
type __VLS_WithSlots<T, S> = T & {
|
|
46
47
|
new (): {
|
|
@@ -1,131 +1 @@
|
|
|
1
|
-
import
|
|
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 ModifiersProps = {
|
|
33
|
-
/**
|
|
34
|
-
* Component BEM modifiers
|
|
35
|
-
*/
|
|
36
|
-
modifiers: {
|
|
37
|
-
type: [String, Array],
|
|
38
|
-
default: void 0
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
({
|
|
42
|
-
/**
|
|
43
|
-
* VvIcon position
|
|
44
|
-
*/
|
|
45
|
-
iconPosition: {
|
|
46
|
-
default: Position.before
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
({
|
|
50
|
-
/**
|
|
51
|
-
* Dropdown placement
|
|
52
|
-
*/
|
|
53
|
-
placement: {
|
|
54
|
-
default: Side.bottom
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
({
|
|
58
|
-
/**
|
|
59
|
-
* Button type
|
|
60
|
-
*/
|
|
61
|
-
type: {
|
|
62
|
-
default: ButtonType.button
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* Default tag for the action
|
|
66
|
-
*/
|
|
67
|
-
defaultTag: {
|
|
68
|
-
default: ActionTag.button
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
({
|
|
72
|
-
storageType: {
|
|
73
|
-
default: StorageType.local
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const VvBadgeProps = {
|
|
77
|
-
...ModifiersProps,
|
|
78
|
-
value: [String, Number]
|
|
79
|
-
};
|
|
80
|
-
function useModifiers(prefix, modifiers, others) {
|
|
81
|
-
return computed(() => {
|
|
82
|
-
const toReturn = {
|
|
83
|
-
[prefix]: true
|
|
84
|
-
};
|
|
85
|
-
const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
|
|
86
|
-
if (modifiersArray) {
|
|
87
|
-
if (Array.isArray(modifiersArray)) {
|
|
88
|
-
modifiersArray.forEach((modifier) => {
|
|
89
|
-
if (modifier) {
|
|
90
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return toReturn;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
const __default__ = {
|
|
99
|
-
name: "VvBadge"
|
|
100
|
-
};
|
|
101
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
|
-
...__default__,
|
|
103
|
-
props: VvBadgeProps,
|
|
104
|
-
setup(__props) {
|
|
105
|
-
const props = __props;
|
|
106
|
-
const { modifiers } = toRefs(props);
|
|
107
|
-
const bemCssClasses = useModifiers("vv-badge", modifiers);
|
|
108
|
-
return (_ctx, _cache) => {
|
|
109
|
-
return openBlock(), createElementBlock(
|
|
110
|
-
"span",
|
|
111
|
-
{
|
|
112
|
-
class: normalizeClass(unref(bemCssClasses))
|
|
113
|
-
},
|
|
114
|
-
[
|
|
115
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
116
|
-
createTextVNode(
|
|
117
|
-
toDisplayString(_ctx.value),
|
|
118
|
-
1
|
|
119
|
-
/* TEXT */
|
|
120
|
-
)
|
|
121
|
-
])
|
|
122
|
-
],
|
|
123
|
-
2
|
|
124
|
-
/* CLASS */
|
|
125
|
-
);
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
export {
|
|
130
|
-
_sfc_main as default
|
|
131
|
-
};
|
|
1
|
+
import{computed as t,defineComponent as e,toRefs as o,createElementBlock as r,openBlock as n,normalizeClass as s,unref as u,renderSlot as a,createTextVNode as i,toDisplayString as l}from"vue";var b=/* @__PURE__ */(t=>(t.local="local",t.session="session",t))(b||{}),f=/* @__PURE__ */(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(f||{}),m=/* @__PURE__ */(t=>(t.before="before",t.after="after",t))(m||{}),p=/* @__PURE__ */(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(p||{}),v=/* @__PURE__ */(t=>(t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t))(v||{});const c={modifiers:{type:[String,Array],default:void 0}};m.before,f.bottom,p.button,v.button,b.local;const d=/* @__PURE__ */e({name:"VvBadge",props:{...c,value:[String,Number]},setup(e){const b=e,{modifiers:f}=o(b),m=function(e,o){return t(()=>{const t={[e]:!0},r="string"==typeof o?.value?o.value.split(" "):o?.value;return r&&Array.isArray(r)&&r.forEach(o=>{o&&(t[`${e}--${o}`]=!0)}),t})}("vv-badge",f);return(t,e)=>(n(),r("span",{class:s(u(m))},[a(t.$slots,"default",{},()=>[i(l(t.value),1)])],2))}});export{d as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
value: (StringConstructor | NumberConstructor)[];
|
|
3
3
|
modifiers: {
|
|
4
4
|
type: PropType<string | string[]>;
|
|
@@ -15,6 +15,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<globalThis
|
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
16
16
|
default?: (props: {}) => any;
|
|
17
17
|
}>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
18
19
|
export default _default;
|
|
19
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
20
21
|
new (): {
|