primevue 3.15.0 → 3.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/AutoComplete.d.ts +182 -38
- package/autocomplete/AutoComplete.vue +636 -342
- package/autocomplete/autocomplete.cjs.js +745 -416
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +747 -418
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +745 -416
- package/autocomplete/autocomplete.min.js +1 -1
- package/button/Button.vue +4 -1
- package/button/button.cjs.js +5 -1
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -1
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +51 -12
- package/calendar/Calendar.vue +259 -114
- package/calendar/calendar.cjs.js +414 -220
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +415 -221
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +414 -220
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.vue +25 -0
- package/carousel/carousel.cjs.js +25 -0
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +25 -0
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +25 -0
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +97 -17
- package/cascadeselect/CascadeSelect.vue +560 -135
- package/cascadeselect/CascadeSelectSub.vue +48 -129
- package/cascadeselect/cascadeselect.cjs.js +670 -306
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +672 -308
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +670 -306
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/Checkbox.d.ts +40 -4
- package/checkbox/Checkbox.vue +50 -13
- package/checkbox/checkbox.cjs.js +64 -23
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +65 -24
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +64 -23
- package/checkbox/checkbox.min.js +1 -1
- package/chips/Chips.d.ts +36 -12
- package/chips/Chips.vue +116 -22
- package/chips/chips.cjs.js +149 -37
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +150 -38
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +150 -39
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +3 -6
- package/colorpicker/ColorPicker.vue +1 -5
- package/colorpicker/colorpicker.cjs.js +2 -7
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +2 -7
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +2 -7
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +4 -0
- package/column/Column.vue +4 -0
- package/column/column.cjs.js +4 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +4 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +4 -0
- package/column/column.min.js +1 -1
- package/config/PrimeVue.d.ts +42 -0
- package/config/config.cjs.js +35 -4
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +35 -4
- package/config/config.esm.min.js +1 -1
- package/config/config.js +35 -4
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.vue +4 -1
- package/confirmdialog/confirmdialog.cjs.js +6 -2
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +6 -2
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +6 -2
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/contextmenu/ContextMenuSub.vue +3 -3
- package/contextmenu/contextmenu.cjs.js +14 -8
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +15 -9
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +14 -8
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1128 -772
- package/core/core.min.js +12 -12
- package/datatable/BodyCell.vue +11 -2
- package/datatable/DataTable.vue +23 -2
- package/datatable/datatable.cjs.js +34 -4
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +34 -4
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +34 -4
- package/datatable/datatable.min.js +1 -1
- package/dialog/Dialog.d.ts +5 -1
- package/dropdown/Dropdown.d.ts +92 -38
- package/dropdown/Dropdown.vue +538 -399
- package/dropdown/dropdown.cjs.js +657 -486
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +659 -488
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +657 -486
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +32 -0
- package/editor/Editor.vue +15 -1
- package/editor/editor.cjs.js +15 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +15 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +15 -1
- package/editor/editor.min.js +1 -1
- package/inputmask/InputMask.vue +9 -6
- package/inputmask/inputmask.cjs.js +14 -6
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +15 -7
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +14 -6
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +31 -7
- package/inputnumber/InputNumber.vue +53 -20
- package/inputnumber/inputnumber.cjs.js +75 -29
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +76 -30
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +75 -29
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +24 -8
- package/inputswitch/InputSwitch.vue +27 -12
- package/inputswitch/inputswitch.cjs.js +38 -20
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +39 -21
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +38 -20
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.vue +1 -2
- package/inputtext/inputtext.cjs.js +3 -4
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +4 -5
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +3 -4
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +12 -0
- package/knob/Knob.vue +62 -2
- package/knob/knob.cjs.js +73 -5
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +73 -5
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +73 -5
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +53 -7
- package/listbox/Listbox.vue +500 -135
- package/listbox/listbox.cjs.js +597 -193
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +599 -195
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +597 -193
- package/listbox/listbox.min.js +1 -1
- package/menu/Menu.d.ts +1 -1
- package/menu/Menuitem.vue +2 -2
- package/menu/menu.cjs.js +12 -6
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +13 -7
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +12 -6
- package/menu/menu.min.js +1 -1
- package/menubar/MenubarSub.vue +3 -3
- package/menubar/menubar.cjs.js +14 -8
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -9
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +14 -8
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +111 -51
- package/multiselect/MultiSelect.vue +629 -338
- package/multiselect/multiselect.cjs.js +748 -428
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +750 -430
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +748 -428
- package/multiselect/multiselect.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +1 -1
- package/overlaypanel/OverlayPanel.vue +14 -2
- package/overlaypanel/overlaypanel.cjs.js +14 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +14 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +14 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +2 -2
- package/paginator/Paginator.d.ts +2 -2
- package/password/Password.d.ts +36 -8
- package/password/Password.vue +50 -14
- package/password/password.cjs.js +69 -24
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +71 -26
- package/password/password.esm.min.js +1 -1
- package/password/password.js +69 -24
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +8 -0
- package/picklist/PickList.vue +10 -2
- package/picklist/picklist.cjs.js +68 -50
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +69 -51
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +68 -50
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +1 -1
- package/radiobutton/RadioButton.d.ts +28 -4
- package/radiobutton/RadioButton.vue +36 -11
- package/radiobutton/radiobutton.cjs.js +49 -23
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +50 -24
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +49 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +4 -0
- package/rating/Rating.vue +61 -7
- package/rating/rating.cjs.js +90 -16
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +91 -17
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +90 -16
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +8 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +82 -40
- package/resources/themes/arya-green/theme.css +82 -40
- package/resources/themes/arya-orange/theme.css +82 -40
- package/resources/themes/arya-purple/theme.css +82 -40
- package/resources/themes/bootstrap4-dark-blue/theme.css +82 -40
- package/resources/themes/bootstrap4-dark-purple/theme.css +82 -40
- package/resources/themes/bootstrap4-light-blue/theme.css +82 -40
- package/resources/themes/bootstrap4-light-purple/theme.css +82 -40
- package/resources/themes/fluent-light/theme.css +82 -40
- package/resources/themes/lara-dark-blue/theme.css +82 -40
- package/resources/themes/lara-dark-indigo/theme.css +82 -40
- package/resources/themes/lara-dark-purple/theme.css +82 -40
- package/resources/themes/lara-dark-teal/theme.css +82 -40
- package/resources/themes/lara-light-blue/theme.css +82 -40
- package/resources/themes/lara-light-indigo/theme.css +82 -40
- package/resources/themes/lara-light-purple/theme.css +82 -40
- package/resources/themes/lara-light-teal/theme.css +82 -40
- package/resources/themes/luna-amber/theme.css +82 -40
- package/resources/themes/luna-blue/theme.css +82 -40
- package/resources/themes/luna-green/theme.css +82 -40
- package/resources/themes/luna-pink/theme.css +82 -40
- package/resources/themes/md-dark-deeppurple/theme.css +82 -40
- package/resources/themes/md-dark-indigo/theme.css +82 -40
- package/resources/themes/md-light-deeppurple/theme.css +82 -40
- package/resources/themes/md-light-indigo/theme.css +82 -40
- package/resources/themes/mdc-dark-deeppurple/theme.css +82 -40
- package/resources/themes/mdc-dark-indigo/theme.css +82 -40
- package/resources/themes/mdc-light-deeppurple/theme.css +82 -40
- package/resources/themes/mdc-light-indigo/theme.css +82 -40
- package/resources/themes/nova/theme.css +82 -40
- package/resources/themes/nova-accent/theme.css +82 -40
- package/resources/themes/nova-alt/theme.css +82 -40
- package/resources/themes/nova-vue/theme.css +82 -40
- package/resources/themes/rhea/theme.css +82 -40
- package/resources/themes/saga-blue/theme.css +82 -40
- package/resources/themes/saga-green/theme.css +82 -40
- package/resources/themes/saga-orange/theme.css +82 -40
- package/resources/themes/saga-purple/theme.css +82 -40
- package/resources/themes/tailwind-light/theme.css +82 -40
- package/resources/themes/vela-blue/theme.css +82 -40
- package/resources/themes/vela-green/theme.css +82 -40
- package/resources/themes/vela-orange/theme.css +82 -40
- package/resources/themes/vela-purple/theme.css +82 -40
- package/ripple/ripple.cjs.js +1 -0
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +1 -0
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -0
- package/ripple/ripple.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +89 -12
- package/selectbutton/selectbutton.cjs.js +97 -22
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +99 -24
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +97 -22
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/Slider.d.ts +9 -1
- package/slider/Slider.vue +50 -34
- package/slider/slider.cjs.js +59 -38
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +59 -38
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +59 -38
- package/slider/slider.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +1 -1
- package/splitter/Splitter.vue +30 -1
- package/splitter/splitter.cjs.js +30 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +30 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +30 -1
- package/splitter/splitter.min.js +1 -1
- package/textarea/Textarea.vue +1 -2
- package/textarea/textarea.cjs.js +3 -5
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +4 -6
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +3 -5
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +1 -1
- package/tieredmenu/TieredMenuSub.vue +3 -3
- package/tieredmenu/tieredmenu.cjs.js +14 -8
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +15 -9
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +14 -8
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +10 -1
- package/timeline/Timeline.vue +1 -1
- package/timeline/timeline.cjs.js +5 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +5 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +5 -1
- package/timeline/timeline.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +42 -0
- package/togglebutton/ToggleButton.vue +44 -7
- package/togglebutton/togglebutton.cjs.js +59 -13
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +60 -14
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +59 -13
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/tooltip.cjs.js +20 -11
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +21 -12
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +20 -11
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.vue +5 -1
- package/tree/TreeNode.vue +20 -19
- package/tree/tree.cjs.js +47 -32
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +47 -32
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +47 -32
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +26 -10
- package/treeselect/TreeSelect.vue +52 -29
- package/treeselect/treeselect.cjs.js +74 -41
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +76 -43
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +74 -41
- package/treeselect/treeselect.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +20 -4
- package/tristatecheckbox/TriStateCheckbox.vue +52 -15
- package/tristatecheckbox/tristatecheckbox.cjs.js +67 -26
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +68 -27
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +67 -26
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/Utils.d.ts +3 -2
- package/utils/utils.cjs.js +239 -173
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +239 -173
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +239 -173
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +612 -136
- package/vetur-tags.json +180 -59
- package/virtualscroller/VirtualScroller.d.ts +10 -0
- package/virtualscroller/VirtualScroller.vue +18 -17
- package/virtualscroller/virtualscroller.cjs.js +22 -20
- 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 +22 -20
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1745 -338
package/checkbox/checkbox.js
CHANGED
|
@@ -4,14 +4,15 @@ this.primevue.checkbox = (function (utils, vue) {
|
|
|
4
4
|
|
|
5
5
|
var script = {
|
|
6
6
|
name: 'Checkbox',
|
|
7
|
-
|
|
8
|
-
emits: ['click', 'update:modelValue', 'change', 'input'],
|
|
7
|
+
emits: ['click', 'update:modelValue', 'change', 'input', 'focus', 'blur'],
|
|
9
8
|
props: {
|
|
10
9
|
value: null,
|
|
11
10
|
modelValue: null,
|
|
12
11
|
binary: Boolean,
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
name: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: null
|
|
15
|
+
},
|
|
15
16
|
trueValue: {
|
|
16
17
|
type: null,
|
|
17
18
|
default: true
|
|
@@ -19,16 +20,44 @@ this.primevue.checkbox = (function (utils, vue) {
|
|
|
19
20
|
falseValue: {
|
|
20
21
|
type: null,
|
|
21
22
|
default: false
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
readonly: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
required: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
tabindex: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
inputId: null,
|
|
41
|
+
inputClass: null,
|
|
42
|
+
inputStyle: null,
|
|
43
|
+
inputProps: null,
|
|
44
|
+
'aria-labelledby': {
|
|
45
|
+
type: String,
|
|
46
|
+
default: null
|
|
47
|
+
},
|
|
48
|
+
'aria-label': {
|
|
49
|
+
type: String,
|
|
50
|
+
default: null
|
|
22
51
|
}
|
|
23
52
|
},
|
|
24
53
|
data() {
|
|
25
54
|
return {
|
|
26
55
|
focused: false
|
|
27
|
-
}
|
|
56
|
+
}
|
|
28
57
|
},
|
|
29
58
|
methods: {
|
|
30
59
|
onClick(event) {
|
|
31
|
-
if (!this
|
|
60
|
+
if (!this.disabled) {
|
|
32
61
|
let newModelValue;
|
|
33
62
|
|
|
34
63
|
if (this.binary) {
|
|
@@ -48,11 +77,13 @@ this.primevue.checkbox = (function (utils, vue) {
|
|
|
48
77
|
this.$refs.input.focus();
|
|
49
78
|
}
|
|
50
79
|
},
|
|
51
|
-
onFocus() {
|
|
80
|
+
onFocus(event) {
|
|
52
81
|
this.focused = true;
|
|
82
|
+
this.$emit('focus', event);
|
|
53
83
|
},
|
|
54
|
-
onBlur() {
|
|
84
|
+
onBlur(event) {
|
|
55
85
|
this.focused = false;
|
|
86
|
+
this.$emit('blur', event);
|
|
56
87
|
}
|
|
57
88
|
},
|
|
58
89
|
computed: {
|
|
@@ -60,43 +91,53 @@ this.primevue.checkbox = (function (utils, vue) {
|
|
|
60
91
|
return this.binary ? this.modelValue === this.trueValue : utils.ObjectUtils.contains(this.value, this.modelValue);
|
|
61
92
|
},
|
|
62
93
|
containerClass() {
|
|
63
|
-
return [
|
|
94
|
+
return [
|
|
95
|
+
'p-checkbox p-component', {
|
|
96
|
+
'p-checkbox-checked': this.checked,
|
|
97
|
+
'p-checkbox-disabled': this.disabled,
|
|
98
|
+
'p-checkbox-focused': this.focused
|
|
99
|
+
}];
|
|
64
100
|
}
|
|
65
101
|
}
|
|
66
102
|
};
|
|
67
103
|
|
|
68
104
|
const _hoisted_1 = { class: "p-hidden-accessible" };
|
|
69
|
-
const _hoisted_2 = ["
|
|
70
|
-
const _hoisted_3 = ["aria-checked"];
|
|
105
|
+
const _hoisted_2 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "required", "aria-labelledby", "aria-label"];
|
|
71
106
|
|
|
72
107
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
73
108
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
74
109
|
class: vue.normalizeClass($options.containerClass),
|
|
75
|
-
onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
|
|
76
|
-
style: vue.normalizeStyle($props.style)
|
|
110
|
+
onClick: _cache[2] || (_cache[2] = $event => ($options.onClick($event)))
|
|
77
111
|
}, [
|
|
78
112
|
vue.createElementVNode("div", _hoisted_1, [
|
|
79
113
|
vue.createElementVNode("input", vue.mergeProps({
|
|
114
|
+
id: $props.inputId,
|
|
80
115
|
ref: "input",
|
|
81
116
|
type: "checkbox",
|
|
117
|
+
value: $props.value,
|
|
118
|
+
class: $props.inputClass,
|
|
119
|
+
style: $props.inputStyle,
|
|
120
|
+
name: $props.name,
|
|
82
121
|
checked: $options.checked,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
122
|
+
tabindex: $props.tabindex,
|
|
123
|
+
disabled: $props.disabled,
|
|
124
|
+
readonly: $props.readonly,
|
|
125
|
+
required: $props.required,
|
|
126
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
127
|
+
"aria-label": _ctx.ariaLabel,
|
|
128
|
+
onFocus: _cache[0] || (_cache[0] = $event => ($options.onFocus($event))),
|
|
129
|
+
onBlur: _cache[1] || (_cache[1] = $event => ($options.onBlur($event)))
|
|
130
|
+
}, $props.inputProps), null, 16, _hoisted_2)
|
|
88
131
|
]),
|
|
89
132
|
vue.createElementVNode("div", {
|
|
90
133
|
ref: "box",
|
|
91
|
-
class: vue.normalizeClass(['p-checkbox-box', {'p-highlight': $options.checked, 'p-disabled':
|
|
92
|
-
role: "checkbox",
|
|
93
|
-
"aria-checked": $options.checked
|
|
134
|
+
class: vue.normalizeClass(['p-checkbox-box', {'p-highlight': $options.checked, 'p-disabled': $props.disabled, 'p-focus': $data.focused}])
|
|
94
135
|
}, [
|
|
95
136
|
vue.createElementVNode("span", {
|
|
96
137
|
class: vue.normalizeClass(['p-checkbox-icon', {'pi pi-check': $options.checked}])
|
|
97
138
|
}, null, 2)
|
|
98
|
-
],
|
|
99
|
-
],
|
|
139
|
+
], 2)
|
|
140
|
+
], 2))
|
|
100
141
|
}
|
|
101
142
|
|
|
102
143
|
script.render = render;
|
package/checkbox/checkbox.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.checkbox=function(e,
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.checkbox=function(e,l){"use strict";var t={name:"Checkbox",emits:["click","update:modelValue","change","input","focus","blur"],props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:null,inputClass:null,inputStyle:null,inputProps:null,"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data:()=>({focused:!1}),methods:{onClick(l){if(!this.disabled){let t;t=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((l=>!e.ObjectUtils.equals(l,this.value))):this.modelValue?[...this.modelValue,this.value]:[this.value],this.$emit("click",l),this.$emit("update:modelValue",t),this.$emit("change",l),this.$emit("input",t),this.$refs.input.focus()}},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked(){return this.binary?this.modelValue===this.trueValue:e.ObjectUtils.contains(this.value,this.modelValue)},containerClass(){return["p-checkbox p-component",{"p-checkbox-checked":this.checked,"p-checkbox-disabled":this.disabled,"p-checkbox-focused":this.focused}]}}};const a={class:"p-hidden-accessible"},i=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"];return t.render=function(e,t,u,s,n,c){return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(c.containerClass),onClick:t[2]||(t[2]=e=>c.onClick(e))},[l.createElementVNode("div",a,[l.createElementVNode("input",l.mergeProps({id:u.inputId,ref:"input",type:"checkbox",value:u.value,class:u.inputClass,style:u.inputStyle,name:u.name,checked:c.checked,tabindex:u.tabindex,disabled:u.disabled,readonly:u.readonly,required:u.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=e=>c.onFocus(e)),onBlur:t[1]||(t[1]=e=>c.onBlur(e))},u.inputProps),null,16,i)]),l.createElementVNode("div",{ref:"box",class:l.normalizeClass(["p-checkbox-box",{"p-highlight":c.checked,"p-disabled":u.disabled,"p-focus":n.focused}])},[l.createElementVNode("span",{class:l.normalizeClass(["p-checkbox-icon",{"pi pi-check":c.checked}])},null,2)],2)],2)},t}(primevue.utils,Vue);
|
package/chips/Chips.d.ts
CHANGED
|
@@ -40,13 +40,37 @@ export interface ChipsProps {
|
|
|
40
40
|
*/
|
|
41
41
|
separator?: string | undefined;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Identifier of the focus input to match a label defined for the chips.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
inputId?: string | undefined;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Style class of the input field.
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
inputClass?: any | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Inline style of the input field.
|
|
52
|
+
*/
|
|
53
|
+
inputStyle?: any | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.
|
|
56
|
+
*/
|
|
57
|
+
inputProps?: HTMLInputElement | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* When present, it specifies that the element should be disabled.
|
|
60
|
+
*/
|
|
61
|
+
disabled?: boolean | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Placeholder text for the input.
|
|
64
|
+
*/
|
|
65
|
+
placeholder?: string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
68
|
+
*/
|
|
69
|
+
'aria-labelledby'?: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Establishes a string value that labels the component.
|
|
72
|
+
*/
|
|
73
|
+
'aria-label'?: string | undefined;
|
|
50
74
|
}
|
|
51
75
|
|
|
52
76
|
export interface ChipsSlots {
|
|
@@ -68,15 +92,15 @@ export declare type ChipsEmits = {
|
|
|
68
92
|
* @param {*} value - New value.
|
|
69
93
|
*/
|
|
70
94
|
'update:modelValue': (value: any[]) => void;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Callback to invoke when a chip is added.
|
|
97
|
+
* @param {ChipsAddEvent} event - Custom add event.
|
|
98
|
+
*/
|
|
75
99
|
'add': (event: ChipsAddEvent) => void;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Callback to invoke when a chip is removed.
|
|
102
|
+
* @param {ChipsRemoveEvent} event - Custom remove event.
|
|
103
|
+
*/
|
|
80
104
|
'remove': (event: ChipsRemoveEvent) => void;
|
|
81
105
|
}
|
|
82
106
|
|
package/chips/Chips.vue
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="containerClass"
|
|
3
|
-
<ul
|
|
4
|
-
|
|
2
|
+
<div :class="containerClass">
|
|
3
|
+
<ul ref="container" class="p-inputtext p-chips-multiple-container" tabindex="-1" role="listbox" aria-orientation="horizontal" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" :aria-activedescendant="focused ? focusedOptionId : undefined"
|
|
4
|
+
@click="onWrapperClick()" @focus="onContainerFocus" @blur="onContainerBlur" @keydown="onContainerKeyDown">
|
|
5
|
+
<li v-for="(val,i) of modelValue" :key="`${i}_${val}`" :id="id + '_chips_item_' + i" role="option" :class="['p-chips-token', {'p-focus': focusedIndex === i}]"
|
|
6
|
+
:aria-label="val" :aria-selected="true" :aria-setsize="modelValue.length" :aria-posinset="i + 1">
|
|
5
7
|
<slot name="chip" :value="val">
|
|
6
8
|
<span class="p-chips-token-label">{{val}}</span>
|
|
7
9
|
</slot>
|
|
8
|
-
<span class="p-chips-token-icon pi pi-times-circle" @click="removeItem($event, i)"></span>
|
|
10
|
+
<span class="p-chips-token-icon pi pi-times-circle" @click="removeItem($event, i)" aria-hidden="true"></span>
|
|
9
11
|
</li>
|
|
10
|
-
<li class="p-chips-input-token">
|
|
11
|
-
<input ref="input" type="text"
|
|
12
|
-
|
|
12
|
+
<li class="p-chips-input-token" role="option">
|
|
13
|
+
<input ref="input" type="text" :id="inputId" :class="inputClass" :style="inputStyle" :disabled="disabled || maxedOut" :placeholder="placeholder"
|
|
14
|
+
@focus="onFocus($event)" @blur="onBlur($event)" @input="onInput" @keydown="onKeyDown($event)" @paste="onPaste($event)" v-bind="inputProps">
|
|
13
15
|
</li>
|
|
14
16
|
</ul>
|
|
15
17
|
</div>
|
|
16
18
|
</template>
|
|
17
19
|
|
|
18
20
|
<script>
|
|
21
|
+
import {UniqueComponentId} from 'primevue/utils';
|
|
22
|
+
|
|
19
23
|
export default {
|
|
20
24
|
name: 'Chips',
|
|
21
|
-
|
|
22
|
-
emits: ['update:modelValue', 'add', 'remove'],
|
|
25
|
+
emits: ['update:modelValue', 'add', 'remove', 'focus', 'blur'],
|
|
23
26
|
props: {
|
|
24
27
|
modelValue: {
|
|
25
28
|
type: Array,
|
|
@@ -41,13 +44,33 @@ export default {
|
|
|
41
44
|
type: Boolean,
|
|
42
45
|
default: true
|
|
43
46
|
},
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
placeholder: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: null
|
|
50
|
+
},
|
|
51
|
+
inputId: null,
|
|
52
|
+
inputClass: null,
|
|
53
|
+
inputStyle: null,
|
|
54
|
+
inputProps: null,
|
|
55
|
+
disabled: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
'aria-labelledby': {
|
|
60
|
+
type: String,
|
|
61
|
+
default: null
|
|
62
|
+
},
|
|
63
|
+
'aria-label': {
|
|
64
|
+
type: String,
|
|
65
|
+
default: null
|
|
66
|
+
}
|
|
46
67
|
},
|
|
47
68
|
data() {
|
|
48
69
|
return {
|
|
70
|
+
id: UniqueComponentId(),
|
|
49
71
|
inputValue: null,
|
|
50
|
-
focused: false
|
|
72
|
+
focused: false,
|
|
73
|
+
focusedIndex: null
|
|
51
74
|
};
|
|
52
75
|
},
|
|
53
76
|
methods: {
|
|
@@ -56,37 +79,53 @@ export default {
|
|
|
56
79
|
},
|
|
57
80
|
onInput(event) {
|
|
58
81
|
this.inputValue = event.target.value;
|
|
82
|
+
this.focusedIndex = null;
|
|
59
83
|
},
|
|
60
|
-
onFocus() {
|
|
84
|
+
onFocus(event) {
|
|
61
85
|
this.focused = true;
|
|
86
|
+
this.focusedIndex = null;
|
|
87
|
+
this.$emit('focus', event);
|
|
62
88
|
},
|
|
63
89
|
onBlur(event) {
|
|
64
90
|
this.focused = false;
|
|
91
|
+
this.focusedIndex = null;
|
|
65
92
|
if (this.addOnBlur) {
|
|
66
93
|
this.addItem(event, event.target.value, false);
|
|
67
94
|
}
|
|
95
|
+
this.$emit('blur', event);
|
|
68
96
|
},
|
|
69
97
|
onKeyDown(event) {
|
|
70
98
|
const inputValue = event.target.value;
|
|
71
99
|
|
|
72
|
-
switch(event.
|
|
73
|
-
|
|
74
|
-
case 8:
|
|
100
|
+
switch(event.code) {
|
|
101
|
+
case 'Backspace':
|
|
75
102
|
if (inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) {
|
|
76
|
-
|
|
103
|
+
if (this.focusedIndex !== null) {
|
|
104
|
+
this.removeItem(event, this.focusedIndex);
|
|
105
|
+
}
|
|
106
|
+
else this.removeItem(event, this.modelValue.length - 1);
|
|
77
107
|
}
|
|
78
108
|
break;
|
|
79
109
|
|
|
80
|
-
|
|
81
|
-
case 13:
|
|
110
|
+
case 'Enter':
|
|
82
111
|
if (inputValue && inputValue.trim().length && !this.maxedOut) {
|
|
83
112
|
this.addItem(event, inputValue, true);
|
|
84
113
|
}
|
|
85
114
|
break;
|
|
86
115
|
|
|
116
|
+
case 'ArrowLeft':
|
|
117
|
+
if (inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) {
|
|
118
|
+
this.$refs.container.focus();
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
|
|
122
|
+
case 'ArrowRight':
|
|
123
|
+
event.stopPropagation();
|
|
124
|
+
break;
|
|
125
|
+
|
|
87
126
|
default:
|
|
88
127
|
if (this.separator) {
|
|
89
|
-
if (this.separator === ',' &&
|
|
128
|
+
if (this.separator === ',' && event.key === ',') {
|
|
90
129
|
this.addItem(event, inputValue, true);
|
|
91
130
|
}
|
|
92
131
|
}
|
|
@@ -105,6 +144,54 @@ export default {
|
|
|
105
144
|
}
|
|
106
145
|
}
|
|
107
146
|
},
|
|
147
|
+
onContainerFocus() {
|
|
148
|
+
this.focused = true;
|
|
149
|
+
},
|
|
150
|
+
onContainerBlur() {
|
|
151
|
+
this.focusedIndex = -1;
|
|
152
|
+
this.focused = false;
|
|
153
|
+
},
|
|
154
|
+
onContainerKeyDown(event) {
|
|
155
|
+
switch (event.code) {
|
|
156
|
+
case 'ArrowLeft':
|
|
157
|
+
this.onArrowLeftKeyOn(event);
|
|
158
|
+
break;
|
|
159
|
+
|
|
160
|
+
case 'ArrowRight':
|
|
161
|
+
this.onArrowRightKeyOn(event);
|
|
162
|
+
break;
|
|
163
|
+
|
|
164
|
+
case 'Backspace':
|
|
165
|
+
this.onBackspaceKeyOn(event);
|
|
166
|
+
break;
|
|
167
|
+
|
|
168
|
+
default:
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
onArrowLeftKeyOn() {
|
|
173
|
+
if (this.inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) {
|
|
174
|
+
this.focusedIndex = this.focusedIndex === null ? this.modelValue.length - 1 : this.focusedIndex - 1;
|
|
175
|
+
if (this.focusedIndex < 0) this.focusedIndex = 0;
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
onArrowRightKeyOn() {
|
|
179
|
+
if (this.inputValue.length === 0 && this.modelValue && this.modelValue.length > 0) {
|
|
180
|
+
|
|
181
|
+
if (this.focusedIndex === this.modelValue.length - 1) {
|
|
182
|
+
this.focusedIndex = null;
|
|
183
|
+
this.$refs.input.focus();
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
this.focusedIndex++;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
onBackspaceKeyOn(event) {
|
|
191
|
+
if (this.focusedIndex !== null) {
|
|
192
|
+
this.removeItem(event, this.focusedIndex);
|
|
193
|
+
}
|
|
194
|
+
},
|
|
108
195
|
updateModel(event, value, preventDefault) {
|
|
109
196
|
this.$emit('update:modelValue', value);
|
|
110
197
|
this.$emit('add', {
|
|
@@ -128,12 +215,14 @@ export default {
|
|
|
128
215
|
}
|
|
129
216
|
},
|
|
130
217
|
removeItem(event, index) {
|
|
131
|
-
if (this
|
|
218
|
+
if (this.disabled) {
|
|
132
219
|
return;
|
|
133
220
|
}
|
|
134
221
|
|
|
135
222
|
let values = [...this.modelValue];
|
|
136
223
|
const removedItem = values.splice(index, 1);
|
|
224
|
+
this.focusedIndex = null;
|
|
225
|
+
this.$refs.input.focus();
|
|
137
226
|
this.$emit('update:modelValue', values);
|
|
138
227
|
this.$emit('remove', {
|
|
139
228
|
originalEvent: event,
|
|
@@ -146,10 +235,15 @@ export default {
|
|
|
146
235
|
return this.max && this.modelValue && this.max === this.modelValue.length;
|
|
147
236
|
},
|
|
148
237
|
containerClass() {
|
|
149
|
-
return ['p-chips p-component p-inputwrapper',
|
|
238
|
+
return ['p-chips p-component p-inputwrapper', {
|
|
239
|
+
'p-disabled': this.disabled,
|
|
240
|
+
'p-focus': this.focused,
|
|
150
241
|
'p-inputwrapper-filled': ((this.modelValue && this.modelValue.length) || (this.inputValue && this.inputValue.length)),
|
|
151
242
|
'p-inputwrapper-focus': this.focused
|
|
152
243
|
}];
|
|
244
|
+
},
|
|
245
|
+
focusedOptionId() {
|
|
246
|
+
return this.focusedIndex !== null ? `${this.id}_chips_item_${this.focusedIndex}` : null;
|
|
153
247
|
}
|
|
154
248
|
}
|
|
155
249
|
}
|