@nova-design-system/nova-webcomponents 3.21.0 → 3.22.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.
Files changed (318) hide show
  1. package/dist/cjs/{grow.animation-f1cef0ad.js → grow.animation-69832995.js} +29 -1
  2. package/dist/cjs/grow.animation-69832995.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +2 -3
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/native.cjs.js +1 -1
  7. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  8. package/dist/cjs/nv-dialog.cjs.entry.js +53 -19
  9. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
  11. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
  12. package/dist/cjs/nv-fielddate.cjs.entry.js +14 -17
  13. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-fielddaterange.cjs.entry.js +7 -9
  15. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-fielddropdown.cjs.entry.js +14 -5
  17. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -2
  19. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +1 -1
  21. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  23. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  24. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  25. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  26. package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
  27. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  28. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  29. package/dist/cjs/nv-fieldtime.cjs.entry.js +3 -3
  30. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  31. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  32. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  33. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  34. package/dist/cjs/nv-notification.cjs.entry.js +1 -1
  35. package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
  36. package/dist/cjs/nv-popover.cjs.entry.js +10 -11
  37. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  38. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  39. package/dist/cjs/nv-split.cjs.entry.js +1 -1
  40. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  41. package/dist/cjs/nv-table.cjs.entry.js +1 -1
  42. package/dist/cjs/nv-tableheader.cjs.entry.js +1 -1
  43. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
  45. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
  46. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  47. package/dist/collection/components/nv-dialog/nv-dialog.css +29 -22
  48. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +14 -1
  49. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  50. package/dist/collection/components/nv-dialog/nv-dialog.js +47 -21
  51. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  52. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  53. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  54. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
  55. package/dist/collection/components/nv-fielddate/nv-fielddate.js +20 -17
  56. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  57. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +7 -9
  58. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  59. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +13 -4
  60. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  61. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +24 -18
  62. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  63. package/dist/collection/components/nv-fielddropdownitem/styles/nv-fielddropdownitem.css +5 -3
  64. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  65. package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +3 -1
  66. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  67. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  68. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  69. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  70. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
  71. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  72. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  73. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +3 -3
  74. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  75. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  76. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  77. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  78. package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
  79. package/dist/collection/components/nv-notification/nv-notification.js +1 -1
  80. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -1
  81. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  82. package/dist/collection/components/nv-row/nv-row.js +1 -1
  83. package/dist/collection/components/nv-split/nv-split.js +1 -1
  84. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  85. package/dist/collection/components/nv-table/nv-table.js +1 -1
  86. package/dist/collection/components/nv-tableheader/nv-tableheader.js +1 -1
  87. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  88. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  89. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
  90. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  91. package/dist/components/index.js +2 -2
  92. package/dist/components/nv-accordion-item.js +1 -1
  93. package/dist/components/nv-accordion.js +4 -4
  94. package/dist/components/nv-alert.js +1 -1
  95. package/dist/components/nv-avatar.js +1 -1
  96. package/dist/components/nv-badge.js +1 -1
  97. package/dist/components/nv-breadcrumb.js +2 -2
  98. package/dist/components/nv-button.js +1 -1
  99. package/dist/components/nv-datagrid.js +2 -2
  100. package/dist/components/nv-dialog.js +57 -23
  101. package/dist/components/nv-dialog.js.map +1 -1
  102. package/dist/components/nv-dialogfooter.js +1 -1
  103. package/dist/components/nv-dialogheader.js +1 -1
  104. package/dist/components/nv-fieldcheckbox.js +1 -1
  105. package/dist/components/nv-fielddate.js +19 -22
  106. package/dist/components/nv-fielddate.js.map +1 -1
  107. package/dist/components/nv-fielddaterange.js +11 -13
  108. package/dist/components/nv-fielddaterange.js.map +1 -1
  109. package/dist/components/nv-fielddropdown.js +19 -10
  110. package/dist/components/nv-fielddropdown.js.map +1 -1
  111. package/dist/components/nv-fielddropdownitem.js +1 -1
  112. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  113. package/dist/components/nv-fieldmultiselect.js +8 -8
  114. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  115. package/dist/components/nv-fieldnumber.js +1 -1
  116. package/dist/components/nv-fieldpassword.js +6 -6
  117. package/dist/components/nv-fieldradio.js +3 -3
  118. package/dist/components/nv-fieldselect.js +8 -8
  119. package/dist/components/nv-fieldslider.js +7 -7
  120. package/dist/components/nv-fieldtext.js +1 -1
  121. package/dist/components/nv-fieldtextarea.js +3 -3
  122. package/dist/components/nv-fieldtime.js +7 -7
  123. package/dist/components/nv-icon.js +1 -1
  124. package/dist/components/nv-iconbutton.js +1 -1
  125. package/dist/components/nv-loader.js +1 -1
  126. package/dist/components/nv-menu.js +4 -4
  127. package/dist/components/nv-menuitem.js +1 -1
  128. package/dist/components/nv-notification.js +2 -2
  129. package/dist/components/nv-notificationcontainer.js +1 -1
  130. package/dist/components/nv-popover.js +1 -1
  131. package/dist/components/nv-row.js +1 -1
  132. package/dist/components/nv-split.js +1 -1
  133. package/dist/components/nv-stack.js +1 -1
  134. package/dist/components/nv-table.js +1 -1
  135. package/dist/components/nv-tableheader.js +4 -4
  136. package/dist/components/nv-toggle.js +2 -2
  137. package/dist/components/nv-togglebutton.js +1 -1
  138. package/dist/components/nv-togglebuttongroup.js +1 -1
  139. package/dist/components/nv-tooltip.js +1 -1
  140. package/dist/components/{p-61382072.js → p-20a1c769.js} +2 -2
  141. package/dist/components/{p-61382072.js.map → p-20a1c769.js.map} +1 -1
  142. package/dist/components/{p-a6c29711.js → p-2d7d3aa2.js} +3 -3
  143. package/dist/components/{p-a6c29711.js.map → p-2d7d3aa2.js.map} +1 -1
  144. package/dist/components/{p-429e01f3.js → p-583b3d89.js} +2 -2
  145. package/dist/components/{p-429e01f3.js.map → p-583b3d89.js.map} +1 -1
  146. package/dist/components/{p-c4d20cc9.js → p-5f78a78f.js} +3 -3
  147. package/dist/components/{p-c4d20cc9.js.map → p-5f78a78f.js.map} +1 -1
  148. package/dist/components/{p-4799b6c3.js → p-62f91b46.js} +3 -4
  149. package/dist/components/p-62f91b46.js.map +1 -0
  150. package/dist/components/{p-5c6b5444.js → p-7214f13f.js} +4 -4
  151. package/dist/components/{p-5c6b5444.js.map → p-7214f13f.js.map} +1 -1
  152. package/dist/components/{p-0bfe8a47.js → p-743b3452.js} +2 -2
  153. package/dist/components/{p-0bfe8a47.js.map → p-743b3452.js.map} +1 -1
  154. package/dist/components/{p-00347aae.js → p-94ad267c.js} +5 -5
  155. package/dist/components/{p-00347aae.js.map → p-94ad267c.js.map} +1 -1
  156. package/dist/components/{p-222136c2.js → p-996438a2.js} +2 -2
  157. package/dist/components/{p-222136c2.js.map → p-996438a2.js.map} +1 -1
  158. package/dist/components/{p-4697bd56.js → p-996ed843.js} +27 -2
  159. package/dist/components/p-996ed843.js.map +1 -0
  160. package/dist/components/{p-2062ba39.js → p-af663ff5.js} +2 -2
  161. package/dist/components/{p-2062ba39.js.map → p-af663ff5.js.map} +1 -1
  162. package/dist/components/{p-c69f5a37.js → p-bcf9d309.js} +5 -5
  163. package/dist/components/{p-c69f5a37.js.map → p-bcf9d309.js.map} +1 -1
  164. package/dist/components/{p-d1d4cc45.js → p-cc77f8fe.js} +7 -7
  165. package/dist/components/{p-d1d4cc45.js.map → p-cc77f8fe.js.map} +1 -1
  166. package/dist/components/{p-8ce28cff.js → p-d9c1cd97.js} +4 -4
  167. package/dist/components/{p-8ce28cff.js.map → p-d9c1cd97.js.map} +1 -1
  168. package/dist/components/{p-0d5ed1d7.js → p-e1f82896.js} +5 -5
  169. package/dist/components/{p-0d5ed1d7.js.map → p-e1f82896.js.map} +1 -1
  170. package/dist/components/{p-643d7802.js → p-f68c8fff.js} +3 -3
  171. package/dist/components/{p-643d7802.js.map → p-f68c8fff.js.map} +1 -1
  172. package/dist/components/{p-86588fba.js → p-f6ffffd9.js} +4 -4
  173. package/dist/components/{p-86588fba.js.map → p-f6ffffd9.js.map} +1 -1
  174. package/dist/esm/{grow.animation-03fa5c19.js → grow.animation-24ad5cf8.js} +27 -2
  175. package/dist/esm/grow.animation-24ad5cf8.js.map +1 -0
  176. package/dist/esm/index.js +2 -2
  177. package/dist/esm/loader.js +1 -1
  178. package/dist/esm/native.js +1 -1
  179. package/dist/esm/nv-badge_2.entry.js +1 -1
  180. package/dist/esm/nv-dialog.entry.js +51 -17
  181. package/dist/esm/nv-dialog.entry.js.map +1 -1
  182. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  183. package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
  184. package/dist/esm/nv-fielddate.entry.js +14 -17
  185. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  186. package/dist/esm/nv-fielddaterange.entry.js +7 -9
  187. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  188. package/dist/esm/nv-fielddropdown.entry.js +14 -5
  189. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  190. package/dist/esm/nv-fielddropdownitem.entry.js +2 -2
  191. package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
  192. package/dist/esm/nv-fieldmultiselect.entry.js +1 -1
  193. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  194. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  195. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  196. package/dist/esm/nv-fieldradio.entry.js +3 -3
  197. package/dist/esm/nv-fieldselect.entry.js +5 -5
  198. package/dist/esm/nv-fieldslider.entry.js +3 -3
  199. package/dist/esm/nv-fieldtext.entry.js +3 -3
  200. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  201. package/dist/esm/nv-fieldtime.entry.js +3 -3
  202. package/dist/esm/nv-icon.entry.js +1 -1
  203. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  204. package/dist/esm/nv-menu.entry.js +1 -1
  205. package/dist/esm/nv-menuitem.entry.js +1 -1
  206. package/dist/esm/nv-notification.entry.js +1 -1
  207. package/dist/esm/nv-notificationcontainer.entry.js +1 -1
  208. package/dist/esm/nv-popover.entry.js +2 -3
  209. package/dist/esm/nv-popover.entry.js.map +1 -1
  210. package/dist/esm/nv-row.entry.js +1 -1
  211. package/dist/esm/nv-split.entry.js +1 -1
  212. package/dist/esm/nv-stack.entry.js +1 -1
  213. package/dist/esm/nv-table.entry.js +1 -1
  214. package/dist/esm/nv-tableheader.entry.js +1 -1
  215. package/dist/esm/nv-toggle.entry.js +2 -2
  216. package/dist/esm/nv-togglebutton.entry.js +1 -1
  217. package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
  218. package/dist/esm/nv-tooltip.entry.js +1 -1
  219. package/dist/native/index.esm.js +1 -1
  220. package/dist/native/native.esm.js +1 -1
  221. package/dist/native/{p-c4baad6e.entry.js → p-023f36b6.entry.js} +2 -2
  222. package/dist/native/{p-2b4cf4b8.entry.js → p-07b12aa5.entry.js} +2 -2
  223. package/dist/native/{p-4de8697c.entry.js → p-104a9828.entry.js} +2 -2
  224. package/dist/native/{p-859bf9ad.entry.js → p-1ee225be.entry.js} +2 -2
  225. package/dist/native/p-1ee225be.entry.js.map +1 -0
  226. package/dist/native/p-21dde805.entry.js +2 -0
  227. package/dist/native/{p-56ed7306.entry.js → p-242cdeac.entry.js} +2 -2
  228. package/dist/native/{p-587d94f3.entry.js → p-2895ad03.entry.js} +2 -2
  229. package/dist/native/{p-b4382c94.entry.js → p-2d363bd9.entry.js} +2 -2
  230. package/dist/native/{p-b02c896a.entry.js → p-2e1b4e19.entry.js} +2 -2
  231. package/dist/native/{p-a2f58133.entry.js → p-2fb1974e.entry.js} +2 -2
  232. package/dist/native/p-32c16132.entry.js +2 -0
  233. package/dist/native/p-32c16132.entry.js.map +1 -0
  234. package/dist/native/{p-9950e075.entry.js → p-3df31ed5.entry.js} +2 -2
  235. package/dist/native/{p-533e2530.entry.js → p-44f4e0ae.entry.js} +2 -2
  236. package/dist/native/{p-c901693d.entry.js → p-4bf63654.entry.js} +2 -2
  237. package/dist/native/{p-ae5be175.entry.js → p-7ac9af42.entry.js} +2 -2
  238. package/dist/native/{p-973f5db2.entry.js → p-7b7bbac7.entry.js} +2 -2
  239. package/dist/native/{p-6a418ec4.entry.js → p-93d80b03.entry.js} +2 -2
  240. package/dist/native/p-996ed843.js +2 -0
  241. package/dist/native/p-996ed843.js.map +1 -0
  242. package/dist/native/{p-fa3e588e.entry.js → p-9e36eebc.entry.js} +2 -2
  243. package/dist/native/{p-2a7f80f4.entry.js → p-a4a0021c.entry.js} +2 -2
  244. package/dist/native/{p-17666092.entry.js → p-a6d8d9a1.entry.js} +2 -2
  245. package/dist/native/{p-eb74feb7.entry.js → p-a9a7f1b8.entry.js} +2 -2
  246. package/dist/native/p-ad5e12d2.entry.js +2 -0
  247. package/dist/native/{p-e6f24210.entry.js.map → p-ad5e12d2.entry.js.map} +1 -1
  248. package/dist/native/{p-fffbd3c1.entry.js → p-aefd32f0.entry.js} +2 -2
  249. package/dist/native/p-b3d6e9f4.entry.js +2 -0
  250. package/dist/native/{p-c9fea0df.entry.js.map → p-b3d6e9f4.entry.js.map} +1 -1
  251. package/dist/native/p-b860d0d3.entry.js +7 -0
  252. package/dist/native/p-b860d0d3.entry.js.map +1 -0
  253. package/dist/native/{p-9c432751.entry.js → p-b97f392a.entry.js} +2 -2
  254. package/dist/native/{p-d63689da.entry.js → p-bd91e0bb.entry.js} +2 -2
  255. package/dist/native/p-bd91e0bb.entry.js.map +1 -0
  256. package/dist/native/{p-a026654f.entry.js → p-c37ab530.entry.js} +2 -2
  257. package/dist/native/{p-bd9bf6a1.entry.js → p-d22a503b.entry.js} +2 -2
  258. package/dist/native/{p-f3c73492.entry.js → p-da76357c.entry.js} +2 -2
  259. package/dist/native/{p-d0db5e72.entry.js → p-dac1537a.entry.js} +2 -2
  260. package/dist/native/p-e688c905.entry.js +2 -0
  261. package/dist/native/{p-218135b1.entry.js.map → p-e688c905.entry.js.map} +1 -1
  262. package/dist/native/{p-0177409b.entry.js → p-e887bbf5.entry.js} +2 -2
  263. package/dist/types/components/nv-dialog/nv-dialog.d.ts +4 -2
  264. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +1 -1
  265. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +1 -0
  266. package/hydrate/index.js +138 -103
  267. package/hydrate/index.mjs +138 -103
  268. package/package.json +1 -1
  269. package/dist/cjs/events.utils-52846a7d.js +0 -32
  270. package/dist/cjs/events.utils-52846a7d.js.map +0 -1
  271. package/dist/cjs/grow.animation-f1cef0ad.js.map +0 -1
  272. package/dist/components/p-4697bd56.js.map +0 -1
  273. package/dist/components/p-4799b6c3.js.map +0 -1
  274. package/dist/components/p-d429a343.js +0 -28
  275. package/dist/components/p-d429a343.js.map +0 -1
  276. package/dist/esm/events.utils-fe1d907f.js +0 -28
  277. package/dist/esm/events.utils-fe1d907f.js.map +0 -1
  278. package/dist/esm/grow.animation-03fa5c19.js.map +0 -1
  279. package/dist/native/p-144d0f8a.entry.js +0 -2
  280. package/dist/native/p-144d0f8a.entry.js.map +0 -1
  281. package/dist/native/p-218135b1.entry.js +0 -2
  282. package/dist/native/p-44ba73dc.entry.js +0 -7
  283. package/dist/native/p-44ba73dc.entry.js.map +0 -1
  284. package/dist/native/p-4697bd56.js +0 -2
  285. package/dist/native/p-4697bd56.js.map +0 -1
  286. package/dist/native/p-57420a2f.entry.js +0 -2
  287. package/dist/native/p-859bf9ad.entry.js.map +0 -1
  288. package/dist/native/p-c9fea0df.entry.js +0 -2
  289. package/dist/native/p-d429a343.js +0 -2
  290. package/dist/native/p-d429a343.js.map +0 -1
  291. package/dist/native/p-d63689da.entry.js.map +0 -1
  292. package/dist/native/p-e6f24210.entry.js +0 -2
  293. /package/dist/native/{p-c4baad6e.entry.js.map → p-023f36b6.entry.js.map} +0 -0
  294. /package/dist/native/{p-2b4cf4b8.entry.js.map → p-07b12aa5.entry.js.map} +0 -0
  295. /package/dist/native/{p-4de8697c.entry.js.map → p-104a9828.entry.js.map} +0 -0
  296. /package/dist/native/{p-57420a2f.entry.js.map → p-21dde805.entry.js.map} +0 -0
  297. /package/dist/native/{p-56ed7306.entry.js.map → p-242cdeac.entry.js.map} +0 -0
  298. /package/dist/native/{p-587d94f3.entry.js.map → p-2895ad03.entry.js.map} +0 -0
  299. /package/dist/native/{p-b4382c94.entry.js.map → p-2d363bd9.entry.js.map} +0 -0
  300. /package/dist/native/{p-b02c896a.entry.js.map → p-2e1b4e19.entry.js.map} +0 -0
  301. /package/dist/native/{p-a2f58133.entry.js.map → p-2fb1974e.entry.js.map} +0 -0
  302. /package/dist/native/{p-9950e075.entry.js.map → p-3df31ed5.entry.js.map} +0 -0
  303. /package/dist/native/{p-533e2530.entry.js.map → p-44f4e0ae.entry.js.map} +0 -0
  304. /package/dist/native/{p-c901693d.entry.js.map → p-4bf63654.entry.js.map} +0 -0
  305. /package/dist/native/{p-ae5be175.entry.js.map → p-7ac9af42.entry.js.map} +0 -0
  306. /package/dist/native/{p-973f5db2.entry.js.map → p-7b7bbac7.entry.js.map} +0 -0
  307. /package/dist/native/{p-6a418ec4.entry.js.map → p-93d80b03.entry.js.map} +0 -0
  308. /package/dist/native/{p-fa3e588e.entry.js.map → p-9e36eebc.entry.js.map} +0 -0
  309. /package/dist/native/{p-2a7f80f4.entry.js.map → p-a4a0021c.entry.js.map} +0 -0
  310. /package/dist/native/{p-17666092.entry.js.map → p-a6d8d9a1.entry.js.map} +0 -0
  311. /package/dist/native/{p-eb74feb7.entry.js.map → p-a9a7f1b8.entry.js.map} +0 -0
  312. /package/dist/native/{p-fffbd3c1.entry.js.map → p-aefd32f0.entry.js.map} +0 -0
  313. /package/dist/native/{p-9c432751.entry.js.map → p-b97f392a.entry.js.map} +0 -0
  314. /package/dist/native/{p-a026654f.entry.js.map → p-c37ab530.entry.js.map} +0 -0
  315. /package/dist/native/{p-bd9bf6a1.entry.js.map → p-d22a503b.entry.js.map} +0 -0
  316. /package/dist/native/{p-f3c73492.entry.js.map → p-da76357c.entry.js.map} +0 -0
  317. /package/dist/native/{p-d0db5e72.entry.js.map → p-dac1537a.entry.js.map} +0 -0
  318. /package/dist/native/{p-0177409b.entry.js.map → p-e887bbf5.entry.js.map} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment, d as Host } from './p-5829b9f7.js';
2
2
  import { b as ButtonType } from './p-51602221.js';
3
- import { d as defineCustomElement$3 } from './p-2062ba39.js';
4
- import { d as defineCustomElement$2 } from './p-0bfe8a47.js';
5
- import { d as defineCustomElement$1 } from './p-222136c2.js';
3
+ import { d as defineCustomElement$3 } from './p-af663ff5.js';
4
+ import { d as defineCustomElement$2 } from './p-743b3452.js';
5
+ import { d as defineCustomElement$1 } from './p-996438a2.js';
6
6
 
7
7
  const nvDialogfooterCss = "nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}";
8
8
  const NvDialogfooterStyle0 = nvDialogfooterCss;
@@ -87,7 +87,7 @@ const NvDialogfooter = /*@__PURE__*/ proxyCustomElement(class NvDialogfooter ext
87
87
  /****************************************************************************/
88
88
  //#region RENDER
89
89
  render() {
90
- return (h(Host, { key: '0868c3af73f89219eee7c006b4ddca47c6da29b0' }, !this.hasSlot ? (h(Fragment, null, !this.undismissable && (h("nv-button", { onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), h("nv-button", { onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (h("nv-icon", { slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (h("nv-icon", { slot: "trailing-icon", name: this.trailingIcon, size: "sm" }))))) : (h("slot", null))));
90
+ return (h(Host, { key: '908abbe8e2e9aa215641dd056c70dc16f36c3ac3' }, !this.hasSlot ? (h(Fragment, null, !this.undismissable && (h("nv-button", { onClick: this.handleCancel, emphasis: "low", size: "sm" }, this.cancelLabel)), h("nv-button", { onClick: this.handlePrimary, disabled: this.disabled, danger: this.danger, size: "sm", emphasis: "high", form: this.form, type: this.primaryButtonType }, this.leadingIcon && (h("nv-icon", { slot: "leading-icon", name: this.leadingIcon, size: "sm" })), this.primaryLabel, this.trailingIcon && (h("nv-icon", { slot: "trailing-icon", name: this.trailingIcon, size: "sm" }))))) : (h("slot", null))));
91
91
  }
92
92
  static get formAssociated() { return true; }
93
93
  get el() { return this; }
@@ -135,4 +135,4 @@ defineCustomElement();
135
135
 
136
136
  export { NvDialogfooter as N, defineCustomElement as d };
137
137
 
138
- //# sourceMappingURL=p-00347aae.js.map
138
+ //# sourceMappingURL=p-94ad267c.js.map
@@ -1 +1 @@
1
- {"file":"p-00347aae.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAAG,0QAA0Q,CAAC;AACrS,6BAAe,iBAAiB;;MCqBnB,cAAc;IAN3B;;;;;;QASU,YAAO,GAAG,KAAK,CAAC;;;;;;QASf,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,kBAAa,GAAY,KAAK,CAAC;;;;QAM/B,gBAAW,GAAW,EAAE,CAAC;;;;QAMzB,iBAAY,GAAW,EAAE,CAAC;;;;QAM1B,WAAM,GAAY,KAAK,CAAC;;;;QAMxB,gBAAW,GAAW,QAAQ,CAAC;;;;QAM/B,iBAAY,GAAW,SAAS,CAAC;;;;;;;;QA0ClC,kBAAa,GAAG,CAAC,KAAY;YACnC,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;SAClC,CAAC;;;;;QAMM,iBAAY,GAAG,CAAC,KAAY;YAClC,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;SAC5B,CAAC;KAwEH;;;;IAlEC,iBAAiB;;QAEf,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI;YACrD,QACE,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;gBACnC,CAAE,IAAgB,CAAC,YAAY,CAAC,MAAM,CAAC,EACvC;SACH,CAAC,CAAC;KACJ;IAED,gBAAgB;;QAEd,IAAI,CAAC,iBAAiB;YACpB,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,IAAI;kBAC/B,UAAU,CAAC,MAAM;kBACjB,UAAU,CAAC,MAAM,CAAC;KACzB;;;;IAMD,MAAM;QACJ,QACE,EAAC,IAAI,uDACF,CAAC,IAAI,CAAC,OAAO,IACZ,EAAC,QAAQ,QACN,CAAC,IAAI,CAAC,aAAa,KAClB,iBAAW,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAC,KAAK,EAAC,IAAI,EAAC,IAAI,IAC5D,IAAI,CAAC,WAAW,CACP,CACb,EACD,iBACE,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,IAAI,EACT,QAAQ,EAAC,MAAM,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,iBAAiB,IAE3B,IAAI,CAAC,WAAW,KACf,eACE,IAAI,EAAC,cAAc,EACnB,IAAI,EAAE,IAAI,CAAC,WAAW,EACtB,IAAI,EAAC,IAAI,GACT,CACH,EACA,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,KAChB,eACE,IAAI,EAAC,eAAe,EACpB,IAAI,EAAE,IAAI,CAAC,YAAY,EACvB,IAAI,EAAC,IAAI,GACT,CACH,CACS,CACH,KAEX,eAAa,CACd,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-dialogfooter/nv-dialogfooter.scss?tag=nv-dialogfooter","src/components/nv-dialogfooter/nv-dialogfooter.tsx"],"sourcesContent":["nv-dialogfooter {\n display: flex;\n padding: var(--dialog-footer-padding-top) var(--dialog-footer-padding-x)\n var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);\n\n justify-content: flex-end;\n align-items: flex-end;\n gap: var(--dialog-footer-gap-y);\n align-self: stretch;\n}\n","import {\n AttachInternals,\n Component,\n h,\n Host,\n Prop,\n Event,\n EventEmitter,\n Fragment,\n Element,\n} from '@stencil/core';\nimport { ButtonType } from '../../utils/constants';\n\n/**\n * @slot default - Custom content for the dialog footer. When provided, the default buttons will not be rendered.\n */\n@Component({\n tag: 'nv-dialogfooter',\n styleUrl: 'nv-dialogfooter.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvDialogfooter {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvDialogfooterElement;\n private hasSlot = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Disables the primary button, preventing user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Controls the visibility of the cancel button. When true, the cancel button is\n * hidden.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * Sets the leading icon for the primary button.\n */\n @Prop({ reflect: true })\n readonly leadingIcon: string = '';\n\n /**\n * Sets the trailing icon for the primary button.\n */\n @Prop({ reflect: true })\n readonly trailingIcon: string = '';\n\n /**\n * Sets the danger state for the primary button.\n */\n @Prop({ reflect: true })\n readonly danger: boolean = false;\n\n /**\n * Sets the label for the cancel button.\n */\n @Prop({ reflect: true })\n readonly cancelLabel: string = 'Cancel';\n\n /**\n * Sets the label for the primary button.\n */\n @Prop({ reflect: true })\n readonly primaryLabel: string = 'Primary';\n\n /**\n * Sets the type of the primary button. If using a form, this will default to\n * 'submit' if nothing passed.\n */\n @Prop({ reflect: true, mutable: true })\n primaryButtonType: `${ButtonType}`;\n\n /**\n * A form inside the dialog can be submitted through the dialog footer by\n * giving the form an id and passing that id to the form attribute.\n */\n @Prop({ reflect: true })\n readonly form: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the cancel button is clicked. This will close the dialog.\n */\n @Event()\n dialogCanceled: EventEmitter<void>;\n\n /**\n * Emitted when the primary button is clicked. This allows to handle the\n * primary action and potential data capture before closing the dialog.\n */\n @Event()\n dialogPrimaryClicked: EventEmitter<void>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the primary action when the primary button is clicked.\n * @param {Event} event - The click event.\n */\n\n private handlePrimary = (event: Event) => {\n event.stopPropagation();\n this.dialogPrimaryClicked.emit();\n };\n\n /**\n * Handles the cancel action when the cancel button is clicked. This will close the dialog.\n * @param {Event} event - The click event.\n */\n private handleCancel = (event: Event) => {\n event.stopPropagation();\n this.dialogCanceled.emit();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n // Check if there are any child elements that don't have a slot attribute\n this.hasSlot = Array.from(this.el.childNodes).some(node => {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n !(node as Element).hasAttribute('slot')\n );\n });\n }\n\n componentDidLoad() {\n // Set the default button type based on the form property\n this.primaryButtonType =\n this.primaryButtonType || this.form\n ? ButtonType.Submit\n : ButtonType.Button;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {!this.hasSlot ? (\n <Fragment>\n {!this.undismissable && (\n <nv-button onClick={this.handleCancel} emphasis=\"low\" size=\"sm\">\n {this.cancelLabel}\n </nv-button>\n )}\n <nv-button\n onClick={this.handlePrimary}\n disabled={this.disabled}\n danger={this.danger}\n size=\"sm\"\n emphasis=\"high\"\n form={this.form}\n type={this.primaryButtonType}\n >\n {this.leadingIcon && (\n <nv-icon\n slot=\"leading-icon\"\n name={this.leadingIcon}\n size=\"sm\"\n />\n )}\n {this.primaryLabel}\n {this.trailingIcon && (\n <nv-icon\n slot=\"trailing-icon\"\n name={this.trailingIcon}\n size=\"sm\"\n />\n )}\n </nv-button>\n </Fragment>\n ) : (\n <slot></slot>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
1
+ {"file":"p-94ad267c.js","mappings":";;;;;;AAAA,MAA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AAE,QAAQ,EAAC,KAAK,EAAC,IAAI,EAAC,IAAI,IAC5D,IAAI,CAAC,WAAW,CACP,CACb,EACD,iBACE,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,IAAI,EACT,QAAQ,EAAC,MAAM,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,iBAAiB,IAE3B,IAAI,CAAC,WAAW,KACf,eACE,IAAI,EAAC,cAAc,EACnB,IAAI,EAAE,IAAI,CAAC,WAAW,EACtB,IAAI,EAAC,IAAI,GACT,CACH,EACA,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,KAChB,eACE,IAAI,EAAC,eAAe,EACpB,IAAI,EAAE,IAAI,CAAC,YAAY,EACvB,IAAI,EAAC,IAAI,GACT,CACH,CACS,CACH,KAEX,eAAa,CACd,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-dialogfooter/nv-dialogfooter.scss?tag=nv-dialogfooter","src/components/nv-dialogfooter/nv-dialogfooter.tsx"],"sourcesContent":["nv-dialogfooter {\n display: flex;\n padding: var(--dialog-footer-padding-top) var(--dialog-footer-padding-x)\n var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);\n\n justify-content: flex-end;\n align-items: flex-end;\n gap: var(--dialog-footer-gap-y);\n align-self: stretch;\n}\n","import {\n AttachInternals,\n Component,\n h,\n Host,\n Prop,\n Event,\n EventEmitter,\n Fragment,\n Element,\n} from '@stencil/core';\nimport { ButtonType } from '../../utils/constants';\n\n/**\n * @slot default - Custom content for the dialog footer. When provided, the default buttons will not be rendered.\n */\n@Component({\n tag: 'nv-dialogfooter',\n styleUrl: 'nv-dialogfooter.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvDialogfooter {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvDialogfooterElement;\n private hasSlot = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Disables the primary button, preventing user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Controls the visibility of the cancel button. When true, the cancel button is\n * hidden.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * Sets the leading icon for the primary button.\n */\n @Prop({ reflect: true })\n readonly leadingIcon: string = '';\n\n /**\n * Sets the trailing icon for the primary button.\n */\n @Prop({ reflect: true })\n readonly trailingIcon: string = '';\n\n /**\n * Sets the danger state for the primary button.\n */\n @Prop({ reflect: true })\n readonly danger: boolean = false;\n\n /**\n * Sets the label for the cancel button.\n */\n @Prop({ reflect: true })\n readonly cancelLabel: string = 'Cancel';\n\n /**\n * Sets the label for the primary button.\n */\n @Prop({ reflect: true })\n readonly primaryLabel: string = 'Primary';\n\n /**\n * Sets the type of the primary button. If using a form, this will default to\n * 'submit' if nothing passed.\n */\n @Prop({ reflect: true, mutable: true })\n primaryButtonType: `${ButtonType}`;\n\n /**\n * A form inside the dialog can be submitted through the dialog footer by\n * giving the form an id and passing that id to the form attribute.\n */\n @Prop({ reflect: true })\n readonly form: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the cancel button is clicked. This will close the dialog.\n */\n @Event()\n dialogCanceled: EventEmitter<void>;\n\n /**\n * Emitted when the primary button is clicked. This allows to handle the\n * primary action and potential data capture before closing the dialog.\n */\n @Event()\n dialogPrimaryClicked: EventEmitter<void>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the primary action when the primary button is clicked.\n * @param {Event} event - The click event.\n */\n\n private handlePrimary = (event: Event) => {\n event.stopPropagation();\n this.dialogPrimaryClicked.emit();\n };\n\n /**\n * Handles the cancel action when the cancel button is clicked. This will close the dialog.\n * @param {Event} event - The click event.\n */\n private handleCancel = (event: Event) => {\n event.stopPropagation();\n this.dialogCanceled.emit();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n // Check if there are any child elements that don't have a slot attribute\n this.hasSlot = Array.from(this.el.childNodes).some(node => {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n !(node as Element).hasAttribute('slot')\n );\n });\n }\n\n componentDidLoad() {\n // Set the default button type based on the form property\n this.primaryButtonType =\n this.primaryButtonType || this.form\n ? ButtonType.Submit\n : ButtonType.Button;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {!this.hasSlot ? (\n <Fragment>\n {!this.undismissable && (\n <nv-button onClick={this.handleCancel} emphasis=\"low\" size=\"sm\">\n {this.cancelLabel}\n </nv-button>\n )}\n <nv-button\n onClick={this.handlePrimary}\n disabled={this.disabled}\n danger={this.danger}\n size=\"sm\"\n emphasis=\"high\"\n form={this.form}\n type={this.primaryButtonType}\n >\n {this.leadingIcon && (\n <nv-icon\n slot=\"leading-icon\"\n name={this.leadingIcon}\n size=\"sm\"\n />\n )}\n {this.primaryLabel}\n {this.trailingIcon && (\n <nv-icon\n slot=\"trailing-icon\"\n name={this.trailingIcon}\n size=\"sm\"\n />\n )}\n </nv-button>\n </Fragment>\n ) : (\n <slot></slot>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
@@ -22,7 +22,7 @@ const NvLoader = /*@__PURE__*/ proxyCustomElement(class NvLoader extends H {
22
22
  //#region RENDER
23
23
  /* <slot> empty to force rendering change */
24
24
  render() {
25
- return (h(Host, { key: 'b90db971210fb08781098cefaf8832bd5692a09e', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
25
+ return (h(Host, { key: '049afa243c1ce99643408d86afa99e69c5468b8b', class: clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
26
26
  }
27
27
  static get style() { return NvLoaderStyle0; }
28
28
  }, [0, "nv-loader", {
@@ -46,4 +46,4 @@ defineCustomElement();
46
46
 
47
47
  export { NvLoader as N, defineCustomElement as d };
48
48
 
49
- //# sourceMappingURL=p-222136c2.js.map
49
+ //# sourceMappingURL=p-996438a2.js.map
@@ -1 +1 @@
1
- {"file":"p-222136c2.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,qoHAAqoH,CAAC;AAC1pH,uBAAe,WAAW;;MCSb,QAAQ;IALrB;;;;;;;;;;QAeW,SAAI,GAAuB,IAAI,CAAC;KA2B1C;;;;;IAZC,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CACT,IAAI,CAAC,IAAI,IAAI,QAAQ,IAAI,CAAC,IAAI,EAAE,EAChC,IAAI,CAAC,KAAK,IAAI,SAAS,IAAI,CAAC,KAAK,EAAE,CACpC,GACK,EACR;KACH;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-loader/nv-loader.scss?tag=nv-loader","src/components/nv-loader/nv-loader.tsx"],"sourcesContent":["@use \"sass:map\";\n\n/* Variants */\n$loader-sizes: (\"xs\", \"sm\", \"md\", \"lg\", \"xl\");\n$loader-color: (\"brand\", \"white\");\n\n/* Define maps for color-related variables */\n$components-loader-background: (\n \"brand\": var(--components-loader-brand-background),\n \"white\": var(--components-loader-white-background)\n);\n\n$components-loader-foreground: (\n \"brand\": var(--components-loader-brand-foreground),\n \"white\": var(--components-loader-white-foreground)\n);\n\n/* Define maps for size-related variables */\n$components-loader-size: (\n \"xs\": var(--loader-size-xs),\n \"sm\": var(--loader-size-sm),\n \"md\": var(--loader-size-md),\n \"lg\": var(--loader-size-lg),\n \"xl\": var(--loader-size-xl)\n);\n\n@mixin root-styles() {\n display: inline-block;\n position: relative;\n aspect-ratio: 1 / 1;\n border-radius: 9999px;\n color: inherit;\n}\n\n@mixin size-styles($size) {\n $loader-size: map.get($components-loader-size, $size);\n $border-size: calc($loader-size / 10);\n\n width: $loader-size;\n height: $loader-size;\n\n &::before,\n &::after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n border-radius: inherit;\n width: 100%;\n height: 100%;\n }\n\n &::before {\n content: \" \";\n border: $border-size solid;\n opacity: 0.3;\n }\n\n &::after {\n content: \" \";\n border-top: $border-size solid transparent;\n border-left: $border-size solid transparent;\n border-right: $border-size solid transparent;\n border-bottom: $border-size solid;\n animation: rotation 1s linear infinite;\n }\n}\n\n@mixin color-styles($color) {\n &::before {\n border-color: map.get($components-loader-background, $color);\n opacity: 1;\n }\n\n &::after {\n border-bottom-color: map.get($components-loader-foreground, $color);\n }\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\nnv-loader {\n @include root-styles();\n\n @each $size in $loader-sizes {\n &.size-#{$size} {\n @include size-styles($size);\n }\n }\n\n @each $color in $loader-color {\n &.color-#{$color} {\n @include color-styles($color);\n }\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport { SemanticSizes, LoaderColors } from '../../utils/constants';\n\n@Component({\n tag: 'nv-loader',\n styleUrl: 'nv-loader.scss',\n shadow: false,\n})\nexport class NvLoader {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Choose the size of the loader to best fit your application’s needs, whether\n * it’s a small spinner for subtle loading indicators or a large one for more\n * prominent displays.\n */\n @Prop({ reflect: true })\n readonly size: `${SemanticSizes}` = 'md';\n\n /**\n * Choose the color of the loader. Options are primary and white to keep the\n * design consistent and ensure the loader stands out or blends in\n * appropriately with your application’s interface.\n */\n @Prop({ reflect: true })\n readonly color: `${LoaderColors}`;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region RENDER\n\n /* <slot> empty to force rendering change */\n render() {\n return (\n <Host\n class={clsx(\n this.size && `size-${this.size}`,\n this.color && `color-${this.color}`,\n )}\n ></Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
1
+ {"file":"p-996438a2.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,qoHAAqoH,CAAC;AAC1pH,uBAAe,WAAW;;MCSb,QAAQ;IALrB;;;;;;;;;;QAeW,SAAI,GAAuB,IAAI,CAAC;KA2B1C;;;;;IAZC,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CACT,IAAI,CAAC,IAAI,IAAI,QAAQ,IAAI,CAAC,IAAI,EAAE,EAChC,IAAI,CAAC,KAAK,IAAI,SAAS,IAAI,CAAC,KAAK,EAAE,CACpC,GACK,EACR;KACH;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-loader/nv-loader.scss?tag=nv-loader","src/components/nv-loader/nv-loader.tsx"],"sourcesContent":["@use \"sass:map\";\n\n/* Variants */\n$loader-sizes: (\"xs\", \"sm\", \"md\", \"lg\", \"xl\");\n$loader-color: (\"brand\", \"white\");\n\n/* Define maps for color-related variables */\n$components-loader-background: (\n \"brand\": var(--components-loader-brand-background),\n \"white\": var(--components-loader-white-background)\n);\n\n$components-loader-foreground: (\n \"brand\": var(--components-loader-brand-foreground),\n \"white\": var(--components-loader-white-foreground)\n);\n\n/* Define maps for size-related variables */\n$components-loader-size: (\n \"xs\": var(--loader-size-xs),\n \"sm\": var(--loader-size-sm),\n \"md\": var(--loader-size-md),\n \"lg\": var(--loader-size-lg),\n \"xl\": var(--loader-size-xl)\n);\n\n@mixin root-styles() {\n display: inline-block;\n position: relative;\n aspect-ratio: 1 / 1;\n border-radius: 9999px;\n color: inherit;\n}\n\n@mixin size-styles($size) {\n $loader-size: map.get($components-loader-size, $size);\n $border-size: calc($loader-size / 10);\n\n width: $loader-size;\n height: $loader-size;\n\n &::before,\n &::after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n border-radius: inherit;\n width: 100%;\n height: 100%;\n }\n\n &::before {\n content: \" \";\n border: $border-size solid;\n opacity: 0.3;\n }\n\n &::after {\n content: \" \";\n border-top: $border-size solid transparent;\n border-left: $border-size solid transparent;\n border-right: $border-size solid transparent;\n border-bottom: $border-size solid;\n animation: rotation 1s linear infinite;\n }\n}\n\n@mixin color-styles($color) {\n &::before {\n border-color: map.get($components-loader-background, $color);\n opacity: 1;\n }\n\n &::after {\n border-bottom-color: map.get($components-loader-foreground, $color);\n }\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\nnv-loader {\n @include root-styles();\n\n @each $size in $loader-sizes {\n &.size-#{$size} {\n @include size-styles($size);\n }\n }\n\n @each $color in $loader-color {\n &.color-#{$color} {\n @include color-styles($color);\n }\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport { SemanticSizes, LoaderColors } from '../../utils/constants';\n\n@Component({\n tag: 'nv-loader',\n styleUrl: 'nv-loader.scss',\n shadow: false,\n})\nexport class NvLoader {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Choose the size of the loader to best fit your application’s needs, whether\n * it’s a small spinner for subtle loading indicators or a large one for more\n * prominent displays.\n */\n @Prop({ reflect: true })\n readonly size: `${SemanticSizes}` = 'md';\n\n /**\n * Choose the color of the loader. Options are primary and white to keep the\n * design consistent and ensure the loader stands out or blends in\n * appropriately with your application’s interface.\n */\n @Prop({ reflect: true })\n readonly color: `${LoaderColors}`;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region RENDER\n\n /* <slot> empty to force rendering change */\n render() {\n return (\n <Host\n class={clsx(\n this.size && `size-${this.size}`,\n this.color && `color-${this.color}`,\n )}\n ></Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
@@ -1,6 +1,31 @@
1
1
  import { i as index } from './p-a271e3be.js';
2
2
  import { a as animate } from './p-42ea6b74.js';
3
3
 
4
+ /**
5
+ * Adds a set of event listeners to the given target.
6
+ * @param {EventsAndListeners} events - The events and listeners to add.
7
+ * @param {Element | Window | Document} target - The target element or window to add the event listeners to.
8
+ * @param {T} context - The class context to bind the event listeners to.
9
+ */
10
+ function addEventListeners(events, target, context) {
11
+ events.forEach(([event, listener]) => target.addEventListener(event, listener.bind(context)));
12
+ }
13
+ /**
14
+ * Removes a set of event listeners from the given target.
15
+ * @param {EventsAndListeners} events - The events and listeners to remove.
16
+ * @param {Element | Window | Document} target - The target element or window to remove the event listeners from.
17
+ * @param {T} context - The class context to bind the event listeners to.
18
+ */
19
+ function removeEventListeners(events, target, context) {
20
+ events.forEach(([event, listener]) => target.removeEventListener(event, listener.bind(context)));
21
+ }
22
+
23
+ const events_utils = /*#__PURE__*/Object.freeze({
24
+ __proto__: null,
25
+ addEventListeners: addEventListeners,
26
+ removeEventListeners: removeEventListeners
27
+ });
28
+
4
29
  const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) => {
5
30
  const nodeStyler = index(node);
6
31
  /**
@@ -85,6 +110,6 @@ const useGrow = (node, { duration = 200, amount = 0.8, hasFade = true } = {}) =>
85
110
  };
86
111
  };
87
112
 
88
- export { useGrow as u };
113
+ export { addEventListeners as a, events_utils as e, removeEventListeners as r, useGrow as u };
89
114
 
90
- //# sourceMappingURL=p-4697bd56.js.map
115
+ //# sourceMappingURL=p-996ed843.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-996ed843.js","mappings":";;;AAEA;;;;;;SAMgB,iBAAiB,CAC/B,MAA0B,EAC1B,MAAmC,EACnC,OAAU;IAEV,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,KAC/B,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CACvD,CAAC;AACJ,CAAC;AAED;;;;;;SAMgB,oBAAoB,CAClC,MAA0B,EAC1B,MAAmC,EACnC,OAAU;IAEV,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,KAC/B,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC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,EAAE;YACX,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;SAC1B;KACF;;;;;IAMD,SAAS,OAAO;QACd,OAAO,IAAI,OAAO,CAAO,OAAO;YAC9B,OAAO,CAAC;gBACN,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC9B,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;gBAC/C,QAAQ;gBACR,QAAQ,CAAC,MAAM;oBACb,MAAM,OAAO,GAAG;wBACd,KAAK,EAAE,MAAM,CAAC,KAAK;qBACpB,CAAC;oBACF,IAAI,OAAO,EAAE;wBACX,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;qBACrC;oBACD,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;iBACzB;gBACD,UAAU;oBACR,OAAO,EAAE,CAAC;iBACX;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;IAED,OAAO;QACL,MAAM;QACN,OAAO;QACP,UAAU;QACV,SAAS;KACV,CAAC;AACJ;;;;","names":["styler"],"sources":["src/utils/events.utils.ts","src/animations/grow.animation.ts"],"sourcesContent":["export type EventsAndListeners = [string, EventListener][];\n\n/**\n * Adds a set of event listeners to the given target.\n * @param {EventsAndListeners} events - The events and listeners to add.\n * @param {Element | Window | Document} target - The target element or window to add the event listeners to.\n * @param {T} context - The class context to bind the event listeners to.\n */\nexport function addEventListeners<T>(\n events: EventsAndListeners,\n target: Element | Window | Document,\n context: T,\n) {\n events.forEach(([event, listener]) =>\n target.addEventListener(event, listener.bind(context)),\n );\n}\n\n/**\n * Removes a set of event listeners from the given target.\n * @param {EventsAndListeners} events - The events and listeners to remove.\n * @param {Element | Window | Document} target - The target element or window to remove the event listeners from.\n * @param {T} context - The class context to bind the event listeners to.\n */\nexport function removeEventListeners<T>(\n events: EventsAndListeners,\n target: Element | Window | Document,\n context: T,\n) {\n events.forEach(([event, listener]) =>\n target.removeEventListener(event, listener.bind(context)),\n );\n}\n","import { animate } from 'popmotion';\nimport styler from 'stylefire';\n\nexport type GrowOptions = {\n /** How long the animation should take in ms @default 200 */\n duration?: number;\n /** The amount to scale the element by @default 0.8 */\n amount?: number;\n /** Whether to include a fade effect in the animation @default true */\n hasFade?: boolean;\n};\n\nconst useGrow = (\n node: HTMLElement,\n { duration = 200, amount = 0.8, hasFade = true }: GrowOptions = {},\n) => {\n const nodeStyler = styler(node);\n\n /**\n * Will animate the scale and optionally the opacity to make the element grow and fade in,\n * and removes the scale and opacity style attributes once complete.\n */\n function growIn() {\n return new Promise<void>(resolve => {\n animate({\n from: { opacity: hasFade ? 0 : 1, scale: amount },\n to: { opacity: 1, scale: 1 },\n duration,\n onUpdate(latest) {\n const updates = {\n scale: latest.scale,\n };\n if (hasFade) {\n updates['opacity'] = latest.opacity;\n }\n nodeStyler.set(updates);\n },\n onComplete() {\n resolve();\n if (hasFade) {\n node.style.removeProperty('opacity');\n }\n node.style.removeProperty('transform');\n },\n });\n });\n }\n\n /**\n * Applies the growOut styles without animating, useful when the initial\n * state is hidden.\n */\n function setGrowOut() {\n node.style.transform = `scale(${amount})`;\n if (hasFade) {\n node.style.opacity = '0';\n }\n }\n\n /**\n * Applies the growIn styles without animating, useful when the initial\n * state is visible.\n */\n function setGrowIn() {\n node.style.transform = `scale(1)`;\n if (hasFade) {\n node.style.opacity = '1';\n }\n }\n\n /**\n * Will animate the scale and optionally the opacity to make the element shrink and fade out,\n * leaving the scale and opacity styles on the element.\n */\n function growOut() {\n return new Promise<void>(resolve => {\n animate({\n from: { opacity: 1, scale: 1 },\n to: { opacity: hasFade ? 0 : 1, scale: amount },\n duration,\n onUpdate(latest) {\n const updates = {\n scale: latest.scale,\n };\n if (hasFade) {\n updates['opacity'] = latest.opacity;\n }\n nodeStyler.set(updates);\n },\n onComplete() {\n resolve();\n },\n });\n });\n }\n\n return {\n growIn,\n growOut,\n setGrowOut,\n setGrowIn,\n };\n};\n\nexport { useGrow };\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, h, d as Host } from './p-5829b9f7.js';
2
2
  import { b as ButtonType, B as ButtonSize } from './p-51602221.js';
3
- import { d as defineCustomElement$1 } from './p-222136c2.js';
3
+ import { d as defineCustomElement$1 } from './p-996438a2.js';
4
4
 
5
5
  const nvButtonCss = "nv-button{text-decoration:none;display:inline-flex;justify-content:center;align-items:center;font-style:normal;font-weight:var(--font-weight-medium-emphasis);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;transition:background-color 150ms ease-out;user-select:none;cursor:pointer;height:fit-content;width:fit-content}nv-button[size=xs]{padding:var(--button-xs-padding-y) var(--button-xs-padding-x);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);height:var(--button-xs-height);font-size:var(--button-xs-font-size)}nv-button[size=xs] nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-button[size=sm]{padding:var(--button-sm-padding-y) var(--button-sm-padding-x);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);height:var(--button-sm-height);font-size:var(--button-sm-font-size)}nv-button[size=sm] nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-button[size=md]{padding:var(--button-md-padding-y) var(--button-md-padding-x);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);height:var(--button-md-height);font-size:var(--button-md-font-size)}nv-button[size=md] nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-button[size=lg]{padding:var(--button-lg-padding-y) var(--button-lg-padding-x);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);height:var(--button-lg-height);font-size:var(--button-lg-font-size)}nv-button[size=lg] nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-button[emphasis=high]{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-button[emphasis=high]:hover{background:var(--components-button-high-background-hover);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text-hover)}nv-button[emphasis=high]:active{background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high]:focus,nv-button[emphasis=high]:focus-within{outline:none}nv-button[emphasis=high]:focus-visible,nv-button[emphasis=high]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=high]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=high][active]:not([active=false]){background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high][danger]:not([danger=false]){background:var(--components-button-destructive-high-background);border:1px solid transparent;color:var(--components-button-destructive-high-text)}nv-button[emphasis=high][danger]:not([danger=false]):hover{background:var(--components-button-destructive-high-background-hover);border:1px solid transparent;color:var(--components-button-destructive-high-text-hover)}nv-button[emphasis=high][danger]:not([danger=false]):focus,nv-button[emphasis=high][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=high][danger]:not([danger=false]):focus-visible,nv-button[emphasis=high][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-button[emphasis=medium]:hover{background:var(--components-button-medium-background-hover);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text-hover)}nv-button[emphasis=medium]:active{background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium]:focus,nv-button[emphasis=medium]:focus-within{outline:none}nv-button[emphasis=medium]:focus-visible,nv-button[emphasis=medium]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=medium][active]:not([active=false]){background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium][danger]:not([danger=false]){background:var(--components-button-destructive-medium-background);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text)}nv-button[emphasis=medium][danger]:not([danger=false]):hover{background:var(--components-button-destructive-medium-background-hover);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text-hover)}nv-button[emphasis=medium][danger]:not([danger=false]):focus,nv-button[emphasis=medium][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=medium][danger]:not([danger=false]):focus-visible,nv-button[emphasis=medium][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-button[emphasis=low]:hover{background:var(--components-button-low-background-hover);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text-hover)}nv-button[emphasis=low]:active{background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low]:focus,nv-button[emphasis=low]:focus-within{outline:none}nv-button[emphasis=low]:focus-visible,nv-button[emphasis=low]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=low][active]:not([active=false]){background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low][danger]:not([danger=false]){background:var(--components-button-destructive-low-background);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text)}nv-button[emphasis=low][danger]:not([danger=false]):hover{background:var(--components-button-destructive-low-background-hover);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text-hover)}nv-button[emphasis=low][danger]:not([danger=false]):focus,nv-button[emphasis=low][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=low][danger]:not([danger=false]):focus-visible,nv-button[emphasis=low][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-button[emphasis=lower]:hover{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}nv-button[emphasis=lower]:active{background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower]:focus,nv-button[emphasis=lower]:focus-within{outline:none}nv-button[emphasis=lower]:focus-visible,nv-button[emphasis=lower]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=lower][active]:not([active=false]){background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower][danger]:not([danger=false]){background:var(--components-button-destructive-lower-background);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text)}nv-button[emphasis=lower][danger]:not([danger=false]):hover{background:var(--components-button-destructive-lower-background-hover);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text-hover)}nv-button[emphasis=lower][danger]:not([danger=false]):focus,nv-button[emphasis=lower][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=lower][danger]:not([danger=false]):focus-visible,nv-button[emphasis=lower][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[fluid]:not([fluid=false]){width:100%}nv-button[loading]:not([loading=false]) [slot=leading-icon]{display:none}";
6
6
  const NvButtonStyle0 = nvButtonCss;
@@ -188,4 +188,4 @@ defineCustomElement();
188
188
 
189
189
  export { NvButton as N, defineCustomElement as d };
190
190
 
191
- //# sourceMappingURL=p-2062ba39.js.map
191
+ //# sourceMappingURL=p-af663ff5.js.map
@@ -1 +1 @@
1
- {"file":"p-2062ba39.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,4/TAA4/T,CAAC;AACjhU,uBAAe,WAAW;;MCuBb,QAAQ;IANrB;;;;;;;;;;;QAmBW,SAAI,GAAoB,IAAI,CAAC;;;;;;QAQ7B,aAAQ,GAAwB,MAAM,CAAC;;;;;QAOvC,WAAM,GAAY,KAAK,CAAC;;;;;QAOxB,WAAM,GAAY,KAAK,CAAC;;;;;;QAQjC,YAAO,GAAY,KAAK,CAAC;;;;QAMzB,aAAQ,GAAY,KAAK,CAAC;;;;QAMjB,UAAK,GAAY,KAAK,CAAC;;;;;;QAQvB,SAAI,GAAoB,QAAQ,CAAC;;;;;QAcjC,oBAAe,GAAY,KAAK,CAAC;;;;;;;;;;QAYlC,sBAAiB,GAAG,CAAC,KAAY;;YACvC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjC,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO;aACR;YAED,IACE,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM;iBAC9B,IAAI,CAAC,IAAI,KAAI,MAAA,IAA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AAiB;QACpC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;SAC9B;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;SAC1B;KACF;;;;IAMD,iBAAiB;QACf,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;SAC9B;KACF;;;;IAMD,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,GAAG,CAAC,EACvC,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAE9B,IAAI,CAAC,OAAO,KACX,kEACE,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,GACvC,CACd,EAED,6DAAM,IAAI,EAAC,cAAc,GAAQ,EACjC,8DAAa,EACb,6DAAM,IAAI,EAAC,eAAe,GAAQ,CAC7B,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-button/styles/nv-button.scss?tag=nv-button","src/components/nv-button/nv-button.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\n// Make sure to update nv-button class in the tailwind-components.scss file when\n// you add new styles or change the structure here.\nnv-button {\n @include root-styles();\n\n @each $size in $sizes {\n &[size=\"#{$size}\"] {\n @include size-styles($size);\n }\n }\n\n @each $emphasis in $emphases {\n &[emphasis=\"#{$emphasis}\"] {\n @include emphasis-styles($emphasis);\n\n &[active]:not([active=\"false\"]) {\n @include active-styles($emphasis);\n }\n\n &[danger]:not([danger=\"false\"]) {\n @include danger-styles($emphasis);\n }\n }\n }\n\n &[fluid]:not([fluid=\"false\"]) {\n @include fluid-styles();\n }\n\n &[loading]:not([loading=\"false\"]) {\n [slot=\"leading-icon\"] {\n display: none;\n }\n }\n}\n","import {\n Component,\n Listen,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n} from '@stencil/core';\n\nimport { ButtonSize, ButtonEmphasis, ButtonType } from '../../utils/constants';\n\n/**\n * @slot default - Content of the button.\n * @slot leading-icon - Icon before the label.\n * @slot trailing-icon - Icon after the label.\n */\n@Component({\n tag: 'nv-button',\n shadow: false,\n formAssociated: true,\n styleUrl: 'styles/nv-button.scss',\n})\nexport class NvButton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvButtonElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small the button appears, allowing for\n * customization of the button's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ButtonSize}` = 'md';\n\n /**\n * Adjusts the button's emphasis to make it more or less visually prominent\n * to users. Use this to draw attention to important actions or reduce focus\n * on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ButtonEmphasis}` = 'high';\n\n /**\n * Use this prop to highlight the button when it represents the current page\n * or active selection. This helps users understand their navigation context.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Applies styling that visually indicates the button represents a dangerous\n * action.\n */\n @Prop({ reflect: true })\n readonly danger: boolean = false;\n\n /**\n * Set this to true to show a spinner on the button, letting users know that\n * their action is being processed. It helps improve user experience by\n * indicating ongoing activities.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ reflect: true, mutable: true })\n disabled: boolean = false;\n\n /**\n * Allows the button to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n /**\n * Sets the button type to control its function in forms. Use 'submit' to send\n * form data, 'reset' to clear the form, or 'button' for a standard button\n * that doesn't interact with form submission by default.\n */\n @Prop({ reflect: true })\n readonly type: `${ButtonType}` = 'button';\n\n /**\n * Sets the form associated with the button in case the (submit) button is not a child of a form.\n * Matches the native HTML button 'form' attribute behavior.\n */\n @Prop({ reflect: true })\n readonly form: string;\n\n /**\n * Use this to make the button skip-able when users navigate with the keyboard.\n * The button remains clickable but won’t be reached via the Tab key.\n */\n @Prop({ reflect: true })\n readonly disableTabindex: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles button click events, managing form actions and disabled states.\n * Prevents default behavior when button is disabled or loading, and\n * processes form submissions/resets when appropriate.\n * @param {Event} event - The click event.\n */\n private handleButtonClick = (event: Event): void => {\n if (this.loading || this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (\n this.type !== ButtonType.Button &&\n (this.form || this.internals?.form)\n ) {\n this.processFormAction();\n } else if (this.form && this.type === ButtonType.Button) {\n console.warn(\n 'Button has a form id but is not of type submit or reset so no form action will be processed.',\n `Button:`,\n this.el,\n );\n }\n };\n\n /**\n * Processes form-related actions by finding the associated form element\n * and triggering the appropriate action (submit/reset) based on button type.\n * Falls back to ElementInternals form if no explicit form ID is provided.\n */\n private processFormAction = (): void => {\n const formElement = this.form\n ? (document.getElementById(this.form) as HTMLFormElement)\n : this.internals?.form;\n\n if (!formElement) {\n console.warn(\n 'No form element found.',\n `Form ID: ${this.form || 'Not provided'}`,\n `Internals form:`,\n this.internals?.form,\n );\n return;\n }\n\n switch (this.type) {\n case ButtonType.Submit:\n formElement.requestSubmit();\n break;\n case ButtonType.Reset:\n formElement.reset();\n break;\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.el.click();\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('loading')\n handleLoadingChange(loading: boolean) {\n this.loading = loading;\n this.disabled = loading;\n }\n\n @Watch('disabled')\n handleDisabledChange(disabled: boolean) {\n if (this.loading) {\n this.disabled = this.loading;\n } else {\n this.disabled = disabled;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"button\"\n tabindex={this.disableTabindex ? -1 : 0}\n onClick={this.handleButtonClick}\n >\n {this.loading && (\n <nv-loader\n size={this.size === ButtonSize.Large ? 'sm' : 'xs'}\n ></nv-loader>\n )}\n\n <slot name=\"leading-icon\"></slot>\n <slot></slot>\n <slot name=\"trailing-icon\"></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
1
+ {"file":"p-af663ff5.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,4/TAA4/T,CAAC;AACjhU,uBAAe,WAAW;;MCuBb,QAAQ;IANrB;;;;;;;;;;;QAmBW,SAAI,GAAoB,IAAI,CAAC;;;;;;QAQ7B,aAAQ,GAAwB,MAAM,CAAC;;;;;QAOvC,WAAM,GAAY,KAAK,CAAC;;;;;QAOxB,WAAM,GAAY,KAAK,CAAC;;;;;;QAQjC,YAAO,GAAY,KAAK,CAAC;;;;QAMzB,aAAQ,GAAY,KAAK,CAAC;;;;QAMjB,UAAK,GAAY,KAAK,CAAC;;;;;;QAQvB,SAAI,GAAoB,QAAQ,CAAC;;;;;QAcjC,oBAAe,GAAY,KAAK,CAAC;;;;;;;;;;QAYlC,sBAAiB,GAAG,CAAC,KAAY;;YACvC,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjC,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO;aACR;YAED,IACE,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM;iBAC9B,IAAI,CAAC,IAAI,KAAI,MAAA,IAAI,CAAC,SAAS,0CAAE,IAAI,CAAA,CAAC,EACnC;gBACA,IAAI,CAAC,iBAAiB,EAAE,CAAC;aAC1B;iB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AC;SAC9B;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;SAC1B;KACF;;;;IAMD,iBAAiB;QACf,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;SAC9B;KACF;;;;IAMD,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,GAAG,CAAC,EACvC,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAE9B,IAAI,CAAC,OAAO,KACX,kEACE,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,GACvC,CACd,EAED,6DAAM,IAAI,EAAC,cAAc,GAAQ,EACjC,8DAAa,EACb,6DAAM,IAAI,EAAC,eAAe,GAAQ,CAC7B,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nv-button/styles/nv-button.scss?tag=nv-button","src/components/nv-button/nv-button.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\n// Make sure to update nv-button class in the tailwind-components.scss file when\n// you add new styles or change the structure here.\nnv-button {\n @include root-styles();\n\n @each $size in $sizes {\n &[size=\"#{$size}\"] {\n @include size-styles($size);\n }\n }\n\n @each $emphasis in $emphases {\n &[emphasis=\"#{$emphasis}\"] {\n @include emphasis-styles($emphasis);\n\n &[active]:not([active=\"false\"]) {\n @include active-styles($emphasis);\n }\n\n &[danger]:not([danger=\"false\"]) {\n @include danger-styles($emphasis);\n }\n }\n }\n\n &[fluid]:not([fluid=\"false\"]) {\n @include fluid-styles();\n }\n\n &[loading]:not([loading=\"false\"]) {\n [slot=\"leading-icon\"] {\n display: none;\n }\n }\n}\n","import {\n Component,\n Listen,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n} from '@stencil/core';\n\nimport { ButtonSize, ButtonEmphasis, ButtonType } from '../../utils/constants';\n\n/**\n * @slot default - Content of the button.\n * @slot leading-icon - Icon before the label.\n * @slot trailing-icon - Icon after the label.\n */\n@Component({\n tag: 'nv-button',\n shadow: false,\n formAssociated: true,\n styleUrl: 'styles/nv-button.scss',\n})\nexport class NvButton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvButtonElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small the button appears, allowing for\n * customization of the button's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ButtonSize}` = 'md';\n\n /**\n * Adjusts the button's emphasis to make it more or less visually prominent\n * to users. Use this to draw attention to important actions or reduce focus\n * on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ButtonEmphasis}` = 'high';\n\n /**\n * Use this prop to highlight the button when it represents the current page\n * or active selection. This helps users understand their navigation context.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Applies styling that visually indicates the button represents a dangerous\n * action.\n */\n @Prop({ reflect: true })\n readonly danger: boolean = false;\n\n /**\n * Set this to true to show a spinner on the button, letting users know that\n * their action is being processed. It helps improve user experience by\n * indicating ongoing activities.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ reflect: true, mutable: true })\n disabled: boolean = false;\n\n /**\n * Allows the button to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n /**\n * Sets the button type to control its function in forms. Use 'submit' to send\n * form data, 'reset' to clear the form, or 'button' for a standard button\n * that doesn't interact with form submission by default.\n */\n @Prop({ reflect: true })\n readonly type: `${ButtonType}` = 'button';\n\n /**\n * Sets the form associated with the button in case the (submit) button is not a child of a form.\n * Matches the native HTML button 'form' attribute behavior.\n */\n @Prop({ reflect: true })\n readonly form: string;\n\n /**\n * Use this to make the button skip-able when users navigate with the keyboard.\n * The button remains clickable but won’t be reached via the Tab key.\n */\n @Prop({ reflect: true })\n readonly disableTabindex: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles button click events, managing form actions and disabled states.\n * Prevents default behavior when button is disabled or loading, and\n * processes form submissions/resets when appropriate.\n * @param {Event} event - The click event.\n */\n private handleButtonClick = (event: Event): void => {\n if (this.loading || this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (\n this.type !== ButtonType.Button &&\n (this.form || this.internals?.form)\n ) {\n this.processFormAction();\n } else if (this.form && this.type === ButtonType.Button) {\n console.warn(\n 'Button has a form id but is not of type submit or reset so no form action will be processed.',\n `Button:`,\n this.el,\n );\n }\n };\n\n /**\n * Processes form-related actions by finding the associated form element\n * and triggering the appropriate action (submit/reset) based on button type.\n * Falls back to ElementInternals form if no explicit form ID is provided.\n */\n private processFormAction = (): void => {\n const formElement = this.form\n ? (document.getElementById(this.form) as HTMLFormElement)\n : this.internals?.form;\n\n if (!formElement) {\n console.warn(\n 'No form element found.',\n `Form ID: ${this.form || 'Not provided'}`,\n `Internals form:`,\n this.internals?.form,\n );\n return;\n }\n\n switch (this.type) {\n case ButtonType.Submit:\n formElement.requestSubmit();\n break;\n case ButtonType.Reset:\n formElement.reset();\n break;\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.el.click();\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('loading')\n handleLoadingChange(loading: boolean) {\n this.loading = loading;\n this.disabled = loading;\n }\n\n @Watch('disabled')\n handleDisabledChange(disabled: boolean) {\n if (this.loading) {\n this.disabled = this.loading;\n } else {\n this.disabled = disabled;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"button\"\n tabindex={this.disableTabindex ? -1 : 0}\n onClick={this.handleButtonClick}\n >\n {this.loading && (\n <nv-loader\n size={this.size === ButtonSize.Large ? 'sm' : 'xs'}\n ></nv-loader>\n )}\n\n <slot name=\"leading-icon\"></slot>\n <slot></slot>\n <slot name=\"trailing-icon\"></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5829b9f7.js';
2
- import { d as defineCustomElement$1 } from './p-0bfe8a47.js';
2
+ import { d as defineCustomElement$1 } from './p-743b3452.js';
3
3
  import { v as v4 } from './p-f5ff676c.js';
4
4
 
5
5
  const nvFieldtextCss = "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-fieldtext{--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-fieldtext[fluid]:not([fluid=false]){max-width:unset}nv-fieldtext[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-fieldtext[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-fieldtext[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-fieldtext[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldtext>label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldtext>.input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldtext>.input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldtext>.input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtext>.input-wrapper .input-container:focus-within,nv-fieldtext>.input-wrapper .input-container:focus-within:hover,nv-fieldtext>.input-wrapper .input-container:focus,nv-fieldtext>.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-fieldtext>.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-fieldtext>.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-fieldtext>.input-wrapper .input-container>[slot=leading-input]{display:block;margin-left:var(--form-field-padding-x)}nv-fieldtext>.input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%;}nv-fieldtext>.input-wrapper .input-container input:focus{outline:none}nv-fieldtext>.input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldtext>.input-wrapper .input-container input[type=password]::-ms-clear,nv-fieldtext>.input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldtext>.input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default);margin-right:var(--form-gap-x)}nv-fieldtext>.input-wrapper .input-container>[slot=trailing-input]{display:block;margin-right:var(--form-field-padding-x)}nv-fieldtext>.description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtext>.error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
@@ -110,9 +110,9 @@ const NvFieldtext = /*@__PURE__*/ proxyCustomElement(class NvFieldtext extends H
110
110
  /****************************************************************************/
111
111
  //#region RENDER
112
112
  render() {
113
- return (h(Host, { key: '59c03a594971eab5cb8ae4bf7b5342899bba4336' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'a36f03b76cee03be0fe2608fd40a88455818a83b', htmlFor: this.inputId }, h("slot", { key: '284a3f6f9efaed1ee7a40675fd377bdbe3d08d9e', name: "label" }, this.label))), h("div", { key: '963b853f5de42058d1cdced00c7bdc38f4583000', class: "input-wrapper" }, h("slot", { key: 'dce7ea85a9ae76c923ea3dc732d93614b94ba391', name: "before-input" }), h("div", { key: 'eac7b8e1d85f9623287f839cdc7ef3133c9c75d8', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: 'db3ab29c4a0767ffc8f8c1368085052769bdc4cc', name: "leading-input" }), h("input", { key: 'd4759f1dd7bab6da0a4486cf326cb55c61fcb750', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), h("slot", { key: 'e8950b2b41ce5e350e39084c3d6936a1a11960e4', name: "trailing-input" }), this.error && (h("nv-icon", { key: '83eb974690dfd69858877ba434e4dd30802208c8', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '2b8e37bd41e2b98ae17a249379528dd6e1773e6e', name: "circle-check", class: "validation", size: "md" }))), h("slot", { key: '72e5ae030d15c61409095f4067436ee890d21a1e', name: "after-input" })), (this.description ||
114
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '54a353743334cf7d96597a543d0e2a7c52833a31', class: "description" }, h("slot", { key: '70dd9595b638f0dc56db6ecb24a93fcca629a2d3', name: "description" }, this.description))), (this.errorDescription ||
115
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '47a26240ae8875cedb50b95d0ad41dab762af6d3', hidden: !this.error, class: "error-description" }, h("slot", { key: '0c84a7c46128a5c0960b5e2ecfda94f76ef9d7d7', name: "error-description" }, this.errorDescription)))));
113
+ return (h(Host, { key: '0446a4e7617f7a0dd1d617411f13f7ed9ab457e7' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '3fa66b23875eac14db7a52deb0fb8134cda4747b', htmlFor: this.inputId }, h("slot", { key: 'd2d145a273fe7790f6551a4f42564c438c659cbf', name: "label" }, this.label))), h("div", { key: 'b6ca6d9125460402ac1cfc0ed5f57b6db3214edf', class: "input-wrapper" }, h("slot", { key: '33331c013dd5d981136518045a8a460c3ab96070', name: "before-input" }), h("div", { key: '405dc274db9b87fd82f50ecf8653414deb7b1206', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '4b85c02e7c7f7f655c76cac3997d7b4377c9d4b4', name: "leading-input" }), h("input", { key: 'f6e083e97ab21e487bb28190a008469ffa282048', id: this.inputId, ref: e => (this.inputElement = e), placeholder: this.placeholder, name: this.name, type: this.type, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, pattern: this.pattern, autofocus: this.autofocus, autocomplete: this.autocomplete, multiple: this.multiple, value: this.value, onInput: this.handleInput }), h("slot", { key: '019627575fed51776eeb964dafe85c9a0e2e8efe', name: "trailing-input" }), this.error && (h("nv-icon", { key: '0a2952a550e1a3cdc54a97968d8746914ce492d8', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '874f24d0c3522b8d6a2f65069b68d04dba8fae61', name: "circle-check", class: "validation", size: "md" }))), h("slot", { key: '38f43d5e912df5adaf8587b8efb9d44cccadec50', name: "after-input" })), (this.description ||
114
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'c681d56939dc0068fc12842699e74f87d9446fe7', class: "description" }, h("slot", { key: '6b2f715fb44a46efbc3cfb98709173804472499e', name: "description" }, this.description))), (this.errorDescription ||
115
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'f5354afc7bfacec7f7ff58e331e9011bb43da399', hidden: !this.error, class: "error-description" }, h("slot", { key: 'e127f81bf4a9205c94a461fd1555c07783b489a3', name: "error-description" }, this.errorDescription)))));
116
116
  }
117
117
  static get formAssociated() { return true; }
118
118
  get el() { return this; }
@@ -164,4 +164,4 @@ defineCustomElement();
164
164
 
165
165
  export { NvFieldtext as N, defineCustomElement as d };
166
166
 
167
- //# sourceMappingURL=p-c69f5a37.js.map
167
+ //# sourceMappingURL=p-bcf9d309.js.map
@@ -1 +1 @@
1
- {"file":"p-c69f5a37.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,29OAA29O,CAAC;AACn/O,0BAAe,cAAc;;MC2BhB,WAAW;IANxB;;;;;;;;;;;;;QA6CW,YAAO,GAAWA,EAAM,EAAE,CAAC;;;;;;;QAkDpC,SAAI,GAA6B,MAAM,CAAC;;;;;;QAQ/B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KA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CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fieldtext/nv-fieldtext.scss?tag=nv-fieldtext","src/components/nv-fieldtext/nv-fieldtext.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldtext {\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 &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n > label {\n @include form-field-label();\n }\n\n > .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n > [slot='leading-input'] {\n @include form-field-inner-leading-slot();\n }\n\n input {\n @include form-field-input();\n }\n \n\n nv-icon.validation {\n @include form-field-icon();\n margin-right: var(--form-gap-x);\n }\n > [slot='trailing-input'] {\n @include form-field-inner-trailing-slot();\n }\n }\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 Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text Field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop({ reflect: true })\n readonly textInputType: 'text' | 'tel' | 'email';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the textfield\n * field.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription?: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: 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}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
1
+ {"file":"p-bcf9d309.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,29OAA29O,CAAC;AACn/O,0BAAe,cAAc;;MC2BhB,WAAW;IANxB;;;;;;;;;;;;;QA6CW,YAAO,GAAWA,EAAM,EAAE,CAAC;;;;;;;QAkDpC,SAAI,GAA6B,MAAM,CAAC;;;;;;QAQ/B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAed,YAAO,GAAY,KAAK,CAAC;;;;;;QA0CzB,aAAQ,GAAY,KAAK,CAAC;;;;;;QAS1B,cAAS,GAAY,KAAK,CAAC;;;;QAM3B,UAAK,G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AE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fieldtext/nv-fieldtext.scss?tag=nv-fieldtext","src/components/nv-fieldtext/nv-fieldtext.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldtext {\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 &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n > label {\n @include form-field-label();\n }\n\n > .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n > [slot='leading-input'] {\n @include form-field-inner-leading-slot();\n }\n\n input {\n @include form-field-input();\n }\n \n\n nv-icon.validation {\n @include form-field-icon();\n margin-right: var(--form-gap-x);\n }\n > [slot='trailing-input'] {\n @include form-field-inner-trailing-slot();\n }\n }\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 Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtext',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtext.scss',\n})\nexport class NvFieldtext {\n @Element() el: HTMLNvFieldtextElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text Field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n /**\n * Type of the input.\n * @deprecated use type instead.\n */\n @Prop({ reflect: true })\n readonly textInputType: 'text' | 'tel' | 'email';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The type prop lets you specify what kind of information the input field\n * should accept. Choose 'text' for general words or sentences, 'tel' for\n * phone numbers, or 'email' for email addresses. This makes sure users get\n * the right keyboard and validation for what they need to enter.\n */\n @Prop({ reflect: true, mutable: true })\n type: 'text' | 'tel' | 'email' = 'text';\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the textfield\n * field.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription?: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input after the form is submitted.\n */\n @Prop({ reflect: true })\n readonly pattern: 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}`;\n\n /**\n * When used with the email input type, this prop enables the field to accept\n * multiple email addresses. Users can enter several addresses, separating\n * each one with a comma, allowing the form to handle multiple recipients.\n */\n @Prop({ reflect: true })\n readonly multiple: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the input event on the input element.\n * Emits the inputChanged event with the new value.\n * @param {Event} event - Event object of the input event.\n */\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.valueChanged.emit(input.value);\n };\n\n /**\n * Handles focus when the input container is clicked.\n */\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.textInputType) {\n this.type = this.textInputType;\n }\n\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n multiple={this.multiple}\n value={this.value}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5829b9f7.js';
2
- import { d as defineCustomElement$3 } from './p-0bfe8a47.js';
3
- import { d as defineCustomElement$2 } from './p-5c6b5444.js';
4
- import { d as defineCustomElement$1 } from './p-222136c2.js';
2
+ import { d as defineCustomElement$3 } from './p-743b3452.js';
3
+ import { d as defineCustomElement$2 } from './p-7214f13f.js';
4
+ import { d as defineCustomElement$1 } from './p-996438a2.js';
5
5
  import { v as v4 } from './p-f5ff676c.js';
6
6
 
7
7
  const nvFieldnumberCss = "/* TODO: integrate this logic in the proper structure */\nnv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range {\n background: var(--components-slider-track-filled-hover);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb {\n border-color: var(--components-slider-track-filled-hover);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range {\n background: var(--components-slider-track-filled-focus);\n}\nnv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb {\n border-color: var(--components-slider-track-filled-focus);\n}\nnv-fieldslider[error] .slider-container .track-container .track .track-range {\n background: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb {\n border-color: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb:hover {\n border-color: var(--components-slider-track-filled-error);\n outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);\n outline-offset: calc(var(--focus-outline-offset) * 1);\n background-color: var(--components-slider-handler-background-error);\n}\nnv-fieldslider[error] .slider-container .track-container .track .thumb:focus {\n border-color: var(--components-slider-track-filled-error);\n outline: calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);\n outline-offset: calc(var(--focus-outline-offset) * 1);\n background-color: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range {\n background: var(--components-slider-track-filled-error);\n}\nnv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb {\n border-color: var(--components-slider-track-filled-error);\n}\n\nnv-fieldnumber {\n --nv-field-border-default: var(--components-form-field-border-default);\n --nv-field-border-hover: var(--components-form-field-border-hover);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--components-form-field-border-default);\n --nv-field-border-readonly: var(--components-form-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-brand);\n --nv-field-background: var(--components-form-field-background-default);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--form-gap-y);\n box-sizing: border-box;\n max-width: 480px;\n}\nnv-fieldnumber[fluid]:not([fluid=false]) {\n max-width: unset;\n}\nnv-fieldnumber[readonly]:not([readonly=false]) {\n --nv-field-border-default: var(--components-form-field-border-readonly);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--components-form-field-border-focus);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-background: var(--components-form-field-background-readonly);\n}\nnv-fieldnumber[error]:not([error=false]) {\n --nv-field-border-default: var(--components-form-field-border-error);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-destructive-in-field);\n}\nnv-fieldnumber[success]:not([success=false]) {\n --nv-field-border-default: var(--components-form-field-border-success);\n --nv-field-border-hover: var(--nv-field-border-default);\n --nv-field-border-focus: var(--nv-field-border-default);\n --nv-field-border-disabled: var(--nv-field-border-default);\n --nv-field-border-readonly: var(--nv-field-border-default);\n --nv-field-focus-box-shadow: var(--color-focus-success);\n}\nnv-fieldnumber[required]:not([required=false]) label::after {\n content: \"*\";\n color: var(--components-form-text-required);\n font-weight: var(--font-weight-high-emphasis);\n}\nnv-fieldnumber label {\n display: flex;\n align-items: center;\n gap: var(--form-label-gap);\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: var(--font-weight-medium-emphasis);\n line-height: var(--form-label-line-height);\n}\nnv-fieldnumber .input-wrapper {\n display: flex;\n flex-wrap: wrap;\n gap: var(--form-gap-x);\n align-items: stretch;\n align-self: stretch;\n}\nnv-fieldnumber .input-wrapper .input-container {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n border-radius: var(--form-field-radius);\n border-width: 1px;\n border-style: solid;\n border-color: var(--nv-field-border-default);\n opacity: var(--components-form-opacity-default, 1);\n background: var(--nv-field-background);\n transition: all 150ms ease-out;\n 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: var(--font-weight-medium-emphasis);\n line-height: var(--form-field-line-height);\n width: 100%;\n /* Hide Edge built-in password reveal and clear icons */\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: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-field-font-size);\n font-style: normal;\n font-weight: var(--font-weight-low-emphasis);\n line-height: var(--form-field-line-height);\n}\nnv-fieldnumber .input-wrapper .input-container input[type=password]::-ms-clear, nv-fieldnumber .input-wrapper .input-container input[type=password]::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n}\nnv-fieldnumber .input-wrapper .input-container input::-webkit-inner-spin-button, nv-fieldnumber .input-wrapper .input-container input::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n}\nnv-fieldnumber .input-wrapper .input-container nv-icon.validation {\n color: var(--nv-field-border-default);\n margin-right: var(--form-field-gap);\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container > nv-iconbutton:last-of-type {\n border-top-right-radius: var(--form-field-radius);\n border-bottom-right-radius: var(--form-field-radius);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton {\n border: 0px;\n border-radius: 0px;\n border-radius: 0px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:focus-visible {\n border-radius: var(--button-md-border-radius);\n outline-offset: -3px;\n}\nnv-fieldnumber .input-wrapper .input-container .stepper > nv-iconbutton:last-of-type {\n border-top-right-radius: var(--form-field-radius);\n border-bottom-right-radius: var(--form-field-radius);\n}\n@container field-number-input-container (width < 150px) {\n nv-fieldnumber .input-wrapper .input-container .stepper-spacer {\n display: none;\n }\n nv-fieldnumber .input-wrapper .input-container .stepper {\n display: none;\n }\n}\nnv-fieldnumber .description {\n display: flex;\n align-items: center;\n align-self: stretch;\n gap: var(--spacing-1);\n color: var(--components-form-text-description-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n}\nnv-fieldnumber .error-description {\n display: flex;\n align-items: center;\n align-self: stretch;\n gap: var(--spacing-1);\n color: var(--components-form-text-description-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n line-height: var(--form-description-line-height);\n color: var(--components-form-text-description-error);\n}";
@@ -133,9 +133,9 @@ const NvFieldnumber = /*@__PURE__*/ proxyCustomElement(class NvFieldnumber exten
133
133
  /****************************************************************************/
134
134
  //#region RENDER
135
135
  render() {
136
- return (h(Host, { key: '9b3239f09e6aace03f79f07399723fdbf557f070' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '322478abbaf477a33debcd828387402299ce6762', htmlFor: this.inputId }, h("slot", { key: '75b791ca0fb7eec55faaf966a32733e37b87fb90', name: "label" }, this.label))), h("div", { key: '5ce6c27db2b6b0ba8618ed2eac1f61abf8177793', class: "input-wrapper" }, h("slot", { key: '3a4a86e358d575fc312d27ee5ffba68474904bd4', name: "before-input" }), h("div", { key: '8e07c3c37ea4869aa309fba913663e1d225e21fd', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '91e7c82e46d3268493669e6dd121f643be86a6be', name: "leading-input" }), h("input", { key: '3dcbd9d10e4425ebb29b16b1157845ea4ee7bdef', 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: typeof this.value === 'number' ? this.value : undefined, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), h("slot", { key: '7d0d4a77d121433f4feb8aa2139be8e94f8e57a5', name: "trailing-input" }), this.error && (h("nv-icon", { key: '2a3969e56de0fc3911901c9540e300caf2b6d681', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '8964d7ffaa2cc2a70caf781a37e66383234c6895', name: "circle-check", class: "validation", size: "md" })), h("div", { key: '1ca2fd7095afbc12a1a54c8b09551f28fe5a3579', class: "stepper" }, h("nv-iconbutton", { key: '1c3f9200c5409bc05fab9061dff3847a92298d45', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), h("nv-iconbutton", { key: 'eb65687b3c31d2ac8bdb534f5ca300a1ada9cd64', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), h("slot", { key: '01006c0c2487bce4f908104d263acb0231cdb701', name: "after-input" })), (this.description ||
137
- this.el.querySelector('[slot="description"]')) && (h("div", { key: '9db93a8aa6bb002a3286763909118e9c7a1661c0', class: "description" }, h("slot", { key: '13b0f797bace74e641cdd658bb798bccbfec70dc', name: "description" }, this.description))), (this.errorDescription ||
138
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '4ca240bc22fb83a283637e60384e59d687d67e9e', hidden: !this.error, class: "error-description" }, h("slot", { key: '145b68572a38e91559431ff51ec38a64027d4978', name: "error-description" }, this.errorDescription)))));
136
+ return (h(Host, { key: '3afce74f50fe43ac056458d04951d17ddddfeabb' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '57b43fe9c0385d1f2f649a559fc1cf5e99441c75', htmlFor: this.inputId }, h("slot", { key: 'dbc3019bc04f370571cca5ef33d67ed22e3c4a6e', name: "label" }, this.label))), h("div", { key: 'facbb2b93e2057ec061c7a9c612fb09ee5c7687d', class: "input-wrapper" }, h("slot", { key: '0fb079215345c8aa91c5718aaf977f9716c19712', name: "before-input" }), h("div", { key: '348402a3a6b4e65d2a2fbf1baa35740fbbb243b6', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '942c7a43a36da7fd4f89826c4e721077987287f6', name: "leading-input" }), h("input", { key: 'b8edf56607b26003781bae1eacbc40561917073d', 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: typeof this.value === 'number' ? this.value : undefined, disabled: this.disabled, readOnly: this.readonly, onInput: this.handleInput }), h("slot", { key: 'bc53377f72c4e1c9363c0e6c32c9d9c0ff18cee2', name: "trailing-input" }), this.error && (h("nv-icon", { key: '74b9e40d6687c8af506a3fcd365889fb98476050', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '9ce0589197135d2baae625e2e34f589077e8a1ea', name: "circle-check", class: "validation", size: "md" })), h("div", { key: '4c04cb39da4f61a66f94044494cf1f02f8175e11', class: "stepper" }, h("nv-iconbutton", { key: 'bd5e034e94e16ea10bd56e23498e648e67ba72eb', size: "md", name: "minus", emphasis: "lower", onClick: this.handleMinus, disabled: this.isMinValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }), h("nv-iconbutton", { key: 'b398efb51f9e6e297a6368424b3ceddf5f2a93a5', size: "md", name: "plus", emphasis: "lower", onClick: this.handlePlus, disabled: this.isMaxValueReached(), onMouseDown: this.preventSelection, tabindex: "-1" }))), h("slot", { key: 'fbd610d0e620b253b92cd74791a3bbc02aec2e21', name: "after-input" })), (this.description ||
137
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '46740b8b00f374f16559aa7a3310142c7ae5e74c', class: "description" }, h("slot", { key: 'ed9c74990d0fbf42f46bf8bb9172ef8b84112ecc', name: "description" }, this.description))), (this.errorDescription ||
138
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'cc9c5076c31cffc91f23db0e14eb4fde1072ecd2', hidden: !this.error, class: "error-description" }, h("slot", { key: 'aa4953c2c12cb7c7605086d72d435507d11b93c7', name: "error-description" }, this.errorDescription)))));
139
139
  }
140
140
  static get formAssociated() { return true; }
141
141
  get el() { return this; }
@@ -198,4 +198,4 @@ defineCustomElement();
198
198
 
199
199
  export { NvFieldnumber as N, defineCustomElement as d };
200
200
 
201
- //# sourceMappingURL=p-d1d4cc45.js.map
201
+ //# sourceMappingURL=p-cc77f8fe.js.map
@@ -1 +1 @@
1
- {"file":"p-d1d4cc45.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,08TAA08T,CAAC;AACp+T,4BAAe,gBAAgB;;MC0BlB,aAAa;IAN1B;;;;;;;;;;;;;QAsCW,YAAO,GAAWA,EAAM,EAAE,CAAC;;;;;;QAyC3B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAgBd,YAAO,GAAY,KAAK,CAAC;;;;;QAqBzB,SAAI,GAAW,CAAC,CAAC;;;;;;QAiBjB,cAAS,GAAY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CAC5B,EAEL,CAAC,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,MAC7C,4DAAK,KAAK,EAAC,aAAa,IACtB,6DAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,WAAW,CAAQ,CAC9C,CACP,EAEA,CAAC,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,4BAA4B,CAAC,MACnD,4DAAK,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,mBAAmB,IACjD,6DAAM,IAAI,EAAC,mBAAmB,IAAE,IAAI,CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fieldnumber/nv-fieldnumber.scss?tag=nv-fieldnumber","src/components/nv-fieldnumber/nv-fieldnumber.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldnumber {\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 &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n\n input {\n @include form-field-input();\n\n width: 100%;\n appearance: textfield;\n\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n }\n }\n\n nv-icon.validation {\n @include form-field-icon();\n margin-right: var(--form-field-gap);\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n > nv-iconbutton {\n @include form-field-action();\n border-radius: 0px;\n }\n }\n\n // container query to remove .stepper and and the spacer when the container is less than 150px\n // .. this needs to be an absolute value because container queries do not accept variables\n // .. using relative width (cqw) compared to a parent container would not work\n // .. because the parent container follows the child's width\n @container field-number-input-container (width < 150px) {\n .stepper-spacer {\n display: none;\n }\n\n .stepper {\n display: none;\n }\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number | null;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n // eslint-disable-next-line nova/bind-event-naming, nova/event-inline-interfaces\n @Event()\n valueChanged: EventEmitter<number | null>; // eslint-disable-line nova/event-inline-interfaces\n\n /**\n * Tracks the last emitted value to avoid double firing for normalized nulls.\n */\n private lastEmittedValue?: number | null;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number | null | undefined) {\n const normalized =\n typeof newValue === 'number' && !Number.isNaN(newValue) ? newValue : null;\n\n if (this.lastEmittedValue === normalized) {\n return;\n }\n\n this.lastEmittedValue = normalized;\n this.valueChanged.emit(normalized);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n if (input.value === '') {\n this.value = null;\n return;\n }\n\n const nextValue = input.valueAsNumber;\n\n if (Number.isNaN(nextValue)) {\n return;\n }\n\n this.value = nextValue;\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return (\n this.min !== undefined &&\n typeof this.value === 'number' &&\n this.value <= this.min\n );\n };\n\n private isMaxValueReached = (): boolean => {\n return (\n this.max !== undefined &&\n typeof this.value === 'number' &&\n this.value >= this.max\n );\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={this.required}\n max={this.max}\n min={this.min}\n step={this.step}\n value={typeof this.value === 'number' ? this.value : undefined}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
1
+ {"file":"p-cc77f8fe.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,08TAA08T,CAAC;AACp+T,4BAAe,gBAAgB;;MC0BlB,aAAa;IAN1B;;;;;;;;;;;;;QAsCW,YAAO,GAAWA,EAAM,EAAE,CAAC;;;;;;QAyC3B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQ1B,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,aAAQ,GAAY,KAAK,CAAC;;;;;;QAQnC,UAAK,GAAY,KAAK,CAAC;;;;;QAgBd,YAAO,GAAY,KAAK,CAAC;;;;;QAqBzB,SAAI,GAAW,CAAC,CAAC;;;;;;QAiBjB,cAAS,GAAY,KAAK,CAAC;;;;QAM3B,UAAK,GAAY,KAAK,CAAC;;;;QAwCxB,gBAAW,GAAG,CAAC,KAAY;YACjC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,KAAK,CAAC,KAAK,KAAK,EAAE,EAAE;gBACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YAED,MAAM,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC;YAEtC,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;gBAC3B,OAAO;aACR;YAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;SACx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CAAC,gBAAgB,CAAQ,CACzD,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["uuidv4"],"sources":["src/components/nv-fieldnumber/nv-fieldnumber.scss?tag=nv-fieldnumber","src/components/nv-fieldnumber/nv-fieldnumber.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldnumber {\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 &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n container-type: inline-size;\n container-name: field-number-input-container;\n overflow: hidden;\n position: relative;\n\n input {\n @include form-field-input();\n\n width: 100%;\n appearance: textfield;\n\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n appearance: none;\n margin: 0;\n }\n }\n\n nv-icon.validation {\n @include form-field-icon();\n margin-right: var(--form-field-gap);\n }\n\n > nv-iconbutton {\n @include form-field-action();\n }\n\n .stepper {\n display: flex;\n border-left: var(--notification-border-width-low-emphasis) solid var(--components-form-field-border-readonly);\n > nv-iconbutton {\n @include form-field-action();\n border-radius: 0px;\n }\n }\n\n // container query to remove .stepper and and the spacer when the container is less than 150px\n // .. this needs to be an absolute value because container queries do not accept variables\n // .. using relative width (cqw) compared to a parent container would not work\n // .. because the parent container follows the child's width\n @container field-number-input-container (width < 150px) {\n .stepper-spacer {\n display: none;\n }\n\n .stepper {\n display: none;\n }\n }\n }\n }\n\n .description {\n @include form-field-description();\n }\n\n .error-description {\n @include form-field-error-description();\n }\n}","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot trailing-input - Content to be placed after the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldnumber',\n styleUrl: 'nv-fieldnumber.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldnumber {\n @Element() el: HTMLNvFieldnumberElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the number field.\n * @deprecated Use `description` instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated Use `errorDescription` and set the error prop instead.\n */\n @Prop({ reflect: true })\n readonly validation: string;\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the input field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the input field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * The maximum value that the input field can accept. Use this in combination\n * with min to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly max: number;\n\n /**\n * The minimum value that the input field can accept. Use this in combination\n * with max to create a range of valid values.\n */\n @Prop({ reflect: true })\n readonly min: number;\n\n /**\n * Define the increment value for the input field. It determines how much the\n * value will increase or decrease when the user clicks the stepper buttons.\n */\n @Prop({ reflect: true })\n readonly step: number = 1;\n\n /**\n * The value of the input field. It’s the text that users type in or the value\n * that you set programmatically. This is the main way to interact with the\n * input field, and it’s essential for creating forms that users can fill out.\n */\n @Prop({ reflect: true, mutable: true })\n value: number | null;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n // eslint-disable-next-line nova/bind-event-naming, nova/event-inline-interfaces\n @Event()\n valueChanged: EventEmitter<number | null>; // eslint-disable-line nova/event-inline-interfaces\n\n /**\n * Tracks the last emitted value to avoid double firing for normalized nulls.\n */\n private lastEmittedValue?: number | null;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n watchValueHandler(newValue: number | null | undefined) {\n const normalized =\n typeof newValue === 'number' && !Number.isNaN(newValue) ? newValue : null;\n\n if (this.lastEmittedValue === normalized) {\n return;\n }\n\n this.lastEmittedValue = normalized;\n this.valueChanged.emit(normalized);\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n if (input.value === '') {\n this.value = null;\n return;\n }\n\n const nextValue = input.valueAsNumber;\n\n if (Number.isNaN(nextValue)) {\n return;\n }\n\n this.value = nextValue;\n };\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n private handlePlus = () => {\n this.inputElement.stepUp();\n this.value = Number(this.inputElement.value);\n };\n\n private handleMinus = () => {\n this.inputElement.stepDown();\n this.value = Number(this.inputElement.value);\n };\n\n // prevents text selection when clicking the buttons multiple times\n private preventSelection = (event: Event) => {\n event.preventDefault();\n };\n\n private isMinValueReached = (): boolean => {\n return (\n this.min !== undefined &&\n typeof this.value === 'number' &&\n this.value <= this.min\n );\n };\n\n private isMaxValueReached = (): boolean => {\n return (\n this.max !== undefined &&\n typeof this.value === 'number' &&\n this.value >= this.max\n );\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n type=\"number\"\n autofocus={this.autofocus}\n required={this.required}\n max={this.max}\n min={this.min}\n step={this.step}\n value={typeof this.value === 'number' ? this.value : undefined}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n <slot name=\"trailing-input\"></slot>\n\n {this.error && (\n <nv-icon name=\"alert-circle\" class=\"validation\" size=\"md\" />\n )}\n {this.success && (\n <nv-icon name=\"circle-check\" class=\"validation\" size=\"md\" />\n )}\n\n <div class=\"stepper\">\n <nv-iconbutton\n size=\"md\"\n name=\"minus\"\n emphasis=\"lower\"\n onClick={this.handleMinus}\n disabled={this.isMinValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n ></nv-iconbutton>\n <nv-iconbutton\n size=\"md\"\n name=\"plus\"\n emphasis=\"lower\"\n onClick={this.handlePlus}\n disabled={this.isMaxValueReached()}\n onMouseDown={this.preventSelection}\n tabindex=\"-1\"\n />\n </div>\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5829b9f7.js';
2
- import { d as defineCustomElement$1 } from './p-0bfe8a47.js';
2
+ import { d as defineCustomElement$1 } from './p-743b3452.js';
3
3
 
4
- const nvFielddropdownitemCss = "nv-fielddropdownitem{display:flex;gap:var(--spacing-2);flex-wrap:wrap;align-items:center;width:100%;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);font-weight:var(--menu-contextual-item-font-weight);font-size:var(--list-dropdown-font-size);line-height:var(--list-dropdown-line-height);color:var(--components-list-dropdown-item-label-default);border-radius:var(--list-dropdown-item-radius);transition:background-color 150ms ease-out, color 150ms ease-out;cursor:pointer}nv-fielddropdownitem:hover,nv-fielddropdownitem:focus,nv-fielddropdownitem:focus-within{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-fielddropdownitem[disabled]:not([disabled=false]){cursor:not-allowed;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}nv-fielddropdownitem .text-wrapper{display:flex;flex-grow:1;align-items:center;justify-content:space-between}nv-fielddropdownitem [data-scope=text]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nv-fielddropdownitem nv-icon[data-scope=selected]{color:var(--components-list-dropdown-item-label-default);align-self:center;margin-left:auto}";
4
+ const nvFielddropdownitemCss = "nv-fielddropdownitem{display:flex;gap:var(--spacing-2);flex-wrap:wrap;align-items:center;width:100%;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);font-weight:var(--menu-contextual-item-font-weight);font-size:var(--list-dropdown-font-size);line-height:var(--list-dropdown-line-height);color:var(--components-list-dropdown-item-label-default);border-radius:var(--list-dropdown-item-radius);transition:background-color 150ms ease-out, color 150ms ease-out;cursor:pointer}nv-fielddropdownitem:hover,nv-fielddropdownitem:focus,nv-fielddropdownitem:focus-within{background-color:var(--components-list-dropdown-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-fielddropdownitem[disabled]:not([disabled=false]){cursor:not-allowed;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}nv-fielddropdownitem .text-wrapper{display:flex;flex-grow:1;align-items:center;justify-content:space-between}nv-fielddropdownitem [data-scope=text]{flex-grow:1;word-break:break-word;overflow-wrap:break-word;padding-right:var(--spacing-5)}nv-fielddropdownitem nv-icon[data-scope=selected]{color:var(--components-list-dropdown-item-label-default);align-self:center;margin-left:auto;position:absolute;right:var(--list-dropdown-item-padding-y)}";
5
5
  const NvFielddropdownitemStyle0 = nvFielddropdownitemCss;
6
6
 
7
7
  const NvFielddropdownitem = /*@__PURE__*/ proxyCustomElement(class NvFielddropdownitem extends H {
@@ -61,7 +61,7 @@ const NvFielddropdownitem = /*@__PURE__*/ proxyCustomElement(class NvFielddropdo
61
61
  /****************************************************************************/
62
62
  //#region RENDER
63
63
  render() {
64
- return (h(Host, { key: 'e099d616e8cf3aac2ec1fad7f3c0aee8a0456dbf', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, h("slot", { key: '17a6b60db0685997663de23436f673f29627b661' }), !this.composed && (h("div", { key: '92ce5251e1b99c281ca9c26d6927b08056a9957f', class: "text-wrapper" }, h("span", { key: '7821e235f3e342d71f0d6d6e7d6176d3100c9305', "data-scope": "text" }, this.label))), this.selected && (h("nv-icon", { key: '3da4ac75ebd8a662b054c5ad06c4939969fcd5f8', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
64
+ return (h(Host, { key: 'd5a70771cd557f33b37766fbbe14cd0a401a3d35', role: "menuitem", tabindex: '-1', onClick: this.handleSelected }, h("slot", { key: 'e824671ec27c1c1e20260ca4d194ee254d6aa390' }), !this.composed && (h("div", { key: '60f189d2c990d80fd1e16238c38fc7f065e915e6', class: "text-wrapper" }, h("span", { key: '28a2df55dc7b188ce7c6e0e716bef731597c6f28', "data-scope": "text" }, this.label))), this.selected && (h("nv-icon", { key: '6d0257c1e7ea842f9880b68f2c6e0a0da38f0b4e', name: "check", "aria-hidden": "true", "data-scope": "selected" }))));
65
65
  }
66
66
  get el() { return this; }
67
67
  static get style() { return NvFielddropdownitemStyle0; }
@@ -94,4 +94,4 @@ defineCustomElement();
94
94
 
95
95
  export { NvFielddropdownitem as N, defineCustomElement as d };
96
96
 
97
- //# sourceMappingURL=p-8ce28cff.js.map
97
+ //# sourceMappingURL=p-d9c1cd97.js.map