@e-xode/vui 0.6.7 → 0.6.9
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/README.md +0 -4
- package/dist/doc/assets/{alert-kDXe81fs.js → alert-CjYfnkgY.js} +1 -1
- package/dist/doc/assets/alert-Dv5B896E.js +25 -0
- package/dist/doc/assets/{button-9ro2C_DO.js → button-0GcTFHSi.js} +1 -1
- package/dist/doc/assets/{button-2k6FVc0L.js → button-BiUDTpHI.js} +2 -2
- package/dist/doc/assets/{card-DiRo_ZxR.js → card-BSHBp5H2.js} +2 -2
- package/dist/doc/assets/{card-ETnsHTxY.js → card-Chf4PL7v.js} +1 -1
- package/dist/doc/assets/{checkbox-XTMM84PN.js → checkbox-CndsCrpw.js} +2 -2
- package/dist/doc/assets/{checkbox-GxzrS_FW.js → checkbox-DqWZaBiH.js} +1 -1
- package/dist/doc/assets/{component-Cd0V3c30.js → component-CRjEDIeL.js} +1 -1
- package/dist/doc/assets/{default-Ddw34XZA.js → default-BGdD15yH.js} +1 -1
- package/dist/doc/assets/{demonstrable-Dv7XIPoL.js → demonstrable-DoDjrIlv.js} +1 -1
- package/dist/doc/assets/dropdown-BdQMe_FS.js +1 -0
- package/dist/doc/assets/{dropdown-C6Kafffe.js → dropdown-DE0RkMrn.js} +8 -2
- package/dist/doc/assets/{footer-DEmxvZDO.js → footer-QuG2cPMr.js} +1 -1
- package/dist/doc/assets/footer-ZKa9EX9c.js +5 -0
- package/dist/doc/assets/{form-DLfAvscm.js → form-BQktZa2P.js} +1 -1
- package/dist/doc/assets/{form-DQoPnfc6.js → form-BufwdW7J.js} +1 -1
- package/dist/doc/assets/{grid-Dyb-qIv6.js → grid-BPofjRVD.js} +1 -1
- package/dist/doc/assets/{grid-Byaifs5F.js → grid-Bb5Dvs-l.js} +1 -1
- package/dist/doc/assets/{header-C2DRVubg.js → header-BIii_sel.js} +1 -1
- package/dist/doc/assets/header-D3RtYpzx.js +5 -0
- package/dist/doc/assets/index-B9J_Vhzy.js +1 -0
- package/dist/doc/assets/index-BTkXFI8q.js +48 -0
- package/dist/doc/assets/{input-Dxw7RYfZ.js → input-CIyXwPJo.js} +2 -2
- package/dist/doc/assets/{input-hkS14TCT.js → input-DhEvJPvY.js} +1 -1
- package/dist/doc/assets/list-6T_m0poQ.js +1 -0
- package/dist/doc/assets/{list-BYX5Hslw.js → list-CM39BhXG.js} +8 -2
- package/dist/doc/assets/{loader-hc6kqiqT.js → loader-C9zMMltn.js} +1 -1
- package/dist/doc/assets/loader-Cq-sKRvC.js +21 -0
- package/dist/doc/assets/{modal-Ci7IYllg.js → modal-C53ocn5e.js} +1 -1
- package/dist/doc/assets/{modal-DprGtJnD.js → modal-GnTlL4YH.js} +2 -2
- package/dist/doc/assets/{nav--03mFDUT.js → nav-BpjBJvti.js} +2 -2
- package/dist/doc/assets/{nav-C9RI5Z6H.js → nav-zPqs5uBf.js} +1 -1
- package/dist/doc/assets/{page-C85vct24.js → page-SGBLPlKo.js} +2 -2
- package/dist/doc/assets/{page-CMF9WylW.js → page-TW0mWSQ1.js} +1 -1
- package/dist/doc/assets/{pager-0bNXGtWQ.js → pager-Bg7nlzpl.js} +2 -2
- package/dist/doc/assets/{pager-BuEhUbXw.js → pager-RDLltlHx.js} +1 -1
- package/dist/doc/assets/progress-B17kvYeL.js +1 -0
- package/dist/doc/assets/progress-CLQ57-Rn.js +14 -0
- package/dist/doc/assets/{radio-FDvwgcUe.js → radio-BYvvsNUN.js} +1 -1
- package/dist/doc/assets/{radio-vJklHHcl.js → radio-BhS7ejUd.js} +2 -2
- package/dist/doc/assets/{start-Cpz5sHNq.js → start-BV6lGp3K.js} +1 -1
- package/dist/doc/assets/table-BiNwpYJv.js +1 -0
- package/dist/doc/assets/{table-D1jz3DKO.js → table-iZQFAIYB.js} +4 -4
- package/dist/doc/assets/tabs-CDrn7gwB.js +1 -0
- package/dist/doc/assets/tabs-D5P3KDps.js +18 -0
- package/dist/doc/assets/{tabs-B3SGp8R7.css → tabs-hlfEQ058.css} +1 -1
- package/dist/doc/assets/{tag-CgEGHygn.js → tag-C8ZH7AA8.js} +1 -1
- package/dist/doc/assets/tag-Dtea5pEP.js +25 -0
- package/dist/doc/assets/toggle-B9UDc3mD.js +9 -0
- package/dist/doc/assets/{toggle-Dxv9_B8u.js → toggle-DdZEGhQq.js} +1 -1
- package/dist/doc/assets/{tooltip-CfuewoN3.js → tooltip-DpfGqhtH.js} +1 -1
- package/dist/doc/assets/{tooltip-BZOlKAkT.js → tooltip-e4tMYlM-.js} +2 -2
- package/dist/doc/assets/{translatable-eIyiPB31.js → translatable-C-odWYJj.js} +1 -1
- package/dist/doc/assets/{unit-B5sbv-XJ.js → unit-DLLXuLch.js} +1 -1
- package/dist/doc/assets/{unit-KaJ8YPkP.js → unit-Nmo6cT5V.js} +1 -1
- package/dist/doc/index.html +1 -1
- package/dist/dropdown-BYoP3RV5.js +1 -0
- package/dist/{dropdown-UMn42uen.js → dropdown-DRWYotec.js} +34 -29
- package/dist/{list-BH719nj8.js → list-B2RmfvYJ.js} +81 -72
- package/dist/list-D6Ab_PXR.js +1 -0
- package/dist/{nav-BD6eV2wj.js → nav-DSozAFxm.js} +1 -1
- package/dist/{nav-DdIBrD1b.js → nav-DaMMbZ1c.js} +1 -1
- package/dist/{pager-CBJ3CiCZ.js → pager-BmkqHhPe.js} +1 -1
- package/dist/{pager-C8iFmeo8.js → pager-IbKKbzBQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/table-BwNXLneC.js +99 -0
- package/dist/table-CZIoYOTL.js +1 -0
- package/dist/{tabs-X0RMcNvq.js → tabs-BRZDtZl_.js} +26 -26
- package/dist/tabs-ovpCyyQj.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 +11 -11
- package/dist/doc/assets/alert-xIfTKyZn.js +0 -25
- package/dist/doc/assets/dropdown-CWekPPzX.js +0 -1
- package/dist/doc/assets/footer-DmvqVfCJ.js +0 -5
- package/dist/doc/assets/header-CW68DlQ3.js +0 -5
- package/dist/doc/assets/index-BTCbAXEh.js +0 -48
- package/dist/doc/assets/index-DYd8GVyV.js +0 -1
- package/dist/doc/assets/list-n3xmt7CO.js +0 -1
- package/dist/doc/assets/loader-C_KYFdY0.js +0 -21
- package/dist/doc/assets/progress-B9G9PL1G.js +0 -14
- package/dist/doc/assets/progress-aePOsZNN.js +0 -1
- package/dist/doc/assets/table-C_Rv3GlB.js +0 -1
- package/dist/doc/assets/tabs-CpDei3SM.js +0 -11
- package/dist/doc/assets/tabs-DJI7K47M.js +0 -1
- package/dist/doc/assets/tag-0ugBlzs4.js +0 -25
- package/dist/doc/assets/toggle-CsmmXJeS.js +0 -9
- package/dist/dropdown-DUUZsTpI.js +0 -1
- package/dist/list-BkZK3xVW.js +0 -1
- package/dist/table-8qXMDkjH.js +0 -1
- package/dist/table-DuvV-g2p.js +0 -95
- package/dist/tabs-CHwXPZS8.js +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{d as N}from"./demonstrable-DoDjrIlv.js";import{t as x}from"./translatable-C-odWYJj.js";import C from"./toggle-DdZEGhQq.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-BTkXFI8q.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
|
+
<vui-toggle>
|
|
3
|
+
Default checkbox
|
|
4
|
+
</vui-toggle>
|
|
5
|
+
`,props:{id:"vui-toggle-1"},text:"page.component.toggle.default"},{markup:`
|
|
6
|
+
<vui-toggle>
|
|
7
|
+
Binded checkbox
|
|
8
|
+
</vui-toggle>
|
|
9
|
+
`,props:{id:"vui-toggle-2"},text:"page.component.toggle.binded"}],props:[{tag:"checked-value",type:"[Boolean, String, Number, null]",text:"page.component.toggle.doc.prop.checked-value"},{tag:"disabled",type:"Boolean",text:"page.component.toggle.doc.prop.disabled"},{tag:"unchecked-value",type:"[Boolean, String, Number, null]",text:"page.component.toggle.doc.prop.unchecked-value"},{tag:"value",type:"[Boolean, String, Number, null]",text:"page.component.toggle.doc.prop.value"},{tag:"v-model",type:"[Boolean, String, Number, null]",text:"page.component.toggle.doc.prop.v-model"}],slots:[]},H={name:"ViewToggle",mixins:[N],setup(){return x(D),{}},data(){return{states:{}}},computed:{doc(){return i},examples(){return this.docExamples(C,{attrs:i.attrs,examples:i.examples.map(t=>({...t,props:{...t.props,text:t.props.text?this.$t(t.props.text):null}}))})}},mounted(){this.states=this.examples.reduce((t,u)=>({...t,[u.props.id]:!1}),{})}},L={class:"view-toggle"},P=["innerHTML"],U={class:"title"};function E(t,u,F,M,g,k){const b=r("vui-tag"),m=r("vui-grid-unit"),B=r("vui-table"),y=r("vui-grid");return o(),n("div",L,[s(y,{"col-sm":"1","col-md":"2"},{default:l(()=>[s(m,{class:"examples"},{default:l(()=>[(o(!0),n(a,null,T(k.examples,e=>(o(),n(a,{key:`toggle-${e.props.id}`},[e.props.id==="vui-toggle-1"?(o(),n(a,{key:0},[(o(),h(f(e.component),v({ref_for:!0},e.props,{modelValue:g.states[e.props.id],"onUpdate:modelValue":V=>g.states[e.props.id]=V}),{default:l(()=>[e.text?(o(),n(a,{key:0},[d(p(t.$t(e.text)),1)],64)):c("",!0)]),_:2},1040,["modelValue","onUpdate:modelValue"])),d(" "),s(b,null,{default:l(()=>[d(p(t.$t("page.component.toggle.label"))+": "+p(g.states[e.props.id]),1)]),_:2},1024)],64)):c("",!0),e.props.id==="vui-toggle-2"?(o(),h(f(e.component),v({key:1,ref_for:!0},e.props,{checked:g.states["vui-toggle-1"],disabled:""}),{default:l(()=>[e.text?(o(),n(a,{key:0},[d(p(t.$t(e.text)),1)],64)):c("",!0)]),_:2},1040,["checked"])):c("",!0),_("div",{class:"highlighted-code",innerHTML:e.highlighted},null,8,P)],64))),128))]),_:1}),s(m,{class:"api-options"},{default:l(()=>[_("h2",U,p(t.$t("page.component.h2.api")),1),s(B,{"item-label":"label","item-value":"value",headers:t.docPropsHeaders,items:t.docProps},null,8,["headers","items"])]),_:1})]),_:1})])}const I=S(H,[["render",E]]);export{I as default};
|
|
@@ -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,
|
|
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-BTkXFI8q.js";import{t as g}from"./translatable-C-odWYJj.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-C-odWYJj.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-BTkXFI8q.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-DoDjrIlv.js";import{t as _}from"./translatable-C-odWYJj.js";import V from"./tooltip-DpfGqhtH.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-BTkXFI8q.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
|
>
|
|
@@ -45,4 +45,4 @@ import{d as x}from"./demonstrable-Dv7XIPoL.js";import{t as _}from"./translatable
|
|
|
45
45
|
<span>Tooltip left position</span>
|
|
46
46
|
</vui-tooltip>
|
|
47
47
|
</vui-button>
|
|
48
|
-
`,props:{id:"vui-tooltip-4",icon:"fa-solid fa-message",text:"page.component.tooltip.text",position:"left"},button:"page.component.tooltip.button.show-left"}],props:[{tag:"holder",type:"String",text:"page.component.tooltip.doc.prop.holder"},{tag:"icon",type:"String",text:"page.component.tooltip.doc.prop.icon"},{tag:"position",type:"String",text:"page.component.tooltip.doc.prop.position"},{tag:"text",type:"String",text:"page.component.tooltip.doc.prop.text"},{tag:"v-model",type:"String",text:"page.component.tooltip.doc.prop.v-model"}],slots:[{name:"default",text:"page.component.tooltip.doc.slot.default"}]},B={name:"ViewTooltip",mixins:[x],setup(){return _($),{}},data(){return{tooltips:[]}},computed:{doc(){return s},examples(){return this.docExamples(V,{attrs:s.attrs,examples:s.examples.map(o=>({...o,props:{...o.props,text:o.props.text?this.$t(o.props.text):null}}))})}},mounted(){this.tooltips=s.examples.map(()=>!1)},methods:{onClick(o){const c=this.tooltips[o];this.tooltips[o]=!c}}},H={class:"view-tooltip"},P=["innerHTML"],D={class:"title"},L={class:"title"};function E(o,c,F,N,r,m){const b=p("vui-button"),d=p("vui-grid-unit"),u=p("vui-table"),f=p("vui-grid");return n(),l("div",H,[e(f,{"col-sm":"1","col-md":"2"},{default:i(()=>[e(d,{class:"examples"},{default:i(()=>[(n(!0),l(g,null,k(m.examples,t=>(n(),l(g,{key:`tooltip-${t.props.id}`},[e(b,{id:`button-tooltip-${t.props.id}`,text:o.$t(t.button),onClick:()=>m.onClick(t.props.id)},{prepend:i(()=>[(n(),y(C(t.component),T({modelValue:r.tooltips[t.props.id],"onUpdate:modelValue":v=>r.tooltips[t.props.id]=v},t.props),null,16,["modelValue","onUpdate:modelValue"]))]),_:2},1032,["id","text","onClick"]),a("div",{class:"highlighted-code",innerHTML:t.highlighted},null,8,P)],64))),128))]),_:1}),e(d,{class:"api-options"},{default:i(()=>[a("h2",D,h(o.$t("page.component.h2.api")),1),e(u,{"item-label":"label","item-value":"value",headers:o.docPropsHeaders,items:o.docProps},null,8,["headers","items"]),a("h2",L,h(o.$t("page.component.h2.slots")),1),e(u,{"item-label":"label","item-value":"value",headers:o.docSlotsHeaders,items:o.docSlots},null,8,["headers","items"])]),_:1})]),_:1})])}const G=w(B,[["render",E]]);export{G as default};
|
|
48
|
+
`,props:{id:"vui-tooltip-4",icon:"fa-solid fa-message",text:"page.component.tooltip.text",position:"left"},button:"page.component.tooltip.button.show-left"}],props:[{tag:"holder",type:"String",text:"page.component.tooltip.doc.prop.holder"},{tag:"icon",type:"String",text:"page.component.tooltip.doc.prop.icon"},{tag:"position",type:"String",text:"page.component.tooltip.doc.prop.position"},{tag:"text",type:"String",text:"page.component.tooltip.doc.prop.text"},{tag:"v-model",type:"String",text:"page.component.tooltip.doc.prop.v-model"}],slots:[{name:"default",text:"page.component.tooltip.doc.slot.default"}]},B={name:"ViewTooltip",mixins:[x],setup(){return _($),{}},data(){return{tooltips:[]}},computed:{doc(){return s},examples(){return this.docExamples(V,{attrs:s.attrs,examples:s.examples.map(o=>({...o,props:{...o.props,text:o.props.text?this.$t(o.props.text):null}}))})}},mounted(){this.tooltips=s.examples.map(()=>!1)},methods:{onClick(o){const c=this.tooltips[o];this.tooltips[o]=!c}}},H={class:"view-tooltip"},P=["innerHTML"],D={class:"title"},L={class:"title"};function E(o,c,F,N,r,m){const b=p("vui-button"),d=p("vui-grid-unit"),u=p("vui-table"),f=p("vui-grid");return n(),l("div",H,[e(f,{"col-sm":"1","col-md":"2"},{default:i(()=>[e(d,{class:"examples"},{default:i(()=>[(n(!0),l(g,null,k(m.examples,t=>(n(),l(g,{key:`tooltip-${t.props.id}`},[e(b,{id:`button-tooltip-${t.props.id}`,text:o.$t(t.button),onClick:()=>m.onClick(t.props.id)},{prepend:i(()=>[(n(),y(C(t.component),T({modelValue:r.tooltips[t.props.id],"onUpdate:modelValue":v=>r.tooltips[t.props.id]=v,ref_for:!0},t.props),null,16,["modelValue","onUpdate:modelValue"]))]),_:2},1032,["id","text","onClick"]),a("div",{class:"highlighted-code",innerHTML:t.highlighted},null,8,P)],64))),128))]),_:1}),e(d,{class:"api-options"},{default:i(()=>[a("h2",D,h(o.$t("page.component.h2.api")),1),e(u,{"item-label":"label","item-value":"value",headers:o.docPropsHeaders,items:o.docProps},null,8,["headers","items"]),a("h2",L,h(o.$t("page.component.h2.slots")),1),e(u,{"item-label":"label","item-value":"value",headers:o.docSlotsHeaders,items:o.docSlots},null,8,["headers","items"])]),_:1})]),_:1})])}const G=w(B,[["render",E]]);export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as o}from"./index-
|
|
1
|
+
import{v as o}from"./index-BTkXFI8q.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 +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-C-odWYJj.js";import{_ as r,a as t,j as o,n as a,o as i}from"./index-BTkXFI8q.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as _}from"./demonstrable-
|
|
1
|
+
import{d as _}from"./demonstrable-DoDjrIlv.js";import{t as f}from"./translatable-C-odWYJj.js";import v from"./unit-DLLXuLch.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-BTkXFI8q.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"
|
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-BTkXFI8q.js"></script>
|
|
26
26
|
<link rel="stylesheet" crossorigin href="/assets/index-BSpywUIE.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./input-CPJkbqQt.js"),m=require("./list-D6Ab_PXR.js"),c=require("./animable-ChJEXlsE.js"),s=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:p.default,VuiList:m.default},mixins:[c.animable,s.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:n,selected:r}=this,o=n?r[0]:r,t=typeof(o==null?void 0:o[e])<"u"?o[e]:o,i=[null,void 0].includes(t)?this.placeholderLabel:this.labelFromItem(t);return n&&r.length>1?`${i} (+${r.length-1})`:i},placeholderLabel(){return this.placeholder?this.placeholder:this.$t("component.dropdown.placeholder")}},watch:{modelValue(e){this.selected=e},value(e){this.selected=e}},created(){s.translatable(f),this.hasModelValue?this.selected=this.modelValue:this.hasValue&&(this.selected=this.value)},methods:{labelFromChild(e,n,r){const{itemValue:o,itemLabel:t}=this;return e[o].reduce((i,d)=>d[o]===r?d[t]:i,n)},labelFromItem(e){const{itemValue:n,itemLabel:r}=this;return this.items.reduce((o,t)=>Array.isArray(t[n])?this.labelFromChild(t,o,e):t[n]===e?t[r]:o,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,n,r,o,t,i){const d=l.resolveComponent("vui-input"),a=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:n[0]||(n[0]=l.withModifiers((...u)=>i.onClick&&i.onClick(...u),["stop"]))},[l.renderSlot(e.$slots,"keyword",{keyword:t.keyword},()=>[l.createVNode(d,{"with-icon":!1,value:t.keyword,type:"text",class:"vui-dropdown-placeholder-label",placeholder:`${i.placeholderValue}`,onInput:i.onInput},null,8,["value","placeholder","onInput"])])],2),e.toggled?(l.openBlock(),l.createBlock(a,l.mergeProps({key:0,value:t.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:t.keyword,selectable:!0,title:i.listTitle,multiple:e.multiple,"onUpdate:modelValue":i.onToggle}),l.createSlots({_:2},[e.$slots.placeholder?{name:"placeholder",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"placeholder")]),key:"0"}:void 0,e.$slots["group-item"]?{name:"group-item",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"group-item")]),key:"1"}:void 0,e.$slots.item?{name:"item",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"item")]),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 k=s._export_sfc(v,[["render",w]]);exports.default=k;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import c from "./input-BS_1U11l.js";
|
|
2
|
-
import f from "./list-
|
|
2
|
+
import f from "./list-B2RmfvYJ.js";
|
|
3
3
|
import { a as b } 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 r, openBlock as u, createElementBlock as w, normalizeClass as p, renderSlot as s, createElementVNode as k, withModifiers as V, createVNode as $, createBlock as C, mergeProps as I, createSlots as B, withCtx as d, createCommentVNode as L } from "vue";
|
|
6
6
|
import "highlight.js";
|
|
7
|
-
const
|
|
7
|
+
const S = {
|
|
8
8
|
"component.dropdown.placeholder": "Select a value ..."
|
|
9
9
|
}, F = {}, N = {
|
|
10
|
-
en:
|
|
10
|
+
en: S,
|
|
11
11
|
fr: F
|
|
12
12
|
}, A = {
|
|
13
13
|
disableFiltering: {
|
|
@@ -36,6 +36,10 @@ const B = {
|
|
|
36
36
|
null
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
|
+
multiple: {
|
|
40
|
+
default: !1,
|
|
41
|
+
type: Boolean
|
|
42
|
+
},
|
|
39
43
|
placeholder: {
|
|
40
44
|
types: [
|
|
41
45
|
Boolean,
|
|
@@ -68,7 +72,7 @@ const B = {
|
|
|
68
72
|
data() {
|
|
69
73
|
return {
|
|
70
74
|
keyword: null,
|
|
71
|
-
selected: null
|
|
75
|
+
selected: this.multiple ? [] : null
|
|
72
76
|
};
|
|
73
77
|
},
|
|
74
78
|
computed: {
|
|
@@ -76,8 +80,8 @@ const B = {
|
|
|
76
80
|
return this.selected ? this.placeholderLabel : null;
|
|
77
81
|
},
|
|
78
82
|
placeholderValue() {
|
|
79
|
-
const { itemValue: e, selected:
|
|
80
|
-
return i
|
|
83
|
+
const { itemValue: e, multiple: i, selected: a } = this, t = i ? a[0] : a, l = typeof (t == null ? void 0 : t[e]) < "u" ? t[e] : t, o = [null, void 0].includes(l) ? this.placeholderLabel : this.labelFromItem(l);
|
|
84
|
+
return i && a.length > 1 ? `${o} (+${a.length - 1})` : o;
|
|
81
85
|
},
|
|
82
86
|
placeholderLabel() {
|
|
83
87
|
return this.placeholder ? this.placeholder : this.$t("component.dropdown.placeholder");
|
|
@@ -95,13 +99,13 @@ const B = {
|
|
|
95
99
|
y(N), this.hasModelValue ? this.selected = this.modelValue : this.hasValue && (this.selected = this.value);
|
|
96
100
|
},
|
|
97
101
|
methods: {
|
|
98
|
-
labelFromChild(e,
|
|
99
|
-
const { itemValue:
|
|
100
|
-
return e[
|
|
102
|
+
labelFromChild(e, i, a) {
|
|
103
|
+
const { itemValue: t, itemLabel: l } = this;
|
|
104
|
+
return e[t].reduce((o, n) => n[t] === a ? n[l] : o, i);
|
|
101
105
|
},
|
|
102
106
|
labelFromItem(e) {
|
|
103
|
-
const { itemValue:
|
|
104
|
-
return this.items.reduce((
|
|
107
|
+
const { itemValue: i, itemLabel: a } = this;
|
|
108
|
+
return this.items.reduce((t, l) => Array.isArray(l[i]) ? this.labelFromChild(l, t, e) : l[i] === e ? l[a] : t, e);
|
|
105
109
|
},
|
|
106
110
|
onClick() {
|
|
107
111
|
this.disabled || this.onAnimate();
|
|
@@ -110,17 +114,17 @@ const B = {
|
|
|
110
114
|
this.$emit("input", e), this.onAnimate(!0), this.keyword = e.target.value ? e.target.value : null;
|
|
111
115
|
},
|
|
112
116
|
onToggle(e) {
|
|
113
|
-
this.keyword = null, this.blur(), this.hasProp("value") || (this.selected = e), this.$emit("update:model-value", e);
|
|
117
|
+
this.keyword = null, this.multiple || this.blur(), this.hasProp("value") || (this.selected = e), this.$emit("update:model-value", e);
|
|
114
118
|
}
|
|
115
119
|
}
|
|
116
120
|
}, j = ["id"];
|
|
117
|
-
function E(e,
|
|
118
|
-
const
|
|
121
|
+
function E(e, i, a, t, l, o) {
|
|
122
|
+
const n = r("vui-input"), m = r("vui-list");
|
|
119
123
|
return u(), w("div", {
|
|
120
124
|
id: e.componentId,
|
|
121
125
|
class: p(["vui-dropdown", e.$props.class])
|
|
122
126
|
}, [
|
|
123
|
-
|
|
127
|
+
s(e.$slots, "prepend"),
|
|
124
128
|
k("div", {
|
|
125
129
|
class: p([
|
|
126
130
|
"vui-dropdown-placeholder",
|
|
@@ -128,12 +132,12 @@ function E(e, l, i, a, t, o) {
|
|
|
128
132
|
{ "vui-dropdown-placeholder--animating": e.animating },
|
|
129
133
|
{ "vui-dropdown-placeholder--disabled": e.disabled }
|
|
130
134
|
]),
|
|
131
|
-
onClick:
|
|
135
|
+
onClick: i[0] || (i[0] = V((...h) => o.onClick && o.onClick(...h), ["stop"]))
|
|
132
136
|
}, [
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
s(e.$slots, "keyword", { keyword: l.keyword }, () => [
|
|
138
|
+
$(n, {
|
|
135
139
|
"with-icon": !1,
|
|
136
|
-
value:
|
|
140
|
+
value: l.keyword,
|
|
137
141
|
type: "text",
|
|
138
142
|
class: "vui-dropdown-placeholder-label",
|
|
139
143
|
placeholder: `${o.placeholderValue}`,
|
|
@@ -141,9 +145,9 @@ function E(e, l, i, a, t, o) {
|
|
|
141
145
|
}, null, 8, ["value", "placeholder", "onInput"])
|
|
142
146
|
])
|
|
143
147
|
], 2),
|
|
144
|
-
e.toggled ? (u(),
|
|
148
|
+
e.toggled ? (u(), C(m, I({
|
|
145
149
|
key: 0,
|
|
146
|
-
value:
|
|
150
|
+
value: l.selected
|
|
147
151
|
}, e.$attrs, {
|
|
148
152
|
class: "vui-dropdown-list",
|
|
149
153
|
"group-id": e.componentGroupId,
|
|
@@ -152,34 +156,35 @@ function E(e, l, i, a, t, o) {
|
|
|
152
156
|
items: e.items,
|
|
153
157
|
"item-label": e.itemLabel,
|
|
154
158
|
"item-value": e.itemValue,
|
|
155
|
-
keyword:
|
|
159
|
+
keyword: l.keyword,
|
|
156
160
|
selectable: !0,
|
|
157
161
|
title: o.listTitle,
|
|
162
|
+
multiple: e.multiple,
|
|
158
163
|
"onUpdate:modelValue": o.onToggle
|
|
159
|
-
}),
|
|
164
|
+
}), B({ _: 2 }, [
|
|
160
165
|
e.$slots.placeholder ? {
|
|
161
166
|
name: "placeholder",
|
|
162
167
|
fn: d(() => [
|
|
163
|
-
|
|
168
|
+
s(e.$slots, "placeholder")
|
|
164
169
|
]),
|
|
165
170
|
key: "0"
|
|
166
171
|
} : void 0,
|
|
167
172
|
e.$slots["group-item"] ? {
|
|
168
173
|
name: "group-item",
|
|
169
174
|
fn: d(() => [
|
|
170
|
-
|
|
175
|
+
s(e.$slots, "group-item")
|
|
171
176
|
]),
|
|
172
177
|
key: "1"
|
|
173
178
|
} : void 0,
|
|
174
179
|
e.$slots.item ? {
|
|
175
180
|
name: "item",
|
|
176
181
|
fn: d(() => [
|
|
177
|
-
|
|
182
|
+
s(e.$slots, "item")
|
|
178
183
|
]),
|
|
179
184
|
key: "2"
|
|
180
185
|
} : void 0
|
|
181
|
-
]), 1040, ["value", "group-id", "disable-filtering", "disabled", "items", "item-label", "item-value", "keyword", "title", "onUpdate:modelValue"])) :
|
|
182
|
-
|
|
186
|
+
]), 1040, ["value", "group-id", "disable-filtering", "disabled", "items", "item-label", "item-value", "keyword", "title", "multiple", "onUpdate:modelValue"])) : L("", !0),
|
|
187
|
+
s(e.$slots, "append")
|
|
183
188
|
], 10, j);
|
|
184
189
|
}
|
|
185
190
|
const D = /* @__PURE__ */ g(T, [["render", E]]);
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { openBlock as n, createElementBlock as o, normalizeClass as
|
|
1
|
+
import { a as L } from "./animable-DnFaMPYA.js";
|
|
2
|
+
import { _ as S, c as j, t as I } from "./_plugin-vue_export-helper-BSl1dQT6.js";
|
|
3
|
+
import { openBlock as n, createElementBlock as o, normalizeClass as d, renderSlot as c, createTextVNode as b, toDisplayString as f, createCommentVNode as m, createElementVNode as y, Fragment as g, renderList as k, withModifiers as v } from "vue";
|
|
4
4
|
import "highlight.js";
|
|
5
5
|
function p(e) {
|
|
6
6
|
return e != null && typeof e == "object" && e["@@functional/placeholder"] === !0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function V(e) {
|
|
9
9
|
return function t(i) {
|
|
10
10
|
return arguments.length === 0 || p(i) ? t : e.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function C(e) {
|
|
14
14
|
return function t(i, r) {
|
|
15
15
|
switch (arguments.length) {
|
|
16
16
|
case 0:
|
|
17
17
|
return t;
|
|
18
18
|
case 1:
|
|
19
|
-
return p(i) ? t :
|
|
20
|
-
return e(i,
|
|
19
|
+
return p(i) ? t : V(function(l) {
|
|
20
|
+
return e(i, l);
|
|
21
21
|
});
|
|
22
22
|
default:
|
|
23
|
-
return p(i) && p(r) ? t : p(i) ?
|
|
24
|
-
return e(
|
|
25
|
-
}) : p(r) ?
|
|
26
|
-
return e(i,
|
|
23
|
+
return p(i) && p(r) ? t : p(i) ? V(function(l) {
|
|
24
|
+
return e(l, r);
|
|
25
|
+
}) : p(r) ? V(function(l) {
|
|
26
|
+
return e(i, l);
|
|
27
27
|
}) : e(i, r);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
var
|
|
32
|
-
for (var r = {},
|
|
33
|
-
|
|
31
|
+
var B = /* @__PURE__ */ C(function(t, i) {
|
|
32
|
+
for (var r = {}, l = {}, s = 0, a = t.length; s < a; )
|
|
33
|
+
l[t[s]] = 1, s += 1;
|
|
34
34
|
for (var u in i)
|
|
35
|
-
|
|
35
|
+
l.hasOwnProperty(u) || (r[u] = i[u]);
|
|
36
36
|
return r;
|
|
37
37
|
});
|
|
38
|
-
const
|
|
39
|
-
en:
|
|
40
|
-
fr:
|
|
38
|
+
const G = {}, A = {}, K = {
|
|
39
|
+
en: G,
|
|
40
|
+
fr: A
|
|
41
41
|
}, N = {
|
|
42
42
|
autoclose: {
|
|
43
43
|
type: Boolean,
|
|
@@ -75,6 +75,10 @@ const A = {}, B = {}, K = {
|
|
|
75
75
|
String
|
|
76
76
|
]
|
|
77
77
|
},
|
|
78
|
+
multiple: {
|
|
79
|
+
default: !1,
|
|
80
|
+
type: Boolean
|
|
81
|
+
},
|
|
78
82
|
selectable: {
|
|
79
83
|
type: Boolean
|
|
80
84
|
},
|
|
@@ -93,8 +97,8 @@ const A = {}, B = {}, K = {
|
|
|
93
97
|
}, O = {
|
|
94
98
|
name: "VuiList",
|
|
95
99
|
mixins: [
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
L,
|
|
101
|
+
j
|
|
98
102
|
],
|
|
99
103
|
props: N,
|
|
100
104
|
emits: ["update:model-value"],
|
|
@@ -102,7 +106,7 @@ const A = {}, B = {}, K = {
|
|
|
102
106
|
return {
|
|
103
107
|
last: null,
|
|
104
108
|
open: {},
|
|
105
|
-
selected: null
|
|
109
|
+
selected: this.multiple ? [] : null
|
|
106
110
|
};
|
|
107
111
|
},
|
|
108
112
|
computed: {
|
|
@@ -136,8 +140,8 @@ const A = {}, B = {}, K = {
|
|
|
136
140
|
autoexpand() {
|
|
137
141
|
this.open = this.items.reduce((e, t, i) => {
|
|
138
142
|
if (this.isGroup(t)) {
|
|
139
|
-
const
|
|
140
|
-
if (this.expanded ||
|
|
143
|
+
const l = t[this.itemValue].findIndex((s) => this.isSelected(s));
|
|
144
|
+
if (this.expanded || l > -1)
|
|
141
145
|
return { ...e, [i]: !0 };
|
|
142
146
|
}
|
|
143
147
|
return e;
|
|
@@ -155,7 +159,7 @@ const A = {}, B = {}, K = {
|
|
|
155
159
|
return this.isGroup(e) ? typeof e[t][0] == "object" : typeof e == "object";
|
|
156
160
|
},
|
|
157
161
|
isSelected(e) {
|
|
158
|
-
return !e.disabled && typeof this.selected < "u" ? typeof e == "object" ? this.selected && this.selected[this.itemValue] === e[this.itemValue] : this.selected && this.selected === e : !1;
|
|
162
|
+
return !e.disabled && typeof this.selected < "u" ? this.multiple ? typeof this.selected.find((i) => typeof e == "object" ? i && i[this.itemValue] === e[this.itemValue] : i && i === e) < "u" : typeof e == "object" ? this.selected && this.selected[this.itemValue] === e[this.itemValue] : this.selected && this.selected === e : !1;
|
|
159
163
|
},
|
|
160
164
|
isToggled(e) {
|
|
161
165
|
const { last: t, open: i, toggled: r } = this;
|
|
@@ -170,8 +174,13 @@ const A = {}, B = {}, K = {
|
|
|
170
174
|
},
|
|
171
175
|
onClick(e) {
|
|
172
176
|
if (!this.disabled && this.selectable) {
|
|
173
|
-
const t =
|
|
174
|
-
|
|
177
|
+
const t = B(["$$id"], e), i = this.isObject(t) && this.hasAttribute("return-object") ? t : t[this.itemValue];
|
|
178
|
+
if (this.multiple) {
|
|
179
|
+
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];
|
|
180
|
+
this.selected = r, this.$emit("update:model-value", this.selected);
|
|
181
|
+
} else
|
|
182
|
+
this.selected = this.isSelected(t) ? null : t, this.$emit("update:model-value", i);
|
|
183
|
+
t.route && this.$router.push(t.route);
|
|
175
184
|
}
|
|
176
185
|
},
|
|
177
186
|
onToggle(e) {
|
|
@@ -182,10 +191,10 @@ const A = {}, B = {}, K = {
|
|
|
182
191
|
key: 0,
|
|
183
192
|
class: "vui-list-title"
|
|
184
193
|
}, F = { class: "vui-list-items" }, E = ["onClick"], M = ["onClick"], P = ["onClick"];
|
|
185
|
-
function q(e, t, i, r,
|
|
194
|
+
function q(e, t, i, r, l, s) {
|
|
186
195
|
return n(), o("div", {
|
|
187
196
|
id: e.componentId,
|
|
188
|
-
class:
|
|
197
|
+
class: d([
|
|
189
198
|
"vui-list",
|
|
190
199
|
{ "vui-list--flat": e.hasAttribute("flat") },
|
|
191
200
|
e.$props.class
|
|
@@ -194,84 +203,84 @@ function q(e, t, i, r, a, s) {
|
|
|
194
203
|
c(e.$slots, "prepend"),
|
|
195
204
|
e.title ? (n(), o("div", $, [
|
|
196
205
|
c(e.$slots, "placeholder", { item: e.title }, () => [
|
|
197
|
-
f(
|
|
206
|
+
b(f(e.title), 1)
|
|
198
207
|
])
|
|
199
208
|
])) : m("", !0),
|
|
200
|
-
|
|
201
|
-
(n(!0), o(
|
|
202
|
-
key:
|
|
203
|
-
class:
|
|
204
|
-
{ "vui-list-items-item": !s.isGroup(
|
|
205
|
-
{ "vui-list-items-group-item": s.isGroup(
|
|
209
|
+
y("div", F, [
|
|
210
|
+
(n(!0), o(g, null, k(s.list, (a, u) => (n(), o("div", {
|
|
211
|
+
key: a.$$id,
|
|
212
|
+
class: d([
|
|
213
|
+
{ "vui-list-items-item": !s.isGroup(a) },
|
|
214
|
+
{ "vui-list-items-group-item": s.isGroup(a) }
|
|
206
215
|
])
|
|
207
216
|
}, [
|
|
208
|
-
s.isGroup(
|
|
217
|
+
s.isGroup(a) ? m("", !0) : (n(), o("div", {
|
|
209
218
|
key: 0,
|
|
210
|
-
class:
|
|
211
|
-
{ "vui-list-items-item-label": !s.isGroup(
|
|
219
|
+
class: d([
|
|
220
|
+
{ "vui-list-items-item-label": !s.isGroup(a) },
|
|
212
221
|
{ "vui-list-items-item-label--selectable": e.selectable },
|
|
213
|
-
{ "vui-list-items-item-label--selected": s.isSelected(
|
|
222
|
+
{ "vui-list-items-item-label--selected": s.isSelected(a) }
|
|
214
223
|
]),
|
|
215
|
-
onClick: () => s.onClick(
|
|
224
|
+
onClick: v(() => s.onClick(a), ["stop"])
|
|
216
225
|
}, [
|
|
217
|
-
l.icon ? (n(), o("i", {
|
|
218
|
-
key: 0,
|
|
219
|
-
class: h([
|
|
220
|
-
"vui-list-items-item-label-icon",
|
|
221
|
-
l.icon
|
|
222
|
-
])
|
|
223
|
-
}, null, 2)) : m("", !0),
|
|
224
226
|
c(e.$slots, "item", {
|
|
225
227
|
index: u,
|
|
226
|
-
item:
|
|
228
|
+
item: a,
|
|
227
229
|
itemLabel: e.itemLabel,
|
|
228
230
|
itemValue: e.itemValue
|
|
229
231
|
}, () => [
|
|
230
|
-
|
|
232
|
+
a.icon ? (n(), o("i", {
|
|
233
|
+
key: 0,
|
|
234
|
+
class: d([
|
|
235
|
+
"vui-list-items-item-label-icon",
|
|
236
|
+
a.icon
|
|
237
|
+
])
|
|
238
|
+
}, null, 2)) : m("", !0),
|
|
239
|
+
y("span", null, f(a[e.itemLabel]), 1)
|
|
231
240
|
])
|
|
232
241
|
], 10, E)),
|
|
233
|
-
s.isGroup(
|
|
234
|
-
|
|
235
|
-
class:
|
|
242
|
+
s.isGroup(a) ? (n(), o(g, { key: 1 }, [
|
|
243
|
+
y("div", {
|
|
244
|
+
class: d([
|
|
236
245
|
"vui-list-items-item-group-label",
|
|
237
246
|
{ "vui-list-items-item-group-label--toggled": s.isToggled(u) },
|
|
238
247
|
{ "vui-list-items-item-group-label--animating": s.isAnimating(u) },
|
|
239
|
-
{ "vui-list-items-item-group-label--open":
|
|
248
|
+
{ "vui-list-items-item-group-label--open": l.open[u] || s.hasKeyword }
|
|
240
249
|
]),
|
|
241
|
-
onClick:
|
|
250
|
+
onClick: v(() => s.onToggle(u), ["stop"])
|
|
242
251
|
}, [
|
|
243
252
|
c(e.$slots, "group-item", {
|
|
244
253
|
index: u,
|
|
245
|
-
item:
|
|
254
|
+
item: a,
|
|
246
255
|
itemLabel: e.itemLabel,
|
|
247
256
|
itemValue: e.itemValue
|
|
248
257
|
}, () => [
|
|
249
|
-
f(
|
|
258
|
+
b(f(a[e.itemLabel]), 1)
|
|
250
259
|
])
|
|
251
260
|
], 10, M),
|
|
252
|
-
|
|
253
|
-
key:
|
|
254
|
-
class:
|
|
261
|
+
l.open[u] || s.hasKeyword ? (n(!0), o(g, { key: 0 }, k(a[e.itemValue], (h, w) => (n(), o("div", {
|
|
262
|
+
key: h.$$id,
|
|
263
|
+
class: d([
|
|
255
264
|
"vui-list-items-item-label",
|
|
256
265
|
{ "vui-list-items-item-label--selectable": e.selectable },
|
|
257
|
-
{ "vui-list-items-item-label--selected": s.isSelected(
|
|
266
|
+
{ "vui-list-items-item-label--selected": s.isSelected(h) }
|
|
258
267
|
]),
|
|
259
|
-
onClick: () => s.onClick(
|
|
268
|
+
onClick: v(() => s.onClick(h), ["stop"])
|
|
260
269
|
}, [
|
|
261
|
-
d.icon ? (n(), o("i", {
|
|
262
|
-
key: 0,
|
|
263
|
-
class: h([
|
|
264
|
-
"vui-list-items-item-label-icon",
|
|
265
|
-
d.icon
|
|
266
|
-
])
|
|
267
|
-
}, null, 2)) : m("", !0),
|
|
268
270
|
c(e.$slots, "item", {
|
|
269
|
-
index:
|
|
270
|
-
item:
|
|
271
|
+
index: w,
|
|
272
|
+
item: h,
|
|
271
273
|
itemLabel: e.itemLabel,
|
|
272
274
|
itemValue: e.itemValue
|
|
273
275
|
}, () => [
|
|
274
|
-
|
|
276
|
+
h.icon ? (n(), o("i", {
|
|
277
|
+
key: 0,
|
|
278
|
+
class: d([
|
|
279
|
+
"vui-list-items-item-label-icon",
|
|
280
|
+
h.icon
|
|
281
|
+
])
|
|
282
|
+
}, null, 2)) : m("", !0),
|
|
283
|
+
b(" " + f(h[e.itemLabel]), 1)
|
|
275
284
|
])
|
|
276
285
|
], 10, P))), 128)) : m("", !0)
|
|
277
286
|
], 64)) : m("", !0)
|
|
@@ -280,7 +289,7 @@ function q(e, t, i, r, a, s) {
|
|
|
280
289
|
c(e.$slots, "append")
|
|
281
290
|
], 10, T);
|
|
282
291
|
}
|
|
283
|
-
const Q = /* @__PURE__ */
|
|
292
|
+
const Q = /* @__PURE__ */ S(O, [["render", q]]);
|
|
284
293
|
export {
|
|
285
294
|
Q as default
|
|
286
295
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./animable-ChJEXlsE.js"),m=require("./_plugin-vue_export-helper-DeDoBcDj.js"),t=require("vue");require("highlight.js");function c(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function d(e){return function i(l){return arguments.length===0||c(l)?i:e.apply(this,arguments)}}function f(e){return function i(l,a){switch(arguments.length){case 0:return i;case 1:return c(l)?i:d(function(r){return e(l,r)});default:return c(l)&&c(a)?i:c(l)?d(function(r){return e(r,a)}):c(a)?d(function(r){return e(l,r)}):e(l,a)}}}var b=f(function(i,l){for(var a={},r={},s=0,o=i.length;s<o;)r[i[s]]=1,s+=1;for(var n in l)r.hasOwnProperty(n)||(a[n]=l[n]);return a});const y={},g={},k={en:y,fr:g},V={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]}},v={name:"VuiList",mixins:[p.animable,m.composable],props:V,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,i)=>(this.isGroup(i)?e.push({...i,$$id:this.newId(),value:i[this.itemValue].reduce((l,a)=>!this.hasKeyword||this.match(a)?[...l,this.mapItem(a,this.newId())]:l,[])}):(!this.hasKeyword||this.match(i))&&e.push(this.mapItem(i,this.newId())),e),[])}},watch:{items(){this.autoexpand()},modelValue(e){this.selected=this.mapItem(e)},value(e){this.selected=this.mapItem(e)}},created(){m.translatable(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,i,l)=>{if(this.isGroup(i)){const r=i[this.itemValue].findIndex(s=>this.isSelected(s));if(this.expanded||r>-1)return{...e,[l]:!0}}return e},{})},isAnimating(e){const{animating:i,last:l}=this;return l===e&&i},isGroup(e){return Array.isArray(e==null?void 0:e[this.itemValue])},isObject(e){const i=this.itemValue;return this.isGroup(e)?typeof e[i][0]=="object":typeof e=="object"},isSelected(e){return!e.disabled&&typeof this.selected<"u"?this.multiple?typeof this.selected.find(l=>typeof e=="object"?l&&l[this.itemValue]===e[this.itemValue]:l&&l===e)<"u":typeof e=="object"?this.selected&&this.selected[this.itemValue]===e[this.itemValue]:this.selected&&this.selected===e:!1},isToggled(e){const{last:i,open:l,toggled:a}=this;return i===e&&l[e]&&a},match(e){return typeof e=="object"?`${e[this.itemLabel]}`.includes(this.keyword):`${e}`.includes(this.keyword)},mapItem(e,i){const l=typeof e=="object"?e:{[this.itemLabel]:e,[this.itemValue]:e};return i?{...l,$$id:i}:l},onClick(e){if(!this.disabled&&this.selectable){const i=b(["$$id"],e),l=this.isObject(i)&&this.hasAttribute("return-object")?i:i[this.itemValue];if(this.multiple){const a=this.isSelected(i)?this.selected.filter(r=>typeof i=="object"?r&&r[this.itemValue]!==i[this.itemValue]:r&&r!==i):[...this.selected,i];this.selected=a,this.$emit("update:model-value",this.selected)}else this.selected=this.isSelected(i)?null:i,this.$emit("update:model-value",l);i.route&&this.$router.push(i.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]))}}},B=["id"],S={key:0,class:"vui-list-title"},C={class:"vui-list-items"},w=["onClick"],L=["onClick"],N=["onClick"];function j(e,i,l,a,r,s){return t.openBlock(),t.createElementBlock("div",{id:e.componentId,class:t.normalizeClass(["vui-list",{"vui-list--flat":e.hasAttribute("flat")},e.$props.class])},[t.renderSlot(e.$slots,"prepend"),e.title?(t.openBlock(),t.createElementBlock("div",S,[t.renderSlot(e.$slots,"placeholder",{item:e.title},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])])):t.createCommentVNode("",!0),t.createElementVNode("div",C,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.list,(o,n)=>(t.openBlock(),t.createElementBlock("div",{key:o.$$id,class:t.normalizeClass([{"vui-list-items-item":!s.isGroup(o)},{"vui-list-items-group-item":s.isGroup(o)}])},[s.isGroup(o)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([{"vui-list-items-item-label":!s.isGroup(o)},{"vui-list-items-item-label--selectable":e.selectable},{"vui-list-items-item-label--selected":s.isSelected(o)}]),onClick:t.withModifiers(()=>s.onClick(o),["stop"])},[t.renderSlot(e.$slots,"item",{index:n,item:o,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[o.icon?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["vui-list-items-item-label-icon",o.icon])},null,2)):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(o[e.itemLabel]),1)])],10,w)),s.isGroup(o)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",{class:t.normalizeClass(["vui-list-items-item-group-label",{"vui-list-items-item-group-label--toggled":s.isToggled(n)},{"vui-list-items-item-group-label--animating":s.isAnimating(n)},{"vui-list-items-item-group-label--open":r.open[n]||s.hasKeyword}]),onClick:t.withModifiers(()=>s.onToggle(n),["stop"])},[t.renderSlot(e.$slots,"group-item",{index:n,item:o,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[t.createTextVNode(t.toDisplayString(o[e.itemLabel]),1)])],10,L),r.open[n]||s.hasKeyword?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o[e.itemValue],(u,h)=>(t.openBlock(),t.createElementBlock("div",{key:u.$$id,class:t.normalizeClass(["vui-list-items-item-label",{"vui-list-items-item-label--selectable":e.selectable},{"vui-list-items-item-label--selected":s.isSelected(u)}]),onClick:t.withModifiers(()=>s.onClick(u),["stop"])},[t.renderSlot(e.$slots,"item",{index:h,item:u,itemLabel:e.itemLabel,itemValue:e.itemValue},()=>[u.icon?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(["vui-list-items-item-label-icon",u.icon])},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(u[e.itemLabel]),1)])],10,N))),128)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2))),128))]),t.renderSlot(e.$slots,"append")],10,B)}const E=m._export_sfc(v,[["render",j]]);exports.default=E;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./list-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./list-D6Ab_PXR.js"),i=require("./_plugin-vue_export-helper-DeDoBcDj.js"),e=require("vue");require("highlight.js");const p={},v={},f={en:p,fr:v},h={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]}},b={name:"VuiNav",components:{VuiList:m.default},mixins:[i.composable],props:h,emits:["update:model-value"],data(){return{selected:null}},watch:{modelValue(t){this.selected=t},value(t){this.selected=t}},created(){i.translatable(f),this.hasModelValue?this.selected=this.modelValue:this.hasValue&&(this.selected=this.value)},methods:{onClick(t){this.disabled||this.$emit("update:model-value",t)}}},V=["id"],k={key:1,class:"vui-list-items-item-label-text"};function y(t,n,B,C,r,u){const d=e.resolveComponent("router-link"),c=e.resolveComponent("vui-list");return e.openBlock(),e.createElementBlock("div",{id:t.componentId,class:e.normalizeClass(["vui-nav",{"vui-nav--flat":t.hasAttribute("flat")},t.$props.class])},[e.renderSlot(t.$slots,"prepend"),e.createVNode(c,{modelValue:r.selected,"onUpdate:modelValue":[n[0]||(n[0]=o=>r.selected=o),u.onClick],class:"vui-nav-list","group-id":t.componentGroupId,disabled:t.disabled,"item-label":t.itemLabel,"item-value":t.itemValue,items:t.items,selectable:!t.disabled},{item:e.withCtx(({index:o,item:l,itemValue:s,itemLabel:a})=>[e.renderSlot(t.$slots,"item",{index:o,item:l,itemLabel:a,itemValue:s},()=>[t.showIcons?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["fa-solid",{"fa-location-dot":!o},{"fa-chevron-right":o}])},null,2)):e.createCommentVNode("",!0),l.route?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",k,e.toDisplayString(s?l[a]:l),1)),l.route?(e.openBlock(),e.createBlock(d,{key:2,to:l.route,class:"vui-list-items-item-label-text"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s?l[a]:l),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)])]),_:3},8,["modelValue","group-id","disabled","item-label","item-value","items","selectable","onUpdate:modelValue"]),e.renderSlot(t.$slots,"append")],10,V)}const g=i._export_sfc(b,[["render",y]]);exports.default=g;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import V from "./list-
|
|
1
|
+
import V from "./list-B2RmfvYJ.js";
|
|
2
2
|
import { _ as y, c as k, t as g } from "./_plugin-vue_export-helper-BSl1dQT6.js";
|
|
3
3
|
import { resolveComponent as m, openBlock as s, createElementBlock as i, normalizeClass as c, renderSlot as n, createVNode as N, withCtx as p, createCommentVNode as r, toDisplayString as f, createBlock as B, createTextVNode as C } from "vue";
|
|
4
4
|
import "highlight.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nav-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nav-DSozAFxm.js"),g=require("./button-D5bD4vAv.js"),c=require("./animable-ChJEXlsE.js"),i=require("./_plugin-vue_export-helper-DeDoBcDj.js"),e=require("vue");require("highlight.js");const m={"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"},h={},f={en:m,fr:h},b={count:{type:Number,default:0},modelValue:{default:void 0,type:Number},value:{default:void 0,type:Number},size:{type:Number,default:25}},v={name:"VuiPager",components:{VuiButton:g.default,VuiNav:u.default},mixins:[c.animable,i.composable],props:b,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 t=[...Array.from({length:this.last},(r,o)=>o+1)],a=t.slice(0,this.page),l=t.slice(this.page,t.length);return[...a.slice(-(l.length>2?2:2+(2-l.length))),...l.slice(0,a.length>2?2:2+(2-a.length))]}return[]}},watch:{modelValue(t){this.page=t},value(t){this.page=t}},created(){i.translatable(f),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)}}},V=["id"],N={class:"vui-pager-content"};function P(t,a,l,r,o,s){const n=e.resolveComponent("vui-button"),p=e.resolveComponent("vui-nav");return e.openBlock(),e.createElementBlock("div",{id:t.componentId,class:e.normalizeClass(["vui-pager",t.$props.class])},[e.renderSlot(t.$slots,"prepend"),e.createElementVNode("div",N,[e.renderSlot(t.$slots,"first",{},()=>[e.createVNode(n,e.mergeProps(t.$attrs,{disabled:o.page===1,icon:"fa-solid fa-angles-left",class:"vui-button--first",onClick:s.onFirst}),null,16,["disabled","onClick"])]),e.renderSlot(t.$slots,"previous",{},()=>[e.createVNode(n,e.mergeProps(t.$attrs,{disabled:o.page===1,icon:"fa-solid fa-chevron-left",class:"vui-button--previous",onClick:s.onPrevious}),null,16,["disabled","onClick"])]),e.renderSlot(t.$slots,"pages",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["ellipse",{visible:s.last>4&&o.page+2>4}])}," ... ",2),e.createVNode(p,e.mergeProps({modelValue:o.page,"onUpdate:modelValue":a[0]||(a[0]=d=>o.page=d)},t.$attrs,{flat:t.hasAttribute("flat"),items:s.pages,"show-icons":!1,"onUpdate:modelValue":s.onPage}),null,16,["modelValue","flat","items","onUpdate:modelValue"]),e.createElementVNode("div",{class:e.normalizeClass(["ellipse",{visible:s.last>4&&o.page+2<s.last}])}," ... ",2)]),e.renderSlot(t.$slots,"next",{},()=>[e.createVNode(n,e.mergeProps(t.$attrs,{disabled:s.isLast,icon:"fa-solid fa-chevron-right",class:"vui-button--next",onClick:s.onNext}),null,16,["disabled","onClick"])]),e.renderSlot(t.$slots,"previous",{},()=>[e.createVNode(n,e.mergeProps(t.$attrs,{disabled:s.isLast,icon:"fa-solid fa-angles-right",class:"vui-button--last",onClick:s.onLast}),null,16,["disabled","onClick"])])]),e.renderSlot(t.$slots,"append")],10,V)}const S=i._export_sfc(v,[["render",P]]);exports.default=S;
|