@nova-design-system/nova-webcomponents 3.12.0 → 3.14.0-beta.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 (445) hide show
  1. package/dist/cjs/collapse.animation-23b7d61b.js +221 -0
  2. package/dist/cjs/collapse.animation-23b7d61b.js.map +1 -0
  3. package/dist/cjs/{constants-aac59496.js → constants-f5633903.js} +15 -1
  4. package/dist/cjs/constants-f5633903.js.map +1 -0
  5. package/dist/cjs/fade.animation-9294e9ee.js +726 -0
  6. package/dist/cjs/fade.animation-9294e9ee.js.map +1 -0
  7. package/dist/cjs/{grow.animation-6d003803.js → grow.animation-f1cef0ad.js} +6 -5
  8. package/dist/cjs/grow.animation-f1cef0ad.js.map +1 -0
  9. package/dist/cjs/index-c56424e5.js +8 -0
  10. package/dist/cjs/index.cjs.js +24 -8
  11. package/dist/cjs/index.cjs.js.map +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/native.cjs.js +1 -1
  14. package/dist/cjs/nv-accordion-item.cjs.entry.js +72 -38
  15. package/dist/cjs/nv-accordion-item.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-accordion.cjs.entry.js +79 -65
  17. package/dist/cjs/nv-accordion.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nv-alert.cjs.entry.js +12 -12
  19. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  21. package/dist/cjs/nv-badge_2.cjs.entry.js +11 -11
  22. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  23. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-calendar.cjs.entry.js +14 -10
  25. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-datagrid.cjs.entry.js +1 -1
  27. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  28. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +9 -6
  29. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
  31. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +0 -30
  33. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
  35. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  36. package/dist/cjs/nv-fieldslider.cjs.entry.js +24 -16
  37. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
  38. package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
  39. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  40. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  41. package/dist/cjs/nv-notification.cjs.entry.js +181 -0
  42. package/dist/cjs/nv-notification.cjs.entry.js.map +1 -0
  43. package/dist/cjs/nv-notificationcontainer.cjs.entry.js +43 -0
  44. package/dist/cjs/nv-notificationcontainer.cjs.entry.js.map +1 -0
  45. package/dist/cjs/nv-popover.cjs.entry.js +4 -4
  46. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  47. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  48. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  49. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  50. package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
  51. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
  52. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  53. package/dist/cjs/slide.animation-8bc27ed6.js +92 -0
  54. package/dist/cjs/slide.animation-8bc27ed6.js.map +1 -0
  55. package/dist/cjs/{stylefire.es-717e022a.js → style-value-types.es-eea2f16f.js} +51 -696
  56. package/dist/cjs/style-value-types.es-eea2f16f.js.map +1 -0
  57. package/dist/cjs/{timeline.animation-155e8839.js → timeline.animation-2878afb6.js} +20 -1
  58. package/dist/cjs/timeline.animation-2878afb6.js.map +1 -0
  59. package/dist/collection/animations/collapse.animation.js +114 -51
  60. package/dist/collection/animations/collapse.animation.js.map +1 -1
  61. package/dist/collection/animations/fade.animation.js +2 -2
  62. package/dist/collection/animations/fade.animation.js.map +1 -1
  63. package/dist/collection/animations/index.js +1 -0
  64. package/dist/collection/animations/index.js.map +1 -1
  65. package/dist/collection/animations/slide.animation.js +87 -0
  66. package/dist/collection/animations/slide.animation.js.map +1 -0
  67. package/dist/collection/animations/timeline.animation.js +19 -1
  68. package/dist/collection/animations/timeline.animation.js.map +1 -1
  69. package/dist/collection/collection-manifest.json +2 -0
  70. package/dist/collection/components/nv-accordion/nv-accordion.docs.js +78 -20
  71. package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -1
  72. package/dist/collection/components/nv-accordion/nv-accordion.js +88 -68
  73. package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
  74. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +70 -36
  75. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
  76. package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +3 -0
  77. package/dist/collection/components/nv-alert/nv-alert.css +1 -1
  78. package/dist/collection/components/nv-alert/nv-alert.js +6 -6
  79. package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
  80. package/dist/collection/components/nv-badge/nv-badge.js +7 -7
  81. package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
  82. package/dist/collection/components/nv-calendar/nv-calendar.css +4 -0
  83. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +14 -0
  84. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
  85. package/dist/collection/components/nv-calendar/nv-calendar.js +47 -3
  86. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  87. package/dist/collection/components/nv-calendar/partials/calendar-actions.js +2 -2
  88. package/dist/collection/components/nv-calendar/partials/calendar-actions.js.map +1 -1
  89. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +8 -0
  90. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  91. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +13 -11
  92. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -1
  93. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +1 -0
  94. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -30
  95. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  96. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +1 -1
  97. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  98. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +0 -1
  99. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
  100. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +10 -10
  101. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
  102. package/dist/collection/components/nv-fieldslider/partials/field-input.js +13 -5
  103. package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -1
  104. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +27 -0
  105. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +0 -1
  106. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
  107. package/dist/collection/components/nv-icon/nv-icons.js +2 -1
  108. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  109. package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
  110. package/dist/collection/components/nv-notification/nv-notification.docs.js +72 -0
  111. package/dist/collection/components/nv-notification/nv-notification.docs.js.map +1 -0
  112. package/dist/collection/components/nv-notification/nv-notification.js +431 -0
  113. package/dist/collection/components/nv-notification/nv-notification.js.map +1 -0
  114. package/dist/collection/components/nv-notification/styles/nv-notification.css +155 -0
  115. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.css +61 -0
  116. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.docs.js +7 -0
  117. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.docs.js.map +1 -0
  118. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js +76 -0
  119. package/dist/collection/components/nv-notificationcontainer/nv-notificationcontainer.js.map +1 -0
  120. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  121. package/dist/collection/components/nv-row/nv-row.js +1 -1
  122. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  123. package/dist/collection/components/nv-table/nv-table.js +2 -2
  124. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  125. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  126. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +0 -1
  127. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
  128. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
  129. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  130. package/dist/collection/utils/constants.js +14 -0
  131. package/dist/collection/utils/constants.js.map +1 -1
  132. package/dist/components/index.js +11 -7
  133. package/dist/components/index.js.map +1 -1
  134. package/dist/components/nv-accordion-item.js +1 -1
  135. package/dist/components/nv-accordion.js +88 -71
  136. package/dist/components/nv-accordion.js.map +1 -1
  137. package/dist/components/nv-alert.js +13 -13
  138. package/dist/components/nv-alert.js.map +1 -1
  139. package/dist/components/nv-avatar.js +2 -2
  140. package/dist/components/nv-badge.js +1 -1
  141. package/dist/components/nv-breadcrumb.js +2 -2
  142. package/dist/components/nv-button.js +1 -1
  143. package/dist/components/nv-calendar.js +1 -1
  144. package/dist/components/nv-datagrid.js +3 -3
  145. package/dist/components/nv-dialog.js +4 -4
  146. package/dist/components/nv-dialogfooter.js +1 -1
  147. package/dist/components/nv-fieldcheckbox.js +1 -1
  148. package/dist/components/nv-fielddate.js +5 -5
  149. package/dist/components/nv-fielddaterange.js +5 -5
  150. package/dist/components/nv-fielddropdown.js +4 -4
  151. package/dist/components/nv-fielddropdownitem.js +1 -1
  152. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  153. package/dist/components/nv-fieldmultiselect.js +6 -36
  154. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  155. package/dist/components/nv-fieldnumber.js +1 -1
  156. package/dist/components/nv-fieldpassword.js +2 -2
  157. package/dist/components/nv-fieldselect.js +2 -2
  158. package/dist/components/nv-fieldslider.js +27 -19
  159. package/dist/components/nv-fieldslider.js.map +1 -1
  160. package/dist/components/nv-fieldtext.js +1 -1
  161. package/dist/components/nv-fieldtime.js +4 -4
  162. package/dist/components/nv-icon.js +1 -1
  163. package/dist/components/nv-iconbutton.js +1 -1
  164. package/dist/components/nv-menu.js +3 -3
  165. package/dist/components/nv-menuitem.js +1 -1
  166. package/dist/components/nv-notification.d.ts +11 -0
  167. package/dist/components/nv-notification.js +213 -0
  168. package/dist/components/nv-notification.js.map +1 -0
  169. package/dist/components/nv-notificationcontainer.d.ts +11 -0
  170. package/dist/components/nv-notificationcontainer.js +59 -0
  171. package/dist/components/nv-notificationcontainer.js.map +1 -0
  172. package/dist/components/nv-popover.js +1 -1
  173. package/dist/components/nv-row.js +1 -1
  174. package/dist/components/nv-stack.js +1 -1
  175. package/dist/components/nv-table.js +2 -2
  176. package/dist/components/nv-toggle.js +2 -2
  177. package/dist/components/nv-togglebutton.js +1 -1
  178. package/dist/components/nv-togglebuttongroup.js +1 -1
  179. package/dist/components/nv-tooltip.js +1 -1
  180. package/dist/components/{p-1172e9bb.js → p-00cbf2a1.js} +2 -2
  181. package/dist/components/p-00cbf2a1.js.map +1 -0
  182. package/dist/components/{p-84f4b071.js → p-086a46af.js} +75 -41
  183. package/dist/components/p-086a46af.js.map +1 -0
  184. package/dist/components/{p-87079346.js → p-1af3591a.js} +3 -3
  185. package/dist/components/{p-87079346.js.map → p-1af3591a.js.map} +1 -1
  186. package/dist/components/{p-ddb7aa4e.js → p-368c8700.js} +13 -13
  187. package/dist/components/{p-ddb7aa4e.js.map → p-368c8700.js.map} +1 -1
  188. package/dist/components/p-3cd7a66f.js +219 -0
  189. package/dist/components/p-3cd7a66f.js.map +1 -0
  190. package/dist/components/{p-09cdd71f.js → p-42ea6b74.js} +34 -688
  191. package/dist/components/p-42ea6b74.js.map +1 -0
  192. package/dist/components/{p-b7629769.js → p-44862b81.js} +4 -4
  193. package/dist/components/p-44862b81.js.map +1 -0
  194. package/dist/components/{p-8d45dbfe.js → p-4697bd56.js} +3 -2
  195. package/dist/components/p-4697bd56.js.map +1 -0
  196. package/dist/components/{p-5f594b35.js → p-51602221.js} +16 -2
  197. package/dist/components/p-51602221.js.map +1 -0
  198. package/dist/components/{p-4c3dc7e4.js → p-51a43ac6.js} +13 -10
  199. package/dist/components/p-51a43ac6.js.map +1 -0
  200. package/dist/components/{p-b2c31970.js → p-54161bad.js} +17 -11
  201. package/dist/components/p-54161bad.js.map +1 -0
  202. package/dist/components/{p-7372258e.js → p-6926e6f6.js} +2 -2
  203. package/dist/components/{p-7372258e.js.map → p-6926e6f6.js.map} +1 -1
  204. package/dist/components/{p-ac91582e.js → p-7426b20f.js} +2 -2
  205. package/dist/components/{p-ac91582e.js.map → p-7426b20f.js.map} +1 -1
  206. package/dist/components/{p-095c8285.js → p-95857e4f.js} +2 -2
  207. package/dist/components/{p-095c8285.js.map → p-95857e4f.js.map} +1 -1
  208. package/dist/components/p-a271e3be.js +723 -0
  209. package/dist/components/p-a271e3be.js.map +1 -0
  210. package/dist/components/{p-2030d84d.js → p-a45cacdf.js} +2 -2
  211. package/dist/components/{p-2030d84d.js.map → p-a45cacdf.js.map} +1 -1
  212. package/dist/{esm/timeline.animation-adf35ecb.js → components/p-a52cd849.js} +20 -2
  213. package/dist/components/p-a52cd849.js.map +1 -0
  214. package/dist/components/{p-dc5dad90.js → p-a823b8e9.js} +2 -2
  215. package/dist/components/{p-dc5dad90.js.map → p-a823b8e9.js.map} +1 -1
  216. package/dist/components/{p-0b015832.js → p-aaf0b787.js} +2 -2
  217. package/dist/components/{p-0b015832.js.map → p-aaf0b787.js.map} +1 -1
  218. package/dist/components/p-c7401a7d.js +90 -0
  219. package/dist/components/p-c7401a7d.js.map +1 -0
  220. package/dist/components/{p-57ae32bc.js → p-c8956181.js} +2 -2
  221. package/dist/components/{p-57ae32bc.js.map → p-c8956181.js.map} +1 -1
  222. package/dist/components/{p-2ad58e41.js → p-ee8944f3.js} +5 -5
  223. package/dist/components/{p-2ad58e41.js.map → p-ee8944f3.js.map} +1 -1
  224. package/dist/components/p-f4ae2239.js +88 -0
  225. package/dist/components/p-f4ae2239.js.map +1 -0
  226. package/dist/esm/collapse.animation-6e0b08df.js +219 -0
  227. package/dist/esm/collapse.animation-6e0b08df.js.map +1 -0
  228. package/dist/esm/{constants-a857c476.js → constants-69bafca2.js} +16 -2
  229. package/dist/esm/constants-69bafca2.js.map +1 -0
  230. package/dist/esm/fade.animation-9b939939.js +723 -0
  231. package/dist/esm/fade.animation-9b939939.js.map +1 -0
  232. package/dist/esm/{grow.animation-f7b26024.js → grow.animation-03fa5c19.js} +3 -2
  233. package/dist/esm/grow.animation-03fa5c19.js.map +1 -0
  234. package/dist/esm/index-a1936cd0.js +8 -0
  235. package/dist/esm/index.js +12 -8
  236. package/dist/esm/index.js.map +1 -1
  237. package/dist/esm/loader.js +1 -1
  238. package/dist/esm/native.js +1 -1
  239. package/dist/esm/nv-accordion-item.entry.js +72 -38
  240. package/dist/esm/nv-accordion-item.entry.js.map +1 -1
  241. package/dist/esm/nv-accordion.entry.js +80 -66
  242. package/dist/esm/nv-accordion.entry.js.map +1 -1
  243. package/dist/esm/nv-alert.entry.js +12 -12
  244. package/dist/esm/nv-alert.entry.js.map +1 -1
  245. package/dist/esm/nv-avatar.entry.js +1 -1
  246. package/dist/esm/nv-badge_2.entry.js +11 -11
  247. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  248. package/dist/esm/nv-button.entry.js +1 -1
  249. package/dist/esm/nv-calendar.entry.js +14 -10
  250. package/dist/esm/nv-calendar.entry.js.map +1 -1
  251. package/dist/esm/nv-datagrid.entry.js +1 -1
  252. package/dist/esm/nv-dialog.entry.js +1 -1
  253. package/dist/esm/nv-dialogfooter_2.entry.js +9 -6
  254. package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
  255. package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
  256. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -1
  257. package/dist/esm/nv-fieldmultiselect.entry.js +0 -30
  258. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  259. package/dist/esm/nv-fieldnumber.entry.js +1 -1
  260. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  261. package/dist/esm/nv-fieldslider.entry.js +24 -16
  262. package/dist/esm/nv-fieldslider.entry.js.map +1 -1
  263. package/dist/esm/nv-fieldtime.entry.js +1 -1
  264. package/dist/esm/nv-icon.entry.js +2 -2
  265. package/dist/esm/nv-icon.entry.js.map +1 -1
  266. package/dist/esm/nv-notification.entry.js +177 -0
  267. package/dist/esm/nv-notification.entry.js.map +1 -0
  268. package/dist/esm/nv-notificationcontainer.entry.js +39 -0
  269. package/dist/esm/nv-notificationcontainer.entry.js.map +1 -0
  270. package/dist/esm/nv-popover.entry.js +4 -4
  271. package/dist/esm/nv-row.entry.js +1 -1
  272. package/dist/esm/nv-stack.entry.js +1 -1
  273. package/dist/esm/nv-table.entry.js +2 -2
  274. package/dist/esm/nv-toggle.entry.js +2 -2
  275. package/dist/esm/nv-togglebutton.entry.js +1 -1
  276. package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
  277. package/dist/esm/nv-tooltip.entry.js +1 -1
  278. package/dist/esm/slide.animation-f761030b.js +90 -0
  279. package/dist/esm/slide.animation-f761030b.js.map +1 -0
  280. package/dist/esm/{stylefire.es-74da334a.js → style-value-types.es-f5d10b79.js} +34 -688
  281. package/dist/esm/style-value-types.es-f5d10b79.js.map +1 -0
  282. package/dist/esm/timeline.animation-79215cd4.js +41 -0
  283. package/dist/esm/timeline.animation-79215cd4.js.map +1 -0
  284. package/dist/native/index.esm.js +1 -1
  285. package/dist/native/index.esm.js.map +1 -1
  286. package/dist/native/native.css +1 -1
  287. package/dist/native/native.esm.js +1 -1
  288. package/dist/native/native.esm.js.map +1 -1
  289. package/dist/native/{p-47901c83.entry.js → p-08322093.entry.js} +2 -2
  290. package/dist/native/p-0a99c6fb.entry.js +2 -0
  291. package/dist/native/p-0a99c6fb.entry.js.map +1 -0
  292. package/dist/native/p-1504e28b.entry.js +2 -0
  293. package/dist/native/p-1504e28b.entry.js.map +1 -0
  294. package/dist/native/p-19090193.entry.js +2 -0
  295. package/dist/native/p-19090193.entry.js.map +1 -0
  296. package/dist/native/{p-3a8f65a9.entry.js → p-224b1a01.entry.js} +2 -2
  297. package/dist/native/p-29df974e.entry.js +2 -0
  298. package/dist/native/p-29df974e.entry.js.map +1 -0
  299. package/dist/native/{p-29ee7b1c.entry.js → p-29f68e07.entry.js} +2 -2
  300. package/dist/native/p-29f68e07.entry.js.map +1 -0
  301. package/dist/native/p-3cd7a66f.js +2 -0
  302. package/dist/native/p-3cd7a66f.js.map +1 -0
  303. package/dist/native/p-42ea6b74.js +16 -0
  304. package/dist/native/p-42ea6b74.js.map +1 -0
  305. package/dist/native/p-45506c37.entry.js +2 -0
  306. package/dist/native/p-45506c37.entry.js.map +1 -0
  307. package/dist/native/p-4697bd56.js +2 -0
  308. package/dist/native/{p-8d45dbfe.js.map → p-4697bd56.js.map} +1 -1
  309. package/dist/native/p-47da1926.entry.js +2 -0
  310. package/dist/native/p-47da1926.entry.js.map +1 -0
  311. package/dist/native/{p-e7a929e7.entry.js → p-48774d0c.entry.js} +2 -2
  312. package/dist/native/p-4ec61dec.entry.js +2 -0
  313. package/dist/native/p-4ec61dec.entry.js.map +1 -0
  314. package/dist/native/p-51602221.js +2 -0
  315. package/dist/native/p-51602221.js.map +1 -0
  316. package/dist/native/{p-ab1e1a96.entry.js → p-5c697133.entry.js} +2 -2
  317. package/dist/native/p-5c697133.entry.js.map +1 -0
  318. package/dist/native/{p-c3ad7617.entry.js → p-6c7a9a21.entry.js} +2 -2
  319. package/dist/native/p-6cb6679b.entry.js +2 -0
  320. package/dist/native/{p-62aa0531.entry.js → p-6d13a851.entry.js} +2 -2
  321. package/dist/native/p-74b129e9.entry.js +2 -0
  322. package/dist/native/{p-48cf2457.entry.js → p-758e0d4a.entry.js} +2 -2
  323. package/dist/native/p-9a46baa9.entry.js +2 -0
  324. package/dist/native/p-9a46baa9.entry.js.map +1 -0
  325. package/dist/native/p-a271e3be.js +2 -0
  326. package/dist/native/p-a271e3be.js.map +1 -0
  327. package/dist/native/p-a52cd849.js +2 -0
  328. package/dist/native/p-a52cd849.js.map +1 -0
  329. package/dist/native/p-b32d0a5a.entry.js +2 -0
  330. package/dist/native/p-b32d0a5a.entry.js.map +1 -0
  331. package/dist/native/{p-bcff76ab.entry.js → p-c66565f8.entry.js} +2 -2
  332. package/dist/native/p-c7401a7d.js +2 -0
  333. package/dist/native/p-c7401a7d.js.map +1 -0
  334. package/dist/native/p-c7b7ffaf.entry.js +2 -0
  335. package/dist/native/p-c7b7ffaf.entry.js.map +1 -0
  336. package/dist/native/{p-a63929db.entry.js → p-d2c9247b.entry.js} +3 -3
  337. package/dist/native/{p-f033c4ce.entry.js → p-d882f417.entry.js} +2 -2
  338. package/dist/native/{p-2d647761.entry.js → p-e2c99ce2.entry.js} +2 -2
  339. package/dist/native/p-f5120223.entry.js +2 -0
  340. package/dist/native/p-f5120223.entry.js.map +1 -0
  341. package/dist/native/{p-43071c3b.entry.js → p-fa177c39.entry.js} +2 -2
  342. package/dist/types/animations/collapse.animation.d.ts +10 -2
  343. package/dist/types/animations/index.d.ts +1 -0
  344. package/dist/types/animations/slide.animation.d.ts +22 -0
  345. package/dist/types/animations/timeline.animation.d.ts +17 -1
  346. package/dist/types/components/nv-accordion/nv-accordion.d.ts +5 -7
  347. package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +23 -8
  348. package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
  349. package/dist/types/components/nv-badge/nv-badge.d.ts +1 -1
  350. package/dist/types/components/nv-calendar/nv-calendar.d.ts +4 -0
  351. package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +4 -0
  352. package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +8 -4
  353. package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +3 -2
  354. package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +7 -3
  355. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  356. package/dist/types/components/nv-notification/nv-notification.d.ts +93 -0
  357. package/dist/types/components/nv-notification/nv-notification.docs.d.ts +4 -0
  358. package/dist/types/components/nv-notificationcontainer/nv-notificationcontainer.d.ts +19 -0
  359. package/dist/types/components/nv-notificationcontainer/nv-notificationcontainer.docs.d.ts +4 -0
  360. package/dist/types/components.d.ts +199 -9
  361. package/dist/types/nova-docs.d.ts +6 -0
  362. package/dist/types/utils/constants.d.ts +12 -0
  363. package/dist/vscode-data.json +120 -6
  364. package/hydrate/index.js +800 -274
  365. package/hydrate/index.mjs +800 -274
  366. package/package.json +9 -1
  367. package/readme.md +169 -42
  368. package/dist/cjs/collapse.animation-a129dc3f.js +0 -86
  369. package/dist/cjs/collapse.animation-a129dc3f.js.map +0 -1
  370. package/dist/cjs/constants-aac59496.js.map +0 -1
  371. package/dist/cjs/fade.animation-644b5c4d.js +0 -70
  372. package/dist/cjs/fade.animation-644b5c4d.js.map +0 -1
  373. package/dist/cjs/grow.animation-6d003803.js.map +0 -1
  374. package/dist/cjs/stylefire.es-717e022a.js.map +0 -1
  375. package/dist/cjs/timeline.animation-155e8839.js.map +0 -1
  376. package/dist/components/p-09cdd71f.js.map +0 -1
  377. package/dist/components/p-1172e9bb.js.map +0 -1
  378. package/dist/components/p-15aeab4d.js +0 -23
  379. package/dist/components/p-15aeab4d.js.map +0 -1
  380. package/dist/components/p-1cbacdba.js +0 -68
  381. package/dist/components/p-1cbacdba.js.map +0 -1
  382. package/dist/components/p-4c3dc7e4.js.map +0 -1
  383. package/dist/components/p-5f594b35.js.map +0 -1
  384. package/dist/components/p-84f4b071.js.map +0 -1
  385. package/dist/components/p-8d45dbfe.js.map +0 -1
  386. package/dist/components/p-9a263d0e.js +0 -84
  387. package/dist/components/p-9a263d0e.js.map +0 -1
  388. package/dist/components/p-b2c31970.js.map +0 -1
  389. package/dist/components/p-b3035205.js +0 -88
  390. package/dist/components/p-b3035205.js.map +0 -1
  391. package/dist/components/p-b7629769.js.map +0 -1
  392. package/dist/esm/collapse.animation-16e3af45.js +0 -84
  393. package/dist/esm/collapse.animation-16e3af45.js.map +0 -1
  394. package/dist/esm/constants-a857c476.js.map +0 -1
  395. package/dist/esm/fade.animation-71e8e34c.js +0 -68
  396. package/dist/esm/fade.animation-71e8e34c.js.map +0 -1
  397. package/dist/esm/grow.animation-f7b26024.js.map +0 -1
  398. package/dist/esm/stylefire.es-74da334a.js.map +0 -1
  399. package/dist/esm/timeline.animation-adf35ecb.js.map +0 -1
  400. package/dist/native/p-09cdd71f.js +0 -16
  401. package/dist/native/p-09cdd71f.js.map +0 -1
  402. package/dist/native/p-0da8f0d1.entry.js +0 -2
  403. package/dist/native/p-0da8f0d1.entry.js.map +0 -1
  404. package/dist/native/p-15aeab4d.js +0 -2
  405. package/dist/native/p-15aeab4d.js.map +0 -1
  406. package/dist/native/p-1cbacdba.js +0 -2
  407. package/dist/native/p-1cbacdba.js.map +0 -1
  408. package/dist/native/p-29ee7b1c.entry.js.map +0 -1
  409. package/dist/native/p-38af3aaf.entry.js +0 -2
  410. package/dist/native/p-38af3aaf.entry.js.map +0 -1
  411. package/dist/native/p-3fcaac6d.entry.js +0 -2
  412. package/dist/native/p-3fcaac6d.entry.js.map +0 -1
  413. package/dist/native/p-5d352456.entry.js +0 -2
  414. package/dist/native/p-5f594b35.js +0 -2
  415. package/dist/native/p-5f594b35.js.map +0 -1
  416. package/dist/native/p-63fea160.entry.js +0 -2
  417. package/dist/native/p-63fea160.entry.js.map +0 -1
  418. package/dist/native/p-67d861e2.entry.js +0 -2
  419. package/dist/native/p-67d861e2.entry.js.map +0 -1
  420. package/dist/native/p-7703c736.entry.js +0 -2
  421. package/dist/native/p-7703c736.entry.js.map +0 -1
  422. package/dist/native/p-8d45dbfe.js +0 -2
  423. package/dist/native/p-9a263d0e.js +0 -2
  424. package/dist/native/p-9a263d0e.js.map +0 -1
  425. package/dist/native/p-9e0fe7e8.entry.js +0 -2
  426. package/dist/native/p-9e0fe7e8.entry.js.map +0 -1
  427. package/dist/native/p-ab1e1a96.entry.js.map +0 -1
  428. package/dist/native/p-ac5496e7.entry.js +0 -2
  429. package/dist/native/p-d88c416f.entry.js +0 -2
  430. package/dist/native/p-d88c416f.entry.js.map +0 -1
  431. package/dist/native/p-e603c6ed.entry.js +0 -2
  432. package/dist/native/p-e603c6ed.entry.js.map +0 -1
  433. /package/dist/native/{p-47901c83.entry.js.map → p-08322093.entry.js.map} +0 -0
  434. /package/dist/native/{p-3a8f65a9.entry.js.map → p-224b1a01.entry.js.map} +0 -0
  435. /package/dist/native/{p-e7a929e7.entry.js.map → p-48774d0c.entry.js.map} +0 -0
  436. /package/dist/native/{p-c3ad7617.entry.js.map → p-6c7a9a21.entry.js.map} +0 -0
  437. /package/dist/native/{p-5d352456.entry.js.map → p-6cb6679b.entry.js.map} +0 -0
  438. /package/dist/native/{p-62aa0531.entry.js.map → p-6d13a851.entry.js.map} +0 -0
  439. /package/dist/native/{p-ac5496e7.entry.js.map → p-74b129e9.entry.js.map} +0 -0
  440. /package/dist/native/{p-48cf2457.entry.js.map → p-758e0d4a.entry.js.map} +0 -0
  441. /package/dist/native/{p-bcff76ab.entry.js.map → p-c66565f8.entry.js.map} +0 -0
  442. /package/dist/native/{p-a63929db.entry.js.map → p-d2c9247b.entry.js.map} +0 -0
  443. /package/dist/native/{p-f033c4ce.entry.js.map → p-d882f417.entry.js.map} +0 -0
  444. /package/dist/native/{p-2d647761.entry.js.map → p-e2c99ce2.entry.js.map} +0 -0
  445. /package/dist/native/{p-43071c3b.entry.js.map → p-fa177c39.entry.js.map} +0 -0
@@ -0,0 +1,181 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-c56424e5.js');
6
+ const constants = require('./constants-f5633903.js');
7
+ const collapse_animation = require('./collapse.animation-23b7d61b.js');
8
+ const fade_animation = require('./fade.animation-9294e9ee.js');
9
+ require('./style-value-types.es-eea2f16f.js');
10
+ const slide_animation = require('./slide.animation-8bc27ed6.js');
11
+ const timeline_animation = require('./timeline.animation-2878afb6.js');
12
+ const v4 = require('./v4-7014b8b0.js');
13
+
14
+ const nvNotificationCss = "nv-notification{display:block}nv-notification [data-scope=container]{display:flex;position:relative;max-width:512px;width:100%;padding:var(--notification-padding);align-items:flex-start;gap:var(--notification-gap-x);border-radius:var(--notification-radius);border-style:solid;box-shadow:0 var(--shadow-y-axis-lg-1, 4px) var(--shadow-blur-lg-1, 6px) var(--shadow-spread-lg-1, -2px) var(--shadow-color-opacity-1, rgba(14, 14, 14, 0.06)), 0 var(--shadow-y-axis-lg-2, 10px) var(--shadow-blur-lg-2, 15px) var(--shadow-spread-lg-2, -3px) var(--shadow-color-opacity-2, rgba(14, 14, 14, 0.1))}nv-notification [data-scope=container] [data-scope=icon]{flex-shrink:0}nv-notification [data-scope=container] [data-scope=dismiss]{padding:var(--button-sm-icon-button-padding, 8px);justify-content:center;align-items:center;gap:var(--button-sm-gap, 6px);display:flex;position:absolute;right:8px;top:8px;border-radius:var(--button-sm-border-radius, 4px);background:var(--components-button-lower-background, rgba(255, 255, 255, 0));color:var(--components-button-lower-icon)}nv-notification [data-scope=container] [data-scope=content]{display:flex;padding-right:var(--notification-padding-right);flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);flex:1 0 0}nv-notification [data-scope=container] [data-scope=content] [data-scope=heading]{display:flex;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;color:var(--components-notification-content-title);font-size:var(--notification-title-font-size);font-style:normal;font-weight:500;line-height:20px;}nv-notification [data-scope=container] [data-scope=content] [data-scope=message]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--notification-gap-y);align-self:stretch;color:var(--components-notification-content-description);font-variant-numeric:lining-nums tabular-nums slashed-zero;font-size:var(--font-size-sm, 14px);font-style:normal;font-weight:400;line-height:var(--line-height-sm, 20px)}nv-notification [data-scope=container] [data-scope=content] [data-scope=actions]{display:flex;padding:var(--spacing-2, 8px) 0;padding-bottom:0px;align-items:flex-start;gap:var(--notification-gap-x);align-self:stretch;margin-left:calc(-1 * var(--button-sm-padding-x))}nv-notification[feedback=information] [data-scope=container]{background-color:var(--components-notification-information-background);border-color:var(--components-notification-information-border)}nv-notification[feedback=information] [data-scope=container] [data-scope=icon]{color:var(--components-notification-information-icon)}nv-notification[feedback=information]>[data-scope=close]:focus,nv-notification[feedback=information]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=information]>[data-scope=close]:focus-visible,nv-notification[feedback=information]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-information-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=warning] [data-scope=container]{background-color:var(--components-notification-warning-background);border-color:var(--components-notification-warning-border)}nv-notification[feedback=warning] [data-scope=container] [data-scope=icon]{color:var(--components-notification-warning-icon)}nv-notification[feedback=warning]>[data-scope=close]:focus,nv-notification[feedback=warning]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=warning]>[data-scope=close]:focus-visible,nv-notification[feedback=warning]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-warning-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=error] [data-scope=container]{background-color:var(--components-notification-error-background);border-color:var(--components-notification-error-border)}nv-notification[feedback=error] [data-scope=container] [data-scope=icon]{color:var(--components-notification-error-icon)}nv-notification[feedback=error]>[data-scope=close]:focus,nv-notification[feedback=error]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=error]>[data-scope=close]:focus-visible,nv-notification[feedback=error]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-error-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=success] [data-scope=container]{background-color:var(--components-notification-success-background);border-color:var(--components-notification-success-border)}nv-notification[feedback=success] [data-scope=container] [data-scope=icon]{color:var(--components-notification-success-icon)}nv-notification[feedback=success]>[data-scope=close]:focus,nv-notification[feedback=success]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=success]>[data-scope=close]:focus-visible,nv-notification[feedback=success]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-success-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[feedback=neutral] [data-scope=container]{background-color:var(--components-notification-neutral-background);border-color:var(--components-notification-neutral-border)}nv-notification[feedback=neutral] [data-scope=container] [data-scope=icon]{color:var(--components-notification-neutral-icon)}nv-notification[feedback=neutral]>[data-scope=close]:focus,nv-notification[feedback=neutral]>[data-scope=close]:focus-within{outline:none}nv-notification[feedback=neutral]>[data-scope=close]:focus-visible,nv-notification[feedback=neutral]>[data-scope=close]:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-notification-neutral-border);outline-offset:calc(var(--focus-outline-offset) * 1)}nv-notification[emphasis=high] [data-scope=container]{border-width:1px;border-left-width:var(--notification-border-width-high-emphasis);padding-left:calc(var(--notification-padding) - var(--notification-border-width-high-emphasis) + 1px)}nv-notification[emphasis=medium] [data-scope=container]{border-width:var(--notification-border-width-low-emphasis);border-color:var(--color-content-low-border, #E3E3E3)}";
15
+ const NvNotificationStyle0 = nvNotificationCss;
16
+
17
+ const NvNotification = class {
18
+ constructor(hostRef) {
19
+ index.registerInstance(this, hostRef);
20
+ this.hiddenChanged = index.createEvent(this, "hiddenChanged", 7);
21
+ /****************************************************************************/
22
+ //#region PROPERTIES
23
+ /**
24
+ * Set a unique ID for the notification. Used for aria attributes and managing
25
+ * multiple notifications.
26
+ */
27
+ this.uid = v4.v4();
28
+ /**
29
+ * Specifies the notification type which determines the color and default icon.
30
+ */
31
+ this.feedback = 'information';
32
+ /**
33
+ * Adjusts the emphasis to make the notification more or less visually
34
+ * prominent to users. Use this to draw attention to important actions or
35
+ * reduce focus on less critical ones
36
+ */
37
+ this.emphasis = 'medium';
38
+ /**
39
+ * Allows the notification to be dismissed via a close button (x). The
40
+ * notification is not dismissible unless explicitly enabled.
41
+ */
42
+ this.dismissible = false;
43
+ /**
44
+ * Controls the visibility of the notification.
45
+ */
46
+ this.hidden = false; // eslint-disable-line @stencil-community/reserved-member-names
47
+ /**
48
+ * When true, the notification will be hidden initially, but internal changes
49
+ * will not be in a controlled state. Good for animating the notification in.
50
+ */
51
+ this.initiallyHidden = false;
52
+ //#endregion EVENTS
53
+ /****************************************************************************/
54
+ //#region INTERNAL
55
+ this.iconByFeedback = {
56
+ [constants.FeedbackColors.Warning]: 'alert-circle',
57
+ [constants.FeedbackColors.Information]: 'info-circle',
58
+ [constants.FeedbackColors.Success]: 'circle-check',
59
+ [constants.FeedbackColors.Error]: 'alert-triangle',
60
+ [constants.FeedbackColors.Neutral]: 'help',
61
+ };
62
+ this.roleByFeedback = {
63
+ [constants.FeedbackColors.Error]: 'alert',
64
+ [constants.FeedbackColors.Warning]: 'alert',
65
+ [constants.FeedbackColors.Information]: 'status',
66
+ [constants.FeedbackColors.Success]: 'status',
67
+ [constants.FeedbackColors.Neutral]: 'status',
68
+ };
69
+ }
70
+ //#endregion PROPERTIES
71
+ /****************************************************************************/
72
+ //#region METHODS
73
+ /**
74
+ * Dismisses the notification with an animation, after the animation is
75
+ * complete, the hiddenChanged event will be emitted with the value of true,
76
+ * and the hidden prop will be set to true.
77
+ */
78
+ async dismiss() {
79
+ await this.dismissAnimation();
80
+ }
81
+ /**
82
+ * Sets the hidden prop to false, and shows the notification with an
83
+ * animation, after the animation is complete, the hiddenChanged event will be
84
+ * emitted with the value of false.
85
+ */
86
+ async show() {
87
+ await this.showAnimation();
88
+ }
89
+ getDefaultIcon() {
90
+ var _a;
91
+ return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
92
+ }
93
+ getAriaRole() {
94
+ var _a;
95
+ return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
96
+ }
97
+ getAriaLive() {
98
+ return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
99
+ }
100
+ getHeadingId() {
101
+ return this.heading ? `nv-notification-${this.uid}-heading` : null;
102
+ }
103
+ getMessageId() {
104
+ return this.message ? `nv-notification-${this.uid}-message` : null;
105
+ }
106
+ async showAnimation() {
107
+ this.hidden = false;
108
+ const { setFadeIn } = fade_animation.useFade(this.container);
109
+ const { expand } = collapse_animation.useCollapse(this.el, {
110
+ duration: 300,
111
+ overflow: 'visible',
112
+ });
113
+ const { slideY, setSlideY } = slide_animation.useSlide(this.container, {
114
+ duration: 300,
115
+ });
116
+ setSlideY(-100);
117
+ setFadeIn();
118
+ await timeline_animation.parallel(slideY({ from: -100, to: 0 }), expand).start();
119
+ this.hiddenChanged.emit(false);
120
+ }
121
+ getSlideDestination(pos) {
122
+ switch (pos) {
123
+ case constants.NotificationPosition.TopRight:
124
+ case constants.NotificationPosition.BottomRight:
125
+ return { axis: 'x', to: 100 }; // right
126
+ case constants.NotificationPosition.TopLeft:
127
+ case constants.NotificationPosition.BottomLeft:
128
+ return { axis: 'x', to: -100 }; // left
129
+ case constants.NotificationPosition.TopCenter:
130
+ return { axis: 'y', to: -100 }; // up
131
+ case constants.NotificationPosition.BottomCenter:
132
+ return { axis: 'y', to: 100 }; // down
133
+ default:
134
+ return { axis: 'x', to: 100 }; // fallback
135
+ }
136
+ }
137
+ async dismissAnimation() {
138
+ var _a;
139
+ const position = (_a = this.el
140
+ .closest('nv-notificationcontainer')) === null || _a === void 0 ? void 0 : _a.getAttribute('position');
141
+ const destination = this.getSlideDestination(position);
142
+ const { fadeOut } = fade_animation.useFade(this.container, { duration: 300 });
143
+ const { slideX, slideY, setSlideReset } = slide_animation.useSlide(this.container, {
144
+ duration: 500,
145
+ });
146
+ const { collapse } = collapse_animation.useCollapse(this.el, {
147
+ duration: 500,
148
+ overflow: 'visible',
149
+ });
150
+ const slide = destination.axis === 'x'
151
+ ? slideX({ from: 0, to: destination.to })
152
+ : slideY({ from: 0, to: destination.to });
153
+ setSlideReset();
154
+ await timeline_animation.parallel(fadeOut, slide, collapse).start();
155
+ this.hidden = true;
156
+ this.hiddenChanged.emit(true);
157
+ }
158
+ //#endregion INTERNAL
159
+ /****************************************************************************/
160
+ //#region LIFECYCLE
161
+ componentWillLoad() {
162
+ this.headingSlot = this.el.querySelector('[slot="heading"]');
163
+ this.messageSlot = this.el.querySelector('[slot="content"]');
164
+ this.actionsSlot = this.el.querySelector('[slot="actions"]');
165
+ if (this.initiallyHidden)
166
+ this.hidden = true;
167
+ }
168
+ //#endregion LIFECYCLE
169
+ /****************************************************************************/
170
+ //#region RENDER
171
+ render() {
172
+ var _a, _b, _c;
173
+ return (index.h(index.Host, { key: '6e0b8abd9cbcb62b0b133db77520aa5aaa4173c9', 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: '41b2ad35bf5220333e132d61f8843d1136cb1f40', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '63116f239f7108ae945845c247c712827d8ae8a6', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'dc19bf166c6d2eccd3d40384d43206457f0d03f0', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'e673ac1cc78300bc3425018a0cdfc4b90c679796', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md", "data-scope": "icon" }), index.h("div", { key: '95cb6ec06d89cda8e5170f9ff0f863b6b0b7e32d', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: 'ed654c0271d2ff8538295d8f7bf58a9754abb4c9', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: '00cc14a709059b9caf2117174ef7fcc310f5965f', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: 'c7c0bcbc2b54fdfdf8280af6a377929bf17fd688', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: '946db5aeb667b67f52f51adbb1b8f600325f937e', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: 'd94560b658507a515a1360057121e933b95e6fe6', "data-scope": "actions" }, index.h("slot", { key: 'db185d3924c7d1fbeb30578992f2375e92a0d4bc', name: "actions" })))))));
174
+ }
175
+ get el() { return index.getElement(this); }
176
+ };
177
+ NvNotification.style = NvNotificationStyle0;
178
+
179
+ exports.nv_notification = NvNotification;
180
+
181
+ //# sourceMappingURL=nv-notification.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"nv-notification.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,quMAAquM,CAAC;AAChwM,6BAAe,iBAAiB;;MCgCnB,cAAc;IAL3B;;;;;;;;;QAoBW,QAAG,GAAWA,KAAM,EAAE,CAAC;;;;QAMvB,aAAQ,GAAwB,aAAa,CAAC;;;;;;QAQ9C,aAAQ,GAA8B,QAAQ,CAAC;;;;;QA2B/C,gBAAW,GAAY,KAAK,CAAC;;;;QAMtC,WAAM,GAAY,KAAK,CAAC;;;;;QAOf,oBAAe,GAAY,KAAK,CAAC;;;;QA0ClC,mBA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I,CAAC,YAAY,EAAE,gBAAa,SAAS,IAC9CA,mEAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACxC,CACL,EAEA,IAAI,CAAC,WAAW,KACfA,gFAAgB,SAAS,IACvBA,mEAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACP,CACG,CACF,CACD,EACP;KACH;;;;;;;","names":["uuidv4","FeedbackColors","useFade","useCollapse","useSlide","parallel","NotificationPosition","h","Host"],"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@import \"../../../styles/focus-ring\";\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-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}","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()\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"],"version":3}
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-c56424e5.js');
6
+
7
+ const nvNotificationcontainerCss = "nv-notificationcontainer{position:fixed;display:flex;flex-direction:column;padding:var(--spacing-2);padding-top:0;z-index:9999;pointer-events:none;width:100%;max-width:512px}nv-notificationcontainer.position-top-right{top:0;right:0}nv-notificationcontainer.position-top-right nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer.position-top-left{top:0;left:0}nv-notificationcontainer.position-top-left nv-notification{margin-bottom:var(--spacing-2)}nv-notificationcontainer.position-top-center{top:0;left:50%;transform:translateX(-50%)}nv-notificationcontainer.position-top-center nv-notification{margin-bottom:var(--spacing-2)}nv-notificationcontainer.position-bottom-right{bottom:0;right:0;flex-direction:column-reverse}nv-notificationcontainer.position-bottom-right nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer.position-bottom-left{bottom:0;left:0;flex-direction:column-reverse}nv-notificationcontainer.position-bottom-left nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer.position-bottom-center{bottom:0;left:50%;transform:translateX(-50%);flex-direction:column-reverse}nv-notificationcontainer.position-bottom-center nv-notification{margin-top:var(--spacing-2)}nv-notificationcontainer>*{pointer-events:auto}";
8
+ const NvNotificationcontainerStyle0 = nvNotificationcontainerCss;
9
+
10
+ const NvNotificationContainer = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ /****************************************************************************/
14
+ //#region PROPERTIES
15
+ /**
16
+ * Position of the notification container on the screen.
17
+ */
18
+ this.position = 'top-right';
19
+ }
20
+ //#endregion PROPERTIES
21
+ /****************************************************************************/
22
+ //#region METHODS
23
+ //#endregion METHODS
24
+ /****************************************************************************/
25
+ //#region WATCHERS
26
+ //#endregion WATCHERS
27
+ /****************************************************************************/
28
+ //#region LIFECYCLE
29
+ //#endregion LIFECYCLE
30
+ /****************************************************************************/
31
+ //#region EVENTS
32
+ //#endregion EVENTS
33
+ /****************************************************************************/
34
+ //#region RENDER
35
+ render() {
36
+ return (index.h(index.Host, { key: 'db4005459b926bcfef55e76f61bff0b5635f2872', class: `position-${this.position}` }, index.h("slot", { key: '518909541ca3e9e82168436a43d5362c414c0ec3' })));
37
+ }
38
+ };
39
+ NvNotificationContainer.style = NvNotificationcontainerStyle0;
40
+
41
+ exports.nv_notificationcontainer = NvNotificationContainer;
42
+
43
+ //# sourceMappingURL=nv-notificationcontainer.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"nv-notificationcontainer.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,4vCAA4vC,CAAC;AAChyC,sCAAe,0BAA0B;;MCY5B,uBAAuB;IALpC;;;;;;;QAaW,aAAQ,GAA8B,WAAW,CAAC;KAyB5D;;;;;;;;;;;;;;;;IARC,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,KAAK,EAAE,YAAY,IAAI,CAAC,QAAQ,EAAE,IACtCD,oEAAa,CACR,EACP;KACH;;;;;;","names":["h","Host"],"sources":["src/components/nv-notificationcontainer/nv-notificationcontainer.scss?tag=nv-notificationcontainer","src/components/nv-notificationcontainer/nv-notificationcontainer.tsx"],"sourcesContent":["@mixin base-styles() {\n position: fixed;\n display: flex;\n flex-direction: column;\n padding: var(--spacing-2);\n padding-top: 0;\n z-index: 9999;\n pointer-events: none;\n width: 100%;\n max-width: 512px;\n}\n\nnv-notificationcontainer {\n @include base-styles();\n\n // Default position\n &.position-top-right {\n top: 0;\n right: 0;\n nv-notification {\n margin-top: var(--spacing-2);\n }\n }\n\n &.position-top-left {\n top: 0;\n left: 0;\n nv-notification {\n margin-bottom: var(--spacing-2);\n }\n }\n\n &.position-top-center {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n nv-notification {\n margin-bottom: var(--spacing-2);\n }\n }\n\n &.position-bottom-right {\n bottom: 0;\n right: 0;\n flex-direction: column-reverse;\n nv-notification {\n margin-top: var(--spacing-2);\n }\n }\n\n &.position-bottom-left {\n bottom: 0;\n left: 0;\n flex-direction: column-reverse;\n nv-notification {\n margin-top: var(--spacing-2);\n }\n }\n\n &.position-bottom-center {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n flex-direction: column-reverse;\n nv-notification {\n margin-top: var(--spacing-2);\n }\n }\n\n // Allow pointer events on child elements\n > * {\n pointer-events: auto;\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport { NotificationPosition } from '../../utils/constants';\n\n/**\n * @deprecated [EXPERIMENTAL]\n * @experimental - Container for notifications TODO: add animations etc...\n * @slot default - Child content of the component.\n */\n@Component({\n tag: 'nv-notificationcontainer',\n styleUrl: 'nv-notificationcontainer.scss',\n shadow: false,\n})\nexport class NvNotificationContainer {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Position of the notification container on the screen.\n */\n @Prop({ reflect: true })\n readonly position: `${NotificationPosition}` = 'top-right';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n render() {\n return (\n <Host class={`position-${this.position}`}>\n <slot></slot>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"version":3}
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-c56424e5.js');
6
- require('./stylefire.es-717e022a.js');
7
- const fade_animation = require('./fade.animation-644b5c4d.js');
8
- const grow_animation = require('./grow.animation-6d003803.js');
6
+ const fade_animation = require('./fade.animation-9294e9ee.js');
7
+ const grow_animation = require('./grow.animation-f1cef0ad.js');
8
+ require('./style-value-types.es-eea2f16f.js');
9
9
  const events_utils = require('./events.utils-52846a7d.js');
10
10
 
11
11
  /**
@@ -2384,7 +2384,7 @@ const NvPopover = class {
2384
2384
  /****************************************************************************/
2385
2385
  //#region RENDER
2386
2386
  render() {
2387
- return (index.h(index.Host, { key: '290f9c76a0a4db0648061ce3778bec21b5926ae4' }, index.h("slot", { key: 'ca90cba5de160880308dfc12b1f82f0047c57b75', name: "trigger" }), index.h("div", { key: 'f9b5e11a4a6fd63fe1a640acd936cf883fc91563', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: '39f7287b5614326cc5eb29be9b94c70f1574671b', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '45ac045f3669f3ebe3e8200bff75b26284e609a6', name: "content" }))));
2387
+ return (index.h(index.Host, { key: '1af6f61d4b3d87e30d2311708fcd61979170aa96' }, index.h("slot", { key: '113813292e083fa4b188f3e5750549a08fc8c3aa', name: "trigger" }), index.h("div", { key: '7687d6ae12b24ed575843f0d171d911eb0994675', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: '162f1f50be23da7fadac8f76507e6d8d058fb58b', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '57ecf69ef395a045cb35e7db9f380027dfceff6e', name: "content" }))));
2388
2388
  }
2389
2389
  get el() { return index.getElement(this); }
2390
2390
  static get watchers() { return {
@@ -14,7 +14,7 @@ const NvRow = class {
14
14
  /****************************************************************************/
15
15
  //#region RENDER
16
16
  render() {
17
- return (index.h(index.Host, { key: '91a990d393ce32b86f66729fc69068a4a5754fe4' }, index.h("slot", { key: '867eaa3d6b5760f3a8763a59d36c592d56325e9e' })));
17
+ return (index.h(index.Host, { key: '9623a4c73a5a2557b2ba7eb346ae0740ca7291c5' }, index.h("slot", { key: '502ea804deec9e91057bfaf6f2fa4fdb4a5822c3' })));
18
18
  }
19
19
  };
20
20
  NvRow.style = NvRowStyle0;
@@ -23,7 +23,7 @@ const NvStack = class {
23
23
  /****************************************************************************/
24
24
  //#region RENDER
25
25
  render() {
26
- return (index.h(index.Host, { key: '6a314d1f6679d4cbbd01fc08ce54fc0f7709e3e0', class: clsx.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: 'd3c5d0fd8f44b23a3cfae00aa39de8722babca2a' })));
26
+ return (index.h(index.Host, { key: '8f771805224c769b5a87f5c550ddbcb8f888d002', class: clsx.clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, index.h("slot", { key: '6fcd46cfd74415d2f07c762b065e3aa0f0194764' })));
27
27
  }
28
28
  };
29
29
  NvStack.style = NvStackStyle0;
@@ -315,14 +315,14 @@ const NvTable = class {
315
315
  const rows = !this.table || this.table === undefined || this.parsedData.length === 0
316
316
  ? []
317
317
  : this.table.data;
318
- return (index.h(index.Host, { key: '1b6e90df16e6f35fab46bdd7b9366122ace0c93f' }, index.h("div", { key: '77d54a2d44fad92dd8eae7bba4752adb6da28406', class: "hidden" }, index.h("slot", { key: 'c5f9508d2ffcd61dd660acd11df74d7d1bf12516' })), index.h("slot", { key: 'b1dc1a74cafbd302a9b81d1226ee7e7f4061c357', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("table", { class: "table" }, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", { class: "table-header" }, index.h("tr", null, headerGroups &&
318
+ return (index.h(index.Host, { key: '08082f0800c32a59606968aa2a80cfa3c2f07960' }, index.h("div", { key: 'f55f5409f45d90ef072abb09006ef6366e7e8c95', class: "hidden" }, index.h("slot", { key: '0b5326e8c7c6f97f419819744a132335d4435bb4' })), index.h("slot", { key: '07d4538957b466ed332cd598e2c132d85a801979', name: "before" }), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("table", { class: "table" }, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", { class: "table-header" }, index.h("tr", null, headerGroups &&
319
319
  headerGroups.map(col => {
320
320
  return (index.h("th", { key: col.name }, this.renderTemplate(this.headerTemplateCache.get(col.name), {}) || col.header));
321
321
  })))), index.h("tbody", { class: "table-body" }, !rows || rows.length === 0 ? (index.h("tr", null, index.h("td", { colSpan: headerGroups.length || 12, class: "no-data" }, this.noDataMessage))) : (rows.map(row => (index.h("tr", { key: JSON.stringify(row) }, headerGroups.map(col => {
322
322
  var _a;
323
323
  return (index.h("td", null, this.renderTemplate(this.templateCache.get(col.name), row) ||
324
324
  ((_a = row[col.name]) !== null && _a !== void 0 ? _a : this.fallbackValue)));
325
- })))))))), index.h("slot", { key: '2b90fd6d1e626faff3e7eb08e2b319ce02de4ec3', name: "after" })));
325
+ })))))))), index.h("slot", { key: '1f505261da2c2e05511940ec90f7375981cb0823', name: "after" })));
326
326
  }
327
327
  get el() { return index.getElement(this); }
328
328
  static get watchers() { return {
@@ -66,8 +66,8 @@ const NvToggle = class {
66
66
  /****************************************************************************/
67
67
  //#region RENDER
68
68
  render() {
69
- return (index.h(index.Host, { key: 'caafe3f48598a1323132e20b0492070e73c95885', class: clsx.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '2b95ace9e3713bfeda007d8d9eb693fca688b45f', class: "input-container" }, index.h("input", { key: '703e41e527f018071ac7d02d8318314014568995', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '54b2d88481800d6f988900ca6405a45ecad48352', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '41f04a6166fada0f522e5a6682d50b9e14d26ca1', htmlFor: this.inputId, class: clsx.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '6f24ee6e06ea767e04263a3451e29b24b8d8bf95', name: "label" }, this.label))), (this.description ||
70
- this.el.querySelector('[slot="description"]')) && (index.h("div", { key: 'ec177dadeadba62b9e69a6f3577a7a8166abb029', class: "description" }, index.h("slot", { key: 'd52e04c1aa3a607015f01fed95cb9f2300071087', name: "description" }, this.description))))));
69
+ return (index.h(index.Host, { key: '0f440b59ac0c32d9abe9577668d7045081819b49', class: clsx.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '4289435e34eb31a8e59e00cefcba2e17e98bd03a', class: "input-container" }, index.h("input", { key: '1b7d05f77fd32cece9eed2e6cf79c7e2e707f64c', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), index.h("div", { key: '6d78d7e80eb790bbead21bba6108329f9ded3746', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '524a2c2542a45945bddb688c5dff6c9426d58570', htmlFor: this.inputId, class: clsx.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '59eda4b826602062620e7167acf3c8de0f77ebef', name: "label" }, this.label))), (this.description ||
70
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '6e8412879ed60fc6806464432348bd52483e3567', class: "description" }, index.h("slot", { key: '85a876130569a5a4051e271eaf1cf49593a014a6', name: "description" }, this.description))))));
71
71
  }
72
72
  static get formAssociated() { return true; }
73
73
  get el() { return index.getElement(this); }
@@ -48,7 +48,7 @@ const NvTogglebutton = class {
48
48
  /****************************************************************************/
49
49
  //#region RENDER
50
50
  render() {
51
- return (index.h(index.Host, { key: '81e773d6bafc0fd451fb7e71cb14ca709af2d07e', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: '4cec2d6ae5388cdfd285ab15af356e9833b0ccb3' })));
51
+ return (index.h(index.Host, { key: 'b9e37fc1cb34272bca476c7b61db173ab2a9d238', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: 'cf9cf3445fd93873def1f9fa9cbec46c35600025' })));
52
52
  }
53
53
  };
54
54
  NvTogglebutton.style = NvTogglebuttonStyle0;
@@ -156,7 +156,7 @@ const NvTogglebuttongroup = class {
156
156
  /****************************************************************************/
157
157
  //#region RENDER
158
158
  render() {
159
- return (index.h(index.Host, { key: '52e2d0e1b8f0740a50a8d4d1e93af494e957b521' }, index.h("slot", { key: 'a82248437817b4fd7aa1c64e4d544050a71b4311' })));
159
+ return (index.h(index.Host, { key: 'edb5b3bb7651b482cd02625038e36cdb35743453' }, index.h("slot", { key: '2b0bc4891b885ecf7febdce7062fc02b120ec939' })));
160
160
  }
161
161
  get el() { return index.getElement(this); }
162
162
  static get watchers() { return {
@@ -46,7 +46,7 @@ const NvTooltip = class {
46
46
  /****************************************************************************/
47
47
  //#region RENDER
48
48
  render() {
49
- return (index.h(index.Host, { key: '02f95c0f1f41fe11785859fc8f1bf585cbe35af5' }, index.h("slot", { key: '338049b6a5ce354b5ddcba1f183488e2f6b2116e' }), index.h("nv-popover", { key: 'f2e82343908d4e59a3ecf93f791c2756f29714ae', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: 'ee35eff1233d1d03accdff3260b6d71ef0815d47', slot: "content" }, this.message), index.h("slot", { key: '1a5cdc8a671ea9f3f84cb0414579b9a85a183630', name: "content" }))));
49
+ return (index.h(index.Host, { key: '5d5facbf2a0487bda4fbae49913a2cb4f69dcf5a' }, index.h("slot", { key: '91080d347f3473879109f7b0b59b159f5bb5979b' }), index.h("nv-popover", { key: '876e5e2487d1b2b5182e42909a6edeab5b3e9db2', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: 'e30ce16ed27e41dee7359fb44ccba7a780e72d37', slot: "content" }, this.message), index.h("slot", { key: '395c75d7f45bab9aaebf979bd75087058b979350', name: "content" }))));
50
50
  }
51
51
  get el() { return index.getElement(this); }
52
52
  };
@@ -0,0 +1,92 @@
1
+ 'use strict';
2
+
3
+ const fade_animation = require('./fade.animation-9294e9ee.js');
4
+ const styleValueTypes_es = require('./style-value-types.es-eea2f16f.js');
5
+
6
+ const useSlide = (node, { duration } = { duration: 200 }) => {
7
+ const nodeStyler = fade_animation.index(node);
8
+ /**
9
+ * Will animate the translateX property.
10
+ *
11
+ * @param {object} options - The options for the animation.
12
+ * @param {number} options.from - The starting value for the translateX property.
13
+ * @param {number} options.to - The ending value for the translateX property.
14
+ * @returns {Promise<void>} - A promise that resolves when the animation is
15
+ * complete.
16
+ */
17
+ const slideX = (options = { from: 0, to: 100 }) => () => {
18
+ return new Promise(resolve => {
19
+ styleValueTypes_es.animate({
20
+ from: { x: options.from },
21
+ to: { x: options.to },
22
+ ease: styleValueTypes_es.easeOut,
23
+ duration,
24
+ onUpdate(latest) {
25
+ nodeStyler.set({ transform: `translateX(${latest.x}%)` });
26
+ },
27
+ onComplete() {
28
+ resolve();
29
+ },
30
+ });
31
+ });
32
+ };
33
+ /**
34
+ * Will animate the translateY property.
35
+ *
36
+ * @param {object} options - The options for the animation.
37
+ * @param {number} options.from - The starting value for the translateY property.
38
+ * @param {number} options.to - The ending value for the translateY property.
39
+ * @returns {Promise<void>} - A promise that resolves when the animation is
40
+ * complete.
41
+ */
42
+ const slideY = (options = { from: 0, to: 100 }) => () => {
43
+ return new Promise(resolve => {
44
+ styleValueTypes_es.animate({
45
+ from: { y: options.from },
46
+ to: { y: options.to },
47
+ ease: styleValueTypes_es.easeOut,
48
+ duration,
49
+ onUpdate(latest) {
50
+ nodeStyler.set({ transform: `translateY(${latest.y}%)` });
51
+ },
52
+ onComplete() {
53
+ resolve();
54
+ },
55
+ });
56
+ });
57
+ };
58
+ /**
59
+ * Applies the slideX styles without animating, useful when initial state
60
+ * is slid out.
61
+ *
62
+ * @param {number} amount - The amount to translate the element by.
63
+ * @returns {function} - A function that applies the slideX styles.
64
+ */
65
+ const setSlideX = (amount = 100) => nodeStyler.set({ transform: `translateX(${amount}%)` });
66
+ /**
67
+ * Applies the slideY styles without animating, useful when initial state
68
+ * is slid out.
69
+ *
70
+ * @param {number} amount - The amount to translate the element by.
71
+ * @returns {function} - A function that applies the slideY styles.
72
+ */
73
+ const setSlideY = (amount = 100) => nodeStyler.set({ transform: `translateY(${amount}%)` });
74
+ /**
75
+ * Applies the slideIn styles without animating, useful when initial state
76
+ * is slid in.
77
+ */
78
+ function setSlideReset() {
79
+ nodeStyler.set({ transform: `translateX(${0}%) translateY(${0}%)` });
80
+ }
81
+ return {
82
+ slideX,
83
+ slideY,
84
+ setSlideX,
85
+ setSlideY,
86
+ setSlideReset,
87
+ };
88
+ };
89
+
90
+ exports.useSlide = useSlide;
91
+
92
+ //# sourceMappingURL=slide.animation-8bc27ed6.js.map
@@ -0,0 +1 @@
1
+ {"file":"slide.animation-8bc27ed6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,CAAC;KACJ,CAAC;;;;;;;;IASJ,MAAM,SAAS,GAAG,CAAC,MAAM,GAAG,GAAG,KAC7B,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,IAAI,EAAE,CAAC,CAAC;;;;;;;;IAS1D,MAAM,SAAS,GAAG,CAAC,MAAM,GAAG,GAAG,KAC7B,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,IAAI,EAAE,CAAC,CAAC;;;;;IAM1D,SAAS,aAAa;QACpB,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC;KACtE;IAED,OAAO;QACL,MAAM;QACN,MAAM;QACN,SAAS;QACT,SAAS;QACT,aAAa;KACd,CAAC;AACJ;;;;","names":["styler","animate","easeOut"],"sources":["src/animations/slide.animation.ts"],"sourcesContent":["import { animate, easeOut } from 'popmotion';\nimport styler from 'stylefire';\n\nexport type SlideOptions = {\n /** How long the animation should take in ms @default 200 */\n duration?: number;\n};\n\nconst useSlide = (\n node: HTMLElement,\n { duration }: SlideOptions = { duration: 200 },\n) => {\n const nodeStyler = styler(node);\n\n /**\n * Will animate the translateX property.\n *\n * @param {object} options - The options for the animation.\n * @param {number} options.from - The starting value for the translateX property.\n * @param {number} options.to - The ending value for the translateX property.\n * @returns {Promise<void>} - A promise that resolves when the animation is\n * complete.\n */\n const slideX =\n (\n options: {\n /** The starting percentage for the translateX property. */\n from: number;\n /** The ending percentage for the translateX property. */\n to: number;\n } = { from: 0, to: 100 },\n ) =>\n () => {\n return new Promise<void>(resolve => {\n animate({\n from: { x: options.from },\n to: { x: options.to },\n ease: easeOut,\n duration,\n onUpdate(latest) {\n nodeStyler.set({ transform: `translateX(${latest.x}%)` });\n },\n onComplete() {\n resolve();\n },\n });\n });\n };\n\n /**\n * Will animate the translateY property.\n *\n * @param {object} options - The options for the animation.\n * @param {number} options.from - The starting value for the translateY property.\n * @param {number} options.to - The ending value for the translateY property.\n * @returns {Promise<void>} - A promise that resolves when the animation is\n * complete.\n */\n const slideY =\n (\n options: {\n /** The starting percentage for the translateY property. */\n from: number;\n /** The ending percentage for the translateY property. */\n to: number;\n } = { from: 0, to: 100 },\n ) =>\n () => {\n return new Promise<void>(resolve => {\n animate({\n from: { y: options.from },\n to: { y: options.to },\n ease: easeOut,\n duration,\n onUpdate(latest) {\n nodeStyler.set({ transform: `translateY(${latest.y}%)` });\n },\n onComplete() {\n resolve();\n },\n });\n });\n };\n\n /**\n * Applies the slideX styles without animating, useful when initial state\n * is slid out.\n *\n * @param {number} amount - The amount to translate the element by.\n * @returns {function} - A function that applies the slideX styles.\n */\n const setSlideX = (amount = 100) =>\n nodeStyler.set({ transform: `translateX(${amount}%)` });\n\n /**\n * Applies the slideY styles without animating, useful when initial state\n * is slid out.\n *\n * @param {number} amount - The amount to translate the element by.\n * @returns {function} - A function that applies the slideY styles.\n */\n const setSlideY = (amount = 100) =>\n nodeStyler.set({ transform: `translateY(${amount}%)` });\n\n /**\n * Applies the slideIn styles without animating, useful when initial state\n * is slid in.\n */\n function setSlideReset() {\n nodeStyler.set({ transform: `translateX(${0}%) translateY(${0}%)` });\n }\n\n return {\n slideX,\n slideY,\n setSlideX,\n setSlideY,\n setSlideReset,\n };\n};\n\nexport { useSlide };\n"],"version":3}