@nova-design-system/nova-webcomponents 3.0.0-beta.43 → 3.0.0-beta.44

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 (334) hide show
  1. package/dist/blazor-docs.json +18738 -0
  2. package/dist/cjs/index.cjs.js +472 -2
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/native.cjs.js +1 -1
  6. package/dist/cjs/nv-badge_2.cjs.entry.js +4 -5
  7. package/dist/cjs/nv-badge_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nv-base.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  10. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-calendar.cjs.entry.js +5 -5
  13. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  15. package/dist/cjs/nv-datagrid.cjs.entry.js +3 -3
  16. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +1 -1
  18. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  19. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +6 -6
  21. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +4 -4
  23. package/dist/cjs/nv-fielddate.cjs.entry.js +5 -5
  24. package/dist/cjs/nv-fielddaterange.cjs.entry.js +4 -4
  25. package/dist/cjs/nv-fielddropdown.cjs.entry.js +44 -74
  26. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  27. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +6 -8
  28. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js.map +1 -1
  29. package/dist/cjs/nv-fieldnumber.cjs.entry.js +3 -3
  30. package/dist/cjs/nv-fieldpassword.cjs.entry.js +3 -3
  31. package/dist/cjs/nv-fieldradio.cjs.entry.js +3 -3
  32. package/dist/cjs/nv-fieldselect.cjs.entry.js +5 -5
  33. package/dist/cjs/nv-fieldtext.cjs.entry.js +3 -3
  34. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +3 -3
  35. package/dist/cjs/nv-fieldtime.cjs.entry.js +9 -9
  36. package/dist/cjs/nv-icon.cjs.entry.js +2 -2
  37. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  38. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +2 -2
  39. package/dist/cjs/nv-menu.cjs.entry.js +1 -1
  40. package/dist/cjs/nv-menuitem.cjs.entry.js +1 -1
  41. package/dist/cjs/nv-popover.cjs.entry.js +1 -1
  42. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -1
  43. package/dist/cjs/nv-row.cjs.entry.js +1 -1
  44. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  45. package/dist/cjs/nv-table.cjs.entry.js +3 -3
  46. package/dist/cjs/nv-table.cjs.entry.js.map +1 -1
  47. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  48. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  49. package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
  50. package/dist/collection/components/nv-badge/nv-badge.css +16 -0
  51. package/dist/collection/components/nv-badge/nv-badge.js +3 -3
  52. package/dist/collection/components/nv-badge/nv-badge.js.map +1 -1
  53. package/dist/collection/components/nv-base/nv-base.js +1 -1
  54. package/dist/collection/components/nv-breadcrumb/nv-breadcrumb.js +1 -1
  55. package/dist/collection/components/nv-breadcrumbs/nv-breadcrumbs.js +1 -1
  56. package/dist/collection/components/nv-button/nv-button.js +1 -1
  57. package/dist/collection/components/nv-calendar/nv-calendar.css +129 -77
  58. package/dist/collection/components/nv-calendar/nv-calendar.js +4 -4
  59. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  60. package/dist/collection/components/nv-col/nv-col.js +1 -1
  61. package/dist/collection/components/nv-datagrid/nv-datagrid.css +4 -4
  62. package/dist/collection/components/nv-datagrid/nv-datagrid.js +2 -2
  63. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  64. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +1 -1
  65. package/dist/collection/components/nv-dialog/nv-dialog.js +1 -1
  66. package/dist/collection/components/nv-dialog/nv-dialog.js.map +1 -1
  67. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js +7 -7
  68. package/dist/collection/components/nv-dialogfooter/nv-dialogfooter.js.map +1 -1
  69. package/dist/collection/components/nv-dialogheader/nv-dialogheader.js +1 -1
  70. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +4 -4
  71. package/dist/collection/components/nv-fielddate/nv-fielddate.js +5 -5
  72. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +4 -4
  73. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +44 -74
  74. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  75. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +3 -0
  76. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js +9 -11
  77. package/dist/collection/components/nv-fielddropdownitem/nv-fielddropdownitem.js.map +1 -1
  78. package/dist/collection/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.js +1 -1
  79. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +3 -3
  80. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +3 -3
  81. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +3 -3
  82. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +5 -5
  83. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +3 -3
  84. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  85. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  86. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  87. package/dist/collection/components/nv-icon/nv-icons.js +472 -2
  88. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  89. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  90. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  91. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  92. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  93. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  94. package/dist/collection/components/nv-popover/nv-popover.js.map +1 -1
  95. package/dist/collection/components/nv-row/nv-row.js +1 -1
  96. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  97. package/dist/collection/components/nv-table/nv-table.css +4 -4
  98. package/dist/collection/components/nv-table/nv-table.js +2 -2
  99. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  100. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  101. package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -1
  102. package/dist/components/index.js +472 -2
  103. package/dist/components/index.js.map +1 -1
  104. package/dist/components/nv-alert.js +1 -1
  105. package/dist/components/nv-avatar.js +1 -1
  106. package/dist/components/nv-badge.js +1 -1
  107. package/dist/components/nv-base.js +1 -1
  108. package/dist/components/nv-breadcrumb.js +3 -3
  109. package/dist/components/nv-breadcrumbs.js +1 -1
  110. package/dist/components/nv-button.js +1 -1
  111. package/dist/components/nv-calendar.js +1 -1
  112. package/dist/components/nv-col.js +1 -1
  113. package/dist/components/nv-datagrid.js +3 -3
  114. package/dist/components/nv-datagrid.js.map +1 -1
  115. package/dist/components/nv-datagridcolumn.js +1 -1
  116. package/dist/components/nv-dialog.js +6 -6
  117. package/dist/components/nv-dialog.js.map +1 -1
  118. package/dist/components/nv-dialogfooter.js +1 -1
  119. package/dist/components/nv-dialogheader.js +1 -1
  120. package/dist/components/nv-fieldcheckbox.js +1 -1
  121. package/dist/components/nv-fielddate.js +12 -12
  122. package/dist/components/nv-fielddaterange.js +11 -11
  123. package/dist/components/nv-fielddropdown.js +49 -79
  124. package/dist/components/nv-fielddropdown.js.map +1 -1
  125. package/dist/components/nv-fielddropdownitem.js +1 -1
  126. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  127. package/dist/components/nv-fieldmultiselect.js +7 -7
  128. package/dist/components/nv-fieldnumber.js +6 -6
  129. package/dist/components/nv-fieldpassword.js +6 -6
  130. package/dist/components/nv-fieldradio.js +3 -3
  131. package/dist/components/nv-fieldselect.js +8 -8
  132. package/dist/components/nv-fieldtext.js +4 -4
  133. package/dist/components/nv-fieldtextarea.js +3 -3
  134. package/dist/components/nv-fieldtime.js +13 -13
  135. package/dist/components/nv-icon.js +1 -1
  136. package/dist/components/nv-iconbutton.js +1 -1
  137. package/dist/components/nv-loader.js +1 -1
  138. package/dist/components/nv-menu.js +4 -4
  139. package/dist/components/nv-menuitem.js +1 -1
  140. package/dist/components/nv-popover.js +1 -1
  141. package/dist/components/nv-row.js +1 -1
  142. package/dist/components/nv-stack.js +1 -1
  143. package/dist/components/nv-table.js +3 -3
  144. package/dist/components/nv-table.js.map +1 -1
  145. package/dist/components/nv-toggle.js +2 -2
  146. package/dist/components/nv-tooltip.js +1 -1
  147. package/dist/components/{p-3aa6f6dc.js → p-016dbae8.js} +10 -10
  148. package/dist/components/p-016dbae8.js.map +1 -0
  149. package/dist/components/{p-1a4f9c97.js → p-0631d152.js} +3 -3
  150. package/dist/components/{p-1a4f9c97.js.map → p-0631d152.js.map} +1 -1
  151. package/dist/components/p-23b6b33b.js +88 -0
  152. package/dist/components/p-23b6b33b.js.map +1 -0
  153. package/dist/components/{p-a8b5969f.js → p-293e1a5c.js} +3 -3
  154. package/dist/components/{p-a8b5969f.js.map → p-293e1a5c.js.map} +1 -1
  155. package/dist/components/{p-1e095bba.js → p-3a74719c.js} +4 -4
  156. package/dist/components/{p-1e095bba.js.map → p-3a74719c.js.map} +1 -1
  157. package/dist/components/{p-56716b97.js → p-3a990da7.js} +9 -9
  158. package/dist/components/p-3a990da7.js.map +1 -0
  159. package/dist/components/{p-4c6d8df7.js → p-543082ff.js} +2 -2
  160. package/dist/components/{p-4c6d8df7.js.map → p-543082ff.js.map} +1 -1
  161. package/dist/components/{p-057ae4f2.js → p-62f6da8a.js} +2 -2
  162. package/dist/components/{p-057ae4f2.js.map → p-62f6da8a.js.map} +1 -1
  163. package/dist/components/{p-3a3ba5b1.js → p-6726f512.js} +2 -2
  164. package/dist/components/{p-3a3ba5b1.js.map → p-6726f512.js.map} +1 -1
  165. package/dist/components/{p-1fad2529.js → p-b2d2fd35.js} +3 -3
  166. package/dist/components/{p-1fad2529.js.map → p-b2d2fd35.js.map} +1 -1
  167. package/dist/components/p-cd083aba.js +176 -0
  168. package/dist/components/p-cd083aba.js.map +1 -0
  169. package/dist/components/{p-55202370.js → p-d552352b.js} +5 -5
  170. package/dist/components/{p-55202370.js.map → p-d552352b.js.map} +1 -1
  171. package/dist/components/{p-89fb308b.js → p-e40363fd.js} +2 -2
  172. package/dist/components/{p-89fb308b.js.map → p-e40363fd.js.map} +1 -1
  173. package/dist/components/{p-4c6ba63c.js → p-e66d6274.js} +3 -3
  174. package/dist/components/{p-4c6ba63c.js.map → p-e66d6274.js.map} +1 -1
  175. package/dist/components/{p-9476354d.js → p-e7f21fe7.js} +9 -11
  176. package/dist/components/p-e7f21fe7.js.map +1 -0
  177. package/dist/docs.json +2048 -160
  178. package/dist/esm/index.js +472 -2
  179. package/dist/esm/index.js.map +1 -1
  180. package/dist/esm/loader.js +1 -1
  181. package/dist/esm/native.js +1 -1
  182. package/dist/esm/nv-badge_2.entry.js +4 -5
  183. package/dist/esm/nv-badge_2.entry.js.map +1 -1
  184. package/dist/esm/nv-base.entry.js +1 -1
  185. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  186. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  187. package/dist/esm/nv-button.entry.js +1 -1
  188. package/dist/esm/nv-calendar.entry.js +5 -5
  189. package/dist/esm/nv-calendar.entry.js.map +1 -1
  190. package/dist/esm/nv-col.entry.js +1 -1
  191. package/dist/esm/nv-datagrid.entry.js +3 -3
  192. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  193. package/dist/esm/nv-datagridcolumn.entry.js +1 -1
  194. package/dist/esm/nv-dialog.entry.js +1 -1
  195. package/dist/esm/nv-dialog.entry.js.map +1 -1
  196. package/dist/esm/nv-dialogfooter_2.entry.js +6 -6
  197. package/dist/esm/nv-dialogfooter_2.entry.js.map +1 -1
  198. package/dist/esm/nv-fieldcheckbox.entry.js +4 -4
  199. package/dist/esm/nv-fielddate.entry.js +5 -5
  200. package/dist/esm/nv-fielddaterange.entry.js +4 -4
  201. package/dist/esm/nv-fielddropdown.entry.js +44 -74
  202. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  203. package/dist/esm/nv-fielddropdownitem.entry.js +6 -8
  204. package/dist/esm/nv-fielddropdownitem.entry.js.map +1 -1
  205. package/dist/esm/nv-fieldnumber.entry.js +3 -3
  206. package/dist/esm/nv-fieldpassword.entry.js +3 -3
  207. package/dist/esm/nv-fieldradio.entry.js +3 -3
  208. package/dist/esm/nv-fieldselect.entry.js +5 -5
  209. package/dist/esm/nv-fieldtext.entry.js +3 -3
  210. package/dist/esm/nv-fieldtextarea.entry.js +3 -3
  211. package/dist/esm/nv-fieldtime.entry.js +9 -9
  212. package/dist/esm/nv-icon.entry.js +2 -2
  213. package/dist/esm/nv-icon.entry.js.map +1 -1
  214. package/dist/esm/nv-iconbutton_2.entry.js +2 -2
  215. package/dist/esm/nv-menu.entry.js +1 -1
  216. package/dist/esm/nv-menuitem.entry.js +1 -1
  217. package/dist/esm/nv-popover.entry.js +1 -1
  218. package/dist/esm/nv-popover.entry.js.map +1 -1
  219. package/dist/esm/nv-row.entry.js +1 -1
  220. package/dist/esm/nv-stack.entry.js +1 -1
  221. package/dist/esm/nv-table.entry.js +3 -3
  222. package/dist/esm/nv-table.entry.js.map +1 -1
  223. package/dist/esm/nv-toggle.entry.js +2 -2
  224. package/dist/esm/nv-tooltip.entry.js +1 -1
  225. package/dist/esm/nv-tooltip.entry.js.map +1 -1
  226. package/dist/native/index.esm.js +1 -1
  227. package/dist/native/index.esm.js.map +1 -1
  228. package/dist/native/native.css +1 -1
  229. package/dist/native/native.esm.js +1 -1
  230. package/dist/native/native.esm.js.map +1 -1
  231. package/dist/native/p-16b38dc2.entry.js +2 -0
  232. package/dist/native/p-16b38dc2.entry.js.map +1 -0
  233. package/dist/native/p-1d5b6c6d.entry.js +2 -0
  234. package/dist/native/{p-7fade532.entry.js → p-2b584e35.entry.js} +2 -2
  235. package/dist/native/{p-514101d6.entry.js → p-39fd54e3.entry.js} +2 -2
  236. package/dist/native/p-3a47035f.entry.js +2 -0
  237. package/dist/native/p-3a47035f.entry.js.map +1 -0
  238. package/dist/native/p-4b6d3739.entry.js +2 -0
  239. package/dist/native/{p-45577c7f.entry.js.map → p-4b6d3739.entry.js.map} +1 -1
  240. package/dist/native/{p-31184fdd.entry.js → p-4c88e8be.entry.js} +2 -2
  241. package/dist/native/p-4c96b614.entry.js +2 -0
  242. package/dist/native/{p-2281d5ef.entry.js → p-4d2adf8c.entry.js} +2 -2
  243. package/dist/native/{p-942f8e92.entry.js → p-4eb132d3.entry.js} +2 -2
  244. package/dist/native/{p-c10e5113.entry.js → p-552ca13e.entry.js} +2 -2
  245. package/dist/native/p-569e9663.entry.js +2 -0
  246. package/dist/native/p-569e9663.entry.js.map +1 -0
  247. package/dist/native/{p-be4fc827.entry.js → p-5e04b50f.entry.js} +2 -2
  248. package/dist/native/p-5e04b50f.entry.js.map +1 -0
  249. package/dist/native/{p-ecc28398.entry.js → p-657a0b8a.entry.js} +2 -2
  250. package/dist/native/{p-464ef88f.entry.js → p-794b7820.entry.js} +2 -2
  251. package/dist/native/{p-f5e0d5c5.entry.js → p-870d5a5c.entry.js} +2 -2
  252. package/dist/native/p-8ae27c0a.entry.js +2 -0
  253. package/dist/native/p-8ae27c0a.entry.js.map +1 -0
  254. package/dist/native/p-9fe6a9b7.entry.js +2 -0
  255. package/dist/native/p-9fe6a9b7.entry.js.map +1 -0
  256. package/dist/native/{p-332c5d6c.entry.js → p-a3ea7b59.entry.js} +2 -2
  257. package/dist/native/{p-56e98443.entry.js → p-a6834c17.entry.js} +2 -2
  258. package/dist/native/{p-56e98443.entry.js.map → p-a6834c17.entry.js.map} +1 -1
  259. package/dist/native/{p-442f04f9.entry.js → p-ac72abfc.entry.js} +2 -2
  260. package/dist/native/p-adf0f628.entry.js +2 -0
  261. package/dist/native/p-adf0f628.entry.js.map +1 -0
  262. package/dist/native/{p-048486e0.entry.js → p-c84eb11f.entry.js} +2 -2
  263. package/dist/native/p-c84eb11f.entry.js.map +1 -0
  264. package/dist/native/p-ca1eff59.entry.js +2 -0
  265. package/dist/native/p-ca1eff59.entry.js.map +1 -0
  266. package/dist/native/{p-ab84ff42.entry.js → p-cce90f27.entry.js} +2 -2
  267. package/dist/native/p-d3d664c7.entry.js +2 -0
  268. package/dist/native/{p-62df7dd4.entry.js → p-d7b5ab6e.entry.js} +2 -2
  269. package/dist/native/{p-314d2b34.entry.js → p-d987271c.entry.js} +2 -2
  270. package/dist/native/{p-3af5bcc1.entry.js → p-dcfef507.entry.js} +2 -2
  271. package/dist/native/{p-b052f1cb.entry.js → p-ddb4fcc3.entry.js} +2 -2
  272. package/dist/native/{p-2ed540e3.entry.js → p-ede0c391.entry.js} +2 -2
  273. package/dist/native/p-efb52057.entry.js +2 -0
  274. package/dist/native/{p-04c6048a.entry.js → p-ffcf8271.entry.js} +2 -2
  275. package/dist/native/{p-04c6048a.entry.js.map → p-ffcf8271.entry.js.map} +1 -1
  276. package/dist/types/components/nv-badge/nv-badge.d.ts +1 -0
  277. package/dist/types/components/nv-dialogfooter/nv-dialogfooter.d.ts +2 -2
  278. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +1 -7
  279. package/dist/types/components/nv-fielddropdownitem/nv-fielddropdownitem.d.ts +1 -6
  280. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  281. package/dist/types/components.d.ts +4 -12
  282. package/dist/vscode-data.json +5980 -0
  283. package/hydrate/index.js +134 -166
  284. package/hydrate/index.mjs +134 -166
  285. package/package.json +1 -1
  286. package/dist/components/p-3aa6f6dc.js.map +0 -1
  287. package/dist/components/p-56716b97.js.map +0 -1
  288. package/dist/components/p-7f142767.js +0 -177
  289. package/dist/components/p-7f142767.js.map +0 -1
  290. package/dist/components/p-9476354d.js.map +0 -1
  291. package/dist/components/p-ebf24fd0.js +0 -88
  292. package/dist/components/p-ebf24fd0.js.map +0 -1
  293. package/dist/native/p-048486e0.entry.js.map +0 -1
  294. package/dist/native/p-1a46cb52.entry.js +0 -2
  295. package/dist/native/p-22a45102.entry.js +0 -2
  296. package/dist/native/p-22a45102.entry.js.map +0 -1
  297. package/dist/native/p-45577c7f.entry.js +0 -2
  298. package/dist/native/p-46aa1136.entry.js +0 -2
  299. package/dist/native/p-665db087.entry.js +0 -2
  300. package/dist/native/p-68b5a92c.entry.js +0 -2
  301. package/dist/native/p-68b5a92c.entry.js.map +0 -1
  302. package/dist/native/p-6a629671.entry.js +0 -2
  303. package/dist/native/p-6a629671.entry.js.map +0 -1
  304. package/dist/native/p-913907fb.entry.js +0 -2
  305. package/dist/native/p-913907fb.entry.js.map +0 -1
  306. package/dist/native/p-9f5e4dfc.entry.js +0 -2
  307. package/dist/native/p-9f5e4dfc.entry.js.map +0 -1
  308. package/dist/native/p-bdabd495.entry.js +0 -2
  309. package/dist/native/p-bdabd495.entry.js.map +0 -1
  310. package/dist/native/p-be4fc827.entry.js.map +0 -1
  311. package/dist/native/p-db2902d6.entry.js +0 -2
  312. package/dist/native/p-db2902d6.entry.js.map +0 -1
  313. package/dist/native/p-f89b7d06.entry.js +0 -2
  314. /package/dist/native/{p-665db087.entry.js.map → p-1d5b6c6d.entry.js.map} +0 -0
  315. /package/dist/native/{p-7fade532.entry.js.map → p-2b584e35.entry.js.map} +0 -0
  316. /package/dist/native/{p-514101d6.entry.js.map → p-39fd54e3.entry.js.map} +0 -0
  317. /package/dist/native/{p-31184fdd.entry.js.map → p-4c88e8be.entry.js.map} +0 -0
  318. /package/dist/native/{p-46aa1136.entry.js.map → p-4c96b614.entry.js.map} +0 -0
  319. /package/dist/native/{p-2281d5ef.entry.js.map → p-4d2adf8c.entry.js.map} +0 -0
  320. /package/dist/native/{p-942f8e92.entry.js.map → p-4eb132d3.entry.js.map} +0 -0
  321. /package/dist/native/{p-c10e5113.entry.js.map → p-552ca13e.entry.js.map} +0 -0
  322. /package/dist/native/{p-ecc28398.entry.js.map → p-657a0b8a.entry.js.map} +0 -0
  323. /package/dist/native/{p-464ef88f.entry.js.map → p-794b7820.entry.js.map} +0 -0
  324. /package/dist/native/{p-f5e0d5c5.entry.js.map → p-870d5a5c.entry.js.map} +0 -0
  325. /package/dist/native/{p-332c5d6c.entry.js.map → p-a3ea7b59.entry.js.map} +0 -0
  326. /package/dist/native/{p-442f04f9.entry.js.map → p-ac72abfc.entry.js.map} +0 -0
  327. /package/dist/native/{p-ab84ff42.entry.js.map → p-cce90f27.entry.js.map} +0 -0
  328. /package/dist/native/{p-f89b7d06.entry.js.map → p-d3d664c7.entry.js.map} +0 -0
  329. /package/dist/native/{p-62df7dd4.entry.js.map → p-d7b5ab6e.entry.js.map} +0 -0
  330. /package/dist/native/{p-314d2b34.entry.js.map → p-d987271c.entry.js.map} +0 -0
  331. /package/dist/native/{p-3af5bcc1.entry.js.map → p-dcfef507.entry.js.map} +0 -0
  332. /package/dist/native/{p-b052f1cb.entry.js.map → p-ddb4fcc3.entry.js.map} +0 -0
  333. /package/dist/native/{p-2ed540e3.entry.js.map → p-ede0c391.entry.js.map} +0 -0
  334. /package/dist/native/{p-1a46cb52.entry.js.map → p-efb52057.entry.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"names":["candidateSelectors","candidateSelector","join","NoElement","Element","matches","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","element","_element$getRootNode","call","ownerDocument","isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","inert","result","parentNode","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","Array","slice","apply","querySelectorAll","unshift","getCandidatesIteratively","elements","options","elementsToCheck","from","length","shift","tagName","assigned","assignedElements","content","children","nestedCandidates","flatten","push","scopeParent","validCandidate","includes","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","isNaN","parseInt","getTabIndex","Error","tabIndex","test","getSortOrderTabIndex","isScope","sortOrderedTabbables","a","b","documentOrder","isInput","isHiddenInput","type","isDetailsWithSummary","r","some","child","getCheckedRadio","nodes","form","i","checked","isTabbableRadio","name","radioScope","queryRadios","radioSet","window","CSS","escape","err","console","error","message","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","host","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","contains","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","parentElement","originalNode","rootNode","assignedSlot","getClientRects","isDisabledFromFieldset","disabled","item","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","forEach","candidateTabindex","sort","reduce","acc","sortable","concat","tabbable","container","bind","nvDialogCss","NvDialogStyle0","NvDialog","constructor","hostRef","this","eventsAttached","open","undismissable","clickOutside","controlled","full","handleCloseButton","hide","handleCancelButton","handleDialogClose","close","emit","handleClickOutside","event","target","dialogElement","preventDefault","stopPropagation","triggerClickEvents","show","e","key","preventScroll","showModal","allowScroll","setAutofocus","focusableElements","topLeftElement","topLeftRect","rect","top","left","setAttribute","attachEventListeners","triggerElement","addEventListeners","document","body","style","overflow","ensureFormId","formElement","id","uuidv4","handleKeyDown","handleDocumentClick","handleDocumentTouch","handleDialogOpenChange","componentWillLoad","find","headerElement","toLowerCase","footerElement","componentWillUpdate","componentDidLoad","querySelector","disconnectedCallback","removeEventListeners","render","hasForm","h","Host","ref","onClose","role","class","clsx","emphasis","size","onClick","primaryButtonType","ButtonType","Submit","Button","onNvDialogCanceled"],"sources":["../../node_modules/tabbable/dist/index.esm.js","src/components/nv-dialog/nv-dialog.scss?tag=nv-dialog","src/components/nv-dialog/nv-dialog.tsx"],"sourcesContent":["/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","dialog {\n border-radius: var(--radius-rounded-2xl);\n background: var(--color-level-00-background);\n min-width: 400px;\n width: fit-content;\n max-width: 960px;\n margin: auto;\n\n &.full {\n width: 90vw;\n }\n\n /* shadow/2xl */\n box-shadow: 0px var(--shadow-y-axis-2xl) var(--shadow-blur-2xl)\n var(--shadow-spread-2xl) var(--shadow-color-opacity-3)\n var(--shadow-color-opacity-3);\n\n &::backdrop {\n opacity: var(--components-overlay-opacity);\n background: var(--components-overlay-background);\n }\n\n .content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n nv-button.close-button {\n position: absolute;\n top: var(--dialog-dismissible-position-top);\n right: var(--dialog-dismissible-position-right);\n display: flex;\n padding: var(--button-sm-icon-button-padding);\n justify-content: flex-end;\n align-items: flex-start;\n gap: 10px;\n }\n\n .content-body {\n padding: var(--dialog-body-padding-y) var(--dialog-body-padding-x);\n align-items: flex-start;\n gap: 8px;\n\n color: var(--color-content-medium-text);\n\n /* text/md/regular */\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--font-size-md);\n font-style: normal;\n font-weight: 400;\n line-height: var(--line-height-base); /* 150% */\n width: 100%;\n }\n }\n}\n","import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Method,\n Event,\n EventEmitter,\n Watch,\n Listen,\n} from '@stencil/core';\nimport { tabbable } from 'tabbable';\nimport {\n addEventListeners,\n removeEventListeners,\n type EventsAndListeners,\n} from '../../utils/events.utils';\nimport clsx from 'clsx';\nimport { ButtonType } from '../../utils/constants';\nimport { v4 as uuidv4 } from 'uuid';\n\n/**\n * @slot default - Body of the dialog.\n * @slot trigger - Content to be placed as the trigger, will override the trigger prop.\n * @slot header - Content to be placed as the header, will override the header prop.\n * @slot footer - Content to be placed as the footer, will override the footer prop.\n */\n@Component({\n tag: 'nv-dialog',\n styleUrl: 'nv-dialog.scss',\n shadow: false,\n})\nexport class NvDialog {\n @Element() el: HTMLNvDialogElement;\n private dialogElement!: HTMLDialogElement;\n private eventsAttached = false;\n private form: string;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the popover trigger. This\n * should be used when the slot for the trigger is not defined.\n */\n @Prop({ mutable: true })\n triggerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the header. This should\n * be used when the slot for the header is not defined.\n */\n @Prop({ mutable: true })\n headerElement: Element;\n\n /**\n * @internal\n * Accepts a reference to the DOM element acting as the footer. This should\n * be used when the slot for the footer is not defined.\n */\n @Prop({ mutable: true })\n footerElement: Element;\n\n /**\n * Use this prop to toggle the visibility of the dialog. Set to true to show\n * the dialog and false to hide it.\n */\n @Prop({ reflect: true, mutable: true })\n open: boolean = false;\n\n /**\n * If true, the dialog cannot be closed by the user.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * If true, the dialog will be closed when the backdrop is clicked.\n */\n @Prop({ reflect: true })\n readonly clickOutside: boolean = false;\n\n /**\n * If true, the dialog visibility is managed manually through methods or the open prop.\n */\n @Prop({ reflect: true })\n readonly controlled: boolean = false;\n\n /**\n * If true, the dialog takes full width styling.\n */\n @Prop({ reflect: true })\n readonly full: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Call this method to show the dialog, making it visible on the screen.\n */\n @Method()\n public async show() {\n this.preventScroll();\n this.dialogElement.showModal();\n this.open = true;\n }\n\n /**\n * Call this method to hide the dialog, making it disappear from view.\n */\n @Method()\n public async hide() {\n this.allowScroll();\n this.dialogElement.close();\n this.open = false;\n }\n\n /**\n * Handles the close button click.\n */\n private handleCloseButton = () => {\n this.hide();\n };\n\n /**\n * Handles the cancel button click.\n */\n private handleCancelButton = () => {\n this.hide();\n };\n\n /**\n * Sets the autofocus on the first focusable element in the dialog.\n */\n private setAutofocus() {\n const focusableElements = tabbable(this.dialogElement, {\n displayCheck: 'none',\n });\n\n if (focusableElements.length > 0) {\n // Convert to array and find element with smallest top and left position\n let topLeftElement = focusableElements[0];\n let topLeftRect = topLeftElement.getBoundingClientRect();\n\n focusableElements.forEach(element => {\n const rect = element.getBoundingClientRect();\n if (rect.top < topLeftRect.top || rect.left < topLeftRect.left) {\n topLeftElement = element;\n topLeftRect = rect;\n }\n });\n\n // Set autofocus attribute on the found element\n topLeftElement.setAttribute('autofocus', 'true');\n }\n }\n\n /**\n * Attaches event listeners to the dialog.\n */\n private attachEventListeners() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n addEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = true;\n }\n }\n\n /**\n * Prevents the body from scrolling when the dialog is open.\n */\n private preventScroll() {\n document.body.style.overflow = 'hidden';\n }\n\n /**\n * Allows the body to scroll when the dialog is closed.\n */\n\n private allowScroll() {\n document.body.style.overflow = '';\n }\n\n private ensureFormId(formElement: HTMLFormElement): string {\n if (!formElement.id) {\n formElement.id = `dialog-form-${uuidv4()}`;\n }\n return formElement.id;\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the dialog is closing in order to allow for cleanup, data-capture, etc.\n */\n @Event()\n close: EventEmitter<void>;\n\n /**\n * Handles the dialog close event.\n */\n private handleDialogClose = () => {\n this.hide();\n this.close.emit();\n };\n\n /**\n * Handles the keydown event to optionally prevent the native dialog from closing when the escape key is pressed.\n * @param {KeyboardEvent} event - The keydown event.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.undismissable) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /**\n * Handles the click event to close the dialog when clickOutside is true.\n * @param {MouseEvent} event - The click event.\n */\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: MouseEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n /**\n * Handles the touchstart event to close the dialog when clickOutside is true.\n * @param {TouchEvent} event - The touchstart event.\n */\n @Listen('touchstart', { target: 'document' })\n handleDocumentTouch(event: TouchEvent) {\n if (!this.clickOutside || this.undismissable) return;\n this.handleClickOutside(event);\n }\n\n private handleClickOutside = (event: MouseEvent | TouchEvent) => {\n if (event.target === this.dialogElement) {\n this.hide();\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n private triggerClickEvents: EventsAndListeners = [\n ['click', this.show],\n ['touchstart', this.show],\n [\n 'keydown',\n (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this.show();\n }\n },\n ],\n ];\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('open')\n async handleDialogOpenChange(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Lifecycle method that runs before the component loads.\n * Initializes the trigger, header, and footer elements by finding them in the component's children.\n * Elements are found either by their slot attribute or by their tag name (for dialog header/footer)\n */\n componentWillLoad() {\n this.triggerElement = Array.from(this.el.children).find(child => {\n return child.getAttribute('slot') === 'trigger';\n }) as HTMLElement;\n\n this.headerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'header' ||\n child.tagName.toLowerCase() === 'nv-dialogheader'\n );\n }) as HTMLElement;\n\n this.footerElement = Array.from(this.el.children).find(child => {\n return (\n child.getAttribute('slot') === 'footer' ||\n child.tagName.toLowerCase() === 'nv-dialogfooter'\n );\n }) as HTMLElement;\n\n // If no form ID is provided, check if there's a form and generate an ID\n if (!this.form) {\n const formElement = Array.from(this.el.children).find(child => {\n return child.tagName.toLowerCase() === 'form';\n }) as HTMLFormElement;\n\n if (formElement) {\n this.form = this.ensureFormId(formElement);\n }\n }\n }\n\n componentWillUpdate() {\n this.attachEventListeners();\n }\n\n componentDidLoad() {\n if (this.open) {\n this.show();\n }\n // Check if any element already has autofocus before setting it automatically\n if (!this.dialogElement.querySelector('[autofocus]')) {\n this.setAutofocus();\n }\n this.attachEventListeners();\n }\n\n disconnectedCallback() {\n if (this.triggerElement && !this.eventsAttached && !this.controlled) {\n removeEventListeners(this.triggerClickEvents, this.triggerElement, this);\n this.eventsAttached = false;\n }\n this.allowScroll();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const hasForm = this.form || this.el.querySelector('form');\n\n return (\n <Host>\n <slot name=\"trigger\"></slot>\n\n <dialog\n ref={el => (this.dialogElement = el)}\n onClose={this.handleDialogClose}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog-header\"\n aria-describedby=\"dialog-content\"\n class={clsx({ full: this.full })}\n >\n <div class=\"content\">\n {!this.undismissable && (\n <nv-button\n class=\"close-button\"\n emphasis=\"lower\"\n size=\"sm\"\n onClick={this.handleCloseButton}\n aria-label=\"Close dialog\"\n >\n <nv-icon name=\"x\" size=\"sm\" />\n </nv-button>\n )}\n\n {this.headerElement ? (\n <slot name=\"header\"></slot>\n ) : (\n <nv-dialogheader id=\"dialog-header\"></nv-dialogheader>\n )}\n\n <div class=\"content-body\" id=\"dialog-content\">\n <slot></slot>\n </div>\n\n {this.footerElement ? (\n <slot name=\"footer\"></slot>\n ) : (\n <nv-dialogfooter\n form={this.form}\n primaryButtonType={\n hasForm ? ButtonType.Submit : ButtonType.Button\n }\n onNvDialogCanceled={this.handleCancelButton}\n undismissable={this.undismissable}\n ></nv-dialogfooter>\n )}\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;AASA,IAAIA,EAAqB,CAAC,qBAAsB,sBAAuB,wBAAyB,uBAAwB,sBAAuB,oCAAqC,+BAAgC,+BAAgC,gEAAiE,6CAA8C,wBACnW,IAAIC,EAAmCD,EAAmBE,KAAK,KAC/D,IAAIC,SAAmBC,UAAY,YACnC,IAAIC,EAAUF,EAAY,WAAY,EAAKC,QAAQE,UAAUD,SAAWD,QAAQE,UAAUC,mBAAqBH,QAAQE,UAAUE,sBACjI,IAAIC,GAAeN,GAAaC,QAAQE,UAAUG,YAAc,SAAUC,GACxE,IAAIC,EACJ,OAAOD,IAAY,MAAQA,SAAiB,OAAS,GAAKC,EAAuBD,EAAQD,eAAiB,MAAQE,SAA8B,OAAS,EAAIA,EAAqBC,KAAKF,EACzL,EAAI,SAAUA,GACZ,OAAOA,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQG,aACnE,EAUA,IAAIC,EAAU,SAASA,EAAQC,EAAMC,GACnC,IAAIC,EACJ,GAAID,SAAgB,EAAG,CACrBA,EAAS,IACb,CAIE,IAAIE,EAAWH,IAAS,MAAQA,SAAc,OAAS,GAAKE,EAAqBF,EAAKI,gBAAkB,MAAQF,SAA4B,OAAS,EAAIA,EAAmBL,KAAKG,EAAM,SACvL,IAAIK,EAAQF,IAAa,IAAMA,IAAa,OAO5C,IAAIG,EAASD,GAASJ,GAAUD,GAAQD,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K,IAAIyI,KAAK,QAI1BrE,KAAKmD,cACJU,EAAA,QAAMjI,KAAK,WAEXiI,EAAA,mBAAiBlB,GAAG,kBAGtBkB,EAAA,OAAAvC,IAAA,2CAAK4C,MAAM,eAAevB,GAAG,kBAC3BkB,EAAA,QAAAvC,IAAA,8CAGDtB,KAAKqD,cACJQ,EAAA,QAAMjI,KAAK,WAEXiI,EAAA,mBACErI,KAAMwE,KAAKxE,KACX+I,kBACEX,EAAUY,EAAWC,OAASD,EAAWE,OAE3CC,mBAAoB3E,KAAKS,mBACzBN,cAAeH,KAAKG,kB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as e,h as t,a as s,g as i}from"./p-ab002252.js";const a={"w-full":"w-full",wFull:"w-full","is-active":"is-active","is-selected":"is-selected"};const l=class{constructor(t){e(this,t)}componentWillLoad(){this.applyClassesOnInitialRender()}componentDidLoad(){this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{if(e.type==="attributes"){const t=e.target;Object.keys(a).forEach((e=>{if(t.hasAttribute(e)){t.classList.add(a[e])}else{t.classList.remove(a[e])}}))}}))}));this.observeElements()}disconnectedCallback(){if(this.mutationObserver){this.mutationObserver.disconnect()}}applyClassesOnInitialRender(){Object.keys(a).forEach((e=>{const t=this.el.querySelectorAll(`[${e}]`);t.forEach((t=>{t.classList.add(a[e])}))}))}observeElements(){this.mutationObserver.observe(this.el,{attributes:true,attributeFilter:Object.keys(a),subtree:true})}render(){return t(s,{key:"81da4e7fd653192079ab22a607d1f525b504f3e4",style:{display:"block"}},t("slot",{key:"e766e4b073b16d367c473b02c94448cf835a4921"}))}get el(){return i(this)}};export{l as nv_base};
2
- //# sourceMappingURL=p-1a46cb52.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as o,c as e,h as a,a as n,g as i}from"./p-ab002252.js";import{c as s}from"./p-8a1a6e56.js";import{u as c,t}from"./p-42301d8f.js";import{u as r}from"./p-1daca48a.js";const d="nv-badge{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.with-gap{padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content;gap:var(--badge-gap-x)}nv-badge:not(.with-gap){padding:var(--badge-padding-y) var(--badge-padding-x);display:inline-flex !important;vertical-align:middle;align-items:center;border-radius:var(--radius-rounded-full);height:fit-content;width:fit-content}nv-badge.badge-1{color:var(--color-rainbow-1-text);background-color:var(--color-rainbow-1-background)}nv-badge.badge-1 .close:focus,nv-badge.badge-1 .close:focus-within{outline:none}nv-badge.badge-1 .close:focus-visible,nv-badge.badge-1 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-1-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-1 nv-icon{color:var(--color-rainbow-1-icon)}nv-badge.badge-2{color:var(--color-rainbow-2-text);background-color:var(--color-rainbow-2-background)}nv-badge.badge-2 .close:focus,nv-badge.badge-2 .close:focus-within{outline:none}nv-badge.badge-2 .close:focus-visible,nv-badge.badge-2 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-2-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-2 nv-icon{color:var(--color-rainbow-2-icon)}nv-badge.badge-3{color:var(--color-rainbow-3-text);background-color:var(--color-rainbow-3-background)}nv-badge.badge-3 .close:focus,nv-badge.badge-3 .close:focus-within{outline:none}nv-badge.badge-3 .close:focus-visible,nv-badge.badge-3 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-3-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-3 nv-icon{color:var(--color-rainbow-3-icon)}nv-badge.badge-4{color:var(--color-rainbow-4-text);background-color:var(--color-rainbow-4-background)}nv-badge.badge-4 .close:focus,nv-badge.badge-4 .close:focus-within{outline:none}nv-badge.badge-4 .close:focus-visible,nv-badge.badge-4 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-4-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-4 nv-icon{color:var(--color-rainbow-4-icon)}nv-badge.badge-5{color:var(--color-rainbow-5-text);background-color:var(--color-rainbow-5-background)}nv-badge.badge-5 .close:focus,nv-badge.badge-5 .close:focus-within{outline:none}nv-badge.badge-5 .close:focus-visible,nv-badge.badge-5 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-5-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-5 nv-icon{color:var(--color-rainbow-5-icon)}nv-badge.badge-6{color:var(--color-rainbow-6-text);background-color:var(--color-rainbow-6-background)}nv-badge.badge-6 .close:focus,nv-badge.badge-6 .close:focus-within{outline:none}nv-badge.badge-6 .close:focus-visible,nv-badge.badge-6 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-6-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-6 nv-icon{color:var(--color-rainbow-6-icon)}nv-badge.badge-7{color:var(--color-rainbow-7-text);background-color:var(--color-rainbow-7-background)}nv-badge.badge-7 .close:focus,nv-badge.badge-7 .close:focus-within{outline:none}nv-badge.badge-7 .close:focus-visible,nv-badge.badge-7 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-7-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-7 nv-icon{color:var(--color-rainbow-7-icon)}nv-badge.badge-8{color:var(--color-rainbow-8-text);background-color:var(--color-rainbow-8-background)}nv-badge.badge-8 .close:focus,nv-badge.badge-8 .close:focus-within{outline:none}nv-badge.badge-8 .close:focus-visible,nv-badge.badge-8 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-8-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-8 nv-icon{color:var(--color-rainbow-8-icon)}nv-badge.badge-9{color:var(--color-rainbow-9-text);background-color:var(--color-rainbow-9-background)}nv-badge.badge-9 .close:focus,nv-badge.badge-9 .close:focus-within{outline:none}nv-badge.badge-9 .close:focus-visible,nv-badge.badge-9 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-9-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-9 nv-icon{color:var(--color-rainbow-9-icon)}nv-badge.badge-10{color:var(--color-rainbow-10-text);background-color:var(--color-rainbow-10-background)}nv-badge.badge-10 .close:focus,nv-badge.badge-10 .close:focus-within{outline:none}nv-badge.badge-10 .close:focus-visible,nv-badge.badge-10 .close:has(:focus-visible){outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-rainbow-10-content);outline-offset:calc(var(--focus-outline-offset) * 0.2)}nv-badge.badge-10 nv-icon{color:var(--color-rainbow-10-icon)}nv-badge span{font-size:var(--font-size-xs);line-height:var(--line-height-xs) !important}nv-badge nv-icon>svg.icon-xs{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-sm{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-md{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-lg{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge nv-icon>svg.icon-xl{width:var(--spacing-3);height:var(--spacing-3);stroke-width:1.2px}nv-badge .close{padding:0;line-height:0;border:none;background:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;aspect-ratio:1/1;border-radius:var(--radius-rounded-full)}";const l=d;const b=class{constructor(a){o(this,a);this.closeClicked=e(this,"closeClicked",7);this.hiddenChanged=e(this,"hiddenChanged",7);this.hiddenChangedComplete=e(this,"hiddenChangedComplete",7);this.dismissal=false;this.color="1";this.label=null;this.leadIcon=null;this.dismissible=false;this.hidden=false;this._isHidden=this.hidden;this.preventAutoClose=false;this.handleClose=o=>{if(!this.preventAutoClose){this.hidden=true}this.closeClicked.emit(o)}}handleDismissalChange(o){this.dismissible=o}handleIconChange(o){this.leadIcon=o}async handleHiddenChange(o){this.hiddenChanged.emit(o);if(this._isHidden===true)this._isHidden=o;const{fadeIn:e,fadeOut:a}=r(this.ref,{duration:150});const{collapse:n,expand:i}=c(this.ref,{duration:150});if(o===true)await t(a,n).start();if(o===false)await t(i,e).start();this.hiddenChangedComplete.emit(o);if(this._isHidden===false)this._isHidden=o}componentWillLoad(){if(this.dismissal){this.dismissible=this.dismissal}if(this.icon!=null&&this.icon!=""){this.leadIcon=this.icon}if(this.hidden){const{setCollapsed:o}=c(this.ref);const{setFadeOut:e}=r(this.ref);o();e()}}render(){return a(n,{key:"63f256c6711546ca5304d46c2624e52f35dc2b46",class:s(`badge-${this.color}`,{"has-close":this.dismissible,"with-gap":this.dismissible||this.label,"visually-hidden":this._isHidden})},a("slot",{key:"181e608d22c697517ef55dbc4432ac06cdf6892e",name:"leading-icon"},this.leadIcon&&a("nv-icon",{key:"914d75ef9d54e2c8c94c9c99a4efeb59aa654f1c",slot:"leading-icon",name:this.leadIcon,size:"sm"})),this.label&&a("span",{key:"d32ff92840bba1cc983b24a4fee95af065ffef0e"},this.label),this.dismissible&&a("button",{key:"1dbd1e432774e26936f93f7207e1f6eb93fa0819",onClick:this.handleClose,class:"close",type:"button"},a("nv-icon",{key:"8372fb5ba1dafd5758807485a5be3880a009567d",name:"x",size:"sm"})))}get ref(){return i(this)}static get watchers(){return{dismissal:["handleDismissalChange"],icon:["handleIconChange"],hidden:["handleHiddenChange"]}}};b.style=l;const g="nv-fielddropdownitemcheck{cursor:pointer;display:flex;padding:var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);border-radius:var(--list-dropdown-item-radius)}nv-fielddropdownitemcheck slot-fb,nv-fielddropdownitemcheck span{all:unset}nv-fielddropdownitemcheck:hover{background-color:var(--components-list-dropdown-item-background-hover)}";const v=g;const u=class{constructor(a){o(this,a);this.itemChecked=e(this,"itemChecked",7);this.checked=false;this.disabled=false;this.onFieldcheckboxChanged=o=>{if(this.disabled)return;this.checked=o.detail;this.itemChecked.emit({value:this.value,checked:this.checked,group:this.group})};this.handleClick=()=>{if(this.disabled)return;if(this.el.querySelector("input").checked){this.checked=false}else{this.checked=true}}}render(){return a(n,{key:"f9445369d2703e0a5fe4417b1968f9a25dc94743",onClick:this.handleClick},a("nv-fieldcheckbox",{key:"a64195d14834b2a83d3b4c3f1451272fb97ff46a",checked:this.checked,name:this.label||this.value,label:this.label||this.value,"label-placement":"after",description:this.description,disabled:this.disabled,tabindex:"-1",role:"option",onCheckedChanged:this.onFieldcheckboxChanged}))}get el(){return i(this)}};u.style=v;export{b as nv_badge,u as nv_fielddropdownitemcheck};
2
- //# sourceMappingURL=p-22a45102.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvBadgeCss","NvBadgeStyle0","NvBadge","constructor","hostRef","this","dismissal","color","label","leadIcon","dismissible","hidden","_isHidden","preventAutoClose","handleClose","originalEvent","closeClicked","emit","handleDismissalChange","handleIconChange","icon","handleHiddenChange","hiddenChanged","fadeIn","fadeOut","useFade","ref","duration","collapse","expand","useCollapse","timeline","start","hiddenChangedComplete","componentWillLoad","setCollapsed","setFadeOut","render","h","Host","key","class","clsx","name","slot","size","onClick","type","nvFielddropdownitemcheckCss","NvFielddropdownitemcheckStyle0","NvFielddropdownitemcheck","checked","disabled","onFieldcheckboxChanged","event","detail","itemChecked","value","group","handleClick","el","querySelector","description","tabindex","role","onCheckedChanged"],"sources":["src/components/nv-badge/nv-badge.scss?tag=nv-badge","src/components/nv-badge/nv-badge.tsx","src/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.scss?tag=nv-fielddropdownitemcheck","src/components/nv-fielddropdownitemcheck/nv-fielddropdownitemcheck.tsx"],"sourcesContent":["@use \"sass:map\";\n@use \"../nv-icon/styles/mixins\" as icon;\n@import \"../../styles/focus-ring\";\n\n/* Variants */\n$badge-colors: (\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\");\n\n/* Define maps for color-related variables */\n$color-rainbow-text: (\n \"1\": var(--color-rainbow-1-text),\n \"2\": var(--color-rainbow-2-text),\n \"3\": var(--color-rainbow-3-text),\n \"4\": var(--color-rainbow-4-text),\n \"5\": var(--color-rainbow-5-text),\n \"6\": var(--color-rainbow-6-text),\n \"7\": var(--color-rainbow-7-text),\n \"8\": var(--color-rainbow-8-text),\n \"9\": var(--color-rainbow-9-text),\n \"10\": var(--color-rainbow-10-text)\n);\n\n$color-rainbow-icon: (\n \"1\": var(--color-rainbow-1-icon),\n \"2\": var(--color-rainbow-2-icon),\n \"3\": var(--color-rainbow-3-icon),\n \"4\": var(--color-rainbow-4-icon),\n \"5\": var(--color-rainbow-5-icon),\n \"6\": var(--color-rainbow-6-icon),\n \"7\": var(--color-rainbow-7-icon),\n \"8\": var(--color-rainbow-8-icon),\n \"9\": var(--color-rainbow-9-icon),\n \"10\": var(--color-rainbow-10-icon)\n);\n\n$color-rainbow-background: (\n \"1\": var(--color-rainbow-1-background),\n \"2\": var(--color-rainbow-2-background),\n \"3\": var(--color-rainbow-3-background),\n \"4\": var(--color-rainbow-4-background),\n \"5\": var(--color-rainbow-5-background),\n \"6\": var(--color-rainbow-6-background),\n \"7\": var(--color-rainbow-7-background),\n \"8\": var(--color-rainbow-8-background),\n \"9\": var(--color-rainbow-9-background),\n \"10\": var(--color-rainbow-10-background)\n);\n\n@mixin root-styles() {\n padding: var(--badge-padding-y) var(--badge-padding-x);\n display: inline-flex !important; // override the display: none in [hidden] css\n vertical-align: middle;\n align-items: center;\n border-radius: var(--radius-rounded-full);\n height: fit-content;\n width: fit-content;\n}\n\n@mixin root-styles-with-gap() {\n @include root-styles();\n gap: var(--badge-gap-x);\n}\n\n@mixin badge-color($badge-number) {\n color: map.get($color-rainbow-text, $badge-number);\n background-color: map.get($color-rainbow-background, $badge-number);\n .close {\n @include focus-ring(var(--color-rainbow-#{$badge-number}-content), 0.2);\n }\n}\n\n@mixin icon-color($badge-number) {\n color: map.get($color-rainbow-icon, $badge-number);\n}\n\n@mixin type-settings($font-size, $line-height) {\n font-size: var(--font-size-xs);\n line-height: var(--line-height-xs) !important;\n}\n\nnv-badge {\n @include root-styles();\n\n //gap styles\n &.with-gap {\n @include root-styles-with-gap();\n }\n\n &:not(.with-gap) {\n @include root-styles();\n }\n\n // color styles\n @each $i in $badge-colors {\n &.badge-#{$i} {\n @include badge-color($i);\n nv-icon {\n @include icon-color($i);\n }\n }\n }\n\n //label styles\n & span {\n @include type-settings(xs, xs);\n }\n\n // nv-icon styles\n & nv-icon > svg {\n @each $size, $config in icon.$size-variants {\n &.icon-#{$size} {\n @include icon.icon-size-and-stroke(\n map.get(map.get(icon.$size-variants, \"xs\"), size),\n map.get(map.get(icon.$size-variants, \"xs\"), stroke)\n );\n }\n }\n }\n\n .close {\n padding: 0;\n line-height: 0;\n border: none;\n background: none;\n cursor: pointer;\n color: inherit;\n display: inline-flex;\n align-items: center;\n aspect-ratio: 1/1;\n border-radius: var(--radius-rounded-full);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n Element,\n State,\n} from '@stencil/core';\nimport clsx from 'clsx';\nimport { useFade, useCollapse, timeline } from '../../animations';\n\n/**\n * @slot leading-icon - Icon before the label.\n */\n@Component({\n tag: 'nv-badge',\n styleUrl: 'nv-badge.scss',\n shadow: false,\n})\nexport class NvBadge {\n @Element() ref: HTMLNvBadgeElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Whether the badge is dismissible.\n * @deprecated use dismissible instead.\n */\n @Prop({ reflect: true })\n readonly dismissal: boolean = false;\n\n /**\n * The icon to display in the badge.\n * @deprecated use leadIcon or slot=\"leading-icon\" instead.\n */\n @Prop({ reflect: true })\n readonly icon: string;\n\n /**\n * The location of the icon in the badge.\n * @deprecated only leadIcon now.\n */\n @Prop({ reflect: true })\n readonly iconLocation: 'left' | 'right';\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * The color of the badge. Use a string between 1 to 10\n */\n @Prop({ reflect: true })\n readonly color?: string = '1';\n\n /**\n * Main content of the badge.\n */\n @Prop({ reflect: true })\n readonly label?: string | null = null;\n\n /**\n * The lead icon of the badge.\n */\n @Prop({ reflect: true, mutable: true })\n leadIcon?: string | null = null;\n\n /**\n * Whether the badge is dismissible.\n */\n @Prop({ reflect: true, mutable: true })\n dismissible: boolean = false;\n\n /**\n * Controls the visibility of the badge. Will animate with fade and collapse.\n */\n @Prop({ reflect: true, mutable: true })\n hidden: boolean = false; // eslint-disable-line @stencil-community/reserved-member-names\n @State()\n private _isHidden: boolean = this.hidden;\n\n /**\n * When true, the alert does not automatically close upon dismissing.\n * Useful for externally controlled component behavior.\n */\n @Prop({ reflect: true })\n readonly preventAutoClose: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the badge is dismissed.\n */\n @Event()\n closeClicked: EventEmitter<MouseEvent>;\n\n /**\n * Emits when the 'hidden' prop changes, reflecting a change in visibility.\n * Passes hidden value to the detail.\n */\n @Event()\n hiddenChanged: EventEmitter<boolean>;\n\n /**\n * Emitted when the animations complete, detail includes the hidden value.\n */\n @Event()\n hiddenChangedComplete: EventEmitter<boolean>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * Handles the dismissal prop change.\n * @param {boolean} dismissal - The new dismissal value.\n */\n @Watch('dismissal')\n handleDismissalChange(dismissal: boolean) {\n this.dismissible = dismissal;\n }\n\n /**\n * Handles the icon prop change.\n * @param {string} icon - The new icon value.\n */\n @Watch('icon')\n handleIconChange(icon: string) {\n this.leadIcon = icon;\n }\n\n /**\n * Handles the hidden prop change.\n * @param {boolean} hidden - The new hidden value.\n */\n @Watch('hidden')\n async handleHiddenChange(hidden: boolean) {\n this.hiddenChanged.emit(hidden);\n if (this._isHidden === true) this._isHidden = hidden;\n\n const { fadeIn, fadeOut } = useFade(this.ref, { duration: 150 });\n const { collapse, expand } = useCollapse(this.ref, { duration: 150 });\n\n if (hidden === true) await timeline(fadeOut, collapse).start();\n if (hidden === false) await timeline(expand, fadeIn).start();\n\n this.hiddenChangedComplete.emit(hidden);\n\n if (this._isHidden === false) this._isHidden = hidden;\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n /**\n * Component will load.\n */\n componentWillLoad() {\n if (this.dismissal) {\n this.dismissible = this.dismissal;\n }\n\n if (this.icon != null && this.icon != '') {\n this.leadIcon = this.icon;\n }\n\n if (this.hidden) {\n const { setCollapsed } = useCollapse(this.ref);\n const { setFadeOut } = useFade(this.ref);\n\n setCollapsed();\n setFadeOut();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the close button click.\n * @param {MouseEvent} originalEvent - The original event.\n */\n private readonly handleClose = (originalEvent?: MouseEvent) => {\n if (!this.preventAutoClose) {\n this.hidden = true;\n }\n\n this.closeClicked.emit(originalEvent);\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n class={clsx(`badge-${this.color}`, {\n 'has-close': this.dismissible,\n 'with-gap': this.dismissible || this.label,\n 'visually-hidden': this._isHidden,\n })}\n >\n <slot name=\"leading-icon\">\n {this.leadIcon && (\n <nv-icon\n slot=\"leading-icon\"\n name={this.leadIcon}\n size=\"sm\"\n ></nv-icon>\n )}\n </slot>\n {this.label && <span>{this.label}</span>}\n {this.dismissible && (\n <button onClick={this.handleClose} class=\"close\" type=\"button\">\n <nv-icon name=\"x\" size=\"sm\" />\n </button>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n","nv-fielddropdownitemcheck {\n slot-fb,\n span {\n all: unset;\n }\n\n cursor: pointer;\n display: flex;\n padding: var(--list-dropdown-item-padding-y) var(--list-dropdown-item-padding-x);\n border-radius: var(--list-dropdown-item-radius);\n\n &:hover {\n background-color: var(--components-list-dropdown-item-background-hover);\n }\n}","import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\n\n@Component({\n tag: 'nv-fielddropdownitemcheck',\n styleUrl: 'nv-fielddropdownitemcheck.scss',\n shadow: false,\n})\nexport class NvFielddropdownitemcheck {\n @Element() el: HTMLNvFielddropdownitemcheckElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Indicates whether the checkbox is selected.\n */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /**\n * The value associated with this item.\n */\n @Prop({ reflect: true })\n readonly value?: string;\n\n /**\n * The label displayed alongside the checkbox.\n */\n @Prop({ reflect: true })\n readonly label?: string;\n\n /**\n * A description providing additional context or information about the\n * checkbox.\n */\n @Prop({ reflect: true })\n readonly description?: string;\n\n /**\n * The group this item belongs to, if applicable.\n */\n @Prop({ reflect: true })\n readonly group?: string;\n\n /**\n * Disables the item, preventing any user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Event emitted when the checkbox is toggled.\n * It provides details about the current state of the item.\n */\n @Event()\n itemChecked: EventEmitter<{\n /**\n * The value associated with this item\n */\n value: string | undefined;\n /**\n * Whether the checkbox is currently checked\n */\n checked: boolean;\n /**\n * The group this item belongs to, if any\n */\n group?: string | undefined;\n }>;\n\n /**\n * when the child <nv-fieldcheckbox> change its `checked` state,\n * update `this.checked` and emit `itemChecked`.\n * @param {CustomEvent<boolean>} event - The event emitted by the <nv-fieldcheckbox> component.\n */\n private onFieldcheckboxChanged = (event: CustomEvent<boolean>) => {\n if (this.disabled) return;\n // NvFieldcheckbox has emitted checkedChanged\n this.checked = event.detail; // get the new state\n this.itemChecked.emit({\n value: this.value,\n checked: this.checked,\n group: this.group,\n });\n };\n\n /** Make sure the checkbox is checked when clicked anywhere in the item. */\n private handleClick = () => {\n if (this.disabled) return;\n if (this.el.querySelector('input').checked) {\n this.checked = false;\n } else {\n this.checked = true;\n }\n };\n\n render() {\n return (\n <Host onClick={this.handleClick}>\n <nv-fieldcheckbox\n checked={this.checked}\n name={this.label || this.value}\n label={this.label || this.value}\n label-placement=\"after\"\n description={this.description}\n disabled={this.disabled}\n tabindex=\"-1\"\n role=\"option\"\n onCheckedChanged={this.onFieldcheckboxChanged}\n ></nv-fieldcheckbox>\n </Host>\n );\n }\n}\n"],"mappings":"8KAAA,MAAMA,EAAa,m7LACnB,MAAAC,EAAeD,E,MCqBFE,EAAO,MALpB,WAAAC,CAAAC,G,+JAgBWC,KAAAC,UAAqB,MAwBrBD,KAAAE,MAAiB,IAMjBF,KAAAG,MAAwB,KAMjCH,KAAAI,SAA2B,KAM3BJ,KAAAK,YAAuB,MAMvBL,KAAAM,OAAkB,MAEVN,KAAAO,UAAqBP,KAAKM,OAOzBN,KAAAQ,iBAA4B,MAoGpBR,KAAAS,YAAeC,IAC9B,IAAKV,KAAKQ,iBAAkB,CAC1BR,KAAKM,OAAS,I,CAGhBN,KAAKW,aAAaC,KAAKF,EAAc,C,CAvEvC,qBAAAG,CAAsBZ,GACpBD,KAAKK,YAAcJ,C,CAQrB,gBAAAa,CAAiBC,GACff,KAAKI,SAAWW,C,CAQlB,wBAAMC,CAAmBV,GACvBN,KAAKiB,cAAcL,KAAKN,GACxB,GAAIN,KAAKO,YAAc,KAAMP,KAAKO,UAAYD,EAE9C,MAAMY,OAAEA,EAAMC,QAAEA,GAAYC,EAAQpB,KAAKqB,IAAK,CAAEC,SAAU,MAC1D,MAAMC,SAAEA,EAAQC,OAAEA,GAAWC,EAAYzB,KAAKqB,IAAK,CAAEC,SAAU,MAE/D,GAAIhB,IAAW,WAAYoB,EAASP,EAASI,GAAUI,QACvD,GAAIrB,IAAW,YAAaoB,EAAS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AAOrD,KAAKqD,OACZ,EAIIrD,KAAAsD,YAAc,KACpB,GAAItD,KAAK+C,SAAU,OACnB,GAAI/C,KAAKuD,GAAGC,cAAc,SAASV,QAAS,CAC1C9C,KAAK8C,QAAU,K,KACV,CACL9C,KAAK8C,QAAU,I,GAInB,MAAAd,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACM,QAASzC,KAAKsD,aAClBrB,EAAA,oBAAAE,IAAA,2CACEW,QAAS9C,KAAK8C,QACdR,KAAMtC,KAAKG,OAASH,KAAKoD,MACzBjD,MAAOH,KAAKG,OAASH,KAAKoD,MAAK,kBACf,QAChBK,YAAazD,KAAKyD,YAClBV,SAAU/C,KAAK+C,SACfW,SAAS,KACTC,KAAK,SACLC,iBAAkB5D,KAAKgD,yB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as e,c as r,h as t,a,g as o}from"./p-ab002252.js";import{c as i}from"./p-8a1a6e56.js";import{v as d}from"./p-f5ff676c.js";const n='nv-fieldtextarea{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box}nv-fieldtextarea[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fieldtextarea[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive)}nv-fieldtextarea[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fieldtextarea[required]:not([required=false]) label::after{content:"*";color:var(--components-form-text-required);font-weight:700}nv-fieldtextarea label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fieldtextarea .textarea-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch}nv-fieldtextarea .textarea-wrapper .textarea-container{display:flex;flex-grow:1;padding:calc(var(--form-field-padding-y) - 1px) var(--form-field-padding-x);justify-content:center;align-items:center;gap:var(--form-field-gap);align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fieldtextarea .textarea-wrapper .textarea-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldtextarea .textarea-wrapper .textarea-container:focus-within{border-color:var(--nv-field-border-focus);box-shadow:0 0 0 var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldtextarea .textarea-wrapper .textarea-container:has(textarea:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldtextarea .textarea-wrapper .textarea-container:has(textarea:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldtextarea .textarea-wrapper .textarea-container textarea{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);text-overflow:ellipsis;font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height)}nv-fieldtextarea .textarea-wrapper .textarea-container textarea:focus{outline:none}nv-fieldtextarea .textarea-wrapper .textarea-container textarea::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:"TT Norms Pro", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fieldtextarea .textarea-wrapper .textarea-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldtextarea .description{align-self:stretch;color:var(--components-form-text-description-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fieldtextarea .error-description{align-self:stretch;color:var(--components-form-text-description-default);font-family:"TT Norms Pro", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}';const s=n;const l=class{constructor(t){e(this,t);this.valueChanged=r(this,"valueChanged",7);this.inputId=d();this.disabled=false;this.readonly=false;this.required=false;this.error=false;this.success=false;this.rows=3;this.resize="vertical";this.autosize=false;this.autofocus=false;this.handleTextarea=e=>{const r=e.target;this.value=r.value;this.valueChanged.emit(r.value)};this.handleTextareaContainerClick=()=>{this.textareaElement.focus()}}rowsChanged(){if(this.autosize){this.adjustTextareaHeight()}}autosizeChanged(){var e;if(this.autosize){this.adjustTextareaHeight()}else{(e=this.textareaElement)===null||e===void 0?void 0:e.style.removeProperty("height")}}handleValueChange(){if(this.autosize){this.adjustTextareaHeight()}}adjustTextareaHeight(){if(this.textareaElement&&this.autosize){requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.textareaElement.style.height="auto";const e=window.getComputedStyle(this.textareaElement);const r=parseFloat(e.lineHeight);const t=parseFloat(e.paddingTop);const a=parseFloat(e.paddingBottom);const o=parseFloat(e.borderTopWidth);const i=parseFloat(e.borderBottomWidth);const d=r*this.rows+t+a+o+i;this.textareaElement.style.minHeight=`${d}px`;this.textareaElement.style.height=this.textareaElement.scrollHeight+"px"}))}))}}componentWillRender(){if(this.message){this.description=this.message}if(this.validation){this.errorDescription=this.validation;this.error=true}}componentDidLoad(){if(this.autosize){this.adjustTextareaHeight()}}render(){return t(a,{key:"967dc1eda269d0e3df1351d3e34b8be14f9cb639"},(this.label||this.el.querySelector('[slot="label"]'))&&t("label",{key:"4337acb56fc6712eb0a3e509b2a551043b43eadf",htmlFor:this.inputId},t("slot",{key:"c7229aad2d78f79fad1f103908976efefe282b01",name:"label"},this.label)),t("div",{key:"a33155dbb4d6b5d481503225136435690eebf819",class:"textarea-wrapper"},t("div",{key:"14dbd33038acef44773bcf925dcb1fa9531bb6e9",class:"textarea-container",onClick:this.handleTextareaContainerClick},t("textarea",{key:"eee274bac197d25f99114f95684996e1fa933b57",id:this.inputId,ref:e=>this.textareaElement=e,placeholder:this.placeholder,autofocus:this.autofocus,name:this.name,disabled:this.disabled,readOnly:this.readonly,required:this.required,maxlength:this.maxlength,minlength:this.minlength,autocomplete:"off",value:this.value,onInput:this.handleTextarea,rows:this.rows,class:i(this.resize==="none"&&"resize-none",this.resize==="vertical"&&"resize-y",this.resize==="horizontal"&&"resize-x",this.resize==="both"&&"resize")}))),(this.description||this.el.querySelector('[slot="description"]'))&&t("div",{key:"f3f214c3a3e3ee03b3ac44d7dcf6224f3d58585d",class:"description"},t("slot",{key:"803bf10aec909ab4c55098818df6bcd3e22a1957",name:"description"},this.description)),(this.errorDescription||this.el.querySelector('[slot="error-description"]'))&&t("div",{key:"aefd1d3ed4ed2535b06cd314ffe0b19506f7510d",hidden:!this.error,class:"error-description"},t("slot",{key:"e43344938bda4acb4523998e9d21f5b6d8300d1a",name:"error-description"},this.errorDescription)))}static get formAssociated(){return true}get el(){return o(this)}static get watchers(){return{rows:["rowsChanged"],autosize:["autosizeChanged"],value:["handleValueChange"]}}};l.style=s;export{l as nv_fieldtextarea};
2
- //# sourceMappingURL=p-45577c7f.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as a,h as r,a as c}from"./p-ab002252.js";const s="nv-row{display:flex;flex-wrap:wrap;margin-right:calc(var(--spacing-4) * -1);margin-left:calc(var(--spacing-4) * -1);row-gap:var(--spacing-4)}";const e=s;const n=class{constructor(r){a(this,r)}render(){return r(c,{key:"d6f9bbc1ed59bfc59a97728896c0443c8e104e59"},r("slot",{key:"3d9c1c809524d0a4b9d8ad541ead8978d246c998"}))}};n.style=e;export{n as nv_row};
2
- //# sourceMappingURL=p-46aa1136.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as a,h as r,a as e}from"./p-ab002252.js";const b="nv-breadcrumbs{display:block}nv-breadcrumbs>ol{display:flex;flex-wrap:wrap;align-items:center;gap:var(--breadcrumb-padding-y)}nv-breadcrumbs nv-breadcrumb:last-child [data-scope=separator],nv-breadcrumbs nv-breadcrumb:last-child [slot=separator]{display:none}";const s=b;const c=class{constructor(r){a(this,r)}render(){return r(e,{key:"d54bb25f9f34ea0f5ea58da6a60261aed57fefef",role:"navigation","aria-label":"breadcrumbs"},r("ol",{key:"660c31fbb8860ce0639b475875dd720f3876549b"},r("slot",{key:"c77828910bfb759839d04b5ac28e11cebec7c937"})))}};c.style=s;export{c as nv_breadcrumbs};
2
- //# sourceMappingURL=p-665db087.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as s,a,g as i}from"./p-ab002252.js";import{d as n,e as o}from"./p-cb34aa4f.js";const r="nv-table{display:block}nv-table .hidden{display:none}nv-table table{border-collapse:collapse;border-color:inherit;text-indent:0;width:100%}nv-table th{text-align:left;border-bottom:1px solid var(--components-datagrid-border-header);height:var(--spacing-12);padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md);font-weight:700;color:var(--components-datagrid-content-header)}nv-table td{border-bottom:1px solid var(--components-datagrid-border-body);height:var(--spacing-12);max-height:var(--spacing-14);padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-md);font-weight:400;color:var(--components-datagrid-content-text);white-space:nowrap;text-overflow:ellipsis}nv-table tbody>tr:hover{background:var(--color-interaction-container-neutral-background-hover)}";const l=r;const h=class{constructor(s){t(this,s);this.action=e(this,"action",7);this.templateCache=new Map;this.headerTemplateCache=new Map;this.parsedColumns=[];this.parsedData=[];this.table=null;this.data=[];this.columnsConfig=[];this.fallbackValue="N/A";this.noDataMessage="No data available";this.noColumnsNoDataMessage="No data or columns available to display."}cacheTemplates(){const t=Array.from(this.el.querySelectorAll("nv-tablecolumn"));t.forEach((t=>{const e=t.name;const s=t.querySelector('[slot="cell"]');if(s){const t=n(s);this.templateCache.set(e,t)}const a=t.querySelector('[slot="header"]');if(a){const t=n(a);this.headerTemplateCache.set(e,t)}else{const s=t.header;if(s){const t=document.createElement("div");t.textContent=s;this.headerTemplateCache.set(e,t)}}}))}parseDataAndColumns(){if(this.dataJson){this.parseJsonData(this.dataJson)}else if(this.data&&this.data.length>0){this.parseDataArray(this.data,this.parsedData)}if(this.columnsConfigJson){this.parseJsonColumns(this.columnsConfigJson,this.parsedColumns)}else if(this.columnsConfig&&this.columnsConfig.length>0){this.parseColumnsArray(this.columnsConfig,this.parsedColumns)}else if(this.headerTemplateCache.size>0){const t=Array.from(this.headerTemplateCache.keys());const e=t.map((t=>Object.assign({},{name:t,header:t?t.charAt(0).toUpperCase()+t.slice(1):""})));this.parseColumnsArray(e,this.parsedColumns)}else if(this.parsedData.length>0){const t=this.parsedData[0];const e=Object.keys(t).map((t=>({name:t,header:t.charAt(0).toUpperCase()+t.slice(1)})));this.parseColumnsArray(e,this.parsedColumns)}}deepEqual(t,e){return JSON.stringify(t)===JSON.stringify(e)}parseDataArray(t,e){const s=Array.isArray(t)?t:[];const a=Array.isArray(e)?e:[];if(this.deepEqual(s,a)){return}this.parsedData=Array.isArray(t)?t:[]}parseColumnsArray(t,e){const s=Array.isArray(t)?t:[];const a=Array.isArray(e)?e:[];if(this.deepEqual(s,a)){return}this.parsedColumns=s}initializeTable(){this.table=null;if(this.parsedColumns.length>0){this.table={columns:this.parsedColumns,data:this.getTableData()}}else{this.table=null}}getTableData(){if(this.parsedData&&Array.isArray(this.parsedData)&&this.parsedData.length>0){return[...this.parsedData]}else{return[]}}replaceKeyWithValue(t,e){var s;return(s=e.split(".").reduce(((t,e)=>t&&t[e]!==undefined?t[e]:undefined),t))!==null&&s!==void 0?s:this.fallbackValue}renderTemplate(t,e){if(!t){return null}const a=t instanceof HTMLTemplateElement?t.content:t;const i=n(a);i.querySelectorAll("*").forEach((t=>{this.replacePlaceholdersTextContent(t,e);this.replacePlaceholdersAttributes(t,e);this.replacePlaceholdersProperties(t,e)}));i.querySelectorAll("[data-bind-event]").forEach((t=>{const s=t.getAttribute("data-bind-event")||"";const a=s.split(":");if(!s.includes(":")||a.length<2){console.warn("Invalid data-bind-event format:",s);return}const i=a[0];const n=a[1];const o=a.length>2?a[2]:null;t.addEventListener(i,(()=>{var t;const s=(t=o===null||o===void 0?void 0:o.split(","))!==null&&t!==void 0?t:[];const a=s.reduce(((t,s)=>{t[s]=e===null||e===void 0?void 0:e[s];return t}),{});const i={keyAction:n,details:a};this.action.emit(i)}))}));setTimeout((()=>{i.querySelectorAll("*").forEach((t=>{if(typeof t.connectedCallback==="function"){t.connectedCallback()}}))}),0);return s("div",{ref:t=>{if(t){t.innerHTML="";t.appendChild(i)}}})}replacePlaceholdersTextContent(t,e){t.childNodes.forEach((t=>{if(t.nodeType===Node.TEXT_NODE){t.textContent=t.textContent.replace(/__([\w.]+)__/g,((t,s)=>this.replaceKeyWithValue(e,s)))}}))}replacePlaceholdersAttributes(t,e){Array.from(t.attributes).forEach((t=>{if(t.value.includes("__")){t.value=t.value.replace(/__([\w.]+)__/g,((t,s)=>this.replaceKeyWithValue(e,s)))}}))}replacePlaceholdersProperties(t,e){const s=new Set;Object.keys(t).forEach((t=>s.add(t)));let a=Object.getPrototypeOf(t);while(a&&a!==HTMLElement.prototype){Object.keys(a).forEach((t=>s.add(t)));a=Object.getPrototypeOf(a)}s.forEach((s=>{if(typeof t[s]!=="function"&&!s.startsWith("on")&&!o.has(s)){try{const a=t[s];if(typeof a==="string"&&a.includes("__")){t[s]=a.replace(/__([\w.]+)__/g,((t,s)=>this.replaceKeyWithValue(e,s)))}}catch(t){console.warn(`Could not assign property ${s}:`,t.message)}}}))}parseColumns(t,e){this.parseColumnsArray(t,e)}parseJsonColumns(t,e){try{const s=t?JSON.parse(t):[];this.parseColumnsArray(s,e)}catch(t){console.error("Invalid JSON format for columnsConfigJson:",t.message);this.parsedColumns=[]}}parseData(t,e){this.parseDataArray(t,e)}parseJsonData(t){try{const e=t?JSON.parse(t):[];this.parseDataArray(e,this.parsedData)}catch(t){console.error("Invalid JSON format for dataJson:",t.message);this.parsedData=[]}}handleParsedChange(){this.initializeTable()}componentWillLoad(){this.cacheTemplates();this.parseDataAndColumns()}render(){const t=!this.table||this.table===undefined||this.parsedColumns.length===0?[]:this.table.columns;const e=!this.table||this.table===undefined||this.parsedData.length===0?[]:this.table.data;return s(a,{key:"bf96a7c40a0960fc68778c33ec63a1d574993408"},s("div",{key:"77e4ace0a9925ef6f5f7e1f51a2abc0c381d8ba5",class:"hidden"},s("slot",{key:"cdeb4abdd65d0e5de7064af63b1a39e661d4b49b"})),s("slot",{key:"4322aeb2858716be200a8d6851ef1d47ee0c44bb",name:"before"}),this.parsedColumns.length===0&&this.parsedData.length===0?s("div",{class:"no-data"},this.noColumnsNoDataMessage):s("table",{class:"table"},this.parsedColumns.length>0&&t.length>0&&s("thead",{class:"table-header"},s("tr",null,t&&t.map((t=>s("th",{key:t.name},this.renderTemplate(this.headerTemplateCache.get(t.name),{})||t.header))))),s("tbody",{class:"table-body"},!e||e.length===0?s("tr",null,s("td",{colSpan:t.length||12,class:"no-data"},this.noDataMessage)):e.map((e=>s("tr",{key:JSON.stringify(e)},t.map((t=>{var a;return s("td",null,this.renderTemplate(this.templateCache.get(t.name),e)||((a=e[t.name])!==null&&a!==void 0?a:this.fallbackValue))}))))))),s("slot",{key:"e5e490de2ff568c962368f39dbcd5c119e814b0d",name:"after"}))}get el(){return i(this)}static get watchers(){return{columnsConfig:["parseColumns"],columnsConfigJson:["parseJsonColumns"],data:["parseData"],dataJson:["parseJsonData"],parsedColumns:["handleParsedChange"],parsedData:["handleParsedChange"]}}};h.style=l;export{h as nv_table};
2
- //# sourceMappingURL=p-68b5a92c.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvTableCss","NvTableStyle0","NvTable","constructor","hostRef","this","templateCache","Map","headerTemplateCache","parsedColumns","parsedData","table","data","columnsConfig","fallbackValue","noDataMessage","noColumnsNoDataMessage","cacheTemplates","columns","Array","from","el","querySelectorAll","forEach","col","key","name","cellSlot","querySelector","element","deepCopyElement","set","headerSlot","header","headerDiv","document","createElement","textContent","parseDataAndColumns","dataJson","parseJsonData","length","parseDataArray","columnsConfigJson","parseJsonColumns","parseColumnsArray","size","headerKeys","keys","arrayColumnsConfig","map","Object","assign","charAt","toUpperCase","slice","firstRow","deepEqual","a","b","JSON","stringify","newValue","oldValue","safeNewValue","isArray","safeOldValue","initializeTable","getTableData","replaceKeyWithValue","obj","path","_a","split","reduce","acc","undefined","renderTemplate","template","row","templateContent","HTMLTemplateElement","content","replacePlaceholdersTextContent","replacePlaceholdersAttributes","replacePlaceholdersProperties","bindEvent","getAttribute","splitted","includes","console","warn","eventType","keyAction","details","addEventListener","keyValue","action","emit","setTimeout","child","connectedCallback","h","ref","innerHTML","appendChild","childNodes","node","nodeType","Node","TEXT_NODE","replace","_","attributes","attr","value","properties","Set","add","proto","getPrototypeOf","HTMLElement","prototype","prop","startsWith","excludedProps","has","error","message","parseColumns","newItems","parse","e","parseData","handleParsedChange","componentWillLoad","render","headerGroups","rows","Host","class","get","colSpan"],"sources":["src/components/nv-table/nv-table.scss?tag=nv-table","src/components/nv-table/nv-table.tsx"],"sourcesContent":["@mixin root-styles() {\n display: block;\n}\n\nnv-table {\n @include root-styles();\n\n .hidden {\n display: none;\n }\n\n table {\n border-collapse: collapse;\n border-color: inherit;\n text-indent: 0;\n width: 100%;\n }\n th {\n text-align: left;\n border-bottom: 1px solid var(--components-datagrid-border-header);\n height: var(--spacing-12);\n padding: var(--spacing-3) var(--spacing-4);\n font-size: var(--font-size-md);\n font-weight: 700;\n color: var(--components-datagrid-content-header);\n }\n td {\n border-bottom: 1px solid var(--components-datagrid-border-body);\n height: var(--spacing-12);\n max-height: var(--spacing-14);\n padding: var(--spacing-2) var(--spacing-4);\n font-size: var(--font-size-md);\n font-weight: 400;\n color: var(--components-datagrid-content-text);\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n tbody > tr:hover {\n background: var(--color-interaction-container-neutral-background-hover);\n }\n}\n\n// https://tailwindcss.com/docs/table-layout","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Host,\n Prop,\n State,\n h,\n Element,\n Watch,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { ColumnConfig } from '../../interfaces/ColumnConfig';\nimport { ActionEvent } from '../../interfaces/actionEvent';\nimport { deepCopyElement, excludedProps } from '../../utils/dom.utils';\n\n/**\n * Helper interface to define the table structure\n */\ninterface Table {\n /**\n * Configuration of the columns of the table\n */\n columns: ColumnConfig[];\n\n /**\n * Data to be displayed in the table\n */\n data: any[];\n}\n\n/**\n * @slot default - Slot for the composed table columns\n * @slot before - Use this slot to insert HTML before the table.\n * @slot after - Use this slot to insert HTML after the table.\n */\n@Component({\n tag: 'nv-table',\n styleUrl: 'nv-table.scss',\n shadow: false,\n})\nexport class NvTable {\n @Element() el: HTMLNvTableElement;\n\n private readonly templateCache = new Map<string, Element>();\n private readonly headerTemplateCache = new Map<string, Element>();\n\n /****************************************************************************/\n //#region STATES\n\n @State()\n parsedColumns: ColumnConfig[] = [];\n\n @State()\n parsedData: any[] = [];\n\n @State()\n private table: Table = null;\n\n //#endregion STATES\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Data to be displayed in the table\n */\n @Prop({ reflect: true })\n readonly data: any[] = [];\n\n /**\n * Configuration of the columns of the table\n */\n @Prop({ reflect: true })\n readonly columnsConfig: ColumnConfig[] = [];\n\n /**\n * Data to be displayed in the table\n */\n @Prop({ reflect: true })\n readonly dataJson?: string;\n\n /**\n * Configuration of the columns of the table\n */\n @Prop({ reflect: true })\n readonly columnsConfigJson?: string;\n\n /**\n * Fallback value to be displayed when data is not available\n */\n @Prop({ reflect: true })\n readonly fallbackValue: string = 'N/A';\n\n /**\n * Message to be displayed when no data is available\n */\n @Prop({ reflect: true })\n readonly noDataMessage: string = 'No data available';\n\n /**\n * The message to display when there are no columns or data available.\n * @default 'No data or columns available to display.'\n */\n @Prop({ reflect: true })\n readonly noColumnsNoDataMessage: string =\n 'No data or columns available to display.';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Caches templates for cells and headers upfront to improve performance.\n */\n private cacheTemplates() {\n const columns = Array.from(this.el.querySelectorAll('nv-tablecolumn'));\n\n columns.forEach((col: HTMLNvTablecolumnElement) => {\n const key = col.name;\n const cellSlot = col.querySelector('[slot=\"cell\"]');\n\n if (cellSlot) {\n const element = deepCopyElement(cellSlot as HTMLElement);\n this.templateCache.set(key, element);\n }\n\n const headerSlot = col.querySelector('[slot=\"header\"]');\n\n if (headerSlot) {\n const element = deepCopyElement(headerSlot as HTMLElement);\n this.headerTemplateCache.set(key, element);\n } else {\n const header = col.header;\n\n if (header) {\n const headerDiv = document.createElement('div');\n headerDiv.textContent = header;\n this.headerTemplateCache.set(key, headerDiv);\n }\n }\n });\n }\n\n private parseDataAndColumns() {\n if (this.dataJson) {\n this.parseJsonData(this.dataJson);\n } else if (this.data && this.data.length > 0) {\n this.parseDataArray(this.data, this.parsedData);\n }\n\n if (this.columnsConfigJson) {\n this.parseJsonColumns(this.columnsConfigJson, this.parsedColumns);\n } else if (this.columnsConfig && this.columnsConfig.length > 0) {\n this.parseColumnsArray(this.columnsConfig, this.parsedColumns);\n } else if (this.headerTemplateCache.size > 0) {\n const headerKeys = Array.from(this.headerTemplateCache.keys());\n const arrayColumnsConfig = headerKeys.map<ColumnConfig>(key => ({\n ...{}, // Ensure no prototype inheritance\n name: key,\n header: key ? key.charAt(0).toUpperCase() + key.slice(1) : '',\n }));\n\n this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);\n } else if (this.parsedData.length > 0) {\n const firstRow = this.parsedData[0];\n const arrayColumnsConfig = Object.keys(firstRow).map<ColumnConfig>(\n key => ({\n name: key,\n header: key.charAt(0).toUpperCase() + key.slice(1),\n }),\n );\n\n this.parseColumnsArray(arrayColumnsConfig, this.parsedColumns);\n }\n }\n\n private deepEqual(a: any, b: any): boolean {\n return JSON.stringify(a) === JSON.stringify(b);\n }\n\n /**\n * Parses the data array and sets the state accordingly\n * @param {any[]} newValue - New value of the data array\n * @param {any[]} oldValue - Old value of the data array\n * @returns {void}\n */\n private parseDataArray(newValue: any[], oldValue: any[]) {\n // Ensure both are arrays for proper comparison\n const safeNewValue = Array.isArray(newValue) ? newValue : [];\n const safeOldValue = Array.isArray(oldValue) ? oldValue : [];\n\n if (this.deepEqual(safeNewValue, safeOldValue)) {\n return; // Deep comparison\n }\n\n this.parsedData = Array.isArray(newValue) ? newValue : [];\n }\n\n /**\n * Parses the columns array and sets the state accordingly\n * @param {ColumnConfig[]} newValue - New value of the columns array\n * @param {ColumnConfig[]} oldValue - Old value of the columns array\n * @returns {void}\n */\n private parseColumnsArray(\n newValue: ColumnConfig[] | null | undefined,\n oldValue: ColumnConfig[] | null | undefined,\n ) {\n // Ensure both are arrays for proper comparison\n const safeNewValue = Array.isArray(newValue) ? newValue : [];\n const safeOldValue = Array.isArray(oldValue) ? oldValue : [];\n\n // Use a proper deep comparison function (e.g., Lodash's isEqual)\n if (this.deepEqual(safeNewValue, safeOldValue)) {\n return;\n }\n\n // Assign only after confirming changes\n this.parsedColumns = safeNewValue;\n }\n\n private initializeTable() {\n // Clear the previous table instance (if any)\n this.table = null;\n\n if (this.parsedColumns.length > 0) {\n this.table = {\n columns: this.parsedColumns,\n data: this.getTableData(),\n };\n } else {\n this.table = null;\n }\n }\n\n private getTableData(): any[] {\n if (\n this.parsedData &&\n Array.isArray(this.parsedData) &&\n this.parsedData.length > 0\n ) {\n return [...this.parsedData];\n } else {\n return [];\n }\n }\n\n // Helper function to get nested property value\n private replaceKeyWithValue(obj: any, path: string) {\n return (\n path\n .split('.')\n .reduce(\n (acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined),\n obj,\n ) ?? this.fallbackValue\n );\n }\n\n private renderTemplate(template: Element | undefined, row: any) {\n if (!template) {\n return null;\n }\n\n // Handle <template> elements correctly\n const templateContent =\n template instanceof HTMLTemplateElement ? template.content : template;\n const element = deepCopyElement(templateContent as HTMLElement);\n\n // Replace placeholders in text content, attributes, and properties\n element.querySelectorAll('*').forEach(el => {\n // Replace placeholders in text content\n this.replacePlaceholdersTextContent(el, row);\n\n // Replace placeholders in attributes\n this.replacePlaceholdersAttributes(el, row);\n\n // Replace placeholders in properties\n this.replacePlaceholdersProperties(el, row);\n });\n\n // Handle `data-bind-event`\n element.querySelectorAll('[data-bind-event]').forEach(el => {\n const bindEvent = el.getAttribute('data-bind-event') || '';\n const splitted = bindEvent.split(':');\n\n if (!bindEvent.includes(':') || splitted.length < 2) {\n console.warn('Invalid data-bind-event format:', bindEvent);\n return;\n }\n\n const eventType = splitted[0];\n const keyAction = splitted[1];\n const details = splitted.length > 2 ? splitted[2] : null;\n\n el.addEventListener(eventType, () => {\n const keys = details?.split(',') ?? [];\n\n // Convert keys into a single object instead of an array of objects\n const keyValue = keys.reduce((acc, key) => {\n acc[key] = row?.[key];\n return acc;\n }, {} as Record<string, any>);\n\n const action: ActionEvent = { keyAction, details: keyValue };\n\n this.action.emit(action);\n });\n });\n\n // Ensure Web Components are properly connected\n setTimeout(() => {\n element.querySelectorAll('*').forEach(child => {\n if (typeof (child as any).connectedCallback === 'function') {\n (child as any).connectedCallback();\n }\n });\n }, 0);\n\n return (\n <div\n ref={el => {\n if (el) {\n el.innerHTML = ''; // Remove existing content\n el.appendChild(element); // Append new element\n }\n }}\n ></div>\n );\n }\n\n private replacePlaceholdersTextContent(element: Element, row: any) {\n // ✅ Replace placeholders in text content\n element.childNodes.forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n node.textContent = node.textContent.replace(/__([\\w.]+)__/g, (_, key) =>\n this.replaceKeyWithValue(row, key),\n );\n }\n });\n }\n\n private replacePlaceholdersAttributes(element: Element, row: any) {\n // ✅ Replace placeholders in attributes\n Array.from(element.attributes).forEach(attr => {\n if (attr.value.includes('__')) {\n attr.value = attr.value.replace(/__([\\w.]+)__/g, (_, key) =>\n this.replaceKeyWithValue(row, key),\n );\n }\n });\n }\n\n private replacePlaceholdersProperties(element: Element, row: any) {\n // ✅ Dynamically extract relevant properties\n const properties = new Set<string>();\n\n // Collect only own enumerable properties\n Object.keys(element).forEach(key => properties.add(key));\n\n // Collect inherited properties from prototypes (HTMLElement -> Element -> Node)\n let proto = Object.getPrototypeOf(element);\n while (proto && proto !== HTMLElement.prototype) {\n Object.keys(proto).forEach(key => properties.add(key));\n proto = Object.getPrototypeOf(proto);\n }\n\n // ✅ Filter and copy only non-function properties and exclude irrelevant ones\n properties.forEach(prop => {\n if (\n typeof (element as any)[prop] !== 'function' && // Ignore methods\n !prop.startsWith('on') && // Ignore event listeners (onclick, oninput, etc.)\n !excludedProps.has(prop) // 🚨 Prevent text duplication and irrelevant props\n ) {\n try {\n const value = element[prop];\n\n // ✅ Replace placeholders only if the value is a string\n if (typeof value === 'string' && value.includes('__')) {\n element[prop] = value.replace(/__([\\w.]+)__/g, (_, key: string) =>\n this.replaceKeyWithValue(row, key),\n ) as any; // ✅ TypeScript safe\n }\n } catch (error) {\n console.warn(`Could not assign property ${prop}:`, error.message);\n }\n }\n });\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('columnsConfig')\n parseColumns(newValue: ColumnConfig[], oldValue: ColumnConfig[]) {\n this.parseColumnsArray(newValue, oldValue);\n }\n\n @Watch('columnsConfigJson')\n parseJsonColumns(newValue: string | undefined, oldValue: ColumnConfig[]) {\n try {\n const newItems = newValue ? JSON.parse(newValue) : [];\n\n this.parseColumnsArray(newItems, oldValue);\n } catch (e) {\n console.error('Invalid JSON format for columnsConfigJson:', e.message);\n this.parsedColumns = [];\n }\n }\n\n @Watch('data')\n parseData(newValue: any[], oldValue: any[]) {\n this.parseDataArray(newValue, oldValue);\n }\n\n @Watch('dataJson')\n parseJsonData(newValue: string | undefined) {\n try {\n const newItems = newValue ? JSON.parse(newValue) : [];\n\n this.parseDataArray(newItems, this.parsedData);\n } catch (e) {\n console.error('Invalid JSON format for dataJson:', e.message);\n this.parsedData = [];\n }\n }\n\n @Watch('parsedColumns')\n @Watch('parsedData')\n handleParsedChange() {\n this.initializeTable();\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n this.cacheTemplates();\n\n this.parseDataAndColumns();\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n @Event()\n action: EventEmitter<ActionEvent>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n const headerGroups =\n !this.table || this.table === undefined || this.parsedColumns.length === 0\n ? []\n : this.table.columns;\n\n const rows =\n !this.table || this.table === undefined || this.parsedData.length === 0\n ? []\n : this.table.data;\n\n return (\n <Host>\n <div class=\"hidden\">\n <slot></slot>\n </div>\n\n <slot name=\"before\"></slot>\n\n {this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (\n <div class=\"no-data\">{this.noColumnsNoDataMessage}</div>\n ) : (\n <table class=\"table\">\n {this.parsedColumns.length > 0 && headerGroups.length > 0 && (\n <thead class=\"table-header\">\n <tr>\n {headerGroups &&\n headerGroups.map(col => {\n return (\n <th key={col.name}>\n {this.renderTemplate(\n this.headerTemplateCache.get(col.name),\n {},\n ) || col.header}\n </th>\n );\n })}\n </tr>\n </thead>\n )}\n <tbody class=\"table-body\">\n {!rows || rows.length === 0 ? (\n <tr>\n <td colSpan={headerGroups.length || 12} class=\"no-data\">\n {this.noDataMessage}\n </td>\n </tr>\n ) : (\n rows.map(row => (\n <tr key={JSON.stringify(row)}>\n {headerGroups.map(col => (\n <td>\n {this.renderTemplate(\n this.templateCache.get(col.name),\n row,\n ) ||\n (row[col.name] ?? this.fallbackValue)}\n </td>\n ))}\n </tr>\n ))\n )}\n </tbody>\n </table>\n )}\n\n <slot name=\"after\"></slot>\n </Host>\n );\n }\n // #endregion RENDER\n}\n"],"mappings":"sGAAA,MAAMA,EAAa,4xBACnB,MAAAC,EAAeD,E,MCwCFE,EAAO,MALpB,WAAAC,CAAAC,G,yCAQmBC,KAAAC,cAAgB,IAAIC,IACpBF,KAAAG,oBAAsB,IAAID,IAM3CF,KAAAI,cAAgC,GAGhCJ,KAAAK,WAAoB,GAGZL,KAAAM,MAAe,KAUdN,KAAAO,KAAc,GAMdP,KAAAQ,cAAgC,GAkBhCR,KAAAS,cAAwB,MAMxBT,KAAAU,cAAwB,oBAOxBV,KAAAW,uBACP,0C,CASM,cAAAC,GACN,MAAMC,EAAUC,MAAMC,KAAKf,KAAKgB,GAAGC,iBAAiB,mBAEpDJ,EAAQK,SAASC,IACf,MAAMC,EAAMD,EAAIE,KAChB,MAAMC,EAAWH,EAAII,cAAc,iBAEnC,GAAID,EAAU,CACZ,MAAME,EAAUC,EAAgBH,GAChCtB,KAAKC,cAAcyB,IAAIN,EAAKI,E,CAG9B,MAAMG,EAAaR,EAAII,cAAc,mBAErC,GAAII,EAAY,CACd,MAAMH,EAAUC,EAAgBE,GAChC3B,KAAKG,oBAAoBuB,IAAIN,EAAKI,E,KAC7B,CACL,MAAMI,EAAST,EAAIS,OAEnB,GAAIA,EAAQ,CACV,MAAMC,EAAYC,SAASC,cAAc,OACzCF,EAAUG,YAAcJ,EACxB5B,KAAKG,oBAAoBuB,IAAIN,EAAKS,E,MAMlC,mBAAAI,GACN,GAAIjC,KAAKkC,SAAU,CACjBlC,KAAKmC,cAAcnC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,a,g as o}from"./p-ab002252.js";import{B as n}from"./p-59768ee5.js";const l="nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}";const r=l;const h=class{constructor(s){t(this,s);this.nvDialogCanceled=i(this,"nvDialogCanceled",7);this.nvDialogPrimaryClicked=i(this,"nvDialogPrimaryClicked",7);if(s.$hostElement$["s-ei"]){this.internals=s.$hostElement$["s-ei"]}else{this.internals=s.$hostElement$.attachInternals();s.$hostElement$["s-ei"]=this.internals}this.hasSlot=false;this.disabled=false;this.undismissable=false;this.leadingIcon="";this.trailingIcon="";this.danger=false;this.cancelLabel="Cancel";this.primaryLabel="Primary";this.primaryButtonType=n.Button;this.handlePrimary=t=>{t.stopPropagation();this.nvDialogPrimaryClicked.emit()};this.handleCancel=t=>{t.stopPropagation();this.nvDialogCanceled.emit()}}componentWillLoad(){this.hasSlot=Array.from(this.el.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE&&!t.hasAttribute("slot")))}render(){return s(a,{key:"5b8ec01725943f9436d7ea4631282a4fd3545d00"},!this.hasSlot?s(e,null,!this.undismissable&&s("nv-button",{onClick:this.handleCancel,emphasis:"low",size:"sm"},this.cancelLabel),s("nv-button",{onClick:this.handlePrimary,disabled:this.disabled,danger:this.danger,size:"sm",emphasis:"high",form:this.form,type:this.primaryButtonType},this.leadingIcon&&s("nv-icon",{slot:"leading-icon",name:this.leadingIcon,size:"sm"}),this.primaryLabel,this.trailingIcon&&s("nv-icon",{slot:"trailing-icon",name:this.trailingIcon,size:"sm"}))):s("slot",null))}static get formAssociated(){return true}get el(){return o(this)}};h.style=r;const d='nv-dialogheader{padding:var(--dialog-header-padding-top) var(--dialog-header-padding-x) var(--dialog-header-padding-bottom) var(--dialog-header-padding-x);justify-content:space-between;align-items:flex-start;align-self:stretch}nv-dialogheader .heading{color:var(--color-content-high-text);font-family:"TT Norms Pro", sans-serif;font-size:var(--font-size-lg);font-style:normal;font-weight:500;line-height:var(--leading-px-6);letter-spacing:var(--letter-spacing-heading-xs)}nv-dialogheader .subheading{color:var(--color-content-low-text);font-family:"TT Norms Pro", sans-serif;font-size:var(--font-size-sm);font-style:normal;font-weight:400;line-height:var(--line-height-sm);}';const g=d;const c=class{constructor(i){t(this,i);this.hasSlot=false;this.heading="Dialog Title"}componentWillLoad(){this.hasSlot=Array.from(this.el.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE&&!t.hasAttribute("slot")))}render(){return s(a,{key:"539e18fe0cca582002a55fbf4a72f1dccdc09a06"},!this.hasSlot?s(e,null,s("div",{class:"heading"},this.heading),s("div",{class:"subheading"},this.subheading)):s("slot",null))}get el(){return o(this)}};c.style=g;export{h as nv_dialogfooter,c as nv_dialogheader};
2
- //# sourceMappingURL=p-6a629671.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["nvDialogfooterCss","NvDialogfooterStyle0","NvDialogfooter","constructor","hostRef","this","hasSlot","disabled","undismissable","leadingIcon","trailingIcon","danger","cancelLabel","primaryLabel","primaryButtonType","ButtonType","Button","handlePrimary","event","stopPropagation","nvDialogPrimaryClicked","emit","handleCancel","nvDialogCanceled","componentWillLoad","Array","from","el","childNodes","some","node","nodeType","Node","ELEMENT_NODE","hasAttribute","render","h","Host","key","Fragment","onClick","emphasis","size","form","type","slot","name","nvDialogheaderCss","NvDialogheaderStyle0","NvDialogheader","heading","class","subheading"],"sources":["src/components/nv-dialogfooter/nv-dialogfooter.scss?tag=nv-dialogfooter","src/components/nv-dialogfooter/nv-dialogfooter.tsx","src/components/nv-dialogheader/nv-dialogheader.scss?tag=nv-dialogheader","src/components/nv-dialogheader/nv-dialogheader.tsx"],"sourcesContent":["nv-dialogfooter {\n display: flex;\n padding: var(--dialog-footer-padding-top) var(--dialog-footer-padding-x)\n var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);\n\n justify-content: flex-end;\n align-items: flex-end;\n gap: var(--dialog-footer-gap-y);\n align-self: stretch;\n}\n","import {\n AttachInternals,\n Component,\n h,\n Host,\n Prop,\n Event,\n EventEmitter,\n Fragment,\n Element,\n} from '@stencil/core';\nimport { ButtonType } from '../../utils/constants';\n\n/**\n * @slot default - Custom content for the dialog footer. When provided, the default buttons will not be rendered.\n */\n@Component({\n tag: 'nv-dialogfooter',\n styleUrl: 'nv-dialogfooter.scss',\n shadow: false,\n formAssociated: true,\n})\nexport class NvDialogfooter {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvDialogfooterElement;\n private hasSlot = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Disables the primary button, preventing user interaction.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Controls the visibility of the cancel button. When true, the cancel button is\n * hidden.\n */\n @Prop({ reflect: true })\n readonly undismissable: boolean = false;\n\n /**\n * Sets the leading icon for the primary button.\n */\n @Prop({ reflect: true })\n readonly leadingIcon: string = '';\n\n /**\n * Sets the trailing icon for the primary button.\n */\n @Prop({ reflect: true })\n readonly trailingIcon: string = '';\n\n /**\n * Sets the danger state for the primary button.\n */\n @Prop({ reflect: true })\n readonly danger: boolean = false;\n\n /**\n * Sets the label for the cancel button.\n */\n @Prop({ reflect: true })\n readonly cancelLabel: string = 'Cancel';\n\n /**\n * Sets the label for the primary button.\n */\n @Prop({ reflect: true })\n readonly primaryLabel: string = 'Primary';\n\n /**\n * Sets the type of the primary button.\n */\n @Prop({ reflect: true })\n readonly primaryButtonType: `${ButtonType}` = ButtonType.Button;\n\n /**\n * Sets the form for the dialog footer.\n */\n @Prop({ reflect: true })\n readonly form: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the cancel button is clicked. This will close the dialog.\n */\n @Event()\n public nvDialogCanceled: EventEmitter<void>;\n\n /**\n * Emitted when the primary button is clicked. This allows to handle the primary action and potential data capture before closing the dialog.\n */\n @Event()\n public nvDialogPrimaryClicked: EventEmitter<void>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles the primary action when the primary button is clicked.\n * @param {Event} event - The click event.\n */\n\n private handlePrimary = (event: Event) => {\n event.stopPropagation();\n this.nvDialogPrimaryClicked.emit();\n };\n\n /**\n * Handles the cancel action when the cancel button is clicked. This will close the dialog.\n * @param {Event} event - The click event.\n */\n private handleCancel = (event: Event) => {\n event.stopPropagation();\n this.nvDialogCanceled.emit();\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n // Check if there are any child elements that don't have a slot attribute\n this.hasSlot = Array.from(this.el.childNodes).some(node => {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n !(node as Element).hasAttribute('slot')\n );\n });\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {!this.hasSlot ? (\n <Fragment>\n {!this.undismissable && (\n <nv-button onClick={this.handleCancel} emphasis=\"low\" size=\"sm\">\n {this.cancelLabel}\n </nv-button>\n )}\n <nv-button\n onClick={this.handlePrimary}\n disabled={this.disabled}\n danger={this.danger}\n size=\"sm\"\n emphasis=\"high\"\n form={this.form}\n type={this.primaryButtonType}\n >\n {this.leadingIcon && (\n <nv-icon\n slot=\"leading-icon\"\n name={this.leadingIcon}\n size=\"sm\"\n />\n )}\n {this.primaryLabel}\n {this.trailingIcon && (\n <nv-icon\n slot=\"trailing-icon\"\n name={this.trailingIcon}\n size=\"sm\"\n />\n )}\n </nv-button>\n </Fragment>\n ) : (\n <slot></slot>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n","nv-dialogheader {\n // calc(var(--dialog-header-padding-x, 24px) + var(--dialog-dismissible-position-right, 12px) + var(--button-sm-icon-size, 16px) + var(--button-sm-icon-button-padding, 8px))\n padding: var(--dialog-header-padding-top)\n var(--dialog-header-padding-x)\n var(--dialog-header-padding-bottom)\n var(--dialog-header-padding-x);\n justify-content: space-between;\n align-items: flex-start;\n align-self: stretch;\n\n .heading {\n color: var(--color-content-high-text);\n\n\n /* heading/xs/medium */\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--font-size-lg);\n font-style: normal;\n font-weight: 500;\n line-height: var(--leading-px-6); /* 133.333% */\n letter-spacing: var(--letter-spacing-heading-xs);\n }\n\n .subheading {\n color: var(--color-content-low-text);\n\n\n /* text/sm/regular */\n font-family: 'TT Norms Pro', sans-serif;\n font-size: var(--font-size-sm);\n font-style: normal;\n font-weight: 400;\n line-height: var(--line-height-sm); /* 142.857% */\n }\n}\n","import { Component, Host, Prop, h, Element, Fragment } from '@stencil/core';\n\n/**\n * @slot default - Custom content for the dialog header. When provided, the default header will not be rendered.\n */\n@Component({\n tag: 'nv-dialogheader',\n styleUrl: 'nv-dialogheader.scss',\n shadow: false,\n})\nexport class NvDialogheader {\n @Element() el: HTMLNvDialogheaderElement;\n private hasSlot = false;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the heading text for the dialog.\n */\n @Prop({ reflect: true })\n readonly heading: string = 'Dialog Title';\n\n /**\n * Sets the subheading text for the dialog.\n */\n @Prop({ reflect: true })\n readonly subheading: string;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n // Check if there are any child elements that don't have a slot attribute\n this.hasSlot = Array.from(this.el.childNodes).some(node => {\n return (\n node.nodeType === Node.ELEMENT_NODE &&\n !(node as Element).hasAttribute('slot')\n );\n });\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {!this.hasSlot ? (\n <Fragment>\n <div class=\"heading\">{this.heading}</div>\n <div class=\"subheading\">{this.subheading}</div>\n </Fragment>\n ) : (\n <slot></slot>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"],"mappings":"sGAAA,MAAMA,EAAoB,2QAC1B,MAAAC,EAAeD,E,MCq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AKsB,GAAGC,YAAYC,MAAKC,GAE/CA,EAAKC,WAAaC,KAAKC,eACrBH,EAAiBI,aAAa,S,CAStC,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,6CACDjC,KAAKC,QACL8B,EAACG,EAAQ,KACPH,EAAA,OAAKe,MAAM,WAAW9C,KAAK6C,SAC3Bd,EAAA,OAAKe,MAAM,cAAc9C,KAAK+C,aAGhChB,EAAA,a","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as n,a as i,g as r}from"./p-ab002252.js";import{c as s}from"./p-0462f723.js";import{C as a,a as o,W as h}from"./p-59768ee5.js";var c={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(s,(function(){var t=1e3,e=6e4,n=36e5,i="millisecond",r="second",s="minute",a="hour",o="day",h="week",c="month",u="quarter",d="year",l="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},b={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+v(i,2,"0")+":"+v(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(i,c),s=n-r<0,a=e.clone().add(i+(s?-1:1),c);return+(-(i+(n-r)/(s?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:d,w:h,d:o,D:l,h:a,m:s,s:r,ms:i,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",w={};w[y]=g;var k="$isDayjsObject",D=function(t){return t instanceof Y||!(!t||!t[k])},M=function t(e,n,i){var r;if(!e)return y;if("string"==typeof e){var s=e.toLowerCase();w[s]&&(r=s),n&&(w[s]=n,r=s);var a=e.split("-");if(!r&&a.length>1)return t(a[0])}else{var o=e.name;w[o]=e,r=o}return!i&&r&&(y=r),r||!i&&y},x=function(t,e){if(D(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new Y(n)},S=b;S.l=M,S.i=D,S.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var Y=function(){function g(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var v=g.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(m);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(e)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return x(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<x(t)},v.$g=function(t,e,n){return S.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,i=!!S.u(e)||e,u=S.p(t),f=function(t,e){var r=S.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return i?r:r.endOf(o)},m=function(t,e){return S.w(n.toDate()[t].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case d:return i?f(1,0):f(31,11);case c:return i?f(1,g):f(0,g+1);case h:var y=this.$locale().weekStart||0,w=(p<y?p+7:p)-y;return f(i?v-w:v+(6-w),g);case o:case l:return m(b+"Hours",0);case a:return m(b+"Minutes",1);case s:return m(b+"Seconds",2);case r:return m(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var n,h=S.p(t),u="set"+(this.$u?"UTC":""),f=(n={},n[o]=u+"Date",n[l]=u+"Date",n[c]=u+"Month",n[d]=u+"FullYear",n[a]=u+"Hours",n[s]=u+"Minutes",n[r]=u+"Seconds",n[i]=u+"Milliseconds",n)[h],m=h===o?this.$D+(e-this.$W):e;if(h===c||h===d){var p=this.clone().set(l,1);p.$d[f](m),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[S.p(t)]()},v.add=function(i,u){var l,f=this;i=Number(i);var m=S.p(u),p=function(t){var e=x(f);return S.w(e.date(e.date()+Math.round(t*i)),f)};if(m===c)return this.set(c,this.$M+i);if(m===d)return this.set(d,this.$y+i);if(m===o)return p(1);if(m===h)return p(7);var g=(l={},l[s]=e,l[a]=n,l[r]=t,l)[m]||1,v=this.$d.getTime()+i*g;return S.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=t||"YYYY-MM-DDTHH:mm:ssZ",r=S.z(this),s=this.$H,a=this.$m,o=this.$M,h=n.weekdays,c=n.months,u=n.meridiem,d=function(t,n,r,s){return t&&(t[n]||t(e,i))||r[n].slice(0,s)},l=function(t){return S.s(s%12||12,t,"0")},m=u||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(p,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return o+1;case"MM":return S.s(o+1,2,"0");case"MMM":return d(n.monthsShort,o,c,3);case"MMMM":return d(c,o);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(n.weekdaysMin,e.$W,h,2);case"ddd":return d(n.weekdaysShort,e.$W,h,3);case"dddd":return h[e.$W];case"H":return String(s);case"HH":return S.s(s,2,"0");case"h":return l(1);case"hh":return l(2);case"a":return m(s,a,!0);case"A":return m(s,a,!1);case"m":return String(a);case"mm":return S.s(a,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return r}return null}(t)||r.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,l,f){var m,p=this,g=S.p(l),v=x(i),b=(v.utcOffset()-this.utcOffset())*e,y=this-v,w=function(){return S.m(p,v)};switch(g){case d:m=w()/12;break;case c:m=w();break;case u:m=w()/3;break;case h:m=(y-b)/6048e5;break;case o:m=(y-b)/864e5;break;case a:m=y/n;break;case s:m=y/e;break;case r:m=y/t;break;default:m=y}return f?m:S.a(m)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return w[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=M(t,e,!0);return i&&(n.$L=i),n},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),C=Y.prototype;return x.prototype=C,[["$ms",i],["$s",r],["$m",s],["$H",a],["$W",o],["$M",c],["$y",d],["$D",l]].forEach((function(t){C[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,Y,x),t.$i=!0),x},x.locale=M,x.isDayjs=D,x.unix=function(t){return x(1e3*t)},x.en=w[y],x.Ls=w,x.p={},x}))})(c);const u=c.exports;var d={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(s,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)};var h=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],u=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},d=function(t,e){var n,i=a.meridiem;if(i){for(var r=1;r<=24;r+=1)if(t.indexOf(i(r,0,e))>-1){n=r>12;break}}else n=t===(e?"pm":"PM");return n},l={A:[s,function(t){this.afternoon=d(t,!1)}],a:[s,function(t){this.afternoon=d(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[r,h("seconds")],ss:[r,h("seconds")],m:[r,h("minutes")],mm:[r,h("minutes")],H:[r,h("hours")],h:[r,h("hours")],HH:[r,h("hours")],hh:[r,h("hours")],D:[r,h("day")],DD:[i,h("day")],Do:[s,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[r,h("week")],ww:[i,h("week")],M:[r,h("month")],MM:[i,h("month")],MMM:[s,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[s,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,h("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,h("year")],Z:c,ZZ:c};function f(n){var i,r;i=n,r=a&&a.formats;for(var s=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var s=i&&i.toUpperCase();return n||r[i]||t[i]||r[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=s.length,h=0;h<o;h+=1){var c=s[h],u=l[c],d=u&&u[0],f=u&&u[1];s[h]=f?{regex:d,parser:f}:c.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,i=0;n<o;n+=1){var r=s[n];if("string"==typeof r)i+=r.length;else{var a=r.regex,h=r.parser,c=t.slice(i),u=a.exec(c)[0];h.call(e,u),t=t.replace(u,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var i=e.prototype,r=i.parse;i.parse=function(t){var e=t.date,i=t.utc,s=t.args;this.$u=i;var o=s[1];if("string"==typeof o){var h=!0===s[2],c=!0===s[3],u=h||c,d=s[2];c&&(d=s[2]),a=this.$locale(),!h&&d&&(a=n.Ls[d]),this.$d=function(t,e,n,i){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=f(e)(t),s=r.year,a=r.month,o=r.day,h=r.hours,c=r.minutes,u=r.seconds,d=r.milliseconds,l=r.zone,m=r.week,p=new Date,g=o||(s||a?1:p.getDate()),v=s||p.getFullYear(),b=0;s&&!a||(b=a>0?a-1:p.getMonth());var y,w=h||0,k=c||0,D=u||0,M=d||0;return l?new Date(Date.UTC(v,b,g,w,k,D,M+60*l.offset*1e3)):n?new Date(Date.UTC(v,b,g,w,k,D,M)):(y=new Date(v,b,g,w,k,D,M),m&&(y=i(y).week(m).toDate()),y)}catch(t){return new Date("")}}(e,o,i,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var l=o.length,m=1;m<=l;m+=1){s[1]=o[m-1];var p=n.apply(this,s);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}m===l&&(this.$d=new Date(""))}else r.call(this,t)}}}))})(d);const l=d.exports;var f={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(s,(function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,r,s){var a=r.prototype;s.utc=function(t){var e={date:t,utc:!0,args:arguments};return new r(e)},a.utc=function(e){var n=s(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var h=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else h.call(this)};var c=a.utcOffset;a.utcOffset=function(i,r){var s=this.$utils().u;if(s(i))return this.$u?0:s(this.$offset)?c.call(this):this.$offset;if("string"==typeof i&&(i=function(t){void 0===t&&(t="");var i=t.match(e);if(!i)return null;var r=(""+i[0]).match(n)||["-",0,0],s=r[0],a=60*+r[1]+ +r[2];return 0===a?0:"+"===s?a:-a}(i),null===i))return this;var a=Math.abs(i)<=16?60*i:i,o=this;if(r)return o.$offset=a,o.$u=0===i,o;if(0!==i){var h=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(a+h,t)).$offset=a,o.$x.$localOffset=h}else o=this.utc();return o};var u=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var l=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return l.call(this,t,e,n);var i=this.local(),r=s(t).local();return l.call(i,r,e,n)}}}))})(f);const m=f.exports;var p={exports:{}};(function(t,e){!function(e,n){t.exports=n()}(s,(function(){var t="week",e="year";return function(n,i,r){var s=i.prototype;s.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var i=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var s=r(this).startOf(e).add(1,e).date(i),a=r(this).endOf(t);if(s.isBefore(a))return 1}var o=r(this).startOf(e).date(i).startOf(t).subtract(1,"millisecond"),h=this.diff(o,t,!0);return h<0?r(this).startOf("week").week():Math.ceil(h)},s.weeks=function(t){return void 0===t&&(t=null),this.week(t)}}}))})(p);const g=p.exports;const v='nv-calendar{display:block}.datepicker-root{display:flex;justify-content:center;align-items:flex-start;width:auto}.datepicker-container{font-family:system-ui, sans-serif;display:flex;flex-direction:column;align-items:stretch;background:var(--color-level-00-background);border-radius:var(--menu-contextual-radius);padding:0.25rem;box-shadow:0 2px 6px 1px solid var(--components-button-medium-border);border:1px solid var(--components-button-medium-border);width:auto;max-width:100%}.datepicker-container-single{width:300px}.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-left),.datepicker-container-single .datepicker-wrapper:has(.shortcuts-placement-right){width:410px !important}.datepicker-container-single:has(.shortcuts-placement-left),.datepicker-container-single:has(.shortcuts-placement-right){width:410px !important}.datepicker-wrapper{display:flex;justify-content:center;align-items:flex-start;gap:0.5rem;width:auto;overflow-x:hidden}.datepicker-wrapper.single{justify-content:center}.calendar-container{display:flex;flex-direction:column;align-items:center;padding:0.25rem;width:auto;position:relative}.calendar-separator{width:1px;background:var(--components-button-medium-border);height:auto;min-height:100%;margin:0 10px}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:0.25rem;width:100%}.nav-buttons{display:flex;gap:0.15rem;margin-left:auto}.nav-left{order:-1}.date-controls{display:flex;gap:0.25rem;align-items:center;min-height:34px;justify-content:center}.datepicker-container-single .date-controls{justify-content:flex-start !important}.datepicker-container:not(.datepicker-container-single) .date-controls{justify-content:center !important}.calendar-grid{display:grid;grid-template-columns:auto 1fr;gap:0.25rem;position:relative}.calendar-grid.slide-left{animation:slideLeft 0.3s ease-out}.calendar-grid.slide-right{animation:slideRight 0.3s ease-out}.week-numbers{display:grid;grid-template-rows:2rem repeat(6, 2rem);background:var(--color-level-30-background);border-radius:var(--menu-contextual-radius);width:2.5rem}.week-numbers .clickable{cursor:pointer}.week-numbers .clickable:hover{background:var(--components-button-high-background-hover);color:white;border-radius:var(--menu-contextual-radius)}.week-header,.week-number{display:grid;place-items:center;font-size:0.875rem}.week-header{font-weight:600;color:var(--components-form-text-label-default)}.week-number{color:var(--components-form-text-description-default)}.days-container{display:grid;grid-template-rows:auto 1fr}.days-header{display:grid;grid-template-columns:repeat(7, 2rem);height:2rem}.day-header{display:grid;place-items:center;font-size:0.875rem;color:var(--components-form-text-description-default)}.days-grid{display:grid;grid-template-columns:repeat(7, 2rem);grid-template-rows:repeat(6, 2rem);animation:fadeIn 0.2s ease-in}.day{display:grid;place-items:center;width:2rem;height:2rem;font-size:0.875rem;border-radius:var(--menu-contextual-radius);cursor:pointer;border:none;background:transparent;transition:all 0.2s ease;text-align:center;animation:scaleIn 0.2s ease-out}.day:hover:not(.disabled,.empty,.selected){background:var(--components-button-high-background-hover);color:white}.day.selected,.day.selected:hover{background:var(--components-button-high-background);color:white}.day.disabled{color:color-mix(in srgb, var(--components-form-shape-background-selected) 50%, transparent);cursor:not-allowed}.day.outside-month{color:var(--components-form-text-description-default);opacity:0.6}.day.outside-month.selected,.day.outside-month.in-range{opacity:1 !important;color:inherit}.day.in-range{background:color-mix(in srgb, var(--components-form-shape-background-selected) 50%, transparent);color:white;border-radius:0;position:relative}.day.range-start,.day.range-end{background:var(--components-button-high-background);color:white;position:relative}.day.range-start{border-radius:var(--menu-contextual-radius) 0 0 var(--menu-contextual-radius)}.day.range-end{border-radius:0 var(--menu-contextual-radius) var(--menu-contextual-radius) 0}.day.outside-month.range-start,.day.outside-month.range-end{background:var(--components-button-high-background) !important;color:white;opacity:1 !important}.day.outside-month.in-range{background:color-mix(in srgb, var(--components-form-shape-background-selected) 50%, transparent);color:white}.day.is-today{font-weight:600;position:relative}.day.is-today::after{content:"";position:absolute;bottom:0.15rem;left:50%;transform:translateX(-50%);width:0.15rem;height:0.15rem;background-color:currentColor;border-radius:50%}.day.is-today.selected::after{background-color:white}.calendar-footer{display:flex;gap:0.25rem;justify-content:flex-start;width:100%;flex-wrap:wrap}.footer-placement-left{justify-content:flex-start}.footer-placement-right{justify-content:flex-end}.footer-placement-center{justify-content:center}.datepicker-controls{display:flex;flex-direction:column;border-top:1px solid var(--components-button-medium-border);padding:1rem;gap:0.25rem;width:100%}.datepicker-actions{display:flex;justify-content:flex-end;gap:0.25rem;width:100%}.datepicker-actions slot-fb{display:contents !important}.calendar-footer+.datepicker-actions{margin-top:0}.shortcuts-placement-left,.shortcuts-placement-right{display:flex;flex-direction:column;gap:0.25rem;margin-top:1rem}.shortcuts-placement-left{align-items:flex-end}.shortcuts-placement-right{align-items:flex-start}@keyframes slideLeft{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes scaleIn{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}';const b=v;u.extend(l);u.extend(m);u.extend(g);const y=class{constructor(n){t(this,n);this.singleDateChange=e(this,"singleDateChange",7);this.rangeDateChange=e(this,"rangeDateChange",7);this.firstDayOfWeek=0;this.numberOfCalendars=1;this.singleValue="";this.rangeValue="";this.min="";this.max="";this.disabledDates="";this.locale="en-BE";this.dateFormat="YYYY-MM-DD";this.shortcutsPlacement="bottom";this.selectionType="single";this.showActions=false;this.shortcuts="[]";this.parsedDisabledDates=[];this.selectedDate=null;this.startDate=null;this.endDate=null;this.months=[];this.resetSelection=()=>{if(this.selectionType==="single"){this.selectedDate=null;this.singleValue="";this.singleDateChange.emit("")}else{this.startDate=null;this.endDate=null;this.rangeValue="";this.rangeDateChange.emit({start:"",end:""})}};this.confirmSelection=()=>{if(this.selectionType==="single"&&this.selectedDate){const t=this.formatDate(this.selectedDate);this.singleDateChange.emit(t);this.singleValue=t;const e=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(e)}else if(this.selectionType==="range"&&this.startDate&&this.endDate){this.rangeDateChange.emit({start:this.formatDate(this.startDate),end:this.formatDate(this.endDate)});this.rangeValue=JSON.stringify({start:this.formatDate(this.startDate),end:this.formatDate(this.endDate)});const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}}}componentWillLoad(){this.parseDisabledDates();if(this.selectionType==="single"&&this.singleValue){this.selectedDate=this.parseDate(this.singleValue);this.currentDate=this.selectedDate}else if(this.selectionType==="range"&&this.rangeValue){try{let t;if(typeof this.rangeValue==="string"){t=JSON.parse(this.rangeValue)}else{t=this.rangeValue}if(t.start&&t.end){this.startDate=this.parseDate(t.start);this.endDate=this.parseDate(t.end);this.currentDate=this.startDate;if(this.startDate&&this.endDate&&this.startDate>this.endDate){console.warn(`Warning: startDate (${this.formatDate(this.startDate)}) is after endDate (${this.formatDate(this.endDate)})`);throw new Error("startDate cannot be after endDate")}}}catch(t){console.error("Invalid JSON for rangeValue:",t)}}else{this.currentDate=new Date}this.initializeMonths()}changeMonth(t,e=0){const n=new Date(this.currentDate);n.setUTCMonth(n.getUTCMonth()+t+e);const i=this.el.querySelectorAll(".calendar-grid");i.forEach((e=>{e.classList.remove("slide-left","slide-right");const n=t>0?"slide-left":"slide-right";e.classList.add(n);setTimeout((()=>{e.classList.remove(n)}),300)}));this.currentDate=n}handleDateSelection(t){if(this.isDateDisabled(t)){return}if(this.selectionType==="single"){this.handleSingleSelection(t)}else{this.handleRangeSelection(t)}}handleSingleSelection(t){if(!t)return;const e=this.formatDate(t);this.selectedDate=t;this.singleDateChange.emit(e)}handleRangeSelection(t){if(!this.startDate||this.startDate&&this.endDate){this.startDate=t;this.endDate=null}else{this.endDate=t;if(this.startDate>this.endDate){[this.startDate,this.endDate]=[this.endDate,this.startDate]}this.rangeDateChange.emit({start:this.formatDate(this.startDate),end:this.formatDate(this.endDate)})}}getWeekNumber(t){const e=new Date(t.getFullYear(),0,1);const n=(t.getTime()-e.getTime())/864e5;return Math.ceil((n+e.getDay()+1)/7)}isDateDisabled(t){if(!t)return true;if(this.min){const e=this.parseDate(this.min);if(e&&t<e){return true}}if(this.max){const e=this.parseDate(this.max);if(e&&t>e){return true}}return this.parsedDisabledDates.some((e=>this.isSameDate(t,e)))}isDateInRange(t){if(!t||!this.startDate||!this.endDate)return false;const e=this.parseDate(t);const n=this.parseDate(this.startDate);const i=this.parseDate(this.endDate);if(isNaN(n.getTime())||isNaN(i.getTime())){return false}if(n>i)return false;return this.isSameOrAfter(e,n)&&this.isSameOrBefore(e,i)}getDayNames(){if(a[this.locale]){const t=[...a[this.locale]];const e=t.slice(0,this.firstDayOfWeek);const n=t.slice(this.firstDayOfWeek);return[...n,...e]}const t=new Intl.DateTimeFormat(this.locale,{weekday:"short"});const e=[...Array(7)].map(((e,n)=>t.format(new Date(2023,0,n+1)).toUpperCase()));const n=e.slice(0,this.firstDayOfWeek);const i=e.slice(this.firstDayOfWeek);return[...i,...n]}getDaysInMonth(t=0,e=1){const n=this.currentDate.getUTCFullYear();const i=this.currentDate.getUTCMonth()+t;const r=new Date(Date.UTC(n,i,1));const s=new Date(Date.UTC(n,i+1,0));const a=[];const o=t===0?(r.getUTCDay()-this.firstDayOfWeek+7)%7:0;if(t===0){const t=new Date(Date.UTC(n,i,0)).getUTCDate();for(let e=o;e>0;e--){const r=new Date(Date.UTC(n,i-1,t-e+1));a.push({dayOfMonth:r.getUTCDate(),date:r,isCurrentMonth:false,isDisabled:this.isDateDisabled(r)})}}for(let t=1;t<=s.getUTCDate();t++){const e=new Date(Date.UTC(n,i,t));a.push({dayOfMonth:t,date:e,isCurrentMonth:true,isDisabled:this.isDateDisabled(e)})}if(t===e-1){const t=7-(a.length%7||7);for(let e=1;e<=t;e++){const t=new Date(Date.UTC(n,i+1,e));a.push({dayOfMonth:e,date:t,isCurrentMonth:false,isDisabled:this.isDateDisabled(t)})}}return a}initializeMonths(){if(o[this.locale]){this.months=o[this.locale].map(((t,e)=>({value:e,label:t})));return}const t=new Intl.DateTimeFormat(this.locale,{month:"short"});this.months=Array.from({length:12},((e,n)=>({value:n,label:t.format(new Date(2e3,n,1)).toUpperCase()})))}getLocalizedWeekText(){return h[this.locale]||"W"}handleMonthChange(t,e=0){const n=t.target;const i=parseInt(n.value,10);const r=this.currentDate.getUTCMonth();const s=i-(r+e)%12;const a=new Date(this.currentDate);a.setUTCMonth(a.getUTCMonth()+s);this.currentDate=a}handleYearChange(t,e=0){const n=t.target;const i=parseInt(n.value,10);if(!isNaN(i)&&i>=1900&&i<=2100){const t=new Date(this.currentDate);t.setUTCFullYear(i);t.setUTCMonth(t.getUTCMonth()+e);this.currentDate=t}}handleWeekSelection(t,e){if(this.selectionType!=="range")return;const n=this.getDaysInMonth(e,this.numberOfCalendars);const i=t[0];const r=t[t.length-1];if(!i||!r)return;const s=n.filter((t=>t.date&&t.date>=i&&t.date<=r));const a=s.filter((t=>!this.isDateDisabled(t.date)));if(a.length>0){this.startDate=a[0].date;this.endDate=a[a.length-1].date;this.rangeDateChange.emit({start:this.formatDate(this.startDate),end:this.formatDate(this.endDate)})}}isToday(t){const e=new Date;return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}validateNumberOfCalendars(t){if(t<1||t>4){console.warn("numberOfCalendars must be between 1 and 4. Defaulting to 1.");this.numberOfCalendars=1}}onRangeValueChange(t){if(t){try{const e=JSON.parse(t);if(e.start&&e.end){this.startDate=this.parseDate(e.start);this.endDate=this.parseDate(e.end);this.currentDate=this.parseDate(e.start)}}catch(t){console.error("Invalid JSON for rangeValue:",t)}}}handleDisabledDatesChange(){this.parseDisabledDates()}onSingleValueChange(t,e){if(this.selectionType==="single"&&t!==e&&t){const e=this.parseDate(t);if(e){this.selectedDate=e;this.currentDate=e}}}parseDate(t){if(t instanceof Date)return t;if(this.dateFormat==="X"){const e=Number(t);if(isNaN(e))return null;return this.isUTCMode?u.unix(e).utc().toDate():u.unix(e).toDate()}if(this.dateFormat==="x"){const e=Number(t);if(isNaN(e))return null;return this.isUTCMode?u(e).utc().toDate():u(e).toDate()}if(this.dateFormat==="Ticks"){const e=Number(t);if(isNaN(e))return null;const n=(e-621355968e9)/1e4;return this.isUTCMode?u(n).utc().toDate():u(n).toDate()}let e;if(this.isUTCMode){e=u.utc(t,this.dateFormat,true)}else{e=u(t,this.dateFormat,true)}if(!e.isValid()){console.error(`Parsing error:`,{dateInput:t,dateFormat:this.dateFormat});return null}return e.toDate()}formatDate(t){if(!t)return"";if(this.dateFormat==="Ticks"){const e=t.getTime()*1e4+621355968e9;return e.toString()}if(this.dateFormat==="X"){return u(t).unix().toString()}if(this.dateFormat==="x"){return t.getTime().toString()}return this.isUTCMode?u(t).utc().format(this.dateFormat):u(t).format(this.dateFormat)}parseDisabledDates(){if(!this.disabledDates){this.parsedDisabledDates=[];return}try{const t=JSON.parse(this.disabledDates);this.parsedDisabledDates=t.map((t=>this.parseDate(t))).filter((t=>t!==null))}catch(t){console.error("Error parsing disabled dates:",t);this.parsedDisabledDates=[]}}isSameDate(t,e){if(!t||!e)return false;if(this.isUTCMode){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}else{return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}}isSameOrAfter(t,e){if(this.isUTCMode){return t.getUTCFullYear()>e.getUTCFullYear()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()>e.getUTCMonth()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()>=e.getUTCDate()}else{return t.getFullYear()>e.getFullYear()||t.getFullYear()===e.getFullYear()&&t.getMonth()>e.getMonth()||t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()>=e.getDate()}}isSameOrBefore(t,e){if(this.isUTCMode){return t.getUTCFullYear()<e.getUTCFullYear()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()<e.getUTCMonth()||t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()<=e.getUTCDate()}else{return t.getFullYear()<e.getFullYear()||t.getFullYear()===e.getFullYear()&&t.getMonth()<e.getMonth()||t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()<=e.getDate()}}applyShortcut(t){this.selectedDate=null;this.startDate=null;this.endDate=null;if(t.singleValue){const e=this.parseDate(t.singleValue);this.selectedDate=e;this.singleDateChange.emit(this.formatDate(e));this.singleValue=this.formatDate(e);if(!this.showActions){const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}this.forceCalendarUpdate(e)}else{const e=this.parseDate(t.rangeValue.start);const n=this.parseDate(t.rangeValue.end);this.startDate=e;this.endDate=n;this.rangeDateChange.emit({start:this.formatDate(e),end:this.formatDate(n)});this.rangeValue=JSON.stringify({start:this.formatDate(e),end:this.formatDate(n)});if(!this.showActions){const t=new CustomEvent("closePopover",{bubbles:true,composed:true});this.el.dispatchEvent(t)}this.forceCalendarUpdate(n)}}forceCalendarUpdate(t){this.currentDate=new Date(t);this.currentDate=new Date(this.currentDate);requestAnimationFrame((()=>{const t=document.querySelectorAll(".day");t.forEach((t=>{t.classList.remove("hover","active","touched");t.style.pointerEvents="none"}));document.body.addEventListener("touchstart",this.clearTouchState,{passive:true});setTimeout((()=>{t.forEach((t=>{t.style.pointerEvents=""}))}),50)}))}clearTouchState(){document.querySelectorAll(".day").forEach((t=>{t.classList.remove("touched")}));document.body.removeEventListener("touchstart",this.clearTouchState)}getChangeMonthHandler(t,e){return()=>this.changeMonth(t,e)}getHandleMonthChange(t){return e=>this.handleMonthChange(e,t)}getHandleYearChange(t){return e=>this.handleYearChange(e,t)}getDayClickHandler(t,e){return e?undefined:()=>this.handleDateSelection(t)}getShortcutHandler(t){return()=>this.applyShortcut(t)}getWeekSelectionHandler(t,e){return()=>{if(this.selectionType==="range"){this.handleWeekSelection(t,e)}}}parsedShortcuts(){try{return this.shortcuts?JSON.parse(this.shortcuts):[]}catch(t){console.error("Invalid JSON for shortcuts:",t);return[]}}get isUTCMode(){return this.dateFormat.includes("Z")}get hasShortcuts(){return this.shortcutsPlacement==="bottom"&&this.parsedShortcuts().length>0}get hasActions(){return this.showActions}renderHeader(t,e){return n("div",{class:"header"},this.numberOfCalendars>1&&e===0&&n("nv-iconbutton",{class:"nav-left",emphasis:"low",name:"chevron-left",size:"sm",onClick:this.getChangeMonthHandler(-1,t)}),n("div",{class:"date-controls"},n("select",{class:"month-select mr-4",onChange:this.getHandleMonthChange(t)},this.months.map((e=>n("option",{key:e.value,value:e.value,selected:e.value===(this.currentDate.getUTCMonth()+t)%12},e.label)))),n("input",{type:"number",class:"year-input",min:"1950",max:"2100",value:this.currentDate.getUTCFullYear()+Math.floor((this.currentDate.getUTCMonth()+t)/12),onChange:this.getHandleYearChange(t)})),this.numberOfCalendars===1&&n("div",{class:"nav-buttons"},n("nv-iconbutton",{emphasis:"low",name:"chevron-left",onClick:this.getChangeMonthHandler(-1,t)}),n("nv-iconbutton",{emphasis:"low",name:"chevron-right",onClick:this.getChangeMonthHandler(1,t)})),this.numberOfCalendars>1&&e===this.numberOfCalendars-1&&n("nv-iconbutton",{emphasis:"low",name:"chevron-right",size:"sm",onClick:this.getChangeMonthHandler(1,t),class:"nav-right"}))}renderWeekNumbers(t,e){return n("div",{class:"week-numbers"},n("div",{class:"week-header"},this.getLocalizedWeekText()),t.map(((t,i)=>{var r;const s=t.map((t=>t.date));return n("div",{class:`week-number ${this.selectionType==="range"?"clickable":""}`,onClick:this.getWeekSelectionHandler(s,e),key:`week-${i}`},this.getWeekNumber(((r=t.find((t=>t.date)))===null||r===void 0?void 0:r.date)||new Date))})))}renderDaysGrid(t){return n("div",{class:"days-grid"},t.map((t=>{const e=t.date;if(!e)return null;const i=this.selectionType==="single"&&this.isSameDate(e,this.selectedDate);const r=this.isDateInRange(e);const s=this.isSameDate(e,this.startDate);const a=this.isSameDate(e,this.endDate);const o=this.isToday(e);const h=!t.isCurrentMonth;const c=["day",i?"selected":"",s?"range-start":"",a?"range-end":"",r?"in-range":"",t.isDisabled?"disabled":"",h?"outside-month":"",o?"is-today":""];return n("div",{class:c.filter(Boolean).join(" "),onClick:this.getDayClickHandler(e,t.isDisabled),"aria-disabled":t.isDisabled,key:`day-${e.toISOString()}`},t.dayOfMonth)})))}renderCalendar(t,e){const i=this.getDaysInMonth(e,this.numberOfCalendars);const r=[];for(let t=0;t<i.length;t+=7){r.push(i.slice(t,t+7))}return n("div",{class:"calendar-wrapper"},n("div",{class:"calendar-container",key:`calendar-${t}`},this.renderHeader(e,t),n("div",{class:"calendar-grid"},this.showWeekNumbers&&this.renderWeekNumbers(r,t),n("div",{class:"days-container"},n("div",{class:"days-header"},this.getDayNames().map((t=>n("div",{class:"day-header"},t)))),this.renderDaysGrid(i)))),t<this.numberOfCalendars-1&&n("div",{class:"calendar-separator"}))}renderShortcuts(){if(!this.parsedShortcuts().length){return null}return n("div",{class:`shortcuts-container shortcuts-placement-${this.shortcutsPlacement}`},this.parsedShortcuts().map((t=>n("nv-button",{emphasis:"lower",size:"xs","aria-label":t.label,onClick:this.getShortcutHandler(t)},t.label))))}renderActions(){return n("div",{class:"datepicker-actions"},n("slot",{name:"actions"},n("nv-button",{emphasis:"low",size:"sm",onClick:this.resetSelection},"Cancel"),n("nv-button",{size:"sm",onClick:this.confirmSelection},"OK")))}render(){return n(i,{key:"f7835b1457300a2faddc249b426c07a7a0269783"},n("div",{key:"2e064a4abdda98fd60707ee2fac75bfe13214655",class:"datepicker-root"},n("div",{key:"5041c7cc3efae4aa27194be09d3f8814f134b4c8",class:`datepicker-container ${this.numberOfCalendars===1?"datepicker-container-single":""}`},n("div",{key:"8f622f0ec26ab2caf7edd4a05da6b00aabd9c472",class:`datepicker-wrapper ${this.numberOfCalendars===1?"single":""}`},this.shortcutsPlacement==="left"&&this.renderShortcuts(),Array.from({length:this.numberOfCalendars},((t,e)=>this.renderCalendar(e,e))),this.shortcutsPlacement==="right"&&this.renderShortcuts()),(this.hasShortcuts||this.hasActions)&&n("div",{key:"908067dd983f9e27fd80b475767d464fe192d245",class:"datepicker-controls"},this.hasShortcuts&&this.renderShortcuts(),this.hasActions&&this.renderActions()))),n("slot",{key:"d27b083edc68386b6b9f0bf048b15fb36b75dcd0"}))}get el(){return r(this)}static get watchers(){return{numberOfCalendars:["validateNumberOfCalendars"],rangeValue:["onRangeValueChange"],disabledDates:["handleDisabledDatesChange"],singleValue:["onSingleValueChange"]}}};y.style=b;export{y as nv_calendar};
2
- //# sourceMappingURL=p-913907fb.entry.js.map