@tectra-ng/ui 0.0.0-stage → 0.1.1

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 (317) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -2
  3. package/amount/README.md +28 -0
  4. package/autocomplete/README.md +82 -0
  5. package/avatar/README.md +43 -0
  6. package/badge/README.md +19 -0
  7. package/button/README.md +46 -0
  8. package/button-group/README.md +8 -0
  9. package/card/README.md +30 -0
  10. package/cascade-select/README.md +49 -0
  11. package/checkbox/README.md +64 -0
  12. package/chip/README.md +38 -0
  13. package/chips-input/README.md +47 -0
  14. package/color-picker/README.md +43 -0
  15. package/confirm/README.md +46 -0
  16. package/country/README.md +23 -0
  17. package/country-select/README.md +39 -0
  18. package/dialog/README.md +84 -0
  19. package/divider/README.md +24 -0
  20. package/drawer/README.md +54 -0
  21. package/email-suggestion/README.md +20 -0
  22. package/fesm2022/tectra-ng-ui-amount.mjs +415 -0
  23. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-ui-autocomplete.mjs +730 -0
  25. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-ui-avatar.mjs +670 -0
  27. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-badge.mjs +191 -0
  29. package/fesm2022/tectra-ng-ui-badge.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-button-group.mjs +50 -0
  31. package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-button.mjs +725 -0
  33. package/fesm2022/tectra-ng-ui-button.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-ui-card.mjs +210 -0
  35. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-ui-cascade-select.mjs +887 -0
  37. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-ui-checkbox.mjs +1150 -0
  39. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -0
  40. package/fesm2022/tectra-ng-ui-chip.mjs +344 -0
  41. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -0
  42. package/fesm2022/tectra-ng-ui-chips-input.mjs +649 -0
  43. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -0
  44. package/fesm2022/tectra-ng-ui-color-picker.mjs +828 -0
  45. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-ui-confirm.mjs +489 -0
  47. package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-ui-country-select.mjs +545 -0
  49. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -0
  50. package/fesm2022/tectra-ng-ui-country.mjs +313 -0
  51. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -0
  52. package/fesm2022/tectra-ng-ui-dialog.mjs +1539 -0
  53. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -0
  54. package/fesm2022/tectra-ng-ui-divider.mjs +194 -0
  55. package/fesm2022/tectra-ng-ui-divider.mjs.map +1 -0
  56. package/fesm2022/tectra-ng-ui-drawer.mjs +540 -0
  57. package/fesm2022/tectra-ng-ui-drawer.mjs.map +1 -0
  58. package/fesm2022/tectra-ng-ui-email-suggestion.mjs +341 -0
  59. package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-field.mjs +492 -0
  61. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-fieldset.mjs +258 -0
  63. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -0
  64. package/fesm2022/tectra-ng-ui-highlight-text.mjs +246 -0
  65. package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -0
  66. package/fesm2022/tectra-ng-ui-icon-field.mjs +478 -0
  67. package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-input-group.mjs +113 -0
  69. package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -0
  70. package/fesm2022/tectra-ng-ui-input-mask.mjs +413 -0
  71. package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -0
  72. package/fesm2022/tectra-ng-ui-input-number.mjs +1045 -0
  73. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-input-otp.mjs +553 -0
  75. package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -0
  76. package/fesm2022/tectra-ng-ui-input.mjs +260 -0
  77. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -0
  78. package/fesm2022/tectra-ng-ui-key-filter.mjs +185 -0
  79. package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -0
  80. package/fesm2022/tectra-ng-ui-knob.mjs +630 -0
  81. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -0
  82. package/fesm2022/tectra-ng-ui-label.mjs +271 -0
  83. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -0
  84. package/fesm2022/tectra-ng-ui-link.mjs +699 -0
  85. package/fesm2022/tectra-ng-ui-link.mjs.map +1 -0
  86. package/fesm2022/tectra-ng-ui-listbox.mjs +484 -0
  87. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -0
  88. package/fesm2022/tectra-ng-ui-mention-textarea.mjs +717 -0
  89. package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -0
  90. package/fesm2022/tectra-ng-ui-menu.mjs +1484 -0
  91. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -0
  92. package/fesm2022/tectra-ng-ui-message.mjs +975 -0
  93. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -0
  94. package/fesm2022/tectra-ng-ui-multiselect.mjs +569 -0
  95. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -0
  96. package/fesm2022/tectra-ng-ui-overlay-badge.mjs +345 -0
  97. package/fesm2022/tectra-ng-ui-overlay-badge.mjs.map +1 -0
  98. package/fesm2022/tectra-ng-ui-paginator.mjs +849 -0
  99. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -0
  100. package/fesm2022/tectra-ng-ui-panel.mjs +317 -0
  101. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -0
  102. package/fesm2022/tectra-ng-ui-password-generator.mjs +292 -0
  103. package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -0
  104. package/fesm2022/tectra-ng-ui-password.mjs +871 -0
  105. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -0
  106. package/fesm2022/tectra-ng-ui-pill.mjs +361 -0
  107. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -0
  108. package/fesm2022/tectra-ng-ui-popover.mjs +742 -0
  109. package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -0
  110. package/fesm2022/tectra-ng-ui-progress-bar.mjs +440 -0
  111. package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -0
  112. package/fesm2022/tectra-ng-ui-progress-spinner.mjs +265 -0
  113. package/fesm2022/tectra-ng-ui-progress-spinner.mjs.map +1 -0
  114. package/fesm2022/tectra-ng-ui-radio-button.mjs +817 -0
  115. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -0
  116. package/fesm2022/tectra-ng-ui-rating.mjs +584 -0
  117. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -0
  118. package/fesm2022/tectra-ng-ui-select.mjs +2478 -0
  119. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -0
  120. package/fesm2022/tectra-ng-ui-skeleton.mjs +548 -0
  121. package/fesm2022/tectra-ng-ui-skeleton.mjs.map +1 -0
  122. package/fesm2022/tectra-ng-ui-slider.mjs +630 -0
  123. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -0
  124. package/fesm2022/tectra-ng-ui-speed-dial.mjs +669 -0
  125. package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -0
  126. package/fesm2022/tectra-ng-ui-split-button.mjs +614 -0
  127. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -0
  128. package/fesm2022/tectra-ng-ui-status-icon.mjs +295 -0
  129. package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -0
  130. package/fesm2022/tectra-ng-ui-table.mjs +5997 -0
  131. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -0
  132. package/fesm2022/tectra-ng-ui-tag.mjs +422 -0
  133. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -0
  134. package/fesm2022/tectra-ng-ui-textarea.mjs +482 -0
  135. package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -0
  136. package/fesm2022/tectra-ng-ui-toast.mjs +668 -0
  137. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -0
  138. package/fesm2022/tectra-ng-ui-toggle-button.mjs +416 -0
  139. package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -0
  140. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +560 -0
  141. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -0
  142. package/fesm2022/tectra-ng-ui-tooltip.mjs +835 -0
  143. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -0
  144. package/fesm2022/tectra-ng-ui-tree-select.mjs +986 -0
  145. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -0
  146. package/fesm2022/tectra-ng-ui.mjs +4 -0
  147. package/fesm2022/tectra-ng-ui.mjs.map +1 -0
  148. package/field/README.md +43 -0
  149. package/fieldset/README.md +36 -0
  150. package/highlight-text/README.md +20 -0
  151. package/icon-field/README.md +30 -0
  152. package/input/README.md +22 -0
  153. package/input-group/README.md +21 -0
  154. package/input-mask/README.md +30 -0
  155. package/input-number/README.md +61 -0
  156. package/input-otp/README.md +44 -0
  157. package/key-filter/README.md +31 -0
  158. package/knob/README.md +50 -0
  159. package/label/README.md +29 -0
  160. package/link/README.md +47 -0
  161. package/listbox/README.md +68 -0
  162. package/mention-textarea/README.md +47 -0
  163. package/menu/README.md +65 -0
  164. package/message/README.md +58 -0
  165. package/multiselect/README.md +85 -0
  166. package/overlay-badge/README.md +30 -0
  167. package/package.json +301 -3
  168. package/paginator/README.md +60 -0
  169. package/panel/README.md +45 -0
  170. package/password/README.md +60 -0
  171. package/password-generator/README.md +34 -0
  172. package/pill/README.md +42 -0
  173. package/popover/README.md +67 -0
  174. package/progress-bar/README.md +32 -0
  175. package/progress-spinner/README.md +22 -0
  176. package/radio-button/README.md +54 -0
  177. package/rating/README.md +49 -0
  178. package/select/README.md +78 -0
  179. package/skeleton/README.md +27 -0
  180. package/slider/README.md +48 -0
  181. package/speed-dial/README.md +49 -0
  182. package/split-button/README.md +45 -0
  183. package/status-icon/README.md +22 -0
  184. package/table/README.md +178 -0
  185. package/tag/README.md +42 -0
  186. package/textarea/README.md +37 -0
  187. package/toast/README.md +52 -0
  188. package/toggle-button/README.md +34 -0
  189. package/toggle-switch/README.md +49 -0
  190. package/tooltip/README.md +60 -0
  191. package/tree-select/README.md +49 -0
  192. package/types/tectra-ng-ui-amount.d.ts +135 -0
  193. package/types/tectra-ng-ui-amount.d.ts.map +1 -0
  194. package/types/tectra-ng-ui-autocomplete.d.ts +250 -0
  195. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -0
  196. package/types/tectra-ng-ui-avatar.d.ts +289 -0
  197. package/types/tectra-ng-ui-avatar.d.ts.map +1 -0
  198. package/types/tectra-ng-ui-badge.d.ts +119 -0
  199. package/types/tectra-ng-ui-badge.d.ts.map +1 -0
  200. package/types/tectra-ng-ui-button-group.d.ts +6 -0
  201. package/types/tectra-ng-ui-button-group.d.ts.map +1 -0
  202. package/types/tectra-ng-ui-button.d.ts +466 -0
  203. package/types/tectra-ng-ui-button.d.ts.map +1 -0
  204. package/types/tectra-ng-ui-card.d.ts +71 -0
  205. package/types/tectra-ng-ui-card.d.ts.map +1 -0
  206. package/types/tectra-ng-ui-cascade-select.d.ts +244 -0
  207. package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -0
  208. package/types/tectra-ng-ui-checkbox.d.ts +450 -0
  209. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -0
  210. package/types/tectra-ng-ui-chip.d.ts +106 -0
  211. package/types/tectra-ng-ui-chip.d.ts.map +1 -0
  212. package/types/tectra-ng-ui-chips-input.d.ts +187 -0
  213. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -0
  214. package/types/tectra-ng-ui-color-picker.d.ts +237 -0
  215. package/types/tectra-ng-ui-color-picker.d.ts.map +1 -0
  216. package/types/tectra-ng-ui-confirm.d.ts +80 -0
  217. package/types/tectra-ng-ui-confirm.d.ts.map +1 -0
  218. package/types/tectra-ng-ui-country-select.d.ts +235 -0
  219. package/types/tectra-ng-ui-country-select.d.ts.map +1 -0
  220. package/types/tectra-ng-ui-country.d.ts +105 -0
  221. package/types/tectra-ng-ui-country.d.ts.map +1 -0
  222. package/types/tectra-ng-ui-dialog.d.ts +453 -0
  223. package/types/tectra-ng-ui-dialog.d.ts.map +1 -0
  224. package/types/tectra-ng-ui-divider.d.ts +70 -0
  225. package/types/tectra-ng-ui-divider.d.ts.map +1 -0
  226. package/types/tectra-ng-ui-drawer.d.ts +188 -0
  227. package/types/tectra-ng-ui-drawer.d.ts.map +1 -0
  228. package/types/tectra-ng-ui-email-suggestion.d.ts +84 -0
  229. package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -0
  230. package/types/tectra-ng-ui-field.d.ts +139 -0
  231. package/types/tectra-ng-ui-field.d.ts.map +1 -0
  232. package/types/tectra-ng-ui-fieldset.d.ts +74 -0
  233. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -0
  234. package/types/tectra-ng-ui-highlight-text.d.ts +75 -0
  235. package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -0
  236. package/types/tectra-ng-ui-icon-field.d.ts +77 -0
  237. package/types/tectra-ng-ui-icon-field.d.ts.map +1 -0
  238. package/types/tectra-ng-ui-input-group.d.ts +18 -0
  239. package/types/tectra-ng-ui-input-group.d.ts.map +1 -0
  240. package/types/tectra-ng-ui-input-mask.d.ts +91 -0
  241. package/types/tectra-ng-ui-input-mask.d.ts.map +1 -0
  242. package/types/tectra-ng-ui-input-number.d.ts +326 -0
  243. package/types/tectra-ng-ui-input-number.d.ts.map +1 -0
  244. package/types/tectra-ng-ui-input-otp.d.ts +173 -0
  245. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -0
  246. package/types/tectra-ng-ui-input.d.ts +113 -0
  247. package/types/tectra-ng-ui-input.d.ts.map +1 -0
  248. package/types/tectra-ng-ui-key-filter.d.ts +43 -0
  249. package/types/tectra-ng-ui-key-filter.d.ts.map +1 -0
  250. package/types/tectra-ng-ui-knob.d.ts +207 -0
  251. package/types/tectra-ng-ui-knob.d.ts.map +1 -0
  252. package/types/tectra-ng-ui-label.d.ts +53 -0
  253. package/types/tectra-ng-ui-label.d.ts.map +1 -0
  254. package/types/tectra-ng-ui-link.d.ts +223 -0
  255. package/types/tectra-ng-ui-link.d.ts.map +1 -0
  256. package/types/tectra-ng-ui-listbox.d.ts +131 -0
  257. package/types/tectra-ng-ui-listbox.d.ts.map +1 -0
  258. package/types/tectra-ng-ui-mention-textarea.d.ts +169 -0
  259. package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -0
  260. package/types/tectra-ng-ui-menu.d.ts +512 -0
  261. package/types/tectra-ng-ui-menu.d.ts.map +1 -0
  262. package/types/tectra-ng-ui-message.d.ts +390 -0
  263. package/types/tectra-ng-ui-message.d.ts.map +1 -0
  264. package/types/tectra-ng-ui-multiselect.d.ts +216 -0
  265. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -0
  266. package/types/tectra-ng-ui-overlay-badge.d.ts +104 -0
  267. package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -0
  268. package/types/tectra-ng-ui-paginator.d.ts +293 -0
  269. package/types/tectra-ng-ui-paginator.d.ts.map +1 -0
  270. package/types/tectra-ng-ui-panel.d.ts +133 -0
  271. package/types/tectra-ng-ui-panel.d.ts.map +1 -0
  272. package/types/tectra-ng-ui-password-generator.d.ts +80 -0
  273. package/types/tectra-ng-ui-password-generator.d.ts.map +1 -0
  274. package/types/tectra-ng-ui-password.d.ts +271 -0
  275. package/types/tectra-ng-ui-password.d.ts.map +1 -0
  276. package/types/tectra-ng-ui-pill.d.ts +167 -0
  277. package/types/tectra-ng-ui-pill.d.ts.map +1 -0
  278. package/types/tectra-ng-ui-popover.d.ts +244 -0
  279. package/types/tectra-ng-ui-popover.d.ts.map +1 -0
  280. package/types/tectra-ng-ui-progress-bar.d.ts +151 -0
  281. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -0
  282. package/types/tectra-ng-ui-progress-spinner.d.ts +95 -0
  283. package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -0
  284. package/types/tectra-ng-ui-radio-button.d.ts +380 -0
  285. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -0
  286. package/types/tectra-ng-ui-rating.d.ts +195 -0
  287. package/types/tectra-ng-ui-rating.d.ts.map +1 -0
  288. package/types/tectra-ng-ui-select.d.ts +761 -0
  289. package/types/tectra-ng-ui-select.d.ts.map +1 -0
  290. package/types/tectra-ng-ui-skeleton.d.ts +182 -0
  291. package/types/tectra-ng-ui-skeleton.d.ts.map +1 -0
  292. package/types/tectra-ng-ui-slider.d.ts +220 -0
  293. package/types/tectra-ng-ui-slider.d.ts.map +1 -0
  294. package/types/tectra-ng-ui-speed-dial.d.ts +175 -0
  295. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -0
  296. package/types/tectra-ng-ui-split-button.d.ts +139 -0
  297. package/types/tectra-ng-ui-split-button.d.ts.map +1 -0
  298. package/types/tectra-ng-ui-status-icon.d.ts +105 -0
  299. package/types/tectra-ng-ui-status-icon.d.ts.map +1 -0
  300. package/types/tectra-ng-ui-table.d.ts +1301 -0
  301. package/types/tectra-ng-ui-table.d.ts.map +1 -0
  302. package/types/tectra-ng-ui-tag.d.ts +157 -0
  303. package/types/tectra-ng-ui-tag.d.ts.map +1 -0
  304. package/types/tectra-ng-ui-textarea.d.ts +146 -0
  305. package/types/tectra-ng-ui-textarea.d.ts.map +1 -0
  306. package/types/tectra-ng-ui-toast.d.ts +268 -0
  307. package/types/tectra-ng-ui-toast.d.ts.map +1 -0
  308. package/types/tectra-ng-ui-toggle-button.d.ts +184 -0
  309. package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -0
  310. package/types/tectra-ng-ui-toggle-switch.d.ts +226 -0
  311. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -0
  312. package/types/tectra-ng-ui-tooltip.d.ts +275 -0
  313. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -0
  314. package/types/tectra-ng-ui-tree-select.d.ts +339 -0
  315. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -0
  316. package/types/tectra-ng-ui.d.ts +2 -0
  317. package/types/tectra-ng-ui.d.ts.map +1 -0
@@ -0,0 +1,630 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, booleanAttribute, computed, forwardRef, inject, input, numberAttribute, output, signal, viewChild } from "@angular/core";
3
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
4
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { TxFormControlBase, injectFieldInvalid } from "@tectra-ng/core/forms";
6
+ import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
7
+ import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
8
+ import { toStyleObject } from "@tectra-ng/themes";
9
+ const MAX_STEP_MARKS = 100;
10
+ var TxSlider = class TxSlider extends TxFormControlBase {
11
+ localeService = inject(TxLocaleService);
12
+ min = input(0, {
13
+ ...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
14
+ transform: numberAttribute
15
+ });
16
+ max = input(100, {
17
+ ...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
18
+ transform: numberAttribute
19
+ });
20
+ step = input(1, {
21
+ ...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
22
+ transform: numberAttribute
23
+ });
24
+ range = input(false, {
25
+ ...ngDevMode ? { debugName: "range" } : /* istanbul ignore next */ {},
26
+ transform: booleanAttribute
27
+ });
28
+ orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
29
+ minStepsBetweenHandles = input(0, {
30
+ ...ngDevMode ? { debugName: "minStepsBetweenHandles" } : /* istanbul ignore next */ {},
31
+ transform: numberAttribute
32
+ });
33
+ showSteps = input(false, {
34
+ ...ngDevMode ? { debugName: "showSteps" } : /* istanbul ignore next */ {},
35
+ transform: booleanAttribute
36
+ });
37
+ marks = input([], ...ngDevMode ? [{ debugName: "marks" }] : /* istanbul ignore next */ []);
38
+ animate = input(false, {
39
+ ...ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {},
40
+ transform: booleanAttribute
41
+ });
42
+ valueTemplate = input("{value}", ...ngDevMode ? [{ debugName: "valueTemplate" }] : /* istanbul ignore next */ []);
43
+ invalid = input(void 0, {
44
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
45
+ transform: optionalBoolean
46
+ });
47
+ disabledInput = input(false, {
48
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
49
+ alias: "disabled",
50
+ transform: booleanAttribute
51
+ });
52
+ readonly = input(false, {
53
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
54
+ transform: booleanAttribute
55
+ });
56
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
57
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
58
+ tabindex = input(void 0, {
59
+ ...ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {},
60
+ transform: optionalNumber
61
+ });
62
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
63
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
64
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
65
+ unstyled = input(void 0, {
66
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
67
+ transform: optionalBoolean
68
+ });
69
+ changed = output();
70
+ slideEnd = output();
71
+ track = viewChild.required("track", ...ngDevMode ? [{ debugName: "track" }] : /* istanbul ignore next */ []);
72
+ translations = injectTranslations();
73
+ isUnstyled = injectUnstyled(this.unstyled);
74
+ isInvalid = injectFieldInvalid(this.invalid);
75
+ passThrough = injectPassThrough("slider", this, this.pt, this.ptOptions);
76
+ active = signal(null, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
77
+ isDisabled = computed(() => this.disabled() || this.disabledInput(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
78
+ isEditable = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "isEditable" }] : /* istanbul ignore next */ []);
79
+ values = computed(() => {
80
+ const value = this.value();
81
+ if (this.range()) {
82
+ const [start, end] = Array.isArray(value) ? value : [this.min(), this.max()];
83
+ return [this.clamp(start), this.clamp(end)];
84
+ }
85
+ return [this.min(), this.clamp(typeof value === "number" ? value : this.min())];
86
+ }, ...ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []);
87
+ handles = computed(() => this.range() ? [0, 1] : [1], ...ngDevMode ? [{ debugName: "handles" }] : /* istanbul ignore next */ []);
88
+ percents = computed(() => this.values().map((value) => this.percentOf(value)), ...ngDevMode ? [{ debugName: "percents" }] : /* istanbul ignore next */ []);
89
+ rangeStart = computed(() => this.range() ? this.percents()[0] : 0, ...ngDevMode ? [{ debugName: "rangeStart" }] : /* istanbul ignore next */ []);
90
+ rangeSize = computed(() => this.percents()[1] - this.rangeStart(), ...ngDevMode ? [{ debugName: "rangeSize" }] : /* istanbul ignore next */ []);
91
+ gap = computed(() => this.minStepsBetweenHandles() * this.step(), ...ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []);
92
+ stepMarks = computed(() => {
93
+ if (!this.showSteps()) return [];
94
+ const count = Math.floor((this.max() - this.min()) / this.step());
95
+ return count > 0 && count <= MAX_STEP_MARKS ? Array.from({ length: count + 1 }, (_, index) => this.min() + index * this.step()) : [];
96
+ }, ...ngDevMode ? [{ debugName: "stepMarks" }] : /* istanbul ignore next */ []);
97
+ allMarks = computed(() => {
98
+ const labelled = this.marks();
99
+ return [...this.stepMarks().filter((value) => !labelled.some((mark) => mark.value === value)).map((value) => ({ value })), ...labelled].map((mark) => ({
100
+ ...mark,
101
+ percent: this.percentOf(mark.value),
102
+ active: this.inRange(mark.value)
103
+ }));
104
+ }, ...ngDevMode ? [{ debugName: "allMarks" }] : /* istanbul ignore next */ []);
105
+ hasLabels = computed(() => this.marks().some((mark) => !!mark.label), ...ngDevMode ? [{ debugName: "hasLabels" }] : /* istanbul ignore next */ []);
106
+ hostStyle = computed(() => ({
107
+ ...toStyleObject(this.dt(), "--tx-slider"),
108
+ ...this.passThrough().root?.style
109
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
110
+ handleLabel(handle) {
111
+ const label = this.ariaLabel();
112
+ if (!label || !this.range()) return label ?? null;
113
+ return `${label}, ${handle === 0 ? this.translations().rangeStart : this.translations().rangeEnd}`;
114
+ }
115
+ valueText(handle) {
116
+ return this.valueTemplate().replace("{value}", this.localeService.formatNumber(this.values()[handle]));
117
+ }
118
+ handleMin(handle) {
119
+ return handle === 1 && this.range() ? this.values()[0] + this.gap() : this.min();
120
+ }
121
+ handleMax(handle) {
122
+ return handle === 0 ? this.values()[1] - this.gap() : this.max();
123
+ }
124
+ onPointerDown(event) {
125
+ if (!this.isEditable() || event.button !== 0) return;
126
+ event.preventDefault();
127
+ const value = this.valueAt(event);
128
+ const target = event.target.closest(".tx-slider__handle");
129
+ const handle = target ? Number(target.dataset["handle"]) : this.nearest(value);
130
+ this.active.set(handle);
131
+ event.currentTarget.setPointerCapture?.(event.pointerId);
132
+ this.focusHandle(handle);
133
+ if (!target) this.set(handle, value, event);
134
+ }
135
+ onPointerMove(event) {
136
+ const handle = this.active();
137
+ if (handle !== null) this.set(handle, this.valueAt(event), event);
138
+ }
139
+ onPointerUp(event) {
140
+ if (this.active() !== null) {
141
+ this.active.set(null);
142
+ this.markTouched();
143
+ this.slideEnd.emit({
144
+ value: this.currentValue(),
145
+ originalEvent: event
146
+ });
147
+ }
148
+ }
149
+ onKeydown(event, handle) {
150
+ if (!this.isEditable()) return;
151
+ const value = this.values()[handle];
152
+ const step = this.step();
153
+ const moves = {
154
+ ArrowRight: value + step,
155
+ ArrowUp: value + step,
156
+ ArrowLeft: value - step,
157
+ ArrowDown: value - step,
158
+ PageUp: value + step * 10,
159
+ PageDown: value - step * 10,
160
+ Home: this.handleMin(handle),
161
+ End: this.handleMax(handle)
162
+ };
163
+ if (event.key in moves) {
164
+ event.preventDefault();
165
+ this.set(handle, moves[event.key], event);
166
+ this.slideEnd.emit({
167
+ value: this.currentValue(),
168
+ originalEvent: event
169
+ });
170
+ }
171
+ }
172
+ onBlur() {
173
+ this.markTouched();
174
+ }
175
+ set(handle, raw, event) {
176
+ const step = this.step();
177
+ const snapped = Number((Math.round((raw - this.min()) / step) * step + this.min()).toFixed(decimals(step)));
178
+ const next = Math.min(this.handleMax(handle), Math.max(this.handleMin(handle), this.clamp(snapped)));
179
+ const values = [...this.values()];
180
+ if (values[handle] === next) return;
181
+ values[handle] = next;
182
+ const value = this.range() ? values : values[1];
183
+ this.updateValue(value);
184
+ this.changed.emit({
185
+ value,
186
+ originalEvent: event
187
+ });
188
+ }
189
+ currentValue() {
190
+ return this.range() ? [...this.values()] : this.values()[1];
191
+ }
192
+ valueAt(event) {
193
+ const rect = this.track().nativeElement.getBoundingClientRect();
194
+ const vertical = this.orientation() === "vertical";
195
+ const size = vertical ? rect.height : rect.width;
196
+ if (!size) return this.min();
197
+ const offset = vertical ? rect.bottom - event.clientY : event.clientX - rect.left;
198
+ const fraction = Math.min(1, Math.max(0, offset / size));
199
+ return this.min() + fraction * (this.max() - this.min());
200
+ }
201
+ nearest(value) {
202
+ if (!this.range()) return 1;
203
+ const [start, end] = this.values();
204
+ if (start === end) return value < start ? 0 : 1;
205
+ return Math.abs(value - start) <= Math.abs(value - end) ? 0 : 1;
206
+ }
207
+ focusHandle(handle) {
208
+ this.track().nativeElement.querySelector(`[data-handle="${handle}"]`)?.focus();
209
+ }
210
+ inRange(value) {
211
+ const [start, end] = this.values();
212
+ return value >= (this.range() ? start : this.min()) && value <= end;
213
+ }
214
+ clamp(value) {
215
+ return Math.min(this.max(), Math.max(this.min(), value));
216
+ }
217
+ percentOf(value) {
218
+ const span = this.max() - this.min();
219
+ return span > 0 ? (this.clamp(value) - this.min()) / span * 100 : 0;
220
+ }
221
+ static ɵfac = i0.ɵɵngDeclareFactory({
222
+ minVersion: "12.0.0",
223
+ version: "22.2.3",
224
+ ngImport: i0,
225
+ type: TxSlider,
226
+ deps: null,
227
+ target: i0.ɵɵFactoryTarget.Component
228
+ });
229
+ static ɵcmp = i0.ɵɵngDeclareComponent({
230
+ minVersion: "17.0.0",
231
+ version: "22.2.3",
232
+ type: TxSlider,
233
+ isStandalone: true,
234
+ selector: "tx-slider",
235
+ inputs: {
236
+ min: {
237
+ classPropertyName: "min",
238
+ publicName: "min",
239
+ isSignal: true,
240
+ isRequired: false,
241
+ transformFunction: null
242
+ },
243
+ max: {
244
+ classPropertyName: "max",
245
+ publicName: "max",
246
+ isSignal: true,
247
+ isRequired: false,
248
+ transformFunction: null
249
+ },
250
+ step: {
251
+ classPropertyName: "step",
252
+ publicName: "step",
253
+ isSignal: true,
254
+ isRequired: false,
255
+ transformFunction: null
256
+ },
257
+ range: {
258
+ classPropertyName: "range",
259
+ publicName: "range",
260
+ isSignal: true,
261
+ isRequired: false,
262
+ transformFunction: null
263
+ },
264
+ orientation: {
265
+ classPropertyName: "orientation",
266
+ publicName: "orientation",
267
+ isSignal: true,
268
+ isRequired: false,
269
+ transformFunction: null
270
+ },
271
+ minStepsBetweenHandles: {
272
+ classPropertyName: "minStepsBetweenHandles",
273
+ publicName: "minStepsBetweenHandles",
274
+ isSignal: true,
275
+ isRequired: false,
276
+ transformFunction: null
277
+ },
278
+ showSteps: {
279
+ classPropertyName: "showSteps",
280
+ publicName: "showSteps",
281
+ isSignal: true,
282
+ isRequired: false,
283
+ transformFunction: null
284
+ },
285
+ marks: {
286
+ classPropertyName: "marks",
287
+ publicName: "marks",
288
+ isSignal: true,
289
+ isRequired: false,
290
+ transformFunction: null
291
+ },
292
+ animate: {
293
+ classPropertyName: "animate",
294
+ publicName: "animate",
295
+ isSignal: true,
296
+ isRequired: false,
297
+ transformFunction: null
298
+ },
299
+ valueTemplate: {
300
+ classPropertyName: "valueTemplate",
301
+ publicName: "valueTemplate",
302
+ isSignal: true,
303
+ isRequired: false,
304
+ transformFunction: null
305
+ },
306
+ invalid: {
307
+ classPropertyName: "invalid",
308
+ publicName: "invalid",
309
+ isSignal: true,
310
+ isRequired: false,
311
+ transformFunction: null
312
+ },
313
+ disabledInput: {
314
+ classPropertyName: "disabledInput",
315
+ publicName: "disabled",
316
+ isSignal: true,
317
+ isRequired: false,
318
+ transformFunction: null
319
+ },
320
+ readonly: {
321
+ classPropertyName: "readonly",
322
+ publicName: "readonly",
323
+ isSignal: true,
324
+ isRequired: false,
325
+ transformFunction: null
326
+ },
327
+ ariaLabel: {
328
+ classPropertyName: "ariaLabel",
329
+ publicName: "ariaLabel",
330
+ isSignal: true,
331
+ isRequired: false,
332
+ transformFunction: null
333
+ },
334
+ ariaLabelledBy: {
335
+ classPropertyName: "ariaLabelledBy",
336
+ publicName: "ariaLabelledBy",
337
+ isSignal: true,
338
+ isRequired: false,
339
+ transformFunction: null
340
+ },
341
+ tabindex: {
342
+ classPropertyName: "tabindex",
343
+ publicName: "tabindex",
344
+ isSignal: true,
345
+ isRequired: false,
346
+ transformFunction: null
347
+ },
348
+ dt: {
349
+ classPropertyName: "dt",
350
+ publicName: "dt",
351
+ isSignal: true,
352
+ isRequired: false,
353
+ transformFunction: null
354
+ },
355
+ pt: {
356
+ classPropertyName: "pt",
357
+ publicName: "pt",
358
+ isSignal: true,
359
+ isRequired: false,
360
+ transformFunction: null
361
+ },
362
+ ptOptions: {
363
+ classPropertyName: "ptOptions",
364
+ publicName: "ptOptions",
365
+ isSignal: true,
366
+ isRequired: false,
367
+ transformFunction: null
368
+ },
369
+ unstyled: {
370
+ classPropertyName: "unstyled",
371
+ publicName: "unstyled",
372
+ isSignal: true,
373
+ isRequired: false,
374
+ transformFunction: null
375
+ }
376
+ },
377
+ outputs: {
378
+ changed: "changed",
379
+ slideEnd: "slideEnd"
380
+ },
381
+ host: {
382
+ properties: {
383
+ "class": "passThrough().root?.class",
384
+ "style": "hostStyle()",
385
+ "attr.data-styled": "!isUnstyled() || null",
386
+ "attr.data-orientation": "orientation()",
387
+ "class.tx-slider--range": "range()",
388
+ "class.tx-slider--dragging": "active() !== null",
389
+ "class.tx-slider--animate": "animate() && active() === null",
390
+ "class.tx-slider--disabled": "isDisabled()",
391
+ "class.tx-slider--readonly": "readonly()",
392
+ "class.tx-slider--invalid": "isInvalid()",
393
+ "class.tx-slider--labelled": "hasLabels()"
394
+ },
395
+ classAttribute: "tx-slider"
396
+ },
397
+ providers: [{
398
+ provide: NG_VALUE_ACCESSOR,
399
+ useExisting: forwardRef(() => TxSlider),
400
+ multi: true
401
+ }],
402
+ viewQueries: [{
403
+ propertyName: "track",
404
+ first: true,
405
+ predicate: ["track"],
406
+ descendants: true,
407
+ isSignal: true
408
+ }],
409
+ usesInheritance: true,
410
+ ngImport: i0,
411
+ template: "<div\n #track\n class=\"tx-slider__track\"\n [class]=\"passThrough().track?.class\"\n [style]=\"passThrough().track?.style\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n>\n <span\n class=\"tx-slider__range\"\n [class]=\"passThrough().range?.class\"\n [style]=\"passThrough().range?.style\"\n [style.--_start.%]=\"rangeStart()\"\n [style.--_size.%]=\"rangeSize()\"\n ></span>\n @for (mark of allMarks(); track mark.value) {\n <span\n class=\"tx-slider__mark\"\n [class.tx-slider__mark--active]=\"mark.active\"\n [class]=\"passThrough().mark?.class\"\n [style]=\"passThrough().mark?.style\"\n [style.--_at.%]=\"mark.percent\"\n aria-hidden=\"true\"\n ></span>\n @if (mark.label) {\n <span\n class=\"tx-slider__label\"\n [class.tx-slider__label--start]=\"mark.percent === 0\"\n [class.tx-slider__label--end]=\"mark.percent === 100\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n [style.--_at.%]=\"mark.percent\"\n aria-hidden=\"true\"\n >{{\n mark.label\n }}</span>\n }\n }\n @for (handle of handles(); track handle) {\n <span\n class=\"tx-slider__handle\"\n role=\"slider\"\n [class]=\"passThrough().handle?.class\"\n [style]=\"passThrough().handle?.style\"\n [style.--_at.%]=\"percents()[handle]\"\n [attr.data-handle]=\"handle\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"handleLabel(handle)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-valuemin]=\"handleMin(handle)\"\n [attr.aria-valuemax]=\"handleMax(handle)\"\n [attr.aria-valuenow]=\"values()[handle]\"\n [attr.aria-valuetext]=\"valueText(handle)\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event, handle)\"\n (blur)=\"onBlur()\"\n ></span>\n }\n</div>\n",
412
+ styles: [":host{display:block}:host([data-orientation=vertical]){display:inline-block}.tx-slider__track{position:relative;touch-action:none;-webkit-user-select:none;user-select:none}.tx-slider__range,.tx-slider__handle,.tx-slider__mark,.tx-slider__label{position:absolute}:host([data-styled]){--_handle: var(--tx-slider-handle-size);padding:calc(var(--_handle) / 2) calc(var(--_handle) / 2)}:host([data-styled].tx-slider--labelled[data-orientation=horizontal]){padding-bottom:calc(var(--_handle) / 2 + var(--tx-slider-mark-label-gap) + 1.4em)}:host([data-styled].tx-slider--labelled[data-orientation=vertical]){padding-right:calc(var(--_handle) / 2 + var(--tx-slider-mark-label-gap) + 3em)}:host([data-styled]) .tx-slider__track{border-radius:var(--tx-slider-track-border-radius);background:var(--tx-slider-track-background);cursor:pointer}:host([data-styled][data-orientation=horizontal]) .tx-slider__track{height:var(--tx-slider-track-size)}:host([data-styled][data-orientation=vertical]) .tx-slider__track{width:var(--tx-slider-track-size);height:var(--tx-slider-vertical-height)}:host([data-styled]) .tx-slider__range{border-radius:inherit;background:var(--tx-slider-range-background)}:host([data-orientation=horizontal]) .tx-slider__range{top:0;bottom:0;left:var(--_start);width:var(--_size)}:host([data-orientation=vertical]) .tx-slider__range{right:0;bottom:var(--_start);left:0;height:var(--_size)}:host([data-styled]) .tx-slider__handle{box-sizing:border-box;width:var(--_handle);height:var(--_handle);border:var(--tx-slider-handle-border-width) solid var(--tx-slider-handle-border-color);border-radius:50%;background:var(--tx-slider-handle-background);box-shadow:var(--tx-slider-handle-shadow);outline:none;cursor:grab;transition:box-shadow var(--tx-slider-transition-duration)}:host([data-styled]) .tx-slider__handle:hover{box-shadow:var(--tx-slider-handle-shadow),var(--tx-slider-handle-hover-ring)}:host([data-styled]) .tx-slider__handle:focus-visible{outline:var(--tx-slider-handle-focus-ring-width) solid var(--tx-slider-handle-focus-ring-color);outline-offset:var(--tx-slider-handle-focus-ring-offset)}:host([data-orientation=horizontal]) .tx-slider__handle{top:50%;left:var(--_at);transform:translate(-50%,-50%)}:host([data-orientation=vertical]) .tx-slider__handle{bottom:var(--_at);left:50%;transform:translate(-50%,50%)}:host([data-styled].tx-slider--dragging) .tx-slider__handle{cursor:grabbing}:host([data-styled]) .tx-slider__mark{width:var(--tx-slider-mark-size);height:var(--tx-slider-mark-size);border-radius:50%;background:var(--tx-slider-mark-background);pointer-events:none}:host([data-styled]) .tx-slider__mark--active{background:var(--tx-slider-mark-active-background)}:host([data-orientation=horizontal]) .tx-slider__mark{top:50%;left:var(--_at);transform:translate(-50%,-50%)}:host([data-orientation=vertical]) .tx-slider__mark{bottom:var(--_at);left:50%;transform:translate(-50%,50%)}:host([data-styled]) .tx-slider__label{color:var(--tx-slider-mark-label-color);font-family:var(--tx-font-family);font-size:var(--tx-slider-mark-label-font-size);line-height:1.4;white-space:nowrap;pointer-events:none}:host([data-orientation=horizontal]) .tx-slider__label{top:calc(50% + var(--_handle) / 2 + var(--tx-slider-mark-label-gap));left:var(--_at);transform:translate(-50%)}:host([data-orientation=horizontal]) .tx-slider__label--start{transform:translate(calc(var(--_handle) / -2))}:host([data-orientation=horizontal]) .tx-slider__label--end{transform:translate(calc(-100% + var(--_handle) / 2))}:host([data-orientation=vertical]) .tx-slider__label{bottom:var(--_at);left:calc(50% + var(--_handle) / 2 + var(--tx-slider-mark-label-gap));transform:translateY(50%)}:host([data-styled].tx-slider--animate) .tx-slider__range{transition-duration:var(--tx-slider-transition-duration);transition-property:left,width,bottom,height}:host([data-styled].tx-slider--animate) .tx-slider__handle{transition-duration:var(--tx-slider-transition-duration);transition-property:left,bottom,box-shadow}:host([data-styled].tx-slider--invalid) .tx-slider__range{background:var(--tx-slider-invalid-range-background)}:host([data-styled].tx-slider--readonly) .tx-slider__track,:host([data-styled].tx-slider--readonly) .tx-slider__handle{cursor:default}:host([data-styled].tx-slider--disabled){opacity:var(--tx-slider-disabled-opacity)}:host([data-styled].tx-slider--disabled) .tx-slider__track,:host([data-styled].tx-slider--disabled) .tx-slider__handle{cursor:not-allowed}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-slider__range,:host([data-styled]) .tx-slider__handle{transition:none}}\n"],
413
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
414
+ });
415
+ };
416
+ i0.ɵɵngDeclareClassMetadata({
417
+ minVersion: "12.0.0",
418
+ version: "22.2.3",
419
+ ngImport: i0,
420
+ type: TxSlider,
421
+ decorators: [{
422
+ type: Component,
423
+ args: [{
424
+ selector: "tx-slider",
425
+ changeDetection: ChangeDetectionStrategy.OnPush,
426
+ providers: [{
427
+ provide: NG_VALUE_ACCESSOR,
428
+ useExisting: forwardRef(() => TxSlider),
429
+ multi: true
430
+ }],
431
+ host: {
432
+ class: "tx-slider",
433
+ "[class]": "passThrough().root?.class",
434
+ "[style]": "hostStyle()",
435
+ "[attr.data-styled]": "!isUnstyled() || null",
436
+ "[attr.data-orientation]": "orientation()",
437
+ "[class.tx-slider--range]": "range()",
438
+ "[class.tx-slider--dragging]": "active() !== null",
439
+ "[class.tx-slider--animate]": "animate() && active() === null",
440
+ "[class.tx-slider--disabled]": "isDisabled()",
441
+ "[class.tx-slider--readonly]": "readonly()",
442
+ "[class.tx-slider--invalid]": "isInvalid()",
443
+ "[class.tx-slider--labelled]": "hasLabels()"
444
+ },
445
+ template: "<div\n #track\n class=\"tx-slider__track\"\n [class]=\"passThrough().track?.class\"\n [style]=\"passThrough().track?.style\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n>\n <span\n class=\"tx-slider__range\"\n [class]=\"passThrough().range?.class\"\n [style]=\"passThrough().range?.style\"\n [style.--_start.%]=\"rangeStart()\"\n [style.--_size.%]=\"rangeSize()\"\n ></span>\n @for (mark of allMarks(); track mark.value) {\n <span\n class=\"tx-slider__mark\"\n [class.tx-slider__mark--active]=\"mark.active\"\n [class]=\"passThrough().mark?.class\"\n [style]=\"passThrough().mark?.style\"\n [style.--_at.%]=\"mark.percent\"\n aria-hidden=\"true\"\n ></span>\n @if (mark.label) {\n <span\n class=\"tx-slider__label\"\n [class.tx-slider__label--start]=\"mark.percent === 0\"\n [class.tx-slider__label--end]=\"mark.percent === 100\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n [style.--_at.%]=\"mark.percent\"\n aria-hidden=\"true\"\n >{{\n mark.label\n }}</span>\n }\n }\n @for (handle of handles(); track handle) {\n <span\n class=\"tx-slider__handle\"\n role=\"slider\"\n [class]=\"passThrough().handle?.class\"\n [style]=\"passThrough().handle?.style\"\n [style.--_at.%]=\"percents()[handle]\"\n [attr.data-handle]=\"handle\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"handleLabel(handle)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-valuemin]=\"handleMin(handle)\"\n [attr.aria-valuemax]=\"handleMax(handle)\"\n [attr.aria-valuenow]=\"values()[handle]\"\n [attr.aria-valuetext]=\"valueText(handle)\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event, handle)\"\n (blur)=\"onBlur()\"\n ></span>\n }\n</div>\n",
446
+ styles: [":host{display:block}:host([data-orientation=vertical]){display:inline-block}.tx-slider__track{position:relative;touch-action:none;-webkit-user-select:none;user-select:none}.tx-slider__range,.tx-slider__handle,.tx-slider__mark,.tx-slider__label{position:absolute}:host([data-styled]){--_handle: var(--tx-slider-handle-size);padding:calc(var(--_handle) / 2) calc(var(--_handle) / 2)}:host([data-styled].tx-slider--labelled[data-orientation=horizontal]){padding-bottom:calc(var(--_handle) / 2 + var(--tx-slider-mark-label-gap) + 1.4em)}:host([data-styled].tx-slider--labelled[data-orientation=vertical]){padding-right:calc(var(--_handle) / 2 + var(--tx-slider-mark-label-gap) + 3em)}:host([data-styled]) .tx-slider__track{border-radius:var(--tx-slider-track-border-radius);background:var(--tx-slider-track-background);cursor:pointer}:host([data-styled][data-orientation=horizontal]) .tx-slider__track{height:var(--tx-slider-track-size)}:host([data-styled][data-orientation=vertical]) .tx-slider__track{width:var(--tx-slider-track-size);height:var(--tx-slider-vertical-height)}:host([data-styled]) .tx-slider__range{border-radius:inherit;background:var(--tx-slider-range-background)}:host([data-orientation=horizontal]) .tx-slider__range{top:0;bottom:0;left:var(--_start);width:var(--_size)}:host([data-orientation=vertical]) .tx-slider__range{right:0;bottom:var(--_start);left:0;height:var(--_size)}:host([data-styled]) .tx-slider__handle{box-sizing:border-box;width:var(--_handle);height:var(--_handle);border:var(--tx-slider-handle-border-width) solid var(--tx-slider-handle-border-color);border-radius:50%;background:var(--tx-slider-handle-background);box-shadow:var(--tx-slider-handle-shadow);outline:none;cursor:grab;transition:box-shadow var(--tx-slider-transition-duration)}:host([data-styled]) .tx-slider__handle:hover{box-shadow:var(--tx-slider-handle-shadow),var(--tx-slider-handle-hover-ring)}:host([data-styled]) .tx-slider__handle:focus-visible{outline:var(--tx-slider-handle-focus-ring-width) solid var(--tx-slider-handle-focus-ring-color);outline-offset:var(--tx-slider-handle-focus-ring-offset)}:host([data-orientation=horizontal]) .tx-slider__handle{top:50%;left:var(--_at);transform:translate(-50%,-50%)}:host([data-orientation=vertical]) .tx-slider__handle{bottom:var(--_at);left:50%;transform:translate(-50%,50%)}:host([data-styled].tx-slider--dragging) .tx-slider__handle{cursor:grabbing}:host([data-styled]) .tx-slider__mark{width:var(--tx-slider-mark-size);height:var(--tx-slider-mark-size);border-radius:50%;background:var(--tx-slider-mark-background);pointer-events:none}:host([data-styled]) .tx-slider__mark--active{background:var(--tx-slider-mark-active-background)}:host([data-orientation=horizontal]) .tx-slider__mark{top:50%;left:var(--_at);transform:translate(-50%,-50%)}:host([data-orientation=vertical]) .tx-slider__mark{bottom:var(--_at);left:50%;transform:translate(-50%,50%)}:host([data-styled]) .tx-slider__label{color:var(--tx-slider-mark-label-color);font-family:var(--tx-font-family);font-size:var(--tx-slider-mark-label-font-size);line-height:1.4;white-space:nowrap;pointer-events:none}:host([data-orientation=horizontal]) .tx-slider__label{top:calc(50% + var(--_handle) / 2 + var(--tx-slider-mark-label-gap));left:var(--_at);transform:translate(-50%)}:host([data-orientation=horizontal]) .tx-slider__label--start{transform:translate(calc(var(--_handle) / -2))}:host([data-orientation=horizontal]) .tx-slider__label--end{transform:translate(calc(-100% + var(--_handle) / 2))}:host([data-orientation=vertical]) .tx-slider__label{bottom:var(--_at);left:calc(50% + var(--_handle) / 2 + var(--tx-slider-mark-label-gap));transform:translateY(50%)}:host([data-styled].tx-slider--animate) .tx-slider__range{transition-duration:var(--tx-slider-transition-duration);transition-property:left,width,bottom,height}:host([data-styled].tx-slider--animate) .tx-slider__handle{transition-duration:var(--tx-slider-transition-duration);transition-property:left,bottom,box-shadow}:host([data-styled].tx-slider--invalid) .tx-slider__range{background:var(--tx-slider-invalid-range-background)}:host([data-styled].tx-slider--readonly) .tx-slider__track,:host([data-styled].tx-slider--readonly) .tx-slider__handle{cursor:default}:host([data-styled].tx-slider--disabled){opacity:var(--tx-slider-disabled-opacity)}:host([data-styled].tx-slider--disabled) .tx-slider__track,:host([data-styled].tx-slider--disabled) .tx-slider__handle{cursor:not-allowed}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-slider__range,:host([data-styled]) .tx-slider__handle{transition:none}}\n"]
447
+ }]
448
+ }],
449
+ propDecorators: {
450
+ min: [{
451
+ type: i0.Input,
452
+ args: [{
453
+ isSignal: true,
454
+ alias: "min",
455
+ required: false
456
+ }]
457
+ }],
458
+ max: [{
459
+ type: i0.Input,
460
+ args: [{
461
+ isSignal: true,
462
+ alias: "max",
463
+ required: false
464
+ }]
465
+ }],
466
+ step: [{
467
+ type: i0.Input,
468
+ args: [{
469
+ isSignal: true,
470
+ alias: "step",
471
+ required: false
472
+ }]
473
+ }],
474
+ range: [{
475
+ type: i0.Input,
476
+ args: [{
477
+ isSignal: true,
478
+ alias: "range",
479
+ required: false
480
+ }]
481
+ }],
482
+ orientation: [{
483
+ type: i0.Input,
484
+ args: [{
485
+ isSignal: true,
486
+ alias: "orientation",
487
+ required: false
488
+ }]
489
+ }],
490
+ minStepsBetweenHandles: [{
491
+ type: i0.Input,
492
+ args: [{
493
+ isSignal: true,
494
+ alias: "minStepsBetweenHandles",
495
+ required: false
496
+ }]
497
+ }],
498
+ showSteps: [{
499
+ type: i0.Input,
500
+ args: [{
501
+ isSignal: true,
502
+ alias: "showSteps",
503
+ required: false
504
+ }]
505
+ }],
506
+ marks: [{
507
+ type: i0.Input,
508
+ args: [{
509
+ isSignal: true,
510
+ alias: "marks",
511
+ required: false
512
+ }]
513
+ }],
514
+ animate: [{
515
+ type: i0.Input,
516
+ args: [{
517
+ isSignal: true,
518
+ alias: "animate",
519
+ required: false
520
+ }]
521
+ }],
522
+ valueTemplate: [{
523
+ type: i0.Input,
524
+ args: [{
525
+ isSignal: true,
526
+ alias: "valueTemplate",
527
+ required: false
528
+ }]
529
+ }],
530
+ invalid: [{
531
+ type: i0.Input,
532
+ args: [{
533
+ isSignal: true,
534
+ alias: "invalid",
535
+ required: false
536
+ }]
537
+ }],
538
+ disabledInput: [{
539
+ type: i0.Input,
540
+ args: [{
541
+ isSignal: true,
542
+ alias: "disabled",
543
+ required: false
544
+ }]
545
+ }],
546
+ readonly: [{
547
+ type: i0.Input,
548
+ args: [{
549
+ isSignal: true,
550
+ alias: "readonly",
551
+ required: false
552
+ }]
553
+ }],
554
+ ariaLabel: [{
555
+ type: i0.Input,
556
+ args: [{
557
+ isSignal: true,
558
+ alias: "ariaLabel",
559
+ required: false
560
+ }]
561
+ }],
562
+ ariaLabelledBy: [{
563
+ type: i0.Input,
564
+ args: [{
565
+ isSignal: true,
566
+ alias: "ariaLabelledBy",
567
+ required: false
568
+ }]
569
+ }],
570
+ tabindex: [{
571
+ type: i0.Input,
572
+ args: [{
573
+ isSignal: true,
574
+ alias: "tabindex",
575
+ required: false
576
+ }]
577
+ }],
578
+ dt: [{
579
+ type: i0.Input,
580
+ args: [{
581
+ isSignal: true,
582
+ alias: "dt",
583
+ required: false
584
+ }]
585
+ }],
586
+ pt: [{
587
+ type: i0.Input,
588
+ args: [{
589
+ isSignal: true,
590
+ alias: "pt",
591
+ required: false
592
+ }]
593
+ }],
594
+ ptOptions: [{
595
+ type: i0.Input,
596
+ args: [{
597
+ isSignal: true,
598
+ alias: "ptOptions",
599
+ required: false
600
+ }]
601
+ }],
602
+ unstyled: [{
603
+ type: i0.Input,
604
+ args: [{
605
+ isSignal: true,
606
+ alias: "unstyled",
607
+ required: false
608
+ }]
609
+ }],
610
+ changed: [{
611
+ type: i0.Output,
612
+ args: ["changed"]
613
+ }],
614
+ slideEnd: [{
615
+ type: i0.Output,
616
+ args: ["slideEnd"]
617
+ }],
618
+ track: [{
619
+ type: i0.ViewChild,
620
+ args: ["track", { isSignal: true }]
621
+ }]
622
+ }
623
+ });
624
+ function decimals(value) {
625
+ const text = String(value);
626
+ return text.includes(".") ? text.split(".")[1].length : 0;
627
+ }
628
+ export { TxSlider };
629
+
630
+ //# sourceMappingURL=tectra-ng-ui-slider.mjs.map