@nova-design-system/nova-webcomponents 3.15.0 → 3.17.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 (554) hide show
  1. package/dist/cjs/{index-c56424e5.js → index-93d3b2f8.js} +9 -6
  2. package/dist/cjs/index-93d3b2f8.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +6 -1
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/native.cjs.js +2 -2
  7. package/dist/cjs/nv-accordion-item.cjs.entry.js +2 -2
  8. package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
  9. package/dist/cjs/nv-accordion.cjs.entry.js +6 -6
  10. package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nv-alert.cjs.entry.js +2 -2
  12. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nv-avatar.cjs.entry.js +2 -2
  14. package/dist/cjs/nv-avatar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  16. package/dist/cjs/nv-breadcrumb.cjs.entry.js +2 -2
  17. package/dist/cjs/nv-breadcrumb.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  19. package/dist/cjs/nv-button.cjs.entry.js +3 -9
  20. package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nv-buttongroup.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-calendar.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-datagrid.cjs.entry.js +177 -10
  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 +32 -29
  28. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  29. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +2 -2
  30. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +2 -2
  32. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nv-fielddate.cjs.entry.js +51 -26
  34. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nv-fielddaterange.cjs.entry.js +68 -42
  36. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fielddropdown.cjs.entry.js +33 -7
  38. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  40. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +187 -156
  41. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  42. package/dist/cjs/nv-fieldnumber.cjs.entry.js +2 -2
  43. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nv-fieldpassword.cjs.entry.js +2 -2
  45. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  46. package/dist/cjs/nv-fieldradio.cjs.entry.js +2 -2
  47. package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nv-fieldselect.cjs.entry.js +2 -2
  49. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  50. package/dist/cjs/nv-fieldslider.cjs.entry.js +2 -2
  51. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
  52. package/dist/cjs/nv-fieldtext.cjs.entry.js +2 -2
  53. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  54. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +2 -2
  55. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  56. package/dist/cjs/nv-fieldtime.cjs.entry.js +25 -12
  57. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  58. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  59. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  60. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  61. package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
  62. package/dist/cjs/nv-menu.cjs.entry.js +24 -9
  63. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -1
  64. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  65. package/dist/cjs/nv-notification.cjs.entry.js +2 -2
  66. package/dist/cjs/nv-notification.cjs.entry.js.map +1 -1
  67. package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
  68. package/dist/cjs/nv-popover.cjs.entry.js +67 -61
  69. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  70. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  71. package/dist/cjs/nv-split.cjs.entry.js +339 -0
  72. package/dist/cjs/nv-split.cjs.entry.js.map +1 -0
  73. package/dist/cjs/nv-stack.cjs.entry.js +2 -2
  74. package/dist/cjs/nv-table.cjs.entry.js +216 -310
  75. package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
  76. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  77. package/dist/cjs/nv-toggle.cjs.entry.js.map +1 -1
  78. package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
  79. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +2 -2
  80. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js.map +1 -1
  81. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  82. package/dist/collection/collection-manifest.json +1 -1
  83. package/dist/collection/components/nv-accordion/nv-accordion.js +12 -9
  84. package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
  85. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
  86. package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +1 -1
  87. package/dist/collection/components/nv-alert/nv-alert.css +1 -1
  88. package/dist/collection/components/nv-avatar/nv-avatar.css +1 -1
  89. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.css +1 -1
  90. package/dist/collection/components/nv-button/nv-button.js +1 -13
  91. package/dist/collection/components/nv-button/nv-button.js.map +1 -1
  92. package/dist/collection/components/nv-button/styles/nv-button.css +1 -1
  93. package/dist/collection/components/nv-datagrid/nv-datagrid.css +2 -2
  94. package/dist/collection/components/nv-dialog/nv-dialog.css +2 -2
  95. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +13 -0
  96. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  97. package/dist/collection/components/nv-dialog/nv-dialog.js +30 -27
  98. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  99. package/dist/collection/components/nv-dialogheader/nv-dialogheader.css +4 -4
  100. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +3 -3
  101. package/dist/collection/components/nv-fielddate/nv-fielddate.js +49 -24
  102. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  103. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +8 -8
  104. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +66 -43
  105. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  106. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +8 -8
  107. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +26 -4
  108. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  109. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +32 -4
  110. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  111. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +9 -9
  112. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +186 -153
  113. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  114. package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +9 -9
  115. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +8 -8
  116. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +8 -8
  117. package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +3 -3
  118. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +12 -12
  119. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +7 -7
  120. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +8 -8
  121. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +9 -1
  122. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  123. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +8 -8
  124. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +22 -0
  125. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
  126. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +24 -9
  127. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  128. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +8 -8
  129. package/dist/collection/components/nv-icon/nv-icons.js +6 -1
  130. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  131. package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +2 -2
  132. package/dist/collection/components/nv-menu/nv-menu.docs.js +7 -0
  133. package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
  134. package/dist/collection/components/nv-menu/nv-menu.js +26 -8
  135. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  136. package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
  137. package/dist/collection/components/nv-notification/styles/nv-notification.css +2 -2
  138. package/dist/collection/components/nv-popover/nv-popover.docs.js +11 -0
  139. package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
  140. package/dist/collection/components/nv-popover/nv-popover.js +66 -60
  141. package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
  142. package/dist/collection/components/nv-split/nv-split.docs.js +41 -0
  143. package/dist/collection/components/nv-split/nv-split.docs.js.map +1 -0
  144. package/dist/collection/components/nv-split/nv-split.js +549 -0
  145. package/dist/collection/components/nv-split/nv-split.js.map +1 -0
  146. package/dist/collection/components/nv-split/styles/nv-split.css +96 -0
  147. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  148. package/dist/collection/components/nv-table/nv-table.docs.js +16 -155
  149. package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
  150. package/dist/collection/components/nv-table/nv-table.js +68 -496
  151. package/dist/collection/components/nv-table/nv-table.js.map +1 -1
  152. package/dist/collection/components/nv-table/nv-table.utils.js +175 -0
  153. package/dist/collection/components/nv-table/nv-table.utils.js.map +1 -0
  154. package/dist/collection/components/nv-table/styles/nv-table.css +84 -0
  155. package/dist/collection/components/nv-table/test/nv-table.utils.test.js +604 -0
  156. package/dist/collection/components/nv-table/test/nv-table.utils.test.js.map +1 -0
  157. package/dist/collection/components/nv-toggle/nv-toggle.css +3 -3
  158. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +1 -0
  159. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
  160. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -3
  161. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -1
  162. package/dist/components/index.js +7 -2
  163. package/dist/components/index.js.map +1 -1
  164. package/dist/components/nv-accordion-item.js +1 -1
  165. package/dist/components/nv-accordion.js +10 -10
  166. package/dist/components/nv-accordion.js.map +1 -1
  167. package/dist/components/nv-alert.js +3 -3
  168. package/dist/components/nv-alert.js.map +1 -1
  169. package/dist/components/nv-avatar.js +3 -3
  170. package/dist/components/nv-avatar.js.map +1 -1
  171. package/dist/components/nv-badge.js +1 -1
  172. package/dist/components/nv-breadcrumb.js +4 -4
  173. package/dist/components/nv-breadcrumb.js.map +1 -1
  174. package/dist/components/nv-breadcrumbs.js +1 -1
  175. package/dist/components/nv-button.js +1 -1
  176. package/dist/components/nv-buttongroup.js +1 -1
  177. package/dist/components/nv-calendar.js +1 -1
  178. package/dist/components/nv-col.js +1 -1
  179. package/dist/components/nv-datagrid.js +174 -7
  180. package/dist/components/nv-datagrid.js.map +1 -1
  181. package/dist/components/nv-datagridcolumn.js +1 -1
  182. package/dist/components/nv-dialog.js +37 -34
  183. package/dist/components/nv-dialog.js.map +1 -1
  184. package/dist/components/nv-dialogfooter.js +1 -1
  185. package/dist/components/nv-dialogheader.js +1 -1
  186. package/dist/components/nv-fieldcheckbox.js +1 -1
  187. package/dist/components/nv-fielddate.js +57 -32
  188. package/dist/components/nv-fielddate.js.map +1 -1
  189. package/dist/components/nv-fielddaterange.js +74 -48
  190. package/dist/components/nv-fielddaterange.js.map +1 -1
  191. package/dist/components/nv-fielddropdown.js +40 -13
  192. package/dist/components/nv-fielddropdown.js.map +1 -1
  193. package/dist/components/nv-fielddropdownitem.js +1 -1
  194. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  195. package/dist/components/nv-fieldmultiselect.js +196 -164
  196. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  197. package/dist/components/nv-fieldnumber.js +1 -1
  198. package/dist/components/nv-fieldpassword.js +5 -5
  199. package/dist/components/nv-fieldpassword.js.map +1 -1
  200. package/dist/components/nv-fieldradio.js +2 -2
  201. package/dist/components/nv-fieldradio.js.map +1 -1
  202. package/dist/components/nv-fieldselect.js +5 -5
  203. package/dist/components/nv-fieldselect.js.map +1 -1
  204. package/dist/components/nv-fieldslider.js +6 -6
  205. package/dist/components/nv-fieldslider.js.map +1 -1
  206. package/dist/components/nv-fieldtext.js +1 -1
  207. package/dist/components/nv-fieldtextarea.js +2 -2
  208. package/dist/components/nv-fieldtextarea.js.map +1 -1
  209. package/dist/components/nv-fieldtime.js +31 -17
  210. package/dist/components/nv-fieldtime.js.map +1 -1
  211. package/dist/components/nv-icon.js +1 -1
  212. package/dist/components/nv-iconbutton.js +1 -1
  213. package/dist/components/nv-loader.js +1 -1
  214. package/dist/components/nv-menu.js +30 -13
  215. package/dist/components/nv-menu.js.map +1 -1
  216. package/dist/components/nv-menuitem.js +1 -1
  217. package/dist/components/nv-notification.js +3 -3
  218. package/dist/components/nv-notification.js.map +1 -1
  219. package/dist/components/nv-notificationcontainer.js +1 -1
  220. package/dist/components/nv-popover.js +1 -1
  221. package/dist/components/nv-row.js +1 -1
  222. package/dist/components/{nv-tablecolumn.d.ts → nv-split.d.ts} +4 -4
  223. package/dist/components/nv-split.js +366 -0
  224. package/dist/components/nv-split.js.map +1 -0
  225. package/dist/components/nv-stack.js +2 -2
  226. package/dist/components/nv-table.js +216 -328
  227. package/dist/components/nv-table.js.map +1 -1
  228. package/dist/components/nv-toggle.js +2 -2
  229. package/dist/components/nv-toggle.js.map +1 -1
  230. package/dist/components/nv-togglebutton.js +1 -1
  231. package/dist/components/nv-togglebuttongroup.js +2 -2
  232. package/dist/components/nv-togglebuttongroup.js.map +1 -1
  233. package/dist/components/nv-tooltip.js +1 -1
  234. package/dist/components/{p-00cbf2a1.js → p-0d5ed1d7.js} +3 -3
  235. package/dist/components/p-0d5ed1d7.js.map +1 -0
  236. package/dist/components/{p-54161bad.js → p-0e6f41c7.js} +2 -2
  237. package/dist/components/{p-54161bad.js.map → p-0e6f41c7.js.map} +1 -1
  238. package/dist/components/{p-0c42fafb.js → p-0fd23531.js} +6 -6
  239. package/dist/components/{p-0c42fafb.js.map → p-0fd23531.js.map} +1 -1
  240. package/dist/components/{p-a823b8e9.js → p-1639703f.js} +2 -2
  241. package/dist/components/{p-a823b8e9.js.map → p-1639703f.js.map} +1 -1
  242. package/dist/components/{p-e5c62ea8.js → p-2cc83e0c.js} +3 -3
  243. package/dist/components/{p-e5c62ea8.js.map → p-2cc83e0c.js.map} +1 -1
  244. package/dist/components/{p-3763c9c4.js → p-31478080.js} +3 -3
  245. package/dist/components/{p-3763c9c4.js.map → p-31478080.js.map} +1 -1
  246. package/dist/components/{p-178fa27e.js → p-378e3127.js} +6 -6
  247. package/dist/components/{p-178fa27e.js.map → p-378e3127.js.map} +1 -1
  248. package/dist/components/{p-51876ca1.js → p-429e01f3.js} +3 -3
  249. package/dist/components/p-429e01f3.js.map +1 -0
  250. package/dist/components/p-47d499b4.js +88 -0
  251. package/dist/components/p-47d499b4.js.map +1 -0
  252. package/dist/components/{p-aff3ed68.js → p-5829b9f7.js} +5 -2
  253. package/dist/components/p-5829b9f7.js.map +1 -0
  254. package/dist/components/{p-ee8944f3.js → p-63595ea1.js} +68 -62
  255. package/dist/components/p-63595ea1.js.map +1 -0
  256. package/dist/components/{p-1af3591a.js → p-6f2b257e.js} +3 -3
  257. package/dist/components/{p-1af3591a.js.map → p-6f2b257e.js.map} +1 -1
  258. package/dist/components/{p-4fc01a78.js → p-7112612c.js} +5 -5
  259. package/dist/components/p-7112612c.js.map +1 -0
  260. package/dist/components/{p-7426b20f.js → p-715e5235.js} +3 -3
  261. package/dist/components/{p-7426b20f.js.map → p-715e5235.js.map} +1 -1
  262. package/dist/components/{p-31e262bd.js → p-7b5102c8.js} +5 -5
  263. package/dist/components/{p-31e262bd.js.map → p-7b5102c8.js.map} +1 -1
  264. package/dist/components/{p-fda58a76.js → p-98429fd7.js} +2 -2
  265. package/dist/components/{p-fda58a76.js.map → p-98429fd7.js.map} +1 -1
  266. package/dist/components/p-9e7468e3.js +185 -0
  267. package/dist/components/p-9e7468e3.js.map +1 -0
  268. package/dist/components/{p-75200cc0.js → p-df5d76a5.js} +3 -3
  269. package/dist/components/{p-75200cc0.js.map → p-df5d76a5.js.map} +1 -1
  270. package/dist/components/{p-51459a44.js → p-f2bac2aa.js} +4 -4
  271. package/dist/components/{p-51459a44.js.map → p-f2bac2aa.js.map} +1 -1
  272. package/dist/esm/{index-a1936cd0.js → index-dc2723f3.js} +9 -6
  273. package/dist/esm/index-dc2723f3.js.map +1 -0
  274. package/dist/esm/index.js +6 -1
  275. package/dist/esm/index.js.map +1 -1
  276. package/dist/esm/loader.js +3 -3
  277. package/dist/esm/native.js +3 -3
  278. package/dist/esm/nv-accordion-item.entry.js +2 -2
  279. package/dist/esm/nv-accordion-item.entry.js.map +1 -1
  280. package/dist/esm/nv-accordion.entry.js +6 -6
  281. package/dist/esm/nv-accordion.entry.js.map +1 -1
  282. package/dist/esm/nv-alert.entry.js +2 -2
  283. package/dist/esm/nv-alert.entry.js.map +1 -1
  284. package/dist/esm/nv-avatar.entry.js +2 -2
  285. package/dist/esm/nv-avatar.entry.js.map +1 -1
  286. package/dist/esm/nv-badge_2.entry.js +1 -1
  287. package/dist/esm/nv-breadcrumb.entry.js +2 -2
  288. package/dist/esm/nv-breadcrumb.entry.js.map +1 -1
  289. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  290. package/dist/esm/nv-button.entry.js +3 -9
  291. package/dist/esm/nv-button.entry.js.map +1 -1
  292. package/dist/esm/nv-buttongroup.entry.js +1 -1
  293. package/dist/esm/nv-calendar.entry.js +1 -1
  294. package/dist/esm/nv-col.entry.js +1 -1
  295. package/dist/esm/nv-datagrid.entry.js +172 -5
  296. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  297. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  298. package/dist/esm/nv-dialog.entry.js +32 -29
  299. package/dist/esm/nv-dialog.entry.js.map +1 -1
  300. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  301. package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
  302. package/dist/esm/nv-fieldcheckbox.entry.js +2 -2
  303. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
  304. package/dist/esm/nv-fielddate.entry.js +51 -26
  305. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  306. package/dist/esm/nv-fielddaterange.entry.js +68 -42
  307. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  308. package/dist/esm/nv-fielddropdown.entry.js +33 -7
  309. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  310. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  311. package/dist/esm/nv-fieldmultiselect.entry.js +187 -156
  312. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  313. package/dist/esm/nv-fieldnumber.entry.js +2 -2
  314. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  315. package/dist/esm/nv-fieldpassword.entry.js +2 -2
  316. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  317. package/dist/esm/nv-fieldradio.entry.js +2 -2
  318. package/dist/esm/nv-fieldradio.entry.js.map +1 -1
  319. package/dist/esm/nv-fieldselect.entry.js +2 -2
  320. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  321. package/dist/esm/nv-fieldslider.entry.js +2 -2
  322. package/dist/esm/nv-fieldslider.entry.js.map +1 -1
  323. package/dist/esm/nv-fieldtext.entry.js +2 -2
  324. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  325. package/dist/esm/nv-fieldtextarea.entry.js +2 -2
  326. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  327. package/dist/esm/nv-fieldtime.entry.js +25 -12
  328. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  329. package/dist/esm/nv-icon.entry.js +2 -2
  330. package/dist/esm/nv-icon.entry.js.map +1 -1
  331. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  332. package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
  333. package/dist/esm/nv-menu.entry.js +24 -9
  334. package/dist/esm/nv-menu.entry.js.map +1 -1
  335. package/dist/esm/nv-menuitem.entry.js +1 -1
  336. package/dist/esm/nv-notification.entry.js +2 -2
  337. package/dist/esm/nv-notification.entry.js.map +1 -1
  338. package/dist/esm/nv-notificationcontainer.entry.js +1 -1
  339. package/dist/esm/nv-popover.entry.js +67 -61
  340. package/dist/esm/nv-popover.entry.js.map +1 -1
  341. package/dist/esm/nv-row.entry.js +1 -1
  342. package/dist/esm/nv-split.entry.js +335 -0
  343. package/dist/esm/nv-split.entry.js.map +1 -0
  344. package/dist/esm/nv-stack.entry.js +2 -2
  345. package/dist/esm/nv-table.entry.js +216 -310
  346. package/dist/esm/nv-table.entry.js.map +1 -1
  347. package/dist/esm/nv-toggle.entry.js +2 -2
  348. package/dist/esm/nv-toggle.entry.js.map +1 -1
  349. package/dist/esm/nv-togglebutton.entry.js +1 -1
  350. package/dist/esm/nv-togglebuttongroup.entry.js +2 -2
  351. package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -1
  352. package/dist/esm/nv-tooltip.entry.js +1 -1
  353. package/dist/native/index.esm.js +1 -1
  354. package/dist/native/index.esm.js.map +1 -1
  355. package/dist/native/native.css +1 -1
  356. package/dist/native/native.esm.js +1 -1
  357. package/dist/native/native.esm.js.map +1 -1
  358. package/dist/native/p-107e80c6.entry.js +2 -0
  359. package/dist/native/p-107e80c6.entry.js.map +1 -0
  360. package/dist/native/{p-5c697133.entry.js → p-112d096c.entry.js} +2 -2
  361. package/dist/native/p-14e622e1.entry.js +2 -0
  362. package/dist/native/p-14e622e1.entry.js.map +1 -0
  363. package/dist/native/p-217de553.entry.js +2 -0
  364. package/dist/native/p-217de553.entry.js.map +1 -0
  365. package/dist/native/{p-85f8f11a.entry.js → p-230af58a.entry.js} +2 -2
  366. package/dist/native/p-2364aefa.entry.js +2 -0
  367. package/dist/native/p-2364aefa.entry.js.map +1 -0
  368. package/dist/native/p-23ee0384.entry.js +2 -0
  369. package/dist/native/{p-29f68e07.entry.js.map → p-23ee0384.entry.js.map} +1 -1
  370. package/dist/native/p-26513cbd.entry.js +2 -0
  371. package/dist/native/p-26513cbd.entry.js.map +1 -0
  372. package/dist/native/p-278613a3.entry.js +2 -0
  373. package/dist/native/{p-6cb6679b.entry.js.map → p-278613a3.entry.js.map} +1 -1
  374. package/dist/native/p-2dfd786f.entry.js +2 -0
  375. package/dist/native/{p-29df974e.entry.js.map → p-2dfd786f.entry.js.map} +1 -1
  376. package/dist/native/{p-d0a33e64.js → p-3060df80.js} +3 -3
  377. package/dist/native/p-3060df80.js.map +1 -0
  378. package/dist/native/p-4dc7483d.entry.js +2 -0
  379. package/dist/native/{p-c7b7ffaf.entry.js.map → p-4dc7483d.entry.js.map} +1 -1
  380. package/dist/native/p-4eaf417d.entry.js +13 -0
  381. package/dist/native/p-4eaf417d.entry.js.map +1 -0
  382. package/dist/native/p-5039ceb8.entry.js +2 -0
  383. package/dist/native/p-5039ceb8.entry.js.map +1 -0
  384. package/dist/native/{p-08322093.entry.js → p-52d2c0ae.entry.js} +2 -2
  385. package/dist/native/p-638967bf.entry.js +2 -0
  386. package/dist/native/p-638967bf.entry.js.map +1 -0
  387. package/dist/native/{p-19090193.entry.js → p-647a0765.entry.js} +2 -2
  388. package/dist/native/p-68dc02be.entry.js +2 -0
  389. package/dist/native/p-68dc02be.entry.js.map +1 -0
  390. package/dist/native/p-6d427897.entry.js +2 -0
  391. package/dist/native/{p-92931ab8.entry.js.map → p-6d427897.entry.js.map} +1 -1
  392. package/dist/native/{p-1504e28b.entry.js → p-701b48a4.entry.js} +2 -2
  393. package/dist/native/p-7c9bf981.entry.js +2 -0
  394. package/dist/native/p-835abdb9.entry.js +2 -0
  395. package/dist/native/{p-f5120223.entry.js.map → p-835abdb9.entry.js.map} +1 -1
  396. package/dist/native/{p-464bb197.entry.js → p-83765537.entry.js} +2 -2
  397. package/dist/native/p-88f9fca5.entry.js +2 -0
  398. package/dist/native/p-88f9fca5.entry.js.map +1 -0
  399. package/dist/native/{p-d2c9247b.entry.js → p-8e423742.entry.js} +3 -3
  400. package/dist/native/{p-d2c9247b.entry.js.map → p-8e423742.entry.js.map} +1 -1
  401. package/dist/native/{p-d882f417.entry.js → p-91fab6c2.entry.js} +2 -2
  402. package/dist/native/p-91fab6c2.entry.js.map +1 -0
  403. package/dist/native/p-95184ea2.entry.js +2 -0
  404. package/dist/native/p-95184ea2.entry.js.map +1 -0
  405. package/dist/native/p-9613087c.entry.js +2 -0
  406. package/dist/native/{p-2781637d.entry.js.map → p-9613087c.entry.js.map} +1 -1
  407. package/dist/native/{p-94dc9c41.entry.js → p-9d7e099f.entry.js} +2 -2
  408. package/dist/native/p-a6fc987a.entry.js +2 -0
  409. package/dist/native/p-a6fc987a.entry.js.map +1 -0
  410. package/dist/native/{p-1235c007.entry.js → p-acabac31.entry.js} +2 -2
  411. package/dist/native/p-acada158.entry.js +2 -0
  412. package/dist/native/p-acada158.entry.js.map +1 -0
  413. package/dist/native/p-b06f0e61.entry.js +2 -0
  414. package/dist/native/p-b06f0e61.entry.js.map +1 -0
  415. package/dist/native/p-b4c15f25.entry.js +2 -0
  416. package/dist/native/p-b4c15f25.entry.js.map +1 -0
  417. package/dist/native/{p-74b129e9.entry.js → p-bcf41cd0.entry.js} +2 -2
  418. package/dist/native/{p-c66565f8.entry.js → p-cb0293ec.entry.js} +2 -2
  419. package/dist/native/p-ce97ce24.entry.js +2 -0
  420. package/dist/native/p-ce97ce24.entry.js.map +1 -0
  421. package/dist/native/p-d0db5e72.entry.js +2 -0
  422. package/dist/native/p-d0db5e72.entry.js.map +1 -0
  423. package/dist/native/p-d7f444fb.entry.js +2 -0
  424. package/dist/native/p-d7f444fb.entry.js.map +1 -0
  425. package/dist/native/p-d878e90a.entry.js +2 -0
  426. package/dist/native/p-d878e90a.entry.js.map +1 -0
  427. package/dist/native/{p-e2c99ce2.entry.js → p-d94bf052.entry.js} +2 -2
  428. package/dist/native/p-ddc41f1f.entry.js +2 -0
  429. package/dist/native/p-ddc41f1f.entry.js.map +1 -0
  430. package/dist/native/p-f30e0be6.entry.js +2 -0
  431. package/dist/native/p-f30e0be6.entry.js.map +1 -0
  432. package/dist/native/p-f3c73492.entry.js +2 -0
  433. package/dist/native/{p-b32d0a5a.entry.js.map → p-f3c73492.entry.js.map} +1 -1
  434. package/dist/native/{p-9c5d6827.entry.js → p-fa78d8eb.entry.js} +2 -2
  435. package/dist/types/components/nv-accordion/nv-accordion.d.ts +2 -4
  436. package/dist/types/components/nv-button/nv-button.d.ts +0 -1
  437. package/dist/types/components/nv-dialog/nv-dialog.d.ts +9 -8
  438. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +6 -3
  439. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +5 -4
  440. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +3 -1
  441. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +12 -11
  442. package/dist/types/components/nv-fieldtime/nv-fieldtime.d.ts +1 -0
  443. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  444. package/dist/types/components/nv-menu/nv-menu.d.ts +4 -1
  445. package/dist/types/components/nv-popover/nv-popover.d.ts +10 -8
  446. package/dist/types/components/nv-split/nv-split.d.ts +128 -0
  447. package/dist/types/components/nv-split/nv-split.docs.d.ts +4 -0
  448. package/dist/types/components/nv-table/nv-table.d.ts +6 -87
  449. package/dist/types/components/nv-table/nv-table.utils.d.ts +129 -0
  450. package/dist/types/components/nv-table/test/nv-table.utils.test.d.ts +1 -0
  451. package/dist/types/components/nv-togglebuttongroup/nv-togglebuttongroup.d.ts +0 -2
  452. package/dist/types/components.d.ts +102 -200
  453. package/dist/vscode-data.json +43 -41
  454. package/hydrate/index.js +1148 -783
  455. package/hydrate/index.mjs +1148 -783
  456. package/package.json +10 -10
  457. package/dist/cjs/dom.utils-4d43f69a.js +0 -170
  458. package/dist/cjs/dom.utils-4d43f69a.js.map +0 -1
  459. package/dist/cjs/index-c56424e5.js.map +0 -1
  460. package/dist/cjs/nv-tablecolumn.cjs.entry.js +0 -21
  461. package/dist/cjs/nv-tablecolumn.cjs.entry.js.map +0 -1
  462. package/dist/collection/components/nv-table/nv-table.css +0 -35
  463. package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.docs.js +0 -6
  464. package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.docs.js.map +0 -1
  465. package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js +0 -52
  466. package/dist/collection/components/nv-tablecolumn/nv-tablecolumn.js.map +0 -1
  467. package/dist/components/nv-tablecolumn.js +0 -38
  468. package/dist/components/nv-tablecolumn.js.map +0 -1
  469. package/dist/components/p-00cbf2a1.js.map +0 -1
  470. package/dist/components/p-4fc01a78.js.map +0 -1
  471. package/dist/components/p-51876ca1.js.map +0 -1
  472. package/dist/components/p-5d14ba3f.js +0 -88
  473. package/dist/components/p-5d14ba3f.js.map +0 -1
  474. package/dist/components/p-95857e4f.js +0 -191
  475. package/dist/components/p-95857e4f.js.map +0 -1
  476. package/dist/components/p-aff3ed68.js.map +0 -1
  477. package/dist/components/p-cb34aa4f.js +0 -167
  478. package/dist/components/p-cb34aa4f.js.map +0 -1
  479. package/dist/components/p-ee8944f3.js.map +0 -1
  480. package/dist/esm/dom.utils-ac71e0ef.js +0 -167
  481. package/dist/esm/dom.utils-ac71e0ef.js.map +0 -1
  482. package/dist/esm/index-a1936cd0.js.map +0 -1
  483. package/dist/esm/nv-tablecolumn.entry.js +0 -17
  484. package/dist/esm/nv-tablecolumn.entry.js.map +0 -1
  485. package/dist/native/p-0a99c6fb.entry.js +0 -2
  486. package/dist/native/p-0a99c6fb.entry.js.map +0 -1
  487. package/dist/native/p-1ad1bff9.entry.js +0 -2
  488. package/dist/native/p-1ad1bff9.entry.js.map +0 -1
  489. package/dist/native/p-1c83f540.entry.js +0 -2
  490. package/dist/native/p-1c83f540.entry.js.map +0 -1
  491. package/dist/native/p-224b1a01.entry.js +0 -2
  492. package/dist/native/p-224b1a01.entry.js.map +0 -1
  493. package/dist/native/p-234cfa2e.entry.js +0 -2
  494. package/dist/native/p-2781637d.entry.js +0 -2
  495. package/dist/native/p-29df974e.entry.js +0 -2
  496. package/dist/native/p-29f68e07.entry.js +0 -2
  497. package/dist/native/p-45506c37.entry.js +0 -2
  498. package/dist/native/p-45506c37.entry.js.map +0 -1
  499. package/dist/native/p-48774d0c.entry.js +0 -13
  500. package/dist/native/p-48774d0c.entry.js.map +0 -1
  501. package/dist/native/p-4ec61dec.entry.js +0 -2
  502. package/dist/native/p-4ec61dec.entry.js.map +0 -1
  503. package/dist/native/p-5f0776cb.entry.js +0 -2
  504. package/dist/native/p-5f0776cb.entry.js.map +0 -1
  505. package/dist/native/p-6c7a9a21.entry.js +0 -2
  506. package/dist/native/p-6c7a9a21.entry.js.map +0 -1
  507. package/dist/native/p-6cb6679b.entry.js +0 -2
  508. package/dist/native/p-6d13a851.entry.js +0 -2
  509. package/dist/native/p-6d13a851.entry.js.map +0 -1
  510. package/dist/native/p-87784622.entry.js +0 -2
  511. package/dist/native/p-87784622.entry.js.map +0 -1
  512. package/dist/native/p-92931ab8.entry.js +0 -2
  513. package/dist/native/p-9a46baa9.entry.js +0 -2
  514. package/dist/native/p-9a46baa9.entry.js.map +0 -1
  515. package/dist/native/p-a34beedf.entry.js +0 -2
  516. package/dist/native/p-a34beedf.entry.js.map +0 -1
  517. package/dist/native/p-a69dbcef.entry.js +0 -2
  518. package/dist/native/p-a69dbcef.entry.js.map +0 -1
  519. package/dist/native/p-b32d0a5a.entry.js +0 -2
  520. package/dist/native/p-bc01787b.entry.js +0 -2
  521. package/dist/native/p-bc01787b.entry.js.map +0 -1
  522. package/dist/native/p-c7b7ffaf.entry.js +0 -2
  523. package/dist/native/p-cb34aa4f.js +0 -2
  524. package/dist/native/p-cb34aa4f.js.map +0 -1
  525. package/dist/native/p-cea942b9.entry.js +0 -2
  526. package/dist/native/p-cea942b9.entry.js.map +0 -1
  527. package/dist/native/p-d0a33e64.js.map +0 -1
  528. package/dist/native/p-d0ef1bbb.entry.js +0 -2
  529. package/dist/native/p-d0ef1bbb.entry.js.map +0 -1
  530. package/dist/native/p-d882f417.entry.js.map +0 -1
  531. package/dist/native/p-dd023fd6.entry.js +0 -2
  532. package/dist/native/p-dd023fd6.entry.js.map +0 -1
  533. package/dist/native/p-e765a624.entry.js +0 -2
  534. package/dist/native/p-e765a624.entry.js.map +0 -1
  535. package/dist/native/p-f0cbfb3d.entry.js +0 -2
  536. package/dist/native/p-f0cbfb3d.entry.js.map +0 -1
  537. package/dist/native/p-f5120223.entry.js +0 -2
  538. package/dist/native/p-fa177c39.entry.js +0 -2
  539. package/dist/native/p-fa177c39.entry.js.map +0 -1
  540. package/dist/types/components/nv-tablecolumn/nv-tablecolumn.d.ts +0 -13
  541. package/dist/types/components/nv-tablecolumn/nv-tablecolumn.docs.d.ts +0 -4
  542. /package/dist/native/{p-5c697133.entry.js.map → p-112d096c.entry.js.map} +0 -0
  543. /package/dist/native/{p-85f8f11a.entry.js.map → p-230af58a.entry.js.map} +0 -0
  544. /package/dist/native/{p-08322093.entry.js.map → p-52d2c0ae.entry.js.map} +0 -0
  545. /package/dist/native/{p-19090193.entry.js.map → p-647a0765.entry.js.map} +0 -0
  546. /package/dist/native/{p-1504e28b.entry.js.map → p-701b48a4.entry.js.map} +0 -0
  547. /package/dist/native/{p-234cfa2e.entry.js.map → p-7c9bf981.entry.js.map} +0 -0
  548. /package/dist/native/{p-464bb197.entry.js.map → p-83765537.entry.js.map} +0 -0
  549. /package/dist/native/{p-94dc9c41.entry.js.map → p-9d7e099f.entry.js.map} +0 -0
  550. /package/dist/native/{p-1235c007.entry.js.map → p-acabac31.entry.js.map} +0 -0
  551. /package/dist/native/{p-74b129e9.entry.js.map → p-bcf41cd0.entry.js.map} +0 -0
  552. /package/dist/native/{p-c66565f8.entry.js.map → p-cb0293ec.entry.js.map} +0 -0
  553. /package/dist/native/{p-e2c99ce2.entry.js.map → p-d94bf052.entry.js.map} +0 -0
  554. /package/dist/native/{p-9c5d6827.entry.js.map → p-fa78d8eb.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","_element$getRootNode","call","ownerDocument","isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","inert","result","parentNode","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","Array","slice","apply","querySelectorAll","unshift","getCandidatesIteratively","elements","options","elementsToCheck","from","length","shift","tagName","assigned","assignedElements","content","children","nestedCandidates","flatten","push","scopeParent","validCandidate","includes","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","isNaN","parseInt","getTabIndex","Error","tabIndex","test","getSortOrderTabIndex","isScope","sortOrderedTabbables","a","b","documentOrder","isInput","isHiddenInput","type","isDetailsWithSummary","r","some","child","getCheckedRadio","nodes","form","i","checked","isTabbableRadio","name","radioScope","queryRadios","radioSet","window","CSS","escape","err","console","error","message","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","host","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","contains","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","parentElement","originalNode","rootNode","assignedSlot","getClientRects","isDisabledFromFieldset","disabled","item","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","forEach","candidateTabindex","sort","reduce","acc","sortable","concat","tabbable","container","bind","nvDialogCss","NvDialogStyle0","NvDialog","constructor","hostRef","this","eventsAttached","open","undismissable","clickOutside","controlled","full","autofocus","checkForForm","formElement","querySelector","ensureFormId","handleDialogClose","close","handleClickOutside","event","target","dialogElement","preventDefault","stopPropagation","triggerClickEvents","show","e","key","preventScroll","showModal","allowScroll","setAutofocus","focusableElements","topLeftElement","topLeftRect","rect","top","left","setAttribute","attachEventListeners","triggerElement","addEventListeners","scrollBarWidth","innerWidth","document","documentElement","clientWidth","style","overflow","paddingRight","removeProperty","id","uuidv4","handleKeyDown","handleDocumentClick","handleDialogOpenChange","isOpen","openChanged","emit","componentWillLoad","find","headerElement","toLowerCase","footerElement","componentWillUpdate","componentDidLoad","disconnectedCallback","removeEventListeners","render","hasForm","h","Host","ref","onClose","role","class","clsx","emphasis","size","onClick","primaryButtonType","ButtonType","Submit","Button","onDialogCanceled"],"sources":["../../node_modules/tabbable/dist/index.esm.js","src/components/nv-dialog/nv-dialog.scss?tag=nv-dialog","src/components/nv-dialog/nv-dialog.tsx"],"sourcesContent":["/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","@import '../../styles/scrollbar';\n\ndialog {\n border-radius: var(--radius-rounded-2xl);\n background: var(--color-level-00-background);\n min-width: min(90vw, 400px);\n width: fit-content;\n max-width: clamp(90vw, min(90vw, 960px), 960px);\n margin: auto;\n max-height: 90vh;\n overflow: hidden;\n\n &.full {\n width: 90vw;\n }\n\n /* shadow/2xl */\n box-shadow: 0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl)\n var(--shadow-spread-2xl) var(--shadow-color-opacity-3)\n var(--shadow-color-opacity-3);\n\n &::backdrop {\n opacity: var(--components-overlay-opacity);\n background: var(--components-overlay-background);\n }\n\n .content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n height: fit-content;\n max-height: 90vh;\n overflow: hidden;\n\n nv-button.close-button {\n position: absolute;\n top: var(--dialog-dismissible-position-top);\n right: var(--dialog-dismissible-position-right);\n display: flex;\n padding: var(--button-sm-icon-button-padding);\n justify-content: flex-end;\n align-items: flex-start;\n gap: 10px;\n }\n\n .content-body {\n @include scrollbar();\n\n overflow: auto;\n box-sizing: border-box;\n padding: var(--dialog-body-padding-y) var(--dialog-body-padding-x);\n scrollbar-gutter: stable both-edges;\n\n /* text/md/regular */\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--font-size-md);\n font-style: normal;\n font-weight: 400;\n line-height: var(--line-height-base); /* 150% */\n\n\n color: var(--color-content-medium-text);\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { tabbable } from 'tabbable';\nimport {\n addEventListeners,\n removeEventListeners,\n type EventsAndListeners,\n} from '../../utils/events.utils';\nimport clsx from 'clsx';\nimport { ButtonType } from '../../utils/constants';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Body of the dialog.\n * @slot trigger - Content to be placed as the trigger, will override the trigger prop.\n * @slot header - Content to be placed as the header, will override the header prop.\n * @slot footer - Content to be placed as the footer, will override the footer prop.\n */\n@Component({\n tag: 'nv-dialog',\n styleUrl: 'nv-dialog.scss',\n shadow: false,\n})\nexport class NvDialog {\n @Element() el: HTMLNvDialogElement;\n private dialogElement!: HTMLDialogElement;\n private eventsAttached = false;\n private form: string;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the popover trigger. This\n * should be used when the slot for the trigger is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n triggerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the header. This should\n * be used when the slot for the header is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n headerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the footer. This should\n * be used when the slot for the footer is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n footerElement: Element;\n\n /**\n * Use this prop to toggle the visibility of the dialog. Set to true to show\n * the dialog and false to hide it.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * If true, the dialog cannot be closed by the user.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * If true, the dialog will be closed when the backdrop is clicked.\n */\n @Prop({ reflect: true })\n readonly clickOutside: boolean = false;\n\n /**\n * If true, the dialog visibility is managed manually through methods or the\n * open prop.\n */\n @Prop({ reflect: true })\n readonly controlled: boolean = false;\n\n /**\n * If true, the dialog takes full width styling.\n */\n @Prop({ reflect: true })\n readonly full: boolean = false;\n\n /**\n * Controls whether the dialog should automatically focus the first focusable\n * element when opened. When disabled, prevents unwanted tooltip triggers on\n * dialog open.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Call this method to show the dialog, making it visible on the screen.\n */\n @Method()\n public async show() {\n this.open = true;\n this.preventScroll();\n /** It is recommended to use the .show() or .showModal() method to render\n * dialogs, rather than the open attribute. If a <dialog> is opened using\n * the open attribute, it is non-modal. */\n this.dialogElement.showModal();\n }\n\n /**\n * Call this method to hide the dialog, making it disappear from view.\n */\n @Method()\n public async close() {\n this.open = false;\n this.allowScroll();\n this.dialogElement.close();\n }\n\n /**\n * Sets the autofocus on the first focusable element in the dialog.\n */\n private setAutofocus() {\n const focusableElements = tabbable(this.dialogElement, {\n displayCheck: 'none',\n });\n\n if (focusableElements.length > 0) {\n // Convert to array and find element with smallest top and left position\n let topLeftElement = focusableElements[0];\n let topLeftRect = topLeftElement.getBoundingClientRect();\n\n focusableElements.forEach(element => {\n const rect = element.getBoundingClientRect();\n if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {\n topLeftElement = element;\n topLeftRect = rect;\n }\n });\n\n // Set autofocus attribute on the found element\n topLeftElement.setAttribute('autofocus', 'true');\n }\n }\n\n /**\n * Attaches event listeners to the dialog.\n */\n private attachEventListeners() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n addEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = true;\n }\n }\n\n /**\n * Prevents the body from scrolling when the dialog is open.\n * Compensates for scrollbar width to prevent layout shift.\n */\n private preventScroll() {\n // Calculate scrollbar width\n const scrollBarWidth =\n window.innerWidth - document.documentElement.clientWidth;\n\n // Apply overflow hidden and padding compensation\n document.documentElement.style.overflow = 'hidden';\n document.documentElement.style.paddingRight = `${scrollBarWidth}px`;\n }\n\n /**\n * Allows the body to scroll when the dialog is closed.\n * Removes the applied overflow and padding styles.\n */\n private allowScroll() {\n // Remove the applied styles\n document.documentElement.style.removeProperty('overflow');\n document.documentElement.style.removeProperty('padding-right');\n }\n\n private ensureFormId(formElement: HTMLFormElement): string {\n if (!formElement.id) {\n formElement.id = `dialog-form-${uuidv4()}`;\n }\n return formElement.id;\n }\n\n /**\n * Checks for and sets up form ID if a form is present\n */\n private checkForForm = () => {\n if (!this.form) {\n const formElement = this.el.querySelector('form') as HTMLFormElement;\n if (formElement) {\n this.form = this.ensureFormId(formElement);\n }\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the dialog is closing in order to allow for cleanup, data-capture, etc.\n * @bind open\n */\n @Event()\n openChanged: EventEmitter<boolean>;\n\n /**\n * Handles the native dialog close event.\n */\n private handleDialogClose = () => {\n if (this.open) {\n this.close();\n }\n };\n\n /**\n * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.\n * @param {KeyboardEvent} event - The keydown event.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key !== 'Escape') return;\n\n if (this.undismissable) {\n event.preventDefault();\n event.stopPropagation();\n } else {\n this.close();\n }\n }\n\n /**\n * Handles the click event to close the dialog when clickOutside is true.\n * @param {MouseEvent} event - The click event.\n */\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n private handleClickOutside = (event: MouseEvent) => {\n if (event.target === this.dialogElement) {\n this.close();\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private triggerClickEvents: EventsAndListeners = [\n ['click', this.show],\n [\n 'keydown',\n (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.show();\n }\n },\n ],\n ];\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('open')\n async handleDialogOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.show();\n this.openChanged.emit(isOpen);\n } else {\n this.close();\n this.openChanged.emit(isOpen);\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Lifecycle method that runs before the component loads.\n * Initializes the trigger, header, and footer elements by finding them in the component's children.\n * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)\n */\n componentWillLoad() {\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === 'trigger';\n }) as HTMLElement;\n\n this.headerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'header' ||\n child.tagName.toLowerCase() === 'nv-dialogheader'\n );\n }) as HTMLElement;\n\n this.footerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'footer' ||\n child.tagName.toLowerCase() === 'nv-dialogfooter'\n );\n }) as HTMLElement;\n\n // Initial form check\n this.checkForForm();\n }\n\n componentWillUpdate() {\n this.attachEventListeners();\n }\n\n componentDidLoad() {\n if (this.open) {\n this.show();\n }\n // Only set autofocus if the prop is true and no element already has autofocus\n if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {\n this.setAutofocus();\n }\n this.attachEventListeners();\n\n // Additional form check in case form was added after initial load\n this.checkForForm();\n }\n\n disconnectedCallback() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n removeEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = false;\n }\n this.allowScroll();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const hasForm = this.form || this.el.querySelector('form');\n\n return (\n <Host>\n <slot name=\"trigger\"></slot>\n\n <dialog\n ref={el => (this.dialogElement = el)}\n onClose={this.handleDialogClose}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog-header\"\n aria-describedby=\"dialog-content\"\n class={clsx({ full: this.full })}\n >\n <div class=\"content\">\n {!this.undismissable && (\n <nv-button\n class=\"close-button\"\n emphasis=\"lower\"\n size=\"sm\"\n onClick={this.handleDialogClose}\n aria-label=\"Close dialog\"\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </nv-button>\n )}\n\n {this.headerElement ? (\n <slot name=\"header\"></slot>\n ) : (\n <nv-dialogheader id=\"dialog-header\"></nv-dialogheader>\n )}\n\n <div class=\"content-body\" id=\"dialog-content\">\n <slot></slot>\n </div>\n\n {this.footerElement ? (\n <slot name=\"footer\"></slot>\n ) : (\n <nv-dialogfooter\n form={this.form}\n primaryButtonType={\n hasForm ? ButtonType.Submit : ButtonType.Button\n }\n onDialogCanceled={this.handleDialogClose}\n undismissable={this.undismissable}\n ></nv-dialogfooter>\n )}\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;AASA,IAAIA,EAAqB,CAAC,qBAAsB,sBAAuB,wBAAyB,uBAAwB,sBAAuB,oCAAqC,+BAAgC,+BAAgC,gEAAiE,6CAA8C,wBACnW,IAAIC,EAAmCD,EAAmBE,KAAK,KAC/D,IAAIC,SAAmBC,UAAY,YACnC,IAAIC,EAAUF,EAAY,WAAY,EAAKC,QAAQE,UAAUD,SAAWD,QAAQE,UAAUC,mBAAqBH,QAAQE,UAAUE,sBACjI,IAAIC,GAAeN,GAAaC,QAAQE,UAAUG,YAAc,SAAUC,GACxE,IAAIC,EACJ,OAAOD,IAAY,MAAQA,SAAiB,OAAS,GAAKC,EAAuBD,EAAQD,eAAiB,MAAQE,SAA8B,OAAS,EAAIA,EAAqBC,KAAKF,EACzL,EAAI,SAAUA,GACZ,OAAOA,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAA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E6C,IAAKlM,GAAO8H,KAAKiB,cAAgB/I,EACjCmM,QAASrE,KAAKY,kBACd0D,KAAK,SAAQ,aACF,OAAM,kBACD,gBAAe,mBACd,iBACjBC,MAAOC,EAAK,CAAElE,KAAMN,KAAKM,QAEzB4D,EAAA,OAAA3C,IAAA,2CAAKgD,MAAM,YACPvE,KAAKG,eACL+D,EAAA,aAAA3C,IAAA,2CACEgD,MAAM,eACNE,SAAS,QACTC,KAAK,KACLC,QAAS3E,KAAKY,kBAAiB,aACpB,gBAEXsD,EAAA,WAAA3C,IAAA,2CAAS3F,KAAK,IAAI8I,KAAK,QAI1B1E,KAAKyD,cACJS,EAAA,QAAMtI,KAAK,WAEXsI,EAAA,mBAAiBnB,GAAG,kBAGtBmB,EAAA,OAAA3C,IAAA,2CAAKgD,MAAM,eAAexB,GAAG,kBAC3BmB,EAAA,QAAA3C,IAAA,8CAGDvB,KAAK2D,cACJO,EAAA,QAAMtI,KAAK,WAEXsI,EAAA,mBACE1I,KAAMwE,KAAKxE,KACXoJ,kBACEX,EAAUY,EAAWC,OAASD,EAAWE,OAE3CC,iBAAkBhF,KAAKY,kBACvBT,cAAeH,KAAKG,kB","ignoreList":[]}
1
+ {"version":3,"names":["candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","_element$getRootNode","call","ownerDocument","isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","inert","result","parentNode","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","Array","slice","apply","querySelectorAll","unshift","getCandidatesIteratively","elements","options","elementsToCheck","from","length","shift","tagName","assigned","assignedElements","content","children","nestedCandidates","flatten","push","scopeParent","validCandidate","includes","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","isNaN","parseInt","getTabIndex","Error","tabIndex","test","getSortOrderTabIndex","isScope","sortOrderedTabbables","a","b","documentOrder","isInput","isHiddenInput","type","isDetailsWithSummary","r","some","child","getCheckedRadio","nodes","form","i","checked","isTabbableRadio","name","radioScope","queryRadios","radioSet","window","CSS","escape","err","console","error","message","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","host","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","contains","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","parentElement","originalNode","rootNode","assignedSlot","getClientRects","isDisabledFromFieldset","disabled","item","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","forEach","candidateTabindex","sort","reduce","acc","sortable","concat","tabbable","container","bind","nvDialogCss","NvDialogStyle0","NvDialog","constructor","hostRef","this","eventsAttached","triggerClickEvents","show","e","key","preventDefault","open","undismissable","clickOutside","controlled","full","autofocus","checkForForm","formElement","querySelector","ensureFormId","handleDialogClose","close","handleClickOutside","event","target","dialogElement","stopPropagation","preventScroll","showModal","allowScroll","setAutofocus","focusableElements","topLeftElement","topLeftRect","rect","top","left","setAttribute","attachEventListeners","triggerElement","addEventListeners","scrollBarWidth","innerWidth","document","documentElement","clientWidth","style","overflow","paddingRight","removeProperty","id","uuidv4","handleDialogOpenChange","isOpen","openChanged","emit","handleKeyDown","handleDocumentClick","componentWillLoad","find","headerElement","toLowerCase","footerElement","componentWillUpdate","componentDidLoad","disconnectedCallback","removeEventListeners","render","hasForm","h","Host","ref","onClose","role","class","clsx","emphasis","size","onClick","primaryButtonType","ButtonType","Submit","Button","onDialogCanceled"],"sources":["../../node_modules/tabbable/dist/index.esm.js","src/components/nv-dialog/nv-dialog.scss?tag=nv-dialog","src/components/nv-dialog/nv-dialog.tsx"],"sourcesContent":["/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","@import '../../styles/scrollbar';\n\ndialog {\n border-radius: var(--radius-rounded-2xl);\n background: var(--color-level-00-background);\n min-width: min(90vw, 400px);\n width: fit-content;\n max-width: clamp(90vw, min(90vw, 960px), 960px);\n margin: auto;\n max-height: 90vh;\n overflow: hidden;\n\n &.full {\n width: 90vw;\n }\n\n /* shadow/2xl */\n box-shadow: 0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl)\n var(--shadow-spread-2xl) var(--shadow-color-opacity-3)\n var(--shadow-color-opacity-3);\n\n &::backdrop {\n opacity: var(--components-overlay-opacity);\n background: var(--components-overlay-background);\n }\n\n .content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n height: fit-content;\n max-height: 90vh;\n overflow: hidden;\n\n nv-button.close-button {\n position: absolute;\n top: var(--dialog-dismissible-position-top);\n right: var(--dialog-dismissible-position-right);\n display: flex;\n padding: var(--button-sm-icon-button-padding);\n justify-content: flex-end;\n align-items: flex-start;\n gap: 10px;\n }\n\n .content-body {\n @include scrollbar();\n\n overflow: auto;\n box-sizing: border-box;\n padding: var(--dialog-body-padding-y) var(--dialog-body-padding-x);\n scrollbar-gutter: stable both-edges;\n\n /* text/md/regular */\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--font-size-md);\n font-style: normal;\n font-weight: var(--font-weight-low-emphasis);\n line-height: var(--line-height-base); /* 150% */\n\n\n color: var(--color-content-medium-text);\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { tabbable } from 'tabbable';\nimport {\n addEventListeners,\n removeEventListeners,\n type EventsAndListeners,\n} from '../../utils/events.utils';\nimport clsx from 'clsx';\nimport { ButtonType } from '../../utils/constants';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Body of the dialog.\n * @slot trigger - Content to be placed as the trigger, will override the trigger prop.\n * @slot header - Content to be placed as the header, will override the header prop.\n * @slot footer - Content to be placed as the footer, will override the footer prop.\n */\n@Component({\n tag: 'nv-dialog',\n styleUrl: 'nv-dialog.scss',\n shadow: false,\n})\nexport class NvDialog {\n @Element() el: HTMLNvDialogElement;\n private dialogElement!: HTMLDialogElement;\n private eventsAttached = false;\n private form: string;\n\n private triggerClickEvents: EventsAndListeners = [\n ['click', this.show],\n [\n 'keydown',\n (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.show();\n }\n },\n ],\n ];\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the popover trigger. This\n * should be used when the slot for the trigger is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n triggerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the header. This should\n * be used when the slot for the header is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n headerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the footer. This should\n * be used when the slot for the footer is not defined.\n */\n @Prop({ reflect: false, mutable: true })\n footerElement: Element;\n\n /**\n * Use this prop to toggle the visibility of the dialog. Set to true to show\n * the dialog and false to hide it.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * If true, the dialog cannot be closed by the user.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * If true, the dialog will be closed when the backdrop is clicked.\n */\n @Prop({ reflect: true })\n readonly clickOutside: boolean = false;\n\n /**\n * If true, the dialog visibility is managed manually through methods or the\n * open prop.\n */\n @Prop({ reflect: true })\n readonly controlled: boolean = false;\n\n /**\n * If true, the dialog takes full width styling.\n */\n @Prop({ reflect: true })\n readonly full: boolean = false;\n\n /**\n * Controls whether the dialog should automatically focus the first focusable\n * element when opened. When disabled, prevents unwanted tooltip triggers on\n * dialog open.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Call this method to show the dialog, making it visible on the screen.\n */\n @Method()\n public async show() {\n this.open = true;\n this.preventScroll();\n /** It is recommended to use the .show() or .showModal() method to render\n * dialogs, rather than the open attribute. If a <dialog> is opened using\n * the open attribute, it is non-modal. */\n this.dialogElement.showModal();\n }\n\n /**\n * Call this method to hide the dialog, making it disappear from view.\n */\n @Method()\n public async close() {\n this.open = false;\n this.allowScroll();\n this.dialogElement.close();\n }\n\n /**\n * Sets the autofocus on the first focusable element in the dialog.\n */\n private setAutofocus() {\n const focusableElements = tabbable(this.dialogElement, {\n displayCheck: 'none',\n });\n\n if (focusableElements.length > 0) {\n // Convert to array and find element with smallest top and left position\n let topLeftElement = focusableElements[0];\n let topLeftRect = topLeftElement.getBoundingClientRect();\n\n focusableElements.forEach(element => {\n const rect = element.getBoundingClientRect();\n if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {\n topLeftElement = element;\n topLeftRect = rect;\n }\n });\n\n // Set autofocus attribute on the found element\n topLeftElement.setAttribute('autofocus', 'true');\n }\n }\n\n /**\n * Attaches event listeners to the dialog.\n */\n private attachEventListeners() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n addEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = true;\n }\n }\n\n /**\n * Prevents the body from scrolling when the dialog is open.\n * Compensates for scrollbar width to prevent layout shift.\n */\n private preventScroll() {\n // Calculate scrollbar width\n const scrollBarWidth =\n window.innerWidth - document.documentElement.clientWidth;\n\n // Apply overflow hidden and padding compensation\n document.documentElement.style.overflow = 'hidden';\n document.documentElement.style.paddingRight = `${scrollBarWidth}px`;\n }\n\n /**\n * Allows the body to scroll when the dialog is closed.\n * Removes the applied overflow and padding styles.\n */\n private allowScroll() {\n // Remove the applied styles\n document.documentElement.style.removeProperty('overflow');\n document.documentElement.style.removeProperty('padding-right');\n }\n\n private ensureFormId(formElement: HTMLFormElement): string {\n if (!formElement.id) {\n formElement.id = `dialog-form-${uuidv4()}`;\n }\n return formElement.id;\n }\n\n /**\n * Checks for and sets up form ID if a form is present\n */\n private checkForForm = () => {\n if (!this.form) {\n const formElement = this.el.querySelector('form') as HTMLFormElement;\n if (formElement) {\n this.form = this.ensureFormId(formElement);\n }\n }\n };\n\n /**\n * Handles the native dialog close event.\n */\n private handleDialogClose = () => {\n if (this.open) {\n this.close();\n }\n };\n\n private handleClickOutside = (event: MouseEvent) => {\n if (event.target === this.dialogElement) {\n this.close();\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the dialog is closing in order to allow for cleanup, data-capture, etc.\n * @bind open\n */\n @Event()\n openChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('open')\n async handleDialogOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.show();\n this.openChanged.emit(isOpen);\n } else {\n this.close();\n this.openChanged.emit(isOpen);\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LISTENERS\n\n /**\n * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.\n * @param {KeyboardEvent} event - The keydown event.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key !== 'Escape') return;\n\n if (this.undismissable) {\n event.preventDefault();\n event.stopPropagation();\n } else {\n this.close();\n }\n }\n\n /**\n * Handles the click event to close the dialog when clickOutside is true.\n * @param {MouseEvent} event - The click event.\n */\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Lifecycle method that runs before the component loads.\n * Initializes the trigger, header, and footer elements by finding them in the component's children.\n * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)\n */\n componentWillLoad() {\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === 'trigger';\n }) as HTMLElement;\n\n this.headerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'header' ||\n child.tagName.toLowerCase() === 'nv-dialogheader'\n );\n }) as HTMLElement;\n\n this.footerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'footer' ||\n child.tagName.toLowerCase() === 'nv-dialogfooter'\n );\n }) as HTMLElement;\n\n // Initial form check\n this.checkForForm();\n }\n\n componentWillUpdate() {\n this.attachEventListeners();\n }\n\n componentDidLoad() {\n if (this.open) {\n this.show();\n }\n // Only set autofocus if the prop is true and no element already has autofocus\n if (this.autofocus && !this.dialogElement.querySelector('[autofocus]')) {\n this.setAutofocus();\n }\n this.attachEventListeners();\n\n // Additional form check in case form was added after initial load\n this.checkForForm();\n }\n\n disconnectedCallback() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n removeEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = false;\n }\n this.allowScroll();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const hasForm = this.form || this.el.querySelector('form');\n\n return (\n <Host>\n <slot name=\"trigger\"></slot>\n\n <dialog\n ref={el => (this.dialogElement = el)}\n onClose={this.handleDialogClose}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog-header\"\n aria-describedby=\"dialog-content\"\n class={clsx({ full: this.full })}\n >\n <div class=\"content\">\n {!this.undismissable && (\n <nv-button\n class=\"close-button\"\n emphasis=\"lower\"\n size=\"sm\"\n onClick={this.handleDialogClose}\n aria-label=\"Close dialog\"\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </nv-button>\n )}\n\n {this.headerElement ? (\n <slot name=\"header\"></slot>\n ) : (\n <nv-dialogheader id=\"dialog-header\"></nv-dialogheader>\n )}\n\n <div class=\"content-body\" id=\"dialog-content\">\n <slot></slot>\n </div>\n\n {this.footerElement ? (\n <slot name=\"footer\"></slot>\n ) : (\n <nv-dialogfooter\n form={this.form}\n primaryButtonType={\n hasForm ? ButtonType.Submit : ButtonType.Button\n }\n onDialogCanceled={this.handleDialogClose}\n undismissable={this.undismissable}\n ></nv-dialogfooter>\n )}\n </div>\n </dialog>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":";;;;;AASA,IAAIA,EAAqB,CAAC,qBAAsB,sBAAuB,wBAAyB,uBAAwB,sBAAuB,oCAAqC,+BAAgC,+BAAgC,gEAAiE,6CAA8C,wBACnW,IAAIC,EAAmCD,EAAmBE,KAAK,KAC/D,IAAIC,SAAmBC,UAAY,YACnC,IAAIC,EAAUF,EAAY,WAAY,EAAKC,QAAQE,UAAUD,SAAWD,QAAQE,UAAUC,mBAAqBH,QAAQE,UAAUE,sBACjI,IAAIC,GAAeN,GAAaC,QAAQE,UAAUG,YAAc,SAAUC,GACxE,IAAIC,EACJ,OAAOD,IAAY,MAAQA,SAAiB,OAAS,GAAKC,EAAuBD,EAAQD,eAAiB,MAAQE,SAA8B,OAAS,EAAIA,EAAqBC,KAAKF,EACzL,EAAI,SAAUA,GACZ,OAAOA,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQG,aACnE,EAUA,IAAIC,EAAU,SAASA,EAAQC,EAAMC,GACnC,IAAIC,EACJ,GAAID,SAAgB,EAAG,CACrBA,EAAS,IACb,CAIE,IAAIE,EAAWH,IAAS,MAAQA,SAAc,OAAS,GAAKE,EAAqBF,EAAKI,gBAAkB,MAAQF,SAA4B,OAAS,EAAIA,EAAmBL,KAAKG,EAAM,SACvL,IAAIK,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E,MAAM,eACNE,SAAS,QACTC,KAAK,KACLC,QAAS3E,KAAKiB,kBAAiB,aACpB,gBAEXiD,EAAA,WAAA7D,IAAA,2CAASzE,KAAK,IAAI8I,KAAK,QAI1B1E,KAAKyD,cACJS,EAAA,QAAMtI,KAAK,WAEXsI,EAAA,mBAAiBnB,GAAG,kBAGtBmB,EAAA,OAAA7D,IAAA,2CAAKkE,MAAM,eAAexB,GAAG,kBAC3BmB,EAAA,QAAA7D,IAAA,8CAGDL,KAAK2D,cACJO,EAAA,QAAMtI,KAAK,WAEXsI,EAAA,mBACE1I,KAAMwE,KAAKxE,KACXoJ,kBACEX,EAAUY,EAAWC,OAASD,EAAWE,OAE3CC,iBAAkBhF,KAAKiB,kBACvBT,cAAeR,KAAKQ,kB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as g,h as o,H as e,g as s}from"./p-d0a33e64.js";const r="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)}";const i=r;const a=class{constructor(o){t(this,o);this.valueChanged=g(this,"valueChanged",7);this.exclusive=false;this.enforceValue=false;this.emphasis="high";this.size="md";this.setActiveToggleButtons=()=>{this.el.querySelectorAll("nv-togglebutton").forEach((t=>{var g;const o=a.asToggleButton(t);if(!o)return;o.active=((g=this.value)!==null&&g!==void 0?g:[]).includes(o.value)}))};this.setEmphasisToggleButtons=()=>{this.el.querySelectorAll("nv-togglebutton").forEach((t=>{const g=a.asToggleButton(t);if(!g)return;g.emphasis=this.emphasis}))};this.setSizeToggleButtons=()=>{this.el.querySelectorAll("nv-togglebutton").forEach((t=>{const g=a.asToggleButton(t);if(!g)return;g.size=this.size}))};this.setupMutationObserver=()=>{this.mutationObserver=new MutationObserver((t=>{t.forEach((t=>{if(t.type==="childList"&&t.addedNodes.length>0){this.setEmphasisToggleButtons();this.setSizeToggleButtons()}}))}));this.mutationObserver.observe(this.el,{childList:true,subtree:true})}}static asToggleButton(t){return t instanceof HTMLElement?t:null}onValueChanged(t){this.setActiveToggleButtons();this.valueChanged.emit(t)}onEmphasisChanged(){this.setEmphasisToggleButtons()}onSizeChanged(){this.setSizeToggleButtons()}onToggled(t){const g=new Set(this.value);if(this.exclusive&&this.enforceValue){this.value=[t.detail.value];return}if(this.exclusive){if(g.has(t.detail.value)){this.value=[]}else{this.value=[t.detail.value]}return}t:if(t.detail.active){if(this.enforceValue&&g.size===1)break t;g.delete(t.detail.value)}else{g.add(t.detail.value)}this.value=[...g]}componentWillLoad(){this.setActiveToggleButtons();this.setEmphasisToggleButtons();this.setSizeToggleButtons();this.setupMutationObserver()}disconnectedCallback(){if(this.mutationObserver){this.mutationObserver.disconnect()}}render(){return o(e,{key:"edb5b3bb7651b482cd02625038e36cdb35743453"},o("slot",{key:"2b0bc4891b885ecf7febdce7062fc02b120ec939"}))}get el(){return s(this)}static get watchers(){return{value:["onValueChanged"],emphasis:["onEmphasisChanged"],size:["onSizeChanged"]}}};a.style=i;export{a as nv_togglebuttongroup};
2
- //# sourceMappingURL=p-d882f417.entry.js.map
1
+ import{r as t,c as g,h as o,H as e,g as s}from"./p-3060df80.js";const r="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)}";const i=r;const a=class{constructor(o){t(this,o);this.valueChanged=g(this,"valueChanged",7);this.exclusive=false;this.enforceValue=false;this.emphasis="high";this.size="md";this.setActiveToggleButtons=()=>{this.el.querySelectorAll("nv-togglebutton").forEach((t=>{var g;const o=a.asToggleButton(t);if(!o)return;o.active=((g=this.value)!==null&&g!==void 0?g:[]).includes(o.value)}))};this.setEmphasisToggleButtons=()=>{this.el.querySelectorAll("nv-togglebutton").forEach((t=>{const g=a.asToggleButton(t);if(!g)return;g.emphasis=this.emphasis}))};this.setSizeToggleButtons=()=>{this.el.querySelectorAll("nv-togglebutton").forEach((t=>{const g=a.asToggleButton(t);if(!g)return;g.size=this.size}))};this.setupMutationObserver=()=>{this.mutationObserver=new MutationObserver((t=>{t.forEach((t=>{if(t.type==="childList"&&t.addedNodes.length>0){this.setEmphasisToggleButtons();this.setSizeToggleButtons()}}))}));this.mutationObserver.observe(this.el,{childList:true,subtree:true})}}static asToggleButton(t){return t instanceof HTMLElement?t:null}onValueChanged(t){this.setActiveToggleButtons();this.valueChanged.emit(t)}onEmphasisChanged(){this.setEmphasisToggleButtons()}onSizeChanged(){this.setSizeToggleButtons()}onToggled(t){const g=new Set(this.value);if(this.exclusive&&this.enforceValue){this.value=[t.detail.value];return}if(this.exclusive){if(g.has(t.detail.value)){this.value=[]}else{this.value=[t.detail.value]}return}t:if(t.detail.active){if(this.enforceValue&&g.size===1)break t;g.delete(t.detail.value)}else{g.add(t.detail.value)}this.value=[...g]}componentWillLoad(){this.setActiveToggleButtons();this.setEmphasisToggleButtons();this.setSizeToggleButtons();this.setupMutationObserver()}disconnectedCallback(){if(this.mutationObserver){this.mutationObserver.disconnect()}}render(){return o(e,{key:"7aad0160ae8e093765ba42649293e27d7b93ab75"},o("slot",{key:"39364122a5e65b1a454bd782a5daacc7edfee8b0"}))}get el(){return s(this)}static get watchers(){return{value:["onValueChanged"],emphasis:["onEmphasisChanged"],size:["onSizeChanged"]}}};a.style=i;export{a as nv_togglebuttongroup};
2
+ //# sourceMappingURL=p-91fab6c2.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["nvTogglebuttongroupCss","NvTogglebuttongroupStyle0","NvTogglebuttongroup","constructor","hostRef","this","exclusive","enforceValue","emphasis","size","setActiveToggleButtons","el","querySelectorAll","forEach","toggleButtonEl","btn","asToggleButton","active","_a","value","includes","setEmphasisToggleButtons","setSizeToggleButtons","setupMutationObserver","mutationObserver","MutationObserver","mutations","mutation","type","addedNodes","length","observe","childList","subtree","element","HTMLElement","onValueChanged","newValue","valueChanged","emit","onEmphasisChanged","onSizeChanged","onToggled","event","valueSet","Set","detail","has","toggle","delete","add","componentWillLoad","disconnectedCallback","disconnect","render","h","Host","key"],"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 * @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"],"mappings":"gEAAA,MAAMA,EAAyB,k8BAC/B,MAAAC,EAAeD,E,MCoBFE,EAAmB,MALhC,WAAAC,CAAAC,G,qDAuBWC,KAAA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,KAAKc,MAAQ,CAACwB,EAAMG,OAAO3B,OAC3B,M,CAGF,GAAId,KAAKC,UAAW,CAClB,GAAIsC,EAASG,IAAIJ,EAAMG,OAAO3B,OAAQ,CACpCd,KAAKc,MAAQ,E,KACR,CACLd,KAAKc,MAAQ,CAACwB,EAAMG,OAAO3B,M,CAE7B,M,CAGF6B,EAAQ,GAAIL,EAAMG,OAAO7B,OAAQ,CAC/B,GAAIZ,KAAKE,cAAgBqC,EAASnC,OAAS,EAAG,MAAMuC,EACpDJ,EAASK,OAAON,EAAMG,OAAO3B,M,KACxB,CACLyB,EAASM,IAAIP,EAAMG,OAAO3B,M,CAE5Bd,KAAKc,MAAQ,IAAIyB,E,CAOnB,iBAAAO,GACE9C,KAAKK,yBACLL,KAAKgB,2BACLhB,KAAKiB,uBACLjB,KAAKkB,uB,CAGP,oBAAA6B,GACE,GAAI/C,KAAKmB,iBAAkB,CACzBnB,KAAKmB,iBAAiB6B,Y,EAmB1B,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,QAAAE,IAAA,6C","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as r,h as o,H as d,g as i}from"./p-3060df80.js";import{c as a}from"./p-8a1a6e56.js";import{v as t}from"./p-f5ff676c.js";const n='nv-fieldradio{--nv-fieldradio-border-default:var(--components-form-field-border-default);--nv-fieldradio-border-hover:var(--components-form-field-border-hover);--nv-fieldradio-border-focus:var(--components-form-field-border-default);--nv-fieldradio-background-default:var(--components-form-field-background-default);--nv-fieldradio-background-checked:var(--components-form-field-background-checked);--nv-fieldradio-background-disabled:var(--components-form-field-background-disabled);--nv-fieldradio-focus-box-shadow:var(--color-focus-brand);--nv-fieldradio-dot-color-checked:var(--components-form-shape-foreground-default);--nv-fieldradio-dot-color-disabled:var(--components-form-shape-foreground-disabled);--nv-fieldradio-outline-color:var(--color-focus-brand);display:inline-flex;align-items:flex-start;gap:var(--form-gap-x)}nv-fieldradio:not([disabled]) input,nv-fieldradio:not([disabled]) label,nv-fieldradio[disabled=false] input,nv-fieldradio[disabled=false] label{cursor:pointer}nv-fieldradio.error{--nv-fieldradio-border-default:var(--components-form-field-border-error);--nv-fieldradio-border-hover:var(--nv-fieldradio-border-default);--nv-fieldradio-border-focus:var(--components-form-field-border-error);--nv-fieldradio-background-checked:var(--components-form-field-background-error);--nv-fieldradio-focus-box-shadow:var(--color-focus-destructive);--nv-fieldradio-dot-color-checked:var(--components-form-shape-foreground-default);--nv-fieldradio-dot-color-disabled:var(--components-form-field-border-error);--nv-fieldradio-outline-color:var(--color-focus-destructive)}nv-fieldradio.label-placement-before{flex-direction:row-reverse}nv-fieldradio[disabled]{opacity:0.5}nv-fieldradio label{align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--form-label-font-weight);line-height:var(--form-label-line-height)}nv-fieldradio input[type=radio]{appearance:none;position:relative;display:flex;width:var(--form-radio-size);height:var(--form-radio-size);padding:var(--form-radio-inner-circle-padding);flex-direction:column;align-items:flex-start;border-radius:var(--radius-rounded-full);border-width:var(--form-radio-border-width);border-style:solid;border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-default)}nv-fieldradio input[type=radio]:hover{border-color:var(--nv-fieldradio-border-hover)}nv-fieldradio input[type=radio]:focus{border-color:var(--nv-fieldradio-border-focus)}nv-fieldradio input[type=radio]:focus,nv-fieldradio input[type=radio]:focus-within{outline:none}nv-fieldradio input[type=radio]:focus-visible,nv-fieldradio input[type=radio]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--nv-fieldradio-outline-color);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-fieldradio input[type=radio]:checked{background:var(--nv-fieldradio-background-checked);border-color:var(--nv-fieldradio-background-checked)}nv-fieldradio input[type=radio]:checked:hover,nv-fieldradio input[type=radio]:checked:focus{border-color:var(--nv-fieldradio-background-checked);background:var(--nv-fieldradio-background-checked)}nv-fieldradio input[type=radio]:checked::before{content:"";position:absolute;top:50%;right:50%;transform:translate(50%, -50%);left:0;width:var(--form-radio-inner-circle-size);height:var(--form-radio-inner-circle-size);flex-shrink:0;border-radius:var(--radius-rounded-full);background:var(--nv-fieldradio-dot-color-checked)}nv-fieldradio input[type=radio]:disabled{border-radius:var(--radius-rounded-full);border-width:var(--form-radio-border-width);border-style:solid;border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-disabled)}nv-fieldradio input[type=radio]:disabled:checked::before{background:var(--nv-fieldradio-dot-color-disabled)}nv-fieldradio input[type=radio]:disabled:hover{border-color:var(--nv-fieldradio-border-default);background:var(--nv-fieldradio-background-disabled)}nv-fieldradio .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height)}nv-fieldradio .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;font-weight:var(--form-description-font-weight);line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}nv-fieldradio .text-container{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0}';const l=n;const f=class{constructor(o){e(this,o);this.checkedChanged=r(this,"checkedChanged",7);this.labelBefore=false;this.inputId=t();this.error=false;this.checked=false;this.disabled=false;this.autofocus=false}componentWillRender(){if(this.message){this.description=this.message}if(this.labelBefore){this.labelPlacement="before"}}handleCheckedChange(e){this.checkedChanged.emit(e)}handleChange(e){const r=e.target;if((r===null||r===void 0?void 0:r.type)==="radio"){Array.from(document.getElementsByTagName("nv-fieldradio")).forEach((e=>{if(e.name===this.name){e.checked=false}}));this.checked=r.checked}}render(){return o(d,{key:"df74694648d4d6ca117d5766871d032b0ec0fa85",class:a(this.labelPlacement==="before"&&"label-placement-before",this.error&&"error")},o("input",{key:"cf30fb745aba5943414e1572a8f7a42af1bf0e3d",type:"radio",id:this.inputId,name:this.name,autofocus:this.autofocus,autocomplete:"off",value:this.value,checked:this.checked,disabled:this.disabled}),o("div",{key:"ff593d4187158ca803f5e49be365f701dc4d618d",class:"text-container"},(this.label||this.el.querySelector('[slot="label"]'))&&o("label",{key:"25120e7e90ce5fb99f90ddca35edc54c1d73f760",htmlFor:this.inputId},o("slot",{key:"557bc3204927f58c0c809870f766fdf36c701c7d",name:"label"},this.label)),(this.description||this.el.querySelector('[slot="description"]'))&&o("div",{key:"9ded425c581cd60f8ef33a830b594589d83fec71",class:"description"},o("slot",{key:"9554607229576afbd33da6bb95d08c7a0b354ee0",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&o("div",{key:"4435f0d7258e3ea0124d06763ffa6a8f17e8ba15",hidden:!this.error,class:"error-description"},o("slot",{key:"d4a80a4b4ddca790a4cb65d79d5d898da4140a07",name:"error-description"},this.errorDescription))))}static get formAssociated(){return true}get el(){return i(this)}static get watchers(){return{checked:["handleCheckedChange"]}}};f.style=l;export{f as nv_fieldradio};
2
+ //# sourceMappingURL=p-95184ea2.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["nvFieldradioCss","NvFieldradioStyle0","NvFieldradio","constructor","hostRef","this","labelBefore","inputId","uuidv4","error","checked","disabled","autofocus","componentWillRender","message","description","labelPlacement","handleCheckedChange","checkedChanged","emit","handleChange","event","target","type","Array","from","document","getElementsByTagName","forEach","element","name","render","h","Host","key","class","clsx","id","autocomplete","value","label","el","querySelector","htmlFor","errorDescription","hidden"],"sources":["src/components/nv-fieldradio/nv-fieldradio.scss?tag=nv-fieldradio","src/components/nv-fieldradio/nv-fieldradio.tsx"],"sourcesContent":["@import \"../../styles/focus-ring\";\n\n@mixin fieldradio-variables() {\n --nv-fieldradio-border-default: var(--components-form-field-border-default);\n --nv-fieldradio-border-hover: var(--components-form-field-border-hover);\n --nv-fieldradio-border-focus: var(--components-form-field-border-default);\n --nv-fieldradio-background-default: var(--components-form-field-background-default);\n --nv-fieldradio-background-checked: var(--components-form-field-background-checked);\n --nv-fieldradio-background-disabled: var(--components-form-field-background-disabled);\n --nv-fieldradio-focus-box-shadow: var(--color-focus-brand);\n --nv-fieldradio-dot-color-checked: var(--components-form-shape-foreground-default);\n --nv-fieldradio-dot-color-disabled: var(--components-form-shape-foreground-disabled);\n --nv-fieldradio-outline-color: var(--color-focus-brand);\n}\n\n@mixin fieldradio-error-variables() {\n --nv-fieldradio-border-default: var(--components-form-field-border-error);\n --nv-fieldradio-border-hover: var(--nv-fieldradio-border-default);\n --nv-fieldradio-border-focus: var(--components-form-field-border-error);\n --nv-fieldradio-background-checked: var(--components-form-field-background-error);\n --nv-fieldradio-focus-box-shadow: var(--color-focus-destructive);\n --nv-fieldradio-dot-color-checked: var(--components-form-shape-foreground-default);\n --nv-fieldradio-dot-color-disabled: var(--components-form-field-border-error);\n --nv-fieldradio-outline-color: var(--color-focus-destructive);\n\n}\n\n@mixin root-styles() {\n display: inline-flex;\n align-items: flex-start;\n gap: var(--form-gap-x);\n\n &:not([disabled]),\n &[disabled=\"false\"] {\n input,\n label {\n cursor: pointer;\n }\n }\n}\n\n@mixin label-before-styles() {\n flex-direction: row-reverse;\n}\n\n@mixin label-styles() {\n align-self: stretch;\n color: var(--components-form-text-label-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-label-font-size);\n font-style: normal;\n font-weight: var(--form-label-font-weight);\n line-height: var(--form-label-line-height);\n}\n\n@mixin description-styles() {\n align-self: stretch;\n color: var(--components-form-text-description-default);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n font-size: var(--form-description-font-size);\n font-style: normal;\n font-weight: var(--form-description-font-weight);\n line-height: var(--form-description-line-height);\n}\n\n@mixin error-description-styles() {\n @include description-styles();\n\n color: var(--components-form-text-description-error);\n}\n\n@mixin text-container-styles() {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1 0 0;\n}\n\n@mixin input-styles() {\n appearance: none;\n position: relative;\n display: flex;\n width: var(--form-radio-size);\n height: var(--form-radio-size);\n padding: var(--form-radio-inner-circle-padding);\n flex-direction: column;\n align-items: flex-start;\n //gap: 10px;\n border-radius: var(--radius-rounded-full);\n border-width: var(--form-radio-border-width);\n border-style: solid;\n border-color: var(--nv-fieldradio-border-default);\n background: var(--nv-fieldradio-background-default);\n\n &:hover {\n border-color: var(--nv-fieldradio-border-hover);\n }\n\n &:focus {\n border-color: var(--nv-fieldradio-border-focus);\n }\n\n @include focus-ring(var(--nv-fieldradio-outline-color));\n\n &:checked {\n background: var(--nv-fieldradio-background-checked);\n border-color: var(--nv-fieldradio-background-checked);\n\n &:hover,\n &:focus {\n border-color: var(--nv-fieldradio-background-checked);\n background: var(--nv-fieldradio-background-checked);\n }\n\n &::before {\n content: \"\";\n position: absolute;\n top: 50%;\n right: 50%;\n transform: translate(50%, -50%);\n left: 0;\n width: var(--form-radio-inner-circle-size);\n height: var(--form-radio-inner-circle-size);\n flex-shrink: 0;\n border-radius: var(--radius-rounded-full);\n background: var(--nv-fieldradio-dot-color-checked);\n }\n }\n\n &:disabled {\n border-radius: var(--radius-rounded-full);\n border-width: var(--form-radio-border-width);\n border-style: solid;\n border-color: var(--nv-fieldradio-border-default);\n background: var(--nv-fieldradio-background-disabled);\n\n &:checked {\n &::before {\n background: var(--nv-fieldradio-dot-color-disabled);\n }\n }\n\n &:hover {\n border-color: var(--nv-fieldradio-border-default);\n background: var(--nv-fieldradio-background-disabled);\n }\n }\n}\n\nnv-fieldradio {\n @include fieldradio-variables();\n @include root-styles();\n\n &.error {\n @include fieldradio-error-variables();\n }\n\n &.label-placement-before {\n @include label-before-styles();\n }\n \n &[disabled] {\n // TODO: Find a way to use the --components-form-opacity-disabled variable properly, right now it outputs a value of 50px instead of 0.5.\n // opacity: var(--components-form-opacity-disabled); Error: Invalid value for --components-form-opacity-disabled (expected a <number> but got \"50px\")\n opacity: 0.5;\n }\n\n label {\n @include label-styles();\n }\n\n input[type=\"radio\"] {\n @include input-styles();\n }\n\n .description {\n @include description-styles();\n }\n\n .error-description {\n @include error-description-styles();\n }\n\n .text-container {\n @include text-container-styles();\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Listen,\n Watch,\n Element,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { type LabelPlacement } from '../../utils/constants';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldradio',\n shadow: false,\n styleUrl: 'nv-fieldradio.scss',\n formAssociated: true,\n})\nexport class NvFieldradio {\n @Element() el: HTMLNvFieldradioElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Adds a helpful hint message below the label\n * @deprecated use description instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Set the label placement to before the input\n * @deprecated use labelPlacement instead.\n */\n @Prop({ reflect: true })\n readonly labelBefore: boolean = false;\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.labelBefore) {\n this.labelPlacement = 'before';\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the radio button’s input element and the for attribute of\n * the associated label. If no ID is provided, a random one will be\n * automatically generated to ensure unique identification, facilitating\n * proper label association and accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Use this to assign a group name to your radio buttons. When you have\n * multiple radio buttons with the same name, users will be able to select\n * only one option within that group, making your forms more organized and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Defines what data will be sent when the radio button is selected.\n * This helps you identify which option the user has chosen in your form,\n * ensuring accurate data collection. When the form is submitted, the data\n * will consist of a name=value pair.\n */\n @Prop({ reflect: true })\n readonly value: string;\n\n /**\n * Sets the text content that is rendered next to the input element of type\n * radio. This label is essential for accessibility and user clarity, as it\n * describes the purpose or option of the radio button.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Defines the position of the label relative to the radio button.\n */\n @Prop({ mutable: true, reflect: true })\n labelPlacement: `${LabelPlacement}`;\n\n /**\n * Adds a helpful hint message below the label. This description provides\n * extra information or context about the radio button option, assisting users\n * in making more informed choices.\n */\n @Prop({ mutable: true, reflect: true })\n description: string;\n\n /**\n * Highlight the radio button with error styling. It helps users quickly\n * identify which option needs attention, improving their form-filling\n * experience by making issues more visible.\n * @validator error\n */\n @Prop({ reflect: true })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the radio\n * button.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Controls whether the radio button is selected.\n */\n @Prop({ mutable: true, reflect: true })\n checked: boolean = false;\n\n /**\n * Disables the radio button, making it un-selectable.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the checked state changes.\n * @bind checked\n */\n @Event()\n checkedChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Watches for changes to the checked state and emits the new value.\n * @param {boolean} checked - The new value of the checked state.\n */\n @Watch('checked')\n handleCheckedChange(checked: boolean) {\n this.checkedChanged.emit(checked);\n }\n\n /**\n * Listens for the change event on the radio button input element and controls\n * the checked state of the host elements.\n * @param {Event} event - The change event.\n */\n @Listen('change')\n handleChange(event: Event) {\n const target = event.target as HTMLInputElement;\n\n if (target?.type === 'radio') {\n Array.from(document.getElementsByTagName('nv-fieldradio')).forEach(\n element => {\n if (element.name === this.name) {\n element.checked = false;\n }\n },\n );\n\n this.checked = target.checked;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(\n this.labelPlacement === 'before' && 'label-placement-before',\n this.error && 'error',\n )}\n >\n <input\n type=\"radio\"\n id={this.inputId}\n name={this.name}\n autofocus={this.autofocus}\n autocomplete=\"off\"\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n />\n\n <div class=\"text-container\">\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"wIAAA,MAAMA,EAAkB,+zJACxB,MAAAC,EAAeD,E,MC0BFE,EAAY,MANzB,WAAAC,CAAAC,G,yDAwBWC,KAAAC,YAAuB,MAuBvBD,KAAAE,QAAkBC,IAiDlBH,KAAAI,MAAiB,MAc1BJ,KAAAK,QAAmB,MAMVL,KAAAM,SAAoB,MASpBN,KAAAO,UAAqB,K,CAnG9B,mBAAAC,GACE,GAAIR,KAAKS,QAAS,CAChBT,KAAKU,YAAcV,KAAKS,O,CAG1B,GAAIT,KAAKC,YAAa,CACpBD,KAAKW,eAAiB,Q,EAmH1B,mBAAAC,CAAoBP,GAClBL,KAAKa,eAAeC,KAAKT,E,CAS3B,YAAAU,CAAaC,GACX,MAAMC,EAASD,EAAMC,OAErB,IAAIA,IAAM,MAANA,SAAM,SAANA,EAAQC,QAAS,QAAS,CAC5BC,MAAMC,KAAKC,SAASC,qBAAqB,kBAAkBC,SACzDC,IACE,GAAIA,EAAQC,OAASzB,KAAKyB,KAAM,CAC9BD,EAAQnB,QAAU,K,KAKxBL,KAAKK,QAAUY,EAAOZ,O,EAQ1B,MAAAqB,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CACHC,MAAOC,EACL/B,KAAKW,iBAAmB,UAAY,yBACpCX,KAAKI,OAAS,UAGhBuB,EAAA,SAAAE,IAAA,2CACEX,KAAK,QACLc,GAAIhC,KAAKE,QACTuB,KAAMzB,KAAKyB,KACXlB,UAAWP,KAAKO,UAChB0B,aAAa,MACbC,MAAOlC,KAAKkC,MACZ7B,QAASL,KAAKK,QACdC,SAAUN,KAAKM,WAGjBqB,EAAA,OAAAE,IAAA,2CAAKC,MAAM,mBACP9B,KAAKmC,OAASnC,KAAKoC,GAAGC,cAAc,oBACpCV,EAAA,SAAAE,IAAA,2CAAOS,QAAStC,KAAKE,SACnByB,EAAA,QAAAE,IAAA,2CAAMJ,KAAK,SAASzB,KAAKmC,SAI3BnC,KAAKU,aACLV,KAAKoC,GAAGC,cAAc,0BACtBV,EAAA,OAAAE,IAAA,2CAAKC,MAAM,eACTH,EAAA,QAAAE,IAAA,2CAAMJ,KAAK,eAAezB,KAAKU,eAIjCV,KAAKuC,kBACLvC,KAAKoC,GAAGC,cAAc,gCACtBV,EAAA,OAAAE,IAAA,2CAAKW,QAASxC,KAAKI,MAAO0B,MAAM,qBAC9BH,EAAA,QAAAE,IAAA,2CAAMJ,KAAK,qBAAqBzB,KAAKuC,oB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as r,h as o,H as i,g as a}from"./p-3060df80.js";import{v as n}from"./p-f5ff676c.js";const t='nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldpassword{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fieldpassword[fluid]:not([fluid=false]){max-width:unset}nv-fieldpassword[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldpassword[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fieldpassword[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldpassword[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:var(--font-weight-high-emphasis)}nv-fieldpassword label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-label-line-height)}nv-fieldpassword .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldpassword .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out;position:relative}nv-fieldpassword .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldpassword .input-wrapper .input-container:focus-within,nv-fieldpassword .input-wrapper .input-container:focus-within:hover,nv-fieldpassword .input-wrapper .input-container:focus,nv-fieldpassword .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldpassword .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldpassword .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldpassword .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-medium-emphasis);line-height:var(--form-field-line-height);width:100%;}nv-fieldpassword .input-wrapper .input-container input:focus{outline:none}nv-fieldpassword .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:var(--font-weight-low-emphasis);line-height:var(--form-field-line-height)}nv-fieldpassword .input-wrapper .input-container input[type=password]::-ms-clear,nv-fieldpassword .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fieldpassword .input-wrapper .input-container>nv-iconbutton:last-of-type{border-top-right-radius:var(--form-field-radius);border-bottom-right-radius:var(--form-field-radius)}nv-fieldpassword .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldpassword .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldpassword .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}';const d=t;const s=class{constructor(o){e(this,o);this.valueChanged=r(this,"valueChanged",7);this.inputId=n();this.disabled=false;this.readonly=false;this.required=false;this.error=false;this.success=false;this.mode="text";this.autocomplete="off";this.hidePasswordIcon=false;this.showPassword=false;this.autofocus=false;this.fluid=false;this.handleInputContainerClick=()=>{this.inputElement.focus()};this.togglePasswordVisibility=()=>{this.showPasswordState=!this.showPasswordState};this.handleInput=e=>{const r=e.target;this.value=r.value;this.valueChanged.emit(r.value)}}handleShowPasswordChange(e){this.showPasswordState=e}componentWillLoad(){this.showPasswordState=this.showPassword}render(){return o(i,{key:"f6c3db1036f210ed45d9175f86536fefcec49aee"},(this.label||this.el.querySelector('[slot="label"]'))&&o("label",{key:"3f90294e9d136887c77765dff60f84a2feeba0af",htmlFor:this.inputId},o("slot",{key:"6406a7f607430ffd4751b1eeda3c169e1e510795",name:"label"},this.label)),o("div",{key:"2316eabf4abfe0ed740a078b4fde0d744f98f793",class:"input-wrapper"},o("slot",{key:"00987dffa4d6e3666891ebf3cee4e36cc0534481",name:"before-input"}),o("div",{key:"e6974c392b1a44dc1f631e85bdf4b45a1d1a5eee",class:"input-container",onClick:this.handleInputContainerClick},o("slot",{key:"05b9ced4358271f96c0e1051fa8dee06fdc1fcd7",name:"leading-input"}),o("input",{key:"0996fa9815a09da1b66dad9d9e1bd4f37842ab9f",id:this.inputId,ref:e=>this.inputElement=e,autofocus:this.autofocus,autocomplete:this.autocomplete,placeholder:this.placeholder,name:this.name,type:this.showPasswordState?"text":"password",inputMode:this.mode,value:this.value,required:this.required,maxlength:this.maxlength,minlength:this.minlength,pattern:this.pattern,disabled:this.disabled,readOnly:this.readonly,onInput:this.handleInput}),(this.success||this.error)&&o("nv-icon",{key:"065dbf76c1d1d6afee787e9b2becb8a4499bcfd7",name:this.success?"circle-check":"alert-circle",class:"validation",size:"md"}),!this.hidePasswordIcon&&o("nv-iconbutton",{key:"eea65c55d64e58e621c9f8d7ad403eb985584afb",name:this.showPasswordState?"eye":"eye-off",size:"md",emphasis:"lower",onClick:this.togglePasswordVisibility,"aria-label":this.showPasswordState?"Hide password":"Show password","aria-pressed":this.showPasswordState.toString()})),o("slot",{key:"17b613bb7b55fd13d445507d8b5182e3107811e8",name:"after-input"})),(this.description||this.el.querySelector('[slot="description"]'))&&o("div",{key:"5d99b2fb2e460febe5b93148d277cee9a73ee180",class:"description"},o("slot",{key:"d196e0641080bf455b02e0a92cf95f2d167eb8f9",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&o("div",{key:"0f96208e27909dca72aea61a6c7fee2a37aaba5f",hidden:!this.error,class:"error-description"},o("slot",{key:"86d51c3d0244d7536b1818f28420b8d1a11e63b7",name:"error-description"},this.errorDescription)))}static get formAssociated(){return true}get el(){return a(this)}static get watchers(){return{showPassword:["handleShowPasswordChange"]}}};s.style=d;export{s as nv_fieldpassword};
2
+ //# sourceMappingURL=p-9613087c.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["nvFieldpasswordCss","NvFieldpasswordStyle0","NvFieldpassword","constructor","hostRef","this","inputId","uuidv4","disabled","readonly","required","error","success","mode","autocomplete","hidePasswordIcon","showPassword","autofocus","fluid","handleInputContainerClick","inputElement","focus","togglePasswordVisibility","showPasswordState","handleInput","event","input","target","value","valueChanged","emit","handleShowPasswordChange","newValue","componentWillLoad","render","h","Host","key","label","el","querySelector","htmlFor","name","class","onClick","id","ref","e","placeholder","type","inputMode","maxlength","minlength","pattern","readOnly","onInput","size","emphasis","toString","description","errorDescription","hidden"],"sources":["src/components/nv-fieldpassword/nv-fieldpassword.scss?tag=nv-fieldpassword","src/components/nv-fieldpassword/nv-fieldpassword.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldpassword {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n position: relative;\n\n input {\n @include form-field-input();\n }\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\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 Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\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 })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,27OAC3B,MAAAC,EAAeD,E,MC2BFE,EAAe,MAN5B,WAAAC,CAAAC,G,qDAoBWC,KAAAC,QAAkBC,IAkDlBF,KAAAG,SAAoB,MAQpBH,KAAAI,SAAoB,MAOpBJ,KAAAK,SAAoB,MAQpBL,KAAAM,MAAiB,MAejBN,KAAAO,QAAmB,MAiCn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+C,UAChBC,QAAShD,KAAKgD,QACd7C,SAAUH,KAAKG,SACf8C,SAAUjD,KAAKI,SACf8C,QAASlD,KAAKmB,eAGdnB,KAAKO,SAAWP,KAAKM,QACrBwB,EAAA,WAAAE,IAAA,2CACEK,KAAMrC,KAAKO,QAAU,eAAiB,eACtC+B,MAAM,aACNa,KAAK,QAIPnD,KAAKU,kBACLoB,EAAA,iBAAAE,IAAA,2CACEK,KAAMrC,KAAKkB,kBAAoB,MAAQ,UACvCiC,KAAK,KACLC,SAAS,QACTb,QAASvC,KAAKiB,yBAAwB,aAEpCjB,KAAKkB,kBAAoB,gBAAkB,gBAAe,eAE9ClB,KAAKkB,kBAAkBmC,cAK3CvB,EAAA,QAAAE,IAAA,2CAAMK,KAAK,kBAGXrC,KAAKsD,aACLtD,KAAKkC,GAAGC,cAAc,0BACtBL,EAAA,OAAAE,IAAA,2CAAKM,MAAM,eACTR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,eAAerC,KAAKsD,eAIjCtD,KAAKuD,kBACLvD,KAAKkC,GAAGC,cAAc,gCACtBL,EAAA,OAAAE,IAAA,2CAAKwB,QAASxD,KAAKM,MAAOgC,MAAM,qBAC9BR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,qBAAqBrC,KAAKuD,mB","ignoreList":[]}
1
+ {"version":3,"names":["nvFieldpasswordCss","NvFieldpasswordStyle0","NvFieldpassword","constructor","hostRef","this","inputId","uuidv4","disabled","readonly","required","error","success","mode","autocomplete","hidePasswordIcon","showPassword","autofocus","fluid","handleInputContainerClick","inputElement","focus","togglePasswordVisibility","showPasswordState","handleInput","event","input","target","value","valueChanged","emit","handleShowPasswordChange","newValue","componentWillLoad","render","h","Host","key","label","el","querySelector","htmlFor","name","class","onClick","id","ref","e","placeholder","type","inputMode","maxlength","minlength","pattern","readOnly","onInput","size","emphasis","toString","description","errorDescription","hidden"],"sources":["src/components/nv-fieldpassword/nv-fieldpassword.scss?tag=nv-fieldpassword","src/components/nv-fieldpassword/nv-fieldpassword.tsx"],"sourcesContent":["@import '../../styles/form-field';\n\nnv-fieldpassword {\n @include form-field-variables();\n @include form-field-root();\n\n &[fluid]:not([fluid=\"false\"]) {\n @include form-field-fluid();\n }\n\n &[readonly]:not([readonly='false']) {\n @include form-field-readonly-variables();\n }\n\n &[error]:not([error='false']) {\n @include form-field-error-variables();\n }\n\n &[success]:not([success='false']) {\n @include form-field-success-variables();\n }\n\n &[required]:not([required='false']) label {\n @include form-field-label-required();\n }\n\n label {\n @include form-field-label();\n }\n\n .input-wrapper {\n @include form-field-input-wrapper();\n\n .input-container {\n @include form-field-input-container();\n\n position: relative;\n\n input {\n @include form-field-input();\n }\n > nv-iconbutton {\n @include form-field-action();\n }\n\n nv-icon.validation {\n @include form-field-icon();\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 Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n State,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { TextInputAutocomplete } from '../../utils/constants';\n\n/**\n * @slot leading-input - Content to be placed before the input text, within the input container.\n * @slot before-input - Content to be placed before the input text, outside the input container.\n * @slot after-input - Content to be placed after the input text, outside the input container.\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldpassword',\n styleUrl: 'nv-fieldpassword.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvFieldpassword {\n @Element() el: HTMLNvFieldpasswordElement;\n private inputElement!: HTMLInputElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the input element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly inputId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * input field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text input field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the input field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the input field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the input’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the input field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the input’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the input field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the input field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the input field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\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 })\n readonly error: boolean = false;\n\n /**\n * A description that appears when there is an error related to the password\n * field.\n * @validator message\n */\n @Prop({ reflect: true })\n readonly errorDescription: string;\n\n /**\n * Changes the input field’s appearance to indicate successful input or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the input field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their input within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * input field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * Set rules for how the input should be formatted. For example, you can\n * require that a phone number includes only digits or that an email address\n * has the correct format. If users don’t follow these rules, they’ll get a\n * prompt to correct their input on form submission.\n * the rules are applied to the input value via regexes.\n */\n @Prop({ reflect: true })\n readonly pattern: string;\n\n /**\n * Defines the type of the input.\n * @default 'text'\n */\n @Prop({ reflect: true })\n readonly mode: 'text' | 'number' = 'text';\n\n /**\n * The autocomplete prop helps users fill out the input field faster by\n * suggesting entries they’ve used before, like their email or address.\n * You can turn it on to make forms more convenient or off to ensure users\n * always type in fresh data.\n */\n @Prop({ reflect: true })\n readonly autocomplete: `${TextInputAutocomplete}` = 'off';\n\n /**\n * Hide the button to show/hide the password.\n */\n @Prop({ reflect: true })\n readonly hidePasswordIcon: boolean = false;\n\n /**\n * Show/hide the password programmatically.\n */\n @Prop({ reflect: true })\n readonly showPassword: boolean = false;\n\n /**\n * Defines whether the password is visible or not.\n */\n @State()\n showPasswordState: boolean;\n\n /**\n * Applies focus to the input field as soon as the component is mounted. This\n * is equivalent to setting the native autofocus attribute on an <input>\n * element.\n */\n @Prop({ reflect: true })\n // eslint-disable-next-line @stencil-community/reserved-member-names\n readonly autofocus: boolean = false;\n\n /**\n * Allows the field to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the input value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n private handleInputContainerClick = () => {\n this.inputElement.focus();\n };\n\n @Watch('showPassword')\n handleShowPasswordChange(newValue: boolean) {\n this.showPasswordState = newValue;\n }\n\n private togglePasswordVisibility = () => {\n this.showPasswordState = !this.showPasswordState;\n };\n\n private handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value; // Update the input value without worrying about the space\n this.valueChanged.emit(input.value);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.showPasswordState = this.showPassword;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"input-wrapper\">\n <slot name=\"before-input\"></slot>\n\n <div class=\"input-container\" onClick={this.handleInputContainerClick}>\n <slot name=\"leading-input\"></slot>\n\n <input\n id={this.inputId}\n ref={e => (this.inputElement = e)}\n autofocus={this.autofocus}\n autocomplete={this.autocomplete}\n placeholder={this.placeholder}\n name={this.name}\n type={this.showPasswordState ? 'text' : 'password'}\n inputMode={this.mode}\n value={this.value}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n pattern={this.pattern}\n disabled={this.disabled}\n readOnly={this.readonly}\n onInput={this.handleInput}\n />\n\n {(this.success || this.error) && (\n <nv-icon\n name={this.success ? 'circle-check' : 'alert-circle'}\n class=\"validation\"\n size=\"md\"\n />\n )}\n\n {!this.hidePasswordIcon && (\n <nv-iconbutton\n name={this.showPasswordState ? 'eye' : 'eye-off'}\n size=\"md\"\n emphasis=\"lower\"\n onClick={this.togglePasswordVisibility}\n aria-label={\n this.showPasswordState ? 'Hide password' : 'Show password'\n }\n aria-pressed={this.showPasswordState.toString()}\n />\n )}\n </div>\n\n <slot name=\"after-input\"></slot>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.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AIxC,KAAKC,QACTwC,IAAKC,GAAM1C,KAAKe,aAAe2B,EAC/B9B,UAAWZ,KAAKY,UAChBH,aAAcT,KAAKS,aACnBkC,YAAa3C,KAAK2C,YAClBN,KAAMrC,KAAKqC,KACXO,KAAM5C,KAAKkB,kBAAoB,OAAS,WACxC2B,UAAW7C,KAAKQ,KAChBe,MAAOvB,KAAKuB,MACZlB,SAAUL,KAAKK,SACfyC,UAAW9C,KAAK8C,UAChBC,UAAW/C,KAAK+C,UAChBC,QAAShD,KAAKgD,QACd7C,SAAUH,KAAKG,SACf8C,SAAUjD,KAAKI,SACf8C,QAASlD,KAAKmB,eAGdnB,KAAKO,SAAWP,KAAKM,QACrBwB,EAAA,WAAAE,IAAA,2CACEK,KAAMrC,KAAKO,QAAU,eAAiB,eACtC+B,MAAM,aACNa,KAAK,QAIPnD,KAAKU,kBACLoB,EAAA,iBAAAE,IAAA,2CACEK,KAAMrC,KAAKkB,kBAAoB,MAAQ,UACvCiC,KAAK,KACLC,SAAS,QACTb,QAASvC,KAAKiB,yBAAwB,aAEpCjB,KAAKkB,kBAAoB,gBAAkB,gBAAe,eAE9ClB,KAAKkB,kBAAkBmC,cAK3CvB,EAAA,QAAAE,IAAA,2CAAMK,KAAK,kBAGXrC,KAAKsD,aACLtD,KAAKkC,GAAGC,cAAc,0BACtBL,EAAA,OAAAE,IAAA,2CAAKM,MAAM,eACTR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,eAAerC,KAAKsD,eAIjCtD,KAAKuD,kBACLvD,KAAKkC,GAAGC,cAAc,gCACtBL,EAAA,OAAAE,IAAA,2CAAKwB,QAASxD,KAAKM,MAAOgC,MAAM,qBAC9BR,EAAA,QAAAE,IAAA,2CAAMK,KAAK,qBAAqBrC,KAAKuD,mB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as n,H as a,g as o}from"./p-d0a33e64.js";const i="nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}";const s=i;const c=class{constructor(n){e(this,n);this.menuitemSelected=t(this,"menuitemSelected",7);this.disabled=false;this.hasSubmenu=false}handleMenuItemSelect(e){if(this.disabled){e.stopPropagation();return}this.menuitemSelected.emit({id:this.el.id,name:this.name,hasSubmenu:this.hasSubmenu})}handleClick(e){this.handleMenuItemSelect(e)}handleKeyDown(e){if(e.key==="Enter"||e.key===" "){const t=document.activeElement;if(t&&t.tagName==="NV-MENUITEM"&&!t.hasAttribute("has-submenu")){e.preventDefault();this.el.click()}}}render(){return n(a,{key:"254c76878476b6b22ea2278b86f0608c60a62660",role:"menuitem",tabindex:this.disabled?"-1":"0"},this.icon&&n("nv-icon",{key:"f7bcdce916a8b0f4026eecd9a6ed060b7f16bcff",name:this.icon}),n("slot",{key:"8557bad8db4a35cbe346e7e1e91d4ab1cde9d30b"}),this.label&&n("span",{key:"1ee543ddfec0e1ff91976ca9739de9f054aa6a5b","data-scope":"text"},this.label),this.shortcut&&!this.hasSubmenu&&n("kbd",{key:"a51ca5b1c20591550e7481228ad4184246a1330e"},this.shortcut),this.hasSubmenu&&n("nv-icon",{key:"f726623c78ea54091f7161c3261db3c22f2d3783",name:"chevron-right"}))}get el(){return o(this)}};c.style=s;export{c as nv_menuitem};
2
- //# sourceMappingURL=p-94dc9c41.entry.js.map
1
+ import{r as e,c as t,h as n,H as a,g as o}from"./p-3060df80.js";const i="nv-menuitem{display:flex;align-items:center;max-width:300px;width:100vw;font-size:var(--menu-contextual-item-font-size);font-weight:var(--menu-contextual-item-font-weight);color:var(--components-menu-contextual-item-content);border-radius:var(--menu-contextual-item-radius);gap:var(--menu-contextual-item-gap-x);padding:var(--menu-contextual-item-padding-y) var(--menu-contextual-item-padding-x);transition:background-color 150ms ease-out;cursor:pointer}nv-menuitem:hover,nv-menuitem:focus,nv-menuitem:focus-within{background-color:var(--components-menu-contextual-item-background-hover);color:var(--components-menu-contextual-item-content-hover)}nv-menuitem *{pointer-events:none}nv-menuitem kbd{color:var(--components-menu-contextual-item-shortcut)}nv-menuitem [data-scope=text]{margin-right:auto}nv-menuitem[disabled]:not([disabled=false]){cursor:unset;background-color:unset;color:var(--components-menu-contextual-item-content-disabled)}";const s=i;const c=class{constructor(n){e(this,n);this.menuitemSelected=t(this,"menuitemSelected",7);this.disabled=false;this.hasSubmenu=false}handleMenuItemSelect(e){if(this.disabled){e.stopPropagation();return}this.menuitemSelected.emit({id:this.el.id,name:this.name,hasSubmenu:this.hasSubmenu})}handleClick(e){this.handleMenuItemSelect(e)}handleKeyDown(e){if(e.key==="Enter"||e.key===" "){const t=document.activeElement;if(t&&t.tagName==="NV-MENUITEM"&&!t.hasAttribute("has-submenu")){e.preventDefault();this.el.click()}}}render(){return n(a,{key:"254c76878476b6b22ea2278b86f0608c60a62660",role:"menuitem",tabindex:this.disabled?"-1":"0"},this.icon&&n("nv-icon",{key:"f7bcdce916a8b0f4026eecd9a6ed060b7f16bcff",name:this.icon}),n("slot",{key:"8557bad8db4a35cbe346e7e1e91d4ab1cde9d30b"}),this.label&&n("span",{key:"1ee543ddfec0e1ff91976ca9739de9f054aa6a5b","data-scope":"text"},this.label),this.shortcut&&!this.hasSubmenu&&n("kbd",{key:"a51ca5b1c20591550e7481228ad4184246a1330e"},this.shortcut),this.hasSubmenu&&n("nv-icon",{key:"f726623c78ea54091f7161c3261db3c22f2d3783",name:"chevron-right"}))}get el(){return o(this)}};c.style=s;export{c as nv_menuitem};
2
+ //# sourceMappingURL=p-9d7e099f.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as o,h as t,H as e,g as n}from"./p-3060df80.js";import{b as s,B as r}from"./p-51602221.js";const a="nv-button{text-decoration:none;display:inline-flex;justify-content:center;align-items:center;font-style:normal;font-weight:var(--font-weight-medium-emphasis);font-family:var(--font-family-default), var(--font-family-fallback), sans-serif;transition:background-color 150ms ease-out;user-select:none;cursor:pointer;height:fit-content;width:fit-content}nv-button[size=xs]{padding:var(--button-xs-padding-y) var(--button-xs-padding-x);gap:var(--button-xs-gap);border-radius:var(--button-xs-border-radius);line-height:var(--button-xs-line-height);font-size:var(--button-xs-font-size)}nv-button[size=xs] nv-icon>svg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-button[size=sm]{padding:var(--button-sm-padding-y) var(--button-sm-padding-x);gap:var(--button-sm-gap);border-radius:var(--button-sm-border-radius);line-height:var(--button-sm-line-height);font-size:var(--button-sm-font-size)}nv-button[size=sm] nv-icon>svg{width:var(--spacing-4);height:var(--spacing-4);stroke-width:1.5px}nv-button[size=md]{padding:var(--button-md-padding-y) var(--button-md-padding-x);gap:var(--button-md-gap);border-radius:var(--button-md-border-radius);line-height:var(--button-md-line-height);font-size:var(--button-md-font-size)}nv-button[size=md] nv-icon>svg{width:var(--spacing-5);height:var(--spacing-5);stroke-width:1.6px}nv-button[size=lg]{padding:var(--button-lg-padding-y) var(--button-lg-padding-x);gap:var(--button-lg-gap);border-radius:var(--button-lg-border-radius);line-height:var(--button-lg-line-height);font-size:var(--button-lg-font-size)}nv-button[size=lg] nv-icon>svg{width:var(--spacing-6);height:var(--spacing-6);stroke-width:1.8px}nv-button[emphasis=high]{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-button[emphasis=high]:hover{background:var(--components-button-high-background-hover);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text-hover)}nv-button[emphasis=high]:active{background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high]:focus,nv-button[emphasis=high]:focus-within{outline:none}nv-button[emphasis=high]:focus-visible,nv-button[emphasis=high]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=high]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=high][active]:not([active=false]){background:var(--components-button-high-background-active);border:1px solid var(--components-button-high-border-active);color:var(--components-button-high-text-active)}nv-button[emphasis=high][danger]:not([danger=false]){background:var(--components-button-destructive-high-background);border:1px solid transparent;color:var(--components-button-destructive-high-text)}nv-button[emphasis=high][danger]:not([danger=false]):hover{background:var(--components-button-destructive-high-background-hover);border:1px solid transparent;color:var(--components-button-destructive-high-text-hover)}nv-button[emphasis=high][danger]:not([danger=false]):focus,nv-button[emphasis=high][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=high][danger]:not([danger=false]):focus-visible,nv-button[emphasis=high][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-button[emphasis=medium]:hover{background:var(--components-button-medium-background-hover);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text-hover)}nv-button[emphasis=medium]:active{background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium]:focus,nv-button[emphasis=medium]:focus-within{outline:none}nv-button[emphasis=medium]:focus-visible,nv-button[emphasis=medium]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=medium]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=medium][active]:not([active=false]){background:var(--components-button-medium-background-active);border:1px solid var(--components-button-medium-border-active);color:var(--components-button-medium-text-active)}nv-button[emphasis=medium][danger]:not([danger=false]){background:var(--components-button-destructive-medium-background);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text)}nv-button[emphasis=medium][danger]:not([danger=false]):hover{background:var(--components-button-destructive-medium-background-hover);border:1px solid var(--components-button-destructive-medium-border);color:var(--components-button-destructive-medium-text-hover)}nv-button[emphasis=medium][danger]:not([danger=false]):focus,nv-button[emphasis=medium][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=medium][danger]:not([danger=false]):focus-visible,nv-button[emphasis=medium][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-button[emphasis=low]:hover{background:var(--components-button-low-background-hover);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text-hover)}nv-button[emphasis=low]:active{background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low]:focus,nv-button[emphasis=low]:focus-within{outline:none}nv-button[emphasis=low]:focus-visible,nv-button[emphasis=low]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=low]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=low][active]:not([active=false]){background:var(--components-button-low-background-active);border:1px solid var(--components-button-low-border-active);color:var(--components-button-low-text-active)}nv-button[emphasis=low][danger]:not([danger=false]){background:var(--components-button-destructive-low-background);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text)}nv-button[emphasis=low][danger]:not([danger=false]):hover{background:var(--components-button-destructive-low-background-hover);border:1px solid var(--components-button-destructive-low-border);color:var(--components-button-destructive-low-text-hover)}nv-button[emphasis=low][danger]:not([danger=false]):focus,nv-button[emphasis=low][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=low][danger]:not([danger=false]):focus-visible,nv-button[emphasis=low][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-button[emphasis=lower]:hover{background:var(--components-button-lower-background-hover);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text-hover)}nv-button[emphasis=lower]:active{background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower]:focus,nv-button[emphasis=lower]:focus-within{outline:none}nv-button[emphasis=lower]:focus-visible,nv-button[emphasis=lower]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[emphasis=lower]:disabled:not([disabled=false]){opacity:0.5;cursor:not-allowed;box-shadow:none}nv-button[emphasis=lower][active]:not([active=false]){background:var(--components-button-lower-background-active);border:1px solid var(--components-button-lower-border-active);color:var(--components-button-lower-text-active)}nv-button[emphasis=lower][danger]:not([danger=false]){background:var(--components-button-destructive-lower-background);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text)}nv-button[emphasis=lower][danger]:not([danger=false]):hover{background:var(--components-button-destructive-lower-background-hover);border:1px solid var(--components-button-destructive-lower-border);color:var(--components-button-destructive-lower-text-hover)}nv-button[emphasis=lower][danger]:not([danger=false]):focus,nv-button[emphasis=lower][danger]:not([danger=false]):focus-within{outline:none}nv-button[emphasis=lower][danger]:not([danger=false]):focus-visible,nv-button[emphasis=lower][danger]:not([danger=false]):has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-destructive);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-button[fluid]:not([fluid=false]){width:100%}nv-button[loading]:not([loading=false]) [slot=leading-icon]{display:none}";const i=a;const u=class{constructor(t){o(this,t);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}this.size="md";this.emphasis="high";this.active=false;this.danger=false;this.loading=false;this.disabled=false;this.fluid=false;this.type="button";this.handleButtonClick=o=>{var t;if(this.loading||this.disabled){o.preventDefault();return}if(this.type!==s.Button&&(this.form||((t=this.internals)===null||t===void 0?void 0:t.form))){this.processFormAction()}else if(this.form&&this.type===s.Button){console.warn("Button has a form id but is not of type submit or reset so no form action will be processed.",`Button:`,this.el)}};this.processFormAction=()=>{var o,t;const e=this.form?document.getElementById(this.form):(o=this.internals)===null||o===void 0?void 0:o.form;if(!e){console.warn("No form element found.",`Form ID: ${this.form||"Not provided"}`,`Internals form:`,(t=this.internals)===null||t===void 0?void 0:t.form);return}switch(this.type){case s.Submit:e.requestSubmit();break;case s.Reset:e.reset();break}}}handleKeyDown(o){if(o.key==="Enter"||o.key===" "){o.preventDefault();this.el.click()}}handleLoadingChange(o){this.loading=o;this.disabled=o}handleDisabledChange(o){if(this.loading){this.disabled=this.loading}else{this.disabled=o}}componentWillLoad(){if(this.loading){this.disabled=this.loading}}render(){return t(e,{key:"42488f71ad33233c839cd70b3ea57aee50b143b3",role:"button",tabindex:"0",onClick:this.handleButtonClick},this.loading&&t("nv-loader",{key:"a30c71eebb8f0476bcca5acbc8e7ac7f6377740c",size:this.size===r.Large?"sm":"xs"}),t("slot",{key:"4bbcee81ef7236ae35471c649971c122e4b468f3",name:"leading-icon"}),t("slot",{key:"82203f6aed911e61aef2438bba3b3e664ffb9f76"}),t("slot",{key:"c97a5ce78c15556b8c1a91a4d06eb6bc9a9cd255",name:"trailing-icon"}))}static get formAssociated(){return true}get el(){return n(this)}static get watchers(){return{loading:["handleLoadingChange"],disabled:["handleDisabledChange"]}}};u.style=i;export{u as nv_button};
2
+ //# sourceMappingURL=p-a6fc987a.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["nvButtonCss","NvButtonStyle0","NvButton","constructor","hostRef","this","size","emphasis","active","danger","loading","disabled","fluid","type","handleButtonClick","event","preventDefault","ButtonType","Button","form","_a","internals","processFormAction","console","warn","el","formElement","document","getElementById","_b","Submit","requestSubmit","Reset","reset","handleKeyDown","key","click","handleLoadingChange","handleDisabledChange","componentWillLoad","render","h","Host","role","tabindex","onClick","ButtonSize","Large","name"],"sources":["src/components/nv-button/styles/nv-button.scss?tag=nv-button","src/components/nv-button/nv-button.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\n// Make sure to update nv-button class in the tailwind-components.scss file when\n// you add new styles or change the structure here.\nnv-button {\n @include root-styles();\n\n @each $size in $sizes {\n &[size=\"#{$size}\"] {\n @include size-styles($size);\n }\n }\n\n @each $emphasis in $emphases {\n &[emphasis=\"#{$emphasis}\"] {\n @include emphasis-styles($emphasis);\n\n &[active]:not([active=\"false\"]) {\n @include active-styles($emphasis);\n }\n\n &[danger]:not([danger=\"false\"]) {\n @include danger-styles($emphasis);\n }\n }\n }\n\n &[fluid]:not([fluid=\"false\"]) {\n @include fluid-styles();\n }\n\n &[loading]:not([loading=\"false\"]) {\n [slot=\"leading-icon\"] {\n display: none;\n }\n }\n}\n","import {\n Component,\n Listen,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n} from '@stencil/core';\n\nimport { ButtonSize, ButtonEmphasis, ButtonType } from '../../utils/constants';\n\n/**\n * @slot default - Content of the button.\n * @slot leading-icon - Icon before the label.\n * @slot trailing-icon - Icon after the label.\n */\n@Component({\n tag: 'nv-button',\n shadow: false,\n formAssociated: true,\n styleUrl: 'styles/nv-button.scss',\n})\nexport class NvButton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvButtonElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small the button appears, allowing for\n * customization of the button's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ButtonSize}` = 'md';\n\n /**\n * Adjusts the button's emphasis to make it more or less visually prominent\n * to users. Use this to draw attention to important actions or reduce focus\n * on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ButtonEmphasis}` = 'high';\n\n /**\n * Use this prop to highlight the button when it represents the current page\n * or active selection. This helps users understand their navigation context.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Applies styling that visually indicates the button represents a dangerous\n * action.\n */\n @Prop({ reflect: true })\n readonly danger: boolean = false;\n\n /**\n * Set this to true to show a spinner on the button, letting users know that\n * their action is being processed. It helps improve user experience by\n * indicating ongoing activities.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ reflect: true, mutable: true })\n disabled: boolean = false;\n\n /**\n * Allows the button to stretch and fill the entire width of its container.\n */\n @Prop({ reflect: true })\n readonly fluid: boolean = false;\n\n /**\n * Sets the button type to control its function in forms. Use 'submit' to send\n * form data, 'reset' to clear the form, or 'button' for a standard button\n * that doesn't interact with form submission by default.\n */\n @Prop({ reflect: true })\n readonly type: `${ButtonType}` = 'button';\n\n /**\n * Sets the form associated with the button in case the (submit) button is not a child of a form.\n * Matches the native HTML button 'form' attribute behavior.\n */\n @Prop({ reflect: true })\n readonly form: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles button click events, managing form actions and disabled states.\n * Prevents default behavior when button is disabled or loading, and\n * processes form submissions/resets when appropriate.\n * @param {Event} event - The click event.\n */\n private handleButtonClick = (event: Event): void => {\n if (this.loading || this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (\n this.type !== ButtonType.Button &&\n (this.form || this.internals?.form)\n ) {\n this.processFormAction();\n } else if (this.form && this.type === ButtonType.Button) {\n console.warn(\n 'Button has a form id but is not of type submit or reset so no form action will be processed.',\n `Button:`,\n this.el,\n );\n }\n };\n\n /**\n * Processes form-related actions by finding the associated form element\n * and triggering the appropriate action (submit/reset) based on button type.\n * Falls back to ElementInternals form if no explicit form ID is provided.\n */\n private processFormAction = (): void => {\n const formElement = this.form\n ? (document.getElementById(this.form) as HTMLFormElement)\n : this.internals?.form;\n\n if (!formElement) {\n console.warn(\n 'No form element found.',\n `Form ID: ${this.form || 'Not provided'}`,\n `Internals form:`,\n this.internals?.form,\n );\n return;\n }\n\n switch (this.type) {\n case ButtonType.Submit:\n formElement.requestSubmit();\n break;\n case ButtonType.Reset:\n formElement.reset();\n break;\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.el.click();\n }\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('loading')\n handleLoadingChange(loading: boolean) {\n this.loading = loading;\n this.disabled = loading;\n }\n\n @Watch('disabled')\n handleDisabledChange(disabled: boolean) {\n if (this.loading) {\n this.disabled = this.loading;\n } else {\n this.disabled = disabled;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host role=\"button\" tabindex=\"0\" onClick={this.handleButtonClick}>\n {this.loading && (\n <nv-loader\n size={this.size === ButtonSize.Large ? 'sm' : 'xs'}\n ></nv-loader>\n )}\n\n <slot name=\"leading-icon\"></slot>\n <slot></slot>\n <slot name=\"trailing-icon\"></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"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