@nova-design-system/nova-webcomponents 3.23.0 → 3.24.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/app-globals-V2Kpy_OQ.js.map +1 -1
- package/dist/cjs/events.utils-BE6R5q9C.js +33 -0
- package/dist/cjs/events.utils-BE6R5q9C.js.map +1 -0
- package/dist/cjs/{grow.animation-BrWzyoUA.js → grow.animation-ynu_HmA_.js} +2 -30
- package/dist/cjs/grow.animation-ynu_HmA_.js.map +1 -0
- package/dist/cjs/{i18n.utils-BizoXo6c.js → i18n.utils-ku0bScip.js} +16 -20
- package/dist/cjs/{i18n.utils-BizoXo6c.js.map → i18n.utils-ku0bScip.js.map} +1 -1
- package/dist/cjs/index-B1na8x6M.js +12 -4
- package/dist/cjs/index.cjs.js +5 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/index.esm-CG1TVKfu.js +540 -0
- package/dist/cjs/index.esm-CG1TVKfu.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-accordion.cjs.entry.js +2 -7
- package/dist/cjs/nv-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +1 -2
- package/dist/cjs/nv-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +3 -5
- package/dist/cjs/nv-button.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +14 -24
- package/dist/cjs/nv-calendar.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +67 -72
- package/dist/cjs/nv-datagrid.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +6 -538
- package/dist/cjs/nv-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-drawer.cjs.entry.js +443 -0
- package/dist/cjs/nv-drawer.entry.cjs.js.map +1 -0
- package/dist/cjs/nv-drawerfooter.nv-drawerheader.entry.cjs.js.map +1 -0
- package/dist/cjs/nv-drawerfooter_2.cjs.entry.js +144 -0
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldcheckbox.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +12 -15
- package/dist/cjs/nv-fielddate.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +12 -13
- package/dist/cjs/nv-fielddaterange.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +24 -33
- package/dist/cjs/nv-fielddropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -3
- package/dist/cjs/nv-fielddropdownitem.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +19 -27
- package/dist/cjs/nv-fieldmultiselect.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldnumber.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldpassword.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldradio.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +8 -8
- package/dist/cjs/nv-fieldselect.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldslider.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldslider.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldtext.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldtext.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +6 -7
- package/dist/cjs/nv-fieldtextarea.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +27 -35
- package/dist/cjs/nv-fieldtime.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-iconbutton.nv-loader.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +5 -6
- package/dist/cjs/nv-menu.cjs.entry.js +3 -4
- package/dist/cjs/nv-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification-bullet.cjs.entry.js +1 -2
- package/dist/cjs/nv-notification-bullet.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +6 -9
- package/dist/cjs/nv-notification.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +12 -12
- package/dist/cjs/nv-popover.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-row.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/nv-sidebar.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-sidebarcontent.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebardivider.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebarfooter.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebargroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebarheader.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebarlogo.cjs.entry.js +1 -1
- package/dist/cjs/nv-sidebarnavitem.cjs.entry.js +4 -5
- package/dist/cjs/nv-sidebarnavitem.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-sidebarnavsubitem.cjs.entry.js +1 -1
- package/dist/cjs/nv-split.cjs.entry.js +43 -41
- package/dist/cjs/nv-split.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-stack.cjs.entry.js +1 -1
- package/dist/cjs/nv-table.cjs.entry.js +6 -8
- package/dist/cjs/nv-table.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-tableheader.cjs.entry.js +2 -2
- package/dist/cjs/nv-tableheader.entry.cjs.js.map +1 -1
- 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.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +3 -4
- package/dist/cjs/nv-togglebuttongroup.entry.cjs.js.map +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js +66 -40
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -1
- package/dist/collection/components/nv-accordion/nv-accordion.js +2 -7
- package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
- package/dist/collection/components/nv-alert/nv-alert.docs.js +18 -1
- package/dist/collection/components/nv-alert/nv-alert.docs.js.map +1 -1
- package/dist/collection/components/nv-alert/nv-alert.js +1 -2
- package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
- package/dist/collection/components/nv-avatar/nv-avatar.docs.js +56 -0
- package/dist/collection/components/nv-avatar/nv-avatar.docs.js.map +1 -1
- package/dist/collection/components/nv-badge/nv-badge.docs.js +64 -15
- package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +10 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
- package/dist/collection/components/nv-button/nv-button.docs.js +38 -4
- package/dist/collection/components/nv-button/nv-button.docs.js.map +1 -1
- package/dist/collection/components/nv-button/nv-button.js +3 -5
- package/dist/collection/components/nv-button/nv-button.js.map +1 -1
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js +22 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +269 -14
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
- package/dist/collection/components/nv-calendar/nv-calendar.js +13 -22
- package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
- package/dist/collection/components/nv-calendar/partials/week-numbers.js +1 -2
- package/dist/collection/components/nv-calendar/partials/week-numbers.js.map +1 -1
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +11 -11
- package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
- package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js +2 -2
- package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js.map +1 -1
- package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js +6 -5
- package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js.map +1 -1
- package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js +10 -1
- package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js.map +1 -1
- package/dist/collection/components/nv-col/nv-col.docs.js +8 -0
- package/dist/collection/components/nv-col/nv-col.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +290 -286
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.js +67 -72
- package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +64 -13
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
- package/dist/collection/components/nv-drawer/nv-drawer.css +114 -0
- package/dist/collection/components/nv-drawer/nv-drawer.docs.js +145 -0
- package/dist/collection/components/nv-drawer/nv-drawer.docs.js.map +1 -0
- package/dist/collection/components/nv-drawer/nv-drawer.js +719 -0
- package/dist/collection/components/nv-drawer/nv-drawer.js.map +1 -0
- package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.css +8 -0
- package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.docs.js +6 -0
- package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.docs.js.map +1 -0
- package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.js +325 -0
- package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.js.map +1 -0
- package/dist/collection/components/nv-drawerheader/nv-drawerheader.css +32 -0
- package/dist/collection/components/nv-drawerheader/nv-drawerheader.docs.js +6 -0
- package/dist/collection/components/nv-drawerheader/nv-drawerheader.docs.js.map +1 -0
- package/dist/collection/components/nv-drawerheader/nv-drawerheader.js +92 -0
- package/dist/collection/components/nv-drawerheader/nv-drawerheader.js.map +1 -0
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js +186 -136
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +6 -6
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +300 -109
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +11 -14
- package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +406 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +11 -12
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +210 -118
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +22 -31
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +1 -1
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +2 -3
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +462 -322
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +17 -25
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +70 -7
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +5 -5
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +79 -6
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +5 -5
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +58 -6
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +4 -4
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +138 -30
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +7 -7
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
- package/dist/collection/components/nv-fieldselect/styles/nv-fieldselect.css +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +138 -30
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-fieldslider/partials/field-input.js +1 -1
- package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -1
- package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +92 -16
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +5 -5
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +64 -3
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +6 -7
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +41 -22
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +25 -33
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +1 -1
- package/dist/collection/components/nv-fieldtime/utils/format-utils.js +1 -1
- package/dist/collection/components/nv-fieldtime/utils/format-utils.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icon.docs.js +46 -0
- package/dist/collection/components/nv-icon/nv-icon.docs.js.map +1 -1
- package/dist/collection/components/nv-icon/nv-icon.js +1 -1
- package/dist/collection/components/nv-icon/nv-icons.js +2 -0
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +4 -4
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.docs.js +18 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.docs.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +3 -4
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -1
- package/dist/collection/components/nv-loader/nv-loader.docs.js +8 -4
- package/dist/collection/components/nv-loader/nv-loader.docs.js.map +1 -1
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js +17 -5
- package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
- package/dist/collection/components/nv-menu/nv-menu.js +3 -4
- package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
- package/dist/collection/components/nv-notification/nv-notification.docs.js +34 -3
- package/dist/collection/components/nv-notification/nv-notification.docs.js.map +1 -1
- package/dist/collection/components/nv-notification/nv-notification.js +6 -9
- package/dist/collection/components/nv-notification/nv-notification.js.map +1 -1
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.docs.js +60 -0
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.docs.js.map +1 -1
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.js +1 -2
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.js.map +1 -1
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.docs.js +35 -10
- package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +2 -3
- package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
- package/dist/collection/components/nv-row/nv-row.docs.js +7 -0
- package/dist/collection/components/nv-row/nv-row.docs.js.map +1 -1
- package/dist/collection/components/nv-row/nv-row.js +1 -1
- package/dist/collection/components/nv-sidebar/nv-sidebar.docs.js +39 -0
- package/dist/collection/components/nv-sidebar/nv-sidebar.docs.js.map +1 -1
- package/dist/collection/components/nv-sidebar/nv-sidebar.js +3 -3
- package/dist/collection/components/nv-sidebar/nv-sidebar.js.map +1 -1
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.js +1 -1
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.js +1 -1
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.js +1 -1
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.js +1 -1
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.js +1 -1
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.js +1 -1
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js +5 -6
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js.map +1 -1
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.js +1 -1
- package/dist/collection/components/nv-split/nv-split.docs.js +38 -2
- package/dist/collection/components/nv-split/nv-split.docs.js.map +1 -1
- package/dist/collection/components/nv-split/nv-split.js +44 -42
- package/dist/collection/components/nv-split/nv-split.js.map +1 -1
- package/dist/collection/components/nv-split/styles/nv-split.css +2 -0
- package/dist/collection/components/nv-stack/nv-stack.docs.js +13 -0
- package/dist/collection/components/nv-stack/nv-stack.docs.js.map +1 -1
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.docs.js +12 -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-table/nv-table.utils.js +5 -7
- package/dist/collection/components/nv-table/nv-table.utils.js.map +1 -1
- package/dist/collection/components/nv-table/test/nv-table.utils.test.js +4 -5
- package/dist/collection/components/nv-table/test/nv-table.utils.test.js.map +1 -1
- package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js +29 -1
- package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js.map +1 -1
- package/dist/collection/components/nv-tableheader/nv-tableheader.js +2 -2
- package/dist/collection/components/nv-tableheader/nv-tableheader.js.map +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.docs.js +31 -0
- package/dist/collection/components/nv-toggle/nv-toggle.docs.js.map +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-togglebutton/styles/nv-togglebutton.css +16 -12
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +20 -7
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +2 -3
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -1
- package/dist/collection/components/nv-togglebuttongroup/styles/nv-togglebuttongroup.css +4 -12
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js +33 -6
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js.map +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
- package/dist/collection/templates/navigation.docs.js +1 -1
- package/dist/collection/templates/navigation.docs.js.map +1 -1
- package/dist/collection/utils/i18n.utils.js +1 -2
- package/dist/collection/utils/i18n.utils.js.map +1 -1
- package/dist/collection/utils/search-engine/strategies/fuzzy.js +2 -2
- package/dist/collection/utils/search-engine/strategies/fuzzy.js.map +1 -1
- package/dist/collection/utils/search-engine/strategies/smart.js +2 -2
- package/dist/collection/utils/search-engine/strategies/smart.js.map +1 -1
- package/dist/collection/utils/search-engine/strategies/strict.js +2 -2
- package/dist/collection/utils/search-engine/strategies/strict.js.map +1 -1
- package/dist/collection/utils/search-engine/worker/worker-client.js +7 -10
- package/dist/collection/utils/search-engine/worker/worker-client.js.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +6 -11
- package/dist/components/nv-accordion.js.map +1 -1
- package/dist/components/nv-alert.js +2 -3
- package/dist/components/nv-alert.js.map +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-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +69 -74
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-dialog.js +7 -539
- package/dist/components/nv-dialog.js.map +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-drawer.d.ts +11 -0
- package/dist/components/nv-drawer.js +507 -0
- package/dist/components/nv-drawer.js.map +1 -0
- package/dist/components/nv-drawerfooter.d.ts +11 -0
- package/dist/components/nv-drawerfooter.js +9 -0
- package/dist/components/nv-drawerfooter.js.map +1 -0
- package/dist/components/nv-drawerheader.d.ts +11 -0
- package/dist/components/nv-drawerheader.js +9 -0
- package/dist/components/nv-drawerheader.js.map +1 -0
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +18 -21
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +18 -19
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +29 -38
- 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 +26 -34
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +9 -9
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +4 -4
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +11 -11
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.js +9 -9
- package/dist/components/nv-fieldslider.js.map +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +6 -7
- package/dist/components/nv-fieldtextarea.js.map +1 -1
- package/dist/components/nv-fieldtime.js +31 -39
- package/dist/components/nv-fieldtime.js.map +1 -1
- 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 +6 -7
- package/dist/components/nv-menu.js.map +1 -1
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-notification-bullet.js +1 -1
- package/dist/components/nv-notification.js +7 -10
- package/dist/components/nv-notification.js.map +1 -1
- 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.js +4 -4
- package/dist/components/nv-sidebar.js.map +1 -1
- package/dist/components/nv-sidebarcontent.js +1 -1
- package/dist/components/nv-sidebardivider.js +1 -1
- package/dist/components/nv-sidebarfooter.js +1 -1
- package/dist/components/nv-sidebargroup.js +1 -1
- package/dist/components/nv-sidebarheader.js +1 -1
- package/dist/components/nv-sidebarlogo.js +1 -1
- package/dist/components/nv-sidebarnavitem.js +6 -7
- package/dist/components/nv-sidebarnavitem.js.map +1 -1
- package/dist/components/nv-sidebarnavsubitem.js +1 -1
- package/dist/components/nv-split.js +43 -41
- package/dist/components/nv-split.js.map +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +6 -8
- package/dist/components/nv-table.js.map +1 -1
- package/dist/components/nv-tableheader.js +5 -5
- package/dist/components/nv-tableheader.js.map +1 -1
- 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 +3 -4
- package/dist/components/nv-togglebuttongroup.js.map +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-D1i2OAGe.js → p-B45HbBWe.js} +6 -8
- package/dist/components/p-B45HbBWe.js.map +1 -0
- package/dist/components/p-B6GgGra-.js +29 -0
- package/dist/components/p-B6GgGra-.js.map +1 -0
- package/dist/components/{p-Dk8ekxr_.js → p-B7VlEQVW.js} +16 -26
- package/dist/components/p-B7VlEQVW.js.map +1 -0
- package/dist/components/{p-B-3kAnun.js → p-B9i3m6rk.js} +6 -6
- package/dist/components/p-B9i3m6rk.js.map +1 -0
- package/dist/components/{p-BQo7AMPX.js → p-BILd3Ta-.js} +9 -9
- package/dist/components/p-BILd3Ta-.js.map +1 -0
- package/dist/components/{p-Dc_0pr83.js → p-BISctfud.js} +8 -8
- package/dist/components/p-BISctfud.js.map +1 -0
- package/dist/components/{p-CIyQBhTX.js → p-BVOv1zgq.js} +4 -4
- package/dist/components/{p-CIyQBhTX.js.map → p-BVOv1zgq.js.map} +1 -1
- package/dist/components/{p-B6EYOx_n.js → p-Bg_l3jn1.js} +3 -3
- package/dist/components/{p-B6EYOx_n.js.map → p-Bg_l3jn1.js.map} +1 -1
- package/dist/components/{p-CBvZjfqs.js → p-C2QAWGhf.js} +4 -4
- package/dist/components/{p-CBvZjfqs.js.map → p-C2QAWGhf.js.map} +1 -1
- package/dist/components/{p-DzUXTCUy.js → p-COnt5ux_.js} +3 -3
- package/dist/components/{p-DzUXTCUy.js.map → p-COnt5ux_.js.map} +1 -1
- package/dist/components/{p-KUIQrV3D.js → p-Cc7XnqPp.js} +5 -5
- package/dist/components/{p-KUIQrV3D.js.map → p-Cc7XnqPp.js.map} +1 -1
- package/dist/components/{p-CmwaW0q4.js → p-D02w_Ru6.js} +3 -28
- package/dist/components/p-D02w_Ru6.js.map +1 -0
- package/dist/components/p-D3eWMME9.js +538 -0
- package/dist/components/p-D3eWMME9.js.map +1 -0
- package/dist/components/{p--iYGZN4R.js → p-D6APFL6N.js} +11 -11
- package/dist/components/p-D6APFL6N.js.map +1 -0
- package/dist/components/{p-DstpaOhw.js → p-DZJHk4fr.js} +3 -3
- package/dist/components/{p-DstpaOhw.js.map → p-DZJHk4fr.js.map} +1 -1
- package/dist/components/{p-Da9WgE5U.js → p-DiUP3TzF.js} +5 -5
- package/dist/components/{p-Da9WgE5U.js.map → p-DiUP3TzF.js.map} +1 -1
- package/dist/components/{p-DWG6az-u.js → p-DpDooigg.js} +5 -6
- package/dist/components/p-DpDooigg.js.map +1 -0
- package/dist/components/{p-BKfPh2in.js → p-Dr-67WvG.js} +4 -4
- package/dist/components/{p-BKfPh2in.js.map → p-Dr-67WvG.js.map} +1 -1
- package/dist/components/{p-DaiLIZ8f.js → p-DvapDVBj.js} +8 -9
- package/dist/components/p-DvapDVBj.js.map +1 -0
- package/dist/components/{p-DOZbXX2L.js → p-IlwlcG9l.js} +16 -20
- package/dist/components/p-IlwlcG9l.js.map +1 -0
- package/dist/components/p-W6vOfMC9.js +63 -0
- package/dist/components/p-W6vOfMC9.js.map +1 -0
- package/dist/components/{p-CBOuqJTb.js → p-nfYynlVq.js} +4 -4
- package/dist/components/{p-CBOuqJTb.js.map → p-nfYynlVq.js.map} +1 -1
- package/dist/components/{p-CBF8V1L7.js → p-tyaJ-nGV.js} +3 -4
- package/dist/components/p-tyaJ-nGV.js.map +1 -0
- package/dist/components/p-u-maNLLs.js +145 -0
- package/dist/components/p-u-maNLLs.js.map +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
- package/dist/esm/events.utils-B6GgGra-.js +29 -0
- package/dist/esm/events.utils-B6GgGra-.js.map +1 -0
- package/dist/esm/{grow.animation-CvHGHBL4.js → grow.animation-D7ep_aVl.js} +3 -28
- package/dist/esm/grow.animation-D7ep_aVl.js.map +1 -0
- package/dist/esm/{i18n.utils-DOZbXX2L.js → i18n.utils-IlwlcG9l.js} +16 -20
- package/dist/esm/{i18n.utils-DOZbXX2L.js.map → i18n.utils-IlwlcG9l.js.map} +1 -1
- package/dist/esm/index-CasQushP.js +12 -4
- package/dist/esm/index.esm-D3eWMME9.js +538 -0
- package/dist/esm/index.esm-D3eWMME9.js.map +1 -0
- package/dist/esm/index.js +4 -2
- 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-accordion.entry.js +2 -7
- package/dist/esm/nv-accordion.entry.js.map +1 -1
- package/dist/esm/nv-alert.entry.js +1 -2
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +3 -5
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-calendar.entry.js +14 -24
- package/dist/esm/nv-calendar.entry.js.map +1 -1
- package/dist/esm/nv-datagrid.entry.js +67 -72
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +3 -535
- package/dist/esm/nv-dialog.entry.js.map +1 -1
- package/dist/esm/nv-drawer.entry.js +441 -0
- package/dist/esm/nv-drawer.entry.js.map +1 -0
- package/dist/esm/nv-drawerfooter.nv-drawerheader.entry.js.map +1 -0
- package/dist/esm/nv-drawerfooter_2.entry.js +141 -0
- package/dist/esm/nv-fieldcheckbox.entry.js +6 -6
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +12 -15
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +12 -13
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +24 -33
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdownitem.entry.js +2 -3
- package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +19 -27
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +6 -6
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +6 -6
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +8 -8
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldslider.entry.js +5 -5
- package/dist/esm/nv-fieldslider.entry.js.map +1 -1
- package/dist/esm/nv-fieldtext.entry.js +6 -6
- package/dist/esm/nv-fieldtext.entry.js.map +1 -1
- package/dist/esm/nv-fieldtextarea.entry.js +6 -7
- package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +27 -35
- package/dist/esm/nv-fieldtime.entry.js.map +1 -1
- package/dist/esm/nv-icon.entry.js +2 -2
- package/dist/esm/nv-icon.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton.nv-loader.entry.js.map +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js +5 -6
- package/dist/esm/nv-menu.entry.js +3 -4
- package/dist/esm/nv-menu.entry.js.map +1 -1
- package/dist/esm/nv-menuitem.entry.js +1 -1
- package/dist/esm/nv-notification-bullet.entry.js +1 -2
- package/dist/esm/nv-notification-bullet.entry.js.map +1 -1
- package/dist/esm/nv-notification.entry.js +6 -9
- package/dist/esm/nv-notification.entry.js.map +1 -1
- package/dist/esm/nv-notificationcontainer.entry.js +1 -1
- package/dist/esm/nv-popover.entry.js +4 -4
- 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 +3 -3
- package/dist/esm/nv-sidebar.entry.js.map +1 -1
- package/dist/esm/nv-sidebarcontent.entry.js +1 -1
- package/dist/esm/nv-sidebardivider.entry.js +1 -1
- package/dist/esm/nv-sidebarfooter.entry.js +1 -1
- package/dist/esm/nv-sidebargroup.entry.js +1 -1
- package/dist/esm/nv-sidebarheader.entry.js +1 -1
- package/dist/esm/nv-sidebarlogo.entry.js +1 -1
- package/dist/esm/nv-sidebarnavitem.entry.js +4 -5
- package/dist/esm/nv-sidebarnavitem.entry.js.map +1 -1
- package/dist/esm/nv-sidebarnavsubitem.entry.js +1 -1
- package/dist/esm/nv-split.entry.js +43 -41
- package/dist/esm/nv-split.entry.js.map +1 -1
- package/dist/esm/nv-stack.entry.js +1 -1
- package/dist/esm/nv-table.entry.js +6 -8
- package/dist/esm/nv-table.entry.js.map +1 -1
- package/dist/esm/nv-tableheader.entry.js +2 -2
- package/dist/esm/nv-tableheader.entry.js.map +1 -1
- 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 +3 -4
- package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -1
- package/dist/esm/nv-tooltip.entry.js +1 -1
- package/dist/lib/generators/angular-output.js +9 -7
- package/dist/lib/generators/angular-output.js.map +1 -1
- package/dist/lib/generators/docs-blazor.js +32 -14
- package/dist/lib/generators/docs-blazor.js.map +1 -1
- package/dist/lib/generators/vue-output.js +10 -11
- package/dist/lib/generators/vue-output.js.map +1 -1
- package/dist/lib/utils/componentBinding.js +9 -10
- package/dist/lib/utils/componentBinding.js.map +1 -1
- package/dist/lib/utils/parseToCSharpTypes.js +3 -16
- package/dist/lib/utils/parseToCSharpTypes.js.map +1 -1
- package/dist/lib/utils/spread.js +3 -4
- package/dist/lib/utils/spread.js.map +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/nv-accordion.entry.esm.js.map +1 -1
- package/dist/native/nv-alert.entry.esm.js.map +1 -1
- package/dist/native/nv-button.entry.esm.js.map +1 -1
- package/dist/native/nv-calendar.entry.esm.js.map +1 -1
- package/dist/native/nv-datagrid.entry.esm.js.map +1 -1
- package/dist/native/nv-dialog.entry.esm.js.map +1 -1
- package/dist/native/nv-drawer.entry.esm.js.map +1 -0
- package/dist/native/nv-drawerfooter.nv-drawerheader.entry.esm.js.map +1 -0
- package/dist/native/nv-fieldcheckbox.entry.esm.js.map +1 -1
- package/dist/native/nv-fielddate.entry.esm.js.map +1 -1
- package/dist/native/nv-fielddaterange.entry.esm.js.map +1 -1
- package/dist/native/nv-fielddropdown.entry.esm.js.map +1 -1
- package/dist/native/nv-fielddropdownitem.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldmultiselect.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldnumber.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldpassword.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldradio.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldselect.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldslider.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldtext.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldtextarea.entry.esm.js.map +1 -1
- package/dist/native/nv-fieldtime.entry.esm.js.map +1 -1
- package/dist/native/nv-icon.entry.esm.js.map +1 -1
- package/dist/native/nv-iconbutton.nv-loader.entry.esm.js.map +1 -1
- package/dist/native/nv-menu.entry.esm.js.map +1 -1
- package/dist/native/nv-notification-bullet.entry.esm.js.map +1 -1
- package/dist/native/nv-notification.entry.esm.js.map +1 -1
- package/dist/native/nv-popover.entry.esm.js.map +1 -1
- package/dist/native/nv-sidebar.entry.esm.js.map +1 -1
- package/dist/native/nv-sidebarnavitem.entry.esm.js.map +1 -1
- package/dist/native/nv-split.entry.esm.js.map +1 -1
- package/dist/native/nv-table.entry.esm.js.map +1 -1
- package/dist/native/nv-tableheader.entry.esm.js.map +1 -1
- package/dist/native/nv-togglebutton.entry.esm.js.map +1 -1
- package/dist/native/nv-togglebuttongroup.entry.esm.js.map +1 -1
- package/dist/native/{p-b21e38a3.entry.js → p-04a2fe7f.entry.js} +2 -2
- package/dist/native/p-08204da4.entry.js +2 -0
- package/dist/native/{p-bd6ae5f3.entry.js.map → p-08204da4.entry.js.map} +1 -1
- package/dist/native/{p-e0adb05d.entry.js → p-0e07b91b.entry.js} +2 -2
- package/dist/native/p-0e07b91b.entry.js.map +1 -0
- package/dist/native/p-136dfb3e.entry.js +2 -0
- package/dist/native/p-136dfb3e.entry.js.map +1 -0
- package/dist/native/p-1f2dd37f.entry.js +2 -0
- package/dist/native/p-1f2dd37f.entry.js.map +1 -0
- package/dist/native/p-255a0482.entry.js +2 -0
- package/dist/native/p-255a0482.entry.js.map +1 -0
- package/dist/native/{p-f73e9752.entry.js → p-3305a7e6.entry.js} +2 -2
- package/dist/native/p-3305a7e6.entry.js.map +1 -0
- package/dist/native/p-36b0a6f0.entry.js +2 -0
- package/dist/native/p-36b0a6f0.entry.js.map +1 -0
- package/dist/native/p-434bc910.entry.js +2 -0
- package/dist/native/p-434bc910.entry.js.map +1 -0
- package/dist/native/{p-ea98ba7a.entry.js → p-436029a5.entry.js} +2 -2
- package/dist/native/p-460fdf02.entry.js +2 -0
- package/dist/native/p-460fdf02.entry.js.map +1 -0
- package/dist/native/p-477e02cf.entry.js +2 -0
- package/dist/native/p-477e02cf.entry.js.map +1 -0
- package/dist/native/{p-28afb852.entry.js → p-4efb582b.entry.js} +2 -2
- package/dist/native/p-4efb582b.entry.js.map +1 -0
- package/dist/native/p-4f1dfa32.entry.js +2 -0
- package/dist/native/p-4f1dfa32.entry.js.map +1 -0
- package/dist/native/p-51b7de55.entry.js +13 -0
- package/dist/native/p-51b7de55.entry.js.map +1 -0
- package/dist/native/{p-37c6d559.entry.js → p-5dd120dc.entry.js} +2 -2
- package/dist/native/p-5dd120dc.entry.js.map +1 -0
- package/dist/native/{p-5acf105e.entry.js → p-67181258.entry.js} +2 -2
- package/dist/native/p-6a81884b.entry.js +2 -0
- package/dist/native/p-6a81884b.entry.js.map +1 -0
- package/dist/native/p-6aa483de.entry.js +2 -0
- package/dist/native/{p-b1a917c7.entry.js → p-6fc79712.entry.js} +2 -2
- package/dist/native/{p-ee04ea09.entry.js → p-729589cb.entry.js} +2 -2
- package/dist/native/p-729589cb.entry.js.map +1 -0
- package/dist/native/p-78bf7650.entry.js +2 -0
- package/dist/native/p-7e6e9ea2.entry.js +2 -0
- package/dist/native/p-8f1cd9e2.entry.js +2 -0
- package/dist/native/p-8f1cd9e2.entry.js.map +1 -0
- package/dist/native/{p-4cf47e1a.entry.js → p-910cd685.entry.js} +2 -2
- package/dist/native/p-91eaf02e.entry.js +2 -0
- package/dist/native/p-91eaf02e.entry.js.map +1 -0
- package/dist/native/p-93e35975.entry.js +2 -0
- package/dist/native/p-93e35975.entry.js.map +1 -0
- package/dist/native/{p-9d8257dc.entry.js → p-96c45604.entry.js} +2 -2
- package/dist/native/{p-6f456ae4.entry.js → p-9b6ad782.entry.js} +2 -2
- package/dist/native/{p-6f456ae4.entry.js.map → p-9b6ad782.entry.js.map} +1 -1
- package/dist/native/{p-fd872d54.entry.js → p-9f32c3ea.entry.js} +2 -2
- package/dist/native/p-B6GgGra-.js +2 -0
- package/dist/native/p-B6GgGra-.js.map +1 -0
- package/dist/native/p-Blc6XEY7.js +2 -0
- package/dist/native/p-Blc6XEY7.js.map +1 -0
- package/dist/native/p-D3eWMME9.js +6 -0
- package/dist/native/p-D3eWMME9.js.map +1 -0
- package/dist/native/p-DQuL1Twl.js.map +1 -1
- package/dist/native/p-IlwlcG9l.js +2 -0
- package/dist/native/{p-DOZbXX2L.js.map → p-IlwlcG9l.js.map} +1 -1
- package/dist/native/{p-b0935c49.entry.js → p-a6fea322.entry.js} +2 -2
- package/dist/native/p-ae279ae9.entry.js +2 -0
- package/dist/native/p-ae279ae9.entry.js.map +1 -0
- package/dist/native/p-ba1286aa.entry.js +2 -0
- package/dist/native/p-ba1286aa.entry.js.map +1 -0
- package/dist/native/p-bb52a5a9.entry.js +2 -0
- package/dist/native/p-bb52a5a9.entry.js.map +1 -0
- package/dist/native/p-bc90247e.entry.js +2 -0
- package/dist/native/p-bc90247e.entry.js.map +1 -0
- package/dist/native/{p-0493fb6d.entry.js → p-c2a73a5a.entry.js} +2 -2
- package/dist/native/p-c4c11549.entry.js +2 -0
- package/dist/native/{p-3c54e422.entry.js → p-c5ecdc49.entry.js} +2 -2
- package/dist/native/p-c5ecdc49.entry.js.map +1 -0
- package/dist/native/{p-527e9b56.entry.js → p-cb1b9edb.entry.js} +2 -2
- package/dist/native/p-cb1b9edb.entry.js.map +1 -0
- package/dist/native/p-cdaf54b0.entry.js +2 -0
- package/dist/native/p-cdaf54b0.entry.js.map +1 -0
- package/dist/native/{p-e7dc36d9.entry.js → p-ceb8fe8a.entry.js} +2 -2
- package/dist/native/p-daf7541b.entry.js +2 -0
- package/dist/native/p-daf7541b.entry.js.map +1 -0
- package/dist/native/{p-da893df2.entry.js → p-ded4be77.entry.js} +2 -2
- package/dist/native/p-ded4be77.entry.js.map +1 -0
- package/dist/native/p-e1fc5f8c.entry.js +2 -0
- package/dist/native/p-e1fc5f8c.entry.js.map +1 -0
- package/dist/native/{p-d4f95c86.entry.js → p-e6c69f7d.entry.js} +2 -2
- package/dist/native/p-e6c69f7d.entry.js.map +1 -0
- package/dist/native/p-e83603f1.entry.js +2 -0
- package/dist/native/p-e83603f1.entry.js.map +1 -0
- package/dist/native/p-ec217581.entry.js +2 -0
- package/dist/native/p-ec217581.entry.js.map +1 -0
- package/dist/native/p-ee694832.entry.js +2 -0
- package/dist/native/p-ee694832.entry.js.map +1 -0
- package/dist/native/{p-b1ef2f25.entry.js → p-f7e0146e.entry.js} +2 -2
- package/dist/native/p-f7e0146e.entry.js.map +1 -0
- package/dist/types/components/nv-drawer/nv-drawer.d.ts +161 -0
- package/dist/types/components/nv-drawer/nv-drawer.docs.d.ts +4 -0
- package/dist/types/components/nv-drawerfooter/nv-drawerfooter.d.ts +76 -0
- package/dist/types/components/nv-drawerfooter/nv-drawerfooter.docs.d.ts +4 -0
- package/dist/types/components/nv-drawerheader/nv-drawerheader.d.ts +20 -0
- package/dist/types/components/nv-drawerheader/nv-drawerheader.docs.d.ts +4 -0
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-split/nv-split.d.ts +4 -4
- package/dist/types/components.d.ts +292 -5
- package/dist/vscode-data.json +153 -1
- package/hydrate/index.js +969 -408
- package/hydrate/index.mjs +969 -408
- package/package.json +13 -1
- package/dist/cjs/grow.animation-BrWzyoUA.js.map +0 -1
- package/dist/components/p--iYGZN4R.js.map +0 -1
- package/dist/components/p-B-3kAnun.js.map +0 -1
- package/dist/components/p-BQo7AMPX.js.map +0 -1
- package/dist/components/p-CBF8V1L7.js.map +0 -1
- package/dist/components/p-CmwaW0q4.js.map +0 -1
- package/dist/components/p-D1i2OAGe.js.map +0 -1
- package/dist/components/p-DOZbXX2L.js.map +0 -1
- package/dist/components/p-DWG6az-u.js.map +0 -1
- package/dist/components/p-DaiLIZ8f.js.map +0 -1
- package/dist/components/p-Dc_0pr83.js.map +0 -1
- package/dist/components/p-Dk8ekxr_.js.map +0 -1
- package/dist/esm/grow.animation-CvHGHBL4.js.map +0 -1
- package/dist/native/p-02df60a5.entry.js +0 -2
- package/dist/native/p-02df60a5.entry.js.map +0 -1
- package/dist/native/p-0b8d6777.entry.js +0 -13
- package/dist/native/p-0b8d6777.entry.js.map +0 -1
- package/dist/native/p-0e7e693f.entry.js +0 -2
- package/dist/native/p-0e7e693f.entry.js.map +0 -1
- package/dist/native/p-0fe60a9d.entry.js +0 -2
- package/dist/native/p-0fe60a9d.entry.js.map +0 -1
- package/dist/native/p-14b0bf14.entry.js +0 -2
- package/dist/native/p-14b0bf14.entry.js.map +0 -1
- package/dist/native/p-28afb852.entry.js.map +0 -1
- package/dist/native/p-2cf77850.entry.js +0 -2
- package/dist/native/p-2cf77850.entry.js.map +0 -1
- package/dist/native/p-31a12d8a.entry.js +0 -2
- package/dist/native/p-31a12d8a.entry.js.map +0 -1
- package/dist/native/p-37c6d559.entry.js.map +0 -1
- package/dist/native/p-3c54e422.entry.js.map +0 -1
- package/dist/native/p-3c9b22ff.entry.js +0 -2
- package/dist/native/p-3c9b22ff.entry.js.map +0 -1
- package/dist/native/p-4a71f223.entry.js +0 -2
- package/dist/native/p-4a71f223.entry.js.map +0 -1
- package/dist/native/p-527e9b56.entry.js.map +0 -1
- package/dist/native/p-5bce524d.entry.js +0 -2
- package/dist/native/p-5bce524d.entry.js.map +0 -1
- package/dist/native/p-63bc0a05.entry.js +0 -2
- package/dist/native/p-63bc0a05.entry.js.map +0 -1
- package/dist/native/p-63bf86de.entry.js +0 -2
- package/dist/native/p-6a3c1413.entry.js +0 -2
- package/dist/native/p-7e274db7.entry.js +0 -7
- package/dist/native/p-7e274db7.entry.js.map +0 -1
- package/dist/native/p-86b2b071.entry.js +0 -2
- package/dist/native/p-86b2b071.entry.js.map +0 -1
- package/dist/native/p-8b278fce.entry.js +0 -2
- package/dist/native/p-8b278fce.entry.js.map +0 -1
- package/dist/native/p-9c543ab2.entry.js +0 -2
- package/dist/native/p-9c543ab2.entry.js.map +0 -1
- package/dist/native/p-DOZbXX2L.js +0 -2
- package/dist/native/p-DS5GOtQ3.js +0 -2
- package/dist/native/p-DS5GOtQ3.js.map +0 -1
- package/dist/native/p-a2aa6872.entry.js +0 -2
- package/dist/native/p-b1ef2f25.entry.js.map +0 -1
- package/dist/native/p-b2ed6d34.entry.js +0 -2
- package/dist/native/p-b2ed6d34.entry.js.map +0 -1
- package/dist/native/p-bd6ae5f3.entry.js +0 -2
- package/dist/native/p-c98b9ce4.entry.js +0 -2
- package/dist/native/p-c98b9ce4.entry.js.map +0 -1
- package/dist/native/p-cc305619.entry.js +0 -2
- package/dist/native/p-cc305619.entry.js.map +0 -1
- package/dist/native/p-d1cfdc3e.entry.js +0 -2
- package/dist/native/p-d1cfdc3e.entry.js.map +0 -1
- package/dist/native/p-d3b1bd81.entry.js +0 -2
- package/dist/native/p-d424b9aa.entry.js +0 -2
- package/dist/native/p-d424b9aa.entry.js.map +0 -1
- package/dist/native/p-d4f95c86.entry.js.map +0 -1
- package/dist/native/p-da893df2.entry.js.map +0 -1
- package/dist/native/p-e0adb05d.entry.js.map +0 -1
- package/dist/native/p-e6a37207.entry.js +0 -2
- package/dist/native/p-e6a37207.entry.js.map +0 -1
- package/dist/native/p-ee04ea09.entry.js.map +0 -1
- package/dist/native/p-f73e9752.entry.js.map +0 -1
- /package/dist/native/{p-b21e38a3.entry.js.map → p-04a2fe7f.entry.js.map} +0 -0
- /package/dist/native/{p-ea98ba7a.entry.js.map → p-436029a5.entry.js.map} +0 -0
- /package/dist/native/{p-5acf105e.entry.js.map → p-67181258.entry.js.map} +0 -0
- /package/dist/native/{p-63bf86de.entry.js.map → p-6aa483de.entry.js.map} +0 -0
- /package/dist/native/{p-b1a917c7.entry.js.map → p-6fc79712.entry.js.map} +0 -0
- /package/dist/native/{p-d3b1bd81.entry.js.map → p-78bf7650.entry.js.map} +0 -0
- /package/dist/native/{p-a2aa6872.entry.js.map → p-7e6e9ea2.entry.js.map} +0 -0
- /package/dist/native/{p-4cf47e1a.entry.js.map → p-910cd685.entry.js.map} +0 -0
- /package/dist/native/{p-9d8257dc.entry.js.map → p-96c45604.entry.js.map} +0 -0
- /package/dist/native/{p-fd872d54.entry.js.map → p-9f32c3ea.entry.js.map} +0 -0
- /package/dist/native/{p-b0935c49.entry.js.map → p-a6fea322.entry.js.map} +0 -0
- /package/dist/native/{p-0493fb6d.entry.js.map → p-c2a73a5a.entry.js.map} +0 -0
- /package/dist/native/{p-6a3c1413.entry.js.map → p-c4c11549.entry.js.map} +0 -0
- /package/dist/native/{p-e7dc36d9.entry.js.map → p-ceb8fe8a.entry.js.map} +0 -0
|
@@ -11,7 +11,7 @@ const NvRow = class {
|
|
|
11
11
|
/****************************************************************************/
|
|
12
12
|
//#region RENDER
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: 'fda91377821b426a6cbc6ade6f253144a388fb62' }, index.h("slot", { key: '5d7cc9aa4d4ad0b251aa5c028adfddade4e4d1c4' })));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
NvRow.style = nvRowCss;
|
|
@@ -52,7 +52,7 @@ const NvSidebar = class {
|
|
|
52
52
|
const activeSubitemHrefs = new Set();
|
|
53
53
|
this.el.querySelectorAll('nv-sidebarnavsubitem').forEach(subItem => {
|
|
54
54
|
const link = subItem.querySelector('a');
|
|
55
|
-
const href = link
|
|
55
|
+
const href = link?.getAttribute('href');
|
|
56
56
|
if (href) {
|
|
57
57
|
const isActive = this.activePath === href;
|
|
58
58
|
subItem.active = isActive;
|
|
@@ -66,7 +66,7 @@ const NvSidebar = class {
|
|
|
66
66
|
// 2. OR the navitem has no subitems and activePath starts with its href
|
|
67
67
|
this.el.querySelectorAll('nv-sidebarnavitem').forEach(navItem => {
|
|
68
68
|
const link = navItem.querySelector(':scope > a, :scope > .nv-sidebarnavitem-trigger a, .nv-sidebarnavitem-content > a');
|
|
69
|
-
const href = link
|
|
69
|
+
const href = link?.getAttribute('href');
|
|
70
70
|
const hasSubitems = navItem.querySelector('nv-sidebarnavsubitem') !== null;
|
|
71
71
|
if (href) {
|
|
72
72
|
if (hasSubitems) {
|
|
@@ -159,7 +159,7 @@ const NvSidebar = class {
|
|
|
159
159
|
//#region RENDER
|
|
160
160
|
render() {
|
|
161
161
|
const isCollapsed = this.type === 'collapsible' && !this.open;
|
|
162
|
-
return (index.h(index.Host, { key: '
|
|
162
|
+
return (index.h(index.Host, { key: 'ac14d7b4027c06d1aa19b1b6c7de3f0d2e231b1a', role: "navigation", collapsed: isCollapsed ? true : undefined, "notification-intention": this.notificationIntention, "notification-emphasis": this.notificationEmphasis, "aria-expanded": this.type === 'collapsible' ? String(this.open) : undefined }, index.h("div", { key: 'e567303c87a2308747290fae95d7ade9971cd67a', class: "nv-sidebar-container" }, index.h("slot", { key: '0b2e0e1b1721aae3c0f910500bde3c2db92f879b' })), this.type === 'collapsible' && (index.h("button", { key: '493204449f3bb9aedd5a34cb238242aadd61324b', class: "nv-sidebar-toggle", onClick: this.handleToggle, "aria-label": this.open ? 'Collapse sidebar' : 'Expand sidebar' }, index.h("nv-icon", { key: '0e389c1c6c92f02f7c1e39fc07ef17a469b1e0f2', name: this.open
|
|
163
163
|
? 'layout-sidebar-left-collapse'
|
|
164
164
|
: 'layout-sidebar-right-collapse', size: "sm" })))));
|
|
165
165
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-sidebar.entry.cjs.js","sources":["src/components/nv-sidebar/styles/nv-sidebar.scss?tag=nv-sidebar","src/components/nv-sidebar/nv-sidebar.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n@use \"./global-overrides\";\n\nnv-sidebar {\n @include sidebar-container();\n @include sidebar-width(\"expanded\");\n\n &[collapsed] {\n @include sidebar-width(\"collapsed\");\n\n [data-hide-on-collapsed] {\n display: none !important;\n }\n\n // Collapsed mode: different padding\n .nv-sidebar-container {\n padding: var(--sidebar-padding-y) var(--sidebar-padding-x-collapsed);\n }\n }\n\n .nv-sidebar-container {\n @include sidebar-inner-container();\n }\n\n .nv-sidebar-toggle {\n @include sidebar-toggle-button();\n }\n}\n","import {\n Component,\n Host,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n h,\n} from '@stencil/core';\n\n/**\n * Main sidebar container for navigation. Supports collapsible and persistent modes.\n * @slot default - All sidebar components (logo, header, content, footer).\n */\n@Component({\n tag: 'nv-sidebar',\n styleUrl: 'styles/nv-sidebar.scss',\n shadow: false,\n})\nexport class NvSidebar {\n @Element() el!: HTMLNvSidebarElement;\n private mutationObserver: MutationObserver;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The type of sidebar behavior.\n * - collapsible: Can be toggled open/closed\n * - persistent: Always visible\n */\n @Prop({ reflect: true })\n readonly type: 'collapsible' | 'persistent' = 'persistent';\n\n /**\n * Whether the sidebar is currently open (only applies to collapsible type).\n */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop({ reflect: true, mutable: true })\n open: boolean = true;\n\n /**\n * The current active path. Used to automatically set the active state of nav items.\n * Example: \"/dashboard\" or \"/settings/profile\"\n */\n @Prop({ reflect: true })\n readonly activePath?: string;\n\n /**\n * Determines the type of notification bullets in the sidebar.\n * - neutral: Uses neutral colors (gray)\n * - brand: Uses brand colors (orange/teal depending on theme)\n */\n @Prop({ reflect: true })\n readonly notificationIntention: 'neutral' | 'brand' = 'brand';\n\n /**\n * Determines the emphasis of notification bullets in the sidebar.\n * - high: More prominent appearance\n * - low: Less prominent appearance\n */\n @Prop({ reflect: true })\n readonly notificationEmphasis: 'high' | 'low' = 'high';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the open state changes.\n * @bind open\n */\n @Event({ bubbles: false })\n openChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleToggle = () => {\n if (this.type === 'collapsible') {\n // Changing open will trigger @Watch which emits the event\n this.open = !this.open;\n }\n };\n\n private handleCollapsedSideEffects(isCollapsed: boolean) {\n if (!isCollapsed) {\n return;\n }\n\n this.el.querySelectorAll('nv-sidebarnavitem[open]').forEach(navItem => {\n (navItem as HTMLNvSidebarnavitemElement).open = false;\n });\n }\n\n /**\n * Sets the active state of navigation items based on activePath\n */\n private setActiveNavItems = () => {\n if (!this.activePath) return;\n\n // First, check all subitems to find if any matches exactly\n const activeSubitemHrefs = new Set<string>();\n this.el.querySelectorAll('nv-sidebarnavsubitem').forEach(subItem => {\n const link = subItem.querySelector('a');\n const href = link?.getAttribute('href');\n\n if (href) {\n const isActive = this.activePath === href;\n subItem.active = isActive;\n if (isActive) {\n activeSubitemHrefs.add(href);\n }\n }\n });\n\n // Then, set nav items active only if:\n // 1. Exact match with activePath AND no subitem matches\n // 2. OR the navitem has no subitems and activePath starts with its href\n this.el.querySelectorAll('nv-sidebarnavitem').forEach(navItem => {\n const link = navItem.querySelector(\n ':scope > a, :scope > .nv-sidebarnavitem-trigger a, .nv-sidebarnavitem-content > a',\n );\n const href = link?.getAttribute('href');\n const hasSubitems =\n navItem.querySelector('nv-sidebarnavsubitem') !== null;\n\n if (href) {\n if (hasSubitems) {\n // Parent with subitems: only active if exact match (not when subitem is active)\n navItem.active = this.activePath === href;\n } else {\n // Item without subitems: active on exact match\n navItem.active = this.activePath === href;\n }\n }\n });\n };\n\n private pendingActiveUpdate: number | null = null;\n\n /**\n * Sets up the MutationObserver to watch for changes in child elements.\n * Only triggers on new nav items being added, not on attribute changes.\n */\n private setupMutationObserver = (): void => {\n this.mutationObserver = new MutationObserver(mutations => {\n // Only react to new nav items being added, ignore other mutations\n const hasNewNavItems = mutations.some(mutation => {\n if (mutation.type !== 'childList') return false;\n return Array.from(mutation.addedNodes).some(node => {\n if (node.nodeType !== Node.ELEMENT_NODE) return false;\n const el = node as Element;\n return (\n el.tagName.toLowerCase() === 'nv-sidebarnavitem' ||\n el.tagName.toLowerCase() === 'nv-sidebarnavsubitem' ||\n el.querySelector('nv-sidebarnavitem, nv-sidebarnavsubitem')\n );\n });\n });\n\n if (hasNewNavItems) {\n // Debounce to prevent multiple rapid calls\n if (this.pendingActiveUpdate) {\n clearTimeout(this.pendingActiveUpdate);\n }\n this.pendingActiveUpdate = window.setTimeout(() => {\n this.setActiveNavItems();\n this.pendingActiveUpdate = null;\n }, 50);\n }\n });\n\n this.mutationObserver.observe(this.el, {\n childList: true,\n subtree: true,\n });\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('activePath')\n onActivePathChanged() {\n this.setActiveNavItems();\n }\n\n @Watch('open')\n protected onOpenChanged(newValue: boolean, oldValue: boolean) {\n this.handleCollapsedSideEffects(this.type === 'collapsible' && !newValue);\n // Only emit event when open state actually changes (not on re-render with same value)\n if (this.type === 'collapsible' && newValue !== oldValue) {\n this.openChanged.emit(newValue);\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.setActiveNavItems();\n this.setupMutationObserver();\n this.handleCollapsedSideEffects(this.type === 'collapsible' && !this.open);\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n if (this.pendingActiveUpdate) {\n clearTimeout(this.pendingActiveUpdate);\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const isCollapsed = this.type === 'collapsible' && !this.open;\n\n return (\n <Host\n role=\"navigation\"\n collapsed={isCollapsed ? true : undefined}\n notification-intention={this.notificationIntention}\n notification-emphasis={this.notificationEmphasis}\n aria-expanded={\n this.type === 'collapsible' ? String(this.open) : undefined\n }\n >\n <div class=\"nv-sidebar-container\">\n <slot></slot>\n </div>\n {this.type === 'collapsible' && (\n <button\n class=\"nv-sidebar-toggle\"\n onClick={this.handleToggle}\n aria-label={this.open ? 'Collapse sidebar' : 'Expand sidebar'}\n >\n <nv-icon\n name={\n this.open\n ? 'layout-sidebar-left-collapse'\n : 'layout-sidebar-right-collapse'\n }\n size=\"sm\"\n ></nv-icon>\n </button>\n )}\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,YAAY,GAAG,4pEAA4pE;;MCoBpqE,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAYE;;;;AAIG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAiC,YAAY;AAE1D;;AAEG;;AAGH,QAAA,IAAI,CAAA,IAAA,GAAY,IAAI;AAS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AAC,mBAAmB,EAAE;AAC5B,YAAA,YAAY,CAAC,IAAI,CAAC,mBAAmB,CAAC;;;;;;IAQ1C,MAAM,GAAA;AACJ,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,KAAK,aAAa,IAAI,CAAC,IAAI,CAAC,IAAI;AAE7D,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EACH,IAAI,EAAC,YAAY,EACjB,SAAS,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,4BACjB,IAAI,CAAC,qBAAqB,EAC3B,uBAAA,EAAA,IAAI,CAAC,oBAAoB,EAAA,eAAA,EAE9C,IAAI,CAAC,IAAI,KAAK,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,EAAA,EAG7DD,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,sBAAsB,EAAA,EAC/BA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,EACL,IAAI,CAAC,IAAI,KAAK,aAAa,KAC1BA,OAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAA,YAAA,EACd,IAAI,CAAC,IAAI,GAAG,kBAAkB,GAAG,gBAAgB,EAAA,EAE7DA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EACF,IAAI,CAAC;AACH,kBAAE;AACF,kBAAE,+BAA+B,EAErC,IAAI,EAAC,IAAI,EAAA,CACA,CACJ,CACV,CACI;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"nv-sidebar.entry.cjs.js","sources":["src/components/nv-sidebar/styles/nv-sidebar.scss?tag=nv-sidebar","src/components/nv-sidebar/nv-sidebar.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n@use \"./global-overrides\";\n\nnv-sidebar {\n @include sidebar-container();\n @include sidebar-width(\"expanded\");\n\n &[collapsed] {\n @include sidebar-width(\"collapsed\");\n\n [data-hide-on-collapsed] {\n display: none !important;\n }\n\n // Collapsed mode: different padding\n .nv-sidebar-container {\n padding: var(--sidebar-padding-y) var(--sidebar-padding-x-collapsed);\n }\n }\n\n .nv-sidebar-container {\n @include sidebar-inner-container();\n }\n\n .nv-sidebar-toggle {\n @include sidebar-toggle-button();\n }\n}\n","import {\n Component,\n Host,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n h,\n} from '@stencil/core';\n\n/**\n * Main sidebar container for navigation. Supports collapsible and persistent modes.\n * @slot default - All sidebar components (logo, header, content, footer).\n */\n@Component({\n tag: 'nv-sidebar',\n styleUrl: 'styles/nv-sidebar.scss',\n shadow: false,\n})\nexport class NvSidebar {\n @Element() el!: HTMLNvSidebarElement;\n private mutationObserver: MutationObserver;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The type of sidebar behavior.\n * - collapsible: Can be toggled open/closed\n * - persistent: Always visible\n */\n @Prop({ reflect: true })\n readonly type: 'collapsible' | 'persistent' = 'persistent';\n\n /**\n * Whether the sidebar is currently open (only applies to collapsible type).\n */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop({ reflect: true, mutable: true })\n open: boolean = true;\n\n /**\n * The current active path. Used to automatically set the active state of nav items.\n * Example: \"/dashboard\" or \"/settings/profile\"\n */\n @Prop({ reflect: true })\n readonly activePath?: string;\n\n /**\n * Determines the type of notification bullets in the sidebar.\n * - neutral: Uses neutral colors (gray)\n * - brand: Uses brand colors (orange/teal depending on theme)\n */\n @Prop({ reflect: true })\n readonly notificationIntention: 'neutral' | 'brand' = 'brand';\n\n /**\n * Determines the emphasis of notification bullets in the sidebar.\n * - high: More prominent appearance\n * - low: Less prominent appearance\n */\n @Prop({ reflect: true })\n readonly notificationEmphasis: 'high' | 'low' = 'high';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the open state changes.\n * @bind open\n */\n @Event({ bubbles: false })\n openChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleToggle = () => {\n if (this.type === 'collapsible') {\n // Changing open will trigger @Watch which emits the event\n this.open = !this.open;\n }\n };\n\n private handleCollapsedSideEffects(isCollapsed: boolean) {\n if (!isCollapsed) {\n return;\n }\n\n this.el.querySelectorAll('nv-sidebarnavitem[open]').forEach(navItem => {\n (navItem as HTMLNvSidebarnavitemElement).open = false;\n });\n }\n\n /**\n * Sets the active state of navigation items based on activePath\n */\n private setActiveNavItems = () => {\n if (!this.activePath) return;\n\n // First, check all subitems to find if any matches exactly\n const activeSubitemHrefs = new Set<string>();\n this.el.querySelectorAll('nv-sidebarnavsubitem').forEach(subItem => {\n const link = subItem.querySelector('a');\n const href = link?.getAttribute('href');\n\n if (href) {\n const isActive = this.activePath === href;\n subItem.active = isActive;\n if (isActive) {\n activeSubitemHrefs.add(href);\n }\n }\n });\n\n // Then, set nav items active only if:\n // 1. Exact match with activePath AND no subitem matches\n // 2. OR the navitem has no subitems and activePath starts with its href\n this.el.querySelectorAll('nv-sidebarnavitem').forEach(navItem => {\n const link = navItem.querySelector(\n ':scope > a, :scope > .nv-sidebarnavitem-trigger a, .nv-sidebarnavitem-content > a',\n );\n const href = link?.getAttribute('href');\n const hasSubitems =\n navItem.querySelector('nv-sidebarnavsubitem') !== null;\n\n if (href) {\n if (hasSubitems) {\n // Parent with subitems: only active if exact match (not when subitem is active)\n navItem.active = this.activePath === href;\n } else {\n // Item without subitems: active on exact match\n navItem.active = this.activePath === href;\n }\n }\n });\n };\n\n private pendingActiveUpdate: number | null = null;\n\n /**\n * Sets up the MutationObserver to watch for changes in child elements.\n * Only triggers on new nav items being added, not on attribute changes.\n */\n private setupMutationObserver = (): void => {\n this.mutationObserver = new MutationObserver(mutations => {\n // Only react to new nav items being added, ignore other mutations\n const hasNewNavItems = mutations.some(mutation => {\n if (mutation.type !== 'childList') return false;\n return Array.from(mutation.addedNodes).some(node => {\n if (node.nodeType !== Node.ELEMENT_NODE) return false;\n const el = node as Element;\n return (\n el.tagName.toLowerCase() === 'nv-sidebarnavitem' ||\n el.tagName.toLowerCase() === 'nv-sidebarnavsubitem' ||\n el.querySelector('nv-sidebarnavitem, nv-sidebarnavsubitem')\n );\n });\n });\n\n if (hasNewNavItems) {\n // Debounce to prevent multiple rapid calls\n if (this.pendingActiveUpdate) {\n clearTimeout(this.pendingActiveUpdate);\n }\n this.pendingActiveUpdate = window.setTimeout(() => {\n this.setActiveNavItems();\n this.pendingActiveUpdate = null;\n }, 50);\n }\n });\n\n this.mutationObserver.observe(this.el, {\n childList: true,\n subtree: true,\n });\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('activePath')\n onActivePathChanged() {\n this.setActiveNavItems();\n }\n\n @Watch('open')\n protected onOpenChanged(newValue: boolean, oldValue: boolean) {\n this.handleCollapsedSideEffects(this.type === 'collapsible' && !newValue);\n // Only emit event when open state actually changes (not on re-render with same value)\n if (this.type === 'collapsible' && newValue !== oldValue) {\n this.openChanged.emit(newValue);\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.setActiveNavItems();\n this.setupMutationObserver();\n this.handleCollapsedSideEffects(this.type === 'collapsible' && !this.open);\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n if (this.pendingActiveUpdate) {\n clearTimeout(this.pendingActiveUpdate);\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const isCollapsed = this.type === 'collapsible' && !this.open;\n\n return (\n <Host\n role=\"navigation\"\n collapsed={isCollapsed ? true : undefined}\n notification-intention={this.notificationIntention}\n notification-emphasis={this.notificationEmphasis}\n aria-expanded={\n this.type === 'collapsible' ? String(this.open) : undefined\n }\n >\n <div class=\"nv-sidebar-container\">\n <slot></slot>\n </div>\n {this.type === 'collapsible' && (\n <button\n class=\"nv-sidebar-toggle\"\n onClick={this.handleToggle}\n aria-label={this.open ? 'Collapse sidebar' : 'Expand sidebar'}\n >\n <nv-icon\n name={\n this.open\n ? 'layout-sidebar-left-collapse'\n : 'layout-sidebar-right-collapse'\n }\n size=\"sm\"\n ></nv-icon>\n </button>\n )}\n </Host>\n );\n }\n //#endregion RENDER\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,YAAY,GAAG,4pEAA4pE;;MCoBpqE,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAYE;;;;AAIG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAiC,YAAY;AAE1D;;AAEG;;AAGH,QAAA,IAAI,CAAA,IAAA,GAAY,IAAI;AASpB;;;;AAIG;AAEM,QAAA,IAAqB,CAAA,qBAAA,GAAwB,OAAO;AAE7D;;;;AAIG;AAEM,QAAA,IAAoB,CAAA,oBAAA,GAAmB,MAAM;;;;AAiB9C,QAAA,IAAY,CAAA,YAAA,GAAG,MAAK;AAC1B,YAAA,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;;AAE/B,gBAAA,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI;;AAE1B,SAAC;AAYD;;AAEG;AACK,QAAA,IAAiB,CAAA,iBAAA,GAAG,MAAK;YAC/B,IAAI,CAAC,IAAI,CAAC,UAAU;gBAAE;;AAGtB,YAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU;AAC5C,YAAA,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,OAAO,IAAG;gBACjE,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC;gBACvC,MAAM,IAAI,GAAG,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC;gBAEvC,IAAI,IAAI,EAAE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AA,EACd,IAAI,CAAC,IAAI,GAAG,kBAAkB,GAAG,gBAAgB,EAAA,EAE7DA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EACF,IAAI,CAAC;AACH,kBAAE;AACF,kBAAE,+BAA+B,EAErC,IAAI,EAAC,IAAI,EAAA,CACA,CACJ,CACV,CACI;;;;;;;;;;;;"}
|
|
@@ -11,7 +11,7 @@ const NvSidebarcontent = class {
|
|
|
11
11
|
/****************************************************************************/
|
|
12
12
|
//#region RENDER
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: 'c72a3de4460c4de37c2008ec4d777771d8771d32', role: "list" }, index.h("slot", { key: '8d08c073aebf079dbb9062bb183370e4dc4d9fe8' })));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
NvSidebarcontent.style = nvSidebarcontentCss;
|
|
@@ -11,7 +11,7 @@ const NvSidebardivider = class {
|
|
|
11
11
|
/****************************************************************************/
|
|
12
12
|
//#region RENDER
|
|
13
13
|
render() {
|
|
14
|
-
return index.h(index.Host, { key: '
|
|
14
|
+
return index.h(index.Host, { key: '157045ee7209aa55574c54c2392f1e53d6cdba1e', role: "separator", "aria-orientation": "horizontal" });
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
NvSidebardivider.style = nvSidebardividerCss;
|
|
@@ -11,7 +11,7 @@ const NvSidebarfooter = class {
|
|
|
11
11
|
/****************************************************************************/
|
|
12
12
|
//#region RENDER
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: 'be19b80fc56a296999532d986d477dcbd817a9f2' }, index.h("slot", { key: '55b3e91dab40b923d67eb140be42fd2483951254' })));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
NvSidebarfooter.style = nvSidebarfooterCss;
|
|
@@ -12,7 +12,7 @@ const NvSidebargroup = class {
|
|
|
12
12
|
/****************************************************************************/
|
|
13
13
|
//#region RENDER
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: '64b17f621fef826a4105dfa39fbc57013bad0abc', role: "group", "aria-label": this.label }, this.label && index.h("div", { key: '48e36725296ecc87da7d15606977fbe616dd4aa3', class: "nv-sidebargroup-label" }, this.label), index.h("slot", { key: '61aaf8541e9372220df24dcf9cf0b5b43e22e19b' })));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
NvSidebargroup.style = nvSidebargroupCss;
|
|
@@ -11,7 +11,7 @@ const NvSidebarheader = class {
|
|
|
11
11
|
/****************************************************************************/
|
|
12
12
|
//#region RENDER
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: '2c9c0c109138ed3a23cb8f1a2fb78f29f93a4056' }, index.h("slot", { key: 'a928008023c6ce8a77aafbe0042ec8ed72e9c32d' })));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
NvSidebarheader.style = nvSidebarheaderCss;
|
|
@@ -21,7 +21,7 @@ const NvSidebarlogo = class {
|
|
|
21
21
|
render() {
|
|
22
22
|
const logoSrc = this.logo || this.defaultLogo;
|
|
23
23
|
const collapsedLogoSrc = this.collapsedLogo || this.defaultCollapsedLogo;
|
|
24
|
-
return (index.h(index.Host, { key: '
|
|
24
|
+
return (index.h(index.Host, { key: '0d14763dcb7b1b961f2b32a7be44d8a8116087bb' }, index.h("div", { key: '78c2a6578cc48298aa88baf946954d79d36894db', class: "nv-sidebarlogo-container" }, index.h("img", { key: 'd4dd86b4d4a00bedfab84fd987d46e5e83fcb5a6', src: logoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-full" }), index.h("img", { key: 'c0382d6fb18fbc17a21bb411fde64dcd255f42a5', src: collapsedLogoSrc, alt: this.label || 'Logo', class: "nv-sidebarlogo-collapsed" }), this.label && index.h("span", { key: 'f75152415bb2569698a5cae856c6b26a202f8c7d', class: "nv-sidebarlogo-title" }, this.label))));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
NvSidebarlogo.style = nvSidebarlogoCss;
|
|
@@ -39,7 +39,7 @@ const NvSidebarnavitem = class {
|
|
|
39
39
|
if (this.isSidebarCollapsed) {
|
|
40
40
|
// Find the first link that is NOT inside subitems
|
|
41
41
|
const link = this.el.querySelector('.nv-sidebarnavitem-content a, :scope > a');
|
|
42
|
-
if (link
|
|
42
|
+
if (link?.href) {
|
|
43
43
|
// Check if click was directly on the link - if so, let it handle naturally
|
|
44
44
|
if (target.closest('a')) {
|
|
45
45
|
return;
|
|
@@ -116,10 +116,9 @@ const NvSidebarnavitem = class {
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
this.checkSidebarCollapsed = () => {
|
|
119
|
-
var _a;
|
|
120
119
|
const sidebar = this.el.closest('nv-sidebar');
|
|
121
120
|
const wasCollapsed = this.isSidebarCollapsed;
|
|
122
|
-
this.isSidebarCollapsed =
|
|
121
|
+
this.isSidebarCollapsed = sidebar?.hasAttribute('collapsed') ?? false;
|
|
123
122
|
// When sidebar collapse state changes, update active state based on subitems
|
|
124
123
|
if (wasCollapsed !== this.isSidebarCollapsed) {
|
|
125
124
|
this.updateActiveFromSubitems();
|
|
@@ -267,7 +266,7 @@ const NvSidebarnavitem = class {
|
|
|
267
266
|
render() {
|
|
268
267
|
const showNotificationBullet = this.notificationCount !== undefined && this.notificationCount > 0;
|
|
269
268
|
const notificationSize = this.isSidebarCollapsed ? 'reduced' : 'default';
|
|
270
|
-
return (index.h(index.Host, { key: '
|
|
269
|
+
return (index.h(index.Host, { key: '7a3523c68080b90ef262a2fa3fa63f1f34baaaf1', role: "listitem" }, index.h("div", { key: '21abd8cf4e5d4a368b25db79306cb0ac747edfce', 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: '8255f2f75b751e5005b4bbb7178e553123c7c109', class: "nv-sidebarnavitem-icon" }, index.h("nv-icon", { key: '5396567c08fc46084f085b544aeee3f874b7b439', name: this.icon, size: "md" }), showNotificationBullet && this.isSidebarCollapsed && (index.h("nv-notification-bullet", { key: '63dfbd2a986124a9c1ba1741e4d1079ec2b38a18', count: this.notificationCount, size: notificationSize, contrastingBorder: true })))), index.h("div", { key: 'a4d8df28b532018d6961d6d779d77ba88bbea756', class: "nv-sidebarnavitem-content" }, index.h("slot", { key: '7394c3534de567f9230ff872b57b4211939bc142' })), index.h("div", { key: 'c8f8451e9ebc42e6ee16407a5ba9c6f6c32f4a66', class: "nv-sidebarnavitem-trailing" }, index.h("slot", { key: '2e901538498c62fe5a5bc21c76c66b493c215e32', name: "trailing" }), showNotificationBullet && !this.isSidebarCollapsed && (index.h("nv-notification-bullet", { key: '9a7c172f0b7dbf78068135344e469d261b80d368', count: this.notificationCount, size: notificationSize })), this.collapsible && (index.h("nv-icon", { key: 'f1caa3750edb35376d8b45121ffb443b033735d4', name: "chevron-down", size: "sm", class: "nv-sidebarnavitem-chevron" })))), this.collapsible && this.hasSubitems && (index.h("div", { key: '4b141fd9639afd78351b01df146866d4d091381f', class: "nv-sidebarnavitem-subitems", ref: el => {
|
|
271
270
|
// Only update ref and initialize if element changed or not yet initialized
|
|
272
271
|
if (el !== this.subitemsRef) {
|
|
273
272
|
this.subitemsRef = el;
|
|
@@ -282,7 +281,7 @@ const NvSidebarnavitem = class {
|
|
|
282
281
|
});
|
|
283
282
|
}
|
|
284
283
|
}
|
|
285
|
-
} }, index.h("slot", { key: '
|
|
284
|
+
} }, index.h("slot", { key: '6a38e07d0559b6eaf2fafb4c9928047a9cfd19b4', name: "subitems" })))));
|
|
286
285
|
}
|
|
287
286
|
get el() { return index.getElement(this); }
|
|
288
287
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-sidebarnavitem.entry.cjs.js","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 // 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 // Decrease size proportionally to icon (about 40% of icon size for better visibility)\n --sidebar-notification-bullet-size-reduced: calc(\n var(--sidebar-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 padding: var(--sidebar-item-padding-y-collapsed) var(--sidebar-item-padding-x-collapsed);\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"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,mBAAmB,GAAG,0/GAA0/G;;MCczgH,gBAAgB,GAAA,MAAA;AAL7B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAeE;;;AAGG;AAEH,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAEvB;;AAEG;AAEM,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAErC;;AAEG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAY,KAAK;;;;AAYb,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAG5B,QAAA,IAAkB,CAAA,kBAAA,GAAY,KAAK;AAInC,QAAA,IAAA,CAAA,oBAAoB,GAAY,KAAK,CAAC;;;;AAItC,QAAA,IAAA,CAAA,YAAY,GAAG,CAAC,KAAiB,KAAI;;AAE3C,YAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB;AAC1C,YAAA,IAAI,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;AAC1C,gBAAA,OAAO;;;AAIT,YAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;;gBAE3B,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAChC,0CAA0C,CACtB;gBACtB,IAAI,IAAI,aAAJ,IAAI,KAAA,MAAA,GAAA,MAAA,GAAJ,IAAI,CAAE,IAAI,EAAE;;AAEd,oBAAA,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;wBACvB;;;oBAGF,IAAI,CAAC,KAAK,EAAE;;gBAEd;;;AAIF,YAAA,IAAI,IAAI,CAAC,WAAW,EAAE;gBAC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AAA,0CAAA,EAAA,KAAK,EAAC,4BAA4B,EAClC,GAAG,EAAE,EAAE,IAAG;;AAER,gBAAA,IAAI,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE;AAC3B,oBAAA,IAAI,CAAC,WAAW,GAAG,EAAE;AACrB,oBAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;;AAEpC,wBAAA,IAAI,CAAC,oBAAoB,GAAG,IAAI;wBAChC,qBAAqB,CAAC,MAAK;;AAEzB,4BAAA,IAAI,IAAI,CAAC,IAAI,EAAE;gCACb,IAAI,CAAC,oBAAoB,EAAE;;AAE/B,yBAAC,CAAC;;;aAGP,EAAA,EAEDA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,UAAU,EAAA,CAAQ,CACzB,CACP,CACI;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"nv-sidebarnavitem.entry.cjs.js","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 // 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 // Decrease size proportionally to icon (about 40% of icon size for better visibility)\n --sidebar-notification-bullet-size-reduced: calc(\n var(--sidebar-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 padding: var(--sidebar-item-padding-y-collapsed) var(--sidebar-item-padding-x-collapsed);\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"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,mBAAmB,GAAG,0/GAA0/G;;MCczgH,gBAAgB,GAAA,MAAA;AAL7B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAeE;;;AAGG;AAEH,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAEvB;;AAEG;AAEM,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAErC;;AAEG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAY,KAAK;;;;AAYb,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAG5B,QAAA,IAAkB,CAAA,kBAAA,GAAY,KAAK;AAInC,QAAA,IAAA,CAAA,oBAAoB,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C,IAAI,CAAC,kBAAkB,KACjDA,OACE,CAAA,wBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAC7B,IAAI,EAAE,gBAAgB,GACE,CAC3B,EACA,IAAI,CAAC,WAAW,KACfA,OACE,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,cAAc,EACnB,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,2BAA2B,EACxB,CAAA,CACZ,CACG,CACF,EACL,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,KACnCA,OACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,4BAA4B,EAClC,GAAG,EAAE,EAAE,IAAG;;AAER,gBAAA,IAAI,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE;AAC3B,oBAAA,IAAI,CAAC,WAAW,GAAG,EAAE;AACrB,oBAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;;AAEpC,wBAAA,IAAI,CAAC,oBAAoB,GAAG,IAAI;wBAChC,qBAAqB,CAAC,MAAK;;AAEzB,4BAAA,IAAI,IAAI,CAAC,IAAI,EAAE;gCACb,IAAI,CAAC,oBAAoB,EAAE;;AAE/B,yBAAC,CAAC;;;aAGP,EAAA,EAEDA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,UAAU,EAAA,CAAQ,CACzB,CACP,CACI;;;;;;;;;;;"}
|
|
@@ -24,7 +24,7 @@ const NvSidebarnavsubitem = class {
|
|
|
24
24
|
/****************************************************************************/
|
|
25
25
|
//#region RENDER
|
|
26
26
|
render() {
|
|
27
|
-
return (index.h(index.Host, { key: '
|
|
27
|
+
return (index.h(index.Host, { key: '7e9b3aaf42bc7ca19cc3ceeed4afc74058ea48f2', role: "listitem", "aria-current": this.active ? 'page' : undefined }, index.h("div", { key: 'd865d9cff0e9632dd0ca5f97334e09ae3ad6ddf8', class: "nv-sidebarnavsubitem-indicator" }), index.h("div", { key: '28bddb32eea17dbc3b33f2e1c3ef6744e6646cbe', class: "nv-sidebarnavsubitem-content" }, index.h("slot", { key: '0f58fbe30b054e42ac3f431cb8cafe0374994856' })), index.h("div", { key: '3b1b74c67b1e338e158a67dab828941f40f3a147', class: "nv-sidebarnavsubitem-trailing" }, index.h("slot", { key: '98ad3fde4a5295f6835ba6b15ac832fc0426b75b', name: "trailing" }))));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
NvSidebarnavsubitem.style = nvSidebarnavsubitemCss;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-B1na8x6M.js');
|
|
4
4
|
|
|
5
|
-
const nvSplitCss = "nv-split{display:flex;width:100%;height:100%;position:relative}nv-split[direction=horizontal]{flex-direction:row}nv-split[direction=vertical]{flex-direction:column}nv-split .nv-split-gutter{position:absolute;z-index:10;background:transparent;display:flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background-color 0.2s ease}nv-split .nv-split-gutter::after{content:\"\";position:absolute;background:var(--components-splitter-line-background);transition:background-color 0.2s ease}nv-split .nv-split-gutter:hover::after{background:var(--components-splitter-line-background-hover)}nv-split .nv-split-gutter::before{content:\"\";background:var(--components-splitter-handle-background);position:absolute;background-repeat:no-repeat;background-position:center;transition:all 0.2s ease;pointer-events:none}nv-split[direction=horizontal]>.nv-split-gutter{width:var(--splitter-gutter);top:0;bottom:0;transform:translateX(-50%);cursor:col-resize}nv-split[direction=horizontal]>.nv-split-gutter::after{width:var(--splitter-line-width);background-color:var(--components-splitter-line-background);height:100%;left:50%;top:0%;transform:translateX(-50%)}nv-split[direction=horizontal]>.nv-split-gutter:hover::after{background-color:var(--components-splitter-line-background-hover)}nv-split[direction=horizontal]>.nv-split-gutter:active::after{background-color:var(--components-splitter-line-background-active)}nv-split[direction=horizontal]>.nv-split-gutter::before{background-color:var(--components-splitter-handle-background);width:var(--splitter-handle-wide);height:var(--splitter-handle-long);border-radius:var(--splitter-handle-radius);z-index:11;transition:all 0.2s ease}nv-split[direction=horizontal]>.nv-split-gutter:hover::before{background-color:var(--components-splitter-handle-background-hover)}nv-split[direction=horizontal]>.nv-split-gutter:active::before{background-color:var(--components-splitter-handle-background-active)}nv-split[direction=vertical]>.nv-split-gutter{height:var(--splitter-gutter);left:0;right:0;transform:translateY(-50%);cursor:row-resize}nv-split[direction=vertical]>.nv-split-gutter::after{height:var(--splitter-line-width);background-color:var(--components-splitter-line-background);width:100%;top:50%;left:0%;transform:translateY(-50%)}nv-split[direction=vertical]>.nv-split-gutter:hover::after{background-color:var(--components-splitter-line-background-hover)}nv-split[direction=vertical]>.nv-split-gutter:active::after{background-color:var(--components-splitter-line-background-active)}nv-split[direction=vertical]>.nv-split-gutter::before{background-color:var(--components-splitter-handle-background);width:var(--splitter-handle-long);height:var(--splitter-handle-wide);border-radius:var(--splitter-handle-radius);z-index:11;transition:all 0.2s ease}nv-split[direction=vertical]>.nv-split-gutter:hover::before{background-color:var(--components-splitter-handle-background-hover)}nv-split[direction=vertical]>.nv-split-gutter:active::before{background-color:var(--components-splitter-handle-background-active)}nv-split[data-dragging=true]>.nv-split-gutter::after{background:var(--components-splitter-line-background-active)}nv-split>[slot=pane]{flex:1 1 auto;overflow:hidden;min-width:0;min-height:0;display:flex;flex-direction:column}nv-split>[slot=pane]>nv-split{flex:1 1 auto;width:100%;height:100%}";
|
|
5
|
+
const nvSplitCss = "nv-split{display:flex;width:100%;height:100%;position:relative}nv-split[direction=horizontal]{flex-direction:row}nv-split[direction=vertical]{flex-direction:column}nv-split .nv-split-gutter{position:absolute;z-index:10;background:transparent;display:flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background-color 0.2s ease}nv-split .nv-split-gutter::after{content:\"\";position:absolute;background:var(--components-splitter-line-background);transition:background-color 0.2s ease}nv-split .nv-split-gutter:hover::after{background:var(--components-splitter-line-background-hover)}nv-split .nv-split-gutter::before{content:\"\";background:var(--components-splitter-handle-background);position:absolute;background-repeat:no-repeat;background-position:center;transition:all 0.2s ease;pointer-events:none}nv-split[direction=horizontal]>.nv-split-gutter{width:var(--splitter-gutter);top:0;bottom:0;transform:translateX(-50%);cursor:col-resize}nv-split[direction=horizontal]>.nv-split-gutter::after{width:var(--splitter-line-width);background-color:var(--components-splitter-line-background);height:100%;left:50%;top:0%;transform:translateX(-50%)}nv-split[direction=horizontal]>.nv-split-gutter:hover::after{background-color:var(--components-splitter-line-background-hover)}nv-split[direction=horizontal]>.nv-split-gutter:active::after{background-color:var(--components-splitter-line-background-active)}nv-split[direction=horizontal]>.nv-split-gutter::before{background-color:var(--components-splitter-handle-background);width:var(--splitter-handle-wide);height:var(--splitter-handle-long);border-radius:var(--splitter-handle-radius);z-index:11;transition:all 0.2s ease}nv-split[direction=horizontal]>.nv-split-gutter:hover::before{background-color:var(--components-splitter-handle-background-hover)}nv-split[direction=horizontal]>.nv-split-gutter:active::before{background-color:var(--components-splitter-handle-background-active)}nv-split[direction=vertical]>.nv-split-gutter{height:var(--splitter-gutter);left:0;right:0;transform:translateY(-50%);cursor:row-resize}nv-split[direction=vertical]>.nv-split-gutter::after{height:var(--splitter-line-width);background-color:var(--components-splitter-line-background);width:100%;top:50%;left:0%;transform:translateY(-50%)}nv-split[direction=vertical]>.nv-split-gutter:hover::after{background-color:var(--components-splitter-line-background-hover)}nv-split[direction=vertical]>.nv-split-gutter:active::after{background-color:var(--components-splitter-line-background-active)}nv-split[direction=vertical]>.nv-split-gutter::before{background-color:var(--components-splitter-handle-background);width:var(--splitter-handle-long);height:var(--splitter-handle-wide);border-radius:var(--splitter-handle-radius);z-index:11;transition:all 0.2s ease}nv-split[direction=vertical]>.nv-split-gutter:hover::before{background-color:var(--components-splitter-handle-background-hover)}nv-split[direction=vertical]>.nv-split-gutter:active::before{background-color:var(--components-splitter-handle-background-active)}nv-split[data-dragging=true]>.nv-split-gutter::after{background:var(--components-splitter-line-background-active)}nv-split>[slot=pane]{box-sizing:border-box;flex:1 1 auto;overflow:hidden;min-width:0;min-height:0;display:flex;flex-direction:column;margin:0 !important}nv-split>[slot=pane]>nv-split{flex:1 1 auto;width:100%;height:100%}";
|
|
6
6
|
|
|
7
7
|
const NvSplit = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -35,7 +35,7 @@ const NvSplit = class {
|
|
|
35
35
|
this.startPos = 0;
|
|
36
36
|
this.startSizes = [];
|
|
37
37
|
// Handlers stored to be able to detach them
|
|
38
|
-
this.onDocMove = (
|
|
38
|
+
this.onDocMove = (e) => this.handleMouseMove(e);
|
|
39
39
|
this.onDocUp = () => this.stopDragging();
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
@@ -56,18 +56,20 @@ const NvSplit = class {
|
|
|
56
56
|
componentDidLoad() {
|
|
57
57
|
// Initialization (once)
|
|
58
58
|
this.ensureGutters();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
// Defer applySizes to ensure CSS (margins, padding) is computed
|
|
60
|
+
requestAnimationFrame(() => {
|
|
61
|
+
this.applySizes();
|
|
62
|
+
this.positionGutters();
|
|
63
|
+
});
|
|
64
|
+
// Observer: reposition gutters when resized
|
|
62
65
|
this.ro = new ResizeObserver(() => this.positionGutters());
|
|
63
66
|
this.ro.observe(this.el);
|
|
64
67
|
window.addEventListener('resize', () => this.positionGutters());
|
|
65
68
|
}
|
|
66
69
|
disconnectedCallback() {
|
|
67
|
-
var _a;
|
|
68
70
|
// Security cleanup (in case a drag was in progress)
|
|
69
71
|
this.detachDocumentListeners();
|
|
70
|
-
|
|
72
|
+
this.ro?.disconnect();
|
|
71
73
|
this.ro = undefined;
|
|
72
74
|
}
|
|
73
75
|
//#endregion
|
|
@@ -115,13 +117,12 @@ const NvSplit = class {
|
|
|
115
117
|
* @returns {Promise<void>}
|
|
116
118
|
*/
|
|
117
119
|
async destroy() {
|
|
118
|
-
var _a;
|
|
119
120
|
this.sizes = [];
|
|
120
121
|
this.isDragging = false;
|
|
121
122
|
this.dragIndex = -1;
|
|
122
123
|
this.removeOwnGutters();
|
|
123
124
|
this.detachDocumentListeners();
|
|
124
|
-
|
|
125
|
+
this.ro?.disconnect();
|
|
125
126
|
}
|
|
126
127
|
//#endregion
|
|
127
128
|
/****************************************************************************/
|
|
@@ -196,15 +197,14 @@ const NvSplit = class {
|
|
|
196
197
|
this.sizes = Array(n).fill(100 / n);
|
|
197
198
|
}
|
|
198
199
|
panes.forEach((pane, i) => {
|
|
199
|
-
|
|
200
|
-
const size = Math.max(0, (_a = this.sizes[i]) !== null && _a !== void 0 ? _a : 100 / n);
|
|
201
|
-
// Flex-basis via flex shorthand (https://developer.mozilla.org/en-US/docs/Web/CSS/flex)
|
|
200
|
+
const size = Math.max(0, this.sizes[i] ?? 100 / n);
|
|
202
201
|
pane.style.flex = `0 0 ${size}%`;
|
|
203
202
|
pane.style.minWidth = '0';
|
|
204
203
|
pane.style.minHeight = '0';
|
|
205
|
-
pane.style.overflow = 'hidden';
|
|
204
|
+
pane.style.overflow = 'hidden';
|
|
206
205
|
pane.style.display = 'flex';
|
|
207
206
|
pane.style.flexDirection = 'column';
|
|
207
|
+
pane.style.boxSizing = 'border-box';
|
|
208
208
|
});
|
|
209
209
|
this.positionGutters();
|
|
210
210
|
}
|
|
@@ -226,7 +226,6 @@ const NvSplit = class {
|
|
|
226
226
|
* Positions the gutters based on the current sizes of the panes.
|
|
227
227
|
*/
|
|
228
228
|
positionGutters() {
|
|
229
|
-
var _a, _b;
|
|
230
229
|
const panes = this.getPanes();
|
|
231
230
|
const gutters = this.getOwnGutters();
|
|
232
231
|
if (panes.length <= 1 || gutters.length === 0)
|
|
@@ -234,7 +233,7 @@ const NvSplit = class {
|
|
|
234
233
|
const horizontal = this.direction === 'horizontal';
|
|
235
234
|
let cumPct = 0;
|
|
236
235
|
for (let i = 0; i < gutters.length; i++) {
|
|
237
|
-
const sizePct =
|
|
236
|
+
const sizePct = this.sizes?.[i] ?? 100 / panes.length;
|
|
238
237
|
cumPct += sizePct;
|
|
239
238
|
const g = gutters[i];
|
|
240
239
|
g.style.position = 'absolute';
|
|
@@ -243,68 +242,70 @@ const NvSplit = class {
|
|
|
243
242
|
g.style.top = '0';
|
|
244
243
|
g.style.bottom = '0';
|
|
245
244
|
g.style.height = '100%';
|
|
245
|
+
g.style.transform = 'translateX(-50%)';
|
|
246
246
|
}
|
|
247
247
|
else {
|
|
248
248
|
g.style.top = `${cumPct}%`;
|
|
249
249
|
g.style.left = '0';
|
|
250
250
|
g.style.right = '0';
|
|
251
251
|
g.style.width = '100%';
|
|
252
|
+
g.style.transform = 'translateY(-50%)';
|
|
252
253
|
}
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
256
|
/**
|
|
256
257
|
* Starts the dragging process.
|
|
257
|
-
* @param {MouseEvent}
|
|
258
|
+
* @param {MouseEvent} e - The mouse event.
|
|
258
259
|
* @param {number} index - The index of the gutter.
|
|
259
260
|
*/
|
|
260
|
-
startDragging(
|
|
261
|
+
startDragging(e, index) {
|
|
262
|
+
e.preventDefault();
|
|
261
263
|
this.isDragging = true;
|
|
262
264
|
this.dragIndex = index;
|
|
263
|
-
this.startPos = this.direction === 'horizontal' ?
|
|
265
|
+
this.startPos = this.direction === 'horizontal' ? e.clientX : e.clientY;
|
|
264
266
|
this.startSizes = [...this.sizes];
|
|
265
267
|
this.attachDocumentListeners();
|
|
268
|
+
this.sizesChanged.emit([...this.sizes]);
|
|
266
269
|
}
|
|
267
270
|
/**
|
|
268
271
|
* Handles the mouse movement during dragging.
|
|
269
|
-
* @param {MouseEvent}
|
|
272
|
+
* @param {MouseEvent} e - The mouse event.
|
|
270
273
|
*/
|
|
271
|
-
handleMouseMove(
|
|
272
|
-
var _a, _b, _c, _d;
|
|
274
|
+
handleMouseMove(e) {
|
|
273
275
|
if (!this.isDragging || this.dragIndex < 0)
|
|
274
276
|
return;
|
|
275
277
|
const panes = this.getPanes();
|
|
276
278
|
if (panes.length < 2)
|
|
277
279
|
return;
|
|
278
280
|
const rect = this.el.getBoundingClientRect();
|
|
279
|
-
|
|
280
|
-
const
|
|
281
|
-
const
|
|
282
|
-
const deltaPx = (this.direction === 'horizontal' ? ev.clientX : ev.clientY) -
|
|
283
|
-
this.startPos;
|
|
281
|
+
const horizontal = this.direction === 'horizontal';
|
|
282
|
+
const totalPx = Math.max(horizontal ? rect.width : rect.height, 1);
|
|
283
|
+
const deltaPx = (horizontal ? e.clientX : e.clientY) - this.startPos;
|
|
284
284
|
const deltaPct = (deltaPx / totalPx) * 100;
|
|
285
285
|
const i = this.dragIndex;
|
|
286
286
|
const j = i + 1;
|
|
287
|
-
|
|
288
|
-
|
|
287
|
+
const startLeft = this.startSizes[i];
|
|
288
|
+
const startRight = this.startSizes[j];
|
|
289
289
|
// minSizes (px) -> %
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const k = targetSum / (pairSum || 1);
|
|
299
|
-
left *= k;
|
|
300
|
-
right *= k;
|
|
290
|
+
let minLeftPct = ((this.minSizes?.[i] ?? 0) / totalPx) * 100;
|
|
291
|
+
let minRightPct = ((this.minSizes?.[j] ?? 0) / totalPx) * 100;
|
|
292
|
+
const minSum = minLeftPct + minRightPct;
|
|
293
|
+
const availableSum = startLeft + startRight;
|
|
294
|
+
if (minSum > availableSum) {
|
|
295
|
+
const scale = availableSum / minSum;
|
|
296
|
+
minLeftPct *= scale;
|
|
297
|
+
minRightPct *= scale;
|
|
301
298
|
}
|
|
299
|
+
const minDelta = minLeftPct - startLeft;
|
|
300
|
+
const maxDelta = startRight - minRightPct;
|
|
301
|
+
const clampedDelta = Math.min(Math.max(deltaPct, minDelta), maxDelta);
|
|
302
|
+
const left = startLeft + clampedDelta;
|
|
303
|
+
const right = startRight - clampedDelta;
|
|
302
304
|
const next = [...this.startSizes];
|
|
303
305
|
next[i] = left;
|
|
304
306
|
next[j] = right;
|
|
305
307
|
this.sizes = next;
|
|
306
308
|
this.applySizes();
|
|
307
|
-
this.sizesChanged.emit([...this.sizes]);
|
|
308
309
|
this.positionGutters();
|
|
309
310
|
}
|
|
310
311
|
/**
|
|
@@ -316,12 +317,13 @@ const NvSplit = class {
|
|
|
316
317
|
this.isDragging = false;
|
|
317
318
|
this.dragIndex = -1;
|
|
318
319
|
this.detachDocumentListeners();
|
|
320
|
+
this.sizesChanged.emit([...this.sizes]);
|
|
319
321
|
}
|
|
320
322
|
//#endregion
|
|
321
323
|
/****************************************************************************/
|
|
322
324
|
//#region RENDER
|
|
323
325
|
render() {
|
|
324
|
-
return (index.h(index.Host, { key: '
|
|
326
|
+
return (index.h(index.Host, { key: '850cf8fb9d492e1da39da0037c1fd8d414960d28', "data-dragging": this.isDragging.toString() }, index.h("slot", { key: '4d2f540ca147abe4778bcc0d02be2e87ee2cf3b4', name: "pane" }), index.h("slot", { key: '1ceb2dc6375c50fe7786ba03fb2a753f852980ba', name: "gutter" })));
|
|
325
327
|
}
|
|
326
328
|
get el() { return index.getElement(this); }
|
|
327
329
|
static get watchers() { return {
|