primevue 3.22.1 → 3.22.2
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/core/core.js +15 -12
- package/core/core.min.js +2 -2
- package/divider/Divider.vue +1 -1
- package/divider/divider.cjs.js +1 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/divider/divider.min.js +1 -1
- package/menu/Menu.vue +1 -1
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/package.json +1 -1
- package/paginator/JumpToPageInput.vue +11 -8
- package/paginator/Paginator.vue +1 -1
- package/paginator/paginator.cjs.js +14 -11
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +14 -11
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +14 -11
- package/paginator/paginator.min.js +1 -1
- package/rating/Rating.vue +1 -0
- package/rating/rating.cjs.js +1 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +1 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +1 -1
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +1 -0
- package/resources/primevue.min.css +1 -1
- package/sidebar/Sidebar.vue +60 -51
- package/sidebar/sidebar.cjs.js +123 -103
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +124 -104
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +123 -103
- package/sidebar/sidebar.min.js +1 -1
- package/web-types.json +1 -1
package/rating/rating.cjs.js
CHANGED
|
@@ -211,7 +211,7 @@ function styleInject(css, ref) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
var css_248z = "\n.p-rating {\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
|
|
214
|
+
var css_248z = "\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
|
|
215
215
|
styleInject(css_248z);
|
|
216
216
|
|
|
217
217
|
script.render = render;
|
package/rating/rating.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),n=require("vue"),a={name:"Rating",emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:"pi pi-star-fill"},offIcon:{type:String,default:"pi pi-star"},cancelIcon:{type:String,default:"pi pi-ban"}},data:()=>({focusedOptionIndex:-1}),methods:{onOptionClick(n,a){if(!this.readonly&&!this.disabled){this.onOptionSelect(n,a);const l=e.DomHandler.getFirstFocusableElement(n.currentTarget);l&&e.DomHandler.focus(l)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]},cancelIconClass(){return["p-rating-icon p-rating-cancel",this.cancelIcon]},onIconClass(){return["p-rating-icon",this.onIcon]},offIconClass(){return["p-rating-icon",this.offIcon]},name(){return this.$attrs.name||e.UniqueComponentId()}}};const l={class:"p-hidden-accessible"},t=["name","checked","disabled","readonly","aria-label"],o=["onClick"],i={class:"p-hidden-accessible"},s=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];!function(e,n){void 0===n&&(n={});var a=n.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===a&&l.firstChild?l.insertBefore(t,l.firstChild):l.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}}("\n.p-rating {\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),a.render=function(e,a,r,c,d,u){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(u.containerClass)},[r.cancel?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["p-rating-item p-rating-cancel-item",{"p-focus":0===d.focusedOptionIndex}]),onClick:a[3]||(a[3]=e=>u.onOptionClick(e,0))},[n.createElementVNode("span",l,[n.createElementVNode("input",{type:"radio",value:"0",name:u.name,checked:0===r.modelValue,disabled:r.disabled,readonly:r.readonly,"aria-label":u.cancelAriaLabel(),onFocus:a[0]||(a[0]=e=>u.onFocus(e,0)),onBlur:a[1]||(a[1]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:a[2]||(a[2]=e=>u.onChange(e,0))},null,40,t)]),n.renderSlot(e.$slots,"cancelicon",{},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.cancelIconClass)},null,2)]))],2)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.stars,(l=>(n.openBlock(),n.createElementBlock("div",{key:l,class:n.normalizeClass(["p-rating-item",{"p-rating-item-active":l<=r.modelValue,"p-focus":l===d.focusedOptionIndex}]),onClick:e=>u.onOptionClick(e,l)},[n.createElementVNode("span",i,[n.createElementVNode("input",{type:"radio",value:l,name:u.name,checked:r.modelValue===l,disabled:r.disabled,readonly:r.readonly,"aria-label":u.starAriaLabel(l),onFocus:e=>u.onFocus(e,l),onBlur:a[4]||(a[4]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:e=>u.onChange(e,l)},null,40,s)]),l<=r.modelValue?n.renderSlot(e.$slots,"onicon",{key:0,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.onIconClass)},null,2)])):n.renderSlot(e.$slots,"officon",{key:1,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.offIconClass)},null,2)]))],10,o)))),128))],2)},module.exports=a;
|
|
1
|
+
"use strict";var e=require("primevue/utils"),n=require("vue"),a={name:"Rating",emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:"pi pi-star-fill"},offIcon:{type:String,default:"pi pi-star"},cancelIcon:{type:String,default:"pi pi-ban"}},data:()=>({focusedOptionIndex:-1}),methods:{onOptionClick(n,a){if(!this.readonly&&!this.disabled){this.onOptionSelect(n,a);const l=e.DomHandler.getFirstFocusableElement(n.currentTarget);l&&e.DomHandler.focus(l)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]},cancelIconClass(){return["p-rating-icon p-rating-cancel",this.cancelIcon]},onIconClass(){return["p-rating-icon",this.onIcon]},offIconClass(){return["p-rating-icon",this.offIcon]},name(){return this.$attrs.name||e.UniqueComponentId()}}};const l={class:"p-hidden-accessible"},t=["name","checked","disabled","readonly","aria-label"],o=["onClick"],i={class:"p-hidden-accessible"},s=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];!function(e,n){void 0===n&&(n={});var a=n.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===a&&l.firstChild?l.insertBefore(t,l.firstChild):l.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}}("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),a.render=function(e,a,r,c,d,u){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(u.containerClass)},[r.cancel?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["p-rating-item p-rating-cancel-item",{"p-focus":0===d.focusedOptionIndex}]),onClick:a[3]||(a[3]=e=>u.onOptionClick(e,0))},[n.createElementVNode("span",l,[n.createElementVNode("input",{type:"radio",value:"0",name:u.name,checked:0===r.modelValue,disabled:r.disabled,readonly:r.readonly,"aria-label":u.cancelAriaLabel(),onFocus:a[0]||(a[0]=e=>u.onFocus(e,0)),onBlur:a[1]||(a[1]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:a[2]||(a[2]=e=>u.onChange(e,0))},null,40,t)]),n.renderSlot(e.$slots,"cancelicon",{},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.cancelIconClass)},null,2)]))],2)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.stars,(l=>(n.openBlock(),n.createElementBlock("div",{key:l,class:n.normalizeClass(["p-rating-item",{"p-rating-item-active":l<=r.modelValue,"p-focus":l===d.focusedOptionIndex}]),onClick:e=>u.onOptionClick(e,l)},[n.createElementVNode("span",i,[n.createElementVNode("input",{type:"radio",value:l,name:u.name,checked:r.modelValue===l,disabled:r.disabled,readonly:r.readonly,"aria-label":u.starAriaLabel(l),onFocus:e=>u.onFocus(e,l),onBlur:a[4]||(a[4]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:e=>u.onChange(e,l)},null,40,s)]),l<=r.modelValue?n.renderSlot(e.$slots,"onicon",{key:0,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.onIconClass)},null,2)])):n.renderSlot(e.$slots,"officon",{key:1,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.offIconClass)},null,2)]))],10,o)))),128))],2)},module.exports=a;
|
package/rating/rating.esm.js
CHANGED
|
@@ -209,7 +209,7 @@ function styleInject(css, ref) {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
var css_248z = "\n.p-rating {\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
|
|
212
|
+
var css_248z = "\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
|
|
213
213
|
styleInject(css_248z);
|
|
214
214
|
|
|
215
215
|
script.render = render;
|
package/rating/rating.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DomHandler as e,UniqueComponentId as n}from"primevue/utils";import{openBlock as a,createElementBlock as
|
|
1
|
+
import{DomHandler as e,UniqueComponentId as n}from"primevue/utils";import{openBlock as a,createElementBlock as t,normalizeClass as l,createElementVNode as i,renderSlot as o,createCommentVNode as s,Fragment as c,renderList as r}from"vue";var d={name:"Rating",emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:"pi pi-star-fill"},offIcon:{type:String,default:"pi pi-star"},cancelIcon:{type:String,default:"pi pi-ban"}},data:()=>({focusedOptionIndex:-1}),methods:{onOptionClick(n,a){if(!this.readonly&&!this.disabled){this.onOptionSelect(n,a);const t=e.getFirstFocusableElement(n.currentTarget);t&&e.focus(t)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]},cancelIconClass(){return["p-rating-icon p-rating-cancel",this.cancelIcon]},onIconClass(){return["p-rating-icon",this.onIcon]},offIconClass(){return["p-rating-icon",this.offIcon]},name(){return this.$attrs.name||n()}}};const u={class:"p-hidden-accessible"},p=["name","checked","disabled","readonly","aria-label"],m=["onClick"],f={class:"p-hidden-accessible"},h=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];!function(e,n){void 0===n&&(n={});var a=n.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===a&&t.firstChild?t.insertBefore(l,t.firstChild):t.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),d.render=function(e,n,d,g,y,b){return a(),t("div",{class:l(b.containerClass)},[d.cancel?(a(),t("div",{key:0,class:l(["p-rating-item p-rating-cancel-item",{"p-focus":0===y.focusedOptionIndex}]),onClick:n[3]||(n[3]=e=>b.onOptionClick(e,0))},[i("span",u,[i("input",{type:"radio",value:"0",name:b.name,checked:0===d.modelValue,disabled:d.disabled,readonly:d.readonly,"aria-label":b.cancelAriaLabel(),onFocus:n[0]||(n[0]=e=>b.onFocus(e,0)),onBlur:n[1]||(n[1]=(...e)=>b.onBlur&&b.onBlur(...e)),onChange:n[2]||(n[2]=e=>b.onChange(e,0))},null,40,p)]),o(e.$slots,"cancelicon",{},(()=>[i("span",{class:l(b.cancelIconClass)},null,2)]))],2)):s("",!0),(a(!0),t(c,null,r(d.stars,(s=>(a(),t("div",{key:s,class:l(["p-rating-item",{"p-rating-item-active":s<=d.modelValue,"p-focus":s===y.focusedOptionIndex}]),onClick:e=>b.onOptionClick(e,s)},[i("span",f,[i("input",{type:"radio",value:s,name:b.name,checked:d.modelValue===s,disabled:d.disabled,readonly:d.readonly,"aria-label":b.starAriaLabel(s),onFocus:e=>b.onFocus(e,s),onBlur:n[4]||(n[4]=(...e)=>b.onBlur&&b.onBlur(...e)),onChange:e=>b.onChange(e,s)},null,40,h)]),s<=d.modelValue?o(e.$slots,"onicon",{key:0,value:s},(()=>[i("span",{class:l(b.onIconClass)},null,2)])):o(e.$slots,"officon",{key:1,value:s},(()=>[i("span",{class:l(b.offIconClass)},null,2)]))],10,m)))),128))],2)};export{d as default};
|
package/rating/rating.js
CHANGED
|
@@ -210,7 +210,7 @@ this.primevue.rating = (function (utils, vue) {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
var css_248z = "\n.p-rating {\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
|
|
213
|
+
var css_248z = "\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
|
|
214
214
|
styleInject(css_248z);
|
|
215
215
|
|
|
216
216
|
script.render = render;
|
package/rating/rating.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.rating=function(e,n){"use strict";var a={name:"Rating",emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:"pi pi-star-fill"},offIcon:{type:String,default:"pi pi-star"},cancelIcon:{type:String,default:"pi pi-ban"}},data:()=>({focusedOptionIndex:-1}),methods:{onOptionClick(n,a){if(!this.readonly&&!this.disabled){this.onOptionSelect(n,a);const l=e.DomHandler.getFirstFocusableElement(n.currentTarget);l&&e.DomHandler.focus(l)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]},cancelIconClass(){return["p-rating-icon p-rating-cancel",this.cancelIcon]},onIconClass(){return["p-rating-icon",this.onIcon]},offIconClass(){return["p-rating-icon",this.offIcon]},name(){return this.$attrs.name||e.UniqueComponentId()}}};const l={class:"p-hidden-accessible"},t=["name","checked","disabled","readonly","aria-label"],o=["onClick"],i={class:"p-hidden-accessible"},s=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];return function(e,n){void 0===n&&(n={});var a=n.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===a&&l.firstChild?l.insertBefore(t,l.firstChild):l.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}}("\n.p-rating {\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),a.render=function(e,a,r,c,d,u){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(u.containerClass)},[r.cancel?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["p-rating-item p-rating-cancel-item",{"p-focus":0===d.focusedOptionIndex}]),onClick:a[3]||(a[3]=e=>u.onOptionClick(e,0))},[n.createElementVNode("span",l,[n.createElementVNode("input",{type:"radio",value:"0",name:u.name,checked:0===r.modelValue,disabled:r.disabled,readonly:r.readonly,"aria-label":u.cancelAriaLabel(),onFocus:a[0]||(a[0]=e=>u.onFocus(e,0)),onBlur:a[1]||(a[1]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:a[2]||(a[2]=e=>u.onChange(e,0))},null,40,t)]),n.renderSlot(e.$slots,"cancelicon",{},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.cancelIconClass)},null,2)]))],2)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.stars,(l=>(n.openBlock(),n.createElementBlock("div",{key:l,class:n.normalizeClass(["p-rating-item",{"p-rating-item-active":l<=r.modelValue,"p-focus":l===d.focusedOptionIndex}]),onClick:e=>u.onOptionClick(e,l)},[n.createElementVNode("span",i,[n.createElementVNode("input",{type:"radio",value:l,name:u.name,checked:r.modelValue===l,disabled:r.disabled,readonly:r.readonly,"aria-label":u.starAriaLabel(l),onFocus:e=>u.onFocus(e,l),onBlur:a[4]||(a[4]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:e=>u.onChange(e,l)},null,40,s)]),l<=r.modelValue?n.renderSlot(e.$slots,"onicon",{key:0,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.onIconClass)},null,2)])):n.renderSlot(e.$slots,"officon",{key:1,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.offIconClass)},null,2)]))],10,o)))),128))],2)},a}(primevue.utils,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.rating=function(e,n){"use strict";var a={name:"Rating",emits:["update:modelValue","change","focus","blur"],props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:"pi pi-star-fill"},offIcon:{type:String,default:"pi pi-star"},cancelIcon:{type:String,default:"pi pi-ban"}},data:()=>({focusedOptionIndex:-1}),methods:{onOptionClick(n,a){if(!this.readonly&&!this.disabled){this.onOptionSelect(n,a);const l=e.DomHandler.getFirstFocusableElement(n.currentTarget);l&&e.DomHandler.focus(l)}},onFocus(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange(e,n){this.onOptionSelect(e,n)},onOptionSelect(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel(){return this.$primevue.config.locale.clear},starAriaLabel(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},computed:{containerClass(){return["p-rating",{"p-readonly":this.readonly,"p-disabled":this.disabled}]},cancelIconClass(){return["p-rating-icon p-rating-cancel",this.cancelIcon]},onIconClass(){return["p-rating-icon",this.onIcon]},offIconClass(){return["p-rating-icon",this.offIcon]},name(){return this.$attrs.name||e.UniqueComponentId()}}};const l={class:"p-hidden-accessible"},t=["name","checked","disabled","readonly","aria-label"],o=["onClick"],i={class:"p-hidden-accessible"},s=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];return function(e,n){void 0===n&&(n={});var a=n.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css","top"===a&&l.firstChild?l.insertBefore(t,l.firstChild):l.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}}("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n"),a.render=function(e,a,r,c,d,u){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(u.containerClass)},[r.cancel?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["p-rating-item p-rating-cancel-item",{"p-focus":0===d.focusedOptionIndex}]),onClick:a[3]||(a[3]=e=>u.onOptionClick(e,0))},[n.createElementVNode("span",l,[n.createElementVNode("input",{type:"radio",value:"0",name:u.name,checked:0===r.modelValue,disabled:r.disabled,readonly:r.readonly,"aria-label":u.cancelAriaLabel(),onFocus:a[0]||(a[0]=e=>u.onFocus(e,0)),onBlur:a[1]||(a[1]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:a[2]||(a[2]=e=>u.onChange(e,0))},null,40,t)]),n.renderSlot(e.$slots,"cancelicon",{},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.cancelIconClass)},null,2)]))],2)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.stars,(l=>(n.openBlock(),n.createElementBlock("div",{key:l,class:n.normalizeClass(["p-rating-item",{"p-rating-item-active":l<=r.modelValue,"p-focus":l===d.focusedOptionIndex}]),onClick:e=>u.onOptionClick(e,l)},[n.createElementVNode("span",i,[n.createElementVNode("input",{type:"radio",value:l,name:u.name,checked:r.modelValue===l,disabled:r.disabled,readonly:r.readonly,"aria-label":u.starAriaLabel(l),onFocus:e=>u.onFocus(e,l),onBlur:a[4]||(a[4]=(...e)=>u.onBlur&&u.onBlur(...e)),onChange:e=>u.onChange(e,l)},null,40,s)]),l<=r.modelValue?n.renderSlot(e.$slots,"onicon",{key:0,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.onIconClass)},null,2)])):n.renderSlot(e.$slots,"officon",{key:1,value:l},(()=>[n.createElementVNode("span",{class:n.normalizeClass(u.offIconClass)},null,2)]))],10,o)))),128))],2)},a}(primevue.utils,Vue);
|
package/resources/primevue.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.p-component,.p-component *{box-sizing:border-box}.p-hidden{display:none}.p-hidden-space{visibility:hidden}.p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.p-hidden-accessible input,.p-hidden-accessible select{transform:scale(0)}.p-reset{margin:0;padding:0;border:0;outline:0;text-decoration:none;font-size:100%;list-style:none}.p-disabled,.p-disabled *{cursor:default !important;pointer-events:none;user-select:none}.p-component-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.p-overflow-hidden{overflow:hidden}.p-unselectable-text{user-select:none}.p-scrollbar-measure{width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px}@-webkit-keyframes p-fadein{0%{opacity:0}100%{opacity:1}}@keyframes p-fadein{0%{opacity:0}100%{opacity:1}}input[type="button"],input[type="submit"],input[type="reset"],input[type="file"]::-webkit-file-upload-button,button{border-radius:0}.p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:0;cursor:pointer;user-select:none}.p-link:disabled{cursor:default}.p-connected-overlay{opacity:0;transform:scaleY(0.8);transition:transform .12s cubic-bezier(0,0,0.2,1),opacity .12s cubic-bezier(0,0,0.2,1)}.p-connected-overlay-visible{opacity:1;transform:scaleY(1)}.p-connected-overlay-hidden{opacity:0;transform:scaleY(1);transition:opacity .1s linear}.p-connected-overlay-enter-from{opacity:0;transform:scaleY(0.8)}.p-connected-overlay-leave-to{opacity:0}.p-connected-overlay-enter-active{transition:transform .12s cubic-bezier(0,0,0.2,1),opacity .12s cubic-bezier(0,0,0.2,1)}.p-connected-overlay-leave-active{transition:opacity .1s linear}.p-toggleable-content-enter-from,.p-toggleable-content-leave-to{max-height:0}.p-toggleable-content-enter-to,.p-toggleable-content-leave-from{max-height:1000px}.p-toggleable-content-leave-active{overflow:hidden;transition:max-height .45s cubic-bezier(0,1,0,1)}.p-toggleable-content-enter-active{overflow:hidden;transition:max-height 1s ease-in-out}.p-sr-only{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal !important}.p-badge{display:inline-block;border-radius:10px;text-align:center;padding:0 .5rem}.p-overlay-badge{position:relative}.p-overlay-badge .p-badge{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0;margin:0}.p-badge-dot{width:.5rem;min-width:.5rem;height:.5rem;border-radius:50%;padding:0}.p-badge-no-gutter{padding:0;border-radius:50%}.p-button{margin:0;display:inline-flex;cursor:pointer;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}.p-checkbox{display:inline-flex;cursor:pointer;user-select:none;vertical-align:bottom;position:relative}.p-checkbox.p-checkbox-disabled{cursor:default}.p-checkbox-box{display:flex;justify-content:center;align-items:center}.p-colorpicker-panel .p-colorpicker-color{background:transparent url("./images/color.png") no-repeat left top}.p-colorpicker-panel .p-colorpicker-hue{background:transparent url("./images/hue.png") no-repeat left top}.p-inputtext{margin:0}.p-fluid .p-inputtext{width:100%}.p-inputgroup{display:flex;align-items:stretch;width:100%}.p-inputgroup-addon{display:flex;align-items:center;justify-content:center}.p-inputgroup .p-float-label{display:flex;align-items:stretch;width:100%}.p-inputgroup .p-inputtext,.p-fluid .p-inputgroup .p-inputtext,.p-inputgroup .p-inputwrapper,.p-fluid .p-inputgroup .p-input{flex:1 1 auto;width:1%}.p-float-label{display:block;position:relative}.p-float-label label{position:absolute;pointer-events:none;top:50%;margin-top:-.5rem;transition-property:all;transition-timing-function:ease;line-height:1}.p-float-label textarea ~ label{top:1rem}.p-float-label input:focus ~ label,.p-float-label input.p-filled ~ label,.p-float-label textarea:focus ~ label,.p-float-label textarea.p-filled ~ label,.p-float-label .p-inputwrapper-focus ~ label,.p-float-label .p-inputwrapper-filled ~ label{top:-.75rem;font-size:12px}.p-float-label .input:-webkit-autofill ~ label{top:-20px;font-size:12px}.p-float-label .p-placeholder,.p-float-label input::placeholder,.p-float-label .p-inputtext::placeholder{opacity:0;transition-property:all;transition-timing-function:ease}.p-float-label .p-focus .p-placeholder,.p-float-label input:focus::placeholder,.p-float-label .p-inputtext:focus::placeholder{opacity:1;transition-property:all;transition-timing-function:ease}.p-input-icon-left,.p-input-icon-right{position:relative;display:inline-block}.p-input-icon-left>i,.p-input-icon-right>i{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-input-icon-left,.p-fluid .p-input-icon-right{display:block;width:100%}.p-radiobutton{display:inline-flex;cursor:pointer;user-select:none;vertical-align:bottom}.p-radiobutton.p-radiobutton-disabled{cursor:default}.p-radiobutton-box{display:flex;justify-content:center;align-items:center}.p-radiobutton-icon{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0) scale(.1);border-radius:50%;visibility:hidden}.p-radiobutton-box.p-highlight .p-radiobutton-icon{transform:translateZ(0) scale(1.0,1.0);visibility:visible}.p-ripple{overflow:hidden;position:relative}.p-ink{display:block;position:absolute;background:rgba(255,255,255,0.5);border-radius:100%;transform:scale(0);pointer-events:none}.p-ink-active{animation:ripple .4s linear}.p-ripple-disabled .p-ink{display:none !important}@keyframes ripple{100%{opacity:0;transform:scale(2.5)}}.p-tooltip{position:absolute;display:none;padding:.25em .5rem;max-width:12.5rem}.p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-left{padding:0 .25rem}.p-tooltip.p-tooltip-top,.p-tooltip.p-tooltip-bottom{padding:.25em 0}.p-tooltip .p-tooltip-text{white-space:pre-line;word-break:break-word}.p-tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.p-tooltip-right .p-tooltip-arrow{top:50%;left:0;margin-top:-.25rem;border-width:.25em .25em .25em 0}.p-tooltip-left .p-tooltip-arrow{top:50%;right:0;margin-top:-.25rem;border-width:.25em 0 .25em .25rem}.p-tooltip.p-tooltip-top{padding:.25em 0}.p-tooltip-top .p-tooltip-arrow{bottom:0;left:50%;margin-left:-.25rem;border-width:.25em .25em 0}.p-tooltip-bottom .p-tooltip-arrow{top:0;left:50%;margin-left:-.25rem;border-width:0 .25em .25rem}
|
|
1
|
+
.p-component,.p-component *{box-sizing:border-box}.p-hidden{display:none}.p-hidden-space{visibility:hidden}.p-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.p-hidden-accessible input,.p-hidden-accessible select{transform:scale(0)}.p-reset{margin:0;padding:0;border:0;outline:0;text-decoration:none;font-size:100%;list-style:none}.p-disabled,.p-disabled *{cursor:default !important;pointer-events:none;user-select:none}.p-component-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.p-overflow-hidden{overflow:hidden}.p-unselectable-text{user-select:none}.p-scrollbar-measure{width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px}@-webkit-keyframes p-fadein{0%{opacity:0}100%{opacity:1}}@keyframes p-fadein{0%{opacity:0}100%{opacity:1}}input[type="button"],input[type="submit"],input[type="reset"],input[type="file"]::-webkit-file-upload-button,button{border-radius:0}.p-link{text-align:left;background-color:transparent;margin:0;padding:0;border:0;cursor:pointer;user-select:none}.p-link:disabled{cursor:default}.p-connected-overlay{opacity:0;transform:scaleY(0.8);transition:transform .12s cubic-bezier(0,0,0.2,1),opacity .12s cubic-bezier(0,0,0.2,1)}.p-connected-overlay-visible{opacity:1;transform:scaleY(1)}.p-connected-overlay-hidden{opacity:0;transform:scaleY(1);transition:opacity .1s linear}.p-connected-overlay-enter-from{opacity:0;transform:scaleY(0.8)}.p-connected-overlay-leave-to{opacity:0}.p-connected-overlay-enter-active{transition:transform .12s cubic-bezier(0,0,0.2,1),opacity .12s cubic-bezier(0,0,0.2,1)}.p-connected-overlay-leave-active{transition:opacity .1s linear}.p-toggleable-content-enter-from,.p-toggleable-content-leave-to{max-height:0}.p-toggleable-content-enter-to,.p-toggleable-content-leave-from{max-height:1000px}.p-toggleable-content-leave-active{overflow:hidden;transition:max-height .45s cubic-bezier(0,1,0,1)}.p-toggleable-content-enter-active{overflow:hidden;transition:max-height 1s ease-in-out}.p-sr-only{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal !important}.p-badge{display:inline-block;border-radius:10px;text-align:center;padding:0 .5rem}.p-overlay-badge{position:relative}.p-overlay-badge .p-badge{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0;margin:0}.p-badge-dot{width:.5rem;min-width:.5rem;height:.5rem;border-radius:50%;padding:0}.p-badge-no-gutter{padding:0;border-radius:50%}.p-button{margin:0;display:inline-flex;cursor:pointer;user-select:none;align-items:center;vertical-align:bottom;text-align:center;overflow:hidden;position:relative}.p-button-label{flex:1 1 auto}.p-button-icon-right{order:1}.p-button:disabled{cursor:default}.p-button-icon-only{justify-content:center}.p-button-icon-only .p-button-label{visibility:hidden;width:0;flex:0 0 auto}.p-button-vertical{flex-direction:column}.p-button-icon-bottom{order:2}.p-buttonset .p-button{margin:0}.p-buttonset .p-button:not(:last-child){border-right:0 none}.p-buttonset .p-button:not(:first-of-type):not(:last-of-type){border-radius:0}.p-buttonset .p-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0}.p-buttonset .p-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0}.p-buttonset .p-button:focus{position:relative;z-index:1}.p-checkbox{display:inline-flex;cursor:pointer;user-select:none;vertical-align:bottom;position:relative}.p-checkbox.p-checkbox-disabled{cursor:default}.p-checkbox-box{display:flex;justify-content:center;align-items:center}.p-colorpicker-panel .p-colorpicker-color{background:transparent url("./images/color.png") no-repeat left top}.p-colorpicker-panel .p-colorpicker-hue{background:transparent url("./images/hue.png") no-repeat left top}.p-inputtext{margin:0}.p-fluid .p-inputtext{width:100%}.p-inputgroup{display:flex;align-items:stretch;width:100%}.p-inputgroup-addon{display:flex;align-items:center;justify-content:center}.p-inputgroup .p-float-label{display:flex;align-items:stretch;width:100%}.p-inputgroup .p-inputtext,.p-fluid .p-inputgroup .p-inputtext,.p-inputgroup .p-inputwrapper,.p-fluid .p-inputgroup .p-input{flex:1 1 auto;width:1%}.p-float-label{display:block;position:relative}.p-float-label label{position:absolute;pointer-events:none;top:50%;margin-top:-.5rem;transition-property:all;transition-timing-function:ease;line-height:1}.p-float-label textarea ~ label{top:1rem}.p-float-label input:focus ~ label,.p-float-label input.p-filled ~ label,.p-float-label textarea:focus ~ label,.p-float-label textarea.p-filled ~ label,.p-float-label .p-inputwrapper-focus ~ label,.p-float-label .p-inputwrapper-filled ~ label{top:-.75rem;font-size:12px}.p-float-label .input:-webkit-autofill ~ label{top:-20px;font-size:12px}.p-float-label .p-placeholder,.p-float-label input::placeholder,.p-float-label .p-inputtext::placeholder{opacity:0;transition-property:all;transition-timing-function:ease}.p-float-label .p-focus .p-placeholder,.p-float-label input:focus::placeholder,.p-float-label .p-inputtext:focus::placeholder{opacity:1;transition-property:all;transition-timing-function:ease}.p-input-icon-left,.p-input-icon-right{position:relative;display:inline-block}.p-input-icon-left>i,.p-input-icon-right>i{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-input-icon-left,.p-fluid .p-input-icon-right{display:block;width:100%}.p-radiobutton{position:relative;display:inline-flex;cursor:pointer;user-select:none;vertical-align:bottom}.p-radiobutton.p-radiobutton-disabled{cursor:default}.p-radiobutton-box{display:flex;justify-content:center;align-items:center}.p-radiobutton-icon{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0) scale(.1);border-radius:50%;visibility:hidden}.p-radiobutton-box.p-highlight .p-radiobutton-icon{transform:translateZ(0) scale(1.0,1.0);visibility:visible}.p-ripple{overflow:hidden;position:relative}.p-ink{display:block;position:absolute;background:rgba(255,255,255,0.5);border-radius:100%;transform:scale(0);pointer-events:none}.p-ink-active{animation:ripple .4s linear}.p-ripple-disabled .p-ink{display:none !important}@keyframes ripple{100%{opacity:0;transform:scale(2.5)}}.p-tooltip{position:absolute;display:none;padding:.25em .5rem;max-width:12.5rem}.p-tooltip.p-tooltip-right,.p-tooltip.p-tooltip-left{padding:0 .25rem}.p-tooltip.p-tooltip-top,.p-tooltip.p-tooltip-bottom{padding:.25em 0}.p-tooltip .p-tooltip-text{white-space:pre-line;word-break:break-word}.p-tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.p-tooltip-right .p-tooltip-arrow{top:50%;left:0;margin-top:-.25rem;border-width:.25em .25em .25em 0}.p-tooltip-left .p-tooltip-arrow{top:50%;right:0;margin-top:-.25rem;border-width:.25em 0 .25em .25rem}.p-tooltip.p-tooltip-top{padding:.25em 0}.p-tooltip-top .p-tooltip-arrow{bottom:0;left:50%;margin-left:-.25rem;border-width:.25em .25em 0}.p-tooltip-bottom .p-tooltip-arrow{top:0;left:50%;margin-left:-.25rem;border-width:0 .25em .25rem}
|
package/sidebar/Sidebar.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Portal>
|
|
3
|
-
<div
|
|
4
|
-
<transition name="p-sidebar" @after-enter="onAfterEnter" @
|
|
3
|
+
<div v-if="containerVisible" :ref="maskRef" :class="maskClass" @mousedown="onMaskClick">
|
|
4
|
+
<transition name="p-sidebar" @enter="onEnter" @after-enter="onAfterEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear>
|
|
5
5
|
<div v-if="visible" :ref="containerRef" v-focustrap :class="containerClass" role="complementary" :aria-modal="modal" @keydown="onKeydown" v-bind="$attrs">
|
|
6
6
|
<div :ref="headerContainerRef" class="p-sidebar-header">
|
|
7
7
|
<div v-if="$slots.header" class="p-sidebar-header-content">
|
|
@@ -29,7 +29,7 @@ import { DomHandler, ZIndexUtils } from 'primevue/utils';
|
|
|
29
29
|
export default {
|
|
30
30
|
name: 'Sidebar',
|
|
31
31
|
inheritAttrs: false,
|
|
32
|
-
emits: ['update:visible', 'show', 'hide'],
|
|
32
|
+
emits: ['update:visible', 'show', 'hide', 'after-hide'],
|
|
33
33
|
props: {
|
|
34
34
|
visible: {
|
|
35
35
|
type: Boolean,
|
|
@@ -65,67 +65,70 @@ export default {
|
|
|
65
65
|
},
|
|
66
66
|
blockScroll: {
|
|
67
67
|
type: Boolean,
|
|
68
|
-
default:
|
|
68
|
+
default: false
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
data() {
|
|
72
|
+
return {
|
|
73
|
+
containerVisible: this.visible
|
|
74
|
+
};
|
|
75
|
+
},
|
|
71
76
|
container: null,
|
|
77
|
+
mask: null,
|
|
72
78
|
content: null,
|
|
73
79
|
headerContainer: null,
|
|
74
80
|
closeButton: null,
|
|
75
81
|
outsideClickListener: null,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
watch: {
|
|
82
|
-
visible(newValue) {
|
|
83
|
-
this.maskVisible = newValue ? newValue : this.maskVisible;
|
|
82
|
+
updated() {
|
|
83
|
+
if (this.visible) {
|
|
84
|
+
this.containerVisible = this.visible;
|
|
84
85
|
}
|
|
85
86
|
},
|
|
86
87
|
beforeUnmount() {
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
this.disableDocumentSettings();
|
|
89
|
+
|
|
90
|
+
if (this.mask && this.autoZIndex) {
|
|
91
|
+
ZIndexUtils.clear(this.mask);
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
this.unbindOutsideClickListener();
|
|
92
94
|
this.container = null;
|
|
95
|
+
this.mask = null;
|
|
93
96
|
},
|
|
94
97
|
methods: {
|
|
95
98
|
hide() {
|
|
96
99
|
this.$emit('update:visible', false);
|
|
97
|
-
|
|
98
|
-
this.unbindOutsideClickListener();
|
|
99
|
-
this.blockScroll && DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
100
100
|
},
|
|
101
101
|
onEnter() {
|
|
102
102
|
this.$emit('show');
|
|
103
|
+
this.focus();
|
|
103
104
|
|
|
104
105
|
if (this.autoZIndex) {
|
|
105
|
-
ZIndexUtils.set('modal', this
|
|
106
|
+
ZIndexUtils.set('modal', this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
onAfterEnter() {
|
|
110
|
+
this.enableDocumentSettings();
|
|
111
|
+
},
|
|
112
|
+
onBeforeLeave() {
|
|
113
|
+
if (this.modal) {
|
|
114
|
+
DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
106
115
|
}
|
|
107
|
-
|
|
108
|
-
this.maskVisible = true;
|
|
109
|
-
this.focus();
|
|
110
116
|
},
|
|
111
117
|
onLeave() {
|
|
112
|
-
DomHandler.addClass(this.$refs.mask, 'p-component-overlay-leave');
|
|
113
|
-
|
|
114
118
|
this.$emit('hide');
|
|
115
|
-
this.unbindOutsideClickListener();
|
|
116
119
|
},
|
|
117
120
|
onAfterLeave() {
|
|
118
121
|
if (this.autoZIndex) {
|
|
119
122
|
ZIndexUtils.clear(this.mask);
|
|
120
123
|
}
|
|
121
124
|
|
|
122
|
-
this.
|
|
125
|
+
this.containerVisible = false;
|
|
126
|
+
this.disableDocumentSettings();
|
|
127
|
+
this.$emit('after-hide');
|
|
123
128
|
},
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
|
|
127
|
-
if (this.blockScroll) {
|
|
128
|
-
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
129
|
+
onMaskClick(event) {
|
|
130
|
+
if (this.dismissable && this.modal && this.mask === event.target) {
|
|
131
|
+
this.hide();
|
|
129
132
|
}
|
|
130
133
|
},
|
|
131
134
|
focus() {
|
|
@@ -145,19 +148,33 @@ export default {
|
|
|
145
148
|
|
|
146
149
|
focusTarget && focusTarget.focus();
|
|
147
150
|
},
|
|
148
|
-
|
|
149
|
-
if (
|
|
150
|
-
this.
|
|
151
|
+
enableDocumentSettings() {
|
|
152
|
+
if (this.dismissable && !this.modal) {
|
|
153
|
+
this.bindOutsideClickListener();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (this.blockScroll) {
|
|
157
|
+
DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
151
158
|
}
|
|
152
159
|
},
|
|
153
|
-
|
|
154
|
-
|
|
160
|
+
disableDocumentSettings() {
|
|
161
|
+
this.unbindOutsideClickListener();
|
|
162
|
+
|
|
163
|
+
if (this.blockScroll) {
|
|
164
|
+
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
onKeydown(event) {
|
|
168
|
+
if (event.code === 'Escape') {
|
|
155
169
|
this.hide();
|
|
156
170
|
}
|
|
157
171
|
},
|
|
158
172
|
containerRef(el) {
|
|
159
173
|
this.container = el;
|
|
160
174
|
},
|
|
175
|
+
maskRef(el) {
|
|
176
|
+
this.mask = el;
|
|
177
|
+
},
|
|
161
178
|
contentRef(el) {
|
|
162
179
|
this.content = el;
|
|
163
180
|
},
|
|
@@ -176,7 +193,7 @@ export default {
|
|
|
176
193
|
bindOutsideClickListener() {
|
|
177
194
|
if (!this.outsideClickListener) {
|
|
178
195
|
this.outsideClickListener = (event) => {
|
|
179
|
-
if (
|
|
196
|
+
if (this.isOutsideClicked(event)) {
|
|
180
197
|
this.hide();
|
|
181
198
|
}
|
|
182
199
|
};
|
|
@@ -211,14 +228,14 @@ export default {
|
|
|
211
228
|
closeAriaLabel() {
|
|
212
229
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
|
213
230
|
},
|
|
214
|
-
|
|
231
|
+
maskClass() {
|
|
215
232
|
return [
|
|
216
233
|
'p-sidebar-mask',
|
|
217
234
|
this.getPositionClass(),
|
|
218
235
|
{
|
|
219
236
|
'p-component-overlay p-component-overlay-enter': this.modal,
|
|
220
237
|
'p-sidebar-mask-scrollblocker': this.blockScroll,
|
|
221
|
-
'p-sidebar-visible': this.
|
|
238
|
+
'p-sidebar-visible': this.containerVisible,
|
|
222
239
|
'p-sidebar-full': this.fullScreen
|
|
223
240
|
}
|
|
224
241
|
];
|
|
@@ -249,14 +266,14 @@ export default {
|
|
|
249
266
|
transition-property: background-color;
|
|
250
267
|
}
|
|
251
268
|
|
|
252
|
-
.p-sidebar-visible {
|
|
253
|
-
display: flex;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
269
|
.p-sidebar-mask.p-component-overlay {
|
|
257
270
|
pointer-events: auto;
|
|
258
271
|
}
|
|
259
272
|
|
|
273
|
+
.p-sidebar-visible {
|
|
274
|
+
display: flex;
|
|
275
|
+
}
|
|
276
|
+
|
|
260
277
|
.p-sidebar {
|
|
261
278
|
display: flex;
|
|
262
279
|
flex-direction: column;
|
|
@@ -391,14 +408,6 @@ export default {
|
|
|
391
408
|
height: 30rem;
|
|
392
409
|
}
|
|
393
410
|
|
|
394
|
-
.p-sidebar-left .p-sidebar-view,
|
|
395
|
-
.p-sidebar-right .p-sidebar-view,
|
|
396
|
-
.p-sidebar-top .p-sidebar-view,
|
|
397
|
-
.p-sidebar-bottom .p-sidebar-view {
|
|
398
|
-
width: 100%;
|
|
399
|
-
height: 100%;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
411
|
.p-sidebar-left .p-sidebar-content,
|
|
403
412
|
.p-sidebar-right .p-sidebar-content,
|
|
404
413
|
.p-sidebar-top .p-sidebar-content,
|