@nova-design-system/nova-webcomponents 3.20.0 → 3.21.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{grow.animation-f1cef0ad.js → grow.animation-69832995.js} +29 -1
- package/dist/cjs/grow.animation-69832995.js.map +1 -0
- package/dist/cjs/index-93d3b2f8.js +44 -0
- package/dist/cjs/index.cjs.js +3 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +7 -2
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +53 -19
- package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
- package/dist/cjs/nv-fielddate.cjs.entry.js +14 -17
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +7 -9
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +14 -5
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
- package/dist/cjs/nv-fieldtime.cjs.entry.js +3 -3
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +7 -2
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-menu.cjs.entry.js +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification-bullet.cjs.entry.js +79 -0
- package/dist/cjs/nv-notification-bullet.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-notification.cjs.entry.js +1 -1
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +10 -11
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebar.cjs.entry.js +179 -0
- package/dist/cjs/nv-sidebar.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebarcontent.cjs.entry.js +24 -0
- package/dist/cjs/nv-sidebarcontent.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebardivider.cjs.entry.js +24 -0
- package/dist/cjs/nv-sidebardivider.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebarfooter.cjs.entry.js +24 -0
- package/dist/cjs/nv-sidebarfooter.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebargroup.cjs.entry.js +25 -0
- package/dist/cjs/nv-sidebargroup.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebarheader.cjs.entry.js +24 -0
- package/dist/cjs/nv-sidebarheader.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebarlogo.cjs.entry.js +34 -0
- package/dist/cjs/nv-sidebarlogo.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebarnavitem.cjs.entry.js +299 -0
- package/dist/cjs/nv-sidebarnavitem.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-sidebarnavsubitem.cjs.entry.js +37 -0
- package/dist/cjs/nv-sidebarnavsubitem.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-split.cjs.entry.js +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +1 -1
- package/dist/cjs/nv-tableheader.cjs.entry.js +77 -0
- package/dist/cjs/nv-tableheader.cjs.entry.js.map +1 -0
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +11 -0
- package/dist/collection/components/nv-button/nv-button.js +26 -1
- package/dist/collection/components/nv-button/nv-button.js.map +1 -1
- package/dist/collection/components/nv-button/styles/nv-button.css +4 -0
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +4 -2
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.css +30 -22
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +14 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.js +47 -21
- package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +20 -17
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +7 -9
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +13 -4
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +24 -18
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitem/styles/nv-fielddropdownitem.css +5 -3
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +3 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +3 -3
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +1 -2
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +26 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-notification/nv-notification.js +1 -1
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.docs.js +68 -0
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.docs.js.map +1 -0
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.js +189 -0
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.js.map +1 -0
- package/dist/collection/components/nv-notification-bullet/styles/nv-notification-bullet.css +80 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-sidebar/nv-sidebar.docs.js +37 -0
- package/dist/collection/components/nv-sidebar/nv-sidebar.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebar/nv-sidebar.js +309 -0
- package/dist/collection/components/nv-sidebar/nv-sidebar.js.map +1 -0
- package/dist/collection/components/nv-sidebar/styles/nv-sidebar.css +73 -0
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.css +7 -0
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.docs.js +6 -0
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.js +24 -0
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.js.map +1 -0
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.css +6 -0
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.docs.js +6 -0
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.js +23 -0
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.js.map +1 -0
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.css +4 -0
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.docs.js +6 -0
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.js +25 -0
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.js.map +1 -0
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.css +17 -0
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.docs.js +6 -0
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.js +48 -0
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.js.map +1 -0
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.css +3 -0
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.docs.js +6 -0
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.js +25 -0
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.js.map +1 -0
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.docs.js +6 -0
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.js +97 -0
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.js.map +1 -0
- package/dist/collection/components/nv-sidebarlogo/styles/nv-sidebarlogo.css +47 -0
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.docs.js +6 -0
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js +422 -0
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js.map +1 -0
- package/dist/collection/components/nv-sidebarnavitem/styles/nv-sidebarnavitem.css +114 -0
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.docs.js +6 -0
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.docs.js.map +1 -0
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.js +64 -0
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.js.map +1 -0
- package/dist/collection/components/nv-sidebarnavsubitem/styles/nv-sidebarnavsubitem.css +73 -0
- package/dist/collection/components/nv-split/nv-split.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.docs.js +7 -0
- package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
- package/dist/collection/components/nv-table/nv-table.js +1 -1
- package/dist/collection/components/nv-tableheader/nv-tableheader.css +28 -0
- package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js +13 -0
- package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js.map +1 -0
- package/dist/collection/components/nv-tableheader/nv-tableheader.js +139 -0
- package/dist/collection/components/nv-tableheader/nv-tableheader.js.map +1 -0
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +4 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +3 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +4 -4
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +2 -2
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-datagrid.js +4 -4
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-dialog.js +57 -23
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +19 -22
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +11 -13
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +19 -10
- package/dist/components/nv-fielddropdown.js.map +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +8 -8
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +6 -6
- package/dist/components/nv-fieldradio.js +3 -3
- package/dist/components/nv-fieldselect.js +8 -8
- package/dist/components/nv-fieldslider.js +7 -7
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +3 -3
- package/dist/components/nv-fieldtime.js +7 -7
- package/dist/components/nv-icon.js +1 -1
- package/dist/components/nv-iconbutton.js +1 -1
- package/dist/components/nv-loader.js +1 -1
- package/dist/components/nv-menu.js +4 -4
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification-bullet.d.ts +11 -0
- package/dist/components/nv-notification-bullet.js +8 -0
- package/dist/components/nv-notification-bullet.js.map +1 -0
- package/dist/components/nv-notification.js +2 -2
- package/dist/components/nv-notificationcontainer.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-row.js +1 -1
- package/dist/components/nv-sidebar.d.ts +11 -0
- package/dist/components/nv-sidebar.js +208 -0
- package/dist/components/nv-sidebar.js.map +1 -0
- package/dist/components/nv-sidebarcontent.d.ts +11 -0
- package/dist/components/nv-sidebarcontent.js +38 -0
- package/dist/components/nv-sidebarcontent.js.map +1 -0
- package/dist/components/nv-sidebardivider.d.ts +11 -0
- package/dist/components/nv-sidebardivider.js +38 -0
- package/dist/components/nv-sidebardivider.js.map +1 -0
- package/dist/components/nv-sidebarfooter.d.ts +11 -0
- package/dist/components/nv-sidebarfooter.js +38 -0
- package/dist/components/nv-sidebarfooter.js.map +1 -0
- package/dist/components/nv-sidebargroup.d.ts +11 -0
- package/dist/components/nv-sidebargroup.js +41 -0
- package/dist/components/nv-sidebargroup.js.map +1 -0
- package/dist/components/nv-sidebarheader.d.ts +11 -0
- package/dist/components/nv-sidebarheader.js +38 -0
- package/dist/components/nv-sidebarheader.js.map +1 -0
- package/dist/components/nv-sidebarlogo.d.ts +11 -0
- package/dist/components/nv-sidebarlogo.js +52 -0
- package/dist/components/nv-sidebarlogo.js.map +1 -0
- package/dist/components/nv-sidebarnavitem.d.ts +11 -0
- package/dist/components/nv-sidebarnavitem.js +335 -0
- package/dist/components/nv-sidebarnavitem.js.map +1 -0
- package/dist/components/nv-sidebarnavsubitem.d.ts +11 -0
- package/dist/components/nv-sidebarnavsubitem.js +53 -0
- package/dist/components/nv-sidebarnavsubitem.js.map +1 -0
- package/dist/components/nv-split.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +1 -1
- package/dist/components/nv-tableheader.d.ts +11 -0
- package/dist/components/nv-tableheader.js +112 -0
- package/dist/components/nv-tableheader.js.map +1 -0
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-togglebutton.js +2 -2
- package/dist/components/nv-togglebutton.js.map +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-18f50d91.js → p-20a1c769.js} +2 -2
- package/dist/components/{p-18f50d91.js.map → p-20a1c769.js.map} +1 -1
- package/dist/components/{p-a6c29711.js → p-2d7d3aa2.js} +3 -3
- package/dist/components/{p-a6c29711.js.map → p-2d7d3aa2.js.map} +1 -1
- package/dist/components/{p-81d915ef.js → p-439c38c3.js} +3 -3
- package/dist/components/{p-81d915ef.js.map → p-439c38c3.js.map} +1 -1
- package/dist/components/{p-429e01f3.js → p-583b3d89.js} +2 -2
- package/dist/components/{p-429e01f3.js.map → p-583b3d89.js.map} +1 -1
- package/dist/components/{p-2ac6f42d.js → p-5f78a78f.js} +3 -3
- package/dist/components/{p-2ac6f42d.js.map → p-5f78a78f.js.map} +1 -1
- package/dist/components/{p-4799b6c3.js → p-62f91b46.js} +3 -4
- package/dist/components/p-62f91b46.js.map +1 -0
- package/dist/components/{p-5a5db065.js → p-7214f13f.js} +11 -5
- package/dist/components/p-7214f13f.js.map +1 -0
- package/dist/components/p-743b3452.js +88 -0
- package/dist/components/p-743b3452.js.map +1 -0
- package/dist/components/p-82c9b7cc.js +96 -0
- package/dist/components/p-82c9b7cc.js.map +1 -0
- package/dist/components/{p-60083982.js → p-94ad267c.js} +5 -5
- package/dist/components/{p-60083982.js.map → p-94ad267c.js.map} +1 -1
- package/dist/components/{p-222136c2.js → p-996438a2.js} +2 -2
- package/dist/components/{p-222136c2.js.map → p-996438a2.js.map} +1 -1
- package/dist/components/{p-4697bd56.js → p-996ed843.js} +27 -2
- package/dist/components/p-996ed843.js.map +1 -0
- package/dist/components/p-af663ff5.js +191 -0
- package/dist/components/p-af663ff5.js.map +1 -0
- package/dist/components/{p-49205084.js → p-bcf9d309.js} +5 -5
- package/dist/components/{p-49205084.js.map → p-bcf9d309.js.map} +1 -1
- package/dist/components/{p-b67f31af.js → p-cc77f8fe.js} +7 -7
- package/dist/components/{p-b67f31af.js.map → p-cc77f8fe.js.map} +1 -1
- package/dist/components/{p-45a3cf85.js → p-d9c1cd97.js} +4 -4
- package/dist/components/{p-45a3cf85.js.map → p-d9c1cd97.js.map} +1 -1
- package/dist/components/{p-0d5ed1d7.js → p-e1f82896.js} +5 -5
- package/dist/components/{p-0d5ed1d7.js.map → p-e1f82896.js.map} +1 -1
- package/dist/components/{p-334e19d3.js → p-f6ffffd9.js} +4 -4
- package/dist/components/{p-334e19d3.js.map → p-f6ffffd9.js.map} +1 -1
- package/dist/esm/{grow.animation-03fa5c19.js → grow.animation-24ad5cf8.js} +27 -2
- package/dist/esm/grow.animation-24ad5cf8.js.map +1 -0
- package/dist/esm/index-dc2723f3.js +44 -0
- package/dist/esm/index.js +3 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/native.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +7 -2
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +51 -17
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
- package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
- package/dist/esm/nv-fielddate.entry.js +14 -17
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +7 -9
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +14 -5
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
- package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +3 -3
- package/dist/esm/nv-fieldpassword.entry.js +3 -3
- package/dist/esm/nv-fieldradio.entry.js +3 -3
- package/dist/esm/nv-fieldselect.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js +3 -3
- package/dist/esm/nv-fieldtext.entry.js +3 -3
- package/dist/esm/nv-fieldtextarea.entry.js +3 -3
- package/dist/esm/nv-fieldtime.entry.js +3 -3
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +7 -2
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
- package/dist/esm/nv-menu.entry.js +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-notification-bullet.entry.js +75 -0
- package/dist/esm/nv-notification-bullet.entry.js.map +1 -0
- package/dist/esm/nv-notification.entry.js +1 -1
- package/dist/esm/nv-notificationcontainer.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +2 -3
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-row.entry.js +1 -1
- package/dist/esm/nv-sidebar.entry.js +175 -0
- package/dist/esm/nv-sidebar.entry.js.map +1 -0
- package/dist/esm/nv-sidebarcontent.entry.js +20 -0
- package/dist/esm/nv-sidebarcontent.entry.js.map +1 -0
- package/dist/esm/nv-sidebardivider.entry.js +20 -0
- package/dist/esm/nv-sidebardivider.entry.js.map +1 -0
- package/dist/esm/nv-sidebarfooter.entry.js +20 -0
- package/dist/esm/nv-sidebarfooter.entry.js.map +1 -0
- package/dist/esm/nv-sidebargroup.entry.js +21 -0
- package/dist/esm/nv-sidebargroup.entry.js.map +1 -0
- package/dist/esm/nv-sidebarheader.entry.js +20 -0
- package/dist/esm/nv-sidebarheader.entry.js.map +1 -0
- package/dist/esm/nv-sidebarlogo.entry.js +30 -0
- package/dist/esm/nv-sidebarlogo.entry.js.map +1 -0
- package/dist/esm/nv-sidebarnavitem.entry.js +295 -0
- package/dist/esm/nv-sidebarnavitem.entry.js.map +1 -0
- package/dist/esm/nv-sidebarnavsubitem.entry.js +33 -0
- package/dist/esm/nv-sidebarnavsubitem.entry.js.map +1 -0
- package/dist/esm/nv-split.entry.js +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +1 -1
- package/dist/esm/nv-tableheader.entry.js +73 -0
- package/dist/esm/nv-tableheader.entry.js.map +1 -0
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js.map +1 -1
- package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/index.esm.js.map +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/native.esm.js.map +1 -1
- package/dist/native/p-02debfd0.entry.js +2 -0
- package/dist/native/p-02debfd0.entry.js.map +1 -0
- package/dist/native/{p-859bf9ad.entry.js → p-1ee225be.entry.js} +2 -2
- package/dist/native/p-1ee225be.entry.js.map +1 -0
- package/dist/native/p-21dde805.entry.js +2 -0
- package/dist/native/p-242cdeac.entry.js +2 -0
- package/dist/native/p-242cdeac.entry.js.map +1 -0
- package/dist/native/p-2ba7b6f2.entry.js +2 -0
- package/dist/native/p-2ba7b6f2.entry.js.map +1 -0
- package/dist/native/{p-b4382c94.entry.js → p-2d363bd9.entry.js} +2 -2
- package/dist/native/{p-b02c896a.entry.js → p-31a61359.entry.js} +2 -2
- package/dist/native/p-32c16132.entry.js +2 -0
- package/dist/native/p-32c16132.entry.js.map +1 -0
- package/dist/native/p-35263b61.entry.js +2 -0
- package/dist/native/p-35263b61.entry.js.map +1 -0
- package/dist/native/{p-9950e075.entry.js → p-3df31ed5.entry.js} +2 -2
- package/dist/native/{p-c901693d.entry.js → p-4bf63654.entry.js} +2 -2
- package/dist/native/p-6005ff69.entry.js +2 -0
- package/dist/native/p-6005ff69.entry.js.map +1 -0
- package/dist/native/p-63348887.entry.js +2 -0
- package/dist/native/p-63348887.entry.js.map +1 -0
- package/dist/native/{p-587d94f3.entry.js → p-6fb6b9e4.entry.js} +2 -2
- package/dist/native/{p-a2f58133.entry.js → p-7a2f37e2.entry.js} +2 -2
- package/dist/native/p-7b7bbac7.entry.js +2 -0
- package/dist/native/p-7b7bbac7.entry.js.map +1 -0
- package/dist/native/{p-075d231e.entry.js → p-87deff5a.entry.js} +2 -2
- package/dist/native/p-8bee34e6.entry.js +2 -0
- package/dist/native/p-8bee34e6.entry.js.map +1 -0
- package/dist/native/{p-6a418ec4.entry.js → p-93d80b03.entry.js} +2 -2
- package/dist/native/p-98cab7d2.entry.js +2 -0
- package/dist/native/p-98cab7d2.entry.js.map +1 -0
- package/dist/native/p-996ed843.js +2 -0
- package/dist/native/p-996ed843.js.map +1 -0
- package/dist/native/{p-fa3e588e.entry.js → p-9e36eebc.entry.js} +2 -2
- package/dist/native/{p-2a7f80f4.entry.js → p-a4a0021c.entry.js} +2 -2
- package/dist/native/{p-17666092.entry.js → p-a6d8d9a1.entry.js} +2 -2
- package/dist/native/{p-eb74feb7.entry.js → p-a9a7f1b8.entry.js} +2 -2
- package/dist/native/p-ad5e12d2.entry.js +2 -0
- package/dist/native/{p-e6f24210.entry.js.map → p-ad5e12d2.entry.js.map} +1 -1
- package/dist/native/{p-fffbd3c1.entry.js → p-aefd32f0.entry.js} +2 -2
- package/dist/native/p-b369a073.entry.js +2 -0
- package/dist/native/{p-dfb6b65e.entry.js.map → p-b369a073.entry.js.map} +1 -1
- package/dist/native/p-b3d6e9f4.entry.js +2 -0
- package/dist/native/{p-c9fea0df.entry.js.map → p-b3d6e9f4.entry.js.map} +1 -1
- package/dist/native/{p-445221dc.entry.js → p-b4128eb5.entry.js} +2 -2
- package/dist/native/p-b43d6629.entry.js +2 -0
- package/dist/native/p-b43d6629.entry.js.map +1 -0
- package/dist/native/p-b5e752f5.entry.js +2 -0
- package/dist/native/p-b5e752f5.entry.js.map +1 -0
- package/dist/native/p-b860d0d3.entry.js +7 -0
- package/dist/native/p-b860d0d3.entry.js.map +1 -0
- package/dist/native/{p-9c432751.entry.js → p-b97f392a.entry.js} +2 -2
- package/dist/native/{p-d63689da.entry.js → p-bd91e0bb.entry.js} +2 -2
- package/dist/native/p-bd91e0bb.entry.js.map +1 -0
- package/dist/native/{p-122c78c3.entry.js → p-be49d837.entry.js} +2 -2
- package/dist/native/{p-122c78c3.entry.js.map → p-be49d837.entry.js.map} +1 -1
- package/dist/native/{p-a026654f.entry.js → p-c37ab530.entry.js} +2 -2
- package/dist/native/{p-44a78545.entry.js → p-c4cd2860.entry.js} +2 -2
- package/dist/native/{p-bd9bf6a1.entry.js → p-d22a503b.entry.js} +2 -2
- package/dist/native/{p-f3c73492.entry.js → p-da76357c.entry.js} +2 -2
- package/dist/native/{p-d0db5e72.entry.js → p-dac1537a.entry.js} +2 -2
- package/dist/native/p-e688c905.entry.js +2 -0
- package/dist/native/{p-218135b1.entry.js.map → p-e688c905.entry.js.map} +1 -1
- package/dist/native/p-e7fdcb83.entry.js +2 -0
- package/dist/native/p-e7fdcb83.entry.js.map +1 -0
- package/dist/native/{p-0177409b.entry.js → p-e887bbf5.entry.js} +2 -2
- package/dist/native/p-f22ac722.entry.js +2 -0
- package/dist/native/p-f22ac722.entry.js.map +1 -0
- package/dist/native/p-f8a099a5.entry.js +2 -0
- package/dist/native/p-f8a099a5.entry.js.map +1 -0
- package/dist/types/components/nv-button/nv-button.d.ts +5 -0
- package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +2 -0
- package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -2
- package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +1 -1
- package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +1 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-iconbutton/nv-iconbutton.d.ts +5 -0
- package/dist/types/components/nv-notification-bullet/nv-notification-bullet.d.ts +44 -0
- package/dist/types/components/nv-notification-bullet/nv-notification-bullet.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebar/nv-sidebar.d.ts +64 -0
- package/dist/types/components/nv-sidebar/nv-sidebar.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebarcontent/nv-sidebarcontent.d.ts +8 -0
- package/dist/types/components/nv-sidebarcontent/nv-sidebarcontent.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebardivider/nv-sidebardivider.d.ts +7 -0
- package/dist/types/components/nv-sidebardivider/nv-sidebardivider.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebarfooter/nv-sidebarfooter.d.ts +9 -0
- package/dist/types/components/nv-sidebarfooter/nv-sidebarfooter.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebargroup/nv-sidebargroup.d.ts +13 -0
- package/dist/types/components/nv-sidebargroup/nv-sidebargroup.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebarheader/nv-sidebarheader.d.ts +9 -0
- package/dist/types/components/nv-sidebarheader/nv-sidebarheader.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebarlogo/nv-sidebarlogo.d.ts +26 -0
- package/dist/types/components/nv-sidebarlogo/nv-sidebarlogo.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebarnavitem/nv-sidebarnavitem.d.ts +62 -0
- package/dist/types/components/nv-sidebarnavitem/nv-sidebarnavitem.docs.d.ts +4 -0
- package/dist/types/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.d.ts +15 -0
- package/dist/types/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.docs.d.ts +4 -0
- package/dist/types/components/nv-tableheader/nv-tableheader.d.ts +32 -0
- package/dist/types/components/nv-tableheader/nv-tableheader.docs.d.ts +4 -0
- package/dist/types/components.d.ts +594 -0
- package/dist/vscode-data.json +1823 -32
- package/hydrate/index.js +1066 -112
- package/hydrate/index.mjs +1066 -112
- package/package.json +45 -5
- package/dist/cjs/events.utils-52846a7d.js +0 -32
- package/dist/cjs/events.utils-52846a7d.js.map +0 -1
- package/dist/cjs/grow.animation-f1cef0ad.js.map +0 -1
- package/dist/components/p-4697bd56.js.map +0 -1
- package/dist/components/p-4799b6c3.js.map +0 -1
- package/dist/components/p-5a5db065.js.map +0 -1
- package/dist/components/p-946a047c.js +0 -88
- package/dist/components/p-946a047c.js.map +0 -1
- package/dist/components/p-d429a343.js +0 -28
- package/dist/components/p-d429a343.js.map +0 -1
- package/dist/components/p-e1b2eba2.js +0 -185
- package/dist/components/p-e1b2eba2.js.map +0 -1
- package/dist/esm/events.utils-fe1d907f.js +0 -28
- package/dist/esm/events.utils-fe1d907f.js.map +0 -1
- package/dist/esm/grow.animation-03fa5c19.js.map +0 -1
- package/dist/native/p-144d0f8a.entry.js +0 -2
- package/dist/native/p-144d0f8a.entry.js.map +0 -1
- package/dist/native/p-218135b1.entry.js +0 -2
- package/dist/native/p-4697bd56.js +0 -2
- package/dist/native/p-4697bd56.js.map +0 -1
- package/dist/native/p-57420a2f.entry.js +0 -2
- package/dist/native/p-859bf9ad.entry.js.map +0 -1
- package/dist/native/p-8e423742.entry.js +0 -7
- package/dist/native/p-8e423742.entry.js.map +0 -1
- package/dist/native/p-a6fc987a.entry.js +0 -2
- package/dist/native/p-a6fc987a.entry.js.map +0 -1
- package/dist/native/p-c9fea0df.entry.js +0 -2
- package/dist/native/p-d429a343.js +0 -2
- package/dist/native/p-d429a343.js.map +0 -1
- package/dist/native/p-d62869ff.entry.js +0 -2
- package/dist/native/p-d62869ff.entry.js.map +0 -1
- package/dist/native/p-d63689da.entry.js.map +0 -1
- package/dist/native/p-d8f3cf92.entry.js +0 -2
- package/dist/native/p-d8f3cf92.entry.js.map +0 -1
- package/dist/native/p-dfb6b65e.entry.js +0 -2
- package/dist/native/p-e6f24210.entry.js +0 -2
- /package/dist/native/{p-57420a2f.entry.js.map → p-21dde805.entry.js.map} +0 -0
- /package/dist/native/{p-b4382c94.entry.js.map → p-2d363bd9.entry.js.map} +0 -0
- /package/dist/native/{p-b02c896a.entry.js.map → p-31a61359.entry.js.map} +0 -0
- /package/dist/native/{p-9950e075.entry.js.map → p-3df31ed5.entry.js.map} +0 -0
- /package/dist/native/{p-c901693d.entry.js.map → p-4bf63654.entry.js.map} +0 -0
- /package/dist/native/{p-587d94f3.entry.js.map → p-6fb6b9e4.entry.js.map} +0 -0
- /package/dist/native/{p-a2f58133.entry.js.map → p-7a2f37e2.entry.js.map} +0 -0
- /package/dist/native/{p-075d231e.entry.js.map → p-87deff5a.entry.js.map} +0 -0
- /package/dist/native/{p-6a418ec4.entry.js.map → p-93d80b03.entry.js.map} +0 -0
- /package/dist/native/{p-fa3e588e.entry.js.map → p-9e36eebc.entry.js.map} +0 -0
- /package/dist/native/{p-2a7f80f4.entry.js.map → p-a4a0021c.entry.js.map} +0 -0
- /package/dist/native/{p-17666092.entry.js.map → p-a6d8d9a1.entry.js.map} +0 -0
- /package/dist/native/{p-eb74feb7.entry.js.map → p-a9a7f1b8.entry.js.map} +0 -0
- /package/dist/native/{p-fffbd3c1.entry.js.map → p-aefd32f0.entry.js.map} +0 -0
- /package/dist/native/{p-445221dc.entry.js.map → p-b4128eb5.entry.js.map} +0 -0
- /package/dist/native/{p-9c432751.entry.js.map → p-b97f392a.entry.js.map} +0 -0
- /package/dist/native/{p-a026654f.entry.js.map → p-c37ab530.entry.js.map} +0 -0
- /package/dist/native/{p-44a78545.entry.js.map → p-c4cd2860.entry.js.map} +0 -0
- /package/dist/native/{p-bd9bf6a1.entry.js.map → p-d22a503b.entry.js.map} +0 -0
- /package/dist/native/{p-f3c73492.entry.js.map → p-da76357c.entry.js.map} +0 -0
- /package/dist/native/{p-d0db5e72.entry.js.map → p-dac1537a.entry.js.map} +0 -0
- /package/dist/native/{p-0177409b.entry.js.map → p-e887bbf5.entry.js.map} +0 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, d as Host } from './p-5829b9f7.js';
|
|
2
|
+
import { d as defineCustomElement$3 } from './p-743b3452.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-82c9b7cc.js';
|
|
4
|
+
|
|
5
|
+
const nvSidebarnavitemCss = "nv-sidebarnavitem{display:flex;flex-direction:column;gap:0}nv-sidebarnavitem .nv-sidebarnavitem-trigger{display:flex;align-items:center;gap:var(--sidebar-primary-item-gap-x);padding:var(--sidebar-primary-item-padding-y) var(--sidebar-primary-item-padding-x);border-radius:var(--sidebar-primary-item-radius);cursor:pointer;transition:all 0.15s ease;font-size:var(--sidebar-primary-item-font-size);font-weight:var(--font-weight-medium-emphasis);color:var(--color-content-low-text);background:var(--color-interaction-container-neutral-background);text-decoration:none;--nv-component-background:var(--color-interaction-container-neutral-background);--nv-sidebarnavitem-background:var(--color-interaction-container-neutral-background)}nv-sidebarnavitem .nv-sidebarnavitem-trigger:hover{background-color:var(--color-interaction-container-neutral-background-hover);color:var(--color-content-medium-text);--nv-component-background:var(--color-interaction-container-neutral-background-hover);--nv-sidebarnavitem-background:var(--color-interaction-container-neutral-background-hover)}nv-sidebarnavitem .nv-sidebarnavitem-trigger:focus,nv-sidebarnavitem .nv-sidebarnavitem-trigger:focus-within{outline:none}nv-sidebarnavitem .nv-sidebarnavitem-trigger:focus-visible,nv-sidebarnavitem .nv-sidebarnavitem-trigger:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-sidebarnavitem[active] .nv-sidebarnavitem-trigger{background-color:var(--color-interaction-container-neutral-background-active);color:var(--color-interaction-container-neutral-text-active);font-weight:var(--font-weight-medium-emphasis);--nv-component-background:var(--color-interaction-container-neutral-background-active);--nv-sidebarnavitem-background:var(--color-interaction-container-neutral-background-active)}nv-sidebarnavitem .nv-sidebarnavitem-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;color:inherit;width:var(--sidebar-primary-item-icon-size);height:var(--sidebar-primary-item-icon-size);position:relative}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-icon{overflow:visible;margin:0;justify-content:center}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-icon nv-notification-bullet{position:absolute;transform:translate(50%, -50%);z-index:1;--sidebar-primary-notification-bullet-size-reduced:calc(\n var(--sidebar-primary-item-icon-size) * 0.4\n )}nv-sidebarnavitem .nv-sidebarnavitem-content{flex:1;display:flex;align-items:center}nv-sidebarnavitem .nv-sidebarnavitem-content a{color:inherit !important;text-decoration:none !important;font-weight:var(--font-weight-medium-emphasis) !important;flex:1}nv-sidebarnavitem .nv-sidebarnavitem-trailing{display:flex;align-items:center;gap:var(--spacing-2);margin-left:auto}nv-sidebarnavitem .nv-sidebarnavitem-chevron{transition:transform 0.2s ease;color:inherit}nv-sidebarnavitem[open] .nv-sidebarnavitem-chevron{transform:rotate(180deg)}nv-sidebarnavitem .nv-sidebarnavitem-subitems{display:flex;flex-direction:column;gap:0;max-height:0;overflow:hidden;opacity:0;transition:max-height 0.3s ease, opacity 0.2s ease;padding-left:0}nv-sidebarnavitem[open] .nv-sidebarnavitem-subitems{opacity:1;margin-top:var(--spacing-1)}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-trigger{justify-content:center;gap:0;width:100%}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-content{display:none}nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-trailing,nv-sidebar[collapsed] nv-sidebarnavitem .nv-sidebarnavitem-chevron{display:none}";
|
|
6
|
+
const NvSidebarnavitemStyle0 = nvSidebarnavitemCss;
|
|
7
|
+
|
|
8
|
+
const NvSidebarnavitem$1 = /*@__PURE__*/ proxyCustomElement(class NvSidebarnavitem extends H {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
/**
|
|
13
|
+
* Whether this item represents the active/current page.
|
|
14
|
+
* Can be set automatically when a sub-item becomes active.
|
|
15
|
+
*/
|
|
16
|
+
this.active = false;
|
|
17
|
+
/**
|
|
18
|
+
* Whether this item can be collapsed/expanded (has sub-items).
|
|
19
|
+
*/
|
|
20
|
+
this.collapsible = false;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the collapsible item is currently open (showing sub-items).
|
|
23
|
+
*/
|
|
24
|
+
this.open = false;
|
|
25
|
+
//#endregion PROPERTIES
|
|
26
|
+
/****************************************************************************/
|
|
27
|
+
//#region STATE
|
|
28
|
+
this.hasSubitems = false;
|
|
29
|
+
this.isSidebarCollapsed = false;
|
|
30
|
+
this.wasActiveFromSubitem = false; // Track if active was set by subitem logic
|
|
31
|
+
//#endregion STATE
|
|
32
|
+
/****************************************************************************/
|
|
33
|
+
//#region METHODS
|
|
34
|
+
this.handleToggle = (event) => {
|
|
35
|
+
// Ignore clicks that originated from subitems (they bubble up but shouldn't toggle)
|
|
36
|
+
const target = event.target;
|
|
37
|
+
if (target.closest('nv-sidebarnavsubitem')) {
|
|
38
|
+
return; // Let the subitem's link handle navigation normally
|
|
39
|
+
}
|
|
40
|
+
// In collapsed sidebar mode, navigate to the main link instead of toggling
|
|
41
|
+
if (this.isSidebarCollapsed) {
|
|
42
|
+
// Find the first link that is NOT inside subitems
|
|
43
|
+
const link = this.el.querySelector('.nv-sidebarnavitem-content a, :scope > a');
|
|
44
|
+
if (link === null || link === void 0 ? void 0 : link.href) {
|
|
45
|
+
// Check if click was directly on the link - if so, let it handle naturally
|
|
46
|
+
if (target.closest('a')) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
// Trigger navigation by clicking the link programmatically
|
|
50
|
+
link.click();
|
|
51
|
+
}
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
// Only handle toggle for collapsible items when sidebar is expanded
|
|
55
|
+
if (this.collapsible) {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
event.stopPropagation();
|
|
58
|
+
this.open = !this.open;
|
|
59
|
+
}
|
|
60
|
+
// For non-collapsible items in expanded mode, let the link handle the navigation
|
|
61
|
+
// Don't prevent default or stop propagation - allow the link to work normally
|
|
62
|
+
};
|
|
63
|
+
this.isAnimating = false;
|
|
64
|
+
this.hasInitializedHeight = false;
|
|
65
|
+
/** Tracks the last open state that was animated to, to prevent redundant animations */
|
|
66
|
+
this.lastAnimatedOpenState = null;
|
|
67
|
+
this.updateSubitemsHeight = (force = false) => {
|
|
68
|
+
if (!this.subitemsRef)
|
|
69
|
+
return;
|
|
70
|
+
// Skip animation if we're already in the target state (prevents animation on active change)
|
|
71
|
+
// Only animate if:
|
|
72
|
+
// 1. forced (explicit toggle by user via @Watch)
|
|
73
|
+
// 2. OR this is the first animation (lastAnimatedOpenState is null)
|
|
74
|
+
// 3. OR the open state has actually changed since last animation
|
|
75
|
+
if (!force &&
|
|
76
|
+
this.lastAnimatedOpenState !== null &&
|
|
77
|
+
this.lastAnimatedOpenState === this.open) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
// Don't re-animate if already animating and not forced
|
|
81
|
+
if (this.isAnimating && !force) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.isAnimating = true;
|
|
85
|
+
this.lastAnimatedOpenState = this.open;
|
|
86
|
+
if (this.open) {
|
|
87
|
+
// Calculate real height and animate to it
|
|
88
|
+
this.subitemsRef.style.transition = 'none';
|
|
89
|
+
this.subitemsRef.style.maxHeight = '0px';
|
|
90
|
+
requestAnimationFrame(() => {
|
|
91
|
+
if (this.subitemsRef) {
|
|
92
|
+
this.subitemsRef.style.transition =
|
|
93
|
+
'max-height 0.3s ease, opacity 0.2s ease';
|
|
94
|
+
this.subitemsRef.style.maxHeight =
|
|
95
|
+
this.subitemsRef.scrollHeight + 'px';
|
|
96
|
+
// Reset animation flag after animation completes
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
this.isAnimating = false;
|
|
99
|
+
}, 300); // Match animation duration
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
// Animate to 0
|
|
105
|
+
this.subitemsRef.style.transition = 'none';
|
|
106
|
+
this.subitemsRef.style.maxHeight = this.subitemsRef.scrollHeight + 'px';
|
|
107
|
+
requestAnimationFrame(() => {
|
|
108
|
+
if (this.subitemsRef) {
|
|
109
|
+
this.subitemsRef.style.transition =
|
|
110
|
+
'max-height 0.3s ease, opacity 0.2s ease';
|
|
111
|
+
this.subitemsRef.style.maxHeight = '0px';
|
|
112
|
+
// Reset animation flag after animation completes
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
this.isAnimating = false;
|
|
115
|
+
}, 300); // Match animation duration
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
this.checkSidebarCollapsed = () => {
|
|
121
|
+
var _a;
|
|
122
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
123
|
+
const wasCollapsed = this.isSidebarCollapsed;
|
|
124
|
+
this.isSidebarCollapsed = (_a = sidebar === null || sidebar === void 0 ? void 0 : sidebar.hasAttribute('collapsed')) !== null && _a !== void 0 ? _a : false;
|
|
125
|
+
// When sidebar collapse state changes, update active state based on subitems
|
|
126
|
+
if (wasCollapsed !== this.isSidebarCollapsed) {
|
|
127
|
+
this.updateActiveFromSubitems();
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Checks if any sub-item is active and updates parent active state.
|
|
132
|
+
* - When sidebar is collapsed: if a sub-item is active, parent should be active
|
|
133
|
+
* - When sidebar is expanded: if a sub-item is active AND parent is not open, parent should be active
|
|
134
|
+
* (because sub-items are hidden, we need to indicate the parent contains an active child)
|
|
135
|
+
*/
|
|
136
|
+
this.updateActiveFromSubitems = () => {
|
|
137
|
+
if (!this.hasSubitems)
|
|
138
|
+
return;
|
|
139
|
+
// Find all sub-items
|
|
140
|
+
const subItems = Array.from(this.el.querySelectorAll('nv-sidebarnavsubitem'));
|
|
141
|
+
// Check if any sub-item is active
|
|
142
|
+
const hasActiveSubitem = subItems.some(subItem => subItem.active);
|
|
143
|
+
if (this.isSidebarCollapsed) {
|
|
144
|
+
// When sidebar is collapsed AND a sub-item is active, make parent active
|
|
145
|
+
if (hasActiveSubitem) {
|
|
146
|
+
this.active = true;
|
|
147
|
+
this.wasActiveFromSubitem = true;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
// When collapsed and no sub-item is active, remove active state only if we set it
|
|
151
|
+
if (this.wasActiveFromSubitem) {
|
|
152
|
+
this.active = false;
|
|
153
|
+
this.wasActiveFromSubitem = false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
// When sidebar is expanded
|
|
159
|
+
if (hasActiveSubitem && !this.open) {
|
|
160
|
+
// If a sub-item is active AND parent is not open (sub-items hidden),
|
|
161
|
+
// make parent active to indicate it contains an active child
|
|
162
|
+
this.active = true;
|
|
163
|
+
this.wasActiveFromSubitem = true;
|
|
164
|
+
}
|
|
165
|
+
else if (hasActiveSubitem && this.open) {
|
|
166
|
+
// If a sub-item is active BUT parent is open (sub-items visible),
|
|
167
|
+
// remove active state from parent (only sub-item should be active)
|
|
168
|
+
if (this.wasActiveFromSubitem) {
|
|
169
|
+
this.active = false;
|
|
170
|
+
this.wasActiveFromSubitem = false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
// No active sub-item, remove active state if we set it
|
|
175
|
+
if (this.wasActiveFromSubitem) {
|
|
176
|
+
this.active = false;
|
|
177
|
+
this.wasActiveFromSubitem = false;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Note: activePath logic in nv-sidebar can also manage parent active state
|
|
181
|
+
// (when parent href matches activePath exactly)
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
//#endregion METHODS
|
|
186
|
+
/****************************************************************************/
|
|
187
|
+
//#region LIFECYCLE
|
|
188
|
+
componentWillLoad() {
|
|
189
|
+
// Check if there are sub-items in any slot
|
|
190
|
+
const subItems = Array.from(this.el.children).filter(child => child.tagName.toLowerCase() === 'nv-sidebarnavsubitem');
|
|
191
|
+
this.hasSubitems = subItems.length > 0;
|
|
192
|
+
// Move sub-items to the subitems slot
|
|
193
|
+
if (this.hasSubitems) {
|
|
194
|
+
subItems.forEach(item => {
|
|
195
|
+
item.setAttribute('slot', 'subitems');
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
// Check sidebar collapsed state
|
|
199
|
+
this.checkSidebarCollapsed();
|
|
200
|
+
// Watch for sidebar state changes
|
|
201
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
202
|
+
if (sidebar) {
|
|
203
|
+
this.mutationObserver = new MutationObserver(() => {
|
|
204
|
+
this.checkSidebarCollapsed();
|
|
205
|
+
});
|
|
206
|
+
this.mutationObserver.observe(sidebar, {
|
|
207
|
+
attributes: true,
|
|
208
|
+
attributeFilter: ['collapsed'],
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
// Watch for sub-items active state changes
|
|
212
|
+
if (this.hasSubitems) {
|
|
213
|
+
// Observe the subitems container for changes (including new sub-items being added)
|
|
214
|
+
// Using subtree: true to catch all attribute changes in descendants
|
|
215
|
+
const subitemsContainer = this.el.querySelector('.nv-sidebarnavitem-subitems');
|
|
216
|
+
if (subitemsContainer) {
|
|
217
|
+
this.subitemsMutationObserver = new MutationObserver(() => {
|
|
218
|
+
this.updateActiveFromSubitems();
|
|
219
|
+
});
|
|
220
|
+
// Observe the container for child list changes and attribute changes in descendants
|
|
221
|
+
this.subitemsMutationObserver.observe(subitemsContainer, {
|
|
222
|
+
childList: true,
|
|
223
|
+
subtree: true,
|
|
224
|
+
attributes: true,
|
|
225
|
+
attributeFilter: ['active'],
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
// If container doesn't exist yet (not collapsible or not rendered), observe the element itself
|
|
230
|
+
// This handles cases where sub-items are direct children
|
|
231
|
+
this.subitemsMutationObserver = new MutationObserver(() => {
|
|
232
|
+
this.updateActiveFromSubitems();
|
|
233
|
+
});
|
|
234
|
+
this.subitemsMutationObserver.observe(this.el, {
|
|
235
|
+
childList: true,
|
|
236
|
+
subtree: true,
|
|
237
|
+
attributes: true,
|
|
238
|
+
attributeFilter: ['active'],
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
// Initial check for active subitems
|
|
243
|
+
this.updateActiveFromSubitems();
|
|
244
|
+
}
|
|
245
|
+
disconnectedCallback() {
|
|
246
|
+
if (this.mutationObserver) {
|
|
247
|
+
this.mutationObserver.disconnect();
|
|
248
|
+
}
|
|
249
|
+
if (this.subitemsMutationObserver) {
|
|
250
|
+
this.subitemsMutationObserver.disconnect();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
//#endregion LIFECYCLE
|
|
254
|
+
/****************************************************************************/
|
|
255
|
+
//#region WATCHERS
|
|
256
|
+
onOpenChanged(newValue, oldValue) {
|
|
257
|
+
// Only animate if the value actually changed (prevents false triggers from React re-renders)
|
|
258
|
+
if (newValue === oldValue) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
// Force update when open state changes (user clicked toggle)
|
|
262
|
+
this.updateSubitemsHeight(true);
|
|
263
|
+
// Update active state based on subitems when open state changes
|
|
264
|
+
this.updateActiveFromSubitems();
|
|
265
|
+
}
|
|
266
|
+
//#endregion WATCHERS
|
|
267
|
+
/****************************************************************************/
|
|
268
|
+
//#region RENDER
|
|
269
|
+
render() {
|
|
270
|
+
const showNotificationBullet = this.notificationCount !== undefined && this.notificationCount > 0;
|
|
271
|
+
const notificationSize = this.isSidebarCollapsed ? 'reduced' : 'default';
|
|
272
|
+
return (h(Host, { key: 'c0c9c63cb295441389b5ced9a4b0a0d5a1af99cd', role: "listitem" }, h("div", { key: '6673c3f4c14762bff8512ecc430febddfa74b307', class: "nv-sidebarnavitem-trigger", onClick: this.handleToggle, "aria-expanded": this.collapsible ? String(this.open) : undefined, "aria-current": this.active && !this.collapsible ? 'page' : undefined }, this.icon && (h("div", { key: '25f703e9fb7375b8b562be54f080120ae037dd9f', class: "nv-sidebarnavitem-icon" }, h("nv-icon", { key: '1a4e345c90afcec159890db6c6b0e22d53dd673d', name: this.icon, size: "md" }), showNotificationBullet && this.isSidebarCollapsed && (h("nv-notification-bullet", { key: '15b69d1a2325daed7d6583ed10906fe4e91809e5', count: this.notificationCount, size: notificationSize, contrastingBorder: true })))), h("div", { key: 'c717c09f39eab07616de419a35b11a5b7dfce5d1', class: "nv-sidebarnavitem-content" }, h("slot", { key: '9f8687f151fd082a6737e7fbe6036cc3ebff3cc2' })), h("div", { key: 'b2c3d7a4c30ce96273731a05a1d361f5654582de', class: "nv-sidebarnavitem-trailing" }, h("slot", { key: 'acf2dddbbbc7d2e83703c731a244237e0dc81153', name: "trailing" }), showNotificationBullet && !this.isSidebarCollapsed && (h("nv-notification-bullet", { key: 'adca5c7418a3b58afa5ef21ddd3fa9b2d880a56c', count: this.notificationCount, size: notificationSize })), this.collapsible && (h("nv-icon", { key: 'a4a4369d4ba76f567cca439d1b4c7e95ad5ba98c', name: "chevron-down", size: "sm", class: "nv-sidebarnavitem-chevron" })))), this.collapsible && this.hasSubitems && (h("div", { key: '2d4fadb0b547eb369a702bb8210b3312dde505b2', class: "nv-sidebarnavitem-subitems", ref: el => {
|
|
273
|
+
// Only update ref and initialize if element changed or not yet initialized
|
|
274
|
+
if (el !== this.subitemsRef) {
|
|
275
|
+
this.subitemsRef = el;
|
|
276
|
+
if (el && !this.hasInitializedHeight) {
|
|
277
|
+
// Initialize height only on first mount, not on re-renders
|
|
278
|
+
this.hasInitializedHeight = true;
|
|
279
|
+
requestAnimationFrame(() => {
|
|
280
|
+
// Only animate if item is open, otherwise it will animate when opened
|
|
281
|
+
if (this.open) {
|
|
282
|
+
this.updateSubitemsHeight();
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
} }, h("slot", { key: 'f0ffb970aa2d84580205ba110858d3f1c27875a3', name: "subitems" })))));
|
|
288
|
+
}
|
|
289
|
+
get el() { return this; }
|
|
290
|
+
static get watchers() { return {
|
|
291
|
+
"open": ["onOpenChanged"]
|
|
292
|
+
}; }
|
|
293
|
+
static get style() { return NvSidebarnavitemStyle0; }
|
|
294
|
+
}, [4, "nv-sidebarnavitem", {
|
|
295
|
+
"icon": [513],
|
|
296
|
+
"active": [1540],
|
|
297
|
+
"collapsible": [516],
|
|
298
|
+
"open": [1540],
|
|
299
|
+
"notificationCount": [514, "notification-count"],
|
|
300
|
+
"hasSubitems": [32],
|
|
301
|
+
"isSidebarCollapsed": [32]
|
|
302
|
+
}, undefined, {
|
|
303
|
+
"open": ["onOpenChanged"]
|
|
304
|
+
}]);
|
|
305
|
+
function defineCustomElement$1() {
|
|
306
|
+
if (typeof customElements === "undefined") {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const components = ["nv-sidebarnavitem", "nv-icon", "nv-notification-bullet"];
|
|
310
|
+
components.forEach(tagName => { switch (tagName) {
|
|
311
|
+
case "nv-sidebarnavitem":
|
|
312
|
+
if (!customElements.get(tagName)) {
|
|
313
|
+
customElements.define(tagName, NvSidebarnavitem$1);
|
|
314
|
+
}
|
|
315
|
+
break;
|
|
316
|
+
case "nv-icon":
|
|
317
|
+
if (!customElements.get(tagName)) {
|
|
318
|
+
defineCustomElement$3();
|
|
319
|
+
}
|
|
320
|
+
break;
|
|
321
|
+
case "nv-notification-bullet":
|
|
322
|
+
if (!customElements.get(tagName)) {
|
|
323
|
+
defineCustomElement$2();
|
|
324
|
+
}
|
|
325
|
+
break;
|
|
326
|
+
} });
|
|
327
|
+
}
|
|
328
|
+
defineCustomElement$1();
|
|
329
|
+
|
|
330
|
+
const NvSidebarnavitem = NvSidebarnavitem$1;
|
|
331
|
+
const defineCustomElement = defineCustomElement$1;
|
|
332
|
+
|
|
333
|
+
export { NvSidebarnavitem, defineCustomElement };
|
|
334
|
+
|
|
335
|
+
//# sourceMappingURL=nv-sidebarnavitem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nv-sidebarnavitem.js","mappings":";;;;AAAA,MAAM,mBAAmB,GAAG,wiHAAwiH,CAAC;AACrkH,+BAAe,mBAAmB;;MCarBA,kBAAgB;IAL7B;;;;;;;QAoBE,WAAM,GAAY,KAAK,CAAC;;;;QAMf,gBAAW,GAAY,KAAK,CAAC;;;;QAMtC,SAAI,GAAY,KAAK,CAAC;;;;QAYd,gBAAW,GAAY,KAAK,CAAC;QAG7B,uBAAkB,GAAY,KAAK,CAA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gCACb,IAAI,CAAC,oBAAoB,EAAE,CAAC;6BAC7B;yBACF,CAAC,CAAC;qBACJ;iBACF;aACF,IAED,6DAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvSidebarnavitem"],"sources":["src/components/nv-sidebarnavitem/styles/nv-sidebarnavitem.scss?tag=nv-sidebarnavitem","src/components/nv-sidebarnavitem/nv-sidebarnavitem.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\nnv-sidebarnavitem {\n @include navitem-container();\n\n .nv-sidebarnavitem-trigger {\n @include navitem-trigger();\n }\n\n &[active] .nv-sidebarnavitem-trigger {\n @include navitem-active();\n }\n\n .nv-sidebarnavitem-icon {\n @include navitem-icon();\n position: relative;\n\n // Position notification bullet on icon when sidebar is collapsed\n nv-sidebar[collapsed] & {\n overflow: visible; // Allow cross-border backdrop to be visible\n margin: 0;\n justify-content: center;\n \n nv-notification-bullet {\n position: absolute;\n // Position at top-right corner of the icon container\n // top: 0;\n // right: 0;\n // Transform to center the bullet on the corner\n // Move it up and right by half its size to center it on the corner\n transform: translate(50%, -50%);\n z-index: 1;\n // Increase size proportionally to icon (about 40% of icon size for better visibility)\n --sidebar-primary-notification-bullet-size-reduced: calc(\n var(--sidebar-primary-item-icon-size) * 0.4\n );\n }\n }\n }\n\n .nv-sidebarnavitem-content {\n @include navitem-content();\n\n a {\n color: inherit !important;\n text-decoration: none !important;\n font-weight: var(--font-weight-medium-emphasis) !important;\n flex: 1;\n }\n }\n\n .nv-sidebarnavitem-trailing {\n @include navitem-trailing();\n }\n\n .nv-sidebarnavitem-chevron {\n @include navitem-chevron();\n }\n\n &[open] .nv-sidebarnavitem-chevron {\n @include navitem-chevron-open();\n }\n\n .nv-sidebarnavitem-subitems {\n @include navitem-subitems();\n }\n\n &[open] .nv-sidebarnavitem-subitems {\n @include navitem-subitems-open();\n }\n\n // Collapsed state handled by parent sidebar\n nv-sidebar[collapsed] & {\n .nv-sidebarnavitem-trigger {\n justify-content: center;\n gap: 0;\n width: 100%;\n }\n\n .nv-sidebarnavitem-content {\n display: none;\n }\n\n .nv-sidebarnavitem-trailing,\n .nv-sidebarnavitem-chevron {\n display: none;\n }\n }\n}\n","import { Component, Host, Prop, State, Element, Watch, h } from '@stencil/core';\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * A navigation item in the sidebar. Can be a simple link or a collapsible parent with sub-items.\n * @slot default - The link or content of the item (usually an <a> tag).\n * @slot subitems - Sub-navigation items (nv-sidebarnavsubitem elements). Automatically assigned.\n * @slot trailing - Optional content displayed at the end of the item (e.g., badges, icons, chevron).\n */\n@Component({\n tag: 'nv-sidebarnavitem',\n styleUrl: 'styles/nv-sidebarnavitem.scss',\n shadow: false,\n})\nexport class NvSidebarnavitem {\n @Element() el: HTMLNvSidebarnavitemElement;\n /****************************************************************************/\n //#region PROPERTIES\n /**\n * Optional icon to display before the label.\n */\n @Prop({ reflect: true })\n readonly icon?: IconName;\n\n /**\n * Whether this item represents the active/current page.\n * Can be set automatically when a sub-item becomes active.\n */\n @Prop({ reflect: true, mutable: true })\n active: boolean = false;\n\n /**\n * Whether this item can be collapsed/expanded (has sub-items).\n */\n @Prop({ reflect: true })\n readonly collapsible: boolean = false;\n\n /**\n * Whether the collapsible item is currently open (showing sub-items).\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * Number of notifications to display. When provided, a notification bullet will be automatically rendered.\n * The bullet will be positioned in the trailing slot when sidebar is open, and on the icon when collapsed.\n */\n @Prop({ reflect: true })\n readonly notificationCount?: number;\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region STATE\n @State()\n private hasSubitems: boolean = false;\n\n @State()\n private isSidebarCollapsed: boolean = false;\n\n private mutationObserver?: MutationObserver;\n private subitemsMutationObserver?: MutationObserver;\n private wasActiveFromSubitem: boolean = false; // Track if active was set by subitem logic\n //#endregion STATE\n /****************************************************************************/\n //#region METHODS\n private handleToggle = (event: MouseEvent) => {\n // Ignore clicks that originated from subitems (they bubble up but shouldn't toggle)\n const target = event.target as HTMLElement;\n if (target.closest('nv-sidebarnavsubitem')) {\n return; // Let the subitem's link handle navigation normally\n }\n\n // In collapsed sidebar mode, navigate to the main link instead of toggling\n if (this.isSidebarCollapsed) {\n // Find the first link that is NOT inside subitems\n const link = this.el.querySelector(\n '.nv-sidebarnavitem-content a, :scope > a',\n ) as HTMLAnchorElement;\n if (link?.href) {\n // Check if click was directly on the link - if so, let it handle naturally\n if (target.closest('a')) {\n return;\n }\n // Trigger navigation by clicking the link programmatically\n link.click();\n }\n return;\n }\n\n // Only handle toggle for collapsible items when sidebar is expanded\n if (this.collapsible) {\n event.preventDefault();\n event.stopPropagation();\n this.open = !this.open;\n }\n // For non-collapsible items in expanded mode, let the link handle the navigation\n // Don't prevent default or stop propagation - allow the link to work normally\n };\n\n private subitemsRef?: HTMLDivElement;\n private isAnimating: boolean = false;\n private hasInitializedHeight: boolean = false;\n /** Tracks the last open state that was animated to, to prevent redundant animations */\n private lastAnimatedOpenState: boolean | null = null;\n\n private updateSubitemsHeight = (force: boolean = false) => {\n if (!this.subitemsRef) return;\n\n // Skip animation if we're already in the target state (prevents animation on active change)\n // Only animate if:\n // 1. forced (explicit toggle by user via @Watch)\n // 2. OR this is the first animation (lastAnimatedOpenState is null)\n // 3. OR the open state has actually changed since last animation\n if (\n !force &&\n this.lastAnimatedOpenState !== null &&\n this.lastAnimatedOpenState === this.open\n ) {\n return;\n }\n\n // Don't re-animate if already animating and not forced\n if (this.isAnimating && !force) {\n return;\n }\n\n this.isAnimating = true;\n this.lastAnimatedOpenState = this.open;\n\n if (this.open) {\n // Calculate real height and animate to it\n this.subitemsRef.style.transition = 'none';\n this.subitemsRef.style.maxHeight = '0px';\n void this.subitemsRef.offsetHeight; // Force reflow\n requestAnimationFrame(() => {\n if (this.subitemsRef) {\n this.subitemsRef.style.transition =\n 'max-height 0.3s ease, opacity 0.2s ease';\n this.subitemsRef.style.maxHeight =\n this.subitemsRef.scrollHeight + 'px';\n // Reset animation flag after animation completes\n setTimeout(() => {\n this.isAnimating = false;\n }, 300); // Match animation duration\n }\n });\n } else {\n // Animate to 0\n this.subitemsRef.style.transition = 'none';\n this.subitemsRef.style.maxHeight = this.subitemsRef.scrollHeight + 'px';\n void this.subitemsRef.offsetHeight; // Force reflow\n requestAnimationFrame(() => {\n if (this.subitemsRef) {\n this.subitemsRef.style.transition =\n 'max-height 0.3s ease, opacity 0.2s ease';\n this.subitemsRef.style.maxHeight = '0px';\n // Reset animation flag after animation completes\n setTimeout(() => {\n this.isAnimating = false;\n }, 300); // Match animation duration\n }\n });\n }\n };\n private checkSidebarCollapsed = () => {\n const sidebar = this.el.closest('nv-sidebar');\n const wasCollapsed = this.isSidebarCollapsed;\n this.isSidebarCollapsed = sidebar?.hasAttribute('collapsed') ?? false;\n\n // When sidebar collapse state changes, update active state based on subitems\n if (wasCollapsed !== this.isSidebarCollapsed) {\n this.updateActiveFromSubitems();\n }\n };\n\n /**\n * Checks if any sub-item is active and updates parent active state.\n * - When sidebar is collapsed: if a sub-item is active, parent should be active\n * - When sidebar is expanded: if a sub-item is active AND parent is not open, parent should be active\n * (because sub-items are hidden, we need to indicate the parent contains an active child)\n */\n private updateActiveFromSubitems = () => {\n if (!this.hasSubitems) return;\n\n // Find all sub-items\n const subItems = Array.from(\n this.el.querySelectorAll('nv-sidebarnavsubitem'),\n ) as HTMLNvSidebarnavsubitemElement[];\n\n // Check if any sub-item is active\n const hasActiveSubitem = subItems.some(subItem => subItem.active);\n\n if (this.isSidebarCollapsed) {\n // When sidebar is collapsed AND a sub-item is active, make parent active\n if (hasActiveSubitem) {\n this.active = true;\n this.wasActiveFromSubitem = true;\n } else {\n // When collapsed and no sub-item is active, remove active state only if we set it\n if (this.wasActiveFromSubitem) {\n this.active = false;\n this.wasActiveFromSubitem = false;\n }\n }\n } else {\n // When sidebar is expanded\n if (hasActiveSubitem && !this.open) {\n // If a sub-item is active AND parent is not open (sub-items hidden),\n // make parent active to indicate it contains an active child\n this.active = true;\n this.wasActiveFromSubitem = true;\n } else if (hasActiveSubitem && this.open) {\n // If a sub-item is active BUT parent is open (sub-items visible),\n // remove active state from parent (only sub-item should be active)\n if (this.wasActiveFromSubitem) {\n this.active = false;\n this.wasActiveFromSubitem = false;\n }\n } else {\n // No active sub-item, remove active state if we set it\n if (this.wasActiveFromSubitem) {\n this.active = false;\n this.wasActiveFromSubitem = false;\n }\n }\n // Note: activePath logic in nv-sidebar can also manage parent active state\n // (when parent href matches activePath exactly)\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n componentWillLoad() {\n // Check if there are sub-items in any slot\n const subItems = Array.from(this.el.children).filter(\n child => child.tagName.toLowerCase() === 'nv-sidebarnavsubitem',\n );\n this.hasSubitems = subItems.length > 0;\n\n // Move sub-items to the subitems slot\n if (this.hasSubitems) {\n subItems.forEach(item => {\n item.setAttribute('slot', 'subitems');\n });\n }\n\n // Check sidebar collapsed state\n this.checkSidebarCollapsed();\n\n // Watch for sidebar state changes\n const sidebar = this.el.closest('nv-sidebar');\n if (sidebar) {\n this.mutationObserver = new MutationObserver(() => {\n this.checkSidebarCollapsed();\n });\n this.mutationObserver.observe(sidebar, {\n attributes: true,\n attributeFilter: ['collapsed'],\n });\n }\n\n // Watch for sub-items active state changes\n if (this.hasSubitems) {\n // Observe the subitems container for changes (including new sub-items being added)\n // Using subtree: true to catch all attribute changes in descendants\n const subitemsContainer = this.el.querySelector(\n '.nv-sidebarnavitem-subitems',\n );\n if (subitemsContainer) {\n this.subitemsMutationObserver = new MutationObserver(() => {\n this.updateActiveFromSubitems();\n });\n\n // Observe the container for child list changes and attribute changes in descendants\n this.subitemsMutationObserver.observe(subitemsContainer, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['active'],\n });\n } else {\n // If container doesn't exist yet (not collapsible or not rendered), observe the element itself\n // This handles cases where sub-items are direct children\n this.subitemsMutationObserver = new MutationObserver(() => {\n this.updateActiveFromSubitems();\n });\n\n this.subitemsMutationObserver.observe(this.el, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['active'],\n });\n }\n }\n\n // Initial check for active subitems\n this.updateActiveFromSubitems();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n if (this.subitemsMutationObserver) {\n this.subitemsMutationObserver.disconnect();\n }\n }\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region WATCHERS\n @Watch('open')\n onOpenChanged(newValue: boolean, oldValue: boolean) {\n // Only animate if the value actually changed (prevents false triggers from React re-renders)\n if (newValue === oldValue) {\n return;\n }\n // Force update when open state changes (user clicked toggle)\n this.updateSubitemsHeight(true);\n // Update active state based on subitems when open state changes\n this.updateActiveFromSubitems();\n }\n //#endregion WATCHERS\n /****************************************************************************/\n //#region RENDER\n render() {\n const showNotificationBullet =\n this.notificationCount !== undefined && this.notificationCount > 0;\n const notificationSize = this.isSidebarCollapsed ? 'reduced' : 'default';\n\n return (\n <Host role=\"listitem\">\n <div\n class=\"nv-sidebarnavitem-trigger\"\n onClick={this.handleToggle}\n aria-expanded={this.collapsible ? String(this.open) : undefined}\n aria-current={this.active && !this.collapsible ? 'page' : undefined}\n >\n {this.icon && (\n <div class=\"nv-sidebarnavitem-icon\">\n <nv-icon name={this.icon} size=\"md\"></nv-icon>\n {showNotificationBullet && this.isSidebarCollapsed && (\n <nv-notification-bullet\n count={this.notificationCount}\n size={notificationSize}\n contrastingBorder\n ></nv-notification-bullet>\n )}\n </div>\n )}\n <div class=\"nv-sidebarnavitem-content\">\n <slot></slot>\n </div>\n <div class=\"nv-sidebarnavitem-trailing\">\n <slot name=\"trailing\"></slot>\n {showNotificationBullet && !this.isSidebarCollapsed && (\n <nv-notification-bullet\n count={this.notificationCount}\n size={notificationSize}\n ></nv-notification-bullet>\n )}\n {this.collapsible && (\n <nv-icon\n name=\"chevron-down\"\n size=\"sm\"\n class=\"nv-sidebarnavitem-chevron\"\n ></nv-icon>\n )}\n </div>\n </div>\n {this.collapsible && this.hasSubitems && (\n <div\n class=\"nv-sidebarnavitem-subitems\"\n ref={el => {\n // Only update ref and initialize if element changed or not yet initialized\n if (el !== this.subitemsRef) {\n this.subitemsRef = el;\n if (el && !this.hasInitializedHeight) {\n // Initialize height only on first mount, not on re-renders\n this.hasInitializedHeight = true;\n requestAnimationFrame(() => {\n // Only animate if item is open, otherwise it will animate when opened\n if (this.open) {\n this.updateSubitemsHeight();\n }\n });\n }\n }\n }}\n >\n <slot name=\"subitems\"></slot>\n </div>\n )}\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface NvSidebarnavsubitem extends Components.NvSidebarnavsubitem, HTMLElement {}
|
|
4
|
+
export const NvSidebarnavsubitem: {
|
|
5
|
+
prototype: NvSidebarnavsubitem;
|
|
6
|
+
new (): NvSidebarnavsubitem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, d as Host } from './p-5829b9f7.js';
|
|
2
|
+
|
|
3
|
+
const nvSidebarnavsubitemCss = "nv-sidebarnavsubitem{display:flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-3) var(--spacing-2) var(--list-dropdown-sub-item-padding-left);cursor:pointer;transition:all 0.15s ease;position:relative;min-height:var(--spacing-10);background-color:var(--color-interaction-container-neutral-background);border-radius:var(--sidebar-primary-item-radius);--nv-component-background:var(--color-interaction-container-neutral-background)}nv-sidebarnavsubitem:hover{background-color:var(--color-interaction-container-neutral-background-hover);--nv-component-background:var(--color-interaction-container-neutral-background-hover)}nv-sidebarnavsubitem:focus,nv-sidebarnavsubitem:focus-within{outline:none}nv-sidebarnavsubitem:focus-visible,nv-sidebarnavsubitem:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-indicator{display:none}nv-sidebarnavsubitem .nv-sidebarnavsubitem-content{flex:1;display:flex;align-items:center;gap:var(--spacing-2);font-size:var(--font-size-sm);color:var(--color-content-medium-text);text-decoration:none;font-weight:var(--font-weight-medium-emphasis)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-content a{color:inherit !important;text-decoration:none !important;font-weight:var(--font-weight-medium-emphasis) !important;flex:1}nv-sidebarnavsubitem:hover .nv-sidebarnavsubitem-content{color:var(--color-content-medium-text)}nv-sidebarnavsubitem[active]{background-color:var(--color-interaction-container-neutral-background-active);--nv-component-background:var(--color-interaction-container-neutral-background-active)}nv-sidebarnavsubitem[active] .nv-sidebarnavsubitem-content{color:var(--color-orange-600);font-weight:var(--font-weight-high-emphasis)}nv-sidebarnavsubitem .nv-sidebarnavsubitem-trailing{display:flex;align-items:center}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-content{max-width:0;opacity:0;margin:0;overflow:hidden;transition:opacity 0.2s ease, max-width 0.2s ease}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-indicator{margin-right:0;width:var(--spacing-6);justify-content:center}nv-sidebar[collapsed] nv-sidebarnavsubitem .nv-sidebarnavsubitem-trailing{display:none}";
|
|
4
|
+
const NvSidebarnavsubitemStyle0 = nvSidebarnavsubitemCss;
|
|
5
|
+
|
|
6
|
+
const NvSidebarnavsubitem$1 = /*@__PURE__*/ proxyCustomElement(class NvSidebarnavsubitem extends H {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
/****************************************************************************/
|
|
11
|
+
//#region PROPERTIES
|
|
12
|
+
/**
|
|
13
|
+
* Whether this sub-item represents the active/current page.
|
|
14
|
+
*/
|
|
15
|
+
this.active = false;
|
|
16
|
+
}
|
|
17
|
+
//#endregion PROPERTIES
|
|
18
|
+
/****************************************************************************/
|
|
19
|
+
//#region METHODS
|
|
20
|
+
// Note: We no longer use stopPropagation() here because it prevents React Router
|
|
21
|
+
// (and other SPA routers) from receiving the click event due to event delegation.
|
|
22
|
+
// Instead, the parent nv-sidebarnavitem checks if clicks originate from subitems.
|
|
23
|
+
//#endregion METHODS
|
|
24
|
+
/****************************************************************************/
|
|
25
|
+
//#region RENDER
|
|
26
|
+
render() {
|
|
27
|
+
return (h(Host, { key: '8ae8c5e2038145bd458a35d237495a06fde97294', role: "listitem", "aria-current": this.active ? 'page' : undefined }, h("div", { key: '559a99d72973f7af43091c5c920e77d8cad3944c', class: "nv-sidebarnavsubitem-indicator" }), h("div", { key: '204c7ad681d51310f43b618ef14a12d0ccc93ddc', class: "nv-sidebarnavsubitem-content" }, h("slot", { key: 'f4717aee216fbeac4dbfe0d98b34fe7e83476701' })), h("div", { key: 'b5db84c75ae4e51d8a048000a49697eaf4b20f1d', class: "nv-sidebarnavsubitem-trailing" }, h("slot", { key: 'b6d0afcd6b4ace60b32f531f414b70aba513a274', name: "trailing" }))));
|
|
28
|
+
}
|
|
29
|
+
static get style() { return NvSidebarnavsubitemStyle0; }
|
|
30
|
+
}, [4, "nv-sidebarnavsubitem", {
|
|
31
|
+
"active": [516]
|
|
32
|
+
}]);
|
|
33
|
+
function defineCustomElement$1() {
|
|
34
|
+
if (typeof customElements === "undefined") {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const components = ["nv-sidebarnavsubitem"];
|
|
38
|
+
components.forEach(tagName => { switch (tagName) {
|
|
39
|
+
case "nv-sidebarnavsubitem":
|
|
40
|
+
if (!customElements.get(tagName)) {
|
|
41
|
+
customElements.define(tagName, NvSidebarnavsubitem$1);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
} });
|
|
45
|
+
}
|
|
46
|
+
defineCustomElement$1();
|
|
47
|
+
|
|
48
|
+
const NvSidebarnavsubitem = NvSidebarnavsubitem$1;
|
|
49
|
+
const defineCustomElement = defineCustomElement$1;
|
|
50
|
+
|
|
51
|
+
export { NvSidebarnavsubitem, defineCustomElement };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=nv-sidebarnavsubitem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nv-sidebarnavsubitem.js","mappings":";;AAAA,MAAM,sBAAsB,GAAG,sxEAAsxE,CAAC;AACtzE,kCAAe,sBAAsB;;MCWxBA,qBAAmB;IALhC;;;;;;;;QAYW,WAAM,GAAY,KAAK,CAAC;KAwBlC;;;;;;;;;;IAdC,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,IAAI,EAAC,UAAU,kBAAe,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,IAClE,4DAAK,KAAK,EAAC,gCAAgC,GAAO,EAClD,4DAAK,KAAK,EAAC,8BAA8B,IACvC,8DAAa,CACT,EACN,4DAAK,KAAK,EAAC,+BAA+B,IACxC,6DAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvSidebarnavsubitem"],"sources":["src/components/nv-sidebarnavsubitem/styles/nv-sidebarnavsubitem.scss?tag=nv-sidebarnavsubitem","src/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\nnv-sidebarnavsubitem {\n @include subitem-container();\n\n .nv-sidebarnavsubitem-indicator {\n @include subitem-indicator();\n }\n\n .nv-sidebarnavsubitem-content {\n @include subitem-content();\n\n a {\n color: inherit !important;\n text-decoration: none !important;\n font-weight: var(--font-weight-medium-emphasis) !important;\n flex: 1;\n }\n }\n\n &:hover .nv-sidebarnavsubitem-content {\n @include subitem-content-hover();\n }\n\n &[active] {\n background-color: var(--color-interaction-container-neutral-background-active);\n --nv-component-background: var(--color-interaction-container-neutral-background-active);\n \n .nv-sidebarnavsubitem-content {\n @include subitem-content-active();\n }\n }\n\n .nv-sidebarnavsubitem-trailing {\n @include subitem-trailing();\n }\n\n nv-sidebar[collapsed] & {\n .nv-sidebarnavsubitem-content {\n max-width: 0;\n opacity: 0;\n margin: 0;\n overflow: hidden;\n transition:\n opacity 0.2s ease,\n max-width 0.2s ease;\n }\n\n .nv-sidebarnavsubitem-indicator {\n margin-right: 0;\n width: var(--spacing-6);\n justify-content: center;\n }\n\n .nv-sidebarnavsubitem-trailing {\n display: none;\n }\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n/**\n * A sub-item in the sidebar navigation, typically used as a child of nv-sidebarnavitem.\n * @slot default - The link or content of the sub-item (usually an <a> tag).\n * @slot trailing - Optional content displayed at the end of the sub-item (e.g., badges, icons).\n */\n@Component({\n tag: 'nv-sidebarnavsubitem',\n styleUrl: 'styles/nv-sidebarnavsubitem.scss',\n shadow: false,\n})\nexport class NvSidebarnavsubitem {\n /****************************************************************************/\n //#region PROPERTIES\n /**\n * Whether this sub-item represents the active/current page.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n // Note: We no longer use stopPropagation() here because it prevents React Router\n // (and other SPA routers) from receiving the click event due to event delegation.\n // Instead, the parent nv-sidebarnavitem checks if clicks originate from subitems.\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n render() {\n return (\n <Host role=\"listitem\" aria-current={this.active ? 'page' : undefined}>\n <div class=\"nv-sidebarnavsubitem-indicator\"></div>\n <div class=\"nv-sidebarnavsubitem-content\">\n <slot></slot>\n </div>\n <div class=\"nv-sidebarnavsubitem-trailing\">\n <slot name=\"trailing\"></slot>\n </div>\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"version":3}
|
|
@@ -321,7 +321,7 @@ const NvSplit$1 = /*@__PURE__*/ proxyCustomElement(class NvSplit extends H {
|
|
|
321
321
|
/****************************************************************************/
|
|
322
322
|
//#region RENDER
|
|
323
323
|
render() {
|
|
324
|
-
return (h(Host, { key: '
|
|
324
|
+
return (h(Host, { key: 'df6a2141e14d1f691af162d1eae2e2763ffad014', "data-dragging": this.isDragging.toString() }, h("slot", { key: 'ce9d941bc73fa6e12161f334d4cd86e9045f6271', name: "pane" }), h("slot", { key: 'a70c14b0989a758ad35dc3c611563f7d03be0d02', name: "gutter" })));
|
|
325
325
|
}
|
|
326
326
|
get el() { return this; }
|
|
327
327
|
static get watchers() { return {
|
|
@@ -20,7 +20,7 @@ const NvStack$1 = /*@__PURE__*/ proxyCustomElement(class NvStack extends H {
|
|
|
20
20
|
/****************************************************************************/
|
|
21
21
|
//#region RENDER
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: 'fbdaf5b2fb134b050883a512b4aeb96b070017c1', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, h("slot", { key: '6c7c231b8ff2575a1b509539d227468629fae6ab' })));
|
|
24
24
|
}
|
|
25
25
|
static get style() { return NvStackStyle0; }
|
|
26
26
|
}, [4, "nv-stack", {
|
|
@@ -233,7 +233,7 @@ const NvTable$1 = /*@__PURE__*/ proxyCustomElement(class NvTable extends H {
|
|
|
233
233
|
/****************************************************************************/
|
|
234
234
|
//#region RENDER
|
|
235
235
|
render() {
|
|
236
|
-
return (h(Host, { key: '
|
|
236
|
+
return (h(Host, { key: 'ec194bed7ec58642be9f6b52a737e2f9375a152e' }, h("slot", { key: '009ce0f20491156ca93141c85683f0be499a9938' })));
|
|
237
237
|
}
|
|
238
238
|
get host() { return this; }
|
|
239
239
|
static get style() { return NvTableStyle0; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface NvTableheader extends Components.NvTableheader, HTMLElement {}
|
|
4
|
+
export const NvTableheader: {
|
|
5
|
+
prototype: NvTableheader;
|
|
6
|
+
new (): NvTableheader;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5829b9f7.js';
|
|
2
|
+
import { d as defineCustomElement$4 } from './p-743b3452.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './p-7214f13f.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './p-996438a2.js';
|
|
5
|
+
|
|
6
|
+
const nvTableheaderCss = "nv-tableheader{display:inline-flex;width:100%;align-items:center;gap:var(--spacing-2)}nv-tableheader:focus-visible{border-radius:var(--radius-rounded-sm)}nv-tableheader:focus-visible:focus,nv-tableheader:focus-visible:focus-within{outline:none}nv-tableheader:focus-visible:focus-visible,nv-tableheader:focus-visible:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-tableheader nv-iconbutton{transition:transform 120ms ease, opacity 120ms ease}nv-tableheader nv-iconbutton svg{transition:transform 240ms ease}nv-tableheader nv-iconbutton.is-none{opacity:0.5}nv-tableheader nv-iconbutton.is-desc svg{transform:rotate(180deg)}";
|
|
7
|
+
const NvTableheaderStyle0 = nvTableheaderCss;
|
|
8
|
+
|
|
9
|
+
const NvTableheader$1 = /*@__PURE__*/ proxyCustomElement(class NvTableheader extends H {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.sortDirectionChanged = createEvent(this, "sortDirectionChanged", 7);
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region PROPERTIES
|
|
16
|
+
/**
|
|
17
|
+
* Will render the header as sortable with the corresponding icon button.
|
|
18
|
+
* Allows the header to be tabbed, and trigger sorting via click or keyboard
|
|
19
|
+
* navigation
|
|
20
|
+
*/
|
|
21
|
+
this.sortable = false;
|
|
22
|
+
/**
|
|
23
|
+
* The current sort direction of the header. Will be 'none' if the header is
|
|
24
|
+
* not sortable or if the sort direction is not set.
|
|
25
|
+
*/
|
|
26
|
+
this.sortDirection = 'none';
|
|
27
|
+
}
|
|
28
|
+
//#endregion PROPERTIES
|
|
29
|
+
/****************************************************************************/
|
|
30
|
+
//#region METHODS
|
|
31
|
+
cycleSortDirection(e) {
|
|
32
|
+
if (!this.sortable)
|
|
33
|
+
return;
|
|
34
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
35
|
+
const next = {
|
|
36
|
+
none: 'asc',
|
|
37
|
+
asc: 'desc',
|
|
38
|
+
desc: 'none',
|
|
39
|
+
};
|
|
40
|
+
this.sortDirection = next[this.sortDirection];
|
|
41
|
+
this.sortDirectionChanged.emit(this.sortDirection);
|
|
42
|
+
}
|
|
43
|
+
handleKeyDown(event) {
|
|
44
|
+
if (!this.sortable)
|
|
45
|
+
return;
|
|
46
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
this.cycleSortDirection();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
get ariaSort() {
|
|
52
|
+
const sortMap = {
|
|
53
|
+
none: 'none',
|
|
54
|
+
asc: 'ascending',
|
|
55
|
+
desc: 'descending',
|
|
56
|
+
};
|
|
57
|
+
if (!this.sortable)
|
|
58
|
+
return sortMap.none;
|
|
59
|
+
return sortMap[this.sortDirection];
|
|
60
|
+
}
|
|
61
|
+
//#endregion EVENTS
|
|
62
|
+
/****************************************************************************/
|
|
63
|
+
//#region RENDER
|
|
64
|
+
render() {
|
|
65
|
+
return (h(Host, { key: '6719336a9812b1d1abd161b955b841c1459fb584', role: "columnheader", "aria-sort": this.ariaSort, tabindex: this.sortable ? 0 : undefined, onKeyDown: this.handleKeyDown.bind(this), onClick: this.cycleSortDirection.bind(this) }, h("slot", { key: 'd559e3b7c74f6dcf8197e2d082310660a23291d6' }), this.sortable && (h("span", { key: '540c8c8cf3cccac47a3ece7d9be4e97c4e283690', class: "sort-icon-wrap", "aria-hidden": "true" }, h("nv-iconbutton", { key: 'ac713c7af3b5b2e452f02d0d77cb64398b0febd4', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
|
|
66
|
+
// prevent mousedown from selecting text
|
|
67
|
+
onMouseDown: (e) => e.preventDefault(), class: {
|
|
68
|
+
'is-none': this.sortDirection === 'none',
|
|
69
|
+
'is-desc': this.sortDirection === 'desc',
|
|
70
|
+
} })))));
|
|
71
|
+
}
|
|
72
|
+
static get style() { return NvTableheaderStyle0; }
|
|
73
|
+
}, [4, "nv-tableheader", {
|
|
74
|
+
"sortable": [516],
|
|
75
|
+
"sortDirection": [1537, "sort-direction"]
|
|
76
|
+
}]);
|
|
77
|
+
function defineCustomElement$1() {
|
|
78
|
+
if (typeof customElements === "undefined") {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const components = ["nv-tableheader", "nv-icon", "nv-iconbutton", "nv-loader"];
|
|
82
|
+
components.forEach(tagName => { switch (tagName) {
|
|
83
|
+
case "nv-tableheader":
|
|
84
|
+
if (!customElements.get(tagName)) {
|
|
85
|
+
customElements.define(tagName, NvTableheader$1);
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case "nv-icon":
|
|
89
|
+
if (!customElements.get(tagName)) {
|
|
90
|
+
defineCustomElement$4();
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
case "nv-iconbutton":
|
|
94
|
+
if (!customElements.get(tagName)) {
|
|
95
|
+
defineCustomElement$3();
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case "nv-loader":
|
|
99
|
+
if (!customElements.get(tagName)) {
|
|
100
|
+
defineCustomElement$2();
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
} });
|
|
104
|
+
}
|
|
105
|
+
defineCustomElement$1();
|
|
106
|
+
|
|
107
|
+
const NvTableheader = NvTableheader$1;
|
|
108
|
+
const defineCustomElement = defineCustomElement$1;
|
|
109
|
+
|
|
110
|
+
export { NvTableheader, defineCustomElement };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=nv-tableheader.js.map
|