primevue 3.28.0 → 3.29.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.
- package/README.md +3 -3
- package/autocomplete/AutoComplete.d.ts +153 -1
- package/autocomplete/AutoComplete.vue +46 -17
- package/autocomplete/autocomplete.cjs.js +80 -74
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +80 -75
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +81 -76
- package/autocomplete/autocomplete.min.js +1 -1
- package/basecomponent/BaseComponent.vue +19 -5
- package/basecomponent/basecomponent.cjs.js +19 -5
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +19 -5
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +20 -7
- package/basecomponent/basecomponent.min.js +1 -1
- package/calendar/Calendar.d.ts +269 -0
- package/calendar/Calendar.vue +75 -59
- package/calendar/calendar.cjs.js +223 -259
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +223 -260
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +224 -261
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +154 -0
- package/carousel/Carousel.vue +27 -14
- package/carousel/carousel.cjs.js +64 -65
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +64 -66
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +65 -67
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +133 -0
- package/cascadeselect/CascadeSelect.vue +15 -12
- package/cascadeselect/CascadeSelectSub.vue +7 -3
- package/cascadeselect/cascadeselect.cjs.js +63 -66
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +63 -67
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +64 -68
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/Checkbox.d.ts +60 -0
- package/checkbox/Checkbox.vue +7 -5
- package/checkbox/checkbox.cjs.js +17 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +17 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +18 -17
- package/checkbox/checkbox.min.js +1 -1
- package/chips/Chips.d.ts +80 -0
- package/chips/Chips.vue +9 -5
- package/chips/chips.cjs.js +23 -24
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +23 -25
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +24 -26
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +76 -0
- package/colorpicker/ColorPicker.vue +11 -9
- package/colorpicker/colorpicker.cjs.js +28 -27
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +28 -28
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +29 -29
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +303 -2
- package/column/Column.vue +3 -0
- package/column/column.cjs.js +7 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +3 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +7 -2
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.d.ts +34 -0
- package/columngroup/ColumnGroup.vue +3 -0
- package/columngroup/columngroup.cjs.js +7 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +3 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +7 -2
- package/columngroup/columngroup.min.js +1 -1
- package/config/PrimeVue.d.ts +163 -2
- package/confirmdialog/ConfirmDialog.d.ts +14 -7
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/core/core.js +448 -331
- package/core/core.min.js +9 -9
- package/datatable/BodyCell.vue +29 -13
- package/datatable/ColumnFilter.vue +49 -20
- package/datatable/DataTable.d.ts +188 -1
- package/datatable/DataTable.vue +25 -14
- package/datatable/FooterCell.vue +15 -1
- package/datatable/HeaderCell.vue +31 -6
- package/datatable/HeaderCheckbox.vue +35 -5
- package/datatable/RowCheckbox.vue +36 -5
- package/datatable/RowRadioButton.vue +26 -6
- package/datatable/TableBody.vue +41 -11
- package/datatable/TableFooter.vue +31 -5
- package/datatable/TableHeader.vue +53 -6
- package/datatable/datatable.cjs.js +559 -376
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +559 -377
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +560 -378
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +72 -0
- package/dataview/DataView.vue +13 -8
- package/dataview/dataview.cjs.js +33 -37
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +33 -38
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -38
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +65 -0
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +7 -5
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -17
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -18
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +20 -19
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dialog/Dialog.d.ts +6 -4
- package/dialog/Dialog.vue +2 -3
- package/dialog/dialog.cjs.js +4 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +4 -5
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +4 -5
- package/dialog/dialog.min.js +1 -1
- package/dropdown/Dropdown.d.ts +162 -1
- package/dropdown/Dropdown.vue +44 -25
- package/dropdown/dropdown.cjs.js +97 -93
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +97 -94
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -95
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +67 -0
- package/editor/Editor.vue +35 -33
- package/editor/editor.cjs.js +88 -73
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +85 -74
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +89 -75
- package/editor/editor.min.js +1 -1
- package/fileupload/FileUpload.d.ts +23 -23
- package/fileupload/FileUpload.vue +3 -3
- package/fileupload/fileupload.cjs.js +4 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +4 -4
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/Galleria.d.ts +196 -0
- package/galleria/Galleria.vue +5 -3
- package/galleria/GalleriaContent.vue +10 -6
- package/galleria/GalleriaItem.vue +12 -9
- package/galleria/GalleriaThumbnails.vue +46 -9
- package/galleria/galleria.cjs.js +106 -104
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +106 -105
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +107 -106
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +170 -0
- package/image/Image.vue +49 -21
- package/image/image.cjs.js +94 -59
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +94 -60
- package/image/image.esm.min.js +1 -1
- package/image/image.js +95 -61
- package/image/image.min.js +1 -1
- package/inputmask/InputMask.d.ts +25 -0
- package/inputmask/InputMask.vue +3 -1
- package/inputmask/inputmask.cjs.js +9 -3
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +6 -4
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +10 -5
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +69 -0
- package/inputnumber/InputNumber.vue +13 -11
- package/inputnumber/inputnumber.cjs.js +19 -28
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +19 -29
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +20 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +51 -0
- package/inputswitch/InputSwitch.vue +7 -4
- package/inputswitch/inputswitch.cjs.js +15 -11
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +12 -12
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +16 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +25 -0
- package/inputtext/InputText.vue +4 -1
- package/inputtext/inputtext.cjs.js +9 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +6 -4
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +10 -5
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +78 -0
- package/knob/Knob.vue +8 -4
- package/knob/knob.cjs.js +17 -13
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +14 -14
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +18 -15
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +137 -1
- package/listbox/Listbox.vue +28 -15
- package/listbox/listbox.cjs.js +83 -78
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +83 -79
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +84 -80
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +5 -5
- package/menu/Menu.d.ts +4 -4
- package/menubar/Menubar.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +223 -1
- package/multiselect/MultiSelect.vue +72 -41
- package/multiselect/multiselect.cjs.js +156 -151
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +156 -152
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +157 -153
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +94 -0
- package/orderlist/OrderList.vue +38 -18
- package/orderlist/orderlist.cjs.js +50 -36
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +50 -37
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +51 -38
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +129 -0
- package/organizationchart/OrganizationChart.vue +14 -2
- package/organizationchart/OrganizationChartNode.vue +37 -16
- package/organizationchart/organizationchart.cjs.js +77 -61
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +77 -62
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +78 -63
- package/organizationchart/organizationchart.min.js +1 -1
- package/package.json +1 -1
- package/paginator/CurrentPageReport.vue +5 -1
- package/paginator/FirstPageLink.vue +13 -2
- package/paginator/JumpToPageDropdown.vue +3 -1
- package/paginator/JumpToPageInput.vue +3 -1
- package/paginator/LastPageLink.vue +13 -2
- package/paginator/NextPageLink.vue +13 -2
- package/paginator/PageLinks.vue +12 -2
- package/paginator/Paginator.d.ts +133 -0
- package/paginator/Paginator.vue +23 -12
- package/paginator/PrevPageLink.vue +13 -2
- package/paginator/RowsPerPageDropdown.vue +3 -1
- package/paginator/paginator.cjs.js +135 -76
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +135 -77
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +136 -78
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +4 -8
- package/password/Password.d.ts +104 -0
- package/password/Password.vue +11 -9
- package/password/password.cjs.js +26 -28
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +26 -29
- package/password/password.esm.min.js +1 -1
- package/password/password.js +27 -30
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +160 -0
- package/picklist/PickList.vue +46 -34
- package/picklist/picklist.cjs.js +111 -85
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +111 -86
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +112 -87
- package/picklist/picklist.min.js +1 -1
- package/radiobutton/RadioButton.d.ts +55 -0
- package/radiobutton/RadioButton.vue +7 -5
- package/radiobutton/radiobutton.cjs.js +19 -16
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +16 -17
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +20 -18
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +96 -0
- package/rating/Rating.vue +32 -9
- package/rating/rating.cjs.js +41 -34
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +41 -35
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +42 -36
- package/rating/rating.min.js +1 -1
- package/row/Row.d.ts +29 -0
- package/row/Row.vue +3 -0
- package/row/row.cjs.js +7 -0
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +3 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +7 -2
- package/row/row.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +68 -0
- package/selectbutton/SelectButton.vue +13 -2
- package/selectbutton/selectbutton.cjs.js +20 -10
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +20 -11
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +21 -12
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/Slider.d.ts +48 -0
- package/slider/Slider.vue +7 -2
- package/slider/slider.cjs.js +22 -16
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +19 -17
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +23 -18
- package/slider/slider.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +0 -4
- package/splitbutton/SplitButton.vue +2 -2
- package/splitbutton/splitbutton.cjs.js +7 -6
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -6
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -6
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +3 -3
- package/textarea/Textarea.d.ts +32 -0
- package/textarea/Textarea.vue +4 -1
- package/textarea/textarea.cjs.js +9 -3
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +6 -4
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +10 -5
- package/textarea/textarea.min.js +1 -1
- package/timeline/Timeline.d.ts +49 -0
- package/timeline/Timeline.vue +9 -7
- package/timeline/timeline.cjs.js +19 -21
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +16 -22
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +20 -23
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +4 -0
- package/toast/Toast.vue +1 -1
- package/toast/toast.cjs.js +3 -3
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +3 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +3 -3
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +59 -0
- package/togglebutton/ToggleButton.vue +7 -5
- package/togglebutton/togglebutton.cjs.js +15 -14
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +15 -15
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +16 -16
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/Tooltip.d.ts +10 -0
- package/tooltip/tooltip.cjs.js +51 -9
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +52 -10
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +51 -9
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +137 -0
- package/tree/Tree.vue +12 -9
- package/tree/TreeNode.vue +23 -10
- package/tree/tree.cjs.js +85 -79
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +85 -80
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +86 -81
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +103 -1
- package/treeselect/TreeSelect.vue +15 -12
- package/treeselect/treeselect.cjs.js +37 -39
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +37 -40
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +38 -41
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +38 -10
- package/treetable/FooterCell.vue +15 -1
- package/treetable/HeaderCell.vue +28 -5
- package/treetable/TreeTable.d.ts +162 -0
- package/treetable/TreeTable.vue +25 -19
- package/treetable/TreeTableRow.vue +5 -0
- package/treetable/treetable.cjs.js +205 -158
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +205 -159
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +206 -160
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +93 -0
- package/tristatecheckbox/TriStateCheckbox.vue +19 -8
- package/tristatecheckbox/tristatecheckbox.cjs.js +31 -22
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +31 -23
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +32 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +3 -1
- package/vetur-attributes.json +180 -0
- package/vetur-tags.json +94 -39
- package/virtualscroller/VirtualScroller.d.ts +97 -0
- package/virtualscroller/VirtualScroller.vue +7 -5
- package/virtualscroller/virtualscroller.cjs.js +22 -19
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +22 -20
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +23 -21
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +467 -3
- package/datatable/TableLoadingBody.vue +0 -25
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="containerClass" @click="onClick($event)">
|
|
3
|
-
<div class="p-hidden-accessible">
|
|
2
|
+
<div :class="containerClass" @click="onClick($event)" v-bind="ptm('root')">
|
|
3
|
+
<div class="p-hidden-accessible" v-bind="ptm('hiddenInputWrapper')">
|
|
4
4
|
<input
|
|
5
5
|
ref="input"
|
|
6
6
|
:id="inputId"
|
|
@@ -15,20 +15,22 @@
|
|
|
15
15
|
:aria-label="ariaLabel"
|
|
16
16
|
@focus="onFocus"
|
|
17
17
|
@blur="onBlur"
|
|
18
|
-
v-bind="
|
|
18
|
+
v-bind="ptm('hiddenInput')"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
21
|
-
<div ref="box" :class="['p-radiobutton-box', { 'p-highlight': checked, 'p-disabled': disabled, 'p-focus': focused }]">
|
|
22
|
-
<div class="p-radiobutton-icon"></div>
|
|
21
|
+
<div ref="box" :class="['p-radiobutton-box', { 'p-highlight': checked, 'p-disabled': disabled, 'p-focus': focused }]" v-bind="{ ...inputProps, ...ptm('input') }">
|
|
22
|
+
<div class="p-radiobutton-icon" v-bind="ptm('icon')"></div>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script>
|
|
28
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
28
29
|
import { ObjectUtils } from 'primevue/utils';
|
|
29
30
|
|
|
30
31
|
export default {
|
|
31
32
|
name: 'RadioButton',
|
|
33
|
+
extends: BaseComponent,
|
|
32
34
|
emits: ['click', 'update:modelValue', 'change', 'focus', 'blur'],
|
|
33
35
|
props: {
|
|
34
36
|
value: null,
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var utils = require('primevue/utils');
|
|
4
5
|
var vue = require('vue');
|
|
5
6
|
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
10
|
+
|
|
6
11
|
var script = {
|
|
7
12
|
name: 'RadioButton',
|
|
13
|
+
extends: BaseComponent__default["default"],
|
|
8
14
|
emits: ['click', 'update:modelValue', 'change', 'focus', 'blur'],
|
|
9
15
|
props: {
|
|
10
16
|
value: null,
|
|
@@ -85,19 +91,14 @@ var script = {
|
|
|
85
91
|
}
|
|
86
92
|
};
|
|
87
93
|
|
|
88
|
-
const _hoisted_1 =
|
|
89
|
-
const _hoisted_2 = ["id", "name", "checked", "disabled", "value", "aria-labelledby", "aria-label"];
|
|
90
|
-
const _hoisted_3 = /*#__PURE__*/vue.createElementVNode("div", { class: "p-radiobutton-icon" }, null, -1);
|
|
91
|
-
const _hoisted_4 = [
|
|
92
|
-
_hoisted_3
|
|
93
|
-
];
|
|
94
|
+
const _hoisted_1 = ["id", "name", "checked", "disabled", "value", "aria-labelledby", "aria-label"];
|
|
94
95
|
|
|
95
96
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
96
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
97
|
-
class:
|
|
97
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
98
|
+
class: $options.containerClass,
|
|
98
99
|
onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
|
|
99
|
-
}, [
|
|
100
|
-
vue.createElementVNode("div",
|
|
100
|
+
}, _ctx.ptm('root')), [
|
|
101
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenInputWrapper')), [
|
|
101
102
|
vue.createElementVNode("input", vue.mergeProps({
|
|
102
103
|
ref: "input",
|
|
103
104
|
id: $props.inputId,
|
|
@@ -112,13 +113,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
112
113
|
"aria-label": _ctx.ariaLabel,
|
|
113
114
|
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
114
115
|
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args)))
|
|
115
|
-
},
|
|
116
|
-
]),
|
|
117
|
-
vue.createElementVNode("div", {
|
|
116
|
+
}, _ctx.ptm('hiddenInput')), null, 16, _hoisted_1)
|
|
117
|
+
], 16),
|
|
118
|
+
vue.createElementVNode("div", vue.mergeProps({
|
|
118
119
|
ref: "box",
|
|
119
|
-
class:
|
|
120
|
-
},
|
|
121
|
-
|
|
120
|
+
class: ['p-radiobutton-box', { 'p-highlight': $options.checked, 'p-disabled': $props.disabled, 'p-focus': $data.focused }]
|
|
121
|
+
}, { ...$props.inputProps, ..._ctx.ptm('input') }), [
|
|
122
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-radiobutton-icon" }, _ctx.ptm('icon')), null, 16)
|
|
123
|
+
], 16)
|
|
124
|
+
], 16))
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),l=require("vue")
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/utils"),l=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"RadioButton",extends:a(e).default,emits:["click","update:modelValue","change","focus","blur"],props:{value:null,modelValue:null,name:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,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){this.disabled||(this.$emit("click",e),this.$emit("update:modelValue",this.value),this.$refs.input.focus(),this.checked||this.$emit("change",e))},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked(){return null!=this.modelValue&&t.ObjectUtils.equals(this.modelValue,this.value)},containerClass(){return["p-radiobutton p-component",{"p-radiobutton-checked":this.checked,"p-radiobutton-disabled":this.disabled,"p-radiobutton-focused":this.focused}]}}};const u=["id","name","checked","disabled","value","aria-labelledby","aria-label"];i.render=function(e,t,a,i,n,d){return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:d.containerClass,onClick:t[2]||(t[2]=e=>d.onClick(e))},e.ptm("root")),[l.createElementVNode("div",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper")),[l.createElementVNode("input",l.mergeProps({ref:"input",id:a.inputId,type:"radio",class:a.inputClass,style:a.inputStyle,name:a.name,checked:d.checked,disabled:a.disabled,value:a.value,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=(...e)=>d.onFocus&&d.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>d.onBlur&&d.onBlur(...e))},e.ptm("hiddenInput")),null,16,u)],16),l.createElementVNode("div",l.mergeProps({ref:"box",class:["p-radiobutton-box",{"p-highlight":d.checked,"p-disabled":a.disabled,"p-focus":n.focused}]},{...a.inputProps,...e.ptm("input")}),[l.createElementVNode("div",l.mergeProps({class:"p-radiobutton-icon"},e.ptm("icon")),null,16)],16)],16)},module.exports=i;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import { ObjectUtils } from 'primevue/utils';
|
|
2
|
-
import { openBlock, createElementBlock,
|
|
3
|
+
import { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';
|
|
3
4
|
|
|
4
5
|
var script = {
|
|
5
6
|
name: 'RadioButton',
|
|
7
|
+
extends: BaseComponent,
|
|
6
8
|
emits: ['click', 'update:modelValue', 'change', 'focus', 'blur'],
|
|
7
9
|
props: {
|
|
8
10
|
value: null,
|
|
@@ -83,19 +85,14 @@ var script = {
|
|
|
83
85
|
}
|
|
84
86
|
};
|
|
85
87
|
|
|
86
|
-
const _hoisted_1 =
|
|
87
|
-
const _hoisted_2 = ["id", "name", "checked", "disabled", "value", "aria-labelledby", "aria-label"];
|
|
88
|
-
const _hoisted_3 = /*#__PURE__*/createElementVNode("div", { class: "p-radiobutton-icon" }, null, -1);
|
|
89
|
-
const _hoisted_4 = [
|
|
90
|
-
_hoisted_3
|
|
91
|
-
];
|
|
88
|
+
const _hoisted_1 = ["id", "name", "checked", "disabled", "value", "aria-labelledby", "aria-label"];
|
|
92
89
|
|
|
93
90
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
94
|
-
return (openBlock(), createElementBlock("div", {
|
|
95
|
-
class:
|
|
91
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
92
|
+
class: $options.containerClass,
|
|
96
93
|
onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
|
|
97
|
-
}, [
|
|
98
|
-
createElementVNode("div",
|
|
94
|
+
}, _ctx.ptm('root')), [
|
|
95
|
+
createElementVNode("div", mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenInputWrapper')), [
|
|
99
96
|
createElementVNode("input", mergeProps({
|
|
100
97
|
ref: "input",
|
|
101
98
|
id: $props.inputId,
|
|
@@ -110,13 +107,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
110
107
|
"aria-label": _ctx.ariaLabel,
|
|
111
108
|
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
112
109
|
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args)))
|
|
113
|
-
},
|
|
114
|
-
]),
|
|
115
|
-
createElementVNode("div", {
|
|
110
|
+
}, _ctx.ptm('hiddenInput')), null, 16, _hoisted_1)
|
|
111
|
+
], 16),
|
|
112
|
+
createElementVNode("div", mergeProps({
|
|
116
113
|
ref: "box",
|
|
117
|
-
class:
|
|
118
|
-
},
|
|
119
|
-
|
|
114
|
+
class: ['p-radiobutton-box', { 'p-highlight': $options.checked, 'p-disabled': $props.disabled, 'p-focus': $data.focused }]
|
|
115
|
+
}, { ...$props.inputProps, ..._ctx.ptm('input') }), [
|
|
116
|
+
createElementVNode("div", mergeProps({ class: "p-radiobutton-icon" }, _ctx.ptm('icon')), null, 16)
|
|
117
|
+
], 16)
|
|
118
|
+
], 16))
|
|
120
119
|
}
|
|
121
120
|
|
|
122
121
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ObjectUtils as
|
|
1
|
+
import e from"primevue/basecomponent";import{ObjectUtils as l}from"primevue/utils";import{openBlock as t,createElementBlock as i,mergeProps as a,createElementVNode as u}from"vue";var d={name:"RadioButton",extends:e,emits:["click","update:modelValue","change","focus","blur"],props:{value:null,modelValue:null,name:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,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){this.disabled||(this.$emit("click",e),this.$emit("update:modelValue",this.value),this.$refs.input.focus(),this.checked||this.$emit("change",e))},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked(){return null!=this.modelValue&&l.equals(this.modelValue,this.value)},containerClass(){return["p-radiobutton p-component",{"p-radiobutton-checked":this.checked,"p-radiobutton-disabled":this.disabled,"p-radiobutton-focused":this.focused}]}}};const n=["id","name","checked","disabled","value","aria-labelledby","aria-label"];d.render=function(e,l,d,o,s,c){return t(),i("div",a({class:c.containerClass,onClick:l[2]||(l[2]=e=>c.onClick(e))},e.ptm("root")),[u("div",a({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper")),[u("input",a({ref:"input",id:d.inputId,type:"radio",class:d.inputClass,style:d.inputStyle,name:d.name,checked:c.checked,disabled:d.disabled,value:d.value,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:l[0]||(l[0]=(...e)=>c.onFocus&&c.onFocus(...e)),onBlur:l[1]||(l[1]=(...e)=>c.onBlur&&c.onBlur(...e))},e.ptm("hiddenInput")),null,16,n)],16),u("div",a({ref:"box",class:["p-radiobutton-box",{"p-highlight":c.checked,"p-disabled":d.disabled,"p-focus":s.focused}]},{...d.inputProps,...e.ptm("input")}),[u("div",a({class:"p-radiobutton-icon"},e.ptm("icon")),null,16)],16)],16)};export{d as default};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.radiobutton = (function (utils, vue) {
|
|
2
|
+
this.primevue.radiobutton = (function (BaseComponent, utils, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
6
|
+
|
|
7
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
8
|
+
|
|
5
9
|
var script = {
|
|
6
10
|
name: 'RadioButton',
|
|
11
|
+
extends: BaseComponent__default["default"],
|
|
7
12
|
emits: ['click', 'update:modelValue', 'change', 'focus', 'blur'],
|
|
8
13
|
props: {
|
|
9
14
|
value: null,
|
|
@@ -84,19 +89,14 @@ this.primevue.radiobutton = (function (utils, vue) {
|
|
|
84
89
|
}
|
|
85
90
|
};
|
|
86
91
|
|
|
87
|
-
const _hoisted_1 =
|
|
88
|
-
const _hoisted_2 = ["id", "name", "checked", "disabled", "value", "aria-labelledby", "aria-label"];
|
|
89
|
-
const _hoisted_3 = /*#__PURE__*/vue.createElementVNode("div", { class: "p-radiobutton-icon" }, null, -1);
|
|
90
|
-
const _hoisted_4 = [
|
|
91
|
-
_hoisted_3
|
|
92
|
-
];
|
|
92
|
+
const _hoisted_1 = ["id", "name", "checked", "disabled", "value", "aria-labelledby", "aria-label"];
|
|
93
93
|
|
|
94
94
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
95
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
96
|
-
class:
|
|
95
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
96
|
+
class: $options.containerClass,
|
|
97
97
|
onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
|
|
98
|
-
}, [
|
|
99
|
-
vue.createElementVNode("div",
|
|
98
|
+
}, _ctx.ptm('root')), [
|
|
99
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenInputWrapper')), [
|
|
100
100
|
vue.createElementVNode("input", vue.mergeProps({
|
|
101
101
|
ref: "input",
|
|
102
102
|
id: $props.inputId,
|
|
@@ -111,17 +111,19 @@ this.primevue.radiobutton = (function (utils, vue) {
|
|
|
111
111
|
"aria-label": _ctx.ariaLabel,
|
|
112
112
|
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
113
113
|
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args)))
|
|
114
|
-
},
|
|
115
|
-
]),
|
|
116
|
-
vue.createElementVNode("div", {
|
|
114
|
+
}, _ctx.ptm('hiddenInput')), null, 16, _hoisted_1)
|
|
115
|
+
], 16),
|
|
116
|
+
vue.createElementVNode("div", vue.mergeProps({
|
|
117
117
|
ref: "box",
|
|
118
|
-
class:
|
|
119
|
-
},
|
|
120
|
-
|
|
118
|
+
class: ['p-radiobutton-box', { 'p-highlight': $options.checked, 'p-disabled': $props.disabled, 'p-focus': $data.focused }]
|
|
119
|
+
}, { ...$props.inputProps, ..._ctx.ptm('input') }), [
|
|
120
|
+
vue.createElementVNode("div", vue.mergeProps({ class: "p-radiobutton-icon" }, _ctx.ptm('icon')), null, 16)
|
|
121
|
+
], 16)
|
|
122
|
+
], 16))
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
script.render = render;
|
|
124
126
|
|
|
125
127
|
return script;
|
|
126
128
|
|
|
127
|
-
})(primevue.utils, Vue);
|
|
129
|
+
})(primevue.basecomponent, primevue.utils, Vue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.radiobutton=function(e,l){"use strict";var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.radiobutton=function(e,t,l){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a={name:"RadioButton",extends:i(e).default,emits:["click","update:modelValue","change","focus","blur"],props:{value:null,modelValue:null,name:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,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){this.disabled||(this.$emit("click",e),this.$emit("update:modelValue",this.value),this.$refs.input.focus(),this.checked||this.$emit("change",e))},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked(){return null!=this.modelValue&&t.ObjectUtils.equals(this.modelValue,this.value)},containerClass(){return["p-radiobutton p-component",{"p-radiobutton-checked":this.checked,"p-radiobutton-disabled":this.disabled,"p-radiobutton-focused":this.focused}]}}};const u=["id","name","checked","disabled","value","aria-labelledby","aria-label"];return a.render=function(e,t,i,a,n,d){return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:d.containerClass,onClick:t[2]||(t[2]=e=>d.onClick(e))},e.ptm("root")),[l.createElementVNode("div",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper")),[l.createElementVNode("input",l.mergeProps({ref:"input",id:i.inputId,type:"radio",class:i.inputClass,style:i.inputStyle,name:i.name,checked:d.checked,disabled:i.disabled,value:i.value,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=(...e)=>d.onFocus&&d.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>d.onBlur&&d.onBlur(...e))},e.ptm("hiddenInput")),null,16,u)],16),l.createElementVNode("div",l.mergeProps({ref:"box",class:["p-radiobutton-box",{"p-highlight":d.checked,"p-disabled":i.disabled,"p-focus":n.focused}]},{...i.inputProps,...e.ptm("input")}),[l.createElementVNode("div",l.mergeProps({class:"p-radiobutton-icon"},e.ptm("icon")),null,16)],16)],16)},a}(primevue.basecomponent,primevue.utils,Vue);
|
package/rating/Rating.d.ts
CHANGED
|
@@ -10,6 +10,97 @@
|
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type RatingPassThroughOptionType = RatingPassThroughAttributes | ((options: RatingPassThroughMethodOptions) => RatingPassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface RatingPassThroughMethodOptions {
|
|
19
|
+
props: RatingProps;
|
|
20
|
+
state: RatingState;
|
|
21
|
+
context: RatingContext;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Custom passthrough(pt) options.
|
|
26
|
+
* @see {@link RatingProps.pt}
|
|
27
|
+
*/
|
|
28
|
+
export interface RatingPassThroughOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Uses to pass attributes to the root's DOM element.
|
|
31
|
+
*/
|
|
32
|
+
root?: RatingPassThroughOptionType;
|
|
33
|
+
/**
|
|
34
|
+
* Uses to pass attributes to the cancel icon's DOM element.
|
|
35
|
+
*/
|
|
36
|
+
cancelIcon?: RatingPassThroughOptionType;
|
|
37
|
+
/**
|
|
38
|
+
* Uses to pass attributes to the item's DOM element.
|
|
39
|
+
*/
|
|
40
|
+
item?: RatingPassThroughOptionType;
|
|
41
|
+
/**
|
|
42
|
+
* Uses to pass attributes to the on icon's DOM element.
|
|
43
|
+
*/
|
|
44
|
+
onIcon?: RatingPassThroughOptionType;
|
|
45
|
+
/**
|
|
46
|
+
* Uses to pass attributes to the off icon's DOM element.
|
|
47
|
+
*/
|
|
48
|
+
offIcon?: RatingPassThroughOptionType;
|
|
49
|
+
/**
|
|
50
|
+
* Uses to pass attributes to the hidden cancel inputW wapper's DOM element.
|
|
51
|
+
*/
|
|
52
|
+
hiddenCancelInputWrapper?: RatingPassThroughOptionType;
|
|
53
|
+
/**
|
|
54
|
+
* Uses to pass attributes to the hidden cancel input's DOM element.
|
|
55
|
+
*/
|
|
56
|
+
hiddenCancelInput?: RatingPassThroughOptionType;
|
|
57
|
+
/**
|
|
58
|
+
* Uses to pass attributes to the hidden item input wrapper's DOM element.
|
|
59
|
+
*/
|
|
60
|
+
hiddenItemInputWrapper?: RatingPassThroughOptionType;
|
|
61
|
+
/**
|
|
62
|
+
* Uses to pass attributes to the hidden item input's DOM element.
|
|
63
|
+
*/
|
|
64
|
+
hiddenItemInput?: RatingPassThroughOptionType;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Custom passthrough attributes for each DOM elements
|
|
69
|
+
*/
|
|
70
|
+
export interface RatingPassThroughAttributes {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Defines current inline state in Rating component.
|
|
76
|
+
*/
|
|
77
|
+
export interface RatingState {
|
|
78
|
+
/**
|
|
79
|
+
* name state as a number.
|
|
80
|
+
*/
|
|
81
|
+
name: string;
|
|
82
|
+
/**
|
|
83
|
+
* focusedOptionIndex state as a number.
|
|
84
|
+
*/
|
|
85
|
+
focusedOptionIndex: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Defines current options in Rating component.
|
|
90
|
+
*/
|
|
91
|
+
export interface RatingContext {
|
|
92
|
+
/**
|
|
93
|
+
* Current active state of the item as a boolean.
|
|
94
|
+
* @defaultValue false
|
|
95
|
+
*/
|
|
96
|
+
active: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Current focused state of item as a boolean.
|
|
99
|
+
* @defaultValue false
|
|
100
|
+
*/
|
|
101
|
+
focused: boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
13
104
|
/**
|
|
14
105
|
* Custom change event.
|
|
15
106
|
* @see {@link RatingEmits.change}
|
|
@@ -72,6 +163,11 @@ export interface RatingProps {
|
|
|
72
163
|
* @deprecated since v3.27.0. Use 'cancelicon' slot.
|
|
73
164
|
*/
|
|
74
165
|
cancelIcon?: string | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
168
|
+
* @type {RatingPassThroughOptions}
|
|
169
|
+
*/
|
|
170
|
+
pt?: RatingPassThroughOptions;
|
|
75
171
|
}
|
|
76
172
|
|
|
77
173
|
/**
|
package/rating/Rating.vue
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="containerClass">
|
|
3
|
-
<div v-if="cancel" :class="['p-rating-item p-rating-cancel-item', { 'p-focus': focusedOptionIndex === 0 }]" @click="onOptionClick($event, 0)">
|
|
4
|
-
<span class="p-hidden-accessible">
|
|
5
|
-
<input
|
|
2
|
+
<div :class="containerClass" v-bind="ptm('root')">
|
|
3
|
+
<div v-if="cancel" :class="['p-rating-item p-rating-cancel-item', { 'p-focus': focusedOptionIndex === 0 }]" @click="onOptionClick($event, 0)" v-bind="ptm('cancelItem')">
|
|
4
|
+
<span class="p-hidden-accessible" v-bind="ptm('hiddenCancelInputWrapper')">
|
|
5
|
+
<input
|
|
6
|
+
type="radio"
|
|
7
|
+
value="0"
|
|
8
|
+
:name="name"
|
|
9
|
+
:checked="modelValue === 0"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
:readonly="readonly"
|
|
12
|
+
:aria-label="cancelAriaLabel()"
|
|
13
|
+
@focus="onFocus($event, 0)"
|
|
14
|
+
@blur="onBlur"
|
|
15
|
+
@change="onChange($event, 0)"
|
|
16
|
+
v-bind="ptm('hiddenCancelInput')"
|
|
17
|
+
/>
|
|
6
18
|
</span>
|
|
7
19
|
<slot name="cancelicon">
|
|
8
|
-
<component :is="cancelIcon ? 'span' : 'BanIcon'" :class="['p-rating-icon p-rating-cancel', cancelIcon]" />
|
|
20
|
+
<component :is="cancelIcon ? 'span' : 'BanIcon'" :class="['p-rating-icon p-rating-cancel', cancelIcon]" v-bind="ptm('cancelIcon')" />
|
|
9
21
|
</slot>
|
|
10
22
|
</div>
|
|
11
23
|
<template v-for="value in stars" :key="value">
|
|
12
|
-
<div :class="['p-rating-item', { 'p-rating-item-active': value <= modelValue, 'p-focus': value === focusedOptionIndex }]" @click="onOptionClick($event, value)">
|
|
13
|
-
<span class="p-hidden-accessible">
|
|
24
|
+
<div :class="['p-rating-item', { 'p-rating-item-active': value <= modelValue, 'p-focus': value === focusedOptionIndex }]" @click="onOptionClick($event, value)" v-bind="getPTOptions(value, 'item')">
|
|
25
|
+
<span class="p-hidden-accessible" v-bind="ptm('hiddenItemInputWrapper')">
|
|
14
26
|
<input
|
|
15
27
|
type="radio"
|
|
16
28
|
:value="value"
|
|
@@ -22,13 +34,14 @@
|
|
|
22
34
|
@focus="onFocus($event, value)"
|
|
23
35
|
@blur="onBlur"
|
|
24
36
|
@change="onChange($event, value)"
|
|
37
|
+
v-bind="ptm('hiddenItemInput')"
|
|
25
38
|
/>
|
|
26
39
|
</span>
|
|
27
40
|
<slot v-if="value <= modelValue" name="onicon" :value="value">
|
|
28
|
-
<component :is="onIcon ? 'span' : 'StarFillIcon'" :class="['p-rating-icon', onIcon]" />
|
|
41
|
+
<component :is="onIcon ? 'span' : 'StarFillIcon'" :class="['p-rating-icon', onIcon]" v-bind="ptm('onIcon')" />
|
|
29
42
|
</slot>
|
|
30
43
|
<slot v-else name="officon" :value="value">
|
|
31
|
-
<component :is="
|
|
44
|
+
<component :is="offIcon ? 'span' : 'StarIcon'" :class="['p-rating-icon', offIcon]" v-bind="ptm('offIcon')" />
|
|
32
45
|
</slot>
|
|
33
46
|
</div>
|
|
34
47
|
</template>
|
|
@@ -36,6 +49,7 @@
|
|
|
36
49
|
</template>
|
|
37
50
|
|
|
38
51
|
<script>
|
|
52
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
39
53
|
import BanIcon from 'primevue/icons/ban';
|
|
40
54
|
import StarIcon from 'primevue/icons/star';
|
|
41
55
|
import StarFillIcon from 'primevue/icons/starfill';
|
|
@@ -43,6 +57,7 @@ import { DomHandler, UniqueComponentId } from 'primevue/utils';
|
|
|
43
57
|
|
|
44
58
|
export default {
|
|
45
59
|
name: 'Rating',
|
|
60
|
+
extends: BaseComponent,
|
|
46
61
|
emits: ['update:modelValue', 'change', 'focus', 'blur'],
|
|
47
62
|
props: {
|
|
48
63
|
modelValue: {
|
|
@@ -93,6 +108,14 @@ export default {
|
|
|
93
108
|
this.name = this.name || UniqueComponentId();
|
|
94
109
|
},
|
|
95
110
|
methods: {
|
|
111
|
+
getPTOptions(value, key) {
|
|
112
|
+
return this.ptm(key, {
|
|
113
|
+
context: {
|
|
114
|
+
active: value <= this.modelValue,
|
|
115
|
+
focused: value === this.focusedOptionIndex
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
},
|
|
96
119
|
onOptionClick(event, value) {
|
|
97
120
|
if (!this.readonly && !this.disabled) {
|
|
98
121
|
this.onOptionSelect(event, value);
|
package/rating/rating.cjs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var BaseComponent = require('primevue/basecomponent');
|
|
3
4
|
var BanIcon = require('primevue/icons/ban');
|
|
4
5
|
var StarIcon = require('primevue/icons/star');
|
|
5
6
|
var StarFillIcon = require('primevue/icons/starfill');
|
|
@@ -8,12 +9,14 @@ var vue = require('vue');
|
|
|
8
9
|
|
|
9
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
11
|
|
|
12
|
+
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
|
|
11
13
|
var BanIcon__default = /*#__PURE__*/_interopDefaultLegacy(BanIcon);
|
|
12
14
|
var StarIcon__default = /*#__PURE__*/_interopDefaultLegacy(StarIcon);
|
|
13
15
|
var StarFillIcon__default = /*#__PURE__*/_interopDefaultLegacy(StarFillIcon);
|
|
14
16
|
|
|
15
17
|
var script = {
|
|
16
18
|
name: 'Rating',
|
|
19
|
+
extends: BaseComponent__default["default"],
|
|
17
20
|
emits: ['update:modelValue', 'change', 'focus', 'blur'],
|
|
18
21
|
props: {
|
|
19
22
|
modelValue: {
|
|
@@ -64,6 +67,14 @@ var script = {
|
|
|
64
67
|
this.name = this.name || utils.UniqueComponentId();
|
|
65
68
|
},
|
|
66
69
|
methods: {
|
|
70
|
+
getPTOptions(value, key) {
|
|
71
|
+
return this.ptm(key, {
|
|
72
|
+
context: {
|
|
73
|
+
active: value <= this.modelValue,
|
|
74
|
+
focused: value === this.focusedOptionIndex
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
},
|
|
67
78
|
onOptionClick(event, value) {
|
|
68
79
|
if (!this.readonly && !this.disabled) {
|
|
69
80
|
this.onOptionSelect(event, value);
|
|
@@ -116,24 +127,20 @@ var script = {
|
|
|
116
127
|
}
|
|
117
128
|
};
|
|
118
129
|
|
|
119
|
-
const _hoisted_1 =
|
|
120
|
-
const _hoisted_2 = ["
|
|
121
|
-
const _hoisted_3 = ["
|
|
122
|
-
const _hoisted_4 = { class: "p-hidden-accessible" };
|
|
123
|
-
const _hoisted_5 = ["value", "name", "checked", "disabled", "readonly", "aria-label", "onFocus", "onChange"];
|
|
130
|
+
const _hoisted_1 = ["name", "checked", "disabled", "readonly", "aria-label"];
|
|
131
|
+
const _hoisted_2 = ["onClick"];
|
|
132
|
+
const _hoisted_3 = ["value", "name", "checked", "disabled", "readonly", "aria-label", "onFocus", "onChange"];
|
|
124
133
|
|
|
125
134
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
126
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
127
|
-
class: vue.normalizeClass($options.containerClass)
|
|
128
|
-
}, [
|
|
135
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: $options.containerClass }, _ctx.ptm('root')), [
|
|
129
136
|
($props.cancel)
|
|
130
|
-
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
137
|
+
? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
131
138
|
key: 0,
|
|
132
|
-
class:
|
|
139
|
+
class: ['p-rating-item p-rating-cancel-item', { 'p-focus': $data.focusedOptionIndex === 0 }],
|
|
133
140
|
onClick: _cache[3] || (_cache[3] = $event => ($options.onOptionClick($event, 0)))
|
|
134
|
-
}, [
|
|
135
|
-
vue.createElementVNode("span",
|
|
136
|
-
vue.createElementVNode("input", {
|
|
141
|
+
}, _ctx.ptm('cancelItem')), [
|
|
142
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenCancelInputWrapper')), [
|
|
143
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
137
144
|
type: "radio",
|
|
138
145
|
value: "0",
|
|
139
146
|
name: $data.name,
|
|
@@ -144,23 +151,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
144
151
|
onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event, 0))),
|
|
145
152
|
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
146
153
|
onChange: _cache[2] || (_cache[2] = $event => ($options.onChange($event, 0)))
|
|
147
|
-
}, null,
|
|
148
|
-
]),
|
|
154
|
+
}, _ctx.ptm('hiddenCancelInput')), null, 16, _hoisted_1)
|
|
155
|
+
], 16),
|
|
149
156
|
vue.renderSlot(_ctx.$slots, "cancelicon", {}, () => [
|
|
150
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.cancelIcon ? 'span' : 'BanIcon'), {
|
|
151
|
-
class:
|
|
152
|
-
}, null,
|
|
157
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.cancelIcon ? 'span' : 'BanIcon'), vue.mergeProps({
|
|
158
|
+
class: ['p-rating-icon p-rating-cancel', $props.cancelIcon]
|
|
159
|
+
}, _ctx.ptm('cancelIcon')), null, 16, ["class"]))
|
|
153
160
|
])
|
|
154
|
-
],
|
|
161
|
+
], 16))
|
|
155
162
|
: vue.createCommentVNode("", true),
|
|
156
163
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.stars, (value) => {
|
|
157
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
164
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
158
165
|
key: value,
|
|
159
|
-
class:
|
|
166
|
+
class: ['p-rating-item', { 'p-rating-item-active': value <= $props.modelValue, 'p-focus': value === $data.focusedOptionIndex }],
|
|
160
167
|
onClick: $event => ($options.onOptionClick($event, value))
|
|
161
|
-
}, [
|
|
162
|
-
vue.createElementVNode("span",
|
|
163
|
-
vue.createElementVNode("input", {
|
|
168
|
+
}, $options.getPTOptions(value, 'item')), [
|
|
169
|
+
vue.createElementVNode("span", vue.mergeProps({ class: "p-hidden-accessible" }, _ctx.ptm('hiddenItemInputWrapper')), [
|
|
170
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
164
171
|
type: "radio",
|
|
165
172
|
value: value,
|
|
166
173
|
name: $data.name,
|
|
@@ -171,28 +178,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
178
|
onFocus: $event => ($options.onFocus($event, value)),
|
|
172
179
|
onBlur: _cache[4] || (_cache[4] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
173
180
|
onChange: $event => ($options.onChange($event, value))
|
|
174
|
-
}, null,
|
|
175
|
-
]),
|
|
181
|
+
}, _ctx.ptm('hiddenItemInput')), null, 16, _hoisted_3)
|
|
182
|
+
], 16),
|
|
176
183
|
(value <= $props.modelValue)
|
|
177
184
|
? vue.renderSlot(_ctx.$slots, "onicon", {
|
|
178
185
|
key: 0,
|
|
179
186
|
value: value
|
|
180
187
|
}, () => [
|
|
181
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.onIcon ? 'span' : 'StarFillIcon'), {
|
|
182
|
-
class:
|
|
183
|
-
}, null,
|
|
188
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.onIcon ? 'span' : 'StarFillIcon'), vue.mergeProps({
|
|
189
|
+
class: ['p-rating-icon', $props.onIcon]
|
|
190
|
+
}, _ctx.ptm('onIcon')), null, 16, ["class"]))
|
|
184
191
|
])
|
|
185
192
|
: vue.renderSlot(_ctx.$slots, "officon", {
|
|
186
193
|
key: 1,
|
|
187
194
|
value: value
|
|
188
195
|
}, () => [
|
|
189
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.
|
|
190
|
-
class:
|
|
191
|
-
}, null,
|
|
196
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.offIcon ? 'span' : 'StarIcon'), vue.mergeProps({
|
|
197
|
+
class: ['p-rating-icon', $props.offIcon]
|
|
198
|
+
}, _ctx.ptm('offIcon')), null, 16, ["class"]))
|
|
192
199
|
])
|
|
193
|
-
],
|
|
200
|
+
], 16, _hoisted_2))
|
|
194
201
|
}), 128))
|
|
195
|
-
],
|
|
202
|
+
], 16))
|
|
196
203
|
}
|
|
197
204
|
|
|
198
205
|
function styleInject(css, ref) {
|