@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
|
@@ -5,36 +5,72 @@ const NvSplitDocs = {
|
|
|
5
5
|
subcomponents: ['nv-alert'],
|
|
6
6
|
badge: 'beta',
|
|
7
7
|
stories: [
|
|
8
|
+
// Default
|
|
8
9
|
{
|
|
9
10
|
name: 'Default',
|
|
10
11
|
args: {
|
|
11
12
|
direction: 'horizontal',
|
|
12
13
|
sizes: [50, 50],
|
|
13
14
|
},
|
|
14
|
-
template: (h("nv-split", { class: "h-96 w-full", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-turquoise-50
|
|
15
|
+
template: (h("nv-split", { class: "h-96 w-full", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-turquoise-50" }, "Left pane"), h("div", { slot: "pane", class: "bg-orange-50" }, "Right pane"))),
|
|
16
|
+
},
|
|
17
|
+
// direction
|
|
18
|
+
{
|
|
19
|
+
name: nameof(x => x.minSizes),
|
|
20
|
+
description: 'Minimum pane sizes in px to clamp gutter movement.',
|
|
21
|
+
args: {
|
|
22
|
+
direction: 'horizontal',
|
|
23
|
+
sizes: [50, 50],
|
|
24
|
+
minSizes: [20, 20],
|
|
25
|
+
},
|
|
26
|
+
template: (h("nv-split", { class: "h-96 w-full", "data-storybook-args": true }, h("div", { slot: "pane" }, h("div", { class: "bg-turquoise-50 p-6 h-full" }, "Left pane")), h("div", { slot: "pane" }, h("div", { class: "bg-orange-50 p-6 h-full" }, "Right pane")))),
|
|
15
27
|
},
|
|
16
28
|
{
|
|
17
29
|
name: nameof(x => x.direction),
|
|
18
30
|
args: { direction: 'vertical', sizes: [70, 30] },
|
|
19
31
|
template: (h("nv-split", { class: "h-screen w-full", "data-storybook-args": true }, h("div", { slot: "pane" }, "Top pane"), h("div", { slot: "pane" }, "Bottom pane"))),
|
|
20
32
|
},
|
|
33
|
+
// gutterSize
|
|
21
34
|
{
|
|
22
35
|
name: nameof(x => x.gutterSize),
|
|
23
36
|
args: { gutterSize: 8, sizes: [50, 50] },
|
|
24
37
|
template: (h("nv-split", { class: "h-screen w-full", "data-storybook-args": true }, h("div", { slot: "pane" }, "Pane A"), h("div", { slot: "pane" }, "Pane B"))),
|
|
25
38
|
},
|
|
39
|
+
// sizes
|
|
40
|
+
{
|
|
41
|
+
name: nameof(x => x.sizes),
|
|
42
|
+
description: 'Initial sizes of the panes in percentages. Example: [50, 50] means two equal panes.',
|
|
43
|
+
args: { sizes: [30, 70] },
|
|
44
|
+
template: (h("nv-split", { class: "h-96 w-full", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-turquoise-500" }, "30% pane"), h("div", { slot: "pane", class: "bg-orange-500" }, "70% pane"))),
|
|
45
|
+
},
|
|
46
|
+
// complex
|
|
26
47
|
{
|
|
27
48
|
name: 'complex',
|
|
28
49
|
description: 'Note: Only the parent nv-split responds to Storybook controls. Nested nv-split components have hardcoded values.',
|
|
29
50
|
args: { gutterSize: 8, sizes: [50, 50], direction: 'vertical' },
|
|
30
|
-
template: (h("div", { class: "flex flex-col gap-4 h-screen w-full" }, h("nv-alert", { feedback: "warning", class: "m-4" }, "Only the parent nv-split responds to Storybook controls. The nested nv-split has hardcoded values."), h("nv-split", { class: "flex-1", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-turquoise-50
|
|
51
|
+
template: (h("div", { class: "flex flex-col gap-4 h-screen w-full" }, h("nv-alert", { feedback: "warning", class: "m-4" }, "Only the parent nv-split responds to Storybook controls. The nested nv-split has hardcoded values."), h("nv-split", { class: "flex-1", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-turquoise-50" }, "Top"), h("div", { slot: "pane", class: "bg-orange-50" }, h("nv-split", { direction: "horizontal", sizes: [20, 80] }, h("div", { slot: "pane", class: "bg-red-50" }, "Left"), h("div", { slot: "pane", class: "bg-yellow-50" }, "center"), h("div", { slot: "pane", class: "bg-green-50" }, "Right")))))),
|
|
31
52
|
},
|
|
53
|
+
// NestedSplit
|
|
32
54
|
{
|
|
33
55
|
name: 'NestedSplit',
|
|
34
56
|
description: 'Note: Only the root nv-split responds to Storybook controls. All nested nv-split components have hardcoded values.',
|
|
35
57
|
args: { gutterSize: 8, sizes: [10, 90], direction: 'horizontal' },
|
|
36
58
|
template: (h("div", { class: "flex flex-col gap-4 h-screen w-full" }, h("nv-alert", { feedback: "warning", class: "m-4" }, "Only the root nv-split responds to Storybook controls. All nested nv-split components have hardcoded values."), h("nv-split", { class: "flex-1", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-purple-300" }, "Sidebar"), h("div", { slot: "pane", class: "bg-gray-200" }, h("nv-split", { direction: "vertical", sizes: [10, 90], class: "h-full w-full" }, h("div", { slot: "pane", class: "bg-pink-300" }, "Top Content"), h("div", { slot: "pane", class: "bg-cyan-300" }, h("nv-split", { direction: "horizontal", sizes: [10, 90], class: "h-full w-full" }, h("div", { slot: "pane", class: "bg-lime-300" }, "Bottom Left"), h("div", { slot: "pane", class: "bg-orange-300" }, "Bottom Right")))))))),
|
|
37
59
|
},
|
|
60
|
+
// SlotPane
|
|
61
|
+
{
|
|
62
|
+
name: 'SlotPane',
|
|
63
|
+
description: 'Content of each split pane. Use multiple <div slot="pane"> elements.',
|
|
64
|
+
args: { sizes: [50, 50] },
|
|
65
|
+
template: (h("nv-split", { class: "h-96 w-full", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-turquoise-500" }, "First pane content"), h("div", { slot: "pane", class: "bg-orange-500" }, "Second pane content"))),
|
|
66
|
+
},
|
|
67
|
+
// SlotGutter
|
|
68
|
+
{
|
|
69
|
+
name: 'SlotGutter',
|
|
70
|
+
description: 'Optional custom content inside every gutter handle.',
|
|
71
|
+
args: { sizes: [50, 50] },
|
|
72
|
+
template: (h("nv-split", { class: "h-96 w-full", "data-storybook-args": true }, h("div", { slot: "pane", class: "bg-turquoise-500" }, "Left pane"), h("div", { slot: "pane", class: "bg-orange-500" }, "Right pane"), h("div", { slot: "gutter", class: "flex items-center justify-center" }, h("span", { class: "text-xs" }, "\u22EE\u22EE")))),
|
|
73
|
+
},
|
|
38
74
|
],
|
|
39
75
|
};
|
|
40
76
|
export default NvSplitDocs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-split.docs.js","sourceRoot":"","sources":["../../../../src/components/nv-split/nv-split.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,WAAW,GAAiC;IAChD,SAAS,EAAE,UAAU;IACrB,aAAa,EAAE,CAAC,UAAU,CAAC;IAC3B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE;gBACJ,SAAS,EAAE,YAAY;gBACvB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;aAChB;YACD,QAAQ,EAAE,CACR,gBAAU,KAAK,EAAC,aAAa;gBAC3B,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,qBAAqB,gBAEtC;gBACN,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,kBAAkB,iBAEnC,CACG,CACZ;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAClD,IAAI,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;YAChD,QAAQ,EAAE,CACR,gBAAU,KAAK,EAAC,iBAAiB;gBAC/B,WAAK,IAAI,EAAC,MAAM,eAAe;gBAC/B,WAAK,IAAI,EAAC,MAAM,kBAAkB,CACzB,CACZ;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;YACnD,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC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EAAC,QAAQ;oBACtB,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,cAEhC;oBACN,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa;wBAClC,gBACE,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EACf,KAAK,EAAC,eAAe;4BAErB,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa,kBAE9B;4BACN,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa;gCAClC,gBACE,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EACf,KAAK,EAAC,eAAe;oCAErB,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa,kBAE9B;oCACN,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,mBAEhC,CACG,CACP,CACG,CACP,CACG,CACP,CACP;SACF;KACF;CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvSplitDocs: NovaDocs<Components.NvSplit> = {\n component: 'nv-split',\n subcomponents: ['nv-alert'],\n badge: 'beta',\n stories: [\n {\n name: 'Default',\n args: {\n direction: 'horizontal',\n sizes: [50, 50],\n },\n template: (\n <nv-split class=\"h-96 w-full\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-turquoise-50 p-6\">\n Left pane\n </div>\n <div slot=\"pane\" class=\"bg-orange-50 p-6\">\n Right pane\n </div>\n </nv-split>\n ),\n },\n {\n name: nameof<Components.NvSplit>(x => x.direction),\n args: { direction: 'vertical', sizes: [70, 30] },\n template: (\n <nv-split class=\"h-screen w-full\" data-storybook-args>\n <div slot=\"pane\">Top pane</div>\n <div slot=\"pane\">Bottom pane</div>\n </nv-split>\n ),\n },\n {\n name: nameof<Components.NvSplit>(x => x.gutterSize),\n args: { gutterSize: 8, sizes: [50, 50] },\n template: (\n <nv-split class=\"h-screen w-full\" data-storybook-args>\n <div slot=\"pane\">Pane A</div>\n <div slot=\"pane\">Pane B</div>\n </nv-split>\n ),\n },\n {\n name: 'complex',\n description:\n 'Note: Only the parent nv-split responds to Storybook controls. Nested nv-split components have hardcoded values.',\n args: { gutterSize: 8, sizes: [50, 50], direction: 'vertical' },\n template: (\n <div class=\"flex flex-col gap-4 h-screen w-full\">\n <nv-alert feedback=\"warning\" class=\"m-4\">\n Only the parent nv-split responds to Storybook controls. The nested\n nv-split has hardcoded values.\n </nv-alert>\n <nv-split class=\"flex-1\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-turquoise-50 p-6\">\n Top\n </div>\n <div slot=\"pane\" class=\"bg-orange-50 p-6\">\n <nv-split direction=\"horizontal\" sizes={[20, 80]}>\n <div slot=\"pane\" class=\"bg-red-50 p-6\">\n Left\n </div>\n <div slot=\"pane\" class=\"bg-yellow-50 p-6\">\n center\n </div>\n <div slot=\"pane\" class=\"bg-green-50 p-6\">\n Right\n </div>\n </nv-split>\n </div>\n </nv-split>\n </div>\n ),\n },\n {\n name: 'NestedSplit',\n description:\n 'Note: Only the root nv-split responds to Storybook controls. All nested nv-split components have hardcoded values.',\n args: { gutterSize: 8, sizes: [10, 90], direction: 'horizontal' },\n template: (\n <div class=\"flex flex-col gap-4 h-screen w-full\">\n <nv-alert feedback=\"warning\" class=\"m-4\">\n Only the root nv-split responds to Storybook controls. All nested\n nv-split components have hardcoded values.\n </nv-alert>\n <nv-split class=\"flex-1\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-purple-300\">\n Sidebar\n </div>\n <div slot=\"pane\" class=\"bg-gray-200\">\n <nv-split\n direction=\"vertical\"\n sizes={[10, 90]}\n class=\"h-full w-full\"\n >\n <div slot=\"pane\" class=\"bg-pink-300\">\n Top Content\n </div>\n <div slot=\"pane\" class=\"bg-cyan-300\">\n <nv-split\n direction=\"horizontal\"\n sizes={[10, 90]}\n class=\"h-full w-full\"\n >\n <div slot=\"pane\" class=\"bg-lime-300\">\n Bottom Left\n </div>\n <div slot=\"pane\" class=\"bg-orange-300\">\n Bottom Right\n </div>\n </nv-split>\n </div>\n </nv-split>\n </div>\n </nv-split>\n </div>\n ),\n },\n ],\n};\n\nexport default NvSplitDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-split.docs.js","sourceRoot":"","sources":["../../../../src/components/nv-split/nv-split.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,WAAW,GAAiC;IAChD,SAAS,EAAE,UAAU;IACrB,aAAa,EAAE,CAAC,UAAU,CAAC;IAC3B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE;QACP,UAAU;QACV;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE;gBACJ,SAAS,EAAE,YAAY;gBACvB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;aAChB;YACD,QAAQ,EAAE,CACR,gBAAU,KAAK,EAAC,aAAa;gBAC3B,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,gBAElC;gBACN,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,iBAE/B,CACG,CACZ;SACF;QACD,YAAY;QACZ;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACjD,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE;gBACJ,SAAS,EAAE,YAAY;gBACvB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;gBACf,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;aACnB;YACD,QAAQ,EAAE,CACR,gBAAU,KAAK,EAAC,aAAa;gBAC3B,WAAK,IAAI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ourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvSplitDocs: NovaDocs<Components.NvSplit> = {\n component: 'nv-split',\n subcomponents: ['nv-alert'],\n badge: 'beta',\n stories: [\n // Default\n {\n name: 'Default',\n args: {\n direction: 'horizontal',\n sizes: [50, 50],\n },\n template: (\n <nv-split class=\"h-96 w-full\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-turquoise-50\">\n Left pane\n </div>\n <div slot=\"pane\" class=\"bg-orange-50\">\n Right pane\n </div>\n </nv-split>\n ),\n },\n // direction\n {\n name: nameof<Components.NvSplit>(x => x.minSizes),\n description: 'Minimum pane sizes in px to clamp gutter movement.',\n args: {\n direction: 'horizontal',\n sizes: [50, 50],\n minSizes: [20, 20],\n },\n template: (\n <nv-split class=\"h-96 w-full\" data-storybook-args>\n <div slot=\"pane\">\n <div class=\"bg-turquoise-50 p-6 h-full\">Left pane</div>\n </div>\n <div slot=\"pane\">\n <div class=\"bg-orange-50 p-6 h-full\">Right pane</div>\n </div>\n </nv-split>\n ),\n },\n {\n name: nameof<Components.NvSplit>(x => x.direction),\n args: { direction: 'vertical', sizes: [70, 30] },\n template: (\n <nv-split class=\"h-screen w-full\" data-storybook-args>\n <div slot=\"pane\">Top pane</div>\n <div slot=\"pane\">Bottom pane</div>\n </nv-split>\n ),\n },\n // gutterSize\n {\n name: nameof<Components.NvSplit>(x => x.gutterSize),\n args: { gutterSize: 8, sizes: [50, 50] },\n template: (\n <nv-split class=\"h-screen w-full\" data-storybook-args>\n <div slot=\"pane\">Pane A</div>\n <div slot=\"pane\">Pane B</div>\n </nv-split>\n ),\n },\n // sizes\n {\n name: nameof<Components.NvSplit>(x => x.sizes),\n description:\n 'Initial sizes of the panes in percentages. Example: [50, 50] means two equal panes.',\n args: { sizes: [30, 70] },\n template: (\n <nv-split class=\"h-96 w-full\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-turquoise-500\">\n 30% pane\n </div>\n <div slot=\"pane\" class=\"bg-orange-500\">\n 70% pane\n </div>\n </nv-split>\n ),\n },\n // complex\n {\n name: 'complex',\n description:\n 'Note: Only the parent nv-split responds to Storybook controls. Nested nv-split components have hardcoded values.',\n args: { gutterSize: 8, sizes: [50, 50], direction: 'vertical' },\n template: (\n <div class=\"flex flex-col gap-4 h-screen w-full\">\n <nv-alert feedback=\"warning\" class=\"m-4\">\n Only the parent nv-split responds to Storybook controls. The nested\n nv-split has hardcoded values.\n </nv-alert>\n <nv-split class=\"flex-1\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-turquoise-50\">\n Top\n </div>\n <div slot=\"pane\" class=\"bg-orange-50\">\n <nv-split direction=\"horizontal\" sizes={[20, 80]}>\n <div slot=\"pane\" class=\"bg-red-50\">\n Left\n </div>\n <div slot=\"pane\" class=\"bg-yellow-50\">\n center\n </div>\n <div slot=\"pane\" class=\"bg-green-50\">\n Right\n </div>\n </nv-split>\n </div>\n </nv-split>\n </div>\n ),\n },\n // NestedSplit\n {\n name: 'NestedSplit',\n description:\n 'Note: Only the root nv-split responds to Storybook controls. All nested nv-split components have hardcoded values.',\n args: { gutterSize: 8, sizes: [10, 90], direction: 'horizontal' },\n template: (\n <div class=\"flex flex-col gap-4 h-screen w-full\">\n <nv-alert feedback=\"warning\" class=\"m-4\">\n Only the root nv-split responds to Storybook controls. All nested\n nv-split components have hardcoded values.\n </nv-alert>\n <nv-split class=\"flex-1\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-purple-300\">\n Sidebar\n </div>\n <div slot=\"pane\" class=\"bg-gray-200\">\n <nv-split\n direction=\"vertical\"\n sizes={[10, 90]}\n class=\"h-full w-full\"\n >\n <div slot=\"pane\" class=\"bg-pink-300\">\n Top Content\n </div>\n <div slot=\"pane\" class=\"bg-cyan-300\">\n <nv-split\n direction=\"horizontal\"\n sizes={[10, 90]}\n class=\"h-full w-full\"\n >\n <div slot=\"pane\" class=\"bg-lime-300\">\n Bottom Left\n </div>\n <div slot=\"pane\" class=\"bg-orange-300\">\n Bottom Right\n </div>\n </nv-split>\n </div>\n </nv-split>\n </div>\n </nv-split>\n </div>\n ),\n },\n // SlotPane\n {\n name: 'SlotPane',\n description:\n 'Content of each split pane. Use multiple <div slot=\"pane\"> elements.',\n args: { sizes: [50, 50] },\n template: (\n <nv-split class=\"h-96 w-full\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-turquoise-500\">\n First pane content\n </div>\n <div slot=\"pane\" class=\"bg-orange-500\">\n Second pane content\n </div>\n </nv-split>\n ),\n },\n // SlotGutter\n {\n name: 'SlotGutter',\n description: 'Optional custom content inside every gutter handle.',\n args: { sizes: [50, 50] },\n template: (\n <nv-split class=\"h-96 w-full\" data-storybook-args>\n <div slot=\"pane\" class=\"bg-turquoise-500\">\n Left pane\n </div>\n <div slot=\"pane\" class=\"bg-orange-500\">\n Right pane\n </div>\n <div slot=\"gutter\" class=\"flex items-center justify-center\">\n <span class=\"text-xs\">⋮⋮</span>\n </div>\n </nv-split>\n ),\n },\n ],\n};\n\nexport default NvSplitDocs;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Host, h, } from "@stencil/core";
|
|
2
2
|
/**
|
|
3
|
-
* The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel.
|
|
3
|
+
* The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel. Slot=“pane” elements have margin: 0 !important by default. This is a necessary technical constraint because CSS margins are not included in the flex-basis calculation, which would distort the sizing of the panes. Solution for the user: Apply margins/padding to the content inside the pane, not to the pane itself.
|
|
4
4
|
* @slot pane - Content of each split pane. Use multiple `<div slot="pane">` elements.
|
|
5
5
|
* @slot gutter - Optional custom content inside every gutter handle.
|
|
6
6
|
*/
|
|
@@ -33,7 +33,7 @@ export class NvSplit {
|
|
|
33
33
|
this.startPos = 0;
|
|
34
34
|
this.startSizes = [];
|
|
35
35
|
// Handlers stored to be able to detach them
|
|
36
|
-
this.onDocMove = (
|
|
36
|
+
this.onDocMove = (e) => this.handleMouseMove(e);
|
|
37
37
|
this.onDocUp = () => this.stopDragging();
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
@@ -54,18 +54,20 @@ export class NvSplit {
|
|
|
54
54
|
componentDidLoad() {
|
|
55
55
|
// Initialization (once)
|
|
56
56
|
this.ensureGutters();
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
// Defer applySizes to ensure CSS (margins, padding) is computed
|
|
58
|
+
requestAnimationFrame(() => {
|
|
59
|
+
this.applySizes();
|
|
60
|
+
this.positionGutters();
|
|
61
|
+
});
|
|
62
|
+
// Observer: reposition gutters when resized
|
|
60
63
|
this.ro = new ResizeObserver(() => this.positionGutters());
|
|
61
64
|
this.ro.observe(this.el);
|
|
62
65
|
window.addEventListener('resize', () => this.positionGutters());
|
|
63
66
|
}
|
|
64
67
|
disconnectedCallback() {
|
|
65
|
-
var _a;
|
|
66
68
|
// Security cleanup (in case a drag was in progress)
|
|
67
69
|
this.detachDocumentListeners();
|
|
68
|
-
|
|
70
|
+
this.ro?.disconnect();
|
|
69
71
|
this.ro = undefined;
|
|
70
72
|
}
|
|
71
73
|
//#endregion
|
|
@@ -113,13 +115,12 @@ export class NvSplit {
|
|
|
113
115
|
* @returns {Promise<void>}
|
|
114
116
|
*/
|
|
115
117
|
async destroy() {
|
|
116
|
-
var _a;
|
|
117
118
|
this.sizes = [];
|
|
118
119
|
this.isDragging = false;
|
|
119
120
|
this.dragIndex = -1;
|
|
120
121
|
this.removeOwnGutters();
|
|
121
122
|
this.detachDocumentListeners();
|
|
122
|
-
|
|
123
|
+
this.ro?.disconnect();
|
|
123
124
|
}
|
|
124
125
|
//#endregion
|
|
125
126
|
/****************************************************************************/
|
|
@@ -194,15 +195,14 @@ export class NvSplit {
|
|
|
194
195
|
this.sizes = Array(n).fill(100 / n);
|
|
195
196
|
}
|
|
196
197
|
panes.forEach((pane, i) => {
|
|
197
|
-
|
|
198
|
-
const size = Math.max(0, (_a = this.sizes[i]) !== null && _a !== void 0 ? _a : 100 / n);
|
|
199
|
-
// Flex-basis via flex shorthand (https://developer.mozilla.org/en-US/docs/Web/CSS/flex)
|
|
198
|
+
const size = Math.max(0, this.sizes[i] ?? 100 / n);
|
|
200
199
|
pane.style.flex = `0 0 ${size}%`;
|
|
201
200
|
pane.style.minWidth = '0';
|
|
202
201
|
pane.style.minHeight = '0';
|
|
203
|
-
pane.style.overflow = 'hidden';
|
|
202
|
+
pane.style.overflow = 'hidden';
|
|
204
203
|
pane.style.display = 'flex';
|
|
205
204
|
pane.style.flexDirection = 'column';
|
|
205
|
+
pane.style.boxSizing = 'border-box';
|
|
206
206
|
});
|
|
207
207
|
this.positionGutters();
|
|
208
208
|
}
|
|
@@ -224,7 +224,6 @@ export class NvSplit {
|
|
|
224
224
|
* Positions the gutters based on the current sizes of the panes.
|
|
225
225
|
*/
|
|
226
226
|
positionGutters() {
|
|
227
|
-
var _a, _b;
|
|
228
227
|
const panes = this.getPanes();
|
|
229
228
|
const gutters = this.getOwnGutters();
|
|
230
229
|
if (panes.length <= 1 || gutters.length === 0)
|
|
@@ -232,7 +231,7 @@ export class NvSplit {
|
|
|
232
231
|
const horizontal = this.direction === 'horizontal';
|
|
233
232
|
let cumPct = 0;
|
|
234
233
|
for (let i = 0; i < gutters.length; i++) {
|
|
235
|
-
const sizePct =
|
|
234
|
+
const sizePct = this.sizes?.[i] ?? 100 / panes.length;
|
|
236
235
|
cumPct += sizePct;
|
|
237
236
|
const g = gutters[i];
|
|
238
237
|
g.style.position = 'absolute';
|
|
@@ -241,68 +240,70 @@ export class NvSplit {
|
|
|
241
240
|
g.style.top = '0';
|
|
242
241
|
g.style.bottom = '0';
|
|
243
242
|
g.style.height = '100%';
|
|
243
|
+
g.style.transform = 'translateX(-50%)';
|
|
244
244
|
}
|
|
245
245
|
else {
|
|
246
246
|
g.style.top = `${cumPct}%`;
|
|
247
247
|
g.style.left = '0';
|
|
248
248
|
g.style.right = '0';
|
|
249
249
|
g.style.width = '100%';
|
|
250
|
+
g.style.transform = 'translateY(-50%)';
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
254
|
/**
|
|
254
255
|
* Starts the dragging process.
|
|
255
|
-
* @param {MouseEvent}
|
|
256
|
+
* @param {MouseEvent} e - The mouse event.
|
|
256
257
|
* @param {number} index - The index of the gutter.
|
|
257
258
|
*/
|
|
258
|
-
startDragging(
|
|
259
|
+
startDragging(e, index) {
|
|
260
|
+
e.preventDefault();
|
|
259
261
|
this.isDragging = true;
|
|
260
262
|
this.dragIndex = index;
|
|
261
|
-
this.startPos = this.direction === 'horizontal' ?
|
|
263
|
+
this.startPos = this.direction === 'horizontal' ? e.clientX : e.clientY;
|
|
262
264
|
this.startSizes = [...this.sizes];
|
|
263
265
|
this.attachDocumentListeners();
|
|
266
|
+
this.sizesChanged.emit([...this.sizes]);
|
|
264
267
|
}
|
|
265
268
|
/**
|
|
266
269
|
* Handles the mouse movement during dragging.
|
|
267
|
-
* @param {MouseEvent}
|
|
270
|
+
* @param {MouseEvent} e - The mouse event.
|
|
268
271
|
*/
|
|
269
|
-
handleMouseMove(
|
|
270
|
-
var _a, _b, _c, _d;
|
|
272
|
+
handleMouseMove(e) {
|
|
271
273
|
if (!this.isDragging || this.dragIndex < 0)
|
|
272
274
|
return;
|
|
273
275
|
const panes = this.getPanes();
|
|
274
276
|
if (panes.length < 2)
|
|
275
277
|
return;
|
|
276
278
|
const rect = this.el.getBoundingClientRect();
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
const deltaPx = (this.direction === 'horizontal' ? ev.clientX : ev.clientY) -
|
|
281
|
-
this.startPos;
|
|
279
|
+
const horizontal = this.direction === 'horizontal';
|
|
280
|
+
const totalPx = Math.max(horizontal ? rect.width : rect.height, 1);
|
|
281
|
+
const deltaPx = (horizontal ? e.clientX : e.clientY) - this.startPos;
|
|
282
282
|
const deltaPct = (deltaPx / totalPx) * 100;
|
|
283
283
|
const i = this.dragIndex;
|
|
284
284
|
const j = i + 1;
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
const startLeft = this.startSizes[i];
|
|
286
|
+
const startRight = this.startSizes[j];
|
|
287
287
|
// minSizes (px) -> %
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const k = targetSum / (pairSum || 1);
|
|
297
|
-
left *= k;
|
|
298
|
-
right *= k;
|
|
288
|
+
let minLeftPct = ((this.minSizes?.[i] ?? 0) / totalPx) * 100;
|
|
289
|
+
let minRightPct = ((this.minSizes?.[j] ?? 0) / totalPx) * 100;
|
|
290
|
+
const minSum = minLeftPct + minRightPct;
|
|
291
|
+
const availableSum = startLeft + startRight;
|
|
292
|
+
if (minSum > availableSum) {
|
|
293
|
+
const scale = availableSum / minSum;
|
|
294
|
+
minLeftPct *= scale;
|
|
295
|
+
minRightPct *= scale;
|
|
299
296
|
}
|
|
297
|
+
const minDelta = minLeftPct - startLeft;
|
|
298
|
+
const maxDelta = startRight - minRightPct;
|
|
299
|
+
const clampedDelta = Math.min(Math.max(deltaPct, minDelta), maxDelta);
|
|
300
|
+
const left = startLeft + clampedDelta;
|
|
301
|
+
const right = startRight - clampedDelta;
|
|
300
302
|
const next = [...this.startSizes];
|
|
301
303
|
next[i] = left;
|
|
302
304
|
next[j] = right;
|
|
303
305
|
this.sizes = next;
|
|
304
306
|
this.applySizes();
|
|
305
|
-
this.sizesChanged.emit([...this.sizes]);
|
|
306
307
|
this.positionGutters();
|
|
307
308
|
}
|
|
308
309
|
/**
|
|
@@ -314,12 +315,13 @@ export class NvSplit {
|
|
|
314
315
|
this.isDragging = false;
|
|
315
316
|
this.dragIndex = -1;
|
|
316
317
|
this.detachDocumentListeners();
|
|
318
|
+
this.sizesChanged.emit([...this.sizes]);
|
|
317
319
|
}
|
|
318
320
|
//#endregion
|
|
319
321
|
/****************************************************************************/
|
|
320
322
|
//#region RENDER
|
|
321
323
|
render() {
|
|
322
|
-
return (h(Host, { key: '
|
|
324
|
+
return (h(Host, { key: '850cf8fb9d492e1da39da0037c1fd8d414960d28', "data-dragging": this.isDragging.toString() }, h("slot", { key: '4d2f540ca147abe4778bcc0d02be2e87ee2cf3b4', name: "pane" }), h("slot", { key: '1ceb2dc6375c50fe7786ba03fb2a753f852980ba', name: "gutter" })));
|
|
323
325
|
}
|
|
324
326
|
static get is() { return "nv-split"; }
|
|
325
327
|
static get originalStyleUrls() {
|
|
@@ -428,7 +430,7 @@ export class NvSplit {
|
|
|
428
430
|
"name": "bind",
|
|
429
431
|
"text": "sizes"
|
|
430
432
|
}],
|
|
431
|
-
"text": "Emitted when pane sizes are updated (
|
|
433
|
+
"text": "Emitted when pane sizes are updated (drag start/stop or programmatically)."
|
|
432
434
|
},
|
|
433
435
|
"complexType": {
|
|
434
436
|
"original": "number[]",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-split.js","sourceRoot":"","sources":["../../../../src/components/nv-split/nv-split.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,MAAM,EACN,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AAMH,MAAM,OAAO,OAAO;IALpB;QAQE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;WAIG;QAEM,cAAS,GAA8B,YAAY,CAAC;QAE7D;;;;WAIG;QAEH,UAAK,GAAa,EAAE,CAAC;QAUrB;;;WAGG;QAEM,eAAU,GAAW,EAAE,CAAC;QAEjC,YAAY;QACZ,8EAA8E;QAC9E,eAAe;QAGP,eAAU,GAAY,KAAK,CAAC;QAE5B,cAAS,GAAW,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AAI,CAAC,UAAU;YAAE,OAAO;QAC7B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAED,YAAY;IACZ,8EAA8E;IAC9E,gBAAgB;IAEhB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,sEAAgB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YAC7C,6DAAM,IAAI,EAAC,MAAM,GAAQ;YACzB,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACtB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Method,\n State,\n Watch,\n} from '@stencil/core';\n\n/**\n * The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel.\n * @slot pane - Content of each split pane. Use multiple `<div slot=\"pane\">` elements.\n * @slot gutter - Optional custom content inside every gutter handle.\n */\n@Component({\n tag: 'nv-split',\n styleUrl: 'styles/nv-split.scss',\n shadow: false,\n})\nexport class NvSplit {\n @Element() el: HTMLNvSplitElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Direction of the split layout.\n * - `horizontal`: panes side by side\n * - `vertical`: panes stacked\n */\n @Prop({ reflect: true })\n readonly direction: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Initial sizes of the panes in percentages.\n * Example: `[50, 50]` means two equal panes.\n * Explicitly `reflect: false` (array) for framework compatibility.\n */\n @Prop({ mutable: true, reflect: false })\n sizes: number[] = [];\n\n /**\n * Minimum sizes (in px) for each pane.\n * Example: `[100, 200]` => first pane min 100px, second min 200px.\n * Explicitly `reflect: false` (array) for framework compatibility.\n */\n @Prop({ reflect: false })\n readonly minSizes?: number[];\n\n /**\n * Width or height of the gutter (in px) depending on the split direction.\n * Default is 24px to meet WCAG 2.2 target size requirements for touch accessibility.\n */\n @Prop({ reflect: true })\n readonly gutterSize: number = 24;\n\n //#endregion\n /****************************************************************************/\n //#region STATE\n\n @State()\n private isDragging: boolean = false;\n\n private dragIndex: number = -1;\n private startPos: number = 0;\n private startSizes: number[] = [];\n private ro?: ResizeObserver;\n\n // Handlers stored to be able to detach them\n private onDocMove = (ev: MouseEvent) => this.handleMouseMove(ev);\n private onDocUp = () => this.stopDragging();\n\n //#endregion\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when pane sizes are updated (either via dragging or programmatically).\n * @bind sizes\n */\n @Event({ bubbles: false })\n sizesChanged: EventEmitter<number[]>;\n\n //#endregion\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('sizes')\n protected onSizesChanged(): void {\n // Re-apply sizes if modified from the outside\n this.applySizes();\n }\n\n @Watch('direction')\n protected onDirectionChanged(): void {\n // Update the orientation and the cursors of the gutters\n this.ensureGutters();\n this.applySizes();\n }\n\n //#endregion\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentDidLoad(): void {\n // Initialization (once)\n this.ensureGutters();\n this.applySizes();\n this.positionGutters();\n\n // Observer: reposition gutters when resized (nested or parent split changes)\n this.ro = new ResizeObserver(() => this.positionGutters());\n this.ro.observe(this.el);\n\n window.addEventListener('resize', () => this.positionGutters());\n }\n\n disconnectedCallback(): void {\n // Security cleanup (in case a drag was in progress)\n this.detachDocumentListeners();\n this.ro?.disconnect();\n this.ro = undefined;\n }\n\n //#endregion\n /****************************************************************************/\n //#region PUBLIC METHODS\n\n /**\n * Programmatically set pane sizes.\n * @param {Array<number>} sizes Array of pane sizes in percentages.\n * @returns {Promise<void>}\n */\n @Method()\n async setSizes(sizes: number[]): Promise<void> {\n this.sizes = [...sizes];\n this.applySizes();\n this.sizesChanged.emit([...this.sizes]);\n this.positionGutters();\n }\n\n /**\n * Returns the current pane sizes.\n * @returns {Promise<number[]>} Array of pane sizes in percentages.\n */\n @Method()\n async getSizes(): Promise<number[]> {\n return [...this.sizes];\n }\n\n /**\n * Collapse a specific pane to 0 size.\n * @param {number} index Index of the pane to collapse.\n * @returns {Promise<void>}\n */\n @Method()\n async collapse(index: number): Promise<void> {\n const panes = this.getPanes();\n if (index < 0 || index >= panes.length) return;\n\n // Simple strategy: 0% for the index, the rest (100%) for its nearest neighbor\n const next = new Array(panes.length).fill(0);\n const target = index < panes.length - 1 ? index + 1 : index - 1;\n if (target >= 0) next[target] = 100;\n\n this.sizes = next;\n this.applySizes();\n this.sizesChanged.emit([...this.sizes]);\n this.positionGutters();\n }\n\n /**\n * Destroy the split instance: removes gutters and resets layout state.\n * @returns {Promise<void>}\n */\n @Method()\n async destroy(): Promise<void> {\n this.sizes = [];\n this.isDragging = false;\n this.dragIndex = -1;\n this.removeOwnGutters();\n this.detachDocumentListeners();\n this.ro?.disconnect();\n }\n\n //#endregion\n /****************************************************************************/\n //#region INTERNAL HELPERS\n\n /**\n * Returns the panes of the split.\n * @returns {HTMLElement[]} The panes of the split.\n */\n private getPanes(): HTMLElement[] {\n // Only the direct children slot=\"pane\"\n return Array.from(\n this.el.querySelectorAll<HTMLElement>(':scope > [slot=\"pane\"]'),\n );\n }\n\n /**\n * Returns the own gutters of the split.\n * @returns {HTMLElement[]} The own gutters of the split.\n */\n private getOwnGutters(): HTMLElement[] {\n // Only the direct gutters of THIS instance\n return Array.from(\n this.el.querySelectorAll<HTMLElement>(\n ':scope > .nv-split-gutter[data-auto=\"true\"]',\n ),\n );\n }\n\n /**\n * Removes the own gutters of the split.\n */\n private removeOwnGutters(): void {\n this.getOwnGutters().forEach(g => g.remove());\n }\n\n /**\n * Ensures the gutters of the split.\n */\n private ensureGutters(): void {\n const panes = this.getPanes();\n\n // 1) Clean ONLY the old direct gutters of THIS instance\n this.removeOwnGutters();\n\n if (panes.length <= 1) return;\n\n // 2) Add the gutters (directs) between the panes\n panes.forEach((pane, i) => {\n if (i >= panes.length - 1) return;\n\n const g = document.createElement('div');\n g.className = 'nv-split-gutter';\n g.setAttribute('data-auto', 'true');\n\n if (this.direction === 'horizontal') {\n g.style.width = `${this.gutterSize}px`;\n g.style.cursor = 'col-resize';\n } else {\n g.style.height = `${this.gutterSize}px`;\n g.style.cursor = 'row-resize';\n }\n\n // Customizable internal slot\n const slotEl = document.createElement('slot');\n slotEl.name = 'gutter';\n g.appendChild(slotEl);\n\n // Listener drag (index = gutter between pane i and i+1)\n g.addEventListener('mousedown', (ev: MouseEvent) =>\n this.startDragging(ev, i),\n );\n\n // Insert just after the pane\n pane.insertAdjacentElement('afterend', g);\n });\n\n this.positionGutters();\n }\n\n /**\n * Applies the sizes to the panes.\n */\n private applySizes(): void {\n const panes = this.getPanes();\n const n = panes.length;\n if (n === 0) return;\n\n // Default values if inconsistent\n if (!this.sizes || this.sizes.length !== n) {\n this.sizes = Array(n).fill(100 / n);\n }\n\n panes.forEach((pane, i) => {\n const size = Math.max(0, this.sizes[i] ?? 100 / n);\n // Flex-basis via flex shorthand (https://developer.mozilla.org/en-US/docs/Web/CSS/flex)\n pane.style.flex = `0 0 ${size}%`;\n pane.style.minWidth = '0';\n pane.style.minHeight = '0';\n pane.style.overflow = 'hidden'; // let a nv-split child extend\n pane.style.display = 'flex';\n pane.style.flexDirection = 'column';\n });\n\n this.positionGutters();\n }\n\n /**\n * Attaches the document listeners.\n */\n private attachDocumentListeners(): void {\n document.addEventListener('mousemove', this.onDocMove);\n document.addEventListener('mouseup', this.onDocUp);\n }\n\n /**\n * Detaches the document listeners.\n */\n private detachDocumentListeners(): void {\n document.removeEventListener('mousemove', this.onDocMove);\n document.removeEventListener('mouseup', this.onDocUp);\n }\n\n /**\n * Positions the gutters based on the current sizes of the panes.\n */\n private positionGutters(): void {\n const panes = this.getPanes();\n const gutters = this.getOwnGutters();\n if (panes.length <= 1 || gutters.length === 0) return;\n\n const horizontal = this.direction === 'horizontal';\n let cumPct = 0;\n\n for (let i = 0; i < gutters.length; i++) {\n const sizePct = this.sizes?.[i] ?? 100 / panes.length;\n cumPct += sizePct;\n\n const g = gutters[i];\n g.style.position = 'absolute';\n\n if (horizontal) {\n g.style.left = `${cumPct}%`;\n g.style.top = '0';\n g.style.bottom = '0';\n g.style.height = '100%';\n } else {\n g.style.top = `${cumPct}%`;\n g.style.left = '0';\n g.style.right = '0';\n g.style.width = '100%';\n }\n }\n }\n\n /**\n * Starts the dragging process.\n * @param {MouseEvent} ev - The mouse event.\n * @param {number} index - The index of the gutter.\n */\n private startDragging(ev: MouseEvent, index: number): void {\n this.isDragging = true;\n this.dragIndex = index;\n this.startPos = this.direction === 'horizontal' ? ev.clientX : ev.clientY;\n this.startSizes = [...this.sizes];\n this.attachDocumentListeners();\n }\n\n /**\n * Handles the mouse movement during dragging.\n * @param {MouseEvent} ev - The mouse event.\n */\n private handleMouseMove(ev: MouseEvent): void {\n if (!this.isDragging || this.dragIndex < 0) return;\n\n const panes = this.getPanes();\n if (panes.length < 2) return;\n\n const rect = this.el.getBoundingClientRect();\n\n // Ensure we never divide by zero if the element has zero width/height\n const rawSize = this.direction === 'horizontal' ? rect.width : rect.height;\n const totalPx = Math.max(rawSize, 1);\n\n const deltaPx =\n (this.direction === 'horizontal' ? ev.clientX : ev.clientY) -\n this.startPos;\n const deltaPct = (deltaPx / totalPx) * 100;\n\n const i = this.dragIndex;\n const j = i + 1;\n\n let left = this.startSizes[i] + deltaPct;\n let right = this.startSizes[j] - deltaPct;\n\n // minSizes (px) -> %\n const minLeftPct = ((this.minSizes?.[i] ?? 0) / totalPx) * 100;\n const minRightPct = ((this.minSizes?.[j] ?? 0) / totalPx) * 100;\n\n left = Math.max(left, minLeftPct);\n right = Math.max(right, minRightPct);\n\n // Keep the sum of the pair i/j constant\n const pairSum = left + right;\n const targetSum = this.startSizes[i] + this.startSizes[j];\n if (Math.abs(pairSum - targetSum) > 0.0001) {\n const k = targetSum / (pairSum || 1);\n left *= k;\n right *= k;\n }\n\n const next = [...this.startSizes];\n next[i] = left;\n next[j] = right;\n\n this.sizes = next;\n this.applySizes();\n this.sizesChanged.emit([...this.sizes]);\n this.positionGutters();\n }\n\n /**\n * Stops the dragging process.\n */\n private stopDragging(): void {\n if (!this.isDragging) return;\n this.isDragging = false;\n this.dragIndex = -1;\n this.detachDocumentListeners();\n }\n\n //#endregion\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host data-dragging={this.isDragging.toString()}>\n <slot name=\"pane\"></slot>\n <slot name=\"gutter\"></slot>\n </Host>\n );\n }\n\n //#endregion\n /****************************************************************************/\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nv-split.js","sourceRoot":"","sources":["../../../../src/components/nv-split/nv-split.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,MAAM,EACN,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AAMH,MAAM,OAAO,OAAO;IALpB;QAQE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;WAIG;QAEM,cAAS,GAA8B,YAAY,CAAC;QAE7D;;;;WAIG;QAEH,UAAK,GAAa,EAAE,CAAC;QAUrB;;;WAGG;QAEM,eAAU,GAAW,EAAE,CAAC;QAEjC,YAAY;QACZ,8EAA8E;QAC9E,eAAe;QAGP,eAAU,GAAY,KAAK,CAAC;QAE5B,cAAS,GAAW,CAAC,CAAC,CAAC;QACvB,aAAQ,GAAW,CAAC,CAAC;QACrB,eAAU,GAAa,EAAE,CAAC;QAGlC,4CAA4C;QACpC,cAAS,GAAG,CAAC,CAAa,EAAE,EA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G;IACK,YAAY;QAClB,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO;QAC7B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,YAAY;IACZ,8EAA8E;IAC9E,gBAAgB;IAEhB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,sEAAgB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YAC7C,6DAAM,IAAI,EAAC,MAAM,GAAQ;YACzB,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACtB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Method,\n State,\n Watch,\n} from '@stencil/core';\n\n/**\n * The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel. Slot=“pane” elements have margin: 0 !important by default. This is a necessary technical constraint because CSS margins are not included in the flex-basis calculation, which would distort the sizing of the panes. Solution for the user: Apply margins/padding to the content inside the pane, not to the pane itself.\n * @slot pane - Content of each split pane. Use multiple `<div slot=\"pane\">` elements.\n * @slot gutter - Optional custom content inside every gutter handle.\n */\n@Component({\n tag: 'nv-split',\n styleUrl: 'styles/nv-split.scss',\n shadow: false,\n})\nexport class NvSplit {\n @Element() el: HTMLNvSplitElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Direction of the split layout.\n * - `horizontal`: panes side by side\n * - `vertical`: panes stacked\n */\n @Prop({ reflect: true })\n readonly direction: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Initial sizes of the panes in percentages.\n * Example: `[50, 50]` means two equal panes.\n * Explicitly `reflect: false` (array) for framework compatibility.\n */\n @Prop({ mutable: true, reflect: false })\n sizes: number[] = [];\n\n /**\n * Minimum sizes (in px) for each pane.\n * Example: `[100, 200]` => first pane min 100px, second min 200px.\n * Explicitly `reflect: false` (array) for framework compatibility.\n */\n @Prop({ reflect: false })\n readonly minSizes?: number[];\n\n /**\n * Width or height of the gutter (in px) depending on the split direction.\n * Default is 24px to meet WCAG 2.2 target size requirements for touch accessibility.\n */\n @Prop({ reflect: true })\n readonly gutterSize: number = 24;\n\n //#endregion\n /****************************************************************************/\n //#region STATE\n\n @State()\n private isDragging: boolean = false;\n\n private dragIndex: number = -1;\n private startPos: number = 0;\n private startSizes: number[] = [];\n private ro?: ResizeObserver;\n\n // Handlers stored to be able to detach them\n private onDocMove = (e: MouseEvent) => this.handleMouseMove(e);\n private onDocUp = () => this.stopDragging();\n\n //#endregion\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when pane sizes are updated (drag start/stop or programmatically).\n * @bind sizes\n */\n @Event({ bubbles: false })\n sizesChanged: EventEmitter<number[]>;\n\n //#endregion\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('sizes')\n protected onSizesChanged(): void {\n // Re-apply sizes if modified from the outside\n this.applySizes();\n }\n\n @Watch('direction')\n protected onDirectionChanged(): void {\n // Update the orientation and the cursors of the gutters\n this.ensureGutters();\n this.applySizes();\n }\n\n //#endregion\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentDidLoad(): void {\n // Initialization (once)\n this.ensureGutters();\n\n // Defer applySizes to ensure CSS (margins, padding) is computed\n requestAnimationFrame(() => {\n this.applySizes();\n this.positionGutters();\n });\n\n // Observer: reposition gutters when resized\n this.ro = new ResizeObserver(() => this.positionGutters());\n this.ro.observe(this.el);\n\n window.addEventListener('resize', () => this.positionGutters());\n }\n\n disconnectedCallback(): void {\n // Security cleanup (in case a drag was in progress)\n this.detachDocumentListeners();\n this.ro?.disconnect();\n this.ro = undefined;\n }\n\n //#endregion\n /****************************************************************************/\n //#region PUBLIC METHODS\n\n /**\n * Programmatically set pane sizes.\n * @param {Array<number>} sizes Array of pane sizes in percentages.\n * @returns {Promise<void>}\n */\n @Method()\n async setSizes(sizes: number[]): Promise<void> {\n this.sizes = [...sizes];\n this.applySizes();\n this.sizesChanged.emit([...this.sizes]);\n this.positionGutters();\n }\n\n /**\n * Returns the current pane sizes.\n * @returns {Promise<number[]>} Array of pane sizes in percentages.\n */\n @Method()\n async getSizes(): Promise<number[]> {\n return [...this.sizes];\n }\n\n /**\n * Collapse a specific pane to 0 size.\n * @param {number} index Index of the pane to collapse.\n * @returns {Promise<void>}\n */\n @Method()\n async collapse(index: number): Promise<void> {\n const panes = this.getPanes();\n if (index < 0 || index >= panes.length) return;\n\n // Simple strategy: 0% for the index, the rest (100%) for its nearest neighbor\n const next = new Array(panes.length).fill(0);\n const target = index < panes.length - 1 ? index + 1 : index - 1;\n if (target >= 0) next[target] = 100;\n\n this.sizes = next;\n this.applySizes();\n this.sizesChanged.emit([...this.sizes]);\n this.positionGutters();\n }\n\n /**\n * Destroy the split instance: removes gutters and resets layout state.\n * @returns {Promise<void>}\n */\n @Method()\n async destroy(): Promise<void> {\n this.sizes = [];\n this.isDragging = false;\n this.dragIndex = -1;\n this.removeOwnGutters();\n this.detachDocumentListeners();\n this.ro?.disconnect();\n }\n\n //#endregion\n /****************************************************************************/\n //#region INTERNAL HELPERS\n\n /**\n * Returns the panes of the split.\n * @returns {HTMLElement[]} The panes of the split.\n */\n private getPanes(): HTMLElement[] {\n // Only the direct children slot=\"pane\"\n return Array.from(\n this.el.querySelectorAll<HTMLElement>(':scope > [slot=\"pane\"]'),\n );\n }\n\n /**\n * Returns the own gutters of the split.\n * @returns {HTMLElement[]} The own gutters of the split.\n */\n private getOwnGutters(): HTMLElement[] {\n // Only the direct gutters of THIS instance\n return Array.from(\n this.el.querySelectorAll<HTMLElement>(\n ':scope > .nv-split-gutter[data-auto=\"true\"]',\n ),\n );\n }\n\n /**\n * Removes the own gutters of the split.\n */\n private removeOwnGutters(): void {\n this.getOwnGutters().forEach(g => g.remove());\n }\n\n /**\n * Ensures the gutters of the split.\n */\n private ensureGutters(): void {\n const panes = this.getPanes();\n\n // 1) Clean ONLY the old direct gutters of THIS instance\n this.removeOwnGutters();\n\n if (panes.length <= 1) return;\n\n // 2) Add the gutters (directs) between the panes\n panes.forEach((pane, i) => {\n if (i >= panes.length - 1) return;\n\n const g = document.createElement('div');\n g.className = 'nv-split-gutter';\n g.setAttribute('data-auto', 'true');\n\n if (this.direction === 'horizontal') {\n g.style.width = `${this.gutterSize}px`;\n g.style.cursor = 'col-resize';\n } else {\n g.style.height = `${this.gutterSize}px`;\n g.style.cursor = 'row-resize';\n }\n\n // Customizable internal slot\n const slotEl = document.createElement('slot');\n slotEl.name = 'gutter';\n g.appendChild(slotEl);\n\n // Listener drag (index = gutter between pane i and i+1)\n g.addEventListener('mousedown', (ev: MouseEvent) =>\n this.startDragging(ev, i),\n );\n\n // Insert just after the pane\n pane.insertAdjacentElement('afterend', g);\n });\n\n this.positionGutters();\n }\n\n /**\n * Applies the sizes to the panes.\n */\n private applySizes(): void {\n const panes = this.getPanes();\n const n = panes.length;\n if (n === 0) return;\n\n // Default values if inconsistent\n if (!this.sizes || this.sizes.length !== n) {\n this.sizes = Array(n).fill(100 / n);\n }\n\n panes.forEach((pane, i) => {\n const size = Math.max(0, this.sizes[i] ?? 100 / n);\n pane.style.flex = `0 0 ${size}%`;\n pane.style.minWidth = '0';\n pane.style.minHeight = '0';\n pane.style.overflow = 'hidden';\n pane.style.display = 'flex';\n pane.style.flexDirection = 'column';\n pane.style.boxSizing = 'border-box';\n });\n\n this.positionGutters();\n }\n\n /**\n * Attaches the document listeners.\n */\n private attachDocumentListeners(): void {\n document.addEventListener('mousemove', this.onDocMove);\n document.addEventListener('mouseup', this.onDocUp);\n }\n\n /**\n * Detaches the document listeners.\n */\n private detachDocumentListeners(): void {\n document.removeEventListener('mousemove', this.onDocMove);\n document.removeEventListener('mouseup', this.onDocUp);\n }\n\n /**\n * Positions the gutters based on the current sizes of the panes.\n */\n private positionGutters(): void {\n const panes = this.getPanes();\n const gutters = this.getOwnGutters();\n if (panes.length <= 1 || gutters.length === 0) return;\n\n const horizontal = this.direction === 'horizontal';\n let cumPct = 0;\n\n for (let i = 0; i < gutters.length; i++) {\n const sizePct = this.sizes?.[i] ?? 100 / panes.length;\n cumPct += sizePct;\n\n const g = gutters[i];\n g.style.position = 'absolute';\n\n if (horizontal) {\n g.style.left = `${cumPct}%`;\n g.style.top = '0';\n g.style.bottom = '0';\n g.style.height = '100%';\n g.style.transform = 'translateX(-50%)';\n } else {\n g.style.top = `${cumPct}%`;\n g.style.left = '0';\n g.style.right = '0';\n g.style.width = '100%';\n g.style.transform = 'translateY(-50%)';\n }\n }\n }\n\n /**\n * Starts the dragging process.\n * @param {MouseEvent} e - The mouse event.\n * @param {number} index - The index of the gutter.\n */\n private startDragging(e: MouseEvent, index: number): void {\n e.preventDefault();\n this.isDragging = true;\n this.dragIndex = index;\n this.startPos = this.direction === 'horizontal' ? e.clientX : e.clientY;\n this.startSizes = [...this.sizes];\n this.attachDocumentListeners();\n this.sizesChanged.emit([...this.sizes]);\n }\n\n /**\n * Handles the mouse movement during dragging.\n * @param {MouseEvent} e - The mouse event.\n */\n private handleMouseMove(e: MouseEvent): void {\n if (!this.isDragging || this.dragIndex < 0) return;\n\n const panes = this.getPanes();\n if (panes.length < 2) return;\n\n const rect = this.el.getBoundingClientRect();\n const horizontal = this.direction === 'horizontal';\n const totalPx = Math.max(horizontal ? rect.width : rect.height, 1);\n\n const deltaPx = (horizontal ? e.clientX : e.clientY) - this.startPos;\n const deltaPct = (deltaPx / totalPx) * 100;\n\n const i = this.dragIndex;\n const j = i + 1;\n\n const startLeft = this.startSizes[i];\n const startRight = this.startSizes[j];\n\n // minSizes (px) -> %\n let minLeftPct = ((this.minSizes?.[i] ?? 0) / totalPx) * 100;\n let minRightPct = ((this.minSizes?.[j] ?? 0) / totalPx) * 100;\n\n const minSum = minLeftPct + minRightPct;\n const availableSum = startLeft + startRight;\n if (minSum > availableSum) {\n const scale = availableSum / minSum;\n minLeftPct *= scale;\n minRightPct *= scale;\n }\n\n const minDelta = minLeftPct - startLeft;\n const maxDelta = startRight - minRightPct;\n const clampedDelta = Math.min(Math.max(deltaPct, minDelta), maxDelta);\n\n const left = startLeft + clampedDelta;\n const right = startRight - clampedDelta;\n\n const next = [...this.startSizes];\n next[i] = left;\n next[j] = right;\n\n this.sizes = next;\n this.applySizes();\n this.positionGutters();\n }\n\n /**\n * Stops the dragging process.\n */\n private stopDragging(): void {\n if (!this.isDragging) return;\n this.isDragging = false;\n this.dragIndex = -1;\n this.detachDocumentListeners();\n this.sizesChanged.emit([...this.sizes]);\n }\n\n //#endregion\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host data-dragging={this.isDragging.toString()}>\n <slot name=\"pane\"></slot>\n <slot name=\"gutter\"></slot>\n </Host>\n );\n }\n\n //#endregion\n /****************************************************************************/\n}\n"]}
|
|
@@ -112,12 +112,14 @@ nv-split[data-dragging=true] > .nv-split-gutter::after {
|
|
|
112
112
|
background: var(--components-splitter-line-background-active);
|
|
113
113
|
}
|
|
114
114
|
nv-split > [slot=pane] {
|
|
115
|
+
box-sizing: border-box;
|
|
115
116
|
flex: 1 1 auto;
|
|
116
117
|
overflow: hidden;
|
|
117
118
|
min-width: 0;
|
|
118
119
|
min-height: 0;
|
|
119
120
|
display: flex;
|
|
120
121
|
flex-direction: column;
|
|
122
|
+
margin: 0 !important;
|
|
121
123
|
}
|
|
122
124
|
nv-split > [slot=pane] > nv-split {
|
|
123
125
|
flex: 1 1 auto;
|
|
@@ -4,36 +4,49 @@ const NvStackDocs = {
|
|
|
4
4
|
component: 'nv-stack',
|
|
5
5
|
subcomponents: ['nv-button'],
|
|
6
6
|
stories: [
|
|
7
|
+
// Default
|
|
7
8
|
{
|
|
8
9
|
name: 'Default',
|
|
9
10
|
args: { gutter: 2 },
|
|
10
11
|
template: (h("nv-stack", { "data-storybook-args": true }, h("nv-button", null, "Button"), h("nv-button", null, "Button"), h("nv-button", null, "Button"))),
|
|
11
12
|
},
|
|
13
|
+
// fill
|
|
12
14
|
{
|
|
13
15
|
name: nameof(x => x.fill),
|
|
14
16
|
args: { fill: true },
|
|
15
17
|
template: (h("nv-stack", { vertical: true, gutter: 2 }, h("nv-stack", { "data-storybook-args": true, class: "h-20" }, h("nv-button", null, "Button"), h("nv-button", null, "Button")), h("nv-stack", { "data-storybook-args": true, vertical: true }, h("nv-button", null, "Button"), h("nv-button", null, "Button")))),
|
|
16
18
|
},
|
|
19
|
+
// flex
|
|
17
20
|
{
|
|
18
21
|
name: nameof(x => x.flex),
|
|
19
22
|
args: { flex: true },
|
|
20
23
|
template: (h("nv-stack", { "data-storybook-args": true }, h("nv-button", null, "Button"), h("nv-button", null, "Button"), h("nv-button", null, "Button"))),
|
|
21
24
|
},
|
|
25
|
+
// full
|
|
22
26
|
{
|
|
23
27
|
name: nameof(x => x.full),
|
|
24
28
|
args: { full: true },
|
|
25
29
|
template: (h("nv-stack", { "data-storybook-args": true }, h("nv-button", null, "Button"), h("nv-button", null, "Button"), h("nv-button", null, "Button"))),
|
|
26
30
|
},
|
|
31
|
+
// gutter
|
|
27
32
|
{
|
|
28
33
|
name: nameof(x => x.gutter),
|
|
29
34
|
args: { gutter: 4 },
|
|
30
35
|
template: (h("nv-stack", { "data-storybook-args": true }, h("nv-button", null, "Button"), h("nv-button", null, "Button"), h("nv-button", null, "Button"))),
|
|
31
36
|
},
|
|
37
|
+
// vertical
|
|
32
38
|
{
|
|
33
39
|
name: nameof(x => x.vertical),
|
|
34
40
|
args: { vertical: true },
|
|
35
41
|
template: (h("nv-stack", { "data-storybook-args": true }, h("nv-button", null, "Button"), h("nv-button", null, "Button"), h("nv-button", null, "Button"))),
|
|
36
42
|
},
|
|
43
|
+
// SlotDefault
|
|
44
|
+
{
|
|
45
|
+
name: 'SlotDefault',
|
|
46
|
+
description: 'Default slot for stack content.',
|
|
47
|
+
args: { gutter: 2 },
|
|
48
|
+
template: (h("nv-stack", { "data-storybook-args": true }, h("nv-button", null, "Button 1"), h("nv-button", null, "Button 2"), h("nv-button", null, "Button 3"))),
|
|
49
|
+
},
|
|
37
50
|
],
|
|
38
51
|
};
|
|
39
52
|
export default NvStackDocs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-stack.docs.js","sourceRoot":"","sources":["../../../../src/components/nv-stack/nv-stack.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,WAAW,GAAiC;IAChD,SAAS,EAAE,UAAU;IACrB,aAAa,EAAE,CAAC,WAAW,CAAC;IAC5B,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;YACnB,QAAQ,EAAE,CACR;gBACE,8BAA6B;gBAC7B,8BAA6B;gBAC7B,8BAA6B,CACpB,CACZ;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAC7C,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;YACpB,QAAQ,EAAE,CACR,gBAAU,QAAQ,QAAC,MAAM,EAAE,CAAC;gBAC1B,6CAA8B,KAAK,EAAC,MAAM;oBACxC,8BAA6B;oBAC7B,8BAA6B,CACpB;gBACX,6CAA8B,QAAQ;oBACpC,8BAA6B;oBAC7B,8BAA6B,CACpB,CACF,CACZ;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAC7C,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;YACpB,QAAQ,EAAE,CACR;gBACE,8BAA6B;gBAC7B,8BAA6B;gBAC7B,8BAA6B,CACpB,CACZ;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAC7C,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;YACpB,QAAQ,EAAE,CACR;gBACE,8BAA6B;gBAC7B,8BAA6B;gBAC7B,8BAA6B,CACpB,CACZ;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;YAC/C,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;YACnB,QAAQ,EAAE,CACR;gBACE,8BAA6B;gBAC7B,8BAA6B;gBAC7B,8BAA6B,CACpB,CACZ;SACF;QACD;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACjD,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YACxB,QAAQ,EAAE,CACR;gBACE,8BAA6B;gBAC7B,8BAA6B;gBAC7B,8BAA6B,CACpB,CACZ;SACF;KACF;CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvStackDocs: NovaDocs<Components.NvStack> = {\n component: 'nv-stack',\n subcomponents: ['nv-button'],\n stories: [\n {\n name: 'Default',\n args: { gutter: 2 },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n {\n name: nameof<Components.NvStack>(x => x.fill),\n args: { fill: true },\n template: (\n <nv-stack vertical gutter={2}>\n <nv-stack data-storybook-args class=\"h-20\">\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n <nv-stack data-storybook-args vertical>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n </nv-stack>\n ),\n },\n {\n name: nameof<Components.NvStack>(x => x.flex),\n args: { flex: true },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n {\n name: nameof<Components.NvStack>(x => x.full),\n args: { full: true },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n {\n name: nameof<Components.NvStack>(x => x.gutter),\n args: { gutter: 4 },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n {\n name: nameof<Components.NvStack>(x => x.vertical),\n args: { vertical: true },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n ],\n};\n\nexport default NvStackDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-stack.docs.js","sourceRoot":"","sources":["../../../../src/components/nv-stack/nv-stack.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,WAAW,GAAiC;IAChD,SAAS,EAAE,UAAU;IACrB,aAAa,EAAE,CAAC,WAAW,CAAC;IAC5B,OAAO,EAAE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WAAW;QACX;YACE,IAAI,EAAE,MAAM,CAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;YACjD,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YACxB,QAAQ,EAAE,CACR;gBACE,8BAA6B;gBAC7B,8BAA6B;gBAC7B,8BAA6B,CACpB,CACZ;SACF;QACD,cAAc;QACd;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,iCAAiC;YAC9C,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;YACnB,QAAQ,EAAE,CACR;gBACE,gCAA+B;gBAC/B,gCAA+B;gBAC/B,gCAA+B,CACtB,CACZ;SACF;KACF;CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\nimport { nameof } from '../../utils/class.utils';\n\nconst NvStackDocs: NovaDocs<Components.NvStack> = {\n component: 'nv-stack',\n subcomponents: ['nv-button'],\n stories: [\n // Default\n {\n name: 'Default',\n args: { gutter: 2 },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n // fill\n {\n name: nameof<Components.NvStack>(x => x.fill),\n args: { fill: true },\n template: (\n <nv-stack vertical gutter={2}>\n <nv-stack data-storybook-args class=\"h-20\">\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n <nv-stack data-storybook-args vertical>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n </nv-stack>\n ),\n },\n // flex\n {\n name: nameof<Components.NvStack>(x => x.flex),\n args: { flex: true },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n // full\n {\n name: nameof<Components.NvStack>(x => x.full),\n args: { full: true },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n // gutter\n {\n name: nameof<Components.NvStack>(x => x.gutter),\n args: { gutter: 4 },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n // vertical\n {\n name: nameof<Components.NvStack>(x => x.vertical),\n args: { vertical: true },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n <nv-button>Button</nv-button>\n </nv-stack>\n ),\n },\n // SlotDefault\n {\n name: 'SlotDefault',\n description: 'Default slot for stack content.',\n args: { gutter: 2 },\n template: (\n <nv-stack data-storybook-args>\n <nv-button>Button 1</nv-button>\n <nv-button>Button 2</nv-button>\n <nv-button>Button 3</nv-button>\n </nv-stack>\n ),\n },\n ],\n};\n\nexport default NvStackDocs;\n"]}
|
|
@@ -18,7 +18,7 @@ export class NvStack {
|
|
|
18
18
|
/****************************************************************************/
|
|
19
19
|
//#region RENDER
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '7b44b30e42b8df1c456f70b1f3be986e2fce1617', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, h("slot", { key: 'd38b6f0c043959ed97b3e90d21309ab832713b4e' })));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "nv-stack"; }
|
|
24
24
|
static get originalStyleUrls() {
|