primevue 3.18.0 → 3.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -2
- package/autocomplete/AutoComplete.vue +15 -2
- package/autocomplete/autocomplete.cjs.js +15 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +15 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +15 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/BreadcrumbItem.vue +6 -6
- package/breadcrumb/breadcrumb.cjs.js +6 -6
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +6 -6
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +6 -6
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/Calendar.d.ts +20 -0
- package/calendar/Calendar.vue +32 -14
- package/calendar/calendar.cjs.js +139 -121
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +139 -121
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +139 -121
- package/calendar/calendar.min.js +1 -1
- package/chips/Chips.d.ts +7 -2
- package/chips/Chips.vue +11 -3
- package/chips/chips.cjs.js +12 -4
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +12 -4
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +12 -4
- package/chips/chips.min.js +1 -1
- package/confirmdialog/ConfirmDialog.vue +6 -1
- package/confirmdialog/confirmdialog.cjs.js +7 -1
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +7 -1
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +7 -1
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.vue +59 -5
- package/confirmpopup/confirmpopup.cjs.js +83 -19
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +82 -19
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +82 -19
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.vue +14 -16
- package/contextmenu/contextmenu.cjs.js +14 -16
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +14 -16
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -16
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +374 -94
- package/core/core.min.js +13 -9
- package/datatable/DataTable.d.ts +1 -1
- package/datatable/DataTable.vue +1 -1
- package/datatable/HeaderCell.vue +1 -1
- package/datatable/TableBody.vue +1 -1
- package/datatable/TableHeader.vue +1 -1
- package/datatable/datatable.cjs.js +4 -4
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +4 -4
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +4 -4
- package/datatable/datatable.min.js +1 -1
- package/dialog/Dialog.d.ts +19 -5
- package/dialog/Dialog.vue +114 -51
- package/dialog/dialog.cjs.js +145 -72
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +143 -71
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +143 -71
- package/dialog/dialog.min.js +1 -1
- package/dropdown/Dropdown.vue +20 -1
- package/dropdown/dropdown.cjs.js +20 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +20 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +20 -1
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/FileContent.vue +9 -2
- package/fileupload/fileupload.cjs.js +10 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +9 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +11 -6
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +5 -0
- package/focustrap/focustrap.cjs.js +94 -0
- package/focustrap/focustrap.cjs.min.js +1 -0
- package/focustrap/focustrap.esm.js +92 -0
- package/focustrap/focustrap.esm.min.js +1 -0
- package/focustrap/focustrap.js +96 -0
- package/focustrap/focustrap.min.js +1 -0
- package/focustrap/package.json +6 -0
- package/inplace/Inplace.d.ts +5 -0
- package/inplace/Inplace.vue +5 -1
- package/inplace/inplace.cjs.js +6 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +6 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +6 -2
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +5 -0
- package/inputnumber/InputNumber.vue +9 -0
- package/inputnumber/inputnumber.cjs.js +9 -0
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +9 -0
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +9 -0
- package/inputnumber/inputnumber.min.js +1 -1
- package/megamenu/MegaMenu.vue +3 -2
- package/megamenu/megamenu.cjs.js +3 -2
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +3 -2
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +3 -2
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.vue +7 -7
- package/menu/menu.cjs.js +7 -7
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +7 -7
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +7 -7
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +5 -3
- package/menubar/MenubarSub.vue +1 -1
- package/menubar/menubar.cjs.js +22 -18
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +22 -18
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +22 -18
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +5 -0
- package/message/Message.vue +5 -1
- package/message/message.cjs.js +9 -5
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +9 -5
- package/message/message.esm.min.js +1 -1
- package/message/message.js +9 -5
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.vue +24 -3
- package/multiselect/multiselect.cjs.js +24 -3
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +24 -3
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +24 -3
- package/multiselect/multiselect.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +2 -1
- package/overlaypanel/OverlayPanel.vue +31 -5
- package/overlaypanel/overlaypanel.cjs.js +49 -17
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +48 -17
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +48 -17
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/Paginator.vue +5 -3
- package/paginator/paginator.cjs.js +5 -3
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +5 -3
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +5 -3
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/PanelMenuList.vue +1 -2
- package/panelmenu/panelmenu.cjs.js +4 -622
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +13 -631
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +4 -622
- package/panelmenu/panelmenu.min.js +1 -1
- package/resources/primevue.css +4 -2
- package/resources/primevue.min.css +1 -1
- package/scrollpanel/ScrollPanel.vue +5 -0
- package/scrollpanel/scrollpanel.cjs.js +1 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/sidebar/Sidebar.d.ts +5 -5
- package/sidebar/Sidebar.vue +46 -14
- package/sidebar/sidebar.cjs.js +73 -30
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +72 -30
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +72 -30
- package/sidebar/sidebar.min.js +1 -1
- package/slider/Slider.vue +21 -12
- package/slider/slider.cjs.js +21 -12
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +21 -12
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +21 -12
- package/slider/slider.min.js +1 -1
- package/splitter/Splitter.d.ts +16 -0
- package/splitter/Splitter.vue +2 -1
- package/splitter/splitter.cjs.js +2 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +2 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +2 -1
- package/splitter/splitter.min.js +1 -1
- package/tieredmenu/TieredMenu.vue +1 -2
- package/tieredmenu/tieredmenu.cjs.js +1 -2
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -2
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/Toast.d.ts +25 -0
- package/toast/Toast.vue +32 -1
- package/toast/ToastMessage.vue +12 -7
- package/toast/toast.cjs.js +44 -14
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +44 -14
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +44 -14
- package/toast/toast.min.js +1 -1
- package/tooltip/tooltip.cjs.js +28 -5
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +28 -5
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +28 -5
- package/tooltip/tooltip.min.js +1 -1
- package/utils/Utils.d.ts +1 -0
- package/utils/utils.cjs.js +6 -0
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +6 -0
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +6 -0
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +75 -11
- package/vetur-tags.json +25 -8
- package/web-types.json +233 -21
package/sidebar/sidebar.cjs.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var Ripple = require('primevue/ripple');
|
|
3
|
+
var FocusTrap = require('primevue/focustrap');
|
|
5
4
|
var Portal = require('primevue/portal');
|
|
5
|
+
var Ripple = require('primevue/ripple');
|
|
6
|
+
var utils = require('primevue/utils');
|
|
6
7
|
var vue = require('vue');
|
|
7
8
|
|
|
8
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
10
|
|
|
10
|
-
var
|
|
11
|
+
var FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);
|
|
11
12
|
var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
13
|
+
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
12
14
|
|
|
13
15
|
var script = {
|
|
14
16
|
name: 'Sidebar',
|
|
@@ -39,18 +41,21 @@ var script = {
|
|
|
39
41
|
type: Boolean,
|
|
40
42
|
default: true
|
|
41
43
|
},
|
|
44
|
+
closeIcon: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: 'pi pi-times'
|
|
47
|
+
},
|
|
42
48
|
modal: {
|
|
43
49
|
type: Boolean,
|
|
44
50
|
default: true
|
|
45
|
-
},
|
|
46
|
-
ariaCloseLabel: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: 'close'
|
|
49
51
|
}
|
|
50
52
|
},
|
|
51
53
|
mask: null,
|
|
52
54
|
maskClickListener: null,
|
|
53
55
|
container: null,
|
|
56
|
+
content: null,
|
|
57
|
+
headerContainer: null,
|
|
58
|
+
closeButton: null,
|
|
54
59
|
beforeUnmount() {
|
|
55
60
|
this.destroyModal();
|
|
56
61
|
|
|
@@ -90,11 +95,21 @@ var script = {
|
|
|
90
95
|
}
|
|
91
96
|
},
|
|
92
97
|
focus() {
|
|
93
|
-
|
|
98
|
+
const findFocusableElement = (container) => {
|
|
99
|
+
return container.querySelector('[autofocus]');
|
|
100
|
+
};
|
|
94
101
|
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
let focusTarget = this.$slots.default && findFocusableElement(this.content);
|
|
103
|
+
|
|
104
|
+
if (!focusTarget) {
|
|
105
|
+
focusTarget = this.$slots.header && findFocusableElement(this.headerContainer);
|
|
106
|
+
|
|
107
|
+
if (!focusTarget) {
|
|
108
|
+
focusTarget = findFocusableElement(this.container);
|
|
109
|
+
}
|
|
97
110
|
}
|
|
111
|
+
|
|
112
|
+
focusTarget && focusTarget.focus();
|
|
98
113
|
},
|
|
99
114
|
enableModality() {
|
|
100
115
|
if (!this.mask) {
|
|
@@ -127,6 +142,11 @@ var script = {
|
|
|
127
142
|
this.mask.addEventListener('click', this.maskClickListener);
|
|
128
143
|
}
|
|
129
144
|
},
|
|
145
|
+
onKeydown(event) {
|
|
146
|
+
if (event.code === 'Escape') {
|
|
147
|
+
this.hide();
|
|
148
|
+
}
|
|
149
|
+
},
|
|
130
150
|
unbindMaskClickListener() {
|
|
131
151
|
if (this.maskClickListener) {
|
|
132
152
|
this.mask.removeEventListener('click', this.maskClickListener);
|
|
@@ -143,6 +163,15 @@ var script = {
|
|
|
143
163
|
},
|
|
144
164
|
containerRef(el) {
|
|
145
165
|
this.container = el;
|
|
166
|
+
},
|
|
167
|
+
contentRef(el) {
|
|
168
|
+
this.content = el;
|
|
169
|
+
},
|
|
170
|
+
headerContainerRef(el) {
|
|
171
|
+
this.headerContainer = el;
|
|
172
|
+
},
|
|
173
|
+
closeButtonRef(el) {
|
|
174
|
+
this.closeButton = el;
|
|
146
175
|
}
|
|
147
176
|
},
|
|
148
177
|
computed: {
|
|
@@ -158,9 +187,13 @@ var script = {
|
|
|
158
187
|
},
|
|
159
188
|
fullScreen() {
|
|
160
189
|
return this.position === 'full';
|
|
190
|
+
},
|
|
191
|
+
closeAriaLabel() {
|
|
192
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
|
161
193
|
}
|
|
162
194
|
},
|
|
163
195
|
directives: {
|
|
196
|
+
focustrap: FocusTrap__default["default"],
|
|
164
197
|
ripple: Ripple__default["default"]
|
|
165
198
|
},
|
|
166
199
|
components: {
|
|
@@ -169,21 +202,16 @@ var script = {
|
|
|
169
202
|
};
|
|
170
203
|
|
|
171
204
|
const _hoisted_1 = ["aria-modal"];
|
|
172
|
-
const _hoisted_2 = {
|
|
173
|
-
const _hoisted_3 = {
|
|
205
|
+
const _hoisted_2 = {
|
|
174
206
|
key: 0,
|
|
175
207
|
class: "p-sidebar-header-content"
|
|
176
208
|
};
|
|
177
|
-
const
|
|
178
|
-
const _hoisted_5 = /*#__PURE__*/vue.createElementVNode("span", { class: "p-sidebar-close-icon pi pi-times" }, null, -1);
|
|
179
|
-
const _hoisted_6 = [
|
|
180
|
-
_hoisted_5
|
|
181
|
-
];
|
|
182
|
-
const _hoisted_7 = { class: "p-sidebar-content" };
|
|
209
|
+
const _hoisted_3 = ["aria-label"];
|
|
183
210
|
|
|
184
211
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
185
212
|
const _component_Portal = vue.resolveComponent("Portal");
|
|
186
213
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
214
|
+
const _directive_focustrap = vue.resolveDirective("focustrap");
|
|
187
215
|
|
|
188
216
|
return (vue.openBlock(), vue.createBlock(_component_Portal, null, {
|
|
189
217
|
default: vue.withCtx(() => [
|
|
@@ -196,35 +224,50 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
196
224
|
}, {
|
|
197
225
|
default: vue.withCtx(() => [
|
|
198
226
|
($props.visible)
|
|
199
|
-
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
227
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
200
228
|
key: 0,
|
|
201
229
|
ref: $options.containerRef,
|
|
202
230
|
class: $options.containerClass,
|
|
203
231
|
role: "complementary",
|
|
204
|
-
"aria-modal": $props.modal
|
|
232
|
+
"aria-modal": $props.modal,
|
|
233
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.onKeydown && $options.onKeydown(...args)))
|
|
205
234
|
}, _ctx.$attrs), [
|
|
206
|
-
vue.createElementVNode("div",
|
|
235
|
+
vue.createElementVNode("div", {
|
|
236
|
+
ref: $options.headerContainerRef,
|
|
237
|
+
class: "p-sidebar-header"
|
|
238
|
+
}, [
|
|
207
239
|
(_ctx.$slots.header)
|
|
208
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
240
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
209
241
|
vue.renderSlot(_ctx.$slots, "header")
|
|
210
242
|
]))
|
|
211
243
|
: vue.createCommentVNode("", true),
|
|
212
244
|
($props.showCloseIcon)
|
|
213
245
|
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
214
246
|
key: 1,
|
|
247
|
+
ref: $options.closeButtonRef,
|
|
248
|
+
autofocus: "",
|
|
249
|
+
type: "button",
|
|
215
250
|
class: "p-sidebar-close p-sidebar-icon p-link",
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
251
|
+
"aria-label": $options.closeAriaLabel,
|
|
252
|
+
onClick: _cache[0] || (_cache[0] = (...args) => ($options.hide && $options.hide(...args)))
|
|
253
|
+
}, [
|
|
254
|
+
vue.createElementVNode("span", {
|
|
255
|
+
class: vue.normalizeClass(['p-sidebar-close-icon', $props.closeIcon])
|
|
256
|
+
}, null, 2)
|
|
257
|
+
], 8, _hoisted_3)), [
|
|
220
258
|
[_directive_ripple]
|
|
221
259
|
])
|
|
222
260
|
: vue.createCommentVNode("", true)
|
|
223
|
-
]),
|
|
224
|
-
vue.createElementVNode("div",
|
|
261
|
+
], 512),
|
|
262
|
+
vue.createElementVNode("div", {
|
|
263
|
+
ref: $options.contentRef,
|
|
264
|
+
class: "p-sidebar-content"
|
|
265
|
+
}, [
|
|
225
266
|
vue.renderSlot(_ctx.$slots, "default")
|
|
226
|
-
])
|
|
227
|
-
], 16, _hoisted_1))
|
|
267
|
+
], 512)
|
|
268
|
+
], 16, _hoisted_1)), [
|
|
269
|
+
[_directive_focustrap]
|
|
270
|
+
])
|
|
228
271
|
: vue.createCommentVNode("", true)
|
|
229
272
|
]),
|
|
230
273
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/
|
|
1
|
+
"use strict";var e=require("primevue/focustrap"),t=require("primevue/portal"),n=require("primevue/ripple"),i=require("primevue/utils"),s=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e),o=a(t),l=a(n),d={name:"Sidebar",inheritAttrs:!1,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}},mask:null,maskClickListener:null,container:null,content:null,headerContainer:null,closeButton:null,beforeUnmount(){this.destroyModal(),this.container&&this.autoZIndex&&i.ZIndexUtils.clear(this.container),this.container=null},methods:{hide(){this.$emit("update:visible",!1)},onEnter(e){this.$emit("show"),this.autoZIndex&&i.ZIndexUtils.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal),this.focus(),this.modal&&!this.fullScreen&&this.enableModality()},onLeave(){this.$emit("hide"),this.modal&&!this.fullScreen&&this.disableModality()},onAfterLeave(e){this.autoZIndex&&i.ZIndexUtils.clear(e)},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()},enableModality(){this.mask||(this.mask=document.createElement("div"),this.mask.setAttribute("class","p-sidebar-mask p-component-overlay p-component-overlay-enter"),this.mask.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1),this.dismissable&&this.bindMaskClickListener(),document.body.appendChild(this.mask),i.DomHandler.addClass(document.body,"p-overflow-hidden"))},disableModality(){this.mask&&(i.DomHandler.addClass(this.mask,"p-component-overlay-leave"),this.mask.addEventListener("animationend",(()=>{this.destroyModal()})))},bindMaskClickListener(){this.maskClickListener||(this.maskClickListener=()=>{this.hide()},this.mask.addEventListener("click",this.maskClickListener))},onKeydown(e){"Escape"===e.code&&this.hide()},unbindMaskClickListener(){this.maskClickListener&&(this.mask.removeEventListener("click",this.maskClickListener),this.maskClickListener=null)},destroyModal(){this.mask&&(this.unbindMaskClickListener(),document.body.removeChild(this.mask),i.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.mask=null)},containerRef(e){this.container=e},contentRef(e){this.content=e},headerContainerRef(e){this.headerContainer=e},closeButtonRef(e){this.closeButton=e}},computed:{containerClass(){return["p-sidebar p-component p-sidebar-"+this.position,{"p-sidebar-active":this.visible,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},fullScreen(){return"full"===this.position},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:r.default,ripple:l.default},components:{Portal:o.default}};const p=["aria-modal"],c={key:0,class:"p-sidebar-header-content"},m=["aria-label"];!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 {\n position: fixed;\n -webkit-transition: -webkit-transform 0.3s;\n transition: -webkit-transform 0.3s;\n transition: transform 0.3s;\n transition: transform 0.3s, -webkit-transform 0.3s;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-sidebar-content {\n position: relative;\n overflow-y: auto;\n}\n.p-sidebar-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.p-sidebar-icon {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n}\n.p-sidebar-left {\n top: 0;\n left: 0;\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-right {\n top: 0;\n right: 0;\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-top {\n top: 0;\n left: 0;\n width: 100%;\n height: 10rem;\n}\n.p-sidebar-bottom {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 10rem;\n}\n.p-sidebar-full {\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n -webkit-transition: none;\n transition: none;\n}\n.p-sidebar-left.p-sidebar-enter-from,\n.p-sidebar-left.p-sidebar-leave-to {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.p-sidebar-right.p-sidebar-enter-from,\n.p-sidebar-right.p-sidebar-leave-to {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n.p-sidebar-top.p-sidebar-enter-from,\n.p-sidebar-top.p-sidebar-leave-to {\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n}\n.p-sidebar-bottom.p-sidebar-enter-from,\n.p-sidebar-bottom.p-sidebar-leave-to {\n -webkit-transform: translateY(100%);\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 -webkit-transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\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@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,a,r){const o=s.resolveComponent("Portal"),l=s.resolveDirective("ripple"),d=s.resolveDirective("focustrap");return s.openBlock(),s.createBlock(o,null,{default:s.withCtx((()=>[s.createVNode(s.Transition,{name:"p-sidebar",onEnter:r.onEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave,appear:""},{default:s.withCtx((()=>[n.visible?s.withDirectives((s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:r.containerRef,class:r.containerClass,role:"complementary","aria-modal":n.modal,onKeydown:t[1]||(t[1]=(...e)=>r.onKeydown&&r.onKeydown(...e))},e.$attrs),[s.createElementVNode("div",{ref:r.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:r.closeButtonRef,autofocus:"",type:"button",class:"p-sidebar-close p-sidebar-icon p-link","aria-label":r.closeAriaLabel,onClick:t[0]||(t[0]=(...e)=>r.hide&&r.hide(...e))},[s.createElementVNode("span",{class:s.normalizeClass(["p-sidebar-close-icon",n.closeIcon])},null,2)],8,m)),[[l]]):s.createCommentVNode("",!0)],512),s.createElementVNode("div",{ref:r.contentRef,class:"p-sidebar-content"},[s.renderSlot(e.$slots,"default")],512)],16,p)),[[d]]):s.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3})},module.exports=d;
|
package/sidebar/sidebar.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Ripple from 'primevue/ripple';
|
|
1
|
+
import FocusTrap from 'primevue/focustrap';
|
|
3
2
|
import Portal from 'primevue/portal';
|
|
4
|
-
import
|
|
3
|
+
import Ripple from 'primevue/ripple';
|
|
4
|
+
import { ZIndexUtils, DomHandler } from 'primevue/utils';
|
|
5
|
+
import { resolveComponent, resolveDirective, openBlock, createBlock, withCtx, createVNode, Transition, withDirectives, createElementBlock, mergeProps, createElementVNode, renderSlot, createCommentVNode, normalizeClass } from 'vue';
|
|
5
6
|
|
|
6
7
|
var script = {
|
|
7
8
|
name: 'Sidebar',
|
|
@@ -32,18 +33,21 @@ var script = {
|
|
|
32
33
|
type: Boolean,
|
|
33
34
|
default: true
|
|
34
35
|
},
|
|
36
|
+
closeIcon: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'pi pi-times'
|
|
39
|
+
},
|
|
35
40
|
modal: {
|
|
36
41
|
type: Boolean,
|
|
37
42
|
default: true
|
|
38
|
-
},
|
|
39
|
-
ariaCloseLabel: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: 'close'
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
45
|
mask: null,
|
|
45
46
|
maskClickListener: null,
|
|
46
47
|
container: null,
|
|
48
|
+
content: null,
|
|
49
|
+
headerContainer: null,
|
|
50
|
+
closeButton: null,
|
|
47
51
|
beforeUnmount() {
|
|
48
52
|
this.destroyModal();
|
|
49
53
|
|
|
@@ -83,11 +87,21 @@ var script = {
|
|
|
83
87
|
}
|
|
84
88
|
},
|
|
85
89
|
focus() {
|
|
86
|
-
|
|
90
|
+
const findFocusableElement = (container) => {
|
|
91
|
+
return container.querySelector('[autofocus]');
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
let focusTarget = this.$slots.default && findFocusableElement(this.content);
|
|
87
95
|
|
|
88
|
-
if (
|
|
89
|
-
|
|
96
|
+
if (!focusTarget) {
|
|
97
|
+
focusTarget = this.$slots.header && findFocusableElement(this.headerContainer);
|
|
98
|
+
|
|
99
|
+
if (!focusTarget) {
|
|
100
|
+
focusTarget = findFocusableElement(this.container);
|
|
101
|
+
}
|
|
90
102
|
}
|
|
103
|
+
|
|
104
|
+
focusTarget && focusTarget.focus();
|
|
91
105
|
},
|
|
92
106
|
enableModality() {
|
|
93
107
|
if (!this.mask) {
|
|
@@ -120,6 +134,11 @@ var script = {
|
|
|
120
134
|
this.mask.addEventListener('click', this.maskClickListener);
|
|
121
135
|
}
|
|
122
136
|
},
|
|
137
|
+
onKeydown(event) {
|
|
138
|
+
if (event.code === 'Escape') {
|
|
139
|
+
this.hide();
|
|
140
|
+
}
|
|
141
|
+
},
|
|
123
142
|
unbindMaskClickListener() {
|
|
124
143
|
if (this.maskClickListener) {
|
|
125
144
|
this.mask.removeEventListener('click', this.maskClickListener);
|
|
@@ -136,6 +155,15 @@ var script = {
|
|
|
136
155
|
},
|
|
137
156
|
containerRef(el) {
|
|
138
157
|
this.container = el;
|
|
158
|
+
},
|
|
159
|
+
contentRef(el) {
|
|
160
|
+
this.content = el;
|
|
161
|
+
},
|
|
162
|
+
headerContainerRef(el) {
|
|
163
|
+
this.headerContainer = el;
|
|
164
|
+
},
|
|
165
|
+
closeButtonRef(el) {
|
|
166
|
+
this.closeButton = el;
|
|
139
167
|
}
|
|
140
168
|
},
|
|
141
169
|
computed: {
|
|
@@ -151,9 +179,13 @@ var script = {
|
|
|
151
179
|
},
|
|
152
180
|
fullScreen() {
|
|
153
181
|
return this.position === 'full';
|
|
182
|
+
},
|
|
183
|
+
closeAriaLabel() {
|
|
184
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
|
154
185
|
}
|
|
155
186
|
},
|
|
156
187
|
directives: {
|
|
188
|
+
focustrap: FocusTrap,
|
|
157
189
|
ripple: Ripple
|
|
158
190
|
},
|
|
159
191
|
components: {
|
|
@@ -162,21 +194,16 @@ var script = {
|
|
|
162
194
|
};
|
|
163
195
|
|
|
164
196
|
const _hoisted_1 = ["aria-modal"];
|
|
165
|
-
const _hoisted_2 = {
|
|
166
|
-
const _hoisted_3 = {
|
|
197
|
+
const _hoisted_2 = {
|
|
167
198
|
key: 0,
|
|
168
199
|
class: "p-sidebar-header-content"
|
|
169
200
|
};
|
|
170
|
-
const
|
|
171
|
-
const _hoisted_5 = /*#__PURE__*/createElementVNode("span", { class: "p-sidebar-close-icon pi pi-times" }, null, -1);
|
|
172
|
-
const _hoisted_6 = [
|
|
173
|
-
_hoisted_5
|
|
174
|
-
];
|
|
175
|
-
const _hoisted_7 = { class: "p-sidebar-content" };
|
|
201
|
+
const _hoisted_3 = ["aria-label"];
|
|
176
202
|
|
|
177
203
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
178
204
|
const _component_Portal = resolveComponent("Portal");
|
|
179
205
|
const _directive_ripple = resolveDirective("ripple");
|
|
206
|
+
const _directive_focustrap = resolveDirective("focustrap");
|
|
180
207
|
|
|
181
208
|
return (openBlock(), createBlock(_component_Portal, null, {
|
|
182
209
|
default: withCtx(() => [
|
|
@@ -189,35 +216,50 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
189
216
|
}, {
|
|
190
217
|
default: withCtx(() => [
|
|
191
218
|
($props.visible)
|
|
192
|
-
? (openBlock(), createElementBlock("div", mergeProps({
|
|
219
|
+
? withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
|
193
220
|
key: 0,
|
|
194
221
|
ref: $options.containerRef,
|
|
195
222
|
class: $options.containerClass,
|
|
196
223
|
role: "complementary",
|
|
197
|
-
"aria-modal": $props.modal
|
|
224
|
+
"aria-modal": $props.modal,
|
|
225
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => ($options.onKeydown && $options.onKeydown(...args)))
|
|
198
226
|
}, _ctx.$attrs), [
|
|
199
|
-
createElementVNode("div",
|
|
227
|
+
createElementVNode("div", {
|
|
228
|
+
ref: $options.headerContainerRef,
|
|
229
|
+
class: "p-sidebar-header"
|
|
230
|
+
}, [
|
|
200
231
|
(_ctx.$slots.header)
|
|
201
|
-
? (openBlock(), createElementBlock("div",
|
|
232
|
+
? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
202
233
|
renderSlot(_ctx.$slots, "header")
|
|
203
234
|
]))
|
|
204
235
|
: createCommentVNode("", true),
|
|
205
236
|
($props.showCloseIcon)
|
|
206
237
|
? withDirectives((openBlock(), createElementBlock("button", {
|
|
207
238
|
key: 1,
|
|
239
|
+
ref: $options.closeButtonRef,
|
|
240
|
+
autofocus: "",
|
|
241
|
+
type: "button",
|
|
208
242
|
class: "p-sidebar-close p-sidebar-icon p-link",
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
243
|
+
"aria-label": $options.closeAriaLabel,
|
|
244
|
+
onClick: _cache[0] || (_cache[0] = (...args) => ($options.hide && $options.hide(...args)))
|
|
245
|
+
}, [
|
|
246
|
+
createElementVNode("span", {
|
|
247
|
+
class: normalizeClass(['p-sidebar-close-icon', $props.closeIcon])
|
|
248
|
+
}, null, 2)
|
|
249
|
+
], 8, _hoisted_3)), [
|
|
213
250
|
[_directive_ripple]
|
|
214
251
|
])
|
|
215
252
|
: createCommentVNode("", true)
|
|
216
|
-
]),
|
|
217
|
-
createElementVNode("div",
|
|
253
|
+
], 512),
|
|
254
|
+
createElementVNode("div", {
|
|
255
|
+
ref: $options.contentRef,
|
|
256
|
+
class: "p-sidebar-content"
|
|
257
|
+
}, [
|
|
218
258
|
renderSlot(_ctx.$slots, "default")
|
|
219
|
-
])
|
|
220
|
-
], 16, _hoisted_1))
|
|
259
|
+
], 512)
|
|
260
|
+
], 16, _hoisted_1)), [
|
|
261
|
+
[_directive_focustrap]
|
|
262
|
+
])
|
|
221
263
|
: createCommentVNode("", true)
|
|
222
264
|
]),
|
|
223
265
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"primevue/focustrap";import t from"primevue/portal";import n from"primevue/ripple";import{ZIndexUtils as i,DomHandler as s}from"primevue/utils";import{resolveComponent as a,resolveDirective as r,openBlock as o,createBlock as l,withCtx as d,createVNode as p,Transition as m,withDirectives as b,createElementBlock as c,mergeProps as h,createElementVNode as f,renderSlot as u,createCommentVNode as k,normalizeClass as v}from"vue";var y={name:"Sidebar",inheritAttrs:!1,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}},mask:null,maskClickListener:null,container:null,content:null,headerContainer:null,closeButton:null,beforeUnmount(){this.destroyModal(),this.container&&this.autoZIndex&&i.clear(this.container),this.container=null},methods:{hide(){this.$emit("update:visible",!1)},onEnter(e){this.$emit("show"),this.autoZIndex&&i.set("modal",e,this.baseZIndex||this.$primevue.config.zIndex.modal),this.focus(),this.modal&&!this.fullScreen&&this.enableModality()},onLeave(){this.$emit("hide"),this.modal&&!this.fullScreen&&this.disableModality()},onAfterLeave(e){this.autoZIndex&&i.clear(e)},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()},enableModality(){this.mask||(this.mask=document.createElement("div"),this.mask.setAttribute("class","p-sidebar-mask p-component-overlay p-component-overlay-enter"),this.mask.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1),this.dismissable&&this.bindMaskClickListener(),document.body.appendChild(this.mask),s.addClass(document.body,"p-overflow-hidden"))},disableModality(){this.mask&&(s.addClass(this.mask,"p-component-overlay-leave"),this.mask.addEventListener("animationend",(()=>{this.destroyModal()})))},bindMaskClickListener(){this.maskClickListener||(this.maskClickListener=()=>{this.hide()},this.mask.addEventListener("click",this.maskClickListener))},onKeydown(e){"Escape"===e.code&&this.hide()},unbindMaskClickListener(){this.maskClickListener&&(this.mask.removeEventListener("click",this.maskClickListener),this.maskClickListener=null)},destroyModal(){this.mask&&(this.unbindMaskClickListener(),document.body.removeChild(this.mask),s.removeClass(document.body,"p-overflow-hidden"),this.mask=null)},containerRef(e){this.container=e},contentRef(e){this.content=e},headerContainerRef(e){this.headerContainer=e},closeButtonRef(e){this.closeButton=e}},computed:{containerClass(){return["p-sidebar p-component p-sidebar-"+this.position,{"p-sidebar-active":this.visible,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},fullScreen(){return"full"===this.position},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:e,ripple:n},components:{Portal:t}};const w=["aria-modal"],x={key:0,class:"p-sidebar-header-content"},g=["aria-label"];!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 {\n position: fixed;\n -webkit-transition: -webkit-transform 0.3s;\n transition: -webkit-transform 0.3s;\n transition: transform 0.3s;\n transition: transform 0.3s, -webkit-transform 0.3s;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-sidebar-content {\n position: relative;\n overflow-y: auto;\n}\n.p-sidebar-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.p-sidebar-icon {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n}\n.p-sidebar-left {\n top: 0;\n left: 0;\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-right {\n top: 0;\n right: 0;\n width: 20rem;\n height: 100%;\n}\n.p-sidebar-top {\n top: 0;\n left: 0;\n width: 100%;\n height: 10rem;\n}\n.p-sidebar-bottom {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 10rem;\n}\n.p-sidebar-full {\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n -webkit-transition: none;\n transition: none;\n}\n.p-sidebar-left.p-sidebar-enter-from,\n.p-sidebar-left.p-sidebar-leave-to {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.p-sidebar-right.p-sidebar-enter-from,\n.p-sidebar-right.p-sidebar-leave-to {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n.p-sidebar-top.p-sidebar-enter-from,\n.p-sidebar-top.p-sidebar-leave-to {\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n}\n.p-sidebar-bottom.p-sidebar-enter-from,\n.p-sidebar-bottom.p-sidebar-leave-to {\n -webkit-transform: translateY(100%);\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 -webkit-transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\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@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"),y.render=function(e,t,n,i,s,y){const C=a("Portal"),L=r("ripple"),I=r("focustrap");return o(),l(C,null,{default:d((()=>[p(m,{name:"p-sidebar",onEnter:y.onEnter,onLeave:y.onLeave,onAfterLeave:y.onAfterLeave,appear:""},{default:d((()=>[n.visible?b((o(),c("div",h({key:0,ref:y.containerRef,class:y.containerClass,role:"complementary","aria-modal":n.modal,onKeydown:t[1]||(t[1]=(...e)=>y.onKeydown&&y.onKeydown(...e))},e.$attrs),[f("div",{ref:y.headerContainerRef,class:"p-sidebar-header"},[e.$slots.header?(o(),c("div",x,[u(e.$slots,"header")])):k("",!0),n.showCloseIcon?b((o(),c("button",{key:1,ref:y.closeButtonRef,autofocus:"",type:"button",class:"p-sidebar-close p-sidebar-icon p-link","aria-label":y.closeAriaLabel,onClick:t[0]||(t[0]=(...e)=>y.hide&&y.hide(...e))},[f("span",{class:v(["p-sidebar-close-icon",n.closeIcon])},null,2)],8,g)),[[L]]):k("",!0)],512),f("div",{ref:y.contentRef,class:"p-sidebar-content"},[u(e.$slots,"default")],512)],16,w)),[[I]]):k("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])])),_:3})};export{y as default};
|