primevue 3.22.4 → 3.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +13 -13
  3. package/accordion/Accordion.d.ts +53 -21
  4. package/accordiontab/AccordionTab.d.ts +33 -12
  5. package/autocomplete/AutoComplete.d.ts +111 -84
  6. package/avatar/Avatar.d.ts +38 -25
  7. package/avatar/Avatar.vue +1 -1
  8. package/avatar/avatar.cjs.js +2 -1
  9. package/avatar/avatar.cjs.min.js +1 -1
  10. package/avatar/avatar.esm.js +2 -1
  11. package/avatar/avatar.esm.min.js +1 -1
  12. package/avatar/avatar.js +2 -1
  13. package/avatar/avatar.min.js +1 -1
  14. package/avatargroup/AvatarGroup.d.ts +30 -14
  15. package/badge/Badge.d.ts +34 -20
  16. package/badge/Badge.vue +16 -5
  17. package/badge/badge.cjs.js +15 -5
  18. package/badge/badge.cjs.min.js +1 -1
  19. package/badge/badge.esm.js +15 -5
  20. package/badge/badge.esm.min.js +1 -1
  21. package/badge/badge.js +16 -7
  22. package/badge/badge.min.js +1 -1
  23. package/badgedirective/BadgeDirective.d.ts +60 -1
  24. package/blockui/BlockUI.d.ts +36 -16
  25. package/breadcrumb/Breadcrumb.d.ts +37 -20
  26. package/breadcrumb/Breadcrumb.vue +1 -1
  27. package/breadcrumb/breadcrumb.cjs.js +2 -1
  28. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  29. package/breadcrumb/breadcrumb.esm.js +2 -1
  30. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  31. package/breadcrumb/breadcrumb.js +2 -1
  32. package/breadcrumb/breadcrumb.min.js +1 -1
  33. package/button/Button.d.ts +74 -17
  34. package/button/Button.vue +51 -8
  35. package/button/button.cjs.js +51 -8
  36. package/button/button.cjs.min.js +1 -1
  37. package/button/button.esm.js +51 -8
  38. package/button/button.esm.min.js +1 -1
  39. package/button/button.js +51 -8
  40. package/button/button.min.js +1 -1
  41. package/calendar/Calendar.d.ts +112 -77
  42. package/calendar/Calendar.vue +4 -4
  43. package/calendar/calendar.cjs.js +4 -4
  44. package/calendar/calendar.cjs.min.js +1 -1
  45. package/calendar/calendar.esm.js +4 -4
  46. package/calendar/calendar.esm.min.js +1 -1
  47. package/calendar/calendar.js +4 -4
  48. package/calendar/calendar.min.js +1 -1
  49. package/card/Card.d.ts +35 -15
  50. package/carousel/Carousel.d.ts +47 -29
  51. package/cascadeselect/CascadeSelect.d.ts +70 -59
  52. package/chart/Chart.d.ts +41 -23
  53. package/checkbox/Checkbox.d.ts +39 -15
  54. package/checkbox/Checkbox.vue +1 -1
  55. package/checkbox/checkbox.cjs.js +1 -1
  56. package/checkbox/checkbox.cjs.min.js +1 -1
  57. package/checkbox/checkbox.esm.js +1 -1
  58. package/checkbox/checkbox.esm.min.js +1 -1
  59. package/checkbox/checkbox.js +1 -1
  60. package/checkbox/checkbox.min.js +1 -1
  61. package/chip/Chip.d.ts +35 -14
  62. package/chips/Chips.d.ts +45 -20
  63. package/colorpicker/ColorPicker.d.ts +46 -28
  64. package/column/Column.d.ts +81 -65
  65. package/columngroup/ColumnGroup.d.ts +29 -13
  66. package/config/PrimeVue.d.ts +1 -2
  67. package/config/config.cjs.js +20 -2
  68. package/config/config.cjs.min.js +1 -1
  69. package/config/config.esm.js +20 -2
  70. package/config/config.esm.min.js +1 -1
  71. package/config/config.js +20 -2
  72. package/config/config.min.js +1 -1
  73. package/confirmationoptions/ConfirmationOptions.d.ts +15 -6
  74. package/confirmationservice/ConfirmationService.d.ts +11 -0
  75. package/confirmdialog/ConfirmDialog.d.ts +35 -17
  76. package/confirmpopup/ConfirmPopup.d.ts +32 -17
  77. package/contextmenu/ContextMenu.d.ts +51 -35
  78. package/core/core.js +368 -121
  79. package/core/core.min.js +8 -8
  80. package/datatable/DataTable.d.ts +248 -205
  81. package/datatable/DataTable.vue +78 -117
  82. package/datatable/TableBody.vue +3 -17
  83. package/datatable/datatable.cjs.js +73 -67
  84. package/datatable/datatable.cjs.min.js +1 -1
  85. package/datatable/datatable.esm.js +73 -67
  86. package/datatable/datatable.esm.min.js +1 -1
  87. package/datatable/datatable.js +73 -67
  88. package/datatable/datatable.min.js +1 -1
  89. package/dataview/DataView.d.ts +65 -47
  90. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +33 -13
  91. package/deferredcontent/DeferredContent.d.ts +30 -13
  92. package/dialog/Dialog.d.ts +67 -46
  93. package/dialog/Dialog.vue +1 -1
  94. package/dialog/dialog.cjs.js +1 -1
  95. package/dialog/dialog.cjs.min.js +1 -1
  96. package/dialog/dialog.esm.js +1 -1
  97. package/dialog/dialog.esm.min.js +1 -1
  98. package/dialog/dialog.js +1 -1
  99. package/dialog/dialog.min.js +1 -1
  100. package/dialogservice/DialogService.d.ts +13 -2
  101. package/divider/Divider.d.ts +35 -30
  102. package/dock/Dock.d.ts +49 -36
  103. package/dropdown/Dropdown.d.ts +90 -82
  104. package/dropdown/Dropdown.vue +1 -1
  105. package/dropdown/dropdown.cjs.js +1 -1
  106. package/dropdown/dropdown.cjs.min.js +1 -1
  107. package/dropdown/dropdown.esm.js +1 -1
  108. package/dropdown/dropdown.esm.min.js +1 -1
  109. package/dropdown/dropdown.js +1 -1
  110. package/dropdown/dropdown.min.js +1 -1
  111. package/dynamicdialog/DynamicDialog.d.ts +30 -10
  112. package/dynamicdialog/DynamicDialog.vue +2 -2
  113. package/dynamicdialog/dynamicdialog.cjs.js +3 -3
  114. package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
  115. package/dynamicdialog/dynamicdialog.esm.js +2 -2
  116. package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
  117. package/dynamicdialog/dynamicdialog.js +3 -3
  118. package/dynamicdialog/dynamicdialog.min.js +1 -1
  119. package/dynamicdialogoptions/DynamicDialogOptions.d.ts +28 -8
  120. package/editor/Editor.d.ts +48 -17
  121. package/fieldset/Fieldset.d.ts +43 -16
  122. package/fileupload/FileUpload.d.ts +101 -47
  123. package/focustrap/FocusTrap.d.ts +42 -3
  124. package/fullcalendar/FullCalendar.d.ts +1 -1
  125. package/galleria/Galleria.d.ts +64 -40
  126. package/image/Image.d.ts +33 -14
  127. package/inlinemessage/InlineMessage.d.ts +31 -17
  128. package/inplace/Inplace.d.ts +41 -18
  129. package/inputmask/InputMask.d.ts +41 -17
  130. package/inputnumber/InputNumber.d.ts +60 -41
  131. package/inputswitch/InputSwitch.d.ts +35 -15
  132. package/inputswitch/InputSwitch.vue +1 -0
  133. package/inputswitch/inputswitch.cjs.js +1 -1
  134. package/inputswitch/inputswitch.cjs.min.js +1 -1
  135. package/inputswitch/inputswitch.esm.js +1 -1
  136. package/inputswitch/inputswitch.esm.min.js +1 -1
  137. package/inputswitch/inputswitch.js +1 -1
  138. package/inputswitch/inputswitch.min.js +1 -1
  139. package/inputtext/InputText.d.ts +32 -12
  140. package/knob/Knob.d.ts +47 -21
  141. package/listbox/Listbox.d.ts +81 -60
  142. package/megamenu/MegaMenu.d.ts +42 -27
  143. package/megamenu/MegaMenu.vue +17 -0
  144. package/megamenu/megamenu.cjs.js +1 -1
  145. package/megamenu/megamenu.cjs.min.js +1 -1
  146. package/megamenu/megamenu.esm.js +1 -1
  147. package/megamenu/megamenu.esm.min.js +1 -1
  148. package/megamenu/megamenu.js +1 -1
  149. package/megamenu/megamenu.min.js +1 -1
  150. package/menu/Menu.d.ts +57 -28
  151. package/menu/Menu.vue +6 -0
  152. package/menu/menu.cjs.js +26 -8
  153. package/menu/menu.cjs.min.js +1 -1
  154. package/menu/menu.esm.js +27 -9
  155. package/menu/menu.esm.min.js +1 -1
  156. package/menu/menu.js +26 -8
  157. package/menu/menu.min.js +1 -1
  158. package/menubar/Menubar.d.ts +36 -19
  159. package/menuitem/MenuItem.d.ts +22 -10
  160. package/message/Message.d.ts +40 -21
  161. package/multiselect/MultiSelect.d.ts +111 -90
  162. package/orderlist/OrderList.d.ts +51 -23
  163. package/organizationchart/OrganizationChart.d.ts +43 -26
  164. package/overlaypanel/OverlayPanel.d.ts +46 -26
  165. package/package.json +2 -2
  166. package/paginator/Paginator.d.ts +49 -24
  167. package/panel/Panel.d.ts +39 -14
  168. package/panelmenu/PanelMenu.d.ts +49 -21
  169. package/password/Password.d.ts +47 -28
  170. package/picklist/PickList.d.ts +74 -33
  171. package/progressbar/ProgressBar.d.ts +34 -17
  172. package/progressspinner/ProgressSpinner.d.ts +32 -13
  173. package/radiobutton/RadioButton.d.ts +32 -14
  174. package/rating/Rating.d.ts +51 -25
  175. package/resources/themes/arya-blue/theme.css +34 -11
  176. package/resources/themes/arya-green/theme.css +34 -11
  177. package/resources/themes/arya-orange/theme.css +34 -11
  178. package/resources/themes/arya-purple/theme.css +34 -11
  179. package/resources/themes/bootstrap4-dark-blue/theme.css +34 -11
  180. package/resources/themes/bootstrap4-dark-purple/theme.css +34 -11
  181. package/resources/themes/bootstrap4-light-blue/theme.css +34 -11
  182. package/resources/themes/bootstrap4-light-purple/theme.css +34 -11
  183. package/resources/themes/fluent-light/theme.css +34 -11
  184. package/resources/themes/lara-dark-blue/theme.css +34 -11
  185. package/resources/themes/lara-dark-indigo/theme.css +34 -11
  186. package/resources/themes/lara-dark-purple/theme.css +34 -11
  187. package/resources/themes/lara-dark-teal/theme.css +34 -11
  188. package/resources/themes/lara-light-blue/theme.css +34 -11
  189. package/resources/themes/lara-light-indigo/theme.css +34 -11
  190. package/resources/themes/lara-light-purple/theme.css +34 -11
  191. package/resources/themes/lara-light-teal/theme.css +34 -11
  192. package/resources/themes/luna-amber/theme.css +34 -11
  193. package/resources/themes/luna-blue/theme.css +34 -11
  194. package/resources/themes/luna-green/theme.css +34 -11
  195. package/resources/themes/luna-pink/theme.css +34 -11
  196. package/resources/themes/md-dark-deeppurple/theme.css +34 -11
  197. package/resources/themes/md-dark-indigo/theme.css +34 -11
  198. package/resources/themes/md-light-deeppurple/theme.css +34 -11
  199. package/resources/themes/md-light-indigo/theme.css +34 -11
  200. package/resources/themes/mdc-dark-deeppurple/theme.css +34 -11
  201. package/resources/themes/mdc-dark-indigo/theme.css +34 -11
  202. package/resources/themes/mdc-light-deeppurple/theme.css +34 -11
  203. package/resources/themes/mdc-light-indigo/theme.css +34 -11
  204. package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
  205. package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
  206. package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
  207. package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
  208. package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
  209. package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
  210. package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
  211. package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
  212. package/resources/themes/mira/theme.css +6089 -0
  213. package/resources/themes/nano/theme.css +5861 -0
  214. package/resources/themes/nova/theme.css +34 -11
  215. package/resources/themes/nova-accent/theme.css +34 -11
  216. package/resources/themes/nova-alt/theme.css +34 -11
  217. package/resources/themes/nova-vue/theme.css +34 -11
  218. package/resources/themes/rhea/theme.css +34 -11
  219. package/resources/themes/saga-blue/theme.css +34 -11
  220. package/resources/themes/saga-green/theme.css +34 -11
  221. package/resources/themes/saga-orange/theme.css +34 -11
  222. package/resources/themes/saga-purple/theme.css +34 -11
  223. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
  224. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
  225. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
  226. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
  227. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
  228. package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
  229. package/resources/themes/soho-dark/theme.css +5854 -0
  230. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
  231. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
  232. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
  233. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
  234. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
  235. package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
  236. package/resources/themes/soho-light/theme.css +5908 -0
  237. package/resources/themes/tailwind-light/theme.css +34 -11
  238. package/resources/themes/vela-blue/theme.css +34 -11
  239. package/resources/themes/vela-green/theme.css +34 -11
  240. package/resources/themes/vela-orange/theme.css +34 -11
  241. package/resources/themes/vela-purple/theme.css +34 -11
  242. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
  243. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
  244. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
  245. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
  246. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
  247. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
  248. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
  249. package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
  250. package/resources/themes/viva-dark/theme.css +6016 -0
  251. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
  252. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
  253. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
  254. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
  255. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
  256. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
  257. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
  258. package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
  259. package/resources/themes/viva-light/theme.css +6016 -0
  260. package/ripple/Ripple.d.ts +24 -1
  261. package/row/Row.d.ts +28 -10
  262. package/scrollpanel/ScrollPanel.d.ts +29 -11
  263. package/scrolltop/ScrollTop.d.ts +35 -18
  264. package/selectbutton/SelectButton.d.ts +47 -27
  265. package/sidebar/Sidebar.d.ts +46 -27
  266. package/skeleton/Skeleton.d.ts +36 -22
  267. package/slider/Slider.d.ts +46 -23
  268. package/speeddial/SpeedDial.d.ts +64 -51
  269. package/splitbutton/SplitButton.d.ts +73 -24
  270. package/splitbutton/SplitButton.vue +41 -1
  271. package/splitbutton/splitbutton.cjs.js +43 -3
  272. package/splitbutton/splitbutton.cjs.min.js +1 -1
  273. package/splitbutton/splitbutton.esm.js +43 -3
  274. package/splitbutton/splitbutton.esm.min.js +1 -1
  275. package/splitbutton/splitbutton.js +43 -3
  276. package/splitbutton/splitbutton.min.js +1 -1
  277. package/splitter/Splitter.d.ts +49 -30
  278. package/splitterpanel/SplitterPanel.d.ts +28 -10
  279. package/steps/Steps.d.ts +36 -15
  280. package/styleclass/StyleClass.d.ts +72 -1
  281. package/tabmenu/TabMenu.d.ts +41 -16
  282. package/tabmenu/TabMenu.vue +1 -1
  283. package/tabmenu/tabmenu.cjs.js +1 -0
  284. package/tabmenu/tabmenu.cjs.min.js +1 -1
  285. package/tabmenu/tabmenu.esm.js +1 -0
  286. package/tabmenu/tabmenu.esm.min.js +1 -1
  287. package/tabmenu/tabmenu.js +1 -0
  288. package/tabmenu/tabmenu.min.js +1 -1
  289. package/tabpanel/TabPanel.d.ts +29 -11
  290. package/tabview/TabView.d.ts +47 -19
  291. package/tag/Tag.d.ts +33 -15
  292. package/tag/Tag.vue +1 -1
  293. package/tag/tag.cjs.js +4 -2
  294. package/tag/tag.cjs.min.js +1 -1
  295. package/tag/tag.esm.js +5 -3
  296. package/tag/tag.esm.min.js +1 -1
  297. package/tag/tag.js +4 -2
  298. package/tag/tag.min.js +1 -1
  299. package/terminal/Terminal.d.ts +30 -14
  300. package/terminalservice/TerminalService.d.ts +24 -5
  301. package/textarea/Textarea.d.ts +33 -11
  302. package/tieredmenu/TieredMenu.d.ts +45 -31
  303. package/timeline/Timeline.d.ts +41 -32
  304. package/toast/Toast.d.ts +63 -35
  305. package/toast/Toast.vue +4 -2
  306. package/toast/ToastMessage.vue +4 -4
  307. package/toast/toast.cjs.js +8 -6
  308. package/toast/toast.cjs.min.js +1 -1
  309. package/toast/toast.esm.js +8 -6
  310. package/toast/toast.esm.min.js +1 -1
  311. package/toast/toast.js +8 -6
  312. package/toast/toast.min.js +1 -1
  313. package/toastservice/ToastService.d.ts +16 -3
  314. package/togglebutton/ToggleButton.d.ts +42 -22
  315. package/toolbar/Toolbar.d.ts +34 -14
  316. package/tooltip/Tooltip.d.ts +99 -1
  317. package/tree/Tree.d.ts +55 -36
  318. package/treeselect/TreeSelect.d.ts +63 -55
  319. package/treetable/TreeTable.d.ts +121 -107
  320. package/tristatecheckbox/TriStateCheckbox.d.ts +35 -12
  321. package/ts-helpers.d.ts +2 -2
  322. package/utils/utils.cjs.js +20 -22
  323. package/utils/utils.cjs.min.js +1 -1
  324. package/utils/utils.esm.js +20 -22
  325. package/utils/utils.esm.min.js +1 -1
  326. package/utils/utils.js +20 -22
  327. package/utils/utils.min.js +1 -1
  328. package/vetur-attributes.json +62 -2
  329. package/vetur-tags.json +17 -2
  330. package/virtualscroller/VirtualScroller.d.ts +99 -43
  331. package/virtualscroller/VirtualScroller.vue +248 -72
  332. package/virtualscroller/virtualscroller.cjs.js +234 -72
  333. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  334. package/virtualscroller/virtualscroller.esm.js +234 -72
  335. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  336. package/virtualscroller/virtualscroller.js +235 -74
  337. package/virtualscroller/virtualscroller.min.js +1 -1
  338. package/web-types.json +1930 -1742
@@ -1,12 +1,19 @@
1
+ /**
2
+ *
3
+ * InputNumber is an input component to provide numerical input.
4
+ *
5
+ * [Live Demo](https://www.primevue.org/inputnumber/)
6
+ *
7
+ * @module inputnumber
8
+ *
9
+ */
1
10
  import { ButtonHTMLAttributes, InputHTMLAttributes } from 'vue';
2
11
  import { ClassComponent, GlobalComponentConstructor, Nullable } from '../ts-helpers';
3
12
 
4
- type InputNumberButtonLayoutType = 'stacked' | 'horizontal' | 'vertical' | undefined;
5
-
6
- type InputNumberLocaleMatcherType = 'lookup' | 'best fit' | undefined;
7
-
8
- type InputNumberModeType = 'decimal' | 'currency' | undefined;
9
-
13
+ /**
14
+ * Custom input event.
15
+ * @see {@link InputNumberEmits.input}
16
+ */
10
17
  export interface InputNumberInputEvent {
11
18
  /**
12
19
  * Browser event
@@ -18,6 +25,10 @@ export interface InputNumberInputEvent {
18
25
  value: string | number | undefined;
19
26
  }
20
27
 
28
+ /**
29
+ * Custom blur event.
30
+ * @see {@link InputNumberEmits.blur}
31
+ */
21
32
  export interface InputNumberBlurEvent {
22
33
  /**
23
34
  * Browser event
@@ -29,6 +40,9 @@ export interface InputNumberBlurEvent {
29
40
  value: string;
30
41
  }
31
42
 
43
+ /**
44
+ * Defines valid properties in InputNumber component.
45
+ */
32
46
  export interface InputNumberProps {
33
47
  /**
34
48
  * Value of the component.
@@ -36,18 +50,19 @@ export interface InputNumberProps {
36
50
  modelValue?: Nullable<number>;
37
51
  /**
38
52
  * Whether to format the value.
53
+ * @defaultValue true
39
54
  */
40
55
  format?: boolean | undefined;
41
56
  /**
42
57
  * Displays spinner buttons.
58
+ * @defaultValue false
43
59
  */
44
60
  showButtons?: boolean | undefined;
45
61
  /**
46
62
  * Layout of the buttons.
47
- * @see InputNumberButtonLayoutType
48
- * Default value is 'stacked'.
63
+ * @defaultValue stacked
49
64
  */
50
- buttonLayout?: InputNumberButtonLayoutType;
65
+ buttonLayout?: 'stacked' | 'horizontal' | 'vertical' | undefined;
51
66
  /**
52
67
  * Style class of the increment button.
53
68
  */
@@ -58,12 +73,12 @@ export interface InputNumberProps {
58
73
  decrementButtonClass?: string | undefined;
59
74
  /**
60
75
  * Style class of the increment button.
61
- * Default value is 'pi pi-angle-up'.
76
+ * @defaultValue pi pi-angle-up
62
77
  */
63
78
  incrementButtonIcon?: string | undefined;
64
79
  /**
65
80
  * Style class of the decrement button.
66
- * Default value is 'pi pi-angle-down'.
81
+ * @defaultValue pi pi-angle-down
67
82
  */
68
83
  decrementButtonIcon?: string | undefined;
69
84
  /**
@@ -73,16 +88,14 @@ export interface InputNumberProps {
73
88
  /**
74
89
  * The locale matching algorithm to use. Possible values are 'lookup' and 'best fit'; the default is 'best fit'.
75
90
  * See [Locale Negotation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_negotiation) for details.
76
- * @see InputNumberLocaleMatcherType
77
- * Default value is 'best fit'
91
+ * @defaultValue best fit
78
92
  */
79
- localeMatcher?: InputNumberLocaleMatcherType;
93
+ localeMatcher?: 'lookup' | 'best fit' | undefined;
80
94
  /**
81
95
  * Defines the behavior of the component.
82
- * @see InputNumberModeType
83
- * Default value is 'decimal'.
96
+ * @defaultValue decimal
84
97
  */
85
- mode?: InputNumberModeType;
98
+ mode?: 'decimal' | 'currency' | undefined;
86
99
  /**
87
100
  * Text to display before the value.
88
101
  */
@@ -98,12 +111,12 @@ export interface InputNumberProps {
98
111
  currency?: string | undefined;
99
112
  /**
100
113
  * How to display the currency in currency formatting. Possible values are 'symbol' to use a localized currency symbol such as €, 'code' to use the ISO currency code, 'name' to use a localized currency name such as 'dollar'.
101
- * Default value is 'symbol'.
114
+ * @defaultValue symbol
102
115
  */
103
116
  currencyDisplay?: string | undefined;
104
117
  /**
105
118
  * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.
106
- * Default value is true.
119
+ * @defaultValue true
107
120
  */
108
121
  useGrouping?: boolean | undefined;
109
122
  /**
@@ -126,25 +139,27 @@ export interface InputNumberProps {
126
139
  max?: number | undefined;
127
140
  /**
128
141
  * Step factor to increment/decrement the value.
129
- * Default value is 1.
142
+ * @defaultValue 1
130
143
  */
131
144
  step?: number | undefined;
132
145
  /**
133
146
  * Determines whether the input field is empty.
134
- * Default value is true.
147
+ * @defaultValue true
135
148
  */
136
149
  allowEmpty?: boolean | undefined;
137
150
  /**
138
151
  * Highlights automatically the input value.
139
- * Default value is false.
152
+ * @defaultValue false
140
153
  */
141
154
  highlightOnFocus?: boolean | undefined;
142
155
  /**
143
156
  * When present, it specifies that the component should be disabled.
157
+ * @defaultValue false
144
158
  */
145
159
  disabled?: boolean | undefined;
146
160
  /**
147
161
  * When present, it specifies that an input field is read-only.
162
+ * @defaultValue false
148
163
  */
149
164
  readonly?: boolean | undefined;
150
165
  /**
@@ -185,31 +200,48 @@ export interface InputNumberProps {
185
200
  'aria-label'?: string | undefined;
186
201
  }
187
202
 
203
+ /**
204
+ * Defines valid slots in InputNumber component.
205
+ */
188
206
  export interface InputNumberSlots {}
189
207
 
190
- export declare type InputNumberEmits = {
208
+ /**
209
+ * Defines valid emits in InputNumber component.
210
+ */
211
+ export interface InputNumberEmits {
191
212
  /**
192
213
  * Emitted when the value changes.
193
214
  * @param {number} value - New value.
194
215
  */
195
- 'update:modelValue': (value: number) => void;
216
+ 'update:modelValue'(value: number): void;
196
217
  /**
197
218
  * Callback to invoke when the value is entered.
198
219
  * @param {InputNumberInputEvent} event - Custom input event.
199
220
  */
200
- input: (event: InputNumberInputEvent) => void;
221
+ input(event: InputNumberInputEvent): void;
201
222
  /**
202
223
  * Callback to invoke on focus of input field.
203
224
  * @param {Event} event - Focus event
204
225
  */
205
- focus: (event: Event) => void;
226
+ focus(event: Event): void;
206
227
  /**
207
228
  * Callback to invoke on blur of input field.
208
229
  * @param {InputNumberBlurEvent} event - Blur event
209
230
  */
210
- blur: (event: InputNumberBlurEvent) => void;
211
- };
231
+ blur(event: InputNumberBlurEvent): void;
232
+ }
212
233
 
234
+ /**
235
+ * **PrimeVue - InputNumber**
236
+ *
237
+ * _InputNumber is an input component to provide numerical input._
238
+ *
239
+ * [Live Demo](https://www.primevue.org/inputnumber/)
240
+ * --- ---
241
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
242
+ *
243
+ * @group Component
244
+ */
213
245
  declare class InputNumber extends ClassComponent<InputNumberProps, InputNumberSlots, InputNumberEmits> {
214
246
  /**
215
247
  * Returns Intl.NumberFormat object.
@@ -225,17 +257,4 @@ declare module '@vue/runtime-core' {
225
257
  }
226
258
  }
227
259
 
228
- /**
229
- *
230
- * InputNumber is an input component to provide numerical input.
231
- *
232
- * Helper API:
233
- *
234
- * - [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat)
235
- *
236
- * Demos:
237
- *
238
- * - [InputNumber](https://www.primefaces.org/primevue/inputnumber)
239
- *
240
- */
241
260
  export default InputNumber;
@@ -1,6 +1,18 @@
1
+ /**
2
+ *
3
+ * InputSwitch is used to select a boolean value.
4
+ *
5
+ * [Live Demo](https://www.primevue.org/inputswitch/)
6
+ *
7
+ * @module inputswitch
8
+ *
9
+ */
1
10
  import { InputHTMLAttributes } from 'vue';
2
11
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
12
 
13
+ /**
14
+ * Defines valid properties in InputSwitch component.
15
+ */
4
16
  export interface InputSwitchProps {
5
17
  /**
6
18
  * Specifies whether a inputswitch should be checked or not.
@@ -8,10 +20,12 @@ export interface InputSwitchProps {
8
20
  modelValue?: boolean | string | undefined;
9
21
  /**
10
22
  * Value in checked state.
23
+ * @defaultValue true
11
24
  */
12
25
  trueValue?: any;
13
26
  /**
14
27
  * Value in unchecked state.
28
+ * @defaultValue false
15
29
  */
16
30
  falseValue?: any;
17
31
  /**
@@ -42,29 +56,44 @@ export interface InputSwitchProps {
42
56
 
43
57
  export interface InputSwitchSlots {}
44
58
 
45
- export declare type InputSwitchEmits = {
59
+ /**
60
+ * Defines valid emits in InputSwitch component.
61
+ */
62
+ export interface InputSwitchEmits {
46
63
  /**
47
64
  * Emitted when the value changes.
48
65
  * @param {boolean} value - New value.
49
66
  */
50
- 'update:modelValue': (value: boolean) => void;
67
+ 'update:modelValue'(value: boolean): void;
51
68
  /**
52
69
  * Callback to invoke on click.
53
70
  * @param {Event} event - Browser event.
54
71
  */
55
- click: (event: Event) => void;
72
+ click(event: Event): void;
56
73
  /**
57
74
  * Callback to invoke on value change.
58
75
  * @param {Event} event - Browser event.
59
76
  */
60
- change: (event: Event) => void;
77
+ change(event: Event): void;
61
78
  /**
62
79
  * Callback to invoke on value change.
63
80
  * @param {boolean} value - New value.
64
81
  */
65
- input: (value: boolean) => void;
66
- };
82
+ input(value: boolean): void;
83
+ }
67
84
 
85
+ /**
86
+ * **PrimeVue - InputSwitch**
87
+ *
88
+ * _InputSwitch is used to select a boolean value._
89
+ *
90
+ * [Live Demo](https://www.primevue.org/inputswitch/)
91
+ * --- ---
92
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
93
+ *
94
+ * @group Component
95
+ *
96
+ */
68
97
  declare class InputSwitch extends ClassComponent<InputSwitchProps, InputSwitchSlots, InputSwitchEmits> {}
69
98
 
70
99
  declare module '@vue/runtime-core' {
@@ -73,13 +102,4 @@ declare module '@vue/runtime-core' {
73
102
  }
74
103
  }
75
104
 
76
- /**
77
- *
78
- * InputSwitch is used to select a boolean value.
79
- *
80
- * Demos:
81
- *
82
- * - [InputSwitch](https://www.primefaces.org/primevue/inputswitch)
83
- *
84
- */
85
105
  export default InputSwitch;
@@ -127,6 +127,7 @@ export default {
127
127
  left: 0;
128
128
  right: 0;
129
129
  bottom: 0;
130
+ border: 1px solid transparent;
130
131
  }
131
132
 
132
133
  .p-inputswitch-slider:before {
@@ -149,7 +149,7 @@ function styleInject(css, ref) {
149
149
  }
150
150
  }
151
151
 
152
- var css_248z = "\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n";
152
+ var css_248z = "\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n";
153
153
  styleInject(css_248z);
154
154
 
155
155
  script.render = render;
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),t={name:"InputSwitch",emits:["click","update:modelValue","change","input","focus","blur"],props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{containerClass(){return["p-inputswitch p-component",{"p-inputswitch-checked":this.checked,"p-disabled":this.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const l={class:"p-hidden-accessible"},i=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"],n=e.createElementVNode("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n"),t.render=function(t,s,a,u,d,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),onClick:s[2]||(s[2]=e=>c.onClick(e))},[e.createElementVNode("div",l,[e.createElementVNode("input",e.mergeProps({ref:"input",id:a.inputId,type:"checkbox",role:"switch",class:a.inputClass,style:a.inputStyle,checked:c.checked,disabled:a.disabled,"aria-checked":c.checked,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,onFocus:s[0]||(s[0]=e=>c.onFocus(e)),onBlur:s[1]||(s[1]=e=>c.onBlur(e))},a.inputProps),null,16,i)]),n],2)},module.exports=t;
1
+ "use strict";var e=require("vue"),t={name:"InputSwitch",emits:["click","update:modelValue","change","input","focus","blur"],props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{containerClass(){return["p-inputswitch p-component",{"p-inputswitch-checked":this.checked,"p-disabled":this.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const l={class:"p-hidden-accessible"},i=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"],n=e.createElementVNode("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n"),t.render=function(t,s,a,u,d,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),onClick:s[2]||(s[2]=e=>c.onClick(e))},[e.createElementVNode("div",l,[e.createElementVNode("input",e.mergeProps({ref:"input",id:a.inputId,type:"checkbox",role:"switch",class:a.inputClass,style:a.inputStyle,checked:c.checked,disabled:a.disabled,"aria-checked":c.checked,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,onFocus:s[0]||(s[0]=e=>c.onFocus(e)),onBlur:s[1]||(s[1]=e=>c.onBlur(e))},a.inputProps),null,16,i)]),n],2)},module.exports=t;
@@ -147,7 +147,7 @@ function styleInject(css, ref) {
147
147
  }
148
148
  }
149
149
 
150
- var css_248z = "\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n";
150
+ var css_248z = "\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n";
151
151
  styleInject(css_248z);
152
152
 
153
153
  script.render = render;
@@ -1 +1 @@
1
- import{openBlock as e,createElementBlock as t,normalizeClass as l,createElementVNode as i,mergeProps as n}from"vue";var s={name:"InputSwitch",emits:["click","update:modelValue","change","input","focus","blur"],props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{containerClass(){return["p-inputswitch p-component",{"p-inputswitch-checked":this.checked,"p-disabled":this.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const a={class:"p-hidden-accessible"},u=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"],d=i("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n"),s.render=function(s,c,o,p,r,h){return e(),t("div",{class:l(h.containerClass),onClick:c[2]||(c[2]=e=>h.onClick(e))},[i("div",a,[i("input",n({ref:"input",id:o.inputId,type:"checkbox",role:"switch",class:o.inputClass,style:o.inputStyle,checked:h.checked,disabled:o.disabled,"aria-checked":h.checked,"aria-labelledby":s.ariaLabelledby,"aria-label":s.ariaLabel,onFocus:c[0]||(c[0]=e=>h.onFocus(e)),onBlur:c[1]||(c[1]=e=>h.onBlur(e))},o.inputProps),null,16,u)]),d],2)};export{s as default};
1
+ import{openBlock as e,createElementBlock as t,normalizeClass as l,createElementVNode as i,mergeProps as n}from"vue";var s={name:"InputSwitch",emits:["click","update:modelValue","change","input","focus","blur"],props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{containerClass(){return["p-inputswitch p-component",{"p-inputswitch-checked":this.checked,"p-disabled":this.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const a={class:"p-hidden-accessible"},u=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"],d=i("span",{class:"p-inputswitch-slider"},null,-1);!function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n"),s.render=function(s,c,o,p,r,h){return e(),t("div",{class:l(h.containerClass),onClick:c[2]||(c[2]=e=>h.onClick(e))},[i("div",a,[i("input",n({ref:"input",id:o.inputId,type:"checkbox",role:"switch",class:o.inputClass,style:o.inputStyle,checked:h.checked,disabled:o.disabled,"aria-checked":h.checked,"aria-labelledby":s.ariaLabelledby,"aria-label":s.ariaLabel,onFocus:c[0]||(c[0]=e=>h.onFocus(e)),onBlur:c[1]||(c[1]=e=>h.onBlur(e))},o.inputProps),null,16,u)]),d],2)};export{s as default};
@@ -149,7 +149,7 @@ this.primevue.inputswitch = (function (vue) {
149
149
  }
150
150
  }
151
151
 
152
- var css_248z = "\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n";
152
+ var css_248z = "\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n";
153
153
  styleInject(css_248z);
154
154
 
155
155
  script.render = render;
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.inputswitch=function(e){"use strict";var t={name:"InputSwitch",emits:["click","update:modelValue","change","input","focus","blur"],props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{containerClass(){return["p-inputswitch p-component",{"p-inputswitch-checked":this.checked,"p-disabled":this.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const l={class:"p-hidden-accessible"},i=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"],n=e.createElementVNode("span",{class:"p-inputswitch-slider"},null,-1);return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n"),t.render=function(t,s,a,u,c,d){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.containerClass),onClick:s[2]||(s[2]=e=>d.onClick(e))},[e.createElementVNode("div",l,[e.createElementVNode("input",e.mergeProps({ref:"input",id:a.inputId,type:"checkbox",role:"switch",class:a.inputClass,style:a.inputStyle,checked:d.checked,disabled:a.disabled,"aria-checked":d.checked,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,onFocus:s[0]||(s[0]=e=>d.onFocus(e)),onBlur:s[1]||(s[1]=e=>d.onBlur(e))},a.inputProps),null,16,i)]),n],2)},t}(Vue);
1
+ this.primevue=this.primevue||{},this.primevue.inputswitch=function(e){"use strict";var t={name:"InputSwitch",emits:["click","update:modelValue","change","input","focus","blur"],props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({focused:!1}),methods:{onClick(e){if(!this.disabled){const t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}e.preventDefault()},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{containerClass(){return["p-inputswitch p-component",{"p-inputswitch-checked":this.checked,"p-disabled":this.disabled,"p-focus":this.focused}]},checked(){return this.modelValue===this.trueValue}}};const l={class:"p-hidden-accessible"},i=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"],n=e.createElementVNode("span",{class:"p-inputswitch-slider"},null,-1);return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-inputswitch {\n position: relative;\n display: inline-block;\n}\n.p-inputswitch-slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 1px solid transparent;\n}\n.p-inputswitch-slider:before {\n position: absolute;\n content: '';\n top: 50%;\n}\n"),t.render=function(t,s,a,u,d,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),onClick:s[2]||(s[2]=e=>c.onClick(e))},[e.createElementVNode("div",l,[e.createElementVNode("input",e.mergeProps({ref:"input",id:a.inputId,type:"checkbox",role:"switch",class:a.inputClass,style:a.inputStyle,checked:c.checked,disabled:a.disabled,"aria-checked":c.checked,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,onFocus:s[0]||(s[0]=e=>c.onFocus(e)),onBlur:s[1]||(s[1]=e=>c.onBlur(e))},a.inputProps),null,16,i)]),n],2)},t}(Vue);
@@ -1,6 +1,18 @@
1
+ /**
2
+ *
3
+ * InputText renders a text field to enter data.
4
+ *
5
+ * [Live Demo](https://www.primevue.org/inputtext/)
6
+ *
7
+ * @module inputtext
8
+ *
9
+ */
1
10
  import { InputHTMLAttributes } from 'vue';
2
11
  import { ClassComponent, GlobalComponentConstructor, Nullable } from '../ts-helpers';
3
12
 
13
+ /**
14
+ * Defines valid properties in InputText component.
15
+ */
4
16
  export interface InputTextProps extends InputHTMLAttributes {
5
17
  /**
6
18
  * Value of the component.
@@ -8,16 +20,33 @@ export interface InputTextProps extends InputHTMLAttributes {
8
20
  modelValue?: Nullable<string>;
9
21
  }
10
22
 
23
+ /**
24
+ * Defines valid slots in InputText component.
25
+ */
11
26
  export interface InputTextSlots {}
12
27
 
13
- export declare type InputTextEmits = {
28
+ /**
29
+ * Defines valid emits in InputText component.
30
+ */
31
+ export interface InputTextEmits {
14
32
  /**
15
33
  * Emitted when the value changes.
16
34
  * @param {string} value - New value.
17
35
  */
18
- 'update:modelValue': (value: string | undefined) => void;
19
- };
36
+ 'update:modelValue'(value: string | undefined): void;
37
+ }
20
38
 
39
+ /**
40
+ * **PrimeVue - InputText**
41
+ *
42
+ * _InputText renders a text field to enter data._
43
+ *
44
+ * [Live Demo](https://www.primevue.org/inputtext/)
45
+ * --- ---
46
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
47
+ *
48
+ * @group Component
49
+ */
21
50
  declare class InputText extends ClassComponent<InputTextProps, InputTextSlots, InputTextEmits> {}
22
51
 
23
52
  declare module '@vue/runtime-core' {
@@ -26,13 +55,4 @@ declare module '@vue/runtime-core' {
26
55
  }
27
56
  }
28
57
 
29
- /**
30
- *
31
- * InputText renders a text field to enter data.
32
- *
33
- * Demos:
34
- *
35
- * - [InputText](https://www.primefaces.org/primevue/inputtext)
36
- *
37
- */
38
58
  export default InputText;
package/knob/Knob.d.ts CHANGED
@@ -1,5 +1,17 @@
1
+ /**
2
+ *
3
+ * Knob is a form component to define number inputs with a dial.
4
+ *
5
+ * [Live Demo](https://www.primevue.org/knob/)
6
+ *
7
+ * @module knob
8
+ *
9
+ */
1
10
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2
11
 
12
+ /**
13
+ * Defines valid properties in Knob component.
14
+ */
3
15
  export interface KnobProps {
4
16
  /**
5
17
  * Value of the component.
@@ -7,60 +19,67 @@ export interface KnobProps {
7
19
  modelValue?: number | undefined;
8
20
  /**
9
21
  * Size of the component in pixels.
10
- * Default value is 100.
22
+ * @defaultValue 100
11
23
  */
12
24
  size?: number | undefined;
13
25
  /**
14
26
  * When present, it specifies that the component should be disabled.
27
+ * @defaultValue false
15
28
  */
16
29
  disabled?: boolean | undefined;
17
30
  /**
18
31
  * When present, it specifies that the component value cannot be edited.
32
+ * @defaultValue false
19
33
  */
20
34
  readonly?: boolean | undefined;
21
35
  /**
22
36
  * Step factor to increment/decrement the value.
37
+ * @defaultValue 1
23
38
  */
24
39
  step?: number | undefined;
25
40
  /**
26
41
  * Mininum boundary value.
27
- * Default value is 0.
42
+ * @defaultValue 0
28
43
  */
29
44
  min?: number | undefined;
30
45
  /**
31
46
  * Maximum boundary value.
32
- * Default value is 100.
47
+ * @defaultValue 100
33
48
  */
34
49
  max?: number | undefined;
35
50
  /**
36
51
  * Background of the value.
52
+ * @defaultValue var(--primary-color, Black)
37
53
  */
38
54
  valueColor?: string | undefined;
39
55
  /**
40
56
  * Background color of the range.
57
+ * @defaultValue var(--surface-border, LightGray)
41
58
  */
42
59
  rangeColor?: string | undefined;
43
60
  /**
44
61
  * Color of the value text.
62
+ * @defaultValue var(--text-color-secondary, Black)
45
63
  */
46
64
  textColor?: string | undefined;
47
65
  /**
48
66
  * Width of the knob stroke.
49
- * Default value is 14.
67
+ * @defaultValue 14
50
68
  */
51
69
  strokeWidth?: number | undefined;
52
70
  /**
53
71
  * Whether the show the value inside the knob.
54
- * Default value is true.
72
+ * @defaultValue true
55
73
  */
56
74
  showValue?: boolean | undefined;
57
75
  /**
58
76
  * Template string of the value.
59
- * Default value is '{value}'.
77
+ * @defaultValue '{value}'
60
78
  */
61
79
  valueTemplate?: string | undefined;
62
80
  /**
63
81
  * Index of the element in tabbing order.
82
+ * @defaultValue 0
64
83
  */
65
84
  tabindex?: number | undefined;
66
85
  /**
@@ -73,21 +92,37 @@ export interface KnobProps {
73
92
  'aria-label'?: string | undefined;
74
93
  }
75
94
 
95
+ /**
96
+ * Defines valid slots in Knob component.
97
+ */
76
98
  export interface KnobSlots {}
77
99
 
78
- export declare type KnobEmits = {
100
+ /**
101
+ * Defines valid emits in Knob component.
102
+ */
103
+ export interface KnobEmits {
79
104
  /**
80
105
  * Emitted when the value changes.
81
- * @param {number} value - New value.
106
+ * @param {number} event - New value.
82
107
  */
83
- 'update:modelValue': (value: number) => void;
108
+ 'update:modelValue'(value: number): void;
84
109
  /**
85
110
  * Callback to invoke when the value changes.
86
- * @param {number} value - New value
111
+ * @param {number} event - New value
87
112
  */
88
- change: (value: number) => void;
89
- };
113
+ change(value: number): void;
114
+ }
90
115
 
116
+ /**
117
+ * **PrimeVue - Knob**
118
+ *
119
+ * _Knob groups a collection of contents in tabs._
120
+ *
121
+ * [Live Demo](https://www.primevue.org/knob/)
122
+ * --- ---
123
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
124
+ *
125
+ */
91
126
  declare class Knob extends ClassComponent<KnobProps, KnobSlots, KnobEmits> {}
92
127
 
93
128
  declare module '@vue/runtime-core' {
@@ -96,13 +131,4 @@ declare module '@vue/runtime-core' {
96
131
  }
97
132
  }
98
133
 
99
- /**
100
- *
101
- * Knob is a form component to define number inputs with a dial.
102
- *
103
- * Demos:
104
- *
105
- * - [Knob](https://www.primefaces.org/primevue/knob)
106
- *
107
- */
108
134
  export default Knob;