@nova-design-system/nova-webcomponents 3.12.0 → 3.13.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 (395) hide show
  1. package/dist/cjs/collapse.animation-47397763.js +218 -0
  2. package/dist/cjs/collapse.animation-47397763.js.map +1 -0
  3. package/dist/cjs/{constants-aac59496.js → constants-52f6f8e9.js} +6 -1
  4. package/dist/cjs/constants-52f6f8e9.js.map +1 -0
  5. package/dist/cjs/fade.animation-cf6eba0d.js +726 -0
  6. package/dist/cjs/fade.animation-cf6eba0d.js.map +1 -0
  7. package/dist/cjs/{grow.animation-6d003803.js → grow.animation-9258ba63.js} +6 -5
  8. package/dist/cjs/grow.animation-9258ba63.js.map +1 -0
  9. package/dist/cjs/index-c56424e5.js +4 -0
  10. package/dist/cjs/index.cjs.js +16 -7
  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 +4 -4
  22. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-calendar.cjs.entry.js +14 -10
  24. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  25. package/dist/cjs/nv-datagrid.cjs.entry.js +1 -1
  26. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  27. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +9 -6
  28. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
  29. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +0 -30
  30. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  31. package/dist/cjs/nv-fieldnumber.cjs.entry.js +1 -1
  32. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nv-fieldslider.cjs.entry.js +24 -16
  34. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nv-fieldtime.cjs.entry.js +1 -1
  36. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  37. package/dist/cjs/nv-notification.cjs.entry.js +120 -0
  38. package/dist/cjs/nv-notification.cjs.entry.js.map +1 -0
  39. package/dist/cjs/nv-popover.cjs.entry.js +4 -4
  40. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  41. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  42. package/dist/cjs/nv-table.cjs.entry.js +2 -2
  43. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
  45. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
  46. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  47. package/dist/cjs/slide.animation-bedfc827.js +70 -0
  48. package/dist/cjs/slide.animation-bedfc827.js.map +1 -0
  49. package/dist/cjs/{stylefire.es-717e022a.js → style-value-types.es-eea2f16f.js} +51 -696
  50. package/dist/cjs/style-value-types.es-eea2f16f.js.map +1 -0
  51. package/dist/cjs/{timeline.animation-155e8839.js → timeline.animation-2878afb6.js} +20 -1
  52. package/dist/cjs/timeline.animation-2878afb6.js.map +1 -0
  53. package/dist/collection/animations/collapse.animation.js +110 -50
  54. package/dist/collection/animations/collapse.animation.js.map +1 -1
  55. package/dist/collection/animations/index.js +1 -0
  56. package/dist/collection/animations/index.js.map +1 -1
  57. package/dist/collection/animations/slide.animation.js +65 -0
  58. package/dist/collection/animations/slide.animation.js.map +1 -0
  59. package/dist/collection/animations/timeline.animation.js +19 -1
  60. package/dist/collection/animations/timeline.animation.js.map +1 -1
  61. package/dist/collection/collection-manifest.json +1 -0
  62. package/dist/collection/components/nv-accordion/nv-accordion.docs.js +78 -20
  63. package/dist/collection/components/nv-accordion/nv-accordion.docs.js.map +1 -1
  64. package/dist/collection/components/nv-accordion/nv-accordion.js +88 -68
  65. package/dist/collection/components/nv-accordion/nv-accordion.js.map +1 -1
  66. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js +70 -36
  67. package/dist/collection/components/nv-accordion-item/nv-accordion-item.js.map +1 -1
  68. package/dist/collection/components/nv-accordion-item/styles/nv-accordion-item.css +3 -0
  69. package/dist/collection/components/nv-alert/nv-alert.css +1 -1
  70. package/dist/collection/components/nv-alert/nv-alert.js +6 -6
  71. package/dist/collection/components/nv-alert/nv-alert.js.map +1 -1
  72. package/dist/collection/components/nv-calendar/nv-calendar.css +4 -0
  73. package/dist/collection/components/nv-calendar/nv-calendar.docs.js +14 -0
  74. package/dist/collection/components/nv-calendar/nv-calendar.docs.js.map +1 -1
  75. package/dist/collection/components/nv-calendar/nv-calendar.js +47 -3
  76. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  77. package/dist/collection/components/nv-calendar/partials/calendar-actions.js +2 -2
  78. package/dist/collection/components/nv-calendar/partials/calendar-actions.js.map +1 -1
  79. package/dist/collection/components/nv-dialog/nv-dialog.docs.js +8 -0
  80. package/dist/collection/components/nv-dialog/nv-dialog.docs.js.map +1 -1
  81. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +13 -11
  82. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -1
  83. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +0 -30
  84. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  85. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +1 -1
  86. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -1
  87. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +0 -1
  88. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -1
  89. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +10 -10
  90. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -1
  91. package/dist/collection/components/nv-fieldslider/partials/field-input.js +13 -5
  92. package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -1
  93. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +27 -0
  94. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js +0 -1
  95. package/dist/collection/components/nv-fieldtime/nv-fieldtime.docs.js.map +1 -1
  96. package/dist/collection/components/nv-notification/nv-notification.docs.js +72 -0
  97. package/dist/collection/components/nv-notification/nv-notification.docs.js.map +1 -0
  98. package/dist/collection/components/nv-notification/nv-notification.js +333 -0
  99. package/dist/collection/components/nv-notification/nv-notification.js.map +1 -0
  100. package/dist/collection/components/nv-notification/styles/nv-notification.css +155 -0
  101. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  102. package/dist/collection/components/nv-row/nv-row.js +1 -1
  103. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  104. package/dist/collection/components/nv-table/nv-table.js +2 -2
  105. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  106. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  107. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js +0 -1
  108. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.docs.js.map +1 -1
  109. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
  110. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  111. package/dist/collection/utils/constants.js +5 -0
  112. package/dist/collection/utils/constants.js.map +1 -1
  113. package/dist/components/index.js +9 -6
  114. package/dist/components/index.js.map +1 -1
  115. package/dist/components/nv-accordion-item.js +1 -1
  116. package/dist/components/nv-accordion.js +88 -71
  117. package/dist/components/nv-accordion.js.map +1 -1
  118. package/dist/components/nv-alert.js +13 -13
  119. package/dist/components/nv-alert.js.map +1 -1
  120. package/dist/components/nv-avatar.js +2 -2
  121. package/dist/components/nv-badge.js +1 -1
  122. package/dist/components/nv-breadcrumb.js +2 -2
  123. package/dist/components/nv-button.js +1 -1
  124. package/dist/components/nv-calendar.js +1 -1
  125. package/dist/components/nv-datagrid.js +3 -3
  126. package/dist/components/nv-dialog.js +4 -4
  127. package/dist/components/nv-dialogfooter.js +1 -1
  128. package/dist/components/nv-fielddate.js +5 -5
  129. package/dist/components/nv-fielddaterange.js +5 -5
  130. package/dist/components/nv-fielddropdown.js +4 -4
  131. package/dist/components/nv-fielddropdownitem.js +1 -1
  132. package/dist/components/nv-fieldmultiselect.js +4 -34
  133. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  134. package/dist/components/nv-fieldnumber.js +1 -1
  135. package/dist/components/nv-fieldpassword.js +2 -2
  136. package/dist/components/nv-fieldselect.js +2 -2
  137. package/dist/components/nv-fieldslider.js +27 -19
  138. package/dist/components/nv-fieldslider.js.map +1 -1
  139. package/dist/components/nv-fieldtext.js +1 -1
  140. package/dist/components/nv-fieldtime.js +4 -4
  141. package/dist/components/nv-icon.js +1 -1
  142. package/dist/components/nv-iconbutton.js +1 -1
  143. package/dist/components/nv-menu.js +3 -3
  144. package/dist/components/nv-menuitem.js +1 -1
  145. package/dist/components/nv-notification.d.ts +11 -0
  146. package/dist/components/nv-notification.js +150 -0
  147. package/dist/components/nv-notification.js.map +1 -0
  148. package/dist/components/nv-popover.js +1 -1
  149. package/dist/components/nv-row.js +1 -1
  150. package/dist/components/nv-stack.js +1 -1
  151. package/dist/components/nv-table.js +2 -2
  152. package/dist/components/nv-toggle.js +2 -2
  153. package/dist/components/nv-togglebutton.js +1 -1
  154. package/dist/components/nv-togglebuttongroup.js +1 -1
  155. package/dist/components/nv-tooltip.js +1 -1
  156. package/dist/components/{p-2030d84d.js → p-0b5816f7.js} +2 -2
  157. package/dist/components/{p-2030d84d.js.map → p-0b5816f7.js.map} +1 -1
  158. package/dist/components/{p-5f594b35.js → p-2277cfc8.js} +7 -2
  159. package/dist/components/p-2277cfc8.js.map +1 -0
  160. package/dist/components/{p-57ae32bc.js → p-2854cf01.js} +2 -2
  161. package/dist/components/{p-57ae32bc.js.map → p-2854cf01.js.map} +1 -1
  162. package/dist/components/{p-095c8285.js → p-2de17259.js} +2 -2
  163. package/dist/components/{p-095c8285.js.map → p-2de17259.js.map} +1 -1
  164. package/dist/components/p-31591941.js +216 -0
  165. package/dist/components/p-31591941.js.map +1 -0
  166. package/dist/components/{p-09cdd71f.js → p-42ea6b74.js} +34 -688
  167. package/dist/components/p-42ea6b74.js.map +1 -0
  168. package/dist/components/{p-0b015832.js → p-5073bfd6.js} +2 -2
  169. package/dist/components/{p-0b015832.js.map → p-5073bfd6.js.map} +1 -1
  170. package/dist/components/{p-2ad58e41.js → p-60244646.js} +5 -5
  171. package/dist/components/{p-2ad58e41.js.map → p-60244646.js.map} +1 -1
  172. package/dist/components/{p-b2c31970.js → p-68fa3890.js} +17 -11
  173. package/dist/components/p-68fa3890.js.map +1 -0
  174. package/dist/components/{p-b7629769.js → p-89ac047e.js} +4 -4
  175. package/dist/components/p-89ac047e.js.map +1 -0
  176. package/dist/components/{p-7372258e.js → p-99a55bc4.js} +2 -2
  177. package/dist/components/{p-7372258e.js.map → p-99a55bc4.js.map} +1 -1
  178. package/dist/{esm/timeline.animation-adf35ecb.js → components/p-a52cd849.js} +20 -2
  179. package/dist/components/p-a52cd849.js.map +1 -0
  180. package/dist/components/{p-4c3dc7e4.js → p-a9dc0824.js} +13 -10
  181. package/dist/components/p-a9dc0824.js.map +1 -0
  182. package/dist/components/{p-b3035205.js → p-ca38a8a9.js} +2 -2
  183. package/dist/components/{p-b3035205.js.map → p-ca38a8a9.js.map} +1 -1
  184. package/dist/components/{p-84f4b071.js → p-ddd0a394.js} +75 -41
  185. package/dist/components/p-ddd0a394.js.map +1 -0
  186. package/dist/components/{p-ddb7aa4e.js → p-e4ac8333.js} +6 -6
  187. package/dist/components/{p-ddb7aa4e.js.map → p-e4ac8333.js.map} +1 -1
  188. package/dist/components/{p-dc5dad90.js → p-e6c04562.js} +2 -2
  189. package/dist/components/{p-dc5dad90.js.map → p-e6c04562.js.map} +1 -1
  190. package/dist/components/{p-87079346.js → p-eb443b26.js} +3 -3
  191. package/dist/components/{p-87079346.js.map → p-eb443b26.js.map} +1 -1
  192. package/dist/components/p-eda2f9f3.js +68 -0
  193. package/dist/components/p-eda2f9f3.js.map +1 -0
  194. package/dist/components/p-ee0df37f.js +723 -0
  195. package/dist/components/p-ee0df37f.js.map +1 -0
  196. package/dist/components/{p-8d45dbfe.js → p-fb560fa3.js} +3 -2
  197. package/dist/components/p-fb560fa3.js.map +1 -0
  198. package/dist/esm/collapse.animation-acda1bf5.js +216 -0
  199. package/dist/esm/collapse.animation-acda1bf5.js.map +1 -0
  200. package/dist/esm/{constants-a857c476.js → constants-d0f19e7b.js} +7 -2
  201. package/dist/esm/constants-d0f19e7b.js.map +1 -0
  202. package/dist/esm/fade.animation-eb454088.js +723 -0
  203. package/dist/esm/fade.animation-eb454088.js.map +1 -0
  204. package/dist/esm/{grow.animation-f7b26024.js → grow.animation-5b2abb3a.js} +3 -2
  205. package/dist/esm/grow.animation-5b2abb3a.js.map +1 -0
  206. package/dist/esm/index-a1936cd0.js +4 -0
  207. package/dist/esm/index.js +10 -7
  208. package/dist/esm/index.js.map +1 -1
  209. package/dist/esm/loader.js +1 -1
  210. package/dist/esm/native.js +1 -1
  211. package/dist/esm/nv-accordion-item.entry.js +72 -38
  212. package/dist/esm/nv-accordion-item.entry.js.map +1 -1
  213. package/dist/esm/nv-accordion.entry.js +80 -66
  214. package/dist/esm/nv-accordion.entry.js.map +1 -1
  215. package/dist/esm/nv-alert.entry.js +12 -12
  216. package/dist/esm/nv-alert.entry.js.map +1 -1
  217. package/dist/esm/nv-avatar.entry.js +1 -1
  218. package/dist/esm/nv-badge_2.entry.js +4 -4
  219. package/dist/esm/nv-button.entry.js +1 -1
  220. package/dist/esm/nv-calendar.entry.js +14 -10
  221. package/dist/esm/nv-calendar.entry.js.map +1 -1
  222. package/dist/esm/nv-datagrid.entry.js +1 -1
  223. package/dist/esm/nv-dialog.entry.js +1 -1
  224. package/dist/esm/nv-dialogfooter_2.entry.js +9 -6
  225. package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
  226. package/dist/esm/nv-fieldmultiselect.entry.js +0 -30
  227. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  228. package/dist/esm/nv-fieldnumber.entry.js +1 -1
  229. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  230. package/dist/esm/nv-fieldslider.entry.js +24 -16
  231. package/dist/esm/nv-fieldslider.entry.js.map +1 -1
  232. package/dist/esm/nv-fieldtime.entry.js +1 -1
  233. package/dist/esm/nv-icon.entry.js +1 -1
  234. package/dist/esm/nv-notification.entry.js +116 -0
  235. package/dist/esm/nv-notification.entry.js.map +1 -0
  236. package/dist/esm/nv-popover.entry.js +4 -4
  237. package/dist/esm/nv-row.entry.js +1 -1
  238. package/dist/esm/nv-stack.entry.js +1 -1
  239. package/dist/esm/nv-table.entry.js +2 -2
  240. package/dist/esm/nv-toggle.entry.js +2 -2
  241. package/dist/esm/nv-togglebutton.entry.js +1 -1
  242. package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
  243. package/dist/esm/nv-tooltip.entry.js +1 -1
  244. package/dist/esm/slide.animation-f444aa0b.js +68 -0
  245. package/dist/esm/slide.animation-f444aa0b.js.map +1 -0
  246. package/dist/esm/{stylefire.es-74da334a.js → style-value-types.es-f5d10b79.js} +34 -688
  247. package/dist/esm/style-value-types.es-f5d10b79.js.map +1 -0
  248. package/dist/esm/timeline.animation-79215cd4.js +41 -0
  249. package/dist/esm/timeline.animation-79215cd4.js.map +1 -0
  250. package/dist/native/index.esm.js +1 -1
  251. package/dist/native/index.esm.js.map +1 -1
  252. package/dist/native/native.css +1 -1
  253. package/dist/native/native.esm.js +1 -1
  254. package/dist/native/native.esm.js.map +1 -1
  255. package/dist/native/p-08582c21.entry.js +2 -0
  256. package/dist/native/p-08582c21.entry.js.map +1 -0
  257. package/dist/native/p-0a99c6fb.entry.js +2 -0
  258. package/dist/native/p-0a99c6fb.entry.js.map +1 -0
  259. package/dist/native/p-0e488b3d.entry.js +2 -0
  260. package/dist/native/p-0e488b3d.entry.js.map +1 -0
  261. package/dist/native/{p-3a8f65a9.entry.js → p-1f01fb64.entry.js} +2 -2
  262. package/dist/native/{p-c3ad7617.entry.js → p-225a05bf.entry.js} +2 -2
  263. package/dist/native/p-2277cfc8.js +2 -0
  264. package/dist/native/p-2277cfc8.js.map +1 -0
  265. package/dist/native/p-25f2ce81.entry.js +2 -0
  266. package/dist/native/{p-29ee7b1c.entry.js → p-29f68e07.entry.js} +2 -2
  267. package/dist/native/p-29f68e07.entry.js.map +1 -0
  268. package/dist/native/p-31591941.js +2 -0
  269. package/dist/native/p-31591941.js.map +1 -0
  270. package/dist/native/{p-63fea160.entry.js → p-33f503c5.entry.js} +2 -2
  271. package/dist/native/{p-43071c3b.entry.js → p-3784efdc.entry.js} +2 -2
  272. package/dist/native/{p-47901c83.entry.js → p-3f861ddc.entry.js} +2 -2
  273. package/dist/native/{p-ab1e1a96.entry.js → p-40c4a221.entry.js} +2 -2
  274. package/dist/native/p-42ea6b74.js +16 -0
  275. package/dist/native/p-42ea6b74.js.map +1 -0
  276. package/dist/native/{p-62aa0531.entry.js → p-52b8c872.entry.js} +2 -2
  277. package/dist/native/{p-e7a929e7.entry.js → p-5a43fe48.entry.js} +2 -2
  278. package/dist/native/{p-a63929db.entry.js → p-788e9ee5.entry.js} +3 -3
  279. package/dist/native/{p-f033c4ce.entry.js → p-7bbcf477.entry.js} +2 -2
  280. package/dist/native/p-8c823928.entry.js +2 -0
  281. package/dist/native/p-9a46baa9.entry.js +2 -0
  282. package/dist/native/p-9a46baa9.entry.js.map +1 -0
  283. package/dist/native/p-a52cd849.js +2 -0
  284. package/dist/native/p-a52cd849.js.map +1 -0
  285. package/dist/native/{p-48cf2457.entry.js → p-bb71a17f.entry.js} +2 -2
  286. package/dist/native/p-cfd5785e.entry.js +2 -0
  287. package/dist/native/p-cfd5785e.entry.js.map +1 -0
  288. package/dist/native/{p-bcff76ab.entry.js → p-d95ee31e.entry.js} +2 -2
  289. package/dist/native/p-da2c7d3c.entry.js +2 -0
  290. package/dist/native/p-da2c7d3c.entry.js.map +1 -0
  291. package/dist/native/p-eda2f9f3.js +2 -0
  292. package/dist/native/p-eda2f9f3.js.map +1 -0
  293. package/dist/native/p-ee0df37f.js +2 -0
  294. package/dist/native/p-ee0df37f.js.map +1 -0
  295. package/dist/native/p-ee516944.entry.js +2 -0
  296. package/dist/native/p-ee516944.entry.js.map +1 -0
  297. package/dist/native/p-f5120223.entry.js +2 -0
  298. package/dist/native/p-f5120223.entry.js.map +1 -0
  299. package/dist/native/{p-2d647761.entry.js → p-f5eb047e.entry.js} +2 -2
  300. package/dist/native/p-fb560fa3.js +2 -0
  301. package/dist/native/{p-8d45dbfe.js.map → p-fb560fa3.js.map} +1 -1
  302. package/dist/types/animations/collapse.animation.d.ts +10 -2
  303. package/dist/types/animations/index.d.ts +1 -0
  304. package/dist/types/animations/slide.animation.d.ts +11 -0
  305. package/dist/types/animations/timeline.animation.d.ts +17 -1
  306. package/dist/types/components/nv-accordion/nv-accordion.d.ts +5 -7
  307. package/dist/types/components/nv-accordion-item/nv-accordion-item.d.ts +23 -8
  308. package/dist/types/components/nv-alert/nv-alert.d.ts +1 -1
  309. package/dist/types/components/nv-calendar/nv-calendar.d.ts +4 -0
  310. package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +4 -0
  311. package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +8 -4
  312. package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +3 -2
  313. package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +7 -3
  314. package/dist/types/components/nv-notification/nv-notification.d.ts +75 -0
  315. package/dist/types/components/nv-notification/nv-notification.docs.d.ts +4 -0
  316. package/dist/types/components.d.ts +142 -9
  317. package/dist/types/nova-docs.d.ts +6 -0
  318. package/dist/types/utils/constants.d.ts +4 -0
  319. package/dist/vscode-data.json +77 -3
  320. package/hydrate/index.js +642 -263
  321. package/hydrate/index.mjs +642 -263
  322. package/package.json +5 -1
  323. package/readme.md +169 -42
  324. package/dist/cjs/collapse.animation-a129dc3f.js +0 -86
  325. package/dist/cjs/collapse.animation-a129dc3f.js.map +0 -1
  326. package/dist/cjs/constants-aac59496.js.map +0 -1
  327. package/dist/cjs/fade.animation-644b5c4d.js +0 -70
  328. package/dist/cjs/fade.animation-644b5c4d.js.map +0 -1
  329. package/dist/cjs/grow.animation-6d003803.js.map +0 -1
  330. package/dist/cjs/stylefire.es-717e022a.js.map +0 -1
  331. package/dist/cjs/timeline.animation-155e8839.js.map +0 -1
  332. package/dist/components/p-09cdd71f.js.map +0 -1
  333. package/dist/components/p-15aeab4d.js +0 -23
  334. package/dist/components/p-15aeab4d.js.map +0 -1
  335. package/dist/components/p-1cbacdba.js +0 -68
  336. package/dist/components/p-1cbacdba.js.map +0 -1
  337. package/dist/components/p-4c3dc7e4.js.map +0 -1
  338. package/dist/components/p-5f594b35.js.map +0 -1
  339. package/dist/components/p-84f4b071.js.map +0 -1
  340. package/dist/components/p-8d45dbfe.js.map +0 -1
  341. package/dist/components/p-9a263d0e.js +0 -84
  342. package/dist/components/p-9a263d0e.js.map +0 -1
  343. package/dist/components/p-b2c31970.js.map +0 -1
  344. package/dist/components/p-b7629769.js.map +0 -1
  345. package/dist/esm/collapse.animation-16e3af45.js +0 -84
  346. package/dist/esm/collapse.animation-16e3af45.js.map +0 -1
  347. package/dist/esm/constants-a857c476.js.map +0 -1
  348. package/dist/esm/fade.animation-71e8e34c.js +0 -68
  349. package/dist/esm/fade.animation-71e8e34c.js.map +0 -1
  350. package/dist/esm/grow.animation-f7b26024.js.map +0 -1
  351. package/dist/esm/stylefire.es-74da334a.js.map +0 -1
  352. package/dist/esm/timeline.animation-adf35ecb.js.map +0 -1
  353. package/dist/native/p-09cdd71f.js +0 -16
  354. package/dist/native/p-09cdd71f.js.map +0 -1
  355. package/dist/native/p-0da8f0d1.entry.js +0 -2
  356. package/dist/native/p-0da8f0d1.entry.js.map +0 -1
  357. package/dist/native/p-15aeab4d.js +0 -2
  358. package/dist/native/p-15aeab4d.js.map +0 -1
  359. package/dist/native/p-1cbacdba.js +0 -2
  360. package/dist/native/p-1cbacdba.js.map +0 -1
  361. package/dist/native/p-29ee7b1c.entry.js.map +0 -1
  362. package/dist/native/p-38af3aaf.entry.js +0 -2
  363. package/dist/native/p-38af3aaf.entry.js.map +0 -1
  364. package/dist/native/p-3fcaac6d.entry.js +0 -2
  365. package/dist/native/p-3fcaac6d.entry.js.map +0 -1
  366. package/dist/native/p-5d352456.entry.js +0 -2
  367. package/dist/native/p-5f594b35.js +0 -2
  368. package/dist/native/p-5f594b35.js.map +0 -1
  369. package/dist/native/p-67d861e2.entry.js +0 -2
  370. package/dist/native/p-67d861e2.entry.js.map +0 -1
  371. package/dist/native/p-7703c736.entry.js +0 -2
  372. package/dist/native/p-7703c736.entry.js.map +0 -1
  373. package/dist/native/p-8d45dbfe.js +0 -2
  374. package/dist/native/p-9a263d0e.js +0 -2
  375. package/dist/native/p-9a263d0e.js.map +0 -1
  376. package/dist/native/p-9e0fe7e8.entry.js +0 -2
  377. package/dist/native/p-9e0fe7e8.entry.js.map +0 -1
  378. package/dist/native/p-ac5496e7.entry.js +0 -2
  379. package/dist/native/p-e603c6ed.entry.js +0 -2
  380. package/dist/native/p-e603c6ed.entry.js.map +0 -1
  381. /package/dist/native/{p-3a8f65a9.entry.js.map → p-1f01fb64.entry.js.map} +0 -0
  382. /package/dist/native/{p-c3ad7617.entry.js.map → p-225a05bf.entry.js.map} +0 -0
  383. /package/dist/native/{p-ac5496e7.entry.js.map → p-25f2ce81.entry.js.map} +0 -0
  384. /package/dist/native/{p-63fea160.entry.js.map → p-33f503c5.entry.js.map} +0 -0
  385. /package/dist/native/{p-43071c3b.entry.js.map → p-3784efdc.entry.js.map} +0 -0
  386. /package/dist/native/{p-47901c83.entry.js.map → p-3f861ddc.entry.js.map} +0 -0
  387. /package/dist/native/{p-ab1e1a96.entry.js.map → p-40c4a221.entry.js.map} +0 -0
  388. /package/dist/native/{p-62aa0531.entry.js.map → p-52b8c872.entry.js.map} +0 -0
  389. /package/dist/native/{p-e7a929e7.entry.js.map → p-5a43fe48.entry.js.map} +0 -0
  390. /package/dist/native/{p-a63929db.entry.js.map → p-788e9ee5.entry.js.map} +0 -0
  391. /package/dist/native/{p-f033c4ce.entry.js.map → p-7bbcf477.entry.js.map} +0 -0
  392. /package/dist/native/{p-5d352456.entry.js.map → p-8c823928.entry.js.map} +0 -0
  393. /package/dist/native/{p-48cf2457.entry.js.map → p-bb71a17f.entry.js.map} +0 -0
  394. /package/dist/native/{p-bcff76ab.entry.js.map → p-d95ee31e.entry.js.map} +0 -0
  395. /package/dist/native/{p-2d647761.entry.js.map → p-f5eb047e.entry.js.map} +0 -0
@@ -0,0 +1,120 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-c56424e5.js');
6
+ const constants = require('./constants-52f6f8e9.js');
7
+ const collapse_animation = require('./collapse.animation-47397763.js');
8
+ const fade_animation = require('./fade.animation-cf6eba0d.js');
9
+ require('./style-value-types.es-eea2f16f.js');
10
+ const slide_animation = require('./slide.animation-bedfc827.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]>nv-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]>nv-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]>nv-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]>nv-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]>nv-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]>nv-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
+ //#endregion EVENTS
48
+ /****************************************************************************/
49
+ //#region INTERNAL
50
+ this.iconByFeedback = {
51
+ [constants.FeedbackColors.Warning]: 'alert-circle',
52
+ [constants.FeedbackColors.Information]: 'info-circle',
53
+ [constants.FeedbackColors.Success]: 'circle-check',
54
+ [constants.FeedbackColors.Error]: 'alert-triangle',
55
+ [constants.FeedbackColors.Neutral]: 'help',
56
+ };
57
+ this.roleByFeedback = {
58
+ [constants.FeedbackColors.Error]: 'alert',
59
+ [constants.FeedbackColors.Warning]: 'alert',
60
+ [constants.FeedbackColors.Information]: 'status',
61
+ [constants.FeedbackColors.Success]: 'status',
62
+ [constants.FeedbackColors.Neutral]: 'status',
63
+ };
64
+ }
65
+ //#endregion PROPERTIES
66
+ /****************************************************************************/
67
+ //#region METHODS
68
+ async dismiss() {
69
+ await this.dismissAnimation();
70
+ }
71
+ getDefaultIcon() {
72
+ var _a;
73
+ return (_a = this.iconByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'info-circle';
74
+ }
75
+ getAriaRole() {
76
+ var _a;
77
+ return (_a = this.roleByFeedback[this.feedback]) !== null && _a !== void 0 ? _a : 'status';
78
+ }
79
+ getAriaLive() {
80
+ return this.getAriaRole() === 'alert' ? 'assertive' : 'polite';
81
+ }
82
+ getHeadingId() {
83
+ return this.heading ? `nv-notification-${this.uid}-heading` : null;
84
+ }
85
+ getMessageId() {
86
+ return this.message ? `nv-notification-${this.uid}-message` : null;
87
+ }
88
+ async dismissAnimation() {
89
+ const { fadeOut } = fade_animation.useFade(this.container, { duration: 300 });
90
+ const { slideOut } = slide_animation.useSlide(this.container, { duration: 800 });
91
+ const { collapse } = collapse_animation.useCollapse(this.el, {
92
+ duration: 800,
93
+ overflow: 'visible',
94
+ });
95
+ await timeline_animation.parallel(fadeOut, slideOut, collapse).start();
96
+ this.hidden = true;
97
+ this.hiddenChanged.emit(true);
98
+ }
99
+ //#endregion INTERNAL
100
+ /****************************************************************************/
101
+ //#region LIFECYCLE
102
+ componentWillLoad() {
103
+ this.headingSlot = this.el.querySelector('[slot="heading"]');
104
+ this.messageSlot = this.el.querySelector('[slot="content"]');
105
+ this.actionsSlot = this.el.querySelector('[slot="actions"]');
106
+ }
107
+ //#endregion LIFECYCLE
108
+ /****************************************************************************/
109
+ //#region RENDER
110
+ render() {
111
+ var _a, _b, _c;
112
+ return (index.h(index.Host, { key: '9146cea4ed72801aadf2fb4b7e44895038c98437', 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: 'beed9ae5f6fac1b0c6d103dd75a41e0aede84041', "data-scope": "container", ref: el => (this.container = el) }, this.dismissible && (index.h("button", { key: '8e17f33867c2563de719dc1b0f0e2d4ae39ad1a6', "data-scope": "dismiss", type: "button", onClick: this.dismiss.bind(this) }, index.h("nv-icon", { key: 'cb8850135bb2383e33a16671569547611b55e434', name: "x", size: "sm" }))), index.h("nv-icon", { key: 'f5f58e1c3a94d854841271eb12af047322b2f0b4', name: (_c = this.icon) !== null && _c !== void 0 ? _c : this.getDefaultIcon(), size: "md" }), index.h("div", { key: '9c6f6bb0315cd25260d483472a24832031ce45da', "data-scope": "content" }, (this.heading || this.headingSlot) && (index.h("p", { key: '1013d6b6790f75682a1db0e43293b61e614f1c07', id: this.getHeadingId(), "data-scope": "heading" }, index.h("slot", { key: '844a7bccf6f365d4e59dfdec9b3c9096cbeda798', name: "heading" }, this.heading))), (this.message || this.messageSlot) && (index.h("p", { key: '6688e9dc927f6164ce60f27b84fdbeb257296504', id: this.getMessageId(), "data-scope": "message" }, index.h("slot", { key: 'f0c0790faa40411970575240a081f0f0bf0e9aff', name: "content" }, this.message))), this.actionsSlot && (index.h("div", { key: '0ba946edf5b3a8410da3b375e589613a2674fd15', "data-scope": "actions" }, index.h("slot", { key: '0360ab92db66957f0290569c39307ced2be5922d', name: "actions" })))))));
113
+ }
114
+ get el() { return index.getElement(this); }
115
+ };
116
+ NvNotification.style = NvNotificationStyle0;
117
+
118
+ exports.nv_notification = NvNotification;
119
+
120
+ //# sourceMappingURL=nv-notification.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"nv-notification.entry.cjs.js","mappings":"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","names":["uuidv4","FeedbackColors","useFade","useSlide","useCollapse","parallel","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 & > nv-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 & > nv-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 { FeedbackColors, NotificationEmphasis } 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 //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n @Method()\n async dismiss() {\n await this.dismissAnimation();\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 dismissAnimation() {\n const { fadeOut } = useFade(this.container, { duration: 300 });\n const { slideOut } = useSlide(this.container, { duration: 800 });\n const { collapse } = useCollapse(this.el, {\n duration: 800,\n overflow: 'visible',\n });\n\n await parallel(fadeOut, slideOut, collapse).start();\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\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 ></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}
@@ -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-cf6eba0d.js');
7
+ const grow_animation = require('./grow.animation-9258ba63.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: 'dc7ef1862f1a1da4b32e02bee827f81545df73d1' }, index.h("slot", { key: '7535c2ba2b1f600c237602c68a04c85fd9d6d98b', name: "trigger" }), index.h("div", { key: '8e7907e2fda20d35b00642eca0507aa20e56f7cb', "data-scope": "popover", "data-strategy": this.strategy, hidden: true, ref: el => (this.popoverElement = el) }, this.hasArrow && (index.h("div", { key: '4e081e84e9597b69351253d1c1b89c115cdcfd9a', "data-scope": "arrow", ref: el => (this.arrowElement = el) })), index.h("slot", { key: '5bcd80588e9746db974cee69c5963b698665d105', 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: '8415bdad0106bd3d836996c617a749294e0c19e2' }, index.h("slot", { key: '77c069ced0dc25c4169945877c388f30d27fdc4f' })));
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: '66123f22ad4a6ebefe8663c795274eb900d2c178', 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: '7b3d395c3490664f0e2f337a04f69cc717ed6c0e' })));
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: 'ea0b3237145fbc199d356010f1e001797afc52d6' }, index.h("div", { key: 'd3bf41bad48e549d1799b2c8e55a308a7d767973', class: "hidden" }, index.h("slot", { key: '8263220ebd266240b16228b67f8d215d7d56afd7' })), index.h("slot", { key: '36d43d6870cf9a6021521579c0507afd1fe85081', 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: '233b61e9099f58ca0eeeb7d0f7fdc7bd71bc9065', 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: 'db161d2edfcf7f83381b6431c8bc70a22c04fbf3', class: clsx.clsx(this.labelPlacement === 'before' && 'label-placement-before') }, index.h("div", { key: '086d6c429b4b7bcaa23093b13d30cf6ba21912f8', class: "input-container" }, index.h("input", { key: 'e83f407f2c3643c245198131a7991545b73dde78', 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: 'eb5af410d1c643c70a4364948bf8fad9d54e74df', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (index.h("label", { key: '54793fd81258bee7676801f23da4f5fb554242bf', htmlFor: this.inputId, class: clsx.clsx(this.hideLabel && 'visually-hidden') }, index.h("slot", { key: '6af650d9677d1eb0f8cfa77cbcd6318f2d6f8aaf', name: "label" }, this.label))), (this.description ||
70
+ this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '2c157429288779ad6cc18d4e318e64830a657c54', class: "description" }, index.h("slot", { key: 'fcfae2a0d7cdcc76d4b23c4b376c8e2496e11bb5', 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: 'cb15a84c7e7cc27a80773613f31b98168eee8475', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, index.h("slot", { key: '32d6b9394088d88c4671fb7809ad6aa85b240fff' })));
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: 'ce185699fabd71bb5c22e5a0d73df88067acb9d6' }, index.h("slot", { key: 'a1e375fb1e8660f3fdb75d96f18db20735a3a64d' })));
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: 'e0b68e5ade824e2b0f9c5e5cac140349412c919d' }, index.h("slot", { key: 'd61a58d034818fdba87b4ab17ce903bbb13a47ff' }), index.h("nv-popover", { key: '408df675045f95adf270025f83285b2e125873c5', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, index.h("p", { key: 'e4f860f09f5e5ef83b5e704c271781f41a643e59', slot: "content" }, this.message), index.h("slot", { key: '2e2e4dcae68651d734696e718c59389f712562df', name: "content" }))));
50
50
  }
51
51
  get el() { return index.getElement(this); }
52
52
  };
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ const fade_animation = require('./fade.animation-cf6eba0d.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 to 100%, sliding the element to the right.
10
+ */
11
+ function slideOut() {
12
+ return new Promise(resolve => {
13
+ styleValueTypes_es.animate({
14
+ from: { x: 0 },
15
+ to: { x: 100 },
16
+ ease: styleValueTypes_es.easeOut,
17
+ duration,
18
+ onUpdate(latest) {
19
+ nodeStyler.set({ transform: `translateX(${latest.x}%)` });
20
+ },
21
+ onComplete() {
22
+ resolve();
23
+ },
24
+ });
25
+ });
26
+ }
27
+ /**
28
+ * Applies the slideOut styles without animating, useful when initial state
29
+ * is slid out.
30
+ */
31
+ function setSlideOut() {
32
+ node.style.transform = 'translateX(100%)';
33
+ }
34
+ /**
35
+ * Applies the slideIn styles without animating, useful when initial state
36
+ * is slid in.
37
+ */
38
+ function setSlideIn() {
39
+ node.style.transform = '';
40
+ }
41
+ /**
42
+ * Will animate the translateX from 100% to 0%, sliding the element in from the right.
43
+ */
44
+ function slideIn() {
45
+ return new Promise(resolve => {
46
+ styleValueTypes_es.animate({
47
+ from: { x: 100 },
48
+ to: { x: 0 },
49
+ duration,
50
+ onUpdate(latest) {
51
+ nodeStyler.set({ transform: `translateX(${latest.x}%)` });
52
+ },
53
+ onComplete() {
54
+ resolve();
55
+ node.style.removeProperty('transform');
56
+ },
57
+ });
58
+ });
59
+ }
60
+ return {
61
+ slideIn,
62
+ slideOut,
63
+ setSlideOut,
64
+ setSlideIn,
65
+ };
66
+ };
67
+
68
+ exports.useSlide = useSlide;
69
+
70
+ //# sourceMappingURL=slide.animation-bedfc827.js.map
@@ -0,0 +1 @@
1
+ {"file":"slide.animation-bedfc827.js","mappings":";;;;;MAQM,QAAQ,GAAG,CACf,IAAiB,EACjB,EAAE,QAAQ,KAAmB,EAAE,QAAQ,EAAE,GAAG,EAAE;IAE9C,MAAM,UAAU,GAAGA,oBAAM,CAAC,IAAI,CAAC,CAAC;;;;IAKhC,SAAS,QAAQ;QACf,OAAO,IAAI,OAAO,CAAO,OAAO;YAC9BC,0BAAO,CAAC;gBACN,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;gBACd,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;gBACd,IAAI,EAAEC,0BAAO;gBACb,QAAQ;gBACR,QAAQ,CAAC,MAAM;oBACb,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;iBAC3D;gBACD,UAAU;oBACR,OAAO,EAAE,CAAC;iBACX;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;;;;;IAMD,SAAS,WAAW;QAClB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,kBAAkB,CAAC;KAC3C;;;;;IAMD,SAAS,UAAU;QACjB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;KAC3B;;;;IAKD,SAAS,OAAO;QACd,OAAO,IAAI,OAAO,CAAO,OAAO;YAC9BD,0BAAO,CAAC;gBACN,IAAI,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;gBAChB,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;gBACZ,QAAQ;gBACR,QAAQ,CAAC,MAAM;oBACb,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;iBAC3D;gBACD,UAAU;oBACR,OAAO,EAAE,CAAC;oBACV,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;iBACxC;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;IAED,OAAO;QACL,OAAO;QACP,QAAQ;QACR,WAAW;QACX,UAAU;KACX,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 to 100%, sliding the element to the right.\n */\n function slideOut() {\n return new Promise<void>(resolve => {\n animate({\n from: { x: 0 },\n to: { x: 100 },\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 * Applies the slideOut styles without animating, useful when initial state\n * is slid out.\n */\n function setSlideOut() {\n node.style.transform = 'translateX(100%)';\n }\n\n /**\n * Applies the slideIn styles without animating, useful when initial state\n * is slid in.\n */\n function setSlideIn() {\n node.style.transform = '';\n }\n\n /**\n * Will animate the translateX from 100% to 0%, sliding the element in from the right.\n */\n function slideIn() {\n return new Promise<void>(resolve => {\n animate({\n from: { x: 100 },\n to: { x: 0 },\n duration,\n onUpdate(latest) {\n nodeStyler.set({ transform: `translateX(${latest.x}%)` });\n },\n onComplete() {\n resolve();\n node.style.removeProperty('transform');\n },\n });\n });\n }\n\n return {\n slideIn,\n slideOut,\n setSlideOut,\n setSlideIn,\n };\n};\n\nexport { useSlide };\n"],"version":3}