primevue 3.32.0 → 3.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/accordion/Accordion.d.ts +2 -2
  2. package/accordiontab/AccordionTab.d.ts +4 -3
  3. package/autocomplete/AutoComplete.d.ts +17 -7
  4. package/autocomplete/AutoComplete.vue +2 -2
  5. package/autocomplete/autocomplete.cjs.js +3 -2
  6. package/autocomplete/autocomplete.cjs.min.js +1 -1
  7. package/autocomplete/autocomplete.esm.js +3 -2
  8. package/autocomplete/autocomplete.esm.min.js +1 -1
  9. package/autocomplete/autocomplete.js +3 -2
  10. package/autocomplete/autocomplete.min.js +1 -1
  11. package/avatar/Avatar.d.ts +2 -2
  12. package/avatargroup/AvatarGroup.d.ts +2 -2
  13. package/badge/Badge.d.ts +2 -2
  14. package/badgedirective/BadgeDirective.d.ts +2 -1
  15. package/basecomponent/BaseComponent.vue +67 -12
  16. package/basecomponent/basecomponent.cjs.js +76 -22
  17. package/basecomponent/basecomponent.cjs.min.js +1 -1
  18. package/basecomponent/basecomponent.esm.js +76 -22
  19. package/basecomponent/basecomponent.esm.min.js +1 -1
  20. package/basecomponent/basecomponent.js +76 -22
  21. package/basecomponent/basecomponent.min.js +1 -1
  22. package/basedirective/basedirective.cjs.js +47 -7
  23. package/basedirective/basedirective.cjs.min.js +1 -1
  24. package/basedirective/basedirective.esm.js +47 -7
  25. package/basedirective/basedirective.esm.min.js +1 -1
  26. package/basedirective/basedirective.js +47 -7
  27. package/basedirective/basedirective.min.js +1 -1
  28. package/baseicon/BaseIcon.vue +44 -32
  29. package/baseicon/baseicon.cjs.js +19 -30
  30. package/baseicon/baseicon.cjs.min.js +1 -1
  31. package/baseicon/baseicon.esm.js +19 -30
  32. package/baseicon/baseicon.esm.min.js +1 -1
  33. package/baseicon/baseicon.js +20 -32
  34. package/baseicon/baseicon.min.js +1 -1
  35. package/blockui/BlockUI.d.ts +2 -2
  36. package/breadcrumb/Breadcrumb.d.ts +2 -2
  37. package/button/Button.d.ts +2 -2
  38. package/button/Button.vue +2 -2
  39. package/button/button.cjs.js +2 -2
  40. package/button/button.cjs.min.js +1 -1
  41. package/button/button.esm.js +2 -2
  42. package/button/button.esm.min.js +1 -1
  43. package/button/button.js +2 -2
  44. package/button/button.min.js +1 -1
  45. package/calendar/Calendar.d.ts +30 -6
  46. package/calendar/Calendar.vue +9 -8
  47. package/calendar/calendar.cjs.js +19 -10
  48. package/calendar/calendar.cjs.min.js +1 -1
  49. package/calendar/calendar.esm.js +19 -10
  50. package/calendar/calendar.esm.min.js +1 -1
  51. package/calendar/calendar.js +19 -10
  52. package/calendar/calendar.min.js +1 -1
  53. package/card/Card.d.ts +2 -2
  54. package/carousel/Carousel.d.ts +2 -2
  55. package/carousel/Carousel.vue +2 -1
  56. package/carousel/carousel.cjs.js +4 -3
  57. package/carousel/carousel.cjs.min.js +1 -1
  58. package/carousel/carousel.esm.js +4 -3
  59. package/carousel/carousel.esm.min.js +1 -1
  60. package/carousel/carousel.js +4 -3
  61. package/carousel/carousel.min.js +1 -1
  62. package/cascadeselect/CascadeSelect.d.ts +2 -2
  63. package/chart/Chart.d.ts +2 -2
  64. package/checkbox/Checkbox.d.ts +2 -2
  65. package/chip/Chip.d.ts +6 -4
  66. package/chips/Chips.d.ts +13 -4
  67. package/chips/Chips.vue +1 -1
  68. package/chips/chips.cjs.js +1 -0
  69. package/chips/chips.cjs.min.js +1 -1
  70. package/chips/chips.esm.js +1 -0
  71. package/chips/chips.esm.min.js +1 -1
  72. package/chips/chips.js +1 -0
  73. package/chips/chips.min.js +1 -1
  74. package/colorpicker/ColorPicker.d.ts +2 -2
  75. package/colorpicker/ColorPicker.vue +1 -40
  76. package/colorpicker/colorpicker.cjs.js +8 -47
  77. package/colorpicker/colorpicker.cjs.min.js +1 -1
  78. package/colorpicker/colorpicker.esm.js +8 -47
  79. package/colorpicker/colorpicker.esm.min.js +1 -1
  80. package/colorpicker/colorpicker.js +8 -47
  81. package/colorpicker/colorpicker.min.js +1 -1
  82. package/column/Column.d.ts +13 -10
  83. package/columngroup/ColumnGroup.d.ts +2 -2
  84. package/config/PrimeVue.d.ts +2 -2
  85. package/confirmdialog/ConfirmDialog.d.ts +3 -2
  86. package/confirmpopup/ConfirmPopup.d.ts +3 -2
  87. package/contextmenu/ContextMenu.d.ts +3 -2
  88. package/core/core.js +551 -489
  89. package/core/core.min.js +10 -10
  90. package/datatable/BodyCell.vue +2 -0
  91. package/datatable/DataTable.d.ts +4 -2
  92. package/datatable/DataTable.vue +45 -15
  93. package/datatable/TableBody.vue +1 -1
  94. package/datatable/datatable.cjs.js +119 -74
  95. package/datatable/datatable.cjs.min.js +1 -1
  96. package/datatable/datatable.esm.js +119 -74
  97. package/datatable/datatable.esm.min.js +1 -1
  98. package/datatable/datatable.js +119 -74
  99. package/datatable/datatable.min.js +1 -1
  100. package/dataview/DataView.d.ts +2 -2
  101. package/dataview/DataView.vue +2 -1
  102. package/dataview/dataview.cjs.js +4 -3
  103. package/dataview/dataview.cjs.min.js +1 -1
  104. package/dataview/dataview.esm.js +4 -3
  105. package/dataview/dataview.esm.min.js +1 -1
  106. package/dataview/dataview.js +4 -3
  107. package/dataview/dataview.min.js +1 -1
  108. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
  109. package/deferredcontent/DeferredContent.d.ts +2 -2
  110. package/dialog/Dialog.d.ts +13 -3
  111. package/dialog/Dialog.vue +10 -7
  112. package/dialog/dialog.cjs.js +13 -7
  113. package/dialog/dialog.cjs.min.js +1 -1
  114. package/dialog/dialog.esm.js +14 -8
  115. package/dialog/dialog.esm.min.js +1 -1
  116. package/dialog/dialog.js +13 -7
  117. package/dialog/dialog.min.js +1 -1
  118. package/divider/Divider.d.ts +2 -2
  119. package/dock/Dock.d.ts +2 -2
  120. package/dropdown/Dropdown.d.ts +21 -10
  121. package/dropdown/Dropdown.vue +9 -0
  122. package/dropdown/dropdown.cjs.js +8 -0
  123. package/dropdown/dropdown.cjs.min.js +1 -1
  124. package/dropdown/dropdown.esm.js +8 -0
  125. package/dropdown/dropdown.esm.min.js +1 -1
  126. package/dropdown/dropdown.js +8 -0
  127. package/dropdown/dropdown.min.js +1 -1
  128. package/editor/BaseEditor.vue +8 -6
  129. package/editor/Editor.d.ts +2 -2
  130. package/editor/editor.cjs.js +8 -6
  131. package/editor/editor.cjs.min.js +1 -1
  132. package/editor/editor.esm.js +8 -6
  133. package/editor/editor.esm.min.js +1 -1
  134. package/editor/editor.js +8 -6
  135. package/editor/editor.min.js +1 -1
  136. package/fieldset/Fieldset.d.ts +2 -2
  137. package/fileupload/FileUpload.d.ts +12 -7
  138. package/fileupload/FileUpload.vue +4 -0
  139. package/fileupload/fileupload.cjs.js +4 -0
  140. package/fileupload/fileupload.cjs.min.js +1 -1
  141. package/fileupload/fileupload.esm.js +4 -0
  142. package/fileupload/fileupload.esm.min.js +1 -1
  143. package/fileupload/fileupload.js +5 -2
  144. package/fileupload/fileupload.min.js +1 -1
  145. package/focustrap/FocusTrap.d.ts +2 -1
  146. package/galleria/Galleria.d.ts +2 -2
  147. package/galleria/GalleriaItem.vue +2 -2
  148. package/galleria/GalleriaThumbnails.vue +5 -1
  149. package/galleria/galleria.cjs.js +16 -7
  150. package/galleria/galleria.cjs.min.js +1 -1
  151. package/galleria/galleria.esm.js +16 -7
  152. package/galleria/galleria.esm.min.js +1 -1
  153. package/galleria/galleria.js +16 -7
  154. package/galleria/galleria.min.js +1 -1
  155. package/image/Image.d.ts +6 -4
  156. package/image/Image.vue +8 -6
  157. package/image/image.cjs.js +18 -5
  158. package/image/image.cjs.min.js +1 -1
  159. package/image/image.esm.js +19 -6
  160. package/image/image.esm.min.js +1 -1
  161. package/image/image.js +18 -5
  162. package/image/image.min.js +1 -1
  163. package/inlinemessage/InlineMessage.d.ts +2 -2
  164. package/inplace/Inplace.d.ts +2 -2
  165. package/inputmask/InputMask.d.ts +2 -2
  166. package/inputnumber/InputNumber.d.ts +2 -2
  167. package/inputnumber/InputNumber.vue +1 -0
  168. package/inputnumber/inputnumber.cjs.js +1 -0
  169. package/inputnumber/inputnumber.cjs.min.js +1 -1
  170. package/inputnumber/inputnumber.esm.js +1 -0
  171. package/inputnumber/inputnumber.esm.min.js +1 -1
  172. package/inputnumber/inputnumber.js +1 -0
  173. package/inputnumber/inputnumber.min.js +1 -1
  174. package/inputswitch/InputSwitch.d.ts +2 -2
  175. package/inputtext/InputText.d.ts +2 -2
  176. package/knob/Knob.d.ts +2 -2
  177. package/listbox/Listbox.d.ts +11 -5
  178. package/megamenu/MegaMenu.d.ts +3 -2
  179. package/menu/Menu.d.ts +2 -2
  180. package/menubar/Menubar.d.ts +3 -2
  181. package/message/BaseMessage.vue +5 -0
  182. package/message/Message.d.ts +4 -2
  183. package/message/message.cjs.js +1 -1
  184. package/message/message.cjs.min.js +1 -1
  185. package/message/message.esm.js +1 -1
  186. package/message/message.esm.min.js +1 -1
  187. package/message/message.js +1 -1
  188. package/message/message.min.js +1 -1
  189. package/multiselect/MultiSelect.d.ts +16 -6
  190. package/multiselect/MultiSelect.vue +1 -1
  191. package/multiselect/multiselect.cjs.js +1 -0
  192. package/multiselect/multiselect.cjs.min.js +1 -1
  193. package/multiselect/multiselect.esm.js +1 -0
  194. package/multiselect/multiselect.esm.min.js +1 -1
  195. package/multiselect/multiselect.js +1 -0
  196. package/multiselect/multiselect.min.js +1 -1
  197. package/orderlist/OrderList.d.ts +2 -2
  198. package/organizationchart/OrganizationChart.d.ts +2 -2
  199. package/overlaypanel/OverlayPanel.d.ts +2 -2
  200. package/package.json +9 -4
  201. package/paginator/Paginator.d.ts +2 -2
  202. package/panel/Panel.d.ts +3 -2
  203. package/panelmenu/PanelMenu.d.ts +3 -2
  204. package/passthrough/index.cjs.js +16 -60
  205. package/passthrough/index.cjs.min.js +1 -1
  206. package/passthrough/index.d.ts +0 -9
  207. package/passthrough/index.esm.js +16 -60
  208. package/passthrough/index.esm.min.js +1 -1
  209. package/passthrough/index.js +18 -59
  210. package/passthrough/index.min.js +1 -1
  211. package/passthrough/tailwind/index.cjs.js +365 -359
  212. package/passthrough/tailwind/index.cjs.min.js +1 -1
  213. package/passthrough/tailwind/index.d.ts +1 -2
  214. package/passthrough/tailwind/index.esm.js +365 -359
  215. package/passthrough/tailwind/index.esm.min.js +1 -1
  216. package/passthrough/tailwind/index.js +365 -359
  217. package/passthrough/tailwind/index.min.js +1 -1
  218. package/password/Password.d.ts +6 -4
  219. package/password/Password.vue +1 -0
  220. package/password/password.cjs.js +2 -1
  221. package/password/password.cjs.min.js +1 -1
  222. package/password/password.esm.js +2 -1
  223. package/password/password.esm.min.js +1 -1
  224. package/password/password.js +2 -1
  225. package/password/password.min.js +1 -1
  226. package/picklist/PickList.d.ts +2 -2
  227. package/picklist/PickList.vue +9 -7
  228. package/picklist/picklist.cjs.js +27 -9
  229. package/picklist/picklist.cjs.min.js +1 -1
  230. package/picklist/picklist.esm.js +27 -9
  231. package/picklist/picklist.esm.min.js +1 -1
  232. package/picklist/picklist.js +27 -9
  233. package/picklist/picklist.min.js +1 -1
  234. package/progressbar/ProgressBar.d.ts +2 -2
  235. package/progressspinner/ProgressSpinner.d.ts +2 -2
  236. package/radiobutton/RadioButton.d.ts +2 -2
  237. package/rating/Rating.d.ts +3 -2
  238. package/resources/themes/arya-blue/theme.css +4 -4
  239. package/resources/themes/arya-green/theme.css +4 -4
  240. package/resources/themes/arya-orange/theme.css +4 -4
  241. package/resources/themes/arya-purple/theme.css +4 -4
  242. package/resources/themes/bootstrap4-dark-blue/theme.css +8 -11
  243. package/resources/themes/bootstrap4-dark-purple/theme.css +8 -11
  244. package/resources/themes/bootstrap4-light-blue/theme.css +8 -11
  245. package/resources/themes/bootstrap4-light-purple/theme.css +8 -11
  246. package/resources/themes/fluent-light/theme.css +4 -4
  247. package/resources/themes/lara-dark-blue/theme.css +4 -4
  248. package/resources/themes/lara-dark-indigo/theme.css +4 -4
  249. package/resources/themes/lara-dark-purple/theme.css +4 -4
  250. package/resources/themes/lara-dark-teal/theme.css +4 -4
  251. package/resources/themes/lara-light-blue/theme.css +4 -4
  252. package/resources/themes/lara-light-indigo/theme.css +4 -4
  253. package/resources/themes/lara-light-purple/theme.css +4 -4
  254. package/resources/themes/lara-light-teal/theme.css +4 -4
  255. package/resources/themes/luna-amber/theme.css +4 -4
  256. package/resources/themes/luna-blue/theme.css +4 -4
  257. package/resources/themes/luna-green/theme.css +4 -4
  258. package/resources/themes/luna-pink/theme.css +4 -4
  259. package/resources/themes/md-dark-deeppurple/theme.css +4 -4
  260. package/resources/themes/md-dark-indigo/theme.css +4 -4
  261. package/resources/themes/md-light-deeppurple/theme.css +4 -4
  262. package/resources/themes/md-light-indigo/theme.css +4 -4
  263. package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
  264. package/resources/themes/mdc-dark-indigo/theme.css +4 -4
  265. package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
  266. package/resources/themes/mdc-light-indigo/theme.css +4 -4
  267. package/resources/themes/mira/theme.css +4 -4
  268. package/resources/themes/nano/theme.css +4 -4
  269. package/resources/themes/nova/theme.css +4 -4
  270. package/resources/themes/nova-accent/theme.css +4 -4
  271. package/resources/themes/nova-alt/theme.css +4 -4
  272. package/resources/themes/nova-vue/theme.css +4 -4
  273. package/resources/themes/rhea/theme.css +4 -4
  274. package/resources/themes/saga-blue/theme.css +4 -4
  275. package/resources/themes/saga-green/theme.css +4 -4
  276. package/resources/themes/saga-orange/theme.css +4 -4
  277. package/resources/themes/saga-purple/theme.css +4 -4
  278. package/resources/themes/soho-dark/theme.css +4 -4
  279. package/resources/themes/soho-light/theme.css +4 -4
  280. package/resources/themes/tailwind-light/theme.css +4 -4
  281. package/resources/themes/vela-blue/theme.css +4 -4
  282. package/resources/themes/vela-green/theme.css +4 -4
  283. package/resources/themes/vela-orange/theme.css +4 -4
  284. package/resources/themes/vela-purple/theme.css +4 -4
  285. package/resources/themes/viva-dark/theme.css +4 -4
  286. package/resources/themes/viva-light/theme.css +4 -4
  287. package/ripple/Ripple.d.ts +2 -1
  288. package/scrollpanel/ScrollPanel.d.ts +2 -2
  289. package/scrolltop/ScrollTop.d.ts +2 -2
  290. package/selectbutton/SelectButton.d.ts +6 -2
  291. package/selectbutton/SelectButton.vue +2 -1
  292. package/selectbutton/selectbutton.cjs.js +2 -1
  293. package/selectbutton/selectbutton.cjs.min.js +1 -1
  294. package/selectbutton/selectbutton.esm.js +2 -1
  295. package/selectbutton/selectbutton.esm.min.js +1 -1
  296. package/selectbutton/selectbutton.js +2 -1
  297. package/selectbutton/selectbutton.min.js +1 -1
  298. package/sidebar/Sidebar.d.ts +10 -4
  299. package/sidebar/Sidebar.vue +2 -2
  300. package/sidebar/sidebar.cjs.js +4 -2
  301. package/sidebar/sidebar.cjs.min.js +1 -1
  302. package/sidebar/sidebar.esm.js +5 -3
  303. package/sidebar/sidebar.esm.min.js +1 -1
  304. package/sidebar/sidebar.js +4 -2
  305. package/sidebar/sidebar.min.js +1 -1
  306. package/skeleton/Skeleton.d.ts +2 -2
  307. package/slider/Slider.d.ts +2 -2
  308. package/speeddial/SpeedDial.d.ts +9 -7
  309. package/speeddial/SpeedDial.vue +1 -1
  310. package/speeddial/speeddial.cjs.js +1 -1
  311. package/speeddial/speeddial.cjs.min.js +1 -1
  312. package/speeddial/speeddial.esm.js +1 -1
  313. package/speeddial/speeddial.esm.min.js +1 -1
  314. package/speeddial/speeddial.js +1 -1
  315. package/speeddial/speeddial.min.js +1 -1
  316. package/splitbutton/SplitButton.d.ts +4 -2
  317. package/splitter/Splitter.d.ts +2 -2
  318. package/splitterpanel/SplitterPanel.d.ts +2 -2
  319. package/steps/Steps.d.ts +2 -2
  320. package/styleclass/StyleClass.d.ts +2 -1
  321. package/tabmenu/TabMenu.d.ts +2 -2
  322. package/tabpanel/TabPanel.d.ts +2 -2
  323. package/tabview/TabView.d.ts +2 -2
  324. package/tag/Tag.d.ts +2 -2
  325. package/terminal/Terminal.d.ts +2 -2
  326. package/textarea/Textarea.d.ts +2 -2
  327. package/tieredmenu/TieredMenu.d.ts +3 -2
  328. package/timeline/Timeline.d.ts +2 -2
  329. package/toast/BaseToast.vue +2 -0
  330. package/toast/Toast.d.ts +16 -4
  331. package/toast/toast.cjs.js +1 -1
  332. package/toast/toast.cjs.min.js +1 -1
  333. package/toast/toast.esm.js +1 -1
  334. package/toast/toast.esm.min.js +1 -1
  335. package/toast/toast.js +1 -1
  336. package/toast/toast.min.js +1 -1
  337. package/togglebutton/ToggleButton.d.ts +3 -2
  338. package/toolbar/Toolbar.d.ts +2 -2
  339. package/tooltip/Tooltip.d.ts +2 -1
  340. package/tree/Tree.d.ts +6 -2
  341. package/treeselect/TreeSelect.d.ts +3 -2
  342. package/treetable/TreeTable.d.ts +3 -2
  343. package/treetable/TreeTable.vue +4 -2
  344. package/treetable/treetable.cjs.js +6 -5
  345. package/treetable/treetable.cjs.min.js +1 -1
  346. package/treetable/treetable.esm.js +6 -5
  347. package/treetable/treetable.esm.min.js +1 -1
  348. package/treetable/treetable.js +6 -5
  349. package/treetable/treetable.min.js +1 -1
  350. package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
  351. package/ts-helpers.d.ts +2 -0
  352. package/virtualscroller/VirtualScroller.d.ts +8 -6
  353. package/web-types.json +1 -1
@@ -2717,10 +2717,6 @@
2717
2717
  .p-datatable .p-column-resizer-helper {
2718
2718
  background: #64B5F6;
2719
2719
  }
2720
- .p-datatable .p-datatable-scrollable-header,
2721
- .p-datatable .p-datatable-scrollable-footer {
2722
- background: #1f2d40;
2723
- }
2724
2720
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
2725
2721
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
2726
2722
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
@@ -4382,6 +4378,10 @@
4382
4378
  border-bottom-right-radius: 3px;
4383
4379
  border-bottom-left-radius: 3px;
4384
4380
  }
4381
+ .p-fileupload .p-fileupload-content.p-fileupload-highlight {
4382
+ border: 1px dashed #64B5F6;
4383
+ background-color: rgba(100, 181, 246, 0.16);
4384
+ }
4385
4385
  .p-fileupload .p-fileupload-file {
4386
4386
  padding: 1rem;
4387
4387
  border: 1px solid #304562;
@@ -2717,10 +2717,6 @@
2717
2717
  .p-datatable .p-column-resizer-helper {
2718
2718
  background: #81C784;
2719
2719
  }
2720
- .p-datatable .p-datatable-scrollable-header,
2721
- .p-datatable .p-datatable-scrollable-footer {
2722
- background: #1f2d40;
2723
- }
2724
2720
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
2725
2721
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
2726
2722
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
@@ -4382,6 +4378,10 @@
4382
4378
  border-bottom-right-radius: 3px;
4383
4379
  border-bottom-left-radius: 3px;
4384
4380
  }
4381
+ .p-fileupload .p-fileupload-content.p-fileupload-highlight {
4382
+ border: 1px dashed #81C784;
4383
+ background-color: rgba(129, 199, 132, 0.16);
4384
+ }
4385
4385
  .p-fileupload .p-fileupload-file {
4386
4386
  padding: 1rem;
4387
4387
  border: 1px solid #304562;
@@ -2717,10 +2717,6 @@
2717
2717
  .p-datatable .p-column-resizer-helper {
2718
2718
  background: #FFD54F;
2719
2719
  }
2720
- .p-datatable .p-datatable-scrollable-header,
2721
- .p-datatable .p-datatable-scrollable-footer {
2722
- background: #1f2d40;
2723
- }
2724
2720
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
2725
2721
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
2726
2722
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
@@ -4382,6 +4378,10 @@
4382
4378
  border-bottom-right-radius: 3px;
4383
4379
  border-bottom-left-radius: 3px;
4384
4380
  }
4381
+ .p-fileupload .p-fileupload-content.p-fileupload-highlight {
4382
+ border: 1px dashed #FFD54F;
4383
+ background-color: rgba(255, 213, 79, 0.16);
4384
+ }
4385
4385
  .p-fileupload .p-fileupload-file {
4386
4386
  padding: 1rem;
4387
4387
  border: 1px solid #304562;
@@ -2717,10 +2717,6 @@
2717
2717
  .p-datatable .p-column-resizer-helper {
2718
2718
  background: #BA68C8;
2719
2719
  }
2720
- .p-datatable .p-datatable-scrollable-header,
2721
- .p-datatable .p-datatable-scrollable-footer {
2722
- background: #1f2d40;
2723
- }
2724
2720
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
2725
2721
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
2726
2722
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
@@ -4382,6 +4378,10 @@
4382
4378
  border-bottom-right-radius: 3px;
4383
4379
  border-bottom-left-radius: 3px;
4384
4380
  }
4381
+ .p-fileupload .p-fileupload-content.p-fileupload-highlight {
4382
+ border: 1px dashed #BA68C8;
4383
+ background-color: rgba(186, 104, 200, 0.16);
4384
+ }
4385
4385
  .p-fileupload .p-fileupload-file {
4386
4386
  padding: 1rem;
4387
4387
  border: 1px solid #304562;
@@ -2749,10 +2749,6 @@
2749
2749
  .p-datatable .p-column-resizer-helper {
2750
2750
  background: #9eade6;
2751
2751
  }
2752
- .p-datatable .p-datatable-scrollable-header,
2753
- .p-datatable .p-datatable-scrollable-footer {
2754
- background: #161d21;
2755
- }
2756
2752
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
2757
2753
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
2758
2754
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
@@ -4414,6 +4410,10 @@
4414
4410
  border-bottom-right-radius: 6px;
4415
4411
  border-bottom-left-radius: 6px;
4416
4412
  }
4413
+ .p-fileupload .p-fileupload-content.p-fileupload-highlight {
4414
+ border: 2px solid #263238 dashed #9eade6;
4415
+ background-color: rgba(158, 173, 230, 0.16);
4416
+ }
4417
4417
  .p-fileupload .p-fileupload-file {
4418
4418
  padding: 1rem;
4419
4419
  border: 1px solid #263238;
@@ -2749,10 +2749,6 @@
2749
2749
  .p-datatable .p-column-resizer-helper {
2750
2750
  background: #5472d4;
2751
2751
  }
2752
- .p-datatable .p-datatable-scrollable-header,
2753
- .p-datatable .p-datatable-scrollable-footer {
2754
- background: #ffffff;
2755
- }
2756
2752
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
2757
2753
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
2758
2754
  .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
@@ -4414,6 +4410,10 @@
4414
4410
  border-bottom-right-radius: 6px;
4415
4411
  border-bottom-left-radius: 6px;
4416
4412
  }
4413
+ .p-fileupload .p-fileupload-content.p-fileupload-highlight {
4414
+ border: 2px solid #ebebeb dashed #5472d4;
4415
+ background-color: #ced6f1;
4416
+ }
4417
4417
  .p-fileupload .p-fileupload-file {
4418
4418
  padding: 1rem;
4419
4419
  border: 1px solid #ebebeb;
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { DirectiveBinding, ObjectDirective } from 'vue';
10
10
  import { DirectiveHooks } from '../basedirective';
11
+ import { PTOptions } from '../ts-helpers';
11
12
 
12
13
  export declare type RippleDirectivePassThroughOptionType = RippleDirectivePassThroughAttributes | null | undefined;
13
14
 
@@ -19,7 +20,7 @@ export interface RippleOptions {
19
20
  * Used to pass attributes to DOM elements inside the component.
20
21
  * @type {RippleDirectivePassThroughOptions}
21
22
  */
22
- pt?: RippleDirectivePassThroughOptions;
23
+ pt?: PTOptions<RippleDirectivePassThroughOptions>;
23
24
  /**
24
25
  * When enabled, it removes component related styles in the core.
25
26
  * @defaultValue false
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type ScrollPanelPassThroughOptionType = ScrollPanelPassThroughAttributes | ((options: ScrollPanelPassThroughMethodOptions) => ScrollPanelPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -99,7 +99,7 @@ export interface ScrollPanelProps {
99
99
  * Used to pass attributes to DOM elements inside the component.
100
100
  * @type {ScrollPanelPassThroughOptions}
101
101
  */
102
- pt?: ScrollPanelPassThroughOptions;
102
+ pt?: PTOptions<ScrollPanelPassThroughOptions>;
103
103
  /**
104
104
  * When enabled, it removes component related styles in the core.
105
105
  * @defaultValue false
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { TransitionProps, VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type ScrollTopPassThroughOptionType = ScrollTopPassThroughAttributes | ((options: ScrollTopPassThroughMethodOptions) => ScrollTopPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -94,7 +94,7 @@ export interface ScrollTopProps {
94
94
  * Used to pass attributes to DOM elements inside the component.
95
95
  * @type {ScrollTopPassThroughOptions}
96
96
  */
97
- pt?: ScrollTopPassThroughOptions;
97
+ pt?: PTOptions<ScrollTopPassThroughOptions>;
98
98
  /**
99
99
  * When enabled, it removes component related styles in the core.
100
100
  * @defaultValue false
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type SelectButtonPassThroughOptionType = SelectButtonPassThroughAttributes | ((options: SelectButtonPassThroughMethodOptions) => SelectButtonPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -93,6 +93,10 @@ export interface SelectButtonContext {
93
93
  * @defaultValue false
94
94
  */
95
95
  focused: boolean;
96
+ /**
97
+ * Available option.
98
+ */
99
+ option: any;
96
100
  }
97
101
 
98
102
  /**
@@ -146,7 +150,7 @@ export interface SelectButtonProps {
146
150
  * Used to pass attributes to DOM elements inside the component.
147
151
  * @type {SelectButtonPassThroughOptions}
148
152
  */
149
- pt?: SelectButtonPassThroughOptions;
153
+ pt?: PTOptions<SelectButtonPassThroughOptions>;
150
154
  /**
151
155
  * When enabled, it removes component related styles in the core.
152
156
  * @defaultValue false
@@ -66,7 +66,8 @@ export default {
66
66
  return this.ptm(key, {
67
67
  context: {
68
68
  active: this.isSelected(option),
69
- disabled: this.isOptionDisabled(option)
69
+ disabled: this.isOptionDisabled(option),
70
+ option
70
71
  }
71
72
  });
72
73
  },
@@ -100,7 +100,8 @@ var script = {
100
100
  return this.ptm(key, {
101
101
  context: {
102
102
  active: this.isSelected(option),
103
- disabled: this.isOptionDisabled(option)
103
+ disabled: this.isOptionDisabled(option),
104
+ option: option
104
105
  }
105
106
  });
106
107
  },
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/ripple"),t=require("primevue/utils"),n=require("primevue/basecomponent"),i=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:r(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var r=this;if(!this.disabled&&!this.isOptionDisabled(n)){var o=this.isSelected(n);if(!o||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?o?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,r.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:o?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var r,o=a(this.modelValue);try{for(o.s();!(r=o.n()).done;){if(t.ObjectUtils.equals(r.value,i,this.equalityKey)){n=!0;break}}}catch(e){o.e(e)}finally{o.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,r=0;r<=this.$refs.container.children.length-1;r++)"0"===this.$refs.container.children[r].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[r],index:r});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:o.default}},f=["aria-labelledby"],h=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];p.render=function(e,t,n,r,o,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,r){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:r===o.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,r)},onKeydown:function(e){return a.onKeydown(e,n,r)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:r,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,h)),[[l]])})),128))],16,f)},module.exports=p;
1
+ "use strict";var e=require("primevue/ripple"),t=require("primevue/utils"),n=require("primevue/basecomponent"),i=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:r(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e),option:e}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var r=this;if(!this.disabled&&!this.isOptionDisabled(n)){var o=this.isSelected(n);if(!o||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?o?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,r.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:o?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var r,o=a(this.modelValue);try{for(o.s();!(r=o.n()).done;){if(t.ObjectUtils.equals(r.value,i,this.equalityKey)){n=!0;break}}}catch(e){o.e(e)}finally{o.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,r=0;r<=this.$refs.container.children.length-1;r++)"0"===this.$refs.container.children[r].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[r],index:r});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:o.default}},f=["aria-labelledby"],h=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];p.render=function(e,t,n,r,o,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,r){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:r===o.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,r)},onKeydown:function(e){return a.onKeydown(e,n,r)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:r,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,h)),[[l]])})),128))],16,f)},module.exports=p;
@@ -93,7 +93,8 @@ var script = {
93
93
  return this.ptm(key, {
94
94
  context: {
95
95
  active: this.isSelected(option),
96
- disabled: this.isOptionDisabled(option)
96
+ disabled: this.isOptionDisabled(option),
97
+ option: option
97
98
  }
98
99
  });
99
100
  },
@@ -1 +1 @@
1
- import e from"primevue/ripple";import{DomHandler as t,ObjectUtils as n}from"primevue/utils";import i from"primevue/basecomponent";import{resolveDirective as o,openBlock as r,createElementBlock as a,mergeProps as l,Fragment as s,renderList as u,withDirectives as d,renderSlot as c,normalizeClass as p,createElementVNode as f,toDisplayString as h}from"vue";function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var O={name:"SelectButton",extends:{name:"BaseSelectButton",extends:i,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.find(this.$refs.container,'[data-pc-section="button"]'),i=t.findSingle(this.$refs.container,'[data-p-highlight="true"]'),o=0;o<e.length;o++)(!0===t.getAttribute(e[o],"data-p-highlight")&&n.equals(e[o],i)||null===i&&0==o)&&(this.focusedIndex=o)},getOptionLabel:function(e){return this.optionLabel?n.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?n.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,t,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(t)){var r=this.isSelected(t);if(!r||!this.unselectable){var a,l,s=this.getOptionValue(t);a=this.multiple?r?this.modelValue.filter((function(e){return!n.equals(e,s,o.equalityKey)})):this.modelValue?[].concat(v(l=this.modelValue)||g(l)||y(l)||m(),[s]):[s]:r?null:s,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var t=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=b(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(n.equals(o.value,i,this.equalityKey)){t=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else t=n.equals(this.modelValue,i,this.equalityKey);return t},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:e}},S=["aria-labelledby"],w=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];O.render=function(e,t,n,i,b,m){var y=o("ripple");return r(),a("div",l({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(r(!0),a(s,null,u(e.options,(function(n,i){return d((r(),a("div",l({key:m.getOptionRenderKey(n),tabindex:i===b.focusedIndex?"0":"-1","aria-label":m.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":m.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return m.onOptionSelect(e,n,i)},onKeydown:function(e){return m.onKeydown(e,n,i)},onFocus:t[0]||(t[0]=function(e){return m.onFocus(e)}),onBlur:function(e){return m.onBlur(e,n)}},m.getPTOptions(n,"button"),{"data-p-highlight":m.isSelected(n),"data-p-disabled":m.isOptionDisabled(n)}),[c(e.$slots,"option",{option:n,index:i,class:p(e.cx("label"))},(function(){return[f("span",l({class:e.cx("label")},m.getPTOptions(n,"label")),h(m.getOptionLabel(n)),17)]}))],16,w)),[[y]])})),128))],16,S)};export{O as default};
1
+ import e from"primevue/ripple";import{DomHandler as t,ObjectUtils as n}from"primevue/utils";import i from"primevue/basecomponent";import{resolveDirective as o,openBlock as r,createElementBlock as a,mergeProps as l,Fragment as s,renderList as u,withDirectives as d,renderSlot as c,normalizeClass as p,createElementVNode as f,toDisplayString as h}from"vue";function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function m(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var O={name:"SelectButton",extends:{name:"BaseSelectButton",extends:i,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.find(this.$refs.container,'[data-pc-section="button"]'),i=t.findSingle(this.$refs.container,'[data-p-highlight="true"]'),o=0;o<e.length;o++)(!0===t.getAttribute(e[o],"data-p-highlight")&&n.equals(e[o],i)||null===i&&0==o)&&(this.focusedIndex=o)},getOptionLabel:function(e){return this.optionLabel?n.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?n.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e),option:e}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,t,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(t)){var r=this.isSelected(t);if(!r||!this.unselectable){var a,l,s=this.getOptionValue(t);a=this.multiple?r?this.modelValue.filter((function(e){return!n.equals(e,s,o.equalityKey)})):this.modelValue?[].concat(v(l=this.modelValue)||g(l)||y(l)||m(),[s]):[s]:r?null:s,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var t=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=b(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(n.equals(o.value,i,this.equalityKey)){t=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else t=n.equals(this.modelValue,i,this.equalityKey);return t},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:e}},S=["aria-labelledby"],w=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];O.render=function(e,t,n,i,b,m){var y=o("ripple");return r(),a("div",l({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(r(!0),a(s,null,u(e.options,(function(n,i){return d((r(),a("div",l({key:m.getOptionRenderKey(n),tabindex:i===b.focusedIndex?"0":"-1","aria-label":m.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":m.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return m.onOptionSelect(e,n,i)},onKeydown:function(e){return m.onKeydown(e,n,i)},onFocus:t[0]||(t[0]=function(e){return m.onFocus(e)}),onBlur:function(e){return m.onBlur(e,n)}},m.getPTOptions(n,"button"),{"data-p-highlight":m.isSelected(n),"data-p-disabled":m.isOptionDisabled(n)}),[c(e.$slots,"option",{option:n,index:i,class:p(e.cx("label"))},(function(){return[f("span",l({class:e.cx("label")},m.getPTOptions(n,"label")),h(m.getOptionLabel(n)),17)]}))],16,w)),[[y]])})),128))],16,S)};export{O as default};
@@ -97,7 +97,8 @@ this.primevue.selectbutton = (function (Ripple, utils, BaseComponent, vue) {
97
97
  return this.ptm(key, {
98
98
  context: {
99
99
  active: this.isSelected(option),
100
- disabled: this.isOptionDisabled(option)
100
+ disabled: this.isOptionDisabled(option),
101
+ option: option
101
102
  }
102
103
  });
103
104
  },
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.selectbutton=function(e,t,n,i){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:o(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(n)){var r=this.isSelected(n);if(!r||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?r?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,o.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:r?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=a(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(t.ObjectUtils.equals(o.value,i,this.equalityKey)){n=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:r.default}},h=["aria-labelledby"],f=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];return p.render=function(e,t,n,o,r,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,o){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:o===r.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,o)},onKeydown:function(e){return a.onKeydown(e,n,o)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:o,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,f)),[[l]])})),128))],16,h)},p}(primevue.ripple,primevue.utils,primevue.basecomponent,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.selectbutton=function(e,t,n,i){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:o(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e),option:e}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(n)){var r=this.isSelected(n);if(!r||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?r?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,o.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:r?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=a(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(t.ObjectUtils.equals(o.value,i,this.equalityKey)){n=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:r.default}},h=["aria-labelledby"],f=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];return p.render=function(e,t,n,o,r,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,o){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:o===r.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,o)},onKeydown:function(e){return a.onKeydown(e,n,o)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:o,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,f)),[[l]])})),128))],16,h)},p}(primevue.ripple,primevue.utils,primevue.basecomponent,Vue);
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { TransitionProps, VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type SidebarPassThroughOptionType = SidebarPassThroughAttributes | ((options: SidebarPassThroughMethodOptions) => SidebarPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -139,7 +139,7 @@ export interface SidebarProps {
139
139
  * Used to pass attributes to DOM elements inside the component.
140
140
  * @type {SidebarPassThroughOptions}
141
141
  */
142
- pt?: SidebarPassThroughOptions;
142
+ pt?: PTOptions<SidebarPassThroughOptions>;
143
143
  /**
144
144
  * When enabled, it removes component related styles in the core.
145
145
  * @defaultValue false
@@ -161,8 +161,14 @@ export interface SidebarSlots {
161
161
  header(): VNode[];
162
162
  /**
163
163
  * Custom close icon template.
164
- */
165
- closeicon(): VNode[];
164
+ * @param {Object} scope - close icon slot's params.
165
+ */
166
+ closeicon(scope: {
167
+ /**
168
+ * Style class of the close icon
169
+ */
170
+ class: any;
171
+ }): VNode[];
166
172
  }
167
173
 
168
174
  /**
@@ -8,7 +8,7 @@
8
8
  <slot name="header"></slot>
9
9
  </div>
10
10
  <button v-if="showCloseIcon" :ref="closeButtonRef" v-ripple autofocus type="button" :class="cx('closeButton')" :aria-label="closeAriaLabel" @click="hide" v-bind="ptm('closeButton')" data-pc-group-section="iconcontainer">
11
- <slot name="closeicon">
11
+ <slot name="closeicon" :class="cx('closeIcon')">
12
12
  <component :is="closeIcon ? 'span' : 'TimesIcon'" :class="[cx('closeIcon'), closeIcon]" v-bind="ptm('closeIcon')"></component>
13
13
  </slot>
14
14
  </button>
@@ -100,7 +100,7 @@ export default {
100
100
  },
101
101
  focus() {
102
102
  const findFocusableElement = (container) => {
103
- return container.querySelector('[autofocus]');
103
+ return container && container.querySelector('[autofocus]');
104
104
  };
105
105
 
106
106
  let focusTarget = this.$slots.default && findFocusableElement(this.content);
@@ -188,7 +188,7 @@ var script = {
188
188
  },
189
189
  focus: function focus() {
190
190
  var findFocusableElement = function findFocusableElement(container) {
191
- return container.querySelector('[autofocus]');
191
+ return container && container.querySelector('[autofocus]');
192
192
  };
193
193
  var focusTarget = this.$slots["default"] && findFocusableElement(this.content);
194
194
  if (!focusTarget) {
@@ -333,7 +333,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
333
333
  })
334
334
  }, _ctx.ptm('closeButton'), {
335
335
  "data-pc-group-section": "iconcontainer"
336
- }), [vue.renderSlot(_ctx.$slots, "closeicon", {}, function () {
336
+ }), [vue.renderSlot(_ctx.$slots, "closeicon", {
337
+ "class": vue.normalizeClass(_ctx.cx('closeIcon'))
338
+ }, function () {
337
339
  return [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon ? 'span' : 'TimesIcon'), vue.mergeProps({
338
340
  "class": [_ctx.cx('closeIcon'), _ctx.closeIcon]
339
341
  }, _ctx.ptm('closeIcon')), null, 16, ["class"]))];
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/focustrap"),n=require("primevue/icons/times"),t=require("primevue/portal"),i=require("primevue/ripple"),r=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(e),c=l(n),p=l(t),u=l(i),f=l(o),m=s.useStyle("\n.p-sidebar-mask {\n display: none;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n\n.p-sidebar-visible {\n display: flex;\n}\n\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n\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",{name:"sidebar",manual:!0}),b={name:"Sidebar",extends:{name:"BaseSidebar",extends:f.default,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:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},css:{classes:{mask:function(e){var n=e.instance,t=e.props,i=["left","right","top","bottom"].find((function(e){return e===t.position}));return["p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":t.modal,"p-sidebar-mask-scrollblocker":t.blockScroll,"p-sidebar-visible":n.containerVisible,"p-sidebar-full":n.fullScreen},i?"p-sidebar-".concat(i):""]},root:function(e){var n=e.instance;return["p-sidebar p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple,"p-sidebar-full":n.fullScreen}]},header:"p-sidebar-header",headerContent:"p-sidebar-header-content",closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",content:"p-sidebar-content"},inlineStyles:{mask:function(e){var n=e.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n?"flex-start":"right"===n?"flex-end":"center",alignItems:"top"===n?"flex-start":"bottom"===n?"flex-end":"center"}}},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.autoZIndex&&r.ZIndexUtils.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&r.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissable&&this.modal&&this.mask===e.target&&this.hide()},focus:function(){var e=function(e){return e.querySelector("[autofocus]")},n=this.$slots.default&&e(this.content);n||(n=this.$slots.header&&e(this.headerContainer))||(n=e(this.container)),n&&n.focus()},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&r.DomHandler.addClass(document.body,"p-overflow-hidden")},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&r.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeydown:function(e){"Escape"===e.code&&this.hide()},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},closeButtonRef:function(e){this.closeButton=e},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.isOutsideClicked(n)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked:function(e){return this.container&&!this.container.contains(e.target)}},computed:{fullScreen:function(){return"full"===this.position},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:d.default,ripple:u.default},components:{Portal:p.default,TimesIcon:c.default}};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function g(e,n,t){return(n=k(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function k(e){var n=x(e,"string");return"symbol"===h(n)?n:String(n)}function x(e,n){if("object"!==h(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,n||"default");if("object"!==h(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var w=["aria-modal"],C=["aria-label"];b.render=function(e,n,t,i,r,o){var s=a.resolveComponent("Portal"),l=a.resolveDirective("ripple"),d=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx((function(){return[r.containerVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.maskRef,onMousedown:n[2]||(n[2]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position})},e.ptm("mask")),[a.createVNode(a.Transition,a.mergeProps({name:"p-sidebar",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:a.withCtx((function(){return[e.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,class:e.cx("root"),role:"complementary","aria-modal":e.modal,onKeydown:n[1]||(n[1]=function(){return o.onKeydown&&o.onKeydown.apply(o,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[a.createElementVNode("div",a.mergeProps({ref:o.headerContainerRef,class:e.cx("header")},e.ptm("header")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("headerContent")},e.ptm("headerContent")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),e.showCloseIcon?a.withDirectives((a.openBlock(),a.createElementBlock("button",a.mergeProps({key:1,ref:o.closeButtonRef,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:n[0]||(n[0]=function(){return o.hide&&o.hide.apply(o,arguments)})},e.ptm("closeButton"),{"data-pc-group-section":"iconcontainer"}),[a.renderSlot(e.$slots,"closeicon",{},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),a.mergeProps({class:[e.cx("closeIcon"),e.closeIcon]},e.ptm("closeIcon")),null,16,["class"]))]}))],16,C)),[[l]]):a.createCommentVNode("",!0)],16),a.createElementVNode("div",a.mergeProps({ref:o.contentRef,class:e.cx("content")},e.ptm("content")),[a.renderSlot(e.$slots,"default")],16)],16,w)),[[d]]):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]})),_:3})},module.exports=b;
1
+ "use strict";var e=require("primevue/focustrap"),n=require("primevue/icons/times"),t=require("primevue/portal"),i=require("primevue/ripple"),r=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(e),c=l(n),p=l(t),u=l(i),f=l(o),m=s.useStyle("\n.p-sidebar-mask {\n display: none;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n\n.p-sidebar-visible {\n display: flex;\n}\n\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n\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",{name:"sidebar",manual:!0}),b={name:"Sidebar",extends:{name:"BaseSidebar",extends:f.default,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:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},css:{classes:{mask:function(e){var n=e.instance,t=e.props,i=["left","right","top","bottom"].find((function(e){return e===t.position}));return["p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":t.modal,"p-sidebar-mask-scrollblocker":t.blockScroll,"p-sidebar-visible":n.containerVisible,"p-sidebar-full":n.fullScreen},i?"p-sidebar-".concat(i):""]},root:function(e){var n=e.instance;return["p-sidebar p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple,"p-sidebar-full":n.fullScreen}]},header:"p-sidebar-header",headerContent:"p-sidebar-header-content",closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",content:"p-sidebar-content"},inlineStyles:{mask:function(e){var n=e.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n?"flex-start":"right"===n?"flex-end":"center",alignItems:"top"===n?"flex-start":"bottom"===n?"flex-end":"center"}}},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.autoZIndex&&r.ZIndexUtils.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&r.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissable&&this.modal&&this.mask===e.target&&this.hide()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},n=this.$slots.default&&e(this.content);n||(n=this.$slots.header&&e(this.headerContainer))||(n=e(this.container)),n&&n.focus()},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&r.DomHandler.addClass(document.body,"p-overflow-hidden")},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&r.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeydown:function(e){"Escape"===e.code&&this.hide()},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},closeButtonRef:function(e){this.closeButton=e},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.isOutsideClicked(n)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked:function(e){return this.container&&!this.container.contains(e.target)}},computed:{fullScreen:function(){return"full"===this.position},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:d.default,ripple:u.default},components:{Portal:p.default,TimesIcon:c.default}};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function g(e,n,t){return(n=k(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function k(e){var n=x(e,"string");return"symbol"===h(n)?n:String(n)}function x(e,n){if("object"!==h(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,n||"default");if("object"!==h(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var C=["aria-modal"],w=["aria-label"];b.render=function(e,n,t,i,r,o){var s=a.resolveComponent("Portal"),l=a.resolveDirective("ripple"),d=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx((function(){return[r.containerVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.maskRef,onMousedown:n[2]||(n[2]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position})},e.ptm("mask")),[a.createVNode(a.Transition,a.mergeProps({name:"p-sidebar",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:a.withCtx((function(){return[e.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,class:e.cx("root"),role:"complementary","aria-modal":e.modal,onKeydown:n[1]||(n[1]=function(){return o.onKeydown&&o.onKeydown.apply(o,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[a.createElementVNode("div",a.mergeProps({ref:o.headerContainerRef,class:e.cx("header")},e.ptm("header")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("headerContent")},e.ptm("headerContent")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),e.showCloseIcon?a.withDirectives((a.openBlock(),a.createElementBlock("button",a.mergeProps({key:1,ref:o.closeButtonRef,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:n[0]||(n[0]=function(){return o.hide&&o.hide.apply(o,arguments)})},e.ptm("closeButton"),{"data-pc-group-section":"iconcontainer"}),[a.renderSlot(e.$slots,"closeicon",{class:a.normalizeClass(e.cx("closeIcon"))},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),a.mergeProps({class:[e.cx("closeIcon"),e.closeIcon]},e.ptm("closeIcon")),null,16,["class"]))]}))],16,w)),[[l]]):a.createCommentVNode("",!0)],16),a.createElementVNode("div",a.mergeProps({ref:o.contentRef,class:e.cx("content")},e.ptm("content")),[a.renderSlot(e.$slots,"default")],16)],16,C)),[[d]]):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]})),_:3})},module.exports=b;
@@ -5,7 +5,7 @@ import Ripple from 'primevue/ripple';
5
5
  import { ZIndexUtils, DomHandler } from 'primevue/utils';
6
6
  import BaseComponent from 'primevue/basecomponent';
7
7
  import { useStyle } from 'primevue/usestyle';
8
- import { resolveComponent, resolveDirective, openBlock, createBlock, withCtx, createElementBlock, mergeProps, createVNode, Transition, withDirectives, createElementVNode, renderSlot, createCommentVNode, resolveDynamicComponent } from 'vue';
8
+ import { resolveComponent, resolveDirective, openBlock, createBlock, withCtx, createElementBlock, mergeProps, createVNode, Transition, withDirectives, createElementVNode, renderSlot, createCommentVNode, normalizeClass, resolveDynamicComponent } from 'vue';
9
9
 
10
10
  var styles = "\n.p-sidebar-mask {\n display: none;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n\n.p-sidebar-visible {\n display: flex;\n}\n\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n\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";
11
11
 
@@ -178,7 +178,7 @@ var script = {
178
178
  },
179
179
  focus: function focus() {
180
180
  var findFocusableElement = function findFocusableElement(container) {
181
- return container.querySelector('[autofocus]');
181
+ return container && container.querySelector('[autofocus]');
182
182
  };
183
183
  var focusTarget = this.$slots["default"] && findFocusableElement(this.content);
184
184
  if (!focusTarget) {
@@ -323,7 +323,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
323
323
  })
324
324
  }, _ctx.ptm('closeButton'), {
325
325
  "data-pc-group-section": "iconcontainer"
326
- }), [renderSlot(_ctx.$slots, "closeicon", {}, function () {
326
+ }), [renderSlot(_ctx.$slots, "closeicon", {
327
+ "class": normalizeClass(_ctx.cx('closeIcon'))
328
+ }, function () {
327
329
  return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon ? 'span' : 'TimesIcon'), mergeProps({
328
330
  "class": [_ctx.cx('closeIcon'), _ctx.closeIcon]
329
331
  }, _ctx.ptm('closeIcon')), null, 16, ["class"]))];
@@ -1 +1 @@
1
- import e from"primevue/focustrap";import n from"primevue/icons/times";import t from"primevue/portal";import i from"primevue/ripple";import{ZIndexUtils as r,DomHandler as o}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import{resolveComponent as l,resolveDirective as d,openBlock as p,createBlock as c,withCtx as u,createElementBlock as f,mergeProps as b,createVNode as m,Transition as h,withDirectives as v,createElementVNode as y,renderSlot as g,createCommentVNode as k,resolveDynamicComponent as x}from"vue";var w=a("\n.p-sidebar-mask {\n display: none;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n\n.p-sidebar-visible {\n display: flex;\n}\n\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n\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",{name:"sidebar",manual:!0}),C={name:"Sidebar",extends:{name:"BaseSidebar",extends:s,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:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},css:{classes:{mask:function(e){var n=e.instance,t=e.props,i=["left","right","top","bottom"].find((function(e){return e===t.position}));return["p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":t.modal,"p-sidebar-mask-scrollblocker":t.blockScroll,"p-sidebar-visible":n.containerVisible,"p-sidebar-full":n.fullScreen},i?"p-sidebar-".concat(i):""]},root:function(e){var n=e.instance;return["p-sidebar p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple,"p-sidebar-full":n.fullScreen}]},header:"p-sidebar-header",headerContent:"p-sidebar-header-content",closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",content:"p-sidebar-content"},inlineStyles:{mask:function(e){var n=e.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n?"flex-start":"right"===n?"flex-end":"center",alignItems:"top"===n?"flex-start":"bottom"===n?"flex-end":"center"}}},loadStyle:w.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&r.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.autoZIndex&&r.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&o.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&r.clear(this.mask),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissable&&this.modal&&this.mask===e.target&&this.hide()},focus:function(){var e=function(e){return e.querySelector("[autofocus]")},n=this.$slots.default&&e(this.content);n||(n=this.$slots.header&&e(this.headerContainer))||(n=e(this.container)),n&&n.focus()},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&o.addClass(document.body,"p-overflow-hidden")},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&o.removeClass(document.body,"p-overflow-hidden")},onKeydown:function(e){"Escape"===e.code&&this.hide()},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},closeButtonRef:function(e){this.closeButton=e},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.isOutsideClicked(n)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked:function(e){return this.container&&!this.container.contains(e.target)}},computed:{fullScreen:function(){return"full"===this.position},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:e,ripple:i},components:{Portal:t,TimesIcon:n}};function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){I(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function I(e,n,t){return(n=B(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function B(e){var n=j(e,"string");return"symbol"===S(n)?n:String(n)}function j(e,n){if("object"!==S(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,n||"default");if("object"!==S(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var $=["aria-modal"],E=["aria-label"];C.render=function(e,n,t,i,r,o){var s=l("Portal"),a=d("ripple"),w=d("focustrap");return p(),c(s,null,{default:u((function(){return[r.containerVisible?(p(),f("div",b({key:0,ref:o.maskRef,onMousedown:n[2]||(n[2]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position})},e.ptm("mask")),[m(h,b({name:"p-sidebar",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:u((function(){return[e.visible?v((p(),f("div",b({key:0,ref:o.containerRef,class:e.cx("root"),role:"complementary","aria-modal":e.modal,onKeydown:n[1]||(n[1]=function(){return o.onKeydown&&o.onKeydown.apply(o,arguments)})},O(O({},e.$attrs),e.ptm("root"))),[y("div",b({ref:o.headerContainerRef,class:e.cx("header")},e.ptm("header")),[e.$slots.header?(p(),f("div",b({key:0,class:e.cx("headerContent")},e.ptm("headerContent")),[g(e.$slots,"header")],16)):k("",!0),e.showCloseIcon?v((p(),f("button",b({key:1,ref:o.closeButtonRef,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:n[0]||(n[0]=function(){return o.hide&&o.hide.apply(o,arguments)})},e.ptm("closeButton"),{"data-pc-group-section":"iconcontainer"}),[g(e.$slots,"closeicon",{},(function(){return[(p(),c(x(e.closeIcon?"span":"TimesIcon"),b({class:[e.cx("closeIcon"),e.closeIcon]},e.ptm("closeIcon")),null,16,["class"]))]}))],16,E)),[[a]]):k("",!0)],16),y("div",b({ref:o.contentRef,class:e.cx("content")},e.ptm("content")),[g(e.$slots,"default")],16)],16,$)),[[w]]):k("",!0)]})),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):k("",!0)]})),_:3})};export{C as default};
1
+ import e from"primevue/focustrap";import n from"primevue/icons/times";import t from"primevue/portal";import i from"primevue/ripple";import{ZIndexUtils as r,DomHandler as o}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as a}from"primevue/usestyle";import{resolveComponent as l,resolveDirective as d,openBlock as c,createBlock as p,withCtx as u,createElementBlock as f,mergeProps as b,createVNode as m,Transition as h,withDirectives as v,createElementVNode as y,renderSlot as g,createCommentVNode as k,normalizeClass as x,resolveDynamicComponent as w}from"vue";var C=a("\n.p-sidebar-mask {\n display: none;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n\n.p-sidebar-visible {\n display: flex;\n}\n\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n\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",{name:"sidebar",manual:!0}),S={name:"Sidebar",extends:{name:"BaseSidebar",extends:s,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:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},css:{classes:{mask:function(e){var n=e.instance,t=e.props,i=["left","right","top","bottom"].find((function(e){return e===t.position}));return["p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":t.modal,"p-sidebar-mask-scrollblocker":t.blockScroll,"p-sidebar-visible":n.containerVisible,"p-sidebar-full":n.fullScreen},i?"p-sidebar-".concat(i):""]},root:function(e){var n=e.instance;return["p-sidebar p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple,"p-sidebar-full":n.fullScreen}]},header:"p-sidebar-header",headerContent:"p-sidebar-header-content",closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",content:"p-sidebar-content"},inlineStyles:{mask:function(e){var n=e.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n?"flex-start":"right"===n?"flex-end":"center",alignItems:"top"===n?"flex-start":"bottom"===n?"flex-end":"center"}}},loadStyle:C.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&r.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.autoZIndex&&r.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&o.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&r.clear(this.mask),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissable&&this.modal&&this.mask===e.target&&this.hide()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},n=this.$slots.default&&e(this.content);n||(n=this.$slots.header&&e(this.headerContainer))||(n=e(this.container)),n&&n.focus()},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&o.addClass(document.body,"p-overflow-hidden")},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&o.removeClass(document.body,"p-overflow-hidden")},onKeydown:function(e){"Escape"===e.code&&this.hide()},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},closeButtonRef:function(e){this.closeButton=e},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.isOutsideClicked(n)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked:function(e){return this.container&&!this.container.contains(e.target)}},computed:{fullScreen:function(){return"full"===this.position},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:e,ripple:i},components:{Portal:t,TimesIcon:n}};function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function I(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){B(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function B(e,n,t){return(n=j(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function j(e){var n=$(e,"string");return"symbol"===L(n)?n:String(n)}function $(e,n){if("object"!==L(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,n||"default");if("object"!==L(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var E=["aria-modal"],P=["aria-label"];S.render=function(e,n,t,i,r,o){var s=l("Portal"),a=d("ripple"),C=d("focustrap");return c(),p(s,null,{default:u((function(){return[r.containerVisible?(c(),f("div",b({key:0,ref:o.maskRef,onMousedown:n[2]||(n[2]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position})},e.ptm("mask")),[m(h,b({name:"p-sidebar",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:u((function(){return[e.visible?v((c(),f("div",b({key:0,ref:o.containerRef,class:e.cx("root"),role:"complementary","aria-modal":e.modal,onKeydown:n[1]||(n[1]=function(){return o.onKeydown&&o.onKeydown.apply(o,arguments)})},I(I({},e.$attrs),e.ptm("root"))),[y("div",b({ref:o.headerContainerRef,class:e.cx("header")},e.ptm("header")),[e.$slots.header?(c(),f("div",b({key:0,class:e.cx("headerContent")},e.ptm("headerContent")),[g(e.$slots,"header")],16)):k("",!0),e.showCloseIcon?v((c(),f("button",b({key:1,ref:o.closeButtonRef,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:n[0]||(n[0]=function(){return o.hide&&o.hide.apply(o,arguments)})},e.ptm("closeButton"),{"data-pc-group-section":"iconcontainer"}),[g(e.$slots,"closeicon",{class:x(e.cx("closeIcon"))},(function(){return[(c(),p(w(e.closeIcon?"span":"TimesIcon"),b({class:[e.cx("closeIcon"),e.closeIcon]},e.ptm("closeIcon")),null,16,["class"]))]}))],16,P)),[[a]]):k("",!0)],16),y("div",b({ref:o.contentRef,class:e.cx("content")},e.ptm("content")),[g(e.$slots,"default")],16)],16,E)),[[C]]):k("",!0)]})),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):k("",!0)]})),_:3})};export{S as default};