primevue 4.3.1 → 4.3.3

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 (254) hide show
  1. package/accordionheader/AccordionHeader.vue +8 -2
  2. package/accordionheader/index.mjs +8 -1
  3. package/accordionheader/index.mjs.map +1 -1
  4. package/autocomplete/AutoComplete.vue +72 -16
  5. package/autocomplete/index.d.ts +3 -3
  6. package/autocomplete/index.mjs +84 -37
  7. package/autocomplete/index.mjs.map +1 -1
  8. package/avatar/Avatar.vue +13 -4
  9. package/avatar/index.d.ts +3 -3
  10. package/avatar/index.mjs +26 -6
  11. package/avatar/index.mjs.map +1 -1
  12. package/badge/Badge.vue +13 -2
  13. package/badge/index.d.ts +1 -1
  14. package/badge/index.mjs +18 -3
  15. package/badge/index.mjs.map +1 -1
  16. package/blockui/BlockUI.vue +15 -4
  17. package/blockui/index.mjs +13 -4
  18. package/blockui/index.mjs.map +1 -1
  19. package/button/Button.vue +30 -3
  20. package/button/index.d.ts +3 -7
  21. package/button/index.mjs +28 -9
  22. package/button/index.mjs.map +1 -1
  23. package/cascadeselect/CascadeSelect.vue +1 -1
  24. package/cascadeselect/index.d.ts +2 -2
  25. package/cascadeselect/index.mjs +1 -2
  26. package/cascadeselect/index.mjs.map +1 -1
  27. package/checkbox/Checkbox.vue +15 -5
  28. package/checkbox/index.d.ts +2 -2
  29. package/checkbox/index.mjs +29 -7
  30. package/checkbox/index.mjs.map +1 -1
  31. package/chip/BaseChip.vue +1 -1
  32. package/chip/Chip.vue +9 -1
  33. package/chip/index.d.ts +1 -1
  34. package/chip/index.mjs +13 -3
  35. package/chip/index.mjs.map +1 -1
  36. package/colorpicker/ColorPicker.vue +10 -2
  37. package/colorpicker/index.d.ts +1 -1
  38. package/colorpicker/index.mjs +9 -2
  39. package/colorpicker/index.mjs.map +1 -1
  40. package/column/index.d.ts +3 -3
  41. package/columngroup/index.d.ts +2 -2
  42. package/confirmationoptions/index.d.ts +1 -1
  43. package/datatable/BodyCell.vue +4 -1
  44. package/datatable/BodyRow.vue +2 -0
  45. package/datatable/ColumnFilter.vue +1 -1
  46. package/datatable/DataTable.vue +103 -44
  47. package/datatable/HeaderCheckbox.vue +2 -2
  48. package/datatable/RowCheckbox.vue +1 -1
  49. package/datatable/TableBody.vue +12 -1
  50. package/datatable/TableFooter.vue +9 -1
  51. package/datatable/TableHeader.vue +9 -2
  52. package/datatable/index.d.ts +45 -37
  53. package/datatable/index.mjs +170 -101
  54. package/datatable/index.mjs.map +1 -1
  55. package/dataview/DataView.vue +4 -0
  56. package/dataview/index.d.ts +61 -4
  57. package/dataview/index.mjs +6 -2
  58. package/dataview/index.mjs.map +1 -1
  59. package/datepicker/DatePicker.vue +370 -234
  60. package/datepicker/index.d.ts +162 -6
  61. package/datepicker/index.mjs +644 -384
  62. package/datepicker/index.mjs.map +1 -1
  63. package/dialog/Dialog.vue +48 -39
  64. package/dialog/index.d.ts +26 -1
  65. package/dialog/index.mjs +73 -50
  66. package/dialog/index.mjs.map +1 -1
  67. package/divider/Divider.vue +13 -3
  68. package/divider/index.d.ts +4 -4
  69. package/divider/index.mjs +18 -5
  70. package/divider/index.mjs.map +1 -1
  71. package/dock/index.d.ts +4 -4
  72. package/drawer/Drawer.vue +30 -20
  73. package/drawer/index.d.ts +12 -2
  74. package/drawer/index.mjs +42 -25
  75. package/drawer/index.mjs.map +1 -1
  76. package/fieldset/Fieldset.vue +8 -2
  77. package/fieldset/index.mjs +20 -10
  78. package/fieldset/index.mjs.map +1 -1
  79. package/fileupload/FileUpload.vue +1 -1
  80. package/fileupload/index.d.ts +2 -2
  81. package/fileupload/index.mjs +2 -2
  82. package/fileupload/index.mjs.map +1 -1
  83. package/floatlabel/index.d.ts +2 -2
  84. package/galleria/Galleria.vue +39 -3
  85. package/galleria/GalleriaItem.vue +8 -9
  86. package/galleria/index.d.ts +3 -3
  87. package/galleria/index.mjs +48 -11
  88. package/galleria/index.mjs.map +1 -1
  89. package/inplace/Inplace.vue +1 -1
  90. package/inplace/index.mjs +3 -2
  91. package/inplace/index.mjs.map +1 -1
  92. package/inputchips/index.d.ts +2 -2
  93. package/inputmask/InputMask.vue +15 -1
  94. package/inputmask/index.d.ts +3 -3
  95. package/inputmask/index.mjs +12 -1
  96. package/inputmask/index.mjs.map +1 -1
  97. package/inputnumber/BaseInputNumber.vue +4 -0
  98. package/inputnumber/InputNumber.vue +29 -14
  99. package/inputnumber/index.d.ts +6 -6
  100. package/inputnumber/index.mjs +47 -25
  101. package/inputnumber/index.mjs.map +1 -1
  102. package/inputotp/index.d.ts +3 -3
  103. package/inputtext/InputText.vue +10 -1
  104. package/inputtext/index.d.ts +4 -5
  105. package/inputtext/index.mjs +14 -1
  106. package/inputtext/index.mjs.map +1 -1
  107. package/keyfilter/index.mjs +12 -19
  108. package/keyfilter/index.mjs.map +1 -1
  109. package/knob/Knob.vue +1 -1
  110. package/knob/index.mjs +1 -1
  111. package/knob/index.mjs.map +1 -1
  112. package/listbox/Listbox.vue +9 -2
  113. package/listbox/index.mjs +11 -3
  114. package/listbox/index.mjs.map +1 -1
  115. package/megamenu/index.d.ts +2 -2
  116. package/menu/Menu.vue +8 -2
  117. package/menu/Menuitem.vue +14 -4
  118. package/menu/index.mjs +36 -16
  119. package/menu/index.mjs.map +1 -1
  120. package/message/Message.vue +16 -7
  121. package/message/index.d.ts +2 -2
  122. package/message/index.mjs +35 -13
  123. package/message/index.mjs.map +1 -1
  124. package/metergroup/MeterGroup.vue +9 -3
  125. package/metergroup/MeterGroupLabel.vue +10 -1
  126. package/metergroup/index.mjs +32 -7
  127. package/metergroup/index.mjs.map +1 -1
  128. package/multiselect/MultiSelect.vue +41 -6
  129. package/multiselect/index.d.ts +3 -3
  130. package/multiselect/index.mjs +53 -21
  131. package/multiselect/index.mjs.map +1 -1
  132. package/organizationchart/index.d.ts +2 -2
  133. package/overlaybadge/index.d.ts +1 -1
  134. package/package.json +3 -3
  135. package/paginator/Paginator.vue +2 -0
  136. package/paginator/index.d.ts +8 -0
  137. package/paginator/index.mjs +3 -1
  138. package/paginator/index.mjs.map +1 -1
  139. package/panel/Panel.vue +29 -22
  140. package/panel/index.d.ts +22 -2
  141. package/panel/index.mjs +55 -31
  142. package/panel/index.mjs.map +1 -1
  143. package/panelmenu/PanelMenuList.vue +1 -1
  144. package/panelmenu/index.mjs +1 -1
  145. package/panelmenu/index.mjs.map +1 -1
  146. package/password/Password.vue +21 -3
  147. package/password/index.d.ts +3 -3
  148. package/password/index.mjs +32 -10
  149. package/password/index.mjs.map +1 -1
  150. package/popover/Popover.vue +3 -3
  151. package/popover/index.mjs +3 -4
  152. package/popover/index.mjs.map +1 -1
  153. package/progressbar/ProgressBar.vue +11 -4
  154. package/progressbar/index.mjs +21 -7
  155. package/progressbar/index.mjs.map +1 -1
  156. package/radiobutton/RadioButton.vue +13 -3
  157. package/radiobutton/index.d.ts +3 -3
  158. package/radiobutton/index.mjs +24 -4
  159. package/radiobutton/index.mjs.map +1 -1
  160. package/rating/Rating.vue +19 -2
  161. package/rating/index.mjs +28 -7
  162. package/rating/index.mjs.map +1 -1
  163. package/scrolltop/ScrollTop.vue +2 -2
  164. package/scrolltop/index.d.ts +2 -2
  165. package/scrolltop/index.mjs +4 -2
  166. package/scrolltop/index.mjs.map +1 -1
  167. package/select/Select.vue +56 -16
  168. package/select/index.d.ts +2 -2
  169. package/select/index.mjs +111 -74
  170. package/select/index.mjs.map +1 -1
  171. package/selectbutton/SelectButton.vue +26 -9
  172. package/selectbutton/index.d.ts +2 -2
  173. package/selectbutton/index.mjs +30 -10
  174. package/selectbutton/index.mjs.map +1 -1
  175. package/skeleton/Skeleton.vue +7 -1
  176. package/skeleton/index.d.ts +3 -3
  177. package/skeleton/index.mjs +12 -1
  178. package/skeleton/index.mjs.map +1 -1
  179. package/slider/Slider.vue +11 -2
  180. package/slider/index.d.ts +2 -2
  181. package/slider/index.mjs +27 -8
  182. package/slider/index.mjs.map +1 -1
  183. package/speeddial/index.d.ts +5 -5
  184. package/splitbutton/index.d.ts +1 -1
  185. package/splitter/Splitter.vue +10 -2
  186. package/splitter/index.d.ts +3 -3
  187. package/splitter/index.mjs +19 -6
  188. package/splitter/index.mjs.map +1 -1
  189. package/step/Step.vue +25 -7
  190. package/step/index.mjs +44 -14
  191. package/step/index.mjs.map +1 -1
  192. package/steppanel/StepPanel.vue +9 -3
  193. package/steppanel/index.d.ts +8 -0
  194. package/steppanel/index.mjs +23 -8
  195. package/steppanel/index.mjs.map +1 -1
  196. package/stepper/StepperSeparator.vue +5 -2
  197. package/stepper/index.d.ts +4 -0
  198. package/tab/Tab.vue +12 -6
  199. package/tab/index.mjs +13 -5
  200. package/tab/index.mjs.map +1 -1
  201. package/tablist/TabList.vue +13 -2
  202. package/tablist/index.mjs +21 -8
  203. package/tablist/index.mjs.map +1 -1
  204. package/tabpanel/TabPanel.vue +2 -2
  205. package/tabpanel/index.mjs +2 -2
  206. package/tabpanel/index.mjs.map +1 -1
  207. package/tag/Tag.vue +11 -2
  208. package/tag/index.mjs +17 -3
  209. package/tag/index.mjs.map +1 -1
  210. package/textarea/Textarea.vue +10 -1
  211. package/textarea/index.d.ts +4 -5
  212. package/textarea/index.mjs +14 -1
  213. package/textarea/index.mjs.map +1 -1
  214. package/tieredmenu/TieredMenu.vue +1 -1
  215. package/tieredmenu/index.mjs +1 -2
  216. package/tieredmenu/index.mjs.map +1 -1
  217. package/timeline/Timeline.vue +16 -7
  218. package/timeline/index.d.ts +3 -3
  219. package/timeline/index.mjs +42 -11
  220. package/timeline/index.mjs.map +1 -1
  221. package/toast/Toast.vue +10 -1
  222. package/toast/ToastMessage.vue +29 -19
  223. package/toast/index.d.ts +2 -2
  224. package/toast/index.mjs +77 -38
  225. package/toast/index.mjs.map +1 -1
  226. package/togglebutton/ToggleButton.vue +10 -1
  227. package/togglebutton/index.d.ts +3 -3
  228. package/togglebutton/index.mjs +19 -4
  229. package/togglebutton/index.mjs.map +1 -1
  230. package/toggleswitch/ToggleSwitch.vue +11 -3
  231. package/toggleswitch/index.mjs +20 -5
  232. package/toggleswitch/index.mjs.map +1 -1
  233. package/tooltip/index.mjs +22 -22
  234. package/tooltip/index.mjs.map +1 -1
  235. package/tree/Tree.vue +14 -2
  236. package/tree/TreeNode.vue +2 -2
  237. package/tree/index.d.ts +3 -3
  238. package/tree/index.mjs +28 -10
  239. package/tree/index.mjs.map +1 -1
  240. package/treeselect/TreeSelect.vue +1 -1
  241. package/treeselect/index.d.ts +6 -6
  242. package/treeselect/index.mjs +1 -2
  243. package/treeselect/index.mjs.map +1 -1
  244. package/treetable/index.d.ts +7 -7
  245. package/treetable/style/index.mjs +2 -3
  246. package/treetable/style/index.mjs.map +1 -1
  247. package/umd/primevue.min.js +1 -1
  248. package/virtualscroller/VirtualScroller.vue +13 -2
  249. package/virtualscroller/index.d.ts +2 -2
  250. package/virtualscroller/index.mjs +14 -4
  251. package/virtualscroller/index.mjs.map +1 -1
  252. package/virtualscroller/style/index.mjs +1 -1
  253. package/virtualscroller/style/index.mjs.map +1 -1
  254. package/web-types.json +1 -1
package/select/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { cn } from '@primeuix/utils';
1
2
  import { findSingle, getFocusableElements, isVisible, focus, isTouchDevice, relativePosition, getOuterWidth, absolutePosition, addStyle, getLastFocusableElement, getFirstFocusableElement, isAndroid } from '@primeuix/utils/dom';
2
3
  import { isNotEmpty, findLastIndex, equals, isPrintableCharacter, resolveFieldData } from '@primeuix/utils/object';
3
4
  import { ZIndex } from '@primeuix/utils/zindex';
@@ -344,12 +345,15 @@ var script = {
344
345
  this.$emit('focus', event);
345
346
  },
346
347
  onBlur: function onBlur(event) {
347
- var _this$formField$onBlu, _this$formField;
348
- this.focused = false;
349
- this.focusedOptionIndex = -1;
350
- this.searchValue = '';
351
- this.$emit('blur', event);
352
- (_this$formField$onBlu = (_this$formField = this.formField).onBlur) === null || _this$formField$onBlu === void 0 || _this$formField$onBlu.call(_this$formField, event);
348
+ var _this3 = this;
349
+ setTimeout(function () {
350
+ var _this3$formField$onBl, _this3$formField;
351
+ _this3.focused = false;
352
+ _this3.focusedOptionIndex = -1;
353
+ _this3.searchValue = '';
354
+ _this3.$emit('blur', event);
355
+ (_this3$formField$onBl = (_this3$formField = _this3.formField).onBlur) === null || _this3$formField$onBl === void 0 || _this3$formField$onBl.call(_this3$formField, event);
356
+ }, 100);
353
357
  },
354
358
  onKeyDown: function onKeyDown(event) {
355
359
  if (this.disabled || isAndroid()) {
@@ -627,18 +631,17 @@ var script = {
627
631
  }
628
632
  },
629
633
  onOverlayEnter: function onOverlayEnter(el) {
630
- var _this3 = this;
634
+ var _this4 = this;
631
635
  ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);
632
636
  addStyle(el, {
633
637
  position: 'absolute',
634
- top: '0',
635
- left: '0'
638
+ top: '0'
636
639
  });
637
640
  this.alignOverlay();
638
641
  this.scrollInView();
639
642
  setTimeout(function () {
640
- _this3.autoFilterFocus && _this3.filter && focus(_this3.$refs.filterInput.$el);
641
- _this3.autoUpdateModel();
643
+ _this4.autoFilterFocus && _this4.filter && focus(_this4.$refs.filterInput.$el);
644
+ _this4.autoUpdateModel();
642
645
  }, 1);
643
646
  },
644
647
  onOverlayAfterEnter: function onOverlayAfterEnter() {
@@ -648,14 +651,14 @@ var script = {
648
651
  this.$emit('show');
649
652
  },
650
653
  onOverlayLeave: function onOverlayLeave() {
651
- var _this4 = this;
654
+ var _this5 = this;
652
655
  this.unbindOutsideClickListener();
653
656
  this.unbindScrollListener();
654
657
  this.unbindResizeListener();
655
658
  if (this.autoFilterFocus && this.filter && !this.editable) {
656
659
  this.$nextTick(function () {
657
- if (_this4.$refs.filterInput) {
658
- focus(_this4.$refs.filterInput.$el);
660
+ if (_this5.$refs.filterInput) {
661
+ focus(_this5.$refs.filterInput.$el);
659
662
  }
660
663
  });
661
664
  }
@@ -669,16 +672,19 @@ var script = {
669
672
  if (this.appendTo === 'self') {
670
673
  relativePosition(this.overlay, this.$el);
671
674
  } else {
672
- this.overlay.style.minWidth = getOuterWidth(this.$el) + 'px';
673
- absolutePosition(this.overlay, this.$el);
675
+ if (this.overlay) {
676
+ this.overlay.style.minWidth = getOuterWidth(this.$el) + 'px';
677
+ absolutePosition(this.overlay, this.$el);
678
+ }
674
679
  }
675
680
  },
676
681
  bindOutsideClickListener: function bindOutsideClickListener() {
677
- var _this5 = this;
682
+ var _this6 = this;
678
683
  if (!this.outsideClickListener) {
679
684
  this.outsideClickListener = function (event) {
680
- if (_this5.overlayVisible && _this5.overlay && !_this5.$el.contains(event.target) && !_this5.overlay.contains(event.target)) {
681
- _this5.hide();
685
+ var composedPath = event.composedPath();
686
+ if (_this6.overlayVisible && _this6.overlay && !composedPath.includes(_this6.$el) && !composedPath.includes(_this6.overlay)) {
687
+ _this6.hide();
682
688
  }
683
689
  };
684
690
  document.addEventListener('click', this.outsideClickListener, true);
@@ -691,11 +697,11 @@ var script = {
691
697
  }
692
698
  },
693
699
  bindScrollListener: function bindScrollListener() {
694
- var _this6 = this;
700
+ var _this7 = this;
695
701
  if (!this.scrollHandler) {
696
702
  this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {
697
- if (_this6.overlayVisible) {
698
- _this6.hide();
703
+ if (_this7.overlayVisible) {
704
+ _this7.hide();
699
705
  }
700
706
  });
701
707
  }
@@ -707,11 +713,11 @@ var script = {
707
713
  }
708
714
  },
709
715
  bindResizeListener: function bindResizeListener() {
710
- var _this7 = this;
716
+ var _this8 = this;
711
717
  if (!this.resizeListener) {
712
718
  this.resizeListener = function () {
713
- if (_this7.overlayVisible && !isTouchDevice()) {
714
- _this7.hide();
719
+ if (_this8.overlayVisible && !isTouchDevice()) {
720
+ _this8.hide();
715
721
  }
716
722
  };
717
723
  window.addEventListener('resize', this.resizeListener);
@@ -724,12 +730,12 @@ var script = {
724
730
  }
725
731
  },
726
732
  bindLabelClickListener: function bindLabelClickListener() {
727
- var _this8 = this;
733
+ var _this9 = this;
728
734
  if (!this.editable && !this.labelClickListener) {
729
735
  var label = document.querySelector("label[for=\"".concat(this.labelId, "\"]"));
730
736
  if (label && isVisible(label)) {
731
737
  this.labelClickListener = function () {
732
- focus(_this8.$refs.focusInput);
738
+ focus(_this9.$refs.focusInput);
733
739
  };
734
740
  label.addEventListener('click', this.labelClickListener);
735
741
  }
@@ -744,12 +750,12 @@ var script = {
744
750
  }
745
751
  },
746
752
  bindMatchMediaOrientationListener: function bindMatchMediaOrientationListener() {
747
- var _this9 = this;
753
+ var _this10 = this;
748
754
  if (!this.matchMediaOrientationListener) {
749
755
  var query = matchMedia("(orientation: portrait)");
750
756
  this.queryOrientation = query;
751
757
  this.matchMediaOrientationListener = function () {
752
- _this9.alignOverlay();
758
+ _this10.alignOverlay();
753
759
  };
754
760
  this.queryOrientation.addEventListener('change', this.matchMediaOrientationListener);
755
761
  }
@@ -782,35 +788,35 @@ var script = {
782
788
  return equals(this.d_value, this.getOptionValue(option), this.equalityKey);
783
789
  },
784
790
  findFirstOptionIndex: function findFirstOptionIndex() {
785
- var _this10 = this;
791
+ var _this11 = this;
786
792
  return this.visibleOptions.findIndex(function (option) {
787
- return _this10.isValidOption(option);
793
+ return _this11.isValidOption(option);
788
794
  });
789
795
  },
790
796
  findLastOptionIndex: function findLastOptionIndex() {
791
- var _this11 = this;
797
+ var _this12 = this;
792
798
  return findLastIndex(this.visibleOptions, function (option) {
793
- return _this11.isValidOption(option);
799
+ return _this12.isValidOption(option);
794
800
  });
795
801
  },
796
802
  findNextOptionIndex: function findNextOptionIndex(index) {
797
- var _this12 = this;
803
+ var _this13 = this;
798
804
  var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
799
- return _this12.isValidOption(option);
805
+ return _this13.isValidOption(option);
800
806
  }) : -1;
801
807
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
802
808
  },
803
809
  findPrevOptionIndex: function findPrevOptionIndex(index) {
804
- var _this13 = this;
810
+ var _this14 = this;
805
811
  var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {
806
- return _this13.isValidOption(option);
812
+ return _this14.isValidOption(option);
807
813
  }) : -1;
808
814
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
809
815
  },
810
816
  findSelectedOptionIndex: function findSelectedOptionIndex() {
811
- var _this14 = this;
817
+ var _this15 = this;
812
818
  return this.$filled ? this.visibleOptions.findIndex(function (option) {
813
- return _this14.isValidSelectedOption(option);
819
+ return _this15.isValidSelectedOption(option);
814
820
  }) : -1;
815
821
  },
816
822
  findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
@@ -822,17 +828,17 @@ var script = {
822
828
  return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
823
829
  },
824
830
  searchOptions: function searchOptions(event, _char) {
825
- var _this15 = this;
831
+ var _this16 = this;
826
832
  this.searchValue = (this.searchValue || '') + _char;
827
833
  var optionIndex = -1;
828
834
  var matched = false;
829
835
  if (isNotEmpty(this.searchValue)) {
830
836
  optionIndex = this.visibleOptions.findIndex(function (option) {
831
- return _this15.isOptionExactMatched(option);
837
+ return _this16.isOptionExactMatched(option);
832
838
  });
833
839
  if (optionIndex === -1) {
834
840
  optionIndex = this.visibleOptions.findIndex(function (option) {
835
- return _this15.isOptionStartsWith(option);
841
+ return _this16.isOptionStartsWith(option);
836
842
  });
837
843
  }
838
844
  if (optionIndex !== -1) {
@@ -849,8 +855,8 @@ var script = {
849
855
  clearTimeout(this.searchTimeout);
850
856
  }
851
857
  this.searchTimeout = setTimeout(function () {
852
- _this15.searchValue = '';
853
- _this15.searchTimeout = null;
858
+ _this16.searchValue = '';
859
+ _this16.searchTimeout = null;
854
860
  }, 500);
855
861
  return matched;
856
862
  },
@@ -864,18 +870,18 @@ var script = {
864
870
  }
865
871
  },
866
872
  scrollInView: function scrollInView() {
867
- var _this16 = this;
873
+ var _this17 = this;
868
874
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
869
875
  this.$nextTick(function () {
870
- var id = index !== -1 ? "".concat(_this16.$id, "_").concat(index) : _this16.focusedOptionId;
871
- var element = findSingle(_this16.list, "li[id=\"".concat(id, "\"]"));
876
+ var id = index !== -1 ? "".concat(_this17.$id, "_").concat(index) : _this17.focusedOptionId;
877
+ var element = findSingle(_this17.list, "li[id=\"".concat(id, "\"]"));
872
878
  if (element) {
873
879
  element.scrollIntoView && element.scrollIntoView({
874
880
  block: 'nearest',
875
- inline: 'start'
881
+ inline: 'nearest'
876
882
  });
877
- } else if (!_this16.virtualScrollerDisabled) {
878
- _this16.virtualScroller && _this16.virtualScroller.scrollToIndex(index !== -1 ? index : _this16.focusedOptionIndex);
883
+ } else if (!_this17.virtualScrollerDisabled) {
884
+ _this17.virtualScroller && _this17.virtualScroller.scrollToIndex(index !== -1 ? index : _this17.focusedOptionIndex);
879
885
  }
880
886
  });
881
887
  },
@@ -895,14 +901,14 @@ var script = {
895
901
  });
896
902
  },
897
903
  flatOptions: function flatOptions(options) {
898
- var _this17 = this;
904
+ var _this18 = this;
899
905
  return (options || []).reduce(function (result, option, index) {
900
906
  result.push({
901
907
  optionGroup: option,
902
908
  group: true,
903
909
  index: index
904
910
  });
905
- var optionGroupChildren = _this17.getOptionGroupChildren(option);
911
+ var optionGroupChildren = _this18.getOptionGroupChildren(option);
906
912
  optionGroupChildren && optionGroupChildren.forEach(function (o) {
907
913
  return result.push(o);
908
914
  });
@@ -922,7 +928,7 @@ var script = {
922
928
  },
923
929
  computed: {
924
930
  visibleOptions: function visibleOptions() {
925
- var _this18 = this;
931
+ var _this19 = this;
926
932
  var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];
927
933
  if (this.filterValue) {
928
934
  var filteredOptions = FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
@@ -930,11 +936,11 @@ var script = {
930
936
  var optionGroups = this.options || [];
931
937
  var filtered = [];
932
938
  optionGroups.forEach(function (group) {
933
- var groupChildren = _this18.getOptionGroupChildren(group);
939
+ var groupChildren = _this19.getOptionGroupChildren(group);
934
940
  var filteredItems = groupChildren.filter(function (item) {
935
941
  return filteredOptions.includes(item);
936
942
  });
937
- if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this18.optionGroupChildren === 'string' ? _this18.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
943
+ if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this19.optionGroupChildren === 'string' ? _this19.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));
938
944
  });
939
945
  return this.flatOptions(filtered);
940
946
  }
@@ -985,9 +991,9 @@ var script = {
985
991
  return this.focusedOptionIndex !== -1 ? "".concat(this.$id, "_").concat(this.focusedOptionIndex) : null;
986
992
  },
987
993
  ariaSetSize: function ariaSetSize() {
988
- var _this19 = this;
994
+ var _this20 = this;
989
995
  return this.visibleOptions.filter(function (option) {
990
- return !_this19.isOptionGroup(option);
996
+ return !_this20.isOptionGroup(option);
991
997
  }).length;
992
998
  },
993
999
  isClearIconVisible: function isClearIconVisible() {
@@ -995,6 +1001,29 @@ var script = {
995
1001
  },
996
1002
  virtualScrollerDisabled: function virtualScrollerDisabled() {
997
1003
  return !this.virtualScrollerOptions;
1004
+ },
1005
+ containerDataP: function containerDataP() {
1006
+ return cn(_defineProperty({
1007
+ invalid: this.$invalid,
1008
+ disabled: this.disabled,
1009
+ focus: this.focused,
1010
+ fluid: this.$fluid,
1011
+ filled: this.$variant === 'filled'
1012
+ }, this.size, this.size));
1013
+ },
1014
+ labelDataP: function labelDataP() {
1015
+ return cn(_defineProperty(_defineProperty({
1016
+ placeholder: !this.editable && this.label === this.placeholder,
1017
+ clearable: this.showClear,
1018
+ disabled: this.disabled,
1019
+ editable: this.editable
1020
+ }, this.size, this.size), "empty", !this.editable && !this.$slots['value'] && (this.label === 'p-emptylabel' || this.label.length === 0)));
1021
+ },
1022
+ dropdownIconDataP: function dropdownIconDataP() {
1023
+ return cn(_defineProperty({}, this.size, this.size));
1024
+ },
1025
+ overlayDataP: function overlayDataP() {
1026
+ return cn(_defineProperty({}, 'portal-' + this.appendTo, 'portal-' + this.appendTo));
998
1027
  }
999
1028
  },
1000
1029
  directives: {
@@ -1015,12 +1044,13 @@ var script = {
1015
1044
  }
1016
1045
  };
1017
1046
 
1018
- var _hoisted_1 = ["id"];
1019
- var _hoisted_2 = ["id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"];
1020
- var _hoisted_3 = ["id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "aria-disabled"];
1021
- var _hoisted_4 = ["id"];
1047
+ var _hoisted_1 = ["id", "data-p"];
1048
+ var _hoisted_2 = ["name", "id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "data-p"];
1049
+ var _hoisted_3 = ["name", "id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid", "aria-disabled", "data-p"];
1050
+ var _hoisted_4 = ["data-p"];
1022
1051
  var _hoisted_5 = ["id"];
1023
- var _hoisted_6 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"];
1052
+ var _hoisted_6 = ["id"];
1053
+ var _hoisted_7 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onMousedown", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"];
1024
1054
  function render(_ctx, _cache, $props, $setup, $data, $options) {
1025
1055
  var _component_SpinnerIcon = resolveComponent("SpinnerIcon");
1026
1056
  var _component_InputText = resolveComponent("InputText");
@@ -1038,10 +1068,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1038
1068
  "class": _ctx.cx('root'),
1039
1069
  onClick: _cache[11] || (_cache[11] = function () {
1040
1070
  return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);
1041
- })
1071
+ }),
1072
+ "data-p": $options.containerDataP
1042
1073
  }, _ctx.ptmi('root')), [_ctx.editable ? (openBlock(), createElementBlock("input", mergeProps({
1043
1074
  key: 0,
1044
1075
  ref: "focusInput",
1076
+ name: _ctx.name,
1045
1077
  id: _ctx.labelId || _ctx.inputId,
1046
1078
  type: "text",
1047
1079
  "class": [_ctx.cx('label'), _ctx.inputClass, _ctx.labelClass],
@@ -1070,10 +1102,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1070
1102
  }),
1071
1103
  onInput: _cache[3] || (_cache[3] = function () {
1072
1104
  return $options.onEditableInput && $options.onEditableInput.apply($options, arguments);
1073
- })
1105
+ }),
1106
+ "data-p": $options.labelDataP
1074
1107
  }, _ctx.ptm('label')), null, 16, _hoisted_2)) : (openBlock(), createElementBlock("span", mergeProps({
1075
1108
  key: 1,
1076
1109
  ref: "focusInput",
1110
+ name: _ctx.name,
1077
1111
  id: _ctx.labelId || _ctx.inputId,
1078
1112
  "class": [_ctx.cx('label'), _ctx.inputClass, _ctx.labelClass],
1079
1113
  style: [_ctx.inputStyle, _ctx.labelStyle],
@@ -1095,7 +1129,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1095
1129
  }),
1096
1130
  onKeydown: _cache[6] || (_cache[6] = function () {
1097
1131
  return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);
1098
- })
1132
+ }),
1133
+ "data-p": $options.labelDataP
1099
1134
  }, _ctx.ptm('label')), [renderSlot(_ctx.$slots, "value", {
1100
1135
  value: _ctx.d_value,
1101
1136
  placeholder: _ctx.placeholder
@@ -1136,8 +1171,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1136
1171
  }, function () {
1137
1172
  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({
1138
1173
  "class": [_ctx.cx('dropdownIcon'), _ctx.dropdownIcon],
1139
- "aria-hidden": "true"
1140
- }, _ctx.ptm('dropdownIcon')), null, 16, ["class"]))];
1174
+ "aria-hidden": "true",
1175
+ "data-p": $options.dropdownIconDataP
1176
+ }, _ctx.ptm('dropdownIcon')), null, 16, ["class", "data-p"]))];
1141
1177
  })], 16), createVNode(_component_Portal, {
1142
1178
  appendTo: _ctx.appendTo
1143
1179
  }, {
@@ -1160,7 +1196,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1160
1196
  }),
1161
1197
  onKeydown: _cache[10] || (_cache[10] = function () {
1162
1198
  return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
1163
- })
1199
+ }),
1200
+ "data-p": $options.overlayDataP
1164
1201
  }, _ctx.ptm('overlay')), [createElementVNode("span", mergeProps({
1165
1202
  ref: "firstHiddenFocusableElementOnOverlay",
1166
1203
  role: "presentation",
@@ -1280,7 +1317,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1280
1317
  "class": _ctx.cx('optionGroupLabel'),
1281
1318
  ref_for: true
1282
1319
  }, _ctx.ptm('optionGroupLabel')), toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 17)];
1283
- })], 16, _hoisted_5)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({
1320
+ })], 16, _hoisted_6)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({
1284
1321
  key: 1,
1285
1322
  id: _ctx.$id + '_' + $options.getOptionIndex(i, getItemOptions),
1286
1323
  "class": _ctx.cx('option', {
@@ -1296,13 +1333,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1296
1333
  "aria-disabled": $options.isOptionDisabled(option),
1297
1334
  "aria-setsize": $options.ariaSetSize,
1298
1335
  "aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),
1299
- onClick: function onClick($event) {
1336
+ onMousedown: function onMousedown($event) {
1300
1337
  return $options.onOptionSelect($event, option);
1301
1338
  },
1302
1339
  onMousemove: function onMousemove($event) {
1303
1340
  return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions));
1304
1341
  },
1305
- "data-p-selected": $options.isSelected(option),
1342
+ "data-p-selected": !_ctx.checkmark && $options.isSelected(option),
1306
1343
  "data-p-focused": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions),
1307
1344
  "data-p-disabled": $options.isOptionDisabled(option),
1308
1345
  ref_for: true
@@ -1325,7 +1362,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1325
1362
  "class": _ctx.cx('optionLabel'),
1326
1363
  ref_for: true
1327
1364
  }, _ctx.ptm('optionLabel')), toDisplayString($options.getOptionLabel(option)), 17)];
1328
- })], 16, _hoisted_6)), [[_directive_ripple]])], 64);
1365
+ })], 16, _hoisted_7)), [[_directive_ripple]])], 64);
1329
1366
  }), 128)), $data.filterValue && (!items || items && items.length === 0) ? (openBlock(), createElementBlock("li", mergeProps({
1330
1367
  key: 0,
1331
1368
  "class": _ctx.cx('emptyMessage'),
@@ -1342,7 +1379,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1342
1379
  "data-p-hidden-accessible": true
1343
1380
  }), [renderSlot(_ctx.$slots, "empty", {}, function () {
1344
1381
  return [createTextVNode(toDisplayString($options.emptyMessageText), 1)];
1345
- })], 16)) : createCommentVNode("", true)], 16, _hoisted_4)];
1382
+ })], 16)) : createCommentVNode("", true)], 16, _hoisted_5)];
1346
1383
  }),
1347
1384
  _: 2
1348
1385
  }, [_ctx.$slots.loader ? {
@@ -1382,7 +1419,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1382
1419
  }, _ctx.ptm('hiddenLastFocusableEl'), {
1383
1420
  "data-p-hidden-accessible": true,
1384
1421
  "data-p-hidden-focusable": true
1385
- }), null, 16)], 16)) : createCommentVNode("", true)];
1422
+ }), null, 16)], 16, _hoisted_4)) : createCommentVNode("", true)];
1386
1423
  }),
1387
1424
  _: 3
1388
1425
  }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])];