@nova-design-system/nova-webcomponents 3.9.1 → 3.10.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 (432) hide show
  1. package/dist/cjs/{constants-8fb8ccc0.js → constants-3b6beb66.js} +15 -1
  2. package/dist/cjs/constants-3b6beb66.js.map +1 -0
  3. package/dist/cjs/index-c56424e5.js +12 -0
  4. package/dist/cjs/index.cjs.js +7 -1
  5. package/dist/cjs/index.cjs.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/native.cjs.js +1 -1
  8. package/dist/cjs/nv-accordion-item.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-alert.cjs.entry.js +2 -2
  11. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-badge_2.cjs.entry.js +2 -2
  14. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  16. package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nv-button.cjs.entry.js +2 -2
  18. package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nv-buttongroup.cjs.entry.js +198 -0
  20. package/dist/cjs/nv-buttongroup.cjs.entry.js.map +1 -0
  21. package/dist/cjs/nv-calendar.cjs.entry.js +114 -37
  22. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  23. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-datagrid.cjs.entry.js +4 -4
  25. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
  27. package/dist/cjs/nv-dialog.cjs.entry.js +2 -2
  28. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +3 -3
  29. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +5 -5
  30. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-fielddate.cjs.entry.js +6 -6
  32. package/dist/cjs/nv-fielddaterange.cjs.entry.js +6 -6
  33. package/dist/cjs/nv-fielddropdown.cjs.entry.js +3 -3
  34. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  35. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +377 -27
  36. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  38. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  39. package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
  40. package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  42. package/dist/cjs/nv-fieldslider.cjs.entry.js +3 -3
  43. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  44. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  45. package/dist/cjs/nv-fieldtime.cjs.entry.js +10 -10
  46. package/dist/cjs/nv-icon.cjs.entry.js +3 -3
  47. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
  49. package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
  50. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  51. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  52. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  53. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  54. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  55. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  56. package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
  57. package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
  58. package/dist/cjs/nv-togglebutton.cjs.entry.js +58 -0
  59. package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -0
  60. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +172 -0
  61. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js.map +1 -0
  62. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  63. package/dist/collection/collection-manifest.json +3 -0
  64. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +1 -1
  65. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
  66. package/dist/collection/components/nv-alert/nv-alert.css +5 -0
  67. package/dist/collection/components/nv-badge/nv-badge.css +21 -0
  68. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +2 -0
  69. package/dist/collection/components/nv-button/styles/nv-button.css +8 -0
  70. package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js +43 -0
  71. package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js.map +1 -0
  72. package/dist/collection/components/nv-buttongroup/nv-buttongroup.js +217 -0
  73. package/dist/collection/components/nv-buttongroup/nv-buttongroup.js.map +1 -0
  74. package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js +86 -0
  75. package/dist/collection/components/nv-buttongroup/nv-buttongroup.utils.js.map +1 -0
  76. package/dist/collection/components/nv-buttongroup/styles/nv-buttongroup.css +73 -0
  77. package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js +312 -0
  78. package/dist/collection/components/nv-buttongroup/test/nv-buttongroup.utils.test.js.map +1 -0
  79. package/dist/collection/components/nv-calendar/nv-calendar.css +9 -0
  80. package/dist/collection/components/nv-calendar/nv-calendar.js +37 -24
  81. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  82. package/dist/collection/components/nv-calendar/nv-calendar.utils.js +68 -0
  83. package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
  84. package/dist/collection/components/nv-calendar/partials/calendar-grid.js +5 -3
  85. package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -1
  86. package/dist/collection/components/nv-calendar/partials/day-cell.js +4 -9
  87. package/dist/collection/components/nv-calendar/partials/day-cell.js.map +1 -1
  88. package/dist/collection/components/nv-col/nv-col.js +1 -1
  89. package/dist/collection/components/nv-datagrid/nv-datagrid.css +1 -0
  90. package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
  91. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
  92. package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
  93. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +1 -1
  94. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  95. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +1 -0
  96. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
  97. package/dist/collection/components/nv-fielddate/nv-fielddate.js +6 -6
  98. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +6 -6
  99. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +3 -3
  100. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +1 -1
  101. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  102. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js.map +1 -1
  103. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +885 -122
  104. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  105. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +561 -89
  106. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  107. package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +70 -16
  108. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  109. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  110. package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +1 -0
  111. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  112. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  113. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
  114. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  115. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  116. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  117. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  118. package/dist/collection/components/nv-icon/nv-icons.js +6 -0
  119. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  120. package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +4 -0
  121. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  122. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  123. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  124. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  125. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  126. package/dist/collection/components/nv-row/nv-row.js +1 -1
  127. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  128. package/dist/collection/components/nv-table/nv-table.js +2 -2
  129. package/dist/collection/components/nv-toggle/nv-toggle.css +1 -0
  130. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  131. package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js +6 -0
  132. package/dist/collection/components/nv-togglebutton/nv-togglebutton.docs.js.map +1 -0
  133. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +191 -0
  134. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js.map +1 -0
  135. package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +135 -0
  136. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +56 -0
  137. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -0
  138. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +324 -0
  139. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -0
  140. package/dist/collection/components/nv-togglebuttongroup/styles/nv-togglebuttongroup.css +45 -0
  141. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  142. package/dist/collection/utils/constants.js +12 -0
  143. package/dist/collection/utils/constants.js.map +1 -1
  144. package/dist/components/index.js +7 -1
  145. package/dist/components/index.js.map +1 -1
  146. package/dist/components/nv-accordion-item.js +1 -1
  147. package/dist/components/nv-accordion.js +4 -4
  148. package/dist/components/nv-alert.js +3 -3
  149. package/dist/components/nv-alert.js.map +1 -1
  150. package/dist/components/nv-avatar.js +2 -2
  151. package/dist/components/nv-badge.js +1 -1
  152. package/dist/components/nv-breadcrumb.js +3 -3
  153. package/dist/components/nv-breadcrumb.js.map +1 -1
  154. package/dist/components/nv-button.js +1 -1
  155. package/dist/components/nv-buttongroup.d.ts +11 -0
  156. package/dist/components/nv-buttongroup.js +221 -0
  157. package/dist/components/nv-buttongroup.js.map +1 -0
  158. package/dist/components/nv-calendar.js +1 -1
  159. package/dist/components/nv-col.js +1 -1
  160. package/dist/components/nv-datagrid.js +6 -6
  161. package/dist/components/nv-datagrid.js.map +1 -1
  162. package/dist/components/nv-datagridcolumn.js +1 -1
  163. package/dist/components/nv-dialog.js +7 -7
  164. package/dist/components/nv-dialogfooter.js +1 -1
  165. package/dist/components/nv-dialogheader.js +1 -1
  166. package/dist/components/nv-fieldcheckbox.js +1 -1
  167. package/dist/components/nv-fielddate.js +12 -12
  168. package/dist/components/nv-fielddaterange.js +12 -12
  169. package/dist/components/nv-fielddropdown.js +8 -8
  170. package/dist/components/nv-fielddropdownitem.js +1 -1
  171. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  172. package/dist/components/nv-fieldmultiselect.js +399 -41
  173. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  174. package/dist/components/nv-fieldnumber.js +1 -1
  175. package/dist/components/nv-fieldpassword.js +6 -6
  176. package/dist/components/nv-fieldradio.js +4 -4
  177. package/dist/components/nv-fieldradio.js.map +1 -1
  178. package/dist/components/nv-fieldselect.js +8 -8
  179. package/dist/components/nv-fieldslider.js +7 -7
  180. package/dist/components/nv-fieldtext.js +1 -1
  181. package/dist/components/nv-fieldtextarea.js +3 -3
  182. package/dist/components/nv-fieldtime.js +14 -14
  183. package/dist/components/nv-icon.js +1 -1
  184. package/dist/components/nv-iconbutton.js +1 -1
  185. package/dist/components/nv-loader.js +1 -1
  186. package/dist/components/nv-menu.js +4 -4
  187. package/dist/components/nv-menuitem.js +1 -1
  188. package/dist/components/nv-popover.js +1 -1
  189. package/dist/components/nv-row.js +1 -1
  190. package/dist/components/nv-stack.js +1 -1
  191. package/dist/components/nv-table.js +2 -2
  192. package/dist/components/nv-toggle.js +3 -3
  193. package/dist/components/nv-toggle.js.map +1 -1
  194. package/dist/components/nv-togglebutton.d.ts +11 -0
  195. package/dist/components/nv-togglebutton.js +78 -0
  196. package/dist/components/nv-togglebutton.js.map +1 -0
  197. package/dist/components/nv-togglebuttongroup.d.ts +11 -0
  198. package/dist/components/nv-togglebuttongroup.js +196 -0
  199. package/dist/components/nv-togglebuttongroup.js.map +1 -0
  200. package/dist/components/nv-tooltip.js +1 -1
  201. package/dist/components/{p-68ff562f.js → p-0ffb4785.js} +5 -5
  202. package/dist/components/{p-68ff562f.js.map → p-0ffb4785.js.map} +1 -1
  203. package/dist/components/{p-8067d283.js → p-195f46f3.js} +2 -2
  204. package/dist/components/{p-8067d283.js.map → p-195f46f3.js.map} +1 -1
  205. package/dist/components/{p-e4e1a926.js → p-1bb737fa.js} +3 -3
  206. package/dist/components/{p-e4e1a926.js.map → p-1bb737fa.js.map} +1 -1
  207. package/dist/components/{p-db4ba1d9.js → p-2db5d1ab.js} +7 -7
  208. package/dist/components/{p-db4ba1d9.js.map → p-2db5d1ab.js.map} +1 -1
  209. package/dist/components/{p-ba87d9d5.js → p-2ef4fb88.js} +3 -3
  210. package/dist/components/{p-ba87d9d5.js.map → p-2ef4fb88.js.map} +1 -1
  211. package/dist/components/{p-f1df2634.js → p-32e8e42e.js} +2 -2
  212. package/dist/components/{p-f1df2634.js.map → p-32e8e42e.js.map} +1 -1
  213. package/dist/components/{p-6de6866c.js → p-45a625fb.js} +6 -6
  214. package/dist/components/{p-6de6866c.js.map → p-45a625fb.js.map} +1 -1
  215. package/dist/components/{p-025b8a78.js → p-50d0db7b.js} +5 -5
  216. package/dist/components/{p-025b8a78.js.map → p-50d0db7b.js.map} +1 -1
  217. package/dist/components/{p-ed6686a1.js → p-51876ca1.js} +2 -2
  218. package/dist/components/{p-ed6686a1.js.map → p-51876ca1.js.map} +1 -1
  219. package/dist/components/{p-e104c58a.js → p-51a156ff.js} +3 -3
  220. package/dist/components/p-51a156ff.js.map +1 -0
  221. package/dist/components/p-8011513c.js +189 -0
  222. package/dist/components/{p-60064345.js.map → p-8011513c.js.map} +1 -1
  223. package/dist/components/{p-82e5674c.js → p-8aee1010.js} +116 -38
  224. package/dist/components/p-8aee1010.js.map +1 -0
  225. package/dist/components/{p-79e6b6a2.js → p-9fdaea9a.js} +5 -5
  226. package/dist/components/p-9fdaea9a.js.map +1 -0
  227. package/dist/components/{p-6460318d.js → p-a1fe0a5d.js} +4 -4
  228. package/dist/components/p-a1fe0a5d.js.map +1 -0
  229. package/dist/components/{p-1f505531.js → p-a3ddec4c.js} +15 -1
  230. package/dist/components/p-a3ddec4c.js.map +1 -0
  231. package/dist/components/{p-0143cee0.js → p-a5002d14.js} +6 -6
  232. package/dist/components/{p-0143cee0.js.map → p-a5002d14.js.map} +1 -1
  233. package/dist/components/{p-30f970c3.js → p-b659b999.js} +3 -3
  234. package/dist/components/{p-30f970c3.js.map → p-b659b999.js.map} +1 -1
  235. package/dist/components/{p-5d5668f0.js → p-cf06032d.js} +4 -4
  236. package/dist/components/{p-5d5668f0.js.map → p-cf06032d.js.map} +1 -1
  237. package/dist/components/{p-dfd2d4f0.js → p-fda58a76.js} +2 -2
  238. package/dist/components/{p-dfd2d4f0.js.map → p-fda58a76.js.map} +1 -1
  239. package/dist/esm/{constants-4faa1fae.js → constants-23aaef7b.js} +15 -1
  240. package/dist/esm/constants-23aaef7b.js.map +1 -0
  241. package/dist/esm/index-a1936cd0.js +12 -0
  242. package/dist/esm/index.js +7 -1
  243. package/dist/esm/index.js.map +1 -1
  244. package/dist/esm/loader.js +1 -1
  245. package/dist/esm/native.js +1 -1
  246. package/dist/esm/nv-accordion-item.entry.js +1 -1
  247. package/dist/esm/nv-accordion-item.entry.js.map +1 -1
  248. package/dist/esm/nv-alert.entry.js +2 -2
  249. package/dist/esm/nv-alert.entry.js.map +1 -1
  250. package/dist/esm/nv-avatar.entry.js +1 -1
  251. package/dist/esm/nv-badge_2.entry.js +2 -2
  252. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  253. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  254. package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
  255. package/dist/esm/nv-button.entry.js +2 -2
  256. package/dist/esm/nv-button.entry.js.map +1 -1
  257. package/dist/esm/nv-buttongroup.entry.js +194 -0
  258. package/dist/esm/nv-buttongroup.entry.js.map +1 -0
  259. package/dist/esm/nv-calendar.entry.js +114 -37
  260. package/dist/esm/nv-calendar.entry.js.map +1 -1
  261. package/dist/esm/nv-col.entry.js +1 -1
  262. package/dist/esm/nv-datagrid.entry.js +4 -4
  263. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  264. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  265. package/dist/esm/nv-dialog.entry.js +2 -2
  266. package/dist/esm/nv-dialogfooter_2.entry.js +3 -3
  267. package/dist/esm/nv-fieldcheckbox.entry.js +5 -5
  268. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
  269. package/dist/esm/nv-fielddate.entry.js +6 -6
  270. package/dist/esm/nv-fielddaterange.entry.js +6 -6
  271. package/dist/esm/nv-fielddropdown.entry.js +3 -3
  272. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  273. package/dist/esm/nv-fieldmultiselect.entry.js +378 -28
  274. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  275. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  276. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  277. package/dist/esm/nv-fieldradio.entry.js +4 -4
  278. package/dist/esm/nv-fieldradio.entry.js.map +1 -1
  279. package/dist/esm/nv-fieldselect.entry.js +5 -5
  280. package/dist/esm/nv-fieldslider.entry.js +3 -3
  281. package/dist/esm/nv-fieldtext.entry.js +3 -3
  282. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  283. package/dist/esm/nv-fieldtime.entry.js +10 -10
  284. package/dist/esm/nv-icon.entry.js +3 -3
  285. package/dist/esm/nv-icon.entry.js.map +1 -1
  286. package/dist/esm/nv-iconbutton_2.entry.js +3 -3
  287. package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
  288. package/dist/esm/nv-menu.entry.js +1 -1
  289. package/dist/esm/nv-menuitem.entry.js +1 -1
  290. package/dist/esm/nv-popover.entry.js +1 -1
  291. package/dist/esm/nv-row.entry.js +1 -1
  292. package/dist/esm/nv-stack.entry.js +1 -1
  293. package/dist/esm/nv-table.entry.js +2 -2
  294. package/dist/esm/nv-toggle.entry.js +3 -3
  295. package/dist/esm/nv-toggle.entry.js.map +1 -1
  296. package/dist/esm/nv-togglebutton.entry.js +54 -0
  297. package/dist/esm/nv-togglebutton.entry.js.map +1 -0
  298. package/dist/esm/nv-togglebuttongroup.entry.js +168 -0
  299. package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -0
  300. package/dist/esm/nv-tooltip.entry.js +1 -1
  301. package/dist/native/index.esm.js +1 -1
  302. package/dist/native/index.esm.js.map +1 -1
  303. package/dist/native/native.css +1 -1
  304. package/dist/native/native.esm.js +1 -1
  305. package/dist/native/native.esm.js.map +1 -1
  306. package/dist/native/{p-2a6783ca.entry.js → p-0da8f0d1.entry.js} +2 -2
  307. package/dist/native/{p-2a6783ca.entry.js.map → p-0da8f0d1.entry.js.map} +1 -1
  308. package/dist/native/p-0ef94dae.entry.js +2 -0
  309. package/dist/native/{p-1ad1bff9.entry.js.map → p-0ef94dae.entry.js.map} +1 -1
  310. package/dist/native/p-13032ec1.entry.js +2 -0
  311. package/dist/native/p-13032ec1.entry.js.map +1 -0
  312. package/dist/native/p-184032cb.entry.js +2 -0
  313. package/dist/native/{p-a73fa60a.entry.js.map → p-184032cb.entry.js.map} +1 -1
  314. package/dist/native/p-2197ffdf.entry.js +2 -0
  315. package/dist/native/{p-fa81b77f.entry.js.map → p-2197ffdf.entry.js.map} +1 -1
  316. package/dist/native/p-234cfa2e.entry.js +2 -0
  317. package/dist/native/p-2a3325fb.entry.js +2 -0
  318. package/dist/native/p-2a3325fb.entry.js.map +1 -0
  319. package/dist/native/{p-3f139780.entry.js → p-2d647761.entry.js} +2 -2
  320. package/dist/native/{p-ff248eb8.entry.js → p-348c6bb4.entry.js} +2 -2
  321. package/dist/native/p-397c0fca.entry.js +2 -0
  322. package/dist/native/{p-51a57a3a.entry.js.map → p-397c0fca.entry.js.map} +1 -1
  323. package/dist/native/{p-55cd3d62.entry.js → p-3da64006.entry.js} +2 -2
  324. package/dist/native/p-3ed84cd9.entry.js +2 -0
  325. package/dist/native/{p-fcd52432.entry.js.map → p-3ed84cd9.entry.js.map} +1 -1
  326. package/dist/native/{p-3ff7a912.entry.js → p-3fcaac6d.entry.js} +2 -2
  327. package/dist/native/{p-b7ec9a1b.entry.js → p-4302824a.entry.js} +2 -2
  328. package/dist/native/p-43071c3b.entry.js +2 -0
  329. package/dist/native/p-44dd9a4c.entry.js +2 -0
  330. package/dist/native/p-44dd9a4c.entry.js.map +1 -0
  331. package/dist/native/p-464bb197.entry.js +2 -0
  332. package/dist/native/p-464bb197.entry.js.map +1 -0
  333. package/dist/native/{p-916acbd3.entry.js → p-49504fd6.entry.js} +2 -2
  334. package/dist/native/{p-bc77cac1.entry.js → p-553778e6.entry.js} +2 -2
  335. package/dist/native/p-553778e6.entry.js.map +1 -0
  336. package/dist/native/{p-bee62b2b.entry.js → p-5f0776cb.entry.js} +2 -2
  337. package/dist/native/p-62032cd9.entry.js +2 -0
  338. package/dist/native/p-62032cd9.entry.js.map +1 -0
  339. package/dist/native/{p-11012998.entry.js → p-676447d7.entry.js} +3 -3
  340. package/dist/native/{p-16ef7dd4.entry.js → p-681f2bac.entry.js} +2 -2
  341. package/dist/native/{p-4b15cff3.entry.js → p-7f0d576b.entry.js} +2 -2
  342. package/dist/native/{p-68edb2e8.entry.js → p-85f8f11a.entry.js} +2 -2
  343. package/dist/native/{p-0e005d95.entry.js → p-888ad58e.entry.js} +2 -2
  344. package/dist/native/{p-34bf336f.entry.js → p-92931ab8.entry.js} +2 -2
  345. package/dist/native/{p-f00a4552.entry.js → p-94dc9c41.entry.js} +2 -2
  346. package/dist/native/{p-85a54ef2.entry.js → p-9c5d6827.entry.js} +2 -2
  347. package/dist/native/{p-08452012.entry.js → p-9f451b8a.entry.js} +3 -3
  348. package/dist/native/{p-08452012.entry.js.map → p-9f451b8a.entry.js.map} +1 -1
  349. package/dist/native/{p-1f932a4b.entry.js → p-aacd8789.entry.js} +2 -2
  350. package/dist/native/p-ac5496e7.entry.js +2 -0
  351. package/dist/native/{p-9ea3d30d.entry.js → p-ad2cc829.entry.js} +2 -2
  352. package/dist/native/p-b2442d4b.entry.js +2 -0
  353. package/dist/native/{p-a36dc25a.entry.js.map → p-b2442d4b.entry.js.map} +1 -1
  354. package/dist/native/{p-67c34b8c.entry.js → p-b58fb522.entry.js} +2 -2
  355. package/dist/native/p-ba9906b7.entry.js +2 -0
  356. package/dist/native/{p-64cb38e6.entry.js.map → p-ba9906b7.entry.js.map} +1 -1
  357. package/dist/native/{p-f540db71.entry.js → p-dd023fd6.entry.js} +2 -2
  358. package/dist/native/p-f033c4ce.entry.js +2 -0
  359. package/dist/native/p-f033c4ce.entry.js.map +1 -0
  360. package/dist/native/{p-051db87c.entry.js → p-fb672f90.entry.js} +2 -2
  361. package/dist/native/p-fc9564b3.js +2 -0
  362. package/dist/native/p-fc9564b3.js.map +1 -0
  363. package/dist/types/components/nv-buttongroup/nv-buttongroup.d.ts +50 -0
  364. package/dist/types/components/nv-buttongroup/nv-buttongroup.docs.d.ts +4 -0
  365. package/dist/types/components/nv-buttongroup/nv-buttongroup.utils.d.ts +25 -0
  366. package/dist/types/components/nv-buttongroup/test/nv-buttongroup.utils.test.d.ts +1 -0
  367. package/dist/types/components/nv-calendar/nv-calendar.d.ts +11 -1
  368. package/dist/types/components/nv-calendar/nv-calendar.utils.d.ts +31 -0
  369. package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +11 -1
  370. package/dist/types/components/nv-calendar/partials/day-cell.d.ts +7 -1
  371. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +116 -23
  372. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  373. package/dist/types/components/nv-togglebutton/nv-togglebutton.d.ts +46 -0
  374. package/dist/types/components/nv-togglebutton/nv-togglebutton.docs.d.ts +4 -0
  375. package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.d.ts +80 -0
  376. package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.d.ts +4 -0
  377. package/dist/types/components.d.ts +289 -2
  378. package/dist/types/utils/constants.d.ts +10 -0
  379. package/dist/vscode-data.json +189 -0
  380. package/hydrate/index.js +1058 -154
  381. package/hydrate/index.mjs +1058 -154
  382. package/package.json +14 -2
  383. package/dist/cjs/constants-8fb8ccc0.js.map +0 -1
  384. package/dist/components/p-1f505531.js.map +0 -1
  385. package/dist/components/p-60064345.js +0 -189
  386. package/dist/components/p-6460318d.js.map +0 -1
  387. package/dist/components/p-79e6b6a2.js.map +0 -1
  388. package/dist/components/p-82e5674c.js.map +0 -1
  389. package/dist/components/p-e104c58a.js.map +0 -1
  390. package/dist/esm/constants-4faa1fae.js.map +0 -1
  391. package/dist/native/p-10ce53ea.entry.js +0 -2
  392. package/dist/native/p-1ad1bff9.entry.js +0 -2
  393. package/dist/native/p-4a533dd8.entry.js +0 -2
  394. package/dist/native/p-4a533dd8.entry.js.map +0 -1
  395. package/dist/native/p-51a57a3a.entry.js +0 -2
  396. package/dist/native/p-64cb38e6.entry.js +0 -2
  397. package/dist/native/p-73c08f3b.entry.js +0 -2
  398. package/dist/native/p-73c08f3b.entry.js.map +0 -1
  399. package/dist/native/p-a36dc25a.entry.js +0 -2
  400. package/dist/native/p-a50f3850.entry.js +0 -2
  401. package/dist/native/p-a73fa60a.entry.js +0 -2
  402. package/dist/native/p-b3f9db23.entry.js +0 -2
  403. package/dist/native/p-b3f9db23.entry.js.map +0 -1
  404. package/dist/native/p-bc77cac1.entry.js.map +0 -1
  405. package/dist/native/p-e2d0a77d.js +0 -2
  406. package/dist/native/p-e2d0a77d.js.map +0 -1
  407. package/dist/native/p-ec92ee7a.entry.js +0 -2
  408. package/dist/native/p-fa81b77f.entry.js +0 -2
  409. package/dist/native/p-fcd52432.entry.js +0 -2
  410. /package/dist/native/{p-ec92ee7a.entry.js.map → p-234cfa2e.entry.js.map} +0 -0
  411. /package/dist/native/{p-3f139780.entry.js.map → p-2d647761.entry.js.map} +0 -0
  412. /package/dist/native/{p-ff248eb8.entry.js.map → p-348c6bb4.entry.js.map} +0 -0
  413. /package/dist/native/{p-55cd3d62.entry.js.map → p-3da64006.entry.js.map} +0 -0
  414. /package/dist/native/{p-3ff7a912.entry.js.map → p-3fcaac6d.entry.js.map} +0 -0
  415. /package/dist/native/{p-b7ec9a1b.entry.js.map → p-4302824a.entry.js.map} +0 -0
  416. /package/dist/native/{p-10ce53ea.entry.js.map → p-43071c3b.entry.js.map} +0 -0
  417. /package/dist/native/{p-916acbd3.entry.js.map → p-49504fd6.entry.js.map} +0 -0
  418. /package/dist/native/{p-bee62b2b.entry.js.map → p-5f0776cb.entry.js.map} +0 -0
  419. /package/dist/native/{p-11012998.entry.js.map → p-676447d7.entry.js.map} +0 -0
  420. /package/dist/native/{p-16ef7dd4.entry.js.map → p-681f2bac.entry.js.map} +0 -0
  421. /package/dist/native/{p-4b15cff3.entry.js.map → p-7f0d576b.entry.js.map} +0 -0
  422. /package/dist/native/{p-68edb2e8.entry.js.map → p-85f8f11a.entry.js.map} +0 -0
  423. /package/dist/native/{p-0e005d95.entry.js.map → p-888ad58e.entry.js.map} +0 -0
  424. /package/dist/native/{p-34bf336f.entry.js.map → p-92931ab8.entry.js.map} +0 -0
  425. /package/dist/native/{p-f00a4552.entry.js.map → p-94dc9c41.entry.js.map} +0 -0
  426. /package/dist/native/{p-85a54ef2.entry.js.map → p-9c5d6827.entry.js.map} +0 -0
  427. /package/dist/native/{p-1f932a4b.entry.js.map → p-aacd8789.entry.js.map} +0 -0
  428. /package/dist/native/{p-a50f3850.entry.js.map → p-ac5496e7.entry.js.map} +0 -0
  429. /package/dist/native/{p-9ea3d30d.entry.js.map → p-ad2cc829.entry.js.map} +0 -0
  430. /package/dist/native/{p-67c34b8c.entry.js.map → p-b58fb522.entry.js.map} +0 -0
  431. /package/dist/native/{p-f540db71.entry.js.map → p-dd023fd6.entry.js.map} +0 -0
  432. /package/dist/native/{p-051db87c.entry.js.map → p-fb672f90.entry.js.map} +0 -0
@@ -0,0 +1,78 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
2
+
3
+ const nvTogglebuttonCss = "nv-togglebutton{display:inline-flex;justify-content:center;align-items:center}nv-togglebutton[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);font-size:var(--button-xs-font-size);padding-top:calc(var(--togglegroup-xs-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-xs-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-xs-button-radius));border-width:0}nv-togglebutton[size=xs] nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-togglebutton[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);font-size:var(--button-sm-font-size);padding-top:calc(var(--togglegroup-sm-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-sm-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-sm-button-radius));border-width:0}nv-togglebutton[size=sm] nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-togglebutton[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);font-size:var(--button-md-font-size);padding-top:calc(var(--togglegroup-md-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-md-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-md-button-radius));border-width:0}nv-togglebutton[size=md] nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-togglebutton[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);font-size:var(--button-lg-font-size);padding-top:calc(var(--togglegroup-lg-button-padding-y) - 1px);padding-bottom:calc(var(--togglegroup-lg-button-padding-y) - 1px);border-radius:calc(var(--togglegroup-lg-button-radius));border-width:0}nv-togglebutton[size=lg] nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-togglebutton[emphasis=high]{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-togglebutton[emphasis=high]:hover{background:var(--components-button-low-background-hover);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text-hover)}nv-togglebutton[emphasis=high]: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-togglebutton[emphasis=high]:focus,nv-togglebutton[emphasis=high]:focus-within{outline:none}nv-togglebutton[emphasis=high]:focus-visible,nv-togglebutton[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);z-index:111}nv-togglebutton[emphasis=high]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-togglebutton[emphasis=high][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-togglebutton[emphasis=low]{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-togglebutton[emphasis=low]:hover{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}nv-togglebutton[emphasis=low]: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-togglebutton[emphasis=low]:focus,nv-togglebutton[emphasis=low]:focus-within{outline:none}nv-togglebutton[emphasis=low]:focus-visible,nv-togglebutton[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);z-index:111}nv-togglebutton[emphasis=low]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-togglebutton[emphasis=low][active]:not([active=false]),nv-togglebutton[emphasis=low]:active{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}";
4
+ const NvTogglebuttonStyle0 = nvTogglebuttonCss;
5
+
6
+ const NvTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class NvTogglebutton extends H {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.toggled = createEvent(this, "toggled", 7);
11
+ /****************************************************************************/
12
+ //#region PROPERTIES
13
+ /**
14
+ * Determines how large or small the togglebutton appears, allowing for
15
+ * customization of the togglebutton's dimensions to fit different design
16
+ * specifications and user needs.
17
+ */
18
+ this.size = 'md';
19
+ /**
20
+ * Prevents all interaction, rendering the toggle in a non-interactive state.
21
+ */
22
+ this.disabled = false;
23
+ /**
24
+ * Whether the button is active or not. Will not toggle automatically but
25
+ * needs to be controlled externally.
26
+ */
27
+ this.active = false;
28
+ /**
29
+ * Make it more or less visually prominent to users.
30
+ */
31
+ this.emphasis = 'high';
32
+ //#endregion PROPERTIES
33
+ /****************************************************************************/
34
+ //#region METHODS
35
+ this.handleClick = () => {
36
+ if (this.disabled)
37
+ return;
38
+ this.toggled.emit({
39
+ value: this.value,
40
+ active: this.active,
41
+ });
42
+ };
43
+ }
44
+ //#endregion EVENTS
45
+ /****************************************************************************/
46
+ //#region RENDER
47
+ render() {
48
+ return (h(Host, { key: '81e773d6bafc0fd451fb7e71cb14ca709af2d07e', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, h("slot", { key: '4cec2d6ae5388cdfd285ab15af356e9833b0ccb3' })));
49
+ }
50
+ static get style() { return NvTogglebuttonStyle0; }
51
+ }, [4, "nv-togglebutton", {
52
+ "size": [513],
53
+ "value": [513],
54
+ "disabled": [516],
55
+ "active": [516],
56
+ "emphasis": [513]
57
+ }]);
58
+ function defineCustomElement$1() {
59
+ if (typeof customElements === "undefined") {
60
+ return;
61
+ }
62
+ const components = ["nv-togglebutton"];
63
+ components.forEach(tagName => { switch (tagName) {
64
+ case "nv-togglebutton":
65
+ if (!customElements.get(tagName)) {
66
+ customElements.define(tagName, NvTogglebutton$1);
67
+ }
68
+ break;
69
+ } });
70
+ }
71
+ defineCustomElement$1();
72
+
73
+ const NvTogglebutton = NvTogglebutton$1;
74
+ const defineCustomElement = defineCustomElement$1;
75
+
76
+ export { NvTogglebutton, defineCustomElement };
77
+
78
+ //# sourceMappingURL=nv-togglebutton.js.map
@@ -0,0 +1 @@
1
+ {"file":"nv-togglebutton.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,2oJAA2oJ,CAAC;AACtqJ,6BAAe,iBAAiB;;MCUnBA,gBAAc;IAL3B;;;;;;;;;;;QAeW,SAAI,GAA0B,IAAI,CAAC;;;;QAanC,aAAQ,GAAY,KAAK,CAAC;;;;;QAO1B,WAAM,GAAY,KAAK,CAAC;;;;QAMxB,aAAQ,GAA8B,MAAM,CAAC;;;;QAM9C,gBAAW,GAAG;YACpB,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;SACJ,CAAC;KAiCH;;;;IAbC,MAAM;QACJ,QACE,EAAC,IAAI,qDACH,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAC,GAAG,kBACE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EACjC,OAAO,EAAE,IAAI,CAAC,WAAW,IAEzB,8DAAa,CACR,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvTogglebutton"],"sources":["src/components/nv-togglebutton/styles/nv-togglebutton.scss?tag=nv-togglebutton","src/components/nv-togglebutton/nv-togglebutton.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\nnv-togglebutton {\n @include root-styles();\n\n @each $size in $sizes {\n &[size=\"#{$size}\"] {\n @include button-size-styles($size);\n @include togglegroup-button-size-styles($size);\n }\n }\n\n &[emphasis=\"high\"] {\n @include button-emphasis-styles('low');\n &[active]:not([active=\"false\"]) {\n @include button-active-styles('low');\n }\n }\n &[emphasis=\"low\"] {\n @include button-emphasis-styles('lower');\n &[active]:not([active=\"false\"]), &:active {\n @include button-hover-styles('lower');\n }\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { ToggleButtonEmphasis, ToggleButtonSize } from '../../utils/constants';\n\n/**\n * @slot default - Child content of the toggle button.\n */\n@Component({\n tag: 'nv-togglebutton',\n styleUrl: 'styles/nv-togglebutton.scss',\n shadow: false,\n})\nexport class NvTogglebutton {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ToggleButtonSize}` = 'md';\n\n /**\n * The value to associated with the button when selected in a\n * Togglebuttongroup.\n */\n @Prop({ reflect: true })\n readonly value: string;\n\n /**\n * Prevents all interaction, rendering the toggle in a non-interactive state.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Whether the button is active or not. Will not toggle automatically but\n * needs to be controlled externally.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Make it more or less visually prominent to users.\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ToggleButtonEmphasis}` = 'high';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n private handleClick = () => {\n if (this.disabled) return;\n\n this.toggled.emit({\n value: this.value,\n active: this.active,\n });\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the button is toggled.\n */\n @Event({ eventName: 'toggled' })\n toggled: EventEmitter<{\n /** The value associated with the button. */\n value: string;\n /** If the button is active when clicked. */\n active: boolean;\n }>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n render() {\n return (\n <Host\n role=\"button\"\n tabindex=\"0\"\n aria-pressed={String(this.active)}\n onClick={this.handleClick}\n >\n <slot></slot>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface NvTogglebuttongroup extends Components.NvTogglebuttongroup, HTMLElement {}
4
+ export const NvTogglebuttongroup: {
5
+ prototype: NvTogglebuttongroup;
6
+ new (): NvTogglebuttongroup;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,196 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
2
+
3
+ const nvTogglebuttongroupCss = "nv-togglebuttongroup{display:flex;gap:var(--togglegroup-lg-gap);border-radius:var(--togglegroup-lg-radius);width:fit-content;padding:var(--togglegroup-lg-gap)}nv-togglebuttongroup[emphasis=high]{border:1px solid var(--components-togglegroup-high-border)}nv-togglebuttongroup[emphasis=low]{border:1px solid var(--components-togglegroup-low-border)}nv-togglebuttongroup[size=xs]{padding:calc(var(--togglegroup-xs-padding) - 1px);gap:var(--togglegroup-xs-gap);border-radius:var(--togglegroup-xs-radius)}nv-togglebuttongroup[size=sm]{padding:calc(var(--togglegroup-sm-padding) - 1px);gap:var(--togglegroup-sm-gap);border-radius:var(--togglegroup-sm-radius)}nv-togglebuttongroup[size=md]{padding:calc(var(--togglegroup-md-padding) - 1px);gap:var(--togglegroup-md-gap);border-radius:var(--togglegroup-md-radius)}nv-togglebuttongroup[size=lg]{padding:calc(var(--togglegroup-lg-padding) - 1px);gap:var(--togglegroup-lg-gap);border-radius:var(--togglegroup-lg-radius)}";
4
+ const NvTogglebuttongroupStyle0 = nvTogglebuttongroupCss;
5
+
6
+ const NvTogglebuttongroup$1 = /*@__PURE__*/ proxyCustomElement(class NvTogglebuttongroup extends H {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.valueChanged = createEvent(this, "valueChanged", 7);
11
+ /**
12
+ * Activates single-selection mode so only one button can be active at a time.
13
+ */
14
+ this.exclusive = false;
15
+ /**
16
+ * Ensures at least one toggle stays selected at all times.
17
+ */
18
+ this.enforceValue = false;
19
+ /**
20
+ * Make it more or less visually prominent to users.
21
+ */
22
+ this.emphasis = 'high';
23
+ /**
24
+ * Determines how large or small the togglebutton appears, allowing for
25
+ * customization of the togglebutton's dimensions to fit different design
26
+ * specifications and user needs.
27
+ */
28
+ this.size = 'md';
29
+ //#endregion PROPERTIES
30
+ /****************************************************************************/
31
+ //#region METHODS
32
+ /**
33
+ * Sets the active state of all toggle buttons depending on the value of the
34
+ * group.
35
+ */
36
+ this.setActiveToggleButtons = () => {
37
+ this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {
38
+ var _a;
39
+ const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);
40
+ if (!btn)
41
+ return;
42
+ btn.active = ((_a = this.value) !== null && _a !== void 0 ? _a : []).includes(btn.value);
43
+ });
44
+ };
45
+ /**
46
+ * Sets the emphasis of all toggle buttons to the same value.
47
+ */
48
+ this.setEmphasisToggleButtons = () => {
49
+ this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {
50
+ const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);
51
+ if (!btn)
52
+ return;
53
+ btn.emphasis = this.emphasis;
54
+ });
55
+ };
56
+ /**
57
+ * Sets the size of all toggle buttons to the same value.
58
+ */
59
+ this.setSizeToggleButtons = () => {
60
+ this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {
61
+ const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);
62
+ if (!btn)
63
+ return;
64
+ btn.size = this.size;
65
+ });
66
+ };
67
+ /**
68
+ * Sets up the MutationObserver to watch for changes in child elements
69
+ */
70
+ this.setupMutationObserver = () => {
71
+ this.mutationObserver = new MutationObserver(mutations => {
72
+ mutations.forEach(mutation => {
73
+ if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
74
+ this.setEmphasisToggleButtons();
75
+ this.setSizeToggleButtons();
76
+ }
77
+ });
78
+ });
79
+ this.mutationObserver.observe(this.el, {
80
+ childList: true,
81
+ subtree: true,
82
+ });
83
+ };
84
+ }
85
+ /**
86
+ * Narrow Type used locally to interact with nv-togglebutton child elements.
87
+ * @param {Element} element - The element to check.
88
+ * @returns {(HTMLElement & {
89
+ * active: boolean;
90
+ * value: string;
91
+ * emphasis: `${ToggleButtonEmphasis}`;
92
+ * size: `${ToggleButtonSize}`;
93
+ * }) | null} The element as a toggle button, or null if it is not a toggle button.
94
+ */
95
+ static asToggleButton(element) {
96
+ return element instanceof H
97
+ ? element
98
+ : null;
99
+ }
100
+ //#endregion METHODS
101
+ /****************************************************************************/
102
+ //#region WATCHERS
103
+ onValueChanged(newValue) {
104
+ this.setActiveToggleButtons();
105
+ this.valueChanged.emit(newValue);
106
+ }
107
+ onEmphasisChanged() {
108
+ this.setEmphasisToggleButtons();
109
+ }
110
+ onSizeChanged() {
111
+ this.setSizeToggleButtons();
112
+ }
113
+ onToggled(event) {
114
+ const valueSet = new Set(this.value);
115
+ if (this.exclusive && this.enforceValue) {
116
+ this.value = [event.detail.value];
117
+ return;
118
+ }
119
+ if (this.exclusive) {
120
+ if (valueSet.has(event.detail.value)) {
121
+ this.value = [];
122
+ }
123
+ else {
124
+ this.value = [event.detail.value];
125
+ }
126
+ return;
127
+ }
128
+ toggle: if (event.detail.active) {
129
+ if (this.enforceValue && valueSet.size === 1)
130
+ break toggle;
131
+ valueSet.delete(event.detail.value);
132
+ }
133
+ else {
134
+ valueSet.add(event.detail.value);
135
+ }
136
+ this.value = [...valueSet];
137
+ }
138
+ //#endregion WATCHERS
139
+ /****************************************************************************/
140
+ //#region LIFECYCLE
141
+ componentWillLoad() {
142
+ this.setActiveToggleButtons();
143
+ this.setEmphasisToggleButtons();
144
+ this.setSizeToggleButtons();
145
+ this.setupMutationObserver();
146
+ }
147
+ disconnectedCallback() {
148
+ if (this.mutationObserver) {
149
+ this.mutationObserver.disconnect();
150
+ }
151
+ }
152
+ //#endregion EVENTS
153
+ /****************************************************************************/
154
+ //#region RENDER
155
+ render() {
156
+ return (h(Host, { key: '52e2d0e1b8f0740a50a8d4d1e93af494e957b521' }, h("slot", { key: 'a82248437817b4fd7aa1c64e4d544050a71b4311' })));
157
+ }
158
+ get el() { return this; }
159
+ static get watchers() { return {
160
+ "value": ["onValueChanged"],
161
+ "emphasis": ["onEmphasisChanged"],
162
+ "size": ["onSizeChanged"]
163
+ }; }
164
+ static get style() { return NvTogglebuttongroupStyle0; }
165
+ }, [4, "nv-togglebuttongroup", {
166
+ "value": [1040],
167
+ "exclusive": [516],
168
+ "enforceValue": [516, "enforce-value"],
169
+ "emphasis": [513],
170
+ "size": [513]
171
+ }, [[0, "toggled", "onToggled"]], {
172
+ "value": ["onValueChanged"],
173
+ "emphasis": ["onEmphasisChanged"],
174
+ "size": ["onSizeChanged"]
175
+ }]);
176
+ function defineCustomElement$1() {
177
+ if (typeof customElements === "undefined") {
178
+ return;
179
+ }
180
+ const components = ["nv-togglebuttongroup"];
181
+ components.forEach(tagName => { switch (tagName) {
182
+ case "nv-togglebuttongroup":
183
+ if (!customElements.get(tagName)) {
184
+ customElements.define(tagName, NvTogglebuttongroup$1);
185
+ }
186
+ break;
187
+ } });
188
+ }
189
+ defineCustomElement$1();
190
+
191
+ const NvTogglebuttongroup = NvTogglebuttongroup$1;
192
+ const defineCustomElement = defineCustomElement$1;
193
+
194
+ export { NvTogglebuttongroup, defineCustomElement };
195
+
196
+ //# sourceMappingURL=nv-togglebuttongroup.js.map
@@ -0,0 +1 @@
1
+ {"file":"nv-togglebuttongroup.js","mappings":";;AAAA,MAAM,sBAAsB,GAAG,i8BAAi8B,CAAC;AACj+B,kCAAe,sBAAsB;;MCsBxBA,qBAAmB;IALhC;;;;;;;QAuBW,cAAS,GAAY,KAAK,CAAC;;;;QAM3B,iBAAY,GAAY,KAAK,CAAC;;;;QAM9B,aAAQ,GAA8B,MAAM,CAAC;;;;;;QAQ7C,SAAI,GAA0B,IAAI,CAAC;;;;;;;;QAUpC,2BAAsB,GAAG;YAC/B,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,cAAc;;gBAChE,MAAM,GAAG,GAAG,mBAAmB,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;gBAC/D,IAAI,CAAC,GAAG;oBAAE,OAAO;gBACjB,GAAG,CAAC,MAAM,GAAG,CAAC,MAAA,IA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QAAQ,CAAC,CAAC;KAC5B;;;;IAMD,iBAAiB;QACf,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC9B,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,qBAAqB,EAAE,CAAC;KAC9B;IAED,oBAAoB;QAClB,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;SACpC;KACF;;;;IAiBD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,8DAAa,CACR,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NvTogglebuttongroup","HTMLElement"],"sources":["src/components/nv-togglebuttongroup/styles/nv-togglebuttongroup.scss?tag=nv-togglebuttongroup","src/components/nv-togglebuttongroup/nv-togglebuttongroup.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\nnv-togglebuttongroup {\n @include root-styles();\n\n &[emphasis=\"high\"] {\n @include high-emphasis-styles();\n }\n &[emphasis=\"low\"] {\n @include low-emphasis-styles();\n }\n @each $size in $sizes {\n &[size=\"#{$size}\"] {\n @include size-styles($size);\n \n }\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { ToggleButtonEmphasis, ToggleButtonSize } from '../../utils/constants';\n\n/**\n * @deprecated [EXPERIMENTAL]\n * @experimental This component is still in development and subject to change in future releases.\n * @slot default - Child content of the component, pass the nv-togglebutton components here.\n */\n@Component({\n tag: 'nv-togglebuttongroup',\n styleUrl: 'styles/nv-togglebuttongroup.scss',\n shadow: false,\n})\nexport class NvTogglebuttongroup {\n @Element() el!: HTMLNvTogglebuttongroupElement;\n private mutationObserver: MutationObserver;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The active toggle buttons in the group. Is an array of one string when in\n * exclusive mode, and an array of strings when in non-exclusive mode.\n */\n @Prop({ reflect: false, mutable: true })\n value: string[];\n\n /**\n * Activates single-selection mode so only one button can be active at a time.\n */\n @Prop({ reflect: true })\n readonly exclusive: boolean = false;\n\n /**\n * Ensures at least one toggle stays selected at all times.\n */\n @Prop({ reflect: true })\n readonly enforceValue: boolean = false;\n\n /**\n * Make it more or less visually prominent to users.\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ToggleButtonEmphasis}` = 'high';\n\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ToggleButtonSize}` = 'md';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Sets the active state of all toggle buttons depending on the value of the\n * group.\n */\n private setActiveToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.active = (this.value ?? []).includes(btn.value);\n });\n };\n\n /**\n * Sets the emphasis of all toggle buttons to the same value.\n */\n private setEmphasisToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.emphasis = this.emphasis;\n });\n };\n\n /**\n * Sets the size of all toggle buttons to the same value.\n */\n private setSizeToggleButtons = () => {\n this.el.querySelectorAll('nv-togglebutton').forEach(toggleButtonEl => {\n const btn = NvTogglebuttongroup.asToggleButton(toggleButtonEl);\n if (!btn) return;\n btn.size = this.size;\n });\n };\n\n /**\n * Sets up the MutationObserver to watch for changes in child elements\n */\n private setupMutationObserver = (): void => {\n this.mutationObserver = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n this.setEmphasisToggleButtons();\n this.setSizeToggleButtons();\n }\n });\n });\n\n this.mutationObserver.observe(this.el, {\n childList: true,\n subtree: true,\n });\n };\n\n /**\n * Narrow Type used locally to interact with nv-togglebutton child elements.\n * @param {Element} element - The element to check.\n * @returns {(HTMLElement & {\n * active: boolean;\n * value: string;\n * emphasis: `${ToggleButtonEmphasis}`;\n * size: `${ToggleButtonSize}`;\n * }) | null} The element as a toggle button, or null if it is not a toggle button.\n */\n private static asToggleButton(element: Element):\n | (HTMLElement & {\n /**\n * Whether the button is active or not. Will not toggle automatically but\n * needs to be controlled externally.\n */\n active: boolean;\n /**\n * The value to associated with the button when selected in a\n * Togglebuttongroup.\n */\n value: string;\n /**\n * Make it more or less visually prominent to users.\n */\n emphasis: `${ToggleButtonEmphasis}`;\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n size: `${ToggleButtonSize}`;\n })\n | null {\n return element instanceof HTMLElement\n ? (element as unknown as HTMLElement & {\n /**\n * Whether the button is active or not. Will not toggle automatically but\n * needs to be controlled externally.\n */\n active: boolean;\n /**\n * The value to associated with the button when selected in a\n * Togglebuttongroup.\n */\n value: string;\n /**\n * Make it more or less visually prominent to users.\n */\n emphasis: `${ToggleButtonEmphasis}`;\n /**\n * Determines how large or small the togglebutton appears, allowing for\n * customization of the togglebutton's dimensions to fit different design\n * specifications and user needs.\n */\n size: `${ToggleButtonSize}`;\n })\n : null;\n }\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('value')\n onValueChanged(newValue: typeof this.value) {\n this.setActiveToggleButtons();\n this.valueChanged.emit(newValue);\n }\n\n @Watch('emphasis')\n onEmphasisChanged() {\n this.setEmphasisToggleButtons();\n }\n\n @Watch('size')\n onSizeChanged() {\n this.setSizeToggleButtons();\n }\n\n @Listen('toggled')\n onToggled(event: CustomEvent<HTMLNvTogglebuttonElementEventMap['toggled']>) {\n const valueSet = new Set(this.value);\n\n if (this.exclusive && this.enforceValue) {\n this.value = [event.detail.value];\n return;\n }\n\n if (this.exclusive) {\n if (valueSet.has(event.detail.value)) {\n this.value = [];\n } else {\n this.value = [event.detail.value];\n }\n return;\n }\n\n toggle: if (event.detail.active) {\n if (this.enforceValue && valueSet.size === 1) break toggle;\n valueSet.delete(event.detail.value);\n } else {\n valueSet.add(event.detail.value);\n }\n this.value = [...valueSet];\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.setActiveToggleButtons();\n this.setEmphasisToggleButtons();\n this.setSizeToggleButtons();\n this.setupMutationObserver();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the selected toggle buttons change.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string[]>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n\n // #endregion RENDER\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { N as NvTooltip$1, d as defineCustomElement$1 } from './p-ba87d9d5.js';
1
+ import { N as NvTooltip$1, d as defineCustomElement$1 } from './p-2ef4fb88.js';
2
2
 
3
3
  const NvTooltip = NvTooltip$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-aff3ed68.js';
2
- import { d as defineCustomElement$1 } from './p-6460318d.js';
2
+ import { d as defineCustomElement$1 } from './p-a1fe0a5d.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:700}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:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-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:500;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:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-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:\"TT Norms Pro\", 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:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
@@ -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: '35382ab52aa48116fbedc7683aff4729f06f5969' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '6f849db1b7603fc4de4fb23075fd7daa72438dd2', htmlFor: this.inputId }, h("slot", { key: '24bc67fe3a8de24a8601a2cf3c5afd2532e17c4a', name: "label" }, this.label))), h("div", { key: '8ffd2d0f048082c71a76054842fffd22452b9ad2', class: "input-wrapper" }, h("slot", { key: '478020c16e29399dcc6566651f88acc8d88ef36d', name: "before-input" }), h("div", { key: '1aa0bac3947bdff209268619202ccc38da691761', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: '369b5f0a4c4d1d16217ad5de9221273ece41e1f0', name: "leading-input" }), h("input", { key: '91446fe15f48f45693f56b3fd21926b8114c1dca', 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: '505a9ed004c4492f8daaef9a92bcaf344e2a10fb', name: "trailing-input" }), this.error && (h("nv-icon", { key: 'c1e9ecd4f901862391daa6c9f5c75d3c1b81810f', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '15a452bdbbb386a51e4fe51370bd09521cc6f47f', name: "circle-check", class: "validation", size: "md" }))), h("slot", { key: '7e7e3969dd6f3d1b80eab00ac966f7ba9f13895c', name: "after-input" })), (this.description ||
114
- this.el.querySelector('[slot="description"]')) && (h("div", { key: 'b4ca95846a8fdf68e95d602968506bf009f9334f', class: "description" }, h("slot", { key: 'fce329e819b837318b2d9bf9e16a8ef886aa940a', name: "description" }, this.description))), (this.errorDescription ||
115
- this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'c3800ac457b5f0f87a3bdf9e9e37a36f5905786c', hidden: !this.error, class: "error-description" }, h("slot", { key: 'f77d02598ba261bf2b48b16ecfa3fc15fe221599', name: "error-description" }, this.errorDescription)))));
113
+ return (h(Host, { key: 'c807258b41bcaada1a02abf56171f84a4dadc981' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '9ba74a42aaddc54af913d8e9a76ad596f0b0ca02', htmlFor: this.inputId }, h("slot", { key: '7b0c763c5034807aceaf883dc8a7097cc5d21586', name: "label" }, this.label))), h("div", { key: '89396cfa77b11ea2499292448f43303ec1419432', class: "input-wrapper" }, h("slot", { key: '0574e6280a9f8575a555ed71cb380f8d622019a3', name: "before-input" }), h("div", { key: 'a7822f74ded6e21992ebf15afbbcaea449195c6a', class: "input-container", onClick: this.handleInputContainerClick }, h("slot", { key: 'af6789b67cea21c9445bd1000fa582c092daccf6', name: "leading-input" }), h("input", { key: '00118f95a1555d601cf5de2b4703e064dc31250a', 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: '67e4fecbfd6c938e77b98416d0d6229993ec4592', name: "trailing-input" }), this.error && (h("nv-icon", { key: '5f11f64460e003859fefffa904c70719ebf87a26', name: "alert-circle", class: "validation", size: "md" })), this.success && (h("nv-icon", { key: '161fec1690c7672be64684c0121a802406b1d30b', name: "circle-check", class: "validation", size: "md" }))), h("slot", { key: '05d808bc7c372d5c911d03c074c89a829e42083b', name: "after-input" })), (this.description ||
114
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '07818a5aec0540a8758ccdfc32dbc15129adf5e9', class: "description" }, h("slot", { key: 'cc7b3a9086b4afae71c25964a92ea2ed5f07813a', name: "description" }, this.description))), (this.errorDescription ||
115
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'a313507b2c8f88c5d7304513b84f9bb360886961', hidden: !this.error, class: "error-description" }, h("slot", { key: '796a5b0c0df37196a4c71bef6a35814fff1eae47', 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
 
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AG,CAC7D,EACA,IAAI,CAAC,OAAO,KACX,gEAAS,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG,CAC7D,CACG,EAEN,6DAAM,IAAI,EAAC,aAAa,GAAQ,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-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-0ffb4785.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,wsOAAwsO,CAAC;AAChuO,0BAAe,cAAc;;MC2BhB,WAAW;IANxB;;;;;;;;;;;;;QA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,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-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}
@@ -2365,7 +2365,7 @@ const NvPopover = /*@__PURE__*/ proxyCustomElement(class NvPopover extends H {
2365
2365
  /****************************************************************************/
2366
2366
  //#region RENDER
2367
2367
  render() {
2368
- return (h(Host, { key: '27f6f8acc148b3dc2b16a391c54a4a1de0637a57' }, h("slot", { key: 'd25614b3bfc5565d3729da11f6f83b4d92e83e19', name: "trigger" }), h("div", { key: '3b777862573405b2bb2a377750d9bb859a4bb20b', "data-scope": "popover", hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (h("div", { key: 'dda88155630bca69ec06a766e2999ed369d5d6c6', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), h("slot", { key: '51eaf873fe239d3c4106e997f6cdd37b1bb29074', name: "content" }))));
2368
+ return (h(Host, { key: '14f8a4ffc146664a2fd00bbfc413494929eec492' }, h("slot", { key: 'aaf84cb70beb8f63f030c16c47b41340c238a47c', name: "trigger" }), h("div", { key: 'e75b6f6a1131ae9bd39d3a10a1a9801a8c14d756', "data-scope": "popover", hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (h("div", { key: '98233b5961fe5476062b671db8274f6802afa700', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), h("slot", { key: '5bf731ff7007e4e1128405a22b9f0c8a16305228', name: "content" }))));
2369
2369
  }
2370
2370
  get el() { return this; }
2371
2371
  static get watchers() { return {
@@ -2407,4 +2407,4 @@ defineCustomElement();
2407
2407
 
2408
2408
  export { NvPopover as N, defineCustomElement as d };
2409
2409
 
2410
- //# sourceMappingURL=p-8067d283.js.map
2410
+ //# sourceMappingURL=p-195f46f3.js.map