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
package/slider/slider.esm.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import { DomHandler } from 'primevue/utils';
|
|
2
|
-
import { openBlock, createElementBlock,
|
|
3
|
+
import { openBlock, createElementBlock, mergeProps, createElementVNode, createCommentVNode } from 'vue';
|
|
3
4
|
|
|
4
5
|
var script = {
|
|
5
6
|
name: 'Slider',
|
|
7
|
+
extends: BaseComponent,
|
|
6
8
|
emits: ['update:modelValue', 'change', 'slideend'],
|
|
7
9
|
props: {
|
|
8
10
|
modelValue: [Number, Array],
|
|
@@ -309,19 +311,19 @@ const _hoisted_2 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax
|
|
|
309
311
|
const _hoisted_3 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "aria-labelledby", "aria-label", "aria-orientation"];
|
|
310
312
|
|
|
311
313
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
312
|
-
return (openBlock(), createElementBlock("div", {
|
|
313
|
-
class:
|
|
314
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
315
|
+
class: $options.containerClass,
|
|
314
316
|
onClick: _cache[15] || (_cache[15] = (...args) => ($options.onBarClick && $options.onBarClick(...args)))
|
|
315
|
-
}, [
|
|
316
|
-
createElementVNode("span", {
|
|
317
|
+
}, _ctx.ptm('root')), [
|
|
318
|
+
createElementVNode("span", mergeProps({
|
|
317
319
|
class: "p-slider-range",
|
|
318
|
-
style:
|
|
319
|
-
}, null,
|
|
320
|
+
style: $options.rangeStyle
|
|
321
|
+
}, _ctx.ptm('range')), null, 16),
|
|
320
322
|
(!$props.range)
|
|
321
|
-
? (openBlock(), createElementBlock("span", {
|
|
323
|
+
? (openBlock(), createElementBlock("span", mergeProps({
|
|
322
324
|
key: 0,
|
|
323
325
|
class: "p-slider-handle",
|
|
324
|
-
style:
|
|
326
|
+
style: $options.handleStyle,
|
|
325
327
|
onTouchstart: _cache[0] || (_cache[0] = $event => ($options.onDragStart($event))),
|
|
326
328
|
onTouchmove: _cache[1] || (_cache[1] = $event => ($options.onDrag($event))),
|
|
327
329
|
onTouchend: _cache[2] || (_cache[2] = $event => ($options.onDragEnd($event))),
|
|
@@ -335,13 +337,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
335
337
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
336
338
|
"aria-label": _ctx.ariaLabel,
|
|
337
339
|
"aria-orientation": $props.orientation
|
|
338
|
-
}, null,
|
|
340
|
+
}, _ctx.ptm('handle')), null, 16, _hoisted_1))
|
|
339
341
|
: createCommentVNode("", true),
|
|
340
342
|
($props.range)
|
|
341
|
-
? (openBlock(), createElementBlock("span", {
|
|
343
|
+
? (openBlock(), createElementBlock("span", mergeProps({
|
|
342
344
|
key: 1,
|
|
343
345
|
class: "p-slider-handle",
|
|
344
|
-
style:
|
|
346
|
+
style: $options.rangeStartHandleStyle,
|
|
345
347
|
onTouchstart: _cache[5] || (_cache[5] = $event => ($options.onDragStart($event, 0))),
|
|
346
348
|
onTouchmove: _cache[6] || (_cache[6] = $event => ($options.onDrag($event))),
|
|
347
349
|
onTouchend: _cache[7] || (_cache[7] = $event => ($options.onDragEnd($event))),
|
|
@@ -355,13 +357,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
355
357
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
356
358
|
"aria-label": _ctx.ariaLabel,
|
|
357
359
|
"aria-orientation": $props.orientation
|
|
358
|
-
}, null,
|
|
360
|
+
}, _ctx.ptm('startHandler')), null, 16, _hoisted_2))
|
|
359
361
|
: createCommentVNode("", true),
|
|
360
362
|
($props.range)
|
|
361
|
-
? (openBlock(), createElementBlock("span", {
|
|
363
|
+
? (openBlock(), createElementBlock("span", mergeProps({
|
|
362
364
|
key: 2,
|
|
363
365
|
class: "p-slider-handle",
|
|
364
|
-
style:
|
|
366
|
+
style: $options.rangeEndHandleStyle,
|
|
365
367
|
onTouchstart: _cache[10] || (_cache[10] = $event => ($options.onDragStart($event, 1))),
|
|
366
368
|
onTouchmove: _cache[11] || (_cache[11] = $event => ($options.onDrag($event))),
|
|
367
369
|
onTouchend: _cache[12] || (_cache[12] = $event => ($options.onDragEnd($event))),
|
|
@@ -375,9 +377,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
375
377
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
376
378
|
"aria-label": _ctx.ariaLabel,
|
|
377
379
|
"aria-orientation": $props.orientation
|
|
378
|
-
}, null,
|
|
380
|
+
}, _ctx.ptm('endHandler')), null, 16, _hoisted_3))
|
|
379
381
|
: createCommentVNode("", true)
|
|
380
|
-
],
|
|
382
|
+
], 16))
|
|
381
383
|
}
|
|
382
384
|
|
|
383
385
|
function styleInject(css, ref) {
|
package/slider/slider.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DomHandler as
|
|
1
|
+
import e from"primevue/basecomponent";import{DomHandler as t}from"primevue/utils";import{openBlock as i,createElementBlock as a,mergeProps as n,createElementVNode as l,createCommentVNode as s}from"vue";var r={name:"Slider",extends:e,emits:["update:modelValue","change","slideend"],props:{modelValue:[Number,Array],min:{type:Number,default:0},max:{type:Number,default:100},orientation:{type:String,default:"horizontal"},step:{type:Number,default:null},range:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount(){this.unbindDragListeners()},methods:{updateDomData(){let e=this.$el.getBoundingClientRect();this.initX=e.left+t.getWindowScrollLeft(),this.initY=e.top+t.getWindowScrollTop(),this.barWidth=this.$el.offsetWidth,this.barHeight=this.$el.offsetHeight},setValue(e){let t,i=e.touches?e.touches[0].pageX:e.pageX,a=e.touches?e.touches[0].pageY:e.pageY;t="horizontal"===this.orientation?100*(i-this.initX)/this.barWidth:100*(this.initY+this.barHeight-a)/this.barHeight;let n=(this.max-this.min)*(t/100)+this.min;if(this.step){const e=this.range?this.modelValue[this.handleIndex]:this.modelValue,t=n-e;t<0?n=e+Math.ceil(n/this.step-e/this.step)*this.step:t>0&&(n=e+Math.floor(n/this.step-e/this.step)*this.step)}else n=Math.floor(n);this.updateModel(e,n)},updateModel(e,t){let i,a=parseFloat(t.toFixed(10));this.range?(i=this.modelValue?[...this.modelValue]:[],0==this.handleIndex?(a<this.min?a=this.min:a>=this.max&&(a=this.max),i[0]=a):(a>this.max?a=this.max:a<=this.min&&(a=this.min),i[1]=a)):(a<this.min?a=this.min:a>this.max&&(a=this.max),i=a),this.$emit("update:modelValue",i),this.$emit("change",i)},onDragStart(e,i){this.disabled||(t.addClass(this.$el,"p-slider-sliding"),this.dragging=!0,this.updateDomData(),this.range&&this.modelValue[0]===this.max?this.handleIndex=0:this.handleIndex=i,e.currentTarget.focus(),e.preventDefault())},onDrag(e){this.dragging&&(this.setValue(e),e.preventDefault())},onDragEnd(e){this.dragging&&(this.dragging=!1,t.removeClass(this.$el,"p-slider-sliding"),this.$emit("slideend",{originalEvent:e,value:this.modelValue}))},onBarClick(e){this.disabled||t.hasClass(e.target,"p-slider-handle")||(this.updateDomData(),this.setValue(e))},onMouseDown(e,t){this.bindDragListeners(),this.onDragStart(e,t)},onKeyDown(e,t){switch(this.handleIndex=t,e.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(e,t),e.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(e,t),e.preventDefault();break;case"PageDown":this.decrementValue(e,t,!0),e.preventDefault();break;case"PageUp":this.incrementValue(e,t,!0),e.preventDefault();break;case"Home":this.updateModel(e,this.min),e.preventDefault();break;case"End":this.updateModel(e,this.max),e.preventDefault()}},decrementValue(e,t,i=!1){let a;a=this.range?this.step?this.modelValue[t]-this.step:this.modelValue[t]-1:this.step?this.modelValue-this.step:!this.step&&i?this.modelValue-10:this.modelValue-1,this.updateModel(e,a),e.preventDefault()},incrementValue(e,t,i=!1){let a;a=this.range?this.step?this.modelValue[t]+this.step:this.modelValue[t]+1:this.step?this.modelValue+this.step:!this.step&&i?this.modelValue+10:this.modelValue+1,this.updateModel(e,a),e.preventDefault()},bindDragListeners(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))},unbindDragListeners(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)}},computed:{containerClass(){return["p-slider p-component",{"p-disabled":this.disabled,"p-slider-horizontal":"horizontal"===this.orientation,"p-slider-vertical":"vertical"===this.orientation}]},horizontal(){return"horizontal"===this.orientation},vertical(){return"vertical"===this.orientation},rangeStyle(){if(this.range){const e=this.rangeEndPosition>this.rangeStartPosition?this.rangeEndPosition-this.rangeStartPosition:this.rangeStartPosition-this.rangeEndPosition,t=this.rangeEndPosition>this.rangeStartPosition?this.rangeStartPosition:this.rangeEndPosition;return this.horizontal?{left:t+"%",width:e+"%"}:{bottom:t+"%",height:e+"%"}}return this.horizontal?{width:this.handlePosition+"%"}:{height:this.handlePosition+"%"}},handleStyle(){return this.horizontal?{left:this.handlePosition+"%"}:{bottom:this.handlePosition+"%"}},handlePosition(){return this.modelValue<this.min?0:this.modelValue>this.max?100:100*(this.modelValue-this.min)/(this.max-this.min)},rangeStartPosition(){return this.modelValue&&this.modelValue[0]?100*(this.modelValue[0]<this.min?0:this.modelValue[0]-this.min)/(this.max-this.min):0},rangeEndPosition(){return this.modelValue&&2===this.modelValue.length?100*(this.modelValue[1]>this.max?100:this.modelValue[1]-this.min)/(this.max-this.min):100},rangeStartHandleStyle(){return this.horizontal?{left:this.rangeStartPosition+"%"}:{bottom:this.rangeStartPosition+"%"}},rangeEndHandleStyle(){return this.horizontal?{left:this.rangeEndPosition+"%"}:{bottom:this.rangeEndPosition+"%"}}}};const o=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],d=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],h=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"];!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-slider {\n position: relative;\n}\n.p-slider .p-slider-handle {\n position: absolute;\n cursor: grab;\n touch-action: none;\n display: block;\n}\n.p-slider-range {\n position: absolute;\n display: block;\n}\n.p-slider-horizontal .p-slider-range {\n top: 0;\n left: 0;\n height: 100%;\n}\n.p-slider-horizontal .p-slider-handle {\n top: 50%;\n}\n.p-slider-vertical {\n height: 100px;\n}\n.p-slider-vertical .p-slider-handle {\n left: 50%;\n}\n.p-slider-vertical .p-slider-range {\n bottom: 0;\n left: 0;\n width: 100%;\n}\n"),r.render=function(e,t,r,u,m,g){return i(),a("div",n({class:g.containerClass,onClick:t[15]||(t[15]=(...e)=>g.onBarClick&&g.onBarClick(...e))},e.ptm("root")),[l("span",n({class:"p-slider-range",style:g.rangeStyle},e.ptm("range")),null,16),r.range?s("",!0):(i(),a("span",n({key:0,class:"p-slider-handle",style:g.handleStyle,onTouchstart:t[0]||(t[0]=e=>g.onDragStart(e)),onTouchmove:t[1]||(t[1]=e=>g.onDrag(e)),onTouchend:t[2]||(t[2]=e=>g.onDragEnd(e)),onMousedown:t[3]||(t[3]=e=>g.onMouseDown(e)),onKeydown:t[4]||(t[4]=e=>g.onKeyDown(e)),tabindex:r.tabindex,role:"slider","aria-valuemin":r.min,"aria-valuenow":r.modelValue,"aria-valuemax":r.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":r.orientation},e.ptm("handle")),null,16,o)),r.range?(i(),a("span",n({key:1,class:"p-slider-handle",style:g.rangeStartHandleStyle,onTouchstart:t[5]||(t[5]=e=>g.onDragStart(e,0)),onTouchmove:t[6]||(t[6]=e=>g.onDrag(e)),onTouchend:t[7]||(t[7]=e=>g.onDragEnd(e)),onMousedown:t[8]||(t[8]=e=>g.onMouseDown(e,0)),onKeydown:t[9]||(t[9]=e=>g.onKeyDown(e,0)),tabindex:r.tabindex,role:"slider","aria-valuemin":r.min,"aria-valuenow":r.modelValue?r.modelValue[0]:null,"aria-valuemax":r.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":r.orientation},e.ptm("startHandler")),null,16,d)):s("",!0),r.range?(i(),a("span",n({key:2,class:"p-slider-handle",style:g.rangeEndHandleStyle,onTouchstart:t[10]||(t[10]=e=>g.onDragStart(e,1)),onTouchmove:t[11]||(t[11]=e=>g.onDrag(e)),onTouchend:t[12]||(t[12]=e=>g.onDragEnd(e)),onMousedown:t[13]||(t[13]=e=>g.onMouseDown(e,1)),onKeydown:t[14]||(t[14]=e=>g.onKeyDown(e,1)),tabindex:r.tabindex,role:"slider","aria-valuemin":r.min,"aria-valuenow":r.modelValue?r.modelValue[1]:null,"aria-valuemax":r.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":r.orientation},e.ptm("endHandler")),null,16,h)):s("",!0)],16)};export{r as default};
|
package/slider/slider.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.slider = (function (utils, vue) {
|
|
2
|
+
this.primevue.slider = (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: 'Slider',
|
|
11
|
+
extends: BaseComponent__default["default"],
|
|
7
12
|
emits: ['update:modelValue', 'change', 'slideend'],
|
|
8
13
|
props: {
|
|
9
14
|
modelValue: [Number, Array],
|
|
@@ -310,19 +315,19 @@ this.primevue.slider = (function (utils, vue) {
|
|
|
310
315
|
const _hoisted_3 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "aria-labelledby", "aria-label", "aria-orientation"];
|
|
311
316
|
|
|
312
317
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
313
|
-
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
314
|
-
class:
|
|
318
|
+
return (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
319
|
+
class: $options.containerClass,
|
|
315
320
|
onClick: _cache[15] || (_cache[15] = (...args) => ($options.onBarClick && $options.onBarClick(...args)))
|
|
316
|
-
}, [
|
|
317
|
-
vue.createElementVNode("span", {
|
|
321
|
+
}, _ctx.ptm('root')), [
|
|
322
|
+
vue.createElementVNode("span", vue.mergeProps({
|
|
318
323
|
class: "p-slider-range",
|
|
319
|
-
style:
|
|
320
|
-
}, null,
|
|
324
|
+
style: $options.rangeStyle
|
|
325
|
+
}, _ctx.ptm('range')), null, 16),
|
|
321
326
|
(!$props.range)
|
|
322
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
327
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
323
328
|
key: 0,
|
|
324
329
|
class: "p-slider-handle",
|
|
325
|
-
style:
|
|
330
|
+
style: $options.handleStyle,
|
|
326
331
|
onTouchstart: _cache[0] || (_cache[0] = $event => ($options.onDragStart($event))),
|
|
327
332
|
onTouchmove: _cache[1] || (_cache[1] = $event => ($options.onDrag($event))),
|
|
328
333
|
onTouchend: _cache[2] || (_cache[2] = $event => ($options.onDragEnd($event))),
|
|
@@ -336,13 +341,13 @@ this.primevue.slider = (function (utils, vue) {
|
|
|
336
341
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
337
342
|
"aria-label": _ctx.ariaLabel,
|
|
338
343
|
"aria-orientation": $props.orientation
|
|
339
|
-
}, null,
|
|
344
|
+
}, _ctx.ptm('handle')), null, 16, _hoisted_1))
|
|
340
345
|
: vue.createCommentVNode("", true),
|
|
341
346
|
($props.range)
|
|
342
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
347
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
343
348
|
key: 1,
|
|
344
349
|
class: "p-slider-handle",
|
|
345
|
-
style:
|
|
350
|
+
style: $options.rangeStartHandleStyle,
|
|
346
351
|
onTouchstart: _cache[5] || (_cache[5] = $event => ($options.onDragStart($event, 0))),
|
|
347
352
|
onTouchmove: _cache[6] || (_cache[6] = $event => ($options.onDrag($event))),
|
|
348
353
|
onTouchend: _cache[7] || (_cache[7] = $event => ($options.onDragEnd($event))),
|
|
@@ -356,13 +361,13 @@ this.primevue.slider = (function (utils, vue) {
|
|
|
356
361
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
357
362
|
"aria-label": _ctx.ariaLabel,
|
|
358
363
|
"aria-orientation": $props.orientation
|
|
359
|
-
}, null,
|
|
364
|
+
}, _ctx.ptm('startHandler')), null, 16, _hoisted_2))
|
|
360
365
|
: vue.createCommentVNode("", true),
|
|
361
366
|
($props.range)
|
|
362
|
-
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
367
|
+
? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
363
368
|
key: 2,
|
|
364
369
|
class: "p-slider-handle",
|
|
365
|
-
style:
|
|
370
|
+
style: $options.rangeEndHandleStyle,
|
|
366
371
|
onTouchstart: _cache[10] || (_cache[10] = $event => ($options.onDragStart($event, 1))),
|
|
367
372
|
onTouchmove: _cache[11] || (_cache[11] = $event => ($options.onDrag($event))),
|
|
368
373
|
onTouchend: _cache[12] || (_cache[12] = $event => ($options.onDragEnd($event))),
|
|
@@ -376,9 +381,9 @@ this.primevue.slider = (function (utils, vue) {
|
|
|
376
381
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
377
382
|
"aria-label": _ctx.ariaLabel,
|
|
378
383
|
"aria-orientation": $props.orientation
|
|
379
|
-
}, null,
|
|
384
|
+
}, _ctx.ptm('endHandler')), null, 16, _hoisted_3))
|
|
380
385
|
: vue.createCommentVNode("", true)
|
|
381
|
-
],
|
|
386
|
+
], 16))
|
|
382
387
|
}
|
|
383
388
|
|
|
384
389
|
function styleInject(css, ref) {
|
|
@@ -415,4 +420,4 @@ this.primevue.slider = (function (utils, vue) {
|
|
|
415
420
|
|
|
416
421
|
return script;
|
|
417
422
|
|
|
418
|
-
})(primevue.utils, Vue);
|
|
423
|
+
})(primevue.basecomponent, primevue.utils, Vue);
|
package/slider/slider.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.slider=function(e,t){"use strict";var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.slider=function(e,t,i){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"Slider",extends:a(e).default,emits:["update:modelValue","change","slideend"],props:{modelValue:[Number,Array],min:{type:Number,default:0},max:{type:Number,default:100},orientation:{type:String,default:"horizontal"},step:{type:Number,default:null},range:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount(){this.unbindDragListeners()},methods:{updateDomData(){let e=this.$el.getBoundingClientRect();this.initX=e.left+t.DomHandler.getWindowScrollLeft(),this.initY=e.top+t.DomHandler.getWindowScrollTop(),this.barWidth=this.$el.offsetWidth,this.barHeight=this.$el.offsetHeight},setValue(e){let t,i=e.touches?e.touches[0].pageX:e.pageX,a=e.touches?e.touches[0].pageY:e.pageY;t="horizontal"===this.orientation?100*(i-this.initX)/this.barWidth:100*(this.initY+this.barHeight-a)/this.barHeight;let n=(this.max-this.min)*(t/100)+this.min;if(this.step){const e=this.range?this.modelValue[this.handleIndex]:this.modelValue,t=n-e;t<0?n=e+Math.ceil(n/this.step-e/this.step)*this.step:t>0&&(n=e+Math.floor(n/this.step-e/this.step)*this.step)}else n=Math.floor(n);this.updateModel(e,n)},updateModel(e,t){let i,a=parseFloat(t.toFixed(10));this.range?(i=this.modelValue?[...this.modelValue]:[],0==this.handleIndex?(a<this.min?a=this.min:a>=this.max&&(a=this.max),i[0]=a):(a>this.max?a=this.max:a<=this.min&&(a=this.min),i[1]=a)):(a<this.min?a=this.min:a>this.max&&(a=this.max),i=a),this.$emit("update:modelValue",i),this.$emit("change",i)},onDragStart(e,i){this.disabled||(t.DomHandler.addClass(this.$el,"p-slider-sliding"),this.dragging=!0,this.updateDomData(),this.range&&this.modelValue[0]===this.max?this.handleIndex=0:this.handleIndex=i,e.currentTarget.focus(),e.preventDefault())},onDrag(e){this.dragging&&(this.setValue(e),e.preventDefault())},onDragEnd(e){this.dragging&&(this.dragging=!1,t.DomHandler.removeClass(this.$el,"p-slider-sliding"),this.$emit("slideend",{originalEvent:e,value:this.modelValue}))},onBarClick(e){this.disabled||t.DomHandler.hasClass(e.target,"p-slider-handle")||(this.updateDomData(),this.setValue(e))},onMouseDown(e,t){this.bindDragListeners(),this.onDragStart(e,t)},onKeyDown(e,t){switch(this.handleIndex=t,e.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(e,t),e.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(e,t),e.preventDefault();break;case"PageDown":this.decrementValue(e,t,!0),e.preventDefault();break;case"PageUp":this.incrementValue(e,t,!0),e.preventDefault();break;case"Home":this.updateModel(e,this.min),e.preventDefault();break;case"End":this.updateModel(e,this.max),e.preventDefault()}},decrementValue(e,t,i=!1){let a;a=this.range?this.step?this.modelValue[t]-this.step:this.modelValue[t]-1:this.step?this.modelValue-this.step:!this.step&&i?this.modelValue-10:this.modelValue-1,this.updateModel(e,a),e.preventDefault()},incrementValue(e,t,i=!1){let a;a=this.range?this.step?this.modelValue[t]+this.step:this.modelValue[t]+1:this.step?this.modelValue+this.step:!this.step&&i?this.modelValue+10:this.modelValue+1,this.updateModel(e,a),e.preventDefault()},bindDragListeners(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener("mousemove",this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener("mouseup",this.dragEndListener))},unbindDragListeners(){this.dragListener&&(document.removeEventListener("mousemove",this.dragListener),this.dragListener=null),this.dragEndListener&&(document.removeEventListener("mouseup",this.dragEndListener),this.dragEndListener=null)}},computed:{containerClass(){return["p-slider p-component",{"p-disabled":this.disabled,"p-slider-horizontal":"horizontal"===this.orientation,"p-slider-vertical":"vertical"===this.orientation}]},horizontal(){return"horizontal"===this.orientation},vertical(){return"vertical"===this.orientation},rangeStyle(){if(this.range){const e=this.rangeEndPosition>this.rangeStartPosition?this.rangeEndPosition-this.rangeStartPosition:this.rangeStartPosition-this.rangeEndPosition,t=this.rangeEndPosition>this.rangeStartPosition?this.rangeStartPosition:this.rangeEndPosition;return this.horizontal?{left:t+"%",width:e+"%"}:{bottom:t+"%",height:e+"%"}}return this.horizontal?{width:this.handlePosition+"%"}:{height:this.handlePosition+"%"}},handleStyle(){return this.horizontal?{left:this.handlePosition+"%"}:{bottom:this.handlePosition+"%"}},handlePosition(){return this.modelValue<this.min?0:this.modelValue>this.max?100:100*(this.modelValue-this.min)/(this.max-this.min)},rangeStartPosition(){return this.modelValue&&this.modelValue[0]?100*(this.modelValue[0]<this.min?0:this.modelValue[0]-this.min)/(this.max-this.min):0},rangeEndPosition(){return this.modelValue&&2===this.modelValue.length?100*(this.modelValue[1]>this.max?100:this.modelValue[1]-this.min)/(this.max-this.min):100},rangeStartHandleStyle(){return this.horizontal?{left:this.rangeStartPosition+"%"}:{bottom:this.rangeStartPosition+"%"}},rangeEndHandleStyle(){return this.horizontal?{left:this.rangeEndPosition+"%"}:{bottom:this.rangeEndPosition+"%"}}}};const l=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],s=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"],r=["tabindex","aria-valuemin","aria-valuenow","aria-valuemax","aria-labelledby","aria-label","aria-orientation"];return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-slider {\n position: relative;\n}\n.p-slider .p-slider-handle {\n position: absolute;\n cursor: grab;\n touch-action: none;\n display: block;\n}\n.p-slider-range {\n position: absolute;\n display: block;\n}\n.p-slider-horizontal .p-slider-range {\n top: 0;\n left: 0;\n height: 100%;\n}\n.p-slider-horizontal .p-slider-handle {\n top: 50%;\n}\n.p-slider-vertical {\n height: 100px;\n}\n.p-slider-vertical .p-slider-handle {\n left: 50%;\n}\n.p-slider-vertical .p-slider-range {\n bottom: 0;\n left: 0;\n width: 100%;\n}\n"),n.render=function(e,t,a,n,o,d){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:d.containerClass,onClick:t[15]||(t[15]=(...e)=>d.onBarClick&&d.onBarClick(...e))},e.ptm("root")),[i.createElementVNode("span",i.mergeProps({class:"p-slider-range",style:d.rangeStyle},e.ptm("range")),null,16),a.range?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:0,class:"p-slider-handle",style:d.handleStyle,onTouchstart:t[0]||(t[0]=e=>d.onDragStart(e)),onTouchmove:t[1]||(t[1]=e=>d.onDrag(e)),onTouchend:t[2]||(t[2]=e=>d.onDragEnd(e)),onMousedown:t[3]||(t[3]=e=>d.onMouseDown(e)),onKeydown:t[4]||(t[4]=e=>d.onKeyDown(e)),tabindex:a.tabindex,role:"slider","aria-valuemin":a.min,"aria-valuenow":a.modelValue,"aria-valuemax":a.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":a.orientation},e.ptm("handle")),null,16,l)),a.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:1,class:"p-slider-handle",style:d.rangeStartHandleStyle,onTouchstart:t[5]||(t[5]=e=>d.onDragStart(e,0)),onTouchmove:t[6]||(t[6]=e=>d.onDrag(e)),onTouchend:t[7]||(t[7]=e=>d.onDragEnd(e)),onMousedown:t[8]||(t[8]=e=>d.onMouseDown(e,0)),onKeydown:t[9]||(t[9]=e=>d.onKeyDown(e,0)),tabindex:a.tabindex,role:"slider","aria-valuemin":a.min,"aria-valuenow":a.modelValue?a.modelValue[0]:null,"aria-valuemax":a.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":a.orientation},e.ptm("startHandler")),null,16,s)):i.createCommentVNode("",!0),a.range?(i.openBlock(),i.createElementBlock("span",i.mergeProps({key:2,class:"p-slider-handle",style:d.rangeEndHandleStyle,onTouchstart:t[10]||(t[10]=e=>d.onDragStart(e,1)),onTouchmove:t[11]||(t[11]=e=>d.onDrag(e)),onTouchend:t[12]||(t[12]=e=>d.onDragEnd(e)),onMousedown:t[13]||(t[13]=e=>d.onMouseDown(e,1)),onKeydown:t[14]||(t[14]=e=>d.onKeyDown(e,1)),tabindex:a.tabindex,role:"slider","aria-valuemin":a.min,"aria-valuenow":a.modelValue?a.modelValue[1]:null,"aria-valuemax":a.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":a.orientation},e.ptm("endHandler")),null,16,r)):i.createCommentVNode("",!0)],16)},n}(primevue.basecomponent,primevue.utils,Vue);
|
|
@@ -36,10 +36,6 @@ export interface SplitButtonPassThroughOptions {
|
|
|
36
36
|
* Uses to pass attributes to the button's DOM element.
|
|
37
37
|
*/
|
|
38
38
|
button?: SplitButtonPassThroughOptionType;
|
|
39
|
-
/**
|
|
40
|
-
* Uses to pass attributes to the icon's DOM element.
|
|
41
|
-
*/
|
|
42
|
-
icon?: SplitButtonPassThroughOptionType;
|
|
43
39
|
/**
|
|
44
40
|
* Uses to pass attributes to the Button component.
|
|
45
41
|
* @see {@link ButtonPassThroughOptions}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="containerClass" :style="style" v-bind="ptm('root')">
|
|
3
3
|
<slot>
|
|
4
|
-
<PVSButton type="button" class="p-splitbutton-defaultbutton" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick"
|
|
4
|
+
<PVSButton type="button" class="p-splitbutton-defaultbutton" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" :pt="ptm('button')" v-bind="buttonProps">
|
|
5
5
|
<template #icon="slotProps">
|
|
6
6
|
<slot name="icon">
|
|
7
|
-
<span :class="[icon, slotProps.class]" v-bind="ptm('icon'
|
|
7
|
+
<span :class="[icon, slotProps.class]" v-bind="ptm('button')['icon']" />
|
|
8
8
|
</slot>
|
|
9
9
|
</template>
|
|
10
10
|
</PVSButton>
|
|
@@ -162,17 +162,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
162
162
|
label: $props.label,
|
|
163
163
|
disabled: $props.disabled,
|
|
164
164
|
"aria-label": $props.label,
|
|
165
|
-
onClick: $options.onDefaultButtonClick
|
|
166
|
-
|
|
165
|
+
onClick: $options.onDefaultButtonClick,
|
|
166
|
+
pt: _ctx.ptm('button')
|
|
167
|
+
}, $props.buttonProps), {
|
|
167
168
|
icon: vue.withCtx((slotProps) => [
|
|
168
169
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
169
170
|
vue.createElementVNode("span", vue.mergeProps({
|
|
170
171
|
class: [$props.icon, slotProps.class]
|
|
171
|
-
}, _ctx.ptm('icon')
|
|
172
|
+
}, _ctx.ptm('button')['icon']), null, 16)
|
|
172
173
|
])
|
|
173
174
|
]),
|
|
174
175
|
_: 3
|
|
175
|
-
}, 16, ["label", "disabled", "aria-label", "onClick"])
|
|
176
|
+
}, 16, ["label", "disabled", "aria-label", "onClick", "pt"])
|
|
176
177
|
]),
|
|
177
178
|
vue.createVNode(_component_PVSButton, vue.mergeProps({
|
|
178
179
|
ref: "button",
|
|
@@ -235,10 +236,10 @@ function styleInject(css, ref) {
|
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
238
|
|
|
238
|
-
var css_248z = "\n.p-splitbutton[data-v-
|
|
239
|
+
var css_248z = "\n.p-splitbutton[data-v-29147f7b] {\n display: inline-flex;\n position: relative;\n}\n.p-splitbutton .p-splitbutton-defaultbutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b] {\n flex: 1 1 auto;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n.p-splitbutton-menubutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button[data-v-29147f7b] {\n display: flex;\n align-items: center;\n justify-content: center;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-splitbutton .p-menu[data-v-29147f7b] {\n min-width: 100%;\n}\n.p-fluid .p-splitbutton[data-v-29147f7b] {\n display: flex;\n}\n";
|
|
239
240
|
styleInject(css_248z);
|
|
240
241
|
|
|
241
242
|
script.render = render;
|
|
242
|
-
script.__scopeId = "data-v-
|
|
243
|
+
script.__scopeId = "data-v-29147f7b";
|
|
243
244
|
|
|
244
245
|
module.exports = script;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("primevue/basecomponent"),e=require("primevue/button"),n=require("primevue/icons/chevrondown"),o=require("primevue/tieredmenu"),l=require("primevue/utils"),u=require("vue");function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=a(t),i=a(e),p=a(n),r=a(o),s={name:"SplitButton",extends:d.default,emits:["click"],props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},buttonProps:{type:null,default:null},menuButtonProps:{type:null,default:null},menuButtonIcon:{type:String,default:void 0},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},data:()=>({isExpanded:!1}),methods:{onDropdownButtonClick(){this.$refs.menu.toggle({currentTarget:this.$el,relatedTarget:this.$refs.button.$el}),this.isExpanded=!this.$refs.menu.visible},onDropdownKeydown(t){"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(this.onDropdownButtonClick(),t.preventDefault())},onDefaultButtonClick(t){this.isExpanded&&this.$refs.menu.hide(t),this.$emit("click",t)}},computed:{ariaId:()=>l.UniqueComponentId(),containerClass(){return["p-splitbutton p-component",this.class,{[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":"small"===this.size,"p-button-lg":"large"===this.size}]}},components:{PVSButton:i.default,PVSMenu:r.default,ChevronDownIcon:p.default}};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&o.firstChild?o.insertBefore(l,o.firstChild):o.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}("\n.p-splitbutton[data-v-
|
|
1
|
+
"use strict";var t=require("primevue/basecomponent"),e=require("primevue/button"),n=require("primevue/icons/chevrondown"),o=require("primevue/tieredmenu"),l=require("primevue/utils"),u=require("vue");function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=a(t),i=a(e),p=a(n),r=a(o),s={name:"SplitButton",extends:d.default,emits:["click"],props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},buttonProps:{type:null,default:null},menuButtonProps:{type:null,default:null},menuButtonIcon:{type:String,default:void 0},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},data:()=>({isExpanded:!1}),methods:{onDropdownButtonClick(){this.$refs.menu.toggle({currentTarget:this.$el,relatedTarget:this.$refs.button.$el}),this.isExpanded=!this.$refs.menu.visible},onDropdownKeydown(t){"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(this.onDropdownButtonClick(),t.preventDefault())},onDefaultButtonClick(t){this.isExpanded&&this.$refs.menu.hide(t),this.$emit("click",t)}},computed:{ariaId:()=>l.UniqueComponentId(),containerClass(){return["p-splitbutton p-component",this.class,{[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":"small"===this.size,"p-button-lg":"large"===this.size}]}},components:{PVSButton:i.default,PVSMenu:r.default,ChevronDownIcon:p.default}};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&o.firstChild?o.insertBefore(l,o.firstChild):o.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}("\n.p-splitbutton[data-v-29147f7b] {\n display: inline-flex;\n position: relative;\n}\n.p-splitbutton .p-splitbutton-defaultbutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b] {\n flex: 1 1 auto;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n.p-splitbutton-menubutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button[data-v-29147f7b] {\n display: flex;\n align-items: center;\n justify-content: center;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-splitbutton .p-menu[data-v-29147f7b] {\n min-width: 100%;\n}\n.p-fluid .p-splitbutton[data-v-29147f7b] {\n display: flex;\n}\n"),s.render=function(t,e,n,o,l,a){const d=u.resolveComponent("PVSButton"),i=u.resolveComponent("PVSMenu");return u.openBlock(),u.createElementBlock("div",u.mergeProps({class:a.containerClass,style:n.style},t.ptm("root")),[u.renderSlot(t.$slots,"default",{},(()=>[u.createVNode(d,u.mergeProps({type:"button",class:"p-splitbutton-defaultbutton",label:n.label,disabled:n.disabled,"aria-label":n.label,onClick:a.onDefaultButtonClick,pt:t.ptm("button")},n.buttonProps),{icon:u.withCtx((e=>[u.renderSlot(t.$slots,"icon",{},(()=>[u.createElementVNode("span",u.mergeProps({class:[n.icon,e.class]},t.ptm("button").icon),null,16)]))])),_:3},16,["label","disabled","aria-label","onClick","pt"])])),u.createVNode(d,u.mergeProps({ref:"button",type:"button",class:"p-splitbutton-menubutton",disabled:n.disabled,"aria-haspopup":"true","aria-expanded":l.isExpanded,"aria-controls":a.ariaId+"_overlay",onClick:a.onDropdownButtonClick,onKeydown:a.onDropdownKeydown,pt:t.ptm("menuButton")},n.menuButtonProps),{icon:u.withCtx((e=>[u.renderSlot(t.$slots,"menubuttonicon",{},(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(n.menuButtonIcon?"span":"ChevronDownIcon"),u.mergeProps({class:[n.menuButtonIcon,e.class]},t.ptm("menuButton").icon),null,16,["class"]))]))])),_:3},16,["disabled","aria-expanded","aria-controls","onClick","onKeydown","pt"]),u.createVNode(i,{ref:"menu",id:a.ariaId+"_overlay",model:n.model,popup:!0,autoZIndex:n.autoZIndex,baseZIndex:n.baseZIndex,appendTo:n.appendTo,pt:t.ptm("menu")},null,8,["id","model","autoZIndex","baseZIndex","appendTo","pt"])],16)},s.__scopeId="data-v-29147f7b",module.exports=s;
|
|
@@ -153,17 +153,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
153
153
|
label: $props.label,
|
|
154
154
|
disabled: $props.disabled,
|
|
155
155
|
"aria-label": $props.label,
|
|
156
|
-
onClick: $options.onDefaultButtonClick
|
|
157
|
-
|
|
156
|
+
onClick: $options.onDefaultButtonClick,
|
|
157
|
+
pt: _ctx.ptm('button')
|
|
158
|
+
}, $props.buttonProps), {
|
|
158
159
|
icon: withCtx((slotProps) => [
|
|
159
160
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
160
161
|
createElementVNode("span", mergeProps({
|
|
161
162
|
class: [$props.icon, slotProps.class]
|
|
162
|
-
}, _ctx.ptm('icon')
|
|
163
|
+
}, _ctx.ptm('button')['icon']), null, 16)
|
|
163
164
|
])
|
|
164
165
|
]),
|
|
165
166
|
_: 3
|
|
166
|
-
}, 16, ["label", "disabled", "aria-label", "onClick"])
|
|
167
|
+
}, 16, ["label", "disabled", "aria-label", "onClick", "pt"])
|
|
167
168
|
]),
|
|
168
169
|
createVNode(_component_PVSButton, mergeProps({
|
|
169
170
|
ref: "button",
|
|
@@ -226,10 +227,10 @@ function styleInject(css, ref) {
|
|
|
226
227
|
}
|
|
227
228
|
}
|
|
228
229
|
|
|
229
|
-
var css_248z = "\n.p-splitbutton[data-v-
|
|
230
|
+
var css_248z = "\n.p-splitbutton[data-v-29147f7b] {\n display: inline-flex;\n position: relative;\n}\n.p-splitbutton .p-splitbutton-defaultbutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b] {\n flex: 1 1 auto;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n.p-splitbutton-menubutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button[data-v-29147f7b] {\n display: flex;\n align-items: center;\n justify-content: center;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-splitbutton .p-menu[data-v-29147f7b] {\n min-width: 100%;\n}\n.p-fluid .p-splitbutton[data-v-29147f7b] {\n display: flex;\n}\n";
|
|
230
231
|
styleInject(css_248z);
|
|
231
232
|
|
|
232
233
|
script.render = render;
|
|
233
|
-
script.__scopeId = "data-v-
|
|
234
|
+
script.__scopeId = "data-v-29147f7b";
|
|
234
235
|
|
|
235
236
|
export { script as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/basecomponent";import e from"primevue/button";import n from"primevue/icons/chevrondown";import o from"primevue/tieredmenu";import{UniqueComponentId as l}from"primevue/utils";import{resolveComponent as u,openBlock as a,createElementBlock as
|
|
1
|
+
import t from"primevue/basecomponent";import e from"primevue/button";import n from"primevue/icons/chevrondown";import o from"primevue/tieredmenu";import{UniqueComponentId as l}from"primevue/utils";import{resolveComponent as u,openBlock as a,createElementBlock as i,mergeProps as d,renderSlot as p,createVNode as s,withCtx as r,createElementVNode as b,createBlock as m,resolveDynamicComponent as f}from"vue";var c={name:"SplitButton",extends:t,emits:["click"],props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},buttonProps:{type:null,default:null},menuButtonProps:{type:null,default:null},menuButtonIcon:{type:String,default:void 0},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},data:()=>({isExpanded:!1}),methods:{onDropdownButtonClick(){this.$refs.menu.toggle({currentTarget:this.$el,relatedTarget:this.$refs.button.$el}),this.isExpanded=!this.$refs.menu.visible},onDropdownKeydown(t){"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(this.onDropdownButtonClick(),t.preventDefault())},onDefaultButtonClick(t){this.isExpanded&&this.$refs.menu.hide(t),this.$emit("click",t)}},computed:{ariaId:()=>l(),containerClass(){return["p-splitbutton p-component",this.class,{[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":"small"===this.size,"p-button-lg":"large"===this.size}]}},components:{PVSButton:e,PVSMenu:o,ChevronDownIcon:n}};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&o.firstChild?o.insertBefore(l,o.firstChild):o.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}("\n.p-splitbutton[data-v-29147f7b] {\n display: inline-flex;\n position: relative;\n}\n.p-splitbutton .p-splitbutton-defaultbutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b] {\n flex: 1 1 auto;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n.p-splitbutton-menubutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button[data-v-29147f7b] {\n display: flex;\n align-items: center;\n justify-content: center;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-splitbutton .p-menu[data-v-29147f7b] {\n min-width: 100%;\n}\n.p-fluid .p-splitbutton[data-v-29147f7b] {\n display: flex;\n}\n"),c.render=function(t,e,n,o,l,c){const y=u("PVSButton"),h=u("PVSMenu");return a(),i("div",d({class:c.containerClass,style:n.style},t.ptm("root")),[p(t.$slots,"default",{},(()=>[s(y,d({type:"button",class:"p-splitbutton-defaultbutton",label:n.label,disabled:n.disabled,"aria-label":n.label,onClick:c.onDefaultButtonClick,pt:t.ptm("button")},n.buttonProps),{icon:r((e=>[p(t.$slots,"icon",{},(()=>[b("span",d({class:[n.icon,e.class]},t.ptm("button").icon),null,16)]))])),_:3},16,["label","disabled","aria-label","onClick","pt"])])),s(y,d({ref:"button",type:"button",class:"p-splitbutton-menubutton",disabled:n.disabled,"aria-haspopup":"true","aria-expanded":l.isExpanded,"aria-controls":c.ariaId+"_overlay",onClick:c.onDropdownButtonClick,onKeydown:c.onDropdownKeydown,pt:t.ptm("menuButton")},n.menuButtonProps),{icon:r((e=>[p(t.$slots,"menubuttonicon",{},(()=>[(a(),m(f(n.menuButtonIcon?"span":"ChevronDownIcon"),d({class:[n.menuButtonIcon,e.class]},t.ptm("menuButton").icon),null,16,["class"]))]))])),_:3},16,["disabled","aria-expanded","aria-controls","onClick","onKeydown","pt"]),s(h,{ref:"menu",id:c.ariaId+"_overlay",model:n.model,popup:!0,autoZIndex:n.autoZIndex,baseZIndex:n.baseZIndex,appendTo:n.appendTo,pt:t.ptm("menu")},null,8,["id","model","autoZIndex","baseZIndex","appendTo","pt"])],16)},c.__scopeId="data-v-29147f7b";export{c as default};
|
|
@@ -157,17 +157,18 @@ this.primevue.splitbutton = (function (BaseComponent, Button, ChevronDownIcon, T
|
|
|
157
157
|
label: $props.label,
|
|
158
158
|
disabled: $props.disabled,
|
|
159
159
|
"aria-label": $props.label,
|
|
160
|
-
onClick: $options.onDefaultButtonClick
|
|
161
|
-
|
|
160
|
+
onClick: $options.onDefaultButtonClick,
|
|
161
|
+
pt: _ctx.ptm('button')
|
|
162
|
+
}, $props.buttonProps), {
|
|
162
163
|
icon: vue.withCtx((slotProps) => [
|
|
163
164
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
164
165
|
vue.createElementVNode("span", vue.mergeProps({
|
|
165
166
|
class: [$props.icon, slotProps.class]
|
|
166
|
-
}, _ctx.ptm('icon')
|
|
167
|
+
}, _ctx.ptm('button')['icon']), null, 16)
|
|
167
168
|
])
|
|
168
169
|
]),
|
|
169
170
|
_: 3
|
|
170
|
-
}, 16, ["label", "disabled", "aria-label", "onClick"])
|
|
171
|
+
}, 16, ["label", "disabled", "aria-label", "onClick", "pt"])
|
|
171
172
|
]),
|
|
172
173
|
vue.createVNode(_component_PVSButton, vue.mergeProps({
|
|
173
174
|
ref: "button",
|
|
@@ -230,11 +231,11 @@ this.primevue.splitbutton = (function (BaseComponent, Button, ChevronDownIcon, T
|
|
|
230
231
|
}
|
|
231
232
|
}
|
|
232
233
|
|
|
233
|
-
var css_248z = "\n.p-splitbutton[data-v-
|
|
234
|
+
var css_248z = "\n.p-splitbutton[data-v-29147f7b] {\n display: inline-flex;\n position: relative;\n}\n.p-splitbutton .p-splitbutton-defaultbutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b] {\n flex: 1 1 auto;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n.p-splitbutton-menubutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button[data-v-29147f7b] {\n display: flex;\n align-items: center;\n justify-content: center;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-splitbutton .p-menu[data-v-29147f7b] {\n min-width: 100%;\n}\n.p-fluid .p-splitbutton[data-v-29147f7b] {\n display: flex;\n}\n";
|
|
234
235
|
styleInject(css_248z);
|
|
235
236
|
|
|
236
237
|
script.render = render;
|
|
237
|
-
script.__scopeId = "data-v-
|
|
238
|
+
script.__scopeId = "data-v-29147f7b";
|
|
238
239
|
|
|
239
240
|
return script;
|
|
240
241
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.splitbutton=function(t,e,n,o,l,u){"use strict";function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=a(t),i=a(e),p=a(n),s=a(o),r={name:"SplitButton",extends:d.default,emits:["click"],props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},buttonProps:{type:null,default:null},menuButtonProps:{type:null,default:null},menuButtonIcon:{type:String,default:void 0},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},data:()=>({isExpanded:!1}),methods:{onDropdownButtonClick(){this.$refs.menu.toggle({currentTarget:this.$el,relatedTarget:this.$refs.button.$el}),this.isExpanded=!this.$refs.menu.visible},onDropdownKeydown(t){"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(this.onDropdownButtonClick(),t.preventDefault())},onDefaultButtonClick(t){this.isExpanded&&this.$refs.menu.hide(t),this.$emit("click",t)}},computed:{ariaId:()=>l.UniqueComponentId(),containerClass(){return["p-splitbutton p-component",this.class,{[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":"small"===this.size,"p-button-lg":"large"===this.size}]}},components:{PVSButton:i.default,PVSMenu:s.default,ChevronDownIcon:p.default}};return function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&o.firstChild?o.insertBefore(l,o.firstChild):o.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}("\n.p-splitbutton[data-v-
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.splitbutton=function(t,e,n,o,l,u){"use strict";function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=a(t),i=a(e),p=a(n),s=a(o),r={name:"SplitButton",extends:d.default,emits:["click"],props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:String,default:"body"},disabled:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},buttonProps:{type:null,default:null},menuButtonProps:{type:null,default:null},menuButtonIcon:{type:String,default:void 0},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},data:()=>({isExpanded:!1}),methods:{onDropdownButtonClick(){this.$refs.menu.toggle({currentTarget:this.$el,relatedTarget:this.$refs.button.$el}),this.isExpanded=!this.$refs.menu.visible},onDropdownKeydown(t){"ArrowDown"!==t.code&&"ArrowUp"!==t.code||(this.onDropdownButtonClick(),t.preventDefault())},onDefaultButtonClick(t){this.isExpanded&&this.$refs.menu.hide(t),this.$emit("click",t)}},computed:{ariaId:()=>l.UniqueComponentId(),containerClass(){return["p-splitbutton p-component",this.class,{[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":"small"===this.size,"p-button-lg":"large"===this.size}]}},components:{PVSButton:i.default,PVSMenu:s.default,ChevronDownIcon:p.default}};return function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&o.firstChild?o.insertBefore(l,o.firstChild):o.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t))}}("\n.p-splitbutton[data-v-29147f7b] {\n display: inline-flex;\n position: relative;\n}\n.p-splitbutton .p-splitbutton-defaultbutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-defaultbutton.p-button[data-v-29147f7b] {\n flex: 1 1 auto;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n.p-splitbutton-menubutton[data-v-29147f7b],\n.p-splitbutton.p-button-rounded > .p-splitbutton-menubutton.p-button[data-v-29147f7b],\n.p-splitbutton.p-button-outlined > .p-splitbutton-menubutton.p-button[data-v-29147f7b] {\n display: flex;\n align-items: center;\n justify-content: center;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.p-splitbutton .p-menu[data-v-29147f7b] {\n min-width: 100%;\n}\n.p-fluid .p-splitbutton[data-v-29147f7b] {\n display: flex;\n}\n"),r.render=function(t,e,n,o,l,a){const d=u.resolveComponent("PVSButton"),i=u.resolveComponent("PVSMenu");return u.openBlock(),u.createElementBlock("div",u.mergeProps({class:a.containerClass,style:n.style},t.ptm("root")),[u.renderSlot(t.$slots,"default",{},(()=>[u.createVNode(d,u.mergeProps({type:"button",class:"p-splitbutton-defaultbutton",label:n.label,disabled:n.disabled,"aria-label":n.label,onClick:a.onDefaultButtonClick,pt:t.ptm("button")},n.buttonProps),{icon:u.withCtx((e=>[u.renderSlot(t.$slots,"icon",{},(()=>[u.createElementVNode("span",u.mergeProps({class:[n.icon,e.class]},t.ptm("button").icon),null,16)]))])),_:3},16,["label","disabled","aria-label","onClick","pt"])])),u.createVNode(d,u.mergeProps({ref:"button",type:"button",class:"p-splitbutton-menubutton",disabled:n.disabled,"aria-haspopup":"true","aria-expanded":l.isExpanded,"aria-controls":a.ariaId+"_overlay",onClick:a.onDropdownButtonClick,onKeydown:a.onDropdownKeydown,pt:t.ptm("menuButton")},n.menuButtonProps),{icon:u.withCtx((e=>[u.renderSlot(t.$slots,"menubuttonicon",{},(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(n.menuButtonIcon?"span":"ChevronDownIcon"),u.mergeProps({class:[n.menuButtonIcon,e.class]},t.ptm("menuButton").icon),null,16,["class"]))]))])),_:3},16,["disabled","aria-expanded","aria-controls","onClick","onKeydown","pt"]),u.createVNode(i,{ref:"menu",id:a.ariaId+"_overlay",model:n.model,popup:!0,autoZIndex:n.autoZIndex,baseZIndex:n.baseZIndex,appendTo:n.appendTo,pt:t.ptm("menu")},null,8,["id","model","autoZIndex","baseZIndex","appendTo","pt"])],16)},r.__scopeId="data-v-29147f7b",r}(primevue.basecomponent,primevue.button,primevue.icons.chevrondown,primevue.tieredmenu,primevue.utils,Vue);
|
package/splitter/Splitter.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface SplitterPassThroughMethodOptions {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Custom resize start event.
|
|
25
|
-
* @see {@link SplitterEmits.
|
|
25
|
+
* @see {@link SplitterEmits.resizestart}
|
|
26
26
|
*/
|
|
27
27
|
export interface SplitterResizeStartEvent {
|
|
28
28
|
/**
|
|
@@ -37,7 +37,7 @@ export interface SplitterResizeStartEvent {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Custom resize end event.
|
|
40
|
-
* @see {@link
|
|
40
|
+
* @see {@link SplitterEmits.resizeend}
|
|
41
41
|
*/
|
|
42
42
|
export interface SplitterResizeEndEvent {
|
|
43
43
|
/**
|
|
@@ -139,7 +139,7 @@ export interface SplitterEmits {
|
|
|
139
139
|
* Callback to invoke when resize starts.
|
|
140
140
|
* @param {SplitterResizeStartEvent} event - Custom resize start event.
|
|
141
141
|
*/
|
|
142
|
-
|
|
142
|
+
resizestart(event: SplitterResizeStartEvent): void;
|
|
143
143
|
/**
|
|
144
144
|
* Callback to invoke when resize ends.
|
|
145
145
|
* @param {SplitterResizeEndEvent} event - Custom resize end event.
|
package/textarea/Textarea.d.ts
CHANGED
|
@@ -10,6 +10,33 @@
|
|
|
10
10
|
import { TextareaHTMLAttributes } from 'vue';
|
|
11
11
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
12
|
|
|
13
|
+
export declare type TextareaPassThroughOptionType = TextareaPassThroughAttributes | ((options: TextareaPassThroughMethodOptions) => TextareaPassThroughAttributes) | null | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Custom passthrough(pt) option method.
|
|
17
|
+
*/
|
|
18
|
+
export interface TextareaPassThroughMethodOptions {
|
|
19
|
+
props: TextareaProps;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Custom passthrough(pt) options.
|
|
24
|
+
* @see {@link TextareaProps.pt}
|
|
25
|
+
*/
|
|
26
|
+
export interface TextareaPassThroughOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Uses to pass attributes to the root's DOM element.
|
|
29
|
+
*/
|
|
30
|
+
root?: TextareaPassThroughOptionType;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Custom passthrough attributes for each DOM elements
|
|
35
|
+
*/
|
|
36
|
+
export interface TextareaPassThroughAttributes {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}
|
|
39
|
+
|
|
13
40
|
/**
|
|
14
41
|
* Defines valid properties in Textarea component. In addition to these, all properties of TextareaHTMLAttributes can be used in this component.
|
|
15
42
|
* @extends TextareaHTMLAttributes
|
|
@@ -24,6 +51,11 @@ export interface TextareaProps extends TextareaHTMLAttributes {
|
|
|
24
51
|
* @defaultValue false
|
|
25
52
|
*/
|
|
26
53
|
autoResize?: boolean | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Uses to pass attributes to DOM elements inside the component.
|
|
56
|
+
* @type {TextareaPassThroughOptions}
|
|
57
|
+
*/
|
|
58
|
+
pt?: TextareaPassThroughOptions;
|
|
27
59
|
}
|
|
28
60
|
|
|
29
61
|
/**
|
package/textarea/Textarea.vue
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<textarea :class="['p-inputtextarea p-inputtext p-component', { 'p-filled': filled, 'p-inputtextarea-resizable ': autoResize }]" :value="modelValue" @input="onInput"></textarea>
|
|
2
|
+
<textarea :class="['p-inputtextarea p-inputtext p-component', { 'p-filled': filled, 'p-inputtextarea-resizable ': autoResize }]" :value="modelValue" @input="onInput" v-bind="ptm('root')"></textarea>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
7
|
+
|
|
6
8
|
export default {
|
|
7
9
|
name: 'Textarea',
|
|
10
|
+
extends: BaseComponent,
|
|
8
11
|
emits: ['update:modelValue'],
|
|
9
12
|
props: {
|
|
10
13
|
modelValue: null,
|