@ojiepermana/angular 21.3.4 → 22.0.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 (290) hide show
  1. package/README.md +10 -6
  2. package/component/accordion/README.md +195 -0
  3. package/component/alert/README.md +182 -0
  4. package/component/alert-dialog/README.md +239 -0
  5. package/component/aspect-ratio/README.md +112 -0
  6. package/component/avatar/README.md +176 -0
  7. package/component/badge/README.md +133 -0
  8. package/component/breadcrumb/README.md +216 -0
  9. package/component/button/README.md +139 -0
  10. package/component/button-group/README.md +208 -0
  11. package/component/calendar/README.md +132 -0
  12. package/component/card/README.md +220 -0
  13. package/component/carousel/README.md +276 -0
  14. package/component/checkbox/README.md +149 -0
  15. package/component/collapsible/README.md +195 -0
  16. package/component/combobox/README.md +198 -0
  17. package/component/command/README.md +275 -0
  18. package/component/composer/README.md +235 -0
  19. package/component/composer/package.json +4 -0
  20. package/component/context-menu/README.md +267 -0
  21. package/component/date-picker/README.md +177 -0
  22. package/component/dialog/README.md +237 -0
  23. package/component/drawer/README.md +145 -0
  24. package/component/dropdown-menu/README.md +311 -0
  25. package/component/editor/README.md +136 -0
  26. package/component/editor/package.json +4 -0
  27. package/component/empty/README.md +183 -0
  28. package/component/empty/package.json +4 -0
  29. package/component/form/README.md +210 -0
  30. package/component/hover-card/README.md +146 -0
  31. package/component/hover-card/package.json +4 -0
  32. package/component/input/README.md +159 -0
  33. package/component/input-group/README.md +239 -0
  34. package/component/input-otp/README.md +278 -0
  35. package/component/input-otp/package.json +4 -0
  36. package/component/item/README.md +247 -0
  37. package/component/kanban/README.md +81 -0
  38. package/component/kanban/package.json +4 -0
  39. package/component/kbd/README.md +139 -0
  40. package/component/kbd/package.json +4 -0
  41. package/component/label/README.md +136 -0
  42. package/component/menubar/README.md +269 -0
  43. package/component/menubar/package.json +4 -0
  44. package/component/native-select/README.md +176 -0
  45. package/component/native-select/package.json +4 -0
  46. package/component/navigation-menu/README.md +160 -0
  47. package/component/navigation-menu/package.json +4 -0
  48. package/component/pagination/README.md +144 -0
  49. package/component/pillbox/README.md +67 -0
  50. package/component/pillbox/package.json +4 -0
  51. package/component/popover/README.md +43 -0
  52. package/component/progress/README.md +160 -0
  53. package/component/radio/README.md +209 -0
  54. package/component/resizable/README.md +168 -0
  55. package/component/resizable/package.json +4 -0
  56. package/component/scroll-area/README.md +143 -0
  57. package/component/select/README.md +174 -0
  58. package/component/separator/README.md +170 -0
  59. package/component/sheet/README.md +183 -0
  60. package/component/skeleton/README.md +158 -0
  61. package/component/slider/README.md +207 -0
  62. package/component/spinner/README.md +160 -0
  63. package/component/spinner/package.json +4 -0
  64. package/component/switch/README.md +166 -0
  65. package/component/table/README.md +291 -0
  66. package/component/tabs/README.md +219 -0
  67. package/component/textarea/README.md +154 -0
  68. package/component/timeline/README.md +94 -0
  69. package/component/timeline/package.json +4 -0
  70. package/component/toast/README.md +321 -0
  71. package/component/toggle/README.md +131 -0
  72. package/component/toggle/package.json +4 -0
  73. package/component/toggle-group/README.md +206 -0
  74. package/component/toggle-group/package.json +4 -0
  75. package/component/tooltip/README.md +211 -0
  76. package/fesm2022/ojiepermana-angular-component-accordion.mjs +45 -30
  77. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -1
  78. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +95 -61
  79. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -1
  80. package/fesm2022/ojiepermana-angular-component-alert.mjs +30 -21
  81. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -1
  82. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +11 -7
  83. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -1
  84. package/fesm2022/ojiepermana-angular-component-avatar.mjs +50 -34
  85. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -1
  86. package/fesm2022/ojiepermana-angular-component-badge.mjs +9 -6
  87. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -1
  88. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +49 -35
  89. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -1
  90. package/fesm2022/ojiepermana-angular-component-button-group.mjs +25 -17
  91. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -1
  92. package/fesm2022/ojiepermana-angular-component-button.mjs +11 -7
  93. package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -1
  94. package/fesm2022/ojiepermana-angular-component-calendar.mjs +23 -13
  95. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -1
  96. package/fesm2022/ojiepermana-angular-component-card.mjs +51 -36
  97. package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -1
  98. package/fesm2022/ojiepermana-angular-component-carousel.mjs +66 -42
  99. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -1
  100. package/fesm2022/ojiepermana-angular-component-chart.mjs +494 -283
  101. package/fesm2022/ojiepermana-angular-component-chart.mjs.map +1 -1
  102. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +23 -13
  103. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -1
  104. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +28 -20
  105. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -1
  106. package/fesm2022/ojiepermana-angular-component-combobox.mjs +27 -18
  107. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -1
  108. package/fesm2022/ojiepermana-angular-component-command.mjs +77 -52
  109. package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -1
  110. package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
  111. package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
  112. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +9 -6
  113. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -1
  114. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +34 -19
  115. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -1
  116. package/fesm2022/ojiepermana-angular-component-dialog.mjs +55 -38
  117. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -1
  118. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -1
  119. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +108 -74
  120. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -1
  121. package/fesm2022/ojiepermana-angular-component-editor.mjs +717 -0
  122. package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
  123. package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
  124. package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
  125. package/fesm2022/ojiepermana-angular-component-form.mjs +200 -42
  126. package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -1
  127. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +297 -0
  128. package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
  129. package/fesm2022/ojiepermana-angular-component-input-group.mjs +48 -33
  130. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -1
  131. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +514 -0
  132. package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
  133. package/fesm2022/ojiepermana-angular-component-input.mjs +7 -5
  134. package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -1
  135. package/fesm2022/ojiepermana-angular-component-item.mjs +76 -53
  136. package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -1
  137. package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
  138. package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
  139. package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
  140. package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
  141. package/fesm2022/ojiepermana-angular-component-label.mjs +9 -6
  142. package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -1
  143. package/fesm2022/ojiepermana-angular-component-menubar.mjs +308 -0
  144. package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
  145. package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
  146. package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
  147. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +413 -0
  148. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
  149. package/fesm2022/ojiepermana-angular-component-pagination.mjs +65 -31
  150. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -1
  151. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +812 -0
  152. package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
  153. package/fesm2022/ojiepermana-angular-component-popover.mjs +18 -12
  154. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -1
  155. package/fesm2022/ojiepermana-angular-component-progress.mjs +17 -10
  156. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -1
  157. package/fesm2022/ojiepermana-angular-component-radio.mjs +47 -17
  158. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -1
  159. package/fesm2022/ojiepermana-angular-component-resizable.mjs +481 -0
  160. package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
  161. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +15 -9
  162. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -1
  163. package/fesm2022/ojiepermana-angular-component-select.mjs +71 -26
  164. package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -1
  165. package/fesm2022/ojiepermana-angular-component-separator.mjs +11 -7
  166. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -1
  167. package/fesm2022/ojiepermana-angular-component-sheet.mjs +91 -42
  168. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -1
  169. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +7 -5
  170. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -1
  171. package/fesm2022/ojiepermana-angular-component-slider.mjs +401 -7
  172. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -1
  173. package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
  174. package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
  175. package/fesm2022/ojiepermana-angular-component-switch.mjs +47 -15
  176. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -1
  177. package/fesm2022/ojiepermana-angular-component-table.mjs +56 -40
  178. package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -1
  179. package/fesm2022/ojiepermana-angular-component-tabs.mjs +58 -38
  180. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -1
  181. package/fesm2022/ojiepermana-angular-component-textarea.mjs +8 -6
  182. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -1
  183. package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
  184. package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
  185. package/fesm2022/ojiepermana-angular-component-toast.mjs +28 -4
  186. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -1
  187. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
  188. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
  189. package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
  190. package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
  191. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +304 -6
  192. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -1
  193. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -1
  194. package/fesm2022/ojiepermana-angular-layout-component.mjs +45 -24
  195. package/fesm2022/ojiepermana-angular-layout-component.mjs.map +1 -1
  196. package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +1 -1
  197. package/fesm2022/ojiepermana-angular-layout-services.mjs +7 -5
  198. package/fesm2022/ojiepermana-angular-layout-services.mjs.map +1 -1
  199. package/fesm2022/ojiepermana-angular-layout-shell.mjs +3 -3
  200. package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +1 -1
  201. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +9 -6
  202. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +1 -1
  203. package/fesm2022/ojiepermana-angular-layout-token.mjs.map +1 -1
  204. package/fesm2022/{ojiepermana-angular-layout-empty.mjs → ojiepermana-angular-layout-type-empty.mjs} +4 -4
  205. package/fesm2022/ojiepermana-angular-layout-type-empty.mjs.map +1 -0
  206. package/fesm2022/{ojiepermana-angular-layout-horizontal.mjs → ojiepermana-angular-layout-type-horizontal.mjs} +26 -17
  207. package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs.map +1 -0
  208. package/fesm2022/{ojiepermana-angular-layout-vertical.mjs → ojiepermana-angular-layout-type-vertical.mjs} +28 -18
  209. package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs.map +1 -0
  210. package/fesm2022/ojiepermana-angular-layout.mjs +74 -50
  211. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  212. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +1 -1
  213. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +11 -7
  214. package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +1 -1
  215. package/fesm2022/ojiepermana-angular-navigation-item.mjs +27 -16
  216. package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +1 -1
  217. package/fesm2022/ojiepermana-angular-navigation-service.mjs +29 -20
  218. package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +1 -1
  219. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +71 -43
  220. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +1 -1
  221. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +261 -24
  222. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +1 -1
  223. package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +1 -1
  224. package/fesm2022/ojiepermana-angular-theme-services.mjs +19 -11
  225. package/fesm2022/ojiepermana-angular-theme-services.mjs.map +1 -1
  226. package/fesm2022/ojiepermana-angular-theme-token.mjs.map +1 -1
  227. package/fesm2022/ojiepermana-angular-theme.mjs +19 -11
  228. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
  229. package/generator/api/bin/src/emit/client.js +4 -2
  230. package/generator/api/bin/src/writer/index.js +2 -2
  231. package/generator/guide/bin/schematics/build/index.js +3 -2
  232. package/generator/guide/bin/src/engine/component.js +2 -2
  233. package/generator/guide/bin/src/engine/index.js +3 -3
  234. package/generator/guide/bin/src/engine/render.js +10 -5
  235. package/layout/type/empty/package.json +4 -0
  236. package/layout/type/horizontal/package.json +4 -0
  237. package/layout/type/vertical/package.json +4 -0
  238. package/navigation/topbar/README.md +196 -0
  239. package/package.json +89 -25
  240. package/theme/README.md +110 -3
  241. package/theme/styles/integrations/material/autocomplete.css +178 -0
  242. package/theme/styles/integrations/material/button.css +468 -0
  243. package/theme/styles/integrations/material/dialog.css +152 -0
  244. package/theme/styles/integrations/material/select.css +175 -0
  245. package/theme/styles/integrations/material/slide-toggle.css +234 -0
  246. package/theme/styles/integrations/material/slider.css +194 -0
  247. package/theme/styles/integrations/material/tabs.css +229 -0
  248. package/theme/styles/integrations/material.css +70 -60
  249. package/types/ojiepermana-angular-component-combobox.d.ts +1 -2
  250. package/types/ojiepermana-angular-component-composer.d.ts +90 -0
  251. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +2 -0
  252. package/types/ojiepermana-angular-component-editor.d.ts +123 -0
  253. package/types/ojiepermana-angular-component-empty.d.ts +50 -0
  254. package/types/ojiepermana-angular-component-form.d.ts +52 -3
  255. package/types/ojiepermana-angular-component-hover-card.d.ts +74 -0
  256. package/types/ojiepermana-angular-component-input-otp.d.ts +136 -0
  257. package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
  258. package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
  259. package/types/ojiepermana-angular-component-menubar.d.ts +67 -0
  260. package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
  261. package/types/ojiepermana-angular-component-navigation-menu.d.ts +96 -0
  262. package/types/ojiepermana-angular-component-pagination.d.ts +10 -4
  263. package/types/ojiepermana-angular-component-pillbox.d.ts +157 -0
  264. package/types/ojiepermana-angular-component-radio.d.ts +7 -1
  265. package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
  266. package/types/ojiepermana-angular-component-select.d.ts +17 -5
  267. package/types/ojiepermana-angular-component-sheet.d.ts +3 -1
  268. package/types/ojiepermana-angular-component-slider.d.ts +59 -1
  269. package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
  270. package/types/ojiepermana-angular-component-switch.d.ts +13 -3
  271. package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
  272. package/types/ojiepermana-angular-component-toast.d.ts +12 -3
  273. package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
  274. package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
  275. package/types/ojiepermana-angular-component-tooltip.d.ts +72 -5
  276. package/types/{ojiepermana-angular-layout-horizontal.d.ts → ojiepermana-angular-layout-type-horizontal.d.ts} +3 -3
  277. package/types/{ojiepermana-angular-layout-vertical.d.ts → ojiepermana-angular-layout-type-vertical.d.ts} +3 -3
  278. package/types/ojiepermana-angular-layout.d.ts +5 -5
  279. package/types/ojiepermana-angular-navigation-item.d.ts +1 -1
  280. package/types/ojiepermana-angular-navigation-service.d.ts +7 -7
  281. package/types/ojiepermana-angular-navigation-sidebar.d.ts +8 -8
  282. package/types/ojiepermana-angular-navigation-topbar.d.ts +24 -4
  283. package/types/ojiepermana-angular-navigation-types.d.ts +14 -8
  284. package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +0 -1
  285. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +0 -1
  286. package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +0 -1
  287. package/layout/empty/package.json +0 -4
  288. package/layout/horizontal/package.json +0 -4
  289. package/layout/vertical/package.json +0 -4
  290. /package/types/{ojiepermana-angular-layout-empty.d.ts → ojiepermana-angular-layout-type-empty.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { inject, ElementRef, input, computed, ChangeDetectionStrategy, Component, viewChild, numberAttribute, booleanAttribute, output, signal, effect, untracked } from '@angular/core';
3
3
  import { cn } from '@ojiepermana/angular/component/utils';
4
+ import { DOCUMENT } from '@angular/common';
4
5
 
5
6
  /**
6
7
  * Styled native range input. Works with `ngModel` / `FormControl` via
@@ -8,22 +9,415 @@ import { cn } from '@ojiepermana/angular/component/utils';
8
9
  */
9
10
  class SliderComponent {
10
11
  el = inject(ElementRef);
11
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
12
- classes = computed(() => cn('ui-slider relative w-full appearance-none bg-transparent', 'focus-visible:outline-none', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
12
+ class = input('', /* @ts-ignore */
13
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
14
+ classes = computed(() => cn('ui-slider relative w-full appearance-none bg-transparent', 'focus-visible:outline-none', 'disabled:pointer-events-none disabled:opacity-50', this.class()), /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
13
16
  focus() {
14
17
  this.el.nativeElement.focus();
15
18
  }
16
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SliderComponent, isStandalone: true, selector: "input[type=range][ui-slider]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, styles: [":host.ui-slider{height:1.25rem;cursor:pointer}:host.ui-slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.ui-slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: SliderComponent, isStandalone: true, selector: "input[type=range][ui-slider]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, styles: [":host.ui-slider{height:1.25rem;cursor:pointer}:host.ui-slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.ui-slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18
21
  }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SliderComponent, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SliderComponent, decorators: [{
20
23
  type: Component,
21
24
  args: [{ selector: 'input[type=range][ui-slider]', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'classes()' }, template: '', styles: [":host.ui-slider{height:1.25rem;cursor:pointer}:host.ui-slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.ui-slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"] }]
22
25
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
23
26
 
27
+ class SliderRootComponent {
28
+ host = inject(ElementRef);
29
+ document = inject(DOCUMENT);
30
+ track = viewChild.required('track');
31
+ value = input([0], /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
33
+ min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
34
+ max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
35
+ step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
36
+ minStepsBetweenThumbs = input(0, { ...(ngDevMode ? { debugName: "minStepsBetweenThumbs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
37
+ orientation = input('horizontal', /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
39
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
40
+ thumbLabels = input(null, /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "thumbLabels" }] : /* istanbul ignore next */ []));
42
+ ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
43
+ ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
44
+ ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
45
+ class = input('', /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
47
+ valueChange = output();
48
+ disabledState = signal(false, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
50
+ valueState = signal([0], /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "valueState" }] : /* istanbul ignore next */ []));
52
+ activeThumbIndex = signal(0, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "activeThumbIndex" }] : /* istanbul ignore next */ []));
54
+ draggedThumbIndex = signal(null, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "draggedThumbIndex" }] : /* istanbul ignore next */ []));
56
+ pointerId = signal(null, /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "pointerId" }] : /* istanbul ignore next */ []));
58
+ config = computed(() => ({
59
+ min: Math.min(this.min(), this.max()),
60
+ max: Math.max(this.min(), this.max()),
61
+ step: this.step() > 0 ? this.step() : 1,
62
+ minStepsBetweenThumbs: Math.max(0, Math.floor(this.minStepsBetweenThumbs())),
63
+ }), /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
65
+ isDisabled = computed(() => this.disabled() || this.disabledState(), /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
67
+ hostClasses = computed(() => cn('ui-slider-root relative flex touch-none select-none', this.orientation() === 'horizontal' ? 'h-5 w-full items-center' : 'h-32 w-5 justify-center', this.isDisabled() ? 'opacity-50' : '', this.class()), /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
69
+ thumbs = computed(() => {
70
+ const values = this.valueState();
71
+ const config = this.config();
72
+ return values.map((value, index) => {
73
+ const bounds = thumbBounds(values, index, config);
74
+ return {
75
+ index,
76
+ value,
77
+ position: this.positionPercent(value),
78
+ min: bounds.min,
79
+ max: bounds.max,
80
+ label: this.thumbLabel(index, values.length),
81
+ };
82
+ });
83
+ }, /* @ts-ignore */
84
+ ...(ngDevMode ? [{ debugName: "thumbs" }] : /* istanbul ignore next */ []));
85
+ rangeOffset = computed(() => {
86
+ const span = this.rangeSpan();
87
+ return span.start;
88
+ }, /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "rangeOffset" }] : /* istanbul ignore next */ []));
90
+ rangeSize = computed(() => {
91
+ const span = this.rangeSpan();
92
+ return span.end - span.start;
93
+ }, /* @ts-ignore */
94
+ ...(ngDevMode ? [{ debugName: "rangeSize" }] : /* istanbul ignore next */ []));
95
+ syncExternalValue = effect(() => {
96
+ const normalized = normalizeSliderValues(this.value(), this.config());
97
+ untracked(() => {
98
+ if (!sameValues(normalized, this.valueState())) {
99
+ this.valueState.set(normalized);
100
+ }
101
+ this.activeThumbIndex.set(clampIndex(this.activeThumbIndex(), normalized.length));
102
+ });
103
+ }, /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "syncExternalValue" }] : /* istanbul ignore next */ []));
105
+ onTrackPointerDown(event) {
106
+ if (this.isDisabled() || event.button !== 0) {
107
+ return;
108
+ }
109
+ event.preventDefault();
110
+ const nextValue = this.valueFromPointer(event);
111
+ if (nextValue == null) {
112
+ return;
113
+ }
114
+ const thumbIndex = this.closestThumbIndex(nextValue);
115
+ this.activeThumbIndex.set(thumbIndex);
116
+ this.updateThumbValue(thumbIndex, nextValue);
117
+ this.beginDrag(event, thumbIndex);
118
+ }
119
+ onThumbPointerDown(event, index) {
120
+ if (this.isDisabled() || event.button !== 0) {
121
+ return;
122
+ }
123
+ event.preventDefault();
124
+ event.stopPropagation();
125
+ this.activeThumbIndex.set(index);
126
+ this.beginDrag(event, index);
127
+ }
128
+ onWindowPointerMove(event) {
129
+ if (this.pointerId() !== event.pointerId) {
130
+ return;
131
+ }
132
+ const thumbIndex = this.draggedThumbIndex();
133
+ if (thumbIndex == null) {
134
+ return;
135
+ }
136
+ const nextValue = this.valueFromPointer(event);
137
+ if (nextValue == null) {
138
+ return;
139
+ }
140
+ event.preventDefault();
141
+ this.updateThumbValue(thumbIndex, nextValue);
142
+ }
143
+ onWindowPointerUp(event) {
144
+ if (this.pointerId() !== event.pointerId) {
145
+ return;
146
+ }
147
+ this.draggedThumbIndex.set(null);
148
+ this.pointerId.set(null);
149
+ }
150
+ onThumbFocus(index) {
151
+ this.activeThumbIndex.set(index);
152
+ }
153
+ onThumbKeydown(event, index) {
154
+ if (this.isDisabled()) {
155
+ return;
156
+ }
157
+ const current = this.valueState()[index];
158
+ const config = this.config();
159
+ const pageStep = config.step * 10;
160
+ const direction = this.resolvedDirection();
161
+ let nextValue = null;
162
+ switch (event.key) {
163
+ case 'ArrowRight':
164
+ nextValue = current + (direction === 'rtl' && this.orientation() === 'horizontal' ? -config.step : config.step);
165
+ break;
166
+ case 'ArrowLeft':
167
+ nextValue = current + (direction === 'rtl' && this.orientation() === 'horizontal' ? config.step : -config.step);
168
+ break;
169
+ case 'ArrowUp':
170
+ nextValue = current + config.step;
171
+ break;
172
+ case 'ArrowDown':
173
+ nextValue = current - config.step;
174
+ break;
175
+ case 'PageUp':
176
+ nextValue = current + pageStep;
177
+ break;
178
+ case 'PageDown':
179
+ nextValue = current - pageStep;
180
+ break;
181
+ case 'Home':
182
+ nextValue = thumbBounds(this.valueState(), index, config).min;
183
+ break;
184
+ case 'End':
185
+ nextValue = thumbBounds(this.valueState(), index, config).max;
186
+ break;
187
+ default:
188
+ return;
189
+ }
190
+ event.preventDefault();
191
+ this.activeThumbIndex.set(index);
192
+ this.updateThumbValue(index, nextValue);
193
+ }
194
+ beginDrag(event, index) {
195
+ this.pointerId.set(event.pointerId);
196
+ this.draggedThumbIndex.set(index);
197
+ this.focusThumb(index);
198
+ }
199
+ updateThumbValue(index, rawValue) {
200
+ const current = this.valueState();
201
+ const bounds = thumbBounds(current, index, this.config());
202
+ const nextValues = current.slice();
203
+ nextValues[index] = snapWithinBounds(rawValue, bounds.min, bounds.max, this.config());
204
+ if (sameValues(nextValues, current)) {
205
+ return;
206
+ }
207
+ this.valueState.set(nextValues);
208
+ this.valueChange.emit(nextValues);
209
+ }
210
+ valueFromPointer(event) {
211
+ const track = this.track().nativeElement;
212
+ const rect = track.getBoundingClientRect();
213
+ const config = this.config();
214
+ if (rect.width <= 0 || rect.height <= 0) {
215
+ return null;
216
+ }
217
+ let ratio = 0;
218
+ if (this.orientation() === 'horizontal') {
219
+ const physicalRatio = clamp((event.clientX - rect.left) / rect.width, 0, 1);
220
+ ratio = this.resolvedDirection() === 'rtl' ? 1 - physicalRatio : physicalRatio;
221
+ }
222
+ else {
223
+ ratio = clamp((rect.bottom - event.clientY) / rect.height, 0, 1);
224
+ }
225
+ return config.min + ratio * (config.max - config.min);
226
+ }
227
+ closestThumbIndex(nextValue) {
228
+ const values = this.valueState();
229
+ let bestIndex = 0;
230
+ let bestDistance = Number.POSITIVE_INFINITY;
231
+ values.forEach((value, index) => {
232
+ const distance = Math.abs(value - nextValue);
233
+ if (distance < bestDistance) {
234
+ bestDistance = distance;
235
+ bestIndex = index;
236
+ }
237
+ });
238
+ return bestIndex;
239
+ }
240
+ rangeSpan() {
241
+ const positions = this.valueState().map((value) => this.positionPercent(value));
242
+ if (!positions.length) {
243
+ return { start: 0, end: 0 };
244
+ }
245
+ if (positions.length === 1) {
246
+ const minBoundary = this.positionPercent(this.config().min);
247
+ return {
248
+ start: Math.min(minBoundary, positions[0]),
249
+ end: Math.max(minBoundary, positions[0]),
250
+ };
251
+ }
252
+ return {
253
+ start: Math.min(...positions),
254
+ end: Math.max(...positions),
255
+ };
256
+ }
257
+ positionPercent(value) {
258
+ const config = this.config();
259
+ const range = config.max - config.min;
260
+ if (range <= 0) {
261
+ return this.orientation() === 'horizontal' && this.resolvedDirection() === 'rtl' ? 100 : 0;
262
+ }
263
+ const logicalRatio = (value - config.min) / range;
264
+ const physicalRatio = this.orientation() === 'horizontal' && this.resolvedDirection() === 'rtl' ? 1 - logicalRatio : logicalRatio;
265
+ return clamp(physicalRatio * 100, 0, 100);
266
+ }
267
+ thumbLabel(index, count) {
268
+ const labels = this.thumbLabels();
269
+ if (labels?.[index]) {
270
+ return labels[index] ?? null;
271
+ }
272
+ if (count === 1) {
273
+ return this.ariaLabel();
274
+ }
275
+ return this.ariaLabel() ? `${this.ariaLabel()} ${index + 1}` : `Slider thumb ${index + 1}`;
276
+ }
277
+ focusThumb(index) {
278
+ const thumb = this.host.nativeElement.querySelector(`.ui-slider__thumb[data-index="${index}"]`);
279
+ thumb?.focus();
280
+ }
281
+ resolvedDirection() {
282
+ const host = this.host.nativeElement;
283
+ if (host.dir === 'ltr' || host.dir === 'rtl') {
284
+ return host.dir;
285
+ }
286
+ const view = this.document.defaultView;
287
+ if (!view) {
288
+ return 'ltr';
289
+ }
290
+ return view.getComputedStyle(host).direction === 'rtl' ? 'rtl' : 'ltr';
291
+ }
292
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SliderRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
293
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: SliderRootComponent, isStandalone: true, selector: "ui-slider", inputs: { value: { classPropertyName: "value", publicName: "value", 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 }, minStepsBetweenThumbs: { classPropertyName: "minStepsBetweenThumbs", publicName: "minStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, thumbLabels: { classPropertyName: "thumbLabels", publicName: "thumbLabels", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { listeners: { "window:pointermove": "onWindowPointerMove($event)", "window:pointerup": "onWindowPointerUp($event)", "window:pointercancel": "onWindowPointerUp($event)" }, properties: { "class": "hostClasses()", "attr.data-disabled": "isDisabled() ? \"\" : null", "attr.data-orientation": "orientation()" } }, viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], ngImport: i0, template: `
294
+ <div #track class="ui-slider__track" (pointerdown)="onTrackPointerDown($event)">
295
+ <div
296
+ class="ui-slider__range"
297
+ [style.left.%]="orientation() === 'horizontal' ? rangeOffset() : null"
298
+ [style.width.%]="orientation() === 'horizontal' ? rangeSize() : null"
299
+ [style.bottom.%]="orientation() === 'vertical' ? rangeOffset() : null"
300
+ [style.height.%]="orientation() === 'vertical' ? rangeSize() : null"></div>
301
+
302
+ @for (thumb of thumbs(); track thumb.index) {
303
+ <button
304
+ type="button"
305
+ class="ui-slider__thumb"
306
+ [style.left.%]="orientation() === 'horizontal' ? thumb.position : 50"
307
+ [style.top.%]="orientation() === 'horizontal' ? 50 : null"
308
+ [style.bottom.%]="orientation() === 'vertical' ? thumb.position : null"
309
+ [attr.aria-describedby]="ariaDescribedby()"
310
+ [attr.aria-disabled]="isDisabled() ? 'true' : null"
311
+ [attr.aria-label]="thumb.label"
312
+ [attr.aria-labelledby]="thumb.label ? null : ariaLabelledby()"
313
+ [attr.aria-orientation]="orientation()"
314
+ [attr.aria-valuemax]="thumb.max"
315
+ [attr.aria-valuemin]="thumb.min"
316
+ [attr.aria-valuenow]="thumb.value"
317
+ [attr.data-index]="thumb.index"
318
+ [attr.data-state]="isDisabled() ? 'disabled' : 'active'"
319
+ [tabIndex]="isDisabled() ? -1 : activeThumbIndex() === thumb.index ? 0 : -1"
320
+ role="slider"
321
+ (focus)="onThumbFocus(thumb.index)"
322
+ (keydown)="onThumbKeydown($event, thumb.index)"
323
+ (pointerdown)="onThumbPointerDown($event, thumb.index)"></button>
324
+ }
325
+ </div>
326
+ `, isInline: true, styles: [":host.ui-slider-root{--ui-slider-thumb-size: 1rem;--ui-slider-track-size: .5rem;display:block}.ui-slider__track{position:relative;flex:1 1 auto;border-radius:9999px;background:hsl(var(--secondary))}:host[data-orientation=horizontal] .ui-slider__track{height:var(--ui-slider-track-size);width:100%}:host[data-orientation=vertical] .ui-slider__track{height:100%;width:var(--ui-slider-track-size)}.ui-slider__range{position:absolute;border-radius:inherit;background:hsl(var(--primary))}:host[data-orientation=horizontal] .ui-slider__range{top:0;height:100%}:host[data-orientation=vertical] .ui-slider__range{left:0;width:100%}.ui-slider__thumb{position:absolute;height:var(--ui-slider-thumb-size);width:var(--ui-slider-thumb-size);border:var(--border-width) solid hsl(var(--primary));border-radius:9999px;background:hsl(var(--background));box-shadow:0 1px 2px hsl(var(--foreground) / .14);transition:box-shadow .15s cubic-bezier(.4,0,.2,1),border-color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1)}:host[data-orientation=horizontal] .ui-slider__thumb{transform:translate(-50%,-50%)}:host[data-orientation=vertical] .ui-slider__thumb{transform:translate(-50%,50%)}.ui-slider__thumb:focus-visible{outline:none;box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host[data-disabled] .ui-slider__track,:host[data-disabled] .ui-slider__thumb{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
327
+ }
328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SliderRootComponent, decorators: [{
329
+ type: Component,
330
+ args: [{ selector: 'ui-slider', changeDetection: ChangeDetectionStrategy.OnPush, host: {
331
+ '[class]': 'hostClasses()',
332
+ '[attr.data-disabled]': 'isDisabled() ? "" : null',
333
+ '[attr.data-orientation]': 'orientation()',
334
+ '(window:pointermove)': 'onWindowPointerMove($event)',
335
+ '(window:pointerup)': 'onWindowPointerUp($event)',
336
+ '(window:pointercancel)': 'onWindowPointerUp($event)',
337
+ }, template: `
338
+ <div #track class="ui-slider__track" (pointerdown)="onTrackPointerDown($event)">
339
+ <div
340
+ class="ui-slider__range"
341
+ [style.left.%]="orientation() === 'horizontal' ? rangeOffset() : null"
342
+ [style.width.%]="orientation() === 'horizontal' ? rangeSize() : null"
343
+ [style.bottom.%]="orientation() === 'vertical' ? rangeOffset() : null"
344
+ [style.height.%]="orientation() === 'vertical' ? rangeSize() : null"></div>
345
+
346
+ @for (thumb of thumbs(); track thumb.index) {
347
+ <button
348
+ type="button"
349
+ class="ui-slider__thumb"
350
+ [style.left.%]="orientation() === 'horizontal' ? thumb.position : 50"
351
+ [style.top.%]="orientation() === 'horizontal' ? 50 : null"
352
+ [style.bottom.%]="orientation() === 'vertical' ? thumb.position : null"
353
+ [attr.aria-describedby]="ariaDescribedby()"
354
+ [attr.aria-disabled]="isDisabled() ? 'true' : null"
355
+ [attr.aria-label]="thumb.label"
356
+ [attr.aria-labelledby]="thumb.label ? null : ariaLabelledby()"
357
+ [attr.aria-orientation]="orientation()"
358
+ [attr.aria-valuemax]="thumb.max"
359
+ [attr.aria-valuemin]="thumb.min"
360
+ [attr.aria-valuenow]="thumb.value"
361
+ [attr.data-index]="thumb.index"
362
+ [attr.data-state]="isDisabled() ? 'disabled' : 'active'"
363
+ [tabIndex]="isDisabled() ? -1 : activeThumbIndex() === thumb.index ? 0 : -1"
364
+ role="slider"
365
+ (focus)="onThumbFocus(thumb.index)"
366
+ (keydown)="onThumbKeydown($event, thumb.index)"
367
+ (pointerdown)="onThumbPointerDown($event, thumb.index)"></button>
368
+ }
369
+ </div>
370
+ `, styles: [":host.ui-slider-root{--ui-slider-thumb-size: 1rem;--ui-slider-track-size: .5rem;display:block}.ui-slider__track{position:relative;flex:1 1 auto;border-radius:9999px;background:hsl(var(--secondary))}:host[data-orientation=horizontal] .ui-slider__track{height:var(--ui-slider-track-size);width:100%}:host[data-orientation=vertical] .ui-slider__track{height:100%;width:var(--ui-slider-track-size)}.ui-slider__range{position:absolute;border-radius:inherit;background:hsl(var(--primary))}:host[data-orientation=horizontal] .ui-slider__range{top:0;height:100%}:host[data-orientation=vertical] .ui-slider__range{left:0;width:100%}.ui-slider__thumb{position:absolute;height:var(--ui-slider-thumb-size);width:var(--ui-slider-thumb-size);border:var(--border-width) solid hsl(var(--primary));border-radius:9999px;background:hsl(var(--background));box-shadow:0 1px 2px hsl(var(--foreground) / .14);transition:box-shadow .15s cubic-bezier(.4,0,.2,1),border-color .15s cubic-bezier(.4,0,.2,1),background-color .15s cubic-bezier(.4,0,.2,1)}:host[data-orientation=horizontal] .ui-slider__thumb{transform:translate(-50%,-50%)}:host[data-orientation=vertical] .ui-slider__thumb{transform:translate(-50%,50%)}.ui-slider__thumb:focus-visible{outline:none;box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host[data-disabled] .ui-slider__track,:host[data-disabled] .ui-slider__thumb{cursor:not-allowed}\n"] }]
371
+ }], propDecorators: { track: [{ type: i0.ViewChild, args: ['track', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", 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 }] }], minStepsBetweenThumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "minStepsBetweenThumbs", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], thumbLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbLabels", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
372
+ function clamp(value, min, max) {
373
+ return Math.min(Math.max(value, min), max);
374
+ }
375
+ function clampIndex(index, length) {
376
+ return clamp(index, 0, Math.max(length - 1, 0));
377
+ }
378
+ function decimalPlaces(value) {
379
+ const text = `${value}`;
380
+ const fraction = text.split('.')[1];
381
+ return fraction?.length ?? 0;
382
+ }
383
+ function normalizeSliderValues(values, config) {
384
+ const incoming = values.length ? [...values] : [config.min];
385
+ const sorted = incoming.map((value) => snapToStep(value, config)).sort((left, right) => left - right);
386
+ const gap = config.step * config.minStepsBetweenThumbs;
387
+ const normalized = [];
388
+ sorted.forEach((value, index) => {
389
+ const remaining = sorted.length - index - 1;
390
+ const min = index === 0 ? config.min : normalized[index - 1] + gap;
391
+ const max = Math.max(min, config.max - remaining * gap);
392
+ normalized.push(snapWithinBounds(value, min, max, config));
393
+ });
394
+ return normalized;
395
+ }
396
+ function sameValues(left, right) {
397
+ return left.length === right.length && left.every((value, index) => value === right[index]);
398
+ }
399
+ function snapToStep(value, config) {
400
+ const ratio = (value - config.min) / config.step;
401
+ const snapped = config.min + Math.round(ratio) * config.step;
402
+ const precision = Math.max(decimalPlaces(config.step), decimalPlaces(config.min));
403
+ return Number(snapped.toFixed(precision));
404
+ }
405
+ function snapWithinBounds(value, min, max, config) {
406
+ const boundedMin = Math.min(min, max);
407
+ const boundedMax = Math.max(min, max);
408
+ const snapped = snapToStep(value, config);
409
+ return clamp(snapped, boundedMin, boundedMax);
410
+ }
411
+ function thumbBounds(values, index, config) {
412
+ const gap = config.step * config.minStepsBetweenThumbs;
413
+ const min = index === 0 ? config.min : values[index - 1] + gap;
414
+ const max = index === values.length - 1 ? config.max : values[index + 1] - gap;
415
+ return { min: Math.min(min, max), max: Math.max(min, max) };
416
+ }
417
+
24
418
  /**
25
419
  * Generated bundle index. Do not edit.
26
420
  */
27
421
 
28
- export { SliderComponent };
422
+ export { SliderComponent, SliderComponent as SliderInputDirective, SliderRootComponent };
29
423
  //# sourceMappingURL=ojiepermana-angular-component-slider.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ojiepermana-angular-component-slider.mjs","sources":["../../../projects/angular/component/slider/src/lib/slider.component.ts","../../../projects/angular/component/slider/ojiepermana-angular-component-slider.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, computed, inject, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n/**\n * Styled native range input. Works with `ngModel` / `FormControl` via\n * Angular's built-in `RangeValueAccessor`. Keyboard + ARIA handled by the browser.\n */\n@Component({\n selector: 'input[type=range][ui-slider]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: '',\n styleUrl: './slider.component.css',\n})\nexport class SliderComponent {\n private readonly el = inject<ElementRef<HTMLInputElement>>(ElementRef);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'ui-slider relative w-full appearance-none bg-transparent',\n 'focus-visible:outline-none',\n 'disabled:pointer-events-none disabled:opacity-50',\n this.class(),\n ),\n );\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAGA;;;AAGG;MAQU,eAAe,CAAA;AACT,IAAA,EAAE,GAAG,MAAM,CAA+B,UAAU,CAAC;AAC7D,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;IAEf,OAAO,GAAG,QAAQ,CAAC,MACpC,EAAE,CACA,0DAA0D,EAC1D,4BAA4B,EAC5B,kDAAkD,EAClD,IAAI,CAAC,KAAK,EAAE,CACb,8EACF;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;IAC/B;wGAfW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,4QAHhB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,kpCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAGD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;+BACE,8BAA8B,EAAA,eAAA,EACvB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,QAAA,EACtB,EAAE,EAAA,MAAA,EAAA,CAAA,kpCAAA,CAAA,EAAA;;;ACXd;;AAEG;;;;"}
1
+ {"version":3,"file":"ojiepermana-angular-component-slider.mjs","sources":["../../../projects/angular/component/slider/slider.component.ts","../../../projects/angular/component/slider/slider-root.component.ts","../../../projects/angular/component/slider/ojiepermana-angular-component-slider.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, computed, inject, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n/**\n * Styled native range input. Works with `ngModel` / `FormControl` via\n * Angular's built-in `RangeValueAccessor`. Keyboard + ARIA handled by the browser.\n */\n@Component({\n selector: 'input[type=range][ui-slider]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: '',\n styleUrl: './slider.component.css',\n})\nexport class SliderComponent {\n private readonly el = inject<ElementRef<HTMLInputElement>>(ElementRef);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'ui-slider relative w-full appearance-none bg-transparent',\n 'focus-visible:outline-none',\n 'disabled:pointer-events-none disabled:opacity-50',\n this.class(),\n ),\n );\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\nexport type SliderOrientation = 'horizontal' | 'vertical';\n\ninterface SliderConfig {\n readonly min: number;\n readonly max: number;\n readonly step: number;\n readonly minStepsBetweenThumbs: number;\n}\n\ninterface SliderThumbState {\n readonly index: number;\n readonly value: number;\n readonly position: number;\n readonly min: number;\n readonly max: number;\n readonly label: string | null;\n}\n\n@Component({\n selector: 'ui-slider',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : null',\n '[attr.data-orientation]': 'orientation()',\n '(window:pointermove)': 'onWindowPointerMove($event)',\n '(window:pointerup)': 'onWindowPointerUp($event)',\n '(window:pointercancel)': 'onWindowPointerUp($event)',\n },\n template: `\n <div #track class=\"ui-slider__track\" (pointerdown)=\"onTrackPointerDown($event)\">\n <div\n class=\"ui-slider__range\"\n [style.left.%]=\"orientation() === 'horizontal' ? rangeOffset() : null\"\n [style.width.%]=\"orientation() === 'horizontal' ? rangeSize() : null\"\n [style.bottom.%]=\"orientation() === 'vertical' ? rangeOffset() : null\"\n [style.height.%]=\"orientation() === 'vertical' ? rangeSize() : null\"></div>\n\n @for (thumb of thumbs(); track thumb.index) {\n <button\n type=\"button\"\n class=\"ui-slider__thumb\"\n [style.left.%]=\"orientation() === 'horizontal' ? thumb.position : 50\"\n [style.top.%]=\"orientation() === 'horizontal' ? 50 : null\"\n [style.bottom.%]=\"orientation() === 'vertical' ? thumb.position : null\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-label]=\"thumb.label\"\n [attr.aria-labelledby]=\"thumb.label ? null : ariaLabelledby()\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-valuemax]=\"thumb.max\"\n [attr.aria-valuemin]=\"thumb.min\"\n [attr.aria-valuenow]=\"thumb.value\"\n [attr.data-index]=\"thumb.index\"\n [attr.data-state]=\"isDisabled() ? 'disabled' : 'active'\"\n [tabIndex]=\"isDisabled() ? -1 : activeThumbIndex() === thumb.index ? 0 : -1\"\n role=\"slider\"\n (focus)=\"onThumbFocus(thumb.index)\"\n (keydown)=\"onThumbKeydown($event, thumb.index)\"\n (pointerdown)=\"onThumbPointerDown($event, thumb.index)\"></button>\n }\n </div>\n `,\n styleUrl: './slider-root.component.css',\n})\nexport class SliderRootComponent {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n private readonly track = viewChild.required<ElementRef<HTMLElement>>('track');\n\n readonly value = input<readonly number[]>([0]);\n readonly min = input(0, { transform: numberAttribute });\n readonly max = input(100, { transform: numberAttribute });\n readonly step = input(1, { transform: numberAttribute });\n readonly minStepsBetweenThumbs = input(0, { transform: numberAttribute });\n readonly orientation = input<SliderOrientation>('horizontal');\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly thumbLabels = input<readonly string[] | null>(null);\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly class = input<string>('');\n\n readonly valueChange = output<readonly number[]>();\n\n private readonly disabledState = signal(false);\n private readonly valueState = signal<number[]>([0]);\n protected readonly activeThumbIndex = signal(0);\n private readonly draggedThumbIndex = signal<number | null>(null);\n private readonly pointerId = signal<number | null>(null);\n\n private readonly config = computed<SliderConfig>(() => ({\n min: Math.min(this.min(), this.max()),\n max: Math.max(this.min(), this.max()),\n step: this.step() > 0 ? this.step() : 1,\n minStepsBetweenThumbs: Math.max(0, Math.floor(this.minStepsBetweenThumbs())),\n }));\n\n protected readonly isDisabled = computed(() => this.disabled() || this.disabledState());\n protected readonly hostClasses = computed(() =>\n cn(\n 'ui-slider-root relative flex touch-none select-none',\n this.orientation() === 'horizontal' ? 'h-5 w-full items-center' : 'h-32 w-5 justify-center',\n this.isDisabled() ? 'opacity-50' : '',\n this.class(),\n ),\n );\n\n protected readonly thumbs = computed<readonly SliderThumbState[]>(() => {\n const values = this.valueState();\n const config = this.config();\n\n return values.map((value, index) => {\n const bounds = thumbBounds(values, index, config);\n\n return {\n index,\n value,\n position: this.positionPercent(value),\n min: bounds.min,\n max: bounds.max,\n label: this.thumbLabel(index, values.length),\n };\n });\n });\n\n protected readonly rangeOffset = computed(() => {\n const span = this.rangeSpan();\n return span.start;\n });\n\n protected readonly rangeSize = computed(() => {\n const span = this.rangeSpan();\n return span.end - span.start;\n });\n\n private readonly syncExternalValue = effect(() => {\n const normalized = normalizeSliderValues(this.value(), this.config());\n\n untracked(() => {\n if (!sameValues(normalized, this.valueState())) {\n this.valueState.set(normalized);\n }\n\n this.activeThumbIndex.set(clampIndex(this.activeThumbIndex(), normalized.length));\n });\n });\n\n onTrackPointerDown(event: PointerEvent): void {\n if (this.isDisabled() || event.button !== 0) {\n return;\n }\n\n event.preventDefault();\n\n const nextValue = this.valueFromPointer(event);\n if (nextValue == null) {\n return;\n }\n\n const thumbIndex = this.closestThumbIndex(nextValue);\n this.activeThumbIndex.set(thumbIndex);\n this.updateThumbValue(thumbIndex, nextValue);\n this.beginDrag(event, thumbIndex);\n }\n\n onThumbPointerDown(event: PointerEvent, index: number): void {\n if (this.isDisabled() || event.button !== 0) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n this.activeThumbIndex.set(index);\n this.beginDrag(event, index);\n }\n\n onWindowPointerMove(event: PointerEvent): void {\n if (this.pointerId() !== event.pointerId) {\n return;\n }\n\n const thumbIndex = this.draggedThumbIndex();\n if (thumbIndex == null) {\n return;\n }\n\n const nextValue = this.valueFromPointer(event);\n if (nextValue == null) {\n return;\n }\n\n event.preventDefault();\n this.updateThumbValue(thumbIndex, nextValue);\n }\n\n onWindowPointerUp(event: PointerEvent): void {\n if (this.pointerId() !== event.pointerId) {\n return;\n }\n\n this.draggedThumbIndex.set(null);\n this.pointerId.set(null);\n }\n\n onThumbFocus(index: number): void {\n this.activeThumbIndex.set(index);\n }\n\n onThumbKeydown(event: KeyboardEvent, index: number): void {\n if (this.isDisabled()) {\n return;\n }\n\n const current = this.valueState()[index];\n const config = this.config();\n const pageStep = config.step * 10;\n const direction = this.resolvedDirection();\n let nextValue: number | null = null;\n\n switch (event.key) {\n case 'ArrowRight':\n nextValue = current + (direction === 'rtl' && this.orientation() === 'horizontal' ? -config.step : config.step);\n break;\n case 'ArrowLeft':\n nextValue = current + (direction === 'rtl' && this.orientation() === 'horizontal' ? config.step : -config.step);\n break;\n case 'ArrowUp':\n nextValue = current + config.step;\n break;\n case 'ArrowDown':\n nextValue = current - config.step;\n break;\n case 'PageUp':\n nextValue = current + pageStep;\n break;\n case 'PageDown':\n nextValue = current - pageStep;\n break;\n case 'Home':\n nextValue = thumbBounds(this.valueState(), index, config).min;\n break;\n case 'End':\n nextValue = thumbBounds(this.valueState(), index, config).max;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n this.activeThumbIndex.set(index);\n this.updateThumbValue(index, nextValue);\n }\n\n private beginDrag(event: PointerEvent, index: number): void {\n this.pointerId.set(event.pointerId);\n this.draggedThumbIndex.set(index);\n this.focusThumb(index);\n }\n\n private updateThumbValue(index: number, rawValue: number): void {\n const current = this.valueState();\n const bounds = thumbBounds(current, index, this.config());\n const nextValues = current.slice();\n\n nextValues[index] = snapWithinBounds(rawValue, bounds.min, bounds.max, this.config());\n\n if (sameValues(nextValues, current)) {\n return;\n }\n\n this.valueState.set(nextValues);\n this.valueChange.emit(nextValues);\n }\n\n private valueFromPointer(event: PointerEvent): number | null {\n const track = this.track().nativeElement;\n const rect = track.getBoundingClientRect();\n const config = this.config();\n\n if (rect.width <= 0 || rect.height <= 0) {\n return null;\n }\n\n let ratio = 0;\n\n if (this.orientation() === 'horizontal') {\n const physicalRatio = clamp((event.clientX - rect.left) / rect.width, 0, 1);\n ratio = this.resolvedDirection() === 'rtl' ? 1 - physicalRatio : physicalRatio;\n } else {\n ratio = clamp((rect.bottom - event.clientY) / rect.height, 0, 1);\n }\n\n return config.min + ratio * (config.max - config.min);\n }\n\n private closestThumbIndex(nextValue: number): number {\n const values = this.valueState();\n let bestIndex = 0;\n let bestDistance = Number.POSITIVE_INFINITY;\n\n values.forEach((value, index) => {\n const distance = Math.abs(value - nextValue);\n if (distance < bestDistance) {\n bestDistance = distance;\n bestIndex = index;\n }\n });\n\n return bestIndex;\n }\n\n private rangeSpan(): { start: number; end: number } {\n const positions = this.valueState().map((value) => this.positionPercent(value));\n\n if (!positions.length) {\n return { start: 0, end: 0 };\n }\n\n if (positions.length === 1) {\n const minBoundary = this.positionPercent(this.config().min);\n return {\n start: Math.min(minBoundary, positions[0]),\n end: Math.max(minBoundary, positions[0]),\n };\n }\n\n return {\n start: Math.min(...positions),\n end: Math.max(...positions),\n };\n }\n\n private positionPercent(value: number): number {\n const config = this.config();\n const range = config.max - config.min;\n\n if (range <= 0) {\n return this.orientation() === 'horizontal' && this.resolvedDirection() === 'rtl' ? 100 : 0;\n }\n\n const logicalRatio = (value - config.min) / range;\n const physicalRatio =\n this.orientation() === 'horizontal' && this.resolvedDirection() === 'rtl' ? 1 - logicalRatio : logicalRatio;\n\n return clamp(physicalRatio * 100, 0, 100);\n }\n\n private thumbLabel(index: number, count: number): string | null {\n const labels = this.thumbLabels();\n\n if (labels?.[index]) {\n return labels[index] ?? null;\n }\n\n if (count === 1) {\n return this.ariaLabel();\n }\n\n return this.ariaLabel() ? `${this.ariaLabel()} ${index + 1}` : `Slider thumb ${index + 1}`;\n }\n\n private focusThumb(index: number): void {\n const thumb = this.host.nativeElement.querySelector<HTMLButtonElement>(`.ui-slider__thumb[data-index=\"${index}\"]`);\n thumb?.focus();\n }\n\n private resolvedDirection(): 'ltr' | 'rtl' {\n const host = this.host.nativeElement;\n\n if (host.dir === 'ltr' || host.dir === 'rtl') {\n return host.dir;\n }\n\n const view = this.document.defaultView;\n if (!view) {\n return 'ltr';\n }\n\n return view.getComputedStyle(host).direction === 'rtl' ? 'rtl' : 'ltr';\n }\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nfunction clampIndex(index: number, length: number): number {\n return clamp(index, 0, Math.max(length - 1, 0));\n}\n\nfunction decimalPlaces(value: number): number {\n const text = `${value}`;\n const fraction = text.split('.')[1];\n return fraction?.length ?? 0;\n}\n\nfunction normalizeSliderValues(values: readonly number[], config: SliderConfig): number[] {\n const incoming = values.length ? [...values] : [config.min];\n const sorted = incoming.map((value) => snapToStep(value, config)).sort((left, right) => left - right);\n const gap = config.step * config.minStepsBetweenThumbs;\n const normalized: number[] = [];\n\n sorted.forEach((value, index) => {\n const remaining = sorted.length - index - 1;\n const min = index === 0 ? config.min : normalized[index - 1] + gap;\n const max = Math.max(min, config.max - remaining * gap);\n normalized.push(snapWithinBounds(value, min, max, config));\n });\n\n return normalized;\n}\n\nfunction sameValues(left: readonly number[], right: readonly number[]): boolean {\n return left.length === right.length && left.every((value, index) => value === right[index]);\n}\n\nfunction snapToStep(value: number, config: SliderConfig): number {\n const ratio = (value - config.min) / config.step;\n const snapped = config.min + Math.round(ratio) * config.step;\n const precision = Math.max(decimalPlaces(config.step), decimalPlaces(config.min));\n return Number(snapped.toFixed(precision));\n}\n\nfunction snapWithinBounds(value: number, min: number, max: number, config: SliderConfig): number {\n const boundedMin = Math.min(min, max);\n const boundedMax = Math.max(min, max);\n const snapped = snapToStep(value, config);\n return clamp(snapped, boundedMin, boundedMax);\n}\n\nfunction thumbBounds(values: readonly number[], index: number, config: SliderConfig): { min: number; max: number } {\n const gap = config.step * config.minStepsBetweenThumbs;\n const min = index === 0 ? config.min : values[index - 1] + gap;\n const max = index === values.length - 1 ? config.max : values[index + 1] - gap;\n return { min: Math.min(min, max), max: Math.max(min, max) };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;AAGG;MAQU,eAAe,CAAA;AACT,IAAA,EAAE,GAAG,MAAM,CAA+B,UAAU,CAAC;IAC7D,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;AAEf,IAAA,OAAO,GAAG,QAAQ,CAAC,MACpC,EAAE,CACA,0DAA0D,EAC1D,4BAA4B,EAC5B,kDAAkD,EAClD,IAAI,CAAC,KAAK,EAAE,CACb;gFACF;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;IAC/B;uGAfW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,4QAHhB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,kpCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uB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,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC;IACrC,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC;IACzC,OAAO,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;AAC/C;AAEA,SAAS,WAAW,CAAC,MAAyB,EAAE,KAAa,EAAE,MAAoB,EAAA;IACjF,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,qBAAqB;IACtD,MAAM,GAAG,GAAG,KAAK,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG;IAC9D,MAAM,GAAG,GAAG,KAAK,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG;IAC9E,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;AAC7D;;ACvcA;;AAEG;;;;"}
@@ -0,0 +1,60 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { cn } from '@ojiepermana/angular/component/utils';
4
+
5
+ class SpinnerComponent {
6
+ class = input('', /* @ts-ignore */
7
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8
+ decorative = input(false, { ...(ngDevMode ? { debugName: "decorative" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
9
+ ariaLabel = input('Loading', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
10
+ ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
11
+ classes = computed(() => cn('inline-flex size-4 shrink-0 items-center justify-center align-middle text-current', this.class()), /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: SpinnerComponent, isStandalone: true, selector: "ui-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "spinner" }, properties: { "class": "classes()", "attr.role": "decorative() ? null : \"status\"", "attr.aria-hidden": "decorative() ? \"true\" : null", "attr.aria-label": "decorative() || ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "decorative() ? null : ariaLabelledby()" } }, ngImport: i0, template: `
15
+ <svg
16
+ aria-hidden="true"
17
+ class="size-full animate-spin motion-reduce:animate-none"
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ stroke="currentColor"
21
+ stroke-width="2">
22
+ <circle cx="12" cy="12" r="9" class="opacity-20" />
23
+ <path d="M21 12a9 9 0 0 0-9-9" stroke-linecap="round" />
24
+ </svg>
25
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SpinnerComponent, decorators: [{
28
+ type: Component,
29
+ args: [{
30
+ selector: 'ui-spinner',
31
+ changeDetection: ChangeDetectionStrategy.OnPush,
32
+ host: {
33
+ '[class]': 'classes()',
34
+ '[attr.role]': 'decorative() ? null : "status"',
35
+ '[attr.aria-hidden]': 'decorative() ? "true" : null',
36
+ '[attr.aria-label]': 'decorative() || ariaLabelledby() ? null : ariaLabel()',
37
+ '[attr.aria-labelledby]': 'decorative() ? null : ariaLabelledby()',
38
+ 'data-slot': 'spinner',
39
+ },
40
+ template: `
41
+ <svg
42
+ aria-hidden="true"
43
+ class="size-full animate-spin motion-reduce:animate-none"
44
+ viewBox="0 0 24 24"
45
+ fill="none"
46
+ stroke="currentColor"
47
+ stroke-width="2">
48
+ <circle cx="12" cy="12" r="9" class="opacity-20" />
49
+ <path d="M21 12a9 9 0 0 0-9-9" stroke-linecap="round" />
50
+ </svg>
51
+ `,
52
+ }]
53
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }] } });
54
+
55
+ /**
56
+ * Generated bundle index. Do not edit.
57
+ */
58
+
59
+ export { SpinnerComponent };
60
+ //# sourceMappingURL=ojiepermana-angular-component-spinner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-spinner.mjs","sources":["../../../projects/angular/component/spinner/spinner.component.ts","../../../projects/angular/component/spinner/ojiepermana-angular-component-spinner.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n@Component({\n selector: 'ui-spinner',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.role]': 'decorative() ? null : \"status\"',\n '[attr.aria-hidden]': 'decorative() ? \"true\" : null',\n '[attr.aria-label]': 'decorative() || ariaLabelledby() ? null : ariaLabel()',\n '[attr.aria-labelledby]': 'decorative() ? null : ariaLabelledby()',\n 'data-slot': 'spinner',\n },\n template: `\n <svg\n aria-hidden=\"true\"\n class=\"size-full animate-spin motion-reduce:animate-none\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" class=\"opacity-20\" />\n <path d=\"M21 12a9 9 0 0 0-9-9\" stroke-linecap=\"round\" />\n </svg>\n `,\n})\nexport class SpinnerComponent {\n readonly class = input<string>('');\n readonly decorative = input(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string>('Loading', { alias: 'aria-label' });\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n protected readonly classes = computed(() =>\n cn('inline-flex size-4 shrink-0 items-center justify-center align-middle text-current', this.class()),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MA2Ba,gBAAgB,CAAA;IAClB,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;IACzB,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC1D,SAAS,GAAG,KAAK,CAAS,SAAS,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;IAC7D,cAAc,GAAG,KAAK,CAAgB,IAAI,sFAAI,KAAK,EAAE,iBAAiB,EAAA,CAAG;AAE/D,IAAA,OAAO,GAAG,QAAQ,CAAC,MACpC,EAAE,CAAC,mFAAmF,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;gFACtG;uGARU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,I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