primevue 3.46.0 → 3.47.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 +2 -2
- package/api/api.cjs.js +6 -6
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +6 -6
- package/api/api.esm.min.js +1 -1
- package/api/api.js +6 -6
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +6 -1
- package/autocomplete/AutoComplete.vue +24 -15
- package/autocomplete/BaseAutoComplete.vue +5 -1
- package/autocomplete/autocomplete.cjs.js +29 -18
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +29 -18
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +29 -18
- package/autocomplete/autocomplete.min.js +1 -1
- package/basecomponent/basecomponent.cjs.js +1 -3
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +1 -3
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +1 -3
- package/basecomponent/basecomponent.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.cjs.js +1 -3
- package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.esm.js +1 -3
- package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.js +1 -3
- package/basecomponent/style/basecomponentstyle.min.js +1 -1
- package/basedirective/basedirective.cjs.js +11 -2
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +11 -2
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +11 -2
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +6 -1
- package/baseicon/baseicon.cjs.js +5 -0
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +6 -1
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +5 -0
- package/baseicon/baseicon.min.js +1 -1
- package/calendar/Calendar.d.ts +53 -2
- package/calendar/Calendar.vue +12 -0
- package/calendar/calendar.cjs.js +12 -0
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +12 -0
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +12 -0
- package/calendar/calendar.min.js +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +5 -1
- package/cascadeselect/CascadeSelect.d.ts +6 -1
- package/cascadeselect/CascadeSelect.vue +56 -35
- package/cascadeselect/CascadeSelectSub.vue +9 -2
- package/cascadeselect/cascadeselect.cjs.js +99 -52
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +99 -52
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +99 -52
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/BaseCheckbox.vue +0 -4
- package/checkbox/Checkbox.d.ts +17 -34
- package/checkbox/Checkbox.vue +24 -35
- package/checkbox/checkbox.cjs.js +21 -49
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +21 -49
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +21 -49
- package/checkbox/checkbox.min.js +1 -1
- package/checkbox/style/checkboxstyle.cjs.js +5 -11
- package/checkbox/style/checkboxstyle.cjs.min.js +1 -1
- package/checkbox/style/checkboxstyle.esm.js +5 -11
- package/checkbox/style/checkboxstyle.esm.min.js +1 -1
- package/checkbox/style/checkboxstyle.js +5 -11
- package/checkbox/style/checkboxstyle.min.js +1 -1
- package/chips/Chips.vue +2 -1
- package/chips/chips.cjs.js +2 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +2 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +2 -1
- package/chips/chips.min.js +1 -1
- package/column/Column.d.ts +11 -44
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -1
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -1
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -1
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.vue +8 -8
- package/contextmenu/contextmenu.cjs.js +7 -6
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +7 -6
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +7 -6
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +918 -628
- package/core/core.min.js +63 -55
- package/datatable/BaseDataTable.vue +4 -0
- package/datatable/BodyCell.vue +11 -1
- package/datatable/BodyRow.vue +5 -2
- package/datatable/ColumnFilter.vue +5 -2
- package/datatable/DataTable.d.ts +5 -0
- package/datatable/DataTable.vue +2 -2
- package/datatable/HeaderCell.vue +2 -1
- package/datatable/HeaderCheckbox.vue +14 -42
- package/datatable/RowCheckbox.vue +10 -52
- package/datatable/RowRadioButton.vue +11 -32
- package/datatable/TableHeader.vue +3 -1
- package/datatable/datatable.cjs.js +110 -193
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +109 -194
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +110 -195
- package/datatable/datatable.min.js +1 -1
- package/datatable/style/datatablestyle.cjs.js +23 -72
- package/datatable/style/datatablestyle.cjs.min.js +1 -1
- package/datatable/style/datatablestyle.esm.js +23 -72
- package/datatable/style/datatablestyle.esm.min.js +1 -1
- package/datatable/style/datatablestyle.js +23 -72
- package/datatable/style/datatablestyle.min.js +1 -1
- package/dialog/style/dialogstyle.cjs.js +1 -1
- package/dialog/style/dialogstyle.cjs.min.js +1 -1
- package/dialog/style/dialogstyle.esm.js +1 -1
- package/dialog/style/dialogstyle.esm.min.js +1 -1
- package/dialog/style/dialogstyle.js +1 -1
- package/dialog/style/dialogstyle.min.js +1 -1
- package/dropdown/BaseDropdown.vue +17 -1
- package/dropdown/Dropdown.d.ts +37 -1
- package/dropdown/Dropdown.vue +68 -40
- package/dropdown/dropdown.cjs.js +95 -45
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +93 -45
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +95 -47
- package/dropdown/dropdown.min.js +1 -1
- package/dropdown/style/dropdownstyle.cjs.js +7 -2
- package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
- package/dropdown/style/dropdownstyle.esm.js +7 -2
- package/dropdown/style/dropdownstyle.esm.min.js +1 -1
- package/dropdown/style/dropdownstyle.js +7 -2
- package/dropdown/style/dropdownstyle.min.js +1 -1
- package/focustrap/focustrap.cjs.js +15 -2
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +15 -2
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +15 -2
- package/focustrap/focustrap.min.js +1 -1
- package/icons/arrowdown/index.cjs.js +3 -9
- package/icons/arrowdown/index.cjs.min.js +1 -1
- package/icons/arrowdown/index.esm.js +3 -9
- package/icons/arrowdown/index.esm.min.js +1 -1
- package/icons/arrowdown/index.js +5 -10
- package/icons/arrowdown/index.min.js +1 -1
- package/icons/arrowdown/index.vue +1 -7
- package/icons/arrowup/index.cjs.js +3 -9
- package/icons/arrowup/index.cjs.min.js +1 -1
- package/icons/arrowup/index.esm.js +3 -9
- package/icons/arrowup/index.esm.min.js +1 -1
- package/icons/arrowup/index.js +5 -10
- package/icons/arrowup/index.min.js +1 -1
- package/icons/arrowup/index.vue +1 -7
- package/icons/ban/index.cjs.js +3 -9
- package/icons/ban/index.cjs.min.js +1 -1
- package/icons/ban/index.esm.js +3 -9
- package/icons/ban/index.esm.min.js +1 -1
- package/icons/ban/index.js +5 -10
- package/icons/ban/index.min.js +1 -1
- package/icons/ban/index.vue +1 -7
- package/icons/blank/index.cjs.js +34 -0
- package/icons/blank/index.cjs.min.js +1 -0
- package/icons/blank/index.d.ts +12 -0
- package/icons/blank/index.esm.js +28 -0
- package/icons/blank/index.esm.min.js +1 -0
- package/icons/blank/index.js +36 -0
- package/icons/blank/index.min.js +1 -0
- package/icons/blank/index.vue +13 -0
- package/icons/blank/package.json +9 -0
- package/icons/exclamationtriangle/index.cjs.js +3 -9
- package/icons/exclamationtriangle/index.cjs.min.js +1 -1
- package/icons/exclamationtriangle/index.esm.js +3 -9
- package/icons/exclamationtriangle/index.esm.min.js +1 -1
- package/icons/exclamationtriangle/index.js +5 -10
- package/icons/exclamationtriangle/index.min.js +1 -1
- package/icons/exclamationtriangle/index.vue +1 -7
- package/icons/eyeslash/index.cjs.js +3 -9
- package/icons/eyeslash/index.cjs.min.js +1 -1
- package/icons/eyeslash/index.esm.js +3 -9
- package/icons/eyeslash/index.esm.min.js +1 -1
- package/icons/eyeslash/index.js +5 -10
- package/icons/eyeslash/index.min.js +1 -1
- package/icons/eyeslash/index.vue +1 -7
- package/icons/filter/index.cjs.js +3 -9
- package/icons/filter/index.cjs.min.js +1 -1
- package/icons/filter/index.esm.js +3 -9
- package/icons/filter/index.esm.min.js +1 -1
- package/icons/filter/index.js +5 -10
- package/icons/filter/index.min.js +1 -1
- package/icons/filter/index.vue +1 -7
- package/icons/filterslash/index.cjs.js +3 -9
- package/icons/filterslash/index.cjs.min.js +1 -1
- package/icons/filterslash/index.esm.js +3 -9
- package/icons/filterslash/index.esm.min.js +1 -1
- package/icons/filterslash/index.js +5 -10
- package/icons/filterslash/index.min.js +1 -1
- package/icons/filterslash/index.vue +1 -7
- package/icons/infocircle/index.cjs.js +3 -9
- package/icons/infocircle/index.cjs.min.js +1 -1
- package/icons/infocircle/index.esm.js +3 -9
- package/icons/infocircle/index.esm.min.js +1 -1
- package/icons/infocircle/index.js +5 -10
- package/icons/infocircle/index.min.js +1 -1
- package/icons/infocircle/index.vue +1 -7
- package/icons/pencil/index.cjs.js +3 -9
- package/icons/pencil/index.cjs.min.js +1 -1
- package/icons/pencil/index.esm.js +3 -9
- package/icons/pencil/index.esm.min.js +1 -1
- package/icons/pencil/index.js +5 -10
- package/icons/pencil/index.min.js +1 -1
- package/icons/pencil/index.vue +1 -7
- package/icons/plus/index.cjs.js +3 -9
- package/icons/plus/index.cjs.min.js +1 -1
- package/icons/plus/index.esm.js +3 -9
- package/icons/plus/index.esm.min.js +1 -1
- package/icons/plus/index.js +5 -10
- package/icons/plus/index.min.js +1 -1
- package/icons/plus/index.vue +1 -7
- package/icons/refresh/index.cjs.js +3 -9
- package/icons/refresh/index.cjs.min.js +1 -1
- package/icons/refresh/index.esm.js +3 -9
- package/icons/refresh/index.esm.min.js +1 -1
- package/icons/refresh/index.js +5 -10
- package/icons/refresh/index.min.js +1 -1
- package/icons/refresh/index.vue +1 -7
- package/icons/search/index.cjs.js +3 -9
- package/icons/search/index.cjs.min.js +1 -1
- package/icons/search/index.esm.js +3 -9
- package/icons/search/index.esm.min.js +1 -1
- package/icons/search/index.js +5 -10
- package/icons/search/index.min.js +1 -1
- package/icons/search/index.vue +1 -7
- package/icons/searchminus/index.cjs.js +3 -9
- package/icons/searchminus/index.cjs.min.js +1 -1
- package/icons/searchminus/index.esm.js +3 -9
- package/icons/searchminus/index.esm.min.js +1 -1
- package/icons/searchminus/index.js +5 -10
- package/icons/searchminus/index.min.js +1 -1
- package/icons/searchminus/index.vue +1 -7
- package/icons/searchplus/index.cjs.js +3 -9
- package/icons/searchplus/index.cjs.min.js +1 -1
- package/icons/searchplus/index.esm.js +3 -9
- package/icons/searchplus/index.esm.min.js +1 -1
- package/icons/searchplus/index.js +5 -10
- package/icons/searchplus/index.min.js +1 -1
- package/icons/searchplus/index.vue +1 -7
- package/icons/sortalt/index.cjs.js +3 -9
- package/icons/sortalt/index.cjs.min.js +1 -1
- package/icons/sortalt/index.esm.js +3 -9
- package/icons/sortalt/index.esm.min.js +1 -1
- package/icons/sortalt/index.js +5 -10
- package/icons/sortalt/index.min.js +1 -1
- package/icons/sortalt/index.vue +1 -7
- package/icons/sortamountdown/index.cjs.js +3 -9
- package/icons/sortamountdown/index.cjs.min.js +1 -1
- package/icons/sortamountdown/index.esm.js +3 -9
- package/icons/sortamountdown/index.esm.min.js +1 -1
- package/icons/sortamountdown/index.js +5 -10
- package/icons/sortamountdown/index.min.js +1 -1
- package/icons/sortamountdown/index.vue +1 -7
- package/icons/sortamountupalt/index.cjs.js +3 -9
- package/icons/sortamountupalt/index.cjs.min.js +1 -1
- package/icons/sortamountupalt/index.esm.js +3 -9
- package/icons/sortamountupalt/index.esm.min.js +1 -1
- package/icons/sortamountupalt/index.js +5 -10
- package/icons/sortamountupalt/index.min.js +1 -1
- package/icons/sortamountupalt/index.vue +1 -7
- package/icons/spinner/index.cjs.js +3 -9
- package/icons/spinner/index.cjs.min.js +1 -1
- package/icons/spinner/index.esm.js +3 -9
- package/icons/spinner/index.esm.min.js +1 -1
- package/icons/spinner/index.js +5 -10
- package/icons/spinner/index.min.js +1 -1
- package/icons/spinner/index.vue +1 -7
- package/icons/star/index.cjs.js +3 -9
- package/icons/star/index.cjs.min.js +1 -1
- package/icons/star/index.esm.js +3 -9
- package/icons/star/index.esm.min.js +1 -1
- package/icons/star/index.js +5 -10
- package/icons/star/index.min.js +1 -1
- package/icons/star/index.vue +1 -7
- package/icons/starfill/index.cjs.js +3 -9
- package/icons/starfill/index.cjs.min.js +1 -1
- package/icons/starfill/index.esm.js +3 -9
- package/icons/starfill/index.esm.min.js +1 -1
- package/icons/starfill/index.js +5 -10
- package/icons/starfill/index.min.js +1 -1
- package/icons/starfill/index.vue +1 -7
- package/icons/thlarge/index.cjs.js +3 -9
- package/icons/thlarge/index.cjs.min.js +1 -1
- package/icons/thlarge/index.esm.js +3 -9
- package/icons/thlarge/index.esm.min.js +1 -1
- package/icons/thlarge/index.js +5 -10
- package/icons/thlarge/index.min.js +1 -1
- package/icons/thlarge/index.vue +1 -7
- package/icons/timescircle/index.cjs.js +3 -9
- package/icons/timescircle/index.cjs.min.js +1 -1
- package/icons/timescircle/index.esm.js +3 -9
- package/icons/timescircle/index.esm.min.js +1 -1
- package/icons/timescircle/index.js +5 -10
- package/icons/timescircle/index.min.js +1 -1
- package/icons/timescircle/index.vue +1 -7
- package/icons/trash/index.cjs.js +3 -9
- package/icons/trash/index.cjs.min.js +1 -1
- package/icons/trash/index.esm.js +3 -9
- package/icons/trash/index.esm.min.js +1 -1
- package/icons/trash/index.js +5 -10
- package/icons/trash/index.min.js +1 -1
- package/icons/trash/index.vue +1 -7
- package/icons/undo/index.cjs.js +3 -9
- package/icons/undo/index.cjs.min.js +1 -1
- package/icons/undo/index.esm.js +3 -9
- package/icons/undo/index.esm.min.js +1 -1
- package/icons/undo/index.js +5 -10
- package/icons/undo/index.min.js +1 -1
- package/icons/undo/index.vue +1 -7
- package/icons/upload/index.cjs.js +3 -9
- package/icons/upload/index.cjs.min.js +1 -1
- package/icons/upload/index.esm.js +3 -9
- package/icons/upload/index.esm.min.js +1 -1
- package/icons/upload/index.js +5 -10
- package/icons/upload/index.min.js +1 -1
- package/icons/upload/index.vue +1 -7
- package/icons/windowmaximize/index.cjs.js +3 -9
- package/icons/windowmaximize/index.cjs.min.js +1 -1
- package/icons/windowmaximize/index.esm.js +3 -9
- package/icons/windowmaximize/index.esm.min.js +1 -1
- package/icons/windowmaximize/index.js +5 -10
- package/icons/windowmaximize/index.min.js +1 -1
- package/icons/windowmaximize/index.vue +1 -7
- package/icons/windowminimize/index.cjs.js +3 -9
- package/icons/windowminimize/index.cjs.min.js +1 -1
- package/icons/windowminimize/index.esm.js +3 -9
- package/icons/windowminimize/index.esm.min.js +1 -1
- package/icons/windowminimize/index.js +5 -10
- package/icons/windowminimize/index.min.js +1 -1
- package/icons/windowminimize/index.vue +1 -7
- package/inputnumber/InputNumber.vue +18 -9
- package/inputnumber/inputnumber.cjs.js +14 -6
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +15 -7
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +14 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/BaseInputSwitch.vue +8 -4
- package/inputswitch/InputSwitch.d.ts +41 -20
- package/inputswitch/InputSwitch.vue +31 -33
- package/inputswitch/inputswitch.cjs.js +38 -42
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +38 -42
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +38 -42
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.cjs.js +4 -4
- package/inputswitch/style/inputswitchstyle.cjs.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.esm.js +4 -4
- package/inputswitch/style/inputswitchstyle.esm.min.js +1 -1
- package/inputswitch/style/inputswitchstyle.js +4 -4
- package/inputswitch/style/inputswitchstyle.min.js +1 -1
- package/listbox/BaseListbox.vue +4 -0
- package/listbox/Listbox.d.ts +6 -1
- package/listbox/Listbox.vue +47 -26
- package/listbox/listbox.cjs.js +88 -50
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +88 -50
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +88 -50
- package/listbox/listbox.min.js +1 -1
- package/listbox/style/listboxstyle.cjs.js +2 -3
- package/listbox/style/listboxstyle.cjs.min.js +1 -1
- package/listbox/style/listboxstyle.esm.js +2 -3
- package/listbox/style/listboxstyle.esm.min.js +1 -1
- package/listbox/style/listboxstyle.js +2 -3
- package/listbox/style/listboxstyle.min.js +1 -1
- package/megamenu/MegaMenu.vue +1 -1
- package/megamenu/megamenu.cjs.js +2 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +2 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +2 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menubar/Menubar.vue +1 -1
- package/menubar/menubar.cjs.js +2 -1
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +2 -1
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +2 -1
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +4 -0
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/metergroup/BaseMeterGroup.vue +41 -0
- package/metergroup/MeterGroup.d.ts +302 -0
- package/metergroup/MeterGroup.vue +73 -0
- package/metergroup/MeterGroupLabel.vue +36 -0
- package/metergroup/metergroup.cjs.js +218 -0
- package/metergroup/metergroup.cjs.min.js +1 -0
- package/metergroup/metergroup.esm.js +211 -0
- package/metergroup/metergroup.esm.min.js +1 -0
- package/metergroup/metergroup.js +218 -0
- package/metergroup/metergroup.min.js +1 -0
- package/metergroup/package.json +9 -0
- package/metergroup/style/MeterGroupStyle.d.ts +3 -0
- package/metergroup/style/metergroupstyle.cjs.js +40 -0
- package/metergroup/style/metergroupstyle.cjs.min.js +1 -0
- package/metergroup/style/metergroupstyle.esm.js +34 -0
- package/metergroup/style/metergroupstyle.esm.min.js +1 -0
- package/metergroup/style/metergroupstyle.js +43 -0
- package/metergroup/style/metergroupstyle.min.js +1 -0
- package/metergroup/style/package.json +6 -0
- package/multiselect/BaseMultiSelect.vue +9 -1
- package/multiselect/MultiSelect.d.ts +13 -19
- package/multiselect/MultiSelect.vue +108 -76
- package/multiselect/multiselect.cjs.js +173 -133
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +173 -134
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +174 -135
- package/multiselect/multiselect.min.js +1 -1
- package/multiselect/style/multiselectstyle.cjs.js +7 -30
- package/multiselect/style/multiselectstyle.cjs.min.js +1 -1
- package/multiselect/style/multiselectstyle.esm.js +7 -30
- package/multiselect/style/multiselectstyle.esm.min.js +1 -1
- package/multiselect/style/multiselectstyle.js +7 -30
- package/multiselect/style/multiselectstyle.min.js +1 -1
- package/orderlist/BaseOrderList.vue +8 -0
- package/orderlist/OrderList.d.ts +10 -0
- package/orderlist/OrderList.vue +72 -52
- package/orderlist/orderlist.cjs.js +79 -56
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +79 -56
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +79 -56
- package/orderlist/orderlist.min.js +1 -1
- package/orderlist/style/orderliststyle.cjs.js +1 -1
- package/orderlist/style/orderliststyle.cjs.min.js +1 -1
- package/orderlist/style/orderliststyle.esm.js +1 -1
- package/orderlist/style/orderliststyle.esm.min.js +1 -1
- package/orderlist/style/orderliststyle.js +1 -1
- package/orderlist/style/orderliststyle.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +4 -0
- package/overlaypanel/OverlayPanel.vue +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -1
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/panelmenu/PanelMenuList.vue +1 -1
- package/panelmenu/panelmenu.cjs.js +2 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +2 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +2 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/picklist/BasePickList.vue +8 -0
- package/picklist/PickList.d.ts +10 -0
- package/picklist/PickList.vue +72 -37
- package/picklist/picklist.cjs.js +81 -46
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +81 -46
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +81 -46
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.vue +1 -1
- package/progressbar/progressbar.cjs.js +3 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +3 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +3 -1
- package/progressbar/progressbar.min.js +1 -1
- package/radiobutton/BaseRadioButton.vue +9 -4
- package/radiobutton/RadioButton.d.ts +48 -22
- package/radiobutton/RadioButton.vue +36 -23
- package/radiobutton/radiobutton.cjs.js +42 -50
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +42 -50
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +42 -50
- package/radiobutton/radiobutton.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.cjs.js +5 -11
- package/radiobutton/style/radiobuttonstyle.cjs.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.esm.js +5 -11
- package/radiobutton/style/radiobuttonstyle.esm.min.js +1 -1
- package/radiobutton/style/radiobuttonstyle.js +5 -11
- package/radiobutton/style/radiobuttonstyle.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +432 -351
- package/resources/themes/arya-green/theme.css +432 -351
- package/resources/themes/arya-orange/theme.css +432 -351
- package/resources/themes/arya-purple/theme.css +432 -351
- package/resources/themes/aura-dark-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-amber/theme.css +7012 -0
- package/resources/themes/aura-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-blue/theme.css +7012 -0
- package/resources/themes/aura-dark-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-cyan/theme.css +7012 -0
- package/resources/themes/aura-dark-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-green/theme.css +7012 -0
- package/resources/themes/aura-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-indigo/theme.css +7012 -0
- package/resources/themes/aura-dark-lime/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-lime/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-lime/theme.css +7012 -0
- package/resources/themes/aura-dark-noir/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-noir/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-noir/theme.css +7012 -0
- package/resources/themes/aura-dark-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-pink/theme.css +7012 -0
- package/resources/themes/aura-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-purple/theme.css +7012 -0
- package/resources/themes/aura-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-dark-teal/theme.css +7012 -0
- package/resources/themes/aura-light-amber/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-amber/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-amber/theme.css +7014 -0
- package/resources/themes/aura-light-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-blue/theme.css +7014 -0
- package/resources/themes/aura-light-cyan/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-cyan/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-cyan/theme.css +7014 -0
- package/resources/themes/aura-light-green/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-green/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-green/theme.css +7014 -0
- package/resources/themes/aura-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-indigo/theme.css +7014 -0
- package/resources/themes/aura-light-lime/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-lime/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-lime/theme.css +7014 -0
- package/resources/themes/aura-light-noir/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-noir/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-noir/theme.css +7022 -0
- package/resources/themes/aura-light-pink/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-pink/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-pink/theme.css +7014 -0
- package/resources/themes/aura-light-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-purple/theme.css +7014 -0
- package/resources/themes/aura-light-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/aura-light-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/aura-light-teal/theme.css +7014 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +533 -403
- package/resources/themes/bootstrap4-dark-purple/theme.css +533 -403
- package/resources/themes/bootstrap4-light-blue/theme.css +533 -403
- package/resources/themes/bootstrap4-light-purple/theme.css +533 -403
- package/resources/themes/fluent-light/theme.css +431 -350
- package/resources/themes/lara-dark-amber/theme.css +534 -404
- package/resources/themes/lara-dark-blue/theme.css +534 -404
- package/resources/themes/lara-dark-cyan/theme.css +534 -404
- package/resources/themes/lara-dark-green/theme.css +534 -404
- package/resources/themes/lara-dark-indigo/theme.css +534 -404
- package/resources/themes/lara-dark-pink/theme.css +534 -404
- package/resources/themes/lara-dark-purple/theme.css +534 -404
- package/resources/themes/lara-dark-teal/theme.css +534 -404
- package/resources/themes/lara-light-amber/theme.css +535 -405
- package/resources/themes/lara-light-blue/theme.css +535 -405
- package/resources/themes/lara-light-cyan/theme.css +535 -405
- package/resources/themes/lara-light-green/theme.css +535 -405
- package/resources/themes/lara-light-indigo/theme.css +535 -405
- package/resources/themes/lara-light-pink/theme.css +535 -405
- package/resources/themes/lara-light-purple/theme.css +535 -405
- package/resources/themes/lara-light-teal/theme.css +535 -405
- package/resources/themes/luna-amber/theme.css +432 -351
- package/resources/themes/luna-blue/theme.css +432 -351
- package/resources/themes/luna-green/theme.css +432 -351
- package/resources/themes/luna-pink/theme.css +432 -351
- package/resources/themes/md-dark-deeppurple/theme.css +696 -431
- package/resources/themes/md-dark-indigo/theme.css +696 -431
- package/resources/themes/md-light-deeppurple/theme.css +700 -435
- package/resources/themes/md-light-indigo/theme.css +700 -435
- package/resources/themes/mdc-dark-deeppurple/theme.css +696 -431
- package/resources/themes/mdc-dark-indigo/theme.css +696 -431
- package/resources/themes/mdc-light-deeppurple/theme.css +700 -435
- package/resources/themes/mdc-light-indigo/theme.css +700 -435
- package/resources/themes/mira/theme.css +486 -405
- package/resources/themes/nano/theme.css +432 -351
- package/resources/themes/nova/theme.css +432 -351
- package/resources/themes/nova-accent/theme.css +432 -351
- package/resources/themes/nova-alt/theme.css +432 -351
- package/resources/themes/nova-vue/theme.css +432 -351
- package/resources/themes/rhea/theme.css +432 -351
- package/resources/themes/saga-blue/theme.css +432 -351
- package/resources/themes/saga-green/theme.css +432 -351
- package/resources/themes/saga-orange/theme.css +432 -351
- package/resources/themes/saga-purple/theme.css +432 -351
- package/resources/themes/soho-dark/theme.css +534 -404
- package/resources/themes/soho-light/theme.css +534 -404
- package/resources/themes/tailwind-light/theme.css +432 -351
- package/resources/themes/vela-blue/theme.css +432 -351
- package/resources/themes/vela-green/theme.css +432 -351
- package/resources/themes/vela-orange/theme.css +432 -351
- package/resources/themes/vela-purple/theme.css +432 -351
- package/resources/themes/viva-dark/theme.css +535 -405
- package/resources/themes/viva-light/theme.css +535 -405
- package/slider/Slider.vue +0 -1
- package/slider/slider.cjs.js +0 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +0 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +0 -1
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.vue +2 -2
- package/speeddial/speeddial.cjs.js +2 -2
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -2
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -2
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.cjs.js +8 -5
- package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.esm.js +8 -5
- package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.js +8 -5
- package/splitbutton/style/splitbuttonstyle.min.js +1 -1
- package/tabview/TabView.vue +2 -3
- package/tabview/tabview.cjs.js +3 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +3 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +3 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.vue +1 -1
- package/tag/tag.cjs.js +4 -2
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +4 -2
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +4 -2
- package/tag/tag.min.js +1 -1
- package/textarea/Textarea.d.ts +2 -2
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/tieredmenu.cjs.js +2 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +2 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +2 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/togglebutton/BaseToggleButton.vue +4 -4
- package/togglebutton/ToggleButton.d.ts +17 -24
- package/togglebutton/ToggleButton.vue +41 -67
- package/togglebutton/style/togglebuttonstyle.cjs.js +15 -8
- package/togglebutton/style/togglebuttonstyle.cjs.min.js +1 -1
- package/togglebutton/style/togglebuttonstyle.esm.js +15 -8
- package/togglebutton/style/togglebuttonstyle.esm.min.js +1 -1
- package/togglebutton/style/togglebuttonstyle.js +15 -8
- package/togglebutton/style/togglebuttonstyle.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +45 -80
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +46 -81
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +46 -82
- package/togglebutton/togglebutton.min.js +1 -1
- package/tree/BaseTree.vue +4 -0
- package/tree/Tree.d.ts +6 -9
- package/tree/Tree.vue +1 -1
- package/tree/TreeNode.vue +14 -11
- package/tree/style/treestyle.cjs.js +3 -6
- package/tree/style/treestyle.cjs.min.js +1 -1
- package/tree/style/treestyle.esm.js +3 -6
- package/tree/style/treestyle.esm.min.js +1 -1
- package/tree/style/treestyle.js +3 -6
- package/tree/style/treestyle.min.js +1 -1
- package/tree/tree.cjs.js +34 -21
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +34 -22
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +35 -23
- package/tree/tree.min.js +1 -1
- package/treetable/BodyCell.vue +26 -24
- package/treetable/TreeTable.vue +3 -1
- package/treetable/TreeTableRow.vue +2 -0
- package/treetable/style/treetablestyle.cjs.js +4 -13
- package/treetable/style/treetablestyle.cjs.min.js +1 -1
- package/treetable/style/treetablestyle.esm.js +4 -13
- package/treetable/style/treetablestyle.esm.min.js +1 -1
- package/treetable/style/treetablestyle.js +4 -13
- package/treetable/style/treetablestyle.min.js +1 -1
- package/treetable/treetable.cjs.js +39 -44
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +39 -45
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +40 -46
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/BaseTriStateCheckbox.vue +17 -9
- package/tristatecheckbox/TriStateCheckbox.d.ts +34 -23
- package/tristatecheckbox/TriStateCheckbox.vue +49 -61
- package/tristatecheckbox/style/tristatecheckboxstyle.cjs.js +7 -13
- package/tristatecheckbox/style/tristatecheckboxstyle.cjs.min.js +1 -1
- package/tristatecheckbox/style/tristatecheckboxstyle.esm.js +7 -13
- package/tristatecheckbox/style/tristatecheckboxstyle.esm.min.js +1 -1
- package/tristatecheckbox/style/tristatecheckboxstyle.js +7 -13
- package/tristatecheckbox/style/tristatecheckboxstyle.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +69 -87
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +70 -88
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +69 -87
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +14 -6
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +14 -6
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +14 -6
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +24 -0
- package/vetur-tags.json +6 -0
- package/virtualscroller/BaseVirtualScroller.vue +1 -1
- package/virtualscroller/VirtualScroller.vue +58 -50
- package/virtualscroller/virtualscroller.cjs.js +90 -77
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +90 -77
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +90 -77
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +71 -6
package/checkbox/checkbox.esm.js
CHANGED
|
@@ -51,10 +51,6 @@ var script$1 = {
|
|
|
51
51
|
type: Object,
|
|
52
52
|
"default": null
|
|
53
53
|
},
|
|
54
|
-
inputProps: {
|
|
55
|
-
type: null,
|
|
56
|
-
"default": null
|
|
57
|
-
},
|
|
58
54
|
ariaLabelledby: {
|
|
59
55
|
type: String,
|
|
60
56
|
"default": null
|
|
@@ -81,23 +77,17 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
81
77
|
var script = {
|
|
82
78
|
name: 'Checkbox',
|
|
83
79
|
"extends": script$1,
|
|
84
|
-
emits: ['
|
|
85
|
-
data: function data() {
|
|
86
|
-
return {
|
|
87
|
-
focused: false
|
|
88
|
-
};
|
|
89
|
-
},
|
|
80
|
+
emits: ['update:modelValue', 'change', 'focus', 'blur'],
|
|
90
81
|
methods: {
|
|
91
82
|
getPTOptions: function getPTOptions(key) {
|
|
92
83
|
return this.ptm(key, {
|
|
93
84
|
context: {
|
|
94
85
|
checked: this.checked,
|
|
95
|
-
focused: this.focused,
|
|
96
86
|
disabled: this.disabled
|
|
97
87
|
}
|
|
98
88
|
});
|
|
99
89
|
},
|
|
100
|
-
|
|
90
|
+
onChange: function onChange(event) {
|
|
101
91
|
var _this = this;
|
|
102
92
|
if (!this.disabled && !this.readonly) {
|
|
103
93
|
var newModelValue;
|
|
@@ -108,19 +98,14 @@ var script = {
|
|
|
108
98
|
return !ObjectUtils.equals(val, _this.value);
|
|
109
99
|
});else newModelValue = this.modelValue ? [].concat(_toConsumableArray(this.modelValue), [this.value]) : [this.value];
|
|
110
100
|
}
|
|
111
|
-
this.$emit('click', event);
|
|
112
101
|
this.$emit('update:modelValue', newModelValue);
|
|
113
102
|
this.$emit('change', event);
|
|
114
|
-
this.$emit('input', newModelValue);
|
|
115
|
-
this.$refs.input.focus();
|
|
116
103
|
}
|
|
117
104
|
},
|
|
118
105
|
onFocus: function onFocus(event) {
|
|
119
|
-
this.focused = true;
|
|
120
106
|
this.$emit('focus', event);
|
|
121
107
|
},
|
|
122
108
|
onBlur: function onBlur(event) {
|
|
123
|
-
this.focused = false;
|
|
124
109
|
this.$emit('blur', event);
|
|
125
110
|
}
|
|
126
111
|
},
|
|
@@ -134,31 +119,21 @@ var script = {
|
|
|
134
119
|
}
|
|
135
120
|
};
|
|
136
121
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
140
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
141
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
142
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
143
|
-
var _hoisted_1 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "required", "aria-labelledby", "aria-label"];
|
|
144
|
-
var _hoisted_2 = ["data-p-highlight", "data-p-disabled", "data-p-focused"];
|
|
122
|
+
var _hoisted_1 = ["data-p-highlight", "data-p-disabled"];
|
|
123
|
+
var _hoisted_2 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "required", "aria-labelledby", "aria-label"];
|
|
145
124
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
146
125
|
var _component_CheckIcon = resolveComponent("CheckIcon");
|
|
147
126
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
148
|
-
"class": _ctx.cx('root')
|
|
149
|
-
onClick: _cache[2] || (_cache[2] = function ($event) {
|
|
150
|
-
return $options.onClick($event);
|
|
151
|
-
})
|
|
127
|
+
"class": _ctx.cx('root')
|
|
152
128
|
}, $options.getPTOptions('root'), {
|
|
153
|
-
"data-pc-name": "checkbox"
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
}, _ctx.ptm('hiddenInputWrapper'), {
|
|
157
|
-
"data-p-hidden-accessible": true
|
|
129
|
+
"data-pc-name": "checkbox",
|
|
130
|
+
"data-p-highlight": $options.checked,
|
|
131
|
+
"data-p-disabled": _ctx.disabled
|
|
158
132
|
}), [createElementVNode("input", mergeProps({
|
|
159
|
-
ref: "input",
|
|
160
133
|
id: _ctx.inputId,
|
|
161
134
|
type: "checkbox",
|
|
135
|
+
"class": [_ctx.cx('input'), _ctx.inputClass],
|
|
136
|
+
style: _ctx.inputStyle,
|
|
162
137
|
value: _ctx.value,
|
|
163
138
|
name: _ctx.name,
|
|
164
139
|
checked: $options.checked,
|
|
@@ -168,21 +143,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
168
143
|
required: _ctx.required,
|
|
169
144
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
170
145
|
"aria-label": _ctx.ariaLabel,
|
|
171
|
-
onFocus: _cache[0] || (_cache[0] = function (
|
|
172
|
-
return $options.onFocus($
|
|
146
|
+
onFocus: _cache[0] || (_cache[0] = function () {
|
|
147
|
+
return $options.onFocus && $options.onFocus.apply($options, arguments);
|
|
173
148
|
}),
|
|
174
|
-
onBlur: _cache[1] || (_cache[1] = function (
|
|
175
|
-
return $options.onBlur($
|
|
149
|
+
onBlur: _cache[1] || (_cache[1] = function () {
|
|
150
|
+
return $options.onBlur && $options.onBlur.apply($options, arguments);
|
|
151
|
+
}),
|
|
152
|
+
onChange: _cache[2] || (_cache[2] = function () {
|
|
153
|
+
return $options.onChange && $options.onChange.apply($options, arguments);
|
|
176
154
|
})
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
style: _ctx.inputStyle
|
|
181
|
-
}, _objectSpread(_objectSpread({}, _ctx.inputProps), $options.getPTOptions('input')), {
|
|
182
|
-
"data-p-highlight": $options.checked,
|
|
183
|
-
"data-p-disabled": _ctx.disabled,
|
|
184
|
-
"data-p-focused": $data.focused
|
|
185
|
-
}), [renderSlot(_ctx.$slots, "icon", {
|
|
155
|
+
}, $options.getPTOptions('input')), null, 16, _hoisted_2), createElementVNode("div", mergeProps({
|
|
156
|
+
"class": _ctx.cx('box')
|
|
157
|
+
}, $options.getPTOptions('box')), [renderSlot(_ctx.$slots, "icon", {
|
|
186
158
|
checked: $options.checked,
|
|
187
159
|
"class": normalizeClass(_ctx.cx('icon'))
|
|
188
160
|
}, function () {
|
|
@@ -190,7 +162,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
190
162
|
key: 0,
|
|
191
163
|
"class": _ctx.cx('icon')
|
|
192
164
|
}, $options.getPTOptions('icon')), null, 16, ["class"])) : createCommentVNode("", true)];
|
|
193
|
-
})], 16
|
|
165
|
+
})], 16)], 16, _hoisted_1);
|
|
194
166
|
}
|
|
195
167
|
|
|
196
168
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/icons/check";import{ObjectUtils as t}from"primevue/utils";import n from"primevue/basecomponent";import
|
|
1
|
+
import e from"primevue/icons/check";import{ObjectUtils as t}from"primevue/utils";import n from"primevue/basecomponent";import a from"primevue/checkbox/style";import{resolveComponent as l,openBlock as i,createElementBlock as r,mergeProps as o,createElementVNode as u,renderSlot as c,normalizeClass as d,createBlock as s,createCommentVNode as p}from"vue";function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function m(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return y(e)}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var g={name:"Checkbox",extends:{name:"BaseCheckbox",extends:n,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:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,disabled:this.disabled}})},onChange:function(e){var n,a,l=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.equals(e,l.value)})):this.modelValue?[].concat(f(a=this.modelValue)||m(a)||b(a)||h(),[this.value]):[this.value],this.$emit("update:modelValue",n),this.$emit("change",e))},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e){this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.contains(this.value,this.modelValue)}},components:{CheckIcon:e}},v=["data-p-highlight","data-p-disabled"],k=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"];g.render=function(e,t,n,a,h,b){var m=l("CheckIcon");return i(),r("div",o({class:e.cx("root")},b.getPTOptions("root"),{"data-pc-name":"checkbox","data-p-highlight":b.checked,"data-p-disabled":e.disabled}),[u("input",o({id:e.inputId,type:"checkbox",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.value,name:e.name,checked:b.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(){return b.onFocus&&b.onFocus.apply(b,arguments)}),onBlur:t[1]||(t[1]=function(){return b.onBlur&&b.onBlur.apply(b,arguments)}),onChange:t[2]||(t[2]=function(){return b.onChange&&b.onChange.apply(b,arguments)})},b.getPTOptions("input")),null,16,k),u("div",o({class:e.cx("box")},b.getPTOptions("box")),[c(e.$slots,"icon",{checked:b.checked,class:d(e.cx("icon"))},(function(){return[b.checked?(i(),s(m,o({key:0,class:e.cx("icon")},b.getPTOptions("icon")),null,16,["class"])):p("",!0)]}))],16)],16,v)};export{g as default};
|
package/checkbox/checkbox.js
CHANGED
|
@@ -55,10 +55,6 @@ this.primevue.checkbox = (function (CheckIcon, utils, BaseComponent, CheckboxSty
|
|
|
55
55
|
type: Object,
|
|
56
56
|
"default": null
|
|
57
57
|
},
|
|
58
|
-
inputProps: {
|
|
59
|
-
type: null,
|
|
60
|
-
"default": null
|
|
61
|
-
},
|
|
62
58
|
ariaLabelledby: {
|
|
63
59
|
type: String,
|
|
64
60
|
"default": null
|
|
@@ -85,23 +81,17 @@ this.primevue.checkbox = (function (CheckIcon, utils, BaseComponent, CheckboxSty
|
|
|
85
81
|
var script = {
|
|
86
82
|
name: 'Checkbox',
|
|
87
83
|
"extends": script$1,
|
|
88
|
-
emits: ['
|
|
89
|
-
data: function data() {
|
|
90
|
-
return {
|
|
91
|
-
focused: false
|
|
92
|
-
};
|
|
93
|
-
},
|
|
84
|
+
emits: ['update:modelValue', 'change', 'focus', 'blur'],
|
|
94
85
|
methods: {
|
|
95
86
|
getPTOptions: function getPTOptions(key) {
|
|
96
87
|
return this.ptm(key, {
|
|
97
88
|
context: {
|
|
98
89
|
checked: this.checked,
|
|
99
|
-
focused: this.focused,
|
|
100
90
|
disabled: this.disabled
|
|
101
91
|
}
|
|
102
92
|
});
|
|
103
93
|
},
|
|
104
|
-
|
|
94
|
+
onChange: function onChange(event) {
|
|
105
95
|
var _this = this;
|
|
106
96
|
if (!this.disabled && !this.readonly) {
|
|
107
97
|
var newModelValue;
|
|
@@ -112,19 +102,14 @@ this.primevue.checkbox = (function (CheckIcon, utils, BaseComponent, CheckboxSty
|
|
|
112
102
|
return !utils.ObjectUtils.equals(val, _this.value);
|
|
113
103
|
});else newModelValue = this.modelValue ? [].concat(_toConsumableArray(this.modelValue), [this.value]) : [this.value];
|
|
114
104
|
}
|
|
115
|
-
this.$emit('click', event);
|
|
116
105
|
this.$emit('update:modelValue', newModelValue);
|
|
117
106
|
this.$emit('change', event);
|
|
118
|
-
this.$emit('input', newModelValue);
|
|
119
|
-
this.$refs.input.focus();
|
|
120
107
|
}
|
|
121
108
|
},
|
|
122
109
|
onFocus: function onFocus(event) {
|
|
123
|
-
this.focused = true;
|
|
124
110
|
this.$emit('focus', event);
|
|
125
111
|
},
|
|
126
112
|
onBlur: function onBlur(event) {
|
|
127
|
-
this.focused = false;
|
|
128
113
|
this.$emit('blur', event);
|
|
129
114
|
}
|
|
130
115
|
},
|
|
@@ -138,31 +123,21 @@ this.primevue.checkbox = (function (CheckIcon, utils, BaseComponent, CheckboxSty
|
|
|
138
123
|
}
|
|
139
124
|
};
|
|
140
125
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
144
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
145
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
146
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
147
|
-
var _hoisted_1 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "required", "aria-labelledby", "aria-label"];
|
|
148
|
-
var _hoisted_2 = ["data-p-highlight", "data-p-disabled", "data-p-focused"];
|
|
126
|
+
var _hoisted_1 = ["data-p-highlight", "data-p-disabled"];
|
|
127
|
+
var _hoisted_2 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "required", "aria-labelledby", "aria-label"];
|
|
149
128
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
150
129
|
var _component_CheckIcon = vue.resolveComponent("CheckIcon");
|
|
151
130
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
152
|
-
"class": _ctx.cx('root')
|
|
153
|
-
onClick: _cache[2] || (_cache[2] = function ($event) {
|
|
154
|
-
return $options.onClick($event);
|
|
155
|
-
})
|
|
131
|
+
"class": _ctx.cx('root')
|
|
156
132
|
}, $options.getPTOptions('root'), {
|
|
157
|
-
"data-pc-name": "checkbox"
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
}, _ctx.ptm('hiddenInputWrapper'), {
|
|
161
|
-
"data-p-hidden-accessible": true
|
|
133
|
+
"data-pc-name": "checkbox",
|
|
134
|
+
"data-p-highlight": $options.checked,
|
|
135
|
+
"data-p-disabled": _ctx.disabled
|
|
162
136
|
}), [vue.createElementVNode("input", vue.mergeProps({
|
|
163
|
-
ref: "input",
|
|
164
137
|
id: _ctx.inputId,
|
|
165
138
|
type: "checkbox",
|
|
139
|
+
"class": [_ctx.cx('input'), _ctx.inputClass],
|
|
140
|
+
style: _ctx.inputStyle,
|
|
166
141
|
value: _ctx.value,
|
|
167
142
|
name: _ctx.name,
|
|
168
143
|
checked: $options.checked,
|
|
@@ -172,21 +147,18 @@ this.primevue.checkbox = (function (CheckIcon, utils, BaseComponent, CheckboxSty
|
|
|
172
147
|
required: _ctx.required,
|
|
173
148
|
"aria-labelledby": _ctx.ariaLabelledby,
|
|
174
149
|
"aria-label": _ctx.ariaLabel,
|
|
175
|
-
onFocus: _cache[0] || (_cache[0] = function (
|
|
176
|
-
return $options.onFocus($
|
|
150
|
+
onFocus: _cache[0] || (_cache[0] = function () {
|
|
151
|
+
return $options.onFocus && $options.onFocus.apply($options, arguments);
|
|
177
152
|
}),
|
|
178
|
-
onBlur: _cache[1] || (_cache[1] = function (
|
|
179
|
-
return $options.onBlur($
|
|
153
|
+
onBlur: _cache[1] || (_cache[1] = function () {
|
|
154
|
+
return $options.onBlur && $options.onBlur.apply($options, arguments);
|
|
155
|
+
}),
|
|
156
|
+
onChange: _cache[2] || (_cache[2] = function () {
|
|
157
|
+
return $options.onChange && $options.onChange.apply($options, arguments);
|
|
180
158
|
})
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
style: _ctx.inputStyle
|
|
185
|
-
}, _objectSpread(_objectSpread({}, _ctx.inputProps), $options.getPTOptions('input')), {
|
|
186
|
-
"data-p-highlight": $options.checked,
|
|
187
|
-
"data-p-disabled": _ctx.disabled,
|
|
188
|
-
"data-p-focused": $data.focused
|
|
189
|
-
}), [vue.renderSlot(_ctx.$slots, "icon", {
|
|
159
|
+
}, $options.getPTOptions('input')), null, 16, _hoisted_2), vue.createElementVNode("div", vue.mergeProps({
|
|
160
|
+
"class": _ctx.cx('box')
|
|
161
|
+
}, $options.getPTOptions('box')), [vue.renderSlot(_ctx.$slots, "icon", {
|
|
190
162
|
checked: $options.checked,
|
|
191
163
|
"class": vue.normalizeClass(_ctx.cx('icon'))
|
|
192
164
|
}, function () {
|
|
@@ -194,7 +166,7 @@ this.primevue.checkbox = (function (CheckIcon, utils, BaseComponent, CheckboxSty
|
|
|
194
166
|
key: 0,
|
|
195
167
|
"class": _ctx.cx('icon')
|
|
196
168
|
}, $options.getPTOptions('icon')), null, 16, ["class"])) : vue.createCommentVNode("", true)];
|
|
197
|
-
})], 16
|
|
169
|
+
})], 16)], 16, _hoisted_1);
|
|
198
170
|
}
|
|
199
171
|
|
|
200
172
|
script.render = render;
|
package/checkbox/checkbox.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.checkbox=function(e,t,n,
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.checkbox=function(e,t,n,a,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e);function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p={name:"Checkbox",extends:{name:"BaseCheckbox",extends:r(n).default,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:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:r(a).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],methods:{getPTOptions:function(e){return this.ptm(e,{context:{checked:this.checked,disabled:this.disabled}})},onChange:function(e){var n,a,l=this;this.disabled||this.readonly||(n=this.binary?this.checked?this.falseValue:this.trueValue:this.checked?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,l.value)})):this.modelValue?[].concat(s(a=this.modelValue)||c(a)||u(a)||o(),[this.value]):[this.value],this.$emit("update:modelValue",n),this.$emit("change",e))},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e){this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:t.ObjectUtils.contains(this.value,this.modelValue)}},components:{CheckIcon:i.default}},h=["data-p-highlight","data-p-disabled"],b=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label"];return p.render=function(e,t,n,a,r,i){var o=l.resolveComponent("CheckIcon");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:e.cx("root")},i.getPTOptions("root"),{"data-pc-name":"checkbox","data-p-highlight":i.checked,"data-p-disabled":e.disabled}),[l.createElementVNode("input",l.mergeProps({id:e.inputId,type:"checkbox",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.value,name:e.name,checked:i.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onBlur:t[1]||(t[1]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onChange:t[2]||(t[2]=function(){return i.onChange&&i.onChange.apply(i,arguments)})},i.getPTOptions("input")),null,16,b),l.createElementVNode("div",l.mergeProps({class:e.cx("box")},i.getPTOptions("box")),[l.renderSlot(e.$slots,"icon",{checked:i.checked,class:l.normalizeClass(e.cx("icon"))},(function(){return[i.checked?(l.openBlock(),l.createBlock(o,l.mergeProps({key:0,class:e.cx("icon")},i.getPTOptions("icon")),null,16,["class"])):l.createCommentVNode("",!0)]}))],16)],16,h)},p}(primevue.icons.check,primevue.utils,primevue.basecomponent,primevue.checkbox.style,Vue);
|
|
@@ -6,29 +6,23 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
6
6
|
|
|
7
7
|
var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);
|
|
8
8
|
|
|
9
|
+
var css = "\n@layer primevue {\n .p-checkbox {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n }\n\n .p-checkbox-input {\n cursor: pointer;\n }\n\n .p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n";
|
|
9
10
|
var classes = {
|
|
10
11
|
root: function root(_ref) {
|
|
11
12
|
var instance = _ref.instance,
|
|
12
13
|
props = _ref.props;
|
|
13
14
|
return ['p-checkbox p-component', {
|
|
14
|
-
'p-checkbox-checked': instance.checked,
|
|
15
|
-
'p-checkbox-disabled': props.disabled,
|
|
16
|
-
'p-checkbox-focused': instance.focused
|
|
17
|
-
}];
|
|
18
|
-
},
|
|
19
|
-
input: function input(_ref2) {
|
|
20
|
-
var instance = _ref2.instance,
|
|
21
|
-
props = _ref2.props;
|
|
22
|
-
return ['p-checkbox-box', {
|
|
23
15
|
'p-highlight': instance.checked,
|
|
24
|
-
'p-disabled': props.disabled
|
|
25
|
-
'p-focus': instance.focused
|
|
16
|
+
'p-disabled': props.disabled
|
|
26
17
|
}];
|
|
27
18
|
},
|
|
19
|
+
box: 'p-checkbox-box',
|
|
20
|
+
input: 'p-checkbox-input',
|
|
28
21
|
icon: 'p-checkbox-icon'
|
|
29
22
|
};
|
|
30
23
|
var CheckboxStyle = BaseStyle__default["default"].extend({
|
|
31
24
|
name: 'checkbox',
|
|
25
|
+
css: css,
|
|
32
26
|
classes: classes
|
|
33
27
|
});
|
|
34
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=e(require("primevue/base/style")).default.extend({name:"checkbox",css:"\n@layer primevue {\n .p-checkbox {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n }\n\n .p-checkbox-input {\n cursor: pointer;\n }\n\n .p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n",classes:{root:function(e){return["p-checkbox p-component",{"p-highlight":e.instance.checked,"p-disabled":e.props.disabled}]},box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"}});module.exports=n;
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import BaseStyle from 'primevue/base/style';
|
|
2
2
|
|
|
3
|
+
var css = "\n@layer primevue {\n .p-checkbox {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n }\n\n .p-checkbox-input {\n cursor: pointer;\n }\n\n .p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n";
|
|
3
4
|
var classes = {
|
|
4
5
|
root: function root(_ref) {
|
|
5
6
|
var instance = _ref.instance,
|
|
6
7
|
props = _ref.props;
|
|
7
8
|
return ['p-checkbox p-component', {
|
|
8
|
-
'p-checkbox-checked': instance.checked,
|
|
9
|
-
'p-checkbox-disabled': props.disabled,
|
|
10
|
-
'p-checkbox-focused': instance.focused
|
|
11
|
-
}];
|
|
12
|
-
},
|
|
13
|
-
input: function input(_ref2) {
|
|
14
|
-
var instance = _ref2.instance,
|
|
15
|
-
props = _ref2.props;
|
|
16
|
-
return ['p-checkbox-box', {
|
|
17
9
|
'p-highlight': instance.checked,
|
|
18
|
-
'p-disabled': props.disabled
|
|
19
|
-
'p-focus': instance.focused
|
|
10
|
+
'p-disabled': props.disabled
|
|
20
11
|
}];
|
|
21
12
|
},
|
|
13
|
+
box: 'p-checkbox-box',
|
|
14
|
+
input: 'p-checkbox-input',
|
|
22
15
|
icon: 'p-checkbox-icon'
|
|
23
16
|
};
|
|
24
17
|
var CheckboxStyle = BaseStyle.extend({
|
|
25
18
|
name: 'checkbox',
|
|
19
|
+
css: css,
|
|
26
20
|
classes: classes
|
|
27
21
|
});
|
|
28
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/base/style";var
|
|
1
|
+
import e from"primevue/base/style";var n=e.extend({name:"checkbox",css:"\n@layer primevue {\n .p-checkbox {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n }\n\n .p-checkbox-input {\n cursor: pointer;\n }\n\n .p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n",classes:{root:function(e){return["p-checkbox p-component",{"p-highlight":e.instance.checked,"p-disabled":e.props.disabled}]},box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"}});export{n as default};
|
|
@@ -7,29 +7,23 @@ this.primevue.checkbox.style = (function (BaseStyle) {
|
|
|
7
7
|
|
|
8
8
|
var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);
|
|
9
9
|
|
|
10
|
+
var css = "\n@layer primevue {\n .p-checkbox {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n }\n\n .p-checkbox-input {\n cursor: pointer;\n }\n\n .p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n";
|
|
10
11
|
var classes = {
|
|
11
12
|
root: function root(_ref) {
|
|
12
13
|
var instance = _ref.instance,
|
|
13
14
|
props = _ref.props;
|
|
14
15
|
return ['p-checkbox p-component', {
|
|
15
|
-
'p-checkbox-checked': instance.checked,
|
|
16
|
-
'p-checkbox-disabled': props.disabled,
|
|
17
|
-
'p-checkbox-focused': instance.focused
|
|
18
|
-
}];
|
|
19
|
-
},
|
|
20
|
-
input: function input(_ref2) {
|
|
21
|
-
var instance = _ref2.instance,
|
|
22
|
-
props = _ref2.props;
|
|
23
|
-
return ['p-checkbox-box', {
|
|
24
16
|
'p-highlight': instance.checked,
|
|
25
|
-
'p-disabled': props.disabled
|
|
26
|
-
'p-focus': instance.focused
|
|
17
|
+
'p-disabled': props.disabled
|
|
27
18
|
}];
|
|
28
19
|
},
|
|
20
|
+
box: 'p-checkbox-box',
|
|
21
|
+
input: 'p-checkbox-input',
|
|
29
22
|
icon: 'p-checkbox-icon'
|
|
30
23
|
};
|
|
31
24
|
var CheckboxStyle = BaseStyle__default["default"].extend({
|
|
32
25
|
name: 'checkbox',
|
|
26
|
+
css: css,
|
|
33
27
|
classes: classes
|
|
34
28
|
});
|
|
35
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.checkbox=this.primevue.checkbox||{},this.primevue.checkbox.style=function(e){"use strict";function
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.checkbox=this.primevue.checkbox||{},this.primevue.checkbox.style=function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}return n(primevue.base.style).default.extend({name:"checkbox",css:"\n@layer primevue {\n .p-checkbox {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n }\n\n .p-checkbox-input {\n cursor: pointer;\n }\n\n .p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n",classes:{root:function(e){return["p-checkbox p-component",{"p-highlight":e.instance.checked,"p-disabled":e.props.disabled}]},box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"}})}();
|
package/chips/Chips.vue
CHANGED
|
@@ -140,11 +140,12 @@ export default {
|
|
|
140
140
|
},
|
|
141
141
|
onPaste(event) {
|
|
142
142
|
if (this.separator) {
|
|
143
|
+
let separator = this.separator.replace('\\n', '\n').replace('\\r', '\r').replace('\\t', '\t');
|
|
143
144
|
let pastedData = (event.clipboardData || window['clipboardData']).getData('Text');
|
|
144
145
|
|
|
145
146
|
if (pastedData) {
|
|
146
147
|
let value = this.modelValue || [];
|
|
147
|
-
let pastedValues = pastedData.split(
|
|
148
|
+
let pastedValues = pastedData.split(separator);
|
|
148
149
|
|
|
149
150
|
pastedValues = pastedValues.filter((val) => this.allowDuplicate || value.indexOf(val) === -1);
|
|
150
151
|
value = [...value, ...pastedValues];
|
package/chips/chips.cjs.js
CHANGED
|
@@ -156,10 +156,11 @@ var script = {
|
|
|
156
156
|
onPaste: function onPaste(event) {
|
|
157
157
|
var _this = this;
|
|
158
158
|
if (this.separator) {
|
|
159
|
+
var separator = this.separator.replace('\\n', '\n').replace('\\r', '\r').replace('\\t', '\t');
|
|
159
160
|
var pastedData = (event.clipboardData || window['clipboardData']).getData('Text');
|
|
160
161
|
if (pastedData) {
|
|
161
162
|
var value = this.modelValue || [];
|
|
162
|
-
var pastedValues = pastedData.split(
|
|
163
|
+
var pastedValues = pastedData.split(separator);
|
|
163
164
|
pastedValues = pastedValues.filter(function (val) {
|
|
164
165
|
return _this.allowDuplicate || value.indexOf(val) === -1;
|
|
165
166
|
});
|
package/chips/chips.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/icons/timescircle"),t=require("primevue/utils"),n=require("primevue/basecomponent"),o=require("primevue/chips/style"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function l(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":case"NumpadEnter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=(e.clipboardData||window.clipboardData).getData("Text");if(
|
|
1
|
+
"use strict";var e=require("primevue/icons/timescircle"),t=require("primevue/utils"),n=require("primevue/basecomponent"),o=require("primevue/chips/style"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e);function l(e){return d(e)||c(e)||s(e)||u()}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var f={name:"Chips",extends:{name:"BaseChips",extends:i(n).default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:i(o).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":case"NumpadEnter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=this.separator.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t"),o=(e.clipboardData||window.clipboardData).getData("Text");if(o){var r=this.modelValue||[],i=o.split(n);i=i.filter((function(e){return t.allowDuplicate||-1===r.indexOf(e)})),r=[].concat(l(r),l(i)),this.updateModel(e,r,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?l(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=l(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:a.default}};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){var o;return(t="symbol"==m(o=v(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var g=["aria-labelledby","aria-label","aria-activedescendant"],I=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],x=["id","disabled","placeholder"];f.render=function(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?a.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return a.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return a.onContainerFocus&&a.onContainerFocus.apply(a,arguments)}),onBlur:t[7]||(t[7]=function(){return a.onContainerBlur&&a.onContainerBlur.apply(a,arguments)}),onKeydown:t[8]||(t[8]=function(){return a.onContainerKeyDown&&a.onContainerKeyDown.apply(a,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(t,n){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(n,"_").concat(t),id:i.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===n}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:t},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(t),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return a.removeItem(e,n)},removeCallback:function(e){return a.removeItem(e,n)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return a.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,I)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||a.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return a.onBlur(e)}),onInput:t[2]||(t[2]=function(){return a.onInput&&a.onInput.apply(a,arguments)}),onKeydown:t[3]||(t[3]=function(e){return a.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return a.onPaste(e)})},y(y({},e.inputProps),e.ptm("input"))),null,16,x)],16)],16,g)],16)},module.exports=f;
|
package/chips/chips.esm.js
CHANGED
|
@@ -148,10 +148,11 @@ var script = {
|
|
|
148
148
|
onPaste: function onPaste(event) {
|
|
149
149
|
var _this = this;
|
|
150
150
|
if (this.separator) {
|
|
151
|
+
var separator = this.separator.replace('\\n', '\n').replace('\\r', '\r').replace('\\t', '\t');
|
|
151
152
|
var pastedData = (event.clipboardData || window['clipboardData']).getData('Text');
|
|
152
153
|
if (pastedData) {
|
|
153
154
|
var value = this.modelValue || [];
|
|
154
|
-
var pastedValues = pastedData.split(
|
|
155
|
+
var pastedValues = pastedData.split(separator);
|
|
155
156
|
pastedValues = pastedValues.filter(function (val) {
|
|
156
157
|
return _this.allowDuplicate || value.indexOf(val) === -1;
|
|
157
158
|
});
|
package/chips/chips.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/icons/timescircle";import{UniqueComponentId as t}from"primevue/utils";import n from"primevue/basecomponent";import o from"primevue/chips/style";import{openBlock as
|
|
1
|
+
import e from"primevue/icons/timescircle";import{UniqueComponentId as t}from"primevue/utils";import n from"primevue/basecomponent";import o from"primevue/chips/style";import{openBlock as r,createElementBlock as i,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as d,toDisplayString as p,createBlock as f,resolveDynamicComponent as m}from"vue";function h(e){return I(e)||v(e)||b(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e){if(Array.isArray(e))return g(e)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var x={name:"Chips",extends:{name:"BaseChips",extends:n,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:o,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:t(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var t=e.target.value;switch(e.code){case"Backspace":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":case"NumpadEnter":t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;case"ArrowLeft":0===t.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,t,!0)}},onPaste:function(e){var t=this;if(this.separator){var n=this.separator.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t"),o=(e.clipboardData||window.clipboardData).getData("Text");if(o){var r=this.modelValue||[],i=o.split(n);i=i.filter((function(e){return t.allowDuplicate||-1===r.indexOf(e)})),r=[].concat(h(r),h(i)),this.updateModel(e,r,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,t,n){var o=this;this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),n&&e.preventDefault()},addItem:function(e,t,n){if(t&&t.trim().length){var o=this.modelValue?h(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(t))&&(o.push(t),this.updateModel(e,o,n))}},removeItem:function(e,t){if(!this.disabled){var n=h(this.modelValue),o=n.splice(t,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){var o;return(t="symbol"==O(o=S(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=O(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var C=["aria-labelledby","aria-label","aria-activedescendant"],j=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],B=["id","disabled","placeholder"];x.render=function(e,t,n,o,h,y){return r(),i("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":h.focused?y.focusedOptionId:void 0,onClick:t[5]||(t[5]=function(e){return y.onWrapperClick()}),onFocus:t[6]||(t[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:t[7]||(t[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:t[8]||(t[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(r(!0),i(u,null,s(e.modelValue,(function(t,n){return r(),i("li",a({key:"".concat(n,"_").concat(t),id:h.id+"_chips_item_"+n,role:"option",class:e.cx("token",{index:n}),"aria-label":t,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token"),{"data-p-focused":h.focusedIndex===n}),[c(e.$slots,"chip",{class:d(e.cx("label")),value:t},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),p(t),17)]})),c(e.$slots,"removetokenicon",{class:d(e.cx("removeTokenIcon")),index:n,onClick:function(e){return y.removeItem(e,n)},removeCallback:function(e){return y.removeItem(e,n)}},(function(){return[(r(),f(m(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,j)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:t[0]||(t[0]=function(e){return y.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return y.onBlur(e)}),onInput:t[2]||(t[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:t[3]||(t[3]=function(e){return y.onKeyDown(e)}),onPaste:t[4]||(t[4]=function(e){return y.onPaste(e)})},k(k({},e.inputProps),e.ptm("input"))),null,16,B)],16)],16,C)],16)};export{x as default};
|