primevue 3.32.0 → 3.32.1
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/accordion/Accordion.d.ts +2 -2
- package/accordiontab/AccordionTab.d.ts +4 -3
- package/autocomplete/AutoComplete.d.ts +17 -7
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +1 -0
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +1 -0
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +1 -0
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +2 -2
- package/avatargroup/AvatarGroup.d.ts +2 -2
- package/badge/Badge.d.ts +2 -2
- package/badgedirective/BadgeDirective.d.ts +2 -1
- package/basecomponent/BaseComponent.vue +67 -12
- package/basecomponent/basecomponent.cjs.js +80 -22
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +80 -22
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +80 -22
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +47 -7
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +47 -7
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +47 -7
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +44 -32
- package/baseicon/baseicon.cjs.js +19 -30
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +19 -30
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +20 -32
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +2 -2
- package/breadcrumb/Breadcrumb.d.ts +2 -2
- package/button/Button.d.ts +2 -2
- package/button/Button.vue +2 -2
- package/button/button.cjs.js +2 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +2 -2
- package/calendar/Calendar.vue +5 -4
- package/calendar/calendar.cjs.js +7 -6
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +7 -6
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +7 -6
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +2 -2
- package/carousel/Carousel.d.ts +2 -2
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +4 -3
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +4 -3
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/chart/Chart.d.ts +2 -2
- package/checkbox/Checkbox.d.ts +2 -2
- package/chip/Chip.d.ts +6 -4
- package/chips/Chips.d.ts +13 -4
- package/chips/Chips.vue +1 -1
- package/chips/chips.cjs.js +1 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -0
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +1 -40
- package/colorpicker/colorpicker.cjs.js +8 -47
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +8 -47
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +13 -10
- package/columngroup/ColumnGroup.d.ts +2 -2
- package/config/PrimeVue.d.ts +2 -2
- package/confirmdialog/ConfirmDialog.d.ts +3 -2
- package/confirmpopup/ConfirmPopup.d.ts +3 -2
- package/contextmenu/ContextMenu.d.ts +3 -2
- package/core/core.js +549 -485
- package/core/core.min.js +9 -9
- package/datatable/DataTable.d.ts +4 -2
- package/datatable/DataTable.vue +44 -15
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +116 -73
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +116 -73
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +116 -73
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +2 -2
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +4 -3
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +4 -3
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
- package/deferredcontent/DeferredContent.d.ts +2 -2
- package/dialog/Dialog.d.ts +2 -2
- package/dialog/Dialog.vue +8 -5
- package/dialog/dialog.cjs.js +8 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +8 -5
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +8 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +2 -2
- package/dock/Dock.d.ts +2 -2
- package/dropdown/Dropdown.d.ts +21 -10
- package/dropdown/Dropdown.vue +9 -0
- package/dropdown/dropdown.cjs.js +8 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +8 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +8 -0
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +2 -2
- package/fieldset/Fieldset.d.ts +2 -2
- package/fileupload/FileUpload.d.ts +12 -7
- package/fileupload/FileUpload.vue +4 -0
- package/fileupload/fileupload.cjs.js +4 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +5 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +2 -1
- package/galleria/Galleria.d.ts +2 -2
- package/galleria/GalleriaItem.vue +2 -2
- package/galleria/GalleriaThumbnails.vue +5 -1
- package/galleria/galleria.cjs.js +16 -7
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +16 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +16 -7
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +6 -4
- package/image/Image.vue +8 -6
- package/image/image.cjs.js +18 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +19 -6
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inplace/Inplace.d.ts +2 -2
- package/inputmask/InputMask.d.ts +2 -2
- package/inputnumber/InputNumber.d.ts +2 -2
- package/inputswitch/InputSwitch.d.ts +2 -2
- package/inputtext/InputText.d.ts +2 -2
- package/knob/Knob.d.ts +2 -2
- package/listbox/Listbox.d.ts +4 -4
- package/megamenu/MegaMenu.d.ts +3 -2
- package/menu/Menu.d.ts +2 -2
- package/menubar/Menubar.d.ts +3 -2
- package/message/BaseMessage.vue +5 -0
- package/message/Message.d.ts +4 -2
- package/message/message.cjs.js +1 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +16 -6
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +1 -0
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -0
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -0
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +2 -2
- package/organizationchart/OrganizationChart.d.ts +2 -2
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/package.json +1 -1
- package/paginator/Paginator.d.ts +2 -2
- package/panel/Panel.d.ts +3 -2
- package/panelmenu/PanelMenu.d.ts +3 -2
- package/passthrough/index.cjs.js +16 -60
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +0 -9
- package/passthrough/index.esm.js +16 -60
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +18 -59
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +365 -357
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.d.ts +1 -2
- package/passthrough/tailwind/index.esm.js +365 -357
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +365 -357
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +6 -4
- package/password/Password.vue +1 -0
- package/password/password.cjs.js +2 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -1
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +2 -2
- package/picklist/PickList.vue +9 -7
- package/picklist/picklist.cjs.js +27 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +27 -9
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +27 -9
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +2 -2
- package/progressspinner/ProgressSpinner.d.ts +2 -2
- package/radiobutton/RadioButton.d.ts +2 -2
- package/rating/Rating.d.ts +3 -2
- package/resources/themes/arya-blue/theme.css +4 -0
- package/resources/themes/arya-green/theme.css +4 -0
- package/resources/themes/arya-orange/theme.css +4 -0
- package/resources/themes/arya-purple/theme.css +4 -0
- package/resources/themes/bootstrap4-dark-blue/theme.css +8 -7
- package/resources/themes/bootstrap4-dark-purple/theme.css +8 -7
- package/resources/themes/bootstrap4-light-blue/theme.css +8 -7
- package/resources/themes/bootstrap4-light-purple/theme.css +8 -7
- package/resources/themes/fluent-light/theme.css +4 -0
- package/resources/themes/lara-dark-blue/theme.css +4 -0
- package/resources/themes/lara-dark-indigo/theme.css +4 -0
- package/resources/themes/lara-dark-purple/theme.css +4 -0
- package/resources/themes/lara-dark-teal/theme.css +4 -0
- package/resources/themes/lara-light-blue/theme.css +4 -0
- package/resources/themes/lara-light-indigo/theme.css +4 -0
- package/resources/themes/lara-light-purple/theme.css +4 -0
- package/resources/themes/lara-light-teal/theme.css +4 -0
- package/resources/themes/luna-amber/theme.css +4 -0
- package/resources/themes/luna-blue/theme.css +4 -0
- package/resources/themes/luna-green/theme.css +4 -0
- package/resources/themes/luna-pink/theme.css +4 -0
- package/resources/themes/md-dark-deeppurple/theme.css +4 -0
- package/resources/themes/md-dark-indigo/theme.css +4 -0
- package/resources/themes/md-light-deeppurple/theme.css +4 -0
- package/resources/themes/md-light-indigo/theme.css +4 -0
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -0
- package/resources/themes/mdc-dark-indigo/theme.css +4 -0
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -0
- package/resources/themes/mdc-light-indigo/theme.css +4 -0
- package/resources/themes/mira/theme.css +4 -0
- package/resources/themes/nano/theme.css +4 -0
- package/resources/themes/nova/theme.css +4 -0
- package/resources/themes/nova-accent/theme.css +4 -0
- package/resources/themes/nova-alt/theme.css +4 -0
- package/resources/themes/nova-vue/theme.css +4 -0
- package/resources/themes/rhea/theme.css +4 -0
- package/resources/themes/saga-blue/theme.css +4 -0
- package/resources/themes/saga-green/theme.css +4 -0
- package/resources/themes/saga-orange/theme.css +4 -0
- package/resources/themes/saga-purple/theme.css +4 -0
- package/resources/themes/soho-dark/theme.css +4 -0
- package/resources/themes/soho-light/theme.css +4 -0
- package/resources/themes/tailwind-light/theme.css +4 -0
- package/resources/themes/vela-blue/theme.css +4 -0
- package/resources/themes/vela-green/theme.css +4 -0
- package/resources/themes/vela-orange/theme.css +4 -0
- package/resources/themes/vela-purple/theme.css +4 -0
- package/resources/themes/viva-dark/theme.css +4 -0
- package/resources/themes/viva-light/theme.css +4 -0
- package/ripple/Ripple.d.ts +2 -1
- package/scrollpanel/ScrollPanel.d.ts +2 -2
- package/scrolltop/ScrollTop.d.ts +2 -2
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +2 -1
- package/selectbutton/selectbutton.cjs.js +2 -1
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -1
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +2 -2
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +1 -1
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +1 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +2 -2
- package/slider/Slider.d.ts +2 -2
- package/speeddial/SpeedDial.d.ts +9 -7
- package/speeddial/SpeedDial.vue +1 -1
- package/speeddial/speeddial.cjs.js +1 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +4 -2
- package/splitter/Splitter.d.ts +2 -2
- package/splitterpanel/SplitterPanel.d.ts +2 -2
- package/steps/Steps.d.ts +2 -2
- package/styleclass/StyleClass.d.ts +2 -1
- package/tabmenu/TabMenu.d.ts +2 -2
- package/tabpanel/TabPanel.d.ts +2 -2
- package/tabview/TabView.d.ts +2 -2
- package/tag/Tag.d.ts +2 -2
- package/terminal/Terminal.d.ts +2 -2
- package/textarea/Textarea.d.ts +2 -2
- package/tieredmenu/TieredMenu.d.ts +3 -2
- package/timeline/Timeline.d.ts +2 -2
- package/toast/Toast.d.ts +2 -2
- package/togglebutton/ToggleButton.d.ts +3 -2
- package/toolbar/Toolbar.d.ts +2 -2
- package/tooltip/Tooltip.d.ts +2 -1
- package/tree/Tree.d.ts +6 -2
- package/treeselect/TreeSelect.d.ts +3 -2
- package/treetable/TreeTable.d.ts +3 -2
- package/treetable/TreeTable.vue +4 -2
- package/treetable/treetable.cjs.js +6 -5
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +6 -5
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +6 -5
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
- package/ts-helpers.d.ts +2 -0
- package/virtualscroller/VirtualScroller.d.ts +8 -6
- package/web-types.json +1 -1
|
@@ -4406,6 +4406,10 @@
|
|
|
4406
4406
|
border-bottom-right-radius: 4px;
|
|
4407
4407
|
border-bottom-left-radius: 4px;
|
|
4408
4408
|
}
|
|
4409
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4410
|
+
border: 1px dashed #9FA8DA;
|
|
4411
|
+
background-color: rgba(159, 168, 218, 0.16);
|
|
4412
|
+
}
|
|
4409
4413
|
.p-fileupload .p-fileupload-file {
|
|
4410
4414
|
padding: 1rem;
|
|
4411
4415
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
@@ -4406,6 +4406,10 @@
|
|
|
4406
4406
|
border-bottom-right-radius: 4px;
|
|
4407
4407
|
border-bottom-left-radius: 4px;
|
|
4408
4408
|
}
|
|
4409
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4410
|
+
border: 1px dashed #673AB7;
|
|
4411
|
+
background-color: rgba(103, 58, 183, 0.12);
|
|
4412
|
+
}
|
|
4409
4413
|
.p-fileupload .p-fileupload-file {
|
|
4410
4414
|
padding: 1rem;
|
|
4411
4415
|
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
@@ -4406,6 +4406,10 @@
|
|
|
4406
4406
|
border-bottom-right-radius: 4px;
|
|
4407
4407
|
border-bottom-left-radius: 4px;
|
|
4408
4408
|
}
|
|
4409
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4410
|
+
border: 1px dashed #3F51B5;
|
|
4411
|
+
background-color: rgba(63, 81, 181, 0.12);
|
|
4412
|
+
}
|
|
4409
4413
|
.p-fileupload .p-fileupload-file {
|
|
4410
4414
|
padding: 1rem;
|
|
4411
4415
|
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
@@ -4410,6 +4410,10 @@
|
|
|
4410
4410
|
border-bottom-right-radius: 4px;
|
|
4411
4411
|
border-bottom-left-radius: 4px;
|
|
4412
4412
|
}
|
|
4413
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4414
|
+
border: 1px dashed #5E81AC;
|
|
4415
|
+
background-color: #D8DEE9;
|
|
4416
|
+
}
|
|
4413
4417
|
.p-fileupload .p-fileupload-file {
|
|
4414
4418
|
padding: 1rem;
|
|
4415
4419
|
border: 1px solid #E5E9F0;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 1px;
|
|
4383
4383
|
border-bottom-left-radius: 1px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #1174c0;
|
|
4387
|
+
background-color: #44A1D9;
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #dee2e6;
|
|
@@ -4369,6 +4369,10 @@
|
|
|
4369
4369
|
border-bottom-right-radius: 3px;
|
|
4370
4370
|
border-bottom-left-radius: 3px;
|
|
4371
4371
|
}
|
|
4372
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4373
|
+
border: 1px dashed #007ad9;
|
|
4374
|
+
background-color: #007ad9;
|
|
4375
|
+
}
|
|
4372
4376
|
.p-fileupload .p-fileupload-file {
|
|
4373
4377
|
padding: 1rem;
|
|
4374
4378
|
border: 1px solid #c8c8c8;
|
|
@@ -4357,6 +4357,10 @@
|
|
|
4357
4357
|
border-bottom-right-radius: 3px;
|
|
4358
4358
|
border-bottom-left-radius: 3px;
|
|
4359
4359
|
}
|
|
4360
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4361
|
+
border: 1px dashed #007ad9;
|
|
4362
|
+
background-color: #e02365;
|
|
4363
|
+
}
|
|
4360
4364
|
.p-fileupload .p-fileupload-file {
|
|
4361
4365
|
padding: 1rem;
|
|
4362
4366
|
border: 1px solid #c8c8c8;
|
|
@@ -4369,6 +4369,10 @@
|
|
|
4369
4369
|
border-bottom-right-radius: 3px;
|
|
4370
4370
|
border-bottom-left-radius: 3px;
|
|
4371
4371
|
}
|
|
4372
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4373
|
+
border: 1px dashed #007ad9;
|
|
4374
|
+
background-color: #007ad9;
|
|
4375
|
+
}
|
|
4372
4376
|
.p-fileupload .p-fileupload-file {
|
|
4373
4377
|
padding: 1rem;
|
|
4374
4378
|
border: 1px solid #c8c8c8;
|
|
@@ -4369,6 +4369,10 @@
|
|
|
4369
4369
|
border-bottom-right-radius: 3px;
|
|
4370
4370
|
border-bottom-left-radius: 3px;
|
|
4371
4371
|
}
|
|
4372
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4373
|
+
border: 1px dashed #41b883;
|
|
4374
|
+
background-color: #41b883;
|
|
4375
|
+
}
|
|
4372
4376
|
.p-fileupload .p-fileupload-file {
|
|
4373
4377
|
padding: 1rem;
|
|
4374
4378
|
border: 1px solid #c8c8c8;
|
|
@@ -4357,6 +4357,10 @@
|
|
|
4357
4357
|
border-bottom-right-radius: 2px;
|
|
4358
4358
|
border-bottom-left-radius: 2px;
|
|
4359
4359
|
}
|
|
4360
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4361
|
+
border: 1px dashed #7B95A3;
|
|
4362
|
+
background-color: #AFD3C8;
|
|
4363
|
+
}
|
|
4360
4364
|
.p-fileupload .p-fileupload-file {
|
|
4361
4365
|
padding: 1rem;
|
|
4362
4366
|
border: 1px solid #dadada;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #2196F3;
|
|
4387
|
+
background-color: #E3F2FD;
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #dee2e6;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #4CAF50;
|
|
4387
|
+
background-color: #E8F5E9;
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #dee2e6;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #FFC107;
|
|
4387
|
+
background-color: #FFF3E0;
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #dee2e6;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #9C27B0;
|
|
4387
|
+
background-color: #F3E5F5;
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #dee2e6;
|
|
@@ -4381,6 +4381,10 @@
|
|
|
4381
4381
|
border-bottom-right-radius: 6px;
|
|
4382
4382
|
border-bottom-left-radius: 6px;
|
|
4383
4383
|
}
|
|
4384
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4385
|
+
border: 1px dashed #b19df7;
|
|
4386
|
+
background-color: rgba(177, 157, 247, 0.16);
|
|
4387
|
+
}
|
|
4384
4388
|
.p-fileupload .p-fileupload-file {
|
|
4385
4389
|
padding: 1rem;
|
|
4386
4390
|
border: 1px solid #3e4053;
|
|
@@ -4381,6 +4381,10 @@
|
|
|
4381
4381
|
border-bottom-right-radius: 6px;
|
|
4382
4382
|
border-bottom-left-radius: 6px;
|
|
4383
4383
|
}
|
|
4384
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4385
|
+
border: 1px dashed #7254f3;
|
|
4386
|
+
background-color: #e2dcfc;
|
|
4387
|
+
}
|
|
4384
4388
|
.p-fileupload .p-fileupload-file {
|
|
4385
4389
|
padding: 1rem;
|
|
4386
4390
|
border: 1px solid #dfe7ef;
|
|
@@ -4417,6 +4417,10 @@
|
|
|
4417
4417
|
border-bottom-right-radius: 0.375rem;
|
|
4418
4418
|
border-bottom-left-radius: 0.375rem;
|
|
4419
4419
|
}
|
|
4420
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4421
|
+
border: 1px dashed #4F46E5;
|
|
4422
|
+
background-color: #EEF2FF;
|
|
4423
|
+
}
|
|
4420
4424
|
.p-fileupload .p-fileupload-file {
|
|
4421
4425
|
padding: 1rem;
|
|
4422
4426
|
border: 1px solid #e5e7eb;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #64B5F6;
|
|
4387
|
+
background-color: rgba(100, 181, 246, 0.16);
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #304562;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #81C784;
|
|
4387
|
+
background-color: rgba(129, 199, 132, 0.16);
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #304562;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #FFD54F;
|
|
4387
|
+
background-color: rgba(255, 213, 79, 0.16);
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #304562;
|
|
@@ -4382,6 +4382,10 @@
|
|
|
4382
4382
|
border-bottom-right-radius: 3px;
|
|
4383
4383
|
border-bottom-left-radius: 3px;
|
|
4384
4384
|
}
|
|
4385
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4386
|
+
border: 1px dashed #BA68C8;
|
|
4387
|
+
background-color: rgba(186, 104, 200, 0.16);
|
|
4388
|
+
}
|
|
4385
4389
|
.p-fileupload .p-fileupload-file {
|
|
4386
4390
|
padding: 1rem;
|
|
4387
4391
|
border: 1px solid #304562;
|
|
@@ -4414,6 +4414,10 @@
|
|
|
4414
4414
|
border-bottom-right-radius: 6px;
|
|
4415
4415
|
border-bottom-left-radius: 6px;
|
|
4416
4416
|
}
|
|
4417
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4418
|
+
border: 2px solid #263238 dashed #9eade6;
|
|
4419
|
+
background-color: rgba(158, 173, 230, 0.16);
|
|
4420
|
+
}
|
|
4417
4421
|
.p-fileupload .p-fileupload-file {
|
|
4418
4422
|
padding: 1rem;
|
|
4419
4423
|
border: 1px solid #263238;
|
|
@@ -4414,6 +4414,10 @@
|
|
|
4414
4414
|
border-bottom-right-radius: 6px;
|
|
4415
4415
|
border-bottom-left-radius: 6px;
|
|
4416
4416
|
}
|
|
4417
|
+
.p-fileupload .p-fileupload-content.p-fileupload-highlight {
|
|
4418
|
+
border: 2px solid #ebebeb dashed #5472d4;
|
|
4419
|
+
background-color: #ced6f1;
|
|
4420
|
+
}
|
|
4417
4421
|
.p-fileupload .p-fileupload-file {
|
|
4418
4422
|
padding: 1rem;
|
|
4419
4423
|
border: 1px solid #ebebeb;
|
package/ripple/Ripple.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { DirectiveBinding, ObjectDirective } from 'vue';
|
|
10
10
|
import { DirectiveHooks } from '../basedirective';
|
|
11
|
+
import { PTOptions } from '../ts-helpers';
|
|
11
12
|
|
|
12
13
|
export declare type RippleDirectivePassThroughOptionType = RippleDirectivePassThroughAttributes | null | undefined;
|
|
13
14
|
|
|
@@ -19,7 +20,7 @@ export interface RippleOptions {
|
|
|
19
20
|
* Used to pass attributes to DOM elements inside the component.
|
|
20
21
|
* @type {RippleDirectivePassThroughOptions}
|
|
21
22
|
*/
|
|
22
|
-
pt?: RippleDirectivePassThroughOptions
|
|
23
|
+
pt?: PTOptions<RippleDirectivePassThroughOptions>;
|
|
23
24
|
/**
|
|
24
25
|
* When enabled, it removes component related styles in the core.
|
|
25
26
|
* @defaultValue false
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
13
13
|
|
|
14
14
|
export declare type ScrollPanelPassThroughOptionType = ScrollPanelPassThroughAttributes | ((options: ScrollPanelPassThroughMethodOptions) => ScrollPanelPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
@@ -99,7 +99,7 @@ export interface ScrollPanelProps {
|
|
|
99
99
|
* Used to pass attributes to DOM elements inside the component.
|
|
100
100
|
* @type {ScrollPanelPassThroughOptions}
|
|
101
101
|
*/
|
|
102
|
-
pt?: ScrollPanelPassThroughOptions
|
|
102
|
+
pt?: PTOptions<ScrollPanelPassThroughOptions>;
|
|
103
103
|
/**
|
|
104
104
|
* When enabled, it removes component related styles in the core.
|
|
105
105
|
* @defaultValue false
|
package/scrolltop/ScrollTop.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
13
13
|
|
|
14
14
|
export declare type ScrollTopPassThroughOptionType = ScrollTopPassThroughAttributes | ((options: ScrollTopPassThroughMethodOptions) => ScrollTopPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
@@ -94,7 +94,7 @@ export interface ScrollTopProps {
|
|
|
94
94
|
* Used to pass attributes to DOM elements inside the component.
|
|
95
95
|
* @type {ScrollTopPassThroughOptions}
|
|
96
96
|
*/
|
|
97
|
-
pt?: ScrollTopPassThroughOptions
|
|
97
|
+
pt?: PTOptions<ScrollTopPassThroughOptions>;
|
|
98
98
|
/**
|
|
99
99
|
* When enabled, it removes component related styles in the core.
|
|
100
100
|
* @defaultValue false
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
13
13
|
|
|
14
14
|
export declare type SelectButtonPassThroughOptionType = SelectButtonPassThroughAttributes | ((options: SelectButtonPassThroughMethodOptions) => SelectButtonPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
@@ -93,6 +93,10 @@ export interface SelectButtonContext {
|
|
|
93
93
|
* @defaultValue false
|
|
94
94
|
*/
|
|
95
95
|
focused: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Available option.
|
|
98
|
+
*/
|
|
99
|
+
option: any;
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
/**
|
|
@@ -146,7 +150,7 @@ export interface SelectButtonProps {
|
|
|
146
150
|
* Used to pass attributes to DOM elements inside the component.
|
|
147
151
|
* @type {SelectButtonPassThroughOptions}
|
|
148
152
|
*/
|
|
149
|
-
pt?: SelectButtonPassThroughOptions
|
|
153
|
+
pt?: PTOptions<SelectButtonPassThroughOptions>;
|
|
150
154
|
/**
|
|
151
155
|
* When enabled, it removes component related styles in the core.
|
|
152
156
|
* @defaultValue false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/ripple"),t=require("primevue/utils"),n=require("primevue/basecomponent"),i=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function l(){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 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 u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:r(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var r=this;if(!this.disabled&&!this.isOptionDisabled(n)){var o=this.isSelected(n);if(!o||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?o?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,r.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:o?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var r,o=a(this.modelValue);try{for(o.s();!(r=o.n()).done;){if(t.ObjectUtils.equals(r.value,i,this.equalityKey)){n=!0;break}}}catch(e){o.e(e)}finally{o.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,r=0;r<=this.$refs.container.children.length-1;r++)"0"===this.$refs.container.children[r].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[r],index:r});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:o.default}},f=["aria-labelledby"],h=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];p.render=function(e,t,n,r,o,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,r){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:r===o.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,r)},onKeydown:function(e){return a.onKeydown(e,n,r)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:r,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,h)),[[l]])})),128))],16,f)},module.exports=p;
|
|
1
|
+
"use strict";var e=require("primevue/ripple"),t=require("primevue/utils"),n=require("primevue/basecomponent"),i=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function l(){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 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 u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:r(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e),option:e}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var r=this;if(!this.disabled&&!this.isOptionDisabled(n)){var o=this.isSelected(n);if(!o||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?o?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,r.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:o?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var r,o=a(this.modelValue);try{for(o.s();!(r=o.n()).done;){if(t.ObjectUtils.equals(r.value,i,this.equalityKey)){n=!0;break}}}catch(e){o.e(e)}finally{o.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,r=0;r<=this.$refs.container.children.length-1;r++)"0"===this.$refs.container.children[r].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[r],index:r});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:o.default}},f=["aria-labelledby"],h=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];p.render=function(e,t,n,r,o,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,r){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:r===o.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,r)},onKeydown:function(e){return a.onKeydown(e,n,r)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:r,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,h)),[[l]])})),128))],16,f)},module.exports=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/ripple";import{DomHandler as t,ObjectUtils as n}from"primevue/utils";import i from"primevue/basecomponent";import{resolveDirective as o,openBlock as r,createElementBlock as a,mergeProps as l,Fragment as s,renderList as u,withDirectives as d,renderSlot as c,normalizeClass as p,createElementVNode as f,toDisplayString as h}from"vue";function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function m(){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 y(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var O={name:"SelectButton",extends:{name:"BaseSelectButton",extends:i,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.find(this.$refs.container,'[data-pc-section="button"]'),i=t.findSingle(this.$refs.container,'[data-p-highlight="true"]'),o=0;o<e.length;o++)(!0===t.getAttribute(e[o],"data-p-highlight")&&n.equals(e[o],i)||null===i&&0==o)&&(this.focusedIndex=o)},getOptionLabel:function(e){return this.optionLabel?n.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?n.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,t,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(t)){var r=this.isSelected(t);if(!r||!this.unselectable){var a,l,s=this.getOptionValue(t);a=this.multiple?r?this.modelValue.filter((function(e){return!n.equals(e,s,o.equalityKey)})):this.modelValue?[].concat(v(l=this.modelValue)||g(l)||y(l)||m(),[s]):[s]:r?null:s,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var t=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=b(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(n.equals(o.value,i,this.equalityKey)){t=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else t=n.equals(this.modelValue,i,this.equalityKey);return t},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:e}},S=["aria-labelledby"],w=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];O.render=function(e,t,n,i,b,m){var y=o("ripple");return r(),a("div",l({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(r(!0),a(s,null,u(e.options,(function(n,i){return d((r(),a("div",l({key:m.getOptionRenderKey(n),tabindex:i===b.focusedIndex?"0":"-1","aria-label":m.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":m.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return m.onOptionSelect(e,n,i)},onKeydown:function(e){return m.onKeydown(e,n,i)},onFocus:t[0]||(t[0]=function(e){return m.onFocus(e)}),onBlur:function(e){return m.onBlur(e,n)}},m.getPTOptions(n,"button"),{"data-p-highlight":m.isSelected(n),"data-p-disabled":m.isOptionDisabled(n)}),[c(e.$slots,"option",{option:n,index:i,class:p(e.cx("label"))},(function(){return[f("span",l({class:e.cx("label")},m.getPTOptions(n,"label")),h(m.getOptionLabel(n)),17)]}))],16,w)),[[y]])})),128))],16,S)};export{O as default};
|
|
1
|
+
import e from"primevue/ripple";import{DomHandler as t,ObjectUtils as n}from"primevue/utils";import i from"primevue/basecomponent";import{resolveDirective as o,openBlock as r,createElementBlock as a,mergeProps as l,Fragment as s,renderList as u,withDirectives as d,renderSlot as c,normalizeClass as p,createElementVNode as f,toDisplayString as h}from"vue";function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function m(){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 y(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var O={name:"SelectButton",extends:{name:"BaseSelectButton",extends:i,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.find(this.$refs.container,'[data-pc-section="button"]'),i=t.findSingle(this.$refs.container,'[data-p-highlight="true"]'),o=0;o<e.length;o++)(!0===t.getAttribute(e[o],"data-p-highlight")&&n.equals(e[o],i)||null===i&&0==o)&&(this.focusedIndex=o)},getOptionLabel:function(e){return this.optionLabel?n.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?n.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e),option:e}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,t,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(t)){var r=this.isSelected(t);if(!r||!this.unselectable){var a,l,s=this.getOptionValue(t);a=this.multiple?r?this.modelValue.filter((function(e){return!n.equals(e,s,o.equalityKey)})):this.modelValue?[].concat(v(l=this.modelValue)||g(l)||y(l)||m(),[s]):[s]:r?null:s,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var t=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=b(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(n.equals(o.value,i,this.equalityKey)){t=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else t=n.equals(this.modelValue,i,this.equalityKey);return t},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:e}},S=["aria-labelledby"],w=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];O.render=function(e,t,n,i,b,m){var y=o("ripple");return r(),a("div",l({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(r(!0),a(s,null,u(e.options,(function(n,i){return d((r(),a("div",l({key:m.getOptionRenderKey(n),tabindex:i===b.focusedIndex?"0":"-1","aria-label":m.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":m.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return m.onOptionSelect(e,n,i)},onKeydown:function(e){return m.onKeydown(e,n,i)},onFocus:t[0]||(t[0]=function(e){return m.onFocus(e)}),onBlur:function(e){return m.onBlur(e,n)}},m.getPTOptions(n,"button"),{"data-p-highlight":m.isSelected(n),"data-p-disabled":m.isOptionDisabled(n)}),[c(e.$slots,"option",{option:n,index:i,class:p(e.cx("label"))},(function(){return[f("span",l({class:e.cx("label")},m.getPTOptions(n,"label")),h(m.getOptionLabel(n)),17)]}))],16,w)),[[y]])})),128))],16,S)};export{O as default};
|
|
@@ -97,7 +97,8 @@ this.primevue.selectbutton = (function (Ripple, utils, BaseComponent, vue) {
|
|
|
97
97
|
return this.ptm(key, {
|
|
98
98
|
context: {
|
|
99
99
|
active: this.isSelected(option),
|
|
100
|
-
disabled: this.isOptionDisabled(option)
|
|
100
|
+
disabled: this.isOptionDisabled(option),
|
|
101
|
+
option: option
|
|
101
102
|
}
|
|
102
103
|
});
|
|
103
104
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.selectbutton=function(e,t,n,i){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function l(){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 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 u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:o(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(n)){var r=this.isSelected(n);if(!r||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?r?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,o.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:r?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=a(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(t.ObjectUtils.equals(o.value,i,this.equalityKey)){n=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:r.default}},h=["aria-labelledby"],f=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];return p.render=function(e,t,n,o,r,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,o){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:o===r.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,o)},onKeydown:function(e){return a.onKeydown(e,n,o)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:o,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,f)),[[l]])})),128))],16,h)},p}(primevue.ripple,primevue.utils,primevue.basecomponent,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.selectbutton=function(e,t,n,i){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function l(){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 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 u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e){if(Array.isArray(e))return d(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var p={name:"SelectButton",extends:{name:"BaseSelectButton",extends:o(n).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-selectbutton p-buttonset p-component",{"p-disabled":e.props.disabled}]},button:function(e){var t=e.instance,n=e.option;return["p-button p-component",{"p-highlight":t.isSelected(n),"p-disabled":t.isOptionDisabled(n)}]},label:"p-button-label"}},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=t.DomHandler.find(this.$refs.container,'[data-pc-section="button"]'),n=t.DomHandler.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(!0===t.DomHandler.getAttribute(e[i],"data-p-highlight")&&t.ObjectUtils.equals(e[i],n)||null===n&&0==i)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?t.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?t.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,t){return this.ptm(t,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e),option:e}})},isOptionDisabled:function(e){return!!this.optionDisabled&&t.ObjectUtils.resolveFieldData(e,this.optionDisabled)},onOptionSelect:function(e,n,i){var o=this;if(!this.disabled&&!this.isOptionDisabled(n)){var r=this.isSelected(n);if(!r||!this.unselectable){var a,d,p=this.getOptionValue(n);a=this.multiple?r?this.modelValue.filter((function(e){return!t.ObjectUtils.equals(e,p,o.equalityKey)})):this.modelValue?[].concat(c(d=this.modelValue)||u(d)||s(d)||l(),[p]):[p]:r?null:p,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var o,r=a(this.modelValue);try{for(r.s();!(o=r.n()).done;){if(t.ObjectUtils.equals(o.value,i,this.equalityKey)){n=!0;break}}}catch(e){r.e(e)}finally{r.f()}}}else n=t.ObjectUtils.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,t,n){switch(e.code){case"Space":this.onOptionSelect(e,t,n),e.preventDefault();break;case"ArrowDown":case"ArrowRight":this.changeTabIndexes(e,"next"),e.preventDefault();break;case"ArrowUp":case"ArrowLeft":this.changeTabIndexes(e,"prev"),e.preventDefault()}},changeTabIndexes:function(e,t){for(var n,i,o=0;o<=this.$refs.container.children.length-1;o++)"0"===this.$refs.container.children[o].getAttribute("tabindex")&&(n={elem:this.$refs.container.children[o],index:o});this.focusedIndex=i="prev"===t?0===n.index?this.$refs.container.children.length-1:n.index-1:n.index===this.$refs.container.children.length-1?0:n.index+1,this.$refs.container.children[i].focus()},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,t){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,t)}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:r.default}},h=["aria-labelledby"],f=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];return p.render=function(e,t,n,o,r,a){var l=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",i.mergeProps({ref:"container",class:e.cx("root"),role:"group","aria-labelledby":e.ariaLabelledby},e.ptm("root"),{"data-pc-name":"selectbutton"}),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.options,(function(n,o){return i.withDirectives((i.openBlock(),i.createElementBlock("div",i.mergeProps({key:a.getOptionRenderKey(n),tabindex:o===r.focusedIndex?"0":"-1","aria-label":a.getOptionLabel(n),role:e.multiple?"checkbox":"radio","aria-checked":a.isSelected(n),"aria-disabled":e.optionDisabled,class:e.cx("button",{option:n}),onClick:function(e){return a.onOptionSelect(e,n,o)},onKeydown:function(e){return a.onKeydown(e,n,o)},onFocus:t[0]||(t[0]=function(e){return a.onFocus(e)}),onBlur:function(e){return a.onBlur(e,n)}},a.getPTOptions(n,"button"),{"data-p-highlight":a.isSelected(n),"data-p-disabled":a.isOptionDisabled(n)}),[i.renderSlot(e.$slots,"option",{option:n,index:o,class:i.normalizeClass(e.cx("label"))},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},a.getPTOptions(n,"label")),i.toDisplayString(a.getOptionLabel(n)),17)]}))],16,f)),[[l]])})),128))],16,h)},p}(primevue.ripple,primevue.utils,primevue.basecomponent,Vue);
|
package/sidebar/Sidebar.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
12
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
13
13
|
|
|
14
14
|
export declare type SidebarPassThroughOptionType = SidebarPassThroughAttributes | ((options: SidebarPassThroughMethodOptions) => SidebarPassThroughAttributes | string) | string | null | undefined;
|
|
15
15
|
|
|
@@ -139,7 +139,7 @@ export interface SidebarProps {
|
|
|
139
139
|
* Used to pass attributes to DOM elements inside the component.
|
|
140
140
|
* @type {SidebarPassThroughOptions}
|
|
141
141
|
*/
|
|
142
|
-
pt?: SidebarPassThroughOptions
|
|
142
|
+
pt?: PTOptions<SidebarPassThroughOptions>;
|
|
143
143
|
/**
|
|
144
144
|
* When enabled, it removes component related styles in the core.
|
|
145
145
|
* @defaultValue false
|
package/sidebar/Sidebar.vue
CHANGED
|
@@ -100,7 +100,7 @@ export default {
|
|
|
100
100
|
},
|
|
101
101
|
focus() {
|
|
102
102
|
const findFocusableElement = (container) => {
|
|
103
|
-
return container.querySelector('[autofocus]');
|
|
103
|
+
return container && container.querySelector('[autofocus]');
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
let focusTarget = this.$slots.default && findFocusableElement(this.content);
|
package/sidebar/sidebar.cjs.js
CHANGED
|
@@ -188,7 +188,7 @@ var script = {
|
|
|
188
188
|
},
|
|
189
189
|
focus: function focus() {
|
|
190
190
|
var findFocusableElement = function findFocusableElement(container) {
|
|
191
|
-
return container.querySelector('[autofocus]');
|
|
191
|
+
return container && container.querySelector('[autofocus]');
|
|
192
192
|
};
|
|
193
193
|
var focusTarget = this.$slots["default"] && findFocusableElement(this.content);
|
|
194
194
|
if (!focusTarget) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/focustrap"),n=require("primevue/icons/times"),t=require("primevue/portal"),i=require("primevue/ripple"),r=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(e),c=l(n),p=l(t),u=l(i),f=l(o),m=s.useStyle("\n.p-sidebar-mask {\n display: none;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n\n.p-sidebar-visible {\n display: flex;\n}\n\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n\n@media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n}\n",{name:"sidebar",manual:!0}),b={name:"Sidebar",extends:{name:"BaseSidebar",extends:f.default,props:{visible:{type:Boolean,default:!1},position:{type:String,default:"left"},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},closeIcon:{type:String,default:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},css:{classes:{mask:function(e){var n=e.instance,t=e.props,i=["left","right","top","bottom"].find((function(e){return e===t.position}));return["p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":t.modal,"p-sidebar-mask-scrollblocker":t.blockScroll,"p-sidebar-visible":n.containerVisible,"p-sidebar-full":n.fullScreen},i?"p-sidebar-".concat(i):""]},root:function(e){var n=e.instance;return["p-sidebar p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple,"p-sidebar-full":n.fullScreen}]},header:"p-sidebar-header",headerContent:"p-sidebar-header-content",closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",content:"p-sidebar-content"},inlineStyles:{mask:function(e){var n=e.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n?"flex-start":"right"===n?"flex-end":"center",alignItems:"top"===n?"flex-start":"bottom"===n?"flex-end":"center"}}},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.autoZIndex&&r.ZIndexUtils.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&r.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissable&&this.modal&&this.mask===e.target&&this.hide()},focus:function(){var e=function(e){return e.querySelector("[autofocus]")},n=this.$slots.default&&e(this.content);n||(n=this.$slots.header&&e(this.headerContainer))||(n=e(this.container)),n&&n.focus()},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&r.DomHandler.addClass(document.body,"p-overflow-hidden")},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&r.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeydown:function(e){"Escape"===e.code&&this.hide()},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},closeButtonRef:function(e){this.closeButton=e},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.isOutsideClicked(n)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked:function(e){return this.container&&!this.container.contains(e.target)}},computed:{fullScreen:function(){return"full"===this.position},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:d.default,ripple:u.default},components:{Portal:p.default,TimesIcon:c.default}};function h(e){return h="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},h(e)}function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function g(e,n,t){return(n=k(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function k(e){var n=x(e,"string");return"symbol"===h(n)?n:String(n)}function x(e,n){if("object"!==h(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,n||"default");if("object"!==h(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var w=["aria-modal"],C=["aria-label"];b.render=function(e,n,t,i,r,o){var s=a.resolveComponent("Portal"),l=a.resolveDirective("ripple"),d=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx((function(){return[r.containerVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.maskRef,onMousedown:n[2]||(n[2]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position})},e.ptm("mask")),[a.createVNode(a.Transition,a.mergeProps({name:"p-sidebar",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:a.withCtx((function(){return[e.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,class:e.cx("root"),role:"complementary","aria-modal":e.modal,onKeydown:n[1]||(n[1]=function(){return o.onKeydown&&o.onKeydown.apply(o,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[a.createElementVNode("div",a.mergeProps({ref:o.headerContainerRef,class:e.cx("header")},e.ptm("header")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("headerContent")},e.ptm("headerContent")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),e.showCloseIcon?a.withDirectives((a.openBlock(),a.createElementBlock("button",a.mergeProps({key:1,ref:o.closeButtonRef,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:n[0]||(n[0]=function(){return o.hide&&o.hide.apply(o,arguments)})},e.ptm("closeButton"),{"data-pc-group-section":"iconcontainer"}),[a.renderSlot(e.$slots,"closeicon",{},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),a.mergeProps({class:[e.cx("closeIcon"),e.closeIcon]},e.ptm("closeIcon")),null,16,["class"]))]}))],16,C)),[[l]]):a.createCommentVNode("",!0)],16),a.createElementVNode("div",a.mergeProps({ref:o.contentRef,class:e.cx("content")},e.ptm("content")),[a.renderSlot(e.$slots,"default")],16)],16,w)),[[d]]):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]})),_:3})},module.exports=b;
|
|
1
|
+
"use strict";var e=require("primevue/focustrap"),n=require("primevue/icons/times"),t=require("primevue/portal"),i=require("primevue/ripple"),r=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(e),c=l(n),p=l(t),u=l(i),f=l(o),m=s.useStyle("\n.p-sidebar-mask {\n display: none;\n pointer-events: none;\n background-color: transparent;\n transition-property: background-color;\n}\n\n.p-sidebar-mask.p-component-overlay {\n pointer-events: auto;\n}\n\n.p-sidebar-visible {\n display: flex;\n}\n\n.p-sidebar {\n display: flex;\n flex-direction: column;\n pointer-events: auto;\n transform: translate3d(0px, 0px, 0px);\n position: relative;\n transition: transform 0.3s;\n}\n\n.p-sidebar-content {\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.p-sidebar-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-shrink: 0;\n}\n\n.p-sidebar-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-sidebar-full .p-sidebar {\n transition: none;\n transform: none;\n width: 100vw !important;\n height: 100vh !important;\n max-height: 100%;\n top: 0px !important;\n left: 0px !important;\n}\n\n/* Animation */\n/* Center */\n.p-sidebar-left .p-sidebar-enter-from,\n.p-sidebar-left .p-sidebar-leave-to {\n transform: translateX(-100%);\n}\n.p-sidebar-right .p-sidebar-enter-from,\n.p-sidebar-right .p-sidebar-leave-to {\n transform: translateX(100%);\n}\n.p-sidebar-top .p-sidebar-enter-from,\n.p-sidebar-top .p-sidebar-leave-to {\n transform: translateY(-100%);\n}\n.p-sidebar-bottom .p-sidebar-enter-from,\n.p-sidebar-bottom .p-sidebar-leave-to {\n transform: translateY(100%);\n}\n.p-sidebar-full .p-sidebar-enter-from,\n.p-sidebar-full .p-sidebar-leave-to {\n opacity: 0;\n}\n.p-sidebar-full .p-sidebar-enter-active,\n.p-sidebar-full .p-sidebar-leave-active {\n transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n/* Size */\n.p-sidebar-left .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-right .p-sidebar {\n width: 20rem;\n height: 100%;\n}\n\n.p-sidebar-top .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-bottom .p-sidebar {\n height: 10rem;\n width: 100%;\n}\n\n.p-sidebar-left .p-sidebar-sm,\n.p-sidebar-right .p-sidebar-sm {\n width: 20rem;\n}\n\n.p-sidebar-left .p-sidebar-md,\n.p-sidebar-right .p-sidebar-md {\n width: 40rem;\n}\n\n.p-sidebar-left .p-sidebar-lg,\n.p-sidebar-right .p-sidebar-lg {\n width: 60rem;\n}\n\n.p-sidebar-top .p-sidebar-sm,\n.p-sidebar-bottom .p-sidebar-sm {\n height: 10rem;\n}\n\n.p-sidebar-top .p-sidebar-md,\n.p-sidebar-bottom .p-sidebar-md {\n height: 20rem;\n}\n\n.p-sidebar-top .p-sidebar-lg,\n.p-sidebar-bottom .p-sidebar-lg {\n height: 30rem;\n}\n\n.p-sidebar-left .p-sidebar-content,\n.p-sidebar-right .p-sidebar-content,\n.p-sidebar-top .p-sidebar-content,\n.p-sidebar-bottom .p-sidebar-content {\n width: 100%;\n height: 100%;\n}\n\n@media screen and (max-width: 64em) {\n .p-sidebar-left .p-sidebar-lg,\n .p-sidebar-left .p-sidebar-md,\n .p-sidebar-right .p-sidebar-lg,\n .p-sidebar-right .p-sidebar-md {\n width: 20rem;\n }\n}\n",{name:"sidebar",manual:!0}),b={name:"Sidebar",extends:{name:"BaseSidebar",extends:f.default,props:{visible:{type:Boolean,default:!1},position:{type:String,default:"left"},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!0},closeIcon:{type:String,default:void 0},modal:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1}},css:{classes:{mask:function(e){var n=e.instance,t=e.props,i=["left","right","top","bottom"].find((function(e){return e===t.position}));return["p-sidebar-mask",{"p-component-overlay p-component-overlay-enter":t.modal,"p-sidebar-mask-scrollblocker":t.blockScroll,"p-sidebar-visible":n.containerVisible,"p-sidebar-full":n.fullScreen},i?"p-sidebar-".concat(i):""]},root:function(e){var n=e.instance;return["p-sidebar p-component",{"p-input-filled":"filled"===n.$primevue.config.inputStyle,"p-ripple-disabled":!1===n.$primevue.config.ripple,"p-sidebar-full":n.fullScreen}]},header:"p-sidebar-header",headerContent:"p-sidebar-header-content",closeButton:"p-sidebar-close p-sidebar-icon p-link",closeIcon:"p-sidebar-close-icon",content:"p-sidebar-content"},inlineStyles:{mask:function(e){var n=e.position;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:"left"===n?"flex-start":"right"===n?"flex-end":"center",alignItems:"top"===n?"flex-start":"bottom"===n?"flex-end":"center"}}},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide"],data:function(){return{containerVisible:this.visible}},container:null,mask:null,content:null,headerContainer:null,closeButton:null,outsideClickListener:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.disableDocumentSettings(),this.mask&&this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},methods:{hide:function(){this.$emit("update:visible",!1)},onEnter:function(){this.$emit("show"),this.focus(),this.autoZIndex&&r.ZIndexUtils.set("modal",this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.enableDocumentSettings()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&r.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide")},onAfterLeave:function(){this.autoZIndex&&r.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.disableDocumentSettings(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissable&&this.modal&&this.mask===e.target&&this.hide()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},n=this.$slots.default&&e(this.content);n||(n=this.$slots.header&&e(this.headerContainer))||(n=e(this.container)),n&&n.focus()},enableDocumentSettings:function(){this.dismissable&&!this.modal&&this.bindOutsideClickListener(),this.blockScroll&&r.DomHandler.addClass(document.body,"p-overflow-hidden")},disableDocumentSettings:function(){this.unbindOutsideClickListener(),this.blockScroll&&r.DomHandler.removeClass(document.body,"p-overflow-hidden")},onKeydown:function(e){"Escape"===e.code&&this.hide()},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},closeButtonRef:function(e){this.closeButton=e},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.isOutsideClicked(n)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},isOutsideClicked:function(e){return this.container&&!this.container.contains(e.target)}},computed:{fullScreen:function(){return"full"===this.position},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:d.default,ripple:u.default},components:{Portal:p.default,TimesIcon:c.default}};function h(e){return h="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},h(e)}function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function g(e,n,t){return(n=k(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function k(e){var n=x(e,"string");return"symbol"===h(n)?n:String(n)}function x(e,n){if("object"!==h(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,n||"default");if("object"!==h(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var w=["aria-modal"],C=["aria-label"];b.render=function(e,n,t,i,r,o){var s=a.resolveComponent("Portal"),l=a.resolveDirective("ripple"),d=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx((function(){return[r.containerVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.maskRef,onMousedown:n[2]||(n[2]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)}),class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position})},e.ptm("mask")),[a.createVNode(a.Transition,a.mergeProps({name:"p-sidebar",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:a.withCtx((function(){return[e.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,class:e.cx("root"),role:"complementary","aria-modal":e.modal,onKeydown:n[1]||(n[1]=function(){return o.onKeydown&&o.onKeydown.apply(o,arguments)})},y(y({},e.$attrs),e.ptm("root"))),[a.createElementVNode("div",a.mergeProps({ref:o.headerContainerRef,class:e.cx("header")},e.ptm("header")),[e.$slots.header?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:e.cx("headerContent")},e.ptm("headerContent")),[a.renderSlot(e.$slots,"header")],16)):a.createCommentVNode("",!0),e.showCloseIcon?a.withDirectives((a.openBlock(),a.createElementBlock("button",a.mergeProps({key:1,ref:o.closeButtonRef,autofocus:"",type:"button",class:e.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:n[0]||(n[0]=function(){return o.hide&&o.hide.apply(o,arguments)})},e.ptm("closeButton"),{"data-pc-group-section":"iconcontainer"}),[a.renderSlot(e.$slots,"closeicon",{},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),a.mergeProps({class:[e.cx("closeIcon"),e.closeIcon]},e.ptm("closeIcon")),null,16,["class"]))]}))],16,C)),[[l]]):a.createCommentVNode("",!0)],16),a.createElementVNode("div",a.mergeProps({ref:o.contentRef,class:e.cx("content")},e.ptm("content")),[a.renderSlot(e.$slots,"default")],16)],16,w)),[[d]]):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]})),_:3})},module.exports=b;
|
package/sidebar/sidebar.esm.js
CHANGED
|
@@ -178,7 +178,7 @@ var script = {
|
|
|
178
178
|
},
|
|
179
179
|
focus: function focus() {
|
|
180
180
|
var findFocusableElement = function findFocusableElement(container) {
|
|
181
|
-
return container.querySelector('[autofocus]');
|
|
181
|
+
return container && container.querySelector('[autofocus]');
|
|
182
182
|
};
|
|
183
183
|
var focusTarget = this.$slots["default"] && findFocusableElement(this.content);
|
|
184
184
|
if (!focusTarget) {
|