@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-tableheader.js","sourceRoot":"","sources":["../../../../src/components/nv-tableheader/nv-tableheader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAE9E;;GAEG;AAMH,MAAM,OAAO,aAAa;IAL1B;QAME,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEH,kBAAa,GAA4B,MAAM,CAAC;KA2FjD;IAzFC,uBAAuB;IACvB,8EAA8E;IAC9E,iBAAiB;IAET,kBAAkB,CAAC,CAAS;QAClC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC3B,CAAC,
|
|
1
|
+
{"version":3,"file":"nv-tableheader.js","sourceRoot":"","sources":["../../../../src/components/nv-tableheader/nv-tableheader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAE9E;;GAEG;AAMH,MAAM,OAAO,aAAa;IAL1B;QAME,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEH,kBAAa,GAA4B,MAAM,CAAC;KA2FjD;IAzFC,uBAAuB;IACvB,8EAA8E;IAC9E,iBAAiB;IAET,kBAAkB,CAAC,CAAS;QAClC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC3B,CAAC,EAAE,cAAc,EAAE,CAAC;QAEpB,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,MAAM;SACJ,CA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,CAAC,aAAa,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;oBACzD,wCAAwC;oBACxC,WAAW,EAAE,CAAC,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,EAClD,KAAK,EAAE;wBACL,SAAS,EAAE,IAAI,CAAC,aAAa,KAAK,MAAM;wBACxC,SAAS,EAAE,IAAI,CAAC,aAAa,KAAK,MAAM;qBACzC,GACD,CACG,CACR,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n/**\n * @slot default - Child content of the component.\n */\n@Component({\n tag: 'nv-tableheader',\n styleUrl: 'nv-tableheader.scss',\n shadow: false,\n})\nexport class NvTableheader {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Will render the header as sortable with the corresponding icon button.\n * Allows the header to be tabbed, and trigger sorting via click or keyboard\n * navigation\n */\n @Prop({ reflect: true })\n readonly sortable: boolean = false;\n\n /**\n * The current sort direction of the header. Will be 'none' if the header is\n * not sortable or if the sort direction is not set.\n */\n @Prop({ reflect: true, mutable: true })\n sortDirection: 'none' | 'asc' | 'desc' = 'none';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n private cycleSortDirection(e?: Event) {\n if (!this.sortable) return;\n e?.preventDefault();\n\n const next = {\n none: 'asc',\n asc: 'desc',\n desc: 'none',\n } as const;\n\n this.sortDirection = next[this.sortDirection];\n this.sortDirectionChanged.emit(this.sortDirection);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (!this.sortable) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.cycleSortDirection();\n }\n }\n\n get ariaSort() {\n const sortMap = {\n none: 'none',\n asc: 'ascending',\n desc: 'descending',\n } as const;\n\n if (!this.sortable) return sortMap.none;\n return sortMap[this.sortDirection];\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Event emitted when the sort direction changes. Payload is the new sort\n * direction.\n */\n @Event({ bubbles: false })\n sortDirectionChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"columnheader\"\n aria-sort={this.ariaSort}\n tabindex={this.sortable ? 0 : undefined}\n onKeyDown={this.handleKeyDown.bind(this)}\n onClick={this.cycleSortDirection.bind(this)}\n >\n <slot></slot>\n\n {this.sortable && (\n <span class=\"sort-icon-wrap\" aria-hidden=\"true\">\n <nv-iconbutton\n disableTabindex\n name=\"arrow-up\"\n size=\"xs\"\n emphasis={this.sortDirection === 'none' ? 'lower' : 'low'}\n // prevent mousedown from selecting text\n onMouseDown={(e: MouseEvent) => e.preventDefault()}\n class={{\n 'is-none': this.sortDirection === 'none',\n 'is-desc': this.sortDirection === 'desc',\n }}\n />\n </span>\n )}\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
|
|
@@ -3,57 +3,88 @@ import { nameof } from "../../utils/class.utils";
|
|
|
3
3
|
const NvToggleDocs = {
|
|
4
4
|
component: 'nv-toggle',
|
|
5
5
|
stories: [
|
|
6
|
+
// Default
|
|
6
7
|
{
|
|
7
8
|
name: 'Default',
|
|
8
9
|
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
9
10
|
},
|
|
11
|
+
// label
|
|
10
12
|
{
|
|
11
13
|
name: nameof(x => x.label),
|
|
12
14
|
description: 'The label displayed next to the toggle.',
|
|
13
15
|
args: { label: 'Label' },
|
|
14
16
|
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
15
17
|
},
|
|
18
|
+
// description
|
|
16
19
|
{
|
|
17
20
|
name: nameof(x => x.description),
|
|
18
21
|
description: 'A description providing additional context or information about the toggle.',
|
|
19
22
|
args: { description: 'Description' },
|
|
20
23
|
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
21
24
|
},
|
|
25
|
+
// checked
|
|
22
26
|
{
|
|
23
27
|
name: nameof(x => x.checked),
|
|
24
28
|
description: 'Indicates whether the toggle is checked or not.',
|
|
25
29
|
args: { checked: true },
|
|
26
30
|
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
27
31
|
},
|
|
32
|
+
// disabled
|
|
28
33
|
{
|
|
29
34
|
name: nameof(x => x.disabled),
|
|
30
35
|
description: 'Disables the toggle, preventing user interaction.',
|
|
31
36
|
args: { disabled: true },
|
|
32
37
|
template: (h("div", { "data-class": "flex gap-4 " }, h("nv-toggle", { "data-storybook-args": true }), h("nv-toggle", { "data-storybook-args": true, checked: true }))),
|
|
33
38
|
},
|
|
39
|
+
// readonly
|
|
34
40
|
{
|
|
35
41
|
name: nameof(x => x.readonly),
|
|
36
42
|
description: 'Sets the toggle to read-only, preventing user changes but still allowing focus and selection of text.',
|
|
37
43
|
args: { readonly: true },
|
|
38
44
|
template: (h("div", { "data-class": "flex gap-4 " }, h("nv-toggle", { "data-storybook-args": true }), h("nv-toggle", { "data-storybook-args": true, checked: true }))),
|
|
39
45
|
},
|
|
46
|
+
// hideLabel
|
|
40
47
|
{
|
|
41
48
|
name: nameof(x => x.hideLabel),
|
|
42
49
|
description: 'Hides the label visually while still keeping it available for screen readers.',
|
|
43
50
|
args: { label: 'Label', hideLabel: true },
|
|
44
51
|
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
45
52
|
},
|
|
53
|
+
// inputId
|
|
54
|
+
{
|
|
55
|
+
name: nameof(x => x.inputId),
|
|
56
|
+
description: 'Sets the ID for the input element. If not provided, a random ID is generated.',
|
|
57
|
+
args: { label: 'Toggle with custom ID', inputId: 'custom-toggle-id' },
|
|
58
|
+
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
59
|
+
},
|
|
60
|
+
// name
|
|
61
|
+
{
|
|
62
|
+
name: nameof(x => x.name),
|
|
63
|
+
description: 'The name attribute for the toggle input, used to reference the form data after submission.',
|
|
64
|
+
args: { label: 'Accept Terms', name: 'accept-terms' },
|
|
65
|
+
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
66
|
+
},
|
|
67
|
+
// value
|
|
68
|
+
{
|
|
69
|
+
name: nameof(x => x.value),
|
|
70
|
+
description: 'The value attribute sent on form submission when the toggle is checked.',
|
|
71
|
+
args: { label: 'Enable Feature', name: 'feature', value: 'enabled' },
|
|
72
|
+
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
73
|
+
},
|
|
74
|
+
// labelPlacement
|
|
46
75
|
{
|
|
47
76
|
name: nameof(x => x.labelPlacement),
|
|
48
77
|
description: 'Determines the position of the label relative to the toggle, either `start` (before) or `end` (after).',
|
|
49
78
|
args: { label: 'Label', labelPlacement: 'before' },
|
|
50
79
|
template: h("nv-toggle", { "data-storybook-args": true }),
|
|
51
80
|
},
|
|
81
|
+
// SlotLabel
|
|
52
82
|
{
|
|
53
83
|
name: 'SlotLabel',
|
|
54
84
|
description: 'You can use the `label` slot to customize the content of the label.',
|
|
55
85
|
template: (h("nv-toggle", { "data-storybook-args": true }, h("span", { slot: "label" }, "Label"))),
|
|
56
86
|
},
|
|
87
|
+
// SlotDescription
|
|
57
88
|
{
|
|
58
89
|
name: 'SlotDescription',
|
|
59
90
|
description: 'You can use the `description` slot to customize the content of the description.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-toggle.docs.js","sourceRoot":"","sources":["../../../../src/components/nv-toggle/nv-toggle.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,YAAY,GAAkC;IAClD,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE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,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;YACzC,QAAQ,EAAE,+CAA2C;SACtD;QACD;YACE,IAAI,EAAE,MAAM,CAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC;YACxD,WAAW,EACT,wGAAwG;YAC1G,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE;YAClD,QAAQ,EAAE,+CAA2C;SACtD;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EACT,qEAAqE;YACvE,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,OAAO,YAAa,CACrB,CACb;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,WAAW,EACT,iFAAiF;YACnF,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,kBAAmB,CACjC,CACb;SACF;KACF;CACF,CAAC;AAEF,eAAe,YAAY,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 NvToggleDocs: NovaDocs<Components.NvToggle> = {\n component: 'nv-toggle',\n stories: [\n {\n name: 'Default',\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n {\n name: nameof<Components.NvToggle>(x => x.label),\n description: 'The label displayed next to the toggle.',\n args: { label: 'Label' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n {\n name: nameof<Components.NvToggle>(x => x.description),\n description:\n 'A description providing additional context or information about the toggle.',\n args: { description: 'Description' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n {\n name: nameof<Components.NvToggle>(x => x.checked),\n description: 'Indicates whether the toggle is checked or not.',\n args: { checked: true },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n {\n name: nameof<Components.NvToggle>(x => x.disabled),\n description: 'Disables the toggle, preventing user interaction.',\n args: { disabled: true },\n template: (\n <div data-class=\"flex gap-4 \">\n <nv-toggle data-storybook-args></nv-toggle>\n <nv-toggle data-storybook-args checked></nv-toggle>\n </div>\n ),\n },\n {\n name: nameof<Components.NvToggle>(x => x.readonly),\n description:\n 'Sets the toggle to read-only, preventing user changes but still allowing focus and selection of text.',\n args: { readonly: true },\n template: (\n <div data-class=\"flex gap-4 \">\n <nv-toggle data-storybook-args></nv-toggle>\n <nv-toggle data-storybook-args checked></nv-toggle>\n </div>\n ),\n },\n {\n name: nameof<Components.NvToggle>(x => x.hideLabel),\n description:\n 'Hides the label visually while still keeping it available for screen readers.',\n args: { label: 'Label', hideLabel: true },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n {\n name: nameof<Components.NvToggle>(x => x.labelPlacement),\n description:\n 'Determines the position of the label relative to the toggle, either `start` (before) or `end` (after).',\n args: { label: 'Label', labelPlacement: 'before' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n {\n name: 'SlotLabel',\n description:\n 'You can use the `label` slot to customize the content of the label.',\n template: (\n <nv-toggle data-storybook-args>\n <span slot=\"label\">Label</span>\n </nv-toggle>\n ),\n },\n {\n name: 'SlotDescription',\n description:\n 'You can use the `description` slot to customize the content of the description.',\n template: (\n <nv-toggle data-storybook-args>\n <span slot=\"description\">Description</span>\n </nv-toggle>\n ),\n },\n ],\n};\n\nexport default NvToggleDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-toggle.docs.js","sourceRoot":"","sources":["../../../../src/components/nv-toggle/nv-toggle.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,YAAY,GAAkC;IAClD,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE;QACP,UAAU;QACV;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,+CAA2C;SACtD;QACD,QAAQ;QACR;YACE,IAAI,EAAE,M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iBAAiB;YACvB,WAAW,EACT,iFAAiF;YACnF,QAAQ,EAAE,CACR;gBACE,YAAM,IAAI,EAAC,aAAa,kBAAmB,CACjC,CACb;SACF;KACF;CACF,CAAC;AAEF,eAAe,YAAY,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 NvToggleDocs: NovaDocs<Components.NvToggle> = {\n component: 'nv-toggle',\n stories: [\n // Default\n {\n name: 'Default',\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // label\n {\n name: nameof<Components.NvToggle>(x => x.label),\n description: 'The label displayed next to the toggle.',\n args: { label: 'Label' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // description\n {\n name: nameof<Components.NvToggle>(x => x.description),\n description:\n 'A description providing additional context or information about the toggle.',\n args: { description: 'Description' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // checked\n {\n name: nameof<Components.NvToggle>(x => x.checked),\n description: 'Indicates whether the toggle is checked or not.',\n args: { checked: true },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // disabled\n {\n name: nameof<Components.NvToggle>(x => x.disabled),\n description: 'Disables the toggle, preventing user interaction.',\n args: { disabled: true },\n template: (\n <div data-class=\"flex gap-4 \">\n <nv-toggle data-storybook-args></nv-toggle>\n <nv-toggle data-storybook-args checked></nv-toggle>\n </div>\n ),\n },\n // readonly\n {\n name: nameof<Components.NvToggle>(x => x.readonly),\n description:\n 'Sets the toggle to read-only, preventing user changes but still allowing focus and selection of text.',\n args: { readonly: true },\n template: (\n <div data-class=\"flex gap-4 \">\n <nv-toggle data-storybook-args></nv-toggle>\n <nv-toggle data-storybook-args checked></nv-toggle>\n </div>\n ),\n },\n // hideLabel\n {\n name: nameof<Components.NvToggle>(x => x.hideLabel),\n description:\n 'Hides the label visually while still keeping it available for screen readers.',\n args: { label: 'Label', hideLabel: true },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // inputId\n {\n name: nameof<Components.NvToggle>(x => x.inputId),\n description:\n 'Sets the ID for the input element. If not provided, a random ID is generated.',\n args: { label: 'Toggle with custom ID', inputId: 'custom-toggle-id' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // name\n {\n name: nameof<Components.NvToggle>(x => x.name),\n description:\n 'The name attribute for the toggle input, used to reference the form data after submission.',\n args: { label: 'Accept Terms', name: 'accept-terms' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // value\n {\n name: nameof<Components.NvToggle>(x => x.value),\n description:\n 'The value attribute sent on form submission when the toggle is checked.',\n args: { label: 'Enable Feature', name: 'feature', value: 'enabled' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // labelPlacement\n {\n name: nameof<Components.NvToggle>(x => x.labelPlacement),\n description:\n 'Determines the position of the label relative to the toggle, either `start` (before) or `end` (after).',\n args: { label: 'Label', labelPlacement: 'before' },\n template: <nv-toggle data-storybook-args></nv-toggle>,\n },\n // SlotLabel\n {\n name: 'SlotLabel',\n description:\n 'You can use the `label` slot to customize the content of the label.',\n template: (\n <nv-toggle data-storybook-args>\n <span slot=\"label\">Label</span>\n </nv-toggle>\n ),\n },\n // SlotDescription\n {\n name: 'SlotDescription',\n description:\n 'You can use the `description` slot to customize the content of the description.',\n template: (\n <nv-toggle data-storybook-args>\n <span slot=\"description\">Description</span>\n </nv-toggle>\n ),\n },\n ],\n};\n\nexport default NvToggleDocs;\n"]}
|
|
@@ -60,8 +60,8 @@ export class NvToggle {
|
|
|
60
60
|
/****************************************************************************/
|
|
61
61
|
//#region RENDER
|
|
62
62
|
render() {
|
|
63
|
-
return (h(Host, { key: '
|
|
64
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
63
|
+
return (h(Host, { key: 'bf104d1513a3cf741c6b42ab48554c40d19263d1', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, h("div", { key: '8c7e9684887e0d454a69101fb83f290d26236841', class: "input-container" }, h("input", { key: '5771d8999e03247600a2b98d0eae985ff0345e28', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), h("div", { key: '8c95821037235c2eab053bce5bb7a0dc15173ea4', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '36c1d110f4c9151e1d05c665546f01f323999b15', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, h("slot", { key: '4fe3f5fab8c1a20480c9eba085221afc36caae73', name: "label" }, this.label))), (this.description ||
|
|
64
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '63dc983d3b09327f57bd62feb7a25865f90390a7', class: "description" }, h("slot", { key: 'e85b616e8bf1301e53f62a2c4e1ea87675b1dcff', name: "description" }, this.description))))));
|
|
65
65
|
}
|
|
66
66
|
static get is() { return "nv-toggle"; }
|
|
67
67
|
static get formAssociated() { return true; }
|
|
@@ -51,7 +51,7 @@ export class NvTogglebutton {
|
|
|
51
51
|
/****************************************************************************/
|
|
52
52
|
//#region RENDER
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: 'af68f5f4887be35f48bb74f15f597e7fe575b3fd', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, h("slot", { key: '624ab0edc86bf9b5686f3f99097adf82ea972764' })));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "nv-togglebutton"; }
|
|
57
57
|
static get originalStyleUrls() {
|
|
@@ -20,9 +20,10 @@ nv-togglebutton[size=xs] nv-icon > svg {
|
|
|
20
20
|
stroke-width: 1.2px;
|
|
21
21
|
}
|
|
22
22
|
nv-togglebutton[size=xs] {
|
|
23
|
-
padding-top: calc(var(--togglegroup-xs-button-padding-y) -
|
|
24
|
-
padding-bottom: calc(var(--togglegroup-xs-button-padding-y) -
|
|
25
|
-
border-radius:
|
|
23
|
+
padding-top: calc(var(--togglegroup-xs-button-padding-y) - var(--togglegroup-stroke));
|
|
24
|
+
padding-bottom: calc(var(--togglegroup-xs-button-padding-y) - var(--togglegroup-stroke));
|
|
25
|
+
border-radius: var(--togglegroup-xs-button-radius);
|
|
26
|
+
height: calc((var(--togglegroup-xs-height)) - var(--togglegroup-inner-space));
|
|
26
27
|
border-width: 0;
|
|
27
28
|
}
|
|
28
29
|
nv-togglebutton[size=sm] {
|
|
@@ -39,9 +40,10 @@ nv-togglebutton[size=sm] nv-icon > svg {
|
|
|
39
40
|
stroke-width: 1.5px;
|
|
40
41
|
}
|
|
41
42
|
nv-togglebutton[size=sm] {
|
|
42
|
-
padding-top: calc(var(--togglegroup-sm-button-padding-y) -
|
|
43
|
-
padding-bottom: calc(var(--togglegroup-sm-button-padding-y) -
|
|
44
|
-
border-radius: calc(var(--togglegroup-sm-button-radius));
|
|
43
|
+
padding-top: calc(var(--togglegroup-sm-button-padding-y) - var(--togglegroup-stroke));
|
|
44
|
+
padding-bottom: calc(var(--togglegroup-sm-button-padding-y) - var(--togglegroup-stroke));
|
|
45
|
+
border-radius: calc(var(--togglegroup-sm-button-radius) + 1px);
|
|
46
|
+
height: calc((var(--togglegroup-sm-height)) - var(--togglegroup-inner-space));
|
|
45
47
|
border-width: 0;
|
|
46
48
|
}
|
|
47
49
|
nv-togglebutton[size=md] {
|
|
@@ -58,9 +60,10 @@ nv-togglebutton[size=md] nv-icon > svg {
|
|
|
58
60
|
stroke-width: 1.6px;
|
|
59
61
|
}
|
|
60
62
|
nv-togglebutton[size=md] {
|
|
61
|
-
padding-top: calc(var(--togglegroup-md-button-padding-y) -
|
|
62
|
-
padding-bottom: calc(var(--togglegroup-md-button-padding-y) -
|
|
63
|
-
border-radius: calc(var(--togglegroup-md-button-radius));
|
|
63
|
+
padding-top: calc(var(--togglegroup-md-button-padding-y) - var(--togglegroup-stroke));
|
|
64
|
+
padding-bottom: calc(var(--togglegroup-md-button-padding-y) - var(--togglegroup-stroke));
|
|
65
|
+
border-radius: calc(var(--togglegroup-md-button-radius) + 1px);
|
|
66
|
+
height: calc((var(--togglegroup-md-height)) - var(--togglegroup-inner-space));
|
|
64
67
|
border-width: 0;
|
|
65
68
|
}
|
|
66
69
|
nv-togglebutton[size=lg] {
|
|
@@ -77,9 +80,10 @@ nv-togglebutton[size=lg] nv-icon > svg {
|
|
|
77
80
|
stroke-width: 1.8px;
|
|
78
81
|
}
|
|
79
82
|
nv-togglebutton[size=lg] {
|
|
80
|
-
padding-top: calc(var(--togglegroup-lg-button-padding-y) -
|
|
81
|
-
padding-bottom: calc(var(--togglegroup-lg-button-padding-y) -
|
|
82
|
-
border-radius: calc(var(--togglegroup-lg-button-radius));
|
|
83
|
+
padding-top: calc(var(--togglegroup-lg-button-padding-y) - var(--togglegroup-stroke));
|
|
84
|
+
padding-bottom: calc(var(--togglegroup-lg-button-padding-y) - var(--togglegroup-stroke));
|
|
85
|
+
border-radius: calc(var(--togglegroup-lg-button-radius) + 1px);
|
|
86
|
+
height: calc((var(--togglegroup-lg-height)) - var(--togglegroup-inner-space));
|
|
83
87
|
border-width: 0;
|
|
84
88
|
}
|
|
85
89
|
nv-togglebutton[emphasis=high] {
|
|
@@ -6,10 +6,12 @@ const NvTogglebuttongroupDocs = {
|
|
|
6
6
|
subcomponents: ['nv-togglebutton', 'nv-icon'],
|
|
7
7
|
badge: 'new',
|
|
8
8
|
stories: [
|
|
9
|
+
// Default
|
|
9
10
|
{
|
|
10
11
|
name: 'Default',
|
|
11
12
|
template: (h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" })))),
|
|
12
13
|
},
|
|
14
|
+
// value
|
|
13
15
|
{
|
|
14
16
|
name: nameof(x => x.value),
|
|
15
17
|
args: {
|
|
@@ -18,6 +20,7 @@ const NvTogglebuttongroupDocs = {
|
|
|
18
20
|
},
|
|
19
21
|
template: (h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" })))),
|
|
20
22
|
},
|
|
23
|
+
// exclusive
|
|
21
24
|
{
|
|
22
25
|
name: nameof(x => x.exclusive),
|
|
23
26
|
args: {
|
|
@@ -25,6 +28,7 @@ const NvTogglebuttongroupDocs = {
|
|
|
25
28
|
},
|
|
26
29
|
template: (h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "android" }, "Android"), h("nv-togglebutton", { value: "ios" }, "iOS"), h("nv-togglebutton", { value: "win" }, "Windows"))),
|
|
27
30
|
},
|
|
31
|
+
// enforceValue
|
|
28
32
|
{
|
|
29
33
|
name: nameof(x => x.enforceValue),
|
|
30
34
|
args: {
|
|
@@ -33,8 +37,19 @@ const NvTogglebuttongroupDocs = {
|
|
|
33
37
|
},
|
|
34
38
|
template: (h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "android" }, "Android"), h("nv-togglebutton", { value: "ios" }, "iOS"), h("nv-togglebutton", { value: "win" }, "Windows"))),
|
|
35
39
|
},
|
|
40
|
+
// emphasis
|
|
36
41
|
{
|
|
37
|
-
name:
|
|
42
|
+
name: nameof(x => x.emphasis),
|
|
43
|
+
template: (h("div", { "data-class": "flex flex-col gap-4" }, h("nv-togglebuttongroup", { "data-storybook-args": true, emphasis: "low" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))), h("nv-togglebuttongroup", { "data-storybook-args": true, emphasis: "high" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))))),
|
|
44
|
+
},
|
|
45
|
+
// size
|
|
46
|
+
{
|
|
47
|
+
name: nameof(x => x.size),
|
|
48
|
+
template: (h("div", { "data-class": "flex flex-col gap-4" }, h("nv-togglebuttongroup", { "data-storybook-args": true, size: "xs" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))), h("nv-togglebuttongroup", { "data-storybook-args": true, size: "sm" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))), h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))), h("nv-togglebuttongroup", { "data-storybook-args": true, size: "lg" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))))),
|
|
49
|
+
},
|
|
50
|
+
// EnforceValueWithExclusive
|
|
51
|
+
{
|
|
52
|
+
name: 'EnforceValueWithExclusive',
|
|
38
53
|
args: {
|
|
39
54
|
enforceValue: true,
|
|
40
55
|
exclusive: true,
|
|
@@ -42,13 +57,11 @@ const NvTogglebuttongroupDocs = {
|
|
|
42
57
|
},
|
|
43
58
|
template: (h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "android" }, "Android"), h("nv-togglebutton", { value: "ios" }, "iOS"), h("nv-togglebutton", { value: "win" }, "Windows"))),
|
|
44
59
|
},
|
|
60
|
+
// SlotDefault
|
|
45
61
|
{
|
|
46
|
-
name:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
name: nameof(x => x.size),
|
|
51
|
-
template: (h("div", { "data-class": "flex flex-col gap-4" }, h("nv-togglebuttongroup", { "data-storybook-args": true, size: "xs" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))), h("nv-togglebuttongroup", { "data-storybook-args": true, size: "sm" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))), h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))), h("nv-togglebuttongroup", { "data-storybook-args": true, size: "lg" }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" }))))),
|
|
62
|
+
name: 'SlotDefault',
|
|
63
|
+
description: 'Default slot for nv-togglebutton elements.',
|
|
64
|
+
template: (h("nv-togglebuttongroup", { "data-storybook-args": true }, h("nv-togglebutton", { value: "left" }, h("nv-icon", { name: "align-left" })), h("nv-togglebutton", { value: "center" }, h("nv-icon", { name: "align-center" })), h("nv-togglebutton", { value: "right" }, h("nv-icon", { name: "align-right" })))),
|
|
52
65
|
},
|
|
53
66
|
],
|
|
54
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-togglebuttongroup.docs.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IAAI,EAAC,IAAI;oBACjD,uBAAiB,KAAK,EAAC,MAAM;wBAC3B,eAAS,IAAI,EAAC,YAAY,GAAW,CACrB;oBAClB,uBAAiB,KAAK,EAAC,QAAQ;wBAC7B,eAAS,IAAI,EAAC,cAAc,GAAW,CACvB;oBAClB,uBAAiB,KAAK,EAAC,OAAO;wBAC5B,eAAS,IAAI,EAAC,aAAa,GAAW,CACtB,CACG,CACnB,CACP;SACF;KACF;CACF,CAAC;AAEF,eAAe,uBAAuB,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 NvTogglebuttongroupDocs: NovaDocs<Components.NvTogglebuttongroup> = {\n component: 'nv-togglebuttongroup',\n composedComponents: ['nv-togglebutton'],\n subcomponents: ['nv-togglebutton', 'nv-icon'],\n badge: 'new',\n stories: [\n {\n name: 'Default',\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.value),\n args: {\n value: ['left', 'center'],\n size: 'md',\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.exclusive),\n args: {\n exclusive: true,\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"android\">Android</nv-togglebutton>\n <nv-togglebutton value=\"ios\">iOS</nv-togglebutton>\n <nv-togglebutton value=\"win\">Windows</nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.enforceValue),\n args: {\n enforceValue: true,\n value: ['ios', 'win'],\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"android\">Android</nv-togglebutton>\n <nv-togglebutton value=\"ios\">iOS</nv-togglebutton>\n <nv-togglebutton value=\"win\">Windows</nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n {\n name: 'enforceValueWithExclusive',\n args: {\n enforceValue: true,\n exclusive: true,\n value: ['ios'],\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"android\">Android</nv-togglebutton>\n <nv-togglebutton value=\"ios\">iOS</nv-togglebutton>\n <nv-togglebutton value=\"win\">Windows</nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.emphasis),\n template: (\n <div data-class=\"flex flex-col gap-4\">\n <nv-togglebuttongroup data-storybook-args emphasis=\"low\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args emphasis=\"high\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n </div>\n ),\n },\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.size),\n template: (\n <div data-class=\"flex flex-col gap-4\">\n <nv-togglebuttongroup data-storybook-args size=\"xs\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args size=\"sm\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args size=\"lg\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n </div>\n ),\n },\n ],\n};\n\nexport default NvTogglebuttongroupDocs;\n"]}
|
|
1
|
+
{"version":3,"file":"nv-togglebuttongroup.docs.js","sourceRoot":"","sources":["../../../../src/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.ts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E,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE;gBACJ,YAAY,EAAE,IAAI;gBAClB,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,CAAC,KAAK,CAAC;aACf;YACD,QAAQ,EAAE,CACR;gBACE,uBAAiB,KAAK,EAAC,SAAS,cAA0B;gBAC1D,uBAAiB,KAAK,EAAC,KAAK,UAAsB;gBAClD,uBAAiB,KAAK,EAAC,KAAK,cAA0B,CACjC,CACxB;SACF;QACD,cAAc;QACd;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,CACR;gBACE,uBAAiB,KAAK,EAAC,MAAM;oBAC3B,eAAS,IAAI,EAAC,YAAY,GAAW,CACrB;gBAClB,uBAAiB,KAAK,EAAC,QAAQ;oBAC7B,eAAS,IAAI,EAAC,cAAc,GAAW,CACvB;gBAClB,uBAAiB,KAAK,EAAC,OAAO;oBAC5B,eAAS,IAAI,EAAC,aAAa,GAAW,CACtB,CACG,CACxB;SACF;KACF;CACF,CAAC;AAEF,eAAe,uBAAuB,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 NvTogglebuttongroupDocs: NovaDocs<Components.NvTogglebuttongroup> = {\n component: 'nv-togglebuttongroup',\n composedComponents: ['nv-togglebutton'],\n subcomponents: ['nv-togglebutton', 'nv-icon'],\n badge: 'new',\n stories: [\n // Default\n {\n name: 'Default',\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n // value\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.value),\n args: {\n value: ['left', 'center'],\n size: 'md',\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n // exclusive\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.exclusive),\n args: {\n exclusive: true,\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"android\">Android</nv-togglebutton>\n <nv-togglebutton value=\"ios\">iOS</nv-togglebutton>\n <nv-togglebutton value=\"win\">Windows</nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n // enforceValue\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.enforceValue),\n args: {\n enforceValue: true,\n value: ['ios', 'win'],\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"android\">Android</nv-togglebutton>\n <nv-togglebutton value=\"ios\">iOS</nv-togglebutton>\n <nv-togglebutton value=\"win\">Windows</nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n // emphasis\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.emphasis),\n template: (\n <div data-class=\"flex flex-col gap-4\">\n <nv-togglebuttongroup data-storybook-args emphasis=\"low\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args emphasis=\"high\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n </div>\n ),\n },\n // size\n {\n name: nameof<Components.NvTogglebuttongroup>(x => x.size),\n template: (\n <div data-class=\"flex flex-col gap-4\">\n <nv-togglebuttongroup data-storybook-args size=\"xs\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args size=\"sm\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n <nv-togglebuttongroup data-storybook-args size=\"lg\">\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n </div>\n ),\n },\n // EnforceValueWithExclusive\n {\n name: 'EnforceValueWithExclusive',\n args: {\n enforceValue: true,\n exclusive: true,\n value: ['ios'],\n },\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"android\">Android</nv-togglebutton>\n <nv-togglebutton value=\"ios\">iOS</nv-togglebutton>\n <nv-togglebutton value=\"win\">Windows</nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n // SlotDefault\n {\n name: 'SlotDefault',\n description: 'Default slot for nv-togglebutton elements.',\n template: (\n <nv-togglebuttongroup data-storybook-args>\n <nv-togglebutton value=\"left\">\n <nv-icon name=\"align-left\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"center\">\n <nv-icon name=\"align-center\"></nv-icon>\n </nv-togglebutton>\n <nv-togglebutton value=\"right\">\n <nv-icon name=\"align-right\"></nv-icon>\n </nv-togglebutton>\n </nv-togglebuttongroup>\n ),\n },\n ],\n};\n\nexport default NvTogglebuttongroupDocs;\n"]}
|
|
@@ -31,11 +31,10 @@ export class NvTogglebuttongroup {
|
|
|
31
31
|
*/
|
|
32
32
|
this.setActiveToggleButtons = () => {
|
|
33
33
|
this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {
|
|
34
|
-
var _a;
|
|
35
34
|
const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);
|
|
36
35
|
if (!btn)
|
|
37
36
|
return;
|
|
38
|
-
btn.active = (
|
|
37
|
+
btn.active = (this.value ?? []).includes(btn.value);
|
|
39
38
|
});
|
|
40
39
|
};
|
|
41
40
|
/**
|
|
@@ -152,7 +151,7 @@ export class NvTogglebuttongroup {
|
|
|
152
151
|
/****************************************************************************/
|
|
153
152
|
//#region RENDER
|
|
154
153
|
render() {
|
|
155
|
-
return (h(Host, { key: '
|
|
154
|
+
return (h(Host, { key: '2d4f46a06045c84018b0a5c296b2eb19c2803d7a' }, h("slot", { key: '4f387071fe030057df13c6b3ff5e6f480fcd339b' })));
|
|
156
155
|
}
|
|
157
156
|
static get is() { return "nv-togglebuttongroup"; }
|
|
158
157
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-togglebuttongroup.js","sourceRoot":"","sources":["../../../../src/components/nv-togglebuttongroup/nv-togglebuttongroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,MAAM,EACN,KAAK,EACL,OAAO,EACP,KAAK,GAEN,MAAM,eAAe,CAAC;AAGvB;;GAEG;AAMH,MAAM,OAAO,mBAAmB;IALhC;QAmBE;;WAEG;QAEM,cAAS,GAAY,KAAK,CAAC;QAEpC;;WAEG;QAEM,iBAAY,GAAY,KAAK,CAAC;QAEvC;;WAEG;QAEM,aAAQ,GAA8B,MAAM,CAAC;QAEtD;;;;WAIG;QAEM,SAAI,GAA0B,IAAI,CAAC;QAE5C,uBAAuB;QACvB,8EAA8E;QAC9E,iBAAiB;QAEjB;;;WAGG;QACK,2BAAsB,GAAG,GAAG,EAAE;YACpC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;;gBACnE,MAAM,GAAG,GAAG,mBAAmB,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;gBAC/D,IAAI,CAAC,GAAG;oBAAE,OAAO;gBACjB,GAAG,CAAC,MAAM,GAAG,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF;;WAEG;QACK,6BAAwB,GAAG,GAAG,EAAE;YACtC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;gBACnE,MAAM,GAAG,GAAG,mBAAmB,CAAC,cAAc,CAAC,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AAM,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC7B,CAAC;IACD,8CAA8C;IAE9C,qBAAqB;IACrB,8EAA8E;IAC9E,mBAAmB;IAEnB,iBAAiB;QACf,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC9B,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAC/B,CAAC;IAED,oBAAoB;QAClB,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;IAaD,mBAAmB;IACnB,8EAA8E;IAC9E,gBAAgB;IAEhB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { ToggleButtonEmphasis, ToggleButtonSize } from '../../utils/constants';\n\n/**\n * @slot default - Child content of the component, pass the nv-togglebutton components here.\n */\n@Component({\n tag: 'nv-togglebuttongroup',\n styleUrl: 'styles/nv-togglebuttongroup.scss',\n shadow: false,\n})\nexport class NvTogglebuttongroup {\n @Element() el!: HTMLNvTogglebuttongroupElement;\n private mutationObserver: MutationObserver;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The active toggle buttons in the group. Is an array of one string when in\n * exclusive mode, and an array of strings when in non-exclusive mode.\n */\n @Prop({ reflect: false, mutable: true })\n value: string[];\n\n /**\n * Activates single-selection mode so only one button can be active at a time.\n */\n @Prop({ reflect: true })\n readonly exclusive: boolean = false;\n\n /**\n * Ensures at least one toggle stays selected at all times.\n */\n @Prop({ reflect: true })\n readonly enforceValue: boolean = false;\n\n /**\n * Make it more or less visually prominent to users.\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ToggleButtonEmphasis}` = 'high';\n\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ToggleButtonSize}` = 'md';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Sets the active state of all toggle buttons depending on the value of the\n * group.\n */\n private setActiveToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.active = (this.value ?? []).includes(btn.value);\n });\n };\n\n /**\n * Sets the emphasis of all toggle buttons to the same value.\n */\n private setEmphasisToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.emphasis = this.emphasis;\n });\n };\n\n /**\n * Sets the size of all toggle buttons to the same value.\n */\n private setSizeToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.size = this.size;\n });\n };\n\n /**\n * Sets up the MutationObserver to watch for changes in child elements\n */\n private setupMutationObserver = (): void => {\n this.mutationObserver = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n this.setEmphasisToggleButtons();\n this.setSizeToggleButtons();\n }\n });\n });\n\n this.mutationObserver.observe(this.el, {\n childList: true,\n subtree: true,\n });\n };\n\n /**\n * Narrow Type used locally to interact with nv-togglebutton child elements.\n * @param {Element} element - The element to check.\n * @returns {(HTMLElement & {\n * active: boolean;\n * value: string;\n * emphasis: `${ToggleButtonEmphasis}`;\n * size: `${ToggleButtonSize}`;\n * }) | null} The element as a toggle button, or null if it is not a toggle button.\n */\n private static asToggleButton(element: Element):\n | (HTMLElement & {\n /**\n * Whether the button is active or not. Will not toggle automatically but\n * needs to be controlled externally.\n */\n active: boolean;\n /**\n * The value to associated with the button when selected in a\n * Togglebuttongroup.\n */\n value: string;\n /**\n * Make it more or less visually prominent to users.\n */\n emphasis: `${ToggleButtonEmphasis}`;\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n size: `${ToggleButtonSize}`;\n })\n | null {\n return element instanceof HTMLElement\n ? (element as unknown as HTMLElement & {\n /**\n * Whether the button is active or not. Will not toggle automatically but\n * needs to be controlled externally.\n */\n active: boolean;\n /**\n * The value to associated with the button when selected in a\n * Togglebuttongroup.\n */\n value: string;\n /**\n * Make it more or less visually prominent to users.\n */\n emphasis: `${ToggleButtonEmphasis}`;\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n size: `${ToggleButtonSize}`;\n })\n : null;\n }\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n onValueChanged(newValue: typeof this.value) {\n this.setActiveToggleButtons();\n this.valueChanged.emit(newValue);\n }\n\n @Watch('emphasis')\n onEmphasisChanged() {\n this.setEmphasisToggleButtons();\n }\n\n @Watch('size')\n onSizeChanged() {\n this.setSizeToggleButtons();\n }\n\n /* eslint-disable nova/native-event-listener */\n @Listen('toggled')\n onToggled(event: CustomEvent<HTMLNvTogglebuttonElementEventMap['toggled']>) {\n event.stopPropagation();\n\n const valueSet = new Set(this.value);\n\n if (this.exclusive && this.enforceValue) {\n this.value = [event.detail.value];\n return;\n }\n\n if (this.exclusive) {\n if (valueSet.has(event.detail.value)) {\n this.value = [];\n } else {\n this.value = [event.detail.value];\n }\n return;\n }\n\n toggle: if (event.detail.active) {\n if (this.enforceValue && valueSet.size === 1) break toggle;\n valueSet.delete(event.detail.value);\n } else {\n valueSet.add(event.detail.value);\n }\n this.value = [...valueSet];\n }\n /* eslint-enable nova/native-event-listener */\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.setActiveToggleButtons();\n this.setEmphasisToggleButtons();\n this.setSizeToggleButtons();\n this.setupMutationObserver();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the selected toggle buttons change.\n * @bind value\n */\n @Event({ bubbles: false })\n valueChanged: EventEmitter<string[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n\n // #endregion RENDER\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nv-togglebuttongroup.js","sourceRoot":"","sources":["../../../../src/components/nv-togglebuttongroup/nv-togglebuttongroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,MAAM,EACN,KAAK,EACL,OAAO,EACP,KAAK,GAEN,MAAM,eAAe,CAAC;AAGvB;;GAEG;AAMH,MAAM,OAAO,mBAAmB;IALhC;QAmBE;;WAEG;QAEM,cAAS,GAAY,KAAK,CAAC;QAEpC;;WAEG;QAEM,iBAAY,GAAY,KAAK,CAAC;QAEvC;;WAEG;QAEM,aAAQ,GAA8B,MAAM,CAAC;QAEtD;;;;WAIG;QAEM,SAAI,GAA0B,IAAI,CAAC;QAE5C,uBAAuB;QACvB,8EAA8E;QAC9E,iBAAiB;QAEjB;;;WAGG;QACK,2BAAsB,GAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { ToggleButtonEmphasis, ToggleButtonSize } from '../../utils/constants';\n\n/**\n * @slot default - Child content of the component, pass the nv-togglebutton components here.\n */\n@Component({\n tag: 'nv-togglebuttongroup',\n styleUrl: 'styles/nv-togglebuttongroup.scss',\n shadow: false,\n})\nexport class NvTogglebuttongroup {\n @Element() el!: HTMLNvTogglebuttongroupElement;\n private mutationObserver: MutationObserver;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The active toggle buttons in the group. Is an array of one string when in\n * exclusive mode, and an array of strings when in non-exclusive mode.\n */\n @Prop({ reflect: false, mutable: true })\n value: string[];\n\n /**\n * Activates single-selection mode so only one button can be active at a time.\n */\n @Prop({ reflect: true })\n readonly exclusive: boolean = false;\n\n /**\n * Ensures at least one toggle stays selected at all times.\n */\n @Prop({ reflect: true })\n readonly enforceValue: boolean = false;\n\n /**\n * Make it more or less visually prominent to users.\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ToggleButtonEmphasis}` = 'high';\n\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ToggleButtonSize}` = 'md';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Sets the active state of all toggle buttons depending on the value of the\n * group.\n */\n private setActiveToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.active = (this.value ?? []).includes(btn.value);\n });\n };\n\n /**\n * Sets the emphasis of all toggle buttons to the same value.\n */\n private setEmphasisToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.emphasis = this.emphasis;\n });\n };\n\n /**\n * Sets the size of all toggle buttons to the same value.\n */\n private setSizeToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.size = this.size;\n });\n };\n\n /**\n * Sets up the MutationObserver to watch for changes in child elements\n */\n private setupMutationObserver = (): void => {\n this.mutationObserver = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n this.setEmphasisToggleButtons();\n this.setSizeToggleButtons();\n }\n });\n });\n\n this.mutationObserver.observe(this.el, {\n childList: true,\n subtree: true,\n });\n };\n\n /**\n * Narrow Type used locally to interact with nv-togglebutton child elements.\n * @param {Element} element - The element to check.\n * @returns {(HTMLElement & {\n * active: boolean;\n * value: string;\n * emphasis: `${ToggleButtonEmphasis}`;\n * size: `${ToggleButtonSize}`;\n * }) | null} The element as a toggle button, or null if it is not a toggle button.\n */\n private static asToggleButton(element: Element):\n | (HTMLElement & {\n /**\n * Whether the button is active or not. Will not toggle automatically but\n * needs to be controlled externally.\n */\n active: boolean;\n /**\n * The value to associated with the button when selected in a\n * Togglebuttongroup.\n */\n value: string;\n /**\n * Make it more or less visually prominent to users.\n */\n emphasis: `${ToggleButtonEmphasis}`;\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n size: `${ToggleButtonSize}`;\n })\n | null {\n return element instanceof HTMLElement\n ? (element as unknown as HTMLElement & {\n /**\n * Whether the button is active or not. Will not toggle automatically but\n * needs to be controlled externally.\n */\n active: boolean;\n /**\n * The value to associated with the button when selected in a\n * Togglebuttongroup.\n */\n value: string;\n /**\n * Make it more or less visually prominent to users.\n */\n emphasis: `${ToggleButtonEmphasis}`;\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n size: `${ToggleButtonSize}`;\n })\n : null;\n }\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n onValueChanged(newValue: typeof this.value) {\n this.setActiveToggleButtons();\n this.valueChanged.emit(newValue);\n }\n\n @Watch('emphasis')\n onEmphasisChanged() {\n this.setEmphasisToggleButtons();\n }\n\n @Watch('size')\n onSizeChanged() {\n this.setSizeToggleButtons();\n }\n\n /* eslint-disable nova/native-event-listener */\n @Listen('toggled')\n onToggled(event: CustomEvent<HTMLNvTogglebuttonElementEventMap['toggled']>) {\n event.stopPropagation();\n\n const valueSet = new Set(this.value);\n\n if (this.exclusive && this.enforceValue) {\n this.value = [event.detail.value];\n return;\n }\n\n if (this.exclusive) {\n if (valueSet.has(event.detail.value)) {\n this.value = [];\n } else {\n this.value = [event.detail.value];\n }\n return;\n }\n\n toggle: if (event.detail.active) {\n if (this.enforceValue && valueSet.size === 1) break toggle;\n valueSet.delete(event.detail.value);\n } else {\n valueSet.add(event.detail.value);\n }\n this.value = [...valueSet];\n }\n /* eslint-enable nova/native-event-listener */\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.setActiveToggleButtons();\n this.setEmphasisToggleButtons();\n this.setSizeToggleButtons();\n this.setupMutationObserver();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the selected toggle buttons change.\n * @bind value\n */\n @Event({ bubbles: false })\n valueChanged: EventEmitter<string[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n\n // #endregion RENDER\n}\n"]}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/* Not USED */
|
|
2
|
-
/*
|
|
3
|
-
$components-background: (
|
|
4
|
-
"high": var(--components-button-high-background),
|
|
5
|
-
"low": var(--components-button-low-background)
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
$components-border: (
|
|
9
|
-
"high": var(--components-button-high-border),
|
|
10
|
-
"low": var(--components-button-low-border)
|
|
11
|
-
);
|
|
12
|
-
*/
|
|
13
1
|
nv-togglebuttongroup {
|
|
14
2
|
display: flex;
|
|
15
3
|
gap: var(--togglegroup-lg-gap);
|
|
@@ -27,19 +15,23 @@ nv-togglebuttongroup[size=xs] {
|
|
|
27
15
|
padding: calc(var(--togglegroup-xs-padding) - 1px);
|
|
28
16
|
gap: var(--togglegroup-xs-gap);
|
|
29
17
|
border-radius: var(--togglegroup-xs-radius);
|
|
18
|
+
height: var(--togglegroup-xs-height);
|
|
30
19
|
}
|
|
31
20
|
nv-togglebuttongroup[size=sm] {
|
|
32
21
|
padding: calc(var(--togglegroup-sm-padding) - 1px);
|
|
33
22
|
gap: var(--togglegroup-sm-gap);
|
|
34
23
|
border-radius: var(--togglegroup-sm-radius);
|
|
24
|
+
height: var(--togglegroup-sm-height);
|
|
35
25
|
}
|
|
36
26
|
nv-togglebuttongroup[size=md] {
|
|
37
27
|
padding: calc(var(--togglegroup-md-padding) - 1px);
|
|
38
28
|
gap: var(--togglegroup-md-gap);
|
|
39
29
|
border-radius: var(--togglegroup-md-radius);
|
|
30
|
+
height: var(--togglegroup-md-height);
|
|
40
31
|
}
|
|
41
32
|
nv-togglebuttongroup[size=lg] {
|
|
42
33
|
padding: calc(var(--togglegroup-lg-padding) - 1px);
|
|
43
34
|
gap: var(--togglegroup-lg-gap);
|
|
44
35
|
border-radius: var(--togglegroup-lg-radius);
|
|
36
|
+
height: var(--togglegroup-lg-height);
|
|
45
37
|
}
|
|
@@ -4,21 +4,44 @@ const NvTooltipDocs = {
|
|
|
4
4
|
component: 'nv-tooltip',
|
|
5
5
|
subcomponents: ['nv-button'],
|
|
6
6
|
stories: [
|
|
7
|
+
// Default
|
|
7
8
|
{
|
|
8
9
|
name: 'Default',
|
|
9
10
|
args: { message: 'This is a tooltip.' },
|
|
10
11
|
template: (h("nv-tooltip", { "data-storybook-args": true, "data-class": "py-6" }, h("nv-button", null, "Hover Me"))),
|
|
11
12
|
},
|
|
13
|
+
// message
|
|
12
14
|
{
|
|
13
15
|
name: nameof(x => x.message),
|
|
14
16
|
args: { message: 'This is a tooltip. You can focus or hover' },
|
|
15
17
|
template: (h("nv-tooltip", { "data-storybook-args": true, "data-class": "py-6" }, h("nv-button", null, "Hover Me"))),
|
|
16
18
|
},
|
|
19
|
+
// placement
|
|
17
20
|
{
|
|
18
21
|
name: nameof(x => x.placement),
|
|
19
22
|
args: { message: 'Place Me!' },
|
|
20
23
|
template: (h("div", { "data-class": "flex py-6 gap-4" }, h("nv-tooltip", { "data-storybook-args": true, placement: "bottom" }, h("nv-button", null, "Bottom")), h("nv-tooltip", { "data-storybook-args": true, placement: "left" }, h("nv-button", null, "Left")), h("nv-tooltip", { "data-storybook-args": true, placement: "right" }, h("nv-button", null, "Right")), h("nv-tooltip", { "data-storybook-args": true, placement: "top" }, h("nv-button", null, "Top")))),
|
|
21
24
|
},
|
|
25
|
+
// enterDelay
|
|
26
|
+
{
|
|
27
|
+
name: nameof(x => x.enterDelay),
|
|
28
|
+
args: { enterDelay: 500, message: 'Delayed!' },
|
|
29
|
+
template: (h("div", { "data-class": "flex py-6 gap-4" }, h("nv-tooltip", { "data-storybook-args": true }, h("nv-button", null, "Hover Me")), h("nv-tooltip", { "data-storybook-args": true }, h("nv-button", null, "Hover Me")))),
|
|
30
|
+
},
|
|
31
|
+
// strategy
|
|
32
|
+
{
|
|
33
|
+
name: nameof(x => x.strategy),
|
|
34
|
+
args: { message: 'Strategy demo!' },
|
|
35
|
+
template: (h("div", { "data-class": "flex gap-8 items-start py-6" }, h("div", { "data-class": "relative" }, h("h4", { "data-class": "mb-2 text-sm font-medium" }, "Absolute Strategy (Default)"), h("div", { "data-class": "w-48 h-32 overflow-hidden border border-gray-300 rounded p-4" }, h("p", { "data-class": "mb-2 text-xs" }, "Scroll container with overflow hidden"), h("nv-tooltip", { "data-storybook-args": true, strategy: "absolute", placement: "right" }, h("nv-button", null, "Hover Me")))), h("div", { "data-class": "relative" }, h("h4", { "data-class": "mb-2 text-sm font-medium" }, "Fixed Strategy"), h("div", { "data-class": "w-48 h-32 overflow-hidden border border-gray-300 rounded p-4" }, h("p", { "data-class": "mb-2 text-xs" }, "Scroll container with overflow hidden"), h("nv-tooltip", { "data-storybook-args": true, strategy: "fixed", placement: "right" }, h("nv-button", null, "Hover Me")))))),
|
|
36
|
+
},
|
|
37
|
+
// triggerElement
|
|
38
|
+
{
|
|
39
|
+
name: nameof(x => x.triggerElement),
|
|
40
|
+
description: 'Internal property - accepts a reference to the DOM element acting as the popover trigger. Use the default slot instead.',
|
|
41
|
+
args: { message: 'This uses internal triggerElement property.' },
|
|
42
|
+
template: (h("nv-tooltip", { "data-storybook-args": true, "data-class": "py-6" }, h("nv-button", null, "Hover Me"))),
|
|
43
|
+
},
|
|
44
|
+
// MultipleTooltips
|
|
22
45
|
{
|
|
23
46
|
name: 'MultipleTooltips',
|
|
24
47
|
description: 'Tooltips will automatically be grouped together, preventing animation overlap.',
|
|
@@ -27,15 +50,19 @@ const NvTooltipDocs = {
|
|
|
27
50
|
},
|
|
28
51
|
template: (h("div", { "data-class": "py-6 flex gap-4" }, h("nv-tooltip", { "data-storybook-args": true }, h("nv-button", null, "Hover Me")), h("nv-tooltip", { "data-storybook-args": true }, h("nv-button", null, "Hover Me")), h("nv-tooltip", { "data-storybook-args": true }, h("nv-button", null, "Hover Me")), h("nv-tooltip", { "data-storybook-args": true }, h("nv-button", null, "Hover Me")))),
|
|
29
52
|
},
|
|
53
|
+
// SlotDefault
|
|
30
54
|
{
|
|
31
|
-
name:
|
|
32
|
-
|
|
33
|
-
|
|
55
|
+
name: 'SlotDefault',
|
|
56
|
+
description: 'Content to be placed as the trigger.',
|
|
57
|
+
args: { message: 'Tooltip with slot content as trigger.' },
|
|
58
|
+
template: (h("nv-tooltip", { "data-storybook-args": true, "data-class": "py-6" }, h("nv-button", null, "Hover Me (Default Slot)"))),
|
|
34
59
|
},
|
|
60
|
+
// SlotContent
|
|
35
61
|
{
|
|
36
|
-
name:
|
|
37
|
-
|
|
38
|
-
|
|
62
|
+
name: 'SlotContent',
|
|
63
|
+
description: 'Custom HTML content to be placed within the tooltip, rendered under the message.',
|
|
64
|
+
args: { message: 'Main message' },
|
|
65
|
+
template: (h("nv-tooltip", { "data-storybook-args": true, "data-class": "py-6" }, h("nv-button", null, "Hover Me"), h("div", { slot: "content", "data-class": "mt-2 text-sm" }, h("strong", null, "Custom content:"), " You can add any HTML here."))),
|
|
39
66
|
},
|
|
40
67
|
],
|
|
41
68
|
};
|