@nova-design-system/nova-webcomponents 3.1.0 → 3.3.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 (474) hide show
  1. package/dist/cjs/{index-9bda5507.js → index-c56424e5.js} +34 -186
  2. package/dist/cjs/index-c56424e5.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 -23
  7. package/dist/cjs/native.cjs.js.map +1 -1
  8. package/dist/cjs/nv-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/nv-badge_2.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-breadcrumb.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-breadcrumbs.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-button.cjs.entry.js +1 -1
  14. package/dist/cjs/nv-calendar.cjs.entry.js +384 -172
  15. package/dist/cjs/nv-calendar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-col.cjs.entry.js +1 -1
  17. package/dist/cjs/nv-datagrid.cjs.entry.js +95 -103
  18. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nv-datagridcolumn.cjs.entry.js +2 -2
  20. package/dist/cjs/nv-datagridcolumn.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-dialogfooter_2.cjs.entry.js +1 -1
  23. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +1 -1
  24. package/dist/cjs/nv-fielddate.cjs.entry.js +45 -11
  25. package/dist/cjs/nv-fielddate.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nv-fielddaterange.cjs.entry.js +128 -42
  27. package/dist/cjs/nv-fielddaterange.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nv-fielddropdown.cjs.entry.js +84 -60
  29. package/dist/cjs/nv-fielddropdown.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nv-fielddropdownitem.cjs.entry.js +1 -1
  31. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js +116 -104
  32. package/dist/cjs/nv-fieldmultiselect.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nv-fieldnumber.cjs.entry.js +2 -2
  34. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -1
  35. package/dist/cjs/nv-fieldpassword.cjs.entry.js +2 -2
  36. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -1
  37. package/dist/cjs/nv-fieldradio.cjs.entry.js +1 -1
  38. package/dist/cjs/nv-fieldselect.cjs.entry.js +2 -2
  39. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -1
  40. package/dist/cjs/nv-fieldslider.cjs.entry.js +668 -0
  41. package/dist/cjs/nv-fieldslider.cjs.entry.js.map +1 -0
  42. package/dist/cjs/nv-fieldtext.cjs.entry.js +5 -5
  43. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +5 -5
  45. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -1
  46. package/dist/cjs/nv-fieldtime.cjs.entry.js +11 -11
  47. package/dist/cjs/nv-fieldtime.cjs.entry.js.map +1 -1
  48. package/dist/cjs/nv-icon.cjs.entry.js +3 -3
  49. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  50. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +3 -3
  51. package/dist/cjs/nv-menu.cjs.entry.js +2 -2
  52. package/dist/cjs/nv-menuitem.cjs.entry.js +2 -2
  53. package/dist/cjs/nv-popover.cjs.entry.js +2 -2
  54. package/dist/cjs/nv-row.cjs.entry.js +2 -2
  55. package/dist/cjs/nv-stack.cjs.entry.js +2 -2
  56. package/dist/cjs/nv-table.cjs.entry.js +3 -3
  57. package/dist/cjs/nv-tablecolumn.cjs.entry.js +1 -1
  58. package/dist/cjs/nv-toggle.cjs.entry.js +3 -3
  59. package/dist/cjs/nv-tooltip.cjs.entry.js +3 -3
  60. package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -1
  61. package/dist/collection/collection-manifest.json +1 -0
  62. package/dist/collection/components/nv-calendar/nv-calendar.css +6 -2
  63. package/dist/collection/components/nv-calendar/nv-calendar.js +247 -169
  64. package/dist/collection/components/nv-calendar/nv-calendar.js.map +1 -1
  65. package/dist/collection/components/nv-calendar/nv-calendar.utils.js +12 -3
  66. package/dist/collection/components/nv-calendar/nv-calendar.utils.js.map +1 -1
  67. package/dist/collection/components/nv-calendar/partials/calendar-actions.js +11 -0
  68. package/dist/collection/components/nv-calendar/partials/calendar-actions.js.map +1 -0
  69. package/dist/collection/components/nv-calendar/partials/calendar-grid.js +24 -0
  70. package/dist/collection/components/nv-calendar/partials/calendar-grid.js.map +1 -0
  71. package/dist/collection/components/nv-calendar/partials/calendar-header.js +38 -0
  72. package/dist/collection/components/nv-calendar/partials/calendar-header.js.map +1 -0
  73. package/dist/collection/components/nv-calendar/partials/calendar-shortcuts.js +22 -0
  74. package/dist/collection/components/nv-calendar/partials/calendar-shortcuts.js.map +1 -0
  75. package/dist/collection/components/nv-calendar/partials/day-cell.js +31 -0
  76. package/dist/collection/components/nv-calendar/partials/day-cell.js.map +1 -0
  77. package/dist/collection/components/nv-calendar/partials/index.js +7 -0
  78. package/dist/collection/components/nv-calendar/partials/index.js.map +1 -0
  79. package/dist/collection/components/nv-calendar/partials/week-numbers.js +36 -0
  80. package/dist/collection/components/nv-calendar/partials/week-numbers.js.map +1 -0
  81. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js +692 -651
  82. package/dist/collection/components/nv-calendar/test/nv-calendar.utils.test.js.map +1 -1
  83. package/dist/collection/components/nv-calendar/test/partials/calendar-actions.logic.test.js +169 -0
  84. package/dist/collection/components/nv-calendar/test/partials/calendar-actions.logic.test.js.map +1 -0
  85. package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js +262 -0
  86. package/dist/collection/components/nv-calendar/test/partials/calendar-grid.logic.test.js.map +1 -0
  87. package/dist/collection/components/nv-calendar/test/partials/calendar-header.logic.test.js +208 -0
  88. package/dist/collection/components/nv-calendar/test/partials/calendar-header.logic.test.js.map +1 -0
  89. package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js +355 -0
  90. package/dist/collection/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.js.map +1 -0
  91. package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js +250 -0
  92. package/dist/collection/components/nv-calendar/test/partials/day-cell.logic.test.js.map +1 -0
  93. package/dist/collection/components/nv-calendar/test/partials/week-numbers.logic.test.js +217 -0
  94. package/dist/collection/components/nv-calendar/test/partials/week-numbers.logic.test.js.map +1 -0
  95. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +131 -48
  96. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  97. package/dist/collection/components/nv-datagrid/nv-datagrid.js +94 -152
  98. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  99. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js +20 -1
  100. package/dist/collection/components/nv-datagridcolumn/nv-datagridcolumn.js.map +1 -1
  101. package/dist/collection/components/nv-fielddate/nv-fielddate.js +56 -16
  102. package/dist/collection/components/nv-fielddate/nv-fielddate.js.map +1 -1
  103. package/dist/collection/components/nv-fielddate/styles/nv-fielddate.css +51 -1
  104. package/dist/collection/components/nv-fielddate/test/nv-fielddate.logic.test.js +196 -0
  105. package/dist/collection/components/nv-fielddate/test/nv-fielddate.logic.test.js.map +1 -0
  106. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js +165 -41
  107. package/dist/collection/components/nv-fielddaterange/nv-fielddaterange.js.map +1 -1
  108. package/dist/collection/components/nv-fielddaterange/styles/nv-fielddaterange.css +51 -1
  109. package/dist/collection/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.js +137 -0
  110. package/dist/collection/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.js.map +1 -0
  111. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js +8 -0
  112. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.docs.js.map +1 -1
  113. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js +173 -106
  114. package/dist/collection/components/nv-fielddropdown/nv-fielddropdown.js.map +1 -1
  115. package/dist/collection/components/nv-fielddropdown/styles/nv-fielddropdown.css +77 -1
  116. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js +202 -190
  117. package/dist/collection/components/nv-fieldmultiselect/nv-fieldmultiselect.js.map +1 -1
  118. package/dist/collection/components/nv-fieldmultiselect/{nv-fieldmultiselect.css → styles/nv-fieldmultiselect.css} +61 -4
  119. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +51 -1
  120. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +51 -1
  121. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +51 -1
  122. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js +264 -0
  123. package/dist/collection/components/nv-fieldslider/nv-fieldslider.docs.js.map +1 -0
  124. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js +1036 -0
  125. package/dist/collection/components/nv-fieldslider/nv-fieldslider.js.map +1 -0
  126. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js +77 -0
  127. package/dist/collection/components/nv-fieldslider/nv-fieldslider.utils.js.map +1 -0
  128. package/dist/collection/components/nv-fieldslider/partials/field-input.js +33 -0
  129. package/dist/collection/components/nv-fieldslider/partials/field-input.js.map +1 -0
  130. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js +34 -0
  131. package/dist/collection/components/nv-fieldslider/partials/range-thumb.js.map +1 -0
  132. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js +18 -0
  133. package/dist/collection/components/nv-fieldslider/partials/single-thumb.js.map +1 -0
  134. package/dist/collection/components/nv-fieldslider/partials/tick-marks.js +18 -0
  135. package/dist/collection/components/nv-fieldslider/partials/tick-marks.js.map +1 -0
  136. package/dist/collection/components/nv-fieldslider/styles/nv-fieldslider.css +338 -0
  137. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js +159 -0
  138. package/dist/collection/components/nv-fieldslider/test/nv-fieldslider.utils.test.js.map +1 -0
  139. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +59 -1
  140. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +9 -1
  141. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -1
  142. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +4 -3
  143. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -1
  144. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +45 -1
  145. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +3 -3
  146. package/dist/collection/components/nv-fieldtime/nv-fieldtime.js +9 -9
  147. package/dist/collection/components/nv-fieldtime/styles/nv-fieldtime.css +51 -1
  148. package/dist/collection/components/nv-icon/nv-icon.js +1 -1
  149. package/dist/collection/components/nv-icon/nv-icons.js +1 -0
  150. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  151. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +1 -1
  152. package/dist/collection/components/nv-loader/nv-loader.js +1 -1
  153. package/dist/collection/components/nv-menu/nv-menu.js +1 -1
  154. package/dist/collection/components/nv-menuitem/nv-menuitem.js +2 -2
  155. package/dist/collection/components/nv-popover/nv-popover.js +1 -1
  156. package/dist/collection/components/nv-row/nv-row.js +1 -1
  157. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  158. package/dist/collection/components/nv-table/nv-table.js +2 -2
  159. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  160. package/dist/collection/components/nv-tooltip/nv-tooltip.css +1 -0
  161. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  162. package/dist/collection/interfaces/Column.js.map +1 -1
  163. package/dist/components/index.js +2 -1
  164. package/dist/components/index.js.map +1 -1
  165. package/dist/components/nv-alert.js +2 -2
  166. package/dist/components/nv-avatar.js +2 -2
  167. package/dist/components/nv-badge.js +1 -1
  168. package/dist/components/nv-breadcrumb.js +3 -3
  169. package/dist/components/nv-breadcrumbs.js +1 -1
  170. package/dist/components/nv-button.js +1 -1
  171. package/dist/components/nv-calendar.js +1 -1
  172. package/dist/components/nv-col.js +1 -1
  173. package/dist/components/nv-datagrid.js +97 -109
  174. package/dist/components/nv-datagrid.js.map +1 -1
  175. package/dist/components/nv-datagridcolumn.js +4 -3
  176. package/dist/components/nv-datagridcolumn.js.map +1 -1
  177. package/dist/components/nv-dialog.js +6 -6
  178. package/dist/components/nv-dialogfooter.js +1 -1
  179. package/dist/components/nv-dialogheader.js +1 -1
  180. package/dist/components/nv-fieldcheckbox.js +1 -1
  181. package/dist/components/nv-fielddate.js +53 -25
  182. package/dist/components/nv-fielddate.js.map +1 -1
  183. package/dist/components/nv-fielddaterange.js +137 -57
  184. package/dist/components/nv-fielddaterange.js.map +1 -1
  185. package/dist/components/nv-fielddropdown.js +98 -72
  186. package/dist/components/nv-fielddropdown.js.map +1 -1
  187. package/dist/components/nv-fielddropdownitem.js +1 -1
  188. package/dist/components/nv-fielddropdownitemcheck.js +1 -1
  189. package/dist/components/nv-fieldmultiselect.js +132 -120
  190. package/dist/components/nv-fieldmultiselect.js.map +1 -1
  191. package/dist/components/nv-fieldnumber.js +5 -5
  192. package/dist/components/nv-fieldnumber.js.map +1 -1
  193. package/dist/components/nv-fieldpassword.js +5 -5
  194. package/dist/components/nv-fieldpassword.js.map +1 -1
  195. package/dist/components/nv-fieldradio.js +1 -1
  196. package/dist/components/nv-fieldselect.js +5 -5
  197. package/dist/components/nv-fieldselect.js.map +1 -1
  198. package/dist/components/nv-fieldslider.d.ts +11 -0
  199. package/dist/components/nv-fieldslider.js +731 -0
  200. package/dist/components/nv-fieldslider.js.map +1 -0
  201. package/dist/components/nv-fieldtext.js +1 -1
  202. package/dist/components/nv-fieldtextarea.js +5 -5
  203. package/dist/components/nv-fieldtextarea.js.map +1 -1
  204. package/dist/components/nv-fieldtime.js +15 -15
  205. package/dist/components/nv-fieldtime.js.map +1 -1
  206. package/dist/components/nv-icon.js +1 -1
  207. package/dist/components/nv-iconbutton.js +1 -1
  208. package/dist/components/nv-loader.js +1 -1
  209. package/dist/components/nv-menu.js +5 -5
  210. package/dist/components/nv-menuitem.js +1 -1
  211. package/dist/components/nv-popover.js +1 -1
  212. package/dist/components/nv-row.js +2 -2
  213. package/dist/components/nv-stack.js +2 -2
  214. package/dist/components/nv-table.js +3 -3
  215. package/dist/components/nv-tablecolumn.js +1 -1
  216. package/dist/components/nv-toggle.js +3 -3
  217. package/dist/components/nv-tooltip.js +1 -1
  218. package/dist/components/{p-eb632278.js → p-2ae214d2.js} +3 -3
  219. package/dist/components/{p-eb632278.js.map → p-2ae214d2.js.map} +1 -1
  220. package/dist/components/{p-f76bb0c3.js → p-3e32b5a1.js} +5 -5
  221. package/dist/components/p-3e32b5a1.js.map +1 -0
  222. package/dist/components/{p-854c32dc.js → p-5e90b9b8.js} +389 -199
  223. package/dist/components/p-5e90b9b8.js.map +1 -0
  224. package/dist/components/{p-a2527411.js → p-5ee4015d.js} +3 -3
  225. package/dist/components/{p-a2527411.js.map → p-5ee4015d.js.map} +1 -1
  226. package/dist/components/{p-02752770.js → p-6277f746.js} +2 -2
  227. package/dist/components/{p-02752770.js.map → p-6277f746.js.map} +1 -1
  228. package/dist/components/p-7935c1cb.js +167 -0
  229. package/dist/components/p-7935c1cb.js.map +1 -0
  230. package/dist/components/{p-b48d5a94.js → p-8d92f0e1.js} +4 -4
  231. package/dist/components/{p-b48d5a94.js.map → p-8d92f0e1.js.map} +1 -1
  232. package/dist/components/{p-41c56ddc.js → p-95a7581c.js} +5 -5
  233. package/dist/components/{p-41c56ddc.js.map → p-95a7581c.js.map} +1 -1
  234. package/dist/components/{p-e00cbb8a.js → p-9e6e26cb.js} +2 -2
  235. package/dist/components/{p-e00cbb8a.js.map → p-9e6e26cb.js.map} +1 -1
  236. package/dist/components/p-9fa0de38.js +88 -0
  237. package/dist/components/p-9fa0de38.js.map +1 -0
  238. package/dist/components/{p-1c45c0f2.js → p-aff3ed68.js} +24 -177
  239. package/dist/components/p-aff3ed68.js.map +1 -0
  240. package/dist/components/{p-608eb9da.js → p-b6d858b2.js} +2 -2
  241. package/dist/components/{p-608eb9da.js.map → p-b6d858b2.js.map} +1 -1
  242. package/dist/components/{p-f5cb0a63.js → p-bb6d1e4e.js} +3 -3
  243. package/dist/components/{p-f5cb0a63.js.map → p-bb6d1e4e.js.map} +1 -1
  244. package/dist/components/{p-35a70c5e.js → p-c07c32d2.js} +3 -3
  245. package/dist/components/{p-35a70c5e.js.map → p-c07c32d2.js.map} +1 -1
  246. package/dist/components/{p-10faa938.js → p-c9006520.js} +5 -5
  247. package/dist/components/{p-10faa938.js.map → p-c9006520.js.map} +1 -1
  248. package/dist/components/{p-0a0f6daf.js → p-e28c4707.js} +3 -3
  249. package/dist/components/{p-0a0f6daf.js.map → p-e28c4707.js.map} +1 -1
  250. package/dist/components/{p-10b37876.js → p-eabbc885.js} +3 -3
  251. package/dist/components/{p-10b37876.js.map → p-eabbc885.js.map} +1 -1
  252. package/dist/esm/{constants-b97e736d.js → constants-4faa1fae.js} +2 -2
  253. package/dist/esm/{constants-b97e736d.js.map → constants-4faa1fae.js.map} +1 -1
  254. package/dist/esm/{index-1fb7a9a6.js → index-a1936cd0.js} +35 -186
  255. package/dist/esm/index-a1936cd0.js.map +1 -0
  256. package/dist/esm/index.js +2 -1
  257. package/dist/esm/index.js.map +1 -1
  258. package/dist/esm/loader.js +3 -3
  259. package/dist/esm/native.js +3 -24
  260. package/dist/esm/native.js.map +1 -1
  261. package/dist/esm/nv-alert.entry.js +2 -2
  262. package/dist/esm/nv-avatar.entry.js +2 -2
  263. package/dist/esm/nv-badge_2.entry.js +1 -1
  264. package/dist/esm/nv-breadcrumb.entry.js +1 -1
  265. package/dist/esm/nv-breadcrumbs.entry.js +1 -1
  266. package/dist/esm/nv-button.entry.js +2 -2
  267. package/dist/esm/nv-calendar.entry.js +385 -173
  268. package/dist/esm/nv-calendar.entry.js.map +1 -1
  269. package/dist/esm/nv-col.entry.js +1 -1
  270. package/dist/esm/nv-datagrid.entry.js +96 -104
  271. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  272. package/dist/esm/nv-datagridcolumn.entry.js +2 -2
  273. package/dist/esm/nv-datagridcolumn.entry.js.map +1 -1
  274. package/dist/esm/nv-dialog.entry.js +2 -2
  275. package/dist/esm/nv-dialogfooter_2.entry.js +2 -2
  276. package/dist/esm/nv-fieldcheckbox.entry.js +1 -1
  277. package/dist/esm/nv-fielddate.entry.js +45 -11
  278. package/dist/esm/nv-fielddate.entry.js.map +1 -1
  279. package/dist/esm/nv-fielddaterange.entry.js +128 -42
  280. package/dist/esm/nv-fielddaterange.entry.js.map +1 -1
  281. package/dist/esm/nv-fielddropdown.entry.js +84 -60
  282. package/dist/esm/nv-fielddropdown.entry.js.map +1 -1
  283. package/dist/esm/nv-fielddropdownitem.entry.js +1 -1
  284. package/dist/esm/nv-fieldmultiselect.entry.js +116 -104
  285. package/dist/esm/nv-fieldmultiselect.entry.js.map +1 -1
  286. package/dist/esm/nv-fieldnumber.entry.js +2 -2
  287. package/dist/esm/nv-fieldnumber.entry.js.map +1 -1
  288. package/dist/esm/nv-fieldpassword.entry.js +2 -2
  289. package/dist/esm/nv-fieldpassword.entry.js.map +1 -1
  290. package/dist/esm/nv-fieldradio.entry.js +1 -1
  291. package/dist/esm/nv-fieldselect.entry.js +2 -2
  292. package/dist/esm/nv-fieldselect.entry.js.map +1 -1
  293. package/dist/esm/nv-fieldslider.entry.js +664 -0
  294. package/dist/esm/nv-fieldslider.entry.js.map +1 -0
  295. package/dist/esm/nv-fieldtext.entry.js +5 -5
  296. package/dist/esm/nv-fieldtext.entry.js.map +1 -1
  297. package/dist/esm/nv-fieldtextarea.entry.js +5 -5
  298. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -1
  299. package/dist/esm/nv-fieldtime.entry.js +12 -12
  300. package/dist/esm/nv-fieldtime.entry.js.map +1 -1
  301. package/dist/esm/nv-icon.entry.js +4 -4
  302. package/dist/esm/nv-icon.entry.js.map +1 -1
  303. package/dist/esm/nv-iconbutton_2.entry.js +3 -3
  304. package/dist/esm/nv-menu.entry.js +2 -2
  305. package/dist/esm/nv-menuitem.entry.js +2 -2
  306. package/dist/esm/nv-popover.entry.js +2 -2
  307. package/dist/esm/nv-row.entry.js +2 -2
  308. package/dist/esm/nv-stack.entry.js +2 -2
  309. package/dist/esm/nv-table.entry.js +3 -3
  310. package/dist/esm/nv-tablecolumn.entry.js +1 -1
  311. package/dist/esm/nv-toggle.entry.js +3 -3
  312. package/dist/esm/nv-tooltip.entry.js +3 -3
  313. package/dist/esm/nv-tooltip.entry.js.map +1 -1
  314. package/dist/native/index.esm.js +1 -1
  315. package/dist/native/index.esm.js.map +1 -1
  316. package/dist/native/native.css +1 -1
  317. package/dist/native/native.esm.js +1 -1
  318. package/dist/native/native.esm.js.map +1 -1
  319. package/dist/native/p-050d6c6c.entry.js +2 -0
  320. package/dist/native/{p-4d164ed6.entry.js.map → p-050d6c6c.entry.js.map} +1 -1
  321. package/dist/native/{p-615947e7.entry.js → p-08ca678c.entry.js} +2 -2
  322. package/dist/native/p-1a5d3b87.entry.js +2 -0
  323. package/dist/native/{p-efe6a46c.entry.js.map → p-1a5d3b87.entry.js.map} +1 -1
  324. package/dist/native/{p-7fd4d13d.entry.js → p-1c1ecd38.entry.js} +2 -2
  325. package/dist/native/{p-c7b201cd.entry.js → p-1d98477d.entry.js} +2 -2
  326. package/dist/native/{p-1da72182.entry.js → p-2006f5d4.entry.js} +2 -2
  327. package/dist/native/p-26cf4938.entry.js +2 -0
  328. package/dist/native/p-26cf4938.entry.js.map +1 -0
  329. package/dist/native/p-3817efb2.entry.js +2 -0
  330. package/dist/native/{p-fc97f071.entry.js.map → p-3817efb2.entry.js.map} +1 -1
  331. package/dist/native/p-45459dbb.entry.js +2 -0
  332. package/dist/native/{p-7042ba8a.entry.js.map → p-45459dbb.entry.js.map} +1 -1
  333. package/dist/native/p-45cbe6e4.entry.js +2 -0
  334. package/dist/native/{p-9135fdf5.entry.js.map → p-45cbe6e4.entry.js.map} +1 -1
  335. package/dist/native/p-46428304.entry.js +2 -0
  336. package/dist/native/p-46428304.entry.js.map +1 -0
  337. package/dist/native/p-4f9cdf0b.entry.js +2 -0
  338. package/dist/native/{p-3b7ef609.entry.js → p-58bb90ad.entry.js} +2 -2
  339. package/dist/native/p-59b07b36.entry.js +2 -0
  340. package/dist/native/p-59b07b36.entry.js.map +1 -0
  341. package/dist/native/{p-3cd77d82.entry.js → p-5b6c59e0.entry.js} +2 -2
  342. package/dist/native/p-6029e51b.entry.js +2 -0
  343. package/dist/native/{p-244f56ac.entry.js.map → p-6029e51b.entry.js.map} +1 -1
  344. package/dist/native/{p-08a75cfa.entry.js → p-60c64f2b.entry.js} +2 -2
  345. package/dist/native/p-64a76565.entry.js +2 -0
  346. package/dist/native/p-64a76565.entry.js.map +1 -0
  347. package/dist/native/{p-c67186f8.entry.js → p-83288db0.entry.js} +2 -2
  348. package/dist/native/p-838f7842.entry.js +2 -0
  349. package/dist/native/p-838f7842.entry.js.map +1 -0
  350. package/dist/native/{p-0245863d.entry.js → p-86ab23ea.entry.js} +2 -2
  351. package/dist/native/p-87784622.entry.js +2 -0
  352. package/dist/native/p-8fb4e5c0.entry.js +2 -0
  353. package/dist/native/{p-b94d9f0b.entry.js.map → p-8fb4e5c0.entry.js.map} +1 -1
  354. package/dist/native/{p-14c07207.entry.js → p-914da1e1.entry.js} +2 -2
  355. package/dist/native/p-abbe5d69.entry.js +2 -0
  356. package/dist/native/p-abbe5d69.entry.js.map +1 -0
  357. package/dist/native/p-abc251aa.entry.js +2 -0
  358. package/dist/native/p-abc251aa.entry.js.map +1 -0
  359. package/dist/native/{p-c0f79bac.entry.js → p-ad128108.entry.js} +2 -2
  360. package/dist/native/{p-e5de64d5.entry.js → p-b5b9190a.entry.js} +2 -2
  361. package/dist/native/{p-470588c2.entry.js → p-b8f2c1e7.entry.js} +3 -3
  362. package/dist/native/p-b8f2c1e7.entry.js.map +1 -0
  363. package/dist/native/{p-b8b6875d.entry.js → p-d040bd61.entry.js} +2 -2
  364. package/dist/native/p-d0a33e64.js +3 -0
  365. package/dist/native/p-d0a33e64.js.map +1 -0
  366. package/dist/native/{p-3953464e.entry.js → p-d21b2da2.entry.js} +3 -3
  367. package/dist/native/{p-90e6d9dd.entry.js → p-d53e8795.entry.js} +2 -2
  368. package/dist/native/p-dc7dd7f3.entry.js +2 -0
  369. package/dist/native/{p-ae7ab110.entry.js.map → p-dc7dd7f3.entry.js.map} +1 -1
  370. package/dist/native/p-e2c1992e.entry.js +2 -0
  371. package/dist/native/{p-656c56f0.entry.js.map → p-e2c1992e.entry.js.map} +1 -1
  372. package/dist/native/{p-f85c08f1.js → p-e2d0a77d.js} +2 -2
  373. package/dist/native/p-ed6019fe.entry.js +2 -0
  374. package/dist/native/p-ed6019fe.entry.js.map +1 -0
  375. package/dist/native/p-f94d7054.entry.js +2 -0
  376. package/dist/native/{p-49cac014.entry.js.map → p-f94d7054.entry.js.map} +1 -1
  377. package/dist/native/p-fdea17ce.entry.js +2 -0
  378. package/dist/native/p-fdea17ce.entry.js.map +1 -0
  379. package/dist/types/components/nv-calendar/nv-calendar.d.ts +26 -50
  380. package/dist/types/components/nv-calendar/partials/calendar-actions.d.ts +19 -0
  381. package/dist/types/components/nv-calendar/partials/calendar-grid.d.ts +46 -0
  382. package/dist/types/components/nv-calendar/partials/calendar-header.d.ts +38 -0
  383. package/dist/types/components/nv-calendar/partials/calendar-shortcuts.d.ts +35 -0
  384. package/dist/types/components/nv-calendar/partials/day-cell.d.ts +35 -0
  385. package/dist/types/components/nv-calendar/partials/index.d.ts +6 -0
  386. package/dist/types/components/nv-calendar/partials/week-numbers.d.ts +30 -0
  387. package/dist/types/components/nv-calendar/test/partials/calendar-actions.logic.test.d.ts +1 -0
  388. package/dist/types/components/nv-calendar/test/partials/calendar-grid.logic.test.d.ts +1 -0
  389. package/dist/types/components/nv-calendar/test/partials/calendar-header.logic.test.d.ts +1 -0
  390. package/dist/types/components/nv-calendar/test/partials/calendar-shortcuts.logic.test.d.ts +1 -0
  391. package/dist/types/components/nv-calendar/test/partials/day-cell.logic.test.d.ts +1 -0
  392. package/dist/types/components/nv-calendar/test/partials/week-numbers.logic.test.d.ts +1 -0
  393. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +0 -16
  394. package/dist/types/components/nv-datagridcolumn/nv-datagridcolumn.d.ts +4 -0
  395. package/dist/types/components/nv-fielddate/nv-fielddate.d.ts +21 -9
  396. package/dist/types/components/nv-fielddate/test/nv-fielddate.logic.test.d.ts +1 -0
  397. package/dist/types/components/nv-fielddaterange/nv-fielddaterange.d.ts +24 -3
  398. package/dist/types/components/nv-fielddaterange/test/nv-fielddaterange.logic.test.d.ts +1 -0
  399. package/dist/types/components/nv-fielddropdown/nv-fielddropdown.d.ts +47 -26
  400. package/dist/types/components/nv-fieldmultiselect/nv-fieldmultiselect.d.ts +61 -55
  401. package/dist/types/components/nv-fieldslider/nv-fieldslider.d.ts +229 -0
  402. package/dist/types/components/nv-fieldslider/nv-fieldslider.docs.d.ts +4 -0
  403. package/dist/types/components/nv-fieldslider/nv-fieldslider.utils.d.ts +46 -0
  404. package/dist/types/components/nv-fieldslider/partials/field-input.d.ts +45 -0
  405. package/dist/types/components/nv-fieldslider/partials/range-thumb.d.ts +37 -0
  406. package/dist/types/components/nv-fieldslider/partials/single-thumb.d.ts +35 -0
  407. package/dist/types/components/nv-fieldslider/partials/tick-marks.d.ts +28 -0
  408. package/dist/types/components/nv-fieldslider/test/nv-fieldslider.utils.test.d.ts +1 -0
  409. package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +1 -0
  410. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  411. package/dist/types/components.d.ts +402 -54
  412. package/dist/types/interfaces/Column.d.ts +5 -1
  413. package/dist/vscode-data.json +121 -9
  414. package/hydrate/index.js +1664 -584
  415. package/hydrate/index.mjs +1664 -584
  416. package/package.json +6 -2
  417. package/dist/cjs/index-9bda5507.js.map +0 -1
  418. package/dist/components/p-1c45c0f2.js.map +0 -1
  419. package/dist/components/p-76646ce9.js +0 -88
  420. package/dist/components/p-76646ce9.js.map +0 -1
  421. package/dist/components/p-854c32dc.js.map +0 -1
  422. package/dist/components/p-9decffb6.js +0 -167
  423. package/dist/components/p-9decffb6.js.map +0 -1
  424. package/dist/components/p-f76bb0c3.js.map +0 -1
  425. package/dist/esm/index-1fb7a9a6.js.map +0 -1
  426. package/dist/native/p-244f56ac.entry.js +0 -2
  427. package/dist/native/p-2523eead.entry.js +0 -2
  428. package/dist/native/p-2523eead.entry.js.map +0 -1
  429. package/dist/native/p-470588c2.entry.js.map +0 -1
  430. package/dist/native/p-49cac014.entry.js +0 -2
  431. package/dist/native/p-4d164ed6.entry.js +0 -2
  432. package/dist/native/p-4dc1d036.entry.js +0 -2
  433. package/dist/native/p-4e635fa7.entry.js +0 -2
  434. package/dist/native/p-4e635fa7.entry.js.map +0 -1
  435. package/dist/native/p-5d21532a.entry.js +0 -2
  436. package/dist/native/p-5d21532a.entry.js.map +0 -1
  437. package/dist/native/p-656c56f0.entry.js +0 -2
  438. package/dist/native/p-7042ba8a.entry.js +0 -2
  439. package/dist/native/p-7e154bfd.entry.js +0 -2
  440. package/dist/native/p-7e154bfd.entry.js.map +0 -1
  441. package/dist/native/p-7eba904e.entry.js +0 -2
  442. package/dist/native/p-7eba904e.entry.js.map +0 -1
  443. package/dist/native/p-9135fdf5.entry.js +0 -2
  444. package/dist/native/p-ab002252.js +0 -3
  445. package/dist/native/p-ab002252.js.map +0 -1
  446. package/dist/native/p-ae7ab110.entry.js +0 -2
  447. package/dist/native/p-b94d9f0b.entry.js +0 -2
  448. package/dist/native/p-c71c6f23.entry.js +0 -2
  449. package/dist/native/p-c71c6f23.entry.js.map +0 -1
  450. package/dist/native/p-d9a52884.entry.js +0 -2
  451. package/dist/native/p-d9a52884.entry.js.map +0 -1
  452. package/dist/native/p-efe6a46c.entry.js +0 -2
  453. package/dist/native/p-f2ef6771.entry.js +0 -2
  454. package/dist/native/p-f5f68992.entry.js +0 -2
  455. package/dist/native/p-f5f68992.entry.js.map +0 -1
  456. package/dist/native/p-fc97f071.entry.js +0 -2
  457. /package/dist/native/{p-615947e7.entry.js.map → p-08ca678c.entry.js.map} +0 -0
  458. /package/dist/native/{p-7fd4d13d.entry.js.map → p-1c1ecd38.entry.js.map} +0 -0
  459. /package/dist/native/{p-c7b201cd.entry.js.map → p-1d98477d.entry.js.map} +0 -0
  460. /package/dist/native/{p-1da72182.entry.js.map → p-2006f5d4.entry.js.map} +0 -0
  461. /package/dist/native/{p-f2ef6771.entry.js.map → p-4f9cdf0b.entry.js.map} +0 -0
  462. /package/dist/native/{p-3b7ef609.entry.js.map → p-58bb90ad.entry.js.map} +0 -0
  463. /package/dist/native/{p-3cd77d82.entry.js.map → p-5b6c59e0.entry.js.map} +0 -0
  464. /package/dist/native/{p-08a75cfa.entry.js.map → p-60c64f2b.entry.js.map} +0 -0
  465. /package/dist/native/{p-c67186f8.entry.js.map → p-83288db0.entry.js.map} +0 -0
  466. /package/dist/native/{p-0245863d.entry.js.map → p-86ab23ea.entry.js.map} +0 -0
  467. /package/dist/native/{p-4dc1d036.entry.js.map → p-87784622.entry.js.map} +0 -0
  468. /package/dist/native/{p-14c07207.entry.js.map → p-914da1e1.entry.js.map} +0 -0
  469. /package/dist/native/{p-c0f79bac.entry.js.map → p-ad128108.entry.js.map} +0 -0
  470. /package/dist/native/{p-e5de64d5.entry.js.map → p-b5b9190a.entry.js.map} +0 -0
  471. /package/dist/native/{p-b8b6875d.entry.js.map → p-d040bd61.entry.js.map} +0 -0
  472. /package/dist/native/{p-3953464e.entry.js.map → p-d21b2da2.entry.js.map} +0 -0
  473. /package/dist/native/{p-90e6d9dd.entry.js.map → p-d53e8795.entry.js.map} +0 -0
  474. /package/dist/native/{p-f85c08f1.js.map → p-e2d0a77d.js.map} +0 -0
@@ -0,0 +1,664 @@
1
+ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-a1936cd0.js';
2
+ import { v as v4 } from './v4-a79185f4.js';
3
+
4
+ /**
5
+ * Utility functions for nv-fieldslider.
6
+ */
7
+ /**
8
+ * Clamp a value between min and max.
9
+ * @param {number} value - The value to clamp
10
+ * @param {number} min - The minimum boundary
11
+ * @param {number} max - The maximum boundary
12
+ * @returns {number} The clamped value
13
+ */
14
+ function clamp(value, min, max) {
15
+ return Math.max(min, Math.min(max, value));
16
+ }
17
+ /**
18
+ * Calculate the percentage position of a value within a range.
19
+ * @param {number} value - The value to convert to percentage
20
+ * @param {number} min - The minimum value of the range
21
+ * @param {number} max - The maximum value of the range
22
+ * @returns {number} The percentage (0-100)
23
+ */
24
+ function valueToPercent(value, min, max) {
25
+ if (max === min)
26
+ return 0;
27
+ return ((value - min) / (max - min)) * 100;
28
+ }
29
+ /**
30
+ * Snap a value to the nearest step.
31
+ * @param {number} value - The value to snap
32
+ * @param {number} min - The minimum boundary
33
+ * @param {number} max - The maximum boundary
34
+ * @param {number} step - The step size
35
+ * @returns {number} The snapped value
36
+ */
37
+ function snapToStep(value, min, max, step) {
38
+ const clamped = clamp(value, min, max);
39
+ const snapped = Math.round((clamped - min) / step) * step + min;
40
+ return clamp(snapped, min, max);
41
+ }
42
+ /**
43
+ * Generate tick values for the slider.
44
+ * @param {number} min - The minimum value
45
+ * @param {number} max - The maximum value
46
+ * @param {number} step - The step size
47
+ * @returns {number[]} Array of tick values
48
+ */
49
+ function generateTicks(min, max, step) {
50
+ const ticks = [];
51
+ for (let v = min; v <= max; v += step) {
52
+ ticks.push(Number(v.toFixed(10))); // avoid floating point issues
53
+ }
54
+ if (ticks[ticks.length - 1] !== max) {
55
+ ticks.push(max);
56
+ }
57
+ return ticks;
58
+ }
59
+ /**
60
+ * Snap a value to the nearest tick mark.
61
+ * @param {number} value - The value to snap
62
+ * @param {object[]} ticks - Array of tick objects
63
+ * @returns {number} The value of the closest tick
64
+ */
65
+ function snapToTicks(value, ticks) {
66
+ if (!ticks || ticks.length === 0)
67
+ return value;
68
+ // Find the closest tick
69
+ let closestTick = ticks[0].value;
70
+ let minDistance = Math.abs(value - closestTick);
71
+ for (const tick of ticks) {
72
+ const distance = Math.abs(value - tick.value);
73
+ if (distance < minDistance) {
74
+ minDistance = distance;
75
+ closestTick = tick.value;
76
+ }
77
+ }
78
+ return closestTick;
79
+ }
80
+
81
+ /**
82
+ * Renders single thumb in standard mode.
83
+ * @param {SingleThumbProps} props - Component properties
84
+ * @returns {JSX.Element} JSX element representing the thumb
85
+ */
86
+ const SingleThumb = props => {
87
+ const { value, min, max, rawPosition, isDragging, snap, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
88
+ // Use raw position for visual display during dragging, but the snapped value otherwise
89
+ let displayPosition = value;
90
+ if (isDragging && !snap) {
91
+ displayPosition = clamp(rawPosition, min, max);
92
+ }
93
+ const percent = valueToPercent(displayPosition, min, max);
94
+ return (h("div", { class: "thumb", style: { left: `${percent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
95
+ h("div", { class: "thumb-tooltip" },
96
+ labelBeforeValue && (h("span", { class: "label-before" }, labelBeforeValue)),
97
+ String(value),
98
+ labelAfterValue && h("span", { class: "label-after" }, labelAfterValue))));
99
+ };
100
+
101
+ /**
102
+ * Renders dual thumbs in range mode.
103
+ * @param {RangeThumbProps} props - Component properties
104
+ * @returns {JSX.Element[]} Array of JSX elements representing the range slider thumbs
105
+ */
106
+ const RangeThumb = props => {
107
+ const { rangeValue, rawRangePosition, activeDragThumb, isDragging, snap, min, max, disabled, readonly, onKeyDown, labelBeforeValue, labelAfterValue, } = props;
108
+ const [leftValue, rightValue] = rangeValue;
109
+ // Use raw positions for visual display during dragging, but the snapped values otherwise
110
+ let displayLeftPosition = leftValue;
111
+ let displayRightPosition = rightValue;
112
+ if (isDragging && !snap) {
113
+ const [rawLeft, rawRight] = rawRangePosition;
114
+ if (activeDragThumb === 'left') {
115
+ displayLeftPosition = clamp(rawLeft, min, Math.min(rightValue, max));
116
+ }
117
+ else if (activeDragThumb === 'right') {
118
+ displayRightPosition = clamp(rawRight, Math.max(leftValue, min), max);
119
+ }
120
+ }
121
+ const leftPercent = valueToPercent(displayLeftPosition, min, max);
122
+ const rightPercent = valueToPercent(displayRightPosition, min, max);
123
+ return [
124
+ h("div", { class: "track-range", style: {
125
+ left: `${leftPercent}%`,
126
+ width: `${rightPercent - leftPercent}%`,
127
+ } }),
128
+ h("div", { class: "thumb thumb-left", style: { left: `${leftPercent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": leftValue, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, "data-thumb": "left", tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
129
+ h("div", { class: "thumb-tooltip" },
130
+ labelBeforeValue && (h("span", { class: "label-before" }, labelBeforeValue)),
131
+ String(leftValue),
132
+ labelAfterValue && h("span", { class: "label-after" }, labelAfterValue))),
133
+ h("div", { class: "thumb thumb-right", style: { left: `${rightPercent}%` }, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": rightValue, "aria-disabled": disabled ? 'true' : undefined, "aria-readonly": readonly ? 'true' : undefined, "data-thumb": "right", tabindex: disabled ? -1 : 0, onKeyDown: onKeyDown },
134
+ h("div", { class: "thumb-tooltip" },
135
+ labelBeforeValue && (h("span", { class: "label-before" }, labelBeforeValue)),
136
+ String(rightValue),
137
+ labelAfterValue && h("span", { class: "label-after" }, labelAfterValue))),
138
+ ];
139
+ };
140
+
141
+ /**
142
+ * Renders tick marks along the slider track.
143
+ * @param {TickMarksProps} props - Component properties
144
+ * @returns {JSX.Element | null} JSX element representing the tick marks or null if no ticks
145
+ */
146
+ const TickMarks = props => {
147
+ const { ticks, min, max } = props;
148
+ if (ticks.length === 0) {
149
+ return null;
150
+ }
151
+ return (h("div", { class: "track-ticks" }, ticks.map(tick => {
152
+ const percent = valueToPercent(tick.value, min, max);
153
+ return (h("div", { class: "track-tick", style: { left: `${percent}%` } }, tick.label && h("div", { class: "tick-label" }, tick.label)));
154
+ })));
155
+ };
156
+
157
+ /**
158
+ * Renders field input for direct value entry
159
+ * @param {FieldInputProps} props - Component properties
160
+ * @returns {JSX.Element} JSX element representing the field input
161
+ */
162
+ const FieldInput = props => {
163
+ const { range, hasField, value, rangeValue, index, inputId, min, max, step, disabled, readonly, onInput, labelBeforeValue, labelAfterValue, name, endName, } = props;
164
+ // Determine the appropriate value based on mode and index
165
+ const fieldValue = range ? rangeValue[index] : value;
166
+ // In range mode, we need data-index for event handling
167
+ const dataAttrs = range ? { 'data-index': index.toString() } : {};
168
+ // Determine the appropriate name based on mode and index
169
+ let inputName;
170
+ if (range) {
171
+ if (index === 0) {
172
+ inputName = name || '';
173
+ }
174
+ else {
175
+ // Use endName if provided, otherwise append "-end" to the name
176
+ inputName = endName || (name ? `${name}-end` : '');
177
+ }
178
+ }
179
+ else {
180
+ inputName = name || '';
181
+ }
182
+ // If hasField is false, only the containers are visible, not the input fields
183
+ const containerClass = hasField
184
+ ? 'input-container'
185
+ : 'input-container hidden-input';
186
+ return hasField ? (h("div", { class: containerClass },
187
+ labelBeforeValue && h("span", { class: "label-before" }, labelBeforeValue),
188
+ h("input", Object.assign({ id: inputId, type: "number", value: fieldValue, min: min, max: max, step: step, disabled: disabled, readonly: readonly, name: inputName }, dataAttrs, { onInput: onInput })),
189
+ labelAfterValue && h("span", { class: "label-after" }, labelAfterValue))) : (h("input", { id: inputId, type: "hidden", value: fieldValue, disabled: disabled, readonly: readonly, name: inputName }));
190
+ };
191
+
192
+ const nvFieldsliderCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider{--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;max-width:480px}nv-fieldslider .slider-container{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--form-gap-x)}nv-fieldslider .slider-container .track-container{position:relative;flex:1;height:calc(var(--slider-handler-size-min) + 0.25rem);padding:calc(var(--slider-handler-size-min) / 2) 0}nv-fieldslider .slider-container .track-container .track{position:relative;height:var(--slider-track-height);background:var(--components-slider-track-background);border-radius:var(--slider-track-radius);cursor:pointer}nv-fieldslider .slider-container .track-container .track .track-range{position:absolute;top:0;height:var(--slider-track-height);background:var(--components-slider-track-filled-default);border-radius:var(--slider-track-radius);pointer-events:none}nv-fieldslider .slider-container .track-container .track .thumb{position:absolute;top:50%;width:var(--slider-handler-size-min);height:var(--slider-handler-size-min);background:#ffffff;border:var(--slider-handler-stroke) solid var(--components-slider-track-filled-default);border-radius:50%;transform:translate(-50%, -50%);z-index:1;cursor:grab;transition:width 0.2s, height 0.2s, box-shadow 0.2s, background-color 0.2s}nv-fieldslider .slider-container .track-container .track .thumb:hover{width:var(--slider-handler-size-max);height:var(--slider-handler-size-max);border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container .track .thumb:focus{width:var(--slider-handler-size-min);height:var(--slider-handler-size-min);border-color:var(--components-slider-track-filled-focus);outline:calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);outline-offset:calc(var(--focus-outline-offset) * 1);transition:outline;background:var(--components-slider-handler-background-focus)}nv-fieldslider .slider-container .track-container .track .thumb:active{cursor:grabbing;background:var(--components-slider-handler-background-hover)}nv-fieldslider .slider-container .track-container .track .thumb .thumb-tooltip{position:absolute;top:25px;left:50%;background-color:var(--components-tooltip-background);color:var(--components-tooltip-text);padding:5px;border-radius:var(--tooltip-radius);font-size:var(--tooltip-font-size);z-index:10;pointer-events:none;user-select:none;opacity:0;transition:opacity 0.3s ease-in-out;transform:translateX(-50%)}nv-fieldslider .slider-container .track-container .track .thumb .thumb-tooltip:after{content:\"\";background:var(--components-tooltip-background);box-shadow:none;border:none;position:absolute;border-bottom-color:transparent;border-right-color:transparent;width:6px;height:6px;transform:rotate(45deg);border-radius:1px;top:-3px;left:50%;margin-left:-3px}nv-fieldslider .slider-container .track-container .track .thumb:hover .thumb-tooltip,nv-fieldslider .slider-container .track-container .track .thumb:active .thumb-tooltip,nv-fieldslider .slider-container .track-container .track .thumb:focus .thumb-tooltip{opacity:1}nv-fieldslider .slider-container .track-container .track-ticks{position:relative;height:1rem;margin-top:0.25rem}nv-fieldslider .slider-container .track-container .track-ticks .track-tick{position:absolute;top:0;width:var(--slider-tick-height);height:var(--slider-tick-height);background:var(--components-form-field-border-default);border-radius:50%;transform:translate(-50%, 0);pointer-events:none}nv-fieldslider .slider-container .track-container .track-ticks .track-tick:first-of-type{transform:translate(0, 0)}nv-fieldslider .slider-container .track-container .track-ticks .track-tick:last-of-type{transform:translate(-100%, 0)}nv-fieldslider .slider-container .track-container .track-ticks .track-tick .tick-label{position:absolute;top:calc(var(--slider-tick-height) + 0.25rem);left:50%;color:var(--components-form-field-border-default);transform:translateX(-50%);white-space:nowrap}.track-tick-first nv-fieldslider .slider-container .track-container .track-ticks .track-tick .tick-label{left:0;transform:translateX(0)}.track-tick-last nv-fieldslider .slider-container .track-container .track-ticks .track-tick .tick-label{left:100%;transform:translateX(-100%)}nv-fieldslider .slider-container .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;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, 1);background:var(--nv-field-background);transition:all 150ms ease-out;width:70px;flex-grow:unset}nv-fieldslider .slider-container .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fieldslider .slider-container .input-container:focus-within,nv-fieldslider .slider-container .input-container:focus-within:hover,nv-fieldslider .slider-container .input-container:focus,nv-fieldslider .slider-container .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fieldslider .slider-container .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fieldslider .slider-container .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fieldslider .slider-container .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;}nv-fieldslider .slider-container .input-container input:focus{outline:none}nv-fieldslider .slider-container .input-container input::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-fieldslider .slider-container .input-container input[type=password]::-ms-clear,nv-fieldslider .slider-container .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fieldslider[fluid]:not([fluid=false]){max-width:unset}nv-fieldslider[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-in-field)}nv-fieldslider[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-fieldslider[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-fieldslider[readonly]:not([readonly=false]) .track,nv-fieldslider[readonly]:not([readonly=false]) .thumb{cursor:default}nv-fieldslider 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-fieldslider nv-icon.validation{color:var(--nv-field-border-default)}nv-fieldslider[hide-label]:not([hide-label=false]) label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}nv-fieldslider[has-field]:not([has-field=false]) .thumb-tooltip{display:none}nv-fieldslider>.description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);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-fieldslider>.error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);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)}nv-fieldslider>.error-description[hidden]{display:none}";
193
+ const NvFieldsliderStyle0 = nvFieldsliderCss;
194
+
195
+ const NvFieldslider = class {
196
+ constructor(hostRef) {
197
+ registerInstance(this, hostRef);
198
+ this.valueChanged = createEvent(this, "valueChanged", 7);
199
+ /****************************************************************************/
200
+ //#region PROPERTIES
201
+ /**
202
+ * Sets the ID for the start input element and the for attribute of the associated
203
+ * label. If no ID is provided, a random one will be automatically generated.
204
+ */
205
+ this.startInputId = v4();
206
+ /**
207
+ * Sets the ID for the end input element and the for attribute of the associated
208
+ * label. If no ID is provided, a random one will be automatically generated.
209
+ */
210
+ this.endInputId = v4();
211
+ /**
212
+ * Keeps the interface clean by removing visible labels, but still announces
213
+ * the label to screen readers so users relying on assistive tech aren't left
214
+ * guessing.
215
+ */
216
+ this.hideLabel = false;
217
+ /**
218
+ * Enables an optional numeric input field alongside the slider, allowing
219
+ * users to type a value directly instead of—or in addition to—using the
220
+ * slider handle.
221
+ */
222
+ this.hasField = false;
223
+ /**
224
+ * Allows the slider to display two thumbs, enabling users to select a
225
+ * continuous range between a minimum and maximum value. Ideal for use cases
226
+ * like filtering by price or time.
227
+ */
228
+ this.range = false;
229
+ /**
230
+ * Disables user interaction with the slider and its associated input fields.
231
+ */
232
+ this.disabled = false;
233
+ /**
234
+ * Makes the slider and input non-editable while keeping them focusable and
235
+ * included in form submissions.
236
+ */
237
+ this.readonly = false;
238
+ /**
239
+ * Alters the slider's appearance to indicate an error, helping users
240
+ * identify fields that need correction.
241
+ * @validator error
242
+ */
243
+ this.error = false;
244
+ /**
245
+ * Changes the slider's appearance to indicate successful input or validation.
246
+ */
247
+ this.success = false;
248
+ /**
249
+ * Numeric value of the slider as an array of numbers. When in single mode,
250
+ * the value should be a an array of one number. When in range mode, the value
251
+ * should be an array of two numbers.
252
+ */
253
+ this.value = [0, 0];
254
+ /**
255
+ * Defines the interval between selectable values on the slider. Controls how
256
+ * much the value increases or decreases with each keyboard interaction, drag
257
+ * movement, or direct input.
258
+ */
259
+ this.step = 1;
260
+ /**
261
+ * Controls whether the slider handle should visually snap to step values
262
+ * during dragging. When false, the handle can be positioned at any point
263
+ * along the track while dragging, but the actual value will still snap to the
264
+ * nearest step value. When true, the handle will visually snap to the nearest
265
+ * step value during dragging.
266
+ */
267
+ this.snap = false;
268
+ /**
269
+ * When true and custom ticks are provided, the slider will snap to the nearest
270
+ * tick value during dragging, instead of using the step value. This is useful
271
+ * when you have custom ticks at specific values that don't align with regular step intervals.
272
+ */
273
+ this.snapTicks = false;
274
+ /**
275
+ * Defines the minimum allowed value for the slider. The thumb cannot move
276
+ * below this value, and manual input is also constrained accordingly.
277
+ */
278
+ this.min = 0;
279
+ /**
280
+ * Defines the maximum allowed value for the slider. The thumb cannot move
281
+ * above this value, and manual input is also constrained accordingly.
282
+ */
283
+ this.max = 100;
284
+ /**
285
+ * Controls the visibility of tick marks on the slider. When enabled, all
286
+ * visual ticks that indicate step points along the track are shown. If custom
287
+ * ticks are provided, they are always shown regardless of this setting.
288
+ */
289
+ this.showTicks = false;
290
+ /**
291
+ * Allows the field to stretch and fill the entire width of its container.
292
+ */
293
+ this.fluid = false;
294
+ //#endregion PROPERTIES
295
+ /****************************************************************************/
296
+ //#region STATE
297
+ this.isDragging = false;
298
+ this.activeDragThumb = 'single';
299
+ this.internalTicks = [];
300
+ // These track the raw slider positions for visual display
301
+ this.rawPosition = 0;
302
+ this.rawRangePosition = [0, 0];
303
+ this.valueInternal = 0;
304
+ this.rangeValueInternal = [0, 0];
305
+ /**
306
+ * Parses the value string into a number or array of numbers for internal use.
307
+ */
308
+ this.parseValue = () => {
309
+ if (typeof this.value === 'string') {
310
+ console.error('Sliders require a number or array of numbers to be passed in the value prop.');
311
+ return;
312
+ }
313
+ if (this.range && this.value.length !== 2) {
314
+ console.error('Range sliders require an array of two values to be passed in the value prop.');
315
+ return;
316
+ }
317
+ if (!this.range && this.value.length !== 1) {
318
+ console.error('Single sliders require a single value as an array to be passed in the value prop.');
319
+ return;
320
+ }
321
+ this.valueInternal = this.value[0];
322
+ this.rangeValueInternal = [this.value[0], this.value[1]];
323
+ };
324
+ /**
325
+ * Handles pointer events on the track.
326
+ * @param {PointerEvent} event - The pointer event
327
+ */
328
+ this.onTrackInteraction = (event) => {
329
+ if (this.disabled || this.readonly) {
330
+ return;
331
+ }
332
+ const trackRect = event.currentTarget.getBoundingClientRect();
333
+ const percentage = clamp(((event.clientX - trackRect.left) / trackRect.width) * 100, 0, 100);
334
+ const newValue = this.min + (percentage / 100) * (this.max - this.min);
335
+ // Store raw position for visual display
336
+ this.rawPosition = newValue;
337
+ if (this.range) {
338
+ // In range mode, determine which thumb to move based on proximity
339
+ const leftPct = valueToPercent(this.rangeValueInternal[0], this.min, this.max);
340
+ const rightPct = valueToPercent(this.rangeValueInternal[1], this.min, this.max);
341
+ const distanceToLeft = Math.abs(percentage - leftPct);
342
+ const distanceToRight = Math.abs(percentage - rightPct);
343
+ if (distanceToLeft <= distanceToRight) {
344
+ this.activeDragThumb = 'left';
345
+ this.rawRangePosition = [newValue, this.rawRangePosition[1]];
346
+ this.handleValueChange([newValue, this.rangeValueInternal[1]]);
347
+ }
348
+ else {
349
+ this.activeDragThumb = 'right';
350
+ this.rawRangePosition = [this.rawRangePosition[0], newValue];
351
+ this.handleValueChange([this.rangeValueInternal[0], newValue]);
352
+ }
353
+ }
354
+ else {
355
+ this.activeDragThumb = 'single';
356
+ this.rawPosition = newValue;
357
+ this.handleValueChange(newValue);
358
+ }
359
+ this.isDragging = true;
360
+ this.registerGlobalEvents();
361
+ };
362
+ /**
363
+ * Handles pointer move events during drag.
364
+ * @param {PointerEvent} event - The pointer event
365
+ */
366
+ this.onPointerMove = (event) => {
367
+ if (!this.isDragging || this.disabled || this.readonly) {
368
+ return;
369
+ }
370
+ const trackElement = this.el.querySelector('.track');
371
+ if (!trackElement)
372
+ return;
373
+ const trackRect = trackElement.getBoundingClientRect();
374
+ const percentage = clamp(((event.clientX - trackRect.left) / trackRect.width) * 100, 0, 100);
375
+ const newValue = this.min + (percentage / 100) * (this.max - this.min);
376
+ // Update visual position
377
+ if (this.range) {
378
+ if (this.activeDragThumb === 'left') {
379
+ this.rawRangePosition = [newValue, this.rawRangePosition[1]];
380
+ this.handleValueChange([newValue, this.rangeValueInternal[1]]);
381
+ }
382
+ else {
383
+ this.rawRangePosition = [this.rawRangePosition[0], newValue];
384
+ this.handleValueChange([this.rangeValueInternal[0], newValue]);
385
+ }
386
+ }
387
+ else {
388
+ this.rawPosition = newValue;
389
+ this.handleValueChange(newValue);
390
+ }
391
+ };
392
+ /**
393
+ * Handles the end of a drag operation.
394
+ */
395
+ this.onPointerUp = () => {
396
+ this.isDragging = false;
397
+ this.removeGlobalEvents();
398
+ };
399
+ /**
400
+ * Handles keydown events for keyboard accessibility.
401
+ * @param {KeyboardEvent} event - The keyboard event
402
+ */
403
+ this.onKeyDown = (event) => {
404
+ if (this.disabled || this.readonly) {
405
+ return;
406
+ }
407
+ let newValue;
408
+ const stepMultiplier = event.shiftKey ? 10 : 1;
409
+ const singleStep = this.step * stepMultiplier;
410
+ if (this.range) {
411
+ const focusedThumb = event.target.getAttribute('data-thumb');
412
+ const idx = focusedThumb === 'left' ? 0 : 1;
413
+ const currentValue = [...this.rangeValueInternal];
414
+ switch (event.key) {
415
+ case 'ArrowRight':
416
+ case 'ArrowUp':
417
+ currentValue[idx] += singleStep;
418
+ break;
419
+ case 'ArrowLeft':
420
+ case 'ArrowDown':
421
+ currentValue[idx] -= singleStep;
422
+ break;
423
+ case 'Home':
424
+ currentValue[idx] = this.min;
425
+ break;
426
+ case 'End':
427
+ currentValue[idx] = this.max;
428
+ break;
429
+ case 'PageUp':
430
+ currentValue[idx] += singleStep * 10;
431
+ break;
432
+ case 'PageDown':
433
+ currentValue[idx] -= singleStep * 10;
434
+ break;
435
+ default:
436
+ return;
437
+ }
438
+ newValue = currentValue;
439
+ }
440
+ else {
441
+ switch (event.key) {
442
+ case 'ArrowRight':
443
+ case 'ArrowUp':
444
+ newValue = this.valueInternal + singleStep;
445
+ break;
446
+ case 'ArrowLeft':
447
+ case 'ArrowDown':
448
+ newValue = this.valueInternal - singleStep;
449
+ break;
450
+ case 'Home':
451
+ newValue = this.min;
452
+ break;
453
+ case 'End':
454
+ newValue = this.max;
455
+ break;
456
+ case 'PageUp':
457
+ newValue = this.valueInternal + singleStep * 10;
458
+ break;
459
+ case 'PageDown':
460
+ newValue = this.valueInternal - singleStep * 10;
461
+ break;
462
+ default:
463
+ return;
464
+ }
465
+ }
466
+ event.preventDefault();
467
+ this.handleValueChange(newValue);
468
+ };
469
+ /**
470
+ * Handles field input value changes.
471
+ * @param {Event} event - The input event
472
+ */
473
+ this.handleFieldChange = (event) => {
474
+ const input = event.target;
475
+ const newValue = parseFloat(input.value);
476
+ if (isNaN(newValue)) {
477
+ return;
478
+ }
479
+ if (this.range) {
480
+ const fieldIndex = input.getAttribute('data-index') === '0' ? 0 : 1;
481
+ const updatedRange = [...this.rangeValueInternal];
482
+ updatedRange[fieldIndex] = newValue;
483
+ this.handleValueChange(updatedRange);
484
+ }
485
+ else {
486
+ this.handleValueChange(newValue);
487
+ }
488
+ };
489
+ }
490
+ //#endregion STATE
491
+ /****************************************************************************/
492
+ //#region METHODS
493
+ /**
494
+ * Ensures value is valid and within bounds.
495
+ * @param {number} val - The value to validate
496
+ * @returns {number} The validated and snapped value
497
+ */
498
+ validateValue(val) {
499
+ // First ensure the value is within bounds
500
+ const clampedValue = clamp(val, this.min, this.max);
501
+ // If snapTicks is true and we have custom ticks, snap to the nearest tick
502
+ if (this.snapTicks && this.internalTicks && this.internalTicks.length > 0) {
503
+ return snapToTicks(clampedValue, this.internalTicks);
504
+ }
505
+ // Otherwise snap to step values
506
+ return snapToStep(clampedValue, this.min, this.max, this.step);
507
+ }
508
+ /**
509
+ * Handles value changes from slider interaction.
510
+ * @param {number | number[]} newValue - The new value or range values
511
+ */
512
+ handleValueChange(newValue) {
513
+ if (this.disabled || this.readonly) {
514
+ return;
515
+ }
516
+ if (this.range) {
517
+ // Handle range values
518
+ if (Array.isArray(newValue) && newValue.length === 2) {
519
+ // Ensure values are in order (left ≤ right)
520
+ const orderedValues = [
521
+ Math.min(newValue[0], newValue[1]),
522
+ Math.max(newValue[0], newValue[1]),
523
+ ];
524
+ // Snap to steps and clamp
525
+ const validatedValues = [
526
+ this.validateValue(orderedValues[0]),
527
+ this.validateValue(orderedValues[1]),
528
+ ];
529
+ if (validatedValues[0] !== this.rangeValueInternal[0] ||
530
+ validatedValues[1] !== this.rangeValueInternal[1]) {
531
+ this.rangeValueInternal = validatedValues;
532
+ this.value = this.rangeValueInternal;
533
+ this.valueChanged.emit(this.rangeValueInternal);
534
+ }
535
+ }
536
+ }
537
+ else {
538
+ // Handle single value
539
+ if (typeof newValue === 'number') {
540
+ const validatedValue = this.validateValue(newValue);
541
+ if (validatedValue !== this.valueInternal) {
542
+ this.valueInternal = validatedValue;
543
+ this.value = [this.valueInternal];
544
+ this.valueChanged.emit([this.valueInternal]);
545
+ }
546
+ }
547
+ }
548
+ }
549
+ /**
550
+ * Generates the ticks to display based on props and state.
551
+ */
552
+ generateDisplayTicks() {
553
+ // If custom ticks are provided, always use them regardless of showTicks setting
554
+ if (this.ticks && this.ticks.length > 0) {
555
+ this.internalTicks = [...this.ticks].sort((a, b) => a.value - b.value);
556
+ return;
557
+ }
558
+ // If showTicks is false and there are no custom ticks, hide all ticks
559
+ if (!this.showTicks) {
560
+ this.internalTicks = [];
561
+ return;
562
+ }
563
+ // Generate all ticks at each step point
564
+ const autoTicks = generateTicks(this.min, this.max, this.step);
565
+ this.internalTicks = autoTicks.map(value => ({ value }));
566
+ }
567
+ /**
568
+ * Registers global events for tracking pointer movement.
569
+ */
570
+ registerGlobalEvents() {
571
+ document.addEventListener('pointermove', this.onPointerMove);
572
+ document.addEventListener('pointerup', this.onPointerUp);
573
+ document.addEventListener('pointercancel', this.onPointerUp);
574
+ }
575
+ /**
576
+ * Removes global events when tracking ends.
577
+ */
578
+ removeGlobalEvents() {
579
+ document.removeEventListener('pointermove', this.onPointerMove);
580
+ document.removeEventListener('pointerup', this.onPointerUp);
581
+ document.removeEventListener('pointercancel', this.onPointerUp);
582
+ }
583
+ //#endregion METHODS
584
+ /****************************************************************************/
585
+ //#region WATCHERS
586
+ onValueChange() {
587
+ this.parseValue();
588
+ }
589
+ onConfigChange() {
590
+ this.generateDisplayTicks();
591
+ if (this.range) {
592
+ this.handleValueChange(this.rangeValueInternal);
593
+ }
594
+ else {
595
+ this.handleValueChange(this.valueInternal);
596
+ }
597
+ }
598
+ onRangeChange(newValue) {
599
+ if (newValue) {
600
+ // Switching to range mode
601
+ this.rangeValueInternal = [this.min, this.valueInternal];
602
+ }
603
+ else {
604
+ // Switching to single mode, take the higher value
605
+ this.valueInternal = this.rangeValueInternal[1];
606
+ }
607
+ }
608
+ //#endregion WATCHERS
609
+ /****************************************************************************/
610
+ //#region LIFECYCLE
611
+ connectedCallback() {
612
+ this.parseValue();
613
+ this.generateDisplayTicks();
614
+ // Initialize values and make sure they're valid
615
+ if (this.range) {
616
+ if (!Array.isArray(this.rangeValueInternal) ||
617
+ this.rangeValueInternal.length !== 2) {
618
+ this.rangeValueInternal = [this.min, this.max];
619
+ }
620
+ this.handleValueChange(this.rangeValueInternal);
621
+ // Initialize raw range position to match actual values
622
+ this.rawRangePosition = [
623
+ this.rangeValueInternal[0],
624
+ this.rangeValueInternal[1],
625
+ ];
626
+ }
627
+ else {
628
+ this.handleValueChange(this.valueInternal);
629
+ // Initialize raw position to match actual value
630
+ this.rawPosition = this.valueInternal;
631
+ }
632
+ }
633
+ disconnectedCallback() {
634
+ this.removeGlobalEvents();
635
+ }
636
+ //#endregion EVENTS
637
+ /****************************************************************************/
638
+ //#region RENDER
639
+ render() {
640
+ return (h(Host, { key: '5625de672648fc737a3c463241621c96e3f5678c' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'c9bb829857daf1f38a07ba8d851a126b8e1014d0', htmlFor: this.startInputId }, h("slot", { key: '86daceb63a9467395bd576ee8e2a1fd335dab8a9', name: "label" }, this.label))), h("div", { key: 'a2f9fcfd6f201926d59b1542cfb6aecb9995bfe6', 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: 'c217e21c05160391608196c689a506332cdd2c6a', class: "track-container" }, h("div", { key: 'eff5a66ed65ca210e66138dfcf345843e4947fe9', 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: 'a1168d80e444702014631c51770f81bc66c42c7e', 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 ||
641
+ this.description ||
642
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'f92bc3bba0d12897563532d18873ed00cd01107c', class: "description" }, this.success && (h("nv-icon", { key: 'bbe9253cf1a560d1e5e398cece3bdc1dc65c5edc', name: "circle-check", class: "validation", size: "md" })), h("slot", { key: '52396d459eca326fd6e0e1587e79c5b1ab0f8e74', name: "description" }, this.description))), (this.error ||
643
+ this.errorDescription ||
644
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: '2da1fec9cf6c1c5a2f5c0aa16c18d4b45f0758d9', class: "error-description", hidden: !this.error }, this.error && (h("nv-icon", { key: '9b97a3cc6d56971b6dda8263316f83ea4e35d257', name: "alert-circle", class: "validation", size: "md" })), h("slot", { key: 'f2a96d286c53529ebee99606bee0c43f9ff21b74', name: "error-description" }, this.errorDescription)))));
645
+ }
646
+ static get formAssociated() { return true; }
647
+ get el() { return getElement(this); }
648
+ static get watchers() { return {
649
+ "value": ["onValueChange"],
650
+ "min": ["onConfigChange"],
651
+ "max": ["onConfigChange"],
652
+ "step": ["onConfigChange"],
653
+ "ticks": ["onConfigChange"],
654
+ "showTicks": ["onConfigChange"],
655
+ "snap": ["onConfigChange"],
656
+ "snapTicks": ["onConfigChange"],
657
+ "range": ["onRangeChange"]
658
+ }; }
659
+ };
660
+ NvFieldslider.style = NvFieldsliderStyle0;
661
+
662
+ export { NvFieldslider as nv_fieldslider };
663
+
664
+ //# sourceMappingURL=nv-fieldslider.entry.js.map