@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,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CasQushP.js';
|
|
2
2
|
import { v as v4 } from './v4-BdYh22OP.js';
|
|
3
3
|
|
|
4
|
-
const nvFieldnumberCss = "/* TODO: integrate this logic in the proper structure */\nnv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range {\n background: var(--components-slider-track-filled-hover);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb {\n border-color: var(--components-slider-track-filled-hover);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range {\n background: var(--components-slider-track-filled-focus);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb {\n border-color: var(--components-slider-track-filled-focus);\n}\nnv-fieldslider[error] .slider-container .track-container .track .track-range {\n background: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb {\n border-color: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb:hover {\n border-color: var(--components-slider-track-filled-error);\n outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);\n outline-offset: calc(var(--focus-outline-offset) * 1);\n background-color: var(--components-slider-handler-background-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb:focus {\n border-color: var(--components-slider-track-filled-error);\n outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);\n outline-offset: calc(var(--focus-outline-offset) * 1);\n background-color: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range {\n background: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb {\n border-color: var(--components-slider-track-filled-error);\n}\n\nnv-fieldnumber {\n --nv-field-border-default: var(--components-form-field-border-default);\n --nv-field-border-hover: var(--components-form-field-border-hover);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--components-form-field-border-default);\n --nv-field-border-readonly: var(--components-form-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-brand);\n --nv-field-background: var(--components-form-field-background-default);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--form-gap-y);\n box-sizing: border-box;\n max-width: 480px;\n}\nnv-fieldnumber[fluid]:not([fluid=false]) {\n max-width: unset;\n}\nnv-fieldnumber[readonly]:not([readonly=false]) {\n --nv-field-border-default: var(--components-form-field-border-readonly);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-background: var(--components-form-field-background-readonly);\n}\nnv-fieldnumber[error]:not([error=false]) {\n --nv-field-border-default: var(--components-form-field-border-error);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-destructive-in-field);\n}\nnv-fieldnumber[success]:not([success=false]) {\n --nv-field-border-default: var(--components-form-field-border-success);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-success);\n}\nnv-fieldnumber[required]:not([required=false]) label::after, nv-fieldnumber[aria-required=true] label::after {\n content: \"*\";\n color: var(--components-form-text-required);\n font-weight: var(--font-weight-high-emphasis);\n}\nnv-fieldnumber label {\n display: flex;\n align-items: center;\n gap: var(--form-label-gap);\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: var(--font-weight-medium-emphasis);\n line-height: var(--form-label-line-height);\n}\nnv-fieldnumber .input-wrapper {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\nnv-fieldnumber .input-wrapper .input-container {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default, 1);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n}\nnv-fieldnumber .input-wrapper .input-container:hover {\n border-color: var(--nv-field-border-hover);\n}\nnv-fieldnumber .input-wrapper .input-container:focus-within, nv-fieldnumber .input-wrapper .input-container:focus-within:hover, nv-fieldnumber .input-wrapper .input-container:focus, nv-fieldnumber .input-wrapper .input-container:focus:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:read-only) {\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:disabled) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n}\nnv-fieldnumber .input-wrapper .input-container {\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n}\nnv-fieldnumber .input-wrapper .input-container input {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n padding: var(--form-field-padding-y) var(--form-field-padding-x);\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: var(--font-weight-medium-emphasis);\n line-height: var(--form-field-line-height);\n width: 100%;\n}\nnv-fieldnumber .input-wrapper .input-container input:focus {\n outline: none;\n}\nnv-fieldnumber .input-wrapper .input-container input::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: var(--font-weight-low-emphasis);\n line-height: var(--form-field-line-height);\n}\nnv-fieldnumber .input-wrapper .input-container input {\n /* Hide Edge built-in password reveal and clear icons */\n}\nnv-fieldnumber .input-wrapper .input-container input[type=password]::-ms-clear, nv-fieldnumber .input-wrapper .input-container input[type=password]::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n}\nnv-fieldnumber .input-wrapper .input-container input {\n width: 100%;\n appearance: textfield;\n}\nnv-fieldnumber .input-wrapper .input-container input::-webkit-inner-spin-button, nv-fieldnumber .input-wrapper .input-container input::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n}\nnv-fieldnumber .input-wrapper .input-container nv-icon.validation {\n color: var(--nv-field-border-default);\n margin-right: var(--form-field-gap);\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:last-of-type {\n border-top-right-radius: var(--form-field-radius);\n border-bottom-right-radius: var(--form-field-radius);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:last-of-type {\n border-top-right-radius: var(--form-field-radius);\n border-bottom-right-radius: var(--form-field-radius);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border-radius: 0px;\n}\n@container field-number-input-container (width < 150px) {\n nv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n display: none;\n }\n nv-fieldnumber .input-wrapper .input-container .stepper {\n display: none;\n }\n}\nnv-fieldnumber .description {\n display: flex;\n align-items: center;\n align-self: stretch;\n gap: var(--spacing-1);\n color: var(--components-form-text-description-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n}\nnv-fieldnumber .error-description {\n display: flex;\n align-items: center;\n align-self: stretch;\n gap: var(--spacing-1);\n color: var(--components-form-text-description-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n color: var(--components-form-text-description-error);\n}";
|
|
4
|
+
const nvFieldnumberCss = "/* TODO: integrate this logic in the proper structure */\nnv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range {\n background: var(--components-slider-track-filled-hover);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb {\n border-color: var(--components-slider-track-filled-hover);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range {\n background: var(--components-slider-track-filled-focus);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb {\n border-color: var(--components-slider-track-filled-focus);\n}\nnv-fieldslider[error] .slider-container .track-container .track .track-range {\n background: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb {\n border-color: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb:hover {\n border-color: var(--components-slider-track-filled-error);\n outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);\n outline-offset: calc(var(--focus-outline-offset) * 1);\n background-color: var(--components-slider-handler-background-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb:focus {\n border-color: var(--components-slider-track-filled-error);\n outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);\n outline-offset: calc(var(--focus-outline-offset) * 1);\n background-color: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range {\n background: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb {\n border-color: var(--components-slider-track-filled-error);\n}\n\nnv-fieldnumber {\n --nv-field-border-default: var(--components-form-field-border-default);\n --nv-field-border-hover: var(--components-form-field-border-hover);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--components-form-field-border-default);\n --nv-field-border-readonly: var(--components-form-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-brand);\n --nv-field-background: var(--components-form-field-background-default);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--form-gap-y);\n box-sizing: border-box;\n max-width: 480px;\n}\nnv-fieldnumber[fluid]:not([fluid=false]) {\n max-width: unset;\n}\nnv-fieldnumber[readonly]:not([readonly=false]) {\n --nv-field-border-default: var(--components-form-field-border-readonly);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-background: var(--components-form-field-background-readonly);\n}\nnv-fieldnumber[error]:not([error=false]) {\n --nv-field-border-default: var(--components-form-field-border-error);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-destructive-in-field);\n}\nnv-fieldnumber[success]:not([success=false]) {\n --nv-field-border-default: var(--components-form-field-border-success);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-success);\n}\nnv-fieldnumber[required]:not([required=false]) label::after, nv-fieldnumber[aria-required=true] label::after {\n content: \"*\";\n color: var(--components-form-text-required);\n font-weight: var(--font-weight-high-emphasis);\n}\nnv-fieldnumber label {\n display: flex;\n align-items: center;\n gap: var(--form-label-gap);\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: var(--font-weight-medium-emphasis);\n line-height: var(--form-label-line-height);\n}\nnv-fieldnumber .input-wrapper {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\nnv-fieldnumber .input-wrapper .input-container {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default, 1);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n}\nnv-fieldnumber .input-wrapper .input-container:hover {\n border-color: var(--nv-field-border-hover);\n}\nnv-fieldnumber .input-wrapper .input-container:focus-within, nv-fieldnumber .input-wrapper .input-container:focus-within:hover, nv-fieldnumber .input-wrapper .input-container:focus, nv-fieldnumber .input-wrapper .input-container:focus:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:read-only) {\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:disabled) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n}\nnv-fieldnumber .input-wrapper .input-container {\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n}\nnv-fieldnumber .input-wrapper .input-container input {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n padding: calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: var(--font-weight-medium-emphasis);\n line-height: var(--form-field-line-height);\n width: 100%;\n}\nnv-fieldnumber .input-wrapper .input-container input:focus {\n outline: none;\n}\nnv-fieldnumber .input-wrapper .input-container input::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: var(--font-weight-low-emphasis);\n line-height: var(--form-field-line-height);\n}\nnv-fieldnumber .input-wrapper .input-container input {\n /* Hide Edge built-in password reveal and clear icons */\n}\nnv-fieldnumber .input-wrapper .input-container input[type=password]::-ms-clear, nv-fieldnumber .input-wrapper .input-container input[type=password]::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n}\nnv-fieldnumber .input-wrapper .input-container input {\n width: 100%;\n appearance: textfield;\n}\nnv-fieldnumber .input-wrapper .input-container input::-webkit-inner-spin-button, nv-fieldnumber .input-wrapper .input-container input::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n}\nnv-fieldnumber .input-wrapper .input-container nv-icon.validation {\n color: var(--nv-field-border-default);\n margin-right: var(--form-field-gap);\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:last-of-type {\n border-top-right-radius: var(--form-field-radius);\n border-bottom-right-radius: var(--form-field-radius);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:last-of-type {\n border-top-right-radius: var(--form-field-radius);\n border-bottom-right-radius: var(--form-field-radius);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border-radius: 0px;\n}\n@container field-number-input-container (width < 150px) {\n nv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n display: none;\n }\n nv-fieldnumber .input-wrapper .input-container .stepper {\n display: none;\n }\n}\nnv-fieldnumber .description {\n display: flex;\n align-items: center;\n align-self: stretch;\n gap: var(--spacing-1);\n color: var(--components-form-text-description-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n}\nnv-fieldnumber .error-description {\n display: flex;\n align-items: center;\n align-self: stretch;\n gap: var(--spacing-1);\n color: var(--components-form-text-description-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n color: var(--components-form-text-description-error);\n}";
|
|
5
5
|
|
|
6
6
|
const NvFieldnumber = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -165,11 +165,11 @@ const NvFieldnumber = class {
|
|
|
165
165
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
166
166
|
: undefined;
|
|
167
167
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
168
|
-
return (h(Host, { key: '
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
172
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
168
|
+
return (h(Host, { key: '7c0ae66de24ba187965d6ea628f79665e6a39ca4' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '8a8ee8f77c938e5edecacf154624f1e5c34d189f', htmlFor: this.inputId }, h("slot", { key: 'ff042aa89476fc7be75480fc91c0d7183c897d61', name: "label" }, this.label))), h("div", { key: '16fb554a86165d869c9807fed9a1743e91ea06c1', class: "input-wrapper" }, h("slot", { key: '6527ebde85fc47e7d372e28748c69bab20876e2b', name: "before-input" }), h("div", { key: '1f3a79c7f4071c6b28e961d0283bd2d95c698579', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: 'a7456a7eef8cb9bb314c5b502fced765c66b1ac1', name: "leading-input" }), h("input", { key: '8e1d243b578068c2a05cb2f041aa3b08e4dcf2f5', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
169
|
+
'aria-required': String(ariaRequiredValue),
|
|
170
|
+
}), max: this.max, min: this.min, step: this.step, value: typeof this.value === 'number' ? this.value : undefined, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), h("slot", { key: '09f8e9e4947efbd1f860d3e84bf55fa4aabfe57a', name: "trailing-input" }), this.error && (h("nv-icon", { key: 'e568ab2afbc8634baa4b1b86fcb54e624cb4f69f', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: 'd55e850ecd077269bc072732e84b98bfe2f888f2', name: "circle-check", class: "validation", size: "md" })), h("div", { key: 'd28da44ee36f534274369ec5b7db274bd6a3d2a4', class: "stepper" }, h("nv-iconbutton", { key: 'efafb0710346313e9cfaaba3b671031bdc9d3fe8', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), h("nv-iconbutton", { key: '20d7e4c1db26bab4d0edfc6e8a322db5def9ff98', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), h("slot", { key: '121da9bfad7ac46e4fe88d7cc0581d787f827b3a', name: "after-input" })), (this.description ||
|
|
171
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'b42f0a5399cda2b5f048d90cc9016bbf1e77f55a', class: "description" }, h("slot", { key: '0349b6591850a2d21a6e1a740fb40a0ef35a7a5c', name: "description" }, this.description))), (this.errorDescription ||
|
|
172
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'cff9902d3c6d1b70ffbc24b739151ddbdc9d4970', hidden: !this.error, class: "error-description" }, h("slot", { key: 'f461d3362d4b61b7431a8de73d723ba05f0ed16b', name: "error-description" }, this.errorDescription)))));
|
|
173
173
|
}
|
|
174
174
|
static get formAssociated() { return true; }
|
|
175
175
|
get el() { return getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldnumber.entry.js","sources":["src/components/nv-fieldnumber/nv-fieldnumber.scss?tag=nv-fieldnumber","src/components/nv-fieldnumber/nv-fieldnumber.tsx"],"sourcesContent":["@use '../../styles/form-field' as forms;\n\nnv-fieldnumber {\n @include forms.form-field-variables();\n @include forms.form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include forms.form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include forms.form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include forms.form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include forms.form-field-success-variables();\n }\n\n &[required]:not([required='false']) label,\n &[aria-required=\"true\"] label {\n @include forms.form-field-label-required();\n }\n\n label {\n @include forms.form-field-label();\n }\n\n .input-wrapper {\n @include forms.form-field-input-wrapper();\n\n .input-container {\n @include forms.form-field-input-container();\n\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n\n input {\n @include forms.form-field-input();\n\n width: 100%;\n appearance: textfield;\n\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n }\n }\n\n nv-icon.validation {\n @include forms.form-field-icon();\n margin-right: var(--form-field-gap);\n }\n\n > nv-iconbutton {\n @include forms.form-field-action();\n }\n\n .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n > nv-iconbutton {\n @include forms.form-field-action();\n border-radius: 0px;\n }\n }\n\n // container query to remove .stepper and and the spacer when the container is less than 150px\n // .. this needs to be an absolute value because container queries do not accept variables\n // .. using relative width (cqw) compared to a parent container would not work\n // .. because the parent container follows the child's width\n @container field-number-input-container (width < 150px) {\n .stepper-spacer {\n display: none;\n }\n\n .stepper {\n display: none;\n }\n }\n }\n }\n\n .description {\n @include forms.form-field-description();\n }\n\n .error-description {\n @include forms.form-field-error-description();\n }\n}","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n * @note This uses the native HTML `required` attribute, which triggers browser validation.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Marks the input field as required for accessibility purposes without triggering\n * native HTML validation. Use this when implementing custom validation logic.\n * @note When set, this uses `aria-required` instead of the native `required` attribute.\n * This allows developers to implement custom validation while maintaining accessibility.\n * @note If this prop is not explicitly set, the component will check for the HTML attribute\n * 'aria-required' directly to determine if it should be applied.\n */\n @Prop({ reflect: true, attribute: 'aria-required' })\n readonly ariaRequiredAttr: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number | null;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n // eslint-disable-next-line nova/bind-event-naming, nova/event-inline-interfaces\n @Event({ bubbles: false })\n valueChanged: EventEmitter<number | null>; // eslint-disable-line nova/event-inline-interfaces\n\n /**\n * Tracks the last emitted value to avoid double firing for normalized nulls.\n */\n private lastEmittedValue?: number | null;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number | null | undefined) {\n const normalized =\n typeof newValue === 'number' && !Number.isNaN(newValue) ? newValue : null;\n\n if (this.lastEmittedValue === normalized) {\n return;\n }\n\n this.lastEmittedValue = normalized;\n this.valueChanged.emit(normalized);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n if (input.value === '') {\n this.value = null;\n return;\n }\n\n const nextValue = input.valueAsNumber;\n\n if (Number.isNaN(nextValue)) {\n return;\n }\n\n this.value = nextValue;\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return (\n this.min !== undefined &&\n typeof this.value === 'number' &&\n this.value <= this.min\n );\n };\n\n private isMaxValueReached = (): boolean => {\n return (\n this.max !== undefined &&\n typeof this.value === 'number' &&\n this.value >= this.max\n );\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n // Check aria-required from multiple sources:\n // 1. HTML attribute 'aria-required' (direct HTML) - check if explicitly set\n // 2. JavaScript prop (when prop is explicitly set via JavaScript)\n // We use hasAttribute to determine if the attribute was explicitly set by the user,\n // since the prop now defaults to false (to maintain Blazor compatibility)\n const hasAriaRequiredAttr =\n this.el.hasAttribute('aria-required') ||\n this.el.hasAttribute('aria-required-attr');\n\n const ariaRequiredFromAttr = hasAriaRequiredAttr\n ? this.el.getAttribute('aria-required') ||\n this.el.getAttribute('aria-required-attr')\n : null;\n\n // Use aria-required if the attribute was explicitly set\n // With reflect: true, setting the prop will also set the attribute\n const useAriaRequired = hasAriaRequiredAttr;\n\n // Determine the value: use attribute if it exists (prop reflects to attribute via reflect: true)\n // If attribute doesn't exist, the prop was never set and we don't use aria-required\n const ariaRequiredAttrValue = hasAriaRequiredAttr\n ? ariaRequiredFromAttr\n : null;\n\n // Determine which attributes to use\n // If aria-required HTML attribute is present, use it (convert string to boolean)\n // If required is set and aria-required is not \"false\", use native required\n // If aria-required is \"false\", don't use native required even if required is set\n const ariaRequiredValue = useAriaRequired\n ? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''\n : undefined;\n\n const useNativeRequired =\n this.required && (!useAriaRequired || ariaRequiredValue === true);\n\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={useNativeRequired ? this.required : undefined}\n {...(ariaRequiredValue !== undefined && {\n 'aria-required': String(ariaRequiredValue),\n })}\n max={this.max}\n min={this.min}\n step={this.step}\n value={typeof this.value === 'number' ? this.value : undefined}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["uuidv4"],"mappings":";;;AAAA,MAAM,gBAAgB,GAAG,muUAAmuU;;MC2B/uU,aAAa,GAAA,MAAA;AAN1B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;AA+BE;;;;;AAKG;AAEM,QAAA,IAAO,CAAA,OAAA,GAAWA,EAAM,EAAE;AAmCnC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;;;;AAOG;AAEM,QAAA,IAAgB,CAAA,gBAAA,GAAY,KAAK;AAE1C;;;;AAIG;AAEH,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;AAWtB;;;AAGG;AAEM,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAgBjC;;;AAGG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAW,CAAC;AAUzB;;;;AAIG;AAGM,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAEnC;;AAEG;AAEM,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;;;;AAwCvB,QAAA,IAAA,CAAA,WAAW,GAAG,CAAC,KAAY,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jB,CAAA,CAAA,eAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,IAAI,EACT,IAAI,EAAC,MAAM,EACX,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAClC,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,QAAQ,EAAC,IAAI,EAAA,CACb,CACE,CACF,EAEN,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAA,CAAQ,CAC5B,EAEL,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAA,EACtB,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,aAAa,EAAA,EAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,EAAA,EACjD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,mBAAmB,EAAA,EAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"nv-fieldnumber.entry.js","sources":["src/components/nv-fieldnumber/nv-fieldnumber.scss?tag=nv-fieldnumber","src/components/nv-fieldnumber/nv-fieldnumber.tsx"],"sourcesContent":["@use '../../styles/form-field' as forms;\n\nnv-fieldnumber {\n @include forms.form-field-variables();\n @include forms.form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include forms.form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include forms.form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include forms.form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include forms.form-field-success-variables();\n }\n\n &[required]:not([required='false']) label,\n &[aria-required=\"true\"] label {\n @include forms.form-field-label-required();\n }\n\n label {\n @include forms.form-field-label();\n }\n\n .input-wrapper {\n @include forms.form-field-input-wrapper();\n\n .input-container {\n @include forms.form-field-input-container();\n\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n\n input {\n @include forms.form-field-input();\n\n width: 100%;\n appearance: textfield;\n\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n }\n }\n\n nv-icon.validation {\n @include forms.form-field-icon();\n margin-right: var(--form-field-gap);\n }\n\n > nv-iconbutton {\n @include forms.form-field-action();\n }\n\n .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n > nv-iconbutton {\n @include forms.form-field-action();\n border-radius: 0px;\n }\n }\n\n // container query to remove .stepper and and the spacer when the container is less than 150px\n // .. this needs to be an absolute value because container queries do not accept variables\n // .. using relative width (cqw) compared to a parent container would not work\n // .. because the parent container follows the child's width\n @container field-number-input-container (width < 150px) {\n .stepper-spacer {\n display: none;\n }\n\n .stepper {\n display: none;\n }\n }\n }\n }\n\n .description {\n @include forms.form-field-description();\n }\n\n .error-description {\n @include forms.form-field-error-description();\n }\n}","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n * @note This uses the native HTML `required` attribute, which triggers browser validation.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Marks the input field as required for accessibility purposes without triggering\n * native HTML validation. Use this when implementing custom validation logic.\n * @note When set, this uses `aria-required` instead of the native `required` attribute.\n * This allows developers to implement custom validation while maintaining accessibility.\n * @note If this prop is not explicitly set, the component will check for the HTML attribute\n * 'aria-required' directly to determine if it should be applied.\n */\n @Prop({ reflect: true, attribute: 'aria-required' })\n readonly ariaRequiredAttr: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number | null;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n // eslint-disable-next-line nova/bind-event-naming, nova/event-inline-interfaces\n @Event({ bubbles: false })\n valueChanged: EventEmitter<number | null>; // eslint-disable-line nova/event-inline-interfaces\n\n /**\n * Tracks the last emitted value to avoid double firing for normalized nulls.\n */\n private lastEmittedValue?: number | null;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number | null | undefined) {\n const normalized =\n typeof newValue === 'number' && !Number.isNaN(newValue) ? newValue : null;\n\n if (this.lastEmittedValue === normalized) {\n return;\n }\n\n this.lastEmittedValue = normalized;\n this.valueChanged.emit(normalized);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n if (input.value === '') {\n this.value = null;\n return;\n }\n\n const nextValue = input.valueAsNumber;\n\n if (Number.isNaN(nextValue)) {\n return;\n }\n\n this.value = nextValue;\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return (\n this.min !== undefined &&\n typeof this.value === 'number' &&\n this.value <= this.min\n );\n };\n\n private isMaxValueReached = (): boolean => {\n return (\n this.max !== undefined &&\n typeof this.value === 'number' &&\n this.value >= this.max\n );\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n // Check aria-required from multiple sources:\n // 1. HTML attribute 'aria-required' (direct HTML) - check if explicitly set\n // 2. JavaScript prop (when prop is explicitly set via JavaScript)\n // We use hasAttribute to determine if the attribute was explicitly set by the user,\n // since the prop now defaults to false (to maintain Blazor compatibility)\n const hasAriaRequiredAttr =\n this.el.hasAttribute('aria-required') ||\n this.el.hasAttribute('aria-required-attr');\n\n const ariaRequiredFromAttr = hasAriaRequiredAttr\n ? this.el.getAttribute('aria-required') ||\n this.el.getAttribute('aria-required-attr')\n : null;\n\n // Use aria-required if the attribute was explicitly set\n // With reflect: true, setting the prop will also set the attribute\n const useAriaRequired = hasAriaRequiredAttr;\n\n // Determine the value: use attribute if it exists (prop reflects to attribute via reflect: true)\n // If attribute doesn't exist, the prop was never set and we don't use aria-required\n const ariaRequiredAttrValue = hasAriaRequiredAttr\n ? ariaRequiredFromAttr\n : null;\n\n // Determine which attributes to use\n // If aria-required HTML attribute is present, use it (convert string to boolean)\n // If required is set and aria-required is not \"false\", use native required\n // If aria-required is \"false\", don't use native required even if required is set\n const ariaRequiredValue = useAriaRequired\n ? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''\n : undefined;\n\n const useNativeRequired =\n this.required && (!useAriaRequired || ariaRequiredValue === true);\n\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={useNativeRequired ? this.required : undefined}\n {...(ariaRequiredValue !== undefined && {\n 'aria-required': String(ariaRequiredValue),\n })}\n max={this.max}\n min={this.min}\n step={this.step}\n value={typeof this.value === 'number' ? this.value : undefined}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["uuidv4"],"mappings":";;;AAAA,MAAM,gBAAgB,GAAG,+uUAA+uU;;MC2B3vU,aAAa,GAAA,MAAA;AAN1B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;AA+BE;;;;;AAKG;AAEM,QAAA,IAAO,CAAA,OAAA,GAAWA,EAAM,EAAE;AAmCnC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;AAIG;AAEM,Q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,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,EAAA,EACjD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,mBAAmB,EAAA,EAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CasQushP.js';
|
|
2
2
|
import { v as v4 } from './v4-BdYh22OP.js';
|
|
3
3
|
|
|
4
|
-
const nvFieldpasswordCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldpassword{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldpassword[fluid]:not([fluid=false]){max-width:unset}nv-fieldpassword[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldpassword[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldpassword[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldpassword[required]:not([required=false]) label::after,nv-fieldpassword[aria-required=true] label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldpassword label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldpassword .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldpassword .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldpassword .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldpassword .input-wrapper .input-container:focus-within,nv-fieldpassword .input-wrapper .input-container:focus-within:hover,nv-fieldpassword .input-wrapper .input-container:focus,nv-fieldpassword .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldpassword .input-wrapper .input-container:has(input:read-only){background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldpassword .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldpassword .input-wrapper .input-container{position:relative}nv-fieldpassword .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%}nv-fieldpassword .input-wrapper .input-container input:focus{outline:none}nv-fieldpassword .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldpassword .input-wrapper .input-container input{}nv-fieldpassword .input-wrapper .input-container input[type=password]::-ms-clear,nv-fieldpassword .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fieldpassword .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldpassword .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldpassword .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
4
|
+
const nvFieldpasswordCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldpassword{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldpassword[fluid]:not([fluid=false]){max-width:unset}nv-fieldpassword[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldpassword[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldpassword[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldpassword[required]:not([required=false]) label::after,nv-fieldpassword[aria-required=true] label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldpassword label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldpassword .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldpassword .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldpassword .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldpassword .input-wrapper .input-container:focus-within,nv-fieldpassword .input-wrapper .input-container:focus-within:hover,nv-fieldpassword .input-wrapper .input-container:focus,nv-fieldpassword .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldpassword .input-wrapper .input-container:has(input:read-only){background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldpassword .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldpassword .input-wrapper .input-container{position:relative}nv-fieldpassword .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%}nv-fieldpassword .input-wrapper .input-container input:focus{outline:none}nv-fieldpassword .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldpassword .input-wrapper .input-container input{}nv-fieldpassword .input-wrapper .input-container input[type=password]::-ms-clear,nv-fieldpassword .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fieldpassword .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldpassword .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldpassword .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
5
5
|
|
|
6
6
|
const NvFieldpassword = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -143,11 +143,11 @@ const NvFieldpassword = class {
|
|
|
143
143
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
144
144
|
: undefined;
|
|
145
145
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
146
|
-
return (h(Host, { key: '
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
150
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
146
|
+
return (h(Host, { key: '187f0ebbf10b6fc51015e35bf3906eebb4009877' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'bf48decdda3cb09bdc3bb66777d9681ca7fe000d', htmlFor: this.inputId }, h("slot", { key: '115f1c66b1b6daa01e5677f83129044244b79a02', name: "label" }, this.label))), h("div", { key: 'bb1f612364948b42c1e46c0e068f0fae46200ba8', class: "input-wrapper" }, h("slot", { key: '2d7a1398a3a72bf4d30fee5b15f0d4f82671f1de', name: "before-input" }), h("div", { key: '900aab152e49d7071c3c886decc7d18d2d04f6ca', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '0ff288dbda29b8b9b19a535f5ef0d9b96e7a7c3a', name: "leading-input" }), h("input", { key: 'ef08440e8ac74bbe6d7af446317d1a1baa632770', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
147
|
+
'aria-required': String(ariaRequiredValue),
|
|
148
|
+
}), maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), (this.success || this.error) && (h("nv-icon", { key: '3f17aa2d7e3f2a05663b952ea104adbc193100bd', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (h("nv-iconbutton", { key: 'f2c5ba947f6284877a4a67b82fac2e66ef722ab2', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), h("slot", { key: '1c12ce6f14e1dd8dbc5cc22620688d92c275ba15', name: "after-input" })), (this.description ||
|
|
149
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '0432c059f5a3c9eacdcde93177a398f4b27b8a88', class: "description" }, h("slot", { key: '4a5b18c7a1df0e8d7e6435ebf731a3025ccd5861', name: "description" }, this.description))), (this.errorDescription ||
|
|
150
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'ba4986e81220fa41481dc699a52d05ad0b22adc4', hidden: !this.error, class: "error-description" }, h("slot", { key: 'af1b29bb3575f3985f788769a97d5ae38ab26fd9', name: "error-description" }, this.errorDescription)))));
|
|
151
151
|
}
|
|
152
152
|
static get formAssociated() { return true; }
|
|
153
153
|
get el() { return getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldpassword.entry.js","sources":["src/components/nv-fieldpassword/nv-fieldpassword.scss?tag=nv-fieldpassword","src/components/nv-fieldpassword/nv-fieldpassword.tsx"],"sourcesContent":["@use '../../styles/form-field' as forms;\n\nnv-fieldpassword {\n @include forms.form-field-variables();\n @include forms.form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include forms.form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include forms.form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include forms.form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include forms.form-field-success-variables();\n }\n\n &[required]:not([required='false']) label,\n &[aria-required=\"true\"] label {\n @include forms.form-field-label-required();\n }\n\n label {\n @include forms.form-field-label();\n }\n\n .input-wrapper {\n @include forms.form-field-input-wrapper();\n\n .input-container {\n @include forms.form-field-input-container();\n\n position: relative;\n\n input {\n @include forms.form-field-input();\n }\n > nv-iconbutton {\n @include forms.form-field-action();\n }\n\n nv-icon.validation {\n @include forms.form-field-icon();\n }\n }\n }\n\n .description {\n @include forms.form-field-description();\n }\n\n .error-description {\n @include forms.form-field-error-description();\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n * @note This uses the native HTML `required` attribute, which triggers browser validation.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Marks the input field as required for accessibility purposes without triggering\n * native HTML validation. Use this when implementing custom validation logic.\n * @note When set, this uses `aria-required` instead of the native `required` attribute.\n * This allows developers to implement custom validation while maintaining accessibility.\n * @note If this prop is not explicitly set, the component will check for the HTML attribute\n * 'aria-required' directly to determine if it should be applied.\n */\n @Prop({ reflect: true, attribute: 'aria-required' })\n readonly ariaRequiredAttr: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event({ bubbles: false })\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n // Check aria-required from multiple sources:\n // 1. JavaScript prop (most reliable)\n // 2. HTML attribute 'aria-required' (direct HTML)\n // 3. HTML attribute 'aria-required-attr' (from JSX kebab-case conversion)\n // Check aria-required from multiple sources:\n // 1. HTML attribute 'aria-required' (direct HTML) - check if explicitly set\n // 2. JavaScript prop (when prop is explicitly set via JavaScript)\n // We use hasAttribute to determine if the attribute was explicitly set by the user,\n // since the prop now defaults to false (to maintain Blazor compatibility)\n const hasAriaRequiredAttr =\n this.el.hasAttribute('aria-required') ||\n this.el.hasAttribute('aria-required-attr');\n\n const ariaRequiredFromAttr = hasAriaRequiredAttr\n ? this.el.getAttribute('aria-required') ||\n this.el.getAttribute('aria-required-attr')\n : null;\n\n // Use aria-required if the attribute was explicitly set\n // With reflect: true, setting the prop will also set the attribute\n const useAriaRequired = hasAriaRequiredAttr;\n\n // Determine the value: use attribute if it exists (prop reflects to attribute via reflect: true)\n // If attribute doesn't exist, the prop was never set and we don't use aria-required\n const ariaRequiredAttrValue = hasAriaRequiredAttr\n ? ariaRequiredFromAttr\n : null;\n\n // Determine which attributes to use\n // If aria-required HTML attribute is present, use it (convert string to boolean)\n // If required is set and aria-required is not \"false\", use native required\n // If aria-required is \"false\", don't use native required even if required is set\n const ariaRequiredValue = useAriaRequired\n ? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''\n : undefined;\n\n const useNativeRequired =\n this.required && (!useAriaRequired || ariaRequiredValue === true);\n\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={useNativeRequired ? this.required : undefined}\n {...(ariaRequiredValue !== undefined && {\n 'aria-required': String(ariaRequiredValue),\n })}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["uuidv4"],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,q2PAAq2P;;MC4Bn3P,eAAe,GAAA,MAAA;AAN5B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAaE;;;;;AAKG;AAEM,QAAA,IAAO,CAAA,OAAA,GAAWA,EAAM,EAAE;AA4CnC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;;;;AAOG;AAEM,QAAA,IAAgB,CAAA,gBAAA,GAAY,KAAK;AAE1C;;;;AAIG;AAEM,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;AAU/B;;;AAGG;AAEM,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AA4BjC;;;AAGG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAsB,MAAM;AAEzC;;;;;AAKG;AAEM,QAAA,IAAY,CAAA,YAAA,GAA+B,KAAK;AAEz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AAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAA,CAAQ,CAC5B,EAEL,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAA,EACtB,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,aAAa,EAAA,EAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,EAAA,EACjD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,mBAAmB,EAAA,EAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"nv-fieldpassword.entry.js","sources":["src/components/nv-fieldpassword/nv-fieldpassword.scss?tag=nv-fieldpassword","src/components/nv-fieldpassword/nv-fieldpassword.tsx"],"sourcesContent":["@use '../../styles/form-field' as forms;\n\nnv-fieldpassword {\n @include forms.form-field-variables();\n @include forms.form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include forms.form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include forms.form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include forms.form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include forms.form-field-success-variables();\n }\n\n &[required]:not([required='false']) label,\n &[aria-required=\"true\"] label {\n @include forms.form-field-label-required();\n }\n\n label {\n @include forms.form-field-label();\n }\n\n .input-wrapper {\n @include forms.form-field-input-wrapper();\n\n .input-container {\n @include forms.form-field-input-container();\n\n position: relative;\n\n input {\n @include forms.form-field-input();\n }\n > nv-iconbutton {\n @include forms.form-field-action();\n }\n\n nv-icon.validation {\n @include forms.form-field-icon();\n }\n }\n }\n\n .description {\n @include forms.form-field-description();\n }\n\n .error-description {\n @include forms.form-field-error-description();\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n * @note This uses the native HTML `required` attribute, which triggers browser validation.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Marks the input field as required for accessibility purposes without triggering\n * native HTML validation. Use this when implementing custom validation logic.\n * @note When set, this uses `aria-required` instead of the native `required` attribute.\n * This allows developers to implement custom validation while maintaining accessibility.\n * @note If this prop is not explicitly set, the component will check for the HTML attribute\n * 'aria-required' directly to determine if it should be applied.\n */\n @Prop({ reflect: true, attribute: 'aria-required' })\n readonly ariaRequiredAttr: boolean = false;\n\n /**\n * Alters the input field's appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event({ bubbles: false })\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n // Check aria-required from multiple sources:\n // 1. JavaScript prop (most reliable)\n // 2. HTML attribute 'aria-required' (direct HTML)\n // 3. HTML attribute 'aria-required-attr' (from JSX kebab-case conversion)\n // Check aria-required from multiple sources:\n // 1. HTML attribute 'aria-required' (direct HTML) - check if explicitly set\n // 2. JavaScript prop (when prop is explicitly set via JavaScript)\n // We use hasAttribute to determine if the attribute was explicitly set by the user,\n // since the prop now defaults to false (to maintain Blazor compatibility)\n const hasAriaRequiredAttr =\n this.el.hasAttribute('aria-required') ||\n this.el.hasAttribute('aria-required-attr');\n\n const ariaRequiredFromAttr = hasAriaRequiredAttr\n ? this.el.getAttribute('aria-required') ||\n this.el.getAttribute('aria-required-attr')\n : null;\n\n // Use aria-required if the attribute was explicitly set\n // With reflect: true, setting the prop will also set the attribute\n const useAriaRequired = hasAriaRequiredAttr;\n\n // Determine the value: use attribute if it exists (prop reflects to attribute via reflect: true)\n // If attribute doesn't exist, the prop was never set and we don't use aria-required\n const ariaRequiredAttrValue = hasAriaRequiredAttr\n ? ariaRequiredFromAttr\n : null;\n\n // Determine which attributes to use\n // If aria-required HTML attribute is present, use it (convert string to boolean)\n // If required is set and aria-required is not \"false\", use native required\n // If aria-required is \"false\", don't use native required even if required is set\n const ariaRequiredValue = useAriaRequired\n ? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''\n : undefined;\n\n const useNativeRequired =\n this.required && (!useAriaRequired || ariaRequiredValue === true);\n\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={useNativeRequired ? this.required : undefined}\n {...(ariaRequiredValue !== undefined && {\n 'aria-required': String(ariaRequiredValue),\n })}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["uuidv4"],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,i3PAAi3P;;MC4B/3P,eAAe,GAAA,MAAA;AAN5B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAaE;;;;;AAKG;AAEM,QAAA,IAAO,CAAA,OAAA,GAAWA,EAAM,EAAE;AA4CnC;;;;AAIG;AAEM,QAAA,IAAQ,CA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event.target;
|
|
73
|
-
if (
|
|
73
|
+
if (target?.type === 'radio') {
|
|
74
74
|
Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(element => {
|
|
75
75
|
if (element.name === this.name) {
|
|
76
76
|
element.checked = false;
|
|
@@ -83,9 +83,9 @@ const NvFieldradio = class {
|
|
|
83
83
|
/****************************************************************************/
|
|
84
84
|
//#region RENDER
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
87
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
88
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
86
|
+
return (h(Host, { key: '3fceb787d8e778b5724361f0a240a63375117941', class: clsx(this.labelPlacement === 'before' && 'label-placement-before', this.error && 'error') }, h("input", { key: 'a61213ca3fb3251cd02a3716859a0182a07428d7', type: "radio", id: this.inputId, name: this.name, autofocus: this.autofocus, autocomplete: "off", value: this.value, checked: this.checked, disabled: this.disabled }), h("div", { key: '4faca6c7d131897671d307053e28ade9e5f398f8', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'ab93b19fa1fd36d6d0fdae08ac4f935c82d0f355', htmlFor: this.inputId }, h("slot", { key: 'f914379ab7738b7ce2856be0738796da23c130c6', name: "label" }, this.label))), (this.description ||
|
|
87
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: 'fc0d08ba7178252f8ba0c8f958a080f44b8e8a19', class: "description" }, h("slot", { key: '2d7936a1322ea9798998900fa92cfac1f574685c', name: "description" }, this.description))), (this.errorDescription ||
|
|
88
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '39e27f0156df7ec64324012dc815cba251992d6f', hidden: !this.error, class: "error-description" }, h("slot", { key: '1d408d03c05c3eeba238aea59c5e6393c3befd82', name: "error-description" }, this.errorDescription))))));
|
|
89
89
|
}
|
|
90
90
|
static get formAssociated() { return true; }
|
|
91
91
|
get el() { return getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-fieldradio.entry.js","sources":["src/components/nv-fieldradio/styles/nv-fieldradio.scss?tag=nv-fieldradio","src/components/nv-fieldradio/nv-fieldradio.tsx"],"sourcesContent":["@use './mixins' as *;\n\nnv-fieldradio {\n @include fieldradio-variables();\n @include root-styles();\n\n &.error {\n @include fieldradio-error-variables();\n }\n\n &.label-placement-before {\n @include label-before-styles();\n }\n\n &[disabled] {\n // TODO: Find a way to use the --components-form-opacity-disabled variable properly, right now it outputs a value of 50px instead of 0.5.\n // opacity: var(--components-form-opacity-disabled); Error: Invalid value for --components-form-opacity-disabled (expected a <number> but got \"50px\")\n opacity: 0.5;\n }\n\n label {\n @include label-styles();\n }\n\n input[type=\"radio\"] {\n @include input-styles();\n }\n\n .description {\n @include description-styles();\n }\n\n .error-description {\n @include error-description-styles();\n }\n\n .text-container {\n @include text-container-styles();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Listen,\n Watch,\n Element,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { type LabelPlacement } from '../../utils/constants';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldradio',\n shadow: false,\n styleUrl: 'styles/nv-fieldradio.scss',\n formAssociated: true,\n})\nexport class NvFieldradio {\n @Element() el: HTMLNvFieldradioElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Adds a helpful hint message below the label\n * @deprecated use description instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Set the label placement to before the input\n * @deprecated use labelPlacement instead.\n */\n @Prop({ reflect: true })\n readonly labelBefore: boolean = false;\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.labelBefore) {\n this.labelPlacement = 'before';\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the radio button’s input element and the for attribute of\n * the associated label. If no ID is provided, a random one will be\n * automatically generated to ensure unique identification, facilitating\n * proper label association and accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Use this to assign a group name to your radio buttons. When you have\n * multiple radio buttons with the same name, users will be able to select\n * only one option within that group, making your forms more organized and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Defines what data will be sent when the radio button is selected.\n * This helps you identify which option the user has chosen in your form,\n * ensuring accurate data collection. When the form is submitted, the data\n * will consist of a name=value pair.\n */\n @Prop({ reflect: true })\n readonly value: string;\n\n /**\n * Sets the text content that is rendered next to the input element of type\n * radio. This label is essential for accessibility and user clarity, as it\n * describes the purpose or option of the radio button.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Defines the position of the label relative to the radio button.\n */\n @Prop({ mutable: true, reflect: true })\n labelPlacement: `${LabelPlacement}`;\n\n /**\n * Adds a helpful hint message below the label. This description provides\n * extra information or context about the radio button option, assisting users\n * in making more informed choices.\n */\n @Prop({ mutable: true, reflect: true })\n description: string;\n\n /**\n * Highlight the radio button with error styling. It helps users quickly\n * identify which option needs attention, improving their form-filling\n * experience by making issues more visible.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the radio\n * button.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Controls whether the radio button is selected.\n */\n @Prop({ mutable: true, reflect: true })\n checked: boolean = false;\n\n /**\n * Disables the radio button, making it un-selectable.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the checked state changes.\n * @bind checked\n */\n @Event({ bubbles: false })\n checkedChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches for changes to the checked state and emits the new value.\n * @param {boolean} checked - The new value of the checked state.\n */\n @Watch('checked')\n handleCheckedChange(checked: boolean) {\n this.checkedChanged.emit(checked);\n }\n\n /**\n * Listens for the change event on the radio button input element and controls\n * the checked state of the host elements.\n * @param {Event} event - The change event.\n */\n @Listen('change')\n handleChange(event: Event) {\n const target = event.target as HTMLInputElement;\n\n if (target?.type === 'radio') {\n Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(\n element => {\n if (element.name === this.name) {\n element.checked = false;\n }\n },\n );\n\n this.checked = target.checked;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(\n this.labelPlacement === 'before' && 'label-placement-before',\n this.error && 'error',\n )}\n >\n <input\n type=\"radio\"\n id={this.inputId}\n name={this.name}\n autofocus={this.autofocus}\n autocomplete=\"off\"\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n />\n\n <div class=\"text-container\">\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["uuidv4"],"mappings":";;;;AAAA,MAAM,eAAe,GAAG,g0JAAg0J;;MC2B30J,YAAY,GAAA,MAAA;AANzB,IAAA,WAAA,CAAA,OAAA,EAAA;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AAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,EAAA,EACjD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,mBAAmB,EAAA,EAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACG,CACD;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"nv-fieldradio.entry.js","sources":["src/components/nv-fieldradio/styles/nv-fieldradio.scss?tag=nv-fieldradio","src/components/nv-fieldradio/nv-fieldradio.tsx"],"sourcesContent":["@use './mixins' as *;\n\nnv-fieldradio {\n @include fieldradio-variables();\n @include root-styles();\n\n &.error {\n @include fieldradio-error-variables();\n }\n\n &.label-placement-before {\n @include label-before-styles();\n }\n\n &[disabled] {\n // TODO: Find a way to use the --components-form-opacity-disabled variable properly, right now it outputs a value of 50px instead of 0.5.\n // opacity: var(--components-form-opacity-disabled); Error: Invalid value for --components-form-opacity-disabled (expected a <number> but got \"50px\")\n opacity: 0.5;\n }\n\n label {\n @include label-styles();\n }\n\n input[type=\"radio\"] {\n @include input-styles();\n }\n\n .description {\n @include description-styles();\n }\n\n .error-description {\n @include error-description-styles();\n }\n\n .text-container {\n @include text-container-styles();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Listen,\n Watch,\n Element,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { type LabelPlacement } from '../../utils/constants';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldradio',\n shadow: false,\n styleUrl: 'styles/nv-fieldradio.scss',\n formAssociated: true,\n})\nexport class NvFieldradio {\n @Element() el: HTMLNvFieldradioElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Adds a helpful hint message below the label\n * @deprecated use description instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Set the label placement to before the input\n * @deprecated use labelPlacement instead.\n */\n @Prop({ reflect: true })\n readonly labelBefore: boolean = false;\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.labelBefore) {\n this.labelPlacement = 'before';\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the radio button’s input element and the for attribute of\n * the associated label. If no ID is provided, a random one will be\n * automatically generated to ensure unique identification, facilitating\n * proper label association and accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Use this to assign a group name to your radio buttons. When you have\n * multiple radio buttons with the same name, users will be able to select\n * only one option within that group, making your forms more organized and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Defines what data will be sent when the radio button is selected.\n * This helps you identify which option the user has chosen in your form,\n * ensuring accurate data collection. When the form is submitted, the data\n * will consist of a name=value pair.\n */\n @Prop({ reflect: true })\n readonly value: string;\n\n /**\n * Sets the text content that is rendered next to the input element of type\n * radio. This label is essential for accessibility and user clarity, as it\n * describes the purpose or option of the radio button.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Defines the position of the label relative to the radio button.\n */\n @Prop({ mutable: true, reflect: true })\n labelPlacement: `${LabelPlacement}`;\n\n /**\n * Adds a helpful hint message below the label. This description provides\n * extra information or context about the radio button option, assisting users\n * in making more informed choices.\n */\n @Prop({ mutable: true, reflect: true })\n description: string;\n\n /**\n * Highlight the radio button with error styling. It helps users quickly\n * identify which option needs attention, improving their form-filling\n * experience by making issues more visible.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the radio\n * button.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Controls whether the radio button is selected.\n */\n @Prop({ mutable: true, reflect: true })\n checked: boolean = false;\n\n /**\n * Disables the radio button, making it un-selectable.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the checked state changes.\n * @bind checked\n */\n @Event({ bubbles: false })\n checkedChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches for changes to the checked state and emits the new value.\n * @param {boolean} checked - The new value of the checked state.\n */\n @Watch('checked')\n handleCheckedChange(checked: boolean) {\n this.checkedChanged.emit(checked);\n }\n\n /**\n * Listens for the change event on the radio button input element and controls\n * the checked state of the host elements.\n * @param {Event} event - The change event.\n */\n @Listen('change')\n handleChange(event: Event) {\n const target = event.target as HTMLInputElement;\n\n if (target?.type === 'radio') {\n Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(\n element => {\n if (element.name === this.name) {\n element.checked = false;\n }\n },\n );\n\n this.checked = target.checked;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(\n this.labelPlacement === 'before' && 'label-placement-before',\n this.error && 'error',\n )}\n >\n <input\n type=\"radio\"\n id={this.inputId}\n name={this.name}\n autofocus={this.autofocus}\n autocomplete=\"off\"\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n />\n\n <div class=\"text-container\">\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["uuidv4"],"mappings":";;;;AAAA,MAAM,eAAe,GAAG,g0JAAg0J;;MC2B30J,YAAY,GAAA,MAAA;AANzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAmBE;;;AAGG;AAEM,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;;;;AAgBrC;;;;;AAKG;AAEM,QAAA,IAAO,CAAA,OAAA,GAAWA,EAAM,EAAE;AA0CnC;;;;;AAKG;AAEM,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;AAU/B;;AAEG;AAEH,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAExB;;AAEG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAElC;;;;AAIG;AAGM,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAiGpC;IApMC,mBAAmB,GAAA;AACjB,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO;;AAGjC,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AACpB,YAAA,IAAI,CAAC,cAAc,GAAG,QAAQ;;;;;;AA8GlC;;;AAGG;AAEH,IAAA,mBAAmB,CAAC,OAAgB,EAAA;AAClC,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;;AAGnC;;;;AAIG;AAEH,IAAA,YAAY,CAAC,KAAY,EAAA;AACvB,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAA0B;AAE/C,QAAA,IAAI,MAAM,EAAE,IAAI,KAAK,OAAO,EAAE;AAC5B,YAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,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,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAA,EACtB,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,aAAa,EAAA,EAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,EAAA,EACjD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,mBAAmB,EAAA,EAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACG,CACD;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CasQushP.js';
|
|
2
2
|
import { v as v4 } from './v4-BdYh22OP.js';
|
|
3
3
|
|
|
4
|
-
const nvFieldselectCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldselect{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldselect[fluid]:not([fluid=false]){max-width:unset}nv-fieldselect[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldselect[display-value]:not([display-value=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldselect[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldselect[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldselect[required]:not([required=false]) label::after,nv-fieldselect[aria-required=true] label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldselect[multiple]:not([multiple=false]) .select-wrapper>.select-container>.select-icons{top:var(--form-field-padding-y);right:var(--form-field-padding-x)}nv-fieldselect[multiple]:not([multiple=false]) .select-wrapper>.select-container>select{height:100%;box-sizing:border-box;background-color:var(--color-level-05-background);border-radius:var(--form-field-radius)}nv-fieldselect label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldselect .select-wrapper{display:flex;flex-wrap:wrap;align-items:stretch;align-self:stretch}nv-fieldselect .select-wrapper .select-container{position:relative;display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldselect .select-wrapper .select-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldselect .select-wrapper .select-container:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldselect .select-wrapper .select-container:has(select:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldselect .select-wrapper .select-container>.select-icons{position:absolute;right:0;top:0;pointer-events:none}nv-fieldselect .select-wrapper .select-container>.select-icons>nv-iconbutton{border:0px;border-radius:0px}nv-fieldselect .select-wrapper .select-container>.select-icons>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldselect .select-wrapper .select-container>.select-icons>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fieldselect .select-wrapper .select-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%}nv-fieldselect .select-wrapper .select-container input:focus{outline:none}nv-fieldselect .select-wrapper .select-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldselect .select-wrapper .select-container input{}nv-fieldselect .select-wrapper .select-container input[type=password]::-ms-clear,nv-fieldselect .select-wrapper .select-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldselect .select-wrapper .select-container input:read-only{opacity:0.5;background-color:var(--components-form-field-background-readonly, rgba(0, 0, 0, 0.1));border-color:var(--nv-field-border-readonly)}nv-fieldselect .select-wrapper .select-container select{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);height:var(--form-field-line-height);padding:var(--form-field-padding-y) var(--form-field-padding-x);box-sizing:content-box;-webkit-appearance:none;-moz-appearance:none;cursor:pointer}nv-fieldselect .select-wrapper .select-container select:focus{outline:none}nv-fieldselect .select-wrapper .select-container select::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldselect .select-wrapper .select-container select option{font-size:var(--form-field-font-size, 16px);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height, 24px);background-color:var(--color-level-05-background);color:var(--components-form-field-content-text)}nv-fieldselect .select-wrapper .select-container select.hidden{display:none}nv-fieldselect .select-wrapper .select-container nv-icon.readonly-icon{color:var(--nv-field-border-default)}nv-fieldselect .select-wrapper .select-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldselect .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldselect .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
4
|
+
const nvFieldselectCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldselect{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldselect[fluid]:not([fluid=false]){max-width:unset}nv-fieldselect[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldselect[display-value]:not([display-value=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldselect[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldselect[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldselect[required]:not([required=false]) label::after,nv-fieldselect[aria-required=true] label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldselect[multiple]:not([multiple=false]) .select-wrapper>.select-container>.select-icons{top:var(--form-field-padding-y);right:var(--form-field-padding-x)}nv-fieldselect[multiple]:not([multiple=false]) .select-wrapper>.select-container>select{height:100%;box-sizing:border-box;background-color:var(--color-level-05-background);border-radius:var(--form-field-radius)}nv-fieldselect label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldselect .select-wrapper{display:flex;flex-wrap:wrap;align-items:stretch;align-self:stretch}nv-fieldselect .select-wrapper .select-container{position:relative;display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldselect .select-wrapper .select-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldselect .select-wrapper .select-container:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldselect .select-wrapper .select-container:has(select:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldselect .select-wrapper .select-container>.select-icons{position:absolute;right:0;top:0;pointer-events:none}nv-fieldselect .select-wrapper .select-container>.select-icons>nv-iconbutton{border:0px;border-radius:0px}nv-fieldselect .select-wrapper .select-container>.select-icons>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldselect .select-wrapper .select-container>.select-icons>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fieldselect .select-wrapper .select-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%}nv-fieldselect .select-wrapper .select-container input:focus{outline:none}nv-fieldselect .select-wrapper .select-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldselect .select-wrapper .select-container input{}nv-fieldselect .select-wrapper .select-container input[type=password]::-ms-clear,nv-fieldselect .select-wrapper .select-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldselect .select-wrapper .select-container input:read-only{opacity:0.5;background-color:var(--components-form-field-background-readonly, rgba(0, 0, 0, 0.1));border-color:var(--nv-field-border-readonly)}nv-fieldselect .select-wrapper .select-container select{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);height:var(--form-field-line-height);padding:var(--form-field-padding-y) var(--form-field-padding-x);box-sizing:content-box;-webkit-appearance:none;-moz-appearance:none;cursor:pointer}nv-fieldselect .select-wrapper .select-container select:focus{outline:none}nv-fieldselect .select-wrapper .select-container select::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldselect .select-wrapper .select-container select option{font-size:var(--form-field-font-size, 16px);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height, 24px);background-color:var(--color-level-05-background);color:var(--components-form-field-content-text)}nv-fieldselect .select-wrapper .select-container select.hidden{display:none}nv-fieldselect .select-wrapper .select-container nv-icon.readonly-icon{color:var(--nv-field-border-default)}nv-fieldselect .select-wrapper .select-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldselect .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldselect .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
5
5
|
|
|
6
6
|
const NvFieldselect = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -368,15 +368,15 @@ const NvFieldselect = class {
|
|
|
368
368
|
? ariaRequiredAttrValue === 'true' || ariaRequiredAttrValue === ''
|
|
369
369
|
: undefined;
|
|
370
370
|
const useNativeRequired = this.required && (!useAriaRequired || ariaRequiredValue === true);
|
|
371
|
-
return (h(Host, { key: '
|
|
371
|
+
return (h(Host, { key: '40714f4af41b7d652d1a468e56849fe1debe8d60' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '3cbb3c5d86df0272ae035e4d55137b2abceed7df', htmlFor: this.inputId }, h("slot", { key: '91c991cc47389ff46346df6616733e205a5cbea7', name: "label" }, this.label))), h("div", { key: '42dfb725f9ff9caf8c00f4b1189f22d229269156', class: "select-wrapper" }, h("slot", { key: 'bbe11ade568532183c52ec56c9d2b8ab667e9d5c', name: "before-input" }), h("div", { key: '8cfe703cd711c2f4831655d616345f06a6f358b0', class: "select-container", onClick: this.handleSelectContainerClick }, h("slot", { key: '1c4194d8e9d98467e7c37400cf0434993e8ea91e', name: "leading-input" }), this.internalReadonly && (h("input", { key: '2c2caf1d45e6d68a644539ded3c7add991abf300', id: this.inputId + '-readonly', type: "text", value: this.computedDisplayValue, readonly: true, class: "readonly-input", "aria-readonly": "true", "aria-label": this.label, "aria-describedby": this.error
|
|
372
372
|
? `${this.inputId}-error`
|
|
373
|
-
: `${this.inputId}-description` })), h("select",
|
|
374
|
-
|
|
375
|
-
|
|
373
|
+
: `${this.inputId}-description` })), h("select", { key: '744913ecd27a2d33996b13f685679467fc837c30', id: this.inputId, ref: el => (this.selectElement = el), name: this.name, autofocus: this.autofocus, disabled: this.disabled, required: useNativeRequired ? this.required : undefined, ...(ariaRequiredValue !== undefined && {
|
|
374
|
+
'aria-required': String(ariaRequiredValue),
|
|
375
|
+
}), multiple: this.multiple, onChange: this.handleSelectChange, class: this.internalReadonly ? 'hidden' : '', "aria-label": this.label, "aria-describedby": this.error
|
|
376
376
|
? `${this.inputId}-error`
|
|
377
|
-
: `${this.inputId}-description` }
|
|
378
|
-
this.el.querySelector('[slot="description"]')) && (h("div", { key: '
|
|
379
|
-
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '
|
|
377
|
+
: `${this.inputId}-description` }, this.options && this.options.length > 0 ? (this.options.map(option => (h("option", { value: option.value, selected: option.selected, disabled: option.disabled }, option.label)))) : (h("slot", null))), h("div", { key: '891676c5a9d755b49fd375fba8f193c990d41cfa', class: "select-icons" }, this.error && (h("nv-icon", { key: '2d4528dba1eccbc1acc39d2bfb54a13d03913b9b', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '035768470154e3e529921741802ae74f1b56b29c', name: "circle-check", class: "validation", size: "md" })), !this.multiple && (h("nv-iconbutton", { key: '23a1006cc1f1dfa9862af41e64d5d57539bff127', name: "chevron-down", size: "md", emphasis: "lower", tabindex: -1 })))), h("slot", { key: '5f899c5426e304c1d83b046317eaf732d919cb55', name: "after-input" })), (this.description ||
|
|
378
|
+
this.el.querySelector('[slot="description"]')) && (h("div", { key: '0f78de9aa808a625dc6a8f0148a43450992b787e', class: "description", id: `${this.inputId}-description` }, h("slot", { key: '72d96f2909d0b793dcd24fe939b58ebc5e9c7de1', name: "description" }, this.description))), (this.errorDescription ||
|
|
379
|
+
this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'c10fdcc3592d36fea37f283835abcf8790a99010', class: "error-description", id: `${this.inputId}-error` }, h("slot", { key: 'c8783f8f94d1c9f082e60e38b061dae49e5b5584', name: "error-description" }, this.errorDescription)))));
|
|
380
380
|
}
|
|
381
381
|
static get formAssociated() { return true; }
|
|
382
382
|
get el() { return getElement(this); }
|