@nova-design-system/nova-webcomponents 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/dist/cjs/{index-9bda5507.js → index-108ddff0.js} +20 -4
  2. package/dist/cjs/index-108ddff0.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +1 -0
  4. package/dist/cjs/index.cjs.js.map +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/native.cjs.js +2 -2
  7. package/dist/cjs/nv-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  10. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-calendar.cjs.entry.js +16 -37
  14. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  16. package/dist/cjs/nv-datagrid.cjs.entry.js +95 -103
  17. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
  19. package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  21. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-fielddate.cjs.entry.js +2 -2
  24. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  25. package/dist/cjs/nv-fielddaterange.cjs.entry.js +73 -18
  26. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  27. package/dist/cjs/nv-fielddropdown.cjs.entry.js +84 -60
  28. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  29. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  30. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +116 -104
  31. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nv-fieldnumber.cjs.entry.js +2 -2
  33. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nv-fieldpassword.cjs.entry.js +2 -2
  35. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  36. package/dist/cjs/nv-fieldradio.cjs.entry.js +1 -1
  37. package/dist/cjs/nv-fieldselect.cjs.entry.js +2 -2
  38. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nv-fieldslider.cjs.entry.js +663 -0
  40. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -0
  41. package/dist/cjs/nv-fieldtext.cjs.entry.js +5 -5
  42. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  43. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +5 -5
  44. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  45. package/dist/cjs/nv-fieldtime.cjs.entry.js +11 -11
  46. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  47. package/dist/cjs/nv-icon.cjs.entry.js +3 -3
  48. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  49. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
  50. package/dist/cjs/nv-menu.cjs.entry.js +2 -2
  51. package/dist/cjs/nv-menuitem.cjs.entry.js +2 -2
  52. package/dist/cjs/nv-popover.cjs.entry.js +2 -2
  53. package/dist/cjs/nv-row.cjs.entry.js +2 -2
  54. package/dist/cjs/nv-stack.cjs.entry.js +2 -2
  55. package/dist/cjs/nv-table.cjs.entry.js +3 -3
  56. package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
  57. package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
  58. package/dist/cjs/nv-tooltip.cjs.entry.js +3 -3
  59. package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
  60. package/dist/collection/collection-manifest.json +1 -0
  61. package/dist/collection/components/nv-calendar/nv-calendar.css +6 -2
  62. package/dist/collection/components/nv-calendar/nv-calendar.js +14 -35
  63. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  64. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +131 -48
  65. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  66. package/dist/collection/components/nv-datagrid/nv-datagrid.js +94 -152
  67. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  68. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +20 -1
  69. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
  70. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +7 -1
  71. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +85 -17
  72. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  73. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +7 -1
  74. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -0
  75. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  76. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +173 -106
  77. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  78. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +31 -1
  79. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +202 -190
  80. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  81. package/dist/collection/components/nv-fieldmultiselect/{nv-fieldmultiselect.css → styles/nv-fieldmultiselect.css} +15 -4
  82. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +7 -1
  83. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +7 -1
  84. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +7 -1
  85. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +264 -0
  86. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -0
  87. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +1035 -0
  88. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -0
  89. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +77 -0
  90. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -0
  91. package/dist/collection/components/nv-fieldslider/partials/field-input.js +33 -0
  92. package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -0
  93. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +34 -0
  94. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -0
  95. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +18 -0
  96. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -0
  97. package/dist/collection/components/nv-fieldslider/partials/tick-marks.js +18 -0
  98. package/dist/collection/components/nv-fieldslider/partials/tick-marks.js.map +1 -0
  99. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +267 -0
  100. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +159 -0
  101. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -0
  102. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +15 -1
  103. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +9 -1
  104. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  105. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +4 -3
  106. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
  107. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +7 -1
  108. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  109. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  110. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +7 -1
  111. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  112. package/dist/collection/components/nv-icon/nv-icons.js +1 -0
  113. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  114. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  115. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  116. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  117. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  118. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  119. package/dist/collection/components/nv-row/nv-row.js +1 -1
  120. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  121. package/dist/collection/components/nv-table/nv-table.js +2 -2
  122. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  123. package/dist/collection/components/nv-tooltip/nv-tooltip.css +1 -0
  124. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  125. package/dist/collection/interfaces/Column.js.map +1 -1
  126. package/dist/components/index.js +2 -1
  127. package/dist/components/index.js.map +1 -1
  128. package/dist/components/nv-alert.js +2 -2
  129. package/dist/components/nv-avatar.js +2 -2
  130. package/dist/components/nv-badge.js +1 -1
  131. package/dist/components/nv-breadcrumb.js +3 -3
  132. package/dist/components/nv-breadcrumbs.js +1 -1
  133. package/dist/components/nv-button.js +1 -1
  134. package/dist/components/nv-calendar.js +1 -1
  135. package/dist/components/nv-col.js +1 -1
  136. package/dist/components/nv-datagrid.js +97 -109
  137. package/dist/components/nv-datagrid.js.map +1 -1
  138. package/dist/components/nv-datagridcolumn.js +4 -3
  139. package/dist/components/nv-datagridcolumn.js.map +1 -1
  140. package/dist/components/nv-dialog.js +6 -6
  141. package/dist/components/nv-dialogfooter.js +1 -1
  142. package/dist/components/nv-dialogheader.js +1 -1
  143. package/dist/components/nv-fieldcheckbox.js +1 -1
  144. package/dist/components/nv-fielddate.js +9 -9
  145. package/dist/components/nv-fielddate.js.map +1 -1
  146. package/dist/components/nv-fielddaterange.js +83 -27
  147. package/dist/components/nv-fielddaterange.js.map +1 -1
  148. package/dist/components/nv-fielddropdown.js +98 -72
  149. package/dist/components/nv-fielddropdown.js.map +1 -1
  150. package/dist/components/nv-fielddropdownitem.js +1 -1
  151. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  152. package/dist/components/nv-fieldmultiselect.js +132 -120
  153. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  154. package/dist/components/nv-fieldnumber.js +5 -5
  155. package/dist/components/nv-fieldnumber.js.map +1 -1
  156. package/dist/components/nv-fieldpassword.js +5 -5
  157. package/dist/components/nv-fieldpassword.js.map +1 -1
  158. package/dist/components/nv-fieldradio.js +1 -1
  159. package/dist/components/nv-fieldselect.js +5 -5
  160. package/dist/components/nv-fieldselect.js.map +1 -1
  161. package/dist/components/nv-fieldslider.d.ts +11 -0
  162. package/dist/components/nv-fieldslider.js +726 -0
  163. package/dist/components/nv-fieldslider.js.map +1 -0
  164. package/dist/components/nv-fieldtext.js +1 -1
  165. package/dist/components/nv-fieldtextarea.js +5 -5
  166. package/dist/components/nv-fieldtextarea.js.map +1 -1
  167. package/dist/components/nv-fieldtime.js +15 -15
  168. package/dist/components/nv-fieldtime.js.map +1 -1
  169. package/dist/components/nv-icon.js +1 -1
  170. package/dist/components/nv-iconbutton.js +1 -1
  171. package/dist/components/nv-loader.js +1 -1
  172. package/dist/components/nv-menu.js +5 -5
  173. package/dist/components/nv-menuitem.js +1 -1
  174. package/dist/components/nv-popover.js +1 -1
  175. package/dist/components/nv-row.js +2 -2
  176. package/dist/components/nv-stack.js +2 -2
  177. package/dist/components/nv-table.js +3 -3
  178. package/dist/components/nv-tablecolumn.js +1 -1
  179. package/dist/components/nv-toggle.js +3 -3
  180. package/dist/components/nv-tooltip.js +1 -1
  181. package/dist/components/{p-10faa938.js → p-04cb3a6f.js} +5 -5
  182. package/dist/components/{p-10faa938.js.map → p-04cb3a6f.js.map} +1 -1
  183. package/dist/components/{p-0a0f6daf.js → p-07a89754.js} +3 -3
  184. package/dist/components/{p-0a0f6daf.js.map → p-07a89754.js.map} +1 -1
  185. package/dist/components/{p-10b37876.js → p-0ab80d95.js} +3 -3
  186. package/dist/components/{p-10b37876.js.map → p-0ab80d95.js.map} +1 -1
  187. package/dist/components/{p-02752770.js → p-33e231f4.js} +2 -2
  188. package/dist/components/{p-02752770.js.map → p-33e231f4.js.map} +1 -1
  189. package/dist/components/{p-854c32dc.js → p-4656efae.js} +21 -42
  190. package/dist/components/p-4656efae.js.map +1 -0
  191. package/dist/components/{p-35a70c5e.js → p-581e67cc.js} +3 -3
  192. package/dist/components/{p-35a70c5e.js.map → p-581e67cc.js.map} +1 -1
  193. package/dist/components/{p-1c45c0f2.js → p-679e0fa9.js} +16 -4
  194. package/dist/components/p-679e0fa9.js.map +1 -0
  195. package/dist/components/p-76a30bf1.js +88 -0
  196. package/dist/components/p-76a30bf1.js.map +1 -0
  197. package/dist/components/{p-f5cb0a63.js → p-83c8873a.js} +3 -3
  198. package/dist/components/{p-f5cb0a63.js.map → p-83c8873a.js.map} +1 -1
  199. package/dist/components/{p-f76bb0c3.js → p-c0a91091.js} +5 -5
  200. package/dist/components/p-c0a91091.js.map +1 -0
  201. package/dist/components/{p-41c56ddc.js → p-cbdc2c8b.js} +5 -5
  202. package/dist/components/{p-41c56ddc.js.map → p-cbdc2c8b.js.map} +1 -1
  203. package/dist/components/{p-a2527411.js → p-cbe9521f.js} +3 -3
  204. package/dist/components/{p-a2527411.js.map → p-cbe9521f.js.map} +1 -1
  205. package/dist/components/{p-608eb9da.js → p-d19b41d2.js} +2 -2
  206. package/dist/components/{p-608eb9da.js.map → p-d19b41d2.js.map} +1 -1
  207. package/dist/components/{p-eb632278.js → p-d63f1cbe.js} +3 -3
  208. package/dist/components/{p-eb632278.js.map → p-d63f1cbe.js.map} +1 -1
  209. package/dist/components/{p-e00cbb8a.js → p-dd2273a3.js} +2 -2
  210. package/dist/components/{p-e00cbb8a.js.map → p-dd2273a3.js.map} +1 -1
  211. package/dist/components/{p-9decffb6.js → p-f0a5e7e4.js} +7 -7
  212. package/dist/components/p-f0a5e7e4.js.map +1 -0
  213. package/dist/components/{p-b48d5a94.js → p-f1859ddc.js} +4 -4
  214. package/dist/components/{p-b48d5a94.js.map → p-f1859ddc.js.map} +1 -1
  215. package/dist/esm/{index-1fb7a9a6.js → index-8f0e5f19.js} +20 -4
  216. package/dist/esm/index-8f0e5f19.js.map +1 -0
  217. package/dist/esm/index.js +1 -0
  218. package/dist/esm/index.js.map +1 -1
  219. package/dist/esm/loader.js +3 -3
  220. package/dist/esm/native.js +3 -3
  221. package/dist/esm/nv-alert.entry.js +1 -1
  222. package/dist/esm/nv-avatar.entry.js +1 -1
  223. package/dist/esm/nv-badge_2.entry.js +1 -1
  224. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  225. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  226. package/dist/esm/nv-button.entry.js +1 -1
  227. package/dist/esm/nv-calendar.entry.js +16 -37
  228. package/dist/esm/nv-calendar.entry.js.map +1 -1
  229. package/dist/esm/nv-col.entry.js +1 -1
  230. package/dist/esm/nv-datagrid.entry.js +95 -103
  231. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  232. package/dist/esm/nv-datagridcolumn.entry.js +2 -2
  233. package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
  234. package/dist/esm/nv-dialog.entry.js +1 -1
  235. package/dist/esm/nv-dialogfooter_2.entry.js +1 -1
  236. package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
  237. package/dist/esm/nv-fielddate.entry.js +2 -2
  238. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  239. package/dist/esm/nv-fielddaterange.entry.js +73 -18
  240. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  241. package/dist/esm/nv-fielddropdown.entry.js +84 -60
  242. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  243. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  244. package/dist/esm/nv-fieldmultiselect.entry.js +116 -104
  245. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  246. package/dist/esm/nv-fieldnumber.entry.js +2 -2
  247. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  248. package/dist/esm/nv-fieldpassword.entry.js +2 -2
  249. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  250. package/dist/esm/nv-fieldradio.entry.js +1 -1
  251. package/dist/esm/nv-fieldselect.entry.js +2 -2
  252. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  253. package/dist/esm/nv-fieldslider.entry.js +659 -0
  254. package/dist/esm/nv-fieldslider.entry.js.map +1 -0
  255. package/dist/esm/nv-fieldtext.entry.js +5 -5
  256. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  257. package/dist/esm/nv-fieldtextarea.entry.js +5 -5
  258. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  259. package/dist/esm/nv-fieldtime.entry.js +11 -11
  260. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  261. package/dist/esm/nv-icon.entry.js +3 -3
  262. package/dist/esm/nv-icon.entry.js.map +1 -1
  263. package/dist/esm/nv-iconbutton_2.entry.js +3 -3
  264. package/dist/esm/nv-menu.entry.js +2 -2
  265. package/dist/esm/nv-menuitem.entry.js +2 -2
  266. package/dist/esm/nv-popover.entry.js +2 -2
  267. package/dist/esm/nv-row.entry.js +2 -2
  268. package/dist/esm/nv-stack.entry.js +2 -2
  269. package/dist/esm/nv-table.entry.js +3 -3
  270. package/dist/esm/nv-tablecolumn.entry.js +1 -1
  271. package/dist/esm/nv-toggle.entry.js +3 -3
  272. package/dist/esm/nv-tooltip.entry.js +3 -3
  273. package/dist/esm/nv-tooltip.entry.js.map +1 -1
  274. package/dist/native/index.esm.js +1 -1
  275. package/dist/native/index.esm.js.map +1 -1
  276. package/dist/native/native.css +1 -1
  277. package/dist/native/native.esm.js +1 -1
  278. package/dist/native/native.esm.js.map +1 -1
  279. package/dist/native/{p-7fd4d13d.entry.js → p-0323daf6.entry.js} +2 -2
  280. package/dist/native/{p-14c07207.entry.js → p-05d95d4d.entry.js} +2 -2
  281. package/dist/native/{p-90e6d9dd.entry.js → p-0ec1e2e3.entry.js} +2 -2
  282. package/dist/native/{p-c7b201cd.entry.js → p-16a4cdf3.entry.js} +2 -2
  283. package/dist/native/{p-1da72182.entry.js → p-19fb0fd0.entry.js} +2 -2
  284. package/dist/native/p-1e3d3374.entry.js +2 -0
  285. package/dist/native/{p-9135fdf5.entry.js.map → p-1e3d3374.entry.js.map} +1 -1
  286. package/dist/native/p-21e7132f.entry.js +2 -0
  287. package/dist/native/{p-ae7ab110.entry.js.map → p-21e7132f.entry.js.map} +1 -1
  288. package/dist/native/{p-c0f79bac.entry.js → p-221b8f72.entry.js} +2 -2
  289. package/dist/native/p-2805f9f2.entry.js +2 -0
  290. package/dist/native/{p-5d21532a.entry.js.map → p-2805f9f2.entry.js.map} +1 -1
  291. package/dist/native/p-3f2b6a22.entry.js +2 -0
  292. package/dist/native/p-3f2b6a22.entry.js.map +1 -0
  293. package/dist/native/{p-0245863d.entry.js → p-407fc32d.entry.js} +2 -2
  294. package/dist/native/{p-3cd77d82.entry.js → p-4c0d81b0.entry.js} +2 -2
  295. package/dist/native/{p-615947e7.entry.js → p-519b4819.entry.js} +2 -2
  296. package/dist/native/{p-7042ba8a.entry.js → p-5382eab2.entry.js} +2 -2
  297. package/dist/native/p-5ba3fc3c.entry.js +2 -0
  298. package/dist/native/{p-b94d9f0b.entry.js.map → p-5ba3fc3c.entry.js.map} +1 -1
  299. package/dist/native/{p-656c56f0.entry.js → p-60b204ac.entry.js} +2 -2
  300. package/dist/native/p-7092a675.entry.js +2 -0
  301. package/dist/native/p-711a7778.js +3 -0
  302. package/dist/native/p-711a7778.js.map +1 -0
  303. package/dist/native/p-759c9ce4.entry.js +2 -0
  304. package/dist/native/p-759c9ce4.entry.js.map +1 -0
  305. package/dist/native/{p-efe6a46c.entry.js → p-7c676f2c.entry.js} +2 -2
  306. package/dist/native/p-7c6edd1c.entry.js +2 -0
  307. package/dist/native/p-7c6edd1c.entry.js.map +1 -0
  308. package/dist/native/p-987c79d8.entry.js +2 -0
  309. package/dist/native/p-987c79d8.entry.js.map +1 -0
  310. package/dist/native/{p-b8b6875d.entry.js → p-9fba8663.entry.js} +2 -2
  311. package/dist/native/{p-08a75cfa.entry.js → p-a2c0f1a7.entry.js} +2 -2
  312. package/dist/native/p-aa86af25.entry.js +2 -0
  313. package/dist/native/{p-49cac014.entry.js.map → p-aa86af25.entry.js.map} +1 -1
  314. package/dist/native/p-adc96c3a.entry.js +2 -0
  315. package/dist/native/{p-4d164ed6.entry.js.map → p-adc96c3a.entry.js.map} +1 -1
  316. package/dist/native/p-b0fc08e7.entry.js +2 -0
  317. package/dist/native/p-b0fc08e7.entry.js.map +1 -0
  318. package/dist/native/{p-c67186f8.entry.js → p-c930adb7.entry.js} +2 -2
  319. package/dist/native/{p-3b7ef609.entry.js → p-cfe0a6c6.entry.js} +2 -2
  320. package/dist/native/p-d07ab618.entry.js +2 -0
  321. package/dist/native/{p-7e154bfd.entry.js → p-dac0089b.entry.js} +2 -2
  322. package/dist/native/p-dac0089b.entry.js.map +1 -0
  323. package/dist/native/{p-470588c2.entry.js → p-de2c07a6.entry.js} +3 -3
  324. package/dist/native/p-de2c07a6.entry.js.map +1 -0
  325. package/dist/native/{p-3953464e.entry.js → p-ed488498.entry.js} +2 -2
  326. package/dist/native/p-ef76178b.entry.js +2 -0
  327. package/dist/native/p-ef76178b.entry.js.map +1 -0
  328. package/dist/native/{p-e5de64d5.entry.js → p-f0ddf60b.entry.js} +2 -2
  329. package/dist/native/p-f39803d9.entry.js +2 -0
  330. package/dist/native/p-f39803d9.entry.js.map +1 -0
  331. package/dist/native/p-fb897f7d.entry.js +2 -0
  332. package/dist/native/{p-fc97f071.entry.js.map → p-fb897f7d.entry.js.map} +1 -1
  333. package/dist/native/{p-244f56ac.entry.js → p-fc3bea07.entry.js} +2 -2
  334. package/dist/types/components/nv-calendar/nv-calendar.d.ts +1 -5
  335. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +0 -16
  336. package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +4 -0
  337. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +11 -1
  338. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +47 -26
  339. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +61 -55
  340. package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +230 -0
  341. package/dist/types/components/nv-fieldslider/nv-fieldslider.docs.d.ts +4 -0
  342. package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +46 -0
  343. package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +45 -0
  344. package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +37 -0
  345. package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +35 -0
  346. package/dist/types/components/nv-fieldslider/partials/tick-marks.d.ts +28 -0
  347. package/dist/types/components/nv-fieldslider/test/nv-fieldslider.utils.test.d.ts +1 -0
  348. package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +1 -0
  349. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  350. package/dist/types/components.d.ts +387 -38
  351. package/dist/types/interfaces/Column.d.ts +5 -1
  352. package/dist/vscode-data.json +121 -9
  353. package/hydrate/index.js +1172 -393
  354. package/hydrate/index.mjs +1172 -393
  355. package/package.json +6 -2
  356. package/dist/cjs/index-9bda5507.js.map +0 -1
  357. package/dist/components/p-1c45c0f2.js.map +0 -1
  358. package/dist/components/p-76646ce9.js +0 -88
  359. package/dist/components/p-76646ce9.js.map +0 -1
  360. package/dist/components/p-854c32dc.js.map +0 -1
  361. package/dist/components/p-9decffb6.js.map +0 -1
  362. package/dist/components/p-f76bb0c3.js.map +0 -1
  363. package/dist/esm/index-1fb7a9a6.js.map +0 -1
  364. package/dist/native/p-2523eead.entry.js +0 -2
  365. package/dist/native/p-2523eead.entry.js.map +0 -1
  366. package/dist/native/p-470588c2.entry.js.map +0 -1
  367. package/dist/native/p-49cac014.entry.js +0 -2
  368. package/dist/native/p-4d164ed6.entry.js +0 -2
  369. package/dist/native/p-4dc1d036.entry.js +0 -2
  370. package/dist/native/p-4e635fa7.entry.js +0 -2
  371. package/dist/native/p-4e635fa7.entry.js.map +0 -1
  372. package/dist/native/p-5d21532a.entry.js +0 -2
  373. package/dist/native/p-7e154bfd.entry.js.map +0 -1
  374. package/dist/native/p-7eba904e.entry.js +0 -2
  375. package/dist/native/p-7eba904e.entry.js.map +0 -1
  376. package/dist/native/p-9135fdf5.entry.js +0 -2
  377. package/dist/native/p-ab002252.js +0 -3
  378. package/dist/native/p-ab002252.js.map +0 -1
  379. package/dist/native/p-ae7ab110.entry.js +0 -2
  380. package/dist/native/p-b94d9f0b.entry.js +0 -2
  381. package/dist/native/p-c71c6f23.entry.js +0 -2
  382. package/dist/native/p-c71c6f23.entry.js.map +0 -1
  383. package/dist/native/p-d9a52884.entry.js +0 -2
  384. package/dist/native/p-d9a52884.entry.js.map +0 -1
  385. package/dist/native/p-f2ef6771.entry.js +0 -2
  386. package/dist/native/p-f5f68992.entry.js +0 -2
  387. package/dist/native/p-f5f68992.entry.js.map +0 -1
  388. package/dist/native/p-fc97f071.entry.js +0 -2
  389. /package/dist/native/{p-7fd4d13d.entry.js.map → p-0323daf6.entry.js.map} +0 -0
  390. /package/dist/native/{p-14c07207.entry.js.map → p-05d95d4d.entry.js.map} +0 -0
  391. /package/dist/native/{p-90e6d9dd.entry.js.map → p-0ec1e2e3.entry.js.map} +0 -0
  392. /package/dist/native/{p-c7b201cd.entry.js.map → p-16a4cdf3.entry.js.map} +0 -0
  393. /package/dist/native/{p-1da72182.entry.js.map → p-19fb0fd0.entry.js.map} +0 -0
  394. /package/dist/native/{p-c0f79bac.entry.js.map → p-221b8f72.entry.js.map} +0 -0
  395. /package/dist/native/{p-0245863d.entry.js.map → p-407fc32d.entry.js.map} +0 -0
  396. /package/dist/native/{p-3cd77d82.entry.js.map → p-4c0d81b0.entry.js.map} +0 -0
  397. /package/dist/native/{p-615947e7.entry.js.map → p-519b4819.entry.js.map} +0 -0
  398. /package/dist/native/{p-7042ba8a.entry.js.map → p-5382eab2.entry.js.map} +0 -0
  399. /package/dist/native/{p-656c56f0.entry.js.map → p-60b204ac.entry.js.map} +0 -0
  400. /package/dist/native/{p-f2ef6771.entry.js.map → p-7092a675.entry.js.map} +0 -0
  401. /package/dist/native/{p-efe6a46c.entry.js.map → p-7c676f2c.entry.js.map} +0 -0
  402. /package/dist/native/{p-b8b6875d.entry.js.map → p-9fba8663.entry.js.map} +0 -0
  403. /package/dist/native/{p-08a75cfa.entry.js.map → p-a2c0f1a7.entry.js.map} +0 -0
  404. /package/dist/native/{p-c67186f8.entry.js.map → p-c930adb7.entry.js.map} +0 -0
  405. /package/dist/native/{p-3b7ef609.entry.js.map → p-cfe0a6c6.entry.js.map} +0 -0
  406. /package/dist/native/{p-4dc1d036.entry.js.map → p-d07ab618.entry.js.map} +0 -0
  407. /package/dist/native/{p-3953464e.entry.js.map → p-ed488498.entry.js.map} +0 -0
  408. /package/dist/native/{p-e5de64d5.entry.js.map → p-f0ddf60b.entry.js.map} +0 -0
  409. /package/dist/native/{p-244f56ac.entry.js.map → p-fc3bea07.entry.js.map} +0 -0
@@ -0,0 +1,1035 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import { v4 as uuidv4 } from "uuid";
3
+ import { clamp, valueToPercent, snapToStep, generateTicks, snapToTicks, } from "./nv-fieldslider.utils";
4
+ import { SingleThumb } from "./partials/single-thumb";
5
+ import { RangeThumb } from "./partials/range-thumb";
6
+ import { TickMarks } from "./partials/tick-marks";
7
+ import { FieldInput } from "./partials/field-input";
8
+ /**
9
+ * @deprecated [EXPERIMENTAL]
10
+ * @experimental This component is still in development and subject to change in future releases.
11
+ * @slot label - Content to be placed as the label, will override the label prop.
12
+ * @slot description - Content to be placed as the description, will override the description prop.
13
+ * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.
14
+ */
15
+ export class NvFieldslider {
16
+ constructor() {
17
+ /****************************************************************************/
18
+ //#region PROPERTIES
19
+ /**
20
+ * Sets the ID for the start input element and the for attribute of the associated
21
+ * label. If no ID is provided, a random one will be automatically generated.
22
+ */
23
+ this.startInputId = uuidv4();
24
+ /**
25
+ * Sets the ID for the end input element and the for attribute of the associated
26
+ * label. If no ID is provided, a random one will be automatically generated.
27
+ */
28
+ this.endInputId = uuidv4();
29
+ /**
30
+ * Keeps the interface clean by removing visible labels, but still announces
31
+ * the label to screen readers so users relying on assistive tech aren't left
32
+ * guessing.
33
+ */
34
+ this.hideLabel = false;
35
+ /**
36
+ * Enables an optional numeric input field alongside the slider, allowing
37
+ * users to type a value directly instead of—or in addition to—using the
38
+ * slider handle.
39
+ */
40
+ this.hasField = false;
41
+ /**
42
+ * Allows the slider to display two thumbs, enabling users to select a
43
+ * continuous range between a minimum and maximum value. Ideal for use cases
44
+ * like filtering by price or time.
45
+ */
46
+ this.range = false;
47
+ /**
48
+ * Disables user interaction with the slider and its associated input fields.
49
+ */
50
+ this.disabled = false;
51
+ /**
52
+ * Makes the slider and input non-editable while keeping them focusable and
53
+ * included in form submissions.
54
+ */
55
+ this.readonly = false;
56
+ /**
57
+ * Alters the slider's appearance to indicate an error, helping users
58
+ * identify fields that need correction.
59
+ * @validator error
60
+ */
61
+ this.error = false;
62
+ /**
63
+ * Changes the slider's appearance to indicate successful input or validation.
64
+ */
65
+ this.success = false;
66
+ /**
67
+ * Numeric value of the slider as a string, if range mode is on, the values
68
+ * will be a comma-separated string.
69
+ */
70
+ this.value = '0';
71
+ /**
72
+ * Defines the interval between selectable values on the slider. Controls how
73
+ * much the value increases or decreases with each keyboard interaction, drag
74
+ * movement, or direct input.
75
+ */
76
+ this.step = 1;
77
+ /**
78
+ * Controls whether the slider handle should visually snap to step values
79
+ * during dragging. When false, the handle can be positioned at any point
80
+ * along the track while dragging, but the actual value will still snap to the
81
+ * nearest step value. When true, the handle will visually snap to the nearest
82
+ * step value during dragging.
83
+ */
84
+ this.snap = false;
85
+ /**
86
+ * When true and custom ticks are provided, the slider will snap to the nearest
87
+ * tick value during dragging, instead of using the step value. This is useful
88
+ * when you have custom ticks at specific values that don't align with regular step intervals.
89
+ */
90
+ this.snapTicks = false;
91
+ /**
92
+ * Defines the minimum allowed value for the slider. The thumb cannot move
93
+ * below this value, and manual input is also constrained accordingly.
94
+ */
95
+ this.min = 0;
96
+ /**
97
+ * Defines the maximum allowed value for the slider. The thumb cannot move
98
+ * above this value, and manual input is also constrained accordingly.
99
+ */
100
+ this.max = 100;
101
+ /**
102
+ * Controls the visibility of tick marks on the slider. When enabled, all
103
+ * visual ticks that indicate step points along the track are shown. If custom
104
+ * ticks are provided, they are always shown regardless of this setting.
105
+ */
106
+ this.showTicks = false;
107
+ /**
108
+ * Allows the field to stretch and fill the entire width of its container.
109
+ */
110
+ this.fluid = false;
111
+ //#endregion PROPERTIES
112
+ /****************************************************************************/
113
+ //#region STATE
114
+ this.isDragging = false;
115
+ this.activeDragThumb = 'single';
116
+ this.internalTicks = [];
117
+ // These track the raw slider positions for visual display
118
+ this.rawPosition = 0;
119
+ this.rawRangePosition = [0, 0];
120
+ this.valueInternal = 0;
121
+ this.rangeValueInternal = [0, 0];
122
+ /**
123
+ * Parses the value string into a number or array of numbers for internal use.
124
+ */
125
+ this.parseValue = () => {
126
+ const values = this.value.replace(/\s/g, '').split(',');
127
+ if (values.length === 1) {
128
+ this.valueInternal = parseFloat(values[0]);
129
+ }
130
+ else if (values.length === 2) {
131
+ values.forEach((value, index) => {
132
+ this.valueInternal = parseFloat(value);
133
+ this.rangeValueInternal[index] = this.valueInternal;
134
+ });
135
+ }
136
+ };
137
+ /**
138
+ * Handles pointer events on the track.
139
+ * @param {PointerEvent} event - The pointer event
140
+ */
141
+ this.onTrackInteraction = (event) => {
142
+ if (this.disabled || this.readonly) {
143
+ return;
144
+ }
145
+ const trackRect = event.currentTarget.getBoundingClientRect();
146
+ const percentage = clamp(((event.clientX - trackRect.left) / trackRect.width) * 100, 0, 100);
147
+ const newValue = this.min + (percentage / 100) * (this.max - this.min);
148
+ // Store raw position for visual display
149
+ this.rawPosition = newValue;
150
+ if (this.range) {
151
+ // In range mode, determine which thumb to move based on proximity
152
+ const leftPct = valueToPercent(this.rangeValueInternal[0], this.min, this.max);
153
+ const rightPct = valueToPercent(this.rangeValueInternal[1], this.min, this.max);
154
+ const distanceToLeft = Math.abs(percentage - leftPct);
155
+ const distanceToRight = Math.abs(percentage - rightPct);
156
+ if (distanceToLeft <= distanceToRight) {
157
+ this.activeDragThumb = 'left';
158
+ this.rawRangePosition = [newValue, this.rawRangePosition[1]];
159
+ this.handleValueChange([newValue, this.rangeValueInternal[1]]);
160
+ }
161
+ else {
162
+ this.activeDragThumb = 'right';
163
+ this.rawRangePosition = [this.rawRangePosition[0], newValue];
164
+ this.handleValueChange([this.rangeValueInternal[0], newValue]);
165
+ }
166
+ }
167
+ else {
168
+ this.activeDragThumb = 'single';
169
+ this.rawPosition = newValue;
170
+ this.handleValueChange(newValue);
171
+ }
172
+ this.isDragging = true;
173
+ this.registerGlobalEvents();
174
+ };
175
+ /**
176
+ * Handles pointer move events during drag.
177
+ * @param {PointerEvent} event - The pointer event
178
+ */
179
+ this.onPointerMove = (event) => {
180
+ if (!this.isDragging || this.disabled || this.readonly) {
181
+ return;
182
+ }
183
+ const trackElement = this.el.querySelector('.track');
184
+ if (!trackElement)
185
+ return;
186
+ const trackRect = trackElement.getBoundingClientRect();
187
+ const percentage = clamp(((event.clientX - trackRect.left) / trackRect.width) * 100, 0, 100);
188
+ const newValue = this.min + (percentage / 100) * (this.max - this.min);
189
+ // Update visual position
190
+ if (this.range) {
191
+ if (this.activeDragThumb === 'left') {
192
+ this.rawRangePosition = [newValue, this.rawRangePosition[1]];
193
+ this.handleValueChange([newValue, this.rangeValueInternal[1]]);
194
+ }
195
+ else {
196
+ this.rawRangePosition = [this.rawRangePosition[0], newValue];
197
+ this.handleValueChange([this.rangeValueInternal[0], newValue]);
198
+ }
199
+ }
200
+ else {
201
+ this.rawPosition = newValue;
202
+ this.handleValueChange(newValue);
203
+ }
204
+ };
205
+ /**
206
+ * Handles the end of a drag operation.
207
+ */
208
+ this.onPointerUp = () => {
209
+ this.isDragging = false;
210
+ this.removeGlobalEvents();
211
+ };
212
+ /**
213
+ * Handles keydown events for keyboard accessibility.
214
+ * @param {KeyboardEvent} event - The keyboard event
215
+ */
216
+ this.onKeyDown = (event) => {
217
+ if (this.disabled || this.readonly) {
218
+ return;
219
+ }
220
+ let newValue;
221
+ const stepMultiplier = event.shiftKey ? 10 : 1;
222
+ const singleStep = this.step * stepMultiplier;
223
+ if (this.range) {
224
+ const focusedThumb = event.target.getAttribute('data-thumb');
225
+ const idx = focusedThumb === 'left' ? 0 : 1;
226
+ const currentValue = [...this.rangeValueInternal];
227
+ switch (event.key) {
228
+ case 'ArrowRight':
229
+ case 'ArrowUp':
230
+ currentValue[idx] += singleStep;
231
+ break;
232
+ case 'ArrowLeft':
233
+ case 'ArrowDown':
234
+ currentValue[idx] -= singleStep;
235
+ break;
236
+ case 'Home':
237
+ currentValue[idx] = this.min;
238
+ break;
239
+ case 'End':
240
+ currentValue[idx] = this.max;
241
+ break;
242
+ case 'PageUp':
243
+ currentValue[idx] += singleStep * 10;
244
+ break;
245
+ case 'PageDown':
246
+ currentValue[idx] -= singleStep * 10;
247
+ break;
248
+ default:
249
+ return;
250
+ }
251
+ newValue = currentValue;
252
+ }
253
+ else {
254
+ switch (event.key) {
255
+ case 'ArrowRight':
256
+ case 'ArrowUp':
257
+ newValue = this.valueInternal + singleStep;
258
+ break;
259
+ case 'ArrowLeft':
260
+ case 'ArrowDown':
261
+ newValue = this.valueInternal - singleStep;
262
+ break;
263
+ case 'Home':
264
+ newValue = this.min;
265
+ break;
266
+ case 'End':
267
+ newValue = this.max;
268
+ break;
269
+ case 'PageUp':
270
+ newValue = this.valueInternal + singleStep * 10;
271
+ break;
272
+ case 'PageDown':
273
+ newValue = this.valueInternal - singleStep * 10;
274
+ break;
275
+ default:
276
+ return;
277
+ }
278
+ }
279
+ event.preventDefault();
280
+ this.handleValueChange(newValue);
281
+ };
282
+ /**
283
+ * Handles field input value changes.
284
+ * @param {Event} event - The input event
285
+ */
286
+ this.handleFieldChange = (event) => {
287
+ const input = event.target;
288
+ const newValue = parseFloat(input.value);
289
+ if (isNaN(newValue)) {
290
+ return;
291
+ }
292
+ if (this.range) {
293
+ const fieldIndex = input.getAttribute('data-index') === '0' ? 0 : 1;
294
+ const updatedRange = [...this.rangeValueInternal];
295
+ updatedRange[fieldIndex] = newValue;
296
+ this.handleValueChange(updatedRange);
297
+ }
298
+ else {
299
+ this.handleValueChange(newValue);
300
+ }
301
+ };
302
+ }
303
+ //#endregion STATE
304
+ /****************************************************************************/
305
+ //#region METHODS
306
+ /**
307
+ * Ensures value is valid and within bounds.
308
+ * @param {number} val - The value to validate
309
+ * @returns {number} The validated and snapped value
310
+ */
311
+ validateValue(val) {
312
+ // First ensure the value is within bounds
313
+ const clampedValue = clamp(val, this.min, this.max);
314
+ // If snapTicks is true and we have custom ticks, snap to the nearest tick
315
+ if (this.snapTicks && this.internalTicks && this.internalTicks.length > 0) {
316
+ return snapToTicks(clampedValue, this.internalTicks);
317
+ }
318
+ // Otherwise snap to step values
319
+ return snapToStep(clampedValue, this.min, this.max, this.step);
320
+ }
321
+ /**
322
+ * Handles value changes from slider interaction.
323
+ * @param {number | number[]} newValue - The new value or range values
324
+ */
325
+ handleValueChange(newValue) {
326
+ if (this.disabled || this.readonly) {
327
+ return;
328
+ }
329
+ if (this.range) {
330
+ // Handle range values
331
+ if (Array.isArray(newValue) && newValue.length === 2) {
332
+ // Ensure values are in order (left ≤ right)
333
+ const orderedValues = [
334
+ Math.min(newValue[0], newValue[1]),
335
+ Math.max(newValue[0], newValue[1]),
336
+ ];
337
+ // Snap to steps and clamp
338
+ const validatedValues = [
339
+ this.validateValue(orderedValues[0]),
340
+ this.validateValue(orderedValues[1]),
341
+ ];
342
+ if (validatedValues[0] !== this.rangeValueInternal[0] ||
343
+ validatedValues[1] !== this.rangeValueInternal[1]) {
344
+ this.rangeValueInternal = validatedValues;
345
+ this.value = this.rangeValueInternal.join(',');
346
+ this.valueChanged.emit(this.rangeValueInternal.join(','));
347
+ }
348
+ }
349
+ }
350
+ else {
351
+ // Handle single value
352
+ if (typeof newValue === 'number') {
353
+ const validatedValue = this.validateValue(newValue);
354
+ if (validatedValue !== this.valueInternal) {
355
+ this.valueInternal = validatedValue;
356
+ this.value = String(this.valueInternal);
357
+ this.valueChanged.emit(String(this.valueInternal));
358
+ }
359
+ }
360
+ }
361
+ }
362
+ /**
363
+ * Generates the ticks to display based on props and state.
364
+ */
365
+ generateDisplayTicks() {
366
+ // If custom ticks are provided, always use them regardless of showTicks setting
367
+ if (this.ticks && this.ticks.length > 0) {
368
+ this.internalTicks = [...this.ticks].sort((a, b) => a.value - b.value);
369
+ return;
370
+ }
371
+ // If showTicks is false and there are no custom ticks, hide all ticks
372
+ if (!this.showTicks) {
373
+ this.internalTicks = [];
374
+ return;
375
+ }
376
+ // Generate all ticks at each step point
377
+ const autoTicks = generateTicks(this.min, this.max, this.step);
378
+ this.internalTicks = autoTicks.map(value => ({ value }));
379
+ }
380
+ /**
381
+ * Registers global events for tracking pointer movement.
382
+ */
383
+ registerGlobalEvents() {
384
+ document.addEventListener('pointermove', this.onPointerMove);
385
+ document.addEventListener('pointerup', this.onPointerUp);
386
+ document.addEventListener('pointercancel', this.onPointerUp);
387
+ }
388
+ /**
389
+ * Removes global events when tracking ends.
390
+ */
391
+ removeGlobalEvents() {
392
+ document.removeEventListener('pointermove', this.onPointerMove);
393
+ document.removeEventListener('pointerup', this.onPointerUp);
394
+ document.removeEventListener('pointercancel', this.onPointerUp);
395
+ }
396
+ //#endregion METHODS
397
+ /****************************************************************************/
398
+ //#region WATCHERS
399
+ onValueChange() {
400
+ this.parseValue();
401
+ }
402
+ onConfigChange() {
403
+ this.generateDisplayTicks();
404
+ if (this.range) {
405
+ this.handleValueChange(this.rangeValueInternal);
406
+ }
407
+ else {
408
+ this.handleValueChange(this.valueInternal);
409
+ }
410
+ }
411
+ onRangeChange(newValue) {
412
+ if (newValue) {
413
+ // Switching to range mode
414
+ this.rangeValueInternal = [this.min, this.valueInternal];
415
+ }
416
+ else {
417
+ // Switching to single mode, take the higher value
418
+ this.valueInternal = this.rangeValueInternal[1];
419
+ }
420
+ }
421
+ //#endregion WATCHERS
422
+ /****************************************************************************/
423
+ //#region LIFECYCLE
424
+ connectedCallback() {
425
+ this.parseValue();
426
+ this.generateDisplayTicks();
427
+ // Initialize values and make sure they're valid
428
+ if (this.range) {
429
+ if (!Array.isArray(this.rangeValueInternal) ||
430
+ this.rangeValueInternal.length !== 2) {
431
+ this.rangeValueInternal = [this.min, this.max];
432
+ }
433
+ this.handleValueChange(this.rangeValueInternal);
434
+ // Initialize raw range position to match actual values
435
+ this.rawRangePosition = [
436
+ this.rangeValueInternal[0],
437
+ this.rangeValueInternal[1],
438
+ ];
439
+ }
440
+ else {
441
+ this.handleValueChange(this.valueInternal);
442
+ // Initialize raw position to match actual value
443
+ this.rawPosition = this.valueInternal;
444
+ }
445
+ }
446
+ disconnectedCallback() {
447
+ this.removeGlobalEvents();
448
+ }
449
+ //#endregion EVENTS
450
+ /****************************************************************************/
451
+ //#region RENDER
452
+ render() {
453
+ return (h(Host, { key: '69cded86eeaff3470f970d8c5e359d467cea1762' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'd6725108d8cfc35d4722e5761592b08f20c390b2', htmlFor: this.startInputId }, h("slot", { key: 'a13207c702baa4ea95073da3db56419c50114de2', name: "label" }, this.label))), h("div", { key: 'a771db3df06edf4ca150db4f66f42a6816e32bc8', class: "slider-container" }, this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 0, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : null, h("div", { key: '705fe70c9d5ebba5dc9b877532936d301df0baf6', class: "track-container" }, h("div", { key: '1f9a691c278e88160319699ff91d925dfd8184c2', class: "track", onPointerDown: this.onTrackInteraction }, this.range ? (h(RangeThumb, { rangeValue: this.rangeValueInternal, rawRangePosition: this.rawRangePosition, activeDragThumb: this.activeDragThumb, isDragging: this.isDragging, snap: this.snap, min: this.min, max: this.max, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue })) : (h(SingleThumb, { value: this.valueInternal, min: this.min, max: this.max, rawPosition: this.rawPosition, isDragging: this.isDragging, snap: this.snap, disabled: this.disabled, readonly: this.readonly, onKeyDown: this.onKeyDown, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue }))), h(TickMarks, { key: 'b80cf4eeb492587ca44ebc6512ded331ec5619ef', ticks: this.internalTicks, min: this.min, max: this.max })), this.range ? (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, index: 1, inputId: this.endInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name, endName: this.endName })) : (h(FieldInput, { range: this.range, hasField: this.hasField, value: this.valueInternal, rangeValue: this.rangeValueInternal, inputId: this.startInputId, min: this.min, max: this.max, step: this.step, disabled: this.disabled, readonly: this.readonly, onInput: this.handleFieldChange, labelBeforeValue: this.labelBeforeValue, labelAfterValue: this.labelAfterValue, name: this.name }))), (this.success ||
454
+ this.description ||
455
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: '97a111d5b194aeb4f1fcf1049489ddcf30527157', class: "description" }, this.success && (h("nv-icon", { key: 'cc549945c9a330892c69826867f4279e039944e8', name: "circle-check", class: "validation", size: "md" })), h("slot", { key: '54b3e872439763a15595d6bf4f9c5e129aeae386', name: "description" }, this.description))), (this.error ||
456
+ this.errorDescription ||
457
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'cd5702e6819a11782a634d522a2dccd992af00f3', class: "error-description", hidden: !this.error }, this.error && (h("nv-icon", { key: '1641a68da28b0963d61b74e69c2c32f566ffeff3', name: "alert-circle", class: "validation", size: "md" })), h("slot", { key: 'a969cc7e37c4a21024790a5603a44365e135693d', name: "error-description" }, this.errorDescription)))));
458
+ }
459
+ static get is() { return "nv-fieldslider"; }
460
+ static get formAssociated() { return true; }
461
+ static get originalStyleUrls() {
462
+ return {
463
+ "$": ["styles/nv-fieldslider.scss"]
464
+ };
465
+ }
466
+ static get styleUrls() {
467
+ return {
468
+ "$": ["styles/nv-fieldslider.css"]
469
+ };
470
+ }
471
+ static get properties() {
472
+ return {
473
+ "startInputId": {
474
+ "type": "string",
475
+ "mutable": false,
476
+ "complexType": {
477
+ "original": "string",
478
+ "resolved": "string",
479
+ "references": {}
480
+ },
481
+ "required": false,
482
+ "optional": false,
483
+ "docs": {
484
+ "tags": [],
485
+ "text": "Sets the ID for the start input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated."
486
+ },
487
+ "getter": false,
488
+ "setter": false,
489
+ "attribute": "start-input-id",
490
+ "reflect": true,
491
+ "defaultValue": "uuidv4()"
492
+ },
493
+ "endInputId": {
494
+ "type": "string",
495
+ "mutable": false,
496
+ "complexType": {
497
+ "original": "string",
498
+ "resolved": "string",
499
+ "references": {}
500
+ },
501
+ "required": false,
502
+ "optional": false,
503
+ "docs": {
504
+ "tags": [],
505
+ "text": "Sets the ID for the end input element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated."
506
+ },
507
+ "getter": false,
508
+ "setter": false,
509
+ "attribute": "end-input-id",
510
+ "reflect": true,
511
+ "defaultValue": "uuidv4()"
512
+ },
513
+ "label": {
514
+ "type": "string",
515
+ "mutable": false,
516
+ "complexType": {
517
+ "original": "string",
518
+ "resolved": "string",
519
+ "references": {}
520
+ },
521
+ "required": false,
522
+ "optional": false,
523
+ "docs": {
524
+ "tags": [],
525
+ "text": "Provides a textual description of the slider's function, helping users\nunderstand what the control adjusts. It also supports accessibility by\nserving as the accessible name for the component."
526
+ },
527
+ "getter": false,
528
+ "setter": false,
529
+ "attribute": "label",
530
+ "reflect": true
531
+ },
532
+ "hideLabel": {
533
+ "type": "boolean",
534
+ "mutable": false,
535
+ "complexType": {
536
+ "original": "boolean",
537
+ "resolved": "boolean",
538
+ "references": {}
539
+ },
540
+ "required": false,
541
+ "optional": false,
542
+ "docs": {
543
+ "tags": [],
544
+ "text": "Keeps the interface clean by removing visible labels, but still announces\nthe label to screen readers so users relying on assistive tech aren't left\nguessing."
545
+ },
546
+ "getter": false,
547
+ "setter": false,
548
+ "attribute": "hide-label",
549
+ "reflect": true,
550
+ "defaultValue": "false"
551
+ },
552
+ "description": {
553
+ "type": "string",
554
+ "mutable": false,
555
+ "complexType": {
556
+ "original": "string",
557
+ "resolved": "string",
558
+ "references": {}
559
+ },
560
+ "required": false,
561
+ "optional": false,
562
+ "docs": {
563
+ "tags": [],
564
+ "text": "Add helpful hints or extra information under the slider. This is where you\ncan clarify what users should enter or provide additional instructions,\nmaking the form easier to fill out correctly."
565
+ },
566
+ "getter": false,
567
+ "setter": false,
568
+ "attribute": "description",
569
+ "reflect": true
570
+ },
571
+ "hasField": {
572
+ "type": "boolean",
573
+ "mutable": false,
574
+ "complexType": {
575
+ "original": "boolean",
576
+ "resolved": "boolean",
577
+ "references": {}
578
+ },
579
+ "required": false,
580
+ "optional": false,
581
+ "docs": {
582
+ "tags": [],
583
+ "text": "Enables an optional numeric input field alongside the slider, allowing\nusers to type a value directly instead of\u2014or in addition to\u2014using the\nslider handle."
584
+ },
585
+ "getter": false,
586
+ "setter": false,
587
+ "attribute": "has-field",
588
+ "reflect": true,
589
+ "defaultValue": "false"
590
+ },
591
+ "range": {
592
+ "type": "boolean",
593
+ "mutable": false,
594
+ "complexType": {
595
+ "original": "boolean",
596
+ "resolved": "boolean",
597
+ "references": {}
598
+ },
599
+ "required": false,
600
+ "optional": false,
601
+ "docs": {
602
+ "tags": [],
603
+ "text": "Allows the slider to display two thumbs, enabling users to select a\ncontinuous range between a minimum and maximum value. Ideal for use cases\nlike filtering by price or time."
604
+ },
605
+ "getter": false,
606
+ "setter": false,
607
+ "attribute": "range",
608
+ "reflect": true,
609
+ "defaultValue": "false"
610
+ },
611
+ "disabled": {
612
+ "type": "boolean",
613
+ "mutable": false,
614
+ "complexType": {
615
+ "original": "boolean",
616
+ "resolved": "boolean",
617
+ "references": {}
618
+ },
619
+ "required": false,
620
+ "optional": false,
621
+ "docs": {
622
+ "tags": [],
623
+ "text": "Disables user interaction with the slider and its associated input fields."
624
+ },
625
+ "getter": false,
626
+ "setter": false,
627
+ "attribute": "disabled",
628
+ "reflect": true,
629
+ "defaultValue": "false"
630
+ },
631
+ "readonly": {
632
+ "type": "boolean",
633
+ "mutable": false,
634
+ "complexType": {
635
+ "original": "boolean",
636
+ "resolved": "boolean",
637
+ "references": {}
638
+ },
639
+ "required": false,
640
+ "optional": false,
641
+ "docs": {
642
+ "tags": [],
643
+ "text": "Makes the slider and input non-editable while keeping them focusable and\nincluded in form submissions."
644
+ },
645
+ "getter": false,
646
+ "setter": false,
647
+ "attribute": "readonly",
648
+ "reflect": true,
649
+ "defaultValue": "false"
650
+ },
651
+ "error": {
652
+ "type": "boolean",
653
+ "mutable": false,
654
+ "complexType": {
655
+ "original": "boolean",
656
+ "resolved": "boolean",
657
+ "references": {}
658
+ },
659
+ "required": false,
660
+ "optional": false,
661
+ "docs": {
662
+ "tags": [{
663
+ "name": "validator",
664
+ "text": "error"
665
+ }],
666
+ "text": "Alters the slider's appearance to indicate an error, helping users\nidentify fields that need correction."
667
+ },
668
+ "getter": false,
669
+ "setter": false,
670
+ "attribute": "error",
671
+ "reflect": true,
672
+ "defaultValue": "false"
673
+ },
674
+ "errorDescription": {
675
+ "type": "string",
676
+ "mutable": false,
677
+ "complexType": {
678
+ "original": "string",
679
+ "resolved": "string",
680
+ "references": {}
681
+ },
682
+ "required": false,
683
+ "optional": false,
684
+ "docs": {
685
+ "tags": [{
686
+ "name": "validator",
687
+ "text": "message"
688
+ }],
689
+ "text": "A description that appears when there is an error related to the slider."
690
+ },
691
+ "getter": false,
692
+ "setter": false,
693
+ "attribute": "error-description",
694
+ "reflect": true
695
+ },
696
+ "success": {
697
+ "type": "boolean",
698
+ "mutable": false,
699
+ "complexType": {
700
+ "original": "boolean",
701
+ "resolved": "boolean",
702
+ "references": {}
703
+ },
704
+ "required": false,
705
+ "optional": false,
706
+ "docs": {
707
+ "tags": [],
708
+ "text": "Changes the slider's appearance to indicate successful input or validation."
709
+ },
710
+ "getter": false,
711
+ "setter": false,
712
+ "attribute": "success",
713
+ "reflect": true,
714
+ "defaultValue": "false"
715
+ },
716
+ "value": {
717
+ "type": "string",
718
+ "mutable": true,
719
+ "complexType": {
720
+ "original": "string",
721
+ "resolved": "string",
722
+ "references": {}
723
+ },
724
+ "required": false,
725
+ "optional": false,
726
+ "docs": {
727
+ "tags": [],
728
+ "text": "Numeric value of the slider as a string, if range mode is on, the values\nwill be a comma-separated string."
729
+ },
730
+ "getter": false,
731
+ "setter": false,
732
+ "attribute": "value",
733
+ "reflect": true,
734
+ "defaultValue": "'0'"
735
+ },
736
+ "step": {
737
+ "type": "number",
738
+ "mutable": false,
739
+ "complexType": {
740
+ "original": "number",
741
+ "resolved": "number",
742
+ "references": {}
743
+ },
744
+ "required": false,
745
+ "optional": false,
746
+ "docs": {
747
+ "tags": [],
748
+ "text": "Defines the interval between selectable values on the slider. Controls how\nmuch the value increases or decreases with each keyboard interaction, drag\nmovement, or direct input."
749
+ },
750
+ "getter": false,
751
+ "setter": false,
752
+ "attribute": "step",
753
+ "reflect": true,
754
+ "defaultValue": "1"
755
+ },
756
+ "snap": {
757
+ "type": "boolean",
758
+ "mutable": false,
759
+ "complexType": {
760
+ "original": "boolean",
761
+ "resolved": "boolean",
762
+ "references": {}
763
+ },
764
+ "required": false,
765
+ "optional": false,
766
+ "docs": {
767
+ "tags": [],
768
+ "text": "Controls whether the slider handle should visually snap to step values\nduring dragging. When false, the handle can be positioned at any point\nalong the track while dragging, but the actual value will still snap to the\nnearest step value. When true, the handle will visually snap to the nearest\nstep value during dragging."
769
+ },
770
+ "getter": false,
771
+ "setter": false,
772
+ "attribute": "snap",
773
+ "reflect": true,
774
+ "defaultValue": "false"
775
+ },
776
+ "snapTicks": {
777
+ "type": "boolean",
778
+ "mutable": false,
779
+ "complexType": {
780
+ "original": "boolean",
781
+ "resolved": "boolean",
782
+ "references": {}
783
+ },
784
+ "required": false,
785
+ "optional": false,
786
+ "docs": {
787
+ "tags": [],
788
+ "text": "When true and custom ticks are provided, the slider will snap to the nearest\ntick value during dragging, instead of using the step value. This is useful\nwhen you have custom ticks at specific values that don't align with regular step intervals."
789
+ },
790
+ "getter": false,
791
+ "setter": false,
792
+ "attribute": "snap-ticks",
793
+ "reflect": true,
794
+ "defaultValue": "false"
795
+ },
796
+ "name": {
797
+ "type": "string",
798
+ "mutable": false,
799
+ "complexType": {
800
+ "original": "string",
801
+ "resolved": "string",
802
+ "references": {}
803
+ },
804
+ "required": false,
805
+ "optional": false,
806
+ "docs": {
807
+ "tags": [],
808
+ "text": "Name attribute for the form input element. Required for form submission.\nFor range sliders, this will be used for the start value input and add -end\nto the end input name."
809
+ },
810
+ "getter": false,
811
+ "setter": false,
812
+ "attribute": "name",
813
+ "reflect": true
814
+ },
815
+ "endName": {
816
+ "type": "string",
817
+ "mutable": false,
818
+ "complexType": {
819
+ "original": "string",
820
+ "resolved": "string",
821
+ "references": {}
822
+ },
823
+ "required": false,
824
+ "optional": false,
825
+ "docs": {
826
+ "tags": [],
827
+ "text": "Name attribute for the end value input when using range mode.\nIf not provided, the name attribute will be used with '-end' appended."
828
+ },
829
+ "getter": false,
830
+ "setter": false,
831
+ "attribute": "end-name",
832
+ "reflect": true
833
+ },
834
+ "min": {
835
+ "type": "number",
836
+ "mutable": false,
837
+ "complexType": {
838
+ "original": "number",
839
+ "resolved": "number",
840
+ "references": {}
841
+ },
842
+ "required": false,
843
+ "optional": false,
844
+ "docs": {
845
+ "tags": [],
846
+ "text": "Defines the minimum allowed value for the slider. The thumb cannot move\nbelow this value, and manual input is also constrained accordingly."
847
+ },
848
+ "getter": false,
849
+ "setter": false,
850
+ "attribute": "min",
851
+ "reflect": true,
852
+ "defaultValue": "0"
853
+ },
854
+ "max": {
855
+ "type": "number",
856
+ "mutable": false,
857
+ "complexType": {
858
+ "original": "number",
859
+ "resolved": "number",
860
+ "references": {}
861
+ },
862
+ "required": false,
863
+ "optional": false,
864
+ "docs": {
865
+ "tags": [],
866
+ "text": "Defines the maximum allowed value for the slider. The thumb cannot move\nabove this value, and manual input is also constrained accordingly."
867
+ },
868
+ "getter": false,
869
+ "setter": false,
870
+ "attribute": "max",
871
+ "reflect": true,
872
+ "defaultValue": "100"
873
+ },
874
+ "showTicks": {
875
+ "type": "boolean",
876
+ "mutable": false,
877
+ "complexType": {
878
+ "original": "boolean",
879
+ "resolved": "boolean",
880
+ "references": {}
881
+ },
882
+ "required": false,
883
+ "optional": false,
884
+ "docs": {
885
+ "tags": [],
886
+ "text": "Controls the visibility of tick marks on the slider. When enabled, all\nvisual ticks that indicate step points along the track are shown. If custom\nticks are provided, they are always shown regardless of this setting."
887
+ },
888
+ "getter": false,
889
+ "setter": false,
890
+ "attribute": "show-ticks",
891
+ "reflect": true,
892
+ "defaultValue": "false"
893
+ },
894
+ "ticks": {
895
+ "type": "unknown",
896
+ "mutable": false,
897
+ "complexType": {
898
+ "original": "{\n /** The numeric value of the tick */\n value: number;\n /** The label of the tick */\n label?: string;\n }[]",
899
+ "resolved": "{ value: number; label?: string; }[]",
900
+ "references": {}
901
+ },
902
+ "required": false,
903
+ "optional": false,
904
+ "docs": {
905
+ "tags": [],
906
+ "text": "Allows you to specify custom tick marks at specific values along the\nslider. Each tick can optionally display a label to provide additional\ncontext or guidance for users."
907
+ },
908
+ "getter": false,
909
+ "setter": false
910
+ },
911
+ "fluid": {
912
+ "type": "boolean",
913
+ "mutable": false,
914
+ "complexType": {
915
+ "original": "boolean",
916
+ "resolved": "boolean",
917
+ "references": {}
918
+ },
919
+ "required": false,
920
+ "optional": false,
921
+ "docs": {
922
+ "tags": [],
923
+ "text": "Allows the field to stretch and fill the entire width of its container."
924
+ },
925
+ "getter": false,
926
+ "setter": false,
927
+ "attribute": "fluid",
928
+ "reflect": true,
929
+ "defaultValue": "false"
930
+ },
931
+ "labelBeforeValue": {
932
+ "type": "string",
933
+ "mutable": false,
934
+ "complexType": {
935
+ "original": "string",
936
+ "resolved": "string",
937
+ "references": {}
938
+ },
939
+ "required": false,
940
+ "optional": false,
941
+ "docs": {
942
+ "tags": [],
943
+ "text": "Use this to automatically show a label, like \u201C~\u201D for approximate values,\nbefore the slider\u2019s value in the tooltip or input, giving users quick\ncontext about the number."
944
+ },
945
+ "getter": false,
946
+ "setter": false,
947
+ "attribute": "label-before-value",
948
+ "reflect": true
949
+ },
950
+ "labelAfterValue": {
951
+ "type": "string",
952
+ "mutable": false,
953
+ "complexType": {
954
+ "original": "string",
955
+ "resolved": "string",
956
+ "references": {}
957
+ },
958
+ "required": false,
959
+ "optional": false,
960
+ "docs": {
961
+ "tags": [],
962
+ "text": "Use this to automatically show a label, like \u201C$\u201D or \u201Ckg,\u201D after the value\non the slider\u2019s tooltip or input, helping users better understand the\nnumber."
963
+ },
964
+ "getter": false,
965
+ "setter": false,
966
+ "attribute": "label-after-value",
967
+ "reflect": true
968
+ }
969
+ };
970
+ }
971
+ static get states() {
972
+ return {
973
+ "isDragging": {},
974
+ "activeDragThumb": {},
975
+ "internalTicks": {},
976
+ "rawPosition": {},
977
+ "rawRangePosition": {},
978
+ "valueInternal": {},
979
+ "rangeValueInternal": {}
980
+ };
981
+ }
982
+ static get events() {
983
+ return [{
984
+ "method": "valueChanged",
985
+ "name": "valueChanged",
986
+ "bubbles": true,
987
+ "cancelable": true,
988
+ "composed": true,
989
+ "docs": {
990
+ "tags": [{
991
+ "name": "bind",
992
+ "text": "value"
993
+ }],
994
+ "text": "Emitted when the slider values change."
995
+ },
996
+ "complexType": {
997
+ "original": "string",
998
+ "resolved": "string",
999
+ "references": {}
1000
+ }
1001
+ }];
1002
+ }
1003
+ static get elementRef() { return "el"; }
1004
+ static get watchers() {
1005
+ return [{
1006
+ "propName": "value",
1007
+ "methodName": "onValueChange"
1008
+ }, {
1009
+ "propName": "min",
1010
+ "methodName": "onConfigChange"
1011
+ }, {
1012
+ "propName": "max",
1013
+ "methodName": "onConfigChange"
1014
+ }, {
1015
+ "propName": "step",
1016
+ "methodName": "onConfigChange"
1017
+ }, {
1018
+ "propName": "ticks",
1019
+ "methodName": "onConfigChange"
1020
+ }, {
1021
+ "propName": "showTicks",
1022
+ "methodName": "onConfigChange"
1023
+ }, {
1024
+ "propName": "snap",
1025
+ "methodName": "onConfigChange"
1026
+ }, {
1027
+ "propName": "snapTicks",
1028
+ "methodName": "onConfigChange"
1029
+ }, {
1030
+ "propName": "range",
1031
+ "methodName": "onRangeChange"
1032
+ }];
1033
+ }
1034
+ }
1035
+ //# sourceMappingURL=nv-fieldslider.js.map