@nova-design-system/nova-webcomponents 3.11.0 → 3.12.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/{constants-3b6beb66.js → constants-aac59496.js} +19 -42
- package/dist/cjs/constants-aac59496.js.map +1 -0
- package/dist/cjs/index.cjs.js +99 -7
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/native.cjs.js +1 -1
- package/dist/cjs/nv-alert.cjs.entry.js +2 -2
- package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-button.cjs.entry.js +2 -2
- package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
- package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
- package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js +1 -1
- package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js +1 -1
- package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-fieldtime.cjs.entry.js +2 -2
- package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-icon.cjs.entry.js +2 -2
- package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js +1 -1
- package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-popover.cjs.entry.js +21 -4
- package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js +1 -1
- package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
- package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -1
- package/dist/cjs/nv-tooltip.cjs.entry.js +11 -2
- package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/components/nv-alert/nv-alert.css +0 -5
- package/dist/collection/components/nv-badge/nv-badge.css +0 -21
- package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +0 -2
- package/dist/collection/components/nv-button/styles/nv-button.css +0 -8
- package/dist/collection/components/nv-datagrid/nv-datagrid.css +0 -1
- package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +0 -1
- package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +4 -0
- package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +6 -0
- package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +4 -0
- package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +4 -0
- package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +8 -0
- package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +4 -0
- package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +0 -1
- package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +6 -0
- package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +4 -0
- package/dist/collection/components/nv-icon/nv-icons.js +5 -5
- package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
- package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +0 -4
- package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
- package/dist/collection/components/nv-popover/nv-popover.css +7 -0
- package/dist/collection/components/nv-popover/nv-popover.docs.js +4 -0
- package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
- package/dist/collection/components/nv-popover/nv-popover.js +47 -2
- package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
- package/dist/collection/components/nv-toggle/nv-toggle.css +0 -1
- package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +3 -2
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js +5 -0
- package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js.map +1 -1
- package/dist/collection/components/nv-tooltip/nv-tooltip.js +38 -3
- package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
- package/dist/collection/index.js +10 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +6 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/nv-accordion-item.js +1 -1
- package/dist/components/nv-accordion.js +3 -3
- package/dist/components/nv-alert.js +3 -3
- package/dist/components/nv-alert.js.map +1 -1
- package/dist/components/nv-avatar.js +2 -2
- package/dist/components/nv-badge.js +1 -1
- package/dist/components/nv-breadcrumb.js +3 -3
- package/dist/components/nv-breadcrumb.js.map +1 -1
- package/dist/components/nv-button.js +1 -1
- package/dist/components/nv-calendar.js +1 -1
- package/dist/components/nv-datagrid.js +4 -4
- package/dist/components/nv-datagrid.js.map +1 -1
- package/dist/components/nv-dialog.js +4 -4
- package/dist/components/nv-dialogfooter.js +1 -1
- package/dist/components/nv-fieldcheckbox.js +1 -1
- package/dist/components/nv-fielddate.js +6 -6
- package/dist/components/nv-fielddate.js.map +1 -1
- package/dist/components/nv-fielddaterange.js +6 -6
- package/dist/components/nv-fielddaterange.js.map +1 -1
- package/dist/components/nv-fielddropdown.js +5 -5
- 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 +7 -7
- package/dist/components/nv-fieldmultiselect.js.map +1 -1
- package/dist/components/nv-fieldnumber.js +1 -1
- package/dist/components/nv-fieldpassword.js +3 -3
- package/dist/components/nv-fieldpassword.js.map +1 -1
- package/dist/components/nv-fieldradio.js +1 -1
- package/dist/components/nv-fieldradio.js.map +1 -1
- package/dist/components/nv-fieldselect.js +3 -3
- package/dist/components/nv-fieldselect.js.map +1 -1
- package/dist/components/nv-fieldslider.js +3 -3
- package/dist/components/nv-fieldtext.js +1 -1
- package/dist/components/nv-fieldtime.js +5 -5
- 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-menu.js +3 -3
- package/dist/components/nv-menuitem.js +1 -1
- package/dist/components/nv-popover.js +1 -1
- package/dist/components/nv-toggle.js +1 -1
- package/dist/components/nv-toggle.js.map +1 -1
- package/dist/components/nv-togglebutton.js +1 -1
- package/dist/components/nv-togglebutton.js.map +1 -1
- package/dist/components/nv-tooltip.js +1 -1
- package/dist/components/{p-cf06032d.js → p-095c8285.js} +3 -3
- package/dist/components/{p-cf06032d.js.map → p-095c8285.js.map} +1 -1
- package/dist/components/{p-50d0db7b.js → p-0b015832.js} +3 -3
- package/dist/components/{p-50d0db7b.js.map → p-0b015832.js.map} +1 -1
- package/dist/components/{p-a5002d14.js → p-1172e9bb.js} +2 -2
- package/dist/components/{p-a5002d14.js.map → p-1172e9bb.js.map} +1 -1
- package/dist/components/{p-0ffb4785.js → p-2030d84d.js} +2 -2
- package/dist/components/{p-0ffb4785.js.map → p-2030d84d.js.map} +1 -1
- package/dist/components/{p-195f46f3.js → p-2ad58e41.js} +25 -6
- package/dist/components/p-2ad58e41.js.map +1 -0
- package/dist/components/{p-45a625fb.js → p-4c3dc7e4.js} +4 -4
- package/dist/components/{p-45a625fb.js.map → p-4c3dc7e4.js.map} +1 -1
- package/dist/components/{p-b659b999.js → p-57ae32bc.js} +2 -2
- package/dist/components/{p-b659b999.js.map → p-57ae32bc.js.map} +1 -1
- package/dist/components/{p-a3ddec4c.js → p-5f594b35.js} +2 -24
- package/dist/components/p-5f594b35.js.map +1 -0
- package/dist/components/{p-1bb737fa.js → p-7372258e.js} +2 -2
- package/dist/components/{p-1bb737fa.js.map → p-7372258e.js.map} +1 -1
- package/dist/components/{p-9fdaea9a.js → p-84f4b071.js} +3 -3
- package/dist/components/{p-9fdaea9a.js.map → p-84f4b071.js.map} +1 -1
- package/dist/components/{p-f47a1e1e.js → p-87079346.js} +15 -5
- package/dist/components/p-87079346.js.map +1 -0
- package/dist/components/{p-ec4558aa.js → p-ac91582e.js} +2 -2
- package/dist/components/{p-ec4558aa.js.map → p-ac91582e.js.map} +1 -1
- package/dist/components/{p-8aee1010.js → p-b2c31970.js} +2 -2
- package/dist/components/{p-8aee1010.js.map → p-b2c31970.js.map} +1 -1
- package/dist/components/p-b3035205.js +88 -0
- package/dist/components/p-b3035205.js.map +1 -0
- package/dist/components/{p-2db5d1ab.js → p-b7629769.js} +4 -4
- package/dist/components/{p-2db5d1ab.js.map → p-b7629769.js.map} +1 -1
- package/dist/components/{p-32e8e42e.js → p-dc5dad90.js} +2 -2
- package/dist/components/{p-32e8e42e.js.map → p-dc5dad90.js.map} +1 -1
- package/dist/components/p-ddb7aa4e.js +189 -0
- package/dist/components/{p-8011513c.js.map → p-ddb7aa4e.js.map} +1 -1
- package/dist/esm/{constants-23aaef7b.js → constants-a857c476.js} +2 -24
- package/dist/esm/constants-a857c476.js.map +1 -0
- package/dist/esm/index.js +6 -6
- 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-alert.entry.js +2 -2
- package/dist/esm/nv-alert.entry.js.map +1 -1
- package/dist/esm/nv-avatar.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js +1 -1
- package/dist/esm/nv-badge_2.entry.js.map +1 -1
- package/dist/esm/nv-breadcrumb.entry.js +1 -1
- package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
- package/dist/esm/nv-button.entry.js +2 -2
- package/dist/esm/nv-button.entry.js.map +1 -1
- package/dist/esm/nv-calendar.entry.js +1 -1
- package/dist/esm/nv-datagrid.entry.js +2 -2
- package/dist/esm/nv-datagrid.entry.js.map +1 -1
- package/dist/esm/nv-dialog.entry.js +1 -1
- package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
- package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
- package/dist/esm/nv-fielddate.entry.js +1 -1
- package/dist/esm/nv-fielddate.entry.js.map +1 -1
- package/dist/esm/nv-fielddaterange.entry.js +1 -1
- package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
- package/dist/esm/nv-fielddropdown.entry.js +1 -1
- package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
- package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldnumber.entry.js +1 -1
- package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
- package/dist/esm/nv-fieldpassword.entry.js +1 -1
- package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
- package/dist/esm/nv-fieldradio.entry.js +1 -1
- package/dist/esm/nv-fieldradio.entry.js.map +1 -1
- package/dist/esm/nv-fieldselect.entry.js +1 -1
- package/dist/esm/nv-fieldselect.entry.js.map +1 -1
- package/dist/esm/nv-fieldtime.entry.js +2 -2
- 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_2.entry.js +1 -1
- package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
- package/dist/esm/nv-popover.entry.js +21 -4
- package/dist/esm/nv-popover.entry.js.map +1 -1
- package/dist/esm/nv-toggle.entry.js +1 -1
- package/dist/esm/nv-toggle.entry.js.map +1 -1
- package/dist/esm/nv-togglebutton.entry.js +1 -1
- package/dist/esm/nv-togglebutton.entry.js.map +1 -1
- package/dist/esm/nv-tooltip.entry.js +11 -2
- package/dist/esm/nv-tooltip.entry.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/native.esm.js.map +1 -1
- package/dist/native/p-1ad1bff9.entry.js +2 -0
- package/dist/native/{p-0ef94dae.entry.js.map → p-1ad1bff9.entry.js.map} +1 -1
- package/dist/native/{p-7f0d576b.entry.js → p-2781637d.entry.js} +2 -2
- package/dist/native/{p-7f0d576b.entry.js.map → p-2781637d.entry.js.map} +1 -1
- package/dist/native/{p-681f2bac.entry.js → p-29ee7b1c.entry.js} +2 -2
- package/dist/native/{p-681f2bac.entry.js.map → p-29ee7b1c.entry.js.map} +1 -1
- package/dist/native/{p-62032cd9.entry.js → p-38af3aaf.entry.js} +2 -2
- package/dist/native/{p-aacd8789.entry.js → p-3a8f65a9.entry.js} +2 -2
- package/dist/native/p-47901c83.entry.js +2 -0
- package/dist/native/p-47901c83.entry.js.map +1 -0
- package/dist/native/p-48cf2457.entry.js +2 -0
- package/dist/native/{p-ba9906b7.entry.js.map → p-48cf2457.entry.js.map} +1 -1
- package/dist/native/{p-888ad58e.entry.js → p-5d352456.entry.js} +2 -2
- package/dist/native/p-5d352456.entry.js.map +1 -0
- package/dist/native/{p-fc9564b3.js → p-5f594b35.js} +2 -2
- package/dist/native/{p-fc9564b3.js.map → p-5f594b35.js.map} +1 -1
- package/dist/native/p-62aa0531.entry.js +2 -0
- package/dist/native/{p-397c0fca.entry.js.map → p-62aa0531.entry.js.map} +1 -1
- package/dist/native/p-63fea160.entry.js +2 -0
- package/dist/native/p-63fea160.entry.js.map +1 -0
- package/dist/native/p-67d861e2.entry.js +2 -0
- package/dist/native/{p-4f4ed012.entry.js.map → p-67d861e2.entry.js.map} +1 -1
- package/dist/native/p-9e0fe7e8.entry.js +2 -0
- package/dist/native/{p-019d164d.entry.js.map → p-9e0fe7e8.entry.js.map} +1 -1
- package/dist/native/p-a34beedf.entry.js +2 -0
- package/dist/native/p-a34beedf.entry.js.map +1 -0
- package/dist/native/{p-676447d7.entry.js → p-a63929db.entry.js} +3 -3
- package/dist/native/p-ab1e1a96.entry.js +2 -0
- package/dist/native/{p-9991116a.entry.js.map → p-ab1e1a96.entry.js.map} +1 -1
- package/dist/native/p-bc01787b.entry.js +2 -0
- package/dist/native/{p-ad2cc829.entry.js.map → p-bc01787b.entry.js.map} +1 -1
- package/dist/native/p-bcff76ab.entry.js +2 -0
- package/dist/native/{p-44dd9a4c.entry.js.map → p-bcff76ab.entry.js.map} +1 -1
- package/dist/native/p-c3ad7617.entry.js +2 -0
- package/dist/native/{p-fb672f90.entry.js.map → p-c3ad7617.entry.js.map} +1 -1
- package/dist/native/p-cea942b9.entry.js +2 -0
- package/dist/native/{p-3ed84cd9.entry.js.map → p-cea942b9.entry.js.map} +1 -1
- package/dist/native/p-d0ef1bbb.entry.js +2 -0
- package/dist/native/p-d0ef1bbb.entry.js.map +1 -0
- package/dist/native/p-d88c416f.entry.js +2 -0
- package/dist/native/{p-2197ffdf.entry.js.map → p-d88c416f.entry.js.map} +1 -1
- package/dist/native/{p-348c6bb4.entry.js → p-e603c6ed.entry.js} +2 -2
- package/dist/native/p-e765a624.entry.js +2 -0
- package/dist/native/{p-184032cb.entry.js.map → p-e765a624.entry.js.map} +1 -1
- package/dist/native/{p-9f451b8a.entry.js → p-e7a929e7.entry.js} +3 -3
- package/dist/native/{p-9f451b8a.entry.js.map → p-e7a929e7.entry.js.map} +1 -1
- package/dist/native/p-f0cbfb3d.entry.js +2 -0
- package/dist/native/{p-b58fb522.entry.js.map → p-f0cbfb3d.entry.js.map} +1 -1
- package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
- package/dist/types/components/nv-popover/nv-popover.d.ts +11 -1
- package/dist/types/components/nv-tooltip/nv-tooltip.d.ts +11 -2
- package/dist/types/components.d.ts +20 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/vscode-data.json +40 -16
- package/hydrate/index.js +56 -28
- package/hydrate/index.mjs +56 -28
- package/package.json +5 -1
- package/dist/cjs/constants-3b6beb66.js.map +0 -1
- package/dist/components/p-195f46f3.js.map +0 -1
- package/dist/components/p-8011513c.js +0 -189
- package/dist/components/p-a1fe0a5d.js +0 -88
- package/dist/components/p-a1fe0a5d.js.map +0 -1
- package/dist/components/p-a3ddec4c.js.map +0 -1
- package/dist/components/p-f47a1e1e.js.map +0 -1
- package/dist/esm/constants-23aaef7b.js.map +0 -1
- package/dist/native/p-019d164d.entry.js +0 -2
- package/dist/native/p-0ef94dae.entry.js +0 -2
- package/dist/native/p-184032cb.entry.js +0 -2
- package/dist/native/p-2197ffdf.entry.js +0 -2
- package/dist/native/p-397c0fca.entry.js +0 -2
- package/dist/native/p-3da64006.entry.js +0 -2
- package/dist/native/p-3da64006.entry.js.map +0 -1
- package/dist/native/p-3ed84cd9.entry.js +0 -2
- package/dist/native/p-4302824a.entry.js +0 -2
- package/dist/native/p-4302824a.entry.js.map +0 -1
- package/dist/native/p-44dd9a4c.entry.js +0 -2
- package/dist/native/p-4f4ed012.entry.js +0 -2
- package/dist/native/p-553778e6.entry.js +0 -2
- package/dist/native/p-553778e6.entry.js.map +0 -1
- package/dist/native/p-888ad58e.entry.js.map +0 -1
- package/dist/native/p-8a577f91.entry.js +0 -2
- package/dist/native/p-8a577f91.entry.js.map +0 -1
- package/dist/native/p-9991116a.entry.js +0 -2
- package/dist/native/p-ad2cc829.entry.js +0 -2
- package/dist/native/p-b58fb522.entry.js +0 -2
- package/dist/native/p-ba9906b7.entry.js +0 -2
- package/dist/native/p-fb672f90.entry.js +0 -2
- /package/dist/native/{p-62032cd9.entry.js.map → p-38af3aaf.entry.js.map} +0 -0
- /package/dist/native/{p-aacd8789.entry.js.map → p-3a8f65a9.entry.js.map} +0 -0
- /package/dist/native/{p-676447d7.entry.js.map → p-a63929db.entry.js.map} +0 -0
- /package/dist/native/{p-348c6bb4.entry.js.map → p-e603c6ed.entry.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as o,h as r,H as i,g as t}from"./p-d0a33e64.js";import{v as n}from"./p-f5ff676c.js";const d='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-fielddropdown{--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-fielddropdown[fluid]:not([fluid=false]){max-width:unset}nv-fielddropdown[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-fielddropdown[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-fielddropdown[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fielddropdown[hidden]:not([hidden=false]) label{display:none}nv-fielddropdown label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fielddropdown nv-popover{width:100%;display:block}nv-fielddropdown nv-popover [data-scope=popover]{width:100%;padding:var(--list-dropdown-padding);border-radius:var(--list-dropdown-radius);background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border)}nv-fielddropdown nv-popover [slot=content]{gap:var(--list-dropdown-gap-y);display:flex;flex-direction:column}nv-fielddropdown nv-popover hr{color:var(--components-list-dropdown-separator)}nv-fielddropdown nv-popover div[slot=content]{max-height:calc(90vh - var(--list-dropdown-padding) * 2);overflow-y:auto;position:relative}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar{width:6px;height:6px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-track{background-color:var(--color-level-10-background);border-radius:9999px}nv-fielddropdown nv-popover div[slot=content]::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:9999px}nv-fielddropdown .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;width:100%}nv-fielddropdown .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;position:relative;width:100%;min-height:40px}nv-fielddropdown .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddropdown .input-container:focus-within,nv-fielddropdown .input-container:focus-within:hover,nv-fielddropdown .input-container:focus,nv-fielddropdown .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-fielddropdown .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddropdown .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddropdown .input-container input[type=search]::-webkit-search-decoration,nv-fielddropdown .input-container input[type=search]::-webkit-search-cancel-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-button,nv-fielddropdown .input-container input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}nv-fielddropdown .input-container input,nv-fielddropdown .input-container p.non-filterable-text{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:500;line-height:var(--form-field-line-height);width:100%;}nv-fielddropdown .input-container input:focus,nv-fielddropdown .input-container p.non-filterable-text:focus{outline:none}nv-fielddropdown .input-container input::placeholder,nv-fielddropdown .input-container p.non-filterable-text::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:"TT Norms Pro", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fielddropdown .input-container input[type=password]::-ms-clear,nv-fielddropdown .input-container input[type=password]::-ms-reveal,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-clear,nv-fielddropdown .input-container p.non-filterable-text[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddropdown .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddropdown .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddropdown .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fielddropdown .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddropdown .non-filterable-text{display:block;border-radius:var(--form-field-radius);background-color:var(--nv-field-background);color:var(--components-form-field-content-text);font-size:var(--form-field-font-size);font-weight:500;line-height:var(--form-field-line-height);box-sizing:border-box;cursor:pointer;height:100%;min-height:40px}nv-fielddropdown .non-filterable-text span{display:inline-block;width:100%;overflow:hidden;text-overflow:ellipsis}nv-fielddropdown .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddropdown .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:"TT Norms Pro", 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)}';const l=d;const a=class{constructor(r){e(this,r);this.valueChanged=o(this,"valueChanged",7);this.dropdownItemSelected=o(this,"dropdownItemSelected",7);this.inputId=n();this.autocomplete="off";this.required=false;this.readonly=false;this.disabled=false;this.error=false;this.maxHeight="";this.open=false;this.emptyResult="No results found";this.filterable=false;this.debounceDelay=300;this.autofocus=false;this.fluid=false;this.filterText="";this.selectedValues=new Set;this.handleInputContainerClick=e=>{if(this.disabled||this.readonly){return}const o=e.target;if(o.tagName==="P"||o.tagName==="SPAN"){this.open=true;const e=this.el.querySelector(".input-container");if(e){e.classList.add("focus-within");const o=()=>{e.classList.remove("focus-within")};this.popoverElement.addEventListener("hide",o)}}};this.handleInput=e=>{if(!this.filterable)return;if(this.disabled||this.readonly){return}const o=e.target;this.open=true;if(this.debounceTimer){window.clearTimeout(this.debounceTimer)}this.debounceTimer=window.setTimeout((()=>{this.filterText=o.value.toLowerCase();this.filterItems()}),this.debounceDelay)};this.handleInputFocus=()=>{if(this.disabled||this.readonly)return;this.open=true};this.togglePopover=()=>{if(this.disabled||this.readonly)return;this.open=!this.open};this.getSelectedLabel=()=>{var e,o,r,i,t,n;if(!this.value)return"";if(((e=this.options)===null||e===void 0?void 0:e.length)>1){const e=this.options.find((e=>e.value===this.value));return(r=(o=e===null||e===void 0?void 0:e.label)!==null&&o!==void 0?o:e===null||e===void 0?void 0:e.value)!==null&&r!==void 0?r:this.value}const d=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const l=d.find((e=>e.value===this.value));const a=l?(n=(i=l.label)!==null&&i!==void 0?i:(t=l.textContent)===null||t===void 0?void 0:t.trim())!==null&&n!==void 0?n:l.value:"";return a};this.clearFilter=()=>{if(!this.filterable)return;this.filterText="";this.inputElement.value=this.getSelectedLabel();this.inputElement.focus();this.filterItems()}}handleOptionsChange(e){var o;if(!e)return;if(!this.value){const r=e.find((e=>e.selected));this.value=(o=r===null||r===void 0?void 0:r.value)!==null&&o!==void 0?o:"";this.updateSelectedItem(this.value)}}watchValueHandler(e){this.valueChanged.emit(e)}handleOpenChanged(e){e.stopPropagation();this.open=e.detail}handleDropdownItemSelected(e){if(this.disabled||this.readonly)return;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));o.forEach((o=>{if(o!==e.target){o.removeAttribute("selected")}else{o.setAttribute("selected","true")}}));this.clearFilter();this.value=e.detail.value;this.open=false}handleBlur(e){const o=e.relatedTarget;if(!(o instanceof Node)||!this.el.contains(o)){this.open=false;if(this.inputElement){this.filterText="";this.inputElement.value=this.getSelectedLabel();setTimeout((()=>{this.filterItems()}),200)}}}handleKeyDown(e){if(!this.el)return;if(!this.open){if(e.key==="ArrowDown"){this.open=true;e.preventDefault();return}return}const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem:not([disabled]):not([hidden])"));let r=o.findIndex((e=>e.classList.contains("highlighted")));if(e.key==="ArrowDown"){e.preventDefault();r=(r+1)%o.length;this.updateHighlightedItem(o,r)}else if(e.key==="ArrowUp"){e.preventDefault();r=(r-1+o.length)%o.length;this.updateHighlightedItem(o,r)}else if(e.key==="Escape"){e.preventDefault();this.open=false}}componentWillLoad(){this.resetFilter();if(this.filterable&&this.filterText){this.filterItems()}if(this.options){this.handleOptionsChange(this.options)}}componentDidLoad(){if(this.value){this.updateSelectedItem(this.value)}if(this.inputElement){this.inputElement.value=this.getSelectedLabel()}}async getFilterText(){return this.filterText}filterItems(){var e;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const r=this.el.querySelector("nv-fielddropdownitem[data-empty]");if(r){r.remove()}let i=false;o.forEach((e=>{var o,r;const t=((o=e.textContent)===null||o===void 0?void 0:o.toLowerCase())||"";const n=((r=e.value)===null||r===void 0?void 0:r.toLowerCase())||"";const d=n.includes(this.filterText)||t.includes(this.filterText);if(d)e.removeAttribute("hidden");else e.setAttribute("hidden","");if(d){i=true}}));if(!i){const o=document.createElement("nv-fielddropdownitem");o.setAttribute("data-empty","true");o.setAttribute("disabled","true");o.textContent=this.emptyResult;(e=this.el.querySelector('ul[slot="content"]'))===null||e===void 0?void 0:e.appendChild(o)}}resetFilter(){const e=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));e.forEach((e=>{e.style.display=""}))}updateHighlightedItem(e,o){e.forEach(((e,r)=>{if(r===o){e.classList.add("highlighted");e.focus();e.scrollIntoView({block:"nearest"})}else{e.classList.remove("highlighted")}}))}updateSelectedItem(e){if(!e)return;const o=Array.from(this.el.querySelectorAll("nv-fielddropdownitem"));const r=o.find((o=>{var r;const i=o.getAttribute("label");const t=o.getAttribute("value");const n=(r=o.textContent)===null||r===void 0?void 0:r.trim();return i===e||t===e||n===e}));o.forEach((e=>{if(e===r){e.setAttribute("selected","")}else{e.removeAttribute("selected")}}))}render(){var e;return r(i,{key:"da19368ad4006df880581a7a0d7c1be1d2249008",role:"combobox","aria-expanded":this.open.toString(),"aria-haspopup":"listbox","aria-label":this.label},(this.label||this.el.querySelector('[slot="label"]'))&&r("label",{key:"38c0a47d3f85ccb50173a5d5322cc4e5ea577b85",htmlFor:this.inputId},r("slot",{key:"9a97d0960a2f36dd0d9853ed41796708129068ac",name:"label"},this.label)),r("nv-popover",{key:"69aabf648cf0890133c48250d8a851516e4266f9",ref:e=>this.popoverElement=e,triggerMode:"controlled",placement:"bottom-start",open:this.open},r("div",{key:"10cca5b4b91cee8f8149b01df3daa4d36d44a85c",class:"input-wrapper",slot:"trigger"},r("slot",{key:"583d0903e75dcc3255fc29ccde93e117797ce41e",name:"before-input"}),r("div",{key:"8b2101b0cfecbff145469cab9a86ec381ee01f00",class:"input-container",onClick:this.handleInputContainerClick},r("slot",{key:"5e2c78f28c2df9c6ab8d4c41fae39faf308d74de",name:"leading-input"}),this.filterable||this.disabled||this.readonly?r("input",{"data-scope":"focusable",id:this.inputId,type:"search",ref:e=>this.inputElement=e,autofocus:this.autofocus,autocomplete:this.autocomplete,placeholder:this.placeholder,name:this.name,value:this.getSelectedLabel(),required:this.required,disabled:this.disabled,readOnly:this.readonly,onInput:this.handleInput,onFocus:this.handleInputFocus,onClick:this.handleInputFocus,onKeyDown:this.handleKeyDown}):r("p",{"data-scope":"focusable",id:this.inputId,class:"non-filterable-text",onClick:this.handleInputContainerClick,tabIndex:this.disabled?-1:0,onKeyDown:this.handleKeyDown,onFocus:this.handleInputFocus},this.getSelectedLabel()||this.value||this.placeholder),this.filterable&&this.filterText&&this.open&&r("nv-iconbutton",{key:"8b6f29fc7eba80edfba731ea2b5e3a2e23045aae",name:"x",size:"md",emphasis:"lower",class:"clear-button",onClick:this.clearFilter,"aria-label":"Clear input"}),this.error&&r("nv-icon",{key:"8e808491b0aa3fedf657a9009fb94e6e4f46f4fa",name:"alert-circle",class:"validation",size:"md"}),r("nv-iconbutton",{key:"2e20d15804b70243e2f83d463dbb6d3c617c5263","data-scope":"toggle-dropdown",name:this.open?"chevron-top":"chevron-down",size:"md",emphasis:"lower","aria-label":this.open?"Hide dropdown":"Show dropdown","aria-pressed":this.open.toString(),onClick:this.togglePopover,tabIndex:this.disabled?-1:0})),r("slot",{key:"6a9fd16a090be92ef9a003e048db8daec58b7419",name:"after-input"})),r("div",{key:"0efb0e793cd3b8d41f5884ffb34a86e0d298f217",slot:"content",style:this.maxHeight?{maxHeight:this.maxHeight}:{}},((e=this.options)===null||e===void 0?void 0:e.length)>0?r("ul",null,this.options.map((e=>r("nv-fielddropdownitem",{label:e.label,value:e.value,disabled:e.disabled,selected:e.value===this.value})))):r("slot",{name:"content"}))),(this.description||this.el.querySelector('[slot="description"]'))&&r("div",{key:"34e787b02ab0ccb02dafb93e12b600d845c96442",class:"description"},r("slot",{key:"ac8b3085ac8507c3ae243a71392167851a1d5755",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&r("div",{key:"e1a1bf22b2c5f932a31342493d3b8fbb84f31f1e",hidden:!this.error,class:"error-description"},r("slot",{key:"843a2ccfbaf3037747069918dd990d329ae98fbc",name:"error-description"},this.errorDescription)))}static get formAssociated(){return true}get el(){return t(this)}static get watchers(){return{options:["handleOptionsChange"],value:["watchValueHandler"]}}};a.style=l;export{a as nv_fielddropdown};
|
|
2
|
+
//# sourceMappingURL=p-f0cbfb3d.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nvFielddropdownCss","NvFielddropdownStyle0","NvFielddropdown","constructor","hostRef","this","inputId","uuidv4","autocomplete","required","readonly","disabled","error","maxHeight","open","emptyResult","filterable","debounceDelay","autofocus","fluid","filterText","selectedValues","Set","handleInputContainerClick","event","target","tagName","inputContainer","el","querySelector","classList","add","removeFocusWithin","remove","popoverElement","addEventListener","handleInput","input","debounceTimer","window","clearTimeout","setTimeout","value","toLowerCase","filterItems","handleInputFocus","togglePopover","getSelectedLabel","_a","options","length","matchingItem","find","option","_c","_b","label","items","Array","from","querySelectorAll","item","selectedLabel","_f","_d","_e","textContent","trim","clearFilter","inputElement","focus","handleOptionsChange","newValue","defaultValue","selected","updateSelectedItem","watchValueHandler","valueChanged","emit","handleOpenChanged","stopPropagation","detail","handleDropdownItemSelected","forEach","removeAttribute","setAttribute","handleBlur","relatedTarget","Node","contains","handleKeyDown","key","preventDefault","currentIndex","findIndex","updateHighlightedItem","componentWillLoad","resetFilter","componentDidLoad","getFilterText","existingEmptyItem","hasVisibleItems","shouldShow","includes","emptyItem","document","createElement","appendChild","style","display","index","i","scrollIntoView","block","itemLabel","getAttribute","itemValue","itemText","render","h","Host","role","toString","htmlFor","name","ref","triggerMode","placement","class","slot","onClick","id","type","e","placeholder","readOnly","onInput","onFocus","onKeyDown","tabIndex","size","emphasis","map","description","errorDescription","hidden"],"sources":["src/components/nv-fielddropdown/styles/nv-fielddropdown.scss?tag=nv-fielddropdown","src/components/nv-fielddropdown/nv-fielddropdown.tsx"],"sourcesContent":["@use './mixins' as *;\n@import '../../../styles/form-field';\n@import '../../../styles/scrollbar';\n\nnv-fielddropdown {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n &[hidden]:not([hidden='false']) label {\n display: none;\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include form-field-popover();\n\n div[slot='content'] {\n @include scrollbar();\n max-height: calc(90vh - var(--list-dropdown-padding) * 2);\n overflow-y: auto;\n position: relative;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n @include input-wrapper-styles();\n }\n\n .input-container {\n @include form-field-input-container();\n @include input-container-styles();\n\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n input,\n p.non-filterable-text {\n @include form-field-input();\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n\n .non-filterable-text {\n @include non-filterable-text-styles();\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - Use a <ul></ul> tag for the slot, and place <nv-dropdownitem> elements inside.\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-fielddropdown',\n styleUrl: 'styles/nv-fielddropdown.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFielddropdown {\n @Element() el: HTMLNvFielddropdownElement;\n private inputElement!: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n /**\n * Timer for debouncing input events.\n * Private property preferred over @State as it:\n * - Doesn't need to trigger re-renders\n * - Is purely for internal logic\n * - Improves performance by avoiding Stencil's reactivity system\n */\n private debounceTimer: number;\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 * 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 * 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 })\n readonly 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 * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\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 * 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 * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: 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 * 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 * 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 dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Defines the maximum height of the multiselect list when open.\n */\n @Prop({ reflect: true })\n readonly maxHeight: string = '';\n\n /**\n * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyResult: string = 'No results found';\n\n /**\n * Enables or disables the filtering feature for the dropdown items.\n */\n @Prop({ reflect: true })\n readonly filterable: boolean = false;\n\n /**\n * List of options used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * options=[{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * \"selected\": true,\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false })\n readonly options?: {\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Whether this option is pre-selected */\n selected?: boolean;\n }[];\n\n /**\n * Delay in milliseconds before the search is triggered when typing in the filter input.\n * @default 300\n */\n @Prop({ reflect: true })\n readonly debounceDelay: number = 300;\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 STATE\n\n /**\n * The text entered by the user for filtering dropdown items.\n */\n @State()\n filterText: string = '';\n\n @State()\n selectedValues: Set<string> = new Set();\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when an item is clicked.\n */\n @Event()\n dropdownItemSelected: EventEmitter<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n\n if (!this.value) {\n const defaultValue = newValue.find(option => option.selected);\n this.value = defaultValue?.value ?? '';\n this.updateSelectedItem(this.value);\n }\n }\n\n @Watch('value')\n watchValueHandler(newValue: typeof this.value) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Stop propagation to prevent the event from affecting parent components like dialogs\n event.stopPropagation();\n\n // Update `open` based on the popover state\n this.open = event.detail;\n }\n\n @Listen('dropdownItemSelected')\n handleDropdownItemSelected(\n event: CustomEvent<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >,\n ) {\n if (this.disabled || this.readonly) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n if (item !== event.target) {\n item.removeAttribute('selected');\n } else {\n item.setAttribute('selected', 'true');\n }\n });\n\n this.clearFilter();\n this.value = event.detail.value;\n this.open = false;\n }\n\n @Listen('blur', { capture: true })\n handleBlur(event: FocusEvent) {\n const target = event.relatedTarget;\n if (!(target instanceof Node) || !this.el.contains(target)) {\n this.open = false;\n\n if (this.inputElement) {\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n setTimeout(() => {\n this.filterItems();\n }, 200);\n }\n }\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.el) return;\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitem:not([disabled]):not([hidden])',\n ),\n ) as HTMLNvFielddropdownitemElement[];\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.resetFilter();\n\n if (this.filterable && this.filterText) {\n this.filterItems();\n }\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateSelectedItem(this.value);\n }\n if (this.inputElement) {\n this.inputElement.value = this.getSelectedLabel();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n private handleInput = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.open = true;\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterItems();\n }, this.debounceDelay);\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitem[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n if (shouldShow) item.removeAttribute('hidden');\n else item.setAttribute('hidden', '');\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitem');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyResult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /** Reset the filter and make all items visible. */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) return;\n this.open = true;\n };\n\n private togglePopover = () => {\n if (this.disabled || this.readonly) return;\n this.open = !this.open;\n };\n\n private updateHighlightedItem(\n items: HTMLNvFielddropdownitemElement[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.focus();\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n }\n });\n }\n\n private getSelectedLabel = (): string => {\n if (!this.value) return '';\n\n if (this.options?.length > 1) {\n const matchingItem = this.options.find(\n option => option.value === this.value,\n );\n return matchingItem?.label ?? matchingItem?.value ?? this.value;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => item.value === this.value);\n\n const selectedLabel = matchingItem\n ? matchingItem.label ??\n matchingItem.textContent?.trim() ??\n matchingItem.value\n : '';\n\n return selectedLabel;\n };\n\n private clearFilter = () => {\n if (!this.filterable) return;\n\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n this.inputElement.focus();\n this.filterItems();\n };\n\n private updateSelectedItem(value: string) {\n if (!value) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => {\n const itemLabel = item.getAttribute('label');\n const itemValue = item.getAttribute('value');\n const itemText = item.textContent?.trim();\n return itemLabel === value || itemValue === value || itemText === value;\n });\n\n items.forEach(item => {\n if (item === matchingItem) {\n item.setAttribute('selected', '');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"combobox\"\n aria-expanded={this.open.toString()}\n aria-haspopup=\"listbox\"\n aria-label={this.label}\n >\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n data-scope=\"focusable\"\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.getSelectedLabel()}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onClick={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n data-scope=\"focusable\"\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n {this.getSelectedLabel() || this.value || this.placeholder}\n </p>\n )}\n\n {this.filterable && this.filterText && this.open && (\n <nv-iconbutton\n name=\"x\"\n size=\"md\"\n emphasis=\"lower\"\n class=\"clear-button\"\n onClick={this.clearFilter}\n aria-label=\"Clear input\"\n />\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n style={this.maxHeight ? { maxHeight: this.maxHeight } : {}}\n >\n {this.options?.length > 0 ? (\n <ul>\n {this.options.map(option => (\n <nv-fielddropdownitem\n label={option.label}\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n />\n ))}\n </ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </div>\n </nv-popover>\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}\n"],"mappings":"oGAAA,MAAMA,EAAqB,m2RAC3B,MAAAC,EAAeD,E,MC+BFE,EAAe,MAN5B,WAAAC,CAAAC,G,gHA6BWC,KAAAC,QAAkBC,IA2ClBF,KAAAG,aAA2C,MAe3CH,KAAAI,SAAoB,MAQpBJ,KAAAK,SAAoB,MAQpBL,KAAAM,SAAoB,MAQpBN,KAAAO,MAAiB,MAcjBP,KAAAQ,UAAoB,GAM7BR,KAAAS,KAAgB,MAMPT,KAAAU,YAAsB,mBAMtBV,KAAAW,WAAsB,MAkCtBX,KAAAY,cAAwB,IASxBZ,KAAAa,UAAqB,MAMrBb,KAAAc,MAAiB,MA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c,MAEvDmC,EAAA3C,KAAK4C,WAAO,MAAAD,SAAA,SAAAA,EAAEE,QAAS,EACtBqE,EAAA,UACGlH,KAAK4C,QAAQ6F,KAAIzF,GAChBkE,EAAA,wBACE/D,MAAOH,EAAOG,MACdd,MAAOW,EAAOX,MACd/B,SAAU0C,EAAO1C,SACjB+D,SAAUrB,EAAOX,QAAUrC,KAAKqC,WAKtC6E,EAAA,QAAMK,KAAK,eAKfvH,KAAK0I,aACL1I,KAAKuB,GAAGC,cAAc,0BACtB0F,EAAA,OAAA5B,IAAA,2CAAKqC,MAAM,eACTT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,eAAevH,KAAK0I,eAIjC1I,KAAK2I,kBACL3I,KAAKuB,GAAGC,cAAc,gCACtB0F,EAAA,OAAA5B,IAAA,2CAAKsD,QAAS5I,KAAKO,MAAOoH,MAAM,qBAC9BT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,qBAAqBvH,KAAK2I,mB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["nvFielddropdownCss","NvFielddropdownStyle0","NvFielddropdown","constructor","hostRef","this","inputId","uuidv4","autocomplete","required","readonly","disabled","error","maxHeight","open","emptyResult","filterable","debounceDelay","autofocus","fluid","filterText","selectedValues","Set","handleInputContainerClick","event","target","tagName","inputContainer","el","querySelector","classList","add","removeFocusWithin","remove","popoverElement","addEventListener","handleInput","input","debounceTimer","window","clearTimeout","setTimeout","value","toLowerCase","filterItems","handleInputFocus","togglePopover","getSelectedLabel","_a","options","length","matchingItem","find","option","_c","_b","label","items","Array","from","querySelectorAll","item","selectedLabel","_f","_d","_e","textContent","trim","clearFilter","inputElement","focus","handleOptionsChange","newValue","defaultValue","selected","updateSelectedItem","watchValueHandler","valueChanged","emit","handleOpenChanged","stopPropagation","detail","handleDropdownItemSelected","forEach","removeAttribute","setAttribute","handleBlur","relatedTarget","Node","contains","handleKeyDown","key","preventDefault","currentIndex","findIndex","updateHighlightedItem","componentWillLoad","resetFilter","componentDidLoad","getFilterText","existingEmptyItem","hasVisibleItems","shouldShow","includes","emptyItem","document","createElement","appendChild","style","display","index","i","scrollIntoView","block","itemLabel","getAttribute","itemValue","itemText","render","h","Host","role","toString","htmlFor","name","ref","triggerMode","placement","class","slot","onClick","id","type","e","placeholder","readOnly","onInput","onFocus","onKeyDown","tabIndex","size","emphasis","map","description","errorDescription","hidden"],"sources":["src/components/nv-fielddropdown/styles/nv-fielddropdown.scss?tag=nv-fielddropdown","src/components/nv-fielddropdown/nv-fielddropdown.tsx"],"sourcesContent":["@use './mixins' as *;\n@import '../../../styles/form-field';\n@import '../../../styles/scrollbar';\n\nnv-fielddropdown {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid='false']) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n &[hidden]:not([hidden='false']) label {\n display: none;\n }\n\n label {\n @include form-field-label();\n }\n\n nv-popover {\n @include form-field-popover();\n\n div[slot='content'] {\n @include scrollbar();\n max-height: calc(90vh - var(--list-dropdown-padding) * 2);\n overflow-y: auto;\n position: relative;\n }\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n @include input-wrapper-styles();\n }\n\n .input-container {\n @include form-field-input-container();\n @include input-container-styles();\n\n input[type='search']::-webkit-search-decoration,\n input[type='search']::-webkit-search-cancel-button,\n input[type='search']::-webkit-search-results-button,\n input[type='search']::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n input,\n p.non-filterable-text {\n @include form-field-input();\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\n }\n }\n\n .non-filterable-text {\n @include non-filterable-text-styles();\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Watch,\n Method,\n} from '@stencil/core';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot content - Use a <ul></ul> tag for the slot, and place <nv-dropdownitem> elements inside.\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-fielddropdown',\n styleUrl: 'styles/nv-fielddropdown.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFielddropdown {\n @Element() el: HTMLNvFielddropdownElement;\n private inputElement!: HTMLInputElement;\n private popoverElement!: HTMLNvPopoverElement;\n /**\n * Timer for debouncing input events.\n * Private property preferred over @State as it:\n * - Doesn't need to trigger re-renders\n * - Is purely for internal logic\n * - Improves performance by avoiding Stencil's reactivity system\n */\n private debounceTimer: number;\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 * 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 * 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 })\n readonly 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 * The placeholder is displayed only when the filterable option is enabled.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\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 * 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 * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: 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 * 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 * 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 dropdown\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Defines the maximum height of the multiselect list when open.\n */\n @Prop({ reflect: true })\n readonly maxHeight: string = '';\n\n /**\n * State of the dropdown popover.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * The text to display when no items match the filter.\n */\n @Prop({ reflect: true })\n readonly emptyResult: string = 'No results found';\n\n /**\n * Enables or disables the filtering feature for the dropdown items.\n */\n @Prop({ reflect: true })\n readonly filterable: boolean = false;\n\n /**\n * List of options used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * options=[{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * \"selected\": true,\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: false })\n readonly options?: {\n /** Label to display for the option */\n label: string;\n /** Value associated with the option */\n value: string;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Whether this option is pre-selected */\n selected?: boolean;\n }[];\n\n /**\n * Delay in milliseconds before the search is triggered when typing in the filter input.\n * @default 300\n */\n @Prop({ reflect: true })\n readonly debounceDelay: number = 300;\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 STATE\n\n /**\n * The text entered by the user for filtering dropdown items.\n */\n @State()\n filterText: string = '';\n\n @State()\n selectedValues: Set<string> = new Set();\n\n //#endregion STATE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when an item is clicked.\n */\n @Event()\n dropdownItemSelected: EventEmitter<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('options')\n handleOptionsChange(newValue: typeof this.options) {\n if (!newValue) return;\n\n if (!this.value) {\n const defaultValue = newValue.find(option => option.selected);\n this.value = defaultValue?.value ?? '';\n this.updateSelectedItem(this.value);\n }\n }\n\n @Watch('value')\n watchValueHandler(newValue: typeof this.value) {\n this.valueChanged.emit(newValue);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n @Listen('openChanged')\n handleOpenChanged(event: CustomEvent<boolean>) {\n // Stop propagation to prevent the event from affecting parent components like dialogs\n event.stopPropagation();\n\n // Update `open` based on the popover state\n this.open = event.detail;\n }\n\n @Listen('dropdownItemSelected')\n handleDropdownItemSelected(\n event: CustomEvent<\n HTMLNvFielddropdownitemElementEventMap['dropdownItemSelected']\n >,\n ) {\n if (this.disabled || this.readonly) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n if (item !== event.target) {\n item.removeAttribute('selected');\n } else {\n item.setAttribute('selected', 'true');\n }\n });\n\n this.clearFilter();\n this.value = event.detail.value;\n this.open = false;\n }\n\n @Listen('blur', { capture: true })\n handleBlur(event: FocusEvent) {\n const target = event.relatedTarget;\n if (!(target instanceof Node) || !this.el.contains(target)) {\n this.open = false;\n\n if (this.inputElement) {\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n setTimeout(() => {\n this.filterItems();\n }, 200);\n }\n }\n }\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (!this.el) return;\n if (!this.open) {\n if (event.key === 'ArrowDown') {\n this.open = true;\n\n event.preventDefault();\n return;\n }\n return;\n }\n\n const items = Array.from(\n this.el.querySelectorAll(\n 'nv-fielddropdownitem:not([disabled]):not([hidden])',\n ),\n ) as HTMLNvFielddropdownitemElement[];\n\n let currentIndex = items.findIndex(item =>\n item.classList.contains('highlighted'),\n );\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n currentIndex = (currentIndex + 1) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n currentIndex = (currentIndex - 1 + items.length) % items.length;\n this.updateHighlightedItem(items, currentIndex);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.open = false;\n }\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.resetFilter();\n\n if (this.filterable && this.filterText) {\n this.filterItems();\n }\n if (this.options) {\n this.handleOptionsChange(this.options);\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.updateSelectedItem(this.value);\n }\n if (this.inputElement) {\n this.inputElement.value = this.getSelectedLabel();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Retrieves the current filter text entered by the user.\n * @returns {string} The filter text.\n */\n @Method()\n async getFilterText(): Promise<string> {\n return this.filterText;\n }\n\n private handleInputContainerClick = (event: MouseEvent) => {\n if (this.disabled || this.readonly) {\n return;\n }\n\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'P' || target.tagName === 'SPAN') {\n this.open = true;\n\n // Simulate focus to trigger \"focus-within\" style\n const inputContainer = this.el.querySelector(\n '.input-container',\n ) as HTMLElement;\n if (inputContainer) {\n inputContainer.classList.add('focus-within');\n\n // Remove the \"focus-within\" class after a delay or when the popover is closed\n const removeFocusWithin = () => {\n inputContainer.classList.remove('focus-within');\n };\n\n // Or remove the class when the popover is closed\n this.popoverElement.addEventListener('hide', removeFocusWithin);\n }\n }\n };\n\n private handleInput = (event: Event) => {\n if (!this.filterable) return;\n if (this.disabled || this.readonly) {\n return;\n }\n\n const input = event.target as HTMLInputElement;\n this.open = true;\n\n // Clear any existing timer\n if (this.debounceTimer) {\n window.clearTimeout(this.debounceTimer);\n }\n\n // Set a new timer for filtering\n this.debounceTimer = window.setTimeout(() => {\n this.filterText = input.value.toLowerCase();\n this.filterItems();\n }, this.debounceDelay);\n };\n\n /**\n * Filter dropdown items based on the text entered by the user.\n * If no items are found, display a message indicating no results.\n */\n private filterItems() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n // Remove the \"no results found\" item if it exists\n const existingEmptyItem = this.el.querySelector(\n 'nv-fielddropdownitem[data-empty]',\n );\n if (existingEmptyItem) {\n existingEmptyItem.remove();\n }\n\n let hasVisibleItems = false;\n\n // Iterate over all items and adjust their visibility\n items.forEach(item => {\n const textContent = item.textContent?.toLowerCase() || ''; // Get the textual content of the slot\n const value = item.value?.toLowerCase() || ''; // Get the value of the `value` attribute\n\n // Check if the filtered text is present either in the value or in the textual content\n const shouldShow =\n value.includes(this.filterText) ||\n textContent.includes(this.filterText);\n\n if (shouldShow) item.removeAttribute('hidden');\n else item.setAttribute('hidden', '');\n\n if (shouldShow) {\n hasVisibleItems = true;\n }\n });\n\n // If no items are visible, add the \"no results found\" item\n if (!hasVisibleItems) {\n const emptyItem = document.createElement('nv-fielddropdownitem');\n emptyItem.setAttribute('data-empty', 'true');\n emptyItem.setAttribute('disabled', 'true');\n emptyItem.textContent = this.emptyResult;\n this.el.querySelector('ul[slot=\"content\"]')?.appendChild(emptyItem);\n }\n }\n\n /** Reset the filter and make all items visible. */\n private resetFilter() {\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n items.forEach(item => {\n item.style.display = '';\n });\n }\n\n private handleInputFocus = () => {\n if (this.disabled || this.readonly) return;\n this.open = true;\n };\n\n private togglePopover = () => {\n if (this.disabled || this.readonly) return;\n this.open = !this.open;\n };\n\n private updateHighlightedItem(\n items: HTMLNvFielddropdownitemElement[],\n index: number,\n ) {\n items.forEach((item, i) => {\n if (i === index) {\n item.classList.add('highlighted');\n item.focus();\n item.scrollIntoView({ block: 'nearest' });\n } else {\n item.classList.remove('highlighted');\n }\n });\n }\n\n private getSelectedLabel = (): string => {\n if (!this.value) return '';\n\n if (this.options?.length > 1) {\n const matchingItem = this.options.find(\n option => option.value === this.value,\n );\n return matchingItem?.label ?? matchingItem?.value ?? this.value;\n }\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => item.value === this.value);\n\n const selectedLabel = matchingItem\n ? matchingItem.label ??\n matchingItem.textContent?.trim() ??\n matchingItem.value\n : '';\n\n return selectedLabel;\n };\n\n private clearFilter = () => {\n if (!this.filterable) return;\n\n this.filterText = '';\n this.inputElement.value = this.getSelectedLabel();\n this.inputElement.focus();\n this.filterItems();\n };\n\n private updateSelectedItem(value: string) {\n if (!value) return;\n\n const items = Array.from(\n this.el.querySelectorAll('nv-fielddropdownitem'),\n ) as HTMLNvFielddropdownitemElement[];\n\n const matchingItem = items.find(item => {\n const itemLabel = item.getAttribute('label');\n const itemValue = item.getAttribute('value');\n const itemText = item.textContent?.trim();\n return itemLabel === value || itemValue === value || itemText === value;\n });\n\n items.forEach(item => {\n if (item === matchingItem) {\n item.setAttribute('selected', '');\n } else {\n item.removeAttribute('selected');\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"combobox\"\n aria-expanded={this.open.toString()}\n aria-haspopup=\"listbox\"\n aria-label={this.label}\n >\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n <nv-popover\n ref={el => (this.popoverElement = el as HTMLNvPopoverElement)}\n triggerMode=\"controlled\"\n placement=\"bottom-start\"\n open={this.open}\n >\n <div class=\"input-wrapper\" slot=\"trigger\">\n <slot name=\"before-input\"></slot>\n\n <div\n class=\"input-container\"\n onClick={this.handleInputContainerClick}\n >\n <slot name=\"leading-input\"></slot>\n\n {this.filterable || this.disabled || this.readonly ? (\n <input\n data-scope=\"focusable\"\n id={this.inputId}\n type=\"search\"\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n value={this.getSelectedLabel()}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n onFocus={this.handleInputFocus}\n onClick={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n />\n ) : (\n <p\n data-scope=\"focusable\"\n id={this.inputId}\n class=\"non-filterable-text\"\n onClick={this.handleInputContainerClick}\n tabIndex={this.disabled ? -1 : 0}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleInputFocus}\n >\n {this.getSelectedLabel() || this.value || this.placeholder}\n </p>\n )}\n\n {this.filterable && this.filterText && this.open && (\n <nv-iconbutton\n name=\"x\"\n size=\"md\"\n emphasis=\"lower\"\n class=\"clear-button\"\n onClick={this.clearFilter}\n aria-label=\"Clear input\"\n />\n )}\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n\n <nv-iconbutton\n data-scope=\"toggle-dropdown\"\n name={this.open ? 'chevron-top' : 'chevron-down'}\n size=\"md\"\n emphasis=\"lower\"\n aria-label={this.open ? 'Hide dropdown' : 'Show dropdown'}\n aria-pressed={this.open.toString()}\n onClick={this.togglePopover}\n tabIndex={this.disabled ? -1 : 0}\n />\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n <div\n slot=\"content\"\n style={this.maxHeight ? { maxHeight: this.maxHeight } : {}}\n >\n {this.options?.length > 0 ? (\n <ul>\n {this.options.map(option => (\n <nv-fielddropdownitem\n label={option.label}\n value={option.value}\n disabled={option.disabled}\n selected={option.value === this.value}\n />\n ))}\n </ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </div>\n </nv-popover>\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}\n"],"mappings":"oGAAA,MAAMA,EAAqB,qgSAC3B,MAAAC,EAAeD,E,MC+BFE,EAAe,MAN5B,WAAAC,CAAAC,G,gHA6BWC,KAAAC,QAAkBC,IA2ClBF,KAAAG,aAA2C,MAe3CH,KAAAI,SAAoB,MAQpBJ,KAAAK,SAAoB,MAQpBL,KAAAM,SAAoB,MAQpBN,K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ACd6F,SAAUtI,KAAKM,UAAY,EAAI,KAInC4G,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,iBAGbL,EAAA,OAAA5B,IAAA,2CACEsC,KAAK,UACLrB,MAAOvG,KAAKQ,UAAY,CAAEA,UAAWR,KAAKQ,WAAc,MAEvDmC,EAAA3C,KAAK4C,WAAO,MAAAD,SAAA,SAAAA,EAAEE,QAAS,EACtBqE,EAAA,UACGlH,KAAK4C,QAAQ6F,KAAIzF,GAChBkE,EAAA,wBACE/D,MAAOH,EAAOG,MACdd,MAAOW,EAAOX,MACd/B,SAAU0C,EAAO1C,SACjB+D,SAAUrB,EAAOX,QAAUrC,KAAKqC,WAKtC6E,EAAA,QAAMK,KAAK,eAKfvH,KAAK0I,aACL1I,KAAKuB,GAAGC,cAAc,0BACtB0F,EAAA,OAAA5B,IAAA,2CAAKqC,MAAM,eACTT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,eAAevH,KAAK0I,eAIjC1I,KAAK2I,kBACL3I,KAAKuB,GAAGC,cAAc,gCACtB0F,EAAA,OAAA5B,IAAA,2CAAKsD,QAAS5I,KAAKO,MAAOoH,MAAM,qBAC9BT,EAAA,QAAA5B,IAAA,2CAAMiC,KAAK,qBAAqBvH,KAAK2I,mB","ignoreList":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Available icons */
|
|
2
|
-
export declare const iconNames: readonly ["access-point-off", "access-point", "accessible", "activity", "address-book", "adjustments-horizontal", "adjustments-up", "adjustments", "affiliate", "air-conditioning", "alert-circle", "align-center", "align-left", "align-right", "app-window", "apps", "archive", "areas", "arrow-back-up", "arrow-back", "arrow-down-left", "arrow-down-right", "arrow-down", "arrow-forward-up", "arrow-forward", "arrow-left", "arrow-right", "arrow-up-left", "arrow-up-right", "arrow-up", "arrows-exchange", "arrows-maximize", "arrows-minimize", "arrows-move", "aspect-ratio", "atom", "ban", "basket", "battery-1", "battery-2", "battery-3", "battery-4", "battery-automotive", "battery-charging", "battery-eco", "battery-off", "battery", "bell-off", "bell-ringing", "bell", "bike", "bluetooth-connected", "bluetooth-off", "bluetooth", "bolt-off", "bolt", "book", "bookmark-off", "bookmark", "bookmarks", "box-align-top", "box-multiple", "briefcase", "brightness-down", "brightness-up", "browser-check", "browser-plus", "browser-x", "browser", "brush", "building-bank", "building-factory", "building-lighthouse", "building-store", "building", "bulb-off", "bulb", "cake", "calendar-time", "calendar", "camera-off", "camera", "car-crane", "car", "caravan", "cash-banknote", "cash", "cast", "cell", "charging-pile", "chart-arcs", "chart-area-line", "chart-area", "chart-arrows-vertical", "chart-arrows", "chart-bar", "chart-bubble", "chart-circles", "chart-donut", "chart-dots", "chart-line", "chart-pie", "chart-radar", "check", "checkbox", "checklist", "checks", "chevron-down", "chevron-left", "chevron-right", "chevron-top", "chevrons-left", "chevrons-right", "circle-caret-right", "circle-check", "circle-x", "circuit-alternate", "circuit-ground-digital", "clipboard-check", "clipboard-list", "clipboard-plus", "clipboard-text", "clipboard-x", "clipboard", "clock-edit", "clock", "cloud-data-connection", "cloud-download", "cloud-rain", "cloud-snow", "cloud-upload", "cloud", "color-picker", "color-swatch", "compass", "contract", "copy", "cpu", "crane", "credit-card", "crop", "cross", "crown", "currency-bitcoin", "currency-dollar", "currency-ethereum", "currency-euro", "cut", "dashboard", "database", "device-desktop", "device-floppy", "device-gamepad", "device-laptop", "device-mobile-rotated", "device-mobile", "device-tablet", "device-watch", "devices", "dialpad", "direction-horizontal", "direction-sign", "direction", "discount", "door-enter", "door-exit", "door-off", "dots-vertical", "dots", "download", "drone", "droplet-filled", "droplet-half", "droplet", "droplets", "edit", "engine", "eraser-off", "eraser", "external-link", "eye-off", "eye", "face-id", "feather", "file-alert", "file-analytics", "file-check", "file-code", "file-download", "file-export", "file-horizontal", "file-import", "file-plus", "file-search", "file-text-bookmark", "file-text", "file-type-bmp", "file-type-css", "file-type-csv", "file-type-doc", "file-type-html", "file-type-jpg", "file-type-js", "file-type-pdf", "file-type-png", "file-type-ppt", "file-type-xls", "file-type-xml", "file-type-zip", "file-upload", "file-x", "file-zip", "file", "files-off", "files", "filter-off", "filter-sort", "filter", "fingerprint", "fire-extinguisher", "flag", "flame", "flip-horizontal", "flip-vertical", "folder-minus", "folder-off", "folder-plus", "folder-x", "folder", "folders", "frame", "gas-station", "gauge-off", "gauge", "gift", "gps", "grid-dots", "grip-horizontal", "grip-vertical", "hand-stop", "hand-waving", "hash", "haze", "headphones-off", "headphones", "headset", "heart-off", "heart", "heartbeat", "helicopter", "helmet-swopp", "helmet", "help", "history", "home", "hourglass-empty", "hourglass-high", "hourglass-low", "hourglass-off", "hourglass", "inbox", "info-circle", "keyboard-hide", "keyboard-show", "keyboard", "layout-board-split", "layout-dashboard", "layout-grid", "layout-sidebar-left-collapse", "layout-sidebar-left-expand", "layout-sidebar-right-collapse", "layout-sidebar-right-expand", "layout", "leaf", "lifebuoy", "link", "list-search", "list", "loader", "location", "lock-off", "lock-open", "lock", "login", "logout", "mail-forward", "mail-opened", "mail", "map-pin-off", "map-pin", "map", "menu", "message-dots", "message-off", "message", "messages", "microphone-off", "microphone", "minus", "mist", "moon", "motorbike", "mouse", "movie", "network", "news", "note", "notebook", "notes", "offshore-station", "package", "palette", "paperclip", "pencil", "phone-call", "phone-calling", "phone-check", "phone-incoming", "phone-off", "phone-outgoing", "phone", "photo-off", "photo", "pig", "pin", "pinned-off", "pinned", "plane-off", "plane", "plant", "player-pause", "player-play", "player-skip-back", "player-skip-forward", "player-stop", "player-track-next", "player-track-prev", "plug-connected", "plug", "plus", "power-ac", "power-dc", "power", "presentation-analytics", "presentation", "printer", "propeller", "published", "puzzle-2", "puzzle", "pylon", "qrcode", "radar", "radio", "radioactive", "receipt-dollar", "receipt-euro", "receipt", "recharging", "recycle", "refresh-alert", "refresh-off", "refresh", "repeat-once", "repeat", "replace", "report-analytics", "report-medical", "report-search", "report", "ripple-off", "ripple", "rocket", "rotate-2", "rotate-clockwise-2", "rotate-clockwise", "rotate-dot", "rotate", "router", "ruler-measure", "sailboat", "satellite", "scale", "school", "scissors", "scooter-electric", "screenshot", "search", "seeding", "select", "selector", "send", "server", "settings", "shape", "share-2", "share", "shield-check", "shield-lock", "shield-off", "shield-x", "shield", "ship-off", "ship", "shopping-cart", "
|
|
2
|
+
export declare const iconNames: readonly ["access-point-off", "access-point", "accessible", "activity", "address-book", "adjustments-horizontal", "adjustments-up", "adjustments", "affiliate", "air-conditioning", "alert-circle", "alert-triangle", "align-center", "align-left", "align-right", "app-window", "apps", "archive", "areas", "arrow-back-up", "arrow-back", "arrow-down-left", "arrow-down-right", "arrow-down", "arrow-forward-up", "arrow-forward", "arrow-left", "arrow-right", "arrow-up-left", "arrow-up-right", "arrow-up", "arrows-exchange", "arrows-maximize", "arrows-minimize", "arrows-move", "aspect-ratio", "atom", "ban", "basket", "battery-1", "battery-2", "battery-3", "battery-4", "battery-automotive", "battery-charging", "battery-eco", "battery-off", "battery", "bell-off", "bell-ringing", "bell", "bike", "bluetooth-connected", "bluetooth-off", "bluetooth", "bolt-off", "bolt", "book", "bookmark-off", "bookmark", "bookmarks", "box-align-top", "box-multiple", "briefcase", "brightness-down", "brightness-up", "browser-check", "browser-plus", "browser-x", "browser", "brush", "building-bank", "building-factory", "building-lighthouse", "building-store", "building", "bulb-off", "bulb", "cake", "calendar-time", "calendar", "camera-off", "camera", "car-crane", "car", "caravan", "cash-banknote", "cash", "cast", "cell", "charging-pile", "chart-arcs", "chart-area-line", "chart-area", "chart-arrows-vertical", "chart-arrows", "chart-bar", "chart-bubble", "chart-circles", "chart-donut", "chart-dots", "chart-line", "chart-pie", "chart-radar", "check", "checkbox", "checklist", "checks", "chevron-down", "chevron-left", "chevron-right", "chevron-top", "chevrons-left", "chevrons-right", "circle-caret-right", "circle-check", "circle-x", "circuit-alternate", "circuit-ground-digital", "clipboard-check", "clipboard-list", "clipboard-plus", "clipboard-text", "clipboard-x", "clipboard", "clock-edit", "clock", "cloud-data-connection", "cloud-download", "cloud-rain", "cloud-snow", "cloud-upload", "cloud", "color-picker", "color-swatch", "compass", "contract", "cookie", "copy", "cpu", "crane", "credit-card", "crop", "cross", "crown", "currency-bitcoin", "currency-dollar", "currency-ethereum", "currency-euro", "cut", "dashboard", "database", "device-desktop", "device-floppy", "device-gamepad", "device-laptop", "device-mobile-rotated", "device-mobile", "device-tablet", "device-watch", "devices", "dialpad", "direction-horizontal", "direction-sign", "direction", "discount", "door-enter", "door-exit", "door-off", "dots-vertical", "dots", "download", "drone", "droplet-filled", "droplet-half", "droplet", "droplets", "edit", "empty", "engine", "eraser-off", "eraser", "external-link", "eye-off", "eye", "face-id", "feather", "file-alert", "file-analytics", "file-check", "file-code", "file-download", "file-export", "file-horizontal", "file-import", "file-plus", "file-search", "file-text-bookmark", "file-text", "file-type-bmp", "file-type-css", "file-type-csv", "file-type-doc", "file-type-html", "file-type-jpg", "file-type-js", "file-type-pdf", "file-type-png", "file-type-ppt", "file-type-xls", "file-type-xml", "file-type-zip", "file-upload", "file-x", "file-zip", "file", "files-off", "files", "filter-off", "filter-sort", "filter", "fingerprint", "fire-extinguisher", "flag", "flame", "flip-horizontal", "flip-vertical", "folder-minus", "folder-off", "folder-plus", "folder-x", "folder", "folders", "frame", "gas-station", "gauge-off", "gauge", "gift", "gps", "grid-dots", "grip-horizontal", "grip-vertical", "hand-stop", "hand-waving", "hash", "haze", "headphones-off", "headphones", "headset", "heart-off", "heart", "heartbeat", "helicopter", "helmet-swopp", "helmet", "help", "history", "home", "hourglass-empty", "hourglass-high", "hourglass-low", "hourglass-off", "hourglass", "inbox", "info-circle", "keyboard-hide", "keyboard-show", "keyboard", "layout-board-split", "layout-dashboard", "layout-grid", "layout-sidebar-left-collapse", "layout-sidebar-left-expand", "layout-sidebar-right-collapse", "layout-sidebar-right-expand", "layout", "leaf", "lifebuoy", "link", "list-search", "list", "loader", "location", "lock-off", "lock-open", "lock", "login", "logout", "mail-forward", "mail-opened", "mail", "map-pin-off", "map-pin", "map", "menu", "message-dots", "message-off", "message", "messages", "microphone-off", "microphone", "minus", "mist", "moon", "motorbike", "mouse", "movie", "network", "news", "note", "notebook", "notes", "offshore-station", "package", "palette", "paperclip", "pencil", "phone-call", "phone-calling", "phone-check", "phone-incoming", "phone-off", "phone-outgoing", "phone", "photo-off", "photo", "pig", "pin", "pinned-off", "pinned", "plane-off", "plane", "plant", "player-pause", "player-play", "player-skip-back", "player-skip-forward", "player-stop", "player-track-next", "player-track-prev", "plug-connected", "plug", "plus", "power-ac", "power-dc", "power", "presentation-analytics", "presentation", "printer", "propeller", "published", "puzzle-2", "puzzle", "pylon", "qrcode", "radar", "radio", "radioactive", "receipt-dollar", "receipt-euro", "receipt", "recharging", "recycle", "refresh-alert", "refresh-off", "refresh", "repeat-once", "repeat", "replace", "report-analytics", "report-medical", "report-search", "report", "ripple-off", "ripple", "rocket", "rotate-2", "rotate-clockwise-2", "rotate-clockwise", "rotate-dot", "rotate", "router", "ruler-measure", "sailboat", "satellite", "scale", "school", "scissors", "scooter-electric", "screenshot", "search", "seeding", "select", "selector", "send", "server", "settings", "shape", "share-2", "share", "shield-check", "shield-lock", "shield-off", "shield-x", "shield", "ship-off", "ship", "shopping-cart", "slash", "smart-home", "snowflake", "solar-panel", "sort-ascending-letters", "sort-ascending-numbers", "sort-descending-letters", "sort-descending-numbers", "spacing-horizontal", "spacing-vertical", "speakerphone", "stack", "stairs", "star", "sun", "sunrise", "sunset", "switch-horizontal", "switch-vertical", "table", "tag", "tank-empty-fill", "tank-full-fill", "tank-medium-fill", "temperature-off", "temperature", "template", "terminal", "text-size", "text", "thumb-down", "thumb-up", "ticket", "timeline", "tir", "tool", "tools", "train", "trash-off", "trash", "tree", "trees", "truck-delivery", "truck", "umbrella", "unlink", "upload", "user-circle", "user-exclamation", "user-minus", "user-off", "user-plus", "user-worker", "user", "users", "versions", "video-minus", "video-off", "video-plus", "video", "volume-2", "volume-3", "volume", "wallet", "wand", "wave", "waves", "wifi-off", "wifi", "wind-direction", "wind", "windmill", "wood", "world", "writing", "x"];
|
|
3
3
|
export type IconName = (typeof iconNames)[number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { type Placement } from '@floating-ui/dom';
|
|
2
|
+
import { type Placement, type Strategy } from '@floating-ui/dom';
|
|
3
3
|
/**
|
|
4
4
|
* @slot trigger - Content to be placed as the trigger.
|
|
5
5
|
* @slot content - Content to be placed within the popover.
|
|
@@ -33,6 +33,15 @@ export declare class NvPopover {
|
|
|
33
33
|
* Defines where the popover appears relative to the trigger.
|
|
34
34
|
*/
|
|
35
35
|
readonly placement: Placement;
|
|
36
|
+
/**
|
|
37
|
+
* Sets the positioning strategy for the popover. Options include:
|
|
38
|
+
* - `absolute`: Positions the popover relative to the trigger element
|
|
39
|
+
* (default).
|
|
40
|
+
* - `fixed`: Positions the popover relative to the viewport, useful when you
|
|
41
|
+
* need the popover to break out of overflow hidden containers, it will not
|
|
42
|
+
* scroll inside a scroll container due to the fixed positioning.
|
|
43
|
+
*/
|
|
44
|
+
readonly strategy: Strategy;
|
|
36
45
|
/**
|
|
37
46
|
* Use this to group popovers together so that opening one will not animate
|
|
38
47
|
* the closing of another. This is helpful when popovers are placed close
|
|
@@ -114,6 +123,7 @@ export declare class NvPopover {
|
|
|
114
123
|
/****************************************************************************/
|
|
115
124
|
private isAnimating;
|
|
116
125
|
handleOpenChange(open: boolean): Promise<void>;
|
|
126
|
+
handleStrategyChange(): void;
|
|
117
127
|
/****************************************************************************/
|
|
118
128
|
componentWillLoad(): void;
|
|
119
129
|
componentWillUpdate(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import type { Placement } from '@floating-ui/dom';
|
|
2
|
+
import type { Placement, Strategy } from '@floating-ui/dom';
|
|
3
3
|
/**
|
|
4
4
|
* @slot default - Content to be placed as the trigger.
|
|
5
5
|
* @slot content - Content to be placed within the popover. Use for custom html, will render under the message.
|
|
@@ -28,9 +28,18 @@ export declare class NvTooltip {
|
|
|
28
28
|
/**
|
|
29
29
|
* Controls how long (in milliseconds) the tooltip waits to show after you
|
|
30
30
|
* hover over or focus on an element. If you move away before the delay is up,
|
|
31
|
-
* the tooltip won
|
|
31
|
+
* the tooltip won't appear.
|
|
32
32
|
*/
|
|
33
33
|
readonly enterDelay: number;
|
|
34
|
+
/**
|
|
35
|
+
* Sets the positioning strategy for the tooltip. Options include:
|
|
36
|
+
* - `absolute`: Positions the tooltip relative to the trigger element
|
|
37
|
+
* (default).
|
|
38
|
+
* - `fixed`: Positions the tooltip relative to the viewport, useful when you
|
|
39
|
+
* need the tooltip to break out of overflow hidden containers, it will not
|
|
40
|
+
* scroll inside a scroll container due to the fixed positioning.
|
|
41
|
+
*/
|
|
42
|
+
readonly strategy: Strategy;
|
|
34
43
|
/****************************************************************************/
|
|
35
44
|
/**
|
|
36
45
|
* Emitted when the tooltip is opened or closed. Bubbles up from the popover
|
|
@@ -9,13 +9,13 @@ import { ButtonEmphasis, ButtonSize, ButtonType, DeprecatedSemanticColors, Feedb
|
|
|
9
9
|
import { Column } from "./interfaces/Column";
|
|
10
10
|
import { Element } from "./stencil-public-runtime";
|
|
11
11
|
import { IconName } from "./components/nv-icon/nv-icons";
|
|
12
|
-
import { Placement } from "@floating-ui/dom";
|
|
12
|
+
import { Placement, Strategy } from "@floating-ui/dom";
|
|
13
13
|
import { ColumnConfig } from "./interfaces/ColumnConfig";
|
|
14
14
|
export { ButtonEmphasis, ButtonSize, ButtonType, DeprecatedSemanticColors, FeedbackColors, GlobalFilterPosition, IconButtonShape, LabelPlacement, LoaderColors, SemanticSizes, TextInputAutocomplete, ToggleButtonEmphasis, ToggleButtonSize } from "./utils/constants";
|
|
15
15
|
export { Column } from "./interfaces/Column";
|
|
16
16
|
export { Element } from "./stencil-public-runtime";
|
|
17
17
|
export { IconName } from "./components/nv-icon/nv-icons";
|
|
18
|
-
export { Placement } from "@floating-ui/dom";
|
|
18
|
+
export { Placement, Strategy } from "@floating-ui/dom";
|
|
19
19
|
export { ColumnConfig } from "./interfaces/ColumnConfig";
|
|
20
20
|
export namespace Components {
|
|
21
21
|
interface NvAccordion {
|
|
@@ -2573,6 +2573,10 @@ export namespace Components {
|
|
|
2573
2573
|
* Call this method to show the popover, making it visible on the screen.
|
|
2574
2574
|
*/
|
|
2575
2575
|
"show": () => Promise<void>;
|
|
2576
|
+
/**
|
|
2577
|
+
* Sets the positioning strategy for the popover. Options include: - `absolute`: Positions the popover relative to the trigger element (default). - `fixed`: Positions the popover relative to the viewport, useful when you need the popover to break out of overflow hidden containers, it will not scroll inside a scroll container due to the fixed positioning.
|
|
2578
|
+
*/
|
|
2579
|
+
"strategy": Strategy;
|
|
2576
2580
|
/**
|
|
2577
2581
|
* Call this method to toggle between showing and hiding the popover, based on its current state.
|
|
2578
2582
|
*/
|
|
@@ -2787,7 +2791,7 @@ export namespace Components {
|
|
|
2787
2791
|
}
|
|
2788
2792
|
interface NvTooltip {
|
|
2789
2793
|
/**
|
|
2790
|
-
* Controls how long (in milliseconds) the tooltip waits to show after you hover over or focus on an element. If you move away before the delay is up, the tooltip won
|
|
2794
|
+
* Controls how long (in milliseconds) the tooltip waits to show after you hover over or focus on an element. If you move away before the delay is up, the tooltip won't appear.
|
|
2791
2795
|
*/
|
|
2792
2796
|
"enterDelay": number;
|
|
2793
2797
|
/**
|
|
@@ -2802,6 +2806,10 @@ export namespace Components {
|
|
|
2802
2806
|
* Decides where the tooltip shows up next to the element it’s linked to (above, below, to the sides). If there isn’t enough room, it will adjust it's position on the axis to fit on the screen, so users can always see it.
|
|
2803
2807
|
*/
|
|
2804
2808
|
"placement": Placement;
|
|
2809
|
+
/**
|
|
2810
|
+
* Sets the positioning strategy for the tooltip. Options include: - `absolute`: Positions the tooltip relative to the trigger element (default). - `fixed`: Positions the tooltip relative to the viewport, useful when you need the tooltip to break out of overflow hidden containers, it will not scroll inside a scroll container due to the fixed positioning.
|
|
2811
|
+
*/
|
|
2812
|
+
"strategy": Strategy;
|
|
2805
2813
|
"triggerElement": Element;
|
|
2806
2814
|
}
|
|
2807
2815
|
}
|
|
@@ -6424,6 +6432,10 @@ declare namespace LocalJSX {
|
|
|
6424
6432
|
* @deprecated use camelCase instead. Support for dash-casing will be removed in Stencil v5.
|
|
6425
6433
|
*/
|
|
6426
6434
|
"shift-padding"?: number;
|
|
6435
|
+
/**
|
|
6436
|
+
* Sets the positioning strategy for the popover. Options include: - `absolute`: Positions the popover relative to the trigger element (default). - `fixed`: Positions the popover relative to the viewport, useful when you need the popover to break out of overflow hidden containers, it will not scroll inside a scroll container due to the fixed positioning.
|
|
6437
|
+
*/
|
|
6438
|
+
"strategy"?: Strategy;
|
|
6427
6439
|
/**
|
|
6428
6440
|
* Sets the interaction mode for triggering the popover. Options include: - `hover`: The popover is shown on trigger hover. - `click`: The popover toggles on trigger click. - `controlled`: The visibility is managed manually through methods or the open prop.
|
|
6429
6441
|
*/
|
|
@@ -6666,7 +6678,7 @@ declare namespace LocalJSX {
|
|
|
6666
6678
|
}
|
|
6667
6679
|
interface NvTooltip {
|
|
6668
6680
|
/**
|
|
6669
|
-
* Controls how long (in milliseconds) the tooltip waits to show after you hover over or focus on an element. If you move away before the delay is up, the tooltip won
|
|
6681
|
+
* Controls how long (in milliseconds) the tooltip waits to show after you hover over or focus on an element. If you move away before the delay is up, the tooltip won't appear.
|
|
6670
6682
|
*/
|
|
6671
6683
|
"enterDelay"?: number;
|
|
6672
6684
|
/**
|
|
@@ -6685,6 +6697,10 @@ declare namespace LocalJSX {
|
|
|
6685
6697
|
* Decides where the tooltip shows up next to the element it’s linked to (above, below, to the sides). If there isn’t enough room, it will adjust it's position on the axis to fit on the screen, so users can always see it.
|
|
6686
6698
|
*/
|
|
6687
6699
|
"placement"?: Placement;
|
|
6700
|
+
/**
|
|
6701
|
+
* Sets the positioning strategy for the tooltip. Options include: - `absolute`: Positions the tooltip relative to the trigger element (default). - `fixed`: Positions the tooltip relative to the viewport, useful when you need the tooltip to break out of overflow hidden containers, it will not scroll inside a scroll container due to the fixed positioning.
|
|
6702
|
+
*/
|
|
6703
|
+
"strategy"?: Strategy;
|
|
6688
6704
|
}
|
|
6689
6705
|
interface IntrinsicElements {
|
|
6690
6706
|
"nv-accordion": NvAccordion;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
8
8
|
* to consume components of this package as outlined in the `README.md`.
|
|
9
9
|
*/
|
|
10
|
-
export *
|
|
10
|
+
export * from './utils/constants';
|
|
11
11
|
export * as classUtils from './utils/class.utils';
|
|
12
12
|
export * as eventUtils from './utils/events.utils';
|
|
13
13
|
export * as stringUtils from './utils/string.utils';
|
package/dist/vscode-data.json
CHANGED
|
@@ -3166,6 +3166,9 @@
|
|
|
3166
3166
|
{
|
|
3167
3167
|
"name": "alert-circle"
|
|
3168
3168
|
},
|
|
3169
|
+
{
|
|
3170
|
+
"name": "alert-triangle"
|
|
3171
|
+
},
|
|
3169
3172
|
{
|
|
3170
3173
|
"name": "align-center"
|
|
3171
3174
|
},
|
|
@@ -3541,6 +3544,9 @@
|
|
|
3541
3544
|
{
|
|
3542
3545
|
"name": "contract"
|
|
3543
3546
|
},
|
|
3547
|
+
{
|
|
3548
|
+
"name": "cookie"
|
|
3549
|
+
},
|
|
3544
3550
|
{
|
|
3545
3551
|
"name": "copy"
|
|
3546
3552
|
},
|
|
@@ -3661,6 +3667,9 @@
|
|
|
3661
3667
|
{
|
|
3662
3668
|
"name": "edit"
|
|
3663
3669
|
},
|
|
3670
|
+
{
|
|
3671
|
+
"name": "empty"
|
|
3672
|
+
},
|
|
3664
3673
|
{
|
|
3665
3674
|
"name": "engine"
|
|
3666
3675
|
},
|
|
@@ -4342,18 +4351,6 @@
|
|
|
4342
4351
|
{
|
|
4343
4352
|
"name": "shopping-cart"
|
|
4344
4353
|
},
|
|
4345
|
-
{
|
|
4346
|
-
"name": "sizemd"
|
|
4347
|
-
},
|
|
4348
|
-
{
|
|
4349
|
-
"name": "sizesm"
|
|
4350
|
-
},
|
|
4351
|
-
{
|
|
4352
|
-
"name": "sizexl"
|
|
4353
|
-
},
|
|
4354
|
-
{
|
|
4355
|
-
"name": "sizexs"
|
|
4356
|
-
},
|
|
4357
4354
|
{
|
|
4358
4355
|
"name": "slash"
|
|
4359
4356
|
},
|
|
@@ -4498,9 +4495,15 @@
|
|
|
4498
4495
|
{
|
|
4499
4496
|
"name": "user-circle"
|
|
4500
4497
|
},
|
|
4498
|
+
{
|
|
4499
|
+
"name": "user-exclamation"
|
|
4500
|
+
},
|
|
4501
4501
|
{
|
|
4502
4502
|
"name": "user-minus"
|
|
4503
4503
|
},
|
|
4504
|
+
{
|
|
4505
|
+
"name": "user-off"
|
|
4506
|
+
},
|
|
4504
4507
|
{
|
|
4505
4508
|
"name": "user-plus"
|
|
4506
4509
|
},
|
|
@@ -4575,9 +4578,6 @@
|
|
|
4575
4578
|
},
|
|
4576
4579
|
{
|
|
4577
4580
|
"name": "x"
|
|
4578
|
-
},
|
|
4579
|
-
{
|
|
4580
|
-
"name": "zoom-reset"
|
|
4581
4581
|
}
|
|
4582
4582
|
]
|
|
4583
4583
|
},
|
|
@@ -4676,6 +4676,18 @@
|
|
|
4676
4676
|
"name": "shift-padding",
|
|
4677
4677
|
"description": "Sets how many pixels the popover should stay from the edge of the viewport."
|
|
4678
4678
|
},
|
|
4679
|
+
{
|
|
4680
|
+
"name": "strategy",
|
|
4681
|
+
"description": "Sets the positioning strategy for the popover. Options include:\n- `absolute`: Positions the popover relative to the trigger element\n (default).\n- `fixed`: Positions the popover relative to the viewport, useful when you\n need the popover to break out of overflow hidden containers, it will not\n scroll inside a scroll container due to the fixed positioning.",
|
|
4682
|
+
"values": [
|
|
4683
|
+
{
|
|
4684
|
+
"name": "absolute"
|
|
4685
|
+
},
|
|
4686
|
+
{
|
|
4687
|
+
"name": "fixed"
|
|
4688
|
+
}
|
|
4689
|
+
]
|
|
4690
|
+
},
|
|
4679
4691
|
{
|
|
4680
4692
|
"name": "trigger-mode",
|
|
4681
4693
|
"description": "Sets the interaction mode for triggering the popover. Options include:\n- `hover`: The popover is shown on trigger hover.\n- `click`: The popover toggles on trigger click.\n- `controlled`: The visibility is managed manually through methods or the\n open prop.",
|
|
@@ -4940,7 +4952,7 @@
|
|
|
4940
4952
|
"attributes": [
|
|
4941
4953
|
{
|
|
4942
4954
|
"name": "enter-delay",
|
|
4943
|
-
"description": "Controls how long (in milliseconds) the tooltip waits to show after you\nhover over or focus on an element. If you move away before the delay is up,\nthe tooltip won
|
|
4955
|
+
"description": "Controls how long (in milliseconds) the tooltip waits to show after you\nhover over or focus on an element. If you move away before the delay is up,\nthe tooltip won't appear."
|
|
4944
4956
|
},
|
|
4945
4957
|
{
|
|
4946
4958
|
"name": "message",
|
|
@@ -4987,6 +4999,18 @@
|
|
|
4987
4999
|
"name": "top-start"
|
|
4988
5000
|
}
|
|
4989
5001
|
]
|
|
5002
|
+
},
|
|
5003
|
+
{
|
|
5004
|
+
"name": "strategy",
|
|
5005
|
+
"description": "Sets the positioning strategy for the tooltip. Options include:\n- `absolute`: Positions the tooltip relative to the trigger element\n (default).\n- `fixed`: Positions the tooltip relative to the viewport, useful when you\n need the tooltip to break out of overflow hidden containers, it will not\n scroll inside a scroll container due to the fixed positioning.",
|
|
5006
|
+
"values": [
|
|
5007
|
+
{
|
|
5008
|
+
"name": "absolute"
|
|
5009
|
+
},
|
|
5010
|
+
{
|
|
5011
|
+
"name": "fixed"
|
|
5012
|
+
}
|
|
5013
|
+
]
|
|
4990
5014
|
}
|
|
4991
5015
|
]
|
|
4992
5016
|
}
|