primevue 3.15.0 → 3.16.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 (387) hide show
  1. package/autocomplete/AutoComplete.d.ts +182 -38
  2. package/autocomplete/AutoComplete.vue +636 -342
  3. package/autocomplete/autocomplete.cjs.js +745 -416
  4. package/autocomplete/autocomplete.cjs.min.js +1 -1
  5. package/autocomplete/autocomplete.esm.js +747 -418
  6. package/autocomplete/autocomplete.esm.min.js +1 -1
  7. package/autocomplete/autocomplete.js +745 -416
  8. package/autocomplete/autocomplete.min.js +1 -1
  9. package/button/Button.vue +4 -1
  10. package/button/button.cjs.js +5 -1
  11. package/button/button.cjs.min.js +1 -1
  12. package/button/button.esm.js +5 -1
  13. package/button/button.esm.min.js +1 -1
  14. package/button/button.js +5 -1
  15. package/button/button.min.js +1 -1
  16. package/calendar/Calendar.d.ts +51 -12
  17. package/calendar/Calendar.vue +259 -114
  18. package/calendar/calendar.cjs.js +414 -220
  19. package/calendar/calendar.cjs.min.js +1 -1
  20. package/calendar/calendar.esm.js +415 -221
  21. package/calendar/calendar.esm.min.js +1 -1
  22. package/calendar/calendar.js +414 -220
  23. package/calendar/calendar.min.js +1 -1
  24. package/carousel/Carousel.vue +25 -0
  25. package/carousel/carousel.cjs.js +25 -0
  26. package/carousel/carousel.cjs.min.js +1 -1
  27. package/carousel/carousel.esm.js +25 -0
  28. package/carousel/carousel.esm.min.js +1 -1
  29. package/carousel/carousel.js +25 -0
  30. package/carousel/carousel.min.js +1 -1
  31. package/cascadeselect/CascadeSelect.d.ts +97 -17
  32. package/cascadeselect/CascadeSelect.vue +560 -135
  33. package/cascadeselect/CascadeSelectSub.vue +48 -129
  34. package/cascadeselect/cascadeselect.cjs.js +670 -306
  35. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  36. package/cascadeselect/cascadeselect.esm.js +672 -308
  37. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  38. package/cascadeselect/cascadeselect.js +670 -306
  39. package/cascadeselect/cascadeselect.min.js +1 -1
  40. package/checkbox/Checkbox.d.ts +40 -4
  41. package/checkbox/Checkbox.vue +50 -13
  42. package/checkbox/checkbox.cjs.js +64 -23
  43. package/checkbox/checkbox.cjs.min.js +1 -1
  44. package/checkbox/checkbox.esm.js +65 -24
  45. package/checkbox/checkbox.esm.min.js +1 -1
  46. package/checkbox/checkbox.js +64 -23
  47. package/checkbox/checkbox.min.js +1 -1
  48. package/chips/Chips.d.ts +36 -12
  49. package/chips/Chips.vue +116 -22
  50. package/chips/chips.cjs.js +149 -37
  51. package/chips/chips.cjs.min.js +1 -1
  52. package/chips/chips.esm.js +150 -38
  53. package/chips/chips.esm.min.js +1 -1
  54. package/chips/chips.js +150 -39
  55. package/chips/chips.min.js +1 -1
  56. package/colorpicker/ColorPicker.d.ts +3 -6
  57. package/colorpicker/ColorPicker.vue +1 -5
  58. package/colorpicker/colorpicker.cjs.js +2 -7
  59. package/colorpicker/colorpicker.cjs.min.js +1 -1
  60. package/colorpicker/colorpicker.esm.js +2 -7
  61. package/colorpicker/colorpicker.esm.min.js +1 -1
  62. package/colorpicker/colorpicker.js +2 -7
  63. package/colorpicker/colorpicker.min.js +1 -1
  64. package/column/Column.d.ts +4 -0
  65. package/column/Column.vue +4 -0
  66. package/column/column.cjs.js +4 -0
  67. package/column/column.cjs.min.js +1 -1
  68. package/column/column.esm.js +4 -0
  69. package/column/column.esm.min.js +1 -1
  70. package/column/column.js +4 -0
  71. package/column/column.min.js +1 -1
  72. package/config/PrimeVue.d.ts +42 -0
  73. package/config/config.cjs.js +35 -4
  74. package/config/config.cjs.min.js +1 -1
  75. package/config/config.esm.js +35 -4
  76. package/config/config.esm.min.js +1 -1
  77. package/config/config.js +35 -4
  78. package/config/config.min.js +1 -1
  79. package/confirmdialog/ConfirmDialog.vue +4 -1
  80. package/confirmdialog/confirmdialog.cjs.js +6 -2
  81. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  82. package/confirmdialog/confirmdialog.esm.js +6 -2
  83. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  84. package/confirmdialog/confirmdialog.js +6 -2
  85. package/confirmdialog/confirmdialog.min.js +1 -1
  86. package/contextmenu/ContextMenu.d.ts +1 -1
  87. package/contextmenu/ContextMenuSub.vue +3 -3
  88. package/contextmenu/contextmenu.cjs.js +14 -8
  89. package/contextmenu/contextmenu.cjs.min.js +1 -1
  90. package/contextmenu/contextmenu.esm.js +15 -9
  91. package/contextmenu/contextmenu.esm.min.js +1 -1
  92. package/contextmenu/contextmenu.js +14 -8
  93. package/contextmenu/contextmenu.min.js +1 -1
  94. package/core/core.js +1128 -772
  95. package/core/core.min.js +12 -12
  96. package/datatable/BodyCell.vue +11 -2
  97. package/datatable/DataTable.vue +23 -2
  98. package/datatable/datatable.cjs.js +34 -4
  99. package/datatable/datatable.cjs.min.js +1 -1
  100. package/datatable/datatable.esm.js +34 -4
  101. package/datatable/datatable.esm.min.js +1 -1
  102. package/datatable/datatable.js +34 -4
  103. package/datatable/datatable.min.js +1 -1
  104. package/dialog/Dialog.d.ts +5 -1
  105. package/dropdown/Dropdown.d.ts +92 -38
  106. package/dropdown/Dropdown.vue +538 -399
  107. package/dropdown/dropdown.cjs.js +657 -486
  108. package/dropdown/dropdown.cjs.min.js +1 -1
  109. package/dropdown/dropdown.esm.js +659 -488
  110. package/dropdown/dropdown.esm.min.js +1 -1
  111. package/dropdown/dropdown.js +657 -486
  112. package/dropdown/dropdown.min.js +1 -1
  113. package/editor/Editor.d.ts +32 -0
  114. package/editor/Editor.vue +15 -1
  115. package/editor/editor.cjs.js +15 -1
  116. package/editor/editor.cjs.min.js +1 -1
  117. package/editor/editor.esm.js +15 -1
  118. package/editor/editor.esm.min.js +1 -1
  119. package/editor/editor.js +15 -1
  120. package/editor/editor.min.js +1 -1
  121. package/inputmask/InputMask.vue +9 -6
  122. package/inputmask/inputmask.cjs.js +14 -6
  123. package/inputmask/inputmask.cjs.min.js +1 -1
  124. package/inputmask/inputmask.esm.js +15 -7
  125. package/inputmask/inputmask.esm.min.js +1 -1
  126. package/inputmask/inputmask.js +14 -6
  127. package/inputmask/inputmask.min.js +1 -1
  128. package/inputnumber/InputNumber.d.ts +31 -7
  129. package/inputnumber/InputNumber.vue +53 -20
  130. package/inputnumber/inputnumber.cjs.js +75 -29
  131. package/inputnumber/inputnumber.cjs.min.js +1 -1
  132. package/inputnumber/inputnumber.esm.js +76 -30
  133. package/inputnumber/inputnumber.esm.min.js +1 -1
  134. package/inputnumber/inputnumber.js +75 -29
  135. package/inputnumber/inputnumber.min.js +1 -1
  136. package/inputswitch/InputSwitch.d.ts +24 -8
  137. package/inputswitch/InputSwitch.vue +27 -12
  138. package/inputswitch/inputswitch.cjs.js +38 -20
  139. package/inputswitch/inputswitch.cjs.min.js +1 -1
  140. package/inputswitch/inputswitch.esm.js +39 -21
  141. package/inputswitch/inputswitch.esm.min.js +1 -1
  142. package/inputswitch/inputswitch.js +38 -20
  143. package/inputswitch/inputswitch.min.js +1 -1
  144. package/inputtext/InputText.vue +1 -2
  145. package/inputtext/inputtext.cjs.js +3 -4
  146. package/inputtext/inputtext.cjs.min.js +1 -1
  147. package/inputtext/inputtext.esm.js +4 -5
  148. package/inputtext/inputtext.esm.min.js +1 -1
  149. package/inputtext/inputtext.js +3 -4
  150. package/inputtext/inputtext.min.js +1 -1
  151. package/knob/Knob.d.ts +12 -0
  152. package/knob/Knob.vue +62 -2
  153. package/knob/knob.cjs.js +73 -5
  154. package/knob/knob.cjs.min.js +1 -1
  155. package/knob/knob.esm.js +73 -5
  156. package/knob/knob.esm.min.js +1 -1
  157. package/knob/knob.js +73 -5
  158. package/knob/knob.min.js +1 -1
  159. package/listbox/Listbox.d.ts +53 -7
  160. package/listbox/Listbox.vue +500 -135
  161. package/listbox/listbox.cjs.js +597 -193
  162. package/listbox/listbox.cjs.min.js +1 -1
  163. package/listbox/listbox.esm.js +599 -195
  164. package/listbox/listbox.esm.min.js +1 -1
  165. package/listbox/listbox.js +597 -193
  166. package/listbox/listbox.min.js +1 -1
  167. package/menu/Menu.d.ts +1 -1
  168. package/menu/Menuitem.vue +2 -2
  169. package/menu/menu.cjs.js +12 -6
  170. package/menu/menu.cjs.min.js +1 -1
  171. package/menu/menu.esm.js +13 -7
  172. package/menu/menu.esm.min.js +1 -1
  173. package/menu/menu.js +12 -6
  174. package/menu/menu.min.js +1 -1
  175. package/menubar/MenubarSub.vue +3 -3
  176. package/menubar/menubar.cjs.js +14 -8
  177. package/menubar/menubar.cjs.min.js +1 -1
  178. package/menubar/menubar.esm.js +15 -9
  179. package/menubar/menubar.esm.min.js +1 -1
  180. package/menubar/menubar.js +14 -8
  181. package/menubar/menubar.min.js +1 -1
  182. package/menuitem/MenuItem.d.ts +1 -1
  183. package/multiselect/MultiSelect.d.ts +111 -51
  184. package/multiselect/MultiSelect.vue +629 -338
  185. package/multiselect/multiselect.cjs.js +748 -428
  186. package/multiselect/multiselect.cjs.min.js +1 -1
  187. package/multiselect/multiselect.esm.js +750 -430
  188. package/multiselect/multiselect.esm.min.js +1 -1
  189. package/multiselect/multiselect.js +748 -428
  190. package/multiselect/multiselect.min.js +1 -1
  191. package/overlaypanel/OverlayPanel.d.ts +1 -1
  192. package/overlaypanel/OverlayPanel.vue +14 -2
  193. package/overlaypanel/overlaypanel.cjs.js +14 -2
  194. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  195. package/overlaypanel/overlaypanel.esm.js +14 -2
  196. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  197. package/overlaypanel/overlaypanel.js +14 -2
  198. package/overlaypanel/overlaypanel.min.js +1 -1
  199. package/package.json +2 -2
  200. package/paginator/Paginator.d.ts +2 -2
  201. package/password/Password.d.ts +36 -8
  202. package/password/Password.vue +50 -14
  203. package/password/password.cjs.js +69 -24
  204. package/password/password.cjs.min.js +1 -1
  205. package/password/password.esm.js +71 -26
  206. package/password/password.esm.min.js +1 -1
  207. package/password/password.js +69 -24
  208. package/password/password.min.js +1 -1
  209. package/picklist/PickList.d.ts +8 -0
  210. package/picklist/PickList.vue +10 -2
  211. package/picklist/picklist.cjs.js +68 -50
  212. package/picklist/picklist.cjs.min.js +1 -1
  213. package/picklist/picklist.esm.js +69 -51
  214. package/picklist/picklist.esm.min.js +1 -1
  215. package/picklist/picklist.js +68 -50
  216. package/picklist/picklist.min.js +1 -1
  217. package/portal/Portal.d.ts +1 -1
  218. package/radiobutton/RadioButton.d.ts +28 -4
  219. package/radiobutton/RadioButton.vue +36 -11
  220. package/radiobutton/radiobutton.cjs.js +49 -23
  221. package/radiobutton/radiobutton.cjs.min.js +1 -1
  222. package/radiobutton/radiobutton.esm.js +50 -24
  223. package/radiobutton/radiobutton.esm.min.js +1 -1
  224. package/radiobutton/radiobutton.js +49 -23
  225. package/radiobutton/radiobutton.min.js +1 -1
  226. package/rating/Rating.d.ts +4 -0
  227. package/rating/Rating.vue +61 -7
  228. package/rating/rating.cjs.js +90 -16
  229. package/rating/rating.cjs.min.js +1 -1
  230. package/rating/rating.esm.js +91 -17
  231. package/rating/rating.esm.min.js +1 -1
  232. package/rating/rating.js +90 -16
  233. package/rating/rating.min.js +1 -1
  234. package/resources/primevue.css +8 -0
  235. package/resources/primevue.min.css +1 -1
  236. package/resources/themes/arya-blue/theme.css +82 -40
  237. package/resources/themes/arya-green/theme.css +82 -40
  238. package/resources/themes/arya-orange/theme.css +82 -40
  239. package/resources/themes/arya-purple/theme.css +82 -40
  240. package/resources/themes/bootstrap4-dark-blue/theme.css +82 -40
  241. package/resources/themes/bootstrap4-dark-purple/theme.css +82 -40
  242. package/resources/themes/bootstrap4-light-blue/theme.css +82 -40
  243. package/resources/themes/bootstrap4-light-purple/theme.css +82 -40
  244. package/resources/themes/fluent-light/theme.css +82 -40
  245. package/resources/themes/lara-dark-blue/theme.css +82 -40
  246. package/resources/themes/lara-dark-indigo/theme.css +82 -40
  247. package/resources/themes/lara-dark-purple/theme.css +82 -40
  248. package/resources/themes/lara-dark-teal/theme.css +82 -40
  249. package/resources/themes/lara-light-blue/theme.css +82 -40
  250. package/resources/themes/lara-light-indigo/theme.css +82 -40
  251. package/resources/themes/lara-light-purple/theme.css +82 -40
  252. package/resources/themes/lara-light-teal/theme.css +82 -40
  253. package/resources/themes/luna-amber/theme.css +82 -40
  254. package/resources/themes/luna-blue/theme.css +82 -40
  255. package/resources/themes/luna-green/theme.css +82 -40
  256. package/resources/themes/luna-pink/theme.css +82 -40
  257. package/resources/themes/md-dark-deeppurple/theme.css +82 -40
  258. package/resources/themes/md-dark-indigo/theme.css +82 -40
  259. package/resources/themes/md-light-deeppurple/theme.css +82 -40
  260. package/resources/themes/md-light-indigo/theme.css +82 -40
  261. package/resources/themes/mdc-dark-deeppurple/theme.css +82 -40
  262. package/resources/themes/mdc-dark-indigo/theme.css +82 -40
  263. package/resources/themes/mdc-light-deeppurple/theme.css +82 -40
  264. package/resources/themes/mdc-light-indigo/theme.css +82 -40
  265. package/resources/themes/nova/theme.css +82 -40
  266. package/resources/themes/nova-accent/theme.css +82 -40
  267. package/resources/themes/nova-alt/theme.css +82 -40
  268. package/resources/themes/nova-vue/theme.css +82 -40
  269. package/resources/themes/rhea/theme.css +82 -40
  270. package/resources/themes/saga-blue/theme.css +82 -40
  271. package/resources/themes/saga-green/theme.css +82 -40
  272. package/resources/themes/saga-orange/theme.css +82 -40
  273. package/resources/themes/saga-purple/theme.css +82 -40
  274. package/resources/themes/tailwind-light/theme.css +82 -40
  275. package/resources/themes/vela-blue/theme.css +82 -40
  276. package/resources/themes/vela-green/theme.css +82 -40
  277. package/resources/themes/vela-orange/theme.css +82 -40
  278. package/resources/themes/vela-purple/theme.css +82 -40
  279. package/ripple/ripple.cjs.js +1 -0
  280. package/ripple/ripple.cjs.min.js +1 -1
  281. package/ripple/ripple.esm.js +1 -0
  282. package/ripple/ripple.esm.min.js +1 -1
  283. package/ripple/ripple.js +1 -0
  284. package/ripple/ripple.min.js +1 -1
  285. package/selectbutton/SelectButton.d.ts +6 -2
  286. package/selectbutton/SelectButton.vue +89 -12
  287. package/selectbutton/selectbutton.cjs.js +97 -22
  288. package/selectbutton/selectbutton.cjs.min.js +1 -1
  289. package/selectbutton/selectbutton.esm.js +99 -24
  290. package/selectbutton/selectbutton.esm.min.js +1 -1
  291. package/selectbutton/selectbutton.js +97 -22
  292. package/selectbutton/selectbutton.min.js +1 -1
  293. package/slider/Slider.d.ts +9 -1
  294. package/slider/Slider.vue +50 -34
  295. package/slider/slider.cjs.js +59 -38
  296. package/slider/slider.cjs.min.js +1 -1
  297. package/slider/slider.esm.js +59 -38
  298. package/slider/slider.esm.min.js +1 -1
  299. package/slider/slider.js +59 -38
  300. package/slider/slider.min.js +1 -1
  301. package/splitbutton/SplitButton.d.ts +1 -1
  302. package/splitter/Splitter.vue +30 -1
  303. package/splitter/splitter.cjs.js +30 -1
  304. package/splitter/splitter.cjs.min.js +1 -1
  305. package/splitter/splitter.esm.js +30 -1
  306. package/splitter/splitter.esm.min.js +1 -1
  307. package/splitter/splitter.js +30 -1
  308. package/splitter/splitter.min.js +1 -1
  309. package/textarea/Textarea.vue +1 -2
  310. package/textarea/textarea.cjs.js +3 -5
  311. package/textarea/textarea.cjs.min.js +1 -1
  312. package/textarea/textarea.esm.js +4 -6
  313. package/textarea/textarea.esm.min.js +1 -1
  314. package/textarea/textarea.js +3 -5
  315. package/textarea/textarea.min.js +1 -1
  316. package/tieredmenu/TieredMenu.d.ts +1 -1
  317. package/tieredmenu/TieredMenuSub.vue +3 -3
  318. package/tieredmenu/tieredmenu.cjs.js +14 -8
  319. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  320. package/tieredmenu/tieredmenu.esm.js +15 -9
  321. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  322. package/tieredmenu/tieredmenu.js +14 -8
  323. package/tieredmenu/tieredmenu.min.js +1 -1
  324. package/timeline/Timeline.d.ts +10 -1
  325. package/timeline/Timeline.vue +1 -1
  326. package/timeline/timeline.cjs.js +5 -1
  327. package/timeline/timeline.cjs.min.js +1 -1
  328. package/timeline/timeline.esm.js +5 -1
  329. package/timeline/timeline.esm.min.js +1 -1
  330. package/timeline/timeline.js +5 -1
  331. package/timeline/timeline.min.js +1 -1
  332. package/togglebutton/ToggleButton.d.ts +42 -0
  333. package/togglebutton/ToggleButton.vue +44 -7
  334. package/togglebutton/togglebutton.cjs.js +59 -13
  335. package/togglebutton/togglebutton.cjs.min.js +1 -1
  336. package/togglebutton/togglebutton.esm.js +60 -14
  337. package/togglebutton/togglebutton.esm.min.js +1 -1
  338. package/togglebutton/togglebutton.js +59 -13
  339. package/togglebutton/togglebutton.min.js +1 -1
  340. package/tooltip/tooltip.cjs.js +20 -11
  341. package/tooltip/tooltip.cjs.min.js +1 -1
  342. package/tooltip/tooltip.esm.js +21 -12
  343. package/tooltip/tooltip.esm.min.js +1 -1
  344. package/tooltip/tooltip.js +20 -11
  345. package/tooltip/tooltip.min.js +1 -1
  346. package/tree/Tree.vue +5 -1
  347. package/tree/TreeNode.vue +20 -19
  348. package/tree/tree.cjs.js +47 -32
  349. package/tree/tree.cjs.min.js +1 -1
  350. package/tree/tree.esm.js +47 -32
  351. package/tree/tree.esm.min.js +1 -1
  352. package/tree/tree.js +47 -32
  353. package/tree/tree.min.js +1 -1
  354. package/treeselect/TreeSelect.d.ts +26 -10
  355. package/treeselect/TreeSelect.vue +52 -29
  356. package/treeselect/treeselect.cjs.js +74 -41
  357. package/treeselect/treeselect.cjs.min.js +1 -1
  358. package/treeselect/treeselect.esm.js +76 -43
  359. package/treeselect/treeselect.esm.min.js +1 -1
  360. package/treeselect/treeselect.js +74 -41
  361. package/treeselect/treeselect.min.js +1 -1
  362. package/tristatecheckbox/TriStateCheckbox.d.ts +20 -4
  363. package/tristatecheckbox/TriStateCheckbox.vue +52 -15
  364. package/tristatecheckbox/tristatecheckbox.cjs.js +67 -26
  365. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  366. package/tristatecheckbox/tristatecheckbox.esm.js +68 -27
  367. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  368. package/tristatecheckbox/tristatecheckbox.js +67 -26
  369. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  370. package/utils/Utils.d.ts +3 -2
  371. package/utils/utils.cjs.js +239 -173
  372. package/utils/utils.cjs.min.js +1 -1
  373. package/utils/utils.esm.js +239 -173
  374. package/utils/utils.esm.min.js +1 -1
  375. package/utils/utils.js +239 -173
  376. package/utils/utils.min.js +1 -1
  377. package/vetur-attributes.json +612 -136
  378. package/vetur-tags.json +180 -59
  379. package/virtualscroller/VirtualScroller.d.ts +10 -0
  380. package/virtualscroller/VirtualScroller.vue +18 -17
  381. package/virtualscroller/virtualscroller.cjs.js +22 -20
  382. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  383. package/virtualscroller/virtualscroller.esm.js +22 -20
  384. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  385. package/virtualscroller/virtualscroller.js +22 -20
  386. package/virtualscroller/virtualscroller.min.js +1 -1
  387. package/web-types.json +1745 -338
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/utils"),n=require("vue"),t={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const i={class:"p-timeline-event-opposite"},l={class:"p-timeline-event-separator"},o=n.createElementVNode("div",{class:"p-timeline-event-marker"},null,-1),r=n.createElementVNode("div",{class:"p-timeline-event-connector"},null,-1),m={class:"p-timeline-event-content"};!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===t&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),t.render=function(e,t,a,s,c,p){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(p.containerClass)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,((t,s)=>(n.openBlock(),n.createElementBlock("div",{key:p.getKey(t,s),class:"p-timeline-event"},[n.createElementVNode("div",i,[n.renderSlot(e.$slots,"opposite",{item:t,index:s})]),n.createElementVNode("div",l,[n.renderSlot(e.$slots,"marker",{item:t,index:s},(()=>[o])),s!==a.value.length-1?n.renderSlot(e.$slots,"connector",{key:0},(()=>[r])):n.createCommentVNode("",!0)]),n.createElementVNode("div",m,[n.renderSlot(e.$slots,"content",{item:t,index:s})])])))),128))],2)},module.exports=t;
1
+ "use strict";var e=require("primevue/utils"),n=require("vue"),t={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const i={class:"p-timeline-event-opposite"},l={class:"p-timeline-event-separator"},o=n.createElementVNode("div",{class:"p-timeline-event-marker"},null,-1),r=n.createElementVNode("div",{class:"p-timeline-event-connector"},null,-1),m={class:"p-timeline-event-content"};!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===t&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),t.render=function(e,t,a,s,c,p){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(p.containerClass)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,((t,s)=>(n.openBlock(),n.createElementBlock("div",{key:p.getKey(t,s),class:"p-timeline-event"},[n.createElementVNode("div",i,[n.renderSlot(e.$slots,"opposite",{item:t,index:s})]),n.createElementVNode("div",l,[n.renderSlot(e.$slots,"marker",{item:t,index:s},(()=>[o])),s!==a.value.length-1?n.renderSlot(e.$slots,"connector",{key:0,item:t,index:s},(()=>[r])):n.createCommentVNode("",!0)]),n.createElementVNode("div",m,[n.renderSlot(e.$slots,"content",{item:t,index:s})])])))),128))],2)},module.exports=t;
@@ -60,7 +60,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
60
60
  _hoisted_3
61
61
  ]),
62
62
  (index !== ($props.value.length - 1))
63
- ? renderSlot(_ctx.$slots, "connector", { key: 0 }, () => [
63
+ ? renderSlot(_ctx.$slots, "connector", {
64
+ key: 0,
65
+ item: item,
66
+ index: index
67
+ }, () => [
64
68
  _hoisted_4
65
69
  ])
66
70
  : createCommentVNode("", true)
@@ -1 +1 @@
1
- import{ObjectUtils as e}from"primevue/utils";import{openBlock as n,createElementBlock as i,normalizeClass as t,Fragment as l,renderList as o,createElementVNode as r,renderSlot as m,createCommentVNode as a}from"vue";var s={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,i){return this.dataKey?e.resolveFieldData(n,this.dataKey):i}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const p={class:"p-timeline-event-opposite"},x={class:"p-timeline-event-separator"},c=r("div",{class:"p-timeline-event-marker"},null,-1),d=r("div",{class:"p-timeline-event-connector"},null,-1),v={class:"p-timeline-event-content"};!function(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===i&&t.firstChild?t.insertBefore(l,t.firstChild):t.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),s.render=function(e,s,f,b,h,w){return n(),i("div",{class:t(w.containerClass)},[(n(!0),i(l,null,o(f.value,((t,l)=>(n(),i("div",{key:w.getKey(t,l),class:"p-timeline-event"},[r("div",p,[m(e.$slots,"opposite",{item:t,index:l})]),r("div",x,[m(e.$slots,"marker",{item:t,index:l},(()=>[c])),l!==f.value.length-1?m(e.$slots,"connector",{key:0},(()=>[d])):a("",!0)]),r("div",v,[m(e.$slots,"content",{item:t,index:l})])])))),128))],2)};export{s as default};
1
+ import{ObjectUtils as e}from"primevue/utils";import{openBlock as n,createElementBlock as i,normalizeClass as t,Fragment as l,renderList as o,createElementVNode as r,renderSlot as m,createCommentVNode as a}from"vue";var s={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,i){return this.dataKey?e.resolveFieldData(n,this.dataKey):i}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const p={class:"p-timeline-event-opposite"},x={class:"p-timeline-event-separator"},c=r("div",{class:"p-timeline-event-marker"},null,-1),d=r("div",{class:"p-timeline-event-connector"},null,-1),v={class:"p-timeline-event-content"};!function(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===i&&t.firstChild?t.insertBefore(l,t.firstChild):t.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),s.render=function(e,s,f,b,h,w){return n(),i("div",{class:t(w.containerClass)},[(n(!0),i(l,null,o(f.value,((t,l)=>(n(),i("div",{key:w.getKey(t,l),class:"p-timeline-event"},[r("div",p,[m(e.$slots,"opposite",{item:t,index:l})]),r("div",x,[m(e.$slots,"marker",{item:t,index:l},(()=>[c])),l!==f.value.length-1?m(e.$slots,"connector",{key:0,item:t,index:l},(()=>[d])):a("",!0)]),r("div",v,[m(e.$slots,"content",{item:t,index:l})])])))),128))],2)};export{s as default};
@@ -61,7 +61,11 @@ this.primevue.timeline = (function (utils, vue) {
61
61
  _hoisted_3
62
62
  ]),
63
63
  (index !== ($props.value.length - 1))
64
- ? vue.renderSlot(_ctx.$slots, "connector", { key: 0 }, () => [
64
+ ? vue.renderSlot(_ctx.$slots, "connector", {
65
+ key: 0,
66
+ item: item,
67
+ index: index
68
+ }, () => [
65
69
  _hoisted_4
66
70
  ])
67
71
  : vue.createCommentVNode("", true)
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.timeline=function(e,n){"use strict";var t={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const i={class:"p-timeline-event-opposite"},l={class:"p-timeline-event-separator"},o=n.createElementVNode("div",{class:"p-timeline-event-marker"},null,-1),r=n.createElementVNode("div",{class:"p-timeline-event-connector"},null,-1),m={class:"p-timeline-event-content"};return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===t&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),t.render=function(e,t,a,s,c,p){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(p.containerClass)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,((t,s)=>(n.openBlock(),n.createElementBlock("div",{key:p.getKey(t,s),class:"p-timeline-event"},[n.createElementVNode("div",i,[n.renderSlot(e.$slots,"opposite",{item:t,index:s})]),n.createElementVNode("div",l,[n.renderSlot(e.$slots,"marker",{item:t,index:s},(()=>[o])),s!==a.value.length-1?n.renderSlot(e.$slots,"connector",{key:0},(()=>[r])):n.createCommentVNode("",!0)]),n.createElementVNode("div",m,[n.renderSlot(e.$slots,"content",{item:t,index:s})])])))),128))],2)},t}(primevue.utils,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.timeline=function(e,n){"use strict";var t={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const i={class:"p-timeline-event-opposite"},l={class:"p-timeline-event-separator"},o=n.createElementVNode("div",{class:"p-timeline-event-marker"},null,-1),r=n.createElementVNode("div",{class:"p-timeline-event-connector"},null,-1),m={class:"p-timeline-event-content"};return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===t&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),t.render=function(e,t,a,s,c,p){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(p.containerClass)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,((t,s)=>(n.openBlock(),n.createElementBlock("div",{key:p.getKey(t,s),class:"p-timeline-event"},[n.createElementVNode("div",i,[n.renderSlot(e.$slots,"opposite",{item:t,index:s})]),n.createElementVNode("div",l,[n.renderSlot(e.$slots,"marker",{item:t,index:s},(()=>[o])),s!==a.value.length-1?n.renderSlot(e.$slots,"connector",{key:0,item:t,index:s},(()=>[r])):n.createCommentVNode("",!0)]),n.createElementVNode("div",m,[n.renderSlot(e.$slots,"content",{item:t,index:s})])])))),128))],2)},t}(primevue.utils,Vue);
@@ -31,6 +31,38 @@ export interface ToggleButtonProps {
31
31
  * Default value is 'left'.
32
32
  */
33
33
  iconPos?: ToggleButtonType;
34
+ /**
35
+ * When present, it specifies that the element should be disabled.
36
+ */
37
+ disabled?: boolean | undefined;
38
+ /**
39
+ * Index of the element in tabbing order.
40
+ */
41
+ tabindex?: string | undefined;
42
+ /**
43
+ * Identifier of the focus input to match a label defined for the chips.
44
+ */
45
+ inputId?: string | undefined;
46
+ /**
47
+ * Style class of the input field.
48
+ */
49
+ inputClass?: any | undefined;
50
+ /**
51
+ * Inline style of the input field.
52
+ */
53
+ inputStyle?: any | undefined;
54
+ /**
55
+ * Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.
56
+ */
57
+ inputProps?: HTMLInputElement | undefined;
58
+ /**
59
+ * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
60
+ */
61
+ 'aria-labelledby'?: string | undefined;
62
+ /**
63
+ * Establishes a string value that labels the component.
64
+ */
65
+ 'aria-label'?: string | undefined;
34
66
  }
35
67
 
36
68
  export interface ToggleButtonSlots {
@@ -47,6 +79,16 @@ export declare type ToggleButtonEmits = {
47
79
  * @param {Event} event - Browser event.
48
80
  */
49
81
  'change': (event: Event) => void;
82
+ /**
83
+ * Callback to invoke when the component receives focus.
84
+ * @param {Event} event - Browser event.
85
+ */
86
+ 'focus': (event: Event) => void;
87
+ /**
88
+ * Callback to invoke when the component loses focus.
89
+ * @param {Event} event - Browser event.
90
+ */
91
+ 'blur': (event: Event) => void;
50
92
  }
51
93
 
52
94
  declare class ToggleButton extends ClassComponent<ToggleButtonProps, ToggleButtonSlots, ToggleButtonEmits> { }
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <div :class="buttonClass" @click="onClick($event)" role="checkbox" :aria-checked="modelValue" :tabindex="$attrs.disabled ? null : '0'" v-ripple>
2
+ <div :class="buttonClass" @click="onClick($event)" v-ripple>
3
+ <span class="p-hidden-accessible">
4
+ <input type="checkbox" role="switch" :id="inputId" :class="inputClass" :style="inputStyle" :checked="modelValue" :value="modelValue" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel"
5
+ @focus="onFocus($event)" @blur="onBlur($event)" v-bind="inputProps">
6
+ </span>
3
7
  <span v-if="hasIcon" :class="iconClass"></span>
4
8
  <span class="p-button-label">{{label}}</span>
5
9
  </div>
@@ -10,24 +14,57 @@ import Ripple from 'primevue/ripple';
10
14
 
11
15
  export default {
12
16
  name: 'ToggleButton',
13
- emits: ['update:modelValue', 'change'],
17
+ emits: ['update:modelValue', 'change', 'click', 'focus', 'blur'],
14
18
  props: {
15
19
  modelValue: Boolean,
16
20
  onIcon: String,
17
21
  offIcon: String,
18
- onLabel: String,
19
- offLabel: String,
22
+ onLabel: {
23
+ type: String,
24
+ default: 'Yes'
25
+ },
26
+ offLabel: {
27
+ type: String,
28
+ default: 'No'
29
+ },
20
30
  iconPos: {
21
31
  type: String,
22
32
  default: 'left'
33
+ },
34
+ disabled: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ tabindex: {
39
+ type: Number,
40
+ default: null
41
+ },
42
+ inputId: null,
43
+ inputClass: null,
44
+ inputStyle: null,
45
+ inputProps: null,
46
+ 'aria-labelledby': {
47
+ type: String,
48
+ default: null
49
+ },
50
+ 'aria-label': {
51
+ type: String,
52
+ default: null
23
53
  }
24
54
  },
25
55
  methods: {
26
56
  onClick(event) {
27
- if (!this.$attrs.disabled) {
57
+ if (!this.disabled) {
28
58
  this.$emit('update:modelValue', !this.modelValue);
29
59
  this.$emit('change', event);
60
+ this.$emit('click', event);
30
61
  }
62
+ },
63
+ onFocus(event) {
64
+ this.$emit('focus', event);
65
+ },
66
+ onBlur(event) {
67
+ this.$emit('blur', event);
31
68
  }
32
69
  },
33
70
  computed: {
@@ -35,7 +72,7 @@ export default {
35
72
  return {
36
73
  'p-button p-togglebutton p-component': true,
37
74
  'p-button-icon-only': this.hasIcon && !this.hasLabel,
38
- 'p-disabled': this.$attrs.disabled,
75
+ 'p-disabled': this.disabled,
39
76
  'p-highlight': this.modelValue === true
40
77
  }
41
78
  },
@@ -63,4 +100,4 @@ export default {
63
100
  'ripple': Ripple
64
101
  }
65
102
  }
66
- </script>
103
+ </script>
@@ -9,24 +9,57 @@ var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
9
9
 
10
10
  var script = {
11
11
  name: 'ToggleButton',
12
- emits: ['update:modelValue', 'change'],
12
+ emits: ['update:modelValue', 'change', 'click', 'focus', 'blur'],
13
13
  props: {
14
14
  modelValue: Boolean,
15
15
  onIcon: String,
16
16
  offIcon: String,
17
- onLabel: String,
18
- offLabel: String,
17
+ onLabel: {
18
+ type: String,
19
+ default: 'Yes'
20
+ },
21
+ offLabel: {
22
+ type: String,
23
+ default: 'No'
24
+ },
19
25
  iconPos: {
20
26
  type: String,
21
27
  default: 'left'
28
+ },
29
+ disabled: {
30
+ type: Boolean,
31
+ default: false
32
+ },
33
+ tabindex: {
34
+ type: Number,
35
+ default: null
36
+ },
37
+ inputId: null,
38
+ inputClass: null,
39
+ inputStyle: null,
40
+ inputProps: null,
41
+ 'aria-labelledby': {
42
+ type: String,
43
+ default: null
44
+ },
45
+ 'aria-label': {
46
+ type: String,
47
+ default: null
22
48
  }
23
49
  },
24
50
  methods: {
25
51
  onClick(event) {
26
- if (!this.$attrs.disabled) {
52
+ if (!this.disabled) {
27
53
  this.$emit('update:modelValue', !this.modelValue);
28
54
  this.$emit('change', event);
55
+ this.$emit('click', event);
29
56
  }
57
+ },
58
+ onFocus(event) {
59
+ this.$emit('focus', event);
60
+ },
61
+ onBlur(event) {
62
+ this.$emit('blur', event);
30
63
  }
31
64
  },
32
65
  computed: {
@@ -34,7 +67,7 @@ var script = {
34
67
  return {
35
68
  'p-button p-togglebutton p-component': true,
36
69
  'p-button-icon-only': this.hasIcon && !this.hasLabel,
37
- 'p-disabled': this.$attrs.disabled,
70
+ 'p-disabled': this.disabled,
38
71
  'p-highlight': this.modelValue === true
39
72
  }
40
73
  },
@@ -63,27 +96,40 @@ var script = {
63
96
  }
64
97
  };
65
98
 
66
- const _hoisted_1 = ["aria-checked", "tabindex"];
67
- const _hoisted_2 = { class: "p-button-label" };
99
+ const _hoisted_1 = { class: "p-hidden-accessible" };
100
+ const _hoisted_2 = ["id", "checked", "value", "aria-labelledby", "aria-label"];
101
+ const _hoisted_3 = { class: "p-button-label" };
68
102
 
69
103
  function render(_ctx, _cache, $props, $setup, $data, $options) {
70
104
  const _directive_ripple = vue.resolveDirective("ripple");
71
105
 
72
106
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
73
107
  class: vue.normalizeClass($options.buttonClass),
74
- onClick: _cache[0] || (_cache[0] = $event => ($options.onClick($event))),
75
- role: "checkbox",
76
- "aria-checked": $props.modelValue,
77
- tabindex: _ctx.$attrs.disabled ? null : '0'
108
+ onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
78
109
  }, [
110
+ vue.createElementVNode("span", _hoisted_1, [
111
+ vue.createElementVNode("input", vue.mergeProps({
112
+ type: "checkbox",
113
+ role: "switch",
114
+ id: $props.inputId,
115
+ class: $props.inputClass,
116
+ style: $props.inputStyle,
117
+ checked: $props.modelValue,
118
+ value: $props.modelValue,
119
+ "aria-labelledby": _ctx.ariaLabelledby,
120
+ "aria-label": _ctx.ariaLabel,
121
+ onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
122
+ onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event)))
123
+ }, $props.inputProps), null, 16, _hoisted_2)
124
+ ]),
79
125
  ($options.hasIcon)
80
126
  ? (vue.openBlock(), vue.createElementBlock("span", {
81
127
  key: 0,
82
128
  class: vue.normalizeClass($options.iconClass)
83
129
  }, null, 2))
84
130
  : vue.createCommentVNode("", true),
85
- vue.createElementVNode("span", _hoisted_2, vue.toDisplayString($options.label), 1)
86
- ], 10, _hoisted_1)), [
131
+ vue.createElementVNode("span", _hoisted_3, vue.toDisplayString($options.label), 1)
132
+ ], 2)), [
87
133
  [_directive_ripple]
88
134
  ])
89
135
  }
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/ripple"),t=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"ToggleButton",emits:["update:modelValue","change"],props:{modelValue:Boolean,onIcon:String,offIcon:String,onLabel:String,offLabel:String,iconPos:{type:String,default:"left"}},methods:{onClick(e){this.$attrs.disabled||(this.$emit("update:modelValue",!this.modelValue),this.$emit("change",e))}},computed:{buttonClass(){return{"p-button p-togglebutton p-component":!0,"p-button-icon-only":this.hasIcon&&!this.hasLabel,"p-disabled":this.$attrs.disabled,"p-highlight":!0===this.modelValue}},iconClass(){return[this.modelValue?this.onIcon:this.offIcon,"p-button-icon",{"p-button-icon-left":"left"===this.iconPos&&this.label,"p-button-icon-right":"right"===this.iconPos&&this.label}]},hasLabel(){return this.onLabel&&this.onLabel.length>0&&this.offLabel&&this.offLabel.length>0},hasIcon(){return this.onIcon&&this.onIcon.length>0&&this.offIcon&&this.offIcon.length>0},label(){return this.hasLabel?this.modelValue?this.onLabel:this.offLabel:"&nbsp;"}},directives:{ripple:o(e).default}};const n=["aria-checked","tabindex"],i={class:"p-button-label"};l.render=function(e,o,l,s,a,c){const r=t.resolveDirective("ripple");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(c.buttonClass),onClick:o[0]||(o[0]=e=>c.onClick(e)),role:"checkbox","aria-checked":l.modelValue,tabindex:e.$attrs.disabled?null:"0"},[c.hasIcon?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(c.iconClass)},null,2)):t.createCommentVNode("",!0),t.createElementVNode("span",i,t.toDisplayString(c.label),1)],10,n)),[[r]])},module.exports=l;
1
+ "use strict";var e=require("primevue/ripple"),l=require("vue");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"ToggleButton",emits:["update:modelValue","change","click","focus","blur"],props:{modelValue:Boolean,onIcon:String,offIcon:String,onLabel:{type:String,default:"Yes"},offLabel:{type:String,default:"No"},iconPos:{type:String,default:"left"},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:null,inputClass:null,inputStyle:null,inputProps:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onClick(e){this.disabled||(this.$emit("update:modelValue",!this.modelValue),this.$emit("change",e),this.$emit("click",e))},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e)}},computed:{buttonClass(){return{"p-button p-togglebutton p-component":!0,"p-button-icon-only":this.hasIcon&&!this.hasLabel,"p-disabled":this.disabled,"p-highlight":!0===this.modelValue}},iconClass(){return[this.modelValue?this.onIcon:this.offIcon,"p-button-icon",{"p-button-icon-left":"left"===this.iconPos&&this.label,"p-button-icon-right":"right"===this.iconPos&&this.label}]},hasLabel(){return this.onLabel&&this.onLabel.length>0&&this.offLabel&&this.offLabel.length>0},hasIcon(){return this.onIcon&&this.onIcon.length>0&&this.offIcon&&this.offIcon.length>0},label(){return this.hasLabel?this.modelValue?this.onLabel:this.offLabel:"&nbsp;"}},directives:{ripple:t(e).default}};const o={class:"p-hidden-accessible"},i=["id","checked","value","aria-labelledby","aria-label"],a={class:"p-button-label"};n.render=function(e,t,n,s,u,r){const c=l.resolveDirective("ripple");return l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(r.buttonClass),onClick:t[2]||(t[2]=e=>r.onClick(e))},[l.createElementVNode("span",o,[l.createElementVNode("input",l.mergeProps({type:"checkbox",role:"switch",id:n.inputId,class:n.inputClass,style:n.inputStyle,checked:n.modelValue,value:n.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=e=>r.onFocus(e)),onBlur:t[1]||(t[1]=e=>r.onBlur(e))},n.inputProps),null,16,i)]),r.hasIcon?(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(r.iconClass)},null,2)):l.createCommentVNode("",!0),l.createElementVNode("span",a,l.toDisplayString(r.label),1)],2)),[[c]])},module.exports=n;
@@ -1,26 +1,59 @@
1
1
  import Ripple from 'primevue/ripple';
2
- import { resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, toDisplayString } from 'vue';
2
+ import { resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, mergeProps, createCommentVNode, toDisplayString } from 'vue';
3
3
 
4
4
  var script = {
5
5
  name: 'ToggleButton',
6
- emits: ['update:modelValue', 'change'],
6
+ emits: ['update:modelValue', 'change', 'click', 'focus', 'blur'],
7
7
  props: {
8
8
  modelValue: Boolean,
9
9
  onIcon: String,
10
10
  offIcon: String,
11
- onLabel: String,
12
- offLabel: String,
11
+ onLabel: {
12
+ type: String,
13
+ default: 'Yes'
14
+ },
15
+ offLabel: {
16
+ type: String,
17
+ default: 'No'
18
+ },
13
19
  iconPos: {
14
20
  type: String,
15
21
  default: 'left'
22
+ },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ tabindex: {
28
+ type: Number,
29
+ default: null
30
+ },
31
+ inputId: null,
32
+ inputClass: null,
33
+ inputStyle: null,
34
+ inputProps: null,
35
+ 'aria-labelledby': {
36
+ type: String,
37
+ default: null
38
+ },
39
+ 'aria-label': {
40
+ type: String,
41
+ default: null
16
42
  }
17
43
  },
18
44
  methods: {
19
45
  onClick(event) {
20
- if (!this.$attrs.disabled) {
46
+ if (!this.disabled) {
21
47
  this.$emit('update:modelValue', !this.modelValue);
22
48
  this.$emit('change', event);
49
+ this.$emit('click', event);
23
50
  }
51
+ },
52
+ onFocus(event) {
53
+ this.$emit('focus', event);
54
+ },
55
+ onBlur(event) {
56
+ this.$emit('blur', event);
24
57
  }
25
58
  },
26
59
  computed: {
@@ -28,7 +61,7 @@ var script = {
28
61
  return {
29
62
  'p-button p-togglebutton p-component': true,
30
63
  'p-button-icon-only': this.hasIcon && !this.hasLabel,
31
- 'p-disabled': this.$attrs.disabled,
64
+ 'p-disabled': this.disabled,
32
65
  'p-highlight': this.modelValue === true
33
66
  }
34
67
  },
@@ -57,27 +90,40 @@ var script = {
57
90
  }
58
91
  };
59
92
 
60
- const _hoisted_1 = ["aria-checked", "tabindex"];
61
- const _hoisted_2 = { class: "p-button-label" };
93
+ const _hoisted_1 = { class: "p-hidden-accessible" };
94
+ const _hoisted_2 = ["id", "checked", "value", "aria-labelledby", "aria-label"];
95
+ const _hoisted_3 = { class: "p-button-label" };
62
96
 
63
97
  function render(_ctx, _cache, $props, $setup, $data, $options) {
64
98
  const _directive_ripple = resolveDirective("ripple");
65
99
 
66
100
  return withDirectives((openBlock(), createElementBlock("div", {
67
101
  class: normalizeClass($options.buttonClass),
68
- onClick: _cache[0] || (_cache[0] = $event => ($options.onClick($event))),
69
- role: "checkbox",
70
- "aria-checked": $props.modelValue,
71
- tabindex: _ctx.$attrs.disabled ? null : '0'
102
+ onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
72
103
  }, [
104
+ createElementVNode("span", _hoisted_1, [
105
+ createElementVNode("input", mergeProps({
106
+ type: "checkbox",
107
+ role: "switch",
108
+ id: $props.inputId,
109
+ class: $props.inputClass,
110
+ style: $props.inputStyle,
111
+ checked: $props.modelValue,
112
+ value: $props.modelValue,
113
+ "aria-labelledby": _ctx.ariaLabelledby,
114
+ "aria-label": _ctx.ariaLabel,
115
+ onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
116
+ onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event)))
117
+ }, $props.inputProps), null, 16, _hoisted_2)
118
+ ]),
73
119
  ($options.hasIcon)
74
120
  ? (openBlock(), createElementBlock("span", {
75
121
  key: 0,
76
122
  class: normalizeClass($options.iconClass)
77
123
  }, null, 2))
78
124
  : createCommentVNode("", true),
79
- createElementVNode("span", _hoisted_2, toDisplayString($options.label), 1)
80
- ], 10, _hoisted_1)), [
125
+ createElementVNode("span", _hoisted_3, toDisplayString($options.label), 1)
126
+ ], 2)), [
81
127
  [_directive_ripple]
82
128
  ])
83
129
  }
@@ -1 +1 @@
1
- import t from"primevue/ripple";import{resolveDirective as e,withDirectives as o,openBlock as n,createElementBlock as l,normalizeClass as i,createCommentVNode as s,createElementVNode as a,toDisplayString as h}from"vue";var c={name:"ToggleButton",emits:["update:modelValue","change"],props:{modelValue:Boolean,onIcon:String,offIcon:String,onLabel:String,offLabel:String,iconPos:{type:String,default:"left"}},methods:{onClick(t){this.$attrs.disabled||(this.$emit("update:modelValue",!this.modelValue),this.$emit("change",t))}},computed:{buttonClass(){return{"p-button p-togglebutton p-component":!0,"p-button-icon-only":this.hasIcon&&!this.hasLabel,"p-disabled":this.$attrs.disabled,"p-highlight":!0===this.modelValue}},iconClass(){return[this.modelValue?this.onIcon:this.offIcon,"p-button-icon",{"p-button-icon-left":"left"===this.iconPos&&this.label,"p-button-icon-right":"right"===this.iconPos&&this.label}]},hasLabel(){return this.onLabel&&this.onLabel.length>0&&this.offLabel&&this.offLabel.length>0},hasIcon(){return this.onIcon&&this.onIcon.length>0&&this.offIcon&&this.offIcon.length>0},label(){return this.hasLabel?this.modelValue?this.onLabel:this.offLabel:"&nbsp;"}},directives:{ripple:t}};const r=["aria-checked","tabindex"],u={class:"p-button-label"};c.render=function(t,c,b,p,d,f){const m=e("ripple");return o((n(),l("div",{class:i(f.buttonClass),onClick:c[0]||(c[0]=t=>f.onClick(t)),role:"checkbox","aria-checked":b.modelValue,tabindex:t.$attrs.disabled?null:"0"},[f.hasIcon?(n(),l("span",{key:0,class:i(f.iconClass)},null,2)):s("",!0),a("span",u,h(f.label),1)],10,r)),[[m]])};export{c as default};
1
+ import l from"primevue/ripple";import{resolveDirective as e,withDirectives as t,openBlock as n,createElementBlock as i,normalizeClass as o,createElementVNode as a,mergeProps as s,createCommentVNode as u,toDisplayString as c}from"vue";var h={name:"ToggleButton",emits:["update:modelValue","change","click","focus","blur"],props:{modelValue:Boolean,onIcon:String,offIcon:String,onLabel:{type:String,default:"Yes"},offLabel:{type:String,default:"No"},iconPos:{type:String,default:"left"},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:null,inputClass:null,inputStyle:null,inputProps:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onClick(l){this.disabled||(this.$emit("update:modelValue",!this.modelValue),this.$emit("change",l),this.$emit("click",l))},onFocus(l){this.$emit("focus",l)},onBlur(l){this.$emit("blur",l)}},computed:{buttonClass(){return{"p-button p-togglebutton p-component":!0,"p-button-icon-only":this.hasIcon&&!this.hasLabel,"p-disabled":this.disabled,"p-highlight":!0===this.modelValue}},iconClass(){return[this.modelValue?this.onIcon:this.offIcon,"p-button-icon",{"p-button-icon-left":"left"===this.iconPos&&this.label,"p-button-icon-right":"right"===this.iconPos&&this.label}]},hasLabel(){return this.onLabel&&this.onLabel.length>0&&this.offLabel&&this.offLabel.length>0},hasIcon(){return this.onIcon&&this.onIcon.length>0&&this.offIcon&&this.offIcon.length>0},label(){return this.hasLabel?this.modelValue?this.onLabel:this.offLabel:"&nbsp;"}},directives:{ripple:l}};const r={class:"p-hidden-accessible"},p=["id","checked","value","aria-labelledby","aria-label"],b={class:"p-button-label"};h.render=function(l,h,d,f,m,g){const y=e("ripple");return t((n(),i("div",{class:o(g.buttonClass),onClick:h[2]||(h[2]=l=>g.onClick(l))},[a("span",r,[a("input",s({type:"checkbox",role:"switch",id:d.inputId,class:d.inputClass,style:d.inputStyle,checked:d.modelValue,value:d.modelValue,"aria-labelledby":l.ariaLabelledby,"aria-label":l.ariaLabel,onFocus:h[0]||(h[0]=l=>g.onFocus(l)),onBlur:h[1]||(h[1]=l=>g.onBlur(l))},d.inputProps),null,16,p)]),g.hasIcon?(n(),i("span",{key:0,class:o(g.iconClass)},null,2)):u("",!0),a("span",b,c(g.label),1)],2)),[[y]])};export{h as default};
@@ -8,24 +8,57 @@ this.primevue.togglebutton = (function (Ripple, vue) {
8
8
 
9
9
  var script = {
10
10
  name: 'ToggleButton',
11
- emits: ['update:modelValue', 'change'],
11
+ emits: ['update:modelValue', 'change', 'click', 'focus', 'blur'],
12
12
  props: {
13
13
  modelValue: Boolean,
14
14
  onIcon: String,
15
15
  offIcon: String,
16
- onLabel: String,
17
- offLabel: String,
16
+ onLabel: {
17
+ type: String,
18
+ default: 'Yes'
19
+ },
20
+ offLabel: {
21
+ type: String,
22
+ default: 'No'
23
+ },
18
24
  iconPos: {
19
25
  type: String,
20
26
  default: 'left'
27
+ },
28
+ disabled: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ tabindex: {
33
+ type: Number,
34
+ default: null
35
+ },
36
+ inputId: null,
37
+ inputClass: null,
38
+ inputStyle: null,
39
+ inputProps: null,
40
+ 'aria-labelledby': {
41
+ type: String,
42
+ default: null
43
+ },
44
+ 'aria-label': {
45
+ type: String,
46
+ default: null
21
47
  }
22
48
  },
23
49
  methods: {
24
50
  onClick(event) {
25
- if (!this.$attrs.disabled) {
51
+ if (!this.disabled) {
26
52
  this.$emit('update:modelValue', !this.modelValue);
27
53
  this.$emit('change', event);
54
+ this.$emit('click', event);
28
55
  }
56
+ },
57
+ onFocus(event) {
58
+ this.$emit('focus', event);
59
+ },
60
+ onBlur(event) {
61
+ this.$emit('blur', event);
29
62
  }
30
63
  },
31
64
  computed: {
@@ -33,7 +66,7 @@ this.primevue.togglebutton = (function (Ripple, vue) {
33
66
  return {
34
67
  'p-button p-togglebutton p-component': true,
35
68
  'p-button-icon-only': this.hasIcon && !this.hasLabel,
36
- 'p-disabled': this.$attrs.disabled,
69
+ 'p-disabled': this.disabled,
37
70
  'p-highlight': this.modelValue === true
38
71
  }
39
72
  },
@@ -62,27 +95,40 @@ this.primevue.togglebutton = (function (Ripple, vue) {
62
95
  }
63
96
  };
64
97
 
65
- const _hoisted_1 = ["aria-checked", "tabindex"];
66
- const _hoisted_2 = { class: "p-button-label" };
98
+ const _hoisted_1 = { class: "p-hidden-accessible" };
99
+ const _hoisted_2 = ["id", "checked", "value", "aria-labelledby", "aria-label"];
100
+ const _hoisted_3 = { class: "p-button-label" };
67
101
 
68
102
  function render(_ctx, _cache, $props, $setup, $data, $options) {
69
103
  const _directive_ripple = vue.resolveDirective("ripple");
70
104
 
71
105
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
72
106
  class: vue.normalizeClass($options.buttonClass),
73
- onClick: _cache[0] || (_cache[0] = $event => ($options.onClick($event))),
74
- role: "checkbox",
75
- "aria-checked": $props.modelValue,
76
- tabindex: _ctx.$attrs.disabled ? null : '0'
107
+ onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
77
108
  }, [
109
+ vue.createElementVNode("span", _hoisted_1, [
110
+ vue.createElementVNode("input", vue.mergeProps({
111
+ type: "checkbox",
112
+ role: "switch",
113
+ id: $props.inputId,
114
+ class: $props.inputClass,
115
+ style: $props.inputStyle,
116
+ checked: $props.modelValue,
117
+ value: $props.modelValue,
118
+ "aria-labelledby": _ctx.ariaLabelledby,
119
+ "aria-label": _ctx.ariaLabel,
120
+ onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
121
+ onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event)))
122
+ }, $props.inputProps), null, 16, _hoisted_2)
123
+ ]),
78
124
  ($options.hasIcon)
79
125
  ? (vue.openBlock(), vue.createElementBlock("span", {
80
126
  key: 0,
81
127
  class: vue.normalizeClass($options.iconClass)
82
128
  }, null, 2))
83
129
  : vue.createCommentVNode("", true),
84
- vue.createElementVNode("span", _hoisted_2, vue.toDisplayString($options.label), 1)
85
- ], 10, _hoisted_1)), [
130
+ vue.createElementVNode("span", _hoisted_3, vue.toDisplayString($options.label), 1)
131
+ ], 2)), [
86
132
  [_directive_ripple]
87
133
  ])
88
134
  }