@ngstarter-ui/components 22.3.6 → 22.4.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 (476) hide show
  1. package/README.md +27 -0
  2. package/ai/component-registry.json +186 -101
  3. package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
  4. package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
  5. package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
  6. package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
  7. package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
  8. package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
  9. package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
  10. package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
  11. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
  12. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
  13. package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
  14. package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
  15. package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
  16. package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
  17. package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
  18. package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
  19. package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
  20. package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
  21. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
  22. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
  23. package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
  24. package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
  25. package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
  26. package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
  27. package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
  28. package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
  29. package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
  30. package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
  31. package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
  32. package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
  33. package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
  34. package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
  35. package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
  36. package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
  37. package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
  38. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
  39. package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
  40. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
  41. package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
  42. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
  44. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
  46. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
  48. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
  50. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
  52. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
  54. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
  56. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
  58. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
  60. package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
  62. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
  64. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
  66. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
  68. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
  70. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
  71. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
  72. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
  73. package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
  74. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
  75. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
  76. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
  77. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
  78. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
  79. package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
  80. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
  81. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
  82. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
  83. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
  84. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
  85. package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
  86. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
  88. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
  89. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
  90. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
  91. package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
  92. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  93. package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
  94. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
  95. package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
  96. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
  97. package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
  98. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
  99. package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
  100. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  101. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
  102. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
  103. package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
  104. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  105. package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
  106. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
  107. package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
  108. package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
  109. package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
  110. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
  111. package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
  112. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
  113. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
  114. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
  115. package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
  116. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
  117. package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
  118. package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
  119. package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
  120. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
  121. package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
  122. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
  123. package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
  124. package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
  125. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
  126. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  127. package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
  128. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  129. package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
  130. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
  131. package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
  132. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
  133. package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
  134. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
  135. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
  136. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
  137. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
  138. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  139. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
  140. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
  141. package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
  142. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
  143. package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
  144. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  145. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
  146. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
  147. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
  148. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
  149. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
  150. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
  151. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
  152. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
  153. package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
  154. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
  155. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
  156. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
  157. package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
  158. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
  159. package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
  160. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
  161. package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
  162. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
  163. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
  164. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  165. package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
  166. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
  167. package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
  168. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
  169. package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
  170. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
  171. package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
  172. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
  173. package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
  174. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
  175. package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
  176. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  177. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
  178. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
  179. package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
  180. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
  181. package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
  182. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
  183. package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
  184. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
  185. package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
  186. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
  187. package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
  188. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
  189. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
  190. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
  191. package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
  192. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
  193. package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
  194. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
  195. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
  196. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  197. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
  198. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
  199. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
  200. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  201. package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
  202. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  203. package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
  204. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
  205. package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
  206. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
  207. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
  208. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
  209. package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
  210. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
  211. package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
  212. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
  213. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
  214. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
  215. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
  216. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
  217. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
  218. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
  219. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
  220. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
  221. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
  222. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
  223. package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
  224. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
  225. package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
  226. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
  227. package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
  228. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
  229. package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
  230. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
  231. package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
  232. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
  233. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
  234. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  235. package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
  236. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
  237. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
  238. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
  239. package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
  240. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
  241. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
  242. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
  243. package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
  244. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  245. package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
  246. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
  247. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
  248. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
  249. package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
  250. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
  251. package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
  252. package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
  253. package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
  255. package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
  257. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
  259. package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
  260. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  261. package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
  263. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
  264. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
  265. package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
  266. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
  267. package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
  268. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
  269. package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
  270. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
  271. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
  272. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
  273. package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
  274. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
  275. package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
  276. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
  277. package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
  278. package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
  279. package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
  280. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
  281. package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
  282. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
  283. package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
  285. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
  287. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
  289. package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
  290. package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
  291. package/fesm2022/ngstarter-ui-components.mjs +3 -5
  292. package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
  293. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
  294. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
  295. package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
  296. package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
  297. package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
  298. package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
  299. package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
  300. package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
  301. package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
  302. package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
  303. package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
  304. package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
  305. package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
  306. package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
  307. package/package.json +11 -10
  308. package/styles/_tokens.scss +1 -0
  309. package/types/ngstarter-ui-components-action-required.d.ts +34 -14
  310. package/types/ngstarter-ui-components-alert.d.ts +53 -44
  311. package/types/ngstarter-ui-components-announcement.d.ts +74 -53
  312. package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
  313. package/types/ngstarter-ui-components-avatar.d.ts +113 -66
  314. package/types/ngstarter-ui-components-badge.d.ts +73 -37
  315. package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
  316. package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
  317. package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
  318. package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
  319. package/types/ngstarter-ui-components-button.d.ts +69 -27
  320. package/types/ngstarter-ui-components-calendar.d.ts +123 -71
  321. package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
  322. package/types/ngstarter-ui-components-card.d.ts +75 -71
  323. package/types/ngstarter-ui-components-carousel.d.ts +115 -69
  324. package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
  325. package/types/ngstarter-ui-components-chips.d.ts +288 -195
  326. package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
  327. package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
  328. package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
  329. package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
  330. package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
  331. package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
  332. package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
  333. package/types/ngstarter-ui-components-confirm.d.ts +24 -29
  334. package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
  335. package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
  336. package/types/ngstarter-ui-components-core.d.ts +513 -467
  337. package/types/ngstarter-ui-components-country-select.d.ts +170 -97
  338. package/types/ngstarter-ui-components-crop.d.ts +67 -52
  339. package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
  340. package/types/ngstarter-ui-components-data-view.d.ts +811 -567
  341. package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
  342. package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
  343. package/types/ngstarter-ui-components-dialog.d.ts +138 -116
  344. package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
  345. package/types/ngstarter-ui-components-divider.d.ts +29 -17
  346. package/types/ngstarter-ui-components-drawer.d.ts +39 -30
  347. package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
  348. package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
  349. package/types/ngstarter-ui-components-events.d.ts +73 -57
  350. package/types/ngstarter-ui-components-expand.d.ts +55 -25
  351. package/types/ngstarter-ui-components-expansion.d.ts +93 -64
  352. package/types/ngstarter-ui-components-file-type.d.ts +53 -27
  353. package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
  354. package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
  355. package/types/ngstarter-ui-components-form-field.d.ts +116 -105
  356. package/types/ngstarter-ui-components-gauge.d.ts +32 -20
  357. package/types/ngstarter-ui-components-grid.d.ts +66 -50
  358. package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
  359. package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
  360. package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
  361. package/types/ngstarter-ui-components-icon.d.ts +39 -38
  362. package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
  363. package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
  364. package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
  365. package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
  366. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
  367. package/types/ngstarter-ui-components-incidents.d.ts +97 -104
  368. package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
  369. package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
  370. package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
  371. package/types/ngstarter-ui-components-input.d.ts +82 -54
  372. package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
  373. package/types/ngstarter-ui-components-kbd.d.ts +8 -12
  374. package/types/ngstarter-ui-components-layout.d.ts +131 -87
  375. package/types/ngstarter-ui-components-list.d.ts +123 -88
  376. package/types/ngstarter-ui-components-logo.d.ts +21 -21
  377. package/types/ngstarter-ui-components-marquee.d.ts +41 -34
  378. package/types/ngstarter-ui-components-menu.d.ts +329 -221
  379. package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
  380. package/types/ngstarter-ui-components-navigation.d.ts +186 -125
  381. package/types/ngstarter-ui-components-notifications.d.ts +104 -89
  382. package/types/ngstarter-ui-components-number-input.d.ts +138 -96
  383. package/types/ngstarter-ui-components-option.d.ts +102 -68
  384. package/types/ngstarter-ui-components-overlay.d.ts +7 -12
  385. package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
  386. package/types/ngstarter-ui-components-paginator.d.ts +171 -129
  387. package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
  388. package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
  389. package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
  390. package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
  391. package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
  392. package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
  393. package/types/ngstarter-ui-components-popover.d.ts +128 -89
  394. package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
  395. package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
  396. package/types/ngstarter-ui-components-radio.d.ts +100 -47
  397. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
  398. package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
  399. package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
  400. package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
  401. package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
  402. package/types/ngstarter-ui-components-segmented.d.ts +93 -61
  403. package/types/ngstarter-ui-components-select.d.ts +366 -266
  404. package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
  405. package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
  406. package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
  407. package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
  408. package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
  409. package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
  410. package/types/ngstarter-ui-components-slider.d.ts +123 -82
  411. package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
  412. package/types/ngstarter-ui-components-sort.d.ts +99 -63
  413. package/types/ngstarter-ui-components-spinner.d.ts +49 -27
  414. package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
  415. package/types/ngstarter-ui-components-split.d.ts +276 -195
  416. package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
  417. package/types/ngstarter-ui-components-stepper.d.ts +57 -43
  418. package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
  419. package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
  420. package/types/ngstarter-ui-components-table.d.ts +256 -228
  421. package/types/ngstarter-ui-components-tabs.d.ts +231 -138
  422. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
  423. package/types/ngstarter-ui-components-tiles.d.ts +166 -104
  424. package/types/ngstarter-ui-components-timeline.d.ts +45 -57
  425. package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
  426. package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
  427. package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
  428. package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
  429. package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
  430. package/types/ngstarter-ui-components-tree.d.ts +355 -229
  431. package/types/ngstarter-ui-components-upload.d.ts +216 -131
  432. package/types/ngstarter-ui-components-video-player.d.ts +130 -67
  433. package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
  434. package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
  435. package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
  436. package/types/ngstarter-ui-components.d.ts +2 -2
  437. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs +0 -35
  438. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs.map +0 -1
  439. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs +0 -26
  440. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs.map +0 -1
  441. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs +0 -220
  442. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs.map +0 -1
  443. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
  444. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
  445. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
  446. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
  447. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs +0 -375
  448. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs.map +0 -1
  449. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs +0 -80
  450. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs.map +0 -1
  451. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs +0 -65
  452. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs.map +0 -1
  453. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs +0 -137
  454. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs.map +0 -1
  455. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs +0 -113
  456. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs.map +0 -1
  457. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs +0 -188
  458. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs.map +0 -1
  459. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs +0 -117
  460. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs.map +0 -1
  461. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs +0 -4464
  462. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs.map +0 -1
  463. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs +0 -132
  464. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs.map +0 -1
  465. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs +0 -171
  466. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs.map +0 -1
  467. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs +0 -1653
  468. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs.map +0 -1
  469. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs +0 -20
  470. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs.map +0 -1
  471. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
  472. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
  473. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs +0 -134
  474. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.mjs.map +0 -1
  475. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
  476. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
@@ -1,488 +1,646 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ElementRef, output, input, numberAttribute, signal, effect, forwardRef, Directive, ChangeDetectorRef, DestroyRef, PLATFORM_ID, booleanAttribute, contentChildren, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { DOCUMENT, isPlatformBrowser } from '@angular/common';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { Directionality } from '@angular/cdk/bidi';
6
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
- import { merge, fromEvent, filter, tap, switchMap, takeUntil } from 'rxjs';
8
-
9
- class SliderThumb {
10
- _elementRef = inject((ElementRef));
11
- _slider = inject(Slider);
12
- valueChange = output();
13
- valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), transform: numberAttribute, alias: 'value' });
14
- _value = signal(0, /* @ts-ignore */
15
- ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
16
- getId() {
17
- return 'base';
18
- }
19
- get value() {
20
- return this._value();
21
- }
22
- set value(v) {
23
- this._value.set(this._clampValue(v));
24
- this._updateHostValue();
25
- this._slider._onValueChange(this);
26
- }
27
- _clampValue(v) {
28
- const thumbs = this._slider._allThumbs();
29
- const min = this._slider.min();
30
- const max = this._slider.max();
31
- if (thumbs.length === 2) {
32
- const index = thumbs.indexOf(this);
33
- if (index === 0) {
34
- return Math.max(min, Math.min(v, thumbs[1].value));
35
- }
36
- else if (index === 1) {
37
- return Math.min(max, Math.max(v, thumbs[0].value));
38
- }
39
- }
40
- return Math.max(min, Math.min(max, v));
41
- }
42
- constructor() {
43
- effect(() => {
44
- const inputVal = this.valueInput();
45
- if (inputVal !== undefined && inputVal !== this.value && !this._isUserInteraction) {
46
- this.value = inputVal;
47
- }
48
- });
49
- }
50
- _onChangeFn = () => { };
51
- _onTouchedFn = () => { };
52
- ngOnInit() {
53
- if (this.valueInput() === undefined) {
54
- const initialValue = this._elementRef.nativeElement.getAttribute('value');
55
- if (initialValue !== null) {
56
- this.value = Number(initialValue);
57
- }
58
- else {
59
- this.value = this._slider.min();
60
- }
61
- }
62
- else {
63
- this._slider._onValueChange(this);
64
- }
65
- }
66
- get min() {
67
- return this._slider.min();
68
- }
69
- get max() {
70
- return this._slider.max();
71
- }
72
- get step() {
73
- return this._slider.step();
74
- }
75
- ngOnDestroy() { }
76
- _updateValueFromUser(value) {
77
- const clampedValue = this._clampValue(value);
78
- if (this._value() !== clampedValue) {
79
- this._isUserInteraction = true;
80
- this._value.set(clampedValue);
81
- this._updateHostValue();
82
- this._onChangeFn(clampedValue);
83
- this.valueChange.emit(clampedValue);
84
- this._slider._onValueChange(this);
85
- setTimeout(() => {
86
- this._isUserInteraction = false;
87
- });
88
- }
89
- }
90
- _onInput(event) {
91
- if (this._slider._allThumbs().length > 1 && this._slider._activeThumb() !== this) {
92
- return;
93
- }
94
- let value = event.target.valueAsNumber;
95
- const initialValue = value;
96
- this._updateValueFromUser(value);
97
- if (value !== initialValue) {
98
- this._updateHostValue();
99
- }
100
- this._slider._activeThumb.set(this);
101
- }
102
- _onChange(event) {
103
- this._onTouchedFn();
104
- }
105
- _onBlur() {
106
- this._onTouchedFn();
107
- }
108
- _onFocus() {
109
- this._slider._activeThumb.set(this);
110
- }
111
- focus() {
112
- this._elementRef.nativeElement.focus();
113
- }
114
- _isUserInteraction = false;
115
- writeValue(value) {
116
- this._isUserInteraction = true;
117
- this.value = value;
118
- setTimeout(() => {
119
- this._isUserInteraction = false;
120
- });
121
- }
122
- registerOnChange(fn) {
123
- this._onChangeFn = fn;
124
- }
125
- registerOnTouched(fn) {
126
- this._onTouchedFn = fn;
127
- }
128
- setDisabledState(isDisabled) {
129
- this._elementRef.nativeElement.disabled = isDisabled;
130
- }
131
- _updateHostValue() {
132
- this._elementRef.nativeElement.value = (this._value() ?? 0).toString();
133
- }
134
- get percentage() {
135
- const max = this._slider.max();
136
- const min = this._slider.min();
137
- if (max === min) {
138
- return 0;
139
- }
140
- const p = (this._value() - min) / (max - min);
141
- return Math.max(0, Math.min(1, p));
142
- }
143
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
144
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: SliderThumb, isStandalone: true, selector: "input[ngsSliderThumb]", inputs: { valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { attributes: { "type": "range" }, listeners: { "input": "_onInput($event)", "change": "_onChange($event)", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "class.ngs-slider-input-active": "_slider._activeThumb() === this", "attr.min": "min", "attr.max": "max", "attr.step": "step", "value": "value" }, classAttribute: "ngs-slider-input" }, providers: [
145
- {
146
- provide: NG_VALUE_ACCESSOR,
147
- useExisting: forwardRef(() => SliderThumb),
148
- multi: true,
149
- },
150
- ], exportAs: ["ngsSliderThumb"], ngImport: i0 });
151
- }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SliderThumb, decorators: [{
153
- type: Directive,
154
- args: [{
155
- selector: 'input[ngsSliderThumb]',
156
- exportAs: 'ngsSliderThumb',
157
- providers: [
158
- {
159
- provide: NG_VALUE_ACCESSOR,
160
- useExisting: forwardRef(() => SliderThumb),
161
- multi: true,
162
- },
163
- ],
164
- host: {
165
- 'class': 'ngs-slider-input',
166
- '[class.ngs-slider-input-active]': '_slider._activeThumb() === this',
167
- 'type': 'range',
168
- '[attr.min]': 'min',
169
- '[attr.max]': 'max',
170
- '[attr.step]': 'step',
171
- '[value]': 'value',
172
- '(input)': '_onInput($event)',
173
- '(change)': '_onChange($event)',
174
- '(blur)': '_onBlur()',
175
- '(focus)': '_onFocus()',
176
- },
177
- }]
178
- }], ctorParameters: () => [], propDecorators: { valueChange: [{ type: i0.Output, args: ["valueChange"] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
179
-
180
- class Slider {
181
- elementRef = inject(ElementRef);
182
- _cdr = inject(ChangeDetectorRef);
183
- _dir = inject(Directionality, { optional: true });
184
- _destroyRef = inject(DestroyRef);
185
- _document = inject(DOCUMENT);
186
- _platformId = inject(PLATFORM_ID);
187
- disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
188
- discrete = input(false, { ...(ngDevMode ? { debugName: "discrete" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
189
- showTickMarks = input(false, { ...(ngDevMode ? { debugName: "showTickMarks" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
190
- min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
191
- max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
192
- step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
193
- displayWith = input((value) => `${value}`, /* @ts-ignore */
194
- ...(ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []));
195
- _allThumbs = contentChildren(SliderThumb, { ...(ngDevMode ? { debugName: "_allThumbs" } : /* istanbul ignore next */ {}), descendants: true });
196
- _trackLeft = computed(() => {
197
- const thumbs = this._allThumbs();
198
- if (thumbs.length === 2) {
199
- const p1 = thumbs[0].percentage || 0;
200
- const p2 = thumbs[1].percentage || 0;
201
- return Math.min(p1, p2) * 100;
202
- }
203
- return 0;
204
- }, /* @ts-ignore */
205
- ...(ngDevMode ? [{ debugName: "_trackLeft" }] : /* istanbul ignore next */ []));
206
- _trackRight = computed(() => {
207
- const thumbs = this._allThumbs();
208
- if (thumbs.length === 2) {
209
- const p1 = thumbs[0].percentage || 0;
210
- const p2 = thumbs[1].percentage || 0;
211
- return (1 - Math.max(p1, p2)) * 100;
212
- }
213
- const thumb = thumbs[0];
214
- return (1 - (thumb?.percentage || 0)) * 100;
215
- }, /* @ts-ignore */
216
- ...(ngDevMode ? [{ debugName: "_trackRight" }] : /* istanbul ignore next */ []));
217
- _activeThumb = signal(null, /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "_activeThumb" }] : /* istanbul ignore next */ []));
219
- _isDragging = signal(false, /* @ts-ignore */
220
- ...(ngDevMode ? [{ debugName: "_isDragging" }] : /* istanbul ignore next */ []));
221
- _tickMarks = computed(() => {
222
- if (!this.showTickMarks() || this.step() <= 0) {
223
- return [];
224
- }
225
- const count = Math.floor((this.max() - this.min()) / this.step()) + 1;
226
- return Array(count).fill(1); // 1 = inactive by default
227
- }, /* @ts-ignore */
228
- ...(ngDevMode ? [{ debugName: "_tickMarks" }] : /* istanbul ignore next */ []));
229
- _isRtl = false;
230
- constructor() {
231
- if (this._dir) {
232
- this._dir.change.pipe(takeUntilDestroyed()).subscribe(() => {
233
- this._isRtl = this._dir.value === 'rtl';
234
- this._cdr.markForCheck();
235
- });
236
- this._isRtl = this._dir.value === 'rtl';
237
- }
238
- effect(() => {
239
- this._allThumbs();
240
- this._cdr.markForCheck();
241
- });
242
- this._initializeEvents();
243
- }
244
- _initializeEvents() {
245
- if (!isPlatformBrowser(this._platformId)) {
246
- return;
247
- }
248
- const sliderElement = this.elementRef.nativeElement;
249
- const pointerDown$ = merge(fromEvent(sliderElement, 'mousedown'), fromEvent(sliderElement, 'touchstart', { passive: false })).pipe(filter((event) => {
250
- if (this.disabled())
251
- return false;
252
- return !(event instanceof MouseEvent && event.button !== 0);
253
- }));
254
- const pointerMove$ = merge(fromEvent(this._document, 'mousemove'), fromEvent(this._document, 'touchmove', { passive: false }));
255
- const pointerUp$ = merge(fromEvent(this._document, 'mouseup'), fromEvent(this._document, 'touchend', { passive: false }), fromEvent(this._document, 'touchcancel', { passive: false }));
256
- pointerDown$
257
- .pipe(filter(() => !this.disabled()), tap((event) => {
258
- if (event instanceof TouchEvent) {
259
- event.preventDefault();
260
- }
261
- this._isDragging.set(true);
262
- this._onPointerDown(event);
263
- this._cdr.markForCheck();
264
- }), switchMap(() => pointerMove$.pipe(tap((event) => {
265
- if (event instanceof TouchEvent) {
266
- event.preventDefault();
267
- }
268
- }), takeUntil(pointerUp$.pipe(tap(() => {
269
- this._isDragging.set(false);
270
- this._cdr.markForCheck();
271
- }))))), takeUntilDestroyed(this._destroyRef))
272
- .subscribe((event) => {
273
- this._onPointerMove(event);
274
- });
275
- merge(fromEvent(sliderElement, 'mousemove'), fromEvent(sliderElement, 'touchmove', { passive: false }))
276
- .pipe(filter(() => !this.disabled() && !this._isDragging()), takeUntilDestroyed(this._destroyRef))
277
- .subscribe((event) => {
278
- this._onPointerMove(event);
279
- });
280
- }
281
- _onValueChange(thumb) {
282
- this._cdr.markForCheck();
283
- }
284
- _findClosestThumb(percentage) {
285
- const thumbs = this._allThumbs();
286
- if (thumbs.length === 0) {
287
- return null;
288
- }
289
- let closestThumb = thumbs[0];
290
- let minDistance = Math.abs(thumbs[0].percentage - percentage);
291
- for (let i = 1; i < thumbs.length; i++) {
292
- const distance = Math.abs(thumbs[i].percentage - percentage);
293
- if (distance < minDistance) {
294
- minDistance = distance;
295
- closestThumb = thumbs[i];
296
- }
297
- else if (distance === minDistance) {
298
- // If distances are equal (e.g., thumbs are at the same point)
299
- if (percentage > thumbs[i].percentage) {
300
- // If click is to the right of the overlap point, select the "right" thumb
301
- // (in the array thumbs[1] is usually the end thumb)
302
- closestThumb = thumbs[i];
303
- }
304
- else if (percentage < thumbs[i].percentage) {
305
- // If click is to the left
306
- closestThumb = thumbs[i - 1];
307
- }
308
- else {
309
- // If click is exactly at the overlap point
310
- // give priority to the already active one
311
- if (thumbs[i] === this._activeThumb()) {
312
- closestThumb = thumbs[i];
313
- }
314
- }
315
- }
316
- }
317
- return closestThumb;
318
- }
319
- _onPointerDown(event) {
320
- if (this.disabled()) {
321
- return;
322
- }
323
- const percentage = this._calculatePercentage(event);
324
- const closestThumb = this._findClosestThumb(percentage);
325
- if (closestThumb) {
326
- this._activeThumb.set(closestThumb);
327
- const value = this._calculateValueFromPercentage(percentage);
328
- closestThumb._updateValueFromUser(value);
329
- closestThumb.focus();
330
- this._cdr.markForCheck();
331
- }
332
- }
333
- _onPointerMove(event) {
334
- if (this.disabled()) {
335
- return;
336
- }
337
- const percentage = this._calculatePercentage(event);
338
- const isDragging = this._isDragging();
339
- const activeThumb = this._activeThumb();
340
- if (isDragging && activeThumb) {
341
- const value = this._calculateValueFromPercentage(percentage);
342
- activeThumb._updateValueFromUser(value);
343
- this._cdr.markForCheck();
344
- }
345
- else if (!isDragging) {
346
- const closestThumb = this._findClosestThumb(percentage);
347
- if (closestThumb && activeThumb !== closestThumb) {
348
- this._activeThumb.set(closestThumb);
349
- this._cdr.markForCheck();
350
- }
351
- }
352
- }
353
- _calculatePercentage(event) {
354
- const sliderElement = this.elementRef.nativeElement;
355
- const wrapper = sliderElement.querySelector('.ngs-slider-wrapper');
356
- const rect = (wrapper || sliderElement).getBoundingClientRect();
357
- const clientX = 'touches' in event ? event.touches[0].clientX : event.clientX;
358
- let position = (clientX - rect.left) / rect.width;
359
- position = Math.max(0, Math.min(1, position));
360
- return this._isRtl ? 1 - position : position;
361
- }
362
- _calculateValueFromPercentage(percentage) {
363
- const min = this.min();
364
- const max = this.max();
365
- const step = this.step();
366
- const rawValue = min + percentage * (max - min);
367
- let value = rawValue;
368
- if (step > 0) {
369
- value = Math.round(rawValue / step) * step;
370
- }
371
- return Math.max(min, Math.min(max, value));
372
- }
373
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Slider, deps: [], target: i0.ɵɵFactoryTarget.Component });
374
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Slider, isStandalone: true, selector: "ngs-slider", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, discrete: { classPropertyName: "discrete", publicName: "discrete", isSignal: true, isRequired: false, transformFunction: null }, showTickMarks: { classPropertyName: "showTickMarks", publicName: "showTickMarks", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ngs-slider-disabled": "disabled()", "class.ngs-slider-discrete": "discrete()", "class.ngs-slider-show-tick-marks": "showTickMarks()" }, classAttribute: "ngs-slider" }, queries: [{ propertyName: "_allThumbs", predicate: SliderThumb, descendants: true, isSignal: true }], exportAs: ["ngsSlider"], ngImport: i0, template: "<div class=\"ngs-slider-wrapper\">\n <div class=\"ngs-slider-track\">\n <div class=\"ngs-slider-track-background\"></div>\n <div class=\"ngs-slider-track-active\"\n [style.left.%]=\"(_trackLeft() / 100) * 100\"\n [style.right.%]=\"(_trackRight() / 100) * 100\"></div>\n @if (showTickMarks()) {\n <div class=\"ngs-slider-tick-marks\">\n @for (tick of _tickMarks(); track $index) {\n <div class=\"ngs-slider-tick-mark\" [class.ngs-slider-tick-mark-active]=\"tick === 0\"></div>\n }\n </div>\n }\n </div>\n\n <ng-content />\n\n <div class=\"ngs-slider-visual-thumbs\">\n @for (thumb of _allThumbs(); track thumb) {\n <div class=\"ngs-slider-visual-thumb\"\n [style.left.%]=\"thumb.percentage * 100\"\n [class.ngs-slider-visual-thumb-active]=\"thumb === _activeThumb()\">\n <div class=\"ngs-slider-thumb-knob\"></div>\n @if (discrete()) {\n <div class=\"ngs-slider-value-indicator-container\">\n <div class=\"ngs-slider-value-indicator\">\n <span class=\"ngs-slider-value-indicator-text\">{{ displayWith()(thumb.value) }}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{--ngs-slider-track-height: 4px;--ngs-slider-track-active-height: 6px;--ngs-slider-track-color: var(--ngs-color-surface-container-high);--ngs-slider-track-active-color: var(--ngs-color-primary);--ngs-slider-thumb-size: 20px;--ngs-slider-thumb-color: var(--ngs-color-primary);--ngs-slider-thumb-ripple-color: rgba(36, 91, 255, .5);--ngs-slider-thumb-ripple-width: 6px;--ngs-slider-tick-mark-color: var(--ngs-color-on-surface-variant);--ngs-slider-tick-mark-active-color: var(--ngs-color-on-primary);--ngs-slider-value-indicator-color: var(--ngs-color-on-surface);--ngs-slider-value-indicator-text-color: var(--ngs-color-surface);display:block;position:relative;box-sizing:border-box;padding:8px 0;width:100%;height:48px;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:none}@supports (color: color-mix(in lab,red,red)){:host{--ngs-slider-tick-mark-active-color: color-mix(in srgb, var(--ngs-color-on-primary), transparent 40%)}}:host.ngs-slider-disabled{opacity:.38;pointer-events:none}:host .ngs-slider-wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box}:host .ngs-slider-track{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-track-height);background:var(--ngs-slider-track-color);border-radius:calc(var(--ngs-slider-track-height) / 2)}:host .ngs-slider-track-active{position:absolute;height:var(--ngs-slider-track-active-height);background:var(--ngs-slider-track-active-color);border-radius:calc(var(--ngs-slider-track-active-height) / 2);top:50%;transform:translateY(-50%)}:host .ngs-slider-tick-marks{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}:host .ngs-slider-tick-mark{width:2px;height:2px;background:var(--ngs-slider-tick-mark-color);border-radius:50%}:host .ngs-slider-tick-mark.ngs-slider-tick-mark-active{background:var(--ngs-slider-tick-mark-active-color)}:host ::ng-deep .ngs-slider-input{position:absolute;top:50%;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-thumb-size);transform:translateY(-50%);opacity:0;cursor:pointer;z-index:2;margin:0;padding:0;pointer-events:auto;width:calc(100% - var(--ngs-slider-thumb-size));appearance:none;background:transparent;border:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-runnable-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-thumb{appearance:none;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;margin-top:0;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none;border-radius:0}:host ::ng-deep .ngs-slider-input::-ms-track{width:100%;height:100%;background:transparent;border-color:transparent;color:transparent}:host ::ng-deep .ngs-slider-input::-ms-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input.ngs-slider-input-active{z-index:4;pointer-events:auto}:host ::ng-deep .ngs-slider-input:not(.ngs-slider-input-active){z-index:2}:host ::ng-deep .ngs-slider-input:focus+.ngs-slider-visual-thumbs .ngs-slider-thumb-knob{box-shadow:0 0 0 var(--ngs-slider-thumb-ripple-width) var(--ngs-slider-thumb-ripple-color)}:host .ngs-slider-visual-thumbs{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;top:0;pointer-events:none}:host .ngs-slider-visual-thumb{position:absolute;top:50%;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);transform:translate(-50%,-50%);z-index:1}:host .ngs-slider-visual-thumb.ngs-slider-visual-thumb-active{z-index:2}:host .ngs-slider-thumb-knob{width:100%;height:100%;background:var(--ngs-slider-thumb-color);border-radius:50%;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}:host .ngs-slider-value-indicator-container{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(-8px);padding:4px 8px;background:var(--ngs-slider-value-indicator-color);color:var(--ngs-slider-value-indicator-text-color);border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;transition:opacity .1s ease-in-out}:host .ngs-slider-value-indicator-container:after{content:\"\";position:absolute;top:100%;left:50%;transform:translate(-50%);border-width:4px;border-style:solid;border-color:var(--ngs-slider-value-indicator-color) transparent transparent transparent}:host:active .ngs-slider-value-indicator-container,:host .ngs-slider-input:focus~.ngs-slider-visual-thumbs .ngs-slider-value-indicator-container{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
375
- }
376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Slider, decorators: [{
377
- type: Component,
378
- args: [{ selector: 'ngs-slider', exportAs: 'ngsSlider', changeDetection: ChangeDetectionStrategy.OnPush, host: {
379
- 'class': 'ngs-slider',
380
- '[class.ngs-slider-disabled]': 'disabled()',
381
- '[class.ngs-slider-discrete]': 'discrete()',
382
- '[class.ngs-slider-show-tick-marks]': 'showTickMarks()',
383
- }, template: "<div class=\"ngs-slider-wrapper\">\n <div class=\"ngs-slider-track\">\n <div class=\"ngs-slider-track-background\"></div>\n <div class=\"ngs-slider-track-active\"\n [style.left.%]=\"(_trackLeft() / 100) * 100\"\n [style.right.%]=\"(_trackRight() / 100) * 100\"></div>\n @if (showTickMarks()) {\n <div class=\"ngs-slider-tick-marks\">\n @for (tick of _tickMarks(); track $index) {\n <div class=\"ngs-slider-tick-mark\" [class.ngs-slider-tick-mark-active]=\"tick === 0\"></div>\n }\n </div>\n }\n </div>\n\n <ng-content />\n\n <div class=\"ngs-slider-visual-thumbs\">\n @for (thumb of _allThumbs(); track thumb) {\n <div class=\"ngs-slider-visual-thumb\"\n [style.left.%]=\"thumb.percentage * 100\"\n [class.ngs-slider-visual-thumb-active]=\"thumb === _activeThumb()\">\n <div class=\"ngs-slider-thumb-knob\"></div>\n @if (discrete()) {\n <div class=\"ngs-slider-value-indicator-container\">\n <div class=\"ngs-slider-value-indicator\">\n <span class=\"ngs-slider-value-indicator-text\">{{ displayWith()(thumb.value) }}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [":host{--ngs-slider-track-height: 4px;--ngs-slider-track-active-height: 6px;--ngs-slider-track-color: var(--ngs-color-surface-container-high);--ngs-slider-track-active-color: var(--ngs-color-primary);--ngs-slider-thumb-size: 20px;--ngs-slider-thumb-color: var(--ngs-color-primary);--ngs-slider-thumb-ripple-color: rgba(36, 91, 255, .5);--ngs-slider-thumb-ripple-width: 6px;--ngs-slider-tick-mark-color: var(--ngs-color-on-surface-variant);--ngs-slider-tick-mark-active-color: var(--ngs-color-on-primary);--ngs-slider-value-indicator-color: var(--ngs-color-on-surface);--ngs-slider-value-indicator-text-color: var(--ngs-color-surface);display:block;position:relative;box-sizing:border-box;padding:8px 0;width:100%;height:48px;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:none}@supports (color: color-mix(in lab,red,red)){:host{--ngs-slider-tick-mark-active-color: color-mix(in srgb, var(--ngs-color-on-primary), transparent 40%)}}:host.ngs-slider-disabled{opacity:.38;pointer-events:none}:host .ngs-slider-wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box}:host .ngs-slider-track{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-track-height);background:var(--ngs-slider-track-color);border-radius:calc(var(--ngs-slider-track-height) / 2)}:host .ngs-slider-track-active{position:absolute;height:var(--ngs-slider-track-active-height);background:var(--ngs-slider-track-active-color);border-radius:calc(var(--ngs-slider-track-active-height) / 2);top:50%;transform:translateY(-50%)}:host .ngs-slider-tick-marks{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}:host .ngs-slider-tick-mark{width:2px;height:2px;background:var(--ngs-slider-tick-mark-color);border-radius:50%}:host .ngs-slider-tick-mark.ngs-slider-tick-mark-active{background:var(--ngs-slider-tick-mark-active-color)}:host ::ng-deep .ngs-slider-input{position:absolute;top:50%;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-thumb-size);transform:translateY(-50%);opacity:0;cursor:pointer;z-index:2;margin:0;padding:0;pointer-events:auto;width:calc(100% - var(--ngs-slider-thumb-size));appearance:none;background:transparent;border:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-runnable-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-thumb{appearance:none;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;margin-top:0;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none;border-radius:0}:host ::ng-deep .ngs-slider-input::-ms-track{width:100%;height:100%;background:transparent;border-color:transparent;color:transparent}:host ::ng-deep .ngs-slider-input::-ms-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input.ngs-slider-input-active{z-index:4;pointer-events:auto}:host ::ng-deep .ngs-slider-input:not(.ngs-slider-input-active){z-index:2}:host ::ng-deep .ngs-slider-input:focus+.ngs-slider-visual-thumbs .ngs-slider-thumb-knob{box-shadow:0 0 0 var(--ngs-slider-thumb-ripple-width) var(--ngs-slider-thumb-ripple-color)}:host .ngs-slider-visual-thumbs{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;top:0;pointer-events:none}:host .ngs-slider-visual-thumb{position:absolute;top:50%;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);transform:translate(-50%,-50%);z-index:1}:host .ngs-slider-visual-thumb.ngs-slider-visual-thumb-active{z-index:2}:host .ngs-slider-thumb-knob{width:100%;height:100%;background:var(--ngs-slider-thumb-color);border-radius:50%;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}:host .ngs-slider-value-indicator-container{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(-8px);padding:4px 8px;background:var(--ngs-slider-value-indicator-color);color:var(--ngs-slider-value-indicator-text-color);border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;transition:opacity .1s ease-in-out}:host .ngs-slider-value-indicator-container:after{content:\"\";position:absolute;top:100%;left:50%;transform:translate(-50%);border-width:4px;border-style:solid;border-color:var(--ngs-slider-value-indicator-color) transparent transparent transparent}:host:active .ngs-slider-value-indicator-container,:host .ngs-slider-input:focus~.ngs-slider-visual-thumbs .ngs-slider-value-indicator-container{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
384
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], discrete: [{ type: i0.Input, args: [{ isSignal: true, alias: "discrete", required: false }] }], showTickMarks: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTickMarks", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], displayWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayWith", required: false }] }], _allThumbs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SliderThumb), { ...{ descendants: true }, isSignal: true }] }] } });
385
-
386
- class SliderStartThumb extends SliderThumb {
387
- getId() {
388
- return 'start';
389
- }
390
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SliderStartThumb, deps: null, target: i0.ɵɵFactoryTarget.Directive });
391
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SliderStartThumb, isStandalone: true, selector: "input[ngsSliderStartThumb]", host: { attributes: { "type": "range" }, listeners: { "input": "_onInput($event)", "change": "_onChange($event)", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "class.ngs-slider-input-active": "_slider._activeThumb() === this", "attr.min": "min", "attr.max": "max", "attr.step": "step", "value": "value" }, classAttribute: "ngs-slider-input" }, providers: [
392
- {
393
- provide: SliderThumb,
394
- useExisting: forwardRef(() => SliderStartThumb),
395
- },
396
- {
397
- provide: NG_VALUE_ACCESSOR,
398
- useExisting: forwardRef(() => SliderStartThumb),
399
- multi: true,
400
- },
401
- ], usesInheritance: true, ngImport: i0 });
402
- }
403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SliderStartThumb, decorators: [{
404
- type: Directive,
405
- args: [{
406
- selector: 'input[ngsSliderStartThumb]',
407
- standalone: true,
408
- host: {
409
- 'class': 'ngs-slider-input',
410
- '[class.ngs-slider-input-active]': '_slider._activeThumb() === this',
411
- 'type': 'range',
412
- '[attr.min]': 'min',
413
- '[attr.max]': 'max',
414
- '[attr.step]': 'step',
415
- '[value]': 'value',
416
- '(input)': '_onInput($event)',
417
- '(change)': '_onChange($event)',
418
- '(blur)': '_onBlur()',
419
- '(focus)': '_onFocus()',
420
- },
421
- providers: [
422
- {
423
- provide: SliderThumb,
424
- useExisting: forwardRef(() => SliderStartThumb),
425
- },
426
- {
427
- provide: NG_VALUE_ACCESSOR,
428
- useExisting: forwardRef(() => SliderStartThumb),
429
- multi: true,
430
- },
431
- ],
432
- }]
433
- }] });
434
-
435
- class SliderEndThumb extends SliderThumb {
436
- getId() {
437
- return 'end';
438
- }
439
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SliderEndThumb, deps: null, target: i0.ɵɵFactoryTarget.Directive });
440
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SliderEndThumb, isStandalone: true, selector: "input[ngsSliderEndThumb]", host: { attributes: { "type": "range" }, listeners: { "input": "_onInput($event)", "change": "_onChange($event)", "blur": "_onBlur()", "focus": "_onFocus()" }, properties: { "class.ngs-slider-input-active": "_slider._activeThumb() === this", "attr.min": "min", "attr.max": "max", "attr.step": "step", "value": "value" }, classAttribute: "ngs-slider-input" }, providers: [
441
- {
442
- provide: SliderThumb,
443
- useExisting: forwardRef(() => SliderEndThumb),
444
- },
445
- {
446
- provide: NG_VALUE_ACCESSOR,
447
- useExisting: forwardRef(() => SliderEndThumb),
448
- multi: true,
449
- },
450
- ], usesInheritance: true, ngImport: i0 });
451
- }
452
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SliderEndThumb, decorators: [{
453
- type: Directive,
454
- args: [{
455
- selector: 'input[ngsSliderEndThumb]',
456
- host: {
457
- 'class': 'ngs-slider-input',
458
- '[class.ngs-slider-input-active]': '_slider._activeThumb() === this',
459
- 'type': 'range',
460
- '[attr.min]': 'min',
461
- '[attr.max]': 'max',
462
- '[attr.step]': 'step',
463
- '[value]': 'value',
464
- '(input)': '_onInput($event)',
465
- '(change)': '_onChange($event)',
466
- '(blur)': '_onBlur()',
467
- '(focus)': '_onFocus()',
468
- },
469
- providers: [
470
- {
471
- provide: SliderThumb,
472
- useExisting: forwardRef(() => SliderEndThumb),
473
- },
474
- {
475
- provide: NG_VALUE_ACCESSOR,
476
- useExisting: forwardRef(() => SliderEndThumb),
477
- multi: true,
478
- },
479
- ],
480
- }]
481
- }] });
482
-
483
- /**
484
- * Generated bundle index. Do not edit.
485
- */
486
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Directive, ElementRef, PLATFORM_ID, booleanAttribute, computed, contentChildren, effect, forwardRef, inject, input, model, numberAttribute, output, signal } from "@angular/core";
3
+ import { DOCUMENT as DOCUMENT$1, isPlatformBrowser } from "@angular/common";
4
+ import { connectLegacyNativeFormControl } from "@ngstarter-ui/components/core";
5
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
6
+ import { filter, fromEvent, merge, switchMap, takeUntil, tap } from "rxjs";
7
+ import { Directionality } from "@angular/cdk/bidi";
8
+ var SliderThumb = class SliderThumb {
9
+ _elementRef = inject(ElementRef);
10
+ _slider = inject(Slider);
11
+ value = model(this._slider.min(), ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
12
+ touch = output();
13
+ disabled = input(false, {
14
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
15
+ transform: booleanAttribute
16
+ });
17
+ readonly = input(false, {
18
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
19
+ transform: booleanAttribute
20
+ });
21
+ legacyDisabled = signal(false, ...ngDevMode ? [{ debugName: "legacyDisabled" }] : /* istanbul ignore next */ []);
22
+ _value = signal(0, ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
23
+ getId() {
24
+ return "base";
25
+ }
26
+ get renderedValue() {
27
+ return this._value();
28
+ }
29
+ _clampValue(v) {
30
+ const thumbs = this._slider._allThumbs();
31
+ const min = this._slider.min();
32
+ const max = this._slider.max();
33
+ if (thumbs.length === 2) {
34
+ const index = thumbs.indexOf(this);
35
+ if (index === 0) return Math.max(min, Math.min(v, thumbs[1].renderedValue));
36
+ else if (index === 1) return Math.min(max, Math.max(v, thumbs[0].renderedValue));
37
+ }
38
+ return Math.max(min, Math.min(max, v));
39
+ }
40
+ constructor() {
41
+ connectLegacyNativeFormControl(this.value, this.touch, (value) => this.value.set(value), this.legacyDisabled.set);
42
+ effect(() => {
43
+ const value = this.value() ?? this._slider.min();
44
+ this._value.set(this._clampValue(Number(value)));
45
+ });
46
+ }
47
+ ngOnInit() {
48
+ this._value.set(this._clampValue(Number(this.value() ?? this._slider.min())));
49
+ this._slider._onValueChange(this);
50
+ }
51
+ get minimum() {
52
+ return this._slider.min();
53
+ }
54
+ get maximum() {
55
+ return this._slider.max();
56
+ }
57
+ get step() {
58
+ return this._slider.step();
59
+ }
60
+ _updateValueFromUser(value) {
61
+ if (this.disabled() || this.legacyDisabled() || this.readonly() || this._slider.disabled()) return;
62
+ const clampedValue = this._clampValue(value);
63
+ if (this._value() !== clampedValue) {
64
+ this._value.set(clampedValue);
65
+ this.value.set(clampedValue);
66
+ this._slider._onValueChange(this);
67
+ }
68
+ }
69
+ _onInput(event) {
70
+ const input = event.target;
71
+ if (this._slider._allThumbs().length < 2 || this._slider._activeThumb() === this) {
72
+ this._updateValueFromUser(input.valueAsNumber);
73
+ this._slider._activeThumb.set(this);
74
+ }
75
+ input.valueAsNumber = this.renderedValue;
76
+ }
77
+ _onBlur() {
78
+ this.touch.emit();
79
+ }
80
+ _onFocus() {
81
+ this._slider._activeThumb.set(this);
82
+ }
83
+ focus() {
84
+ this._elementRef.nativeElement.focus();
85
+ }
86
+ get percentage() {
87
+ const max = this._slider.max();
88
+ const min = this._slider.min();
89
+ if (max === min) return 0;
90
+ const p = (this._value() - min) / (max - min);
91
+ return Math.max(0, Math.min(1, p));
92
+ }
93
+ static ɵfac = i0.ɵɵngDeclareFactory({
94
+ minVersion: "12.0.0",
95
+ version: "22.3.0",
96
+ ngImport: i0,
97
+ type: SliderThumb,
98
+ deps: [],
99
+ target: i0.ɵɵFactoryTarget.Directive
100
+ });
101
+ static ɵdir = i0.ɵɵngDeclareDirective({
102
+ minVersion: "17.1.0",
103
+ version: "22.3.0",
104
+ type: SliderThumb,
105
+ isStandalone: true,
106
+ selector: "input[ngsSliderThumb]",
107
+ inputs: {
108
+ value: {
109
+ classPropertyName: "value",
110
+ publicName: "value",
111
+ isSignal: true,
112
+ isRequired: false,
113
+ transformFunction: null
114
+ },
115
+ disabled: {
116
+ classPropertyName: "disabled",
117
+ publicName: "disabled",
118
+ isSignal: true,
119
+ isRequired: false,
120
+ transformFunction: null
121
+ },
122
+ readonly: {
123
+ classPropertyName: "readonly",
124
+ publicName: "readonly",
125
+ isSignal: true,
126
+ isRequired: false,
127
+ transformFunction: null
128
+ }
129
+ },
130
+ outputs: {
131
+ value: "valueChange",
132
+ touch: "touch"
133
+ },
134
+ host: {
135
+ attributes: { "type": "range" },
136
+ listeners: {
137
+ "input": "_onInput($event)",
138
+ "blur": "_onBlur()",
139
+ "focus": "_onFocus()"
140
+ },
141
+ properties: {
142
+ "class.ngs-slider-input-active": "_slider._activeThumb() === this",
143
+ "attr.min": "minimum",
144
+ "attr.max": "maximum",
145
+ "attr.step": "step",
146
+ "value": "renderedValue",
147
+ "disabled": "disabled() || legacyDisabled() || _slider.disabled()",
148
+ "attr.aria-readonly": "readonly() || null"
149
+ },
150
+ classAttribute: "ngs-slider-input"
151
+ },
152
+ exportAs: ["ngsSliderThumb"],
153
+ ngImport: i0
154
+ });
155
+ };
156
+ i0.ɵɵngDeclareClassMetadata({
157
+ minVersion: "12.0.0",
158
+ version: "22.3.0",
159
+ ngImport: i0,
160
+ type: SliderThumb,
161
+ decorators: [{
162
+ type: Directive,
163
+ args: [{
164
+ selector: "input[ngsSliderThumb]",
165
+ exportAs: "ngsSliderThumb",
166
+ host: {
167
+ "class": "ngs-slider-input",
168
+ "[class.ngs-slider-input-active]": "_slider._activeThumb() === this",
169
+ "type": "range",
170
+ "[attr.min]": "minimum",
171
+ "[attr.max]": "maximum",
172
+ "[attr.step]": "step",
173
+ "[value]": "renderedValue",
174
+ "[disabled]": "disabled() || legacyDisabled() || _slider.disabled()",
175
+ "[attr.aria-readonly]": "readonly() || null",
176
+ "(input)": "_onInput($event)",
177
+ "(blur)": "_onBlur()",
178
+ "(focus)": "_onFocus()"
179
+ }
180
+ }]
181
+ }],
182
+ ctorParameters: () => [],
183
+ propDecorators: {
184
+ value: [{
185
+ type: i0.Input,
186
+ args: [{
187
+ isSignal: true,
188
+ alias: "value",
189
+ required: false
190
+ }]
191
+ }, {
192
+ type: i0.Output,
193
+ args: ["valueChange"]
194
+ }],
195
+ touch: [{
196
+ type: i0.Output,
197
+ args: ["touch"]
198
+ }],
199
+ disabled: [{
200
+ type: i0.Input,
201
+ args: [{
202
+ isSignal: true,
203
+ alias: "disabled",
204
+ required: false
205
+ }]
206
+ }],
207
+ readonly: [{
208
+ type: i0.Input,
209
+ args: [{
210
+ isSignal: true,
211
+ alias: "readonly",
212
+ required: false
213
+ }]
214
+ }]
215
+ }
216
+ });
217
+ var Slider = class Slider {
218
+ elementRef = inject(ElementRef);
219
+ _cdr = inject(ChangeDetectorRef);
220
+ _dir = inject(Directionality, { optional: true });
221
+ _destroyRef = inject(DestroyRef);
222
+ _document = inject(DOCUMENT$1);
223
+ _platformId = inject(PLATFORM_ID);
224
+ disabled = input(false, {
225
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
226
+ transform: booleanAttribute
227
+ });
228
+ discrete = input(false, {
229
+ ...ngDevMode ? { debugName: "discrete" } : /* istanbul ignore next */ {},
230
+ transform: booleanAttribute
231
+ });
232
+ showTickMarks = input(false, {
233
+ ...ngDevMode ? { debugName: "showTickMarks" } : /* istanbul ignore next */ {},
234
+ transform: booleanAttribute
235
+ });
236
+ min = input(0, {
237
+ ...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
238
+ transform: numberAttribute
239
+ });
240
+ max = input(100, {
241
+ ...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
242
+ transform: numberAttribute
243
+ });
244
+ step = input(1, {
245
+ ...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
246
+ transform: numberAttribute
247
+ });
248
+ displayWith = input((value) => `${value}`, ...ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []);
249
+ _allThumbs = contentChildren(SliderThumb, {
250
+ ...ngDevMode ? { debugName: "_allThumbs" } : /* istanbul ignore next */ {},
251
+ descendants: true
252
+ });
253
+ _trackLeft = computed(() => {
254
+ const thumbs = this._allThumbs();
255
+ if (thumbs.length === 2) {
256
+ const p1 = thumbs[0].percentage || 0;
257
+ const p2 = thumbs[1].percentage || 0;
258
+ return Math.min(p1, p2) * 100;
259
+ }
260
+ return 0;
261
+ }, ...ngDevMode ? [{ debugName: "_trackLeft" }] : /* istanbul ignore next */ []);
262
+ _trackRight = computed(() => {
263
+ const thumbs = this._allThumbs();
264
+ if (thumbs.length === 2) {
265
+ const p1 = thumbs[0].percentage || 0;
266
+ const p2 = thumbs[1].percentage || 0;
267
+ return (1 - Math.max(p1, p2)) * 100;
268
+ }
269
+ return (1 - (thumbs[0]?.percentage || 0)) * 100;
270
+ }, ...ngDevMode ? [{ debugName: "_trackRight" }] : /* istanbul ignore next */ []);
271
+ _activeThumb = signal(null, ...ngDevMode ? [{ debugName: "_activeThumb" }] : /* istanbul ignore next */ []);
272
+ _isDragging = signal(false, ...ngDevMode ? [{ debugName: "_isDragging" }] : /* istanbul ignore next */ []);
273
+ _tickMarks = computed(() => {
274
+ if (!this.showTickMarks() || this.step() <= 0) return [];
275
+ const count = Math.floor((this.max() - this.min()) / this.step()) + 1;
276
+ return Array(count).fill(1);
277
+ }, ...ngDevMode ? [{ debugName: "_tickMarks" }] : /* istanbul ignore next */ []);
278
+ _isRtl = false;
279
+ constructor() {
280
+ if (this._dir) {
281
+ this._dir.change.pipe(takeUntilDestroyed()).subscribe(() => {
282
+ this._isRtl = this._dir.value === "rtl";
283
+ this._cdr.markForCheck();
284
+ });
285
+ this._isRtl = this._dir.value === "rtl";
286
+ }
287
+ effect(() => {
288
+ this._allThumbs();
289
+ this._cdr.markForCheck();
290
+ });
291
+ this._initializeEvents();
292
+ }
293
+ _initializeEvents() {
294
+ if (!isPlatformBrowser(this._platformId)) return;
295
+ const sliderElement = this.elementRef.nativeElement;
296
+ const pointerDown$ = merge(fromEvent(sliderElement, "mousedown"), fromEvent(sliderElement, "touchstart", { passive: false })).pipe(filter((event) => {
297
+ if (this.disabled()) return false;
298
+ return !(event instanceof MouseEvent && event.button !== 0);
299
+ }));
300
+ const pointerMove$ = merge(fromEvent(this._document, "mousemove"), fromEvent(this._document, "touchmove", { passive: false }));
301
+ const pointerUp$ = merge(fromEvent(this._document, "mouseup"), fromEvent(this._document, "touchend", { passive: false }), fromEvent(this._document, "touchcancel", { passive: false }));
302
+ pointerDown$.pipe(filter(() => !this.disabled()), tap((event) => {
303
+ if (event instanceof TouchEvent) event.preventDefault();
304
+ this._isDragging.set(true);
305
+ this._onPointerDown(event);
306
+ this._cdr.markForCheck();
307
+ }), switchMap(() => pointerMove$.pipe(tap((event) => {
308
+ if (event instanceof TouchEvent) event.preventDefault();
309
+ }), takeUntil(pointerUp$.pipe(tap(() => {
310
+ this._isDragging.set(false);
311
+ this._cdr.markForCheck();
312
+ }))))), takeUntilDestroyed(this._destroyRef)).subscribe((event) => {
313
+ this._onPointerMove(event);
314
+ });
315
+ merge(fromEvent(sliderElement, "mousemove"), fromEvent(sliderElement, "touchmove", { passive: false })).pipe(filter(() => !this.disabled() && !this._isDragging()), takeUntilDestroyed(this._destroyRef)).subscribe((event) => {
316
+ this._onPointerMove(event);
317
+ });
318
+ }
319
+ _onValueChange(thumb) {
320
+ this._cdr.markForCheck();
321
+ }
322
+ _findClosestThumb(percentage) {
323
+ const thumbs = this._allThumbs();
324
+ if (thumbs.length === 0) return null;
325
+ let closestThumb = thumbs[0];
326
+ let minDistance = Math.abs(thumbs[0].percentage - percentage);
327
+ for (let i = 1; i < thumbs.length; i++) {
328
+ const distance = Math.abs(thumbs[i].percentage - percentage);
329
+ if (distance < minDistance) {
330
+ minDistance = distance;
331
+ closestThumb = thumbs[i];
332
+ } else if (distance === minDistance) {
333
+ if (percentage > thumbs[i].percentage) closestThumb = thumbs[i];
334
+ else if (percentage < thumbs[i].percentage) closestThumb = thumbs[i - 1];
335
+ else if (thumbs[i] === this._activeThumb()) closestThumb = thumbs[i];
336
+ }
337
+ }
338
+ return closestThumb;
339
+ }
340
+ _onPointerDown(event) {
341
+ if (this.disabled()) return;
342
+ const percentage = this._calculatePercentage(event);
343
+ const closestThumb = this._findClosestThumb(percentage);
344
+ if (closestThumb) {
345
+ this._activeThumb.set(closestThumb);
346
+ const value = this._calculateValueFromPercentage(percentage);
347
+ closestThumb._updateValueFromUser(value);
348
+ closestThumb.focus();
349
+ this._cdr.markForCheck();
350
+ }
351
+ }
352
+ _onPointerMove(event) {
353
+ if (this.disabled()) return;
354
+ const percentage = this._calculatePercentage(event);
355
+ const isDragging = this._isDragging();
356
+ const activeThumb = this._activeThumb();
357
+ if (isDragging && activeThumb) {
358
+ const value = this._calculateValueFromPercentage(percentage);
359
+ activeThumb._updateValueFromUser(value);
360
+ this._cdr.markForCheck();
361
+ } else if (!isDragging) {
362
+ const closestThumb = this._findClosestThumb(percentage);
363
+ if (closestThumb && activeThumb !== closestThumb) {
364
+ this._activeThumb.set(closestThumb);
365
+ this._cdr.markForCheck();
366
+ }
367
+ }
368
+ }
369
+ _calculatePercentage(event) {
370
+ const sliderElement = this.elementRef.nativeElement;
371
+ const rect = (sliderElement.querySelector(".ngs-slider-wrapper") || sliderElement).getBoundingClientRect();
372
+ let position = (("touches" in event ? event.touches[0].clientX : event.clientX) - rect.left) / rect.width;
373
+ position = Math.max(0, Math.min(1, position));
374
+ return this._isRtl ? 1 - position : position;
375
+ }
376
+ _calculateValueFromPercentage(percentage) {
377
+ const min = this.min();
378
+ const max = this.max();
379
+ const step = this.step();
380
+ const rawValue = min + percentage * (max - min);
381
+ let value = rawValue;
382
+ if (step > 0) value = Math.round(rawValue / step) * step;
383
+ return Math.max(min, Math.min(max, value));
384
+ }
385
+ static ɵfac = i0.ɵɵngDeclareFactory({
386
+ minVersion: "12.0.0",
387
+ version: "22.3.0",
388
+ ngImport: i0,
389
+ type: Slider,
390
+ deps: [],
391
+ target: i0.ɵɵFactoryTarget.Component
392
+ });
393
+ static ɵcmp = i0.ɵɵngDeclareComponent({
394
+ minVersion: "17.0.0",
395
+ version: "22.3.0",
396
+ type: Slider,
397
+ isStandalone: true,
398
+ selector: "ngs-slider",
399
+ inputs: {
400
+ disabled: {
401
+ classPropertyName: "disabled",
402
+ publicName: "disabled",
403
+ isSignal: true,
404
+ isRequired: false,
405
+ transformFunction: null
406
+ },
407
+ discrete: {
408
+ classPropertyName: "discrete",
409
+ publicName: "discrete",
410
+ isSignal: true,
411
+ isRequired: false,
412
+ transformFunction: null
413
+ },
414
+ showTickMarks: {
415
+ classPropertyName: "showTickMarks",
416
+ publicName: "showTickMarks",
417
+ isSignal: true,
418
+ isRequired: false,
419
+ transformFunction: null
420
+ },
421
+ min: {
422
+ classPropertyName: "min",
423
+ publicName: "min",
424
+ isSignal: true,
425
+ isRequired: false,
426
+ transformFunction: null
427
+ },
428
+ max: {
429
+ classPropertyName: "max",
430
+ publicName: "max",
431
+ isSignal: true,
432
+ isRequired: false,
433
+ transformFunction: null
434
+ },
435
+ step: {
436
+ classPropertyName: "step",
437
+ publicName: "step",
438
+ isSignal: true,
439
+ isRequired: false,
440
+ transformFunction: null
441
+ },
442
+ displayWith: {
443
+ classPropertyName: "displayWith",
444
+ publicName: "displayWith",
445
+ isSignal: true,
446
+ isRequired: false,
447
+ transformFunction: null
448
+ }
449
+ },
450
+ host: {
451
+ properties: {
452
+ "class.ngs-slider-disabled": "disabled()",
453
+ "class.ngs-slider-discrete": "discrete()",
454
+ "class.ngs-slider-show-tick-marks": "showTickMarks()"
455
+ },
456
+ classAttribute: "ngs-slider"
457
+ },
458
+ queries: [{
459
+ propertyName: "_allThumbs",
460
+ predicate: SliderThumb,
461
+ descendants: true,
462
+ isSignal: true
463
+ }],
464
+ exportAs: ["ngsSlider"],
465
+ ngImport: i0,
466
+ template: "<div class=\"ngs-slider-wrapper\">\n <div class=\"ngs-slider-track\">\n <div class=\"ngs-slider-track-background\"></div>\n <div class=\"ngs-slider-track-active\"\n [style.left.%]=\"(_trackLeft() / 100) * 100\"\n [style.right.%]=\"(_trackRight() / 100) * 100\"></div>\n @if (showTickMarks()) {\n <div class=\"ngs-slider-tick-marks\">\n @for (tick of _tickMarks(); track $index) {\n <div class=\"ngs-slider-tick-mark\" [class.ngs-slider-tick-mark-active]=\"tick === 0\"></div>\n }\n </div>\n }\n </div>\n\n <ng-content />\n\n <div class=\"ngs-slider-visual-thumbs\">\n @for (thumb of _allThumbs(); track thumb) {\n <div class=\"ngs-slider-visual-thumb\"\n [style.left.%]=\"thumb.percentage * 100\"\n [class.ngs-slider-visual-thumb-active]=\"thumb === _activeThumb()\">\n <div class=\"ngs-slider-thumb-knob\"></div>\n @if (discrete()) {\n <div class=\"ngs-slider-value-indicator-container\">\n <div class=\"ngs-slider-value-indicator\">\n <span class=\"ngs-slider-value-indicator-text\">{{ displayWith()(thumb.renderedValue) }}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n",
467
+ styles: [":host{--ngs-slider-track-height: 4px;--ngs-slider-track-active-height: 6px;--ngs-slider-track-color: var(--ngs-color-surface-container-high);--ngs-slider-track-active-color: var(--ngs-color-primary);--ngs-slider-thumb-size: 20px;--ngs-slider-thumb-color: var(--ngs-color-primary);--ngs-slider-thumb-ripple-color: rgba(36, 91, 255, .5);--ngs-slider-thumb-ripple-width: 6px;--ngs-slider-tick-mark-color: var(--ngs-color-on-surface-variant);--ngs-slider-tick-mark-active-color: var(--ngs-color-on-primary);--ngs-slider-value-indicator-color: var(--ngs-color-on-surface);--ngs-slider-value-indicator-text-color: var(--ngs-color-surface);display:block;position:relative;box-sizing:border-box;padding:8px 0;width:100%;height:48px;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:none}@supports (color: color-mix(in lab,red,red)){:host{--ngs-slider-tick-mark-active-color: color-mix(in srgb, var(--ngs-color-on-primary), transparent 40%)}}:host.ngs-slider-disabled{opacity:.38;pointer-events:none}:host .ngs-slider-wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box}:host .ngs-slider-track{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-track-height);background:var(--ngs-slider-track-color);border-radius:calc(var(--ngs-slider-track-height) / 2)}:host .ngs-slider-track-active{position:absolute;height:var(--ngs-slider-track-active-height);background:var(--ngs-slider-track-active-color);border-radius:calc(var(--ngs-slider-track-active-height) / 2);top:50%;transform:translateY(-50%)}:host .ngs-slider-tick-marks{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}:host .ngs-slider-tick-mark{width:2px;height:2px;background:var(--ngs-slider-tick-mark-color);border-radius:50%}:host .ngs-slider-tick-mark.ngs-slider-tick-mark-active{background:var(--ngs-slider-tick-mark-active-color)}:host ::ng-deep .ngs-slider-input{position:absolute;top:50%;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-thumb-size);transform:translateY(-50%);opacity:0;cursor:pointer;z-index:2;margin:0;padding:0;pointer-events:auto;width:calc(100% - var(--ngs-slider-thumb-size));appearance:none;background:transparent;border:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-runnable-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-thumb{appearance:none;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;margin-top:0;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none;border-radius:0}:host ::ng-deep .ngs-slider-input::-ms-track{width:100%;height:100%;background:transparent;border-color:transparent;color:transparent}:host ::ng-deep .ngs-slider-input::-ms-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input.ngs-slider-input-active{z-index:4;pointer-events:auto}:host ::ng-deep .ngs-slider-input:not(.ngs-slider-input-active){z-index:2}:host ::ng-deep .ngs-slider-input:focus+.ngs-slider-visual-thumbs .ngs-slider-thumb-knob{box-shadow:0 0 0 var(--ngs-slider-thumb-ripple-width) var(--ngs-slider-thumb-ripple-color)}:host .ngs-slider-visual-thumbs{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;top:0;pointer-events:none}:host .ngs-slider-visual-thumb{position:absolute;top:50%;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);transform:translate(-50%,-50%);z-index:1}:host .ngs-slider-visual-thumb.ngs-slider-visual-thumb-active{z-index:2}:host .ngs-slider-thumb-knob{width:100%;height:100%;background:var(--ngs-slider-thumb-color);border-radius:50%;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}:host .ngs-slider-value-indicator-container{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(-8px);padding:4px 8px;background:var(--ngs-slider-value-indicator-color);color:var(--ngs-slider-value-indicator-text-color);border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;transition:opacity .1s ease-in-out}:host .ngs-slider-value-indicator-container:after{content:\"\";position:absolute;top:100%;left:50%;transform:translate(-50%);border-width:4px;border-style:solid;border-color:var(--ngs-slider-value-indicator-color) transparent transparent transparent}:host:active .ngs-slider-value-indicator-container,:host .ngs-slider-input:focus~.ngs-slider-visual-thumbs .ngs-slider-value-indicator-container{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
468
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
469
+ });
470
+ };
471
+ i0.ɵɵngDeclareClassMetadata({
472
+ minVersion: "12.0.0",
473
+ version: "22.3.0",
474
+ ngImport: i0,
475
+ type: Slider,
476
+ decorators: [{
477
+ type: Component,
478
+ args: [{
479
+ selector: "ngs-slider",
480
+ exportAs: "ngsSlider",
481
+ changeDetection: ChangeDetectionStrategy.OnPush,
482
+ host: {
483
+ "class": "ngs-slider",
484
+ "[class.ngs-slider-disabled]": "disabled()",
485
+ "[class.ngs-slider-discrete]": "discrete()",
486
+ "[class.ngs-slider-show-tick-marks]": "showTickMarks()"
487
+ },
488
+ template: "<div class=\"ngs-slider-wrapper\">\n <div class=\"ngs-slider-track\">\n <div class=\"ngs-slider-track-background\"></div>\n <div class=\"ngs-slider-track-active\"\n [style.left.%]=\"(_trackLeft() / 100) * 100\"\n [style.right.%]=\"(_trackRight() / 100) * 100\"></div>\n @if (showTickMarks()) {\n <div class=\"ngs-slider-tick-marks\">\n @for (tick of _tickMarks(); track $index) {\n <div class=\"ngs-slider-tick-mark\" [class.ngs-slider-tick-mark-active]=\"tick === 0\"></div>\n }\n </div>\n }\n </div>\n\n <ng-content />\n\n <div class=\"ngs-slider-visual-thumbs\">\n @for (thumb of _allThumbs(); track thumb) {\n <div class=\"ngs-slider-visual-thumb\"\n [style.left.%]=\"thumb.percentage * 100\"\n [class.ngs-slider-visual-thumb-active]=\"thumb === _activeThumb()\">\n <div class=\"ngs-slider-thumb-knob\"></div>\n @if (discrete()) {\n <div class=\"ngs-slider-value-indicator-container\">\n <div class=\"ngs-slider-value-indicator\">\n <span class=\"ngs-slider-value-indicator-text\">{{ displayWith()(thumb.renderedValue) }}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n",
489
+ styles: [":host{--ngs-slider-track-height: 4px;--ngs-slider-track-active-height: 6px;--ngs-slider-track-color: var(--ngs-color-surface-container-high);--ngs-slider-track-active-color: var(--ngs-color-primary);--ngs-slider-thumb-size: 20px;--ngs-slider-thumb-color: var(--ngs-color-primary);--ngs-slider-thumb-ripple-color: rgba(36, 91, 255, .5);--ngs-slider-thumb-ripple-width: 6px;--ngs-slider-tick-mark-color: var(--ngs-color-on-surface-variant);--ngs-slider-tick-mark-active-color: var(--ngs-color-on-primary);--ngs-slider-value-indicator-color: var(--ngs-color-on-surface);--ngs-slider-value-indicator-text-color: var(--ngs-color-surface);display:block;position:relative;box-sizing:border-box;padding:8px 0;width:100%;height:48px;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;touch-action:none}@supports (color: color-mix(in lab,red,red)){:host{--ngs-slider-tick-mark-active-color: color-mix(in srgb, var(--ngs-color-on-primary), transparent 40%)}}:host.ngs-slider-disabled{opacity:.38;pointer-events:none}:host .ngs-slider-wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box}:host .ngs-slider-track{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-track-height);background:var(--ngs-slider-track-color);border-radius:calc(var(--ngs-slider-track-height) / 2)}:host .ngs-slider-track-active{position:absolute;height:var(--ngs-slider-track-active-height);background:var(--ngs-slider-track-active-color);border-radius:calc(var(--ngs-slider-track-active-height) / 2);top:50%;transform:translateY(-50%)}:host .ngs-slider-tick-marks{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}:host .ngs-slider-tick-mark{width:2px;height:2px;background:var(--ngs-slider-tick-mark-color);border-radius:50%}:host .ngs-slider-tick-mark.ngs-slider-tick-mark-active{background:var(--ngs-slider-tick-mark-active-color)}:host ::ng-deep .ngs-slider-input{position:absolute;top:50%;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:var(--ngs-slider-thumb-size);transform:translateY(-50%);opacity:0;cursor:pointer;z-index:2;margin:0;padding:0;pointer-events:auto;width:calc(100% - var(--ngs-slider-thumb-size));appearance:none;background:transparent;border:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-runnable-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-track{width:100%;height:100%;background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input::-webkit-slider-thumb{appearance:none;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;margin-top:0;box-shadow:none}:host ::ng-deep .ngs-slider-input::-moz-range-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none;border-radius:0}:host ::ng-deep .ngs-slider-input::-ms-track{width:100%;height:100%;background:transparent;border-color:transparent;color:transparent}:host ::ng-deep .ngs-slider-input::-ms-thumb{width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);background:transparent;border:none;box-shadow:none}:host ::ng-deep .ngs-slider-input.ngs-slider-input-active{z-index:4;pointer-events:auto}:host ::ng-deep .ngs-slider-input:not(.ngs-slider-input-active){z-index:2}:host ::ng-deep .ngs-slider-input:focus+.ngs-slider-visual-thumbs .ngs-slider-thumb-knob{box-shadow:0 0 0 var(--ngs-slider-thumb-ripple-width) var(--ngs-slider-thumb-ripple-color)}:host .ngs-slider-visual-thumbs{position:absolute;left:calc(var(--ngs-slider-thumb-size) / 2);right:calc(var(--ngs-slider-thumb-size) / 2);height:100%;top:0;pointer-events:none}:host .ngs-slider-visual-thumb{position:absolute;top:50%;width:var(--ngs-slider-thumb-size);height:var(--ngs-slider-thumb-size);transform:translate(-50%,-50%);z-index:1}:host .ngs-slider-visual-thumb.ngs-slider-visual-thumb-active{z-index:2}:host .ngs-slider-thumb-knob{width:100%;height:100%;background:var(--ngs-slider-thumb-color);border-radius:50%;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}:host .ngs-slider-value-indicator-container{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(-8px);padding:4px 8px;background:var(--ngs-slider-value-indicator-color);color:var(--ngs-slider-value-indicator-text-color);border-radius:4px;font-size:12px;white-space:nowrap;opacity:0;transition:opacity .1s ease-in-out}:host .ngs-slider-value-indicator-container:after{content:\"\";position:absolute;top:100%;left:50%;transform:translate(-50%);border-width:4px;border-style:solid;border-color:var(--ngs-slider-value-indicator-color) transparent transparent transparent}:host:active .ngs-slider-value-indicator-container,:host .ngs-slider-input:focus~.ngs-slider-visual-thumbs .ngs-slider-value-indicator-container{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
490
+ }]
491
+ }],
492
+ ctorParameters: () => [],
493
+ propDecorators: {
494
+ disabled: [{
495
+ type: i0.Input,
496
+ args: [{
497
+ isSignal: true,
498
+ alias: "disabled",
499
+ required: false
500
+ }]
501
+ }],
502
+ discrete: [{
503
+ type: i0.Input,
504
+ args: [{
505
+ isSignal: true,
506
+ alias: "discrete",
507
+ required: false
508
+ }]
509
+ }],
510
+ showTickMarks: [{
511
+ type: i0.Input,
512
+ args: [{
513
+ isSignal: true,
514
+ alias: "showTickMarks",
515
+ required: false
516
+ }]
517
+ }],
518
+ min: [{
519
+ type: i0.Input,
520
+ args: [{
521
+ isSignal: true,
522
+ alias: "min",
523
+ required: false
524
+ }]
525
+ }],
526
+ max: [{
527
+ type: i0.Input,
528
+ args: [{
529
+ isSignal: true,
530
+ alias: "max",
531
+ required: false
532
+ }]
533
+ }],
534
+ step: [{
535
+ type: i0.Input,
536
+ args: [{
537
+ isSignal: true,
538
+ alias: "step",
539
+ required: false
540
+ }]
541
+ }],
542
+ displayWith: [{
543
+ type: i0.Input,
544
+ args: [{
545
+ isSignal: true,
546
+ alias: "displayWith",
547
+ required: false
548
+ }]
549
+ }],
550
+ _allThumbs: [{
551
+ type: i0.ContentChildren,
552
+ args: [i0.forwardRef(() => SliderThumb), {
553
+ descendants: true,
554
+ isSignal: true
555
+ }]
556
+ }]
557
+ }
558
+ });
559
+ var SliderStartThumb = class SliderStartThumb extends SliderThumb {
560
+ getId() {
561
+ return "start";
562
+ }
563
+ static ɵfac = i0.ɵɵngDeclareFactory({
564
+ minVersion: "12.0.0",
565
+ version: "22.3.0",
566
+ ngImport: i0,
567
+ type: SliderStartThumb,
568
+ deps: null,
569
+ target: i0.ɵɵFactoryTarget.Directive
570
+ });
571
+ static ɵdir = i0.ɵɵngDeclareDirective({
572
+ minVersion: "14.0.0",
573
+ version: "22.3.0",
574
+ type: SliderStartThumb,
575
+ isStandalone: true,
576
+ selector: "input[ngsSliderStartThumb]",
577
+ providers: [{
578
+ provide: SliderThumb,
579
+ useExisting: forwardRef(() => SliderStartThumb)
580
+ }],
581
+ usesInheritance: true,
582
+ ngImport: i0
583
+ });
584
+ };
585
+ i0.ɵɵngDeclareClassMetadata({
586
+ minVersion: "12.0.0",
587
+ version: "22.3.0",
588
+ ngImport: i0,
589
+ type: SliderStartThumb,
590
+ decorators: [{
591
+ type: Directive,
592
+ args: [{
593
+ selector: "input[ngsSliderStartThumb]",
594
+ standalone: true,
595
+ providers: [{
596
+ provide: SliderThumb,
597
+ useExisting: forwardRef(() => SliderStartThumb)
598
+ }]
599
+ }]
600
+ }]
601
+ });
602
+ var SliderEndThumb = class SliderEndThumb extends SliderThumb {
603
+ getId() {
604
+ return "end";
605
+ }
606
+ static ɵfac = i0.ɵɵngDeclareFactory({
607
+ minVersion: "12.0.0",
608
+ version: "22.3.0",
609
+ ngImport: i0,
610
+ type: SliderEndThumb,
611
+ deps: null,
612
+ target: i0.ɵɵFactoryTarget.Directive
613
+ });
614
+ static ɵdir = i0.ɵɵngDeclareDirective({
615
+ minVersion: "14.0.0",
616
+ version: "22.3.0",
617
+ type: SliderEndThumb,
618
+ isStandalone: true,
619
+ selector: "input[ngsSliderEndThumb]",
620
+ providers: [{
621
+ provide: SliderThumb,
622
+ useExisting: forwardRef(() => SliderEndThumb)
623
+ }],
624
+ usesInheritance: true,
625
+ ngImport: i0
626
+ });
627
+ };
628
+ i0.ɵɵngDeclareClassMetadata({
629
+ minVersion: "12.0.0",
630
+ version: "22.3.0",
631
+ ngImport: i0,
632
+ type: SliderEndThumb,
633
+ decorators: [{
634
+ type: Directive,
635
+ args: [{
636
+ selector: "input[ngsSliderEndThumb]",
637
+ providers: [{
638
+ provide: SliderThumb,
639
+ useExisting: forwardRef(() => SliderEndThumb)
640
+ }]
641
+ }]
642
+ }]
643
+ });
487
644
  export { Slider, SliderEndThumb, SliderStartThumb, SliderThumb };
488
- //# sourceMappingURL=ngstarter-ui-components-slider.mjs.map
645
+
646
+ //# sourceMappingURL=ngstarter-ui-components-slider.mjs.map