@nova-design-system/nova-webcomponents 3.23.0 → 3.24.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 (792) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
  2. package/dist/cjs/events.utils-BE6R5q9C.js +33 -0
  3. package/dist/cjs/events.utils-BE6R5q9C.js.map +1 -0
  4. package/dist/cjs/{grow.animation-BrWzyoUA.js → grow.animation-ynu_HmA_.js} +2 -30
  5. package/dist/cjs/grow.animation-ynu_HmA_.js.map +1 -0
  6. package/dist/cjs/{i18n.utils-BizoXo6c.js → i18n.utils-ku0bScip.js} +16 -20
  7. package/dist/cjs/{i18n.utils-BizoXo6c.js.map → i18n.utils-ku0bScip.js.map} +1 -1
  8. package/dist/cjs/index-B1na8x6M.js +12 -4
  9. package/dist/cjs/index.cjs.js +5 -2
  10. package/dist/cjs/index.cjs.js.map +1 -1
  11. package/dist/cjs/index.esm-CG1TVKfu.js +540 -0
  12. package/dist/cjs/index.esm-CG1TVKfu.js.map +1 -0
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/native.cjs.js +1 -1
  15. package/dist/cjs/nv-accordion.cjs.entry.js +2 -7
  16. package/dist/cjs/nv-accordion.entry.cjs.js.map +1 -1
  17. package/dist/cjs/nv-alert.cjs.entry.js +1 -2
  18. package/dist/cjs/nv-alert.entry.cjs.js.map +1 -1
  19. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  20. package/dist/cjs/nv-button.cjs.entry.js +3 -5
  21. package/dist/cjs/nv-button.entry.cjs.js.map +1 -1
  22. package/dist/cjs/nv-calendar.cjs.entry.js +14 -24
  23. package/dist/cjs/nv-calendar.entry.cjs.js.map +1 -1
  24. package/dist/cjs/nv-datagrid.cjs.entry.js +67 -72
  25. package/dist/cjs/nv-datagrid.entry.cjs.js.map +1 -1
  26. package/dist/cjs/nv-dialog.cjs.entry.js +6 -538
  27. package/dist/cjs/nv-dialog.entry.cjs.js.map +1 -1
  28. package/dist/cjs/nv-drawer.cjs.entry.js +443 -0
  29. package/dist/cjs/nv-drawer.entry.cjs.js.map +1 -0
  30. package/dist/cjs/nv-drawerfooter.nv-drawerheader.entry.cjs.js.map +1 -0
  31. package/dist/cjs/nv-drawerfooter_2.cjs.entry.js +144 -0
  32. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +6 -6
  33. package/dist/cjs/nv-fieldcheckbox.entry.cjs.js.map +1 -1
  34. package/dist/cjs/nv-fielddate.cjs.entry.js +12 -15
  35. package/dist/cjs/nv-fielddate.entry.cjs.js.map +1 -1
  36. package/dist/cjs/nv-fielddaterange.cjs.entry.js +12 -13
  37. package/dist/cjs/nv-fielddaterange.entry.cjs.js.map +1 -1
  38. package/dist/cjs/nv-fielddropdown.cjs.entry.js +24 -33
  39. package/dist/cjs/nv-fielddropdown.entry.cjs.js.map +1 -1
  40. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +2 -3
  41. package/dist/cjs/nv-fielddropdownitem.entry.cjs.js.map +1 -1
  42. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +19 -27
  43. package/dist/cjs/nv-fieldmultiselect.entry.cjs.js.map +1 -1
  44. package/dist/cjs/nv-fieldnumber.cjs.entry.js +6 -6
  45. package/dist/cjs/nv-fieldnumber.entry.cjs.js.map +1 -1
  46. package/dist/cjs/nv-fieldpassword.cjs.entry.js +6 -6
  47. package/dist/cjs/nv-fieldpassword.entry.cjs.js.map +1 -1
  48. package/dist/cjs/nv-fieldradio.cjs.entry.js +4 -4
  49. package/dist/cjs/nv-fieldradio.entry.cjs.js.map +1 -1
  50. package/dist/cjs/nv-fieldselect.cjs.entry.js +8 -8
  51. package/dist/cjs/nv-fieldselect.entry.cjs.js.map +1 -1
  52. package/dist/cjs/nv-fieldslider.cjs.entry.js +5 -5
  53. package/dist/cjs/nv-fieldslider.entry.cjs.js.map +1 -1
  54. package/dist/cjs/nv-fieldtext.cjs.entry.js +6 -6
  55. package/dist/cjs/nv-fieldtext.entry.cjs.js.map +1 -1
  56. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +6 -7
  57. package/dist/cjs/nv-fieldtextarea.entry.cjs.js.map +1 -1
  58. package/dist/cjs/nv-fieldtime.cjs.entry.js +27 -35
  59. package/dist/cjs/nv-fieldtime.entry.cjs.js.map +1 -1
  60. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  61. package/dist/cjs/nv-icon.entry.cjs.js.map +1 -1
  62. package/dist/cjs/nv-iconbutton.nv-loader.entry.cjs.js.map +1 -1
  63. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +5 -6
  64. package/dist/cjs/nv-menu.cjs.entry.js +3 -4
  65. package/dist/cjs/nv-menu.entry.cjs.js.map +1 -1
  66. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  67. package/dist/cjs/nv-notification-bullet.cjs.entry.js +1 -2
  68. package/dist/cjs/nv-notification-bullet.entry.cjs.js.map +1 -1
  69. package/dist/cjs/nv-notification.cjs.entry.js +6 -9
  70. package/dist/cjs/nv-notification.entry.cjs.js.map +1 -1
  71. package/dist/cjs/nv-notificationcontainer.cjs.entry.js +1 -1
  72. package/dist/cjs/nv-popover.cjs.entry.js +12 -12
  73. package/dist/cjs/nv-popover.entry.cjs.js.map +1 -1
  74. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  75. package/dist/cjs/nv-sidebar.cjs.entry.js +3 -3
  76. package/dist/cjs/nv-sidebar.entry.cjs.js.map +1 -1
  77. package/dist/cjs/nv-sidebarcontent.cjs.entry.js +1 -1
  78. package/dist/cjs/nv-sidebardivider.cjs.entry.js +1 -1
  79. package/dist/cjs/nv-sidebarfooter.cjs.entry.js +1 -1
  80. package/dist/cjs/nv-sidebargroup.cjs.entry.js +1 -1
  81. package/dist/cjs/nv-sidebarheader.cjs.entry.js +1 -1
  82. package/dist/cjs/nv-sidebarlogo.cjs.entry.js +1 -1
  83. package/dist/cjs/nv-sidebarnavitem.cjs.entry.js +4 -5
  84. package/dist/cjs/nv-sidebarnavitem.entry.cjs.js.map +1 -1
  85. package/dist/cjs/nv-sidebarnavsubitem.cjs.entry.js +1 -1
  86. package/dist/cjs/nv-split.cjs.entry.js +43 -41
  87. package/dist/cjs/nv-split.entry.cjs.js.map +1 -1
  88. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  89. package/dist/cjs/nv-table.cjs.entry.js +6 -8
  90. package/dist/cjs/nv-table.entry.cjs.js.map +1 -1
  91. package/dist/cjs/nv-tableheader.cjs.entry.js +2 -2
  92. package/dist/cjs/nv-tableheader.entry.cjs.js.map +1 -1
  93. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  94. package/dist/cjs/nv-togglebutton.cjs.entry.js +2 -2
  95. package/dist/cjs/nv-togglebutton.entry.cjs.js.map +1 -1
  96. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +3 -4
  97. package/dist/cjs/nv-togglebuttongroup.entry.cjs.js.map +1 -1
  98. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  99. package/dist/collection/collection-manifest.json +3 -0
  100. package/dist/collection/components/nv-accordion/nv-accordion.docs.js +66 -40
  101. package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -1
  102. package/dist/collection/components/nv-accordion/nv-accordion.js +2 -7
  103. package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
  104. package/dist/collection/components/nv-alert/nv-alert.docs.js +18 -1
  105. package/dist/collection/components/nv-alert/nv-alert.docs.js.map +1 -1
  106. package/dist/collection/components/nv-alert/nv-alert.js +1 -2
  107. package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
  108. package/dist/collection/components/nv-avatar/nv-avatar.docs.js +56 -0
  109. package/dist/collection/components/nv-avatar/nv-avatar.docs.js.map +1 -1
  110. package/dist/collection/components/nv-badge/nv-badge.docs.js +64 -15
  111. package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -1
  112. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js +10 -1
  113. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.docs.js.map +1 -1
  114. package/dist/collection/components/nv-button/nv-button.docs.js +38 -4
  115. package/dist/collection/components/nv-button/nv-button.docs.js.map +1 -1
  116. package/dist/collection/components/nv-button/nv-button.js +3 -5
  117. package/dist/collection/components/nv-button/nv-button.js.map +1 -1
  118. package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js +22 -0
  119. package/dist/collection/components/nv-buttongroup/nv-buttongroup.docs.js.map +1 -1
  120. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +269 -14
  121. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
  122. package/dist/collection/components/nv-calendar/nv-calendar.js +13 -22
  123. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  124. package/dist/collection/components/nv-calendar/partials/week-numbers.js +1 -2
  125. package/dist/collection/components/nv-calendar/partials/week-numbers.js.map +1 -1
  126. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +11 -11
  127. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
  128. package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js +2 -2
  129. package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js.map +1 -1
  130. package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js +6 -5
  131. package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js.map +1 -1
  132. package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js +10 -1
  133. package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js.map +1 -1
  134. package/dist/collection/components/nv-col/nv-col.docs.js +8 -0
  135. package/dist/collection/components/nv-col/nv-col.docs.js.map +1 -1
  136. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +290 -286
  137. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  138. package/dist/collection/components/nv-datagrid/nv-datagrid.js +67 -72
  139. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  140. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +64 -13
  141. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  142. package/dist/collection/components/nv-drawer/nv-drawer.css +114 -0
  143. package/dist/collection/components/nv-drawer/nv-drawer.docs.js +145 -0
  144. package/dist/collection/components/nv-drawer/nv-drawer.docs.js.map +1 -0
  145. package/dist/collection/components/nv-drawer/nv-drawer.js +719 -0
  146. package/dist/collection/components/nv-drawer/nv-drawer.js.map +1 -0
  147. package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.css +8 -0
  148. package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.docs.js +6 -0
  149. package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.docs.js.map +1 -0
  150. package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.js +325 -0
  151. package/dist/collection/components/nv-drawerfooter/nv-drawerfooter.js.map +1 -0
  152. package/dist/collection/components/nv-drawerheader/nv-drawerheader.css +32 -0
  153. package/dist/collection/components/nv-drawerheader/nv-drawerheader.docs.js +6 -0
  154. package/dist/collection/components/nv-drawerheader/nv-drawerheader.docs.js.map +1 -0
  155. package/dist/collection/components/nv-drawerheader/nv-drawerheader.js +92 -0
  156. package/dist/collection/components/nv-drawerheader/nv-drawerheader.js.map +1 -0
  157. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js +186 -136
  158. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js.map +1 -1
  159. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +6 -6
  160. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -1
  161. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js +300 -109
  162. package/dist/collection/components/nv-fielddate/nv-fielddate.docs.js.map +1 -1
  163. package/dist/collection/components/nv-fielddate/nv-fielddate.js +11 -14
  164. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  165. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +1 -1
  166. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js +406 -1
  167. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.docs.js.map +1 -1
  168. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +11 -12
  169. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  170. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +1 -1
  171. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +210 -118
  172. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  173. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +22 -31
  174. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  175. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +1 -1
  176. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +2 -3
  177. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
  178. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  179. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js +462 -322
  180. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.docs.js.map +1 -1
  181. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +17 -25
  182. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  183. package/dist/collection/components/nv-fieldmultiselect/styles/nv-fieldmultiselect.css +1 -1
  184. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +1 -1
  185. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +70 -7
  186. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -1
  187. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +5 -5
  188. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  189. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +1 -1
  190. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +79 -6
  191. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -1
  192. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +5 -5
  193. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -1
  194. package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +58 -6
  195. package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js.map +1 -1
  196. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +4 -4
  197. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -1
  198. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +138 -30
  199. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -1
  200. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +7 -7
  201. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -1
  202. package/dist/collection/components/nv-fieldselect/styles/nv-fieldselect.css +1 -1
  203. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +138 -30
  204. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
  205. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +3 -3
  206. package/dist/collection/components/nv-fieldslider/partials/field-input.js +1 -1
  207. package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -1
  208. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +1 -1
  209. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +1 -1
  210. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +92 -16
  211. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  212. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +5 -5
  213. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
  214. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +64 -3
  215. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -1
  216. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +6 -7
  217. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -1
  218. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +41 -22
  219. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
  220. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +25 -33
  221. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js.map +1 -1
  222. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +1 -1
  223. package/dist/collection/components/nv-fieldtime/utils/format-utils.js +1 -1
  224. package/dist/collection/components/nv-fieldtime/utils/format-utils.js.map +1 -1
  225. package/dist/collection/components/nv-icon/nv-icon.docs.js +46 -0
  226. package/dist/collection/components/nv-icon/nv-icon.docs.js.map +1 -1
  227. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  228. package/dist/collection/components/nv-icon/nv-icons.js +2 -0
  229. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  230. package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +4 -4
  231. package/dist/collection/components/nv-iconbutton/nv-iconbutton.docs.js +18 -1
  232. package/dist/collection/components/nv-iconbutton/nv-iconbutton.docs.js.map +1 -1
  233. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +3 -4
  234. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -1
  235. package/dist/collection/components/nv-loader/nv-loader.docs.js +8 -4
  236. package/dist/collection/components/nv-loader/nv-loader.docs.js.map +1 -1
  237. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  238. package/dist/collection/components/nv-menu/nv-menu.docs.js +17 -5
  239. package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -1
  240. package/dist/collection/components/nv-menu/nv-menu.js +3 -4
  241. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -1
  242. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  243. package/dist/collection/components/nv-notification/nv-notification.docs.js +34 -3
  244. package/dist/collection/components/nv-notification/nv-notification.docs.js.map +1 -1
  245. package/dist/collection/components/nv-notification/nv-notification.js +6 -9
  246. package/dist/collection/components/nv-notification/nv-notification.js.map +1 -1
  247. package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.docs.js +60 -0
  248. package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.docs.js.map +1 -1
  249. package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.js +1 -2
  250. package/dist/collection/components/nv-notification-bullet/nv-notification-bullet.js.map +1 -1
  251. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +1 -1
  252. package/dist/collection/components/nv-popover/nv-popover.docs.js +35 -10
  253. package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -1
  254. package/dist/collection/components/nv-popover/nv-popover.js +2 -3
  255. package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
  256. package/dist/collection/components/nv-row/nv-row.docs.js +7 -0
  257. package/dist/collection/components/nv-row/nv-row.docs.js.map +1 -1
  258. package/dist/collection/components/nv-row/nv-row.js +1 -1
  259. package/dist/collection/components/nv-sidebar/nv-sidebar.docs.js +39 -0
  260. package/dist/collection/components/nv-sidebar/nv-sidebar.docs.js.map +1 -1
  261. package/dist/collection/components/nv-sidebar/nv-sidebar.js +3 -3
  262. package/dist/collection/components/nv-sidebar/nv-sidebar.js.map +1 -1
  263. package/dist/collection/components/nv-sidebarcontent/nv-sidebarcontent.js +1 -1
  264. package/dist/collection/components/nv-sidebardivider/nv-sidebardivider.js +1 -1
  265. package/dist/collection/components/nv-sidebarfooter/nv-sidebarfooter.js +1 -1
  266. package/dist/collection/components/nv-sidebargroup/nv-sidebargroup.js +1 -1
  267. package/dist/collection/components/nv-sidebarheader/nv-sidebarheader.js +1 -1
  268. package/dist/collection/components/nv-sidebarlogo/nv-sidebarlogo.js +1 -1
  269. package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js +5 -6
  270. package/dist/collection/components/nv-sidebarnavitem/nv-sidebarnavitem.js.map +1 -1
  271. package/dist/collection/components/nv-sidebarnavsubitem/nv-sidebarnavsubitem.js +1 -1
  272. package/dist/collection/components/nv-split/nv-split.docs.js +38 -2
  273. package/dist/collection/components/nv-split/nv-split.docs.js.map +1 -1
  274. package/dist/collection/components/nv-split/nv-split.js +44 -42
  275. package/dist/collection/components/nv-split/nv-split.js.map +1 -1
  276. package/dist/collection/components/nv-split/styles/nv-split.css +2 -0
  277. package/dist/collection/components/nv-stack/nv-stack.docs.js +13 -0
  278. package/dist/collection/components/nv-stack/nv-stack.docs.js.map +1 -1
  279. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  280. package/dist/collection/components/nv-table/nv-table.docs.js +12 -0
  281. package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
  282. package/dist/collection/components/nv-table/nv-table.js +1 -1
  283. package/dist/collection/components/nv-table/nv-table.utils.js +5 -7
  284. package/dist/collection/components/nv-table/nv-table.utils.js.map +1 -1
  285. package/dist/collection/components/nv-table/test/nv-table.utils.test.js +4 -5
  286. package/dist/collection/components/nv-table/test/nv-table.utils.test.js.map +1 -1
  287. package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js +29 -1
  288. package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js.map +1 -1
  289. package/dist/collection/components/nv-tableheader/nv-tableheader.js +2 -2
  290. package/dist/collection/components/nv-tableheader/nv-tableheader.js.map +1 -1
  291. package/dist/collection/components/nv-toggle/nv-toggle.docs.js +31 -0
  292. package/dist/collection/components/nv-toggle/nv-toggle.docs.js.map +1 -1
  293. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  294. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  295. package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +16 -12
  296. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +20 -7
  297. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
  298. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +2 -3
  299. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js.map +1 -1
  300. package/dist/collection/components/nv-togglebuttongroup/styles/nv-togglebuttongroup.css +4 -12
  301. package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js +33 -6
  302. package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js.map +1 -1
  303. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  304. package/dist/collection/templates/navigation.docs.js +1 -1
  305. package/dist/collection/templates/navigation.docs.js.map +1 -1
  306. package/dist/collection/utils/i18n.utils.js +1 -2
  307. package/dist/collection/utils/i18n.utils.js.map +1 -1
  308. package/dist/collection/utils/search-engine/strategies/fuzzy.js +2 -2
  309. package/dist/collection/utils/search-engine/strategies/fuzzy.js.map +1 -1
  310. package/dist/collection/utils/search-engine/strategies/smart.js +2 -2
  311. package/dist/collection/utils/search-engine/strategies/smart.js.map +1 -1
  312. package/dist/collection/utils/search-engine/strategies/strict.js +2 -2
  313. package/dist/collection/utils/search-engine/strategies/strict.js.map +1 -1
  314. package/dist/collection/utils/search-engine/worker/worker-client.js +7 -10
  315. package/dist/collection/utils/search-engine/worker/worker-client.js.map +1 -1
  316. package/dist/components/index.js +4 -2
  317. package/dist/components/index.js.map +1 -1
  318. package/dist/components/nv-accordion-item.js +1 -1
  319. package/dist/components/nv-accordion.js +6 -11
  320. package/dist/components/nv-accordion.js.map +1 -1
  321. package/dist/components/nv-alert.js +2 -3
  322. package/dist/components/nv-alert.js.map +1 -1
  323. package/dist/components/nv-avatar.js +1 -1
  324. package/dist/components/nv-badge.js +1 -1
  325. package/dist/components/nv-breadcrumb.js +2 -2
  326. package/dist/components/nv-button.js +1 -1
  327. package/dist/components/nv-calendar.js +1 -1
  328. package/dist/components/nv-datagrid.js +69 -74
  329. package/dist/components/nv-datagrid.js.map +1 -1
  330. package/dist/components/nv-dialog.js +7 -539
  331. package/dist/components/nv-dialog.js.map +1 -1
  332. package/dist/components/nv-dialogfooter.js +1 -1
  333. package/dist/components/nv-drawer.d.ts +11 -0
  334. package/dist/components/nv-drawer.js +507 -0
  335. package/dist/components/nv-drawer.js.map +1 -0
  336. package/dist/components/nv-drawerfooter.d.ts +11 -0
  337. package/dist/components/nv-drawerfooter.js +9 -0
  338. package/dist/components/nv-drawerfooter.js.map +1 -0
  339. package/dist/components/nv-drawerheader.d.ts +11 -0
  340. package/dist/components/nv-drawerheader.js +9 -0
  341. package/dist/components/nv-drawerheader.js.map +1 -0
  342. package/dist/components/nv-fieldcheckbox.js +1 -1
  343. package/dist/components/nv-fielddate.js +18 -21
  344. package/dist/components/nv-fielddate.js.map +1 -1
  345. package/dist/components/nv-fielddaterange.js +18 -19
  346. package/dist/components/nv-fielddaterange.js.map +1 -1
  347. package/dist/components/nv-fielddropdown.js +29 -38
  348. package/dist/components/nv-fielddropdown.js.map +1 -1
  349. package/dist/components/nv-fielddropdownitem.js +1 -1
  350. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  351. package/dist/components/nv-fieldmultiselect.js +26 -34
  352. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  353. package/dist/components/nv-fieldnumber.js +1 -1
  354. package/dist/components/nv-fieldpassword.js +9 -9
  355. package/dist/components/nv-fieldpassword.js.map +1 -1
  356. package/dist/components/nv-fieldradio.js +4 -4
  357. package/dist/components/nv-fieldradio.js.map +1 -1
  358. package/dist/components/nv-fieldselect.js +11 -11
  359. package/dist/components/nv-fieldselect.js.map +1 -1
  360. package/dist/components/nv-fieldslider.js +9 -9
  361. package/dist/components/nv-fieldslider.js.map +1 -1
  362. package/dist/components/nv-fieldtext.js +1 -1
  363. package/dist/components/nv-fieldtextarea.js +6 -7
  364. package/dist/components/nv-fieldtextarea.js.map +1 -1
  365. package/dist/components/nv-fieldtime.js +31 -39
  366. package/dist/components/nv-fieldtime.js.map +1 -1
  367. package/dist/components/nv-icon.js +1 -1
  368. package/dist/components/nv-iconbutton.js +1 -1
  369. package/dist/components/nv-loader.js +1 -1
  370. package/dist/components/nv-menu.js +6 -7
  371. package/dist/components/nv-menu.js.map +1 -1
  372. package/dist/components/nv-menuitem.js +1 -1
  373. package/dist/components/nv-notification-bullet.js +1 -1
  374. package/dist/components/nv-notification.js +7 -10
  375. package/dist/components/nv-notification.js.map +1 -1
  376. package/dist/components/nv-notificationcontainer.js +1 -1
  377. package/dist/components/nv-popover.js +1 -1
  378. package/dist/components/nv-row.js +1 -1
  379. package/dist/components/nv-sidebar.js +4 -4
  380. package/dist/components/nv-sidebar.js.map +1 -1
  381. package/dist/components/nv-sidebarcontent.js +1 -1
  382. package/dist/components/nv-sidebardivider.js +1 -1
  383. package/dist/components/nv-sidebarfooter.js +1 -1
  384. package/dist/components/nv-sidebargroup.js +1 -1
  385. package/dist/components/nv-sidebarheader.js +1 -1
  386. package/dist/components/nv-sidebarlogo.js +1 -1
  387. package/dist/components/nv-sidebarnavitem.js +6 -7
  388. package/dist/components/nv-sidebarnavitem.js.map +1 -1
  389. package/dist/components/nv-sidebarnavsubitem.js +1 -1
  390. package/dist/components/nv-split.js +43 -41
  391. package/dist/components/nv-split.js.map +1 -1
  392. package/dist/components/nv-stack.js +1 -1
  393. package/dist/components/nv-table.js +6 -8
  394. package/dist/components/nv-table.js.map +1 -1
  395. package/dist/components/nv-tableheader.js +5 -5
  396. package/dist/components/nv-tableheader.js.map +1 -1
  397. package/dist/components/nv-toggle.js +2 -2
  398. package/dist/components/nv-togglebutton.js +2 -2
  399. package/dist/components/nv-togglebutton.js.map +1 -1
  400. package/dist/components/nv-togglebuttongroup.js +3 -4
  401. package/dist/components/nv-togglebuttongroup.js.map +1 -1
  402. package/dist/components/nv-tooltip.js +1 -1
  403. package/dist/components/{p-D1i2OAGe.js → p-B45HbBWe.js} +6 -8
  404. package/dist/components/p-B45HbBWe.js.map +1 -0
  405. package/dist/components/p-B6GgGra-.js +29 -0
  406. package/dist/components/p-B6GgGra-.js.map +1 -0
  407. package/dist/components/{p-Dk8ekxr_.js → p-B7VlEQVW.js} +16 -26
  408. package/dist/components/p-B7VlEQVW.js.map +1 -0
  409. package/dist/components/{p-B-3kAnun.js → p-B9i3m6rk.js} +6 -6
  410. package/dist/components/p-B9i3m6rk.js.map +1 -0
  411. package/dist/components/{p-BQo7AMPX.js → p-BILd3Ta-.js} +9 -9
  412. package/dist/components/p-BILd3Ta-.js.map +1 -0
  413. package/dist/components/{p-Dc_0pr83.js → p-BISctfud.js} +8 -8
  414. package/dist/components/p-BISctfud.js.map +1 -0
  415. package/dist/components/{p-CIyQBhTX.js → p-BVOv1zgq.js} +4 -4
  416. package/dist/components/{p-CIyQBhTX.js.map → p-BVOv1zgq.js.map} +1 -1
  417. package/dist/components/{p-B6EYOx_n.js → p-Bg_l3jn1.js} +3 -3
  418. package/dist/components/{p-B6EYOx_n.js.map → p-Bg_l3jn1.js.map} +1 -1
  419. package/dist/components/{p-CBvZjfqs.js → p-C2QAWGhf.js} +4 -4
  420. package/dist/components/{p-CBvZjfqs.js.map → p-C2QAWGhf.js.map} +1 -1
  421. package/dist/components/{p-DzUXTCUy.js → p-COnt5ux_.js} +3 -3
  422. package/dist/components/{p-DzUXTCUy.js.map → p-COnt5ux_.js.map} +1 -1
  423. package/dist/components/{p-KUIQrV3D.js → p-Cc7XnqPp.js} +5 -5
  424. package/dist/components/{p-KUIQrV3D.js.map → p-Cc7XnqPp.js.map} +1 -1
  425. package/dist/components/{p-CmwaW0q4.js → p-D02w_Ru6.js} +3 -28
  426. package/dist/components/p-D02w_Ru6.js.map +1 -0
  427. package/dist/components/p-D3eWMME9.js +538 -0
  428. package/dist/components/p-D3eWMME9.js.map +1 -0
  429. package/dist/components/{p--iYGZN4R.js → p-D6APFL6N.js} +11 -11
  430. package/dist/components/p-D6APFL6N.js.map +1 -0
  431. package/dist/components/{p-DstpaOhw.js → p-DZJHk4fr.js} +3 -3
  432. package/dist/components/{p-DstpaOhw.js.map → p-DZJHk4fr.js.map} +1 -1
  433. package/dist/components/{p-Da9WgE5U.js → p-DiUP3TzF.js} +5 -5
  434. package/dist/components/{p-Da9WgE5U.js.map → p-DiUP3TzF.js.map} +1 -1
  435. package/dist/components/{p-DWG6az-u.js → p-DpDooigg.js} +5 -6
  436. package/dist/components/p-DpDooigg.js.map +1 -0
  437. package/dist/components/{p-BKfPh2in.js → p-Dr-67WvG.js} +4 -4
  438. package/dist/components/{p-BKfPh2in.js.map → p-Dr-67WvG.js.map} +1 -1
  439. package/dist/components/{p-DaiLIZ8f.js → p-DvapDVBj.js} +8 -9
  440. package/dist/components/p-DvapDVBj.js.map +1 -0
  441. package/dist/components/{p-DOZbXX2L.js → p-IlwlcG9l.js} +16 -20
  442. package/dist/components/p-IlwlcG9l.js.map +1 -0
  443. package/dist/components/p-W6vOfMC9.js +63 -0
  444. package/dist/components/p-W6vOfMC9.js.map +1 -0
  445. package/dist/components/{p-CBOuqJTb.js → p-nfYynlVq.js} +4 -4
  446. package/dist/components/{p-CBOuqJTb.js.map → p-nfYynlVq.js.map} +1 -1
  447. package/dist/components/{p-CBF8V1L7.js → p-tyaJ-nGV.js} +3 -4
  448. package/dist/components/p-tyaJ-nGV.js.map +1 -0
  449. package/dist/components/p-u-maNLLs.js +145 -0
  450. package/dist/components/p-u-maNLLs.js.map +1 -0
  451. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
  452. package/dist/esm/events.utils-B6GgGra-.js +29 -0
  453. package/dist/esm/events.utils-B6GgGra-.js.map +1 -0
  454. package/dist/esm/{grow.animation-CvHGHBL4.js → grow.animation-D7ep_aVl.js} +3 -28
  455. package/dist/esm/grow.animation-D7ep_aVl.js.map +1 -0
  456. package/dist/esm/{i18n.utils-DOZbXX2L.js → i18n.utils-IlwlcG9l.js} +16 -20
  457. package/dist/esm/{i18n.utils-DOZbXX2L.js.map → i18n.utils-IlwlcG9l.js.map} +1 -1
  458. package/dist/esm/index-CasQushP.js +12 -4
  459. package/dist/esm/index.esm-D3eWMME9.js +538 -0
  460. package/dist/esm/index.esm-D3eWMME9.js.map +1 -0
  461. package/dist/esm/index.js +4 -2
  462. package/dist/esm/index.js.map +1 -1
  463. package/dist/esm/loader.js +1 -1
  464. package/dist/esm/native.js +1 -1
  465. package/dist/esm/nv-accordion.entry.js +2 -7
  466. package/dist/esm/nv-accordion.entry.js.map +1 -1
  467. package/dist/esm/nv-alert.entry.js +1 -2
  468. package/dist/esm/nv-alert.entry.js.map +1 -1
  469. package/dist/esm/nv-badge_2.entry.js +1 -1
  470. package/dist/esm/nv-button.entry.js +3 -5
  471. package/dist/esm/nv-button.entry.js.map +1 -1
  472. package/dist/esm/nv-calendar.entry.js +14 -24
  473. package/dist/esm/nv-calendar.entry.js.map +1 -1
  474. package/dist/esm/nv-datagrid.entry.js +67 -72
  475. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  476. package/dist/esm/nv-dialog.entry.js +3 -535
  477. package/dist/esm/nv-dialog.entry.js.map +1 -1
  478. package/dist/esm/nv-drawer.entry.js +441 -0
  479. package/dist/esm/nv-drawer.entry.js.map +1 -0
  480. package/dist/esm/nv-drawerfooter.nv-drawerheader.entry.js.map +1 -0
  481. package/dist/esm/nv-drawerfooter_2.entry.js +141 -0
  482. package/dist/esm/nv-fieldcheckbox.entry.js +6 -6
  483. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
  484. package/dist/esm/nv-fielddate.entry.js +12 -15
  485. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  486. package/dist/esm/nv-fielddaterange.entry.js +12 -13
  487. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  488. package/dist/esm/nv-fielddropdown.entry.js +24 -33
  489. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  490. package/dist/esm/nv-fielddropdownitem.entry.js +2 -3
  491. package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
  492. package/dist/esm/nv-fieldmultiselect.entry.js +19 -27
  493. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  494. package/dist/esm/nv-fieldnumber.entry.js +6 -6
  495. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  496. package/dist/esm/nv-fieldpassword.entry.js +6 -6
  497. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  498. package/dist/esm/nv-fieldradio.entry.js +4 -4
  499. package/dist/esm/nv-fieldradio.entry.js.map +1 -1
  500. package/dist/esm/nv-fieldselect.entry.js +8 -8
  501. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  502. package/dist/esm/nv-fieldslider.entry.js +5 -5
  503. package/dist/esm/nv-fieldslider.entry.js.map +1 -1
  504. package/dist/esm/nv-fieldtext.entry.js +6 -6
  505. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  506. package/dist/esm/nv-fieldtextarea.entry.js +6 -7
  507. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  508. package/dist/esm/nv-fieldtime.entry.js +27 -35
  509. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  510. package/dist/esm/nv-icon.entry.js +2 -2
  511. package/dist/esm/nv-icon.entry.js.map +1 -1
  512. package/dist/esm/nv-iconbutton.nv-loader.entry.js.map +1 -1
  513. package/dist/esm/nv-iconbutton_2.entry.js +5 -6
  514. package/dist/esm/nv-menu.entry.js +3 -4
  515. package/dist/esm/nv-menu.entry.js.map +1 -1
  516. package/dist/esm/nv-menuitem.entry.js +1 -1
  517. package/dist/esm/nv-notification-bullet.entry.js +1 -2
  518. package/dist/esm/nv-notification-bullet.entry.js.map +1 -1
  519. package/dist/esm/nv-notification.entry.js +6 -9
  520. package/dist/esm/nv-notification.entry.js.map +1 -1
  521. package/dist/esm/nv-notificationcontainer.entry.js +1 -1
  522. package/dist/esm/nv-popover.entry.js +4 -4
  523. package/dist/esm/nv-popover.entry.js.map +1 -1
  524. package/dist/esm/nv-row.entry.js +1 -1
  525. package/dist/esm/nv-sidebar.entry.js +3 -3
  526. package/dist/esm/nv-sidebar.entry.js.map +1 -1
  527. package/dist/esm/nv-sidebarcontent.entry.js +1 -1
  528. package/dist/esm/nv-sidebardivider.entry.js +1 -1
  529. package/dist/esm/nv-sidebarfooter.entry.js +1 -1
  530. package/dist/esm/nv-sidebargroup.entry.js +1 -1
  531. package/dist/esm/nv-sidebarheader.entry.js +1 -1
  532. package/dist/esm/nv-sidebarlogo.entry.js +1 -1
  533. package/dist/esm/nv-sidebarnavitem.entry.js +4 -5
  534. package/dist/esm/nv-sidebarnavitem.entry.js.map +1 -1
  535. package/dist/esm/nv-sidebarnavsubitem.entry.js +1 -1
  536. package/dist/esm/nv-split.entry.js +43 -41
  537. package/dist/esm/nv-split.entry.js.map +1 -1
  538. package/dist/esm/nv-stack.entry.js +1 -1
  539. package/dist/esm/nv-table.entry.js +6 -8
  540. package/dist/esm/nv-table.entry.js.map +1 -1
  541. package/dist/esm/nv-tableheader.entry.js +2 -2
  542. package/dist/esm/nv-tableheader.entry.js.map +1 -1
  543. package/dist/esm/nv-toggle.entry.js +2 -2
  544. package/dist/esm/nv-togglebutton.entry.js +2 -2
  545. package/dist/esm/nv-togglebutton.entry.js.map +1 -1
  546. package/dist/esm/nv-togglebuttongroup.entry.js +3 -4
  547. package/dist/esm/nv-togglebuttongroup.entry.js.map +1 -1
  548. package/dist/esm/nv-tooltip.entry.js +1 -1
  549. package/dist/lib/generators/angular-output.js +9 -7
  550. package/dist/lib/generators/angular-output.js.map +1 -1
  551. package/dist/lib/generators/docs-blazor.js +32 -14
  552. package/dist/lib/generators/docs-blazor.js.map +1 -1
  553. package/dist/lib/generators/vue-output.js +10 -11
  554. package/dist/lib/generators/vue-output.js.map +1 -1
  555. package/dist/lib/utils/componentBinding.js +9 -10
  556. package/dist/lib/utils/componentBinding.js.map +1 -1
  557. package/dist/lib/utils/parseToCSharpTypes.js +3 -16
  558. package/dist/lib/utils/parseToCSharpTypes.js.map +1 -1
  559. package/dist/lib/utils/spread.js +3 -4
  560. package/dist/lib/utils/spread.js.map +1 -1
  561. package/dist/native/index.esm.js +1 -1
  562. package/dist/native/index.esm.js.map +1 -1
  563. package/dist/native/native.css +1 -1
  564. package/dist/native/native.esm.js +1 -1
  565. package/dist/native/nv-accordion.entry.esm.js.map +1 -1
  566. package/dist/native/nv-alert.entry.esm.js.map +1 -1
  567. package/dist/native/nv-button.entry.esm.js.map +1 -1
  568. package/dist/native/nv-calendar.entry.esm.js.map +1 -1
  569. package/dist/native/nv-datagrid.entry.esm.js.map +1 -1
  570. package/dist/native/nv-dialog.entry.esm.js.map +1 -1
  571. package/dist/native/nv-drawer.entry.esm.js.map +1 -0
  572. package/dist/native/nv-drawerfooter.nv-drawerheader.entry.esm.js.map +1 -0
  573. package/dist/native/nv-fieldcheckbox.entry.esm.js.map +1 -1
  574. package/dist/native/nv-fielddate.entry.esm.js.map +1 -1
  575. package/dist/native/nv-fielddaterange.entry.esm.js.map +1 -1
  576. package/dist/native/nv-fielddropdown.entry.esm.js.map +1 -1
  577. package/dist/native/nv-fielddropdownitem.entry.esm.js.map +1 -1
  578. package/dist/native/nv-fieldmultiselect.entry.esm.js.map +1 -1
  579. package/dist/native/nv-fieldnumber.entry.esm.js.map +1 -1
  580. package/dist/native/nv-fieldpassword.entry.esm.js.map +1 -1
  581. package/dist/native/nv-fieldradio.entry.esm.js.map +1 -1
  582. package/dist/native/nv-fieldselect.entry.esm.js.map +1 -1
  583. package/dist/native/nv-fieldslider.entry.esm.js.map +1 -1
  584. package/dist/native/nv-fieldtext.entry.esm.js.map +1 -1
  585. package/dist/native/nv-fieldtextarea.entry.esm.js.map +1 -1
  586. package/dist/native/nv-fieldtime.entry.esm.js.map +1 -1
  587. package/dist/native/nv-icon.entry.esm.js.map +1 -1
  588. package/dist/native/nv-iconbutton.nv-loader.entry.esm.js.map +1 -1
  589. package/dist/native/nv-menu.entry.esm.js.map +1 -1
  590. package/dist/native/nv-notification-bullet.entry.esm.js.map +1 -1
  591. package/dist/native/nv-notification.entry.esm.js.map +1 -1
  592. package/dist/native/nv-popover.entry.esm.js.map +1 -1
  593. package/dist/native/nv-sidebar.entry.esm.js.map +1 -1
  594. package/dist/native/nv-sidebarnavitem.entry.esm.js.map +1 -1
  595. package/dist/native/nv-split.entry.esm.js.map +1 -1
  596. package/dist/native/nv-table.entry.esm.js.map +1 -1
  597. package/dist/native/nv-tableheader.entry.esm.js.map +1 -1
  598. package/dist/native/nv-togglebutton.entry.esm.js.map +1 -1
  599. package/dist/native/nv-togglebuttongroup.entry.esm.js.map +1 -1
  600. package/dist/native/{p-b21e38a3.entry.js → p-04a2fe7f.entry.js} +2 -2
  601. package/dist/native/p-08204da4.entry.js +2 -0
  602. package/dist/native/{p-bd6ae5f3.entry.js.map → p-08204da4.entry.js.map} +1 -1
  603. package/dist/native/{p-e0adb05d.entry.js → p-0e07b91b.entry.js} +2 -2
  604. package/dist/native/p-0e07b91b.entry.js.map +1 -0
  605. package/dist/native/p-136dfb3e.entry.js +2 -0
  606. package/dist/native/p-136dfb3e.entry.js.map +1 -0
  607. package/dist/native/p-1f2dd37f.entry.js +2 -0
  608. package/dist/native/p-1f2dd37f.entry.js.map +1 -0
  609. package/dist/native/p-255a0482.entry.js +2 -0
  610. package/dist/native/p-255a0482.entry.js.map +1 -0
  611. package/dist/native/{p-f73e9752.entry.js → p-3305a7e6.entry.js} +2 -2
  612. package/dist/native/p-3305a7e6.entry.js.map +1 -0
  613. package/dist/native/p-36b0a6f0.entry.js +2 -0
  614. package/dist/native/p-36b0a6f0.entry.js.map +1 -0
  615. package/dist/native/p-434bc910.entry.js +2 -0
  616. package/dist/native/p-434bc910.entry.js.map +1 -0
  617. package/dist/native/{p-ea98ba7a.entry.js → p-436029a5.entry.js} +2 -2
  618. package/dist/native/p-460fdf02.entry.js +2 -0
  619. package/dist/native/p-460fdf02.entry.js.map +1 -0
  620. package/dist/native/p-477e02cf.entry.js +2 -0
  621. package/dist/native/p-477e02cf.entry.js.map +1 -0
  622. package/dist/native/{p-28afb852.entry.js → p-4efb582b.entry.js} +2 -2
  623. package/dist/native/p-4efb582b.entry.js.map +1 -0
  624. package/dist/native/p-4f1dfa32.entry.js +2 -0
  625. package/dist/native/p-4f1dfa32.entry.js.map +1 -0
  626. package/dist/native/p-51b7de55.entry.js +13 -0
  627. package/dist/native/p-51b7de55.entry.js.map +1 -0
  628. package/dist/native/{p-37c6d559.entry.js → p-5dd120dc.entry.js} +2 -2
  629. package/dist/native/p-5dd120dc.entry.js.map +1 -0
  630. package/dist/native/{p-5acf105e.entry.js → p-67181258.entry.js} +2 -2
  631. package/dist/native/p-6a81884b.entry.js +2 -0
  632. package/dist/native/p-6a81884b.entry.js.map +1 -0
  633. package/dist/native/p-6aa483de.entry.js +2 -0
  634. package/dist/native/{p-b1a917c7.entry.js → p-6fc79712.entry.js} +2 -2
  635. package/dist/native/{p-ee04ea09.entry.js → p-729589cb.entry.js} +2 -2
  636. package/dist/native/p-729589cb.entry.js.map +1 -0
  637. package/dist/native/p-78bf7650.entry.js +2 -0
  638. package/dist/native/p-7e6e9ea2.entry.js +2 -0
  639. package/dist/native/p-8f1cd9e2.entry.js +2 -0
  640. package/dist/native/p-8f1cd9e2.entry.js.map +1 -0
  641. package/dist/native/{p-4cf47e1a.entry.js → p-910cd685.entry.js} +2 -2
  642. package/dist/native/p-91eaf02e.entry.js +2 -0
  643. package/dist/native/p-91eaf02e.entry.js.map +1 -0
  644. package/dist/native/p-93e35975.entry.js +2 -0
  645. package/dist/native/p-93e35975.entry.js.map +1 -0
  646. package/dist/native/{p-9d8257dc.entry.js → p-96c45604.entry.js} +2 -2
  647. package/dist/native/{p-6f456ae4.entry.js → p-9b6ad782.entry.js} +2 -2
  648. package/dist/native/{p-6f456ae4.entry.js.map → p-9b6ad782.entry.js.map} +1 -1
  649. package/dist/native/{p-fd872d54.entry.js → p-9f32c3ea.entry.js} +2 -2
  650. package/dist/native/p-B6GgGra-.js +2 -0
  651. package/dist/native/p-B6GgGra-.js.map +1 -0
  652. package/dist/native/p-Blc6XEY7.js +2 -0
  653. package/dist/native/p-Blc6XEY7.js.map +1 -0
  654. package/dist/native/p-D3eWMME9.js +6 -0
  655. package/dist/native/p-D3eWMME9.js.map +1 -0
  656. package/dist/native/p-DQuL1Twl.js.map +1 -1
  657. package/dist/native/p-IlwlcG9l.js +2 -0
  658. package/dist/native/{p-DOZbXX2L.js.map → p-IlwlcG9l.js.map} +1 -1
  659. package/dist/native/{p-b0935c49.entry.js → p-a6fea322.entry.js} +2 -2
  660. package/dist/native/p-ae279ae9.entry.js +2 -0
  661. package/dist/native/p-ae279ae9.entry.js.map +1 -0
  662. package/dist/native/p-ba1286aa.entry.js +2 -0
  663. package/dist/native/p-ba1286aa.entry.js.map +1 -0
  664. package/dist/native/p-bb52a5a9.entry.js +2 -0
  665. package/dist/native/p-bb52a5a9.entry.js.map +1 -0
  666. package/dist/native/p-bc90247e.entry.js +2 -0
  667. package/dist/native/p-bc90247e.entry.js.map +1 -0
  668. package/dist/native/{p-0493fb6d.entry.js → p-c2a73a5a.entry.js} +2 -2
  669. package/dist/native/p-c4c11549.entry.js +2 -0
  670. package/dist/native/{p-3c54e422.entry.js → p-c5ecdc49.entry.js} +2 -2
  671. package/dist/native/p-c5ecdc49.entry.js.map +1 -0
  672. package/dist/native/{p-527e9b56.entry.js → p-cb1b9edb.entry.js} +2 -2
  673. package/dist/native/p-cb1b9edb.entry.js.map +1 -0
  674. package/dist/native/p-cdaf54b0.entry.js +2 -0
  675. package/dist/native/p-cdaf54b0.entry.js.map +1 -0
  676. package/dist/native/{p-e7dc36d9.entry.js → p-ceb8fe8a.entry.js} +2 -2
  677. package/dist/native/p-daf7541b.entry.js +2 -0
  678. package/dist/native/p-daf7541b.entry.js.map +1 -0
  679. package/dist/native/{p-da893df2.entry.js → p-ded4be77.entry.js} +2 -2
  680. package/dist/native/p-ded4be77.entry.js.map +1 -0
  681. package/dist/native/p-e1fc5f8c.entry.js +2 -0
  682. package/dist/native/p-e1fc5f8c.entry.js.map +1 -0
  683. package/dist/native/{p-d4f95c86.entry.js → p-e6c69f7d.entry.js} +2 -2
  684. package/dist/native/p-e6c69f7d.entry.js.map +1 -0
  685. package/dist/native/p-e83603f1.entry.js +2 -0
  686. package/dist/native/p-e83603f1.entry.js.map +1 -0
  687. package/dist/native/p-ec217581.entry.js +2 -0
  688. package/dist/native/p-ec217581.entry.js.map +1 -0
  689. package/dist/native/p-ee694832.entry.js +2 -0
  690. package/dist/native/p-ee694832.entry.js.map +1 -0
  691. package/dist/native/{p-b1ef2f25.entry.js → p-f7e0146e.entry.js} +2 -2
  692. package/dist/native/p-f7e0146e.entry.js.map +1 -0
  693. package/dist/types/components/nv-drawer/nv-drawer.d.ts +161 -0
  694. package/dist/types/components/nv-drawer/nv-drawer.docs.d.ts +4 -0
  695. package/dist/types/components/nv-drawerfooter/nv-drawerfooter.d.ts +76 -0
  696. package/dist/types/components/nv-drawerfooter/nv-drawerfooter.docs.d.ts +4 -0
  697. package/dist/types/components/nv-drawerheader/nv-drawerheader.d.ts +20 -0
  698. package/dist/types/components/nv-drawerheader/nv-drawerheader.docs.d.ts +4 -0
  699. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  700. package/dist/types/components/nv-split/nv-split.d.ts +4 -4
  701. package/dist/types/components.d.ts +292 -5
  702. package/dist/vscode-data.json +153 -1
  703. package/hydrate/index.js +969 -408
  704. package/hydrate/index.mjs +969 -408
  705. package/package.json +13 -1
  706. package/dist/cjs/grow.animation-BrWzyoUA.js.map +0 -1
  707. package/dist/components/p--iYGZN4R.js.map +0 -1
  708. package/dist/components/p-B-3kAnun.js.map +0 -1
  709. package/dist/components/p-BQo7AMPX.js.map +0 -1
  710. package/dist/components/p-CBF8V1L7.js.map +0 -1
  711. package/dist/components/p-CmwaW0q4.js.map +0 -1
  712. package/dist/components/p-D1i2OAGe.js.map +0 -1
  713. package/dist/components/p-DOZbXX2L.js.map +0 -1
  714. package/dist/components/p-DWG6az-u.js.map +0 -1
  715. package/dist/components/p-DaiLIZ8f.js.map +0 -1
  716. package/dist/components/p-Dc_0pr83.js.map +0 -1
  717. package/dist/components/p-Dk8ekxr_.js.map +0 -1
  718. package/dist/esm/grow.animation-CvHGHBL4.js.map +0 -1
  719. package/dist/native/p-02df60a5.entry.js +0 -2
  720. package/dist/native/p-02df60a5.entry.js.map +0 -1
  721. package/dist/native/p-0b8d6777.entry.js +0 -13
  722. package/dist/native/p-0b8d6777.entry.js.map +0 -1
  723. package/dist/native/p-0e7e693f.entry.js +0 -2
  724. package/dist/native/p-0e7e693f.entry.js.map +0 -1
  725. package/dist/native/p-0fe60a9d.entry.js +0 -2
  726. package/dist/native/p-0fe60a9d.entry.js.map +0 -1
  727. package/dist/native/p-14b0bf14.entry.js +0 -2
  728. package/dist/native/p-14b0bf14.entry.js.map +0 -1
  729. package/dist/native/p-28afb852.entry.js.map +0 -1
  730. package/dist/native/p-2cf77850.entry.js +0 -2
  731. package/dist/native/p-2cf77850.entry.js.map +0 -1
  732. package/dist/native/p-31a12d8a.entry.js +0 -2
  733. package/dist/native/p-31a12d8a.entry.js.map +0 -1
  734. package/dist/native/p-37c6d559.entry.js.map +0 -1
  735. package/dist/native/p-3c54e422.entry.js.map +0 -1
  736. package/dist/native/p-3c9b22ff.entry.js +0 -2
  737. package/dist/native/p-3c9b22ff.entry.js.map +0 -1
  738. package/dist/native/p-4a71f223.entry.js +0 -2
  739. package/dist/native/p-4a71f223.entry.js.map +0 -1
  740. package/dist/native/p-527e9b56.entry.js.map +0 -1
  741. package/dist/native/p-5bce524d.entry.js +0 -2
  742. package/dist/native/p-5bce524d.entry.js.map +0 -1
  743. package/dist/native/p-63bc0a05.entry.js +0 -2
  744. package/dist/native/p-63bc0a05.entry.js.map +0 -1
  745. package/dist/native/p-63bf86de.entry.js +0 -2
  746. package/dist/native/p-6a3c1413.entry.js +0 -2
  747. package/dist/native/p-7e274db7.entry.js +0 -7
  748. package/dist/native/p-7e274db7.entry.js.map +0 -1
  749. package/dist/native/p-86b2b071.entry.js +0 -2
  750. package/dist/native/p-86b2b071.entry.js.map +0 -1
  751. package/dist/native/p-8b278fce.entry.js +0 -2
  752. package/dist/native/p-8b278fce.entry.js.map +0 -1
  753. package/dist/native/p-9c543ab2.entry.js +0 -2
  754. package/dist/native/p-9c543ab2.entry.js.map +0 -1
  755. package/dist/native/p-DOZbXX2L.js +0 -2
  756. package/dist/native/p-DS5GOtQ3.js +0 -2
  757. package/dist/native/p-DS5GOtQ3.js.map +0 -1
  758. package/dist/native/p-a2aa6872.entry.js +0 -2
  759. package/dist/native/p-b1ef2f25.entry.js.map +0 -1
  760. package/dist/native/p-b2ed6d34.entry.js +0 -2
  761. package/dist/native/p-b2ed6d34.entry.js.map +0 -1
  762. package/dist/native/p-bd6ae5f3.entry.js +0 -2
  763. package/dist/native/p-c98b9ce4.entry.js +0 -2
  764. package/dist/native/p-c98b9ce4.entry.js.map +0 -1
  765. package/dist/native/p-cc305619.entry.js +0 -2
  766. package/dist/native/p-cc305619.entry.js.map +0 -1
  767. package/dist/native/p-d1cfdc3e.entry.js +0 -2
  768. package/dist/native/p-d1cfdc3e.entry.js.map +0 -1
  769. package/dist/native/p-d3b1bd81.entry.js +0 -2
  770. package/dist/native/p-d424b9aa.entry.js +0 -2
  771. package/dist/native/p-d424b9aa.entry.js.map +0 -1
  772. package/dist/native/p-d4f95c86.entry.js.map +0 -1
  773. package/dist/native/p-da893df2.entry.js.map +0 -1
  774. package/dist/native/p-e0adb05d.entry.js.map +0 -1
  775. package/dist/native/p-e6a37207.entry.js +0 -2
  776. package/dist/native/p-e6a37207.entry.js.map +0 -1
  777. package/dist/native/p-ee04ea09.entry.js.map +0 -1
  778. package/dist/native/p-f73e9752.entry.js.map +0 -1
  779. /package/dist/native/{p-b21e38a3.entry.js.map → p-04a2fe7f.entry.js.map} +0 -0
  780. /package/dist/native/{p-ea98ba7a.entry.js.map → p-436029a5.entry.js.map} +0 -0
  781. /package/dist/native/{p-5acf105e.entry.js.map → p-67181258.entry.js.map} +0 -0
  782. /package/dist/native/{p-63bf86de.entry.js.map → p-6aa483de.entry.js.map} +0 -0
  783. /package/dist/native/{p-b1a917c7.entry.js.map → p-6fc79712.entry.js.map} +0 -0
  784. /package/dist/native/{p-d3b1bd81.entry.js.map → p-78bf7650.entry.js.map} +0 -0
  785. /package/dist/native/{p-a2aa6872.entry.js.map → p-7e6e9ea2.entry.js.map} +0 -0
  786. /package/dist/native/{p-4cf47e1a.entry.js.map → p-910cd685.entry.js.map} +0 -0
  787. /package/dist/native/{p-9d8257dc.entry.js.map → p-96c45604.entry.js.map} +0 -0
  788. /package/dist/native/{p-fd872d54.entry.js.map → p-9f32c3ea.entry.js.map} +0 -0
  789. /package/dist/native/{p-b0935c49.entry.js.map → p-a6fea322.entry.js.map} +0 -0
  790. /package/dist/native/{p-0493fb6d.entry.js.map → p-c2a73a5a.entry.js.map} +0 -0
  791. /package/dist/native/{p-6a3c1413.entry.js.map → p-c4c11549.entry.js.map} +0 -0
  792. /package/dist/native/{p-e7dc36d9.entry.js.map → p-ceb8fe8a.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"nv-iconbutton.nv-loader.entry.cjs.js","sources":["src/components/nv-iconbutton/nv-iconbutton.scss?tag=nv-iconbutton","src/components/nv-iconbutton/nv-iconbutton.tsx","src/components/nv-loader/nv-loader.scss?tag=nv-loader","src/components/nv-loader/nv-loader.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"../../styles/focus-ring\" as focus;\n\n/* Variants */\n$button-sizes: (\"xs\", \"sm\", \"md\", \"lg\");\n$button-emphasis: (\"high\", \"medium\", \"low\", \"lower\");\n\n/* Define maps for size-related variables */\n$button-icon-button-padding: (\n \"xs\": var(--button-xs-icon-button-padding),\n \"sm\": var(--button-sm-icon-button-padding),\n \"md\": var(--button-md-icon-button-padding),\n \"lg\": var(--button-lg-icon-button-padding)\n);\n\n$button-gap: (\n \"xs\": var(--button-xs-gap),\n \"sm\": var(--button-sm-gap),\n \"md\": var(--button-md-gap),\n \"lg\": var(--button-lg-gap)\n);\n\n$button-border-radius: (\n \"xs\": var(--button-xs-border-radius),\n \"sm\": var(--button-sm-border-radius),\n \"md\": var(--button-md-border-radius),\n \"lg\": var(--button-lg-border-radius)\n);\n\n$button-line-height: (\n \"xs\": var(--button-xs-line-height),\n \"sm\": var(--button-sm-line-height),\n \"md\": var(--button-md-line-height),\n \"lg\": var(--button-lg-line-height)\n);\n\n$button-font-size: (\n \"xs\": var(--button-xs-font-size),\n \"sm\": var(--button-sm-font-size),\n \"md\": var(--button-md-font-size),\n \"lg\": var(--button-lg-font-size)\n);\n\n/* Define maps for emphasis-related variables */\n$components-button-background: (\n \"high\": var(--components-button-high-background),\n \"medium\": var(--components-button-medium-background),\n \"low\": var(--components-button-low-background),\n \"lower\": var(--components-button-lower-background)\n);\n\n$components-button-border: (\n \"high\": var(--components-button-high-border),\n \"medium\": var(--components-button-medium-border),\n \"low\": var(--components-button-low-border),\n \"lower\": var(--components-button-lower-border)\n);\n\n$components-button-text: (\n \"high\": var(--components-button-high-text),\n \"medium\": var(--components-button-medium-text),\n \"low\": var(--components-button-low-text),\n \"lower\": var(--components-button-lower-text)\n);\n\n$components-button-background-hover: (\n \"high\": var(--components-button-high-background-hover),\n \"medium\": var(--components-button-medium-background-hover),\n \"low\": var(--components-button-low-background-hover),\n \"lower\": var(--components-button-lower-background-hover)\n);\n\n$components-button-text-hover: (\n \"high\": var(--components-button-high-text-hover),\n \"medium\": var(--components-button-medium-text-hover),\n \"low\": var(--components-button-low-text-hover),\n \"lower\": var(--components-button-lower-text-hover)\n);\n\n$components-button-icon: (\n \"high\": var(--components-button-high-icon),\n \"medium\": var(--components-button-medium-icon),\n \"low\": var(--components-button-low-icon),\n \"lower\": var(--components-button-lower-icon)\n);\n\n@mixin root-styles() {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n font-style: normal;\n font-weight: var(--font-weight-medium-emphasis);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n transition: background-color 150ms ease-out;\n height: fit-content;\n width: fit-content;\n}\n\n@mixin size-styles($size) {\n padding: map.get($button-icon-button-padding, $size);\n gap: map.get($button-gap, $size);\n border-radius: map.get($button-border-radius, $size);\n line-height: map.get($button-line-height, $size);\n font-size: map.get($button-font-size, $size);\n}\n\n@mixin emphasis-styles($emphasis) {\n background: map.get($components-button-background, $emphasis);\n border: 1px solid map.get($components-button-border, $emphasis);\n color: map.get($components-button-text, $emphasis);\n\n &:hover {\n background: map.get($components-button-background-hover, $emphasis);\n color: map.get($components-button-text-hover, $emphasis);\n }\n\n @include focus.focus-ring();\n\n &:disabled {\n background: map.get($components-button-background, $emphasis);\n color: map.get($components-button-text, $emphasis);\n opacity: 0.5;\n cursor: not-allowed;\n box-shadow: none;\n }\n\n & nv-icon > svg {\n color: map.get($components-button-icon, $emphasis);\n }\n}\n\nnv-iconbutton {\n &.root {\n @include root-styles();\n }\n\n @each $size in $button-sizes {\n &.size-#{$size} {\n @include size-styles($size);\n }\n }\n\n @each $emphasis in $button-emphasis {\n &.emphasis-#{$emphasis} {\n @include emphasis-styles($emphasis);\n }\n }\n\n &.loading {\n [slot=\"leading-icon\"] {\n display: none;\n }\n }\n\n &.shape-rounded {\n border-radius: var(--radius-rounded-full);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n Listen,\n} from '@stencil/core';\nimport clsx from 'clsx';\n\nimport {\n ButtonSize,\n ButtonEmphasis,\n ButtonType,\n IconButtonShape,\n} from '../../utils/constants';\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * @slot default - Content of the button.\n */\n@Component({\n tag: 'nv-iconbutton',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-iconbutton.scss',\n scoped: false,\n})\nexport class NvIconbutton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvIconbuttonElement;\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 * 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. The icon is not displayed when the button\n * is loading. Also, the button is disabled. If you want to disable the\n * button, it is not possible. It is automatically disabled when loading.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ mutable: true, reflect: true })\n disabled: boolean = false;\n\n /**\n * Makes the button look active when it’s within a compatible component\n * like a button group.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Choose the icon you want to display. This also sets the aria-label for\n * improved accessibility, helping users who rely on screen readers.\n * The icon is not displayed when the button is loading.\n */\n @Prop({ reflect: true })\n readonly name: `${IconName}` | string;\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 shape of the button. Choose between square and rounded.\n */\n @Prop({ reflect: true })\n readonly shape: `${IconButtonShape}` = 'square';\n\n /**\n * Use this to make the button skip-able when users navigate with the keyboard.\n * The button remains clickable but won’t be reached via the Tab key.\n */\n @Prop({ reflect: true })\n readonly disableTabindex: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles form-related actions when the button is clicked.\n * - Submits the form if the button type is 'submit'.\n * - Resets the form if the button type is 'reset'.\n * @param {Event} event - The click event.\n */\n private handleClick = (event: Event) => {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (this.type === 'submit') {\n this.internals?.form?.requestSubmit();\n }\n if (this.type === 'reset') {\n this.internals?.form?.reset();\n }\n };\n\n //#endregion METHODS\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 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 @Listen('touchstart', { passive: false })\n handleTouchStart(event: TouchEvent) {\n if (event.touches.length > 1) return;\n event.preventDefault();\n this.el.click();\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"button\"\n type={this.type}\n tabindex={this.disableTabindex ? -1 : 0}\n disabled={this.disabled ? true : undefined}\n class={clsx(\n 'root',\n `size-${this.size}`,\n `emphasis-${this.emphasis}`,\n this.loading && 'loading',\n `shape-${this.shape}`,\n )}\n onClick={this.handleClick}\n >\n {this.loading && <nv-loader size={this.size}></nv-loader>}\n\n {!this.loading && <nv-icon name={this.name} size={this.size} />}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n","@use \"sass:map\";\n\n/* Variants */\n$loader-sizes: (\"xs\", \"sm\", \"md\", \"lg\", \"xl\");\n$loader-color: (\"brand\", \"white\");\n\n/* Define maps for color-related variables */\n$components-loader-background: (\n \"brand\": var(--components-loader-brand-background),\n \"white\": var(--components-loader-white-background)\n);\n\n$components-loader-foreground: (\n \"brand\": var(--components-loader-brand-foreground),\n \"white\": var(--components-loader-white-foreground)\n);\n\n/* Define maps for size-related variables */\n$components-loader-size: (\n \"xs\": var(--loader-size-xs),\n \"sm\": var(--loader-size-sm),\n \"md\": var(--loader-size-md),\n \"lg\": var(--loader-size-lg),\n \"xl\": var(--loader-size-xl)\n);\n\n@mixin root-styles() {\n display: inline-block;\n position: relative;\n aspect-ratio: 1 / 1;\n border-radius: 9999px;\n color: inherit;\n}\n\n@mixin size-styles($size) {\n $loader-size: map.get($components-loader-size, $size);\n $border-size: calc($loader-size / 10);\n\n width: $loader-size;\n height: $loader-size;\n\n &::before,\n &::after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n border-radius: inherit;\n width: 100%;\n height: 100%;\n }\n\n &::before {\n content: \" \";\n border: $border-size solid;\n opacity: 0.3;\n }\n\n &::after {\n content: \" \";\n border-top: $border-size solid transparent;\n border-left: $border-size solid transparent;\n border-right: $border-size solid transparent;\n border-bottom: $border-size solid;\n animation: rotation 1s linear infinite;\n }\n}\n\n@mixin color-styles($color) {\n &::before {\n border-color: map.get($components-loader-background, $color);\n opacity: 1;\n }\n\n &::after {\n border-bottom-color: map.get($components-loader-foreground, $color);\n }\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\nnv-loader {\n @include root-styles();\n\n @each $size in $loader-sizes {\n &.size-#{$size} {\n @include size-styles($size);\n }\n }\n\n @each $color in $loader-color {\n &.color-#{$color} {\n @include color-styles($color);\n }\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport { SemanticSizes, LoaderColors } from '../../utils/constants';\n\n@Component({\n tag: 'nv-loader',\n styleUrl: 'nv-loader.scss',\n shadow: false,\n})\nexport class NvLoader {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Choose the size of the loader to best fit your application’s needs, whether\n * it’s a small spinner for subtle loading indicators or a large one for more\n * prominent displays.\n */\n @Prop({ reflect: true })\n readonly size: `${SemanticSizes}` = 'md';\n\n /**\n * Choose the color of the loader. Options are primary and white to keep the\n * design consistent and ensure the loader stands out or blends in\n * appropriately with your application’s interface.\n */\n @Prop({ reflect: true })\n readonly color: `${LoaderColors}`;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region RENDER\n\n /* <slot> empty to force rendering change */\n render() {\n return (\n <Host\n class={clsx(\n this.size && `size-${this.size}`,\n this.color && `color-${this.color}`,\n )}\n ></Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["h","Host","clsx"],"mappings":";;;;;AAAA,MAAM,eAAe,GAAG,4uJAA4uJ;;MC8BvvJ,YAAY,GAAA,MAAA;AAPzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;AAcE;;;;AAIG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAoB,IAAI;AAErC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAwB,MAAM;AAE/C;;;;;;AAMG;AAEH,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAExB;;AAEG;AAEH,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEzB;;;AAGG;AAEM,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAUhC;;;;AAIG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAoB,QAAQ;AAEzC;;AAEG;AAEM,QAAA,IAAK,CAAA,KAAA,GAAyB,QAAQ;AAE/C;;;AAGG;AAEM,QAAA,IAAe,CAAA,eAAA,GAAY,KAAK;;;;AAMzC;;;;;AAKG;AACK,QAAA,IAAA,CAAA,WAAW,GAAG,CAAC,KAAY,KAAI;;AACrC,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,KAAK,CAAC,cAAc,EAAE;gBACtB;;AAGF,YAAA,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAA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CAAA,CAAE,EAChC,IAAI,CAAC,KAAK,IAAI,CAAS,MAAA,EAAA,IAAI,CAAC,KAAK,CAAA,CAAE,CACpC,EAAA,CACK;;;;;;;;"}
1
+ {"version":3,"file":"nv-iconbutton.nv-loader.entry.cjs.js","sources":["src/components/nv-iconbutton/nv-iconbutton.scss?tag=nv-iconbutton","src/components/nv-iconbutton/nv-iconbutton.tsx","src/components/nv-loader/nv-loader.scss?tag=nv-loader","src/components/nv-loader/nv-loader.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"../../styles/focus-ring\" as focus;\n\n/* Variants */\n$button-sizes: (\"xs\", \"sm\", \"md\", \"lg\");\n$button-emphasis: (\"high\", \"medium\", \"low\", \"lower\");\n\n/* Define maps for size-related variables */\n$button-icon-button-padding: (\n \"xs\": calc(var(--button-xs-icon-button-padding) - 1px),\n \"sm\": calc(var(--button-sm-icon-button-padding) - 1px),\n \"md\": calc(var(--button-md-icon-button-padding) - 1px),\n \"lg\": calc(var(--button-lg-icon-button-padding) - 1px)\n);\n\n$button-gap: (\n \"xs\": var(--button-xs-gap),\n \"sm\": var(--button-sm-gap),\n \"md\": var(--button-md-gap),\n \"lg\": var(--button-lg-gap)\n);\n\n$button-border-radius: (\n \"xs\": var(--button-xs-border-radius),\n \"sm\": var(--button-sm-border-radius),\n \"md\": var(--button-md-border-radius),\n \"lg\": var(--button-lg-border-radius)\n);\n\n$button-line-height: (\n \"xs\": var(--button-xs-line-height),\n \"sm\": var(--button-sm-line-height),\n \"md\": var(--button-md-line-height),\n \"lg\": var(--button-lg-line-height)\n);\n\n$button-font-size: (\n \"xs\": var(--button-xs-font-size),\n \"sm\": var(--button-sm-font-size),\n \"md\": var(--button-md-font-size),\n \"lg\": var(--button-lg-font-size)\n);\n\n/* Define maps for emphasis-related variables */\n$components-button-background: (\n \"high\": var(--components-button-high-background),\n \"medium\": var(--components-button-medium-background),\n \"low\": var(--components-button-low-background),\n \"lower\": var(--components-button-lower-background)\n);\n\n$components-button-border: (\n \"high\": var(--components-button-high-border),\n \"medium\": var(--components-button-medium-border),\n \"low\": var(--components-button-low-border),\n \"lower\": var(--components-button-lower-border)\n);\n\n$components-button-text: (\n \"high\": var(--components-button-high-text),\n \"medium\": var(--components-button-medium-text),\n \"low\": var(--components-button-low-text),\n \"lower\": var(--components-button-lower-text)\n);\n\n$components-button-background-hover: (\n \"high\": var(--components-button-high-background-hover),\n \"medium\": var(--components-button-medium-background-hover),\n \"low\": var(--components-button-low-background-hover),\n \"lower\": var(--components-button-lower-background-hover)\n);\n\n$components-button-text-hover: (\n \"high\": var(--components-button-high-text-hover),\n \"medium\": var(--components-button-medium-text-hover),\n \"low\": var(--components-button-low-text-hover),\n \"lower\": var(--components-button-lower-text-hover)\n);\n\n$components-button-icon: (\n \"high\": var(--components-button-high-icon),\n \"medium\": var(--components-button-medium-icon),\n \"low\": var(--components-button-low-icon),\n \"lower\": var(--components-button-lower-icon)\n);\n\n@mixin root-styles() {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n font-style: normal;\n font-weight: var(--font-weight-medium-emphasis);\n font-family: var(--font-family-default), var(--font-family-fallback), sans-serif;\n transition: background-color 150ms ease-out;\n height: fit-content;\n width: fit-content;\n}\n\n@mixin size-styles($size) {\n padding: map.get($button-icon-button-padding, $size);\n gap: map.get($button-gap, $size);\n border-radius: map.get($button-border-radius, $size);\n line-height: map.get($button-line-height, $size);\n font-size: map.get($button-font-size, $size);\n}\n\n@mixin emphasis-styles($emphasis) {\n background: map.get($components-button-background, $emphasis);\n border: 1px solid map.get($components-button-border, $emphasis);\n color: map.get($components-button-text, $emphasis);\n\n &:hover {\n background: map.get($components-button-background-hover, $emphasis);\n color: map.get($components-button-text-hover, $emphasis);\n }\n\n @include focus.focus-ring();\n\n &:disabled {\n background: map.get($components-button-background, $emphasis);\n color: map.get($components-button-text, $emphasis);\n opacity: 0.5;\n cursor: not-allowed;\n box-shadow: none;\n }\n\n & nv-icon > svg {\n color: map.get($components-button-icon, $emphasis);\n }\n}\n\nnv-iconbutton {\n &.root {\n @include root-styles();\n }\n\n @each $size in $button-sizes {\n &.size-#{$size} {\n @include size-styles($size);\n }\n }\n\n @each $emphasis in $button-emphasis {\n &.emphasis-#{$emphasis} {\n @include emphasis-styles($emphasis);\n }\n }\n\n &.loading {\n [slot=\"leading-icon\"] {\n display: none;\n }\n }\n\n &.shape-rounded {\n border-radius: var(--radius-rounded-full);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n Listen,\n} from '@stencil/core';\nimport clsx from 'clsx';\n\nimport {\n ButtonSize,\n ButtonEmphasis,\n ButtonType,\n IconButtonShape,\n} from '../../utils/constants';\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * @slot default - Content of the button.\n */\n@Component({\n tag: 'nv-iconbutton',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-iconbutton.scss',\n scoped: false,\n})\nexport class NvIconbutton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvIconbuttonElement;\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 * 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. The icon is not displayed when the button\n * is loading. Also, the button is disabled. If you want to disable the\n * button, it is not possible. It is automatically disabled when loading.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ mutable: true, reflect: true })\n disabled: boolean = false;\n\n /**\n * Makes the button look active when it’s within a compatible component\n * like a button group.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Choose the icon you want to display. This also sets the aria-label for\n * improved accessibility, helping users who rely on screen readers.\n * The icon is not displayed when the button is loading.\n */\n @Prop({ reflect: true })\n readonly name: `${IconName}` | string;\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 shape of the button. Choose between square and rounded.\n */\n @Prop({ reflect: true })\n readonly shape: `${IconButtonShape}` = 'square';\n\n /**\n * Use this to make the button skip-able when users navigate with the keyboard.\n * The button remains clickable but won’t be reached via the Tab key.\n */\n @Prop({ reflect: true })\n readonly disableTabindex: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles form-related actions when the button is clicked.\n * - Submits the form if the button type is 'submit'.\n * - Resets the form if the button type is 'reset'.\n * @param {Event} event - The click event.\n */\n private handleClick = (event: Event) => {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (this.type === 'submit') {\n this.internals?.form?.requestSubmit();\n }\n if (this.type === 'reset') {\n this.internals?.form?.reset();\n }\n };\n\n //#endregion METHODS\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 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 @Listen('touchstart', { passive: false })\n handleTouchStart(event: TouchEvent) {\n if (event.touches.length > 1) return;\n event.preventDefault();\n this.el.click();\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"button\"\n type={this.type}\n tabindex={this.disableTabindex ? -1 : 0}\n disabled={this.disabled ? true : undefined}\n class={clsx(\n 'root',\n `size-${this.size}`,\n `emphasis-${this.emphasis}`,\n this.loading && 'loading',\n `shape-${this.shape}`,\n )}\n onClick={this.handleClick}\n >\n {this.loading && <nv-loader size={this.size}></nv-loader>}\n\n {!this.loading && <nv-icon name={this.name} size={this.size} />}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n","@use \"sass:map\";\n\n/* Variants */\n$loader-sizes: (\"xs\", \"sm\", \"md\", \"lg\", \"xl\");\n$loader-color: (\"brand\", \"white\");\n\n/* Define maps for color-related variables */\n$components-loader-background: (\n \"brand\": var(--components-loader-brand-background),\n \"white\": var(--components-loader-white-background)\n);\n\n$components-loader-foreground: (\n \"brand\": var(--components-loader-brand-foreground),\n \"white\": var(--components-loader-white-foreground)\n);\n\n/* Define maps for size-related variables */\n$components-loader-size: (\n \"xs\": var(--loader-size-xs),\n \"sm\": var(--loader-size-sm),\n \"md\": var(--loader-size-md),\n \"lg\": var(--loader-size-lg),\n \"xl\": var(--loader-size-xl)\n);\n\n@mixin root-styles() {\n display: inline-block;\n position: relative;\n aspect-ratio: 1 / 1;\n border-radius: 9999px;\n color: inherit;\n}\n\n@mixin size-styles($size) {\n $loader-size: map.get($components-loader-size, $size);\n $border-size: calc($loader-size / 10);\n\n width: $loader-size;\n height: $loader-size;\n\n &::before,\n &::after {\n content: \" \";\n position: absolute;\n top: 0;\n left: 0;\n border-radius: inherit;\n width: 100%;\n height: 100%;\n }\n\n &::before {\n content: \" \";\n border: $border-size solid;\n opacity: 0.3;\n }\n\n &::after {\n content: \" \";\n border-top: $border-size solid transparent;\n border-left: $border-size solid transparent;\n border-right: $border-size solid transparent;\n border-bottom: $border-size solid;\n animation: rotation 1s linear infinite;\n }\n}\n\n@mixin color-styles($color) {\n &::before {\n border-color: map.get($components-loader-background, $color);\n opacity: 1;\n }\n\n &::after {\n border-bottom-color: map.get($components-loader-foreground, $color);\n }\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\nnv-loader {\n @include root-styles();\n\n @each $size in $loader-sizes {\n &.size-#{$size} {\n @include size-styles($size);\n }\n }\n\n @each $color in $loader-color {\n &.color-#{$color} {\n @include color-styles($color);\n }\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport { SemanticSizes, LoaderColors } from '../../utils/constants';\n\n@Component({\n tag: 'nv-loader',\n styleUrl: 'nv-loader.scss',\n shadow: false,\n})\nexport class NvLoader {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Choose the size of the loader to best fit your application’s needs, whether\n * it’s a small spinner for subtle loading indicators or a large one for more\n * prominent displays.\n */\n @Prop({ reflect: true })\n readonly size: `${SemanticSizes}` = 'md';\n\n /**\n * Choose the color of the loader. Options are primary and white to keep the\n * design consistent and ensure the loader stands out or blends in\n * appropriately with your application’s interface.\n */\n @Prop({ reflect: true })\n readonly color: `${LoaderColors}`;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region RENDER\n\n /* <slot> empty to force rendering change */\n render() {\n return (\n <Host\n class={clsx(\n this.size && `size-${this.size}`,\n this.color && `color-${this.color}`,\n )}\n ></Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["h","Host","clsx"],"mappings":";;;;;AAAA,MAAM,eAAe,GAAG,4xJAA4xJ;;MC8BvyJ,YAAY,GAAA,MAAA;AAPzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;AAcE;;;;AAIG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAoB,IAAI;AAErC;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAwB,MAA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,EAE/DA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;;;;AC1Mb,MAAM,WAAW,GAAG,qoHAAqoH;;MCU5oH,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AASE;;;;AAIG;AAEM,QAAA,IAAI,CAAA,IAAA,GAAuB,IAAI;AA2BzC;;;;;IAZC,MAAM,GAAA;AACJ,QAAA,QACEA,OAAA,CAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EACH,KAAK,EAAEC,SAAI,CACT,IAAI,CAAC,IAAI,IAAI,CAAQ,KAAA,EAAA,IAAI,CAAC,IAAI,CAAA,CAAE,EAChC,IAAI,CAAC,KAAK,IAAI,CAAS,MAAA,EAAA,IAAI,CAAC,KAAK,CAAA,CAAE,CACpC,EAAA,CACK;;;;;;;;"}
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-B1na8x6M.js');
4
4
  var clsx = require('./clsx-BtxeOLZW.js');
5
5
 
6
- const nvIconbuttonCss = "nv-iconbutton.root{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;height:fit-content;width:fit-content}nv-iconbutton.size-xs{padding:var(--button-xs-icon-button-padding);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-iconbutton.size-sm{padding:var(--button-sm-icon-button-padding);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-iconbutton.size-md{padding:var(--button-md-icon-button-padding);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-iconbutton.size-lg{padding:var(--button-lg-icon-button-padding);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-iconbutton.emphasis-high{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-iconbutton.emphasis-high:hover{background:var(--components-button-high-background-hover);color:var(--components-button-high-text-hover)}nv-iconbutton.emphasis-high:focus,nv-iconbutton.emphasis-high:focus-within{outline:none}nv-iconbutton.emphasis-high:focus-visible,nv-iconbutton.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-iconbutton.emphasis-high:disabled{background:var(--components-button-high-background);color:var(--components-button-high-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-high nv-icon>svg{color:var(--components-button-high-icon)}nv-iconbutton.emphasis-medium{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-iconbutton.emphasis-medium:hover{background:var(--components-button-medium-background-hover);color:var(--components-button-medium-text-hover)}nv-iconbutton.emphasis-medium:focus,nv-iconbutton.emphasis-medium:focus-within{outline:none}nv-iconbutton.emphasis-medium:focus-visible,nv-iconbutton.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-iconbutton.emphasis-medium:disabled{background:var(--components-button-medium-background);color:var(--components-button-medium-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-medium nv-icon>svg{color:var(--components-button-medium-icon)}nv-iconbutton.emphasis-low{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-iconbutton.emphasis-low:hover{background:var(--components-button-low-background-hover);color:var(--components-button-low-text-hover)}nv-iconbutton.emphasis-low:focus,nv-iconbutton.emphasis-low:focus-within{outline:none}nv-iconbutton.emphasis-low:focus-visible,nv-iconbutton.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-iconbutton.emphasis-low:disabled{background:var(--components-button-low-background);color:var(--components-button-low-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-low nv-icon>svg{color:var(--components-button-low-icon)}nv-iconbutton.emphasis-lower{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-iconbutton.emphasis-lower:hover{background:var(--components-button-lower-background-hover);color:var(--components-button-lower-text-hover)}nv-iconbutton.emphasis-lower:focus,nv-iconbutton.emphasis-lower:focus-within{outline:none}nv-iconbutton.emphasis-lower:focus-visible,nv-iconbutton.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-iconbutton.emphasis-lower:disabled{background:var(--components-button-lower-background);color:var(--components-button-lower-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-lower nv-icon>svg{color:var(--components-button-lower-icon)}nv-iconbutton.loading [slot=leading-icon]{display:none}nv-iconbutton.shape-rounded{border-radius:var(--radius-rounded-full)}";
6
+ const nvIconbuttonCss = "nv-iconbutton.root{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;height:fit-content;width:fit-content}nv-iconbutton.size-xs{padding:calc(var(--button-xs-icon-button-padding) - 1px);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-iconbutton.size-sm{padding:calc(var(--button-sm-icon-button-padding) - 1px);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-iconbutton.size-md{padding:calc(var(--button-md-icon-button-padding) - 1px);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-iconbutton.size-lg{padding:calc(var(--button-lg-icon-button-padding) - 1px);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-iconbutton.emphasis-high{background:var(--components-button-high-background);border:1px solid var(--components-button-high-border);color:var(--components-button-high-text)}nv-iconbutton.emphasis-high:hover{background:var(--components-button-high-background-hover);color:var(--components-button-high-text-hover)}nv-iconbutton.emphasis-high:focus,nv-iconbutton.emphasis-high:focus-within{outline:none}nv-iconbutton.emphasis-high:focus-visible,nv-iconbutton.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-iconbutton.emphasis-high:disabled{background:var(--components-button-high-background);color:var(--components-button-high-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-high nv-icon>svg{color:var(--components-button-high-icon)}nv-iconbutton.emphasis-medium{background:var(--components-button-medium-background);border:1px solid var(--components-button-medium-border);color:var(--components-button-medium-text)}nv-iconbutton.emphasis-medium:hover{background:var(--components-button-medium-background-hover);color:var(--components-button-medium-text-hover)}nv-iconbutton.emphasis-medium:focus,nv-iconbutton.emphasis-medium:focus-within{outline:none}nv-iconbutton.emphasis-medium:focus-visible,nv-iconbutton.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-iconbutton.emphasis-medium:disabled{background:var(--components-button-medium-background);color:var(--components-button-medium-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-medium nv-icon>svg{color:var(--components-button-medium-icon)}nv-iconbutton.emphasis-low{background:var(--components-button-low-background);border:1px solid var(--components-button-low-border);color:var(--components-button-low-text)}nv-iconbutton.emphasis-low:hover{background:var(--components-button-low-background-hover);color:var(--components-button-low-text-hover)}nv-iconbutton.emphasis-low:focus,nv-iconbutton.emphasis-low:focus-within{outline:none}nv-iconbutton.emphasis-low:focus-visible,nv-iconbutton.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-iconbutton.emphasis-low:disabled{background:var(--components-button-low-background);color:var(--components-button-low-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-low nv-icon>svg{color:var(--components-button-low-icon)}nv-iconbutton.emphasis-lower{background:var(--components-button-lower-background);border:1px solid var(--components-button-lower-border);color:var(--components-button-lower-text)}nv-iconbutton.emphasis-lower:hover{background:var(--components-button-lower-background-hover);color:var(--components-button-lower-text-hover)}nv-iconbutton.emphasis-lower:focus,nv-iconbutton.emphasis-lower:focus-within{outline:none}nv-iconbutton.emphasis-lower:focus-visible,nv-iconbutton.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-iconbutton.emphasis-lower:disabled{background:var(--components-button-lower-background);color:var(--components-button-lower-text);opacity:0.5;cursor:not-allowed;box-shadow:none}nv-iconbutton.emphasis-lower nv-icon>svg{color:var(--components-button-lower-icon)}nv-iconbutton.loading [slot=leading-icon]{display:none}nv-iconbutton.shape-rounded{border-radius:var(--radius-rounded-full)}";
7
7
 
8
8
  const NvIconbutton = class {
9
9
  constructor(hostRef) {
@@ -71,16 +71,15 @@ const NvIconbutton = class {
71
71
  * @param {Event} event - The click event.
72
72
  */
73
73
  this.handleClick = (event) => {
74
- var _a, _b, _c, _d;
75
74
  if (this.disabled) {
76
75
  event.preventDefault();
77
76
  return;
78
77
  }
79
78
  if (this.type === 'submit') {
80
- (_b = (_a = this.internals) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.requestSubmit();
79
+ this.internals?.form?.requestSubmit();
81
80
  }
82
81
  if (this.type === 'reset') {
83
- (_d = (_c = this.internals) === null || _c === void 0 ? void 0 : _c.form) === null || _d === void 0 ? void 0 : _d.reset();
82
+ this.internals?.form?.reset();
84
83
  }
85
84
  };
86
85
  }
@@ -126,7 +125,7 @@ const NvIconbutton = class {
126
125
  /****************************************************************************/
127
126
  //#region RENDER
128
127
  render() {
129
- return (index.h(index.Host, { key: '81d7f0bfd1e64ecbb640c2f02b7e73cd7b2d3aa4', role: "button", type: this.type, tabindex: this.disableTabindex ? -1 : 0, disabled: this.disabled ? true : undefined, class: clsx.clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && index.h("nv-loader", { key: 'cec3ee02a7fb0882557c8742c8f9d785835e79d0', size: this.size }), !this.loading && index.h("nv-icon", { key: '4892b3b78b291b159403a63ced6a150dd7def1c0', name: this.name, size: this.size }), index.h("slot", { key: 'b1204bf2dd026c1232b5e8209fd29f21a8aa704f' })));
128
+ return (index.h(index.Host, { key: '2e0011f5ebb23512aa89756ae7fd5ad81586f8b1', role: "button", type: this.type, tabindex: this.disableTabindex ? -1 : 0, disabled: this.disabled ? true : undefined, class: clsx.clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && index.h("nv-loader", { key: '435692a00ed0af3548c2ac875e573af00daf5d62', size: this.size }), !this.loading && index.h("nv-icon", { key: '00b08fbd43724ad7ce54c96cd052ba637e111ece', name: this.name, size: this.size }), index.h("slot", { key: 'bb61e7db6115c9017007f15320dd5b2f6ccd9671' })));
130
129
  }
131
130
  static get formAssociated() { return true; }
132
131
  get el() { return index.getElement(this); }
@@ -156,7 +155,7 @@ const NvLoader = class {
156
155
  //#region RENDER
157
156
  /* <slot> empty to force rendering change */
158
157
  render() {
159
- return (index.h(index.Host, { key: '049afa243c1ce99643408d86afa99e69c5468b8b', class: clsx.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
158
+ return (index.h(index.Host, { key: '4347ec4ee393edb5e23a60e253bae73d0f9db583', class: clsx.clsx(this.size && `size-${this.size}`, this.color && `color-${this.color}`) }));
160
159
  }
161
160
  };
162
161
  NvLoader.style = nvLoaderCss;
@@ -42,8 +42,7 @@ const NvMenu = class {
42
42
  */
43
43
  this.renderMenuItems = () => {
44
44
  return this.items.map(item => {
45
- var _a;
46
- if (item.hasSubmenu && ((_a = item.submenuItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
45
+ if (item.hasSubmenu && item.submenuItems?.length > 0) {
47
46
  return (index.h("nv-menu", { nested: true, placement: "right-start", items: item.submenuItems }, index.h("nv-menuitem", { slot: "trigger", hasSubmenu: true, disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label, onMenuitemSelected: e => this.menuitemSelected.emit(e.detail) })));
48
47
  }
49
48
  return (index.h("nv-menuitem", { disabled: item.disabled, icon: item.icon, shortcut: item.shortcut, id: item.value, name: item.label, label: item.label, onMenuitemSelected: e => this.menuitemSelected.emit(e.detail) }));
@@ -126,7 +125,7 @@ const NvMenu = class {
126
125
  return;
127
126
  }
128
127
  const menuContent = this.el.querySelector('[slot="content"]');
129
- const menuItems = Array.from(menuContent.childNodes).filter(item => { var _a; return (_a = item.matches) === null || _a === void 0 ? void 0 : _a.call(item, 'nv-menuitem, nv-menu'); });
128
+ const menuItems = Array.from(menuContent.childNodes).filter(item => item.matches?.('nv-menuitem, nv-menu'));
130
129
  let currentIndex = menuItems.indexOf(document.activeElement);
131
130
  if (currentIndex === -1)
132
131
  currentIndex = menuItems.indexOf(document.activeElement.parentElement);
@@ -194,7 +193,7 @@ const NvMenu = class {
194
193
  });
195
194
  }
196
195
  render() {
197
- return (index.h(index.Host, { key: '1602501e810755ef8a625ea566203eaae32c52e7' }, index.h("slot", { key: '7a2b75f51e33820f5f608a44efc5b9659af54789', name: "trigger" }), index.h("nv-popover", { key: '2ac84fe36a9844dcf58f9f8d87fec16ae25c35b6', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open, onOpenChanged: this.handleOpenChanged.bind(this) }, this.items ? (index.h("ul", { slot: "content" }, this.renderMenuItems())) : (index.h("slot", { name: "content" })))));
196
+ return (index.h(index.Host, { key: '1139a5dbbbb52e2f32c5d1410b4bdb87156cfd60' }, index.h("slot", { key: 'f2202b254512643f0a16ebcda3715438a7c7aa2a', name: "trigger" }), index.h("nv-popover", { key: '2f49bd9af8ff253ab662b5054717e0d44690f47d', ref: el => (this.popoverElement = el), triggerMode: "click", triggerElement: this.triggerElement, placement: this.placement, nested: this.nested, open: this.open, onOpenChanged: this.handleOpenChanged.bind(this) }, this.items ? (index.h("ul", { slot: "content" }, this.renderMenuItems())) : (index.h("slot", { name: "content" })))));
198
197
  }
199
198
  get el() { return index.getElement(this); }
200
199
  };
@@ -1 +1 @@
1
- {"version":3,"file":"nv-menu.entry.cjs.js","sources":["src/components/nv-menu/nv-menu.scss?tag=nv-menu","src/components/nv-menu/nv-menu.tsx"],"sourcesContent":["@use \"../nv-menuitem/nv-menuitem\" as nv-menuitem;\n\n@mixin root-styles() {\n display: inline-block;\n position: relative;\n\n &:has([fluid]:not([fluid=\"false\"])) {\n display: block;\n }\n}\n\n@mixin content-styles() {\n padding: var(--menu-contextual-padding-y)\n var(--menu-contextual-padding-x);\n border-radius: var(--menu-contextual-radius);\n gap: var(--menu-contextual-gap-y);\n background-color: var(--components-menu-contextual-background);\n border-color: var(--components-menu-contextual-border);\n display: flex;\n flex-direction: column;\n}\n\n@mixin separator-styles() {\n display: block;\n margin: var(--menu-contextual-divider-padding-top)\n var(--menu-contextual-divider-padding-x)\n var(--menu-contextual-divider-padding-bottom)\n var(--menu-contextual-divider-padding-x) ;\n}\n\nnv-menu {\n @include root-styles();\n\n nv-popover {\n display: unset;\n\n [data-scope=popover]{\n background-color: transparent !important;\n padding: 0 !important;\n }\n }\n\n [slot=\"content\"] {\n @include content-styles();\n }\n\n nv-menu[open]:not([open=\"false\"]) {\n > nv-menuitem {\n @include nv-menuitem.focused-styles();\n }\n }\n\n hr {\n @include separator-styles();\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Listen,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport type { Placement } from '@floating-ui/dom';\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * @slot trigger - The button element that toggles the menu popover\n * @slot content - The content of the menu, should be wrapped in a ul element containing nv-menuitem elements\n */\n@Component({\n tag: 'nv-menu',\n styleUrl: 'nv-menu.scss',\n shadow: false,\n})\nexport class NvMenu {\n @Element() el: HTMLNvMenuElement;\n private triggerElement!: HTMLElement;\n private popoverElement!: HTMLNvPopoverElement;\n private isHandlingKeyDown: boolean = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Use this to toggle the initial visibility of the menu, by default the menu\n * is hidden.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * Use this if the menu is nested inside another menu. This will prevent the\n * parent menu from closing when the child menu is opened.\n */\n @Prop({ reflect: true })\n readonly nested: boolean = false;\n\n /**\n * Use this to disable the menu from closing automatically when a menu item is\n * selected.\n */\n @Prop({ reflect: true })\n readonly disableCloseOnSelect: boolean = false;\n\n /**\n * Decides where the menu shows up next to the button it's linked to (above,\n * below, to the sides). If there isn't enough room, it will adjust its\n * position on the axis to fit on the screen, so users can always see it.\n */\n @Prop({ reflect: true })\n readonly placement: Placement = 'bottom-start';\n\n /**\n * List of items used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * items = [{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: true })\n readonly items?: {\n /**\n * The label of the menu item.\n */\n label: string;\n /**\n * The value of the menu item.\n */\n value?: string;\n /**\n * Whether the menu item is disabled.\n */\n disabled?: boolean;\n /**\n * Whether the menu item has a submenu.\n */\n hasSubmenu?: boolean;\n /**\n * The icon of the menu item.\n */\n icon?: string;\n /**\n * The shortcut of the menu item.\n */\n shortcut?: string;\n /**\n * Whether the menu item is nested.\n */\n nested?: boolean;\n /**\n * The submenu items of the menu item.\n */\n submenuItems?: InstanceType<typeof NvMenu>['items'];\n }[];\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Opens the menu.\n */\n @Method()\n async show() {\n this.open = true;\n }\n\n /**\n * Closes the menu.\n */\n @Method()\n async close() {\n this.open = false;\n }\n\n private focusFirstItem() {\n const firstButton = this.popoverElement.querySelector('nv-menuitem');\n if (firstButton) {\n requestAnimationFrame(() => firstButton.focus());\n }\n }\n\n private handleOpenChanged(event: CustomEvent<boolean>) {\n this.open = event.detail;\n const triggerHasFocus = this.triggerElement === document.activeElement;\n const triggerHasFocusVisible =\n this.triggerElement.matches(':focus-visible');\n if (triggerHasFocus && triggerHasFocusVisible) this.focusFirstItem();\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted from nv-menuitem elements with the corresponding id and name when\n * selected (via click or keyboard). This event listener can be attached to\n * either the nv-menu or the nv-menuitem element.\n */\n @Event({ bubbles: false })\n menuitemSelected: EventEmitter<\n HTMLNvMenuitemElementEventMap['menuitemSelected']\n >;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LISTENERS\n\n /* eslint-disable nova/native-event-listener */\n @Listen('menuitemSelected')\n handleMenuItemSelect(\n event: CustomEvent<HTMLNvMenuitemElementEventMap['menuitemSelected']>,\n ) {\n if (this.disableCloseOnSelect) return;\n if (event.detail.hasSubmenu) return;\n this.open = false;\n }\n /* eslint-enable nova/native-event-listener */\n\n @Listen('keydown', { passive: false })\n handleKeydown(event: KeyboardEvent) {\n // If the menu is not open, check if the trigger is focused\n // and the user presses Enter or ArrowDown, open the menu\n if (!this.open) {\n if (\n (event.key === 'Enter' ||\n event.key === 'ArrowDown' ||\n event.key === ' ') &&\n document.activeElement === this.triggerElement\n ) {\n event.preventDefault();\n this.show();\n this.focusFirstItem();\n // Then, put the focus on the first menuitem\n const firstMenuItem = this.popoverElement.querySelector('nv-menuitem');\n if (firstMenuItem) {\n requestAnimationFrame(() => (firstMenuItem as HTMLElement).focus());\n }\n }\n return;\n }\n\n if (this.isHandlingKeyDown) return;\n this.isHandlingKeyDown = true;\n\n if (\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight' ||\n event.key === 'Escape'\n ) {\n event.preventDefault();\n }\n\n if (event.key === 'Escape' && !this.nested) {\n this.close();\n this.triggerElement.focus();\n this.isHandlingKeyDown = false;\n return;\n }\n\n const menuContent = this.el.querySelector('[slot=\"content\"]');\n const menuItems = (\n Array.from(menuContent.childNodes) as Array<\n HTMLNvMenuitemElement | HTMLNvMenuElement\n >\n ).filter(item => item.matches?.('nv-menuitem, nv-menu'));\n\n let currentIndex = menuItems.indexOf(\n document.activeElement as HTMLNvMenuitemElement,\n );\n if (currentIndex === -1)\n currentIndex = menuItems.indexOf(\n document.activeElement.parentElement as HTMLNvMenuitemElement,\n );\n if (\n currentIndex === -1 &&\n menuItems.find(item => item.matches('nv-menu[open]'))\n ) {\n this.isHandlingKeyDown = false;\n return;\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n menuItems.forEach(item => {\n if (item.matches('nv-menu')) (item as HTMLNvMenuElement).close();\n });\n }\n\n if (event.key === 'ArrowDown') {\n let nextIndex = (currentIndex + 1) % menuItems.length;\n while (menuItems[nextIndex].matches('nv-menuitem[disabled]')) {\n nextIndex = (nextIndex + 1) % menuItems.length;\n }\n const nextFocusable = menuItems[nextIndex];\n if (nextFocusable.matches('nv-menuitem')) {\n nextFocusable.focus();\n } else if (nextFocusable.matches('nv-menu')) {\n nextFocusable.querySelector('nv-menuitem').focus();\n }\n }\n\n if (event.key === 'ArrowUp') {\n let prevIndex = (currentIndex - 1 + menuItems.length) % menuItems.length;\n while (menuItems[prevIndex].matches('nv-menuitem[disabled]')) {\n prevIndex = (prevIndex - 1 + menuItems.length) % menuItems.length;\n }\n const prevFocusable = menuItems[prevIndex];\n if (prevFocusable.matches('nv-menuitem')) {\n prevFocusable.focus();\n } else if (prevFocusable.matches('nv-menu')) {\n prevFocusable.querySelector('nv-menuitem').focus();\n }\n }\n\n if (event.key === 'ArrowRight') {\n const submenu = menuItems[currentIndex];\n if (!submenu.matches('nv-menu')) {\n this.isHandlingKeyDown = false;\n return;\n }\n (submenu as HTMLNvMenuElement).show();\n }\n\n if (event.key === 'ArrowLeft' && this.nested) {\n if (menuItems.find(item => item.matches('nv-menu[open]'))) {\n this.isHandlingKeyDown = false;\n return;\n }\n this.close();\n this.triggerElement.focus();\n }\n\n this.isHandlingKeyDown = false;\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === 'trigger';\n }) as HTMLElement;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n /**\n * Generates menu items from the `items` property.\n * @param {MenuItem[]} items - The items to display in the menu.\n * @returns {HTMLElement[]} The rendered items.\n */\n private renderMenuItems = () => {\n return this.items.map(item => {\n if (item.hasSubmenu && item.submenuItems?.length > 0) {\n return (\n <nv-menu nested placement=\"right-start\" items={item.submenuItems}>\n <nv-menuitem\n slot=\"trigger\"\n hasSubmenu\n disabled={item.disabled}\n icon={item.icon as IconName}\n shortcut={item.shortcut}\n id={item.value}\n name={item.label}\n label={item.label}\n onMenuitemSelected={e => this.menuitemSelected.emit(e.detail)}\n ></nv-menuitem>\n </nv-menu>\n );\n }\n return (\n <nv-menuitem\n disabled={item.disabled}\n icon={item.icon as IconName}\n shortcut={item.shortcut}\n id={item.value}\n name={item.label}\n label={item.label}\n onMenuitemSelected={e => this.menuitemSelected.emit(e.detail)}\n ></nv-menuitem>\n );\n });\n };\n\n render() {\n return (\n <Host>\n <slot name=\"trigger\"></slot>\n <nv-popover\n ref={el => (this.popoverElement = el)}\n triggerMode=\"click\"\n triggerElement={this.triggerElement}\n placement={this.placement}\n nested={this.nested}\n open={this.open}\n onOpenChanged={this.handleOpenChanged.bind(this)}\n >\n {this.items ? (\n <ul slot=\"content\">{this.renderMenuItems()}</ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </nv-popover>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,SAAS,GAAG,k2DAAk2D;;MCuBv2D,MAAM,GAAA,MAAA;AALnB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AASU,QAAA,IAAiB,CAAA,iBAAA,GAAY,KAAK;;;AAK1C;;;AAGG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAY,KAAK;AAErB;;;AAGG;AAEM,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAEhC;;;AAGG;AAEM,QAAA,IAAoB,CAAA,oBAAA,GAAY,KAAK;AAE9C;;;;AAIG;AAEM,QAAA,IAAS,CAAA,SAAA,GAAc,cAAc;;;;AAwP9C;;;;AAIG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,MAAK;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,IAAG;;AAC3B,gBAAA,IAAI,IAAI,CAAC,UAAU,IAAI,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,YAAY,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,MAAM,IAAG,CAAC,EAAE;AACpD,oBAAA,QACEA,OAAA,CAAA,SAAA,EAAA,EAAS,MAAM,EAAA,IAAA,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC9DA,OAAA,CAAA,aAAA,EAAA,EACE,IAAI,EAAC,SAAS,EACd,UAAU,EAAA,IAAA,EACV,QAA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,IAAI,CAAC,IAAI,CAAC,EAAA,EAE/C,IAAI,CAAC,KAAK,IACTA,OAAA,CAAA,IAAA,EAAA,EAAI,IAAI,EAAC,SAAS,EAAE,EAAA,IAAI,CAAC,eAAe,EAAE,CAAM,KAEhDA,OAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,SAAS,EAAA,CAAQ,CAC7B,CACU,CACR;;;;;;;;"}
1
+ {"version":3,"file":"nv-menu.entry.cjs.js","sources":["src/components/nv-menu/nv-menu.scss?tag=nv-menu","src/components/nv-menu/nv-menu.tsx"],"sourcesContent":["@use \"../nv-menuitem/nv-menuitem\" as nv-menuitem;\n\n@mixin root-styles() {\n display: inline-block;\n position: relative;\n\n &:has([fluid]:not([fluid=\"false\"])) {\n display: block;\n }\n}\n\n@mixin content-styles() {\n padding: var(--menu-contextual-padding-y)\n var(--menu-contextual-padding-x);\n border-radius: var(--menu-contextual-radius);\n gap: var(--menu-contextual-gap-y);\n background-color: var(--components-menu-contextual-background);\n border-color: var(--components-menu-contextual-border);\n display: flex;\n flex-direction: column;\n}\n\n@mixin separator-styles() {\n display: block;\n margin: var(--menu-contextual-divider-padding-top)\n var(--menu-contextual-divider-padding-x)\n var(--menu-contextual-divider-padding-bottom)\n var(--menu-contextual-divider-padding-x) ;\n}\n\nnv-menu {\n @include root-styles();\n\n nv-popover {\n display: unset;\n\n [data-scope=popover]{\n background-color: transparent !important;\n padding: 0 !important;\n }\n }\n\n [slot=\"content\"] {\n @include content-styles();\n }\n\n nv-menu[open]:not([open=\"false\"]) {\n > nv-menuitem {\n @include nv-menuitem.focused-styles();\n }\n }\n\n hr {\n @include separator-styles();\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Listen,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport type { Placement } from '@floating-ui/dom';\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * @slot trigger - The button element that toggles the menu popover\n * @slot content - The content of the menu, should be wrapped in a ul element containing nv-menuitem elements\n */\n@Component({\n tag: 'nv-menu',\n styleUrl: 'nv-menu.scss',\n shadow: false,\n})\nexport class NvMenu {\n @Element() el: HTMLNvMenuElement;\n private triggerElement!: HTMLElement;\n private popoverElement!: HTMLNvPopoverElement;\n private isHandlingKeyDown: boolean = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Use this to toggle the initial visibility of the menu, by default the menu\n * is hidden.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * Use this if the menu is nested inside another menu. This will prevent the\n * parent menu from closing when the child menu is opened.\n */\n @Prop({ reflect: true })\n readonly nested: boolean = false;\n\n /**\n * Use this to disable the menu from closing automatically when a menu item is\n * selected.\n */\n @Prop({ reflect: true })\n readonly disableCloseOnSelect: boolean = false;\n\n /**\n * Decides where the menu shows up next to the button it's linked to (above,\n * below, to the sides). If there isn't enough room, it will adjust its\n * position on the axis to fit on the screen, so users can always see it.\n */\n @Prop({ reflect: true })\n readonly placement: Placement = 'bottom-start';\n\n /**\n * List of items used to automatically generate dropdown items. This\n * provides an alternative to using the slot manually.\n *\n * @example\n * items = [{\n * \"label\": \"Option 1\",\n * \"value\": \"option1\",\n * },\n * {\n * \"label\": \"Option 2\",\n * \"value\": \"option2\",\n * }]\n */\n @Prop({ reflect: true })\n readonly items?: {\n /**\n * The label of the menu item.\n */\n label: string;\n /**\n * The value of the menu item.\n */\n value?: string;\n /**\n * Whether the menu item is disabled.\n */\n disabled?: boolean;\n /**\n * Whether the menu item has a submenu.\n */\n hasSubmenu?: boolean;\n /**\n * The icon of the menu item.\n */\n icon?: string;\n /**\n * The shortcut of the menu item.\n */\n shortcut?: string;\n /**\n * Whether the menu item is nested.\n */\n nested?: boolean;\n /**\n * The submenu items of the menu item.\n */\n submenuItems?: InstanceType<typeof NvMenu>['items'];\n }[];\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Opens the menu.\n */\n @Method()\n async show() {\n this.open = true;\n }\n\n /**\n * Closes the menu.\n */\n @Method()\n async close() {\n this.open = false;\n }\n\n private focusFirstItem() {\n const firstButton = this.popoverElement.querySelector('nv-menuitem');\n if (firstButton) {\n requestAnimationFrame(() => firstButton.focus());\n }\n }\n\n private handleOpenChanged(event: CustomEvent<boolean>) {\n this.open = event.detail;\n const triggerHasFocus = this.triggerElement === document.activeElement;\n const triggerHasFocusVisible =\n this.triggerElement.matches(':focus-visible');\n if (triggerHasFocus && triggerHasFocusVisible) this.focusFirstItem();\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted from nv-menuitem elements with the corresponding id and name when\n * selected (via click or keyboard). This event listener can be attached to\n * either the nv-menu or the nv-menuitem element.\n */\n @Event({ bubbles: false })\n menuitemSelected: EventEmitter<\n HTMLNvMenuitemElementEventMap['menuitemSelected']\n >;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LISTENERS\n\n /* eslint-disable nova/native-event-listener */\n @Listen('menuitemSelected')\n handleMenuItemSelect(\n event: CustomEvent<HTMLNvMenuitemElementEventMap['menuitemSelected']>,\n ) {\n if (this.disableCloseOnSelect) return;\n if (event.detail.hasSubmenu) return;\n this.open = false;\n }\n /* eslint-enable nova/native-event-listener */\n\n @Listen('keydown', { passive: false })\n handleKeydown(event: KeyboardEvent) {\n // If the menu is not open, check if the trigger is focused\n // and the user presses Enter or ArrowDown, open the menu\n if (!this.open) {\n if (\n (event.key === 'Enter' ||\n event.key === 'ArrowDown' ||\n event.key === ' ') &&\n document.activeElement === this.triggerElement\n ) {\n event.preventDefault();\n this.show();\n this.focusFirstItem();\n // Then, put the focus on the first menuitem\n const firstMenuItem = this.popoverElement.querySelector('nv-menuitem');\n if (firstMenuItem) {\n requestAnimationFrame(() => (firstMenuItem as HTMLElement).focus());\n }\n }\n return;\n }\n\n if (this.isHandlingKeyDown) return;\n this.isHandlingKeyDown = true;\n\n if (\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight' ||\n event.key === 'Escape'\n ) {\n event.preventDefault();\n }\n\n if (event.key === 'Escape' && !this.nested) {\n this.close();\n this.triggerElement.focus();\n this.isHandlingKeyDown = false;\n return;\n }\n\n const menuContent = this.el.querySelector('[slot=\"content\"]');\n const menuItems = (\n Array.from(menuContent.childNodes) as Array<\n HTMLNvMenuitemElement | HTMLNvMenuElement\n >\n ).filter(item => item.matches?.('nv-menuitem, nv-menu'));\n\n let currentIndex = menuItems.indexOf(\n document.activeElement as HTMLNvMenuitemElement,\n );\n if (currentIndex === -1)\n currentIndex = menuItems.indexOf(\n document.activeElement.parentElement as HTMLNvMenuitemElement,\n );\n if (\n currentIndex === -1 &&\n menuItems.find(item => item.matches('nv-menu[open]'))\n ) {\n this.isHandlingKeyDown = false;\n return;\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n menuItems.forEach(item => {\n if (item.matches('nv-menu')) (item as HTMLNvMenuElement).close();\n });\n }\n\n if (event.key === 'ArrowDown') {\n let nextIndex = (currentIndex + 1) % menuItems.length;\n while (menuItems[nextIndex].matches('nv-menuitem[disabled]')) {\n nextIndex = (nextIndex + 1) % menuItems.length;\n }\n const nextFocusable = menuItems[nextIndex];\n if (nextFocusable.matches('nv-menuitem')) {\n nextFocusable.focus();\n } else if (nextFocusable.matches('nv-menu')) {\n nextFocusable.querySelector('nv-menuitem').focus();\n }\n }\n\n if (event.key === 'ArrowUp') {\n let prevIndex = (currentIndex - 1 + menuItems.length) % menuItems.length;\n while (menuItems[prevIndex].matches('nv-menuitem[disabled]')) {\n prevIndex = (prevIndex - 1 + menuItems.length) % menuItems.length;\n }\n const prevFocusable = menuItems[prevIndex];\n if (prevFocusable.matches('nv-menuitem')) {\n prevFocusable.focus();\n } else if (prevFocusable.matches('nv-menu')) {\n prevFocusable.querySelector('nv-menuitem').focus();\n }\n }\n\n if (event.key === 'ArrowRight') {\n const submenu = menuItems[currentIndex];\n if (!submenu.matches('nv-menu')) {\n this.isHandlingKeyDown = false;\n return;\n }\n (submenu as HTMLNvMenuElement).show();\n }\n\n if (event.key === 'ArrowLeft' && this.nested) {\n if (menuItems.find(item => item.matches('nv-menu[open]'))) {\n this.isHandlingKeyDown = false;\n return;\n }\n this.close();\n this.triggerElement.focus();\n }\n\n this.isHandlingKeyDown = false;\n }\n\n //#endregion LISTENERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === 'trigger';\n }) as HTMLElement;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n /**\n * Generates menu items from the `items` property.\n * @param {MenuItem[]} items - The items to display in the menu.\n * @returns {HTMLElement[]} The rendered items.\n */\n private renderMenuItems = () => {\n return this.items.map(item => {\n if (item.hasSubmenu && item.submenuItems?.length > 0) {\n return (\n <nv-menu nested placement=\"right-start\" items={item.submenuItems}>\n <nv-menuitem\n slot=\"trigger\"\n hasSubmenu\n disabled={item.disabled}\n icon={item.icon as IconName}\n shortcut={item.shortcut}\n id={item.value}\n name={item.label}\n label={item.label}\n onMenuitemSelected={e => this.menuitemSelected.emit(e.detail)}\n ></nv-menuitem>\n </nv-menu>\n );\n }\n return (\n <nv-menuitem\n disabled={item.disabled}\n icon={item.icon as IconName}\n shortcut={item.shortcut}\n id={item.value}\n name={item.label}\n label={item.label}\n onMenuitemSelected={e => this.menuitemSelected.emit(e.detail)}\n ></nv-menuitem>\n );\n });\n };\n\n render() {\n return (\n <Host>\n <slot name=\"trigger\"></slot>\n <nv-popover\n ref={el => (this.popoverElement = el)}\n triggerMode=\"click\"\n triggerElement={this.triggerElement}\n placement={this.placement}\n nested={this.nested}\n open={this.open}\n onOpenChanged={this.handleOpenChanged.bind(this)}\n >\n {this.items ? (\n <ul slot=\"content\">{this.renderMenuItems()}</ul>\n ) : (\n <slot name=\"content\"></slot>\n )}\n </nv-popover>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"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G,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,IAAG;YAC9D,OAAO,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,SAAS;AACjD,SAAC,CAAgB;;IA6CnB,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAQ,CAAA,EAC5BA,OAAA,CAAA,YAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,WAAW,EAAC,OAAO,EACnB,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,EAE/C,IAAI,CAAC,KAAK,IACTA,OAAA,CAAA,IAAA,EAAA,EAAI,IAAI,EAAC,SAAS,EAAE,EAAA,IAAI,CAAC,eAAe,EAAE,CAAM,KAEhDA,OAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,SAAS,EAAA,CAAQ,CAC7B,CACU,CACR;;;;;;;;"}
@@ -48,7 +48,7 @@ const NvMenuitem = class {
48
48
  /****************************************************************************/
49
49
  //#region RENDER
50
50
  render() {
51
- return (index.h(index.Host, { key: '3c9a394f8af5ab7b57061ddfdd3e07b9fce17847', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: '3f36901afb278a608f8eaeb423e8aca08c055187', name: this.icon }), index.h("slot", { key: 'a54ca41926c4f9374af669125529befc6ab454e2' }), this.label && index.h("span", { key: 'c83199ffd4e5559b22d06392edf5ad6c8e83cf96', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: 'c7a052d69c1d8cd33238f9f88405596a46649e3c' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: '57de548ca08d6fb045223f242dee568a29b6270f', name: "chevron-right" })));
51
+ return (index.h(index.Host, { key: 'e21f532b90f018810befe6a03ef4cb75fe05aea2', role: "menuitem", tabindex: this.disabled ? '-1' : '0' }, this.icon && index.h("nv-icon", { key: 'a63bdcae06b1311440ec95ecf002a8b9a130aea8', name: this.icon }), index.h("slot", { key: 'f25c0104369b8d70ce35d4bf74cf92c1bcdf66c6' }), this.label && index.h("span", { key: '5ab5691b53857876c8e13e91f975b41e255999da', "data-scope": "text" }, this.label), this.shortcut && !this.hasSubmenu && index.h("kbd", { key: 'c93777342da74e2cba4dfbbdf6657814b3996f41' }, this.shortcut), this.hasSubmenu && index.h("nv-icon", { key: '87a58745651c54efb1c96841846363e377ee6fca', name: "chevron-right" })));
52
52
  }
53
53
  get el() { return index.getElement(this); }
54
54
  };
@@ -51,8 +51,7 @@ const NvNotificationBullet = class {
51
51
  }
52
52
  //#region RENDER
53
53
  render() {
54
- var _a;
55
- const displayCount = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
54
+ const displayCount = this.count ?? 0;
56
55
  const displayText = displayCount > 99 ? '99+' : String(displayCount);
57
56
  if (displayCount <= 0) {
58
57
  return index.h(index.Host, { style: { display: 'none' } });
@@ -1 +1 @@
1
- {"version":3,"file":"nv-notification-bullet.entry.cjs.js","sources":["src/components/nv-notification-bullet/styles/nv-notification-bullet.scss?tag=nv-notification-bullet","src/components/nv-notification-bullet/nv-notification-bullet.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\nnv-notification-bullet {\n @include bullet-base-styles();\n position: relative; // Needed for cross-border pseudo-element positioning\n\n\n /* Intention: brand */\n &.nv-notification-bullet-brand {\n .nv-notification-bullet {\n @include bullet-inner-styles();\n &.nv-notification-bullet-high {\n @include bullet-brand-high();\n }\n &.nv-notification-bullet-low {\n @include bullet-brand-low();\n }\n }\n }\n\n /* Intention: neutral */\n &.nv-notification-bullet-neutral {\n @include bullet-inner-styles();\n .nv-notification-bullet {\n &.nv-notification-bullet-high {\n @include bullet-neutral-high();\n }\n &.nv-notification-bullet-low {\n @include bullet-neutral-low();\n }\n }\n }\n\n /* Contrasting border (cross-border backdrop) - creates a larger circle behind the bullet */\n /* The cross-border intelligently inherits the background color from the parent (nv-sidebarnavitem-trigger) */\n &.nv-notification-bullet-with-cross-border::before {\n content: '';\n position: absolute;\n top: 55%;\n left: 45%;\n transform: translate(-50%, -50%);\n width: calc(var(--sidebar-notification-bullet-size) + 1.5px);\n height: calc(var(--sidebar-notification-bullet-size) * 1.5);\n border-radius: var(--radius-rounded-full);\n /* Intelligently inherits background color from parent via CSS variable */\n /* Supports multiple parent types: --nv-component-background (generic) or --nv-sidebarnavitem-background (sidebar specific) */\n background-color: var(--nv-component-background, var(--nv-sidebarnavitem-background, var(--color-interaction-container-neutral-background)));\n z-index: -1;\n pointer-events: none;\n }\n \n /* Cross-border for reduced size (when sidebar is collapsed) */\n nv-sidebar[collapsed] &.nv-notification-bullet-with-cross-border::before {\n width: calc(var(--sidebar-notification-bullet-size-reduced) * 1.5);\n height: calc(var(--sidebar-notification-bullet-size-reduced) * 1.5);\n }\n \n /* Size: reduced */\n .nv-notification-bullet.nv-notification-bullet-reduced,\n /* When inside a collapsed sidebar, use reduced size automatically */\n nv-sidebar[collapsed] & .nv-notification-bullet {\n @include bullet-styles-reduced();\n }\n}\n\n","import { Component, Host, Prop, Element, h } from '@stencil/core';\n\n/**\n * Notification bullet component for displaying notification counts in the sidebar.\n * Automatically adapts its size when the sidebar is collapsed.\n * Inherits intention and emphasis from parent nv-sidebar if not explicitly set.\n */\n@Component({\n tag: 'nv-notification-bullet',\n styleUrl: 'styles/nv-notification-bullet.scss',\n shadow: false,\n})\nexport class NvNotificationBullet {\n @Element() el: HTMLNvNotificationBulletElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n /**\n * The number of notifications to display.\n * If 0 or not provided, the component will not be visible.\n */\n @Prop({ reflect: true })\n readonly count?: number;\n\n /**\n * Determines the type of the notification.\n * - neutral: Uses neutral colors (gray)\n * - brand: Uses brand colors (orange/teal depending on theme)\n * If not set, inherits from parent nv-sidebar's notificationIntention prop.\n * @deprecated Use notificationIntention prop on nv-sidebar instead. This prop is kept for backward compatibility but will be removed in a future version.\n */\n @Prop({ reflect: true })\n readonly intention?: 'neutral' | 'brand';\n\n /**\n * Determines the emphasis and importance of the notification.\n * - high: More prominent appearance\n * - low: Less prominent appearance\n * If not set, inherits from parent nv-sidebar's notificationEmphasis prop.\n * @deprecated Use notificationEmphasis prop on nv-sidebar instead. This prop is kept for backward compatibility but will be removed in a future version.\n */\n @Prop({ reflect: true })\n readonly emphasis?: 'high' | 'low';\n\n /**\n * Determines the size of the notification bullet.\n * - default: Normal size with text visible\n * - reduced: Smaller size, text hidden (just a dot)\n */\n @Prop({ reflect: true })\n readonly size: 'default' | 'reduced' = 'default';\n\n /**\n * Allows to add a border to add contrast on background.\n */\n @Prop({ reflect: true })\n readonly contrastingBorder: boolean = false;\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n private getIntention(): 'neutral' | 'brand' {\n if (this.intention) {\n return this.intention;\n }\n // Inherit from parent nv-sidebar\n const sidebar = this.el.closest('nv-sidebar');\n if (sidebar) {\n const sidebarIntention = sidebar.getAttribute('notification-intention');\n if (sidebarIntention === 'neutral' || sidebarIntention === 'brand') {\n return sidebarIntention;\n }\n }\n return 'brand'; // Default fallback\n }\n\n private getEmphasis(): 'high' | 'low' {\n if (this.emphasis) {\n return this.emphasis;\n }\n // Inherit from parent nv-sidebar\n const sidebar = this.el.closest('nv-sidebar');\n if (sidebar) {\n const sidebarEmphasis = sidebar.getAttribute('notification-emphasis');\n if (sidebarEmphasis === 'high' || sidebarEmphasis === 'low') {\n return sidebarEmphasis;\n }\n }\n return 'high'; // Default fallback\n }\n //#region RENDER\n render() {\n const displayCount = this.count ?? 0;\n const displayText = displayCount > 99 ? '99+' : String(displayCount);\n\n if (displayCount <= 0) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n\n const sizeClass =\n this.size === 'reduced' ? 'nv-notification-bullet-reduced' : '';\n const intention = this.getIntention();\n const emphasis = this.getEmphasis();\n const intentionClass = `nv-notification-bullet-${intention}`;\n const emphasisClass = `nv-notification-bullet-${emphasis}`;\n const borderClass = this.contrastingBorder\n ? 'nv-notification-bullet-with-border'\n : '';\n\n return (\n <Host\n class={`${intentionClass} ${\n borderClass ? 'nv-notification-bullet-with-cross-border' : ''\n }`}\n >\n <span\n class={`nv-notification-bullet ${emphasisClass} ${sizeClass} ${borderClass}`}\n aria-label={`${displayCount} notifications`}\n >\n {displayText}\n </span>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,uBAAuB,GAAG,8kHAA8kH;;MCYjmH,oBAAoB,GAAA,MAAA;AALjC,IAAA,WAAA,CAAA,OAAA,EAAA;;AAqCE;;;;AAIG;AAEM,QAAA,IAAI,CAAA,IAAA,GAA0B,SAAS;AAEhD;;AAEG;AAEM,QAAA,IAAiB,CAAA,iBAAA,GAAY,KAAK;AAoE5C;;;;IAhES,YAAY,GAAA;AAClB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,IAAI,CAAC,SAAS;;;QAGvB,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;QAC7C,IAAI,OAAO,EAAE;YACX,MAAM,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC;YACvE,IAAI,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,KAAK,OAAO,EAAE;AAClE,gBAAA,OAAO,gBAAgB;;;QAG3B,OAAO,OAAO,CAAC;;IAGT,WAAW,GAAA;AACjB,QAAA,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,CAAA,EAAA,EAEFD,OAAA,CAAA,MAAA,EAAA,EACE,KAAK,EAAE,0BAA0B,aAAa,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA,EAAI,WAAW,CAAA,CAAE,EAChE,YAAA,EAAA,CAAG,EAAA,YAAY,CAAgB,cAAA,CAAA,EAAA,EAE1C,WAAW,CACP,CACF;;;;;;;;"}
1
+ {"version":3,"file":"nv-notification-bullet.entry.cjs.js","sources":["src/components/nv-notification-bullet/styles/nv-notification-bullet.scss?tag=nv-notification-bullet","src/components/nv-notification-bullet/nv-notification-bullet.tsx"],"sourcesContent":["@use \"./mixins\" as *;\n\nnv-notification-bullet {\n @include bullet-base-styles();\n position: relative; // Needed for cross-border pseudo-element positioning\n\n\n /* Intention: brand */\n &.nv-notification-bullet-brand {\n .nv-notification-bullet {\n @include bullet-inner-styles();\n &.nv-notification-bullet-high {\n @include bullet-brand-high();\n }\n &.nv-notification-bullet-low {\n @include bullet-brand-low();\n }\n }\n }\n\n /* Intention: neutral */\n &.nv-notification-bullet-neutral {\n @include bullet-inner-styles();\n .nv-notification-bullet {\n &.nv-notification-bullet-high {\n @include bullet-neutral-high();\n }\n &.nv-notification-bullet-low {\n @include bullet-neutral-low();\n }\n }\n }\n\n /* Contrasting border (cross-border backdrop) - creates a larger circle behind the bullet */\n /* The cross-border intelligently inherits the background color from the parent (nv-sidebarnavitem-trigger) */\n &.nv-notification-bullet-with-cross-border::before {\n content: '';\n position: absolute;\n top: 55%;\n left: 45%;\n transform: translate(-50%, -50%);\n width: calc(var(--sidebar-notification-bullet-size) + 1.5px);\n height: calc(var(--sidebar-notification-bullet-size) * 1.5);\n border-radius: var(--radius-rounded-full);\n /* Intelligently inherits background color from parent via CSS variable */\n /* Supports multiple parent types: --nv-component-background (generic) or --nv-sidebarnavitem-background (sidebar specific) */\n background-color: var(--nv-component-background, var(--nv-sidebarnavitem-background, var(--color-interaction-container-neutral-background)));\n z-index: -1;\n pointer-events: none;\n }\n \n /* Cross-border for reduced size (when sidebar is collapsed) */\n nv-sidebar[collapsed] &.nv-notification-bullet-with-cross-border::before {\n width: calc(var(--sidebar-notification-bullet-size-reduced) * 1.5);\n height: calc(var(--sidebar-notification-bullet-size-reduced) * 1.5);\n }\n \n /* Size: reduced */\n .nv-notification-bullet.nv-notification-bullet-reduced,\n /* When inside a collapsed sidebar, use reduced size automatically */\n nv-sidebar[collapsed] & .nv-notification-bullet {\n @include bullet-styles-reduced();\n }\n}\n\n","import { Component, Host, Prop, Element, h } from '@stencil/core';\n\n/**\n * Notification bullet component for displaying notification counts in the sidebar.\n * Automatically adapts its size when the sidebar is collapsed.\n * Inherits intention and emphasis from parent nv-sidebar if not explicitly set.\n */\n@Component({\n tag: 'nv-notification-bullet',\n styleUrl: 'styles/nv-notification-bullet.scss',\n shadow: false,\n})\nexport class NvNotificationBullet {\n @Element() el: HTMLNvNotificationBulletElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n /**\n * The number of notifications to display.\n * If 0 or not provided, the component will not be visible.\n */\n @Prop({ reflect: true })\n readonly count?: number;\n\n /**\n * Determines the type of the notification.\n * - neutral: Uses neutral colors (gray)\n * - brand: Uses brand colors (orange/teal depending on theme)\n * If not set, inherits from parent nv-sidebar's notificationIntention prop.\n * @deprecated Use notificationIntention prop on nv-sidebar instead. This prop is kept for backward compatibility but will be removed in a future version.\n */\n @Prop({ reflect: true })\n readonly intention?: 'neutral' | 'brand';\n\n /**\n * Determines the emphasis and importance of the notification.\n * - high: More prominent appearance\n * - low: Less prominent appearance\n * If not set, inherits from parent nv-sidebar's notificationEmphasis prop.\n * @deprecated Use notificationEmphasis prop on nv-sidebar instead. This prop is kept for backward compatibility but will be removed in a future version.\n */\n @Prop({ reflect: true })\n readonly emphasis?: 'high' | 'low';\n\n /**\n * Determines the size of the notification bullet.\n * - default: Normal size with text visible\n * - reduced: Smaller size, text hidden (just a dot)\n */\n @Prop({ reflect: true })\n readonly size: 'default' | 'reduced' = 'default';\n\n /**\n * Allows to add a border to add contrast on background.\n */\n @Prop({ reflect: true })\n readonly contrastingBorder: boolean = false;\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n private getIntention(): 'neutral' | 'brand' {\n if (this.intention) {\n return this.intention;\n }\n // Inherit from parent nv-sidebar\n const sidebar = this.el.closest('nv-sidebar');\n if (sidebar) {\n const sidebarIntention = sidebar.getAttribute('notification-intention');\n if (sidebarIntention === 'neutral' || sidebarIntention === 'brand') {\n return sidebarIntention;\n }\n }\n return 'brand'; // Default fallback\n }\n\n private getEmphasis(): 'high' | 'low' {\n if (this.emphasis) {\n return this.emphasis;\n }\n // Inherit from parent nv-sidebar\n const sidebar = this.el.closest('nv-sidebar');\n if (sidebar) {\n const sidebarEmphasis = sidebar.getAttribute('notification-emphasis');\n if (sidebarEmphasis === 'high' || sidebarEmphasis === 'low') {\n return sidebarEmphasis;\n }\n }\n return 'high'; // Default fallback\n }\n //#region RENDER\n render() {\n const displayCount = this.count ?? 0;\n const displayText = displayCount > 99 ? '99+' : String(displayCount);\n\n if (displayCount <= 0) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n\n const sizeClass =\n this.size === 'reduced' ? 'nv-notification-bullet-reduced' : '';\n const intention = this.getIntention();\n const emphasis = this.getEmphasis();\n const intentionClass = `nv-notification-bullet-${intention}`;\n const emphasisClass = `nv-notification-bullet-${emphasis}`;\n const borderClass = this.contrastingBorder\n ? 'nv-notification-bullet-with-border'\n : '';\n\n return (\n <Host\n class={`${intentionClass} ${\n borderClass ? 'nv-notification-bullet-with-cross-border' : ''\n }`}\n >\n <span\n class={`nv-notification-bullet ${emphasisClass} ${sizeClass} ${borderClass}`}\n aria-label={`${displayCount} notifications`}\n >\n {displayText}\n </span>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,uBAAuB,GAAG,8kHAA8kH;;MCYjmH,oBAAoB,GAAA,MAAA;AALjC,IAAA,WAAA,CAAA,OAAA,EAAA;;AAqCE;;;;AAI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AAK,SAAS,GAAG,gCAAgC,GAAG,EAAE;AACjE,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE;AACrC,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE;AACnC,QAAA,MAAM,cAAc,GAAG,CAA0B,uBAAA,EAAA,SAAS,EAAE;AAC5D,QAAA,MAAM,aAAa,GAAG,CAA0B,uBAAA,EAAA,QAAQ,EAAE;AAC1D,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC;AACvB,cAAE;cACA,EAAE;QAEN,QACED,OAAC,CAAAC,UAAI,IACH,KAAK,EAAE,CAAA,EAAG,cAAc,CAAA,CAAA,EACtB,WAAW,GAAG,0CAA0C,GAAG,EAC7D,CAAE,CAAA,EAAA,EAEFD,OAAA,CAAA,MAAA,EAAA,EACE,KAAK,EAAE,0BAA0B,aAAa,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA,EAAI,WAAW,CAAA,CAAE,EAChE,YAAA,EAAA,CAAG,EAAA,YAAY,CAAgB,cAAA,CAAA,EAAA,EAE1C,WAAW,CACP,CACF;;;;;;;;"}
@@ -84,12 +84,10 @@ const NvNotification = class {
84
84
  await this.showAnimation();
85
85
  }
86
86
  getDefaultIcon() {
87
- var _a;
88
- return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
87
+ return this.iconByFeedback[this.feedback] ?? 'info-circle';
89
88
  }
90
89
  getAriaRole() {
91
- var _a;
92
- return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
90
+ return this.roleByFeedback[this.feedback] ?? 'status';
93
91
  }
94
92
  getAriaLive() {
95
93
  return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
@@ -132,9 +130,9 @@ const NvNotification = class {
132
130
  }
133
131
  }
134
132
  async dismissAnimation() {
135
- var _a;
136
- const position = (_a = this.el
137
- .closest('nv-notificationcontainer')) === null || _a === void 0 ? void 0 : _a.getAttribute('position');
133
+ const position = this.el
134
+ .closest('nv-notificationcontainer')
135
+ ?.getAttribute('position');
138
136
  const destination = this.getSlideDestination(position);
139
137
  const { fadeOut } = fade_animation.useFade(this.container, { duration: 300 });
140
138
  const { slideX, slideY, setSlideReset } = slide_animation.useSlide(this.container, {
@@ -166,8 +164,7 @@ const NvNotification = class {
166
164
  /****************************************************************************/
167
165
  //#region RENDER
168
166
  render() {
169
- var _a, _b, _c;
170
- return (index.h(index.Host, { key: 'cf0f39e0565a264b676e0ca569ec79169771d269', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": (_a = this.getHeadingId()) !== null && _a !== void 0 ? _a : null, "aria-describedby": (_b = this.getMessageId()) !== null && _b !== void 0 ? _b : null, tabindex: "-1" }, index.h("div", { key: 'ed2a5e50f0a6975c652f658e62a271c0b476f7d2', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '9eccf1b9f29f581bf77255b9e2bebebfdc233302', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: '73890097ad80af4d86646bb83f2ae99878164db4', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'c852478c25ae05d5219453234db95a420b5c5a1e', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: 'b06042bf55e8bedc07a60f23a27b07160776c0e0', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: '7666dfb18169cdfea8eb8c603b20a5ba7075824c', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: 'f6e651737cf630bb89d40b7664329596355a8ea0', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: 'ae5d89db2b36c4c81c7b46aada5f50bd6eb4aa90', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '24d01abd694f7f9a316345f9d88716d1c0a47234', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: 'a1aa0bcc33a42d7b36bcd364a155d41f527cc96a', "data-scope": "actions" }, index.h("slot", { key: 'b09c21bed0fd559bf2f694f861385444c2ddbbf0', name: "actions" })))))));
167
+ return (index.h(index.Host, { key: '64c79843ff7bdd1a4ae001a60a8db540947b8412', role: this.getAriaRole(), "aria-live": this.getAriaLive(), "aria-atomic": true, "aria-labelledby": this.getHeadingId() ?? null, "aria-describedby": this.getMessageId() ?? null, tabindex: "-1" }, index.h("div", { key: 'b51c9c3829b122476564726e20a1da112059035b', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '3ee952fb7dc41f54fa35c88d12d4d512b96eece1', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: '4fa53d42ff6ea7b5e90a01cfcffec167368aece6', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'e116c962672fb2237382b7dc2d3c6feae62bfced', name: this.icon ?? this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: '62a1da7ac952aa704965aca61ba6f98eb12341a2', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: '4ddc91bc5568f54c6f8f3114720c0821c103f1c3', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: 'b7b7c678c995d68be52ca6711e55e5a8fa43fe68', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: '5e02782e07e7e2720cef3ec8c7f06321ce53940d', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '4886e5e490c5f1baf429c48666fd715f43113a71', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: '1d75b6276a8622bc607cf296336abc734e02320a', "data-scope": "actions" }, index.h("slot", { key: '6cab1b879e9b0582a415edd5d096a2b794b82ea4', name: "actions" })))))));
171
168
  }
172
169
  get el() { return index.getElement(this); }
173
170
  };
@@ -1 +1 @@
1
- {"version":3,"file":"nv-notification.entry.cjs.js","sources":["src/components/nv-notification/styles/nv-notification.scss?tag=nv-notification","src/components/nv-notification/nv-notification.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"./mixins\" as *;\n@use \"../../../styles/focus-ring\" as focus;\n\nnv-notification {\n @include root-styles();\n\n [data-scope=\"container\"] {\n @include container-styles();\n\n [data-scope=\"icon\"] {\n @include icon-styles();\n }\n\n [data-scope=\"dismiss\"] {\n @include dismiss-btn-styles();\n }\n\n [data-scope=\"content\"] {\n @include content-styles();\n\n [data-scope=\"heading\"] {\n @include header-styles();\n }\n\n [data-scope=\"message\"] {\n @include message-styles();\n }\n\n [data-scope=\"actions\"] {\n @include actions-styles();\n }\n }\n }\n\n @each $feedback in $feedback-variants {\n &[feedback=\"#{$feedback}\"] {\n [data-scope=\"container\"] {\n @include feedback-color($feedback);\n\n [data-scope=\"icon\"] {\n @include icon-color($feedback);\n }\n }\n\n & > [data-scope=\"close\"] {\n @include focus.focus-ring(map.get($border-color-map, $feedback));\n }\n }\n }\n\n @each $emphasis in $emphasis-variants {\n &[emphasis=\"#{$emphasis}\"] {\n [data-scope=\"container\"] {\n @include emphasis-styles($emphasis);\n }\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Method,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n FeedbackColors,\n NotificationEmphasis,\n NotificationPosition,\n} from '../../utils/constants';\nimport { type IconName } from '../nv-icon/nv-icons';\nimport { useCollapse, useFade, useSlide, parallel } from '../../animations';\n\ntype AriaRole = 'status' | 'alert';\ntype AriaLive = 'polite' | 'assertive';\n\n/**\n * @slot heading - Use this slot to insert HTML as the notification title.\n * @slot content - Use this slot to insert HTML as the notification message.\n * @slot actions - Use this slot for custom actions.\n */\n@Component({\n tag: 'nv-notification',\n styleUrl: 'styles/nv-notification.scss',\n shadow: false,\n})\nexport class NvNotification {\n @Element() el: HTMLNvNotificationElement;\n private container: HTMLElement;\n private headingSlot: HTMLElement;\n private messageSlot: HTMLElement;\n private actionsSlot: HTMLElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Set a unique ID for the notification. Used for aria attributes and managing\n * multiple notifications.\n */\n @Prop({ reflect: true })\n readonly uid: string = uuidv4();\n\n /**\n * Specifies the notification type which determines the color and default icon.\n */\n @Prop({ reflect: true })\n readonly feedback: `${FeedbackColors}` = 'information';\n\n /**\n * Adjusts the emphasis to make the notification more or less visually\n * prominent to users. Use this to draw attention to important actions or\n * reduce focus on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${NotificationEmphasis}` = 'medium';\n\n /**\n * Short and concise text for the notification title.\n */\n @Prop({ reflect: true })\n readonly heading: string;\n\n /**\n * Main content for the notification. For more complex content, use the\n * content slot instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Icon associated with the notification, defaults vary based on the feedback\n * type.\n */\n @Prop({ reflect: true })\n readonly icon: string;\n\n /**\n * Allows the notification to be dismissed via a close button (x). The\n * notification is not dismissible unless explicitly enabled.\n */\n @Prop({ reflect: true })\n readonly dismissible: boolean = false;\n\n /**\n * Controls the visibility of the notification.\n */\n @Prop({ reflect: true, mutable: true })\n hidden: boolean = false; // eslint-disable-line @stencil-community/reserved-member-names\n\n /**\n * When true, the notification will be hidden initially, but internal changes\n * will not be in a controlled state. Good for animating the notification in.\n */\n @Prop({ reflect: true })\n readonly initiallyHidden: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Dismisses the notification with an animation, after the animation is\n * complete, the hiddenChanged event will be emitted with the value of true,\n * and the hidden prop will be set to true.\n */\n @Method()\n async dismiss() {\n await this.dismissAnimation();\n }\n\n /**\n * Sets the hidden prop to false, and shows the notification with an\n * animation, after the animation is complete, the hiddenChanged event will be\n * emitted with the value of false.\n */\n @Method()\n async show() {\n await this.showAnimation();\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the 'hidden' prop changes, reflecting a change in visibility.\n * Passes hidden value to the detail.\n * @bind hidden\n */\n @Event({ bubbles: false })\n hiddenChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region INTERNAL\n\n private iconByFeedback: Record<FeedbackColors, IconName> = {\n [FeedbackColors.Warning]: 'alert-circle',\n [FeedbackColors.Information]: 'info-circle',\n [FeedbackColors.Success]: 'circle-check',\n [FeedbackColors.Error]: 'alert-triangle',\n [FeedbackColors.Neutral]: 'help',\n };\n\n private roleByFeedback: Record<FeedbackColors, AriaRole> = {\n [FeedbackColors.Error]: 'alert',\n [FeedbackColors.Warning]: 'alert',\n [FeedbackColors.Information]: 'status',\n [FeedbackColors.Success]: 'status',\n [FeedbackColors.Neutral]: 'status',\n };\n\n private getDefaultIcon(): IconName {\n return this.iconByFeedback[this.feedback] ?? 'info-circle';\n }\n\n private getAriaRole(): AriaRole {\n return this.roleByFeedback[this.feedback] ?? 'status';\n }\n\n private getAriaLive(): AriaLive {\n return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';\n }\n\n private getHeadingId(): string | null {\n return this.heading ? `nv-notification-${this.uid}-heading` : null;\n }\n\n private getMessageId(): string | null {\n return this.message ? `nv-notification-${this.uid}-message` : null;\n }\n\n private async showAnimation() {\n this.hidden = false;\n\n const { setFadeIn } = useFade(this.container);\n const { expand } = useCollapse(this.el, {\n duration: 300,\n overflow: 'visible',\n });\n const { slideY, setSlideY } = useSlide(this.container, {\n duration: 300,\n });\n\n setSlideY(-100);\n setFadeIn();\n await parallel(slideY({ from: -100, to: 0 }), expand).start();\n\n this.hiddenChanged.emit(false);\n }\n\n private getSlideDestination(pos?: NotificationPosition): {\n /** The axis to slide. */\n axis: 'x' | 'y';\n /** The destination value. */\n to: number;\n } {\n switch (pos) {\n case NotificationPosition.TopRight:\n case NotificationPosition.BottomRight:\n return { axis: 'x', to: 100 }; // right\n case NotificationPosition.TopLeft:\n case NotificationPosition.BottomLeft:\n return { axis: 'x', to: -100 }; // left\n case NotificationPosition.TopCenter:\n return { axis: 'y', to: -100 }; // up\n case NotificationPosition.BottomCenter:\n return { axis: 'y', to: 100 }; // down\n default:\n return { axis: 'x', to: 100 }; // fallback\n }\n }\n\n private async dismissAnimation() {\n const position = this.el\n .closest('nv-notificationcontainer')\n ?.getAttribute('position') as NotificationPosition | undefined;\n\n const destination = this.getSlideDestination(position);\n\n const { fadeOut } = useFade(this.container, { duration: 300 });\n const { slideX, slideY, setSlideReset } = useSlide(this.container, {\n duration: 500,\n });\n const { collapse } = useCollapse(this.el, {\n duration: 500,\n overflow: 'visible',\n });\n const slide =\n destination.axis === 'x'\n ? slideX({ from: 0, to: destination.to })\n : slideY({ from: 0, to: destination.to });\n\n setSlideReset();\n await parallel(fadeOut, slide, collapse).start();\n\n this.hidden = true;\n this.hiddenChanged.emit(true);\n }\n\n //#endregion INTERNAL\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.headingSlot = this.el.querySelector('[slot=\"heading\"]');\n this.messageSlot = this.el.querySelector('[slot=\"content\"]');\n this.actionsSlot = this.el.querySelector('[slot=\"actions\"]');\n\n if (this.initiallyHidden) this.hidden = true;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role={this.getAriaRole()}\n aria-live={this.getAriaLive()}\n aria-atomic\n aria-labelledby={this.getHeadingId() ?? null}\n aria-describedby={this.getMessageId() ?? null}\n tabindex=\"-1\"\n >\n <div data-scope=\"container\" ref={el => (this.container = el)}>\n {this.dismissible && (\n <button\n data-scope=\"dismiss\"\n type=\"button\"\n onClick={this.dismiss.bind(this)}\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </button>\n )}\n\n <nv-icon\n name={this.icon ?? this.getDefaultIcon()}\n size=\"md\"\n data-scope=\"icon\"\n ></nv-icon>\n\n <div data-scope=\"content\">\n {(this.heading || this.headingSlot) && (\n <p id={this.getHeadingId()} data-scope=\"heading\">\n <slot name=\"heading\">{this.heading}</slot>\n </p>\n )}\n {(this.message || this.messageSlot) && (\n <p id={this.getMessageId()} data-scope=\"message\">\n <slot name=\"content\">{this.message}</slot>\n </p>\n )}\n\n {this.actionsSlot && (\n <div data-scope=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"names":["uuidv4","FeedbackColors","useFade","useCollapse","useSlide","parallel","NotificationPosition","h","Host"],"mappings":";;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,gyMAAgyM;;MCiC7yM,cAAc,GAAA,MAAA;AAL3B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAeE;;;AAGG;AAEM,QAAA,IAAG,CAAA,GAAA,GAAWA,KAAM,EAAE;AAE/B;;AAEG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAAwB,aAAa;AAEtD;;;;AAIG;AAEM,QAAA,IAAQ,CAAA,QAAA,GAA8B,QAAQ;AAsBvD;;;AAGG;AAEM,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAErC;;AAEG;AAEH,QAAA,IAAA,CAAA,MAAM,GAAY,KAAK,CAAC;AAExB;;;AAGG;AAEM,QAAA,IAAe,CAAA,eAAA,GAAY,KAAK;;;;QA0CjC,IAAA,CAAA,cAAc,GAAqC;AACzD,YAAA,CAACC,wBAAc,CAAC,OAAO,GAAG,cAAc;AACxC,YAAA,CAACA,wBAAc,CAAC,WAAW,GAAG,aAAa;AAC3C,YAAA,CAACA,wBAAc,CAAC,OAAO,GAAG,cAAc;AACxC,YAAA,CAACA,wBAAc,CAAC,KAAK,GAAG,gBAAgB;AACxC,YAAA,CAACA,wBAAc,CAAC,OAAO,GAAG,MAAM;SACjC;QAEO,IAAA,CAAA,cAAc,GAAqC;AACzD,YAAA,CAACA,wBAAc,CAAC,KAAK,GAAG,OAAO;AAC/B,YAAA,CAACA,wBAAc,CAAC,OAAO,GAAG,OAAO;AACjC,YAAA,CAACA,wBAAc,CAAC,WAAW,GAAG,QAAQ;AACtC,YAAA,CAACA,wBAAc,CAAC,OAAO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ACR,CAAA,EAEXA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,YAAA,EAAgB,SAAS,EAAA,EACtB,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,MAChCA,OAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAa,SAAS,EAAA,EAC9CA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAA,EAAE,IAAI,CAAC,OAAO,CAAQ,CACxC,CACL,EACA,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,MAChCA,OAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAa,SAAS,EAAA,EAC9CA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAA,EAAE,IAAI,CAAC,OAAO,CAAQ,CACxC,CACL,EAEA,IAAI,CAAC,WAAW,KACfA,gFAAgB,SAAS,EAAA,EACvBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAQ,CAAA,CACxB,CACP,CACG,CACF,CACD;;;;;;;;"}
1
+ {"version":3,"file":"nv-notification.entry.cjs.js","sources":["src/components/nv-notification/styles/nv-notification.scss?tag=nv-notification","src/components/nv-notification/nv-notification.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"./mixins\" as *;\n@use \"../../../styles/focus-ring\" as focus;\n\nnv-notification {\n @include root-styles();\n\n [data-scope=\"container\"] {\n @include container-styles();\n\n [data-scope=\"icon\"] {\n @include icon-styles();\n }\n\n [data-scope=\"dismiss\"] {\n @include dismiss-btn-styles();\n }\n\n [data-scope=\"content\"] {\n @include content-styles();\n\n [data-scope=\"heading\"] {\n @include header-styles();\n }\n\n [data-scope=\"message\"] {\n @include message-styles();\n }\n\n [data-scope=\"actions\"] {\n @include actions-styles();\n }\n }\n }\n\n @each $feedback in $feedback-variants {\n &[feedback=\"#{$feedback}\"] {\n [data-scope=\"container\"] {\n @include feedback-color($feedback);\n\n [data-scope=\"icon\"] {\n @include icon-color($feedback);\n }\n }\n\n & > [data-scope=\"close\"] {\n @include focus.focus-ring(map.get($border-color-map, $feedback));\n }\n }\n }\n\n @each $emphasis in $emphasis-variants {\n &[emphasis=\"#{$emphasis}\"] {\n [data-scope=\"container\"] {\n @include emphasis-styles($emphasis);\n }\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Method,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport {\n FeedbackColors,\n NotificationEmphasis,\n NotificationPosition,\n} from '../../utils/constants';\nimport { type IconName } from '../nv-icon/nv-icons';\nimport { useCollapse, useFade, useSlide, parallel } from '../../animations';\n\ntype AriaRole = 'status' | 'alert';\ntype AriaLive = 'polite' | 'assertive';\n\n/**\n * @slot heading - Use this slot to insert HTML as the notification title.\n * @slot content - Use this slot to insert HTML as the notification message.\n * @slot actions - Use this slot for custom actions.\n */\n@Component({\n tag: 'nv-notification',\n styleUrl: 'styles/nv-notification.scss',\n shadow: false,\n})\nexport class NvNotification {\n @Element() el: HTMLNvNotificationElement;\n private container: HTMLElement;\n private headingSlot: HTMLElement;\n private messageSlot: HTMLElement;\n private actionsSlot: HTMLElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Set a unique ID for the notification. Used for aria attributes and managing\n * multiple notifications.\n */\n @Prop({ reflect: true })\n readonly uid: string = uuidv4();\n\n /**\n * Specifies the notification type which determines the color and default icon.\n */\n @Prop({ reflect: true })\n readonly feedback: `${FeedbackColors}` = 'information';\n\n /**\n * Adjusts the emphasis to make the notification more or less visually\n * prominent to users. Use this to draw attention to important actions or\n * reduce focus on less critical ones\n */\n @Prop({ reflect: true })\n readonly emphasis: `${NotificationEmphasis}` = 'medium';\n\n /**\n * Short and concise text for the notification title.\n */\n @Prop({ reflect: true })\n readonly heading: string;\n\n /**\n * Main content for the notification. For more complex content, use the\n * content slot instead.\n */\n @Prop({ reflect: true })\n readonly message: string;\n\n /**\n * Icon associated with the notification, defaults vary based on the feedback\n * type.\n */\n @Prop({ reflect: true })\n readonly icon: string;\n\n /**\n * Allows the notification to be dismissed via a close button (x). The\n * notification is not dismissible unless explicitly enabled.\n */\n @Prop({ reflect: true })\n readonly dismissible: boolean = false;\n\n /**\n * Controls the visibility of the notification.\n */\n @Prop({ reflect: true, mutable: true })\n hidden: boolean = false; // eslint-disable-line @stencil-community/reserved-member-names\n\n /**\n * When true, the notification will be hidden initially, but internal changes\n * will not be in a controlled state. Good for animating the notification in.\n */\n @Prop({ reflect: true })\n readonly initiallyHidden: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Dismisses the notification with an animation, after the animation is\n * complete, the hiddenChanged event will be emitted with the value of true,\n * and the hidden prop will be set to true.\n */\n @Method()\n async dismiss() {\n await this.dismissAnimation();\n }\n\n /**\n * Sets the hidden prop to false, and shows the notification with an\n * animation, after the animation is complete, the hiddenChanged event will be\n * emitted with the value of false.\n */\n @Method()\n async show() {\n await this.showAnimation();\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emits when the 'hidden' prop changes, reflecting a change in visibility.\n * Passes hidden value to the detail.\n * @bind hidden\n */\n @Event({ bubbles: false })\n hiddenChanged: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region INTERNAL\n\n private iconByFeedback: Record<FeedbackColors, IconName> = {\n [FeedbackColors.Warning]: 'alert-circle',\n [FeedbackColors.Information]: 'info-circle',\n [FeedbackColors.Success]: 'circle-check',\n [FeedbackColors.Error]: 'alert-triangle',\n [FeedbackColors.Neutral]: 'help',\n };\n\n private roleByFeedback: Record<FeedbackColors, AriaRole> = {\n [FeedbackColors.Error]: 'alert',\n [FeedbackColors.Warning]: 'alert',\n [FeedbackColors.Information]: 'status',\n [FeedbackColors.Success]: 'status',\n [FeedbackColors.Neutral]: 'status',\n };\n\n private getDefaultIcon(): IconName {\n return this.iconByFeedback[this.feedback] ?? 'info-circle';\n }\n\n private getAriaRole(): AriaRole {\n return this.roleByFeedback[this.feedback] ?? 'status';\n }\n\n private getAriaLive(): AriaLive {\n return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';\n }\n\n private getHeadingId(): string | null {\n return this.heading ? `nv-notification-${this.uid}-heading` : null;\n }\n\n private getMessageId(): string | null {\n return this.message ? `nv-notification-${this.uid}-message` : null;\n }\n\n private async showAnimation() {\n this.hidden = false;\n\n const { setFadeIn } = useFade(this.container);\n const { expand } = useCollapse(this.el, {\n duration: 300,\n overflow: 'visible',\n });\n const { slideY, setSlideY } = useSlide(this.container, {\n duration: 300,\n });\n\n setSlideY(-100);\n setFadeIn();\n await parallel(slideY({ from: -100, to: 0 }), expand).start();\n\n this.hiddenChanged.emit(false);\n }\n\n private getSlideDestination(pos?: NotificationPosition): {\n /** The axis to slide. */\n axis: 'x' | 'y';\n /** The destination value. */\n to: number;\n } {\n switch (pos) {\n case NotificationPosition.TopRight:\n case NotificationPosition.BottomRight:\n return { axis: 'x', to: 100 }; // right\n case NotificationPosition.TopLeft:\n case NotificationPosition.BottomLeft:\n return { axis: 'x', to: -100 }; // left\n case NotificationPosition.TopCenter:\n return { axis: 'y', to: -100 }; // up\n case NotificationPosition.BottomCenter:\n return { axis: 'y', to: 100 }; // down\n default:\n return { axis: 'x', to: 100 }; // fallback\n }\n }\n\n private async dismissAnimation() {\n const position = this.el\n .closest('nv-notificationcontainer')\n ?.getAttribute('position') as NotificationPosition | undefined;\n\n const destination = this.getSlideDestination(position);\n\n const { fadeOut } = useFade(this.container, { duration: 300 });\n const { slideX, slideY, setSlideReset } = useSlide(this.container, {\n duration: 500,\n });\n const { collapse } = useCollapse(this.el, {\n duration: 500,\n overflow: 'visible',\n });\n const slide =\n destination.axis === 'x'\n ? slideX({ from: 0, to: destination.to })\n : slideY({ from: 0, to: destination.to });\n\n setSlideReset();\n await parallel(fadeOut, slide, collapse).start();\n\n this.hidden = true;\n this.hiddenChanged.emit(true);\n }\n\n //#endregion INTERNAL\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.headingSlot = this.el.querySelector('[slot=\"heading\"]');\n this.messageSlot = this.el.querySelector('[slot=\"content\"]');\n this.actionsSlot = this.el.querySelector('[slot=\"actions\"]');\n\n if (this.initiallyHidden) this.hidden = true;\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role={this.getAriaRole()}\n aria-live={this.getAriaLive()}\n aria-atomic\n aria-labelledby={this.getHeadingId() ?? null}\n aria-describedby={this.getMessageId() ?? null}\n tabindex=\"-1\"\n >\n <div data-scope=\"container\" ref={el => (this.container = el)}>\n {this.dismissible && (\n <button\n data-scope=\"dismiss\"\n type=\"button\"\n onClick={this.dismiss.bind(this)}\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </button>\n )}\n\n <nv-icon\n name={this.icon ?? this.getDefaultIcon()}\n size=\"md\"\n data-scope=\"icon\"\n ></nv-icon>\n\n <div data-scope=\"content\">\n {(this.heading || this.headingSlot) && (\n <p id={this.getHeadingId()} data-scope=\"heading\">\n <slot name=\"heading\">{this.heading}</slot>\n </p>\n )}\n {(this.message || this.messageSlot) && (\n <p id={this.getMessageId()} data-scope=\"message\">\n <slot name=\"content\">{this.message}</slot>\n </p>\n )}\n\n {this.actionsSlot && (\n <div data-scope=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"names":["uuidv4","FeedbackColors","useFade","useCollapse","useSlide","parallel","NotificationPosition","h","Host"],"mappings":";;;;;;;;;;;AAAA,MAAM,i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AAO,CAAQ,CACxC,CACL,EAEA,IAAI,CAAC,WAAW,KACfA,gFAAgB,SAAS,EAAA,EACvBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAQ,CAAA,CACxB,CACP,CACG,CACF,CACD;;;;;;;;"}
@@ -30,7 +30,7 @@ const NvNotificationContainer = class {
30
30
  /****************************************************************************/
31
31
  //#region RENDER
32
32
  render() {
33
- return (index.h(index.Host, { key: 'bf0b7cd02e0d214516f352eb7016d6060d6959c5', class: `position-${this.position}` }, index.h("slot", { key: 'f042e3f11b4d2af4b47aadeba04a332c57889616' })));
33
+ return (index.h(index.Host, { key: '5dee0dc22cb8917d8134e2f256996118e3e30b42', class: `position-${this.position}` }, index.h("slot", { key: '14664d70fb1840877d80eda1b3c7804457ffa67f' })));
34
34
  }
35
35
  };
36
36
  NvNotificationContainer.style = nvNotificationcontainerCss;
@@ -2,8 +2,9 @@
2
2
 
3
3
  var index = require('./index-B1na8x6M.js');
4
4
  var fade_animation = require('./fade.animation-BQSqXXOJ.js');
5
- var grow_animation = require('./grow.animation-BrWzyoUA.js');
5
+ var grow_animation = require('./grow.animation-ynu_HmA_.js');
6
6
  require('./style-value-types.es-B1vLqX9m.js');
7
+ var events_utils = require('./events.utils-BE6R5q9C.js');
7
8
 
8
9
  /**
9
10
  * Custom positioning reference element.
@@ -1696,11 +1697,10 @@ const NvPopover = class {
1696
1697
  * @param {MouseEvent | TouchEvent} event - The event object.
1697
1698
  */
1698
1699
  this.handleClickOutside = (event) => {
1699
- var _a;
1700
1700
  // This popover should close when the user clicks outside of it.
1701
1701
  if (this.el.contains(event.target))
1702
1702
  return;
1703
- if ((_a = this.triggerElement) === null || _a === void 0 ? void 0 : _a.contains(event.target))
1703
+ if (this.triggerElement?.contains(event.target))
1704
1704
  return;
1705
1705
  this.open = false;
1706
1706
  };
@@ -1740,14 +1740,14 @@ const NvPopover = class {
1740
1740
  */
1741
1741
  attachEventListeners() {
1742
1742
  if (this.triggerElement && !this.eventsAttached) {
1743
- grow_animation.addEventListeners(this.closeEvents, document, this);
1743
+ events_utils.addEventListeners(this.closeEvents, document, this);
1744
1744
  if (this.triggerMode === 'click') {
1745
- grow_animation.addEventListeners(this.clickEvents, this.triggerElement, this);
1745
+ events_utils.addEventListeners(this.clickEvents, this.triggerElement, this);
1746
1746
  // Add document click and touch listeners
1747
- grow_animation.addEventListeners(this.outsideClickEvents, document, this);
1747
+ events_utils.addEventListeners(this.outsideClickEvents, document, this);
1748
1748
  }
1749
1749
  if (this.triggerMode === 'hover') {
1750
- grow_animation.addEventListeners(this.hoverEvents, this.triggerElement, this);
1750
+ events_utils.addEventListeners(this.hoverEvents, this.triggerElement, this);
1751
1751
  }
1752
1752
  this.eventsAttached = true;
1753
1753
  }
@@ -1871,14 +1871,14 @@ const NvPopover = class {
1871
1871
  this.attachEventListeners();
1872
1872
  }
1873
1873
  disconnectedCallback() {
1874
- grow_animation.removeEventListeners(this.closeEvents, document, this);
1874
+ events_utils.removeEventListeners(this.closeEvents, document, this);
1875
1875
  if (this.triggerMode === 'click') {
1876
- grow_animation.removeEventListeners(this.clickEvents, this.triggerElement, this);
1876
+ events_utils.removeEventListeners(this.clickEvents, this.triggerElement, this);
1877
1877
  // Remove document listeners
1878
- grow_animation.removeEventListeners(this.outsideClickEvents, document, this);
1878
+ events_utils.removeEventListeners(this.outsideClickEvents, document, this);
1879
1879
  }
1880
1880
  if (this.triggerMode === 'hover')
1881
- grow_animation.removeEventListeners(this.hoverEvents, this.triggerElement, this);
1881
+ events_utils.removeEventListeners(this.hoverEvents, this.triggerElement, this);
1882
1882
  // Reset flag so events can be reattached if component is reconnected
1883
1883
  this.eventsAttached = false;
1884
1884
  // Clean up any pending timeouts
@@ -1891,7 +1891,7 @@ const NvPopover = class {
1891
1891
  /****************************************************************************/
1892
1892
  //#region RENDER
1893
1893
  render() {
1894
- return (index.h(index.Host, { key: '8ef71227900185e903bd0003771074ba5d071aac' }, index.h("slot", { key: '84ccbb797f486d76ed650b50e5004bffc2521ddb', name: "trigger" }), index.h("div", { key: '66dc1bf520a2bf6f0a1c4e91b091b0b4941807c4', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: 'a1ab4831292b9ab60ebfd8dd478c3685944dbe79', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '2d9ee411891f956ff3ccd7b74d956e5b952e1af0', name: "content" }))));
1894
+ return (index.h(index.Host, { key: '3505c77a628a1c612d937703777b72459a71e256' }, index.h("slot", { key: '36596c5ca1b182ed5d9f723b81398cf54923bd83', name: "trigger" }), index.h("div", { key: 'efc6da5c69cefad2611f0b9fa96d072ddc48d07a', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: '9439cf1c7fdadfd9538c4ed186d4c54300d00e95', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '868cd1ce1ac648f4446aa6d4f86069551c208d1f', name: "content" }))));
1895
1895
  }
1896
1896
  get el() { return index.getElement(this); }
1897
1897
  static get watchers() { return {