primevue 4.3.2 → 4.3.4

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.
Files changed (168) hide show
  1. package/accordionheader/AccordionHeader.vue +1 -1
  2. package/accordionheader/index.d.ts +6 -1
  3. package/accordionheader/index.mjs +1 -1
  4. package/accordionheader/index.mjs.map +1 -1
  5. package/autocomplete/AutoComplete.vue +60 -11
  6. package/autocomplete/index.d.ts +4 -0
  7. package/autocomplete/index.mjs +96 -59
  8. package/autocomplete/index.mjs.map +1 -1
  9. package/cascadeselect/CascadeSelect.vue +4 -1
  10. package/cascadeselect/CascadeSelectSub.vue +1 -1
  11. package/cascadeselect/index.mjs +22 -20
  12. package/cascadeselect/index.mjs.map +1 -1
  13. package/checkbox/Checkbox.vue +1 -1
  14. package/checkbox/index.mjs +2 -1
  15. package/checkbox/index.mjs.map +1 -1
  16. package/chip/BaseChip.vue +1 -1
  17. package/chip/index.d.ts +1 -1
  18. package/chip/index.mjs +1 -1
  19. package/chip/index.mjs.map +1 -1
  20. package/colorpicker/ColorPicker.vue +5 -1
  21. package/colorpicker/index.mjs +5 -1
  22. package/colorpicker/index.mjs.map +1 -1
  23. package/confirmationoptions/index.d.ts +1 -1
  24. package/confirmdialog/index.d.ts +4 -0
  25. package/contextmenu/index.mjs +12 -12
  26. package/contextmenu/index.mjs.map +1 -1
  27. package/datatable/BodyCell.vue +1 -0
  28. package/datatable/ColumnFilter.vue +3 -3
  29. package/datatable/DataTable.vue +103 -44
  30. package/datatable/HeaderCheckbox.vue +2 -2
  31. package/datatable/RowCheckbox.vue +1 -1
  32. package/datatable/TableBody.vue +12 -1
  33. package/datatable/TableFooter.vue +9 -1
  34. package/datatable/TableHeader.vue +9 -2
  35. package/datatable/index.d.ts +37 -29
  36. package/datatable/index.mjs +175 -111
  37. package/datatable/index.mjs.map +1 -1
  38. package/datatable/style/index.mjs +4 -4
  39. package/datatable/style/index.mjs.map +1 -1
  40. package/dataview/DataView.vue +4 -0
  41. package/dataview/index.d.ts +63 -6
  42. package/dataview/index.mjs +6 -2
  43. package/dataview/index.mjs.map +1 -1
  44. package/datepicker/DatePicker.vue +379 -236
  45. package/datepicker/index.d.ts +156 -0
  46. package/datepicker/index.mjs +676 -406
  47. package/datepicker/index.mjs.map +1 -1
  48. package/drawer/Drawer.vue +30 -20
  49. package/drawer/index.d.ts +10 -0
  50. package/drawer/index.mjs +42 -25
  51. package/drawer/index.mjs.map +1 -1
  52. package/fileupload/FileUpload.vue +3 -4
  53. package/fileupload/index.mjs +8 -10
  54. package/fileupload/index.mjs.map +1 -1
  55. package/galleria/Galleria.vue +39 -3
  56. package/galleria/index.mjs +40 -3
  57. package/galleria/index.mjs.map +1 -1
  58. package/image/Image.vue +1 -1
  59. package/image/index.mjs +1 -1
  60. package/image/index.mjs.map +1 -1
  61. package/inplace/Inplace.vue +1 -1
  62. package/inplace/index.mjs +3 -2
  63. package/inplace/index.mjs.map +1 -1
  64. package/inputmask/InputMask.vue +3 -3
  65. package/inputmask/index.d.ts +3 -3
  66. package/inputmask/index.mjs +3 -3
  67. package/inputmask/index.mjs.map +1 -1
  68. package/inputnumber/BaseInputNumber.vue +4 -0
  69. package/inputnumber/InputNumber.vue +3 -10
  70. package/inputnumber/index.mjs +8 -9
  71. package/inputnumber/index.mjs.map +1 -1
  72. package/keyfilter/index.mjs +12 -19
  73. package/keyfilter/index.mjs.map +1 -1
  74. package/listbox/Listbox.vue +10 -2
  75. package/listbox/index.mjs +38 -29
  76. package/listbox/index.mjs.map +1 -1
  77. package/megamenu/index.d.ts +1 -1
  78. package/megamenu/index.mjs +11 -11
  79. package/megamenu/index.mjs.map +1 -1
  80. package/menu/Menu.vue +12 -6
  81. package/menu/Menuitem.vue +14 -4
  82. package/menu/index.d.ts +3 -12
  83. package/menu/index.mjs +40 -20
  84. package/menu/index.mjs.map +1 -1
  85. package/menubar/index.mjs +16 -16
  86. package/menubar/index.mjs.map +1 -1
  87. package/metergroup/MeterGroup.vue +9 -3
  88. package/metergroup/MeterGroupLabel.vue +10 -1
  89. package/metergroup/index.d.ts +1 -1
  90. package/metergroup/index.mjs +32 -7
  91. package/metergroup/index.mjs.map +1 -1
  92. package/multiselect/MultiSelect.vue +40 -6
  93. package/multiselect/index.d.ts +1 -1
  94. package/multiselect/index.mjs +100 -68
  95. package/multiselect/index.mjs.map +1 -1
  96. package/organizationchart/OrganizationChartNode.vue +1 -1
  97. package/organizationchart/index.mjs.map +1 -1
  98. package/organizationchart/style/index.mjs +11 -6
  99. package/organizationchart/style/index.mjs.map +1 -1
  100. package/package.json +6 -6
  101. package/paginator/Paginator.vue +2 -0
  102. package/paginator/index.d.ts +8 -0
  103. package/paginator/index.mjs +3 -1
  104. package/paginator/index.mjs.map +1 -1
  105. package/panel/Panel.vue +2 -2
  106. package/panel/index.mjs +2 -2
  107. package/panel/index.mjs.map +1 -1
  108. package/panelmenu/PanelMenuList.vue +1 -1
  109. package/panelmenu/index.mjs +4 -4
  110. package/panelmenu/index.mjs.map +1 -1
  111. package/password/Password.vue +28 -6
  112. package/password/index.mjs +44 -16
  113. package/password/index.mjs.map +1 -1
  114. package/popover/Popover.vue +1 -1
  115. package/popover/index.mjs +1 -2
  116. package/popover/index.mjs.map +1 -1
  117. package/progressbar/ProgressBar.vue +4 -4
  118. package/progressbar/index.mjs +8 -12
  119. package/progressbar/index.mjs.map +1 -1
  120. package/scrolltop/ScrollTop.vue +2 -2
  121. package/scrolltop/index.mjs +4 -2
  122. package/scrolltop/index.mjs.map +1 -1
  123. package/select/Select.vue +68 -13
  124. package/select/index.mjs +128 -77
  125. package/select/index.mjs.map +1 -1
  126. package/selectbutton/index.d.ts +0 -24
  127. package/splitter/Splitter.vue +10 -2
  128. package/splitter/index.d.ts +1 -1
  129. package/splitter/index.mjs +19 -7
  130. package/splitter/index.mjs.map +1 -1
  131. package/splitter/style/index.mjs +1 -13
  132. package/splitter/style/index.mjs.map +1 -1
  133. package/step/Step.vue +27 -9
  134. package/step/index.mjs +46 -16
  135. package/step/index.mjs.map +1 -1
  136. package/steppanel/StepPanel.vue +11 -5
  137. package/steppanel/index.d.ts +8 -0
  138. package/steppanel/index.mjs +25 -10
  139. package/steppanel/index.mjs.map +1 -1
  140. package/stepper/StepperSeparator.vue +5 -2
  141. package/tab/Tab.vue +4 -4
  142. package/tab/index.mjs +4 -4
  143. package/tab/index.mjs.map +1 -1
  144. package/tablist/TabList.vue +3 -0
  145. package/tablist/index.mjs +1 -0
  146. package/tablist/index.mjs.map +1 -1
  147. package/tabpanel/TabPanel.vue +2 -2
  148. package/tabpanel/index.mjs +2 -2
  149. package/tabpanel/index.mjs.map +1 -1
  150. package/tieredmenu/TieredMenu.vue +1 -1
  151. package/tieredmenu/index.mjs +13 -14
  152. package/tieredmenu/index.mjs.map +1 -1
  153. package/tooltip/index.mjs +47 -30
  154. package/tooltip/index.mjs.map +1 -1
  155. package/tree/Tree.vue +14 -2
  156. package/tree/TreeNode.vue +2 -2
  157. package/tree/index.mjs +28 -10
  158. package/tree/index.mjs.map +1 -1
  159. package/treeselect/TreeSelect.vue +4 -1
  160. package/treeselect/index.mjs +4 -2
  161. package/treeselect/index.mjs.map +1 -1
  162. package/umd/primevue.min.js +12213 -1
  163. package/virtualscroller/VirtualScroller.vue +13 -2
  164. package/virtualscroller/index.mjs +28 -18
  165. package/virtualscroller/index.mjs.map +1 -1
  166. package/virtualscroller/style/index.mjs +1 -1
  167. package/virtualscroller/style/index.mjs.map +1 -1
  168. package/web-types.json +1 -1
package/drawer/Drawer.vue CHANGED
@@ -1,32 +1,33 @@
1
1
  <template>
2
2
  <Portal>
3
- <div v-if="containerVisible" :ref="maskRef" @mousedown="onMaskClick" :class="cx('mask')" :style="sx('mask', true, { position, modal })" v-bind="ptm('mask')">
3
+ <div v-if="containerVisible" :ref="maskRef" @mousedown="onMaskClick" :class="cx('mask')" :style="sx('mask', true, { position, modal })" :data-p="dataP" v-bind="ptm('mask')">
4
4
  <transition name="p-drawer" @enter="onEnter" @after-enter="onAfterEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
5
- <div v-if="visible" :ref="containerRef" v-focustrap :class="cx('root')" :style="sx('root')" role="complementary" :aria-modal="modal" v-bind="ptmi('root')">
5
+ <div v-if="visible" :ref="containerRef" v-focustrap :class="cx('root')" :style="sx('root')" role="complementary" :aria-modal="modal" :data-p="dataP" v-bind="ptmi('root')">
6
6
  <slot v-if="$slots.container" name="container" :closeCallback="hide"></slot>
7
7
  <template v-else>
8
8
  <div :ref="headerContainerRef" :class="cx('header')" v-bind="ptm('header')">
9
9
  <slot name="header" :class="cx('title')">
10
10
  <div v-if="header" :class="cx('title')" v-bind="ptm('title')">{{ header }}</div>
11
11
  </slot>
12
- <Button
13
- v-if="showCloseIcon"
14
- :ref="closeButtonRef"
15
- type="button"
16
- :class="cx('pcCloseButton')"
17
- :aria-label="closeAriaLabel"
18
- :unstyled="unstyled"
19
- @click="hide"
20
- v-bind="closeButtonProps"
21
- :pt="ptm('pcCloseButton')"
22
- data-pc-group-section="iconcontainer"
23
- >
24
- <template #icon="slotProps">
25
- <slot name="closeicon">
26
- <component :is="closeIcon ? 'span' : 'TimesIcon'" :class="[closeIcon, slotProps.class]" v-bind="ptm('pcCloseButton')['icon']"></component>
27
- </slot>
28
- </template>
29
- </Button>
12
+ <slot v-if="showCloseIcon" name="closebutton" :closeCallback="hide">
13
+ <Button
14
+ :ref="closeButtonRef"
15
+ type="button"
16
+ :class="cx('pcCloseButton')"
17
+ :aria-label="closeAriaLabel"
18
+ :unstyled="unstyled"
19
+ @click="hide"
20
+ v-bind="closeButtonProps"
21
+ :pt="ptm('pcCloseButton')"
22
+ data-pc-group-section="iconcontainer"
23
+ >
24
+ <template #icon="slotProps">
25
+ <slot name="closeicon">
26
+ <component :is="closeIcon ? 'span' : 'TimesIcon'" :class="[closeIcon, slotProps.class]" v-bind="ptm('pcCloseButton')['icon']"></component>
27
+ </slot>
28
+ </template>
29
+ </Button>
30
+ </slot>
30
31
  </div>
31
32
  <div :ref="contentRef" :class="cx('content')" v-bind="ptm('content')">
32
33
  <slot></slot>
@@ -42,6 +43,7 @@
42
43
  </template>
43
44
 
44
45
  <script>
46
+ import { cn } from '@primeuix/utils';
45
47
  import { addClass, focus } from '@primeuix/utils/dom';
46
48
  import { ZIndex } from '@primeuix/utils/zindex';
47
49
  import TimesIcon from '@primevue/icons/times';
@@ -234,6 +236,14 @@ export default {
234
236
  },
235
237
  closeAriaLabel() {
236
238
  return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
239
+ },
240
+ dataP() {
241
+ return cn({
242
+ 'full-screen': this.position === 'full',
243
+ [this.position]: this.position,
244
+ open: this.containerVisible,
245
+ modal: this.modal
246
+ });
237
247
  }
238
248
  },
239
249
  directives: {
package/drawer/index.d.ts CHANGED
@@ -220,6 +220,16 @@ export interface DrawerSlots {
220
220
  */
221
221
  class: any;
222
222
  }): VNode[];
223
+ /**
224
+ * Custom close button template.
225
+ * @param {Object} scope - close button slot's params.
226
+ */
227
+ closebutton(scope: {
228
+ /**
229
+ * Close function.
230
+ */
231
+ closeCallback: () => void;
232
+ }): VNode[];
223
233
  /**
224
234
  * Custom close icon template.
225
235
  * @param {Object} scope - close icon slot's params.
package/drawer/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { cn } from '@primeuix/utils';
1
2
  import { focus, addClass } from '@primeuix/utils/dom';
2
3
  import { ZIndex } from '@primeuix/utils/zindex';
3
4
  import TimesIcon from '@primevue/icons/times';
@@ -73,6 +74,10 @@ var script$1 = {
73
74
  }
74
75
  };
75
76
 
77
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
78
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
79
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
80
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
76
81
  var script = {
77
82
  name: 'Drawer',
78
83
  "extends": script$1,
@@ -244,6 +249,11 @@ var script = {
244
249
  },
245
250
  closeAriaLabel: function closeAriaLabel() {
246
251
  return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
252
+ },
253
+ dataP: function dataP() {
254
+ return cn(_defineProperty(_defineProperty(_defineProperty({
255
+ 'full-screen': this.position === 'full'
256
+ }, this.position, this.position), "open", this.containerVisible), "modal", this.modal));
247
257
  }
248
258
  },
249
259
  directives: {
@@ -256,7 +266,8 @@ var script = {
256
266
  }
257
267
  };
258
268
 
259
- var _hoisted_1 = ["aria-modal"];
269
+ var _hoisted_1 = ["data-p"];
270
+ var _hoisted_2 = ["aria-modal", "data-p"];
260
271
  function render(_ctx, _cache, $props, $setup, $data, $options) {
261
272
  var _component_Button = resolveComponent("Button");
262
273
  var _component_Portal = resolveComponent("Portal");
@@ -273,7 +284,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
273
284
  style: _ctx.sx('mask', true, {
274
285
  position: _ctx.position,
275
286
  modal: _ctx.modal
276
- })
287
+ }),
288
+ "data-p": $options.dataP
277
289
  }, _ctx.ptm('mask')), [createVNode(Transition, mergeProps({
278
290
  name: "p-drawer",
279
291
  onEnter: $options.onEnter,
@@ -290,7 +302,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
290
302
  "class": _ctx.cx('root'),
291
303
  style: _ctx.sx('root'),
292
304
  role: "complementary",
293
- "aria-modal": _ctx.modal
305
+ "aria-modal": _ctx.modal,
306
+ "data-p": $options.dataP
294
307
  }, _ctx.ptmi('root')), [_ctx.$slots.container ? renderSlot(_ctx.$slots, "container", {
295
308
  key: 0,
296
309
  closeCallback: $options.hide
@@ -306,37 +319,41 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
306
319
  key: 0,
307
320
  "class": _ctx.cx('title')
308
321
  }, _ctx.ptm('title')), toDisplayString(_ctx.header), 17)) : createCommentVNode("", true)];
309
- }), _ctx.showCloseIcon ? (openBlock(), createBlock(_component_Button, mergeProps({
322
+ }), _ctx.showCloseIcon ? renderSlot(_ctx.$slots, "closebutton", {
310
323
  key: 0,
311
- ref: $options.closeButtonRef,
312
- type: "button",
313
- "class": _ctx.cx('pcCloseButton'),
314
- "aria-label": $options.closeAriaLabel,
315
- unstyled: _ctx.unstyled,
316
- onClick: $options.hide
317
- }, _ctx.closeButtonProps, {
318
- pt: _ctx.ptm('pcCloseButton'),
319
- "data-pc-group-section": "iconcontainer"
320
- }), {
321
- icon: withCtx(function (slotProps) {
322
- return [renderSlot(_ctx.$slots, "closeicon", {}, function () {
323
- return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon ? 'span' : 'TimesIcon'), mergeProps({
324
- "class": [_ctx.closeIcon, slotProps["class"]]
325
- }, _ctx.ptm('pcCloseButton')['icon']), null, 16, ["class"]))];
326
- })];
327
- }),
328
- _: 3
329
- }, 16, ["class", "aria-label", "unstyled", "onClick", "pt"])) : createCommentVNode("", true)], 16), createElementVNode("div", mergeProps({
324
+ closeCallback: $options.hide
325
+ }, function () {
326
+ return [createVNode(_component_Button, mergeProps({
327
+ ref: $options.closeButtonRef,
328
+ type: "button",
329
+ "class": _ctx.cx('pcCloseButton'),
330
+ "aria-label": $options.closeAriaLabel,
331
+ unstyled: _ctx.unstyled,
332
+ onClick: $options.hide
333
+ }, _ctx.closeButtonProps, {
334
+ pt: _ctx.ptm('pcCloseButton'),
335
+ "data-pc-group-section": "iconcontainer"
336
+ }), {
337
+ icon: withCtx(function (slotProps) {
338
+ return [renderSlot(_ctx.$slots, "closeicon", {}, function () {
339
+ return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon ? 'span' : 'TimesIcon'), mergeProps({
340
+ "class": [_ctx.closeIcon, slotProps["class"]]
341
+ }, _ctx.ptm('pcCloseButton')['icon']), null, 16, ["class"]))];
342
+ })];
343
+ }),
344
+ _: 3
345
+ }, 16, ["class", "aria-label", "unstyled", "onClick", "pt"])];
346
+ }) : createCommentVNode("", true)], 16), createElementVNode("div", mergeProps({
330
347
  ref: $options.contentRef,
331
348
  "class": _ctx.cx('content')
332
349
  }, _ctx.ptm('content')), [renderSlot(_ctx.$slots, "default")], 16), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({
333
350
  key: 0,
334
351
  ref: $options.footerContainerRef,
335
352
  "class": _ctx.cx('footer')
336
- }, _ctx.ptm('footer')), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 64))], 16, _hoisted_1)), [[_directive_focustrap]]) : createCommentVNode("", true)];
353
+ }, _ctx.ptm('footer')), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 64))], 16, _hoisted_2)), [[_directive_focustrap]]) : createCommentVNode("", true)];
337
354
  }),
338
355
  _: 3
339
- }, 16, ["onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])], 16)) : createCommentVNode("", true)];
356
+ }, 16, ["onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])], 16, _hoisted_1)) : createCommentVNode("", true)];
340
357
  }),
341
358
  _: 3
342
359
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/drawer/BaseDrawer.vue","../../src/drawer/Drawer.vue","../../src/drawer/Drawer.vue?vue&type=template&id=45071c85&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport DrawerStyle from 'primevue/drawer/style';\n\nexport default {\n name: 'BaseDrawer',\n extends: BaseComponent,\n props: {\n visible: {\n type: Boolean,\n default: false\n },\n position: {\n type: String,\n default: 'left'\n },\n header: {\n type: null,\n default: null\n },\n baseZIndex: {\n type: Number,\n default: 0\n },\n autoZIndex: {\n type: Boolean,\n default: true\n },\n dismissable: {\n type: Boolean,\n default: true\n },\n showCloseIcon: {\n type: Boolean,\n default: true\n },\n closeButtonProps: {\n type: Object,\n default: () => {\n return { severity: 'secondary', text: true, rounded: true };\n }\n },\n closeIcon: {\n type: String,\n default: undefined\n },\n modal: {\n type: Boolean,\n default: true\n },\n blockScroll: {\n type: Boolean,\n default: false\n }\n },\n style: DrawerStyle,\n provide() {\n return {\n $pcDrawer: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <Portal>\n <div v-if=\"containerVisible\" :ref=\"maskRef\" @mousedown=\"onMaskClick\" :class=\"cx('mask')\" :style=\"sx('mask', true, { position, modal })\" v-bind=\"ptm('mask')\">\n <transition name=\"p-drawer\" @enter=\"onEnter\" @after-enter=\"onAfterEnter\" @before-leave=\"onBeforeLeave\" @leave=\"onLeave\" @after-leave=\"onAfterLeave\" appear v-bind=\"ptm('transition')\">\n <div v-if=\"visible\" :ref=\"containerRef\" v-focustrap :class=\"cx('root')\" :style=\"sx('root')\" role=\"complementary\" :aria-modal=\"modal\" v-bind=\"ptmi('root')\">\n <slot v-if=\"$slots.container\" name=\"container\" :closeCallback=\"hide\"></slot>\n <template v-else>\n <div :ref=\"headerContainerRef\" :class=\"cx('header')\" v-bind=\"ptm('header')\">\n <slot name=\"header\" :class=\"cx('title')\">\n <div v-if=\"header\" :class=\"cx('title')\" v-bind=\"ptm('title')\">{{ header }}</div>\n </slot>\n <Button\n v-if=\"showCloseIcon\"\n :ref=\"closeButtonRef\"\n type=\"button\"\n :class=\"cx('pcCloseButton')\"\n :aria-label=\"closeAriaLabel\"\n :unstyled=\"unstyled\"\n @click=\"hide\"\n v-bind=\"closeButtonProps\"\n :pt=\"ptm('pcCloseButton')\"\n data-pc-group-section=\"iconcontainer\"\n >\n <template #icon=\"slotProps\">\n <slot name=\"closeicon\">\n <component :is=\"closeIcon ? 'span' : 'TimesIcon'\" :class=\"[closeIcon, slotProps.class]\" v-bind=\"ptm('pcCloseButton')['icon']\"></component>\n </slot>\n </template>\n </Button>\n </div>\n <div :ref=\"contentRef\" :class=\"cx('content')\" v-bind=\"ptm('content')\">\n <slot></slot>\n </div>\n <div v-if=\"$slots.footer\" :ref=\"footerContainerRef\" :class=\"cx('footer')\" v-bind=\"ptm('footer')\">\n <slot name=\"footer\"> </slot>\n </div>\n </template>\n </div>\n </transition>\n </div>\n </Portal>\n</template>\n\n<script>\nimport { addClass, focus } from '@primeuix/utils/dom';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport TimesIcon from '@primevue/icons/times';\nimport Button from 'primevue/button';\nimport FocusTrap from 'primevue/focustrap';\nimport Portal from 'primevue/portal';\nimport { blockBodyScroll, unblockBodyScroll } from 'primevue/utils';\nimport BaseDrawer from './BaseDrawer.vue';\n\nexport default {\n name: 'Drawer',\n extends: BaseDrawer,\n inheritAttrs: false,\n emits: ['update:visible', 'show', 'after-show', 'hide', 'after-hide', 'before-hide'],\n data() {\n return {\n containerVisible: this.visible\n };\n },\n container: null,\n mask: null,\n content: null,\n headerContainer: null,\n footerContainer: null,\n closeButton: null,\n outsideClickListener: null,\n documentKeydownListener: null,\n watch: {\n dismissable(newValue) {\n if (newValue) {\n this.enableDocumentSettings();\n } else {\n this.disableDocumentSettings();\n }\n }\n },\n updated() {\n if (this.visible) {\n this.containerVisible = this.visible;\n }\n },\n beforeUnmount() {\n this.disableDocumentSettings();\n\n if (this.mask && this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.container = null;\n this.mask = null;\n },\n methods: {\n hide() {\n this.$emit('update:visible', false);\n },\n onEnter() {\n this.$emit('show');\n this.focus();\n this.bindDocumentKeyDownListener();\n\n if (this.autoZIndex) {\n ZIndex.set('modal', this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal);\n }\n },\n onAfterEnter() {\n this.enableDocumentSettings();\n this.$emit('after-show');\n },\n onBeforeLeave() {\n if (this.modal) {\n !this.isUnstyled && addClass(this.mask, 'p-overlay-mask-leave');\n }\n\n this.$emit('before-hide');\n },\n onLeave() {\n this.$emit('hide');\n },\n onAfterLeave() {\n if (this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.unbindDocumentKeyDownListener();\n this.containerVisible = false;\n this.disableDocumentSettings();\n this.$emit('after-hide');\n },\n onMaskClick(event) {\n if (this.dismissable && this.modal && this.mask === event.target) {\n this.hide();\n }\n },\n focus() {\n const findFocusableElement = (container) => {\n return container && container.querySelector('[autofocus]');\n };\n\n let focusTarget = this.$slots.header && findFocusableElement(this.headerContainer);\n\n if (!focusTarget) {\n focusTarget = this.$slots.default && findFocusableElement(this.container);\n\n if (!focusTarget) {\n focusTarget = this.$slots.footer && findFocusableElement(this.footerContainer);\n\n if (!focusTarget) {\n focusTarget = this.closeButton;\n }\n }\n }\n\n focusTarget && focus(focusTarget);\n },\n enableDocumentSettings() {\n if (this.dismissable && !this.modal) {\n this.bindOutsideClickListener();\n }\n\n if (this.blockScroll) {\n blockBodyScroll();\n }\n },\n disableDocumentSettings() {\n this.unbindOutsideClickListener();\n\n if (this.blockScroll) {\n unblockBodyScroll();\n }\n },\n onKeydown(event) {\n if (event.code === 'Escape') {\n this.hide();\n }\n },\n containerRef(el) {\n this.container = el;\n },\n maskRef(el) {\n this.mask = el;\n },\n contentRef(el) {\n this.content = el;\n },\n headerContainerRef(el) {\n this.headerContainer = el;\n },\n footerContainerRef(el) {\n this.footerContainer = el;\n },\n closeButtonRef(el) {\n this.closeButton = el ? el.$el : undefined;\n },\n bindDocumentKeyDownListener() {\n if (!this.documentKeydownListener) {\n this.documentKeydownListener = this.onKeydown;\n document.addEventListener('keydown', this.documentKeydownListener);\n }\n },\n unbindDocumentKeyDownListener() {\n if (this.documentKeydownListener) {\n document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n },\n bindOutsideClickListener() {\n if (!this.outsideClickListener) {\n this.outsideClickListener = (event) => {\n if (this.isOutsideClicked(event)) {\n this.hide();\n }\n };\n\n document.addEventListener('click', this.outsideClickListener, true);\n }\n },\n unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener, true);\n this.outsideClickListener = null;\n }\n },\n isOutsideClicked(event) {\n return this.container && !this.container.contains(event.target);\n }\n },\n computed: {\n fullScreen() {\n return this.position === 'full';\n },\n closeAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;\n }\n },\n directives: {\n focustrap: FocusTrap\n },\n components: {\n Button,\n Portal,\n TimesIcon\n }\n};\n</script>\n","<template>\n <Portal>\n <div v-if=\"containerVisible\" :ref=\"maskRef\" @mousedown=\"onMaskClick\" :class=\"cx('mask')\" :style=\"sx('mask', true, { position, modal })\" v-bind=\"ptm('mask')\">\n <transition name=\"p-drawer\" @enter=\"onEnter\" @after-enter=\"onAfterEnter\" @before-leave=\"onBeforeLeave\" @leave=\"onLeave\" @after-leave=\"onAfterLeave\" appear v-bind=\"ptm('transition')\">\n <div v-if=\"visible\" :ref=\"containerRef\" v-focustrap :class=\"cx('root')\" :style=\"sx('root')\" role=\"complementary\" :aria-modal=\"modal\" v-bind=\"ptmi('root')\">\n <slot v-if=\"$slots.container\" name=\"container\" :closeCallback=\"hide\"></slot>\n <template v-else>\n <div :ref=\"headerContainerRef\" :class=\"cx('header')\" v-bind=\"ptm('header')\">\n <slot name=\"header\" :class=\"cx('title')\">\n <div v-if=\"header\" :class=\"cx('title')\" v-bind=\"ptm('title')\">{{ header }}</div>\n </slot>\n <Button\n v-if=\"showCloseIcon\"\n :ref=\"closeButtonRef\"\n type=\"button\"\n :class=\"cx('pcCloseButton')\"\n :aria-label=\"closeAriaLabel\"\n :unstyled=\"unstyled\"\n @click=\"hide\"\n v-bind=\"closeButtonProps\"\n :pt=\"ptm('pcCloseButton')\"\n data-pc-group-section=\"iconcontainer\"\n >\n <template #icon=\"slotProps\">\n <slot name=\"closeicon\">\n <component :is=\"closeIcon ? 'span' : 'TimesIcon'\" :class=\"[closeIcon, slotProps.class]\" v-bind=\"ptm('pcCloseButton')['icon']\"></component>\n </slot>\n </template>\n </Button>\n </div>\n <div :ref=\"contentRef\" :class=\"cx('content')\" v-bind=\"ptm('content')\">\n <slot></slot>\n </div>\n <div v-if=\"$slots.footer\" :ref=\"footerContainerRef\" :class=\"cx('footer')\" v-bind=\"ptm('footer')\">\n <slot name=\"footer\"> </slot>\n </div>\n </template>\n </div>\n </transition>\n </div>\n </Portal>\n</template>\n\n<script>\nimport { addClass, focus } from '@primeuix/utils/dom';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport TimesIcon from '@primevue/icons/times';\nimport Button from 'primevue/button';\nimport FocusTrap from 'primevue/focustrap';\nimport Portal from 'primevue/portal';\nimport { blockBodyScroll, unblockBodyScroll } from 'primevue/utils';\nimport BaseDrawer from './BaseDrawer.vue';\n\nexport default {\n name: 'Drawer',\n extends: BaseDrawer,\n inheritAttrs: false,\n emits: ['update:visible', 'show', 'after-show', 'hide', 'after-hide', 'before-hide'],\n data() {\n return {\n containerVisible: this.visible\n };\n },\n container: null,\n mask: null,\n content: null,\n headerContainer: null,\n footerContainer: null,\n closeButton: null,\n outsideClickListener: null,\n documentKeydownListener: null,\n watch: {\n dismissable(newValue) {\n if (newValue) {\n this.enableDocumentSettings();\n } else {\n this.disableDocumentSettings();\n }\n }\n },\n updated() {\n if (this.visible) {\n this.containerVisible = this.visible;\n }\n },\n beforeUnmount() {\n this.disableDocumentSettings();\n\n if (this.mask && this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.container = null;\n this.mask = null;\n },\n methods: {\n hide() {\n this.$emit('update:visible', false);\n },\n onEnter() {\n this.$emit('show');\n this.focus();\n this.bindDocumentKeyDownListener();\n\n if (this.autoZIndex) {\n ZIndex.set('modal', this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal);\n }\n },\n onAfterEnter() {\n this.enableDocumentSettings();\n this.$emit('after-show');\n },\n onBeforeLeave() {\n if (this.modal) {\n !this.isUnstyled && addClass(this.mask, 'p-overlay-mask-leave');\n }\n\n this.$emit('before-hide');\n },\n onLeave() {\n this.$emit('hide');\n },\n onAfterLeave() {\n if (this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.unbindDocumentKeyDownListener();\n this.containerVisible = false;\n this.disableDocumentSettings();\n this.$emit('after-hide');\n },\n onMaskClick(event) {\n if (this.dismissable && this.modal && this.mask === event.target) {\n this.hide();\n }\n },\n focus() {\n const findFocusableElement = (container) => {\n return container && container.querySelector('[autofocus]');\n };\n\n let focusTarget = this.$slots.header && findFocusableElement(this.headerContainer);\n\n if (!focusTarget) {\n focusTarget = this.$slots.default && findFocusableElement(this.container);\n\n if (!focusTarget) {\n focusTarget = this.$slots.footer && findFocusableElement(this.footerContainer);\n\n if (!focusTarget) {\n focusTarget = this.closeButton;\n }\n }\n }\n\n focusTarget && focus(focusTarget);\n },\n enableDocumentSettings() {\n if (this.dismissable && !this.modal) {\n this.bindOutsideClickListener();\n }\n\n if (this.blockScroll) {\n blockBodyScroll();\n }\n },\n disableDocumentSettings() {\n this.unbindOutsideClickListener();\n\n if (this.blockScroll) {\n unblockBodyScroll();\n }\n },\n onKeydown(event) {\n if (event.code === 'Escape') {\n this.hide();\n }\n },\n containerRef(el) {\n this.container = el;\n },\n maskRef(el) {\n this.mask = el;\n },\n contentRef(el) {\n this.content = el;\n },\n headerContainerRef(el) {\n this.headerContainer = el;\n },\n footerContainerRef(el) {\n this.footerContainer = el;\n },\n closeButtonRef(el) {\n this.closeButton = el ? el.$el : undefined;\n },\n bindDocumentKeyDownListener() {\n if (!this.documentKeydownListener) {\n this.documentKeydownListener = this.onKeydown;\n document.addEventListener('keydown', this.documentKeydownListener);\n }\n },\n unbindDocumentKeyDownListener() {\n if (this.documentKeydownListener) {\n document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n },\n bindOutsideClickListener() {\n if (!this.outsideClickListener) {\n this.outsideClickListener = (event) => {\n if (this.isOutsideClicked(event)) {\n this.hide();\n }\n };\n\n document.addEventListener('click', this.outsideClickListener, true);\n }\n },\n unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener, true);\n this.outsideClickListener = null;\n }\n },\n isOutsideClicked(event) {\n return this.container && !this.container.contains(event.target);\n }\n },\n computed: {\n fullScreen() {\n return this.position === 'full';\n },\n closeAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;\n }\n },\n directives: {\n focustrap: FocusTrap\n },\n components: {\n Button,\n Portal,\n TimesIcon\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","visible","type","Boolean","position","String","header","baseZIndex","Number","autoZIndex","dismissable","showCloseIcon","closeButtonProps","Object","default","severity","text","rounded","closeIcon","undefined","modal","blockScroll","style","DrawerStyle","provide","$pcDrawer","$parentInstance","BaseDrawer","inheritAttrs","emits","data","containerVisible","container","mask","content","headerContainer","footerContainer","closeButton","outsideClickListener","documentKeydownListener","watch","newValue","enableDocumentSettings","disableDocumentSettings","updated","beforeUnmount","ZIndex","clear","methods","hide","$emit","onEnter","focus","bindDocumentKeyDownListener","set","$primevue","config","zIndex","onAfterEnter","onBeforeLeave","isUnstyled","addClass","onLeave","onAfterLeave","unbindDocumentKeyDownListener","onMaskClick","event","target","findFocusableElement","querySelector","focusTarget","$slots","footer","bindOutsideClickListener","blockBodyScroll","unbindOutsideClickListener","unblockBodyScroll","onKeydown","code","containerRef","el","maskRef","contentRef","headerContainerRef","footerContainerRef","closeButtonRef","$el","document","addEventListener","removeEventListener","_this","isOutsideClicked","contains","computed","fullScreen","closeAriaLabel","locale","aria","close","directives","focustrap","FocusTrap","components","Button","Portal","TimesIcon","_createBlock","_component_Portal","$data","_openBlock","_createElementBlock","_mergeProps","ref","$options","onMousedown","apply","arguments","_ctx","cx","sx","ptm","_createVNode","_Transition","appear","_withDirectives","role","ptmi","_renderSlot","closeCallback","_Fragment","key","_createElementVNode","_component_Button","unstyled","onClick","pt","icon","_withCtx","slotProps","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,YAAY;AAClB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,OAAO,EAAE;AACLC,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDC,IAAAA,QAAQ,EAAE;AACNF,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,MAAM,EAAE;AACJJ,MAAAA,IAAI,EAAE,IAAI;MACV,SAAS,EAAA;KACZ;AACDK,IAAAA,UAAU,EAAE;AACRL,MAAAA,IAAI,EAAEM,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,UAAU,EAAE;AACRP,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDO,IAAAA,WAAW,EAAE;AACTR,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDQ,IAAAA,aAAa,EAAE;AACXT,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDS,IAAAA,gBAAgB,EAAE;AACdV,MAAAA,IAAI,EAAEW,MAAM;MACZ,SAAS,EAAA,SAATC,QAAOA,GAAQ;QACX,OAAO;AAAEC,UAAAA,QAAQ,EAAE,WAAW;AAAEC,UAAAA,IAAI,EAAE,IAAI;AAAEC,UAAAA,OAAO,EAAE;SAAM;AAC/D;KACH;AACDC,IAAAA,SAAS,EAAE;AACPhB,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAASc,EAAAA;KACZ;AACDC,IAAAA,KAAK,EAAE;AACHlB,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDkB,IAAAA,W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nHW,kBAAA,CAEK,OAFLpB,UAEK,CAAA;YAFCC,GAAG,EAAEC,QAAU,CAAA/B,UAAA;AAAG,YAAA,OAAA,EAAOmC,IAAE,CAAAC,EAAA,CAAA,SAAA;aAAqBD,IAAG,CAAAG,GAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CACrDO,UAAY,CAAAV,IAAA,CAAA9C,MAAA,EAAA,SAAA,CAAA,QAEL8C,IAAA,CAAA9C,MAAM,CAACC,MAAM,IAAxBqC,SAAA,EAAA,EAAAC,kBAAA,CAEK,OAFLC,UAEK,CAAA;;YAFsBC,GAAG,EAAEC,QAAkB,CAAA7B,kBAAA;AAAG,YAAA,OAAA,EAAOiC,IAAE,CAAAC,EAAA,CAAA,QAAA;aAAoBD,IAAG,CAAAG,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,CACjFO,UAA2B,CAAAV,IAAA,CAAA9C,MAAA,EAAA,QAAA,CAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/drawer/BaseDrawer.vue","../../src/drawer/Drawer.vue","../../src/drawer/Drawer.vue?vue&type=template&id=148b78ee&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport DrawerStyle from 'primevue/drawer/style';\n\nexport default {\n name: 'BaseDrawer',\n extends: BaseComponent,\n props: {\n visible: {\n type: Boolean,\n default: false\n },\n position: {\n type: String,\n default: 'left'\n },\n header: {\n type: null,\n default: null\n },\n baseZIndex: {\n type: Number,\n default: 0\n },\n autoZIndex: {\n type: Boolean,\n default: true\n },\n dismissable: {\n type: Boolean,\n default: true\n },\n showCloseIcon: {\n type: Boolean,\n default: true\n },\n closeButtonProps: {\n type: Object,\n default: () => {\n return { severity: 'secondary', text: true, rounded: true };\n }\n },\n closeIcon: {\n type: String,\n default: undefined\n },\n modal: {\n type: Boolean,\n default: true\n },\n blockScroll: {\n type: Boolean,\n default: false\n }\n },\n style: DrawerStyle,\n provide() {\n return {\n $pcDrawer: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <Portal>\n <div v-if=\"containerVisible\" :ref=\"maskRef\" @mousedown=\"onMaskClick\" :class=\"cx('mask')\" :style=\"sx('mask', true, { position, modal })\" :data-p=\"dataP\" v-bind=\"ptm('mask')\">\n <transition name=\"p-drawer\" @enter=\"onEnter\" @after-enter=\"onAfterEnter\" @before-leave=\"onBeforeLeave\" @leave=\"onLeave\" @after-leave=\"onAfterLeave\" appear v-bind=\"ptm('transition')\">\n <div v-if=\"visible\" :ref=\"containerRef\" v-focustrap :class=\"cx('root')\" :style=\"sx('root')\" role=\"complementary\" :aria-modal=\"modal\" :data-p=\"dataP\" v-bind=\"ptmi('root')\">\n <slot v-if=\"$slots.container\" name=\"container\" :closeCallback=\"hide\"></slot>\n <template v-else>\n <div :ref=\"headerContainerRef\" :class=\"cx('header')\" v-bind=\"ptm('header')\">\n <slot name=\"header\" :class=\"cx('title')\">\n <div v-if=\"header\" :class=\"cx('title')\" v-bind=\"ptm('title')\">{{ header }}</div>\n </slot>\n <slot v-if=\"showCloseIcon\" name=\"closebutton\" :closeCallback=\"hide\">\n <Button\n :ref=\"closeButtonRef\"\n type=\"button\"\n :class=\"cx('pcCloseButton')\"\n :aria-label=\"closeAriaLabel\"\n :unstyled=\"unstyled\"\n @click=\"hide\"\n v-bind=\"closeButtonProps\"\n :pt=\"ptm('pcCloseButton')\"\n data-pc-group-section=\"iconcontainer\"\n >\n <template #icon=\"slotProps\">\n <slot name=\"closeicon\">\n <component :is=\"closeIcon ? 'span' : 'TimesIcon'\" :class=\"[closeIcon, slotProps.class]\" v-bind=\"ptm('pcCloseButton')['icon']\"></component>\n </slot>\n </template>\n </Button>\n </slot>\n </div>\n <div :ref=\"contentRef\" :class=\"cx('content')\" v-bind=\"ptm('content')\">\n <slot></slot>\n </div>\n <div v-if=\"$slots.footer\" :ref=\"footerContainerRef\" :class=\"cx('footer')\" v-bind=\"ptm('footer')\">\n <slot name=\"footer\"> </slot>\n </div>\n </template>\n </div>\n </transition>\n </div>\n </Portal>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { addClass, focus } from '@primeuix/utils/dom';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport TimesIcon from '@primevue/icons/times';\nimport Button from 'primevue/button';\nimport FocusTrap from 'primevue/focustrap';\nimport Portal from 'primevue/portal';\nimport { blockBodyScroll, unblockBodyScroll } from 'primevue/utils';\nimport BaseDrawer from './BaseDrawer.vue';\n\nexport default {\n name: 'Drawer',\n extends: BaseDrawer,\n inheritAttrs: false,\n emits: ['update:visible', 'show', 'after-show', 'hide', 'after-hide', 'before-hide'],\n data() {\n return {\n containerVisible: this.visible\n };\n },\n container: null,\n mask: null,\n content: null,\n headerContainer: null,\n footerContainer: null,\n closeButton: null,\n outsideClickListener: null,\n documentKeydownListener: null,\n watch: {\n dismissable(newValue) {\n if (newValue) {\n this.enableDocumentSettings();\n } else {\n this.disableDocumentSettings();\n }\n }\n },\n updated() {\n if (this.visible) {\n this.containerVisible = this.visible;\n }\n },\n beforeUnmount() {\n this.disableDocumentSettings();\n\n if (this.mask && this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.container = null;\n this.mask = null;\n },\n methods: {\n hide() {\n this.$emit('update:visible', false);\n },\n onEnter() {\n this.$emit('show');\n this.focus();\n this.bindDocumentKeyDownListener();\n\n if (this.autoZIndex) {\n ZIndex.set('modal', this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal);\n }\n },\n onAfterEnter() {\n this.enableDocumentSettings();\n this.$emit('after-show');\n },\n onBeforeLeave() {\n if (this.modal) {\n !this.isUnstyled && addClass(this.mask, 'p-overlay-mask-leave');\n }\n\n this.$emit('before-hide');\n },\n onLeave() {\n this.$emit('hide');\n },\n onAfterLeave() {\n if (this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.unbindDocumentKeyDownListener();\n this.containerVisible = false;\n this.disableDocumentSettings();\n this.$emit('after-hide');\n },\n onMaskClick(event) {\n if (this.dismissable && this.modal && this.mask === event.target) {\n this.hide();\n }\n },\n focus() {\n const findFocusableElement = (container) => {\n return container && container.querySelector('[autofocus]');\n };\n\n let focusTarget = this.$slots.header && findFocusableElement(this.headerContainer);\n\n if (!focusTarget) {\n focusTarget = this.$slots.default && findFocusableElement(this.container);\n\n if (!focusTarget) {\n focusTarget = this.$slots.footer && findFocusableElement(this.footerContainer);\n\n if (!focusTarget) {\n focusTarget = this.closeButton;\n }\n }\n }\n\n focusTarget && focus(focusTarget);\n },\n enableDocumentSettings() {\n if (this.dismissable && !this.modal) {\n this.bindOutsideClickListener();\n }\n\n if (this.blockScroll) {\n blockBodyScroll();\n }\n },\n disableDocumentSettings() {\n this.unbindOutsideClickListener();\n\n if (this.blockScroll) {\n unblockBodyScroll();\n }\n },\n onKeydown(event) {\n if (event.code === 'Escape') {\n this.hide();\n }\n },\n containerRef(el) {\n this.container = el;\n },\n maskRef(el) {\n this.mask = el;\n },\n contentRef(el) {\n this.content = el;\n },\n headerContainerRef(el) {\n this.headerContainer = el;\n },\n footerContainerRef(el) {\n this.footerContainer = el;\n },\n closeButtonRef(el) {\n this.closeButton = el ? el.$el : undefined;\n },\n bindDocumentKeyDownListener() {\n if (!this.documentKeydownListener) {\n this.documentKeydownListener = this.onKeydown;\n document.addEventListener('keydown', this.documentKeydownListener);\n }\n },\n unbindDocumentKeyDownListener() {\n if (this.documentKeydownListener) {\n document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n },\n bindOutsideClickListener() {\n if (!this.outsideClickListener) {\n this.outsideClickListener = (event) => {\n if (this.isOutsideClicked(event)) {\n this.hide();\n }\n };\n\n document.addEventListener('click', this.outsideClickListener, true);\n }\n },\n unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener, true);\n this.outsideClickListener = null;\n }\n },\n isOutsideClicked(event) {\n return this.container && !this.container.contains(event.target);\n }\n },\n computed: {\n fullScreen() {\n return this.position === 'full';\n },\n closeAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;\n },\n dataP() {\n return cn({\n 'full-screen': this.position === 'full',\n [this.position]: this.position,\n open: this.containerVisible,\n modal: this.modal\n });\n }\n },\n directives: {\n focustrap: FocusTrap\n },\n components: {\n Button,\n Portal,\n TimesIcon\n }\n};\n</script>\n","<template>\n <Portal>\n <div v-if=\"containerVisible\" :ref=\"maskRef\" @mousedown=\"onMaskClick\" :class=\"cx('mask')\" :style=\"sx('mask', true, { position, modal })\" :data-p=\"dataP\" v-bind=\"ptm('mask')\">\n <transition name=\"p-drawer\" @enter=\"onEnter\" @after-enter=\"onAfterEnter\" @before-leave=\"onBeforeLeave\" @leave=\"onLeave\" @after-leave=\"onAfterLeave\" appear v-bind=\"ptm('transition')\">\n <div v-if=\"visible\" :ref=\"containerRef\" v-focustrap :class=\"cx('root')\" :style=\"sx('root')\" role=\"complementary\" :aria-modal=\"modal\" :data-p=\"dataP\" v-bind=\"ptmi('root')\">\n <slot v-if=\"$slots.container\" name=\"container\" :closeCallback=\"hide\"></slot>\n <template v-else>\n <div :ref=\"headerContainerRef\" :class=\"cx('header')\" v-bind=\"ptm('header')\">\n <slot name=\"header\" :class=\"cx('title')\">\n <div v-if=\"header\" :class=\"cx('title')\" v-bind=\"ptm('title')\">{{ header }}</div>\n </slot>\n <slot v-if=\"showCloseIcon\" name=\"closebutton\" :closeCallback=\"hide\">\n <Button\n :ref=\"closeButtonRef\"\n type=\"button\"\n :class=\"cx('pcCloseButton')\"\n :aria-label=\"closeAriaLabel\"\n :unstyled=\"unstyled\"\n @click=\"hide\"\n v-bind=\"closeButtonProps\"\n :pt=\"ptm('pcCloseButton')\"\n data-pc-group-section=\"iconcontainer\"\n >\n <template #icon=\"slotProps\">\n <slot name=\"closeicon\">\n <component :is=\"closeIcon ? 'span' : 'TimesIcon'\" :class=\"[closeIcon, slotProps.class]\" v-bind=\"ptm('pcCloseButton')['icon']\"></component>\n </slot>\n </template>\n </Button>\n </slot>\n </div>\n <div :ref=\"contentRef\" :class=\"cx('content')\" v-bind=\"ptm('content')\">\n <slot></slot>\n </div>\n <div v-if=\"$slots.footer\" :ref=\"footerContainerRef\" :class=\"cx('footer')\" v-bind=\"ptm('footer')\">\n <slot name=\"footer\"> </slot>\n </div>\n </template>\n </div>\n </transition>\n </div>\n </Portal>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { addClass, focus } from '@primeuix/utils/dom';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport TimesIcon from '@primevue/icons/times';\nimport Button from 'primevue/button';\nimport FocusTrap from 'primevue/focustrap';\nimport Portal from 'primevue/portal';\nimport { blockBodyScroll, unblockBodyScroll } from 'primevue/utils';\nimport BaseDrawer from './BaseDrawer.vue';\n\nexport default {\n name: 'Drawer',\n extends: BaseDrawer,\n inheritAttrs: false,\n emits: ['update:visible', 'show', 'after-show', 'hide', 'after-hide', 'before-hide'],\n data() {\n return {\n containerVisible: this.visible\n };\n },\n container: null,\n mask: null,\n content: null,\n headerContainer: null,\n footerContainer: null,\n closeButton: null,\n outsideClickListener: null,\n documentKeydownListener: null,\n watch: {\n dismissable(newValue) {\n if (newValue) {\n this.enableDocumentSettings();\n } else {\n this.disableDocumentSettings();\n }\n }\n },\n updated() {\n if (this.visible) {\n this.containerVisible = this.visible;\n }\n },\n beforeUnmount() {\n this.disableDocumentSettings();\n\n if (this.mask && this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.container = null;\n this.mask = null;\n },\n methods: {\n hide() {\n this.$emit('update:visible', false);\n },\n onEnter() {\n this.$emit('show');\n this.focus();\n this.bindDocumentKeyDownListener();\n\n if (this.autoZIndex) {\n ZIndex.set('modal', this.mask, this.baseZIndex || this.$primevue.config.zIndex.modal);\n }\n },\n onAfterEnter() {\n this.enableDocumentSettings();\n this.$emit('after-show');\n },\n onBeforeLeave() {\n if (this.modal) {\n !this.isUnstyled && addClass(this.mask, 'p-overlay-mask-leave');\n }\n\n this.$emit('before-hide');\n },\n onLeave() {\n this.$emit('hide');\n },\n onAfterLeave() {\n if (this.autoZIndex) {\n ZIndex.clear(this.mask);\n }\n\n this.unbindDocumentKeyDownListener();\n this.containerVisible = false;\n this.disableDocumentSettings();\n this.$emit('after-hide');\n },\n onMaskClick(event) {\n if (this.dismissable && this.modal && this.mask === event.target) {\n this.hide();\n }\n },\n focus() {\n const findFocusableElement = (container) => {\n return container && container.querySelector('[autofocus]');\n };\n\n let focusTarget = this.$slots.header && findFocusableElement(this.headerContainer);\n\n if (!focusTarget) {\n focusTarget = this.$slots.default && findFocusableElement(this.container);\n\n if (!focusTarget) {\n focusTarget = this.$slots.footer && findFocusableElement(this.footerContainer);\n\n if (!focusTarget) {\n focusTarget = this.closeButton;\n }\n }\n }\n\n focusTarget && focus(focusTarget);\n },\n enableDocumentSettings() {\n if (this.dismissable && !this.modal) {\n this.bindOutsideClickListener();\n }\n\n if (this.blockScroll) {\n blockBodyScroll();\n }\n },\n disableDocumentSettings() {\n this.unbindOutsideClickListener();\n\n if (this.blockScroll) {\n unblockBodyScroll();\n }\n },\n onKeydown(event) {\n if (event.code === 'Escape') {\n this.hide();\n }\n },\n containerRef(el) {\n this.container = el;\n },\n maskRef(el) {\n this.mask = el;\n },\n contentRef(el) {\n this.content = el;\n },\n headerContainerRef(el) {\n this.headerContainer = el;\n },\n footerContainerRef(el) {\n this.footerContainer = el;\n },\n closeButtonRef(el) {\n this.closeButton = el ? el.$el : undefined;\n },\n bindDocumentKeyDownListener() {\n if (!this.documentKeydownListener) {\n this.documentKeydownListener = this.onKeydown;\n document.addEventListener('keydown', this.documentKeydownListener);\n }\n },\n unbindDocumentKeyDownListener() {\n if (this.documentKeydownListener) {\n document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n },\n bindOutsideClickListener() {\n if (!this.outsideClickListener) {\n this.outsideClickListener = (event) => {\n if (this.isOutsideClicked(event)) {\n this.hide();\n }\n };\n\n document.addEventListener('click', this.outsideClickListener, true);\n }\n },\n unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener, true);\n this.outsideClickListener = null;\n }\n },\n isOutsideClicked(event) {\n return this.container && !this.container.contains(event.target);\n }\n },\n computed: {\n fullScreen() {\n return this.position === 'full';\n },\n closeAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;\n },\n dataP() {\n return cn({\n 'full-screen': this.position === 'full',\n [this.position]: this.position,\n open: this.containerVisible,\n modal: this.modal\n });\n }\n },\n directives: {\n focustrap: FocusTrap\n },\n components: {\n Button,\n Portal,\n TimesIcon\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","visible","type","Boolean","position","String","header","baseZIndex","Number","autoZIndex","dismissable","showCloseIcon","closeButtonProps","Object","default","severity","text","rounded","closeIcon","undefined","modal","blockScroll","style","DrawerStyle","provide","$pcDrawer","$parentInstance","BaseDrawer","inheritAttrs","emits","data","containerVisible","container","mask","content","headerContainer","footerContainer","closeButton","outsideClickListener","documentKeydownListener","watch","newValue","enableDocumentSettings","disableDocumentSettings","updated","beforeUnmount","ZIndex","clear","methods","hide","$emit","onEnter","focus","bindDocumentKeyDownListener","set","$primevue","config","zIndex","onAfterEnter","onBeforeLeave","isUnstyled","addClass","onLeave","onAfterLeave","unbindDocumentKeyDownListener","onMaskClick","event","target","findFocusableElement","querySelector","focusTarget","$slots","footer","bindOutsideClickListener","blockBodyScroll","unbindOutsideClickListener","unblockBodyScroll","onKeydown","code","containerRef","el","maskRef","contentRef","headerContainerRef","footerContainerRef","closeButtonRef","$el","document","addEventListener","removeEventListener","_this","isOutsideClicked","contains","computed","fullScreen","closeAriaLabel","locale","aria","close","dataP","cn","_defineProperty","directives","focustrap","FocusTrap","components","Button","Portal","TimesIcon","_createBlock","_component_Portal","$data","_openBlock","_createElementBlock","_mergeProps","ref","$options","onMousedown","apply","arguments","_ctx","cx","sx","ptm","_createVNode","_Transition","appear","_withDirectives","role","ptmi","_renderSlot","closeCallback","_Fragment","key","_createElementVNode","_component_Button","unstyled","onClick","pt","icon","_withCtx","slotProps","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,YAAY;AAClB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,OAAO,EAAE;AACLC,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDC,IAAAA,QAAQ,EAAE;AACNF,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,MAAM,EAAE;AACJJ,MAAAA,IAAI,EAAE,IAAI;MACV,SAAS,EAAA;KACZ;AACDK,IAAAA,UAAU,EAAE;AACRL,MAAAA,IAAI,EAAEM,MAAM;MACZ,SAAS,EAAA;KACZ;AACDC,IAAAA,UAAU,EAAE;AACRP,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDO,IAAAA,WAAW,EAAE;AACTR,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDQ,IAAAA,aAAa,EAAE;AACXT,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDS,IAAAA,gBAAgB,EAAE;AACdV,MAAAA,IAAI,EAAEW,MAAM;MACZ,SAAS,EAAA,SAATC,QAAOA,GAAQ;QACX,OAAO;AAAEC,UAAAA,QAAQ,EAAE,WAAW;AAAEC,UAAAA,IAAI,EAAE,IAAI;AAAEC,UAAAA,OAAO,EAAE;SAAM;AAC/D;KACH;AACDC,IAAAA,SAAS,EAAE;AACPhB,MAAAA,IAAI,EAAEG,MAAM;MACZ,SAASc,EAAAA;KACZ;AACDC,IAAAA,KAAK,EAAE;AACHlB,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDkB,IAAAA,WAAW,EAAE;AACTnB,MAAAA,IAAI,EAAEC,OAAO;MACb,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AA,uBAAqB,EAAC;;AAEXgB,cAAAA,IAAI,EAAAC,OAAA,CACX,UAEMC,SAHgB,EAAA;gBAAA,OAAA,CACtBX,UAAA,CAEMV,8BAFN,YAAA;AAAA,kBAAA,OAEM,eADFX,WAAyI,CAAAiC,uBAAA,CAAzHtB,IAAU,CAAAtG,SAAA,GAAA,MAAA,GAAA,WAAA,CAAA,EAA1BgG,UAAyI,CAAA;AAAtF,oBAAA,OAAA,EAAQ,CAAAM,IAAA,CAAAtG,SAAS,EAAE2H,SAAS,CAAM,OAAA,CAAA;qBAAWrB,IAAG,CAAAG,GAAA,CAAA,eAAA,CAAA,CAAA,MAAA,CAAA,CAAA,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA,OAAA,CAAA,CAAA;;;;;mDAMvHW,kBAAA,CAEK,OAFLpB,UAEK,CAAA;YAFCC,GAAG,EAAEC,QAAU,CAAAlC,UAAA;AAAG,YAAA,OAAA,EAAOsC,IAAE,CAAAC,EAAA,CAAA,SAAA;aAAqBD,IAAG,CAAAG,GAAA,CAAA,SAAA,CAAA,CAAA,EAAA,CACrDO,UAAY,CAAAV,IAAA,CAAAjD,MAAA,EAAA,SAAA,CAAA,QAELiD,IAAA,CAAAjD,MAAM,CAACC,MAAM,IAAxBwC,SAAA,EAAA,EAAAC,kBAAA,CAEK,OAFLC,UAEK,CAAA;;YAFsBC,GAAG,EAAEC,QAAkB,CAAAhC,kBAAA;AAAG,YAAA,OAAA,EAAOoC,IAAE,CAAAC,EAAA,CAAA,QAAA;aAAoBD,IAAG,CAAAG,GAAA,CAAA,QAAA,CAAA,CAAA,EAAA,CACjFO,UAA2B,CAAAV,IAAA,CAAAjD,MAAA,EAAA,QAAA,CAAA;;;;;;;;;;;;;"}
@@ -75,8 +75,8 @@
75
75
  </slot>
76
76
  </template>
77
77
  </Button>
78
- <slot v-if="!auto" name="filelabel" :class="cx('filelabel')">
79
- <span :class="cx('filelabel')" :files="files">
78
+ <slot v-if="!auto" name="filelabel" :class="cx('filelabel')" :files="files">
79
+ <span :class="cx('filelabel')">
80
80
  {{ basicFileChosenLabel }}
81
81
  </span>
82
82
  </slot>
@@ -172,7 +172,6 @@ export default {
172
172
  }
173
173
 
174
174
  this.$emit('uploader', { files: this.files });
175
- this.clear();
176
175
  } else {
177
176
  let xhr = new XMLHttpRequest();
178
177
  let formData = new FormData();
@@ -210,6 +209,7 @@ export default {
210
209
  xhr: xhr,
211
210
  files: this.files
212
211
  });
212
+ this.uploadedFiles.push(...this.files);
213
213
  } else {
214
214
  this.$emit('error', {
215
215
  xhr: xhr,
@@ -217,7 +217,6 @@ export default {
217
217
  });
218
218
  }
219
219
 
220
- this.uploadedFiles.push(...this.files);
221
220
  this.clear();
222
221
  }
223
222
  };
@@ -343,7 +343,6 @@ var script = {
343
343
  this.$emit('uploader', {
344
344
  files: this.files
345
345
  });
346
- this.clear();
347
346
  } else {
348
347
  var xhr = new XMLHttpRequest();
349
348
  var formData = new FormData();
@@ -374,9 +373,9 @@ var script = {
374
373
  });
375
374
  xhr.onreadystatechange = function () {
376
375
  if (xhr.readyState === 4) {
377
- var _this$uploadedFiles;
378
376
  _this.progress = 0;
379
377
  if (xhr.status >= 200 && xhr.status < 300) {
378
+ var _this$uploadedFiles;
380
379
  if (_this.fileLimit) {
381
380
  _this.uploadedFileCount += _this.files.length;
382
381
  }
@@ -384,13 +383,13 @@ var script = {
384
383
  xhr: xhr,
385
384
  files: _this.files
386
385
  });
386
+ (_this$uploadedFiles = _this.uploadedFiles).push.apply(_this$uploadedFiles, _toConsumableArray(_this.files));
387
387
  } else {
388
388
  _this.$emit('error', {
389
389
  xhr: xhr,
390
390
  files: _this.files
391
391
  });
392
392
  }
393
- (_this$uploadedFiles = _this.uploadedFiles).push.apply(_this$uploadedFiles, _toConsumableArray(_this.files));
394
393
  _this.clear();
395
394
  }
396
395
  };
@@ -634,8 +633,7 @@ var script = {
634
633
  };
635
634
 
636
635
  var _hoisted_1 = ["multiple", "accept", "disabled"];
637
- var _hoisted_2 = ["files"];
638
- var _hoisted_3 = ["accept", "disabled", "multiple"];
636
+ var _hoisted_2 = ["accept", "disabled", "multiple"];
639
637
  function render(_ctx, _cache, $props, $setup, $data, $options) {
640
638
  var _component_Button = resolveComponent("Button");
641
639
  var _component_ProgressBar = resolveComponent("ProgressBar");
@@ -837,12 +835,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
837
835
  _: 3
838
836
  }, 16, ["label", "class", "style", "disabled", "unstyled", "onMouseup", "onKeydown", "onFocus", "onBlur", "pt"]), !_ctx.auto ? renderSlot(_ctx.$slots, "filelabel", {
839
837
  key: 0,
840
- "class": normalizeClass(_ctx.cx('filelabel'))
838
+ "class": normalizeClass(_ctx.cx('filelabel')),
839
+ files: $data.files
841
840
  }, function () {
842
841
  return [createElementVNode("span", {
843
- "class": normalizeClass(_ctx.cx('filelabel')),
844
- files: $data.files
845
- }, toDisplayString($options.basicFileChosenLabel), 11, _hoisted_2)];
842
+ "class": normalizeClass(_ctx.cx('filelabel'))
843
+ }, toDisplayString($options.basicFileChosenLabel), 3)];
846
844
  }) : createCommentVNode("", true), createElementVNode("input", mergeProps({
847
845
  ref: "fileInput",
848
846
  type: "file",
@@ -858,7 +856,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
858
856
  onBlur: _cache[7] || (_cache[7] = function () {
859
857
  return $options.onBlur && $options.onBlur.apply($options, arguments);
860
858
  })
861
- }, _ctx.ptm('input')), null, 16, _hoisted_3)], 16)) : createCommentVNode("", true);
859
+ }, _ctx.ptm('input')), null, 16, _hoisted_2)], 16)) : createCommentVNode("", true);
862
860
  }
863
861
 
864
862
  script.render = render;