@nova-design-system/nova-webcomponents 3.27.0 → 3.29.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/{index-Cfkoz1kc.js → index-eLt3bBQs.js} +13 -1
- package/dist/cjs/index.cjs.js +6 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/native.cjs.js +2 -2
- package/dist/cjs/nova-datetime-DOtVgYBB.js +10643 -0
- package/dist/cjs/nv-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/nv-accordion.cjs.entry.js +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +2 -2
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +8 -7
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +1 -1
- package/dist/cjs/nv-buttongroup.cjs.entry.js +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/nv-col.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
- package/dist/cjs/nv-datetest.cjs.entry.js +66 -0
- package/dist/cjs/nv-datetimetest.cjs.entry.js +54 -0
- package/dist/cjs/nv-dialog.cjs.entry.js +2 -2
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +7 -5
- package/dist/cjs/nv-drawer.cjs.entry.js +2 -2
- package/dist/cjs/nv-drawerfooter_2.cjs.entry.js +5 -3
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +5 -5
- package/dist/cjs/nv-fielddate.cjs.entry.js +8 -8
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +8 -8
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +6 -6
- package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +115 -86
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldselect.cjs.entry.js +7 -7
- package/dist/cjs/nv-fieldslider.cjs.entry.js +4 -4
- package/dist/cjs/nv-fieldtext.cjs.entry.js +6 -6
- package/dist/cjs/nv-fieldtextarea.cjs.entry.js +5 -5
- package/dist/cjs/nv-fieldtime.cjs.entry.js +15 -12
- package/dist/cjs/nv-icon.cjs.entry.js +3 -3
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
- package/dist/cjs/nv-menu.cjs.entry.js +2 -2
- package/dist/cjs/nv-menuitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-notification-bullet.cjs.entry.js +1 -1
- package/dist/cjs/nv-notification.cjs.entry.js +2 -2
- package/dist/cjs/nv-notificationcontainer.cjs.entry.js +2 -14
- package/dist/cjs/nv-pagination-nav.cjs.entry.js +2 -2
- package/dist/cjs/nv-paginationtable.cjs.entry.js +2 -2
- package/dist/cjs/nv-popover.cjs.entry.js +2 -2
- package/dist/cjs/nv-row.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarcontent.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebardivider.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarfooter.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebargroup.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarheader.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarlogo.cjs.entry.js +2 -2
- package/dist/cjs/nv-sidebarnavitem.cjs.entry.js +3 -3
- package/dist/cjs/nv-sidebarnavsubitem.cjs.entry.js +2 -2
- package/dist/cjs/nv-split.cjs.entry.js +2 -2
- package/dist/cjs/nv-stack.cjs.entry.js +2 -2
- package/dist/cjs/nv-table.cjs.entry.js +3 -3
- package/dist/cjs/nv-tableheader.cjs.entry.js +2 -2
- package/dist/cjs/nv-timetest.cjs.entry.js +72 -0
- package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
- package/dist/cjs/nv-togglebutton.cjs.entry.js +2 -2
- package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +2 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js +9 -4
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/nv-accordion/nv-accordion.docs.js +1 -0
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.docs.js +69 -1
- package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +2 -2
- package/dist/collection/components/nv-alert/nv-alert.docs.js +1 -0
- package/dist/collection/components/nv-alert/nv-alert.js +15 -5
- package/dist/collection/components/nv-avatar/nv-avatar.docs.js +1 -0
- package/dist/collection/components/nv-badge/nv-badge.docs.js +1 -0
- package/dist/collection/components/nv-badge/nv-badge.js +32 -11
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.docs.js +36 -1
- package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +1 -0
- package/dist/collection/components/nv-button/nv-button.docs.js +1 -0
- package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js +1 -0
- package/dist/collection/components/nv-calendar/nv-calendar.docs.js +1 -0
- package/dist/collection/components/nv-col/nv-col.docs.js +2 -0
- package/dist/collection/components/nv-col/nv-col.js +2 -1
- package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +3 -2
- package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.docs.js +25 -1
- package/dist/collection/components/nv-datetest/nv-datetest.css +15 -0
- package/dist/collection/components/nv-datetest/nv-datetest.docs.js +12 -0
- package/dist/collection/components/nv-datetest/nv-datetest.js +242 -0
- package/dist/collection/components/nv-datetimetest/nv-datetimetest.css +15 -0
- package/dist/collection/components/nv-datetimetest/nv-datetimetest.docs.js +5 -0
- package/dist/collection/components/nv-datetimetest/nv-datetimetest.js +197 -0
- package/dist/collection/components/nv-dialog/nv-dialog.docs.js +1 -0
- package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.docs.js +9 -1
- package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +35 -13
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.docs.js +9 -1
- package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
- package/dist/collection/components/nv-drawer/nv-drawer.docs.js +1 -0
- package/dist/collection/components/nv-drawer/nv-drawer.js +1 -1
- package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.docs.js +9 -1
- package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.js +31 -9
- package/dist/collection/components/nv-drawerheader/nv-drawerheader.docs.js +9 -1
- package/dist/collection/components/nv-drawerheader/nv-drawerheader.js +1 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js +1 -0
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
- package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +1 -0
- package/dist/collection/components/nv-fielddate/nv-fielddate.js +6 -6
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +3 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +1 -0
- package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +6 -6
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +3 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +1 -0
- package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +4 -4
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +3 -0
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.docs.js +54 -1
- package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.css +1 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js +42 -1
- package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +1 -0
- package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +119 -84
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +13 -2
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +3 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +1 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +4 -4
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +3 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +1 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +4 -4
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +1 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +1 -0
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
- package/dist/collection/components/nv-fieldselect/styles/nv-fieldselect.css +3 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +1 -0
- package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +3 -0
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +3 -1
- package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +4 -4
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +3 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +1 -0
- package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +1 -0
- package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +13 -10
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +3 -0
- package/dist/collection/components/nv-icon/nv-icon.docs.js +1 -0
- package/dist/collection/components/nv-icon/nv-icon.js +7 -4
- package/dist/collection/components/nv-icon/nv-icons.js +4 -0
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.docs.js +1 -0
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +7 -4
- package/dist/collection/components/nv-loader/nv-loader.docs.js +1 -0
- package/dist/collection/components/nv-loader/nv-loader.js +1 -1
- package/dist/collection/components/nv-menu/nv-menu.docs.js +1 -0
- package/dist/collection/components/nv-menu/nv-menu.js +1 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.docs.js +20 -1
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +6 -3
- package/dist/collection/components/nv-notification/nv-notification.docs.js +1 -0
- package/dist/collection/components/nv-notification/nv-notification.js +15 -5
- package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.docs.js +1 -0
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.docs.js +24 -1
- package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -15
- package/dist/collection/components/nv-pagination-nav/nv-pagination-nav.js +1 -1
- package/dist/collection/components/nv-paginationtable/nv-paginationtable.docs.js +1 -0
- package/dist/collection/components/nv-paginationtable/nv-paginationtable.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.docs.js +1 -0
- package/dist/collection/components/nv-popover/nv-popover.js +1 -1
- package/dist/collection/components/nv-row/nv-row.docs.js +2 -0
- package/dist/collection/components/nv-row/nv-row.js +2 -1
- package/dist/collection/components/nv-sidebar/nv-sidebar.docs.js +1 -0
- package/dist/collection/components/nv-sidebar/nv-sidebar.js +1 -1
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.docs.js +14 -1
- package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.js +1 -1
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.docs.js +15 -1
- package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.js +1 -1
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.docs.js +9 -1
- package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.js +1 -1
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.docs.js +15 -1
- package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.js +1 -1
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.docs.js +9 -1
- package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.js +1 -1
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.docs.js +10 -1
- package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.js +1 -1
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.docs.js +16 -1
- package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js +8 -5
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.docs.js +15 -1
- package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.js +1 -1
- package/dist/collection/components/nv-split/nv-split.docs.js +1 -0
- package/dist/collection/components/nv-split/nv-split.js +1 -1
- package/dist/collection/components/nv-stack/nv-stack.docs.js +1 -0
- package/dist/collection/components/nv-stack/nv-stack.js +1 -1
- package/dist/collection/components/nv-table/nv-table.docs.js +1 -0
- package/dist/collection/components/nv-table/nv-table.js +1 -1
- package/dist/collection/components/nv-table/styles/nv-table.css +19 -2
- package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js +1 -0
- package/dist/collection/components/nv-tableheader/nv-tableheader.js +1 -1
- package/dist/collection/components/nv-timetest/nv-timetest.css +15 -0
- package/dist/collection/components/nv-timetest/nv-timetest.docs.js +5 -0
- package/dist/collection/components/nv-timetest/nv-timetest.js +248 -0
- package/dist/collection/components/nv-toggle/nv-toggle.docs.js +1 -0
- package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js +48 -1
- package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +1 -0
- package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js +1 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +8 -3
- package/dist/collection/index.js +3 -0
- package/dist/collection/interfaces/dates.js +1 -0
- package/dist/collection/utils/nova-datetime.js +144 -0
- package/dist/collection/utils/test/nova-datetime.test.js +230 -0
- package/dist/components/index.js +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +1 -1
- package/dist/components/nv-alert.js +1 -1
- package/dist/components/nv-avatar.js +1 -1
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +1 -1
- package/dist/components/nv-breadcrumbs.js +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-buttongroup.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-col.js +1 -1
- package/dist/components/nv-datagrid.js +1 -1
- package/dist/components/nv-datagridcolumn.js +1 -1
- package/dist/components/nv-datetest.d.ts +11 -0
- package/dist/components/nv-datetest.js +1 -0
- package/dist/components/nv-datetimetest.d.ts +11 -0
- package/dist/components/nv-datetimetest.js +1 -0
- package/dist/components/nv-dialog.js +1 -1
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-dialogheader.js +1 -1
- package/dist/components/nv-drawer.js +1 -1
- package/dist/components/nv-drawerfooter.js +1 -1
- package/dist/components/nv-drawerheader.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +1 -1
- package/dist/components/nv-fielddaterange.js +1 -1
- package/dist/components/nv-fielddropdown.js +1 -1
- package/dist/components/nv-fielddropdownitem.js +1 -1
- package/dist/components/nv-fielddropdownitemcheck.js +1 -1
- package/dist/components/nv-fieldmultiselect.js +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldselect.js +1 -1
- package/dist/components/nv-fieldslider.js +1 -1
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtextarea.js +1 -1
- package/dist/components/nv-fieldtime.js +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 +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 +1 -1
- package/dist/components/nv-notificationcontainer.js +1 -1
- package/dist/components/nv-pagination-nav.js +1 -1
- package/dist/components/nv-paginationtable.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 +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 +1 -1
- package/dist/components/nv-sidebarnavsubitem.js +1 -1
- package/dist/components/nv-split.js +1 -1
- package/dist/components/nv-stack.js +1 -1
- package/dist/components/nv-table.js +1 -1
- package/dist/components/nv-tableheader.js +1 -1
- package/dist/components/nv-timetest.d.ts +11 -0
- package/dist/components/nv-timetest.js +1 -0
- package/dist/components/nv-toggle.js +1 -1
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebuttongroup.js +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-CAGzfU3O.js → p-Bl7rc9YV.js} +1 -1
- package/dist/components/{p-BBy1Mdgv.js → p-Bytxo1iR.js} +1 -1
- package/dist/components/p-C47vpaBp.js +1 -0
- package/dist/components/{p-BMpkyzCW.js → p-C99g_PrG.js} +1 -1
- package/dist/components/{p-BvxuoODv.js → p-CBlrNW6n.js} +1 -1
- package/dist/components/{p-DlOgBZa8.js → p-CD12QIMB.js} +2 -2
- package/dist/components/{p-Ho_7-x5W.js → p-CT782LKx.js} +1 -1
- package/dist/components/{p-D-MnI-R8.js → p-CUjRfVPl.js} +1 -1
- package/dist/components/{p-kMTGXpRx.js → p-CfOVizcp.js} +1 -1
- package/dist/components/{p-S18SgvAW.js → p-CgufQqes.js} +1 -1
- package/dist/components/p-ChVdX6FG.js +1 -0
- package/dist/components/{p-Ba1zVklG.js → p-Cnlbk416.js} +1 -1
- package/dist/components/p-Cr_-lRNo.js +1 -0
- package/dist/components/{p-BwYt1BAb.js → p-Cuq_uNwY.js} +1 -1
- package/dist/components/p-CyL2J6O4.js +74 -0
- package/dist/components/p-D1psKXwD.js +1 -0
- package/dist/components/{p-T-bBxAoT.js → p-D3JDACHw.js} +1 -1
- package/dist/components/p-DKgmDzJ1.js +1 -0
- package/dist/components/p-DdcXhR3I.js +1 -0
- package/dist/components/p-EV8CtE4q.js +1 -0
- package/dist/components/{p-DrgqO3gF.js → p-RYxAzR3m.js} +1 -1
- package/dist/components/{p-Db4JZxyy.js → p-_zOMJBOq.js} +1 -1
- package/dist/components/{p-6nAIGZFL.js → p-flcatmxD.js} +1 -1
- package/dist/components/p-p1ofW2Cs.js +1 -0
- package/dist/esm/{index-BCjiE1MF.js → index-DU3Vhh_k.js} +13 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/native.js +3 -3
- package/dist/esm/nova-datetime-CyL2J6O4.js +10636 -0
- package/dist/esm/nv-accordion-item.entry.js +3 -3
- package/dist/esm/nv-accordion.entry.js +1 -1
- package/dist/esm/nv-alert.entry.js +2 -2
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +8 -7
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumbs.entry.js +1 -1
- package/dist/esm/nv-button.entry.js +1 -1
- package/dist/esm/nv-buttongroup.entry.js +1 -1
- package/dist/esm/nv-calendar.entry.js +1 -1
- package/dist/esm/nv-col.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js +1 -1
- package/dist/esm/nv-datagridcolumn.entry.js +1 -1
- package/dist/esm/nv-datetest.entry.js +64 -0
- package/dist/esm/nv-datetimetest.entry.js +52 -0
- package/dist/esm/nv-dialog.entry.js +2 -2
- package/dist/esm/nv-dialogfooter_2.entry.js +7 -5
- package/dist/esm/nv-drawer.entry.js +2 -2
- package/dist/esm/nv-drawerfooter_2.entry.js +5 -3
- package/dist/esm/nv-fieldcheckbox.entry.js +5 -5
- package/dist/esm/nv-fielddate.entry.js +8 -8
- package/dist/esm/nv-fielddaterange.entry.js +8 -8
- package/dist/esm/nv-fielddropdown.entry.js +6 -6
- package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
- package/dist/esm/nv-fieldmultiselect.entry.js +115 -86
- package/dist/esm/nv-fieldnumber.entry.js +6 -6
- package/dist/esm/nv-fieldpassword.entry.js +6 -6
- package/dist/esm/nv-fieldradio.entry.js +4 -4
- package/dist/esm/nv-fieldselect.entry.js +7 -7
- package/dist/esm/nv-fieldslider.entry.js +4 -4
- package/dist/esm/nv-fieldtext.entry.js +6 -6
- package/dist/esm/nv-fieldtextarea.entry.js +5 -5
- package/dist/esm/nv-fieldtime.entry.js +15 -12
- package/dist/esm/nv-icon.entry.js +3 -3
- package/dist/esm/nv-iconbutton_2.entry.js +3 -3
- package/dist/esm/nv-menu.entry.js +2 -2
- package/dist/esm/nv-menuitem.entry.js +2 -2
- package/dist/esm/nv-notification-bullet.entry.js +1 -1
- package/dist/esm/nv-notification.entry.js +2 -2
- package/dist/esm/nv-notificationcontainer.entry.js +2 -14
- package/dist/esm/nv-pagination-nav.entry.js +2 -2
- package/dist/esm/nv-paginationtable.entry.js +2 -2
- package/dist/esm/nv-popover.entry.js +2 -2
- package/dist/esm/nv-row.entry.js +2 -2
- package/dist/esm/nv-sidebar.entry.js +2 -2
- package/dist/esm/nv-sidebarcontent.entry.js +2 -2
- package/dist/esm/nv-sidebardivider.entry.js +2 -2
- package/dist/esm/nv-sidebarfooter.entry.js +2 -2
- package/dist/esm/nv-sidebargroup.entry.js +2 -2
- package/dist/esm/nv-sidebarheader.entry.js +2 -2
- package/dist/esm/nv-sidebarlogo.entry.js +2 -2
- package/dist/esm/nv-sidebarnavitem.entry.js +3 -3
- package/dist/esm/nv-sidebarnavsubitem.entry.js +2 -2
- package/dist/esm/nv-split.entry.js +2 -2
- package/dist/esm/nv-stack.entry.js +2 -2
- package/dist/esm/nv-table.entry.js +3 -3
- package/dist/esm/nv-tableheader.entry.js +2 -2
- package/dist/esm/nv-timetest.entry.js +70 -0
- package/dist/esm/nv-toggle.entry.js +3 -3
- package/dist/esm/nv-togglebutton.entry.js +2 -2
- package/dist/esm/nv-togglebuttongroup.entry.js +2 -2
- package/dist/esm/nv-tooltip.entry.js +9 -4
- package/dist/lib/generators/docs-blazor.js +11 -2
- package/dist/lib/utils/parseToCSharpTypes.js +114 -18
- package/dist/lib/utils/test/parseToCSharpTypes.test.js +95 -1
- package/dist/native/index.esm.js +1 -1
- package/dist/native/native.css +1 -1
- package/dist/native/native.esm.js +1 -1
- package/dist/native/p-04e40a1e.entry.js +1 -0
- package/dist/native/p-0770997b.entry.js +1 -0
- package/dist/native/p-07f3200b.entry.js +1 -0
- package/dist/native/{p-a6b3256b.entry.js → p-0a17050f.entry.js} +1 -1
- package/dist/native/{p-7d49e88d.entry.js → p-0d03b6ed.entry.js} +1 -1
- package/dist/native/p-0d3ab890.entry.js +1 -0
- package/dist/native/{p-b3964a1c.entry.js → p-0f59cb66.entry.js} +1 -1
- package/dist/native/{p-87758615.entry.js → p-0f9a284e.entry.js} +1 -1
- package/dist/native/{p-90b8b889.entry.js → p-12269ed5.entry.js} +1 -1
- package/dist/native/{p-fd5e27ae.entry.js → p-1450d746.entry.js} +1 -1
- package/dist/native/{p-f9612edf.entry.js → p-16600d93.entry.js} +1 -1
- package/dist/native/{p-1e0ca4df.entry.js → p-1bc76216.entry.js} +1 -1
- package/dist/native/p-1ea2a804.entry.js +1 -0
- package/dist/native/{p-24ce0c8d.entry.js → p-26c0c34b.entry.js} +1 -1
- package/dist/native/{p-9709c7d5.entry.js → p-27ecae3c.entry.js} +1 -1
- package/dist/native/{p-5a7e46ad.entry.js → p-2b1efb98.entry.js} +1 -1
- package/dist/native/{p-927b655d.entry.js → p-2d37df11.entry.js} +1 -1
- package/dist/native/{p-eb8ba7a2.entry.js → p-2d5189eb.entry.js} +1 -1
- package/dist/native/{p-157c5ac8.entry.js → p-2e40d5d9.entry.js} +1 -1
- package/dist/native/{p-0fe84123.entry.js → p-2e932ca4.entry.js} +1 -1
- package/dist/native/{p-5c003e50.entry.js → p-336d63c4.entry.js} +1 -1
- package/dist/native/p-3afa34d1.entry.js +1 -0
- package/dist/native/{p-24f69387.entry.js → p-3ddc967e.entry.js} +1 -1
- package/dist/native/p-48c1bab4.entry.js +1 -0
- package/dist/native/{p-6742f88f.entry.js → p-49c6d122.entry.js} +1 -1
- package/dist/native/{p-8a0dc37b.entry.js → p-4badca4e.entry.js} +1 -1
- package/dist/native/{p-bb43a3b4.entry.js → p-4bb9b387.entry.js} +1 -1
- package/dist/native/{p-39366f18.entry.js → p-568fbdac.entry.js} +1 -1
- package/dist/native/{p-8f76e030.entry.js → p-59ecaf60.entry.js} +1 -1
- package/dist/native/p-5cefca3c.entry.js +1 -0
- package/dist/native/{p-148c1d3e.entry.js → p-5f6e45ca.entry.js} +1 -1
- package/dist/native/{p-fb34fc7d.entry.js → p-6f1213fb.entry.js} +1 -1
- package/dist/native/{p-5ce3d30b.entry.js → p-6f91712c.entry.js} +1 -1
- package/dist/native/{p-1aea6fe0.entry.js → p-706eeea4.entry.js} +1 -1
- package/dist/native/{p-d6e2e120.entry.js → p-7126f67e.entry.js} +1 -1
- package/dist/native/{p-1f8cc03a.entry.js → p-748661f0.entry.js} +1 -1
- package/dist/native/{p-6f3c3e2a.entry.js → p-7b545176.entry.js} +1 -1
- package/dist/native/{p-ecce3e66.entry.js → p-7bb2536f.entry.js} +1 -1
- package/dist/native/{p-a16f8a14.entry.js → p-7fd6f0b0.entry.js} +1 -1
- package/dist/native/p-803759ef.entry.js +1 -0
- package/dist/native/{p-d12a2841.entry.js → p-8e05077a.entry.js} +1 -1
- package/dist/native/{p-25ef7329.entry.js → p-92539825.entry.js} +1 -1
- package/dist/native/p-943a4dfd.entry.js +1 -0
- package/dist/native/{p-7ec28d5d.entry.js → p-96078a63.entry.js} +1 -1
- package/dist/native/{p-56593bf0.entry.js → p-9a05395d.entry.js} +1 -1
- package/dist/native/{p-f9e4daf7.entry.js → p-9b8478a7.entry.js} +1 -1
- package/dist/native/p-CyL2J6O4.js +74 -0
- package/dist/native/{p-BCjiE1MF.js → p-DU3Vhh_k.js} +1 -1
- package/dist/native/{p-67e0680e.entry.js → p-a5e39524.entry.js} +1 -1
- package/dist/native/{p-31ba86b3.entry.js → p-b7436a14.entry.js} +1 -1
- package/dist/native/{p-9fda1976.entry.js → p-bff549dd.entry.js} +1 -1
- package/dist/native/p-c20e0b5f.entry.js +1 -0
- package/dist/native/p-ca4ab8a5.entry.js +1 -0
- package/dist/native/{p-591f3dcc.entry.js → p-d468c445.entry.js} +1 -1
- package/dist/native/p-d5060f92.entry.js +1 -0
- package/dist/native/{p-539c04ad.entry.js → p-d5e931c9.entry.js} +1 -1
- package/dist/native/p-dc647a64.entry.js +1 -0
- package/dist/native/p-df5c6b0c.entry.js +1 -0
- package/dist/native/p-e8569a99.entry.js +1 -0
- package/dist/native/p-eb737344.entry.js +1 -0
- package/dist/native/{p-ebff7ddb.entry.js → p-f078f10a.entry.js} +1 -1
- package/dist/native/p-f3756dfd.entry.js +1 -0
- package/dist/native/p-f3ded7e8.entry.js +1 -0
- package/dist/native/{p-3a35cf46.entry.js → p-f7fdca43.entry.js} +1 -1
- package/dist/types/components/nv-alert/nv-alert.d.ts +3 -1
- package/dist/types/components/nv-badge/nv-badge.d.ts +6 -3
- package/dist/types/components/nv-col/nv-col.d.ts +1 -0
- package/dist/types/components/nv-datetest/nv-datetest.d.ts +48 -0
- package/dist/types/components/nv-datetest/nv-datetest.docs.d.ts +4 -0
- package/dist/types/components/nv-datetimetest/nv-datetimetest.d.ts +44 -0
- package/dist/types/components/nv-datetimetest/nv-datetimetest.docs.d.ts +4 -0
- package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +5 -2
- package/dist/types/components/nv-drawerfooter/nv-drawerfooter.d.ts +5 -2
- package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +16 -11
- package/dist/types/components/nv-icon/nv-icon.d.ts +2 -1
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-iconbutton/nv-iconbutton.d.ts +2 -1
- package/dist/types/components/nv-menuitem/nv-menuitem.d.ts +1 -0
- package/dist/types/components/nv-notification/nv-notification.d.ts +3 -1
- package/dist/types/components/nv-notificationcontainer/nv-notificationcontainer.d.ts +0 -6
- package/dist/types/components/nv-row/nv-row.d.ts +1 -0
- package/dist/types/components/nv-sidebarnavitem/nv-sidebarnavitem.d.ts +2 -1
- package/dist/types/components/nv-timetest/nv-timetest.d.ts +48 -0
- package/dist/types/components/nv-timetest/nv-timetest.docs.d.ts +4 -0
- package/dist/types/components.d.ts +349 -44
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interfaces/dates.d.ts +8 -0
- package/dist/types/nova-docs.d.ts +8 -0
- package/dist/types/utils/nova-datetime.d.ts +79 -0
- package/dist/types/utils/test/nova-datetime.test.d.ts +1 -0
- package/dist/vscode-data.json +18259 -2581
- package/hydrate/index.js +11008 -219
- package/hydrate/index.mjs +11008 -219
- package/package.json +14 -1
- package/dist/components/p-CV12ukSl.js +0 -1
- package/dist/components/p-CZkFkVd8.js +0 -1
- package/dist/components/p-CcmfuwSa.js +0 -1
- package/dist/components/p-CqJqzGJS.js +0 -1
- package/dist/components/p-D0bGRzSN.js +0 -1
- package/dist/components/p-DC_2597n.js +0 -1
- package/dist/components/p-IzPWk8zx.js +0 -1
- package/dist/components/p-uAXqRBhx.js +0 -1
- package/dist/native/p-03cc1f2c.entry.js +0 -1
- package/dist/native/p-18bdc07a.entry.js +0 -1
- package/dist/native/p-1c97c353.entry.js +0 -1
- package/dist/native/p-23f0ca96.entry.js +0 -1
- package/dist/native/p-34e19b6e.entry.js +0 -1
- package/dist/native/p-46267895.entry.js +0 -1
- package/dist/native/p-597cac0f.entry.js +0 -1
- package/dist/native/p-5f42a7f1.entry.js +0 -1
- package/dist/native/p-7aac0b1a.entry.js +0 -1
- package/dist/native/p-855f7be1.entry.js +0 -1
- package/dist/native/p-99726dd4.entry.js +0 -1
- package/dist/native/p-c0b05d6f.entry.js +0 -1
- package/dist/native/p-c214e4af.entry.js +0 -1
- package/dist/native/p-c29dc907.entry.js +0 -1
- package/dist/native/p-d46bd21a.entry.js +0 -1
- package/dist/native/p-ddedc9c1.entry.js +0 -1
|
@@ -658,11 +658,11 @@ export class NvFielddropdown {
|
|
|
658
658
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
659
659
|
: undefined;
|
|
660
660
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
661
|
-
return (h(Host, { key: '
|
|
661
|
+
return (h(Host, { key: 'b41a60470da47b175fac17a8bc88b8719b56cc14', role: "combobox", "aria-expanded": this.open.toString(), "aria-haspopup": "listbox", "aria-label": this.label }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'adf93f21febb5404b931b821595eed91b24da55b', htmlFor: this.inputId, onClick: this.syncToggleDropdown.bind(this) }, h("slot", { key: 'c8b8256e6e06695a3b6778cec0a696bc0713e6dc', name: "label" }, this.label))), h("nv-popover", { key: '66895b00c801a5c1889da8bc73d9f519d3fe4b70', triggerMode: "controlled", placement: "bottom-start", open: this.open, onOpenChanged: e => this.openChanged.emit(e.detail) }, h("div", { key: 'e468646cb1d08f7f26a8c427040d14f843279fd0', class: "input-wrapper", slot: "trigger" }, h("slot", { key: 'd5567eb82b1e9230507963ed7ca76656f1415855', name: "before-input" }), h("div", { key: '872a8f01aeba95f52209e8dbe2bb1cff3c65c46f', class: "input-container" }, h("slot", { key: 'f8038d509899b3dbe895c9f042f39a1274d1b681', name: "leading-input" }), this.filterable || this.disabled || this.readonly ? (h("input", { "data-scope": "focusable", id: this.inputId, type: "search", ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
662
662
|
'aria-required': String(ariaRequiredValue),
|
|
663
|
-
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleFilterInput })) : (h("p", { "data-scope": "focusable", id: this.inputId, ref: el => (this.selectElement = el), class: "non-filterable-text", tabIndex: this.disabled ? -1 : 0 }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && (h("nv-iconbutton", { key: '
|
|
664
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
665
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
663
|
+
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleFilterInput })) : (h("p", { "data-scope": "focusable", id: this.inputId, ref: el => (this.selectElement = el), class: "non-filterable-text", tabIndex: this.disabled ? -1 : 0 }, this.getSelectedLabel() || this.value || this.placeholder)), this.filterable && this.filterText && (h("nv-iconbutton", { key: 'b5b48972a2529eee9dd2fd68871859bf289d472a', name: "x", size: "md", emphasis: "lower", class: "clear-button", onClick: this.clearFilter.bind(this), "aria-label": "Clear input" })), this.error && (h("nv-icon", { key: '2cca314634242b1e697ba2b26298b095f0742582', name: "alert-circle", class: "validation", size: "md" })), h("nv-iconbutton", { key: 'eac277cbb66ac82547d5c4c6a6aec3443f2fb593', "data-scope": "toggle-dropdown", ref: el => (this.toggleElement = el), name: this.open ? 'chevron-top' : 'chevron-down', size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide dropdown' : 'Show dropdown', onClick: this.syncToggleDropdown.bind(this), tabIndex: this.disabled ? -1 : 0 })), h("slot", { key: '25f05b5425937ca89e1c8c4f2be9fbde2e39959a', name: "after-input" })), h("div", { key: '064a1701a6f4678e1443d7e028f3681e2e41dfd9', slot: "content", style: this.maxHeight ? { maxHeight: this.maxHeight } : {} }, this.options?.length > 0 && (h("ul", { key: 'a9e489d4eb5551044f43a5aacaed94457ddbcacc' }, this.options.map(option => (h("nv-fielddropdownitem", { label: option.label, value: option.value, disabled: option.disabled, selected: option.value === this.value }))))), h("slot", { key: '4dda850901378ea3416260e1c0adda7af9a153c7', name: "content" }))), (this.description ||
|
|
664
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'a878da5beb9572bc8d3a318d3879517ee84c7bac', class: "description" }, h("slot", { key: '04618e824a1b5d67a4ccbe70f13d9ca818f607bd', name: "description" }, this.description))), (this.errorDescription ||
|
|
665
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '007314310806e8dcc5b2b48af65bc66de4ba9f7a', hidden: !this.error, class: "error-description" }, h("slot", { key: '237a4e37e5869f8b66c631559027ec6551005ec6', name: "error-description" }, this.errorDescription)))));
|
|
666
666
|
}
|
|
667
667
|
static get is() { return "nv-fielddropdown"; }
|
|
668
668
|
static get formAssociated() { return true; }
|
|
@@ -1,5 +1,58 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { nameof } from "../../utils/class.utils";
|
|
1
3
|
const NvFielddropdownitemDocs = {
|
|
2
4
|
component: 'nv-fielddropdownitem',
|
|
3
|
-
|
|
5
|
+
parentGroup: 'Fields/NvFielddropdown',
|
|
6
|
+
subcomponents: ['nv-fielddropdown', 'nv-icon', 'nv-avatar', 'nv-badge'],
|
|
7
|
+
stories: [
|
|
8
|
+
// Default
|
|
9
|
+
{
|
|
10
|
+
name: 'Default',
|
|
11
|
+
description: 'Basic dropdown item within a fielddropdown',
|
|
12
|
+
template: (h("nv-fielddropdown", { label: "Select an option" }, h("nv-fielddropdownitem", { "data-storybook-args": true, value: "item1" }, "Item 1"), h("nv-fielddropdownitem", { value: "item2" }, "Item 2"), h("nv-fielddropdownitem", { value: "item3" }, "Item 3"))),
|
|
13
|
+
},
|
|
14
|
+
// value
|
|
15
|
+
{
|
|
16
|
+
name: nameof(x => x.value),
|
|
17
|
+
description: 'Dropdown item with a specific value',
|
|
18
|
+
template: (h("nv-fielddropdown", { label: "Select a city" }, h("nv-fielddropdownitem", { value: "paris" }, "Paris"), h("nv-fielddropdownitem", { "data-storybook-args": true, value: "london" }, "London"), h("nv-fielddropdownitem", { value: "tokyo" }, "Tokyo"))),
|
|
19
|
+
},
|
|
20
|
+
// disabled
|
|
21
|
+
{
|
|
22
|
+
name: nameof(x => x.disabled),
|
|
23
|
+
description: 'Disabled dropdown item that cannot be selected',
|
|
24
|
+
args: {
|
|
25
|
+
disabled: true,
|
|
26
|
+
},
|
|
27
|
+
template: (h("nv-fielddropdown", { label: "Select an option" }, h("nv-fielddropdownitem", { value: "item1" }, "Item 1"), h("nv-fielddropdownitem", { "data-storybook-args": true, value: "item2", disabled: true }, "Item 2 (Disabled)"), h("nv-fielddropdownitem", { value: "item3" }, "Item 3"))),
|
|
28
|
+
},
|
|
29
|
+
// detached
|
|
30
|
+
{
|
|
31
|
+
name: nameof(x => x.detached),
|
|
32
|
+
description: 'Detached dropdown item that remains visible when filtering',
|
|
33
|
+
args: {
|
|
34
|
+
detached: true,
|
|
35
|
+
},
|
|
36
|
+
template: (h("nv-fielddropdown", { label: "Search items", filterable: true }, h("nv-fielddropdownitem", { "data-storybook-args": true, value: "all", detached: true }, "All Items"), h("nv-fielddropdownitem", { value: "item1" }, "Item 1"), h("nv-fielddropdownitem", { value: "item2" }, "Item 2"), h("nv-fielddropdownitem", { value: "item3" }, "Item 3"))),
|
|
37
|
+
},
|
|
38
|
+
// WithIcon
|
|
39
|
+
{
|
|
40
|
+
name: 'WithIcon',
|
|
41
|
+
description: 'Dropdown item with leading icon',
|
|
42
|
+
template: (h("nv-fielddropdown", { label: "Select with icons" }, h("nv-fielddropdownitem", { value: "home" }, h("nv-icon", { slot: "leading-icon", name: "home" }), "Home"), h("nv-fielddropdownitem", { value: "user" }, h("nv-icon", { slot: "leading-icon", name: "user" }), "Profile"), h("nv-fielddropdownitem", { value: "settings" }, h("nv-icon", { slot: "leading-icon", name: "settings" }), "Settings"))),
|
|
43
|
+
},
|
|
44
|
+
// WithAvatar
|
|
45
|
+
{
|
|
46
|
+
name: 'WithAvatar',
|
|
47
|
+
description: 'Dropdown item with avatar',
|
|
48
|
+
template: (h("nv-fielddropdown", { label: "Select user" }, h("nv-fielddropdownitem", { value: "user1" }, h("nv-avatar", { slot: "leading-icon", initials: "JD", size: "xs" }), "John Doe"), h("nv-fielddropdownitem", { value: "user2" }, h("nv-avatar", { slot: "leading-icon", initials: "JS", size: "xs" }), "Jane Smith"))),
|
|
49
|
+
},
|
|
50
|
+
// WithBadge
|
|
51
|
+
{
|
|
52
|
+
name: 'WithBadge',
|
|
53
|
+
description: 'Dropdown item with trailing badge',
|
|
54
|
+
template: (h("nv-fielddropdown", { label: "Select status" }, h("nv-fielddropdownitem", { value: "active" }, "Active", h("nv-badge", { slot: "trailing-icon", color: "success", label: "New" })), h("nv-fielddropdownitem", { value: "pending" }, "Pending", h("nv-badge", { slot: "trailing-icon", color: "warning", label: "3" })), h("nv-fielddropdownitem", { value: "inactive" }, "Inactive"))),
|
|
55
|
+
},
|
|
56
|
+
],
|
|
4
57
|
};
|
|
5
58
|
export default NvFielddropdownitemDocs;
|
|
@@ -53,7 +53,7 @@ export class NvFielddropdownitem {
|
|
|
53
53
|
/****************************************************************************/
|
|
54
54
|
//#region RENDER
|
|
55
55
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '40733c82ff3f46a260e536b8a5cfe95a06a5ef4c', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, h("slot", { key: 'a0fcbde0a3d70e8493d9c38428ea14d36d71fb84' }, h("div", { key: 'a88818483f7fe88d5e7d562bccf9c247c8189442', class: "text-wrapper" }, h("span", { key: '80cbccdb3cf0d86c22130a399f6cf70c7bc8c32b', "data-scope": "text" }, this.label))), this.selected && (h("nv-icon", { key: 'b89ab45c47eb08b37c29f93c78036121a33ab041', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "nv-fielddropdownitem"; }
|
|
59
59
|
static get originalStyleUrls() {
|
|
@@ -8,6 +8,6 @@ nv-fielddropdownitemcheck {
|
|
|
8
8
|
padding: var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);
|
|
9
9
|
border-radius: var(--list-dropdown-item-radius);
|
|
10
10
|
}
|
|
11
|
-
nv-fielddropdownitemcheck:hover {
|
|
11
|
+
nv-fielddropdownitemcheck:hover, nv-fielddropdownitemcheck[data-state=highlighted] {
|
|
12
12
|
background-color: var(--components-list-dropdown-item-background-hover);
|
|
13
13
|
}
|
package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.docs.js
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { nameof } from "../../utils/class.utils";
|
|
1
3
|
const NvFielddropdownitemcheckDocs = {
|
|
2
4
|
component: 'nv-fielddropdownitemcheck',
|
|
3
|
-
|
|
5
|
+
parentGroup: 'Fields/NvFielddropdown',
|
|
6
|
+
subcomponents: ['nv-fielddropdown', 'nv-icon'],
|
|
7
|
+
stories: [
|
|
8
|
+
// Default
|
|
9
|
+
{
|
|
10
|
+
name: 'Default',
|
|
11
|
+
description: 'Checkbox dropdown item for multi-select',
|
|
12
|
+
template: (h("nv-fielddropdown", { label: "Select multiple options" }, h("nv-fielddropdownitemcheck", { "data-storybook-args": true, value: "option1" }, "Option 1"), h("nv-fielddropdownitemcheck", { value: "option2" }, "Option 2"), h("nv-fielddropdownitemcheck", { value: "option3" }, "Option 3"))),
|
|
13
|
+
},
|
|
14
|
+
// value
|
|
15
|
+
{
|
|
16
|
+
name: nameof(x => x.value),
|
|
17
|
+
description: 'Checkbox item with specific value',
|
|
18
|
+
template: (h("nv-fielddropdown", { label: "Select features" }, h("nv-fielddropdownitemcheck", { value: "feature1" }, "Feature 1"), h("nv-fielddropdownitemcheck", { "data-storybook-args": true, value: "feature2" }, "Feature 2"), h("nv-fielddropdownitemcheck", { value: "feature3" }, "Feature 3"))),
|
|
19
|
+
},
|
|
20
|
+
// disabled
|
|
21
|
+
{
|
|
22
|
+
name: nameof(x => x.disabled),
|
|
23
|
+
description: 'Disabled checkbox item',
|
|
24
|
+
args: {
|
|
25
|
+
disabled: true,
|
|
26
|
+
},
|
|
27
|
+
template: (h("nv-fielddropdown", { label: "Select options" }, h("nv-fielddropdownitemcheck", { value: "option1" }, "Option 1"), h("nv-fielddropdownitemcheck", { "data-storybook-args": true, value: "option2", disabled: true }, "Option 2 (Disabled)"), h("nv-fielddropdownitemcheck", { value: "option3" }, "Option 3"))),
|
|
28
|
+
},
|
|
29
|
+
// checked
|
|
30
|
+
{
|
|
31
|
+
name: nameof(x => x.checked),
|
|
32
|
+
description: 'Pre-checked checkbox item',
|
|
33
|
+
args: {
|
|
34
|
+
checked: true,
|
|
35
|
+
},
|
|
36
|
+
template: (h("nv-fielddropdown", { label: "Select options" }, h("nv-fielddropdownitemcheck", { "data-storybook-args": true, value: "option1", checked: true }, "Option 1 (Pre-selected)"), h("nv-fielddropdownitemcheck", { value: "option2" }, "Option 2"), h("nv-fielddropdownitemcheck", { value: "option3" }, "Option 3"))),
|
|
37
|
+
},
|
|
38
|
+
// WithIcon
|
|
39
|
+
{
|
|
40
|
+
name: 'WithIcon',
|
|
41
|
+
description: 'Checkbox item with icon',
|
|
42
|
+
template: (h("nv-fielddropdown", { label: "Select with icons" }, h("nv-fielddropdownitemcheck", { value: "email" }, h("nv-icon", { slot: "leading-icon", name: "mail" }), "Email"), h("nv-fielddropdownitemcheck", { value: "sms" }, h("nv-icon", { slot: "leading-icon", name: "message" }), "SMS"), h("nv-fielddropdownitemcheck", { value: "push" }, h("nv-icon", { slot: "leading-icon", name: "bell" }), "Push Notification"))),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
4
45
|
};
|
|
5
46
|
export default NvFielddropdownitemcheckDocs;
|
|
@@ -52,7 +52,7 @@ export class NvFielddropdownitemcheck {
|
|
|
52
52
|
/****************************************************************************/
|
|
53
53
|
//#region RENDER
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '52f3eeee8d22ab9b45723403c58edc3f16905a07', onClick: this.handleClick }, h("nv-fieldcheckbox", { key: 'b06def71aa859fca784140d5c961ffa6cd8cdccc', checked: this.checked, name: this.label || this.value, label: this.label || this.value, labelPlacement: "after", description: this.description, disabled: this.disabled, tabindex: "-1", onCheckedChanged: this.onFieldcheckboxChanged }, h("slot", { key: 'cc53d2732969cb2812d08f978b3d7eeb5cdaa02a' }), h("slot", { key: '67336141a3dcfdab0bdc749e1937797222eaaded', name: "main" }), h("slot", { key: '165a860ee2dbd1783d4bf391c3a07da6756d7013', name: "label" }), h("slot", { key: '27c6e04f85b608a267ef2b280326d125c22dd970', name: "description" }))));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "nv-fielddropdownitemcheck"; }
|
|
58
58
|
static get originalStyleUrls() {
|
|
@@ -241,23 +241,6 @@ export class NvFieldmultiselect {
|
|
|
241
241
|
this.resetFilter();
|
|
242
242
|
this.hasFilterResults = true;
|
|
243
243
|
};
|
|
244
|
-
/**
|
|
245
|
-
* Handle input blur for options mode.
|
|
246
|
-
*/
|
|
247
|
-
this.handleInputBlurOptions = () => {
|
|
248
|
-
setTimeout(() => {
|
|
249
|
-
if (this.preventBlurClose) {
|
|
250
|
-
this.preventBlurClose = false;
|
|
251
|
-
return; // Don't close the popover
|
|
252
|
-
}
|
|
253
|
-
if (!this.el.contains(document.activeElement)) {
|
|
254
|
-
this.open = false; // Close the popover on blur
|
|
255
|
-
if (this.filterable) {
|
|
256
|
-
this.clearFilterText(); // Clear filter text on blur
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}, 150);
|
|
260
|
-
};
|
|
261
244
|
/**
|
|
262
245
|
* Handle click on the input container for options mode.
|
|
263
246
|
* @param {MouseEvent} event - The click event.
|
|
@@ -361,23 +344,6 @@ export class NvFieldmultiselect {
|
|
|
361
344
|
}
|
|
362
345
|
this.open = true;
|
|
363
346
|
};
|
|
364
|
-
/**
|
|
365
|
-
* Handle input blur for slots mode.
|
|
366
|
-
*/
|
|
367
|
-
this.handleInputBlurSlots = () => {
|
|
368
|
-
setTimeout(() => {
|
|
369
|
-
if (this.preventBlurClose) {
|
|
370
|
-
this.preventBlurClose = false;
|
|
371
|
-
return; // Don't close the popover
|
|
372
|
-
}
|
|
373
|
-
if (!this.el.contains(document.activeElement)) {
|
|
374
|
-
this.open = false; // Close the popover on blur
|
|
375
|
-
if (this.filterable) {
|
|
376
|
-
this.clearFilterText(); // Clear filter text on blur
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}, 150);
|
|
380
|
-
};
|
|
381
347
|
/**
|
|
382
348
|
* Toggle the multiselect popover for options mode.
|
|
383
349
|
*/
|
|
@@ -502,6 +468,17 @@ export class NvFieldmultiselect {
|
|
|
502
468
|
};
|
|
503
469
|
this.handleMouseDownPreventBlur = () => {
|
|
504
470
|
this.preventBlurClose = true;
|
|
471
|
+
// Scope the flag to the immediate click cycle only. Synchronous focus
|
|
472
|
+
// events fired during this click (mousedown → focusout → mouseup → click)
|
|
473
|
+
// run before the next macrotask, so any focusout that *should* be
|
|
474
|
+
// suppressed will already have consumed the flag by the time this clears.
|
|
475
|
+
// Without this cleanup, a click on a non-focus-taking target (e.g. the
|
|
476
|
+
// chevron when nothing inside the host had focus, or the tabindex="-1"
|
|
477
|
+
// clear-filter button) leaves the flag set and the user's next Tab-out
|
|
478
|
+
// gets silently swallowed instead of closing the popover.
|
|
479
|
+
setTimeout(() => {
|
|
480
|
+
this.preventBlurClose = false;
|
|
481
|
+
}, 0);
|
|
505
482
|
};
|
|
506
483
|
//#endregion METHODS
|
|
507
484
|
/****************************************************************************/
|
|
@@ -516,7 +493,7 @@ export class NvFieldmultiselect {
|
|
|
516
493
|
: undefined, ...(this.getRequiredAttributes().ariaRequiredValue !==
|
|
517
494
|
undefined && {
|
|
518
495
|
'aria-required': String(this.getRequiredAttributes().ariaRequiredValue),
|
|
519
|
-
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions,
|
|
496
|
+
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputOptions, onFocus: this.handleInputFocusOptions, onKeyDown: this.handleKeyDown, "data-scope": "focusable", "aria-label": this.label, "aria-controls": `${this.inputId}-listbox` })) : (h(Fragment, null, h("input", { id: this.inputId, type: "text", style: {
|
|
520
497
|
position: 'absolute',
|
|
521
498
|
opacity: '0',
|
|
522
499
|
width: '0',
|
|
@@ -537,7 +514,7 @@ export class NvFieldmultiselect {
|
|
|
537
514
|
: undefined, ...(this.getRequiredAttributes().ariaRequiredValue !==
|
|
538
515
|
undefined && {
|
|
539
516
|
'aria-required': String(this.getRequiredAttributes().ariaRequiredValue),
|
|
540
|
-
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputSlots, onFocus: this.handleInputFocusSlots,
|
|
517
|
+
}), disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInputSlots, onFocus: this.handleInputFocusSlots, onKeyDown: this.handleKeyDown, "data-scope": "focusable", "aria-label": this.label, "aria-controls": `${this.inputId}-listbox` })) : (h(Fragment, null, h("input", { id: this.inputId, type: "text", style: {
|
|
541
518
|
position: 'absolute',
|
|
542
519
|
opacity: '0',
|
|
543
520
|
width: '0',
|
|
@@ -652,6 +629,31 @@ export class NvFieldmultiselect {
|
|
|
652
629
|
});
|
|
653
630
|
}
|
|
654
631
|
}
|
|
632
|
+
/**
|
|
633
|
+
* Close the dropdown when keyboard focus leaves the component.
|
|
634
|
+
* Uses focusout (which bubbles) so it covers every internal focusable
|
|
635
|
+
* (filter input, hidden input, trigger `<p>`, chevron iconbutton,
|
|
636
|
+
* clear-filter iconbutton, dropdown items, badge close button) without
|
|
637
|
+
* needing per-element onBlur wiring.
|
|
638
|
+
* @param {FocusEvent} event - The focus event.
|
|
639
|
+
*/
|
|
640
|
+
handleFocusOut(event) {
|
|
641
|
+
if (this.preventBlurClose) {
|
|
642
|
+
this.preventBlurClose = false;
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
// Focus moved to another element inside the component → keep open.
|
|
646
|
+
if (event.relatedTarget instanceof Node &&
|
|
647
|
+
this.el.contains(event.relatedTarget)) {
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
// Focus moved outside the component (external element, body, or
|
|
651
|
+
// programmatic blur where relatedTarget is null) → close the popover.
|
|
652
|
+
this.open = false;
|
|
653
|
+
if (this.filterable) {
|
|
654
|
+
this.clearFilterText();
|
|
655
|
+
}
|
|
656
|
+
}
|
|
655
657
|
/**
|
|
656
658
|
* Handle keyboard events & arrow key navigation.
|
|
657
659
|
* If the multiselect is not open, opens it and focuses on the first item if the list is not filterable.
|
|
@@ -659,6 +661,8 @@ export class NvFieldmultiselect {
|
|
|
659
661
|
* @param {KeyboardEvent} event - The keyboard event.
|
|
660
662
|
*/
|
|
661
663
|
async handleKeyDown(event) {
|
|
664
|
+
if (this.disabled || this.readonly)
|
|
665
|
+
return;
|
|
662
666
|
if (event.key === 'Escape') {
|
|
663
667
|
this.open = false;
|
|
664
668
|
return;
|
|
@@ -677,12 +681,22 @@ export class NvFieldmultiselect {
|
|
|
677
681
|
}
|
|
678
682
|
return;
|
|
679
683
|
}
|
|
680
|
-
|
|
684
|
+
// Sort by computed flex `order` so arrow keys follow the visual order
|
|
685
|
+
// (selected items first), with DOM order as tie-breaker.
|
|
686
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck:not([style*="display: none"])')).sort((a, b) => {
|
|
687
|
+
const orderA = parseInt(window.getComputedStyle(a).order || '0', 10);
|
|
688
|
+
const orderB = parseInt(window.getComputedStyle(b).order || '0', 10);
|
|
689
|
+
if (orderA !== orderB)
|
|
690
|
+
return orderA - orderB;
|
|
691
|
+
return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING
|
|
692
|
+
? -1
|
|
693
|
+
: 1;
|
|
694
|
+
});
|
|
681
695
|
if (items.length === 0) {
|
|
682
696
|
console.warn('No visible items found to navigate');
|
|
683
697
|
return;
|
|
684
698
|
}
|
|
685
|
-
let currentIndex = items.findIndex(item => item.
|
|
699
|
+
let currentIndex = items.findIndex(item => item.getAttribute('data-state') === 'highlighted');
|
|
686
700
|
if (event.key === 'ArrowDown') {
|
|
687
701
|
event.preventDefault();
|
|
688
702
|
currentIndex =
|
|
@@ -697,7 +711,15 @@ export class NvFieldmultiselect {
|
|
|
697
711
|
: (currentIndex - 1 + items.length) % items.length;
|
|
698
712
|
this.updateHighlightedItem(items, currentIndex);
|
|
699
713
|
}
|
|
700
|
-
else if (event.key === 'Enter'
|
|
714
|
+
else if ((event.key === 'Enter' || event.key === ' ') &&
|
|
715
|
+
currentIndex >= 0) {
|
|
716
|
+
// If the key event came from the chevron toggle button, nv-iconbutton
|
|
717
|
+
// has already handled open/close via its own keydown listener. Do not
|
|
718
|
+
// also toggle the highlighted item — that is a double-action bug.
|
|
719
|
+
const target = event.target;
|
|
720
|
+
if (target?.closest?.('[data-scope="toggle-dropdown"]')) {
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
701
723
|
event.preventDefault();
|
|
702
724
|
const selectedItem = items[currentIndex];
|
|
703
725
|
// Toggle the checked state
|
|
@@ -901,7 +923,9 @@ export class NvFieldmultiselect {
|
|
|
901
923
|
}
|
|
902
924
|
}
|
|
903
925
|
/**
|
|
904
|
-
* Reorder the content of the slot
|
|
926
|
+
* Reorder the content of the slot using CSS flex `order` so the
|
|
927
|
+
* underlying DOM order is preserved (clearing the selection restores
|
|
928
|
+
* the original visual order automatically).
|
|
905
929
|
*/
|
|
906
930
|
reorderSlotContent() {
|
|
907
931
|
if (this.options)
|
|
@@ -909,50 +933,47 @@ export class NvFieldmultiselect {
|
|
|
909
933
|
const ul = this.el.querySelector('ul');
|
|
910
934
|
if (!ul)
|
|
911
935
|
return;
|
|
912
|
-
// Remove all existing <hr class="multiselect-divider">
|
|
913
|
-
ul.querySelectorAll('hr.multiselect-divider').forEach(divider => divider.remove());
|
|
914
936
|
// Retrieve all items (not hidden)
|
|
915
937
|
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
|
|
916
|
-
// If
|
|
938
|
+
// If a "No results" message is currently shown, hide the divider
|
|
939
|
+
// and skip the per-item ordering work.
|
|
917
940
|
const hasEmptyMessage = ul.querySelector('[data-empty]');
|
|
918
941
|
if (hasEmptyMessage) {
|
|
919
|
-
|
|
942
|
+
this.manageDivider(ul, [], []);
|
|
920
943
|
return;
|
|
921
944
|
}
|
|
922
|
-
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
// Add a divider if needed
|
|
932
|
-
if (selectedItems.length > 0 && unselectedItems.length > 0) {
|
|
933
|
-
const divider = document.createElement('hr');
|
|
934
|
-
divider.className = 'multiselect-divider';
|
|
935
|
-
ul.appendChild(divider);
|
|
936
|
-
}
|
|
937
|
-
// Reinsert UNCHECKED items at the end
|
|
938
|
-
unselectedItems.forEach(item => {
|
|
939
|
-
ul.appendChild(item);
|
|
945
|
+
const selectedItems = [];
|
|
946
|
+
const unselectedItems = [];
|
|
947
|
+
items.forEach(item => {
|
|
948
|
+
const isSelected = (this.value || []).includes(item.getAttribute('value') || '');
|
|
949
|
+
item.style.order = isSelected ? '10' : '30';
|
|
950
|
+
if (isSelected)
|
|
951
|
+
selectedItems.push(item);
|
|
952
|
+
else
|
|
953
|
+
unselectedItems.push(item);
|
|
940
954
|
});
|
|
955
|
+
this.manageDivider(ul, selectedItems, unselectedItems);
|
|
941
956
|
}
|
|
942
957
|
/**
|
|
943
|
-
* Reorder the content for options mode
|
|
958
|
+
* Reorder the content for options mode using CSS flex `order` so the
|
|
959
|
+
* underlying DOM order is preserved (clearing the selection restores
|
|
960
|
+
* the original visual order automatically).
|
|
944
961
|
*/
|
|
945
962
|
reorderOptionsContent() {
|
|
946
963
|
const ul = this.el.querySelector('ul');
|
|
947
964
|
if (!ul)
|
|
948
965
|
return;
|
|
949
966
|
const items = Array.from(ul.querySelectorAll('nv-fielddropdownitemcheck')).filter(item => item.style.display !== 'none');
|
|
950
|
-
const selectedItems =
|
|
951
|
-
const unselectedItems =
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
967
|
+
const selectedItems = [];
|
|
968
|
+
const unselectedItems = [];
|
|
969
|
+
items.forEach(item => {
|
|
970
|
+
const isSelected = (this.value || []).includes(item.getAttribute('value') || '');
|
|
971
|
+
item.style.order = isSelected ? '10' : '30';
|
|
972
|
+
if (isSelected)
|
|
973
|
+
selectedItems.push(item);
|
|
974
|
+
else
|
|
975
|
+
unselectedItems.push(item);
|
|
976
|
+
});
|
|
956
977
|
this.manageDivider(ul, selectedItems, unselectedItems);
|
|
957
978
|
}
|
|
958
979
|
/**
|
|
@@ -1034,6 +1055,8 @@ export class NvFieldmultiselect {
|
|
|
1034
1055
|
emptyMessage.setAttribute('data-empty', 'true');
|
|
1035
1056
|
emptyMessage.textContent = this.emptyResult;
|
|
1036
1057
|
emptyMessage.classList.add('no-results-message');
|
|
1058
|
+
// Keep the message after any item rows under the flex `order` projection.
|
|
1059
|
+
emptyMessage.style.order = '40';
|
|
1037
1060
|
ul.appendChild(emptyMessage);
|
|
1038
1061
|
}
|
|
1039
1062
|
else if (result.truncated) {
|
|
@@ -1169,6 +1192,8 @@ export class NvFieldmultiselect {
|
|
|
1169
1192
|
truncatedItem.setAttribute('data-truncated', 'true');
|
|
1170
1193
|
truncatedItem.className = 'truncated-message no-results-message';
|
|
1171
1194
|
truncatedItem.textContent = formatTruncatedResults(textTemplate, shown, total);
|
|
1195
|
+
// Keep the message after any item rows under the flex `order` projection.
|
|
1196
|
+
truncatedItem.style.order = '40';
|
|
1172
1197
|
ul.appendChild(truncatedItem);
|
|
1173
1198
|
}
|
|
1174
1199
|
handleClickOutside(event) {
|
|
@@ -1187,7 +1212,7 @@ export class NvFieldmultiselect {
|
|
|
1187
1212
|
updateHighlightedItem(items, index) {
|
|
1188
1213
|
items.forEach((item, i) => {
|
|
1189
1214
|
if (i === index) {
|
|
1190
|
-
item.
|
|
1215
|
+
item.setAttribute('data-state', 'highlighted');
|
|
1191
1216
|
item.setAttribute('tabindex', '0');
|
|
1192
1217
|
item.scrollIntoView({ block: 'nearest' });
|
|
1193
1218
|
// Focus on the nv-fieldcheckbox inside
|
|
@@ -1197,19 +1222,30 @@ export class NvFieldmultiselect {
|
|
|
1197
1222
|
}
|
|
1198
1223
|
}
|
|
1199
1224
|
else {
|
|
1200
|
-
item.
|
|
1225
|
+
item.removeAttribute('data-state');
|
|
1201
1226
|
item.setAttribute('tabindex', '-1');
|
|
1202
1227
|
}
|
|
1203
1228
|
});
|
|
1204
1229
|
}
|
|
1205
1230
|
/**
|
|
1206
|
-
* Focus on the first item in the dropdown list.
|
|
1231
|
+
* Focus on the first item in the dropdown list (visual order).
|
|
1207
1232
|
*/
|
|
1208
1233
|
focusFirstItem() {
|
|
1209
|
-
|
|
1234
|
+
// Sort by computed flex `order` so the "first" item is the first one
|
|
1235
|
+
// visually (selected items are projected to the top via `order: 10`).
|
|
1236
|
+
const items = Array.from(this.el.querySelectorAll('nv-fielddropdownitemcheck:not([style*="display: none"])')).sort((a, b) => {
|
|
1237
|
+
const orderA = parseInt(window.getComputedStyle(a).order || '0', 10);
|
|
1238
|
+
const orderB = parseInt(window.getComputedStyle(b).order || '0', 10);
|
|
1239
|
+
if (orderA !== orderB)
|
|
1240
|
+
return orderA - orderB;
|
|
1241
|
+
return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING
|
|
1242
|
+
? -1
|
|
1243
|
+
: 1;
|
|
1244
|
+
});
|
|
1245
|
+
const firstItem = items[0];
|
|
1210
1246
|
if (firstItem) {
|
|
1211
1247
|
firstItem.setAttribute('tabindex', '0');
|
|
1212
|
-
firstItem.
|
|
1248
|
+
firstItem.setAttribute('data-state', 'highlighted');
|
|
1213
1249
|
firstItem.scrollIntoView({ block: 'nearest' });
|
|
1214
1250
|
// Focus on the nv-fieldcheckbox inside
|
|
1215
1251
|
const checkbox = firstItem.querySelector('nv-fieldcheckbox');
|
|
@@ -1228,16 +1264,9 @@ export class NvFieldmultiselect {
|
|
|
1228
1264
|
divider.className = 'multiselect-divider';
|
|
1229
1265
|
ul.appendChild(divider);
|
|
1230
1266
|
}
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
const lastSelectedItem = selectedItems[selectedItems.length - 1];
|
|
1235
|
-
lastSelectedItem.after(divider);
|
|
1236
|
-
divider.style.display = '';
|
|
1237
|
-
}
|
|
1238
|
-
else {
|
|
1239
|
-
divider.style.display = 'none';
|
|
1240
|
-
}
|
|
1267
|
+
divider.style.order = '20';
|
|
1268
|
+
const shouldShow = selectedItems.length > 0 && unselectedItems.length > 0;
|
|
1269
|
+
divider.style.display = shouldShow ? '' : 'none';
|
|
1241
1270
|
}
|
|
1242
1271
|
/**
|
|
1243
1272
|
* Synchronizes the checked state of all child nv-fielddropdownitemcheck components
|
|
@@ -2381,6 +2410,12 @@ export class NvFieldmultiselect {
|
|
|
2381
2410
|
"target": undefined,
|
|
2382
2411
|
"capture": false,
|
|
2383
2412
|
"passive": false
|
|
2413
|
+
}, {
|
|
2414
|
+
"name": "focusout",
|
|
2415
|
+
"method": "handleFocusOut",
|
|
2416
|
+
"target": undefined,
|
|
2417
|
+
"capture": true,
|
|
2418
|
+
"passive": true
|
|
2384
2419
|
}, {
|
|
2385
2420
|
"name": "keydown",
|
|
2386
2421
|
"method": "handleKeyDown",
|
|
@@ -77,12 +77,12 @@ nv-fieldmultiselect[error]:not([error=false]) {
|
|
|
77
77
|
--nv-field-border-readonly: var(--nv-field-border-default);
|
|
78
78
|
--nv-field-focus-box-shadow: var(--color-focus-destructive-in-field);
|
|
79
79
|
}
|
|
80
|
-
nv-fieldmultiselect[required]:not([required=false]) label::after, nv-fieldmultiselect[aria-required=true] label::after {
|
|
80
|
+
nv-fieldmultiselect[required]:not([required=false]) > label::after, nv-fieldmultiselect[aria-required=true] > label::after {
|
|
81
81
|
content: "*";
|
|
82
82
|
color: var(--components-form-text-required);
|
|
83
83
|
font-weight: var(--font-weight-high-emphasis);
|
|
84
84
|
}
|
|
85
|
-
nv-fieldmultiselect label {
|
|
85
|
+
nv-fieldmultiselect > label {
|
|
86
86
|
display: flex;
|
|
87
87
|
align-items: center;
|
|
88
88
|
gap: var(--form-label-gap);
|
|
@@ -132,6 +132,13 @@ nv-fieldmultiselect nv-popover div[slot=content] {
|
|
|
132
132
|
overflow-y: auto;
|
|
133
133
|
position: relative;
|
|
134
134
|
}
|
|
135
|
+
nv-fieldmultiselect nv-popover div[slot=content] ul[role=listbox] {
|
|
136
|
+
display: flex;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
}
|
|
139
|
+
nv-fieldmultiselect nv-popover div[slot=content] ul[role=listbox] > *:not(nv-fielddropdownitemcheck):not(hr.multiselect-divider) {
|
|
140
|
+
order: 40;
|
|
141
|
+
}
|
|
135
142
|
nv-fieldmultiselect .input-wrapper-multiselect {
|
|
136
143
|
display: flex;
|
|
137
144
|
flex-wrap: wrap;
|
|
@@ -284,6 +291,9 @@ nv-fieldmultiselect .error-description {
|
|
|
284
291
|
line-height: var(--form-description-line-height);
|
|
285
292
|
color: var(--components-form-text-description-error);
|
|
286
293
|
}
|
|
294
|
+
nv-fieldmultiselect .error-description[hidden] {
|
|
295
|
+
display: none;
|
|
296
|
+
}
|
|
287
297
|
|
|
288
298
|
.no-results-message {
|
|
289
299
|
cursor: not-allowed;
|
|
@@ -299,6 +309,7 @@ nv-fieldmultiselect .error-description {
|
|
|
299
309
|
background-color: var(--components-list-dropdown-separator);
|
|
300
310
|
margin: var(--list-dropdown-item-padding-y) 0;
|
|
301
311
|
border: 0;
|
|
312
|
+
flex-shrink: 0;
|
|
302
313
|
}
|
|
303
314
|
|
|
304
315
|
.select-all-container {
|