primevue 3.22.0 → 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 +61 -51
- package/sidebar/sidebar.cjs.js +124 -103
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +125 -104
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +124 -103
- package/sidebar/sidebar.min.js +1 -1
- package/web-types.json +1 -1
package/sidebar/sidebar.js
CHANGED
|
@@ -10,7 +10,8 @@ this.primevue.sidebar = (function (FocusTrap, Portal, Ripple, utils, vue) {
|
|
|
10
10
|
|
|
11
11
|
var script = {
|
|
12
12
|
name: 'Sidebar',
|
|
13
|
-
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
emits: ['update:visible', 'show', 'hide', 'after-hide'],
|
|
14
15
|
props: {
|
|
15
16
|
visible: {
|
|
16
17
|
type: Boolean,
|
|
@@ -46,67 +47,70 @@ this.primevue.sidebar = (function (FocusTrap, Portal, Ripple, utils, vue) {
|
|
|
46
47
|
},
|
|
47
48
|
blockScroll: {
|
|
48
49
|
type: Boolean,
|
|
49
|
-
default:
|
|
50
|
+
default: false
|
|
50
51
|
}
|
|
51
52
|
},
|
|
53
|
+
data() {
|
|
54
|
+
return {
|
|
55
|
+
containerVisible: this.visible
|
|
56
|
+
};
|
|
57
|
+
},
|
|
52
58
|
container: null,
|
|
59
|
+
mask: null,
|
|
53
60
|
content: null,
|
|
54
61
|
headerContainer: null,
|
|
55
62
|
closeButton: null,
|
|
56
63
|
outsideClickListener: null,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
watch: {
|
|
63
|
-
visible(newValue) {
|
|
64
|
-
this.maskVisible = newValue ? newValue : this.maskVisible;
|
|
64
|
+
updated() {
|
|
65
|
+
if (this.visible) {
|
|
66
|
+
this.containerVisible = this.visible;
|
|
65
67
|
}
|
|
66
68
|
},
|
|
67
69
|
beforeUnmount() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
this.disableDocumentSettings();
|
|
71
|
+
|
|
72
|
+
if (this.mask && this.autoZIndex) {
|
|
73
|
+
utils.ZIndexUtils.clear(this.mask);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
|
-
this.unbindOutsideClickListener();
|
|
73
76
|
this.container = null;
|
|
77
|
+
this.mask = null;
|
|
74
78
|
},
|
|
75
79
|
methods: {
|
|
76
80
|
hide() {
|
|
77
81
|
this.$emit('update:visible', false);
|
|
78
|
-
|
|
79
|
-
this.unbindOutsideClickListener();
|
|
80
|
-
this.blockScroll && utils.DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
81
82
|
},
|
|
82
83
|
onEnter() {
|
|
83
84
|
this.$emit('show');
|
|
85
|
+
this.focus();
|
|
84
86
|
|
|
85
87
|
if (this.autoZIndex) {
|
|
86
|
-
utils.ZIndexUtils.set('modal', this
|
|
88
|
+
utils.ZIndexUtils.set('modal', this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
onAfterEnter() {
|
|
92
|
+
this.enableDocumentSettings();
|
|
93
|
+
},
|
|
94
|
+
onBeforeLeave() {
|
|
95
|
+
if (this.modal) {
|
|
96
|
+
utils.DomHandler.addClass(this.mask, 'p-component-overlay-leave');
|
|
87
97
|
}
|
|
88
|
-
|
|
89
|
-
this.maskVisible = true;
|
|
90
|
-
this.focus();
|
|
91
98
|
},
|
|
92
99
|
onLeave() {
|
|
93
|
-
utils.DomHandler.addClass(this.$refs.mask, 'p-component-overlay-leave');
|
|
94
|
-
|
|
95
100
|
this.$emit('hide');
|
|
96
|
-
this.unbindOutsideClickListener();
|
|
97
101
|
},
|
|
98
102
|
onAfterLeave() {
|
|
99
103
|
if (this.autoZIndex) {
|
|
100
104
|
utils.ZIndexUtils.clear(this.mask);
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
this.
|
|
107
|
+
this.containerVisible = false;
|
|
108
|
+
this.disableDocumentSettings();
|
|
109
|
+
this.$emit('after-hide');
|
|
104
110
|
},
|
|
105
|
-
|
|
106
|
-
this.
|
|
107
|
-
|
|
108
|
-
if (this.blockScroll) {
|
|
109
|
-
utils.DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
111
|
+
onMaskClick(event) {
|
|
112
|
+
if (this.dismissable && this.modal && this.mask === event.target) {
|
|
113
|
+
this.hide();
|
|
110
114
|
}
|
|
111
115
|
},
|
|
112
116
|
focus() {
|
|
@@ -126,19 +130,33 @@ this.primevue.sidebar = (function (FocusTrap, Portal, Ripple, utils, vue) {
|
|
|
126
130
|
|
|
127
131
|
focusTarget && focusTarget.focus();
|
|
128
132
|
},
|
|
129
|
-
|
|
130
|
-
if (
|
|
131
|
-
this.
|
|
133
|
+
enableDocumentSettings() {
|
|
134
|
+
if (this.dismissable && !this.modal) {
|
|
135
|
+
this.bindOutsideClickListener();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (this.blockScroll) {
|
|
139
|
+
utils.DomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
132
140
|
}
|
|
133
141
|
},
|
|
134
|
-
|
|
135
|
-
|
|
142
|
+
disableDocumentSettings() {
|
|
143
|
+
this.unbindOutsideClickListener();
|
|
144
|
+
|
|
145
|
+
if (this.blockScroll) {
|
|
146
|
+
utils.DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
onKeydown(event) {
|
|
150
|
+
if (event.code === 'Escape') {
|
|
136
151
|
this.hide();
|
|
137
152
|
}
|
|
138
153
|
},
|
|
139
154
|
containerRef(el) {
|
|
140
155
|
this.container = el;
|
|
141
156
|
},
|
|
157
|
+
maskRef(el) {
|
|
158
|
+
this.mask = el;
|
|
159
|
+
},
|
|
142
160
|
contentRef(el) {
|
|
143
161
|
this.content = el;
|
|
144
162
|
},
|
|
@@ -157,7 +175,7 @@ this.primevue.sidebar = (function (FocusTrap, Portal, Ripple, utils, vue) {
|
|
|
157
175
|
bindOutsideClickListener() {
|
|
158
176
|
if (!this.outsideClickListener) {
|
|
159
177
|
this.outsideClickListener = (event) => {
|
|
160
|
-
if (
|
|
178
|
+
if (this.isOutsideClicked(event)) {
|
|
161
179
|
this.hide();
|
|
162
180
|
}
|
|
163
181
|
};
|
|
@@ -192,14 +210,14 @@ this.primevue.sidebar = (function (FocusTrap, Portal, Ripple, utils, vue) {
|
|
|
192
210
|
closeAriaLabel() {
|
|
193
211
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
|
194
212
|
},
|
|
195
|
-
|
|
213
|
+
maskClass() {
|
|
196
214
|
return [
|
|
197
215
|
'p-sidebar-mask',
|
|
198
216
|
this.getPositionClass(),
|
|
199
217
|
{
|
|
200
218
|
'p-component-overlay p-component-overlay-enter': this.modal,
|
|
201
219
|
'p-sidebar-mask-scrollblocker': this.blockScroll,
|
|
202
|
-
'p-sidebar-visible': this.
|
|
220
|
+
'p-sidebar-visible': this.containerVisible,
|
|
203
221
|
'p-sidebar-full': this.fullScreen
|
|
204
222
|
}
|
|
205
223
|
];
|
|
@@ -228,71 +246,74 @@ this.primevue.sidebar = (function (FocusTrap, Portal, Ripple, utils, vue) {
|
|
|
228
246
|
|
|
229
247
|
return (vue.openBlock(), vue.createBlock(_component_Portal, null, {
|
|
230
248
|
default: vue.withCtx(() => [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
249
|
+
($data.containerVisible)
|
|
250
|
+
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
251
|
+
key: 0,
|
|
252
|
+
ref: $options.maskRef,
|
|
253
|
+
class: vue.normalizeClass($options.maskClass),
|
|
254
|
+
onMousedown: _cache[2] || (_cache[2] = (...args) => ($options.onMaskClick && $options.onMaskClick(...args)))
|
|
255
|
+
}, [
|
|
256
|
+
vue.createVNode(vue.Transition, {
|
|
257
|
+
name: "p-sidebar",
|
|
258
|
+
onEnter: $options.onEnter,
|
|
259
|
+
onAfterEnter: $options.onAfterEnter,
|
|
260
|
+
onBeforeLeave: $options.onBeforeLeave,
|
|
261
|
+
onLeave: $options.onLeave,
|
|
262
|
+
onAfterLeave: $options.onAfterLeave,
|
|
263
|
+
appear: ""
|
|
264
|
+
}, {
|
|
265
|
+
default: vue.withCtx(() => [
|
|
266
|
+
($props.visible)
|
|
267
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
268
|
+
key: 0,
|
|
269
|
+
ref: $options.containerRef,
|
|
270
|
+
class: $options.containerClass,
|
|
271
|
+
role: "complementary",
|
|
272
|
+
"aria-modal": $props.modal,
|
|
273
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.onKeydown && $options.onKeydown(...args)))
|
|
274
|
+
}, _ctx.$attrs), [
|
|
275
|
+
vue.createElementVNode("div", {
|
|
276
|
+
ref: $options.headerContainerRef,
|
|
277
|
+
class: "p-sidebar-header"
|
|
278
|
+
}, [
|
|
279
|
+
(_ctx.$slots.header)
|
|
280
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
281
|
+
vue.renderSlot(_ctx.$slots, "header")
|
|
282
|
+
]))
|
|
283
|
+
: vue.createCommentVNode("", true),
|
|
284
|
+
($props.showCloseIcon)
|
|
285
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
286
|
+
key: 1,
|
|
287
|
+
ref: $options.closeButtonRef,
|
|
288
|
+
autofocus: "",
|
|
289
|
+
type: "button",
|
|
290
|
+
class: "p-sidebar-close p-sidebar-icon p-link",
|
|
291
|
+
"aria-label": $options.closeAriaLabel,
|
|
292
|
+
onClick: _cache[0] || (_cache[0] = (...args) => ($options.hide && $options.hide(...args)))
|
|
293
|
+
}, [
|
|
294
|
+
vue.createElementVNode("span", {
|
|
295
|
+
class: vue.normalizeClass(['p-sidebar-close-icon', $props.closeIcon])
|
|
296
|
+
}, null, 2)
|
|
297
|
+
], 8, _hoisted_3)), [
|
|
298
|
+
[_directive_ripple]
|
|
299
|
+
])
|
|
300
|
+
: vue.createCommentVNode("", true)
|
|
301
|
+
], 512),
|
|
302
|
+
vue.createElementVNode("div", {
|
|
303
|
+
ref: $options.contentRef,
|
|
304
|
+
class: "p-sidebar-content"
|
|
305
|
+
}, [
|
|
306
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
307
|
+
], 512)
|
|
308
|
+
], 16, _hoisted_1)), [
|
|
309
|
+
[_directive_focustrap]
|
|
310
|
+
])
|
|
311
|
+
: vue.createCommentVNode("", true)
|
|
312
|
+
]),
|
|
313
|
+
_: 3
|
|
314
|
+
}, 8, ["onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
|
|
315
|
+
], 34))
|
|
316
|
+
: vue.createCommentVNode("", true)
|
|
296
317
|
]),
|
|
297
318
|
_: 3
|
|
298
319
|
}))
|
|
@@ -325,7 +346,7 @@ this.primevue.sidebar = (function (FocusTrap, Portal, Ripple, utils, vue) {
|
|
|
325
346
|
}
|
|
326
347
|
}
|
|
327
348
|
|
|
328
|
-
var css_248z = "\n.p-sidebar-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n.p-sidebar-
|
|
349
|
+
var css_248z = "\n.p-sidebar-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n.p-sidebar-visible {\n display: flex;\n}\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Position */\n.p-sidebar-left {\n justify-content: flex-start;\n}\n.p-sidebar-right {\n justify-content: flex-end;\n}\n.p-sidebar-top {\n align-items: flex-start;\n}\n.p-sidebar-bottom {\n align-items: flex-end;\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n@media screen and (max-width: 64em) {\n.p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n}\n}\n";
|
|
329
350
|
styleInject(css_248z);
|
|
330
351
|
|
|
331
352
|
script.render = render;
|
package/sidebar/sidebar.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.sidebar=function(e,t,n,i,s){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(e),o=r(t),l=r(n),d={name:"Sidebar",emits:["update:visible","show","hide"],props:{visible:{type:Boolean,default:!1},position:{type:String,default:"left"},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},closeIcon:{type:String,default:"pi pi-times"},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.sidebar=function(e,t,n,i,s){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(e),o=r(t),l=r(n),d={name:"Sidebar",inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],props:{visible:{type:Boolean,default:!1},position:{type:String,default:"left"},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},closeIcon:{type:String,default:"pi pi-times"},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},data(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,updated(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&i.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},methods:{hide(){this.$emit("update:visible",!1)},onEnter(){this.$emit("show"),this.focus(),this.autoZIndex&&i.ZIndexUtils.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter(){this.enableDocumentSettings()},onBeforeLeave(){this.modal&&i.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave(){this.$emit("hide")},onAfterLeave(){this.autoZIndex&&i.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick(e){this.dismissable&&this.modal&&this.mask===e.target&&this.hide()},focus(){const e=e=>e.querySelector("[autofocus]");let t=this.$slots.default&&e(this.content);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=e(this.container))),t&&t.focus()},enableDocumentSettings(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&i.DomHandler.addClass(document.body,"p-overflow-hidden")},disableDocumentSettings(){this.unbindOutsideClickListener(),this.blockScroll&&i.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeydown(e){"Escape"===e.code&&this.hide()},containerRef(e){this.container=e},maskRef(e){this.mask=e},contentRef(e){this.content=e},headerContainerRef(e){this.headerContainer=e},closeButtonRef(e){this.closeButton=e},getPositionClass(){const e=["left","right","top","bottom"].find((e=>e===this.position));return e?`p-sidebar-${e}`:""},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked(e){return this.container&&!this.container.contains(e.target)}},computed:{containerClass(){return["p-sidebar p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple,"p-sidebar-full":this.fullScreen}]},fullScreen(){return"full"===this.position},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},maskClass(){return["p-sidebar-mask",this.getPositionClass(),{"p-component-overlay p-component-overlay-enter":this.modal,"p-sidebar-mask-scrollblocker":this.blockScroll,"p-sidebar-visible":this.containerVisible,"p-sidebar-full":this.fullScreen}]}},directives:{focustrap:a.default,ripple:l.default},components:{Portal:o.default}};const p=["aria-modal"],c={key:0,class:"p-sidebar-header-content"},h=["aria-label"];return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-sidebar-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: none;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n.p-sidebar-visible {\n display: flex;\n}\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Position */\n.p-sidebar-left {\n justify-content: flex-start;\n}\n.p-sidebar-right {\n justify-content: flex-end;\n}\n.p-sidebar-top {\n align-items: flex-start;\n}\n.p-sidebar-bottom {\n align-items: flex-end;\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n@media screen and (max-width: 64em) {\n.p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n}\n}\n"),d.render=function(e,t,n,i,r,a){const o=s.resolveComponent("Portal"),l=s.resolveDirective("ripple"),d=s.resolveDirective("focustrap");return s.openBlock(),s.createBlock(o,null,{default:s.withCtx((()=>[r.containerVisible?(s.openBlock(),s.createElementBlock("div",{key:0,ref:a.maskRef,class:s.normalizeClass(a.maskClass),onMousedown:t[2]||(t[2]=(...e)=>a.onMaskClick&&a.onMaskClick(...e))},[s.createVNode(s.Transition,{name:"p-sidebar",onEnter:a.onEnter,onAfterEnter:a.onAfterEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},{default:s.withCtx((()=>[n.visible?s.withDirectives((s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:a.containerRef,class:a.containerClass,role:"complementary","aria-modal":n.modal,onKeydown:t[1]||(t[1]=(...e)=>a.onKeydown&&a.onKeydown(...e))},e.$attrs),[s.createElementVNode("div",{ref:a.headerContainerRef,class:"p-sidebar-header"},[e.$slots.header?(s.openBlock(),s.createElementBlock("div",c,[s.renderSlot(e.$slots,"header")])):s.createCommentVNode("",!0),n.showCloseIcon?s.withDirectives((s.openBlock(),s.createElementBlock("button",{key:1,ref:a.closeButtonRef,autofocus:"",type:"button",class:"p-sidebar-close p-sidebar-icon p-link","aria-label":a.closeAriaLabel,onClick:t[0]||(t[0]=(...e)=>a.hide&&a.hide(...e))},[s.createElementVNode("span",{class:s.normalizeClass(["p-sidebar-close-icon",n.closeIcon])},null,2)],8,h)),[[l]]):s.createCommentVNode("",!0)],512),s.createElementVNode("div",{ref:a.contentRef,class:"p-sidebar-content"},[s.renderSlot(e.$slots,"default")],512)],16,p)),[[d]]):s.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],34)):s.createCommentVNode("",!0)])),_:3})},d}(primevue.focustrap,primevue.portal,primevue.ripple,primevue.utils,Vue);
|
package/web-types.json
CHANGED