@e-xode/vui 0.6.9 → 0.7.0
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/doc/assets/{alert-Dv5B896E.js → alert-BBjxjIYQ.js} +1 -1
- package/dist/doc/assets/{alert-CjYfnkgY.js → alert-Ci9G_Xbl.js} +1 -1
- package/dist/doc/assets/{button-BiUDTpHI.js → button-AZkGiKJz.js} +1 -1
- package/dist/doc/assets/{button-0GcTFHSi.js → button-aM2Ty17x.js} +1 -1
- package/dist/doc/assets/{card-BSHBp5H2.js → card-Dro-2qhH.js} +1 -1
- package/dist/doc/assets/{card-Chf4PL7v.js → card-GjtJuIhZ.js} +1 -1
- package/dist/doc/assets/{checkbox-DqWZaBiH.js → checkbox-BkHRvdA5.js} +1 -1
- package/dist/doc/assets/{checkbox-CndsCrpw.js → checkbox-Cp-lK14-.js} +1 -1
- package/dist/doc/assets/{component-CRjEDIeL.js → component-zSZRDW19.js} +1 -1
- package/dist/doc/assets/{default-BGdD15yH.js → default-CLRvx0EM.js} +1 -1
- package/dist/doc/assets/{demonstrable-DoDjrIlv.js → demonstrable-CBEr3Dc5.js} +1 -1
- package/dist/doc/assets/dropdown-7vzcI5o3.js +1 -0
- package/dist/doc/assets/{dropdown-DE0RkMrn.js → dropdown-CLYASRzv.js} +1 -1
- package/dist/doc/assets/{footer-ZKa9EX9c.js → footer-0Nol1lGe.js} +1 -1
- package/dist/doc/assets/{footer-QuG2cPMr.js → footer-OlxZPCKE.js} +1 -1
- package/dist/doc/assets/{form-BQktZa2P.js → form-BSKjRhoj.js} +1 -1
- package/dist/doc/assets/{form-BufwdW7J.js → form-D_Xvpl1o.js} +1 -1
- package/dist/doc/assets/{grid-BPofjRVD.js → grid-9ZYvD8cA.js} +1 -1
- package/dist/doc/assets/{grid-Bb5Dvs-l.js → grid-uMlfJ0Zu.js} +1 -1
- package/dist/doc/assets/{header-D3RtYpzx.js → header-DEW5JrUy.js} +1 -1
- package/dist/doc/assets/{header-BIii_sel.js → header-DkZ7LnIZ.js} +1 -1
- package/dist/doc/assets/{index-BTkXFI8q.js → index-CXVfKCPR.js} +3 -3
- package/dist/doc/assets/{index-B9J_Vhzy.js → index-DGUT4ewl.js} +1 -1
- package/dist/doc/assets/{input-CIyXwPJo.js → input-D_kP_2ML.js} +1 -1
- package/dist/doc/assets/{input-DhEvJPvY.js → input-VSM7Q0kg.js} +1 -1
- package/dist/doc/assets/{list-6T_m0poQ.js → list-BZb1aorL.js} +1 -1
- package/dist/doc/assets/{list-CM39BhXG.js → list-Leh1yQmW.js} +1 -1
- package/dist/doc/assets/{loader-C9zMMltn.js → loader-D6DkOZ8i.js} +1 -1
- package/dist/doc/assets/{loader-Cq-sKRvC.js → loader-j01qSV40.js} +1 -1
- package/dist/doc/assets/{modal-C53ocn5e.js → modal-FMP_4drO.js} +1 -1
- package/dist/doc/assets/{modal-GnTlL4YH.js → modal-lErEuEzO.js} +1 -1
- package/dist/doc/assets/{nav-BpjBJvti.js → nav-CKk3_ruI.js} +1 -1
- package/dist/doc/assets/{nav-zPqs5uBf.js → nav-EucFvkvm.js} +1 -1
- package/dist/doc/assets/{page-SGBLPlKo.js → page-9v9_Ju9t.js} +1 -1
- package/dist/doc/assets/{page-TW0mWSQ1.js → page-Dhr7CkBW.js} +1 -1
- package/dist/doc/assets/{pager-Bg7nlzpl.js → pager-B_pu0IcC.js} +1 -1
- package/dist/doc/assets/{pager-RDLltlHx.js → pager-CtDr-L4M.js} +1 -1
- package/dist/doc/assets/{progress-CLQ57-Rn.js → progress-BF_CMK-L.js} +1 -1
- package/dist/doc/assets/{progress-B17kvYeL.js → progress-COHwzKtv.js} +1 -1
- package/dist/doc/assets/{radio-BhS7ejUd.js → radio-BFPB0B01.js} +1 -1
- package/dist/doc/assets/{radio-BYvvsNUN.js → radio-PxaxW9tr.js} +1 -1
- package/dist/doc/assets/{start-BV6lGp3K.js → start-BZc0IFKA.js} +1 -1
- package/dist/doc/assets/{table-BiNwpYJv.js → table-BUyAHD0I.js} +1 -1
- package/dist/doc/assets/{table-iZQFAIYB.js → table-ByuJglma.js} +1 -1
- package/dist/doc/assets/{tabs-CDrn7gwB.js → tabs-CjjUUmcy.js} +1 -1
- package/dist/doc/assets/{tabs-D5P3KDps.js → tabs-DhIeu4y7.js} +1 -1
- package/dist/doc/assets/{tag-C8ZH7AA8.js → tag-CBpmR7kD.js} +1 -1
- package/dist/doc/assets/{tag-Dtea5pEP.js → tag-SxchRyNr.js} +1 -1
- package/dist/doc/assets/{toggle-B9UDc3mD.js → toggle-BPh2pNn-.js} +1 -1
- package/dist/doc/assets/{toggle-DdZEGhQq.js → toggle-csRvSqaz.js} +1 -1
- package/dist/doc/assets/{tooltip-DpfGqhtH.js → tooltip-2A9ZTIcv.js} +1 -1
- package/dist/doc/assets/{tooltip-e4tMYlM-.js → tooltip-_ZLfyOrN.js} +1 -1
- package/dist/doc/assets/{translatable-C-odWYJj.js → translatable-BfRM2PCZ.js} +1 -1
- package/dist/doc/assets/{unit-Nmo6cT5V.js → unit-Dp7j4N4e.js} +1 -1
- package/dist/doc/assets/{unit-DLLXuLch.js → unit-zA8UNlD5.js} +1 -1
- package/dist/doc/index.html +1 -1
- package/dist/{dropdown-DRWYotec.js → dropdown-DQFoAGhr.js} +54 -39
- package/dist/dropdown-DvmYWd27.js +1 -0
- package/dist/vui.esm.js +1 -1
- package/dist/vui.js +1 -1
- package/dist/vui.umd.js +1 -1
- package/package.json +1 -1
- package/dist/doc/assets/dropdown-BdQMe_FS.js +0 -1
- package/dist/dropdown-BYoP3RV5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L}from"./animable-S5zFcxd4.js";import{c as S}from"./composable-CshUTKfl.js";import{_ as j,a as n,j as c,f as m,d as b,F as y,g as k,n as d,o,e as g,t as f,k as v}from"./index-
|
|
1
|
+
import{a as L}from"./animable-S5zFcxd4.js";import{c as S}from"./composable-CshUTKfl.js";import{_ as j,a as n,j as c,f as m,d as b,F as y,g as k,n as d,o,e as g,t as f,k as v}from"./index-CXVfKCPR.js";import{t as I}from"./translatable-BfRM2PCZ.js";function p(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function V(e){return function t(s){return arguments.length===0||p(s)?t:e.apply(this,arguments)}}function C(e){return function t(s,r){switch(arguments.length){case 0:return t;case 1:return p(s)?t:V(function(l){return e(s,l)});default:return p(s)&&p(r)?t:p(s)?V(function(l){return e(l,r)}):p(r)?V(function(l){return e(s,l)}):e(s,r)}}}var B=C(function(t,s){for(var r={},l={},i=0,a=t.length;i<a;)l[t[i]]=1,i+=1;for(var u in s)l.hasOwnProperty(u)||(r[u]=s[u]);return r});const G={},A={},K={en:G,fr:A},N={autoclose:{type:Boolean,default:!0},disableFiltering:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},keyword:{type:String},items:{type:Array,required:!0},itemLabel:{type:String,default:"label"},itemValue:{type:String,default:"value"},modelValue:{default:void 0,types:[Boolean,Number,Object,String]},multiple:{default:!1,type:Boolean},selectable:{type:Boolean},title:{type:String},value:{default:void 0,types:[Boolean,Number,Object,String]}},O={name:"VuiList",mixins:[L,S],props:N,emits:["update:model-value"],data(){return{last:null,open:{},selected:this.multiple?[]:null}},computed:{hasKeyword(){var e;return!this.disableFiltering&&((e=this.keyword)==null?void 0:e.length)},list(){return this.items.reduce((e,t)=>(this.isGroup(t)?e.push({...t,$$id:this.newId(),value:t[this.itemValue].reduce((s,r)=>!this.hasKeyword||this.match(r)?[...s,this.mapItem(r,this.newId())]:s,[])}):(!this.hasKeyword||this.match(t))&&e.push(this.mapItem(t,this.newId())),e),[])}},watch:{items(){this.autoexpand()},modelValue(e){this.selected=this.mapItem(e)},value(e){this.selected=this.mapItem(e)}},created(){I(K),this.hasModelValue?this.selected=this.mapItem(this.modelValue):this.hasValue&&(this.selected=this.mapItem(this.value)),this.autoexpand()},methods:{autoexpand(){this.open=this.items.reduce((e,t,s)=>{if(this.isGroup(t)){const l=t[this.itemValue].findIndex(i=>this.isSelected(i));if(this.expanded||l>-1)return{...e,[s]:!0}}return e},{})},isAnimating(e){const{animating:t,last:s}=this;return s===e&&t},isGroup(e){return Array.isArray(e==null?void 0:e[this.itemValue])},isObject(e){const t=this.itemValue;return this.isGroup(e)?typeof e[t][0]=="object":typeof e=="object"},isSelected(e){return!e.disabled&&typeof this.selected<"u"?this.multiple?typeof this.selected.find(s=>typeof e=="object"?s&&s[this.itemValue]===e[this.itemValue]:s&&s===e)<"u":typeof e=="object"?this.selected&&this.selected[this.itemValue]===e[this.itemValue]:this.selected&&this.selected===e:!1},isToggled(e){const{last:t,open:s,toggled:r}=this;return t===e&&s[e]&&r},match(e){return typeof e=="object"?`${e[this.itemLabel]}`.includes(this.keyword):`${e}`.includes(this.keyword)},mapItem(e,t){const s=typeof e=="object"?e:{[this.itemLabel]:e,[this.itemValue]:e};return t?{...s,$$id:t}:s},onClick(e){if(!this.disabled&&this.selectable){const t=B(["$$id"],e),s=this.isObject(t)&&this.hasAttribute("return-object")?t:t[this.itemValue];if(this.multiple){const r=this.isSelected(t)?this.selected.filter(l=>typeof t=="object"?l&&l[this.itemValue]!==t[this.itemValue]:l&&l!==t):[...this.selected,t];this.selected=r,this.$emit("update:model-value",this.selected)}else this.selected=this.isSelected(t)?null:t,this.$emit("update:model-value",s);t.route&&this.$router.push(t.route)}},onToggle(e){this.disabled||(this.last=e,this.autoclose?this.open={[e]:!this.open[e]}:this.open[e]=!this.open[e],this.onAnimate(this.open[e]))}}},T=["id"],$={key:0,class:"vui-list-title"},F={class:"vui-list-items"},M=["onClick"],P=["onClick"],q=["onClick"];function z(e,t,s,r,l,i){return o(),n("div",{id:e.componentId,class:d(["vui-list",{"vui-list--flat":e.hasAttribute("flat")},e.$props.class])},[c(e.$slots,"prepend"),e.title?(o(),n("div",$,[c(e.$slots,"placeholder",{item:e.title},()=>[g(f(e.title),1)])])):m("",!0),b("div",F,[(o(!0),n(y,null,k(i.list,(a,u)=>(o(),n("div",{key:a.$$id,class:d([{"vui-list-items-item":!i.isGroup(a)},{"vui-list-items-group-item":i.isGroup(a)}])},[i.isGroup(a)?m("",!0):(o(),n("div",{key:0,class:d([{"vui-list-items-item-label":!i.isGroup(a)},{"vui-list-items-item-label--selectable":e.selectable},{"vui-list-items-item-label--selected":i.isSelected(a)}]),onClick:v(()=>i.onClick(a),["stop"])},[c(e.$slots,"item",{index:u,item:a,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[a.icon?(o(),n("i",{key:0,class:d(["vui-list-items-item-label-icon",a.icon])},null,2)):m("",!0),b("span",null,f(a[e.itemLabel]),1)])],10,M)),i.isGroup(a)?(o(),n(y,{key:1},[b("div",{class:d(["vui-list-items-item-group-label",{"vui-list-items-item-group-label--toggled":i.isToggled(u)},{"vui-list-items-item-group-label--animating":i.isAnimating(u)},{"vui-list-items-item-group-label--open":l.open[u]||i.hasKeyword}]),onClick:v(()=>i.onToggle(u),["stop"])},[c(e.$slots,"group-item",{index:u,item:a,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[g(f(a[e.itemLabel]),1)])],10,P),l.open[u]||i.hasKeyword?(o(!0),n(y,{key:0},k(a[e.itemValue],(h,w)=>(o(),n("div",{key:h.$$id,class:d(["vui-list-items-item-label",{"vui-list-items-item-label--selectable":e.selectable},{"vui-list-items-item-label--selected":i.isSelected(h)}]),onClick:v(()=>i.onClick(h),["stop"])},[c(e.$slots,"item",{index:w,item:h,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[h.icon?(o(),n("i",{key:0,class:d(["vui-list-items-item-label-icon",h.icon])},null,2)):m("",!0),g(" "+f(h[e.itemLabel]),1)])],10,q))),128)):m("",!0)],64)):m("",!0)],2))),128))]),c(e.$slots,"append")],10,T)}const Q=j(O,[["render",z]]);export{Q as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as b}from"./demonstrable-
|
|
1
|
+
import{d as b}from"./demonstrable-CBEr3Dc5.js";import{t as v}from"./translatable-BfRM2PCZ.js";import h from"./list-BZb1aorL.js";import{_ as f,a,b as l,w as i,r as s,o,F as c,g as y,h as x,m as _,i as L,d as p,t as m}from"./index-CXVfKCPR.js";import"./animable-S5zFcxd4.js";import"./composable-CshUTKfl.js";const S={"page.component.list.text-1":"List an array of strings, numbers, ...","page.component.list.text-2":"List an array of objects","page.component.list.text-3":"List with groups of objects arrays","page.component.list.doc.prop.autoclose":"Closes automatically opened group when a new one is opened","page.component.list.doc.prop.disable-filtering":"Disable the internal filtering even a keyword props is provided, useful serverside filtering is needed","page.component.list.doc.prop.disabled":"Binds the disabled state condition","page.component.list.doc.prop.expanded":"Start with all items groups opened","page.component.list.doc.prop.icon":"Class name of the icon to display before each item label","page.component.list.doc.prop.keyword":"Used to filter the items list","page.component.list.doc.prop.loading":"Binds the loading state","page.component.list.doc.prop.item-label":"Label key foreach list item","page.component.list.doc.prop.item-value":"Value key foreach list item","page.component.list.doc.prop.items":"Array of values that composes the list","page.component.list.doc.prop.selectable":"Determines if list items are selectable","page.component.list.doc.prop.title":"Display a title above the list items","page.component.list.doc.prop.value":"Selected item in the list","page.component.list.doc.prop.v-model":"Binds the model value of dropdown","page.component.list.doc.slot.group-item":"Slot to iterates over each item group","page.component.list.doc.slot.item":"Slot to iterates over each item of the list","page.component.list.doc.slot.placeholder":"Slot for the placeholder"},B={},k={en:S,fr:B},d={attrs:[],examples:[{markup:`
|
|
2
2
|
<vui-list
|
|
3
3
|
:items=[1, 2, 3, 4]
|
|
4
4
|
:selectable="true"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n}from"./composable-CshUTKfl.js";import{t as r}from"./translatable-
|
|
1
|
+
import{c as n}from"./composable-CshUTKfl.js";import{t as r}from"./translatable-BfRM2PCZ.js";import l from"./alert-Ci9G_Xbl.js";import{_ as i,h as p,w as d,n as e,r as c,o as u,j as s,d as a,t as m}from"./index-CXVfKCPR.js";const f={"component.loader.text":"It's loading..."},$={},v={en:f,fr:$},h={icon:{type:String,default:"fa-sharp fa-solid fa-spinner"},text:{type:String}},g={name:"VuiLoader",components:{VuiAlert:l},mixins:[n],props:h,created(){r(v)}},y={class:"vui-loader-body"};function b(o,S,V,B,C,_){const t=c("vui-alert");return u(),p(t,{id:o.componentId,class:e(["vui-loader",`vui-loader--${o.layout}`,{"vui-loader--flat":o.hasAttribute("flat")},o.$props.class])},{default:d(()=>[s(o.$slots,"prepend"),s(o.$slots,"icon",{},()=>[a("i",{class:e(["vui-loader-icon",o.icon])},null,2)]),s(o.$slots,"default",{},()=>[a("span",y,m(o.text?o.text:o.$t("component.loader.text")),1)]),s(o.$slots,"append")]),_:3},8,["id","class"])}const L=i(g,[["render",b]]);export{L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as h}from"./demonstrable-
|
|
1
|
+
import{d as h}from"./demonstrable-CBEr3Dc5.js";import{t as f}from"./translatable-BfRM2PCZ.js";import y from"./loader-D6DkOZ8i.js";import{_,a as s,b as t,w as l,r as d,o as a,F as i,g as v,h as b,m as x,i as S,d as n,t as p}from"./index-CXVfKCPR.js";import"./composable-CshUTKfl.js";import"./alert-Ci9G_Xbl.js";const m={attrs:[{name:"flat",text:"page.component.loader.doc.attr.flat"}],examples:[{markup:`
|
|
2
2
|
<vui-loader
|
|
3
3
|
text="It's loading..."
|
|
4
4
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import u from"./button-
|
|
1
|
+
import u from"./button-aM2Ty17x.js";import{c as h}from"./composable-CshUTKfl.js";import{t as m}from"./translatable-BfRM2PCZ.js";import{_ as c,a as t,j as i,d as p,t as f,f as o,h as b,n as V,r as v,o as s}from"./index-CXVfKCPR.js";import"./animable-S5zFcxd4.js";const y={"component.button.close":"Close"},k={},g={en:y,fr:k},C={loading:{type:Boolean},modelValue:{default:void 0,type:Boolean},showFooter:{type:Boolean},showFooterClose:{type:Boolean},showHeader:{type:Boolean},showHeaderClose:{type:Boolean},title:{type:String},value:{default:void 0,type:Boolean}},B={name:"VuiModal",components:{VuiButton:u},mixins:[h],props:C,emits:["update:model-value"],data(){return{isVisible:!1}},computed:{isHeaderVisible(){return this.$slots.header||this.showHeader||this.showHeaderClose},isFooterVisible(){return this.$slots.footer||this.showFooter||this.showFooterClose}},watch:{modelValue(e){this.isVisible=e},value(e){this.isVisible=e}},created(){m(g),this.hasModelValue?this.isVisible=this.modelValue:this.hasValue&&(this.isVisible=this.value)},methods:{onToggle(){this.disabled||(this.isVisible=!this.isVisible,this.$emit("update:model-value",this.isVisible))}}},w=["id"],$={class:"vui-modal-content"},H={key:0,class:"vui-modal-content-header"},_={key:0,class:"vui-modal-content-header-title"},F={key:1,class:"vui-modal-content-body"},T={key:2,class:"vui-modal-content-footer"};function M(e,a,S,N,n,l){const r=v("vui-button");return n.isVisible?(s(),t("div",{key:0,id:e.componentId,class:V(["vui-modal",e.$props.class])},[i(e.$slots,"prepend"),p("div",$,[l.isHeaderVisible?(s(),t("div",H,[e.title?(s(),t("span",_,f(e.title),1)):o("",!0),e.showHeaderClose?(s(),t("i",{key:1,class:"fa-regular fa-circle-xmark",onClick:a[0]||(a[0]=(...d)=>l.onToggle&&l.onToggle(...d))})):o("",!0),i(e.$slots,"header")])):o("",!0),e.$slots.body||e.$slots.default?(s(),t("div",F,[i(e.$slots,"body"),i(e.$slots,"default")])):o("",!0),l.isFooterVisible?(s(),t("div",T,[e.showHeaderClose?(s(),b(r,{key:0,text:e.$t("component.button.close"),onClick:l.onToggle},null,8,["text","onClick"])):o("",!0),i(e.$slots,"footer")])):o("",!0)]),i(e.$slots,"append")],10,w)):o("",!0)}const q=c(B,[["render",M]]);export{q as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as w}from"./demonstrable-
|
|
1
|
+
import{d as w}from"./demonstrable-CBEr3Dc5.js";import{t as C}from"./translatable-BfRM2PCZ.js";import x from"./modal-FMP_4drO.js";import{_ as V,a as s,b as e,w as t,r as a,o as p,F as h,g as B,e as H,t as l,m as k,d as n}from"./index-CXVfKCPR.js";import"./button-aM2Ty17x.js";import"./animable-S5zFcxd4.js";import"./composable-CshUTKfl.js";const F={"page.component.modal.example-1":"modal example","page.component.modal.click-to-open":"click to open","page.component.modal.content":"My modal content","page.component.modal.title":"My modal title","page.component.modal.doc.prop.loading":"Binds the loading state","page.component.modal.doc.prop.showFooter":"Enables the modal footer","page.component.modal.doc.prop.showFooterClose":"Displays close button in the modal footer","page.component.modal.doc.prop.showHeader":"Enables the modal header","page.component.modal.doc.prop.showHeaderClose":"Display the close button in the modal header","page.component.modal.doc.prop.value":"Defines the visible state of the modal","page.component.modal.doc.prop.vmodel":"Binds the visible state of the modal","page.component.modal.doc.slot.header":"Slot for the header content of modal","page.component.modal.doc.slot.body":"Slot for the body content of modal","page.component.modal.doc.slot.footer":"Slot for the footer content of modal"},M={},$={en:F,fr:M},g={attrs:[],examples:[{markup:`
|
|
2
2
|
<vui-modal
|
|
3
3
|
id="vui-modal-1"
|
|
4
4
|
:showHeaderClose="true"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as f}from"./demonstrable-
|
|
1
|
+
import{d as f}from"./demonstrable-CBEr3Dc5.js";import{t as _}from"./translatable-BfRM2PCZ.js";import x from"./nav-EucFvkvm.js";import{_ as y,a as l,b as t,w as n,r as p,o,F as u,g as L,h as S,m as V,i as k,d as s,t as v}from"./index-CXVfKCPR.js";import"./list-BZb1aorL.js";import"./animable-S5zFcxd4.js";import"./composable-CshUTKfl.js";const B={"page.component.nav.doc.prop.disabled":"Binds the disabled state condition","page.component.nav.doc.prop.icon":"Class name of the icon to display before each item label","page.component.nav.doc.prop.item-label":"Label key foreach nav item","page.component.nav.doc.prop.item-value":"Value key foreach nav item","page.component.nav.doc.prop.items":"Array of values that composes the nav","page.component.nav.doc.prop.loading":"Layout of the tag","page.component.nav.doc.prop.value":"Selected item in the nav","page.component.nav.doc.prop.v-model":"Binds the models of nav","page.component.nav.doc.slot.group-item":"Slot to custom each items group of the list","page.component.nav.doc.slot.item":"Slot to custom each item of the list","page.component.nav.doc.slot.placeholder":"Placeholder slot for the default list title element"},N={},w={en:B,fr:N},i={examples:[{markup:`
|
|
2
2
|
<vui-nav
|
|
3
3
|
:items=[
|
|
4
4
|
{ label: "label 1", value: "value 1" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import V from"./list-
|
|
1
|
+
import V from"./list-BZb1aorL.js";import{c as y}from"./composable-CshUTKfl.js";import{t as k}from"./translatable-BfRM2PCZ.js";import{_ as g,a as i,j as n,b as N,w as m,n as p,r as c,o as l,f as r,t as f,h as B,e as C}from"./index-CXVfKCPR.js";import"./animable-S5zFcxd4.js";const S={},_={},$={en:S,fr:_},w={items:{type:Array,required:!0},itemLabel:{type:String},itemValue:{type:String},modelValue:{default:void 0,types:[Boolean,Number,Object,String]},showIcons:{type:Boolean,default:!0},value:{default:void 0,types:[Boolean,Number,Object,String]}},I={name:"VuiNav",components:{VuiList:V},mixins:[y],props:w,emits:["update:model-value"],data(){return{selected:null}},watch:{modelValue(e){this.selected=e},value(e){this.selected=e}},created(){k($),this.hasModelValue?this.selected=this.modelValue:this.hasValue&&(this.selected=this.value)},methods:{onClick(e){this.disabled||this.$emit("update:model-value",e)}}},j=["id"],A={key:1,class:"vui-list-items-item-label-text"};function L(e,d,O,U,u,h){const v=c("router-link"),b=c("vui-list");return l(),i("div",{id:e.componentId,class:p(["vui-nav",{"vui-nav--flat":e.hasAttribute("flat")},e.$props.class])},[n(e.$slots,"prepend"),N(b,{modelValue:u.selected,"onUpdate:modelValue":[d[0]||(d[0]=s=>u.selected=s),h.onClick],class:"vui-nav-list","group-id":e.componentGroupId,disabled:e.disabled,"item-label":e.itemLabel,"item-value":e.itemValue,items:e.items,selectable:!e.disabled},{item:m(({index:s,item:t,itemValue:o,itemLabel:a})=>[n(e.$slots,"item",{index:s,item:t,itemLabel:a,itemValue:o},()=>[e.showIcons?(l(),i("i",{key:0,class:p(["fa-solid",{"fa-location-dot":!s},{"fa-chevron-right":s}])},null,2)):r("",!0),t.route?r("",!0):(l(),i("span",A,f(o?t[a]:t),1)),t.route?(l(),B(v,{key:2,to:t.route,class:"vui-list-items-item-label-text"},{default:m(()=>[C(f(o?t[a]:t),1)]),_:2},1032,["to"])):r("",!0)])]),_:3},8,["modelValue","group-id","disabled","item-label","item-value","items","selectable","onUpdate:modelValue"]),n(e.$slots,"append")],10,j)}const M=g(I,[["render",L]]);export{M as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as f}from"./demonstrable-
|
|
1
|
+
import{d as f}from"./demonstrable-CBEr3Dc5.js";import{t as b}from"./translatable-BfRM2PCZ.js";import v from"./page-Dhr7CkBW.js";import{_,a as s,b as t,w as a,r as n,o as g,F as i,g as M,m as k,l as S,e as l,t as p,d as r}from"./index-CXVfKCPR.js";import"./animable-S5zFcxd4.js";import"./composable-CshUTKfl.js";const m={attrs:[{name:"flat",text:"page.component.page.doc.attr.flat"}],examples:[{markup:`
|
|
2
2
|
<vui-page
|
|
3
3
|
layout="warning"
|
|
4
4
|
id="vui-page-1"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./animable-S5zFcxd4.js";import{c as d}from"./composable-CshUTKfl.js";import{t as p}from"./translatable-
|
|
1
|
+
import{a as n}from"./animable-S5zFcxd4.js";import{c as d}from"./composable-CshUTKfl.js";import{t as p}from"./translatable-BfRM2PCZ.js";import{_ as u,a as e,j as o,f as a,n as c,o as t}from"./index-CXVfKCPR.js";const m={},f={},$={en:m,fr:f},h={name:"VuiPage",mixins:[n,d],created(){p($)},methods:{outclick(){this.$bus.emit("outclick",this.componentGroupId)}}},k=["id"],v={key:0,class:"vui-page-header"},g={key:1,class:"vui-page-body"},b={key:2,class:"vui-page-footer"};function y(s,r,C,V,B,l){return t(),e("div",{id:s.componentId,class:c(["vui-page",`vui-page--${s.layout}`,{"vui-page--flat":s.hasAttribute("flat")},s.$props.class]),onClick:r[0]||(r[0]=(...i)=>l.outclick&&l.outclick(...i))},[o(s.$slots,"prepend"),s.$slots.header?(t(),e("div",v,[o(s.$slots,"header")])):a("",!0),s.$slots.body||s.$slots.default?(t(),e("div",g,[o(s.$slots,"body"),o(s.$slots,"default")])):a("",!0),s.$slots.footer?(t(),e("div",b,[o(s.$slots,"footer")])):a("",!0),o(s.$slots,"append")],10,k)}const A=u(h,[["render",y]]);export{A as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as f}from"./demonstrable-
|
|
1
|
+
import{d as f}from"./demonstrable-CBEr3Dc5.js";import{t as b}from"./translatable-BfRM2PCZ.js";import x from"./pager-CtDr-L4M.js";import{_ as V,a as s,b as o,w as r,r as n,o as a,F as c,g as y,h as k,m as z,i as B,d as i,t as u}from"./index-CXVfKCPR.js";import"./nav-EucFvkvm.js";import"./list-BZb1aorL.js";import"./animable-S5zFcxd4.js";import"./composable-CshUTKfl.js";import"./button-aM2Ty17x.js";const g={attrs:[],examples:[{markup:`
|
|
2
2
|
<vui-pager
|
|
3
3
|
id="vui-page-1"
|
|
4
4
|
:count="9"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import h from"./nav-
|
|
1
|
+
import h from"./nav-EucFvkvm.js";import f from"./button-aM2Ty17x.js";import{a as b}from"./animable-S5zFcxd4.js";import{c as v}from"./composable-CshUTKfl.js";import{t as V}from"./translatable-BfRM2PCZ.js";import{_ as P,a as k,j as a,d as r,n as d,r as u,o as C,b as i,m as l}from"./index-CXVfKCPR.js";import"./list-BZb1aorL.js";const N={"page.component.pager.doc.prop.count":"Total number of paginated items","page.component.pager.doc.prop.disabled":"Binds the disabled state condition","page.component.pager.doc.prop.loading":"Binds the loading state","page.component.pager.doc.prop.size":"Number of paginated items per page","page.component.pager.doc.prop.value":"Selected item in the pager","page.component.pager.doc.prop.v-model":"Binds the model changes of pager","page.component.pager.doc.slot.first":"Slot for first page button","page.component.pager.doc.slot.last":"Slot for last page button","page.component.pager.doc.slot.previous":"Slot for previous page button","page.component.pager.doc.slot.next":"Slot for next page button"},B={},L={en:N,fr:B},S={count:{type:Number,default:0},modelValue:{default:void 0,type:Number},value:{default:void 0,type:Number},size:{type:Number,default:25}},y={name:"VuiPager",components:{VuiButton:f,VuiNav:h},mixins:[b,v],props:S,emits:["update:model-value"],data(){return{page:1}},computed:{isLast(){return this.page===this.last},last(){return Math.ceil(this.count/this.size)},pages(){if(this.last){const e=[...Array.from({length:this.last},(g,t)=>t+1)],o=e.slice(0,this.page),n=e.slice(this.page,e.length);return[...o.slice(-(n.length>2?2:2+(2-n.length))),...n.slice(0,o.length>2?2:2+(2-o.length))]}return[]}},watch:{modelValue(e){this.page=e},value(e){this.page=e}},created(){V(L),this.hasModelValue?this.page=this.modelValue:this.hasValue&&(this.page=this.value)},methods:{onFirst(){!this.disabled&&this.page>1&&(this.page=1,this.onPage())},onLast(){!this.disabled&&!this.isLast&&(this.page=this.last,this.onPage())},onNext(){!this.disabled&&!this.isLast&&(this.page++,this.onPage())},onPrevious(){!this.disabled&&this.page>1&&(this.page--,this.onPage())},onPage(){this.$emit("update:model-value",this.page)}}},z=["id"],U={class:"vui-pager-content"};function _(e,o,n,g,t,s){const p=u("vui-button"),c=u("vui-nav");return C(),k("div",{id:e.componentId,class:d(["vui-pager",e.$props.class])},[a(e.$slots,"prepend"),r("div",U,[a(e.$slots,"first",{},()=>[i(p,l(e.$attrs,{disabled:t.page===1,icon:"fa-solid fa-angles-left",class:"vui-button--first",onClick:s.onFirst}),null,16,["disabled","onClick"])]),a(e.$slots,"previous",{},()=>[i(p,l(e.$attrs,{disabled:t.page===1,icon:"fa-solid fa-chevron-left",class:"vui-button--previous",onClick:s.onPrevious}),null,16,["disabled","onClick"])]),a(e.$slots,"pages",{},()=>[r("div",{class:d(["ellipse",{visible:s.last>4&&t.page+2>4}])}," ... ",2),i(c,l({modelValue:t.page,"onUpdate:modelValue":o[0]||(o[0]=m=>t.page=m)},e.$attrs,{flat:e.hasAttribute("flat"),items:s.pages,"show-icons":!1,"onUpdate:modelValue":s.onPage}),null,16,["modelValue","flat","items","onUpdate:modelValue"]),r("div",{class:d(["ellipse",{visible:s.last>4&&t.page+2<s.last}])}," ... ",2)]),a(e.$slots,"next",{},()=>[i(p,l(e.$attrs,{disabled:s.isLast,icon:"fa-solid fa-chevron-right",class:"vui-button--next",onClick:s.onNext}),null,16,["disabled","onClick"])]),a(e.$slots,"previous",{},()=>[i(p,l(e.$attrs,{disabled:s.isLast,icon:"fa-solid fa-angles-right",class:"vui-button--last",onClick:s.onLast}),null,16,["disabled","onClick"])])]),a(e.$slots,"append")],10,z)}const T=P(y,[["render",_]]);export{T as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as g}from"./demonstrable-
|
|
1
|
+
import{d as g}from"./demonstrable-CBEr3Dc5.js";import{t as v}from"./translatable-BfRM2PCZ.js";import _ from"./progress-COHwzKtv.js";import{_ as h,a as t,b as r,w as a,r as p,o as s,F as c,g as x,h as b,m as f,i as y,d as m,t as w}from"./index-CXVfKCPR.js";import"./composable-CshUTKfl.js";const k={"page.component.progress.doc.prop.disabled":"Bind the disabled state","page.component.progress.doc.prop.layout":"The progress-bar layout: [error, success, warning]","page.component.progress.doc.prop.min":"Minimum value of progressbar","page.component.progress.doc.prop.max":"Maximum value of progressbar","page.component.progress.doc.prop.value":"current value of progressbar"},B={},$={en:k,fr:B},n={examples:[{markup:`
|
|
2
2
|
<vui-progress
|
|
3
3
|
min="0"
|
|
4
4
|
max="100"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p}from"./composable-CshUTKfl.js";import{t as c}from"./translatable-
|
|
1
|
+
import{c as p}from"./composable-CshUTKfl.js";import{t as c}from"./translatable-BfRM2PCZ.js";import{_ as u,a as l,j as t,d as a,p as d,n as o,o as m}from"./index-CXVfKCPR.js";const h={},b={},v={en:h,fr:b},f={min:{type:Number,required:!0},max:{type:Number,required:!0},value:{type:Number,required:!0}},$={name:"VuiProgress",mixins:[p],props:f,computed:{width(){const s=Math.abs(this.value),e=Math.abs(this.min),r=Math.abs(this.max);return`${Math.round(s/(e+r)*100)}%`}},created(){c(v)}},g=["id"];function y(s,e,r,n,_,i){return m(),l("div",{id:s.componentId,class:o(["vui-progress",s.$props.class])},[t(s.$slots,"prepend"),a("div",{class:o(["vui-progress-bar",`vui-progress-bar--${s.layout}`])},[a("div",{class:"vui-progress-bar-cursor",style:d({width:i.width})},null,4)],2),t(s.$slots,"append")],10,g)}const w=u($,[["render",y]]);export{w as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as S}from"./demonstrable-
|
|
1
|
+
import{d as S}from"./demonstrable-CBEr3Dc5.js";import{t as V}from"./translatable-BfRM2PCZ.js";import w from"./radio-PxaxW9tr.js";import{_ as N,a,b as n,w as r,r as c,o as t,F as p,g as C,h as u,e as l,t as d,f as i,m as y,i as k,d as m}from"./index-CXVfKCPR.js";import"./composable-CshUTKfl.js";const D={"page.component.radio.default":"Default radio","page.component.radio.binded":"Binded radio","page.component.radio.success":"Success radio","page.component.radio.error":"Error radio","page.component.radio.warning":"Warning radio","page.component.radio.label":"Checked","page.component.radio.doc.prop.checked":"Binds the conditions of checked state","page.component.radio.doc.prop.checked-value":"Checked value of the radio","page.component.radio.doc.prop.disabled":"Binds the disabled state of the radio","page.component.radio.doc.prop.layout":"Defines the layout of component [default, error, success, warning]","page.component.radio.doc.prop.loading":"Boolean to enable the loading style for component","page.component.radio.doc.prop.text":"Text used as label for the component","page.component.radio.doc.prop.unchecked-value":"Unchecked value of the radio","page.component.radio.doc.prop.value":"Value of the radio","page.component.radio.doc.prop.v-model":"Binds the model value of radio","page.component.radio.doc.slot.default":"Default slot for label content","page.component.radio.doc.slot.prepend":"Slot used to insert custom content at the beginning of component","page.component.radio.doc.slot.append":"Slot used to insert custom content et the end of component"},$={},E={en:D,fr:$},g={examples:[{markup:`
|
|
2
2
|
<vui-radio
|
|
3
3
|
v-model="myradiomodel"
|
|
4
4
|
:layout="default"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u}from"./composable-CshUTKfl.js";import{t as r}from"./translatable-
|
|
1
|
+
import{c as u}from"./composable-CshUTKfl.js";import{t as r}from"./translatable-BfRM2PCZ.js";import{_ as h,a as i,j as t,n as l,f as s,d as c,o as d,e as f,t as g}from"./index-CXVfKCPR.js";const m={},p={},k={en:m,fr:p},b={checked:{default:void 0,type:Boolean},checkedValue:{default:void 0,types:[Boolean,String,Number,null]},icon:{type:String,default:"fa-circle"},iconChecked:{type:String,default:"fa-circle-check"},modelValue:{default:void 0,types:[Boolean,String,Number,null]},name:{default:void 0,type:String},text:{default:void 0,type:String},uncheckedValue:{default:void 0,types:[Boolean,String,Number,null]},value:{default:void 0,types:[Boolean,String,Number,null]}},v={name:"VuiRadio",mixins:[u],props:b,emits:["update:model-value"],data(){return{toggled:!1}},computed:{hasLabel(){return this.$slots.default||this.text},isChecked(){return this.hasProp("checked")?this.checked:this.hasProp("checkedValue")?this.toggled===this.checkedValue:this.toggled}},watch:{modelValue(e){this.toggled=e},value(e){this.toggled=e}},created(){r(k),this.hasModelValue?this.toggled=this.modelValue:this.hasValue&&(this.toggled=this.value)},methods:{onToggle(){this.disabled||(this.hasProp("checkedValue")?this.toggled=this.isChecked?this.uncheckedValue:this.checkedValue:this.toggled=!this.isChecked,this.$emit("update:model-value",this.toggled))}}},V=["id"],y=["name","disabled","required"],C=["for"];function S(e,o,B,N,w,a){return d(),i("div",{id:e.componentId,class:l(["vui-radio",`vui-radio--${e.layout}`,{"vui-radio--flat":e.hasAttribute("flat")},{"vui-radio--with-label":a.hasLabel},{"vui-radio--with-icon":e.icon},{"vui-radio--checked":a.isChecked},{"vui-radio--disabled":e.disabled},{"vui-radio--loading":!e.disabled&&e.loading},e.$props.class]),onClick:o[0]||(o[0]=(...n)=>a.onToggle&&a.onToggle(...n))},[t(e.$slots,"prepend"),e.icon&&!a.isChecked?(d(),i("i",{key:0,class:l(["vui-radio-icon",e.icon])},null,2)):s("",!0),e.iconChecked&&a.isChecked?(d(),i("i",{key:1,class:l(["vui-radio-icon",e.iconChecked])},null,2)):s("",!0),c("input",{name:e.name,disabled:e.disabled,required:e.hasAttribute("required"),type:"checkbox"},null,8,y),a.hasLabel?(d(),i("label",{key:2,class:"vui-radio-label",for:e.name},[t(e.$slots,"default",{},()=>[f(g(e.text),1)])],8,C)):s("",!0),t(e.$slots,"append")],10,V)}const L=h(v,[["render",S]]);export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d}from"./translatable-
|
|
1
|
+
import{t as d}from"./translatable-BfRM2PCZ.js";import{_ as m,c as f,r as l,o as v,a as b,b as c,w as o,e as r,t as i}from"./index-CXVfKCPR.js";const x={},h={},k={en:x,fr:h},w={name:"ViewStart",computed:{components(){return f.reduce((e,t)=>{const a=e.findIndex(n=>n.label===t.type);return a===-1?e.push({label:t.type,value:[t]}):e[a].value.push(t),e},[])}},created(){d(k)}},g={class:"view-start"};function V(e,t,a,n,$,u){const p=l("router-link"),_=l("vui-list");return v(),b("div",g,[c(_,{flat:"",autoclose:!1,expanded:!0,items:u.components,"item-label":"label","item-value":"value"},{"group-item":o(({item:s})=>[r(i(s.label),1)]),item:o(({item:s})=>[c(p,{to:{name:s.doc.name}},{default:o(()=>[r(i(s.label),1)]),_:2},1032,["to"])]),_:1},8,["items"])])}const N=m(w,[["render",V]]);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./animable-S5zFcxd4.js";import{c as L}from"./composable-CshUTKfl.js";import{t as g}from"./translatable-
|
|
1
|
+
import{a as y}from"./animable-S5zFcxd4.js";import{c as L}from"./composable-CshUTKfl.js";import{t as g}from"./translatable-BfRM2PCZ.js";import{_ as h,a as l,j as r,d as n,F as u,g as d,n as p,o as t,e as $,t as V}from"./index-CXVfKCPR.js";const k={headers:{type:Array,default:()=>[]},itemLabel:{type:String,default:"label"},itemValue:{type:String,default:"value"},items:{type:Array,default:()=>[],required:!0}},I={},S={},B={en:I,fr:S},T={name:"VuiTable",mixins:[y,L],props:k,created(){g(B)},methods:{leaf(e,b){return b.split(".").reduce((o,m)=>o&&o[m]?o[m]:null,e)}}},v=["id"],A=["data-label"];function F(e,b,o,m,N,c){return t(),l("div",{id:e.componentId,class:p(["vui-table",e.$props.class])},[r(e.$slots,"prepend"),n("table",null,[n("thead",null,[n("tr",null,[(t(!0),l(u,null,d(e.headers,(a,s)=>(t(),l("th",{key:`table-${e.componentId}-header--${s}`,class:p(a.class)},[r(e.$slots,`header.${a[e.itemValue]}`,{item:a,itemLabel:e.itemLabel,itemValue:e.itemValue,index:s},()=>[$(V(a[e.itemLabel]),1)])],2))),128))])]),n("tbody",null,[(t(!0),l(u,null,d(e.items,(a,s)=>r(e.$slots,"default",{key:`table-${e.componentId}-item--${s}`,index:s,item:a,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[n("tr",null,[(t(!0),l(u,null,d(e.headers,(i,f)=>(t(),l("td",{key:`table-${e.componentId}-item-td--${f}`,"data-label":i.label,class:p(i.class)},[r(e.$slots,`item.${i[e.itemValue]}`,{index:f,item:a,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[$(V(c.leaf(a,i.value)),1)])],10,A))),128))])])),128))])]),r(e.$slots,"append")],10,v)}const D=h(T,[["render",F]]);export{D as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as y}from"./demonstrable-
|
|
1
|
+
import{d as y}from"./demonstrable-CBEr3Dc5.js";import{t as h}from"./translatable-BfRM2PCZ.js";import g from"./table-BUyAHD0I.js";import{_,a as i,b as t,w as l,r as n,o,F as m,g as f,h as Q,e as x,t as s,m as S,i as D,d as r}from"./index-CXVfKCPR.js";import"./animable-S5zFcxd4.js";import"./composable-CshUTKfl.js";const V={"page.component.table.doc.prop.headers":"Array containing text / value foreach item header","page.component.table.doc.prop.item-label":"Label key for each item in table","page.component.table.doc.prop.item-value":"Value key for each item in table","page.component.table.doc.prop.items":"Array of items to display in table","page.component.table.doc.slot.header":"Slot to replace header row default rendering","page.component.table.doc.slot.item":"Slot to replace item row default rendering"},k={},L={en:V,fr:k},u={attrs:[],examples:[{markup:`
|
|
2
2
|
<vui-table
|
|
3
3
|
itemLabel="label",
|
|
4
4
|
itemValue="value"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p}from"./composable-CshUTKfl.js";import{t as v}from"./translatable-
|
|
1
|
+
import{c as p}from"./composable-CshUTKfl.js";import{t as v}from"./translatable-BfRM2PCZ.js";import{_ as b,a as s,j as a,d,F as l,g as c,n as o,o as i,f as m,t as f}from"./index-CXVfKCPR.js";const V={},g={},$={en:V,fr:g},y={icon:{type:String},items:{type:Array,required:!0},itemLabel:{type:String,default:"label"},itemValue:{type:String,default:"value"},modelValue:{type:String},value:{type:String}},k={name:"VuiTabs",mixins:[p],props:y,emits:["update:model-value"],data(){return{active:null}},computed:{tabs(){return this.items.map(e=>({...e,$$id:this.newId()}))}},watch:{modelValue(e){this.active=e},value(e){this.active=e}},created(){var e;if(v($),this.hasModelValue)this.active=this.modelValue;else if(this.hasValue)this.active=this.value;else if((e=this.items)!=null&&e.length){const n=this.items[0];this.active=n[this.itemValue]}},methods:{toggle(e){this.disabled||(this.active=e,this.$emit("update:model-value",this.active))}}},S=["id"],C={class:"vui-tabs-tabs"},w=["onClick"],B={class:"label"},L={key:0,class:"vui-tabs-slot"};function _(e,n,F,I,r,u){return i(),s("div",{id:e.componentId,class:o(["vui-tabs",e.$props.class])},[a(e.$slots,"prepend"),d("div",C,[(i(!0),s(l,null,c(u.tabs,t=>(i(),s("div",{key:t.$$id,class:o(["vui-tabs-tabs-tab",{"vui-tabs-tabs-tab--with-icon":e.icon},{"vui-tabs-tabs-tab--active":t[e.itemValue]===r.active}]),onClick:()=>u.toggle(t[e.itemValue])},[e.icon?(i(),s("i",{key:0,class:o(["vui-tabs-tabs-tab-icon",e.icon])},null,2)):m("",!0),d("span",B,f(t[e.itemLabel]),1)],10,w))),128))]),(i(!0),s(l,null,c(e.items,(t,h)=>(i(),s(l,{key:`slot-${t.$$id}`},[e.$slots[t[e.itemValue]]&&t[e.itemValue]===r.active?(i(),s("div",L,[a(e.$slots,t[e.itemValue],{index:h})])):m("",!0)],64))),128)),a(e.$slots,"append")],10,S)}const q=b(k,[["render",_]]);export{q as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as h}from"./demonstrable-
|
|
1
|
+
import{d as h}from"./demonstrable-CBEr3Dc5.js";import{t as _}from"./translatable-BfRM2PCZ.js";import f from"./tabs-CjjUUmcy.js";import{_ as x,a as T,b as t,w as s,r as l,o as p,h as d,l as y,g as B,e as k,t as n,u as b,x as u,i as v,d as o}from"./index-CXVfKCPR.js";import"./composable-CshUTKfl.js";const L={"page.component.tabs.doc.prop.disabled":"Binds the disabled state","page.component.tabs.doc.prop.items":"List of tabs and label / value","page.component.tabs.doc.prop.item-label":"Label key name foreach tab","page.component.tabs.doc.prop.item-value":"Value key name foreach tab","page.component.tabs.doc.prop.vmodel":"Binds the active tab","page.component.tabs.doc.prop.value":"Define the active tab","page.component.tabs.doc.slot.value":"Slot defined by the tabs items value"},S={},H={en:L,fr:S},i={examples:[{markup:`
|
|
2
2
|
<vui-tabs
|
|
3
3
|
items="[
|
|
4
4
|
{ 'label': 'Tab 1', 'value': 'tab1' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n}from"./composable-CshUTKfl.js";import{t as i}from"./translatable-
|
|
1
|
+
import{c as n}from"./composable-CshUTKfl.js";import{t as i}from"./translatable-BfRM2PCZ.js";import{_ as r,a as e,j as s,n as t,f as p,o as a,e as c,t as l}from"./index-CXVfKCPR.js";const d={},m={},u={en:d,fr:m},f={icon:{type:String},text:{type:String}},g={name:"VuiTag",mixins:[n],props:f,created(){i(u)}},$=["id"];function v(o,y,S,V,h,k){return a(),e("div",{id:o.componentId,class:t(["vui-tag",`vui-tag--${o.layout}`,{"vui-tag--with-icon":o.icon},o.$props.class])},[s(o.$slots,"prepend"),o.icon?(a(),e("i",{key:0,class:t(["vui-tag-icon",o.icon])},null,2)):p("",!0),s(o.$slots,"default",{},()=>[c(l(o.text),1)]),s(o.$slots,"append")],10,$)}const C=r(g,[["render",v]]);export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as f}from"./demonstrable-
|
|
1
|
+
import{d as f}from"./demonstrable-CBEr3Dc5.js";import{t as h}from"./translatable-BfRM2PCZ.js";import _ from"./tag-CBpmR7kD.js";import{_ as v,a as s,b as o,w as n,r as p,o as a,F as r,g as y,h as x,e as b,t as i,f as k,m as w,i as S,d as c}from"./index-CXVfKCPR.js";import"./composable-CshUTKfl.js";const $={"page.component.tag.doc.prop.disabled":"Binds the disabled state","page.component.tag.doc.prop.error":"Error type tag","page.component.tag.doc.prop.success":"Success type tag","page.component.tag.doc.prop.warning":"Warning type tag","page.component.tag.doc.prop.icon":"Class name of the icon to prepend","page.component.tag.doc.prop.text":"Text content of the tag","page.component.tag.doc.prop.layout":"Layout of the tag","page.component.card.doc.slot.default":"Default type slot"},T={},V={en:$,fr:T},g={examples:[{markup:`
|
|
2
2
|
<vui-tag
|
|
3
3
|
icon="fa-solid fa-tag"
|
|
4
4
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as N}from"./demonstrable-
|
|
1
|
+
import{d as N}from"./demonstrable-CBEr3Dc5.js";import{t as x}from"./translatable-BfRM2PCZ.js";import C from"./toggle-csRvSqaz.js";import{_ as S,a as n,b as s,w as l,r,o,F as a,g as T,h,e as d,t as p,f as c,m as v,i as f,d as _}from"./index-CXVfKCPR.js";import"./composable-CshUTKfl.js";const $={"page.component.toggle.default":"Default toggle","page.component.toggle.binded":"Binded toggle","page.component.toggle.label":"Checked","page.component.toggle.doc.prop.checked-value":"Checked value of the toggle","page.component.toggle.doc.prop.disabled":"Binds the disabled state to component","page.component.toggle.doc.prop.unchecked-value":"Unchecked value of the toggle","page.component.toggle.doc.prop.value":"Value of the toggle","page.component.toggle.doc.prop.v-model":"Binds the model value of the toggle"},w={},D={en:$,fr:w},i={examples:[{markup:`
|
|
2
2
|
<vui-toggle>
|
|
3
3
|
Default checkbox
|
|
4
4
|
</vui-toggle>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n}from"./composable-CshUTKfl.js";import{_ as u,a as o,j as s,f as r,n as h,k as c,d,o as a}from"./index-
|
|
1
|
+
import{c as n}from"./composable-CshUTKfl.js";import{_ as u,a as o,j as s,f as r,n as h,k as c,d,o as a}from"./index-CXVfKCPR.js";import{t as g}from"./translatable-BfRM2PCZ.js";const m={},f={},p={en:m,fr:f},k={checked:{default:void 0,type:Boolean},checkedValue:{default:void 0,types:[Boolean,String,Number,null]},modelValue:{default:void 0,types:[Boolean,String,Number,null]},name:{type:String},uncheckedValue:{default:void 0,types:[Boolean,String,Number,null]},value:{default:void 0,types:[Boolean,String,Number,null]}},V={name:"VuiToggle",mixins:[n],props:k,emits:["update:model-value"],data(){return{toggled:!1}},computed:{isChecked(){return this.hasProp("checked")?this.checked:this.hasProp("checkedValue")?this.toggled===this.checkedValue:this.toggled}},watch:{modelValue(e){this.toggled=e},value(e){this.toggled=e}},created(){g(p),this.hasModelValue?this.toggled=this.modelValue:this.hasValue&&(this.toggled=this.value)},methods:{onToggle(){this.disabled||(this.hasProp("checkedValue")?this.toggled=this.isChecked?this.uncheckedValue:this.checkedValue:this.toggled=!this.isChecked,this.$emit("update:model-value",this.toggled))}}},v=["id","name"],b=d("div",{class:"vui-toggle-slider"},[d("div",{class:"vui-toggle-slider-button"})],-1),B=["for"];function y(e,l,C,$,N,t){return a(),o("div",{id:e.componentId,name:e.componentId,class:h(["vui-toggle",{"vui-toggle--checked":t.isChecked},{"vui-toggle--disabled":e.disabled},e.$props.class]),onClick:l[0]||(l[0]=c((...i)=>t.onToggle&&t.onToggle(...i),["stop"]))},[s(e.$slots,"prepend"),b,e.$slots.default?(a(),o("label",{key:0,class:"vui-toggle-label",for:e.componentId},[s(e.$slots,"default")],8,B)):r("",!0),s(e.$slots,"append")],10,v)}const I=u(V,[["render",y]]);export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as r}from"./index-7pe20t8n.js";import{c as d}from"./composable-CshUTKfl.js";import{t as h}from"./translatable-
|
|
1
|
+
import{l as r}from"./index-7pe20t8n.js";import{c as d}from"./composable-CshUTKfl.js";import{t as h}from"./translatable-BfRM2PCZ.js";import{_ as p,a as o,d as u,n as s,f as n,j as c,F as f,e as m,t as g,p as y,o as a}from"./index-CXVfKCPR.js";const w={icon:{type:String},position:{type:String,default:"right"},text:{type:String},modelValue:{default:void 0,type:Boolean},value:{default:void 0,type:Boolean}},$={name:"VuiTooltip",mixins:[d],props:w,emits:["update:model-value"],data(){return{dimension:{content:{},holder:{}},show:!1}},computed:{display(){return this.show?"block":"none"},left(){const{content:t,holder:e}=this.dimension;switch(this.position){case"left":return e.left-(t.width+15);case"bottom":case"top":{const l=t.width-e.width;return e.left-l/2}case"right":default:return e.right+15}},top(){const{content:t,holder:e}=this.dimension;switch(this.position){case"bottom":return e.top+e.height+15;case"top":return e.top-t.height-15;case"left":case"right":default:return e.top-e.height/2}}},watch:{async modelValue(t){this.show=t,t&&(await this.$nextTick(),this.setPosition())},async value(t){this.show=t,t&&(await this.$nextTick(),this.setPosition())}},created(){h(r),this.hasModelValue&&(this.show=this.modelValue),this.hasValue&&(this.show=this.value),this.$bus.on("outclick",()=>{this.disabled||(this.show=!1,this.$emit("update:model-value",this.show))})},methods:{setPosition(){this.dimension.content=this.$refs.tooltip.getBoundingClientRect(),this.dimension.holder=this.$parent.$el.getBoundingClientRect()}}},v=["id"];function V(t,e,l,k,b,i){return a(),o("div",{id:t.componentId,ref:"tooltip",class:s(["vui-tooltip",{"vui-tooltip--with-icon":t.icon},t.$props.class]),style:y({position:"fixed",display:i.display,top:`${i.top}px`,left:`${i.left}px`})},[u("i",{class:s(["vui-tooltip-pointer",`vui-tooltip-pointer--${t.position}`])},null,2),t.icon?(a(),o("i",{key:0,class:s(["vui-tooltip-icon",t.icon])},null,2)):n("",!0),t.$slots.default?c(t.$slots,"default",{key:1}):n("",!0),t.text?(a(),o(f,{key:2},[m(g(t.text),1)],64)):n("",!0)],14,v)}const x=p($,[["render",V]]);export{x as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as x}from"./demonstrable-
|
|
1
|
+
import{d as x}from"./demonstrable-CBEr3Dc5.js";import{t as _}from"./translatable-BfRM2PCZ.js";import V from"./tooltip-2A9ZTIcv.js";import{_ as w,a as l,b as e,w as i,r as p,o as n,F as g,g as k,h as y,m as T,i as C,d as a,t as h}from"./index-CXVfKCPR.js";import"./index-7pe20t8n.js";import"./composable-CshUTKfl.js";const M={"page.component.tooltip.button.show-bottom":"show tooltip on bottom","page.component.tooltip.button.show-right":"show tooltip on right","page.component.tooltip.button.show-left":"show tooltip on left","page.component.tooltip.button.show-top":"show tooltip on top","page.component.tooltip.text":"My tooltip content My tooltip content My tooltip content My tooltip content My tooltip content My tooltip content","page.component.tooltip.doc.prop.text":"Text of the tooltip","page.component.tooltip.doc.prop.icon":"Class name of the icon to prepend","page.component.tooltip.doc.prop.holder":"Id of the element which tooltip refers to","page.component.tooltip.doc.prop.position":"Position of the tooltip from holder","page.component.tooltip.doc.prop.v-model":"Binds the visible state of the tooltip","page.component.tooltip.doc.slot.default":"Default slot for tooltip content"},S={},$={en:M,fr:S},s={attrs:[],examples:[{markup:`
|
|
2
2
|
<vui-button
|
|
3
3
|
@click="isVisible=!isVisible"
|
|
4
4
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as o}from"./index-
|
|
1
|
+
import{v as o}from"./index-CXVfKCPR.js";const a=e=>{const t=o.useI18n();return Object.keys(e).forEach(r=>{t.mergeLocaleMessage(r,e[r])}),t};export{a as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as _}from"./demonstrable-
|
|
1
|
+
import{d as _}from"./demonstrable-CBEr3Dc5.js";import{t as f}from"./translatable-BfRM2PCZ.js";import v from"./unit-zA8UNlD5.js";import{_ as h,a as s,b as t,w as e,r as a,o as d,F as u,g as b,d as n,t as l}from"./index-CXVfKCPR.js";import"./composable-CshUTKfl.js";const $={"page.component.grid-unit.left":"Col 1 content","page.component.grid-unit.right":"Col 2 content","page.component.grid-unit.doc.tag.col":"Defines flex basis percentage for grid-unit column"},x={},C={en:$,fr:x},p={attrs:[],examples:[{markup:`
|
|
2
2
|
<vui-grid
|
|
3
3
|
id="example-grid-1"
|
|
4
4
|
col-md="2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./composable-CshUTKfl.js";import{t as n}from"./translatable-
|
|
1
|
+
import{c as e}from"./composable-CshUTKfl.js";import{t as n}from"./translatable-BfRM2PCZ.js";import{_ as r,a as t,j as o,n as a,o as i}from"./index-CXVfKCPR.js";const l={},p={},c={en:l,fr:p},d={col:{default:void 0,types:[String,Number]}},u={name:"VuiGridUnit",mixins:[e],props:d,created(){n(c)}};function m(s,f,$,g,b,v){return i(),t("div",{class:a(["vui-grid-unit",{[`vui-grid-unit-col--${s.col}`]:s.col},s.$props.class])},[o(s.$slots,"prepend"),o(s.$slots,"default"),o(s.$slots,"append")],2)}const G=r(u,[["render",m]]);export{G as default};
|
package/dist/doc/index.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<style>
|
|
23
23
|
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
|
|
24
24
|
</style>
|
|
25
|
-
<script type="module" crossorigin src="/assets/index-
|
|
25
|
+
<script type="module" crossorigin src="/assets/index-CXVfKCPR.js"></script>
|
|
26
26
|
<link rel="stylesheet" crossorigin href="/assets/index-BSpywUIE.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import c from "./input-BS_1U11l.js";
|
|
2
|
-
import
|
|
3
|
-
import { a as
|
|
2
|
+
import b from "./list-B2RmfvYJ.js";
|
|
3
|
+
import { a as f } from "./animable-DnFaMPYA.js";
|
|
4
4
|
import { _ as g, c as v, t as y } from "./_plugin-vue_export-helper-BSl1dQT6.js";
|
|
5
|
-
import { resolveComponent as
|
|
5
|
+
import { resolveComponent as u, openBlock as m, createElementBlock as V, normalizeClass as p, renderSlot as d, createElementVNode as w, withModifiers as k, createVNode as L, createBlock as $, mergeProps as C, createSlots as I, withCtx as s, createCommentVNode as B } from "vue";
|
|
6
6
|
import "highlight.js";
|
|
7
7
|
const S = {
|
|
8
8
|
"component.dropdown.placeholder": "Select a value ..."
|
|
@@ -61,10 +61,10 @@ const S = {
|
|
|
61
61
|
name: "VuiDropdown",
|
|
62
62
|
components: {
|
|
63
63
|
VuiInput: c,
|
|
64
|
-
VuiList:
|
|
64
|
+
VuiList: b
|
|
65
65
|
},
|
|
66
66
|
mixins: [
|
|
67
|
-
|
|
67
|
+
f,
|
|
68
68
|
v
|
|
69
69
|
],
|
|
70
70
|
props: A,
|
|
@@ -80,8 +80,8 @@ const S = {
|
|
|
80
80
|
return this.selected ? this.placeholderLabel : null;
|
|
81
81
|
},
|
|
82
82
|
placeholderValue() {
|
|
83
|
-
const { itemValue: e, multiple:
|
|
84
|
-
return
|
|
83
|
+
const { itemValue: e, multiple: o, selected: n } = this, i = o ? n[0] : n, t = typeof (i == null ? void 0 : i[e]) < "u" ? i[e] : i, a = [null, void 0].includes(t) ? this.placeholderLabel : this.labelFromItem(t);
|
|
84
|
+
return o && n.length > 1 ? `${a} (+${n.length - 1})` : a;
|
|
85
85
|
},
|
|
86
86
|
placeholderLabel() {
|
|
87
87
|
return this.placeholder ? this.placeholder : this.$t("component.dropdown.placeholder");
|
|
@@ -99,13 +99,13 @@ const S = {
|
|
|
99
99
|
y(N), this.hasModelValue ? this.selected = this.modelValue : this.hasValue && (this.selected = this.value);
|
|
100
100
|
},
|
|
101
101
|
methods: {
|
|
102
|
-
labelFromChild(e,
|
|
103
|
-
const { itemValue:
|
|
104
|
-
return e[
|
|
102
|
+
labelFromChild(e, o, n) {
|
|
103
|
+
const { itemValue: i, itemLabel: t } = this;
|
|
104
|
+
return e[i].reduce((a, r) => r[i] === n ? r[t] : a, o);
|
|
105
105
|
},
|
|
106
106
|
labelFromItem(e) {
|
|
107
|
-
const { itemValue:
|
|
108
|
-
return this.items.reduce((
|
|
107
|
+
const { itemValue: o, itemLabel: n } = this;
|
|
108
|
+
return this.items.reduce((i, t) => Array.isArray(t[o]) ? this.labelFromChild(t, i, e) : t[o] === e ? t[n] : i, e);
|
|
109
109
|
},
|
|
110
110
|
onClick() {
|
|
111
111
|
this.disabled || this.onAnimate();
|
|
@@ -118,36 +118,36 @@ const S = {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}, j = ["id"];
|
|
121
|
-
function E(e,
|
|
122
|
-
const
|
|
123
|
-
return
|
|
121
|
+
function E(e, o, n, i, t, a) {
|
|
122
|
+
const r = u("vui-input"), h = u("vui-list");
|
|
123
|
+
return m(), V("div", {
|
|
124
124
|
id: e.componentId,
|
|
125
125
|
class: p(["vui-dropdown", e.$props.class])
|
|
126
126
|
}, [
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
d(e.$slots, "prepend"),
|
|
128
|
+
w("div", {
|
|
129
129
|
class: p([
|
|
130
130
|
"vui-dropdown-placeholder",
|
|
131
131
|
{ "vui-dropdown-placeholder--toggled": e.toggled },
|
|
132
132
|
{ "vui-dropdown-placeholder--animating": e.animating },
|
|
133
133
|
{ "vui-dropdown-placeholder--disabled": e.disabled }
|
|
134
134
|
]),
|
|
135
|
-
onClick:
|
|
135
|
+
onClick: o[0] || (o[0] = k((...l) => a.onClick && a.onClick(...l), ["stop"]))
|
|
136
136
|
}, [
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
d(e.$slots, "keyword", { keyword: t.keyword }, () => [
|
|
138
|
+
L(r, {
|
|
139
139
|
"with-icon": !1,
|
|
140
|
-
value:
|
|
140
|
+
value: t.keyword,
|
|
141
141
|
type: "text",
|
|
142
142
|
class: "vui-dropdown-placeholder-label",
|
|
143
|
-
placeholder: `${
|
|
144
|
-
onInput:
|
|
143
|
+
placeholder: `${a.placeholderValue}`,
|
|
144
|
+
onInput: a.onInput
|
|
145
145
|
}, null, 8, ["value", "placeholder", "onInput"])
|
|
146
146
|
])
|
|
147
147
|
], 2),
|
|
148
|
-
e.toggled ? (
|
|
148
|
+
e.toggled ? (m(), $(h, C({
|
|
149
149
|
key: 0,
|
|
150
|
-
value:
|
|
150
|
+
value: t.selected
|
|
151
151
|
}, e.$attrs, {
|
|
152
152
|
class: "vui-dropdown-list",
|
|
153
153
|
"group-id": e.componentGroupId,
|
|
@@ -156,38 +156,53 @@ function E(e, i, a, t, l, o) {
|
|
|
156
156
|
items: e.items,
|
|
157
157
|
"item-label": e.itemLabel,
|
|
158
158
|
"item-value": e.itemValue,
|
|
159
|
-
keyword:
|
|
159
|
+
keyword: t.keyword,
|
|
160
160
|
selectable: !0,
|
|
161
|
-
title:
|
|
161
|
+
title: a.listTitle,
|
|
162
162
|
multiple: e.multiple,
|
|
163
|
-
"onUpdate:modelValue":
|
|
164
|
-
}),
|
|
163
|
+
"onUpdate:modelValue": a.onToggle
|
|
164
|
+
}), I({ _: 2 }, [
|
|
165
165
|
e.$slots.placeholder ? {
|
|
166
166
|
name: "placeholder",
|
|
167
|
-
fn:
|
|
168
|
-
|
|
167
|
+
fn: s((l) => [
|
|
168
|
+
d(e.$slots, "placeholder", {
|
|
169
|
+
index: l.index,
|
|
170
|
+
item: l.item,
|
|
171
|
+
itemLabel: l.itemLabel,
|
|
172
|
+
itemValue: l.itemValue
|
|
173
|
+
})
|
|
169
174
|
]),
|
|
170
175
|
key: "0"
|
|
171
176
|
} : void 0,
|
|
172
177
|
e.$slots["group-item"] ? {
|
|
173
178
|
name: "group-item",
|
|
174
|
-
fn:
|
|
175
|
-
|
|
179
|
+
fn: s((l) => [
|
|
180
|
+
d(e.$slots, "group-item", {
|
|
181
|
+
index: l.index,
|
|
182
|
+
item: l.item,
|
|
183
|
+
itemLabel: l.itemLabel,
|
|
184
|
+
itemValue: l.itemValue
|
|
185
|
+
})
|
|
176
186
|
]),
|
|
177
187
|
key: "1"
|
|
178
188
|
} : void 0,
|
|
179
189
|
e.$slots.item ? {
|
|
180
190
|
name: "item",
|
|
181
|
-
fn:
|
|
182
|
-
|
|
191
|
+
fn: s((l) => [
|
|
192
|
+
d(e.$slots, "item", {
|
|
193
|
+
index: l.index,
|
|
194
|
+
item: l.item,
|
|
195
|
+
itemLabel: l.itemLabel,
|
|
196
|
+
itemValue: l.itemValue
|
|
197
|
+
})
|
|
183
198
|
]),
|
|
184
199
|
key: "2"
|
|
185
200
|
} : void 0
|
|
186
|
-
]), 1040, ["value", "group-id", "disable-filtering", "disabled", "items", "item-label", "item-value", "keyword", "title", "multiple", "onUpdate:modelValue"])) :
|
|
187
|
-
|
|
201
|
+
]), 1040, ["value", "group-id", "disable-filtering", "disabled", "items", "item-label", "item-value", "keyword", "title", "multiple", "onUpdate:modelValue"])) : B("", !0),
|
|
202
|
+
d(e.$slots, "append")
|
|
188
203
|
], 10, j);
|
|
189
204
|
}
|
|
190
|
-
const
|
|
205
|
+
const G = /* @__PURE__ */ g(T, [["render", E]]);
|
|
191
206
|
export {
|
|
192
|
-
|
|
207
|
+
G as default
|
|
193
208
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./input-CPJkbqQt.js"),p=require("./list-D6Ab_PXR.js"),c=require("./animable-ChJEXlsE.js"),u=require("./_plugin-vue_export-helper-DeDoBcDj.js"),l=require("vue");require("highlight.js");const h={"component.dropdown.placeholder":"Select a value ..."},b={},f={en:h,fr:b},g={disableFiltering:{type:Boolean,default:!1},items:{type:Array,required:!0},itemLabel:{type:String,default:"label"},itemValue:{type:String,default:"value"},modelValue:{default:void 0,types:[Boolean,Number,Object,String,null]},multiple:{default:!1,type:Boolean},placeholder:{types:[Boolean,Number,String]},value:{default:void 0,types:[Boolean,Object,Number,String,null]}},v={name:"VuiDropdown",components:{VuiInput:m.default,VuiList:p.default},mixins:[c.animable,u.composable],props:g,emits:["input","update:model-value"],data(){return{keyword:null,selected:this.multiple?[]:null}},computed:{listTitle(){return this.selected?this.placeholderLabel:null},placeholderValue(){const{itemValue:e,multiple:a,selected:d}=this,n=a?d[0]:d,i=typeof(n==null?void 0:n[e])<"u"?n[e]:n,o=[null,void 0].includes(i)?this.placeholderLabel:this.labelFromItem(i);return a&&d.length>1?`${o} (+${d.length-1})`:o},placeholderLabel(){return this.placeholder?this.placeholder:this.$t("component.dropdown.placeholder")}},watch:{modelValue(e){this.selected=e},value(e){this.selected=e}},created(){u.translatable(f),this.hasModelValue?this.selected=this.modelValue:this.hasValue&&(this.selected=this.value)},methods:{labelFromChild(e,a,d){const{itemValue:n,itemLabel:i}=this;return e[n].reduce((o,r)=>r[n]===d?r[i]:o,a)},labelFromItem(e){const{itemValue:a,itemLabel:d}=this;return this.items.reduce((n,i)=>Array.isArray(i[a])?this.labelFromChild(i,n,e):i[a]===e?i[d]:n,e)},onClick(){this.disabled||this.onAnimate()},onInput(e){this.$emit("input",e),this.onAnimate(!0),this.keyword=e.target.value?e.target.value:null},onToggle(e){this.keyword=null,this.multiple||this.blur(),this.hasProp("value")||(this.selected=e),this.$emit("update:model-value",e)}}},y=["id"];function w(e,a,d,n,i,o){const r=l.resolveComponent("vui-input"),s=l.resolveComponent("vui-list");return l.openBlock(),l.createElementBlock("div",{id:e.componentId,class:l.normalizeClass(["vui-dropdown",e.$props.class])},[l.renderSlot(e.$slots,"prepend"),l.createElementVNode("div",{class:l.normalizeClass(["vui-dropdown-placeholder",{"vui-dropdown-placeholder--toggled":e.toggled},{"vui-dropdown-placeholder--animating":e.animating},{"vui-dropdown-placeholder--disabled":e.disabled}]),onClick:a[0]||(a[0]=l.withModifiers((...t)=>o.onClick&&o.onClick(...t),["stop"]))},[l.renderSlot(e.$slots,"keyword",{keyword:i.keyword},()=>[l.createVNode(r,{"with-icon":!1,value:i.keyword,type:"text",class:"vui-dropdown-placeholder-label",placeholder:`${o.placeholderValue}`,onInput:o.onInput},null,8,["value","placeholder","onInput"])])],2),e.toggled?(l.openBlock(),l.createBlock(s,l.mergeProps({key:0,value:i.selected},e.$attrs,{class:"vui-dropdown-list","group-id":e.componentGroupId,"disable-filtering":e.disableFiltering,disabled:e.disabled,items:e.items,"item-label":e.itemLabel,"item-value":e.itemValue,keyword:i.keyword,selectable:!0,title:o.listTitle,multiple:e.multiple,"onUpdate:modelValue":o.onToggle}),l.createSlots({_:2},[e.$slots.placeholder?{name:"placeholder",fn:l.withCtx(t=>[l.renderSlot(e.$slots,"placeholder",{index:t.index,item:t.item,itemLabel:t.itemLabel,itemValue:t.itemValue})]),key:"0"}:void 0,e.$slots["group-item"]?{name:"group-item",fn:l.withCtx(t=>[l.renderSlot(e.$slots,"group-item",{index:t.index,item:t.item,itemLabel:t.itemLabel,itemValue:t.itemValue})]),key:"1"}:void 0,e.$slots.item?{name:"item",fn:l.withCtx(t=>[l.renderSlot(e.$slots,"item",{index:t.index,item:t.item,itemLabel:t.itemLabel,itemValue:t.itemValue})]),key:"2"}:void 0]),1040,["value","group-id","disable-filtering","disabled","items","item-label","item-value","keyword","title","multiple","onUpdate:modelValue"])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"append")],10,y)}const V=u._export_sfc(v,[["render",w]]);exports.default=V;
|