@nova-design-system/nova-webcomponents 3.21.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 +40 -0
- package/dist/cjs/index.cjs.js +2 -3
- 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-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 +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebutton.cjs.entry.js +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 +10 -0
- package/dist/collection/components/nv-dialog/nv-dialog.css +29 -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-iconbutton/nv-iconbutton.js +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 +1 -1
- 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.js +1 -1
- package/dist/collection/components/nv-tableheader/nv-tableheader.js +1 -1
- 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-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/components/index.js +2 -2
- 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 +2 -2
- 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.js +4 -4
- package/dist/components/nv-toggle.js +2 -2
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-61382072.js → p-20a1c769.js} +2 -2
- package/dist/components/{p-61382072.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-643d7802.js → p-439c38c3.js} +3 -3
- package/dist/components/{p-643d7802.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-c4d20cc9.js → p-5f78a78f.js} +3 -3
- package/dist/components/{p-c4d20cc9.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-5c6b5444.js → p-7214f13f.js} +4 -4
- package/dist/components/{p-5c6b5444.js.map → p-7214f13f.js.map} +1 -1
- package/dist/components/{p-0bfe8a47.js → p-743b3452.js} +2 -2
- package/dist/components/{p-0bfe8a47.js.map → p-743b3452.js.map} +1 -1
- package/dist/components/p-82c9b7cc.js +96 -0
- package/dist/components/p-82c9b7cc.js.map +1 -0
- package/dist/components/{p-00347aae.js → p-94ad267c.js} +5 -5
- package/dist/components/{p-00347aae.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-2062ba39.js → p-af663ff5.js} +2 -2
- package/dist/components/{p-2062ba39.js.map → p-af663ff5.js.map} +1 -1
- package/dist/components/{p-c69f5a37.js → p-bcf9d309.js} +5 -5
- package/dist/components/{p-c69f5a37.js.map → p-bcf9d309.js.map} +1 -1
- package/dist/components/{p-d1d4cc45.js → p-cc77f8fe.js} +7 -7
- package/dist/components/{p-d1d4cc45.js.map → p-cc77f8fe.js.map} +1 -1
- package/dist/components/{p-8ce28cff.js → p-d9c1cd97.js} +4 -4
- package/dist/components/{p-8ce28cff.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-86588fba.js → p-f6ffffd9.js} +4 -4
- package/dist/components/{p-86588fba.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 +40 -0
- package/dist/esm/index.js +2 -2
- 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-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 +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/nv-toggle.entry.js +2 -2
- package/dist/esm/nv-togglebutton.entry.js +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/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-56ed7306.entry.js → p-242cdeac.entry.js} +2 -2
- 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-973f5db2.entry.js → p-7b7bbac7.entry.js} +2 -2
- package/dist/native/{p-4de8697c.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-ae5be175.entry.js → p-98cab7d2.entry.js} +2 -2
- 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-2b4cf4b8.entry.js → p-b369a073.entry.js} +2 -2
- 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-c4baad6e.entry.js → p-b4128eb5.entry.js} +2 -2
- 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-a026654f.entry.js → p-c37ab530.entry.js} +2 -2
- package/dist/native/{p-533e2530.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-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-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.d.ts +502 -0
- package/dist/vscode-data.json +1758 -0
- package/hydrate/index.js +960 -103
- package/hydrate/index.mjs +960 -103
- package/package.json +41 -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-d429a343.js +0 -28
- package/dist/components/p-d429a343.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-44ba73dc.entry.js +0 -7
- package/dist/native/p-44ba73dc.entry.js.map +0 -1
- 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-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-d63689da.entry.js.map +0 -1
- 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-56ed7306.entry.js.map → p-242cdeac.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-973f5db2.entry.js.map → p-7b7bbac7.entry.js.map} +0 -0
- /package/dist/native/{p-4de8697c.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-ae5be175.entry.js.map → p-98cab7d2.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-2b4cf4b8.entry.js.map → p-b369a073.entry.js.map} +0 -0
- /package/dist/native/{p-c4baad6e.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-533e2530.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,299 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-93d3b2f8.js');
|
|
6
|
+
|
|
7
|
+
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}";
|
|
8
|
+
const NvSidebarnavitemStyle0 = nvSidebarnavitemCss;
|
|
9
|
+
|
|
10
|
+
const NvSidebarnavitem = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
/**
|
|
14
|
+
* Whether this item represents the active/current page.
|
|
15
|
+
* Can be set automatically when a sub-item becomes active.
|
|
16
|
+
*/
|
|
17
|
+
this.active = false;
|
|
18
|
+
/**
|
|
19
|
+
* Whether this item can be collapsed/expanded (has sub-items).
|
|
20
|
+
*/
|
|
21
|
+
this.collapsible = false;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the collapsible item is currently open (showing sub-items).
|
|
24
|
+
*/
|
|
25
|
+
this.open = false;
|
|
26
|
+
//#endregion PROPERTIES
|
|
27
|
+
/****************************************************************************/
|
|
28
|
+
//#region STATE
|
|
29
|
+
this.hasSubitems = false;
|
|
30
|
+
this.isSidebarCollapsed = false;
|
|
31
|
+
this.wasActiveFromSubitem = false; // Track if active was set by subitem logic
|
|
32
|
+
//#endregion STATE
|
|
33
|
+
/****************************************************************************/
|
|
34
|
+
//#region METHODS
|
|
35
|
+
this.handleToggle = (event) => {
|
|
36
|
+
// Ignore clicks that originated from subitems (they bubble up but shouldn't toggle)
|
|
37
|
+
const target = event.target;
|
|
38
|
+
if (target.closest('nv-sidebarnavsubitem')) {
|
|
39
|
+
return; // Let the subitem's link handle navigation normally
|
|
40
|
+
}
|
|
41
|
+
// In collapsed sidebar mode, navigate to the main link instead of toggling
|
|
42
|
+
if (this.isSidebarCollapsed) {
|
|
43
|
+
// Find the first link that is NOT inside subitems
|
|
44
|
+
const link = this.el.querySelector('.nv-sidebarnavitem-content a, :scope > a');
|
|
45
|
+
if (link === null || link === void 0 ? void 0 : link.href) {
|
|
46
|
+
// Check if click was directly on the link - if so, let it handle naturally
|
|
47
|
+
if (target.closest('a')) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
// Trigger navigation by clicking the link programmatically
|
|
51
|
+
link.click();
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
// Only handle toggle for collapsible items when sidebar is expanded
|
|
56
|
+
if (this.collapsible) {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
event.stopPropagation();
|
|
59
|
+
this.open = !this.open;
|
|
60
|
+
}
|
|
61
|
+
// For non-collapsible items in expanded mode, let the link handle the navigation
|
|
62
|
+
// Don't prevent default or stop propagation - allow the link to work normally
|
|
63
|
+
};
|
|
64
|
+
this.isAnimating = false;
|
|
65
|
+
this.hasInitializedHeight = false;
|
|
66
|
+
/** Tracks the last open state that was animated to, to prevent redundant animations */
|
|
67
|
+
this.lastAnimatedOpenState = null;
|
|
68
|
+
this.updateSubitemsHeight = (force = false) => {
|
|
69
|
+
if (!this.subitemsRef)
|
|
70
|
+
return;
|
|
71
|
+
// Skip animation if we're already in the target state (prevents animation on active change)
|
|
72
|
+
// Only animate if:
|
|
73
|
+
// 1. forced (explicit toggle by user via @Watch)
|
|
74
|
+
// 2. OR this is the first animation (lastAnimatedOpenState is null)
|
|
75
|
+
// 3. OR the open state has actually changed since last animation
|
|
76
|
+
if (!force &&
|
|
77
|
+
this.lastAnimatedOpenState !== null &&
|
|
78
|
+
this.lastAnimatedOpenState === this.open) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
// Don't re-animate if already animating and not forced
|
|
82
|
+
if (this.isAnimating && !force) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.isAnimating = true;
|
|
86
|
+
this.lastAnimatedOpenState = this.open;
|
|
87
|
+
if (this.open) {
|
|
88
|
+
// Calculate real height and animate to it
|
|
89
|
+
this.subitemsRef.style.transition = 'none';
|
|
90
|
+
this.subitemsRef.style.maxHeight = '0px';
|
|
91
|
+
requestAnimationFrame(() => {
|
|
92
|
+
if (this.subitemsRef) {
|
|
93
|
+
this.subitemsRef.style.transition =
|
|
94
|
+
'max-height 0.3s ease, opacity 0.2s ease';
|
|
95
|
+
this.subitemsRef.style.maxHeight =
|
|
96
|
+
this.subitemsRef.scrollHeight + 'px';
|
|
97
|
+
// Reset animation flag after animation completes
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
this.isAnimating = false;
|
|
100
|
+
}, 300); // Match animation duration
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
// Animate to 0
|
|
106
|
+
this.subitemsRef.style.transition = 'none';
|
|
107
|
+
this.subitemsRef.style.maxHeight = this.subitemsRef.scrollHeight + 'px';
|
|
108
|
+
requestAnimationFrame(() => {
|
|
109
|
+
if (this.subitemsRef) {
|
|
110
|
+
this.subitemsRef.style.transition =
|
|
111
|
+
'max-height 0.3s ease, opacity 0.2s ease';
|
|
112
|
+
this.subitemsRef.style.maxHeight = '0px';
|
|
113
|
+
// Reset animation flag after animation completes
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
this.isAnimating = false;
|
|
116
|
+
}, 300); // Match animation duration
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
this.checkSidebarCollapsed = () => {
|
|
122
|
+
var _a;
|
|
123
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
124
|
+
const wasCollapsed = this.isSidebarCollapsed;
|
|
125
|
+
this.isSidebarCollapsed = (_a = sidebar === null || sidebar === void 0 ? void 0 : sidebar.hasAttribute('collapsed')) !== null && _a !== void 0 ? _a : false;
|
|
126
|
+
// When sidebar collapse state changes, update active state based on subitems
|
|
127
|
+
if (wasCollapsed !== this.isSidebarCollapsed) {
|
|
128
|
+
this.updateActiveFromSubitems();
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Checks if any sub-item is active and updates parent active state.
|
|
133
|
+
* - When sidebar is collapsed: if a sub-item is active, parent should be active
|
|
134
|
+
* - When sidebar is expanded: if a sub-item is active AND parent is not open, parent should be active
|
|
135
|
+
* (because sub-items are hidden, we need to indicate the parent contains an active child)
|
|
136
|
+
*/
|
|
137
|
+
this.updateActiveFromSubitems = () => {
|
|
138
|
+
if (!this.hasSubitems)
|
|
139
|
+
return;
|
|
140
|
+
// Find all sub-items
|
|
141
|
+
const subItems = Array.from(this.el.querySelectorAll('nv-sidebarnavsubitem'));
|
|
142
|
+
// Check if any sub-item is active
|
|
143
|
+
const hasActiveSubitem = subItems.some(subItem => subItem.active);
|
|
144
|
+
if (this.isSidebarCollapsed) {
|
|
145
|
+
// When sidebar is collapsed AND a sub-item is active, make parent active
|
|
146
|
+
if (hasActiveSubitem) {
|
|
147
|
+
this.active = true;
|
|
148
|
+
this.wasActiveFromSubitem = true;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
// When collapsed and no sub-item is active, remove active state only if we set it
|
|
152
|
+
if (this.wasActiveFromSubitem) {
|
|
153
|
+
this.active = false;
|
|
154
|
+
this.wasActiveFromSubitem = false;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
// When sidebar is expanded
|
|
160
|
+
if (hasActiveSubitem && !this.open) {
|
|
161
|
+
// If a sub-item is active AND parent is not open (sub-items hidden),
|
|
162
|
+
// make parent active to indicate it contains an active child
|
|
163
|
+
this.active = true;
|
|
164
|
+
this.wasActiveFromSubitem = true;
|
|
165
|
+
}
|
|
166
|
+
else if (hasActiveSubitem && this.open) {
|
|
167
|
+
// If a sub-item is active BUT parent is open (sub-items visible),
|
|
168
|
+
// remove active state from parent (only sub-item should be active)
|
|
169
|
+
if (this.wasActiveFromSubitem) {
|
|
170
|
+
this.active = false;
|
|
171
|
+
this.wasActiveFromSubitem = false;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
// No active sub-item, remove active state if we set it
|
|
176
|
+
if (this.wasActiveFromSubitem) {
|
|
177
|
+
this.active = false;
|
|
178
|
+
this.wasActiveFromSubitem = false;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// Note: activePath logic in nv-sidebar can also manage parent active state
|
|
182
|
+
// (when parent href matches activePath exactly)
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
//#endregion METHODS
|
|
187
|
+
/****************************************************************************/
|
|
188
|
+
//#region LIFECYCLE
|
|
189
|
+
componentWillLoad() {
|
|
190
|
+
// Check if there are sub-items in any slot
|
|
191
|
+
const subItems = Array.from(this.el.children).filter(child => child.tagName.toLowerCase() === 'nv-sidebarnavsubitem');
|
|
192
|
+
this.hasSubitems = subItems.length > 0;
|
|
193
|
+
// Move sub-items to the subitems slot
|
|
194
|
+
if (this.hasSubitems) {
|
|
195
|
+
subItems.forEach(item => {
|
|
196
|
+
item.setAttribute('slot', 'subitems');
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
// Check sidebar collapsed state
|
|
200
|
+
this.checkSidebarCollapsed();
|
|
201
|
+
// Watch for sidebar state changes
|
|
202
|
+
const sidebar = this.el.closest('nv-sidebar');
|
|
203
|
+
if (sidebar) {
|
|
204
|
+
this.mutationObserver = new MutationObserver(() => {
|
|
205
|
+
this.checkSidebarCollapsed();
|
|
206
|
+
});
|
|
207
|
+
this.mutationObserver.observe(sidebar, {
|
|
208
|
+
attributes: true,
|
|
209
|
+
attributeFilter: ['collapsed'],
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
// Watch for sub-items active state changes
|
|
213
|
+
if (this.hasSubitems) {
|
|
214
|
+
// Observe the subitems container for changes (including new sub-items being added)
|
|
215
|
+
// Using subtree: true to catch all attribute changes in descendants
|
|
216
|
+
const subitemsContainer = this.el.querySelector('.nv-sidebarnavitem-subitems');
|
|
217
|
+
if (subitemsContainer) {
|
|
218
|
+
this.subitemsMutationObserver = new MutationObserver(() => {
|
|
219
|
+
this.updateActiveFromSubitems();
|
|
220
|
+
});
|
|
221
|
+
// Observe the container for child list changes and attribute changes in descendants
|
|
222
|
+
this.subitemsMutationObserver.observe(subitemsContainer, {
|
|
223
|
+
childList: true,
|
|
224
|
+
subtree: true,
|
|
225
|
+
attributes: true,
|
|
226
|
+
attributeFilter: ['active'],
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
// If container doesn't exist yet (not collapsible or not rendered), observe the element itself
|
|
231
|
+
// This handles cases where sub-items are direct children
|
|
232
|
+
this.subitemsMutationObserver = new MutationObserver(() => {
|
|
233
|
+
this.updateActiveFromSubitems();
|
|
234
|
+
});
|
|
235
|
+
this.subitemsMutationObserver.observe(this.el, {
|
|
236
|
+
childList: true,
|
|
237
|
+
subtree: true,
|
|
238
|
+
attributes: true,
|
|
239
|
+
attributeFilter: ['active'],
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
// Initial check for active subitems
|
|
244
|
+
this.updateActiveFromSubitems();
|
|
245
|
+
}
|
|
246
|
+
disconnectedCallback() {
|
|
247
|
+
if (this.mutationObserver) {
|
|
248
|
+
this.mutationObserver.disconnect();
|
|
249
|
+
}
|
|
250
|
+
if (this.subitemsMutationObserver) {
|
|
251
|
+
this.subitemsMutationObserver.disconnect();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
//#endregion LIFECYCLE
|
|
255
|
+
/****************************************************************************/
|
|
256
|
+
//#region WATCHERS
|
|
257
|
+
onOpenChanged(newValue, oldValue) {
|
|
258
|
+
// Only animate if the value actually changed (prevents false triggers from React re-renders)
|
|
259
|
+
if (newValue === oldValue) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
// Force update when open state changes (user clicked toggle)
|
|
263
|
+
this.updateSubitemsHeight(true);
|
|
264
|
+
// Update active state based on subitems when open state changes
|
|
265
|
+
this.updateActiveFromSubitems();
|
|
266
|
+
}
|
|
267
|
+
//#endregion WATCHERS
|
|
268
|
+
/****************************************************************************/
|
|
269
|
+
//#region RENDER
|
|
270
|
+
render() {
|
|
271
|
+
const showNotificationBullet = this.notificationCount !== undefined && this.notificationCount > 0;
|
|
272
|
+
const notificationSize = this.isSidebarCollapsed ? 'reduced' : 'default';
|
|
273
|
+
return (index.h(index.Host, { key: 'c0c9c63cb295441389b5ced9a4b0a0d5a1af99cd', role: "listitem" }, index.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 && (index.h("div", { key: '25f703e9fb7375b8b562be54f080120ae037dd9f', class: "nv-sidebarnavitem-icon" }, index.h("nv-icon", { key: '1a4e345c90afcec159890db6c6b0e22d53dd673d', name: this.icon, size: "md" }), showNotificationBullet && this.isSidebarCollapsed && (index.h("nv-notification-bullet", { key: '15b69d1a2325daed7d6583ed10906fe4e91809e5', count: this.notificationCount, size: notificationSize, contrastingBorder: true })))), index.h("div", { key: 'c717c09f39eab07616de419a35b11a5b7dfce5d1', class: "nv-sidebarnavitem-content" }, index.h("slot", { key: '9f8687f151fd082a6737e7fbe6036cc3ebff3cc2' })), index.h("div", { key: 'b2c3d7a4c30ce96273731a05a1d361f5654582de', class: "nv-sidebarnavitem-trailing" }, index.h("slot", { key: 'acf2dddbbbc7d2e83703c731a244237e0dc81153', name: "trailing" }), showNotificationBullet && !this.isSidebarCollapsed && (index.h("nv-notification-bullet", { key: 'adca5c7418a3b58afa5ef21ddd3fa9b2d880a56c', count: this.notificationCount, size: notificationSize })), this.collapsible && (index.h("nv-icon", { key: 'a4a4369d4ba76f567cca439d1b4c7e95ad5ba98c', name: "chevron-down", size: "sm", class: "nv-sidebarnavitem-chevron" })))), this.collapsible && this.hasSubitems && (index.h("div", { key: '2d4fadb0b547eb369a702bb8210b3312dde505b2', class: "nv-sidebarnavitem-subitems", ref: el => {
|
|
274
|
+
// Only update ref and initialize if element changed or not yet initialized
|
|
275
|
+
if (el !== this.subitemsRef) {
|
|
276
|
+
this.subitemsRef = el;
|
|
277
|
+
if (el && !this.hasInitializedHeight) {
|
|
278
|
+
// Initialize height only on first mount, not on re-renders
|
|
279
|
+
this.hasInitializedHeight = true;
|
|
280
|
+
requestAnimationFrame(() => {
|
|
281
|
+
// Only animate if item is open, otherwise it will animate when opened
|
|
282
|
+
if (this.open) {
|
|
283
|
+
this.updateSubitemsHeight();
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
} }, index.h("slot", { key: 'f0ffb970aa2d84580205ba110858d3f1c27875a3', name: "subitems" })))));
|
|
289
|
+
}
|
|
290
|
+
get el() { return index.getElement(this); }
|
|
291
|
+
static get watchers() { return {
|
|
292
|
+
"open": ["onOpenChanged"]
|
|
293
|
+
}; }
|
|
294
|
+
};
|
|
295
|
+
NvSidebarnavitem.style = NvSidebarnavitemStyle0;
|
|
296
|
+
|
|
297
|
+
exports.nv_sidebarnavitem = NvSidebarnavitem;
|
|
298
|
+
|
|
299
|
+
//# sourceMappingURL=nv-sidebarnavitem.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nv-sidebarnavitem.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,wiHAAwiH,CAAC;AACrkH,+BAAe,mBAAmB;;MCarB,gBAAgB;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,CAAC;QAIpC,yBAAoB,GAAY,KAAK,CAAC;;;;QAItC,iBAAY,GAAG,CAAC,KAAiB;;YAEvC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;YAC3C,IAAI,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;gBAC1C,OAAO;aACR;;YAGD,IAAI,IAAI,CAAC,kBAAkB,EAAE;;gBAE3B,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAChC,0CAA0C,CACtB,CAAC;gBACvB,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE;;oBAEd,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;wBACvB,OAAO;qBACR;;oBAED,IAAI,CAAC,KAAK,EAAE,CAAC;iBACd;gBACD,OAAO;aACR;;YAGD,IAAI,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AAa,CACT,EACNA,kEAAK,KAAK,EAAC,4BAA4B,IACrCA,mEAAM,IAAI,EAAC,UAAU,GAAQ,EAC5B,sBAAsB,IAAI,CAAC,IAAI,CAAC,kBAAkB,KACjDA,qFACE,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAC7B,IAAI,EAAE,gBAAgB,GACE,CAC3B,EACA,IAAI,CAAC,WAAW,KACfA,sEACE,IAAI,EAAC,cAAc,EACnB,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,2BAA2B,GACxB,CACZ,CACG,CACF,EACL,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,KACnCA,kEACE,KAAK,EAAC,4BAA4B,EAClC,GAAG,EAAE,EAAE;;gBAEL,IAAI,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE;oBAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;oBACtB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;;wBAEpC,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;wBACjC,qBAAqB,CAAC;;4BAEpB,IAAI,IAAI,CAAC,IAAI,EAAE;gCACb,IAAI,CAAC,oBAAoB,EAAE,CAAC;6BAC7B;yBACF,CAAC,CAAC;qBACJ;iBACF;aACF,IAEDA,mEAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACP,CACI,EACP;KACH;;;;;;;;;;","names":["h","Host"],"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,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-93d3b2f8.js');
|
|
6
|
+
|
|
7
|
+
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}";
|
|
8
|
+
const NvSidebarnavsubitemStyle0 = nvSidebarnavsubitemCss;
|
|
9
|
+
|
|
10
|
+
const NvSidebarnavsubitem = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
/****************************************************************************/
|
|
14
|
+
//#region PROPERTIES
|
|
15
|
+
/**
|
|
16
|
+
* Whether this sub-item represents the active/current page.
|
|
17
|
+
*/
|
|
18
|
+
this.active = false;
|
|
19
|
+
}
|
|
20
|
+
//#endregion PROPERTIES
|
|
21
|
+
/****************************************************************************/
|
|
22
|
+
//#region METHODS
|
|
23
|
+
// Note: We no longer use stopPropagation() here because it prevents React Router
|
|
24
|
+
// (and other SPA routers) from receiving the click event due to event delegation.
|
|
25
|
+
// Instead, the parent nv-sidebarnavitem checks if clicks originate from subitems.
|
|
26
|
+
//#endregion METHODS
|
|
27
|
+
/****************************************************************************/
|
|
28
|
+
//#region RENDER
|
|
29
|
+
render() {
|
|
30
|
+
return (index.h(index.Host, { key: '8ae8c5e2038145bd458a35d237495a06fde97294', role: "listitem", "aria-current": this.active ? 'page' : undefined }, index.h("div", { key: '559a99d72973f7af43091c5c920e77d8cad3944c', class: "nv-sidebarnavsubitem-indicator" }), index.h("div", { key: '204c7ad681d51310f43b618ef14a12d0ccc93ddc', class: "nv-sidebarnavsubitem-content" }, index.h("slot", { key: 'f4717aee216fbeac4dbfe0d98b34fe7e83476701' })), index.h("div", { key: 'b5db84c75ae4e51d8a048000a49697eaf4b20f1d', class: "nv-sidebarnavsubitem-trailing" }, index.h("slot", { key: 'b6d0afcd6b4ace60b32f531f414b70aba513a274', name: "trailing" }))));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
NvSidebarnavsubitem.style = NvSidebarnavsubitemStyle0;
|
|
34
|
+
|
|
35
|
+
exports.nv_sidebarnavsubitem = NvSidebarnavsubitem;
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=nv-sidebarnavsubitem.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nv-sidebarnavsubitem.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,sBAAsB,GAAG,sxEAAsxE,CAAC;AACtzE,kCAAe,sBAAsB;;MCWxB,mBAAmB;IALhC;;;;;;;QAYW,WAAM,GAAY,KAAK,CAAC;KAwBlC;;;;;;;;;;IAdC,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,IAAI,EAAC,UAAU,kBAAe,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,IAClED,kEAAK,KAAK,EAAC,gCAAgC,GAAO,EAClDA,kEAAK,KAAK,EAAC,8BAA8B,IACvCA,oEAAa,CACT,EACNA,kEAAK,KAAK,EAAC,+BAA+B,IACxCA,mEAAM,IAAI,EAAC,UAAU,GAAQ,CACzB,CACD,EACP;KACH;;;;;;","names":["h","Host"],"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}
|
|
@@ -324,7 +324,7 @@ const NvSplit = class {
|
|
|
324
324
|
/****************************************************************************/
|
|
325
325
|
//#region RENDER
|
|
326
326
|
render() {
|
|
327
|
-
return (index.h(index.Host, { key: '
|
|
327
|
+
return (index.h(index.Host, { key: 'df6a2141e14d1f691af162d1eae2e2763ffad014', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: 'ce9d941bc73fa6e12161f334d4cd86e9045f6271', name: "pane" }), index.h("slot", { key: 'a70c14b0989a758ad35dc3c611563f7d03be0d02', name: "gutter" })));
|
|
328
328
|
}
|
|
329
329
|
get el() { return index.getElement(this); }
|
|
330
330
|
static get watchers() { return {
|
|
@@ -23,7 +23,7 @@ const NvStack = class {
|
|
|
23
23
|
/****************************************************************************/
|
|
24
24
|
//#region RENDER
|
|
25
25
|
render() {
|
|
26
|
-
return (index.h(index.Host, { key: '
|
|
26
|
+
return (index.h(index.Host, { key: 'fbdaf5b2fb134b050883a512b4aeb96b070017c1', class: clsx.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') }, index.h("slot", { key: '6c7c231b8ff2575a1b509539d227468629fae6ab' })));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
NvStack.style = NvStackStyle0;
|
|
@@ -236,7 +236,7 @@ const NvTable = class {
|
|
|
236
236
|
/****************************************************************************/
|
|
237
237
|
//#region RENDER
|
|
238
238
|
render() {
|
|
239
|
-
return (index.h(index.Host, { key: '
|
|
239
|
+
return (index.h(index.Host, { key: 'ec194bed7ec58642be9f6b52a737e2f9375a152e' }, index.h("slot", { key: '009ce0f20491156ca93141c85683f0be499a9938' })));
|
|
240
240
|
}
|
|
241
241
|
get host() { return index.getElement(this); }
|
|
242
242
|
};
|
|
@@ -62,7 +62,7 @@ const NvTableheader = class {
|
|
|
62
62
|
/****************************************************************************/
|
|
63
63
|
//#region RENDER
|
|
64
64
|
render() {
|
|
65
|
-
return (index.h(index.Host, { key: '
|
|
65
|
+
return (index.h(index.Host, { key: '6719336a9812b1d1abd161b955b841c1459fb584', role: "columnheader", "aria-sort": this.ariaSort, tabindex: this.sortable ? 0 : undefined, onKeyDown: this.handleKeyDown.bind(this), onClick: this.cycleSortDirection.bind(this) }, index.h("slot", { key: 'd559e3b7c74f6dcf8197e2d082310660a23291d6' }), this.sortable && (index.h("span", { key: '540c8c8cf3cccac47a3ece7d9be4e97c4e283690', class: "sort-icon-wrap", "aria-hidden": "true" }, index.h("nv-iconbutton", { key: 'ac713c7af3b5b2e452f02d0d77cb64398b0febd4', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
|
|
66
66
|
// prevent mousedown from selecting text
|
|
67
67
|
onMouseDown: (e) => e.preventDefault(), class: {
|
|
68
68
|
'is-none': this.sortDirection === 'none',
|
|
@@ -66,8 +66,8 @@ const NvToggle = class {
|
|
|
66
66
|
/****************************************************************************/
|
|
67
67
|
//#region RENDER
|
|
68
68
|
render() {
|
|
69
|
-
return (index.h(index.Host, { key: '
|
|
70
|
-
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '
|
|
69
|
+
return (index.h(index.Host, { key: '1a217a31999750cb1c8f26af5407ef2d7277600c', class: clsx.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '35e39e8df6475ffa41cd8b811948454ba956e814', class: "input-container" }, index.h("input", { key: '359a584d868d37affcb7b5fe5c24fef71eae209e', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '3bc4c7d7ef8bca23391ede4b08eb596bab68289a', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '61be38f883222b69807c0e8b8540f6ad20ed0cf4', htmlFor: this.inputId, class: clsx.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: 'e5ad1f81fc6e98794931b5e6dc811d9cc6aa9c73', name: "label" }, this.label))), (this.description ||
|
|
70
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'f1f0d41c28be40b24e17d9f6f29224fbb2f9f05e', class: "description" }, index.h("slot", { key: '5418c3c3195045200e9ad0eb4bc6438eee453fd9', name: "description" }, this.description))))));
|
|
71
71
|
}
|
|
72
72
|
static get formAssociated() { return true; }
|
|
73
73
|
get el() { return index.getElement(this); }
|
|
@@ -48,7 +48,7 @@ const NvTogglebutton = class {
|
|
|
48
48
|
/****************************************************************************/
|
|
49
49
|
//#region RENDER
|
|
50
50
|
render() {
|
|
51
|
-
return (index.h(index.Host, { key: '
|
|
51
|
+
return (index.h(index.Host, { key: '35199476bd724fe4a6b4dde51b7822bed5c374ff', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: '864cf0f2550b66b0b34c4f779086d4b4847732e6' })));
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
NvTogglebutton.style = NvTogglebuttonStyle0;
|
|
@@ -156,7 +156,7 @@ const NvTogglebuttongroup = class {
|
|
|
156
156
|
/****************************************************************************/
|
|
157
157
|
//#region RENDER
|
|
158
158
|
render() {
|
|
159
|
-
return (index.h(index.Host, { key: '
|
|
159
|
+
return (index.h(index.Host, { key: 'b7c5cb46244f10a93330dc601d0347e3cb53c276' }, index.h("slot", { key: '0808ec94f479f52f60b50ac14ce1a4eb989e5778' })));
|
|
160
160
|
}
|
|
161
161
|
get el() { return index.getElement(this); }
|
|
162
162
|
static get watchers() { return {
|
|
@@ -46,7 +46,7 @@ const NvTooltip = class {
|
|
|
46
46
|
/****************************************************************************/
|
|
47
47
|
//#region RENDER
|
|
48
48
|
render() {
|
|
49
|
-
return (index.h(index.Host, { key: '
|
|
49
|
+
return (index.h(index.Host, { key: 'ff1ca24735ec78d279cdc2f98cb54c0d6a7b4103' }, index.h("slot", { key: '3e0676a49b957ecb6eb3e0e6bfc1d8d8f0d2e02a' }), index.h("nv-popover", { key: '063fb414e47a1a6b722ee8b61f3dd68a61c5b7df', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: 'a8714211a3a5c723d187acdcb23484610bd91a36', slot: "content" }, this.message), index.h("slot", { key: 'edae83eb3c0f5c57b9b7263ccc139463b044f68e', name: "content" }))));
|
|
50
50
|
}
|
|
51
51
|
get el() { return index.getElement(this); }
|
|
52
52
|
};
|
|
@@ -37,9 +37,19 @@
|
|
|
37
37
|
"components/nv-menu/nv-menu.js",
|
|
38
38
|
"components/nv-menuitem/nv-menuitem.js",
|
|
39
39
|
"components/nv-notification/nv-notification.js",
|
|
40
|
+
"components/nv-notification-bullet/nv-notification-bullet.js",
|
|
40
41
|
"components/nv-notificationcontainer/nv-notificationcontainer.js",
|
|
41
42
|
"components/nv-popover/nv-popover.js",
|
|
42
43
|
"components/nv-row/nv-row.js",
|
|
44
|
+
"components/nv-sidebar/nv-sidebar.js",
|
|
45
|
+
"components/nv-sidebarcontent/nv-sidebarcontent.js",
|
|
46
|
+
"components/nv-sidebardivider/nv-sidebardivider.js",
|
|
47
|
+
"components/nv-sidebarfooter/nv-sidebarfooter.js",
|
|
48
|
+
"components/nv-sidebargroup/nv-sidebargroup.js",
|
|
49
|
+
"components/nv-sidebarheader/nv-sidebarheader.js",
|
|
50
|
+
"components/nv-sidebarlogo/nv-sidebarlogo.js",
|
|
51
|
+
"components/nv-sidebarnavitem/nv-sidebarnavitem.js",
|
|
52
|
+
"components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.js",
|
|
43
53
|
"components/nv-split/nv-split.js",
|
|
44
54
|
"components/nv-stack/nv-stack.js",
|
|
45
55
|
"components/nv-table/nv-table.js",
|
|
@@ -5,34 +5,42 @@
|
|
|
5
5
|
* Usage:
|
|
6
6
|
* @include scrollbar();
|
|
7
7
|
*/
|
|
8
|
-
dialog {
|
|
8
|
+
nv-dialog dialog {
|
|
9
|
+
width: 100vw;
|
|
10
|
+
height: 100svh;
|
|
11
|
+
margin: 0;
|
|
12
|
+
max-height: unset;
|
|
13
|
+
max-width: unset;
|
|
14
|
+
padding: 0;
|
|
15
|
+
background: color-mix(in srgb, var(--components-overlay-background) 70%, transparent);
|
|
16
|
+
backdrop-filter: blur(4px);
|
|
17
|
+
}
|
|
18
|
+
nv-dialog dialog.full .content {
|
|
19
|
+
min-width: 90vw;
|
|
20
|
+
width: 90vw;
|
|
21
|
+
max-width: 90vw;
|
|
22
|
+
}
|
|
23
|
+
nv-dialog .backdrop {
|
|
24
|
+
display: flex;
|
|
25
|
+
min-height: 100%;
|
|
26
|
+
padding: var(--spacing-3);
|
|
27
|
+
/* shadow/2xl */
|
|
28
|
+
box-shadow: 0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3);
|
|
29
|
+
}
|
|
30
|
+
nv-dialog .backdrop .content {
|
|
9
31
|
border-radius: var(--radius-rounded-2xl);
|
|
10
32
|
background: var(--color-level-00-background);
|
|
11
33
|
min-width: min(90vw, 400px);
|
|
12
34
|
width: fit-content;
|
|
13
35
|
max-width: clamp(90vw, min(90vw, 960px), 960px);
|
|
14
36
|
margin: auto;
|
|
15
|
-
max-height: 90vh;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
/* shadow/2xl */
|
|
18
|
-
box-shadow: 0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl) var(--shadow-spread-2xl) var(--shadow-color-opacity-3) var(--shadow-color-opacity-3);
|
|
19
|
-
}
|
|
20
|
-
dialog.full {
|
|
21
|
-
width: 90vw;
|
|
22
|
-
}
|
|
23
|
-
dialog::backdrop {
|
|
24
|
-
opacity: var(--components-overlay-opacity);
|
|
25
|
-
background: var(--components-overlay-background);
|
|
26
|
-
}
|
|
27
|
-
dialog .content {
|
|
28
37
|
display: flex;
|
|
29
38
|
flex-direction: column;
|
|
30
39
|
align-items: flex-start;
|
|
31
40
|
height: fit-content;
|
|
32
|
-
|
|
33
|
-
overflow: hidden;
|
|
41
|
+
position: relative;
|
|
34
42
|
}
|
|
35
|
-
dialog .content nv-button.close-button {
|
|
43
|
+
nv-dialog .backdrop .content nv-button.close-button {
|
|
36
44
|
position: absolute;
|
|
37
45
|
top: var(--dialog-dismissible-position-top);
|
|
38
46
|
right: var(--dialog-dismissible-position-right);
|
|
@@ -42,8 +50,7 @@ dialog .content nv-button.close-button {
|
|
|
42
50
|
align-items: flex-start;
|
|
43
51
|
gap: 10px;
|
|
44
52
|
}
|
|
45
|
-
dialog .content .content-body {
|
|
46
|
-
overflow: auto;
|
|
53
|
+
nv-dialog .backdrop .content .content-body {
|
|
47
54
|
box-sizing: border-box;
|
|
48
55
|
padding: var(--dialog-body-padding-y) var(--dialog-body-padding-x);
|
|
49
56
|
scrollbar-gutter: stable both-edges;
|
|
@@ -56,15 +63,15 @@ dialog .content .content-body {
|
|
|
56
63
|
color: var(--color-content-medium-text);
|
|
57
64
|
width: 100%;
|
|
58
65
|
}
|
|
59
|
-
dialog .content .content-body::-webkit-scrollbar {
|
|
66
|
+
nv-dialog .backdrop .content .content-body::-webkit-scrollbar {
|
|
60
67
|
width: 6px;
|
|
61
68
|
height: 6px;
|
|
62
69
|
}
|
|
63
|
-
dialog .content .content-body::-webkit-scrollbar-track {
|
|
70
|
+
nv-dialog .backdrop .content .content-body::-webkit-scrollbar-track {
|
|
64
71
|
background-color: var(--color-level-10-background);
|
|
65
72
|
border-radius: 9999px;
|
|
66
73
|
}
|
|
67
|
-
dialog .content .content-body::-webkit-scrollbar-thumb {
|
|
74
|
+
nv-dialog .backdrop .content .content-body::-webkit-scrollbar-thumb {
|
|
68
75
|
background-color: var(--color-gray-200);
|
|
69
76
|
border-radius: 9999px;
|
|
70
77
|
}
|