@nova-design-system/nova-react 3.0.0-beta.42 → 3.0.0-beta.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-BZCQTWfv.js +26372 -0
- package/dist/cjs/index-B_VOAJzk.js +26373 -0
- package/dist/cjs/index-CDe7nrrW.js +26373 -0
- package/dist/cjs/index-CEWbQ5nh.js +26373 -0
- package/dist/cjs/index-CIcUUomJ.js +26373 -0
- package/dist/cjs/index-CtI3SivD.js +26373 -0
- package/dist/cjs/index-wDACGzKb.js +26373 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/nv-alert.entry-B-P-Fgdo.js +173 -0
- package/dist/cjs/nv-alert.entry-B3NpZh1C.js +173 -0
- package/dist/cjs/nv-alert.entry-BU86GY-d.js +173 -0
- package/dist/cjs/nv-alert.entry-CwZcD170.js +173 -0
- package/dist/cjs/nv-alert.entry-CxSN1zpW.js +173 -0
- package/dist/cjs/nv-alert.entry-DsoqN5tQ.js +173 -0
- package/dist/cjs/nv-alert.entry-xuY-Lvuj.js +173 -0
- package/dist/cjs/nv-avatar.entry-CFgnor0-.js +67 -0
- package/dist/cjs/nv-avatar.entry-DJkpupVT.js +67 -0
- package/dist/cjs/nv-avatar.entry-DKXMQPOz.js +67 -0
- package/dist/cjs/nv-avatar.entry-DWOADxdQ.js +67 -0
- package/dist/cjs/nv-avatar.entry-DjyiGt07.js +67 -0
- package/dist/cjs/nv-avatar.entry-DuN1d3Vy.js +67 -0
- package/dist/cjs/nv-avatar.entry-yyLQEqI7.js +67 -0
- package/dist/cjs/nv-badge_2.entry-BFURAuBQ.js +195 -0
- package/dist/cjs/nv-badge_2.entry-BQXL0ZhP.js +195 -0
- package/dist/cjs/nv-badge_2.entry-CJQWS2xG.js +195 -0
- package/dist/cjs/nv-badge_2.entry-D0jeqYIQ.js +195 -0
- package/dist/cjs/nv-badge_2.entry-DKGHx4c8.js +194 -0
- package/dist/cjs/nv-badge_2.entry-Drgx-565.js +195 -0
- package/dist/cjs/nv-badge_2.entry-im1VnU5f.js +195 -0
- package/dist/cjs/nv-base.entry-9HF044Di.js +71 -0
- package/dist/cjs/nv-base.entry-BmY-1Lne.js +71 -0
- package/dist/cjs/nv-base.entry-BuxI7QmU.js +71 -0
- package/dist/cjs/nv-base.entry-CcaAXjnO.js +71 -0
- package/dist/cjs/nv-base.entry-Ch8ncPl0.js +71 -0
- package/dist/cjs/nv-base.entry-D7gUvPIG.js +71 -0
- package/dist/cjs/nv-base.entry-c723sI4Y.js +71 -0
- package/dist/cjs/nv-breadcrumb.entry-B9rOxsg_.js +45 -0
- package/dist/cjs/nv-breadcrumb.entry-BtM_AHRC.js +45 -0
- package/dist/cjs/nv-breadcrumb.entry-C-xHbSJw.js +45 -0
- package/dist/cjs/nv-breadcrumb.entry-CL9l0Wkr.js +45 -0
- package/dist/cjs/nv-breadcrumb.entry-CxGReUqZ.js +45 -0
- package/dist/cjs/nv-breadcrumb.entry-LYt0sALP.js +45 -0
- package/dist/cjs/nv-breadcrumb.entry-wy-P2BMg.js +45 -0
- package/dist/cjs/nv-breadcrumbs.entry-9LlUycIv.js +20 -0
- package/dist/cjs/nv-breadcrumbs.entry-B7CaTbBe.js +20 -0
- package/dist/cjs/nv-breadcrumbs.entry-BA-TnreZ.js +20 -0
- package/dist/cjs/nv-breadcrumbs.entry-CEmZ3yFi.js +20 -0
- package/dist/cjs/nv-breadcrumbs.entry-De5lsjQf.js +20 -0
- package/dist/cjs/nv-breadcrumbs.entry-_w38BddR.js +20 -0
- package/dist/cjs/nv-breadcrumbs.entry-ubxLcEUH.js +20 -0
- package/dist/cjs/nv-button.entry-B3rEQuGV.js +162 -0
- package/dist/cjs/nv-button.entry-B5-Wf9hh.js +162 -0
- package/dist/cjs/nv-button.entry-CBNfIn-r.js +162 -0
- package/dist/cjs/nv-button.entry-D-DPQDNM.js +162 -0
- package/dist/cjs/nv-button.entry-DHZX7KH4.js +162 -0
- package/dist/cjs/nv-button.entry-DLoECCSK.js +162 -0
- package/dist/cjs/nv-button.entry-Dk6DqHG2.js +162 -0
- package/dist/cjs/nv-calendar.entry-BeCCaAVE.js +1036 -0
- package/dist/cjs/nv-calendar.entry-DNyH8T5e.js +1036 -0
- package/dist/cjs/nv-calendar.entry-DSWhDnEC.js +1036 -0
- package/dist/cjs/nv-calendar.entry-DUHckAh3.js +1036 -0
- package/dist/cjs/nv-calendar.entry-NU1TumeS.js +1036 -0
- package/dist/cjs/nv-calendar.entry-UUE6v4YC.js +1036 -0
- package/dist/cjs/nv-calendar.entry-ZtfR2qOV.js +1036 -0
- package/dist/cjs/nv-col.entry-B5nCHhbO.js +37 -0
- package/dist/cjs/nv-col.entry-Bx1VZSMw.js +37 -0
- package/dist/cjs/nv-col.entry-C400BeEE.js +37 -0
- package/dist/cjs/nv-col.entry-CYjFAVMF.js +37 -0
- package/dist/cjs/nv-col.entry-DDEtfCv-.js +37 -0
- package/dist/cjs/nv-col.entry-DqzImLSJ.js +37 -0
- package/dist/cjs/nv-col.entry-DtYBQEJz.js +37 -0
- package/dist/cjs/nv-datagrid.entry-5VIvkJGL.js +3671 -0
- package/dist/cjs/nv-datagrid.entry-Ba9sfMQp.js +3671 -0
- package/dist/cjs/nv-datagrid.entry-Beehe_Sq.js +3671 -0
- package/dist/cjs/nv-datagrid.entry-CkD_jV75.js +3671 -0
- package/dist/cjs/nv-datagrid.entry-D6p67Pa6.js +3671 -0
- package/dist/cjs/nv-datagrid.entry-DKqScS8N.js +3671 -0
- package/dist/cjs/nv-datagrid.entry-ee865R4b.js +3671 -0
- package/dist/cjs/nv-datagridcolumn.entry-BeGXaBUe.js +18 -0
- package/dist/cjs/nv-datagridcolumn.entry-BodICzof.js +18 -0
- package/dist/cjs/nv-datagridcolumn.entry-C_FtSltZ.js +18 -0
- package/dist/cjs/nv-datagridcolumn.entry-D1cyTR_G.js +18 -0
- package/dist/cjs/nv-datagridcolumn.entry-DRE7BDkk.js +18 -0
- package/dist/cjs/nv-datagridcolumn.entry-Du6-7fjr.js +18 -0
- package/dist/cjs/nv-datagridcolumn.entry-N70Aen6Q.js +18 -0
- package/dist/cjs/nv-dialog.entry-BgHknrOx.js +784 -0
- package/dist/cjs/nv-dialog.entry-C1hg-EG1.js +784 -0
- package/dist/cjs/nv-dialog.entry-COv2do_O.js +784 -0
- package/dist/cjs/nv-dialog.entry-Ck2hU43g.js +784 -0
- package/dist/cjs/nv-dialog.entry-Cl8iLrCo.js +784 -0
- package/dist/cjs/nv-dialog.entry-Cy71tlWz.js +784 -0
- package/dist/cjs/nv-dialog.entry-DdAHZGzm.js +784 -0
- package/dist/cjs/nv-dialogfooter_2.entry-CXvA0O-2.js +134 -0
- package/dist/cjs/nv-dialogfooter_2.entry-Ck6adFfd.js +134 -0
- package/dist/cjs/nv-dialogfooter_2.entry-DHa0SYhR.js +134 -0
- package/dist/cjs/nv-dialogfooter_2.entry-DKvzkpt3.js +134 -0
- package/dist/cjs/nv-dialogfooter_2.entry-D_VuofBe.js +134 -0
- package/dist/cjs/nv-dialogfooter_2.entry-L5tHIb_T.js +134 -0
- package/dist/cjs/nv-dialogfooter_2.entry-kEa1K0n5.js +134 -0
- package/dist/cjs/nv-fieldcheckbox.entry-B4We4zG2.js +137 -0
- package/dist/cjs/nv-fieldcheckbox.entry-BmYyNV4r.js +137 -0
- package/dist/cjs/nv-fieldcheckbox.entry-CBsQsbIA.js +137 -0
- package/dist/cjs/nv-fieldcheckbox.entry-DTIebeJR.js +137 -0
- package/dist/cjs/nv-fieldcheckbox.entry-P--9IAJF.js +137 -0
- package/dist/cjs/nv-fieldcheckbox.entry-dBYg7CBU.js +137 -0
- package/dist/cjs/nv-fieldcheckbox.entry-dxhUZiEg.js +137 -0
- package/dist/cjs/nv-fielddate.entry-B53E-JaI.js +278 -0
- package/dist/cjs/nv-fielddate.entry-Bofdd2rE.js +278 -0
- package/dist/cjs/nv-fielddate.entry-CIo_61Dc.js +278 -0
- package/dist/cjs/nv-fielddate.entry-CekIFTA0.js +278 -0
- package/dist/cjs/nv-fielddate.entry-DgS0X1wI.js +278 -0
- package/dist/cjs/nv-fielddate.entry-Do69eqHA.js +278 -0
- package/dist/cjs/nv-fielddate.entry-NJ6RAqlG.js +278 -0
- package/dist/cjs/nv-fielddaterange.entry-BtPwfRw-.js +355 -0
- package/dist/cjs/nv-fielddaterange.entry-CxaBrZAX.js +355 -0
- package/dist/cjs/nv-fielddaterange.entry-D-6LjhjB.js +355 -0
- package/dist/cjs/nv-fielddaterange.entry-D0fq5KFb.js +355 -0
- package/dist/cjs/nv-fielddaterange.entry-D2dzD3rW.js +355 -0
- package/dist/cjs/nv-fielddaterange.entry-DTLKVIqg.js +355 -0
- package/dist/cjs/nv-fielddaterange.entry-w8WXPDuX.js +355 -0
- package/dist/cjs/nv-fielddropdown.entry-BAaPyGtB.js +361 -0
- package/dist/cjs/nv-fielddropdown.entry-C5kMWmPP.js +361 -0
- package/dist/cjs/nv-fielddropdown.entry-CX2Ycn2i.js +361 -0
- package/dist/cjs/nv-fielddropdown.entry-CZxQlRNa.js +361 -0
- package/dist/cjs/nv-fielddropdown.entry-DVl_Uy5A.js +361 -0
- package/dist/cjs/nv-fielddropdown.entry-akfp1Bcy.js +361 -0
- package/dist/cjs/nv-fielddropdown.entry-hHh_RDC4.js +361 -0
- package/dist/cjs/nv-fielddropdownitem.entry-BscNyhXz.js +68 -0
- package/dist/cjs/nv-fielddropdownitem.entry-CMWgXP_Z.js +68 -0
- package/dist/cjs/nv-fielddropdownitem.entry-CS1Ejbc9.js +68 -0
- package/dist/cjs/nv-fielddropdownitem.entry-CW4WMmSZ.js +68 -0
- package/dist/cjs/nv-fielddropdownitem.entry-CuQqsz4f.js +68 -0
- package/dist/cjs/nv-fielddropdownitem.entry-Dn2HJc1t.js +68 -0
- package/dist/cjs/nv-fielddropdownitem.entry-HK2I5pUG.js +68 -0
- package/dist/cjs/nv-fieldmultiselect.entry-5jdK36m6.js +1060 -0
- package/dist/cjs/nv-fieldmultiselect.entry-6o1yhNI5.js +1060 -0
- package/dist/cjs/nv-fieldmultiselect.entry-BGzYCJuF.js +1060 -0
- package/dist/cjs/nv-fieldmultiselect.entry-BN1ObPi8.js +1060 -0
- package/dist/cjs/nv-fieldmultiselect.entry-CuVEYN0v.js +1060 -0
- package/dist/cjs/nv-fieldmultiselect.entry-DHXJErt4.js +1060 -0
- package/dist/cjs/nv-fieldmultiselect.entry-DycRd14V.js +1060 -0
- package/dist/cjs/nv-fieldnumber.entry-BHhIsjLK.js +126 -0
- package/dist/cjs/nv-fieldnumber.entry-BklKxOFA.js +126 -0
- package/dist/cjs/nv-fieldnumber.entry-C8zJkL24.js +126 -0
- package/dist/cjs/nv-fieldnumber.entry-C9rKWY_M.js +126 -0
- package/dist/cjs/nv-fieldnumber.entry-CEmPQK-3.js +126 -0
- package/dist/cjs/nv-fieldnumber.entry-CLhjFlCj.js +126 -0
- package/dist/cjs/nv-fieldnumber.entry-_UiieYov.js +126 -0
- package/dist/cjs/nv-fieldpassword.entry-7lS0Msfg.js +115 -0
- package/dist/cjs/nv-fieldpassword.entry-B9-QFEsB.js +115 -0
- package/dist/cjs/nv-fieldpassword.entry-BIIoIKH4.js +115 -0
- package/dist/cjs/nv-fieldpassword.entry-BPhQxjsj.js +115 -0
- package/dist/cjs/nv-fieldpassword.entry-C5vG4jlh.js +115 -0
- package/dist/cjs/nv-fieldpassword.entry-C_jsHFJI.js +115 -0
- package/dist/cjs/nv-fieldpassword.entry-DZkGQwM8.js +115 -0
- package/dist/cjs/nv-fieldradio.entry-BgpmbG9E.js +102 -0
- package/dist/cjs/nv-fieldradio.entry-CXR4k3wf.js +102 -0
- package/dist/cjs/nv-fieldradio.entry-CnasQlEx.js +102 -0
- package/dist/cjs/nv-fieldradio.entry-DUDPigQb.js +102 -0
- package/dist/cjs/nv-fieldradio.entry-DiD7Luxv.js +102 -0
- package/dist/cjs/nv-fieldradio.entry-Ili2RVKl.js +102 -0
- package/dist/cjs/nv-fieldradio.entry-aRAaLwpK.js +102 -0
- package/dist/cjs/nv-fieldselect.entry-B94QXSEk.js +365 -0
- package/dist/cjs/nv-fieldselect.entry-BwtEjL08.js +365 -0
- package/dist/cjs/nv-fieldselect.entry-CFDqeR-D.js +365 -0
- package/dist/cjs/nv-fieldselect.entry-CJSu63o5.js +365 -0
- package/dist/cjs/nv-fieldselect.entry-CmN1R9ij.js +365 -0
- package/dist/cjs/nv-fieldselect.entry-CoDfr4ie.js +365 -0
- package/dist/cjs/nv-fieldselect.entry-DgmnHnOR.js +365 -0
- package/dist/cjs/nv-fieldtext.entry-B1TlZWjU.js +119 -0
- package/dist/cjs/nv-fieldtext.entry-BfQrX8ft.js +119 -0
- package/dist/cjs/nv-fieldtext.entry-BrUQu4OD.js +119 -0
- package/dist/cjs/nv-fieldtext.entry-CW6P-R-Q.js +119 -0
- package/dist/cjs/nv-fieldtext.entry-CyLJxDw6.js +119 -0
- package/dist/cjs/nv-fieldtext.entry-DDqDSJp3.js +119 -0
- package/dist/cjs/nv-fieldtext.entry-IeIHa3jf.js +119 -0
- package/dist/cjs/nv-fieldtextarea.entry-D86SKGIN.js +194 -0
- package/dist/cjs/nv-fieldtextarea.entry-DlFdCv_d.js +194 -0
- package/dist/cjs/nv-fieldtextarea.entry-DqzeITCG.js +194 -0
- package/dist/cjs/nv-fieldtextarea.entry-TI-bucN-.js +194 -0
- package/dist/cjs/nv-fieldtextarea.entry-qMX2O8cX.js +194 -0
- package/dist/cjs/nv-fieldtextarea.entry-tTnWQgE4.js +194 -0
- package/dist/cjs/nv-fieldtextarea.entry-v6VpnEuH.js +194 -0
- package/dist/cjs/nv-fieldtime.entry-CPyLyQfR.js +1011 -0
- package/dist/cjs/nv-fieldtime.entry-CYmcHY1D.js +1011 -0
- package/dist/cjs/nv-fieldtime.entry-DGP1X4wF.js +1011 -0
- package/dist/cjs/nv-fieldtime.entry-DLSuRrlr.js +1011 -0
- package/dist/cjs/nv-fieldtime.entry-Zbjbmm7_.js +1011 -0
- package/dist/cjs/nv-fieldtime.entry-eDVRT6te.js +1011 -0
- package/dist/cjs/nv-fieldtime.entry-j-Fliiqj.js +1011 -0
- package/dist/cjs/nv-icon.entry-B0Y3rgBQ.js +79 -0
- package/dist/cjs/nv-icon.entry-B_wtREWb.js +79 -0
- package/dist/cjs/nv-icon.entry-BfRAl2b6.js +79 -0
- package/dist/cjs/nv-icon.entry-CrKTCqY_.js +79 -0
- package/dist/cjs/nv-icon.entry-DRRmcXzh.js +79 -0
- package/dist/cjs/nv-icon.entry-Dlj1ko2i.js +79 -0
- package/dist/cjs/nv-icon.entry-S7WlK_lO.js +79 -0
- package/dist/cjs/nv-iconbutton_2.entry-B02iDUid.js +163 -0
- package/dist/cjs/nv-iconbutton_2.entry-C1Legk9t.js +163 -0
- package/dist/cjs/nv-iconbutton_2.entry-CUiW6MtK.js +163 -0
- package/dist/cjs/nv-iconbutton_2.entry-ClcvupMe.js +163 -0
- package/dist/cjs/nv-iconbutton_2.entry-D8MI5uzP.js +163 -0
- package/dist/cjs/nv-iconbutton_2.entry-D8hZ51H-.js +163 -0
- package/dist/cjs/nv-iconbutton_2.entry-QwaiOoYl.js +163 -0
- package/dist/cjs/nv-menu.entry-BfmYkdYY.js +227 -0
- package/dist/cjs/nv-menu.entry-CT98WIRF.js +227 -0
- package/dist/cjs/nv-menu.entry-CfERF478.js +227 -0
- package/dist/cjs/nv-menu.entry-Ci3I7PDt.js +227 -0
- package/dist/cjs/nv-menu.entry-DtLnsQW-.js +227 -0
- package/dist/cjs/nv-menu.entry-Kz5kGi2w.js +227 -0
- package/dist/cjs/nv-menu.entry-XdjjbAL6.js +227 -0
- package/dist/cjs/nv-menuitem.entry-C8nXPwP0.js +58 -0
- package/dist/cjs/nv-menuitem.entry-C9dsQqqN.js +58 -0
- package/dist/cjs/nv-menuitem.entry-Cedg0TCQ.js +58 -0
- package/dist/cjs/nv-menuitem.entry-CxCLeNsY.js +58 -0
- package/dist/cjs/nv-menuitem.entry-DkIG5z-x.js +58 -0
- package/dist/cjs/nv-menuitem.entry-bPnSDq_9.js +58 -0
- package/dist/cjs/nv-menuitem.entry-sRx1fD0O.js +58 -0
- package/dist/cjs/nv-popover.entry-BGXEOQM6.js +1960 -0
- package/dist/cjs/nv-popover.entry-C57rfYUn.js +1960 -0
- package/dist/cjs/nv-popover.entry-C6HFJJ-m.js +1960 -0
- package/dist/cjs/nv-popover.entry-CiGCCbn9.js +1960 -0
- package/dist/cjs/nv-popover.entry-CjTPZYkq.js +1960 -0
- package/dist/cjs/nv-popover.entry-CtO6pR6l.js +1960 -0
- package/dist/cjs/nv-popover.entry-Mo3DNUH6.js +1960 -0
- package/dist/cjs/nv-row.entry-BEgyuDR-.js +21 -0
- package/dist/cjs/nv-row.entry-BM_EcSp4.js +21 -0
- package/dist/cjs/nv-row.entry-B_7PiJA7.js +21 -0
- package/dist/cjs/nv-row.entry-Ca7LiDAy.js +21 -0
- package/dist/cjs/nv-row.entry-Cy9vd2iY.js +21 -0
- package/dist/cjs/nv-row.entry-DKoNhAcX.js +21 -0
- package/dist/cjs/nv-row.entry-OYGKTXhV.js +21 -0
- package/dist/cjs/nv-stack.entry-BNyPxECg.js +30 -0
- package/dist/cjs/nv-stack.entry-C8ZFDaKn.js +30 -0
- package/dist/cjs/nv-stack.entry-CLMAAbkw.js +30 -0
- package/dist/cjs/nv-stack.entry-DfRRFeEo.js +30 -0
- package/dist/cjs/nv-stack.entry-DiXvhuSS.js +30 -0
- package/dist/cjs/nv-stack.entry-lwhqS230.js +30 -0
- package/dist/cjs/nv-stack.entry-u3NjC31-.js +30 -0
- package/dist/cjs/nv-table.entry-BNy2ALll.js +338 -0
- package/dist/cjs/nv-table.entry-BPazUUGA.js +338 -0
- package/dist/cjs/nv-table.entry-COwgRxqz.js +338 -0
- package/dist/cjs/nv-table.entry-CTo8cqCN.js +338 -0
- package/dist/cjs/nv-table.entry-DzOGLNUx.js +338 -0
- package/dist/cjs/nv-table.entry-mEtRfake.js +338 -0
- package/dist/cjs/nv-table.entry-o525Lfea.js +338 -0
- package/dist/cjs/nv-tablecolumn.entry-BESdQMDh.js +18 -0
- package/dist/cjs/nv-tablecolumn.entry-CuEt5Wgn.js +18 -0
- package/dist/cjs/nv-tablecolumn.entry-D3I1dB1X.js +18 -0
- package/dist/cjs/nv-tablecolumn.entry-DvJF_QTE.js +18 -0
- package/dist/cjs/nv-tablecolumn.entry-DvO0JxdY.js +18 -0
- package/dist/cjs/nv-tablecolumn.entry-L4KLlHFu.js +18 -0
- package/dist/cjs/nv-tablecolumn.entry-vrmt1Y0L.js +18 -0
- package/dist/cjs/nv-toggle.entry-BIclNIeq.js +79 -0
- package/dist/cjs/nv-toggle.entry-Bv0DrF-x.js +79 -0
- package/dist/cjs/nv-toggle.entry-BxKZDHdI.js +79 -0
- package/dist/cjs/nv-toggle.entry-DYhnFucd.js +79 -0
- package/dist/cjs/nv-toggle.entry-PRWy57Ro.js +79 -0
- package/dist/cjs/nv-toggle.entry-fDIAyeVX.js +79 -0
- package/dist/cjs/nv-toggle.entry-yqg7e7Qc.js +79 -0
- package/dist/cjs/nv-tooltip.entry--TVfBopp.js +44 -0
- package/dist/cjs/nv-tooltip.entry-58RCazbO.js +44 -0
- package/dist/cjs/nv-tooltip.entry-BBJNnZmj.js +44 -0
- package/dist/cjs/nv-tooltip.entry-Bnu7xEl6.js +44 -0
- package/dist/cjs/nv-tooltip.entry-BrrSQyMx.js +44 -0
- package/dist/cjs/nv-tooltip.entry-BuSwME_F.js +44 -0
- package/dist/cjs/nv-tooltip.entry-ChQpdQn_.js +44 -0
- package/dist/generated/components.js +2 -2
- package/dist/types/generated/components.d.ts +2 -4
- package/package.json +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-wDACGzKb.js');
|
|
4
|
+
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
|
+
require('react');
|
|
6
|
+
|
|
7
|
+
const nvFieldnumberCss = "nv-fieldnumber {\n --nv-field-border-default: var(--components-form-field-border-default);\n --nv-field-border-hover: var(--components-form-field-border-hover);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--components-form-field-border-default);\n --nv-field-border-readonly: var(--components-form-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-brand);\n --nv-field-background: var(--components-form-field-background-default);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--form-gap-y);\n box-sizing: border-box;\n}\nnv-fieldnumber[readonly]:not([readonly=false]) {\n --nv-field-border-default: var(--components-form-field-border-readonly);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-background: var(--components-form-field-background-readonly);\n}\nnv-fieldnumber[error]:not([error=false]) {\n --nv-field-border-default: var(--components-form-field-border-error);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-destructive);\n}\nnv-fieldnumber[success]:not([success=false]) {\n --nv-field-border-default: var(--components-form-field-border-success);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-success);\n}\nnv-fieldnumber[required]:not([required=false]) label::after {\n content: \"*\";\n color: var(--components-form-text-required);\n font-weight: 700;\n}\nnv-fieldnumber label {\n display: flex;\n align-items: center;\n gap: var(--form-label-gap);\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-label-line-height);\n}\nnv-fieldnumber .input-wrapper {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\nnv-fieldnumber .input-wrapper .input-container {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default, 1);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n}\nnv-fieldnumber .input-wrapper .input-container:hover {\n border-color: var(--nv-field-border-hover);\n}\nnv-fieldnumber .input-wrapper .input-container:focus-within, nv-fieldnumber .input-wrapper .input-container:focus-within:hover, nv-fieldnumber .input-wrapper .input-container:focus, nv-fieldnumber .input-wrapper .input-container:focus:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:read-only) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:disabled) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n}\nnv-fieldnumber .input-wrapper .input-container input {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n padding: var(--form-field-padding-y) var(--form-field-padding-x);\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n width: 100%;\n appearance: textfield;\n}\nnv-fieldnumber .input-wrapper .input-container input:focus {\n outline: none;\n}\nnv-fieldnumber .input-wrapper .input-container input::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n}\nnv-fieldnumber .input-wrapper .input-container input::-webkit-inner-spin-button, nv-fieldnumber .input-wrapper .input-container input::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n}\nnv-fieldnumber .input-wrapper .input-container nv-icon.validation {\n color: var(--nv-field-border-default);\n margin-right: var(--form-field-gap);\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\n@container field-number-input-container (width < 150px) {\n nv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n display: none;\n }\n nv-fieldnumber .input-wrapper .input-container .stepper {\n display: none;\n }\n}\nnv-fieldnumber .description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n}\nnv-fieldnumber .error-description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n color: var(--components-form-text-description-error);\n}";
|
|
8
|
+
const NvFieldnumberStyle0 = nvFieldnumberCss;
|
|
9
|
+
|
|
10
|
+
const NvFieldnumber = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.valueChanged = index.createEvent(this, "valueChanged");
|
|
14
|
+
//#endregion DEPRECATED
|
|
15
|
+
/****************************************************************************/
|
|
16
|
+
//#region PROPERTIES
|
|
17
|
+
/**
|
|
18
|
+
* Sets the ID for the input element and the for attribute of the associated
|
|
19
|
+
* label. If no ID is provided, a random one will be automatically generated
|
|
20
|
+
* to ensure unique identification, facilitating proper label association and
|
|
21
|
+
* accessibility.
|
|
22
|
+
*/
|
|
23
|
+
this.inputId = v4A79185f4.v4();
|
|
24
|
+
/**
|
|
25
|
+
* The disabled prop lets you turn off the input field so that users can’t
|
|
26
|
+
* type in it. When disabled, the field is grayed out and won’t respond to#
|
|
27
|
+
* clicks or touches.
|
|
28
|
+
*/
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
/**
|
|
31
|
+
* Display the input field’s content without allowing users to change it.
|
|
32
|
+
* Users can still click on it, select, and copy the text, but they won’t be
|
|
33
|
+
* able to type or delete anything.
|
|
34
|
+
*/
|
|
35
|
+
this.readonly = false;
|
|
36
|
+
/**
|
|
37
|
+
* Marks the input field as required, ensuring that the user must fill it out
|
|
38
|
+
* before submitting the form.
|
|
39
|
+
*/
|
|
40
|
+
this.required = false;
|
|
41
|
+
/**
|
|
42
|
+
* Alters the input field’s appearance to indicate an error, helping users
|
|
43
|
+
* identify fields that need correction.
|
|
44
|
+
* @validator error
|
|
45
|
+
*/
|
|
46
|
+
this.error = false;
|
|
47
|
+
/**
|
|
48
|
+
* Changes the input field’s appearance to indicate successful input or
|
|
49
|
+
* validation.
|
|
50
|
+
*/
|
|
51
|
+
this.success = false;
|
|
52
|
+
/**
|
|
53
|
+
* Define the increment value for the input field. It determines how much the
|
|
54
|
+
* value will increase or decrease when the user clicks the stepper buttons.
|
|
55
|
+
*/
|
|
56
|
+
this.step = 1;
|
|
57
|
+
/**
|
|
58
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
59
|
+
* is equivalent to setting the native autofocus attribute on an <input>
|
|
60
|
+
* element.
|
|
61
|
+
*/
|
|
62
|
+
this.autofocus = false;
|
|
63
|
+
//#endregion WATCHERS
|
|
64
|
+
/****************************************************************************/
|
|
65
|
+
//#region METHODS
|
|
66
|
+
this.handleInput = (event) => {
|
|
67
|
+
const input = event.target;
|
|
68
|
+
this.value = Number(input.value);
|
|
69
|
+
};
|
|
70
|
+
this.handleInputContainerClick = () => {
|
|
71
|
+
this.inputElement.focus();
|
|
72
|
+
};
|
|
73
|
+
this.handlePlus = () => {
|
|
74
|
+
this.inputElement.stepUp();
|
|
75
|
+
this.value = Number(this.inputElement.value);
|
|
76
|
+
};
|
|
77
|
+
this.handleMinus = () => {
|
|
78
|
+
this.inputElement.stepDown();
|
|
79
|
+
this.value = Number(this.inputElement.value);
|
|
80
|
+
};
|
|
81
|
+
// prevents text selection when clicking the buttons multiple times
|
|
82
|
+
this.preventSelection = (event) => {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
};
|
|
85
|
+
this.isMinValueReached = () => {
|
|
86
|
+
return this.min !== undefined && this.value <= this.min;
|
|
87
|
+
};
|
|
88
|
+
this.isMaxValueReached = () => {
|
|
89
|
+
return this.max !== undefined && this.value >= this.max;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//#endregion EVENTS
|
|
93
|
+
/****************************************************************************/
|
|
94
|
+
//#region WATCHERS
|
|
95
|
+
watchValueHandler(newValue) {
|
|
96
|
+
this.valueChanged.emit(newValue);
|
|
97
|
+
}
|
|
98
|
+
//#endregion METHODS
|
|
99
|
+
/****************************************************************************/
|
|
100
|
+
//#region LIFECYCLE
|
|
101
|
+
componentWillRender() {
|
|
102
|
+
if (this.message) {
|
|
103
|
+
this.description = this.message;
|
|
104
|
+
}
|
|
105
|
+
if (this.validation) {
|
|
106
|
+
this.errorDescription = this.validation;
|
|
107
|
+
this.error = true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//#endregion LIFECYCLE
|
|
111
|
+
/****************************************************************************/
|
|
112
|
+
//#region RENDER
|
|
113
|
+
render() {
|
|
114
|
+
return (index.h(index.Host, { key: '99076502efb577ad65e43827f4d4959fb1f84055' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '365821e9e3cb25367591680279f05d951f6a5fd9', htmlFor: this.inputId }, index.h("slot", { key: '92273b991f6c6bd34fe6a302dedb808d46abb71d', name: "label" }, this.label))), index.h("div", { key: 'ab849355fa1719ed40b5379a8aeee160f98ea798', class: "input-wrapper" }, index.h("slot", { key: '71e4de7753f3880756cd763a7a8955832066d0e7', name: "before-input" }), index.h("div", { key: '6da56e990c4ad0329c5d974868e9520cb5ac7a99', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: 'd09eb9350067116d5236142951f0e7ed81d9aa5c', name: "leading-input" }), index.h("input", { key: '6df1d2f3acb880000b57e5be990f6d843c7d3b2c', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: this.required, max: this.max, min: this.min, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), this.error && (index.h("nv-icon", { key: '85deaf9197825370d0bc7d81bd82cf9fd86b7a05', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '68ed66eb7a9af38f974e515d554eed6e3d28a915', name: "circle-check", class: "validation", size: "md" })), index.h("div", { key: '16b0e4b303cce4ee7df29ea411e8fee808e5ddb0', class: "stepper" }, index.h("nv-iconbutton", { key: '6dec84d7c05b467b5178177351e6fa769d2a9433', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabIndex: -1 }), index.h("nv-iconbutton", { key: '66391588b961555aa20a1974098c114aadceadd1', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabIndex: -1 }))), index.h("slot", { key: '4549e591971e83d5d14f08b56a8d5357c5d6aaf0', name: "after-input" })), (this.description ||
|
|
115
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'cef21ffaf75f976708d0c8b51f928daea26f1221', class: "description" }, index.h("slot", { key: 'be36b7c3c6a606847805dc1a50f762a80155d695', name: "description" }, this.description))), (this.errorDescription ||
|
|
116
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '91b5b8c969520bb10bccd59066ddea32d6fa58f3', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '7e0729d42390a1fc62d320841de4e016e01e2485', name: "error-description" }, this.errorDescription)))));
|
|
117
|
+
}
|
|
118
|
+
static get formAssociated() { return true; }
|
|
119
|
+
get el() { return index.getElement(this); }
|
|
120
|
+
static get watchers() { return {
|
|
121
|
+
"value": ["watchValueHandler"]
|
|
122
|
+
}; }
|
|
123
|
+
};
|
|
124
|
+
NvFieldnumber.style = NvFieldnumberStyle0;
|
|
125
|
+
|
|
126
|
+
exports.nv_fieldnumber = NvFieldnumber;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-B_VOAJzk.js');
|
|
4
|
+
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
|
+
require('react');
|
|
6
|
+
|
|
7
|
+
const nvFieldnumberCss = "nv-fieldnumber {\n --nv-field-border-default: var(--components-form-field-border-default);\n --nv-field-border-hover: var(--components-form-field-border-hover);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--components-form-field-border-default);\n --nv-field-border-readonly: var(--components-form-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-brand);\n --nv-field-background: var(--components-form-field-background-default);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--form-gap-y);\n box-sizing: border-box;\n}\nnv-fieldnumber[readonly]:not([readonly=false]) {\n --nv-field-border-default: var(--components-form-field-border-readonly);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-background: var(--components-form-field-background-readonly);\n}\nnv-fieldnumber[error]:not([error=false]) {\n --nv-field-border-default: var(--components-form-field-border-error);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-destructive);\n}\nnv-fieldnumber[success]:not([success=false]) {\n --nv-field-border-default: var(--components-form-field-border-success);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-success);\n}\nnv-fieldnumber[required]:not([required=false]) label::after {\n content: \"*\";\n color: var(--components-form-text-required);\n font-weight: 700;\n}\nnv-fieldnumber label {\n display: flex;\n align-items: center;\n gap: var(--form-label-gap);\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-label-line-height);\n}\nnv-fieldnumber .input-wrapper {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\nnv-fieldnumber .input-wrapper .input-container {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default, 1);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n}\nnv-fieldnumber .input-wrapper .input-container:hover {\n border-color: var(--nv-field-border-hover);\n}\nnv-fieldnumber .input-wrapper .input-container:focus-within, nv-fieldnumber .input-wrapper .input-container:focus-within:hover, nv-fieldnumber .input-wrapper .input-container:focus, nv-fieldnumber .input-wrapper .input-container:focus:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:read-only) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:disabled) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n}\nnv-fieldnumber .input-wrapper .input-container input {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n padding: var(--form-field-padding-y) var(--form-field-padding-x);\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n width: 100%;\n appearance: textfield;\n}\nnv-fieldnumber .input-wrapper .input-container input:focus {\n outline: none;\n}\nnv-fieldnumber .input-wrapper .input-container input::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n}\nnv-fieldnumber .input-wrapper .input-container input::-webkit-inner-spin-button, nv-fieldnumber .input-wrapper .input-container input::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n}\nnv-fieldnumber .input-wrapper .input-container nv-icon.validation {\n color: var(--nv-field-border-default);\n margin-right: var(--form-field-gap);\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\n@container field-number-input-container (width < 150px) {\n nv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n display: none;\n }\n nv-fieldnumber .input-wrapper .input-container .stepper {\n display: none;\n }\n}\nnv-fieldnumber .description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n}\nnv-fieldnumber .error-description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n color: var(--components-form-text-description-error);\n}";
|
|
8
|
+
const NvFieldnumberStyle0 = nvFieldnumberCss;
|
|
9
|
+
|
|
10
|
+
const NvFieldnumber = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.valueChanged = index.createEvent(this, "valueChanged");
|
|
14
|
+
//#endregion DEPRECATED
|
|
15
|
+
/****************************************************************************/
|
|
16
|
+
//#region PROPERTIES
|
|
17
|
+
/**
|
|
18
|
+
* Sets the ID for the input element and the for attribute of the associated
|
|
19
|
+
* label. If no ID is provided, a random one will be automatically generated
|
|
20
|
+
* to ensure unique identification, facilitating proper label association and
|
|
21
|
+
* accessibility.
|
|
22
|
+
*/
|
|
23
|
+
this.inputId = v4A79185f4.v4();
|
|
24
|
+
/**
|
|
25
|
+
* The disabled prop lets you turn off the input field so that users can’t
|
|
26
|
+
* type in it. When disabled, the field is grayed out and won’t respond to#
|
|
27
|
+
* clicks or touches.
|
|
28
|
+
*/
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
/**
|
|
31
|
+
* Display the input field’s content without allowing users to change it.
|
|
32
|
+
* Users can still click on it, select, and copy the text, but they won’t be
|
|
33
|
+
* able to type or delete anything.
|
|
34
|
+
*/
|
|
35
|
+
this.readonly = false;
|
|
36
|
+
/**
|
|
37
|
+
* Marks the input field as required, ensuring that the user must fill it out
|
|
38
|
+
* before submitting the form.
|
|
39
|
+
*/
|
|
40
|
+
this.required = false;
|
|
41
|
+
/**
|
|
42
|
+
* Alters the input field’s appearance to indicate an error, helping users
|
|
43
|
+
* identify fields that need correction.
|
|
44
|
+
* @validator error
|
|
45
|
+
*/
|
|
46
|
+
this.error = false;
|
|
47
|
+
/**
|
|
48
|
+
* Changes the input field’s appearance to indicate successful input or
|
|
49
|
+
* validation.
|
|
50
|
+
*/
|
|
51
|
+
this.success = false;
|
|
52
|
+
/**
|
|
53
|
+
* Define the increment value for the input field. It determines how much the
|
|
54
|
+
* value will increase or decrease when the user clicks the stepper buttons.
|
|
55
|
+
*/
|
|
56
|
+
this.step = 1;
|
|
57
|
+
/**
|
|
58
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
59
|
+
* is equivalent to setting the native autofocus attribute on an <input>
|
|
60
|
+
* element.
|
|
61
|
+
*/
|
|
62
|
+
this.autofocus = false;
|
|
63
|
+
//#endregion WATCHERS
|
|
64
|
+
/****************************************************************************/
|
|
65
|
+
//#region METHODS
|
|
66
|
+
this.handleInput = (event) => {
|
|
67
|
+
const input = event.target;
|
|
68
|
+
this.value = Number(input.value);
|
|
69
|
+
};
|
|
70
|
+
this.handleInputContainerClick = () => {
|
|
71
|
+
this.inputElement.focus();
|
|
72
|
+
};
|
|
73
|
+
this.handlePlus = () => {
|
|
74
|
+
this.inputElement.stepUp();
|
|
75
|
+
this.value = Number(this.inputElement.value);
|
|
76
|
+
};
|
|
77
|
+
this.handleMinus = () => {
|
|
78
|
+
this.inputElement.stepDown();
|
|
79
|
+
this.value = Number(this.inputElement.value);
|
|
80
|
+
};
|
|
81
|
+
// prevents text selection when clicking the buttons multiple times
|
|
82
|
+
this.preventSelection = (event) => {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
};
|
|
85
|
+
this.isMinValueReached = () => {
|
|
86
|
+
return this.min !== undefined && this.value <= this.min;
|
|
87
|
+
};
|
|
88
|
+
this.isMaxValueReached = () => {
|
|
89
|
+
return this.max !== undefined && this.value >= this.max;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//#endregion EVENTS
|
|
93
|
+
/****************************************************************************/
|
|
94
|
+
//#region WATCHERS
|
|
95
|
+
watchValueHandler(newValue) {
|
|
96
|
+
this.valueChanged.emit(newValue);
|
|
97
|
+
}
|
|
98
|
+
//#endregion METHODS
|
|
99
|
+
/****************************************************************************/
|
|
100
|
+
//#region LIFECYCLE
|
|
101
|
+
componentWillRender() {
|
|
102
|
+
if (this.message) {
|
|
103
|
+
this.description = this.message;
|
|
104
|
+
}
|
|
105
|
+
if (this.validation) {
|
|
106
|
+
this.errorDescription = this.validation;
|
|
107
|
+
this.error = true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//#endregion LIFECYCLE
|
|
111
|
+
/****************************************************************************/
|
|
112
|
+
//#region RENDER
|
|
113
|
+
render() {
|
|
114
|
+
return (index.h(index.Host, { key: 'd4a702bbb94585da82e6c40ac83d0f3508564a7b' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '11cfc66c6796aae236796fb5a637aa72ef6c2340', htmlFor: this.inputId }, index.h("slot", { key: 'bce23d0b1a283ec2d1c1ce0cc6d2c61a6d2cf6e9', name: "label" }, this.label))), index.h("div", { key: 'c62aa0a4d69fd0235912ef16c89a4d511348aa48', class: "input-wrapper" }, index.h("slot", { key: '2f7a66f50f7256b7ef5dcc90d112da47a4cac511', name: "before-input" }), index.h("div", { key: 'b00c8348136289513a1c3d5ef68a08a581fa4d9c', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '9d4cce93ff07c710db6cafb3d5c644fad480a397', name: "leading-input" }), index.h("input", { key: '44ef9c168f0e6e1ce9166cc896127f79d0794392', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: this.required, max: this.max, min: this.min, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), this.error && (index.h("nv-icon", { key: 'b2335c490f6ff69c3019731e309d450c94f0a881', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '5b259e0b4fce9444d6bd4019a5a9c01b66cb8b67', name: "circle-check", class: "validation", size: "md" })), index.h("div", { key: 'a22e29f5af849084331ddda2d63339b3517cb0cf', class: "stepper" }, index.h("nv-iconbutton", { key: '97b7a1646b20fb0804daa5c830c70be05bc6673f', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabIndex: -1 }), index.h("nv-iconbutton", { key: '2a9cfde9dfa60a3a565a4673a3696f2907e67845', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabIndex: -1 }))), index.h("slot", { key: '85b9df5f03f45486dec27961d9c98eafa90e008a', name: "after-input" })), (this.description ||
|
|
115
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '1bab44c8766935832acf883732f059333426bd61', class: "description" }, index.h("slot", { key: 'f148c139053ce336f342a93e6bc9b8ac11872909', name: "description" }, this.description))), (this.errorDescription ||
|
|
116
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'a47082dd9ae82156fde1dd4948e31dcfec804a64', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '9537d8157e4acd4a2c502e271b9b2640c0cc71a6', name: "error-description" }, this.errorDescription)))));
|
|
117
|
+
}
|
|
118
|
+
static get formAssociated() { return true; }
|
|
119
|
+
get el() { return index.getElement(this); }
|
|
120
|
+
static get watchers() { return {
|
|
121
|
+
"value": ["watchValueHandler"]
|
|
122
|
+
}; }
|
|
123
|
+
};
|
|
124
|
+
NvFieldnumber.style = NvFieldnumberStyle0;
|
|
125
|
+
|
|
126
|
+
exports.nv_fieldnumber = NvFieldnumber;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CIcUUomJ.js');
|
|
4
|
+
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
|
+
require('react');
|
|
6
|
+
|
|
7
|
+
const nvFieldnumberCss = "nv-fieldnumber {\n --nv-field-border-default: var(--components-form-field-border-default);\n --nv-field-border-hover: var(--components-form-field-border-hover);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--components-form-field-border-default);\n --nv-field-border-readonly: var(--components-form-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-brand);\n --nv-field-background: var(--components-form-field-background-default);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--form-gap-y);\n box-sizing: border-box;\n}\nnv-fieldnumber[readonly]:not([readonly=false]) {\n --nv-field-border-default: var(--components-form-field-border-readonly);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-background: var(--components-form-field-background-readonly);\n}\nnv-fieldnumber[error]:not([error=false]) {\n --nv-field-border-default: var(--components-form-field-border-error);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-destructive);\n}\nnv-fieldnumber[success]:not([success=false]) {\n --nv-field-border-default: var(--components-form-field-border-success);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-success);\n}\nnv-fieldnumber[required]:not([required=false]) label::after {\n content: \"*\";\n color: var(--components-form-text-required);\n font-weight: 700;\n}\nnv-fieldnumber label {\n display: flex;\n align-items: center;\n gap: var(--form-label-gap);\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-label-line-height);\n}\nnv-fieldnumber .input-wrapper {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\nnv-fieldnumber .input-wrapper .input-container {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default, 1);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n}\nnv-fieldnumber .input-wrapper .input-container:hover {\n border-color: var(--nv-field-border-hover);\n}\nnv-fieldnumber .input-wrapper .input-container:focus-within, nv-fieldnumber .input-wrapper .input-container:focus-within:hover, nv-fieldnumber .input-wrapper .input-container:focus, nv-fieldnumber .input-wrapper .input-container:focus:hover {\n border-color: var(--nv-field-border-focus);\n box-shadow: 0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:read-only) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-readonly);\n border-color: var(--nv-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container:has(input:disabled) {\n opacity: 0.5;\n background-color: var(--components-form-field-background-disabled);\n border-color: var(--nv-field-border-disabled);\n}\nnv-fieldnumber .input-wrapper .input-container input {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n overflow: hidden;\n background-color: transparent;\n color: var(--components-form-field-content-text);\n padding: var(--form-field-padding-y) var(--form-field-padding-x);\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 500;\n line-height: var(--form-field-line-height);\n width: 100%;\n appearance: textfield;\n}\nnv-fieldnumber .input-wrapper .input-container input:focus {\n outline: none;\n}\nnv-fieldnumber .input-wrapper .input-container input::placeholder {\n overflow: hidden;\n color: var(--components-form-field-content-placeholder);\n text-overflow: ellipsis;\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--form-field-line-height);\n}\nnv-fieldnumber .input-wrapper .input-container input::-webkit-inner-spin-button, nv-fieldnumber .input-wrapper .input-container input::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n}\nnv-fieldnumber .input-wrapper .input-container nv-icon.validation {\n color: var(--nv-field-border-default);\n margin-right: var(--form-field-gap);\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\n@container field-number-input-container (width < 150px) {\n nv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n display: none;\n }\n nv-fieldnumber .input-wrapper .input-container .stepper {\n display: none;\n }\n}\nnv-fieldnumber .description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n}\nnv-fieldnumber .error-description {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: \"TT Norms Pro\", sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n color: var(--components-form-text-description-error);\n}";
|
|
8
|
+
const NvFieldnumberStyle0 = nvFieldnumberCss;
|
|
9
|
+
|
|
10
|
+
const NvFieldnumber = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.valueChanged = index.createEvent(this, "valueChanged");
|
|
14
|
+
//#endregion DEPRECATED
|
|
15
|
+
/****************************************************************************/
|
|
16
|
+
//#region PROPERTIES
|
|
17
|
+
/**
|
|
18
|
+
* Sets the ID for the input element and the for attribute of the associated
|
|
19
|
+
* label. If no ID is provided, a random one will be automatically generated
|
|
20
|
+
* to ensure unique identification, facilitating proper label association and
|
|
21
|
+
* accessibility.
|
|
22
|
+
*/
|
|
23
|
+
this.inputId = v4A79185f4.v4();
|
|
24
|
+
/**
|
|
25
|
+
* The disabled prop lets you turn off the input field so that users can’t
|
|
26
|
+
* type in it. When disabled, the field is grayed out and won’t respond to#
|
|
27
|
+
* clicks or touches.
|
|
28
|
+
*/
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
/**
|
|
31
|
+
* Display the input field’s content without allowing users to change it.
|
|
32
|
+
* Users can still click on it, select, and copy the text, but they won’t be
|
|
33
|
+
* able to type or delete anything.
|
|
34
|
+
*/
|
|
35
|
+
this.readonly = false;
|
|
36
|
+
/**
|
|
37
|
+
* Marks the input field as required, ensuring that the user must fill it out
|
|
38
|
+
* before submitting the form.
|
|
39
|
+
*/
|
|
40
|
+
this.required = false;
|
|
41
|
+
/**
|
|
42
|
+
* Alters the input field’s appearance to indicate an error, helping users
|
|
43
|
+
* identify fields that need correction.
|
|
44
|
+
* @validator error
|
|
45
|
+
*/
|
|
46
|
+
this.error = false;
|
|
47
|
+
/**
|
|
48
|
+
* Changes the input field’s appearance to indicate successful input or
|
|
49
|
+
* validation.
|
|
50
|
+
*/
|
|
51
|
+
this.success = false;
|
|
52
|
+
/**
|
|
53
|
+
* Define the increment value for the input field. It determines how much the
|
|
54
|
+
* value will increase or decrease when the user clicks the stepper buttons.
|
|
55
|
+
*/
|
|
56
|
+
this.step = 1;
|
|
57
|
+
/**
|
|
58
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
59
|
+
* is equivalent to setting the native autofocus attribute on an <input>
|
|
60
|
+
* element.
|
|
61
|
+
*/
|
|
62
|
+
this.autofocus = false;
|
|
63
|
+
//#endregion WATCHERS
|
|
64
|
+
/****************************************************************************/
|
|
65
|
+
//#region METHODS
|
|
66
|
+
this.handleInput = (event) => {
|
|
67
|
+
const input = event.target;
|
|
68
|
+
this.value = Number(input.value);
|
|
69
|
+
};
|
|
70
|
+
this.handleInputContainerClick = () => {
|
|
71
|
+
this.inputElement.focus();
|
|
72
|
+
};
|
|
73
|
+
this.handlePlus = () => {
|
|
74
|
+
this.inputElement.stepUp();
|
|
75
|
+
this.value = Number(this.inputElement.value);
|
|
76
|
+
};
|
|
77
|
+
this.handleMinus = () => {
|
|
78
|
+
this.inputElement.stepDown();
|
|
79
|
+
this.value = Number(this.inputElement.value);
|
|
80
|
+
};
|
|
81
|
+
// prevents text selection when clicking the buttons multiple times
|
|
82
|
+
this.preventSelection = (event) => {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
};
|
|
85
|
+
this.isMinValueReached = () => {
|
|
86
|
+
return this.min !== undefined && this.value <= this.min;
|
|
87
|
+
};
|
|
88
|
+
this.isMaxValueReached = () => {
|
|
89
|
+
return this.max !== undefined && this.value >= this.max;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//#endregion EVENTS
|
|
93
|
+
/****************************************************************************/
|
|
94
|
+
//#region WATCHERS
|
|
95
|
+
watchValueHandler(newValue) {
|
|
96
|
+
this.valueChanged.emit(newValue);
|
|
97
|
+
}
|
|
98
|
+
//#endregion METHODS
|
|
99
|
+
/****************************************************************************/
|
|
100
|
+
//#region LIFECYCLE
|
|
101
|
+
componentWillRender() {
|
|
102
|
+
if (this.message) {
|
|
103
|
+
this.description = this.message;
|
|
104
|
+
}
|
|
105
|
+
if (this.validation) {
|
|
106
|
+
this.errorDescription = this.validation;
|
|
107
|
+
this.error = true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//#endregion LIFECYCLE
|
|
111
|
+
/****************************************************************************/
|
|
112
|
+
//#region RENDER
|
|
113
|
+
render() {
|
|
114
|
+
return (index.h(index.Host, { key: '14de76d6ddda9977fa3ad28d6e9d2acf613565fa' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '22131a183df8f9612d7d1fc4c7904f7e9e3fba71', htmlFor: this.inputId }, index.h("slot", { key: '48cca38b15579499662018d593bd9e73129565da', name: "label" }, this.label))), index.h("div", { key: '9a0a40a370f879f0685a62fb7360419db1245738', class: "input-wrapper" }, index.h("slot", { key: '05bcbc8bd7311f3e6ae467b40af269e373e7ef26', name: "before-input" }), index.h("div", { key: '81861b40c527dde0b7629914e70f7ee1b3389f06', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: 'dc64fe00dd75120daedfdc51fc2d5d955f3e3348', name: "leading-input" }), index.h("input", { key: '01593dfe3c0331acec3ec765cb1673d6a0536f1f', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: "number", autofocus: this.autofocus, required: this.required, max: this.max, min: this.min, step: this.step, value: this.value, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), this.error && (index.h("nv-icon", { key: 'f253f726e6ad61e0b49389f38d1b6c519bd7ade6', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: '11968ad93087be6813e99e2b781fa8d3d7f7b772', name: "circle-check", class: "validation", size: "md" })), index.h("div", { key: '900d860455ced0a97dbdad044c83578f680e2d1c', class: "stepper" }, index.h("nv-iconbutton", { key: '1c6f95596b862dad92ca2006e983fbf4b45fa9ee', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabIndex: -1 }), index.h("nv-iconbutton", { key: '2f08e682805b4c9cf6f09b71c885460ca697de5f', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabIndex: -1 }))), index.h("slot", { key: 'b63dbbaeb358b73105f552de15a0226906f5e547', name: "after-input" })), (this.description ||
|
|
115
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '43c3f1bd58a36095e69283151ac4d7edcd0eef4a', class: "description" }, index.h("slot", { key: '0c91c8198be73d7285065d86c1ca1340d3517e0d', name: "description" }, this.description))), (this.errorDescription ||
|
|
116
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'ecb9e02f67241294215ee3e570006dcf98539537', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '763ddc2a238b85022d72e046d9665fbb433f8476', name: "error-description" }, this.errorDescription)))));
|
|
117
|
+
}
|
|
118
|
+
static get formAssociated() { return true; }
|
|
119
|
+
get el() { return index.getElement(this); }
|
|
120
|
+
static get watchers() { return {
|
|
121
|
+
"value": ["watchValueHandler"]
|
|
122
|
+
}; }
|
|
123
|
+
};
|
|
124
|
+
NvFieldnumber.style = NvFieldnumberStyle0;
|
|
125
|
+
|
|
126
|
+
exports.nv_fieldnumber = NvFieldnumber;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CDe7nrrW.js');
|
|
4
|
+
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
5
|
+
require('react');
|
|
6
|
+
|
|
7
|
+
const nvFieldpasswordCss = "nv-fieldpassword{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldpassword[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldpassword[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldpassword[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldpassword[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fieldpassword label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"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-fieldpassword .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldpassword .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;position:relative}nv-fieldpassword .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldpassword .input-wrapper .input-container:focus-within,nv-fieldpassword .input-wrapper .input-container:focus-within:hover,nv-fieldpassword .input-wrapper .input-container:focus,nv-fieldpassword .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldpassword .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldpassword .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldpassword .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height)}nv-fieldpassword .input-wrapper .input-container input:focus{outline:none}nv-fieldpassword .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"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-fieldpassword .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldpassword .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldpassword .description{align-self:stretch;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-fieldpassword .error-description{align-self:stretch;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)}";
|
|
8
|
+
const NvFieldpasswordStyle0 = nvFieldpasswordCss;
|
|
9
|
+
|
|
10
|
+
const NvFieldpassword = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.valueChanged = index.createEvent(this, "valueChanged");
|
|
14
|
+
/****************************************************************************/
|
|
15
|
+
//#region PROPERTIES
|
|
16
|
+
/**
|
|
17
|
+
* Sets the ID for the input element and the for attribute of the associated
|
|
18
|
+
* label. If no ID is provided, a random one will be automatically generated
|
|
19
|
+
* to ensure unique identification, facilitating proper label association and
|
|
20
|
+
* accessibility.
|
|
21
|
+
*/
|
|
22
|
+
this.inputId = v4A79185f4.v4();
|
|
23
|
+
/**
|
|
24
|
+
* The disabled prop lets you turn off the input field so that users can’t
|
|
25
|
+
* type in it. When disabled, the field is grayed out and won’t respond to#
|
|
26
|
+
* clicks or touches.
|
|
27
|
+
*/
|
|
28
|
+
this.disabled = false;
|
|
29
|
+
/**
|
|
30
|
+
* Display the input field’s content without allowing users to change it.
|
|
31
|
+
* Users can still click on it, select, and copy the text, but they won’t be
|
|
32
|
+
* able to type or delete anything.
|
|
33
|
+
*/
|
|
34
|
+
this.readonly = false;
|
|
35
|
+
/**
|
|
36
|
+
* Marks the input field as required, ensuring that the user must fill it out
|
|
37
|
+
* before submitting the form.
|
|
38
|
+
*/
|
|
39
|
+
this.required = false;
|
|
40
|
+
/**
|
|
41
|
+
* Alters the input field’s appearance to indicate an error, helping users
|
|
42
|
+
* identify fields that need correction.
|
|
43
|
+
* @validator error
|
|
44
|
+
*/
|
|
45
|
+
this.error = false;
|
|
46
|
+
/**
|
|
47
|
+
* Changes the input field’s appearance to indicate successful input or
|
|
48
|
+
* validation.
|
|
49
|
+
*/
|
|
50
|
+
this.success = false;
|
|
51
|
+
/**
|
|
52
|
+
* Defines the type of the input.
|
|
53
|
+
* @default 'text'
|
|
54
|
+
*/
|
|
55
|
+
this.mode = 'text';
|
|
56
|
+
/**
|
|
57
|
+
* The autocomplete prop helps users fill out the input field faster by
|
|
58
|
+
* suggesting entries they’ve used before, like their email or address.
|
|
59
|
+
* You can turn it on to make forms more convenient or off to ensure users
|
|
60
|
+
* always type in fresh data.
|
|
61
|
+
*/
|
|
62
|
+
this.autocomplete = 'off';
|
|
63
|
+
/**
|
|
64
|
+
* Hide the button to show/hide the password.
|
|
65
|
+
*/
|
|
66
|
+
this.hidePasswordIcon = false;
|
|
67
|
+
/**
|
|
68
|
+
* Show/hide the password programmatically.
|
|
69
|
+
*/
|
|
70
|
+
this.showPassword = false;
|
|
71
|
+
/**
|
|
72
|
+
* Defines whether the password is visible or not.
|
|
73
|
+
*/
|
|
74
|
+
this.showPasswordState = this.showPassword;
|
|
75
|
+
/**
|
|
76
|
+
* Applies focus to the input field as soon as the component is mounted. This
|
|
77
|
+
* is equivalent to setting the native autofocus attribute on an <input>
|
|
78
|
+
* element.
|
|
79
|
+
*/
|
|
80
|
+
this.autofocus = false;
|
|
81
|
+
//#endregion EVENTS
|
|
82
|
+
/****************************************************************************/
|
|
83
|
+
//#region METHODS
|
|
84
|
+
this.handleInputContainerClick = () => {
|
|
85
|
+
this.inputElement.focus();
|
|
86
|
+
};
|
|
87
|
+
this.togglePasswordVisibility = () => {
|
|
88
|
+
this.showPasswordState = !this.showPasswordState;
|
|
89
|
+
};
|
|
90
|
+
this.handleInput = (event) => {
|
|
91
|
+
const input = event.target;
|
|
92
|
+
this.value = input.value; // Update the input value without worrying about the space
|
|
93
|
+
this.valueChanged.emit(input.value);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
handleShowPasswordChange(newValue) {
|
|
97
|
+
this.showPasswordState = newValue;
|
|
98
|
+
}
|
|
99
|
+
//#endregion METHODS
|
|
100
|
+
/****************************************************************************/
|
|
101
|
+
//#region RENDER
|
|
102
|
+
render() {
|
|
103
|
+
return (index.h(index.Host, { key: 'd3cac7eec8e7a907dfce492104c8527025b2a2dd' }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'e7c15eb694878bd5c8deeb99f0eb355126221e86', htmlFor: this.inputId }, index.h("slot", { key: '5fe60e879c4f932791ce0eb118f83141cdd61624', name: "label" }, this.label))), index.h("div", { key: '6af9e58ac31b36a46caa4ea93afd81faa5628ba3', class: "input-wrapper" }, index.h("slot", { key: '6c5ade77fe6a50b3155540a6255f02cb73ef0228', name: "before-input" }), index.h("div", { key: '179af5fde37ce4915e93408bb9658814606bdc16', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: '00f53715bf90f3b95a2388e5d39dc984a7e466b2', name: "leading-input" }), index.h("input", { key: '5a8eb7e23369c78f1deb1ecabefcc91551a19c10', id: this.inputId, ref: e => (this.inputElement = e), autofocus: this.autofocus, autocomplete: this.autocomplete, placeholder: this.placeholder, name: this.name, type: this.showPasswordState ? 'text' : 'password', inputMode: this.mode, value: this.value, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), (this.success || this.error) && (index.h("nv-icon", { key: '7998690cdc77e68ef2bec06aebb414f864204576', name: this.success ? 'circle-check' : 'alert-circle', class: "validation", size: "md" })), !this.hidePasswordIcon && (index.h("nv-iconbutton", { key: '667e7bcbb19b4853995b15ee59f5dc4881fee368', name: this.showPasswordState ? 'eye' : 'eye-off', size: "md", emphasis: "lower", onClick: this.togglePasswordVisibility, "aria-label": this.showPasswordState ? 'Hide password' : 'Show password', "aria-pressed": this.showPasswordState.toString() }))), index.h("slot", { key: '5049d70e2aece7815b5af7299352f351395a9c88', name: "after-input" })), (this.description ||
|
|
104
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '9e5a539347d751f30796784cc9e2b76a9e05ba35', class: "description" }, index.h("slot", { key: '38e039c7d7a61d4c017525109c4b0dafe3a05f45', name: "description" }, this.description))), (this.errorDescription ||
|
|
105
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: 'b878d426aa96429a249c2658419bbe8de3d5eb46', hidden: !this.error, class: "error-description" }, index.h("slot", { key: '687e2d5bf96e54df2cba8b4eb01a60267bf0b79b', name: "error-description" }, this.errorDescription)))));
|
|
106
|
+
}
|
|
107
|
+
static get formAssociated() { return true; }
|
|
108
|
+
get el() { return index.getElement(this); }
|
|
109
|
+
static get watchers() { return {
|
|
110
|
+
"showPassword": ["handleShowPasswordChange"]
|
|
111
|
+
}; }
|
|
112
|
+
};
|
|
113
|
+
NvFieldpassword.style = NvFieldpasswordStyle0;
|
|
114
|
+
|
|
115
|
+
exports.nv_fieldpassword = NvFieldpassword;
|