@ng-nest/ui 17.0.0 → 17.0.2

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 (661) hide show
  1. package/affix/affix.component.d.ts +1 -2
  2. package/affix/affix.module.d.ts +1 -3
  3. package/alert/alert.component.d.ts +4 -5
  4. package/alert/alert.module.d.ts +1 -8
  5. package/anchor/anchor-inner.component.d.ts +1 -1
  6. package/anchor/anchor.component.d.ts +6 -7
  7. package/anchor/anchor.module.d.ts +2 -6
  8. package/api/api.component.d.ts +4 -4
  9. package/api/api.module.d.ts +1 -2
  10. package/auto-complete/auto-complete-portal.component.d.ts +3 -5
  11. package/auto-complete/auto-complete.component.d.ts +12 -13
  12. package/auto-complete/auto-complete.module.d.ts +1 -9
  13. package/avatar/avatar-group.component.d.ts +1 -2
  14. package/avatar/avatar.component.d.ts +6 -7
  15. package/avatar/avatar.module.d.ts +2 -6
  16. package/back-top/back-top.component.d.ts +7 -12
  17. package/back-top/back-top.module.d.ts +1 -5
  18. package/badge/badge.component.d.ts +3 -8
  19. package/badge/badge.module.d.ts +1 -3
  20. package/base-form/base-form.component.d.ts +1 -1
  21. package/base-form/base-form.module.d.ts +1 -2
  22. package/border/border.component.d.ts +4 -4
  23. package/border/border.module.d.ts +1 -1
  24. package/button/button.component.d.ts +8 -10
  25. package/button/button.module.d.ts +1 -5
  26. package/button/buttons.component.d.ts +4 -5
  27. package/calendar/calendar.component.d.ts +9 -13
  28. package/calendar/calendar.module.d.ts +1 -10
  29. package/card/card.component.d.ts +2 -6
  30. package/card/card.module.d.ts +1 -5
  31. package/carousel/carousel-panel.component.d.ts +10 -13
  32. package/carousel/carousel.component.d.ts +4 -7
  33. package/carousel/carousel.module.d.ts +1 -5
  34. package/cascade/cascade-portal.component.d.ts +4 -5
  35. package/cascade/cascade.component.d.ts +14 -13
  36. package/cascade/cascade.module.d.ts +1 -9
  37. package/checkbox/checkbox.component.d.ts +6 -8
  38. package/checkbox/checkbox.module.d.ts +1 -8
  39. package/collapse/collapse-panel.component.d.ts +5 -8
  40. package/collapse/collapse.component.d.ts +3 -7
  41. package/collapse/collapse.module.d.ts +1 -5
  42. package/color/color.component.d.ts +4 -5
  43. package/color/color.module.d.ts +1 -3
  44. package/color-picker/color-picker-portal.component.d.ts +7 -11
  45. package/color-picker/color-picker.component.d.ts +11 -12
  46. package/color-picker/color-picker.module.d.ts +1 -11
  47. package/comment/comment-reply.component.d.ts +4 -9
  48. package/comment/comment.component.d.ts +5 -9
  49. package/comment/comment.module.d.ts +1 -11
  50. package/container/aside.component.d.ts +5 -5
  51. package/container/container.component.d.ts +2 -3
  52. package/container/container.module.d.ts +1 -3
  53. package/container/footer.component.d.ts +5 -7
  54. package/container/header.component.d.ts +5 -7
  55. package/container/main.component.d.ts +4 -4
  56. package/crumb/crumb.component.d.ts +4 -5
  57. package/crumb/crumb.module.d.ts +1 -5
  58. package/date-picker/date-picker-portal.component.d.ts +5 -9
  59. package/date-picker/date-picker.component.d.ts +14 -16
  60. package/date-picker/date-picker.module.d.ts +2 -21
  61. package/date-picker/date-quarter.pipe.d.ts +1 -1
  62. package/date-picker/date-range-portal.component.d.ts +1 -1
  63. package/date-picker/date-range.component.d.ts +16 -18
  64. package/date-picker/picker-date.component.d.ts +8 -11
  65. package/date-picker/picker-month.component.d.ts +8 -11
  66. package/date-picker/picker-quarter.component.d.ts +9 -14
  67. package/date-picker/picker-year.component.d.ts +5 -8
  68. package/description/description-item.component.d.ts +1 -2
  69. package/description/description.component.d.ts +4 -5
  70. package/description/description.module.d.ts +2 -5
  71. package/dialog/dialog-container.component.d.ts +1 -2
  72. package/dialog/dialog-portal.component.d.ts +1 -1
  73. package/dialog/dialog-portal.directives.d.ts +13 -17
  74. package/dialog/dialog.component.d.ts +15 -17
  75. package/dialog/dialog.module.d.ts +1 -14
  76. package/dialog/dialog.service.d.ts +8 -10
  77. package/doc/doc.component.d.ts +6 -6
  78. package/doc/doc.module.d.ts +1 -2
  79. package/drag/drag.directive.d.ts +5 -6
  80. package/drag/drag.module.d.ts +1 -2
  81. package/drawer/drawer-container.component.d.ts +1 -2
  82. package/drawer/drawer-portal.component.d.ts +1 -2
  83. package/drawer/drawer-portal.directives.d.ts +5 -6
  84. package/drawer/drawer.component.d.ts +10 -15
  85. package/drawer/drawer.module.d.ts +2 -8
  86. package/drawer/drawer.service.d.ts +5 -7
  87. package/dropdown/dropdown-portal.component.d.ts +1 -1
  88. package/dropdown/dropdown.component.d.ts +10 -13
  89. package/dropdown/dropdown.module.d.ts +1 -7
  90. package/empty/empty.component.d.ts +4 -7
  91. package/empty/empty.module.d.ts +1 -6
  92. package/esm2022/affix/affix.component.mjs +10 -10
  93. package/esm2022/affix/affix.module.mjs +4 -7
  94. package/esm2022/alert/alert.component.mjs +26 -18
  95. package/esm2022/alert/alert.module.mjs +4 -12
  96. package/esm2022/alert/alert.property.mjs +1 -1
  97. package/esm2022/anchor/anchor-inner.component.mjs +3 -2
  98. package/esm2022/anchor/anchor.component.mjs +21 -21
  99. package/esm2022/anchor/anchor.module.mjs +4 -9
  100. package/esm2022/anchor/anchor.property.mjs +1 -1
  101. package/esm2022/api/api.component.mjs +13 -11
  102. package/esm2022/api/api.module.mjs +4 -6
  103. package/esm2022/auto-complete/auto-complete-portal.component.mjs +14 -15
  104. package/esm2022/auto-complete/auto-complete.component.mjs +43 -30
  105. package/esm2022/auto-complete/auto-complete.module.mjs +5 -14
  106. package/esm2022/avatar/avatar-group.component.mjs +6 -6
  107. package/esm2022/avatar/avatar.component.mjs +17 -18
  108. package/esm2022/avatar/avatar.module.mjs +4 -9
  109. package/esm2022/avatar/avatar.property.mjs +1 -1
  110. package/esm2022/back-top/back-top.component.mjs +25 -29
  111. package/esm2022/back-top/back-top.module.mjs +4 -9
  112. package/esm2022/badge/badge.component.mjs +18 -22
  113. package/esm2022/badge/badge.module.mjs +4 -7
  114. package/esm2022/base-form/base-form.component.mjs +9 -4
  115. package/esm2022/base-form/base-form.module.mjs +4 -5
  116. package/esm2022/base-form/base-form.property.mjs +1 -1
  117. package/esm2022/border/border.component.mjs +13 -11
  118. package/esm2022/border/border.module.mjs +3 -3
  119. package/esm2022/button/button.component.mjs +19 -23
  120. package/esm2022/button/button.module.mjs +4 -9
  121. package/esm2022/button/button.property.mjs +1 -1
  122. package/esm2022/button/buttons.component.mjs +15 -14
  123. package/esm2022/calendar/calendar.component.mjs +35 -25
  124. package/esm2022/calendar/calendar.module.mjs +4 -14
  125. package/esm2022/card/card.component.mjs +14 -16
  126. package/esm2022/card/card.module.mjs +4 -9
  127. package/esm2022/carousel/carousel-panel.component.mjs +37 -33
  128. package/esm2022/carousel/carousel.component.mjs +19 -22
  129. package/esm2022/carousel/carousel.module.mjs +5 -10
  130. package/esm2022/carousel/carousel.property.mjs +1 -1
  131. package/esm2022/cascade/cascade-portal.component.mjs +19 -17
  132. package/esm2022/cascade/cascade.component.mjs +37 -30
  133. package/esm2022/cascade/cascade.module.mjs +5 -14
  134. package/esm2022/checkbox/checkbox.component.mjs +31 -23
  135. package/esm2022/checkbox/checkbox.module.mjs +4 -12
  136. package/esm2022/collapse/collapse-panel.component.mjs +19 -20
  137. package/esm2022/collapse/collapse.component.mjs +11 -14
  138. package/esm2022/collapse/collapse.module.mjs +4 -9
  139. package/esm2022/color/color.component.mjs +15 -16
  140. package/esm2022/color/color.module.mjs +4 -7
  141. package/esm2022/color-picker/color-picker-portal.component.mjs +53 -35
  142. package/esm2022/color-picker/color-picker.component.mjs +36 -35
  143. package/esm2022/color-picker/color-picker.module.mjs +5 -42
  144. package/esm2022/comment/comment-reply.component.mjs +18 -18
  145. package/esm2022/comment/comment.component.mjs +32 -24
  146. package/esm2022/comment/comment.module.mjs +4 -41
  147. package/esm2022/comment/comment.property.mjs +1 -1
  148. package/esm2022/container/aside.component.mjs +15 -12
  149. package/esm2022/container/container.component.mjs +14 -13
  150. package/esm2022/container/container.module.mjs +5 -35
  151. package/esm2022/container/footer.component.mjs +17 -20
  152. package/esm2022/container/header.component.mjs +17 -20
  153. package/esm2022/container/main.component.mjs +14 -11
  154. package/esm2022/core/config/config.service.mjs +8 -3
  155. package/esm2022/core/services/preloading-strategy.service.mjs +4 -3
  156. package/esm2022/crumb/crumb.component.mjs +15 -15
  157. package/esm2022/crumb/crumb.module.mjs +4 -9
  158. package/esm2022/date-picker/date-picker-portal.component.mjs +36 -27
  159. package/esm2022/date-picker/date-picker.component.mjs +51 -46
  160. package/esm2022/date-picker/date-picker.module.mjs +5 -106
  161. package/esm2022/date-picker/date-quarter.pipe.mjs +3 -3
  162. package/esm2022/date-picker/date-range-portal.component.mjs +22 -11
  163. package/esm2022/date-picker/date-range.component.mjs +53 -51
  164. package/esm2022/date-picker/picker-date.component.mjs +44 -38
  165. package/esm2022/date-picker/picker-month.component.mjs +30 -28
  166. package/esm2022/date-picker/picker-quarter.component.mjs +30 -30
  167. package/esm2022/date-picker/picker-year.component.mjs +25 -23
  168. package/esm2022/description/description-item.component.mjs +7 -9
  169. package/esm2022/description/description.component.mjs +13 -13
  170. package/esm2022/description/description.module.mjs +4 -8
  171. package/esm2022/dialog/dialog-container.component.mjs +8 -7
  172. package/esm2022/dialog/dialog-portal.component.mjs +27 -11
  173. package/esm2022/dialog/dialog-portal.directives.mjs +39 -39
  174. package/esm2022/dialog/dialog-ref.mjs +1 -1
  175. package/esm2022/dialog/dialog.component.mjs +40 -47
  176. package/esm2022/dialog/dialog.module.mjs +11 -69
  177. package/esm2022/dialog/dialog.service.mjs +15 -16
  178. package/esm2022/doc/doc.component.mjs +12 -9
  179. package/esm2022/doc/doc.module.mjs +4 -6
  180. package/esm2022/drag/drag.directive.mjs +10 -10
  181. package/esm2022/drag/drag.module.mjs +4 -6
  182. package/esm2022/drawer/drawer-container.component.mjs +8 -7
  183. package/esm2022/drawer/drawer-portal.component.mjs +12 -11
  184. package/esm2022/drawer/drawer-portal.directives.mjs +17 -16
  185. package/esm2022/drawer/drawer.component.mjs +23 -32
  186. package/esm2022/drawer/drawer.module.mjs +9 -25
  187. package/esm2022/drawer/drawer.service.mjs +14 -14
  188. package/esm2022/dropdown/dropdown-portal.component.mjs +7 -5
  189. package/esm2022/dropdown/dropdown.component.mjs +31 -24
  190. package/esm2022/dropdown/dropdown.module.mjs +5 -12
  191. package/esm2022/empty/empty.component.mjs +21 -17
  192. package/esm2022/empty/empty.module.mjs +4 -10
  193. package/esm2022/examples/examples.component.mjs +12 -9
  194. package/esm2022/examples/examples.module.mjs +4 -6
  195. package/esm2022/find/find.component.mjs +48 -29
  196. package/esm2022/find/find.module.mjs +4 -52
  197. package/esm2022/form/control.component.mjs +69 -39
  198. package/esm2022/form/form.component.mjs +27 -18
  199. package/esm2022/form/form.module.mjs +4 -69
  200. package/esm2022/highlight/highlight.component.mjs +26 -23
  201. package/esm2022/highlight/highlight.module.mjs +4 -8
  202. package/esm2022/i18n/i18n.directive.mjs +13 -10
  203. package/esm2022/i18n/i18n.module.mjs +3 -3
  204. package/esm2022/i18n/i18n.pipe.mjs +4 -3
  205. package/esm2022/i18n/i18n.service.mjs +7 -11
  206. package/esm2022/icon/icon.component.mjs +20 -21
  207. package/esm2022/icon/icon.module.mjs +4 -9
  208. package/esm2022/icon/icon.property.mjs +1 -1
  209. package/esm2022/icon/icon.service.mjs +35 -34
  210. package/esm2022/image/image-group.component.mjs +4 -3
  211. package/esm2022/image/image-preview.component.mjs +26 -31
  212. package/esm2022/image/image.component.mjs +30 -29
  213. package/esm2022/image/image.module.mjs +4 -13
  214. package/esm2022/inner/inner.component.mjs +14 -13
  215. package/esm2022/inner/inner.module.mjs +4 -7
  216. package/esm2022/input/input-group.component.mjs +12 -13
  217. package/esm2022/input/input.component.mjs +33 -34
  218. package/esm2022/input/input.module.mjs +4 -11
  219. package/esm2022/input-number/input-number.component.mjs +23 -26
  220. package/esm2022/input-number/input-number.module.mjs +4 -11
  221. package/esm2022/keyword/keyword.directive.mjs +13 -13
  222. package/esm2022/keyword/keyword.module.mjs +4 -7
  223. package/esm2022/keyword/keyword.property.mjs +3 -3
  224. package/esm2022/layout/col.component.mjs +14 -18
  225. package/esm2022/layout/layout.module.mjs +4 -7
  226. package/esm2022/layout/layout.property.mjs +1 -1
  227. package/esm2022/layout/row.component.mjs +12 -12
  228. package/esm2022/link/link.component.mjs +17 -18
  229. package/esm2022/link/link.module.mjs +4 -10
  230. package/esm2022/list/list-drop-group.directive.mjs +3 -2
  231. package/esm2022/list/list-option.component.mjs +16 -16
  232. package/esm2022/list/list.component.mjs +38 -32
  233. package/esm2022/list/list.module.mjs +4 -52
  234. package/esm2022/loading/loading.component.mjs +19 -21
  235. package/esm2022/loading/loading.module.mjs +4 -10
  236. package/esm2022/menu/menu-node.component.mjs +17 -17
  237. package/esm2022/menu/menu.component.mjs +21 -23
  238. package/esm2022/menu/menu.module.mjs +4 -11
  239. package/esm2022/message/message.component.mjs +10 -11
  240. package/esm2022/message/message.module.mjs +5 -12
  241. package/esm2022/message/message.service.mjs +12 -12
  242. package/esm2022/message-box/message-box.component.mjs +20 -8
  243. package/esm2022/message-box/message-box.module.mjs +5 -47
  244. package/esm2022/message-box/message-box.service.mjs +12 -11
  245. package/esm2022/notification/notification.component.mjs +10 -11
  246. package/esm2022/notification/notification.module.mjs +5 -12
  247. package/esm2022/notification/notification.service.mjs +14 -10
  248. package/esm2022/outlet/outlet.directive.mjs +9 -9
  249. package/esm2022/outlet/outlet.module.mjs +4 -6
  250. package/esm2022/page-header/page-header.component.mjs +19 -18
  251. package/esm2022/page-header/page-header.module.mjs +4 -8
  252. package/esm2022/pagination/pagination.component.mjs +39 -29
  253. package/esm2022/pagination/pagination.module.mjs +4 -13
  254. package/esm2022/pattern/pattern.component.mjs +12 -9
  255. package/esm2022/pattern/pattern.module.mjs +4 -6
  256. package/esm2022/popconfirm/popconfirm.component.mjs +24 -25
  257. package/esm2022/popconfirm/popconfirm.module.mjs +4 -11
  258. package/esm2022/popover/popover-portal.component.mjs +15 -14
  259. package/esm2022/popover/popover.directive.mjs +16 -18
  260. package/esm2022/popover/popover.module.mjs +5 -11
  261. package/esm2022/portal/portal.module.mjs +6 -9
  262. package/esm2022/portal/portal.service.mjs +12 -11
  263. package/esm2022/progress/progress.component.mjs +16 -18
  264. package/esm2022/progress/progress.module.mjs +4 -9
  265. package/esm2022/radio/radio.component.mjs +21 -21
  266. package/esm2022/radio/radio.module.mjs +4 -12
  267. package/esm2022/rate/rate.component.mjs +22 -21
  268. package/esm2022/rate/rate.module.mjs +4 -11
  269. package/esm2022/resizable/resizable.directive.mjs +56 -45
  270. package/esm2022/resizable/resizable.module.mjs +5 -7
  271. package/esm2022/resizable/resizable.property.mjs +3 -3
  272. package/esm2022/result/result.component.mjs +15 -18
  273. package/esm2022/result/result.module.mjs +4 -9
  274. package/esm2022/ripple/ripple.directive.mjs +11 -10
  275. package/esm2022/ripple/ripple.module.mjs +5 -8
  276. package/esm2022/select/select-portal.component.mjs +6 -4
  277. package/esm2022/select/select.component.mjs +52 -50
  278. package/esm2022/select/select.module.mjs +5 -46
  279. package/esm2022/skeleton/skeleton.component.mjs +14 -16
  280. package/esm2022/skeleton/skeleton.module.mjs +4 -8
  281. package/esm2022/slider/slider.component.mjs +38 -35
  282. package/esm2022/slider/slider.module.mjs +5 -11
  283. package/esm2022/slider-select/slider-select.component.mjs +45 -37
  284. package/esm2022/slider-select/slider-select.module.mjs +4 -36
  285. package/esm2022/statistic/countdown.component.mjs +14 -15
  286. package/esm2022/statistic/statistic.component.mjs +13 -13
  287. package/esm2022/statistic/statistic.module.mjs +4 -9
  288. package/esm2022/steps/steps.component.mjs +17 -18
  289. package/esm2022/steps/steps.module.mjs +4 -9
  290. package/esm2022/switch/switch.component.mjs +18 -17
  291. package/esm2022/switch/switch.module.mjs +4 -11
  292. package/esm2022/table/table-body.component.mjs +19 -9
  293. package/esm2022/table/table-foot.component.mjs +12 -15
  294. package/esm2022/table/table-head.component.mjs +33 -27
  295. package/esm2022/table/table.component.mjs +20 -10
  296. package/esm2022/table/table.module.mjs +4 -69
  297. package/esm2022/tabs/tab-content.component.mjs +12 -9
  298. package/esm2022/tabs/tab-link.directive.mjs +7 -5
  299. package/esm2022/tabs/tab.component.mjs +11 -10
  300. package/esm2022/tabs/tabs.component.mjs +28 -26
  301. package/esm2022/tabs/tabs.module.mjs +5 -26
  302. package/esm2022/tag/tag.component.mjs +16 -19
  303. package/esm2022/tag/tag.module.mjs +4 -9
  304. package/esm2022/text-retract/text-retract.component.mjs +17 -18
  305. package/esm2022/text-retract/text-retract.module.mjs +4 -10
  306. package/esm2022/textarea/textarea.component.mjs +24 -24
  307. package/esm2022/textarea/textarea.module.mjs +4 -10
  308. package/esm2022/theme/theme.component.mjs +44 -30
  309. package/esm2022/theme/theme.module.mjs +4 -40
  310. package/esm2022/time-ago/time-ago.module.mjs +4 -6
  311. package/esm2022/time-ago/time-ago.pipe.mjs +20 -20
  312. package/esm2022/time-picker/time-picker-frame.component.mjs +31 -29
  313. package/esm2022/time-picker/time-picker-portal.component.mjs +19 -19
  314. package/esm2022/time-picker/time-picker.component.mjs +39 -40
  315. package/esm2022/time-picker/time-picker.module.mjs +5 -46
  316. package/esm2022/time-range/time-range.module.mjs +4 -4
  317. package/esm2022/time-range/time-range.pipe.mjs +3 -3
  318. package/esm2022/timeline/timeline.component.mjs +17 -19
  319. package/esm2022/timeline/timeline.module.mjs +4 -11
  320. package/esm2022/tooltip/tooltip-portal.component.mjs +15 -14
  321. package/esm2022/tooltip/tooltip.directive.mjs +15 -18
  322. package/esm2022/tooltip/tooltip.module.mjs +5 -11
  323. package/esm2022/transfer/transfer.component.mjs +68 -54
  324. package/esm2022/transfer/transfer.module.mjs +4 -57
  325. package/esm2022/tree/tree-node.component.mjs +36 -29
  326. package/esm2022/tree/tree.component.mjs +10 -12
  327. package/esm2022/tree/tree.module.mjs +4 -41
  328. package/esm2022/tree/tree.service.mjs +4 -3
  329. package/esm2022/tree-file/tree-file.component.mjs +34 -30
  330. package/esm2022/tree-file/tree-file.module.mjs +4 -13
  331. package/esm2022/tree-select/tree-select-portal.component.mjs +25 -25
  332. package/esm2022/tree-select/tree-select.component.mjs +53 -51
  333. package/esm2022/tree-select/tree-select.module.mjs +6 -54
  334. package/esm2022/typography/typography.component.mjs +11 -11
  335. package/esm2022/typography/typography.module.mjs +4 -7
  336. package/esm2022/upload/upload-portal.component.mjs +11 -12
  337. package/esm2022/upload/upload.component.mjs +42 -39
  338. package/esm2022/upload/upload.module.mjs +4 -53
  339. package/examples/examples.component.d.ts +6 -6
  340. package/examples/examples.module.d.ts +1 -2
  341. package/fesm2022/ng-nest-ui-affix.mjs +12 -15
  342. package/fesm2022/ng-nest-ui-affix.mjs.map +1 -1
  343. package/fesm2022/ng-nest-ui-alert.mjs +26 -25
  344. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  345. package/fesm2022/ng-nest-ui-anchor.mjs +24 -26
  346. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  347. package/fesm2022/ng-nest-ui-api.mjs +15 -15
  348. package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
  349. package/fesm2022/ng-nest-ui-auto-complete.mjs +58 -50
  350. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  351. package/fesm2022/ng-nest-ui-avatar.mjs +23 -27
  352. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  353. package/fesm2022/ng-nest-ui-back-top.mjs +26 -33
  354. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  355. package/fesm2022/ng-nest-ui-badge.mjs +20 -26
  356. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  357. package/fesm2022/ng-nest-ui-base-form.mjs +11 -6
  358. package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
  359. package/fesm2022/ng-nest-ui-border.mjs +14 -12
  360. package/fesm2022/ng-nest-ui-border.mjs.map +1 -1
  361. package/fesm2022/ng-nest-ui-button.mjs +30 -38
  362. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  363. package/fesm2022/ng-nest-ui-calendar.mjs +35 -33
  364. package/fesm2022/ng-nest-ui-calendar.mjs.map +1 -1
  365. package/fesm2022/ng-nest-ui-card.mjs +15 -21
  366. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  367. package/fesm2022/ng-nest-ui-carousel.mjs +52 -54
  368. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  369. package/fesm2022/ng-nest-ui-cascade.mjs +54 -51
  370. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  371. package/fesm2022/ng-nest-ui-checkbox.mjs +32 -30
  372. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  373. package/fesm2022/ng-nest-ui-collapse.mjs +27 -36
  374. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  375. package/fesm2022/ng-nest-ui-color-picker.mjs +84 -98
  376. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  377. package/fesm2022/ng-nest-ui-color.mjs +16 -18
  378. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  379. package/fesm2022/ng-nest-ui-comment.mjs +43 -72
  380. package/fesm2022/ng-nest-ui-comment.mjs.map +1 -1
  381. package/fesm2022/ng-nest-ui-container.mjs +61 -94
  382. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  383. package/fesm2022/ng-nest-ui-core.mjs +10 -4
  384. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  385. package/fesm2022/ng-nest-ui-crumb.mjs +16 -20
  386. package/fesm2022/ng-nest-ui-crumb.mjs.map +1 -1
  387. package/fesm2022/ng-nest-ui-date-picker.mjs +247 -293
  388. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  389. package/fesm2022/ng-nest-ui-description.mjs +19 -25
  390. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  391. package/fesm2022/ng-nest-ui-dialog.mjs +180 -223
  392. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  393. package/fesm2022/ng-nest-ui-doc.mjs +13 -12
  394. package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
  395. package/fesm2022/ng-nest-ui-drag.mjs +13 -14
  396. package/fesm2022/ng-nest-ui-drag.mjs.map +1 -1
  397. package/fesm2022/ng-nest-ui-drawer.mjs +114 -133
  398. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  399. package/fesm2022/ng-nest-ui-dropdown.mjs +39 -33
  400. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  401. package/fesm2022/ng-nest-ui-empty.mjs +21 -24
  402. package/fesm2022/ng-nest-ui-empty.mjs.map +1 -1
  403. package/fesm2022/ng-nest-ui-examples.mjs +13 -12
  404. package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
  405. package/fesm2022/ng-nest-ui-find.mjs +49 -76
  406. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  407. package/fesm2022/ng-nest-ui-form.mjs +88 -112
  408. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  409. package/fesm2022/ng-nest-ui-highlight.mjs +28 -27
  410. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  411. package/fesm2022/ng-nest-ui-i18n.mjs +21 -21
  412. package/fesm2022/ng-nest-ui-i18n.mjs.map +1 -1
  413. package/fesm2022/ng-nest-ui-icon.mjs +55 -57
  414. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  415. package/fesm2022/ng-nest-ui-image.mjs +50 -61
  416. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  417. package/fesm2022/ng-nest-ui-inner.mjs +15 -17
  418. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  419. package/fesm2022/ng-nest-ui-input-number.mjs +25 -31
  420. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  421. package/fesm2022/ng-nest-ui-input.mjs +41 -49
  422. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  423. package/fesm2022/ng-nest-ui-keyword.mjs +17 -19
  424. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  425. package/fesm2022/ng-nest-ui-layout.mjs +25 -31
  426. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  427. package/fesm2022/ng-nest-ui-link.mjs +18 -24
  428. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  429. package/fesm2022/ng-nest-ui-list.mjs +51 -86
  430. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  431. package/fesm2022/ng-nest-ui-loading.mjs +20 -27
  432. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  433. package/fesm2022/ng-nest-ui-menu.mjs +33 -41
  434. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  435. package/fesm2022/ng-nest-ui-message-box.mjs +33 -58
  436. package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
  437. package/fesm2022/ng-nest-ui-message.mjs +22 -28
  438. package/fesm2022/ng-nest-ui-message.mjs.map +1 -1
  439. package/fesm2022/ng-nest-ui-notification.mjs +24 -26
  440. package/fesm2022/ng-nest-ui-notification.mjs.map +1 -1
  441. package/fesm2022/ng-nest-ui-outlet.mjs +11 -13
  442. package/fesm2022/ng-nest-ui-outlet.mjs.map +1 -1
  443. package/fesm2022/ng-nest-ui-page-header.mjs +20 -23
  444. package/fesm2022/ng-nest-ui-page-header.mjs.map +1 -1
  445. package/fesm2022/ng-nest-ui-pagination.mjs +39 -37
  446. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  447. package/fesm2022/ng-nest-ui-pattern.mjs +13 -12
  448. package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
  449. package/fesm2022/ng-nest-ui-popconfirm.mjs +25 -33
  450. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  451. package/fesm2022/ng-nest-ui-popover.mjs +31 -35
  452. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  453. package/fesm2022/ng-nest-ui-portal.mjs +25 -25
  454. package/fesm2022/ng-nest-ui-portal.mjs.map +1 -1
  455. package/fesm2022/ng-nest-ui-progress.mjs +16 -22
  456. package/fesm2022/ng-nest-ui-progress.mjs.map +1 -1
  457. package/fesm2022/ng-nest-ui-radio.mjs +22 -28
  458. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  459. package/fesm2022/ng-nest-ui-rate.mjs +23 -27
  460. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  461. package/fesm2022/ng-nest-ui-resizable.mjs +62 -52
  462. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  463. package/fesm2022/ng-nest-ui-result.mjs +16 -23
  464. package/fesm2022/ng-nest-ui-result.mjs.map +1 -1
  465. package/fesm2022/ng-nest-ui-ripple.mjs +14 -15
  466. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  467. package/fesm2022/ng-nest-ui-select.mjs +59 -92
  468. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  469. package/fesm2022/ng-nest-ui-skeleton.mjs +15 -20
  470. package/fesm2022/ng-nest-ui-skeleton.mjs.map +1 -1
  471. package/fesm2022/ng-nest-ui-slider-select.mjs +46 -66
  472. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  473. package/fesm2022/ng-nest-ui-slider.mjs +40 -42
  474. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  475. package/fesm2022/ng-nest-ui-statistic.mjs +25 -30
  476. package/fesm2022/ng-nest-ui-statistic.mjs.map +1 -1
  477. package/fesm2022/ng-nest-ui-steps.mjs +18 -23
  478. package/fesm2022/ng-nest-ui-steps.mjs.map +1 -1
  479. package/fesm2022/ng-nest-ui-switch.mjs +19 -23
  480. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  481. package/fesm2022/ng-nest-ui-table.mjs +86 -128
  482. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  483. package/fesm2022/ng-nest-ui-tabs.mjs +52 -63
  484. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  485. package/fesm2022/ng-nest-ui-tag.mjs +17 -24
  486. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  487. package/fesm2022/ng-nest-ui-text-retract.mjs +17 -23
  488. package/fesm2022/ng-nest-ui-text-retract.mjs.map +1 -1
  489. package/fesm2022/ng-nest-ui-textarea.mjs +25 -29
  490. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  491. package/fesm2022/ng-nest-ui-theme.mjs +45 -64
  492. package/fesm2022/ng-nest-ui-theme.mjs.map +1 -1
  493. package/fesm2022/ng-nest-ui-time-ago.mjs +21 -23
  494. package/fesm2022/ng-nest-ui-time-ago.mjs.map +1 -1
  495. package/fesm2022/ng-nest-ui-time-picker.mjs +82 -119
  496. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  497. package/fesm2022/ng-nest-ui-time-range.mjs +5 -5
  498. package/fesm2022/ng-nest-ui-time-range.mjs.map +1 -1
  499. package/fesm2022/ng-nest-ui-timeline.mjs +18 -26
  500. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  501. package/fesm2022/ng-nest-ui-tooltip.mjs +30 -35
  502. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  503. package/fesm2022/ng-nest-ui-transfer.mjs +68 -104
  504. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  505. package/fesm2022/ng-nest-ui-tree-file.mjs +35 -39
  506. package/fesm2022/ng-nest-ui-tree-file.mjs.map +1 -1
  507. package/fesm2022/ng-nest-ui-tree-select.mjs +77 -119
  508. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  509. package/fesm2022/ng-nest-ui-tree.mjs +48 -76
  510. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  511. package/fesm2022/ng-nest-ui-typography.mjs +13 -15
  512. package/fesm2022/ng-nest-ui-typography.mjs.map +1 -1
  513. package/fesm2022/ng-nest-ui-upload.mjs +51 -95
  514. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  515. package/find/find.component.d.ts +6 -7
  516. package/find/find.module.d.ts +1 -13
  517. package/form/control.component.d.ts +6 -7
  518. package/form/form.component.d.ts +4 -6
  519. package/form/form.module.d.ts +1 -24
  520. package/highlight/highlight.component.d.ts +12 -10
  521. package/highlight/highlight.module.d.ts +1 -4
  522. package/i18n/i18n.directive.d.ts +6 -7
  523. package/i18n/i18n.module.d.ts +1 -1
  524. package/i18n/i18n.pipe.d.ts +1 -1
  525. package/i18n/i18n.service.d.ts +3 -2
  526. package/icon/icon.component.d.ts +7 -9
  527. package/icon/icon.module.d.ts +1 -3
  528. package/icon/icon.property.d.ts +1 -1
  529. package/icon/icon.service.d.ts +6 -7
  530. package/image/image-group.component.d.ts +1 -1
  531. package/image/image-preview.component.d.ts +5 -10
  532. package/image/image.component.d.ts +9 -14
  533. package/image/image.module.d.ts +3 -11
  534. package/inner/inner.component.d.ts +2 -3
  535. package/inner/inner.module.d.ts +1 -3
  536. package/input/input-group.component.d.ts +3 -6
  537. package/input/input.component.d.ts +8 -10
  538. package/input/input.module.d.ts +2 -8
  539. package/input-number/input-number.component.d.ts +5 -6
  540. package/input-number/input-number.module.d.ts +1 -7
  541. package/keyword/keyword.directive.d.ts +3 -4
  542. package/keyword/keyword.module.d.ts +1 -3
  543. package/keyword/keyword.property.d.ts +1 -1
  544. package/layout/col.component.d.ts +5 -7
  545. package/layout/layout.module.d.ts +1 -3
  546. package/layout/row.component.d.ts +3 -4
  547. package/link/link.component.d.ts +5 -7
  548. package/link/link.module.d.ts +1 -6
  549. package/list/list-drop-group.directive.d.ts +1 -1
  550. package/list/list-option.component.d.ts +6 -7
  551. package/list/list.component.d.ts +9 -12
  552. package/list/list.module.d.ts +1 -13
  553. package/loading/loading.component.d.ts +7 -10
  554. package/loading/loading.module.d.ts +1 -6
  555. package/menu/menu-node.component.d.ts +6 -7
  556. package/menu/menu.component.d.ts +4 -7
  557. package/menu/menu.module.d.ts +1 -7
  558. package/message/message.component.d.ts +3 -6
  559. package/message/message.module.d.ts +1 -5
  560. package/message/message.service.d.ts +4 -5
  561. package/message-box/message-box.component.d.ts +1 -1
  562. package/message-box/message-box.module.d.ts +1 -11
  563. package/message-box/message-box.service.d.ts +2 -5
  564. package/notification/notification.component.d.ts +3 -6
  565. package/notification/notification.module.d.ts +1 -5
  566. package/notification/notification.service.d.ts +1 -3
  567. package/outlet/outlet.directive.d.ts +4 -5
  568. package/outlet/outlet.module.d.ts +1 -2
  569. package/package.json +72 -72
  570. package/page-header/page-header.component.d.ts +5 -7
  571. package/page-header/page-header.module.d.ts +1 -4
  572. package/pagination/pagination.component.d.ts +8 -10
  573. package/pagination/pagination.module.d.ts +1 -9
  574. package/pattern/pattern.component.d.ts +4 -4
  575. package/pattern/pattern.module.d.ts +1 -2
  576. package/popconfirm/popconfirm.component.d.ts +6 -9
  577. package/popconfirm/popconfirm.module.d.ts +1 -7
  578. package/popover/popover-portal.component.d.ts +4 -5
  579. package/popover/popover.directive.d.ts +9 -10
  580. package/popover/popover.module.d.ts +1 -6
  581. package/portal/portal.module.d.ts +1 -3
  582. package/portal/portal.service.d.ts +3 -4
  583. package/progress/progress.component.d.ts +3 -7
  584. package/progress/progress.module.d.ts +1 -5
  585. package/radio/radio.component.d.ts +6 -8
  586. package/radio/radio.module.d.ts +1 -8
  587. package/rate/rate.component.d.ts +6 -8
  588. package/rate/rate.module.d.ts +1 -7
  589. package/resizable/resizable.directive.d.ts +5 -7
  590. package/resizable/resizable.module.d.ts +1 -2
  591. package/resizable/resizable.property.d.ts +1 -1
  592. package/result/result.component.d.ts +3 -7
  593. package/result/result.module.d.ts +1 -5
  594. package/ripple/ripple.directive.d.ts +4 -5
  595. package/ripple/ripple.module.d.ts +1 -3
  596. package/select/select-portal.component.d.ts +1 -1
  597. package/select/select.component.d.ts +14 -15
  598. package/select/select.module.d.ts +1 -12
  599. package/skeleton/skeleton.component.d.ts +3 -6
  600. package/skeleton/skeleton.module.d.ts +1 -4
  601. package/slider/slider.component.d.ts +5 -7
  602. package/slider/slider.module.d.ts +1 -7
  603. package/slider-select/slider-select.component.d.ts +6 -7
  604. package/slider-select/slider-select.module.d.ts +1 -9
  605. package/statistic/countdown.component.d.ts +6 -7
  606. package/statistic/statistic.component.d.ts +2 -3
  607. package/statistic/statistic.module.d.ts +1 -5
  608. package/steps/steps.component.d.ts +4 -7
  609. package/steps/steps.module.d.ts +1 -5
  610. package/style/core/base.scss +0 -7
  611. package/style/core/index.css +1 -8
  612. package/style/core/index.css.map +1 -1
  613. package/style/params/colors.scss +1 -1
  614. package/switch/switch.component.d.ts +6 -7
  615. package/switch/switch.module.d.ts +1 -7
  616. package/table/table-body.component.d.ts +1 -1
  617. package/table/table-foot.component.d.ts +3 -6
  618. package/table/table-head.component.d.ts +5 -7
  619. package/table/table.component.d.ts +1 -1
  620. package/table/table.module.d.ts +4 -17
  621. package/tabs/tab-content.component.d.ts +6 -6
  622. package/tabs/tab-link.directive.d.ts +2 -2
  623. package/tabs/tab.component.d.ts +2 -3
  624. package/tabs/tabs.component.d.ts +8 -9
  625. package/tabs/tabs.module.d.ts +3 -9
  626. package/tag/tag.component.d.ts +4 -8
  627. package/tag/tag.module.d.ts +1 -5
  628. package/text-retract/text-retract.component.d.ts +6 -10
  629. package/text-retract/text-retract.module.d.ts +1 -6
  630. package/textarea/textarea.component.d.ts +5 -7
  631. package/textarea/textarea.module.d.ts +1 -6
  632. package/theme/theme.component.d.ts +8 -9
  633. package/theme/theme.module.d.ts +1 -10
  634. package/time-ago/time-ago.module.d.ts +1 -1
  635. package/time-ago/time-ago.pipe.d.ts +6 -9
  636. package/time-picker/time-picker-frame.component.d.ts +5 -6
  637. package/time-picker/time-picker-portal.component.d.ts +5 -7
  638. package/time-picker/time-picker.component.d.ts +14 -16
  639. package/time-picker/time-picker.module.d.ts +2 -13
  640. package/time-range/time-range.module.d.ts +1 -1
  641. package/time-range/time-range.pipe.d.ts +1 -1
  642. package/timeline/timeline.component.d.ts +5 -8
  643. package/timeline/timeline.module.d.ts +1 -7
  644. package/tooltip/tooltip-portal.component.d.ts +4 -5
  645. package/tooltip/tooltip.directive.d.ts +8 -9
  646. package/tooltip/tooltip.module.d.ts +1 -6
  647. package/transfer/transfer.component.d.ts +6 -9
  648. package/transfer/transfer.module.d.ts +1 -15
  649. package/tree/tree-node.component.d.ts +6 -10
  650. package/tree/tree.component.d.ts +1 -1
  651. package/tree/tree.module.d.ts +1 -11
  652. package/tree-file/tree-file.component.d.ts +5 -10
  653. package/tree-file/tree-file.module.d.ts +1 -9
  654. package/tree-select/tree-select-portal.component.d.ts +5 -7
  655. package/tree-select/tree-select.component.d.ts +14 -15
  656. package/tree-select/tree-select.module.d.ts +1 -14
  657. package/typography/typography.component.d.ts +3 -4
  658. package/typography/typography.module.d.ts +1 -3
  659. package/upload/upload-portal.component.d.ts +5 -7
  660. package/upload/upload.component.d.ts +12 -15
  661. package/upload/upload.module.d.ts +1 -14
@@ -1,19 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
2
+ import { Component, Input, Renderer2, inject, ChangeDetectorRef, TemplateRef, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
- import * as i1 from '@ng-nest/ui/core';
5
- import { XDataConvert, XInputBoolean, XWithConfig, XIsChange, XClearClass, XSetData } from '@ng-nest/ui/core';
6
- import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
4
+ import { XDataConvert, XInputBoolean, XWithConfig, XConfigService, XIsChange, XClearClass, XSetData } from '@ng-nest/ui/core';
5
+ import { XControlValueAccessor, XValueAccessor } from '@ng-nest/ui/base-form';
7
6
  import { Subject } from 'rxjs';
8
- import * as i2 from '@angular/common';
7
+ import * as i1 from '@angular/common';
9
8
  import { CommonModule } from '@angular/common';
10
- import * as i3 from '@ng-nest/ui/button';
11
- import { XButtonModule } from '@ng-nest/ui/button';
12
- import * as i4 from '@ng-nest/ui/tag';
13
- import { XTagModule } from '@ng-nest/ui/tag';
14
- import * as i5 from '@ng-nest/ui/outlet';
15
- import { XOutletModule } from '@ng-nest/ui/outlet';
16
9
  import { FormsModule } from '@angular/forms';
10
+ import { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';
11
+ import { XTagComponent } from '@ng-nest/ui/tag';
12
+ import { XOutletDirective } from '@ng-nest/ui/outlet';
17
13
 
18
14
  /**
19
15
  * Radio
@@ -99,21 +95,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
99
95
  }] } });
100
96
 
101
97
  class XRadioComponent extends XRadioProperty {
98
+ constructor() {
99
+ super(...arguments);
100
+ this.nodes = [];
101
+ this._unSubject = new Subject();
102
+ this.renderer = inject(Renderer2);
103
+ this.cdr = inject(ChangeDetectorRef);
104
+ this.configService = inject(XConfigService);
105
+ }
102
106
  get beforeIsTemplate() {
103
107
  return this.before instanceof TemplateRef;
104
108
  }
105
109
  get afterIsTemplate() {
106
110
  return this.after instanceof TemplateRef;
107
111
  }
108
- constructor(renderer, elementRef, cdr, configService) {
109
- super();
110
- this.renderer = renderer;
111
- this.elementRef = elementRef;
112
- this.cdr = cdr;
113
- this.configService = configService;
114
- this.nodes = [];
115
- this._unSubject = new Subject();
116
- }
117
112
  ngOnInit() {
118
113
  this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);
119
114
  this.setClassMap();
@@ -179,28 +174,27 @@ class XRadioComponent extends XRadioProperty {
179
174
  this.ngOnInit();
180
175
  this.cdr.detectChanges();
181
176
  }
182
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
183
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRadioComponent, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:.875rem}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.XButtonComponent, selector: "x-button" }, { kind: "component", type: i3.XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: i4.XTagComponent, selector: "x-tag" }, { kind: "directive", type: i5.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
177
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
178
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRadioComponent, isStandalone: true, selector: "x-radio", providers: [XValueAccessor(XRadioComponent)], viewQueries: [{ propertyName: "radio", first: true, predicate: ["radio"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:.875rem}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: XTagComponent, selector: "x-tag" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
184
179
  }
185
180
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioComponent, decorators: [{
186
181
  type: Component,
187
- args: [{ selector: `${XRadioPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRadioComponent)], template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:.875rem}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"] }]
188
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }], propDecorators: { radio: [{
182
+ args: [{ selector: `${XRadioPrefix}`, standalone: true, imports: [CommonModule, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRadioComponent)], template: "<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-radio{margin:0;padding:0;width:100%}.x-radio.x-flex{display:flex}.x-radio.x-justify-start{justify-content:flex-start}.x-radio.x-justify-center{justify-content:center}.x-radio.x-justify-end{justify-content:flex-end}.x-radio.x-justify-space-between{justify-content:space-between}.x-radio.x-justify-space-around{justify-content:space-around}.x-radio.x-align-start{align-items:flex-start}.x-radio.x-align-center{align-items:center}.x-radio.x-align-end{align-items:flex-end}.x-radio.x-direction-column{flex-direction:column}.x-radio.x-direction-column-reverse{flex-direction:column-reverse}.x-radio.x-direction-row{flex-direction:row}.x-radio.x-direction-row-reverse{flex-direction:row-reverse}.x-radio>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-radio>label.x-text-align-start{text-align:start}.x-radio>label.x-text-align-center{text-align:center}.x-radio>label.x-text-align-end{text-align:end}.x-radio-row{flex:1;display:flex;align-items:center;flex-wrap:wrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem)}.x-radio-row .x-radio-row-before,.x-radio-row .x-radio-row-after{border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);padding:0 var(--x-padding-medium);height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-radio-row-list{position:relative;display:inline-flex;align-items:center}.x-radio-row-list x-tag:not(:first-child){margin-left:.875rem}.x-radio-row-item{position:relative;display:inline-flex;align-items:center;white-space:nowrap;outline:none;margin-right:.875rem;font-size:.875rem;cursor:pointer;transition:all .3s}.x-radio-row-item:hover{color:var(--x-primary)}.x-radio-row-item:hover .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item:last-child{margin-right:0}.x-radio-row-item.x-checked .x-radio-box{border-color:var(--x-primary)}.x-radio-row-item.x-checked .x-radio-box:after{transform:scale(1);opacity:1}.x-radio-row-item.x-disabled{color:var(--x-text-400);cursor:not-allowed}.x-radio-row-item.x-disabled .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio-row-item.x-disabled .x-radio-box:after{background-color:var(--x-text-400)}.x-radio-button .x-radio-row-before,.x-radio-icon .x-radio-row-before{margin-right:0}.x-radio-button .x-radio-row-after,.x-radio-icon .x-radio-row-after{margin-left:0}.x-radio-box{border:.0625rem solid var(--x-border);border-radius:100%;width:1rem;height:1rem;background-color:var(--x-background-a100);position:relative;box-sizing:border-box;transition:all .3s;display:inline-flex;align-items:center;justify-content:center}.x-radio-box:hover{border-color:var(--x-primary)}.x-radio-box:after{position:absolute;display:inline-block;width:.5rem;height:.5rem;background-color:var(--x-primary);border-radius:1rem;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:\" \"}.x-radio-label{margin-left:.325rem}.x-radio-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-radio-before:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-before{margin-right:var(--x-padding-medium)}.x-radio-before.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button,.x-radio-before.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:first-child .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-before.x-radio-button .x-radio-row-before,.x-radio-before.x-radio-icon .x-radio-row-before{margin-right:0;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-before-template .x-radio-row-before{display:contents}.x-radio-before-template .x-radio-row-list{margin-left:var(--x-padding-medium)}.x-radio-before-template.x-radio-button .x-radio-row-list,.x-radio-before-template.x-radio-icon .x-radio-row-list{margin-left:0}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button{margin-left:calc(var(--x-border-width) * -1)}.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input:hover,.x-radio-before-template.x-radio-button .x-radio-row-before input:focus,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before input:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before input:focus,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:hover,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button:focus{z-index:1}.x-radio-before-template.x-radio-button .x-radio-row-before input,.x-radio-before-template.x-radio-button .x-radio-row-before .x-button,.x-radio-before-template.x-radio-icon .x-radio-row-before input,.x-radio-before-template.x-radio-icon .x-radio-row-before .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after:not(.x-radio-before-template,.x-radio-button,.x-radio-icon) .x-radio-row-after{margin-left:var(--x-padding-medium)}.x-radio-after.x-radio-button .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button,.x-radio-after.x-radio-icon .x-buttons:not(.x-buttons-space)>x-button:last-child .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-radio-after.x-radio-button .x-radio-row-after,.x-radio-after.x-radio-icon .x-radio-row-after{margin-left:0;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.x-radio-after-template .x-radio-row-after{display:contents}.x-radio-after-template .x-radio-row-list{margin-right:var(--x-padding-medium)}.x-radio-after-template.x-radio-button .x-radio-row-list,.x-radio-after-template.x-radio-icon .x-radio-row-list{margin-right:0}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button{margin-right:calc(var(--x-border-width) * -1)}.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-list .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-list .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input:hover,.x-radio-after-template.x-radio-button .x-radio-row-after input:focus,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after input:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after input:focus,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:hover,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button:focus{z-index:1}.x-radio-after-template.x-radio-button .x-radio-row-after input,.x-radio-after-template.x-radio-button .x-radio-row-after .x-button,.x-radio-after-template.x-radio-icon .x-radio-row-after input,.x-radio-after-template.x-radio-icon .x-radio-row-after .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-radio.x-disabled .x-radio-item{color:var(--x-text-400);cursor:not-allowed}.x-radio.x-disabled .x-radio-item .x-radio-box{border-color:var(--x-border-100);background-color:var(--x-border-300)}.x-radio.x-disabled .x-radio-item .x-radio-box:after{background-color:var(--x-text-400)}.x-radio.x-invalid>label,.x-radio.x-required>label{color:var(--x-danger)}.x-radio.x-direction-row>label{padding:0 .5rem 0 0}.x-radio.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-radio.x-direction-column,.x-radio.x-direction-column-reverse{align-items:inherit}\n"] }]
183
+ }], propDecorators: { radio: [{
189
184
  type: ViewChild,
190
185
  args: ['radio', { static: true }]
191
186
  }] } });
192
187
 
193
188
  class XRadioModule {
194
189
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
195
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, declarations: [XRadioComponent, XRadioProperty], imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule], exports: [XRadioComponent] }); }
196
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule] }); }
190
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, imports: [XRadioComponent], exports: [XRadioComponent] }); }
191
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, imports: [XRadioComponent] }); }
197
192
  }
198
193
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRadioModule, decorators: [{
199
194
  type: NgModule,
200
195
  args: [{
201
- declarations: [XRadioComponent, XRadioProperty],
202
196
  exports: [XRadioComponent],
203
- imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule]
197
+ imports: [XRadioComponent]
204
198
  }]
205
199
  }] });
206
200
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XData, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig, XTemplate } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ selector: `${XRadioPrefix}-property`, template: '' })\r\nexport class XRadioProperty extends XControlValueAccessor<any> implements XRadioOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n @Input() @XDataConvert() data: XData<XRadioNode> = [];\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n @Input() @XInputBoolean() button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n @Input() @XInputBoolean() icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n @Input() @XInputBoolean() tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') override size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n @Input() type: XButtonType = 'initial';\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n @Input() @XInputBoolean() tagBordered: XBoolean = true;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n @Input() @XInputBoolean() tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n @Input() @XInputBoolean() allowCancel?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n @Input() override before!: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n @Input() override after!: XTemplate;\r\n}\r\n\r\n/**\r\n * Radio Option\r\n * @undocument true\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n TemplateRef\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnChanges {\r\n @ViewChild('radio', { static: true }) radio!: ElementRef<HTMLElement>;\r\n nodes: XRadioNode[] = [];\r\n radioType!: 'initial' | 'button' | 'icon' | 'tag';\r\n private _unSubject = new Subject<void>();\r\n\r\n get beforeIsTemplate() {\r\n return this.before instanceof TemplateRef;\r\n }\r\n\r\n get afterIsTemplate() {\r\n return this.after instanceof TemplateRef;\r\n }\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n this.setRadioType();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRadioType() {\r\n if (this.button) {\r\n this.radioType = 'button';\r\n } else if (this.icon) {\r\n this.radioType = 'icon';\r\n } else if (this.tag) {\r\n this.radioType = 'tag';\r\n } else {\r\n this.radioType = 'initial';\r\n }\r\n this.cdr.detectChanges();\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled || (!this.allowCancel && node.id === this.value)) return;\r\n this.formControlValidator();\r\n if (this.allowCancel && node.id === this.value) {\r\n this.value = null;\r\n } else {\r\n this.value = node.id;\r\n }\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XRadioNode) {\r\n return item.id;\r\n }\r\n\r\n formControlChanges() {\r\n this.setData();\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRadioComponent } from './radio.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRadioProperty } from './radio.property';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XTagModule } from '@ng-nest/ui/tag';\r\n\r\n@NgModule({\r\n declarations: [XRadioComponent, XRadioProperty],\r\n exports: [XRadioComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XTagModule, XOutletModule, XBaseFormModule]\r\n})\r\nexport class XRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AAEG,MAAO,cAAe,SAAQ,qBAA0B,CAAA;AAD9D,IAAA,W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C,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;MEXzB,YAAY,CAAA;iIAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAZ,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,iBAJR,eAAe,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAEpC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,aADpF,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;kIAGd,YAAY,EAAA,OAAA,EAAA,CAFb,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEnF,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC;oBAC/C,OAAO,EAAE,CAAC,eAAe,CAAC;AAC1B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,CAAC;AAChG,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-radio.mjs","sources":["../../../../lib/ng-nest/ui/radio/radio.property.ts","../../../../lib/ng-nest/ui/radio/radio.component.ts","../../../../lib/ng-nest/ui/radio/radio.component.html","../../../../lib/ng-nest/ui/radio/radio.module.ts","../../../../lib/ng-nest/ui/radio/ng-nest-ui-radio.ts"],"sourcesContent":["import { XData, XIdentityProperty, XDataConvert, XInputBoolean, XSize, XBoolean, XWithConfig, XTemplate } from '@ng-nest/ui/core';\r\nimport { Input, Component } from '@angular/core';\r\nimport { XButtonType } from '@ng-nest/ui/button';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Radio\r\n * @selector x-radio\r\n * @decorator component\r\n */\r\nexport const XRadioPrefix = 'x-radio';\r\nconst X_CONFIG_NAME = 'radio';\r\n\r\n/**\r\n * Radio Property\r\n */\r\n@Component({ selector: `${XRadioPrefix}-property`, template: '' })\r\nexport class XRadioProperty extends XControlValueAccessor<any> implements XRadioOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n @Input() @XDataConvert() data: XData<XRadioNode> = [];\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n @Input() @XInputBoolean() button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n @Input() @XInputBoolean() icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n @Input() @XInputBoolean() tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') override size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n @Input() type: XButtonType = 'initial';\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n @Input() @XInputBoolean() tagBordered: XBoolean = true;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n @Input() @XInputBoolean() tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 允许取消选中\r\n * @en_US Allow cancel checked\r\n */\r\n @Input() @XInputBoolean() allowCancel?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n @Input() override before!: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n @Input() override after!: XTemplate;\r\n}\r\n\r\n/**\r\n * Radio Option\r\n * @undocument true\r\n */\r\nexport interface XRadioOption extends XFormOption {\r\n /**\r\n * @zh_CN 单选框数据\r\n * @en_US Radio data\r\n */\r\n data?: XData<XRadioNode>;\r\n /**\r\n * @zh_CN 按钮样式\r\n * @en_US Button style\r\n */\r\n button?: XBoolean;\r\n /**\r\n * @zh_CN 图标样式\r\n * @en_US Icon style\r\n */\r\n icon?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签样式\r\n * @en_US Tag style\r\n */\r\n tag?: XBoolean;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n size?: XSize;\r\n /**\r\n * @zh_CN 按钮/图标/ tag 标签样式时生效\r\n * @en_US Take effect when button style\r\n */\r\n type?: XButtonType;\r\n /**\r\n * @zh_CN tag 标签边框\r\n * @en_US Tag bordered\r\n */\r\n tagBordered?: XBoolean;\r\n /**\r\n * @zh_CN tag 标签深色主题\r\n * @en_US Tag dark theme\r\n */\r\n tagDark?: XBoolean;\r\n /**\r\n * @zh_CN 前置标签\r\n * @en_US Before label\r\n */\r\n before?: XTemplate;\r\n /**\r\n * @zh_CN 后置标签\r\n * @en_US After label\r\n */\r\n after?: XTemplate;\r\n}\r\n\r\n/**\r\n * @zh_CN Radio 数据对象\r\n * @en_US Radio data object\r\n */\r\nexport interface XRadioNode extends XIdentityProperty {\r\n /**\r\n * @zh_CN 禁用\r\n * @en_US Disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n icon?: string;\r\n /**\r\n * @zh_CN 图标的提示信息\r\n * @en_US Icon message\r\n */\r\n title?: string;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n TemplateRef,\r\n inject,\r\n OnDestroy,\r\n OnInit\r\n} from '@angular/core';\r\nimport { XRadioPrefix, XRadioNode, XRadioProperty } from './radio.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XIsChange, XSetData, XClearClass, XConfigService } from '@ng-nest/ui/core';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XTagComponent } from '@ng-nest/ui/tag';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\n\r\n@Component({\r\n selector: `${XRadioPrefix}`,\r\n standalone: true,\r\n imports: [CommonModule, FormsModule, XButtonComponent, XButtonsComponent, XTagComponent, XOutletDirective],\r\n templateUrl: './radio.component.html',\r\n styleUrls: ['./radio.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRadioComponent)]\r\n})\r\nexport class XRadioComponent extends XRadioProperty implements OnInit, OnChanges, OnDestroy {\r\n @ViewChild('radio', { static: true }) radio!: ElementRef<HTMLElement>;\r\n nodes: XRadioNode[] = [];\r\n radioType!: 'initial' | 'button' | 'icon' | 'tag';\r\n private _unSubject = new Subject<void>();\r\n\r\n get beforeIsTemplate() {\r\n return this.before instanceof TemplateRef;\r\n }\r\n\r\n get afterIsTemplate() {\r\n return this.after instanceof TemplateRef;\r\n }\r\n\r\n private renderer = inject(Renderer2);\r\n override cdr = inject(ChangeDetectorRef);\r\n configService = inject(XConfigService);\r\n\r\n ngOnInit() {\r\n this.setFlex(this.radio.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n this.setRadioType();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { data } = changes;\r\n XIsChange(data) && this.setData();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unSubject.next();\r\n this._unSubject.unsubscribe();\r\n }\r\n\r\n override writeValue(value: any) {\r\n this.value = value;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRadioType() {\r\n if (this.button) {\r\n this.radioType = 'button';\r\n } else if (this.icon) {\r\n this.radioType = 'icon';\r\n } else if (this.tag) {\r\n this.radioType = 'tag';\r\n } else {\r\n this.radioType = 'initial';\r\n }\r\n this.cdr.detectChanges();\r\n }\r\n\r\n radioClick(event: Event, node: XRadioNode) {\r\n event.preventDefault();\r\n if (this.disabled || node.disabled || (!this.allowCancel && node.id === this.value)) return;\r\n this.formControlValidator();\r\n if (this.allowCancel && node.id === this.value) {\r\n this.value = null;\r\n } else {\r\n this.value = node.id;\r\n }\r\n this.cdr.detectChanges();\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n private setData() {\r\n XSetData<XRadioNode>(this.data, this._unSubject).subscribe((x) => {\r\n this.nodes = x;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n trackByItem(_index: number, item: XRadioNode) {\r\n return item.id;\r\n }\r\n\r\n formControlChanges() {\r\n this.setData();\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #radio\r\n class=\"x-radio\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-radio-button]=\"button\"\r\n [class.x-radio-icon]=\"icon\"\r\n [class.x-radio-after]=\"after\"\r\n [class.x-radio-before]=\"before\"\r\n [class.x-radio-after-template]=\"afterIsTemplate\"\r\n [class.x-radio-before-template]=\"beforeIsTemplate\"\r\n>\r\n <label *ngIf=\"label\" [class.x-radio-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-radio-row\">\r\n <div class=\"x-radio-row-before\" *ngIf=\"before\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-radio-row-list\" [ngSwitch]=\"radioType\">\r\n <ng-container *ngSwitchCase=\"'initial'\">\r\n <div\r\n class=\"x-radio-row-item\"\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [class.x-checked]=\"item.id === value\"\r\n [class.x-disabled]=\"disabled || item.disabled\"\r\n (click)=\"radioClick($event, item)\"\r\n >\r\n <span class=\"x-radio-box\"></span>\r\n <span class=\"x-radio-label\">{{ item.label }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'icon'\">\r\n <x-buttons>\r\n <x-button\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n [icon]=\"item.icon\"\r\n [size]=\"size\"\r\n [type]=\"type\"\r\n [activated]=\"item.id === value\"\r\n [disabled]=\"disabled || item.disabled\"\r\n attrType=\"button\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-button\r\n >\r\n </x-buttons>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'tag'\">\r\n <x-tag\r\n *ngFor=\"let item of nodes; trackBy: trackByItem\"\r\n checked\r\n manual\r\n [type]=\"type\"\r\n [size]=\"size\"\r\n [bordered]=\"tagBordered\"\r\n [dark]=\"tagDark\"\r\n [disabled]=\"disabled! || item.disabled!\"\r\n [selected]=\"value === item.id\"\r\n (click)=\"radioClick($event, item)\"\r\n >{{ item.label }}</x-tag\r\n >\r\n </ng-container>\r\n </div>\r\n <div class=\"x-radio-row-after\" *ngIf=\"after\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { XRadioComponent } from './radio.component';\r\n\r\n@NgModule({\r\n exports: [XRadioComponent],\r\n imports: [XRadioComponent]\r\n})\r\nexport class XRadioModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AAEG,MAAO,cAAe,SAAQ,qBAA0B,CAAA;AAD9D,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACsB,IAAI,CAAA,IAAA,GAAsB,EAAE,CAAC;AAqBtD;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAgB,SAAS,CAAC;AACvC;;;AAGG;QACuB,IAAW,CAAA,WAAA,GAAa,IAAI,CAAC;AAqBxD,KAAA;iIAxDY,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAd,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,+RADkC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;AAMpC,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;AAA8B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK5B,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AA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gModule } from '@angular/core';
3
- import * as i1 from '@ng-nest/ui/core';
4
- import { XInputNumber, XInputBoolean, XWithConfig, XIsString, XIsObject, XIsEmpty, XClearClass } from '@ng-nest/ui/core';
2
+ import { Component, Input, Renderer2, inject, ChangeDetectorRef, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
+ import { XInputNumber, XInputBoolean, XWithConfig, XConfigService, XIsString, XIsObject, XIsEmpty, XClearClass } from '@ng-nest/ui/core';
5
4
  import { __decorate } from 'tslib';
6
- import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
7
- import * as i2 from '@angular/common';
5
+ import { XControlValueAccessor, XValueAccessor } from '@ng-nest/ui/base-form';
6
+ import * as i1 from '@angular/common';
8
7
  import { CommonModule } from '@angular/common';
9
- import * as i3 from '@ng-nest/ui/icon';
10
- import { XIconModule } from '@ng-nest/ui/icon';
11
8
  import { FormsModule } from '@angular/forms';
12
- import { XButtonModule } from '@ng-nest/ui/button';
9
+ import { XButtonComponent } from '@ng-nest/ui/button';
10
+ import { XIconComponent } from '@ng-nest/ui/icon';
13
11
 
14
12
  /**
15
13
  * Rate
@@ -56,6 +54,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
56
54
  }] } });
57
55
 
58
56
  class XRateComponent extends XRateProperty {
57
+ constructor() {
58
+ super(...arguments);
59
+ this.rates = [];
60
+ this.hoverActivated = 0;
61
+ this.hoverHalfActivated = 0;
62
+ this.rateNodes = [];
63
+ this.renderer = inject(Renderer2);
64
+ this.cdr = inject(ChangeDetectorRef);
65
+ this.configService = inject(XConfigService);
66
+ }
59
67
  get getColor() {
60
68
  let color = '';
61
69
  if (XIsString(this.color)) {
@@ -84,17 +92,6 @@ class XRateComponent extends XRateProperty {
84
92
  this.hoverHalfActivated = Math.ceil(value);
85
93
  this.cdr.detectChanges();
86
94
  }
87
- constructor(renderer, elementRef, cdr, configService) {
88
- super();
89
- this.renderer = renderer;
90
- this.elementRef = elementRef;
91
- this.cdr = cdr;
92
- this.configService = configService;
93
- this.rates = [];
94
- this.hoverActivated = 0;
95
- this.hoverHalfActivated = 0;
96
- this.rateNodes = [];
97
- }
98
95
  ngOnInit() {
99
96
  this.setRates();
100
97
  this.setFlex(this.rate.nativeElement, this.renderer, this.justify, this.align, this.direction);
@@ -153,28 +150,27 @@ class XRateComponent extends XRateProperty {
153
150
  this.ngOnInit();
154
151
  this.cdr.detectChanges();
155
152
  }
156
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
157
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRateComponent, selector: "x-rate", providers: [XValueAccessor(XRateComponent)], viewQueries: [{ propertyName: "rate", first: true, predicate: ["rate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0;width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:calc(var(--x-font-size) + .875rem);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
153
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
154
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: XRateComponent, isStandalone: true, selector: "x-rate", providers: [XValueAccessor(XRateComponent)], viewQueries: [{ propertyName: "rate", first: true, predicate: ["rate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0;width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:calc(var(--x-font-size) + .875rem);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XIconComponent, selector: "x-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
158
155
  }
159
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateComponent, decorators: [{
160
157
  type: Component,
161
- args: [{ selector: `${XRatePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRateComponent)], template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0;width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:calc(var(--x-font-size) + .875rem);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"] }]
162
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }], propDecorators: { rate: [{
158
+ args: [{ selector: `${XRatePrefix}`, standalone: true, imports: [CommonModule, FormsModule, XButtonComponent, XIconComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XRateComponent)], template: "<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n", styles: [".x-rate{margin:0;padding:0;width:100%}.x-rate.x-flex{display:flex}.x-rate.x-justify-start{justify-content:flex-start}.x-rate.x-justify-center{justify-content:center}.x-rate.x-justify-end{justify-content:flex-end}.x-rate.x-justify-space-between{justify-content:space-between}.x-rate.x-justify-space-around{justify-content:space-around}.x-rate.x-align-start{align-items:flex-start}.x-rate.x-align-center{align-items:center}.x-rate.x-align-end{align-items:flex-end}.x-rate.x-direction-column{flex-direction:column}.x-rate.x-direction-column-reverse{flex-direction:column-reverse}.x-rate.x-direction-row{flex-direction:row}.x-rate.x-direction-row-reverse{flex-direction:row-reverse}.x-rate>label{display:inline-block;white-space:nowrap;height:calc(var(--x-font-size) + .875rem);line-height:calc(var(--x-font-size) + .875rem);position:relative;color:var(--x-text-300);font-weight:600}.x-rate>label.x-text-align-start{text-align:start}.x-rate>label.x-text-align-center{text-align:center}.x-rate>label.x-text-align-end{text-align:end}.x-rate-icons{display:inline-flex;align-items:center;height:calc(var(--x-font-size) + .875rem);cursor:pointer}.x-rate-icon{margin:0 .2rem;display:flex;align-items:center;position:relative;color:var(--x-info);transition:transform var(--x-animation-duration-base),color var(--x-animation-duration-base);font-size:calc(var(--x-font-size-big) + .125rem)}.x-rate-icon .x-icon{vertical-align:0}.x-rate-icon:hover{transform:scale(1.1)}.x-rate-icon.activated,.x-rate-icon.half-activated .x-rate-half{color:var(--x-warning)}.x-rate-half{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;display:flex;align-items:center}.x-rate-half:hover{opacity:1}.x-rate-back{display:flex;align-items:center}.x-rate-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-rate.x-invalid>label,.x-rate.x-required>label{color:var(--x-danger)}.x-rate.x-disabled .x-rate-icons{cursor:not-allowed;opacity:.8}.x-rate.x-direction-row>label{padding:0 .5rem 0 0}.x-rate.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-rate.x-direction-column,.x-rate.x-direction-column-reverse{align-items:inherit}\n"] }]
159
+ }], propDecorators: { rate: [{
163
160
  type: ViewChild,
164
161
  args: ['rate', { static: true }]
165
162
  }] } });
166
163
 
167
164
  class XRateModule {
168
165
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
169
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, declarations: [XRateComponent, XRateProperty], imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule], exports: [XRateComponent] }); }
170
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule] }); }
166
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, imports: [XRateComponent], exports: [XRateComponent] }); }
167
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, imports: [XRateComponent] }); }
171
168
  }
172
169
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XRateModule, decorators: [{
173
170
  type: NgModule,
174
171
  args: [{
175
- declarations: [XRateComponent, XRateProperty],
176
172
  exports: [XRateComponent],
177
- imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule]
173
+ imports: [XRateComponent]
178
174
  }]
179
175
  }] });
180
176
 
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-rate.mjs","sources":["../../../../lib/ng-nest/ui/rate/rate.property.ts","../../../../lib/ng-nest/ui/rate/rate.component.ts","../../../../lib/ng-nest/ui/rate/rate.component.html","../../../../lib/ng-nest/ui/rate/rate.module.ts","../../../../lib/ng-nest/ui/rate/ng-nest-ui-rate.ts"],"sourcesContent":["import { XInputNumber, XNumber, XInputBoolean, XBoolean, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component, TemplateRef } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Rate\r\n * @selector x-rate\r\n * @decorator component\r\n */\r\nexport const XRatePrefix = 'x-rate';\r\nconst X_CONFIG_NAME = 'rate';\r\n\r\n/**\r\n * Rate Property\r\n */\r\n@Component({ selector: `${XRatePrefix}-property`, template: '' })\r\nexport class XRateProperty extends XControlValueAccessor<any> implements XRateOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputNumber() count: XNumber = 5;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputBoolean() half?: XBoolean;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n @Input() @XWithConfig<XRateColor>(X_CONFIG_NAME) color?: XRateColor;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n @Input() customTemp!: TemplateRef<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 颜色类型\r\n * @en_US Color type\r\n */\r\nexport type XRateColor = string | { [color: string]: (rate: number) => boolean };\r\n\r\n/**\r\n * Rate Option\r\n * @undocument true\r\n */\r\nexport interface XRateOption extends XFormOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n count?: XNumber;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n half?: XBoolean;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n customTemp?: XTemplate;\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, Renderer2, ElementRef, ChangeDetectorRef, ViewChild } from '@angular/core';\r\nimport { XIsEmpty, XClearClass, XConfigService, XIsString, XIsObject } from '@ng-nest/ui/core';\r\nimport { XRatePrefix, XRateProperty } from './rate.property';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\n\r\n@Component({\r\n selector: `${XRatePrefix}`,\r\n templateUrl: './rate.component.html',\r\n styleUrls: ['./rate.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRateComponent)]\r\n})\r\nexport class XRateComponent extends XRateProperty {\r\n @ViewChild('rate', { static: true }) rate!: ElementRef<HTMLElement>;\r\n rates: number[] = [];\r\n\r\n hoverActivated = 0;\r\n hoverHalfActivated = 0;\r\n\r\n get getColor() {\r\n let color = '';\r\n if (XIsString(this.color)) {\r\n color = this.color as string;\r\n } else if (XIsObject(this.color)) {\r\n this.color = this.color as { [color: string]: (rate: number) => boolean };\r\n let val = this.half ? (Math.floor(this.hoverActivated) + this.hoverHalfActivated) * 0.5 : this.hoverActivated;\r\n for (let key in this.color) {\r\n if (this.color[key](val)) {\r\n color = key;\r\n break;\r\n }\r\n }\r\n }\r\n return color;\r\n }\r\n\r\n override get requiredIsEmpty() {\r\n return this.validator && this.required && (XIsEmpty(this.value) || this.value === 0);\r\n }\r\n\r\n override writeValue(value: any) {\r\n if (XIsEmpty(value)) value = 0;\r\n this.value = value;\r\n this.hoverActivated = value;\r\n this.hoverHalfActivated = Math.ceil(value);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateNodes: any = [];\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public override cdr: ChangeDetectorRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setRates();\r\n this.setFlex(this.rate.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRates() {\r\n this.rates = Array(this.count)\r\n .fill(0)\r\n .map((_, i) => i + 1);\r\n }\r\n\r\n rateHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.hoverActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n leaveRates() {\r\n if (this.disabled) return;\r\n const activited = this.value;\r\n this.hoverActivated = activited;\r\n this.hoverHalfActivated = Math.ceil(activited);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.value = this.value === rate ? 0 : rate;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n rateHalfHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.hoverActivated = rate - 1;\r\n this.hoverHalfActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateHalfClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.value = rate - 0.5;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n trackByItem(_index: number, item: number) {\r\n return item;\r\n }\r\n\r\n formControlChanges() {\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XRateComponent } from './rate.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XRateProperty } from './rate.property';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XBaseFormModule } from '@ng-nest/ui/base-form';\r\n\r\n@NgModule({\r\n declarations: [XRateComponent, XRateProperty],\r\n exports: [XRateComponent],\r\n imports: [CommonModule, FormsModule, XButtonModule, XIconModule, XBaseFormModule]\r\n})\r\nexport class XRateModule {}\r\n","/**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YAAA,EAAA,CAAA,cAAc,EAAE,aAAa,aAElC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,aADtE,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;kIAGb,WAAW,EAAA,OAAA,EAAA,CAFZ,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAErE,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;oBAC7C,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAC;AAClF,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-rate.mjs","sources":["../../../../lib/ng-nest/ui/rate/rate.property.ts","../../../../lib/ng-nest/ui/rate/rate.component.ts","../../../../lib/ng-nest/ui/rate/rate.component.html","../../../../lib/ng-nest/ui/rate/rate.module.ts","../../../../lib/ng-nest/ui/rate/ng-nest-ui-rate.ts"],"sourcesContent":["import { XInputNumber, XNumber, XInputBoolean, XBoolean, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Component, TemplateRef } from '@angular/core';\r\nimport { XControlValueAccessor, XFormOption } from '@ng-nest/ui/base-form';\r\n\r\n/**\r\n * Rate\r\n * @selector x-rate\r\n * @decorator component\r\n */\r\nexport const XRatePrefix = 'x-rate';\r\nconst X_CONFIG_NAME = 'rate';\r\n\r\n/**\r\n * Rate Property\r\n */\r\n@Component({ selector: `${XRatePrefix}-property`, template: '' })\r\nexport class XRateProperty extends XControlValueAccessor<any> implements XRateOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputNumber() count: XNumber = 5;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n @Input() @XInputBoolean() half?: XBoolean;\r\n /**\r\n * @zh_CN 颜色\r\n * @en_US Color\r\n */\r\n @Input() @XWithConfig<XRateColor>(X_CONFIG_NAME) color?: XRateColor;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n @Input() customTemp!: TemplateRef<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 颜色类型\r\n * @en_US Color type\r\n */\r\nexport type XRateColor = string | { [color: string]: (rate: number) => boolean };\r\n\r\n/**\r\n * Rate Option\r\n * @undocument true\r\n */\r\nexport interface XRateOption extends XFormOption {\r\n /**\r\n * @zh_CN 评分个数\r\n * @en_US Number of ratings\r\n */\r\n count?: XNumber;\r\n /**\r\n * @zh_CN 半星模式\r\n * @en_US Number of ratings\r\n */\r\n half?: XBoolean;\r\n /**\r\n * @zh_CN 自定义模板\r\n * @en_US Custom template\r\n */\r\n customTemp?: XTemplate;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ViewChild,\r\n OnInit,\r\n inject\r\n} from '@angular/core';\r\nimport { XIsEmpty, XClearClass, XConfigService, XIsString, XIsObject } from '@ng-nest/ui/core';\r\nimport { XRatePrefix, XRateProperty } from './rate.property';\r\nimport { XValueAccessor } from '@ng-nest/ui/base-form';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\n\r\n@Component({\r\n selector: `${XRatePrefix}`,\r\n standalone: true,\r\n imports: [CommonModule, FormsModule, XButtonComponent, XIconComponent],\r\n templateUrl: './rate.component.html',\r\n styleUrls: ['./rate.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [XValueAccessor(XRateComponent)]\r\n})\r\nexport class XRateComponent extends XRateProperty implements OnInit {\r\n @ViewChild('rate', { static: true }) rate!: ElementRef<HTMLElement>;\r\n rates: number[] = [];\r\n\r\n hoverActivated = 0;\r\n hoverHalfActivated = 0;\r\n\r\n get getColor() {\r\n let color = '';\r\n if (XIsString(this.color)) {\r\n color = this.color as string;\r\n } else if (XIsObject(this.color)) {\r\n this.color = this.color as { [color: string]: (rate: number) => boolean };\r\n let val = this.half ? (Math.floor(this.hoverActivated) + this.hoverHalfActivated) * 0.5 : this.hoverActivated;\r\n for (let key in this.color) {\r\n if (this.color[key](val)) {\r\n color = key;\r\n break;\r\n }\r\n }\r\n }\r\n return color;\r\n }\r\n\r\n override get requiredIsEmpty() {\r\n return this.validator && this.required && (XIsEmpty(this.value) || this.value === 0);\r\n }\r\n\r\n override writeValue(value: any) {\r\n if (XIsEmpty(value)) value = 0;\r\n this.value = value;\r\n this.hoverActivated = value;\r\n this.hoverHalfActivated = Math.ceil(value);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateNodes: any = [];\r\n\r\n private renderer = inject(Renderer2);\r\n override cdr = inject(ChangeDetectorRef);\r\n configService = inject(XConfigService);\r\n\r\n ngOnInit() {\r\n this.setRates();\r\n this.setFlex(this.rate.nativeElement, this.renderer, this.justify, this.align, this.direction);\r\n this.setClassMap();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.labelMap);\r\n this.labelMap[`x-text-align-${this.labelAlign}`] = this.labelAlign ? true : false;\r\n }\r\n\r\n setRates() {\r\n this.rates = Array(this.count)\r\n .fill(0)\r\n .map((_, i) => i + 1);\r\n }\r\n\r\n rateHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.hoverActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n leaveRates() {\r\n if (this.disabled) return;\r\n const activited = this.value;\r\n this.hoverActivated = activited;\r\n this.hoverHalfActivated = Math.ceil(activited);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.value = this.value === rate ? 0 : rate;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n rateHalfHover(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.formControlValidator();\r\n this.hoverActivated = rate - 1;\r\n this.hoverHalfActivated = rate;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n rateHalfClick(rate: number, _event: MouseEvent) {\r\n if (this.disabled) return;\r\n this.value = rate - 0.5;\r\n if (this.onChange) this.onChange(this.value);\r\n }\r\n\r\n trackByItem(_index: number, item: number) {\r\n return item;\r\n }\r\n\r\n formControlChanges() {\r\n this.ngOnInit();\r\n this.cdr.detectChanges();\r\n }\r\n}\r\n","<div\r\n #rate\r\n class=\"x-rate\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n>\r\n <label *ngIf=\"label\" [class.x-rate-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-rate-icons\" (mouseleave)=\"leaveRates()\">\r\n <div\r\n class=\"x-rate-icon\"\r\n [class.activated]=\"rate <= hoverActivated\"\r\n [class.half-activated]=\"rate <= hoverHalfActivated\"\r\n [style.color]=\"rate <= hoverActivated ? getColor : ''\"\r\n *ngFor=\"let rate of rates; index as i; trackBy: trackByItem\"\r\n >\r\n <div\r\n *ngIf=\"half\"\r\n class=\"x-rate-half\"\r\n [style.color]=\"rate <= hoverHalfActivated ? getColor : ''\"\r\n (mouseenter)=\"rateHalfHover(rate, $event)\"\r\n (click)=\"rateHalfClick(rate, $event)\"\r\n >\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-rate-back\" (mouseenter)=\"rateHover(rate, $event)\" (click)=\"rateClick(rate, $event)\">\r\n <ng-container *ngIf=\"customTemp; else iconTpl\">\r\n <ng-container *ngTemplateOutlet=\"customTemp\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #iconTpl>\r\n <x-icon type=\"adf-star\"></x-icon>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XRateComponent } from './rate.component';\r\n\r\n@NgModule({\r\n exports: [XRateComponent],\r\n imports: [XRateComponent]\r\n})\r\nexport class XRateModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAIA;;;;AAIG;AACI,MAAM,WAAW,GAAG,SAAS;AACpC,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B;;AAEG;AAEG,MAAO,aAAc,SAAQ,qBAA0B,CAAA;AAD7D,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACsB,IAAK,CAAA,KAAA,GAAY,CAAC,CAAC;AAgB7C,KAAA;iIArBY,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,kKADkC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;AAMnC,UAAA,CAAA;AAAf,IAAA,YAAY,EAAE;AAAoB,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKlB,UAAA,CAAA;AAAhB,IAAA,aAAa,EAAE;AAAiB,CAAA,EAAA,aAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,C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