@ojiepermana/angular 21.3.4 → 22.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/README.md +10 -6
  2. package/component/accordion/README.md +195 -0
  3. package/component/alert/README.md +182 -0
  4. package/component/alert-dialog/README.md +239 -0
  5. package/component/aspect-ratio/README.md +112 -0
  6. package/component/avatar/README.md +176 -0
  7. package/component/badge/README.md +133 -0
  8. package/component/breadcrumb/README.md +216 -0
  9. package/component/button/README.md +139 -0
  10. package/component/button-group/README.md +208 -0
  11. package/component/calendar/README.md +132 -0
  12. package/component/card/README.md +220 -0
  13. package/component/carousel/README.md +276 -0
  14. package/component/checkbox/README.md +149 -0
  15. package/component/collapsible/README.md +195 -0
  16. package/component/combobox/README.md +198 -0
  17. package/component/command/README.md +275 -0
  18. package/component/composer/README.md +235 -0
  19. package/component/composer/package.json +4 -0
  20. package/component/context-menu/README.md +267 -0
  21. package/component/date-picker/README.md +177 -0
  22. package/component/dialog/README.md +237 -0
  23. package/component/drawer/README.md +145 -0
  24. package/component/dropdown-menu/README.md +311 -0
  25. package/component/editor/README.md +136 -0
  26. package/component/editor/package.json +4 -0
  27. package/component/empty/README.md +183 -0
  28. package/component/empty/package.json +4 -0
  29. package/component/form/README.md +210 -0
  30. package/component/hover-card/README.md +146 -0
  31. package/component/hover-card/package.json +4 -0
  32. package/component/input/README.md +159 -0
  33. package/component/input-group/README.md +239 -0
  34. package/component/input-otp/README.md +278 -0
  35. package/component/input-otp/package.json +4 -0
  36. package/component/item/README.md +247 -0
  37. package/component/kanban/README.md +81 -0
  38. package/component/kanban/package.json +4 -0
  39. package/component/kbd/README.md +139 -0
  40. package/component/kbd/package.json +4 -0
  41. package/component/label/README.md +136 -0
  42. package/component/menubar/README.md +269 -0
  43. package/component/menubar/package.json +4 -0
  44. package/component/native-select/README.md +176 -0
  45. package/component/native-select/package.json +4 -0
  46. package/component/navigation-menu/README.md +160 -0
  47. package/component/navigation-menu/package.json +4 -0
  48. package/component/pagination/README.md +144 -0
  49. package/component/pillbox/README.md +67 -0
  50. package/component/pillbox/package.json +4 -0
  51. package/component/popover/README.md +43 -0
  52. package/component/progress/README.md +160 -0
  53. package/component/radio/README.md +209 -0
  54. package/component/resizable/README.md +168 -0
  55. package/component/resizable/package.json +4 -0
  56. package/component/scroll-area/README.md +143 -0
  57. package/component/select/README.md +174 -0
  58. package/component/separator/README.md +170 -0
  59. package/component/sheet/README.md +183 -0
  60. package/component/skeleton/README.md +158 -0
  61. package/component/slider/README.md +207 -0
  62. package/component/spinner/README.md +160 -0
  63. package/component/spinner/package.json +4 -0
  64. package/component/switch/README.md +166 -0
  65. package/component/table/README.md +291 -0
  66. package/component/tabs/README.md +219 -0
  67. package/component/textarea/README.md +154 -0
  68. package/component/timeline/README.md +94 -0
  69. package/component/timeline/package.json +4 -0
  70. package/component/toast/README.md +321 -0
  71. package/component/toggle/README.md +131 -0
  72. package/component/toggle/package.json +4 -0
  73. package/component/toggle-group/README.md +206 -0
  74. package/component/toggle-group/package.json +4 -0
  75. package/component/tooltip/README.md +211 -0
  76. package/fesm2022/ojiepermana-angular-component-accordion.mjs +45 -30
  77. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -1
  78. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +95 -61
  79. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -1
  80. package/fesm2022/ojiepermana-angular-component-alert.mjs +30 -21
  81. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -1
  82. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +11 -7
  83. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -1
  84. package/fesm2022/ojiepermana-angular-component-avatar.mjs +50 -34
  85. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -1
  86. package/fesm2022/ojiepermana-angular-component-badge.mjs +9 -6
  87. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -1
  88. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +49 -35
  89. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -1
  90. package/fesm2022/ojiepermana-angular-component-button-group.mjs +25 -17
  91. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -1
  92. package/fesm2022/ojiepermana-angular-component-button.mjs +11 -7
  93. package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -1
  94. package/fesm2022/ojiepermana-angular-component-calendar.mjs +23 -13
  95. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -1
  96. package/fesm2022/ojiepermana-angular-component-card.mjs +51 -36
  97. package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -1
  98. package/fesm2022/ojiepermana-angular-component-carousel.mjs +66 -42
  99. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -1
  100. package/fesm2022/ojiepermana-angular-component-chart.mjs +494 -283
  101. package/fesm2022/ojiepermana-angular-component-chart.mjs.map +1 -1
  102. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +23 -13
  103. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -1
  104. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +28 -20
  105. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -1
  106. package/fesm2022/ojiepermana-angular-component-combobox.mjs +27 -18
  107. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -1
  108. package/fesm2022/ojiepermana-angular-component-command.mjs +77 -52
  109. package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -1
  110. package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
  111. package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
  112. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +9 -6
  113. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -1
  114. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +34 -19
  115. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -1
  116. package/fesm2022/ojiepermana-angular-component-dialog.mjs +55 -38
  117. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -1
  118. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -1
  119. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +108 -74
  120. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -1
  121. package/fesm2022/ojiepermana-angular-component-editor.mjs +717 -0
  122. package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
  123. package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
  124. package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
  125. package/fesm2022/ojiepermana-angular-component-form.mjs +200 -42
  126. package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -1
  127. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +297 -0
  128. package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
  129. package/fesm2022/ojiepermana-angular-component-input-group.mjs +48 -33
  130. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -1
  131. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +514 -0
  132. package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
  133. package/fesm2022/ojiepermana-angular-component-input.mjs +7 -5
  134. package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -1
  135. package/fesm2022/ojiepermana-angular-component-item.mjs +76 -53
  136. package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -1
  137. package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
  138. package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
  139. package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
  140. package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
  141. package/fesm2022/ojiepermana-angular-component-label.mjs +9 -6
  142. package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -1
  143. package/fesm2022/ojiepermana-angular-component-menubar.mjs +308 -0
  144. package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
  145. package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
  146. package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
  147. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +413 -0
  148. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
  149. package/fesm2022/ojiepermana-angular-component-pagination.mjs +65 -31
  150. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -1
  151. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +812 -0
  152. package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
  153. package/fesm2022/ojiepermana-angular-component-popover.mjs +18 -12
  154. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -1
  155. package/fesm2022/ojiepermana-angular-component-progress.mjs +17 -10
  156. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -1
  157. package/fesm2022/ojiepermana-angular-component-radio.mjs +47 -17
  158. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -1
  159. package/fesm2022/ojiepermana-angular-component-resizable.mjs +481 -0
  160. package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
  161. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +15 -9
  162. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -1
  163. package/fesm2022/ojiepermana-angular-component-select.mjs +71 -26
  164. package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -1
  165. package/fesm2022/ojiepermana-angular-component-separator.mjs +11 -7
  166. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -1
  167. package/fesm2022/ojiepermana-angular-component-sheet.mjs +91 -42
  168. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -1
  169. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +7 -5
  170. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -1
  171. package/fesm2022/ojiepermana-angular-component-slider.mjs +401 -7
  172. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -1
  173. package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
  174. package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
  175. package/fesm2022/ojiepermana-angular-component-switch.mjs +47 -15
  176. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -1
  177. package/fesm2022/ojiepermana-angular-component-table.mjs +56 -40
  178. package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -1
  179. package/fesm2022/ojiepermana-angular-component-tabs.mjs +58 -38
  180. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -1
  181. package/fesm2022/ojiepermana-angular-component-textarea.mjs +8 -6
  182. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -1
  183. package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
  184. package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
  185. package/fesm2022/ojiepermana-angular-component-toast.mjs +28 -4
  186. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -1
  187. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
  188. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
  189. package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
  190. package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
  191. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +304 -6
  192. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -1
  193. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -1
  194. package/fesm2022/ojiepermana-angular-layout-component.mjs +45 -24
  195. package/fesm2022/ojiepermana-angular-layout-component.mjs.map +1 -1
  196. package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +1 -1
  197. package/fesm2022/ojiepermana-angular-layout-services.mjs +7 -5
  198. package/fesm2022/ojiepermana-angular-layout-services.mjs.map +1 -1
  199. package/fesm2022/ojiepermana-angular-layout-shell.mjs +3 -3
  200. package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +1 -1
  201. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +9 -6
  202. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +1 -1
  203. package/fesm2022/ojiepermana-angular-layout-token.mjs.map +1 -1
  204. package/fesm2022/{ojiepermana-angular-layout-empty.mjs → ojiepermana-angular-layout-type-empty.mjs} +4 -4
  205. package/fesm2022/ojiepermana-angular-layout-type-empty.mjs.map +1 -0
  206. package/fesm2022/{ojiepermana-angular-layout-horizontal.mjs → ojiepermana-angular-layout-type-horizontal.mjs} +26 -17
  207. package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs.map +1 -0
  208. package/fesm2022/{ojiepermana-angular-layout-vertical.mjs → ojiepermana-angular-layout-type-vertical.mjs} +28 -18
  209. package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs.map +1 -0
  210. package/fesm2022/ojiepermana-angular-layout.mjs +74 -50
  211. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  212. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +1 -1
  213. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +11 -7
  214. package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +1 -1
  215. package/fesm2022/ojiepermana-angular-navigation-item.mjs +27 -16
  216. package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +1 -1
  217. package/fesm2022/ojiepermana-angular-navigation-service.mjs +29 -20
  218. package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +1 -1
  219. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +71 -43
  220. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +1 -1
  221. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +261 -24
  222. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +1 -1
  223. package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +1 -1
  224. package/fesm2022/ojiepermana-angular-theme-services.mjs +19 -11
  225. package/fesm2022/ojiepermana-angular-theme-services.mjs.map +1 -1
  226. package/fesm2022/ojiepermana-angular-theme-token.mjs.map +1 -1
  227. package/fesm2022/ojiepermana-angular-theme.mjs +19 -11
  228. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
  229. package/generator/api/bin/src/emit/client.js +4 -2
  230. package/generator/api/bin/src/writer/index.js +2 -2
  231. package/generator/guide/bin/schematics/build/index.js +3 -2
  232. package/generator/guide/bin/src/engine/component.js +2 -2
  233. package/generator/guide/bin/src/engine/index.js +3 -3
  234. package/generator/guide/bin/src/engine/render.js +10 -5
  235. package/layout/type/empty/package.json +4 -0
  236. package/layout/type/horizontal/package.json +4 -0
  237. package/layout/type/vertical/package.json +4 -0
  238. package/navigation/topbar/README.md +196 -0
  239. package/package.json +89 -25
  240. package/theme/README.md +110 -3
  241. package/theme/styles/integrations/material/autocomplete.css +178 -0
  242. package/theme/styles/integrations/material/button.css +468 -0
  243. package/theme/styles/integrations/material/dialog.css +152 -0
  244. package/theme/styles/integrations/material/select.css +175 -0
  245. package/theme/styles/integrations/material/slide-toggle.css +234 -0
  246. package/theme/styles/integrations/material/slider.css +194 -0
  247. package/theme/styles/integrations/material/tabs.css +229 -0
  248. package/theme/styles/integrations/material.css +70 -60
  249. package/types/ojiepermana-angular-component-combobox.d.ts +1 -2
  250. package/types/ojiepermana-angular-component-composer.d.ts +90 -0
  251. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +2 -0
  252. package/types/ojiepermana-angular-component-editor.d.ts +123 -0
  253. package/types/ojiepermana-angular-component-empty.d.ts +50 -0
  254. package/types/ojiepermana-angular-component-form.d.ts +52 -3
  255. package/types/ojiepermana-angular-component-hover-card.d.ts +74 -0
  256. package/types/ojiepermana-angular-component-input-otp.d.ts +136 -0
  257. package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
  258. package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
  259. package/types/ojiepermana-angular-component-menubar.d.ts +67 -0
  260. package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
  261. package/types/ojiepermana-angular-component-navigation-menu.d.ts +96 -0
  262. package/types/ojiepermana-angular-component-pagination.d.ts +10 -4
  263. package/types/ojiepermana-angular-component-pillbox.d.ts +157 -0
  264. package/types/ojiepermana-angular-component-radio.d.ts +7 -1
  265. package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
  266. package/types/ojiepermana-angular-component-select.d.ts +17 -5
  267. package/types/ojiepermana-angular-component-sheet.d.ts +3 -1
  268. package/types/ojiepermana-angular-component-slider.d.ts +59 -1
  269. package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
  270. package/types/ojiepermana-angular-component-switch.d.ts +13 -3
  271. package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
  272. package/types/ojiepermana-angular-component-toast.d.ts +12 -3
  273. package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
  274. package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
  275. package/types/ojiepermana-angular-component-tooltip.d.ts +72 -5
  276. package/types/{ojiepermana-angular-layout-horizontal.d.ts → ojiepermana-angular-layout-type-horizontal.d.ts} +3 -3
  277. package/types/{ojiepermana-angular-layout-vertical.d.ts → ojiepermana-angular-layout-type-vertical.d.ts} +3 -3
  278. package/types/ojiepermana-angular-layout.d.ts +5 -5
  279. package/types/ojiepermana-angular-navigation-item.d.ts +1 -1
  280. package/types/ojiepermana-angular-navigation-service.d.ts +7 -7
  281. package/types/ojiepermana-angular-navigation-sidebar.d.ts +8 -8
  282. package/types/ojiepermana-angular-navigation-topbar.d.ts +24 -4
  283. package/types/ojiepermana-angular-navigation-types.d.ts +14 -8
  284. package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +0 -1
  285. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +0 -1
  286. package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +0 -1
  287. package/layout/empty/package.json +0 -4
  288. package/layout/horizontal/package.json +0 -4
  289. package/layout/vertical/package.json +0 -4
  290. /package/types/{ojiepermana-angular-layout-empty.d.ts → ojiepermana-angular-layout-type-empty.d.ts} +0 -0
@@ -0,0 +1,352 @@
1
+ import * as i0 from '@angular/core';
2
+ import { numberAttribute, input, booleanAttribute, output, computed, ChangeDetectionStrategy, Component, inject, ElementRef, signal, forwardRef } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+ import { cn } from '@ojiepermana/angular/component/utils';
5
+
6
+ const COMPOSER_BASE = 'block w-full min-w-0 text-sm text-foreground';
7
+ const COMPOSER_SHELL_BASE = [
8
+ 'relative min-w-0 border border-input bg-background shadow-sm',
9
+ 'transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring',
10
+ 'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive',
11
+ 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',
12
+ '[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1',
13
+ ].join(' ');
14
+ const composerShellVariantClasses = {
15
+ default: 'rounded-xl',
16
+ input: 'rounded-md',
17
+ };
18
+ const COMPOSER_BODY_BASE = '[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1';
19
+ const nullableNumberAttribute = (value) => {
20
+ if (value === null || value === undefined || value === '') {
21
+ return null;
22
+ }
23
+ return numberAttribute(value);
24
+ };
25
+ class ComposerComponent {
26
+ variant = input('default', /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
28
+ inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
30
+ invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
31
+ submit = input('cmd-enter', /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "submit" }] : /* istanbul ignore next */ []));
33
+ submitForm = input(true, { ...(ngDevMode ? { debugName: "submitForm" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
34
+ class = input('', /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
36
+ submitRequested = output();
37
+ classes = computed(() => cn(COMPOSER_BASE, this.class()), /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
39
+ shellClasses = computed(() => cn(COMPOSER_SHELL_BASE, composerShellVariantClasses[this.variant()]), /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "shellClasses" }] : /* istanbul ignore next */ []));
41
+ bodyClasses = computed(() => cn(COMPOSER_BODY_BASE, this.inline()
42
+ ? [
43
+ 'flex items-end gap-1 px-1 py-1',
44
+ '[&>[data-slot=composer-actions-leading]]:order-10',
45
+ '[&>[data-slot=composer-input]]:order-20',
46
+ '[&>[data-slot=composer-actions-trailing]]:order-30',
47
+ ].join(' ')
48
+ : [
49
+ 'flex flex-wrap items-end gap-1.5 px-2 py-1.5',
50
+ '[&>[data-slot=composer-input]]:order-10 [&>[data-slot=composer-input]]:basis-full',
51
+ '[&>[data-slot=composer-actions-leading]]:order-20',
52
+ '[&>[data-slot=composer-actions-trailing]]:order-30 [&>[data-slot=composer-actions-trailing]]:ml-auto',
53
+ ].join(' ')), /* @ts-ignore */
54
+ ...(ngDevMode ? [{ debugName: "bodyClasses" }] : /* istanbul ignore next */ []));
55
+ handleInputKeydown(event) {
56
+ if (this.disabled() || event.key !== 'Enter' || event.defaultPrevented) {
57
+ return;
58
+ }
59
+ const shouldSubmit = this.submit() === 'enter' ? !event.shiftKey && !event.isComposing : event.metaKey || event.ctrlKey;
60
+ if (!shouldSubmit) {
61
+ return;
62
+ }
63
+ event.preventDefault();
64
+ this.submitRequested.emit(event);
65
+ if (this.submitForm()) {
66
+ this.requestNearestFormSubmit(event.target);
67
+ }
68
+ }
69
+ requestNearestFormSubmit(target) {
70
+ if (!(target instanceof Element)) {
71
+ return;
72
+ }
73
+ const form = target.closest('form');
74
+ if (form && typeof form.requestSubmit === 'function') {
75
+ form.requestSubmit();
76
+ }
77
+ }
78
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
79
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerComponent, isStandalone: true, selector: "ui-composer", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, submit: { classPropertyName: "submit", publicName: "submit", isSignal: true, isRequired: false, transformFunction: null }, submitForm: { classPropertyName: "submitForm", publicName: "submitForm", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitRequested: "submitRequested" }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer\"", "attr.data-variant": "variant()", "attr.data-inline": "inline() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null", "attr.inert": "disabled() ? \"\" : null" } }, ngImport: i0, template: `
80
+ <div
81
+ data-slot="composer-shell"
82
+ [class]="shellClasses()"
83
+ [attr.data-disabled]="disabled() ? 'true' : null"
84
+ [attr.aria-invalid]="invalid() ? 'true' : null">
85
+ <ng-content select="ui-composer-header" />
86
+ <div data-slot="composer-body" [class]="bodyClasses()">
87
+ <ng-content select="ui-composer-actions-leading" />
88
+ <ng-content select="textarea[ui-composer-input], ui-composer-input" />
89
+ <ng-content select="ui-composer-actions-trailing" />
90
+ </div>
91
+ <ng-content select="ui-composer-footer" />
92
+ </div>
93
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerComponent, decorators: [{
96
+ type: Component,
97
+ args: [{
98
+ selector: 'ui-composer',
99
+ changeDetection: ChangeDetectionStrategy.OnPush,
100
+ host: {
101
+ '[class]': 'classes()',
102
+ '[attr.data-slot]': '"composer"',
103
+ '[attr.data-variant]': 'variant()',
104
+ '[attr.data-inline]': 'inline() ? "true" : null',
105
+ '[attr.data-disabled]': 'disabled() ? "true" : null',
106
+ '[attr.aria-disabled]': 'disabled() ? "true" : null',
107
+ '[attr.aria-invalid]': 'invalid() ? "true" : null',
108
+ '[attr.inert]': 'disabled() ? "" : null',
109
+ },
110
+ template: `
111
+ <div
112
+ data-slot="composer-shell"
113
+ [class]="shellClasses()"
114
+ [attr.data-disabled]="disabled() ? 'true' : null"
115
+ [attr.aria-invalid]="invalid() ? 'true' : null">
116
+ <ng-content select="ui-composer-header" />
117
+ <div data-slot="composer-body" [class]="bodyClasses()">
118
+ <ng-content select="ui-composer-actions-leading" />
119
+ <ng-content select="textarea[ui-composer-input], ui-composer-input" />
120
+ <ng-content select="ui-composer-actions-trailing" />
121
+ </div>
122
+ <ng-content select="ui-composer-footer" />
123
+ </div>
124
+ `,
125
+ }]
126
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], submit: [{ type: i0.Input, args: [{ isSignal: true, alias: "submit", required: false }] }], submitForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitForm", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], submitRequested: [{ type: i0.Output, args: ["submitRequested"] }] } });
127
+ class ComposerHeaderComponent {
128
+ class = input('', /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
130
+ classes = computed(() => cn('flex min-w-0 flex-wrap gap-2 border-b border-border/70 px-2.5 py-2', this.class()), /* @ts-ignore */
131
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
133
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerHeaderComponent, isStandalone: true, selector: "ui-composer-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
134
+ }
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerHeaderComponent, decorators: [{
136
+ type: Component,
137
+ args: [{
138
+ selector: 'ui-composer-header',
139
+ changeDetection: ChangeDetectionStrategy.OnPush,
140
+ host: {
141
+ '[class]': 'classes()',
142
+ '[attr.data-slot]': '"composer-header"',
143
+ },
144
+ template: `<ng-content />`,
145
+ }]
146
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
147
+ class ComposerFooterComponent {
148
+ class = input('', /* @ts-ignore */
149
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
150
+ classes = computed(() => cn('border-t border-border/70 px-2.5 py-1.5 text-xs leading-5 text-muted-foreground', this.class()), /* @ts-ignore */
151
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
152
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
153
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerFooterComponent, isStandalone: true, selector: "ui-composer-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
154
+ }
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerFooterComponent, decorators: [{
156
+ type: Component,
157
+ args: [{
158
+ selector: 'ui-composer-footer',
159
+ changeDetection: ChangeDetectionStrategy.OnPush,
160
+ host: {
161
+ '[class]': 'classes()',
162
+ '[attr.data-slot]': '"composer-footer"',
163
+ },
164
+ template: `<ng-content />`,
165
+ }]
166
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
167
+ class ComposerActionsLeadingComponent {
168
+ class = input('', /* @ts-ignore */
169
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
170
+ classes = computed(() => cn('flex min-h-8 shrink-0 items-center gap-1', this.class()), /* @ts-ignore */
171
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsLeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerActionsLeadingComponent, isStandalone: true, selector: "ui-composer-actions-leading", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-leading\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
174
+ }
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsLeadingComponent, decorators: [{
176
+ type: Component,
177
+ args: [{
178
+ selector: 'ui-composer-actions-leading',
179
+ changeDetection: ChangeDetectionStrategy.OnPush,
180
+ host: {
181
+ '[class]': 'classes()',
182
+ '[attr.data-slot]': '"composer-actions-leading"',
183
+ },
184
+ template: `<ng-content />`,
185
+ }]
186
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
187
+ class ComposerActionsTrailingComponent {
188
+ class = input('', /* @ts-ignore */
189
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
190
+ classes = computed(() => cn('flex min-h-8 shrink-0 items-center justify-end gap-1', this.class()), /* @ts-ignore */
191
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
192
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsTrailingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
193
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerActionsTrailingComponent, isStandalone: true, selector: "ui-composer-actions-trailing", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-trailing\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
194
+ }
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerActionsTrailingComponent, decorators: [{
196
+ type: Component,
197
+ args: [{
198
+ selector: 'ui-composer-actions-trailing',
199
+ changeDetection: ChangeDetectionStrategy.OnPush,
200
+ host: {
201
+ '[class]': 'classes()',
202
+ '[attr.data-slot]': '"composer-actions-trailing"',
203
+ },
204
+ template: `<ng-content />`,
205
+ }]
206
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
207
+ class ComposerInputComponent {
208
+ composer = inject(ComposerComponent, { optional: true });
209
+ disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
210
+ invalidInput = input(false, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), alias: 'aria-invalid', transform: booleanAttribute });
211
+ class = input('', /* @ts-ignore */
212
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
213
+ disabled = computed(() => this.disabledInput() || this.composer?.disabled() === true, /* @ts-ignore */
214
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
215
+ invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true, /* @ts-ignore */
216
+ ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
217
+ classes = computed(() => cn('min-h-10 w-full rounded-sm bg-transparent px-2 py-2 text-sm leading-6 outline-none', 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', this.class()), /* @ts-ignore */
218
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
219
+ handleKeydown(event) {
220
+ this.composer?.handleInputKeydown(event);
221
+ }
222
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
223
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerInputComponent, isStandalone: true, selector: "ui-composer-input", inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
224
+ }
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerInputComponent, decorators: [{
226
+ type: Component,
227
+ args: [{
228
+ selector: 'ui-composer-input',
229
+ changeDetection: ChangeDetectionStrategy.OnPush,
230
+ host: {
231
+ '[class]': 'classes()',
232
+ '[attr.data-slot]': '"composer-input"',
233
+ '[attr.data-disabled]': 'disabled() ? "true" : null',
234
+ '[attr.aria-disabled]': 'disabled() ? "true" : null',
235
+ '[attr.aria-invalid]': 'invalid() ? "true" : null',
236
+ '(keydown)': 'handleKeydown($event)',
237
+ },
238
+ template: `<ng-content />`,
239
+ }]
240
+ }], propDecorators: { disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalidInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
241
+ class ComposerTextareaComponent {
242
+ el = inject(ElementRef);
243
+ composer = inject(ComposerComponent, { optional: true });
244
+ rows = input(2, { ...(ngDevMode ? { debugName: "rows" } : /* istanbul ignore next */ {}), transform: numberAttribute });
245
+ maxRows = input(null, { ...(ngDevMode ? { debugName: "maxRows" } : /* istanbul ignore next */ {}), transform: nullableNumberAttribute });
246
+ disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
247
+ invalidInput = input(false, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), alias: 'aria-invalid', transform: booleanAttribute });
248
+ class = input('', /* @ts-ignore */
249
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
250
+ disabledState = signal(false, /* @ts-ignore */
251
+ ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
252
+ disabled = computed(() => this.disabledInput() || this.disabledState() || this.composer?.disabled() === true, /* @ts-ignore */
253
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
254
+ invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true, /* @ts-ignore */
255
+ ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
256
+ classes = computed(() => cn([
257
+ 'max-h-none min-h-10 w-full resize-none bg-transparent px-2 py-2 text-sm leading-6 text-foreground shadow-none outline-none',
258
+ 'placeholder:text-muted-foreground',
259
+ 'disabled:cursor-not-allowed disabled:opacity-50',
260
+ ].join(' '), this.class()), /* @ts-ignore */
261
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
262
+ onChange = () => { };
263
+ onTouched = () => { };
264
+ ngAfterViewInit() {
265
+ queueMicrotask(() => this.resizeToContent());
266
+ }
267
+ writeValue(value) {
268
+ this.el.nativeElement.value = value ?? '';
269
+ queueMicrotask(() => this.resizeToContent());
270
+ }
271
+ registerOnChange(fn) {
272
+ this.onChange = fn;
273
+ }
274
+ registerOnTouched(fn) {
275
+ this.onTouched = fn;
276
+ }
277
+ setDisabledState(isDisabled) {
278
+ this.disabledState.set(isDisabled);
279
+ }
280
+ resizeToContent() {
281
+ const textarea = this.el.nativeElement;
282
+ textarea.style.height = 'auto';
283
+ const maxRows = this.maxRows();
284
+ if (!maxRows) {
285
+ textarea.style.height = `${textarea.scrollHeight}px`;
286
+ textarea.style.overflowY = 'hidden';
287
+ return;
288
+ }
289
+ const lineHeight = this.getLineHeight(textarea);
290
+ const maxHeight = lineHeight * Math.max(maxRows, this.rows());
291
+ const nextHeight = Math.min(textarea.scrollHeight, maxHeight);
292
+ textarea.style.height = `${nextHeight}px`;
293
+ textarea.style.overflowY = textarea.scrollHeight > maxHeight ? 'auto' : 'hidden';
294
+ }
295
+ focus() {
296
+ this.el.nativeElement.focus();
297
+ }
298
+ handleInput() {
299
+ this.resizeToContent();
300
+ this.onChange(this.el.nativeElement.value);
301
+ }
302
+ handleBlur() {
303
+ this.onTouched();
304
+ }
305
+ handleKeydown(event) {
306
+ this.composer?.handleInputKeydown(event);
307
+ }
308
+ getLineHeight(textarea) {
309
+ const lineHeight = Number.parseFloat(getComputedStyle(textarea).lineHeight);
310
+ return Number.isFinite(lineHeight) ? lineHeight : 24;
311
+ }
312
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
313
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ComposerTextareaComponent, isStandalone: true, selector: "textarea[ui-composer-input]", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "handleInput()", "blur": "handleBlur()", "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.rows": "rows()", "attr.disabled": "disabled() ? \"\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, providers: [
314
+ {
315
+ provide: NG_VALUE_ACCESSOR,
316
+ useExisting: forwardRef(() => ComposerTextareaComponent),
317
+ multi: true,
318
+ },
319
+ ], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
320
+ }
321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ComposerTextareaComponent, decorators: [{
322
+ type: Component,
323
+ args: [{
324
+ selector: 'textarea[ui-composer-input]',
325
+ changeDetection: ChangeDetectionStrategy.OnPush,
326
+ providers: [
327
+ {
328
+ provide: NG_VALUE_ACCESSOR,
329
+ useExisting: forwardRef(() => ComposerTextareaComponent),
330
+ multi: true,
331
+ },
332
+ ],
333
+ host: {
334
+ '[class]': 'classes()',
335
+ '[attr.data-slot]': '"composer-input"',
336
+ '[attr.rows]': 'rows()',
337
+ '[attr.disabled]': 'disabled() ? "" : null',
338
+ '[attr.aria-invalid]': 'invalid() ? "true" : null',
339
+ '(input)': 'handleInput()',
340
+ '(blur)': 'handleBlur()',
341
+ '(keydown)': 'handleKeydown($event)',
342
+ },
343
+ template: '',
344
+ }]
345
+ }], propDecorators: { rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalidInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
346
+
347
+ /**
348
+ * Generated bundle index. Do not edit.
349
+ */
350
+
351
+ export { ComposerActionsLeadingComponent, ComposerActionsTrailingComponent, ComposerComponent, ComposerFooterComponent, ComposerHeaderComponent, ComposerInputComponent, ComposerTextareaComponent };
352
+ //# sourceMappingURL=ojiepermana-angular-component-composer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-composer.mjs","sources":["../../../projects/angular/component/composer/composer.component.ts","../../../projects/angular/component/composer/ojiepermana-angular-component-composer.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n forwardRef,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\nexport type ComposerVariant = 'default' | 'input';\nexport type ComposerSubmitBehavior = 'cmd-enter' | 'enter';\n\nconst COMPOSER_BASE = 'block w-full min-w-0 text-sm text-foreground';\n\nconst COMPOSER_SHELL_BASE = [\n 'relative min-w-0 border border-input bg-background shadow-sm',\n 'transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring',\n 'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive',\n 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\n '[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1',\n].join(' ');\n\nconst composerShellVariantClasses: Record<ComposerVariant, string> = {\n default: 'rounded-xl',\n input: 'rounded-md',\n};\n\nconst COMPOSER_BODY_BASE = '[&>[data-slot=composer-input]]:min-w-0 [&>[data-slot=composer-input]]:flex-1';\n\nconst nullableNumberAttribute = (value: unknown): number | null => {\n if (value === null || value === undefined || value === '') {\n return null;\n }\n\n return numberAttribute(value);\n};\n\n@Component({\n selector: 'ui-composer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer\"',\n '[attr.data-variant]': 'variant()',\n '[attr.data-inline]': 'inline() ? \"true\" : null',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.inert]': 'disabled() ? \"\" : null',\n },\n template: `\n <div\n data-slot=\"composer-shell\"\n [class]=\"shellClasses()\"\n [attr.data-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\">\n <ng-content select=\"ui-composer-header\" />\n <div data-slot=\"composer-body\" [class]=\"bodyClasses()\">\n <ng-content select=\"ui-composer-actions-leading\" />\n <ng-content select=\"textarea[ui-composer-input], ui-composer-input\" />\n <ng-content select=\"ui-composer-actions-trailing\" />\n </div>\n <ng-content select=\"ui-composer-footer\" />\n </div>\n `,\n})\nexport class ComposerComponent {\n readonly variant = input<ComposerVariant>('default');\n readonly inline = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly invalid = input(false, { transform: booleanAttribute });\n readonly submit = input<ComposerSubmitBehavior>('cmd-enter');\n readonly submitForm = input(true, { transform: booleanAttribute });\n readonly class = input<string>('');\n\n readonly submitRequested = output<KeyboardEvent>();\n\n protected readonly classes = computed(() => cn(COMPOSER_BASE, this.class()));\n protected readonly shellClasses = computed(() =>\n cn(COMPOSER_SHELL_BASE, composerShellVariantClasses[this.variant()]),\n );\n protected readonly bodyClasses = computed(() =>\n cn(\n COMPOSER_BODY_BASE,\n this.inline()\n ? [\n 'flex items-end gap-1 px-1 py-1',\n '[&>[data-slot=composer-actions-leading]]:order-10',\n '[&>[data-slot=composer-input]]:order-20',\n '[&>[data-slot=composer-actions-trailing]]:order-30',\n ].join(' ')\n : [\n 'flex flex-wrap items-end gap-1.5 px-2 py-1.5',\n '[&>[data-slot=composer-input]]:order-10 [&>[data-slot=composer-input]]:basis-full',\n '[&>[data-slot=composer-actions-leading]]:order-20',\n '[&>[data-slot=composer-actions-trailing]]:order-30 [&>[data-slot=composer-actions-trailing]]:ml-auto',\n ].join(' '),\n ),\n );\n\n handleInputKeydown(event: KeyboardEvent): void {\n if (this.disabled() || event.key !== 'Enter' || event.defaultPrevented) {\n return;\n }\n\n const shouldSubmit =\n this.submit() === 'enter' ? !event.shiftKey && !event.isComposing : event.metaKey || event.ctrlKey;\n\n if (!shouldSubmit) {\n return;\n }\n\n event.preventDefault();\n this.submitRequested.emit(event);\n\n if (this.submitForm()) {\n this.requestNearestFormSubmit(event.target);\n }\n }\n\n private requestNearestFormSubmit(target: EventTarget | null): void {\n if (!(target instanceof Element)) {\n return;\n }\n\n const form = target.closest('form');\n if (form && typeof form.requestSubmit === 'function') {\n form.requestSubmit();\n }\n }\n}\n\n@Component({\n selector: 'ui-composer-header',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-header\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerHeaderComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('flex min-w-0 flex-wrap gap-2 border-b border-border/70 px-2.5 py-2', this.class()),\n );\n}\n\n@Component({\n selector: 'ui-composer-footer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-footer\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerFooterComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('border-t border-border/70 px-2.5 py-1.5 text-xs leading-5 text-muted-foreground', this.class()),\n );\n}\n\n@Component({\n selector: 'ui-composer-actions-leading',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-actions-leading\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerActionsLeadingComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('flex min-h-8 shrink-0 items-center gap-1', this.class()));\n}\n\n@Component({\n selector: 'ui-composer-actions-trailing',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-actions-trailing\"',\n },\n template: `<ng-content />`,\n})\nexport class ComposerActionsTrailingComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('flex min-h-8 shrink-0 items-center justify-end gap-1', this.class()));\n}\n\n@Component({\n selector: 'ui-composer-input',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-input\"',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '(keydown)': 'handleKeydown($event)',\n },\n template: `<ng-content />`,\n})\nexport class ComposerInputComponent {\n private readonly composer = inject(ComposerComponent, { optional: true });\n\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly invalidInput = input(false, { alias: 'aria-invalid', transform: booleanAttribute });\n readonly class = input<string>('');\n\n protected readonly disabled = computed(() => this.disabledInput() || this.composer?.disabled() === true);\n protected readonly invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true);\n protected readonly classes = computed(() =>\n cn(\n 'min-h-10 w-full rounded-sm bg-transparent px-2 py-2 text-sm leading-6 outline-none',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n this.class(),\n ),\n );\n\n protected handleKeydown(event: KeyboardEvent): void {\n this.composer?.handleInputKeydown(event);\n }\n}\n\n@Component({\n selector: 'textarea[ui-composer-input]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ComposerTextareaComponent),\n multi: true,\n },\n ],\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"composer-input\"',\n '[attr.rows]': 'rows()',\n '[attr.disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '(input)': 'handleInput()',\n '(blur)': 'handleBlur()',\n '(keydown)': 'handleKeydown($event)',\n },\n template: '',\n})\nexport class ComposerTextareaComponent implements AfterViewInit, ControlValueAccessor {\n private readonly el = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n private readonly composer = inject(ComposerComponent, { optional: true });\n\n readonly rows = input(2, { transform: numberAttribute });\n readonly maxRows = input<number | null>(null, { transform: nullableNumberAttribute });\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly invalidInput = input(false, { alias: 'aria-invalid', transform: booleanAttribute });\n readonly class = input<string>('');\n\n private readonly disabledState = signal(false);\n protected readonly disabled = computed(\n () => this.disabledInput() || this.disabledState() || this.composer?.disabled() === true,\n );\n protected readonly invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true);\n protected readonly classes = computed(() =>\n cn(\n [\n 'max-h-none min-h-10 w-full resize-none bg-transparent px-2 py-2 text-sm leading-6 text-foreground shadow-none outline-none',\n 'placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n ].join(' '),\n this.class(),\n ),\n );\n\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n ngAfterViewInit(): void {\n queueMicrotask(() => this.resizeToContent());\n }\n\n writeValue(value: string | null): void {\n this.el.nativeElement.value = value ?? '';\n queueMicrotask(() => this.resizeToContent());\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledState.set(isDisabled);\n }\n\n resizeToContent(): void {\n const textarea = this.el.nativeElement;\n textarea.style.height = 'auto';\n\n const maxRows = this.maxRows();\n if (!maxRows) {\n textarea.style.height = `${textarea.scrollHeight}px`;\n textarea.style.overflowY = 'hidden';\n return;\n }\n\n const lineHeight = this.getLineHeight(textarea);\n const maxHeight = lineHeight * Math.max(maxRows, this.rows());\n const nextHeight = Math.min(textarea.scrollHeight, maxHeight);\n\n textarea.style.height = `${nextHeight}px`;\n textarea.style.overflowY = textarea.scrollHeight > maxHeight ? 'auto' : 'hidden';\n }\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n\n protected handleInput(): void {\n this.resizeToContent();\n this.onChange(this.el.nativeElement.value);\n }\n\n protected handleBlur(): void {\n this.onTouched();\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n this.composer?.handleInputKeydown(event);\n }\n\n private getLineHeight(textarea: HTMLTextAreaElement): number {\n const lineHeight = Number.parseFloat(getComputedStyle(textarea).lineHeight);\n return Number.isFinite(lineHeight) ? lineHeight : 24;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAoBA,MAAM,aAAa,GAAG,8CAA8C;AAEpE,MAAM,mBAAmB,GAAG;IAC1B,8DAA8D;IAC9D,0GAA0G;IAC1G,0FAA0F;IAC1F,yEAAyE;IACzE,8EAA8E;AAC/E,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,2BAA2B,GAAoC;AACnE,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,KAAK,EAAE,YAAY;CACpB;AAED,MAAM,kBAAkB,GAAG,8EAA8E;AAEzG,MAAM,uBAAuB,GAAG,CAAC,KAAc,KAAmB;AAChE,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE;AACzD,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,OAAO,eAAe,CAAC,KAAK,CAAC;AAC/B,CAAC;MA+BY,iBAAiB,CAAA;IACnB,OAAO,GAAG,KAAK,CAAkB,SAAS;gFAAC;IAC3C,MAAM,GAAG,KAAK,CAAC,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACtD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA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(ViewContainerRef);
25
25
  el = inject(ElementRef);
26
26
  destroyRef = inject(DestroyRef);
27
- uiContextMenuTrigger = input.required(...(ngDevMode ? [{ debugName: "uiContextMenuTrigger" }] : /* istanbul ignore next */ []));
28
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
27
+ uiContextMenuTrigger = input.required(/* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "uiContextMenuTrigger" }] : /* istanbul ignore next */ []));
29
+ disabled = input(false, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
29
31
  openedChange = output();
30
32
  overlayRef = null;
31
- isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
33
+ isOpen = signal(false, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
32
35
  onContextMenu(event) {
33
36
  if (this.disabled())
34
37
  return;
@@ -77,10 +80,10 @@ class ContextMenuTriggerDirective {
77
80
  this.isOpen.set(false);
78
81
  this.openedChange.emit(false);
79
82
  }
80
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ContextMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
81
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: ContextMenuTriggerDirective, isStandalone: true, selector: "[uiContextMenuTrigger]", inputs: { uiContextMenuTrigger: { classPropertyName: "uiContextMenuTrigger", publicName: "uiContextMenuTrigger", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "contextmenu": "onContextMenu($event)", "keydown": "onKeyDown($event)" } }, exportAs: ["uiContextMenuTrigger"], ngImport: i0 });
83
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ContextMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
84
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: ContextMenuTriggerDirective, isStandalone: true, selector: "[uiContextMenuTrigger]", inputs: { uiContextMenuTrigger: { classPropertyName: "uiContextMenuTrigger", publicName: "uiContextMenuTrigger", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "contextmenu": "onContextMenu($event)", "keydown": "onKeyDown($event)" } }, exportAs: ["uiContextMenuTrigger"], ngImport: i0 });
82
85
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ContextMenuTriggerDirective, decorators: [{
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ContextMenuTriggerDirective, decorators: [{
84
87
  type: Directive,
85
88
  args: [{
86
89
  selector: '[uiContextMenuTrigger]',
@@ -1 +1 @@
1
- {"version":3,"file":"ojiepermana-angular-component-context-menu.mjs","sources":["../../../projects/angular/component/context-menu/src/lib/context-menu-trigger.directive.ts","../../../projects/angular/component/context-menu/ojiepermana-angular-component-context-menu.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, ViewContainerRef, inject, input, output, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport type { MenuContentDirective } from '@ojiepermana/angular/component/dropdown-menu';\n\n/**\n * Opens a menu anchored to the cursor when the host fires `contextmenu`.\n * Reuses `<ng-template uiMenuContent>` from the dropdown-menu entry.\n *\n * @example\n * <div [uiContextMenuTrigger]=\"menu\" class=\"p-12 border\">Right-click me</div>\n * <ng-template uiMenuContent #menu>\n * <ui-menu-surface>\n * <button ui-menu-item>Copy</button>\n * <button ui-menu-item>Paste</button>\n * </ui-menu-surface>\n * </ng-template>\n */\n@Directive({\n selector: '[uiContextMenuTrigger]',\n exportAs: 'uiContextMenuTrigger',\n host: {\n '(contextmenu)': 'onContextMenu($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class ContextMenuTriggerDirective {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly uiContextMenuTrigger = input.required<MenuContentDirective>();\n readonly disabled = input<boolean>(false);\n\n readonly openedChange = output<boolean>();\n\n private overlayRef: OverlayRef | null = null;\n readonly isOpen = signal(false);\n\n protected onContextMenu(event: MouseEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n this.close();\n this.openAt(event.clientX, event.clientY);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const isContextMenuKey = event.key === 'ContextMenu' || (event.shiftKey && event.key === 'F10');\n\n if (!isContextMenuKey || this.disabled()) {\n return;\n }\n\n event.preventDefault();\n\n const rect = this.el.nativeElement.getBoundingClientRect();\n this.close();\n this.openAt(rect.left + rect.width / 2, rect.top + rect.height / 2);\n }\n\n openAt(x: number, y: number): void {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo({ x, y })\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n ]),\n scrollStrategy: this.overlay.scrollStrategies.close(),\n hasBackdrop: false,\n panelClass: 'ui-menu-panel',\n });\n\n const portal = new TemplatePortal(this.uiContextMenuTrigger().template, this.vcr);\n this.overlayRef.attach(portal);\n\n merge(\n this.overlayRef.outsidePointerEvents(),\n this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')),\n this.overlayRef.detachments(),\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.close());\n\n this.isOpen.set(true);\n this.openedChange.emit(true);\n }\n\n close(): void {\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.isOpen.set(false);\n this.openedChange.emit(false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAQA;;;;;;;;;;;;AAYG;MASU,2BAA2B,CAAA;AACrB,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAChD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC,IAAA,oBAAoB,GAAG,KAAK,CAAC,QAAQ,0FAAwB;AAC7D,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;IAEhC,YAAY,GAAG,MAAM,EAAW;IAEjC,UAAU,GAAsB,IAAI;AACnC,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,6EAAC;AAErB,IAAA,aAAa,CAAC,KAAiB,EAAA;QACvC,IAAI,IAAI,CAAC,QAAQ,EAAE;YAAE;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,IAAI,CAAC,KAAK,EAAE;QACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC;IAC3C;AAEU,IAAA,SAAS,CAAC,KAAoB,EAAA;AACtC,QAAA,MAAM,gBAAgB,GAAG,KAAK,CAAC,GAAG,KAAK,aAAa,KAAK,KAAK,CAAC,QAAQ,IAAI,KAAK,CA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AA,sBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,uBAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,sBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBARvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACJ,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA;AACF,iBAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"ojiepermana-angular-component-context-menu.mjs","sources":["../../../projects/angular/component/context-menu/context-menu-trigger.directive.ts","../../../projects/angular/component/context-menu/ojiepermana-angular-component-context-menu.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, ViewContainerRef, inject, input, output, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport type { MenuContentDirective } from '@ojiepermana/angular/component/dropdown-menu';\n\n/**\n * Opens a menu anchored to the cursor when the host fires `contextmenu`.\n * Reuses `<ng-template uiMenuContent>` from the dropdown-menu entry.\n *\n * @example\n * <div [uiContextMenuTrigger]=\"menu\" class=\"p-12 border\">Right-click me</div>\n * <ng-template uiMenuContent #menu>\n * <ui-menu-surface>\n * <button ui-menu-item>Copy</button>\n * <button ui-menu-item>Paste</button>\n * </ui-menu-surface>\n * </ng-template>\n */\n@Directive({\n selector: '[uiContextMenuTrigger]',\n exportAs: 'uiContextMenuTrigger',\n host: {\n '(contextmenu)': 'onContextMenu($event)',\n '(keydown)': 'onKeyDown($event)',\n },\n})\nexport class ContextMenuTriggerDirective {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly uiContextMenuTrigger = input.required<MenuContentDirective>();\n readonly disabled = input<boolean>(false);\n\n readonly openedChange = output<boolean>();\n\n private overlayRef: OverlayRef | null = null;\n readonly isOpen = signal(false);\n\n protected onContextMenu(event: MouseEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n this.close();\n this.openAt(event.clientX, event.clientY);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const isContextMenuKey = event.key === 'ContextMenu' || (event.shiftKey && event.key === 'F10');\n\n if (!isContextMenuKey || this.disabled()) {\n return;\n }\n\n event.preventDefault();\n\n const rect = this.el.nativeElement.getBoundingClientRect();\n this.close();\n this.openAt(rect.left + rect.width / 2, rect.top + rect.height / 2);\n }\n\n openAt(x: number, y: number): void {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo({ x, y })\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n ]),\n scrollStrategy: this.overlay.scrollStrategies.close(),\n hasBackdrop: false,\n panelClass: 'ui-menu-panel',\n });\n\n const portal = new TemplatePortal(this.uiContextMenuTrigger().template, this.vcr);\n this.overlayRef.attach(portal);\n\n merge(\n this.overlayRef.outsidePointerEvents(),\n this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')),\n this.overlayRef.detachments(),\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.close());\n\n this.isOpen.set(true);\n this.openedChange.emit(true);\n }\n\n close(): void {\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.isOpen.set(false);\n this.openedChange.emit(false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQA;;;;;;;;;;;;AAYG;MASU,2BAA2B,CAAA;AACrB,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAChD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAEvC,oBAAoB,GAAG,KAAK,CAAC,QAAQ;6FAAwB;IAC7D,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;IAEhC,YAAY,GAAG,MAAM,EAAW;IAEjC,UAAU,GAAsB,IAAI;IACnC,MAAM,GAAG,MAAM,CAAC,KAAK;+EAAC;AAErB,IAAA,aAAa,CAAC,KAAiB,EAAA;QACvC,IAAI,IAAI,CAAC,QAAQ,EAAE;YAAE;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,IAAI,CAAC,KAAK,EAAE;QACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC;IAC3C;AAEU,IAAA,SAAS,CAAC,KAAoB,EAAA;AACtC,QAAA,MAAM,gBAAgB,GAAG,KAAK,CAAC,GAAG,KAAK,aAAa,KAAK,KAAK,CAAC,QAAQ,IAAI,KAAK,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EAAA,sBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,uBAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,sBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBARvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACJ,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA;AACF,iBAAA;;;AC5BD;;AAEG;;;;"}
@@ -14,24 +14,39 @@ let nextDatePickerId = 0;
14
14
  * (e.g. `provideNativeDateAdapter()` from `@angular/material/core`).
15
15
  */
16
16
  class DatePickerComponent {
17
- value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
18
- id = input(null, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
19
- placeholder = input('Pick a date', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
20
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
21
- min = input(null, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
22
- max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
23
- startAt = input(null, ...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
24
- startView = input('month', ...(ngDevMode ? [{ debugName: "startView" }] : /* istanbul ignore next */ []));
25
- touchUi = input(false, ...(ngDevMode ? [{ debugName: "touchUi" }] : /* istanbul ignore next */ []));
26
- dateFilter = input(null, ...(ngDevMode ? [{ debugName: "dateFilter" }] : /* istanbul ignore next */ []));
27
- panelClass = input('ui-datepicker-panel', ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
17
+ value = model(null, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
19
+ id = input(null, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
21
+ placeholder = input('Pick a date', /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
23
+ required = input(false, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
25
+ min = input(null, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
27
+ max = input(null, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
29
+ startAt = input(null, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
31
+ startView = input('month', /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "startView" }] : /* istanbul ignore next */ []));
33
+ touchUi = input(false, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "touchUi" }] : /* istanbul ignore next */ []));
35
+ dateFilter = input(null, /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "dateFilter" }] : /* istanbul ignore next */ []));
37
+ panelClass = input('ui-datepicker-panel', /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
28
39
  ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
29
40
  ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
30
- disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
31
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
41
+ disabled = model(false, /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
43
+ class = input('', /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
32
45
  fallbackId = `ui-date-picker-${nextDatePickerId++}`;
33
- classes = computed(() => cn('inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
34
- resolvedId = computed(() => this.id() ?? this.fallbackId, ...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
46
+ classes = computed(() => cn('inline-block', this.class()), /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
48
+ resolvedId = computed(() => this.id() ?? this.fallbackId, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
35
50
  control = new FormControl(null);
36
51
  onChangeFn = () => { };
37
52
  onTouchedFn = () => { };
@@ -67,8 +82,8 @@ class DatePickerComponent {
67
82
  setDisabledState(state) {
68
83
  this.disabled.set(state);
69
84
  }
70
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
71
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: DatePickerComponent, isStandalone: true, selector: "ui-date-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, touchUi: { classPropertyName: "touchUi", publicName: "touchUi", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true }], ngImport: i0, template: `
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
86
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: DatePickerComponent, isStandalone: true, selector: "ui-date-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, touchUi: { classPropertyName: "touchUi", publicName: "touchUi", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true }], ngImport: i0, template: `
72
87
  <mat-form-field class="ui-date-picker w-full" appearance="outline" subscriptSizing="dynamic">
73
88
  <input
74
89
  matInput
@@ -104,9 +119,9 @@ class DatePickerComponent {
104
119
  [startView]="startView()"
105
120
  [touchUi]="touchUi()"></mat-datepicker>
106
121
  </mat-form-field>
107
- `, isInline: true, styles: [":host{display:inline-block}:host ::ng-deep .mat-mdc-form-field{--mat-form-field-container-height: 2.25rem;--mat-form-field-container-vertical-padding: 0;--mat-form-field-filled-with-label-container-padding-top: 0;--mat-form-field-filled-with-label-container-padding-bottom: 0;--mdc-outlined-text-field-container-shape: calc(var(--radius) - .125rem);--mdc-outlined-text-field-outline-color: hsl(var(--input));--mdc-outlined-text-field-hover-outline-color: hsl(var(--input));--mdc-outlined-text-field-focus-outline-color: hsl(var(--ring));--mdc-outlined-text-field-input-text-color: hsl(var(--foreground));--mdc-outlined-text-field-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-hover-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-focus-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-disabled-outline-color: hsl(var(--input) / .5);--mdc-outlined-text-field-disabled-input-text-color: hsl(var(--muted-foreground));width:100%;font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-text-field-wrapper{height:2.25rem;padding:0 .25rem 0 .75rem;background:transparent}:host ::ng-deep .mat-mdc-form-field-flex{height:2.25rem;align-items:center}:host ::ng-deep .mat-mdc-form-field-infix{display:flex;min-height:2.25rem;height:2.25rem;align-items:center;padding:0;width:auto}:host ::ng-deep .mat-mdc-form-field-icon-suffix{align-self:center;padding-right:.25rem!important;padding-left:.25rem!important;color:hsl(var(--muted-foreground))}.ui-date-picker-toggle{display:inline-flex;width:1.75rem;height:1.75rem;align-items:center;justify-content:center;color:hsl(var(--muted-foreground));border-radius:calc(var(--radius) - .125rem);transition:color .15s ease,background-color .15s ease}.ui-date-picker-toggle:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.ui-date-picker-toggle:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.ui-date-picker-toggle:disabled{cursor:not-allowed;opacity:.5}.ui-date-picker-toggle svg{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-input-element{font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-input-element::placeholder{color:hsl(var(--muted-foreground))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mdc-floating-label,:host ::ng-deep .mat-mdc-floating-label,:host ::ng-deep .mdc-notched-outline__notch .mdc-floating-label{display:none}:host ::ng-deep .mdc-notched-outline__notch{padding:0;border-left:none;border-right:none}:host ::ng-deep .mat-mdc-form-field.mat-focused .ui-date-picker-toggle{color:hsl(var(--foreground))}:host ::ng-deep .mat-mdc-form-field.mat-form-field-disabled .ui-date-picker-toggle{opacity:.5}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
122
+ `, isInline: true, styles: [":host{display:inline-block}:host ::ng-deep .mat-mdc-form-field{--mat-form-field-container-height: 2.25rem;--mat-form-field-container-vertical-padding: 0;--mat-form-field-filled-with-label-container-padding-top: 0;--mat-form-field-filled-with-label-container-padding-bottom: 0;--mdc-outlined-text-field-container-shape: calc(var(--radius) - .125rem);--mdc-outlined-text-field-outline-color: hsl(var(--input));--mdc-outlined-text-field-hover-outline-color: hsl(var(--input));--mdc-outlined-text-field-focus-outline-color: hsl(var(--ring));--mdc-outlined-text-field-input-text-color: hsl(var(--foreground));--mdc-outlined-text-field-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-hover-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-focus-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-disabled-outline-color: hsl(var(--input) / .5);--mdc-outlined-text-field-disabled-input-text-color: hsl(var(--muted-foreground));width:100%;font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-text-field-wrapper{height:2.25rem;padding:0 .25rem 0 .75rem;background:transparent}:host ::ng-deep .mat-mdc-form-field-flex{height:2.25rem;align-items:center}:host ::ng-deep .mat-mdc-form-field-infix{display:flex;min-height:2.25rem;height:2.25rem;align-items:center;padding:0;width:auto}:host ::ng-deep .mat-mdc-form-field-icon-suffix{align-self:center;padding-right:.25rem!important;padding-left:.25rem!important;color:hsl(var(--muted-foreground))}.ui-date-picker-toggle{display:inline-flex;width:1.75rem;height:1.75rem;align-items:center;justify-content:center;color:hsl(var(--muted-foreground));border-radius:calc(var(--radius) - .125rem);transition:color .15s ease,background-color .15s ease}.ui-date-picker-toggle:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.ui-date-picker-toggle:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.ui-date-picker-toggle:disabled{cursor:not-allowed;opacity:.5}.ui-date-picker-toggle svg{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-input-element{font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-input-element::placeholder{color:hsl(var(--muted-foreground))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mdc-floating-label,:host ::ng-deep .mat-mdc-floating-label,:host ::ng-deep .mdc-notched-outline__notch .mdc-floating-label{display:none}:host ::ng-deep .mdc-notched-outline__notch{padding:0;border-left:none;border-right:none}:host ::ng-deep .mat-mdc-form-field.mat-focused .ui-date-picker-toggle{color:hsl(var(--foreground))}:host ::ng-deep .mat-mdc-form-field.mat-form-field-disabled .ui-date-picker-toggle{opacity:.5}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
108
123
  }
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: DatePickerComponent, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: DatePickerComponent, decorators: [{
110
125
  type: Component,
111
126
  args: [{ selector: 'ui-date-picker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ReactiveFormsModule, MatFormField, MatSuffix, MatInput, MatDatepicker, MatDatepickerInput], host: { '[class]': 'classes()' }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true }], template: `
112
127
  <mat-form-field class="ui-date-picker w-full" appearance="outline" subscriptSizing="dynamic">