@ojiepermana/angular 21.2.4 → 21.3.3

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 (345) hide show
  1. package/README.md +155 -12
  2. package/component/accordion/package.json +4 -0
  3. package/component/alert/package.json +4 -0
  4. package/component/alert-dialog/package.json +4 -0
  5. package/component/aspect-ratio/package.json +4 -0
  6. package/component/avatar/package.json +4 -0
  7. package/component/badge/package.json +4 -0
  8. package/component/breadcrumb/package.json +4 -0
  9. package/component/button/package.json +4 -0
  10. package/component/button-group/package.json +4 -0
  11. package/component/calendar/package.json +4 -0
  12. package/component/card/package.json +4 -0
  13. package/component/carousel/package.json +4 -0
  14. package/component/chart/README.md +249 -0
  15. package/component/chart/area/package.json +4 -0
  16. package/component/chart/bar/package.json +4 -0
  17. package/component/chart/line/package.json +4 -0
  18. package/component/chart/package.json +4 -0
  19. package/component/chart/pie/package.json +4 -0
  20. package/component/chart/radar/package.json +4 -0
  21. package/component/chart/radial/package.json +4 -0
  22. package/component/chart/scatter/package.json +4 -0
  23. package/component/checkbox/package.json +4 -0
  24. package/component/collapsible/package.json +4 -0
  25. package/component/combobox/package.json +4 -0
  26. package/component/command/package.json +4 -0
  27. package/component/context-menu/package.json +4 -0
  28. package/component/date-picker/package.json +4 -0
  29. package/component/dialog/package.json +4 -0
  30. package/component/drawer/package.json +4 -0
  31. package/component/dropdown-menu/package.json +4 -0
  32. package/component/form/package.json +4 -0
  33. package/component/input/package.json +4 -0
  34. package/component/input-group/package.json +4 -0
  35. package/component/item/package.json +4 -0
  36. package/component/label/package.json +4 -0
  37. package/component/pagination/package.json +4 -0
  38. package/component/popover/package.json +4 -0
  39. package/component/progress/package.json +4 -0
  40. package/component/radio/package.json +4 -0
  41. package/component/scroll-area/package.json +4 -0
  42. package/component/select/package.json +4 -0
  43. package/component/separator/package.json +4 -0
  44. package/component/sheet/package.json +4 -0
  45. package/component/skeleton/package.json +4 -0
  46. package/component/slider/package.json +4 -0
  47. package/component/switch/package.json +4 -0
  48. package/component/table/package.json +4 -0
  49. package/component/tabs/package.json +4 -0
  50. package/component/textarea/package.json +4 -0
  51. package/component/toast/package.json +4 -0
  52. package/component/tooltip/package.json +4 -0
  53. package/component/utils/package.json +4 -0
  54. package/fesm2022/ojiepermana-angular-component-accordion.mjs +174 -0
  55. package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -0
  56. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +242 -0
  57. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -0
  58. package/fesm2022/ojiepermana-angular-component-alert.mjs +90 -0
  59. package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -0
  60. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +33 -0
  61. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -0
  62. package/fesm2022/ojiepermana-angular-component-avatar.mjs +123 -0
  63. package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -0
  64. package/fesm2022/ojiepermana-angular-component-badge.mjs +47 -0
  65. package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -0
  66. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +186 -0
  67. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -0
  68. package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -0
  69. package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -0
  70. package/fesm2022/ojiepermana-angular-component-button.mjs +64 -0
  71. package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -0
  72. package/fesm2022/ojiepermana-angular-component-calendar.mjs +78 -0
  73. package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -0
  74. package/fesm2022/ojiepermana-angular-component-card.mjs +137 -0
  75. package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -0
  76. package/fesm2022/ojiepermana-angular-component-carousel.mjs +310 -0
  77. package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -0
  78. package/fesm2022/ojiepermana-angular-component-chart-area.mjs +6 -0
  79. package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +1 -0
  80. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs +6 -0
  81. package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +1 -0
  82. package/fesm2022/ojiepermana-angular-component-chart-line.mjs +6 -0
  83. package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +1 -0
  84. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs +6 -0
  85. package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +1 -0
  86. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs +6 -0
  87. package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +1 -0
  88. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs +6 -0
  89. package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +1 -0
  90. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs +6 -0
  91. package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +1 -0
  92. package/fesm2022/{ojiepermana-angular-chart.mjs → ojiepermana-angular-component-chart.mjs} +2 -2
  93. package/fesm2022/ojiepermana-angular-component-chart.mjs.map +1 -0
  94. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +104 -0
  95. package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -0
  96. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +116 -0
  97. package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -0
  98. package/fesm2022/ojiepermana-angular-component-combobox.mjs +263 -0
  99. package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -0
  100. package/fesm2022/ojiepermana-angular-component-command.mjs +268 -0
  101. package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -0
  102. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +100 -0
  103. package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -0
  104. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +155 -0
  105. package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -0
  106. package/fesm2022/ojiepermana-angular-component-dialog.mjs +262 -0
  107. package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -0
  108. package/fesm2022/ojiepermana-angular-component-drawer.mjs +6 -0
  109. package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -0
  110. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +458 -0
  111. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -0
  112. package/fesm2022/ojiepermana-angular-component-form.mjs +208 -0
  113. package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -0
  114. package/fesm2022/ojiepermana-angular-component-input-group.mjs +164 -0
  115. package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -0
  116. package/fesm2022/ojiepermana-angular-component-input.mjs +43 -0
  117. package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -0
  118. package/fesm2022/ojiepermana-angular-component-item.mjs +241 -0
  119. package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -0
  120. package/fesm2022/ojiepermana-angular-component-label.mjs +30 -0
  121. package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -0
  122. package/fesm2022/ojiepermana-angular-component-pagination.mjs +192 -0
  123. package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -0
  124. package/fesm2022/ojiepermana-angular-component-popover.mjs +163 -0
  125. package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -0
  126. package/fesm2022/ojiepermana-angular-component-progress.mjs +53 -0
  127. package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -0
  128. package/fesm2022/ojiepermana-angular-component-radio.mjs +92 -0
  129. package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -0
  130. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +48 -0
  131. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -0
  132. package/fesm2022/ojiepermana-angular-component-select.mjs +131 -0
  133. package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -0
  134. package/fesm2022/ojiepermana-angular-component-separator.mjs +33 -0
  135. package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -0
  136. package/fesm2022/ojiepermana-angular-component-sheet.mjs +235 -0
  137. package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -0
  138. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +29 -0
  139. package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -0
  140. package/fesm2022/ojiepermana-angular-component-slider.mjs +29 -0
  141. package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -0
  142. package/fesm2022/ojiepermana-angular-component-switch.mjs +84 -0
  143. package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -0
  144. package/fesm2022/ojiepermana-angular-component-table.mjs +139 -0
  145. package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -0
  146. package/fesm2022/ojiepermana-angular-component-tabs.mjs +252 -0
  147. package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -0
  148. package/fesm2022/ojiepermana-angular-component-textarea.mjs +37 -0
  149. package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -0
  150. package/fesm2022/ojiepermana-angular-component-toast.mjs +47 -0
  151. package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -0
  152. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +56 -0
  153. package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -0
  154. package/fesm2022/ojiepermana-angular-component-utils.mjs +13 -0
  155. package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -0
  156. package/fesm2022/ojiepermana-angular-generator-api.mjs +2 -1
  157. package/fesm2022/ojiepermana-angular-generator-api.mjs.map +1 -1
  158. package/fesm2022/ojiepermana-angular-layout-component.mjs +581 -0
  159. package/fesm2022/ojiepermana-angular-layout-component.mjs.map +1 -0
  160. package/fesm2022/ojiepermana-angular-layout-empty.mjs +49 -0
  161. package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +1 -0
  162. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs +119 -0
  163. package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +1 -0
  164. package/fesm2022/ojiepermana-angular-layout-provider.mjs +21 -0
  165. package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +1 -0
  166. package/fesm2022/ojiepermana-angular-layout-services.mjs +114 -0
  167. package/fesm2022/ojiepermana-angular-layout-services.mjs.map +1 -0
  168. package/fesm2022/ojiepermana-angular-layout-shell.mjs +48 -0
  169. package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +1 -0
  170. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +27 -0
  171. package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +1 -0
  172. package/fesm2022/ojiepermana-angular-layout-token.mjs +33 -0
  173. package/fesm2022/ojiepermana-angular-layout-token.mjs.map +1 -0
  174. package/fesm2022/ojiepermana-angular-layout-vertical.mjs +113 -0
  175. package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +1 -0
  176. package/fesm2022/ojiepermana-angular-layout.mjs +141 -137
  177. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  178. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +334 -0
  179. package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +1 -0
  180. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +59 -0
  181. package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +1 -0
  182. package/fesm2022/ojiepermana-angular-navigation-item.mjs +548 -0
  183. package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +1 -0
  184. package/fesm2022/ojiepermana-angular-navigation-service.mjs +204 -0
  185. package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +1 -0
  186. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +373 -0
  187. package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +1 -0
  188. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +433 -0
  189. package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +1 -0
  190. package/fesm2022/ojiepermana-angular-navigation-types.mjs +4 -0
  191. package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +1 -0
  192. package/fesm2022/ojiepermana-angular-theme-provider.mjs +35 -0
  193. package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +1 -0
  194. package/fesm2022/ojiepermana-angular-theme-services.mjs +286 -0
  195. package/fesm2022/ojiepermana-angular-theme-services.mjs.map +1 -0
  196. package/fesm2022/ojiepermana-angular-theme-token.mjs +56 -0
  197. package/fesm2022/ojiepermana-angular-theme-token.mjs.map +1 -0
  198. package/fesm2022/ojiepermana-angular-theme.mjs +31 -56
  199. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
  200. package/fesm2022/ojiepermana-angular.mjs +7 -6
  201. package/fesm2022/ojiepermana-angular.mjs.map +1 -1
  202. package/generator/api/README.md +18 -15
  203. package/generator/api/bin/schematics/init/index.js +4 -2
  204. package/generator/api/bin/src/config/schema.js +2 -1
  205. package/generator/api/bin/src/emit/navigation.js +1 -1
  206. package/generator/api/bin/src/layout/per-domain.js +7 -3
  207. package/generator/api/sdk.config.example.json +4 -2
  208. package/layout/component/package.json +4 -0
  209. package/layout/empty/package.json +4 -0
  210. package/layout/horizontal/package.json +4 -0
  211. package/layout/provider/package.json +4 -0
  212. package/layout/services/package.json +4 -0
  213. package/layout/shell/package.json +4 -0
  214. package/layout/token/directive/package.json +4 -0
  215. package/layout/token/package.json +4 -0
  216. package/layout/vertical/package.json +4 -0
  217. package/navigation/demo-data/package.json +4 -0
  218. package/navigation/icon/package.json +4 -0
  219. package/navigation/item/package.json +4 -0
  220. package/navigation/service/package.json +4 -0
  221. package/navigation/sidebar/package.json +4 -0
  222. package/navigation/topbar/package.json +4 -0
  223. package/navigation/types/package.json +4 -0
  224. package/package.json +284 -16
  225. package/theme/README.md +67 -0
  226. package/theme/provider/package.json +4 -0
  227. package/theme/services/package.json +4 -0
  228. package/theme/styles/index.css +12 -7
  229. package/theme/token/package.json +4 -0
  230. package/types/ojiepermana-angular-component-accordion.d.ts +51 -0
  231. package/types/ojiepermana-angular-component-alert-dialog.d.ts +93 -0
  232. package/types/ojiepermana-angular-component-alert.d.ts +37 -0
  233. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -0
  234. package/types/ojiepermana-angular-component-avatar.d.ts +51 -0
  235. package/types/ojiepermana-angular-component-badge.d.ts +19 -0
  236. package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -0
  237. package/types/ojiepermana-angular-component-button-group.d.ts +26 -0
  238. package/types/ojiepermana-angular-component-button.d.ts +22 -0
  239. package/types/ojiepermana-angular-component-calendar.d.ts +33 -0
  240. package/types/ojiepermana-angular-component-card.d.ts +60 -0
  241. package/types/ojiepermana-angular-component-carousel.d.ts +86 -0
  242. package/types/ojiepermana-angular-component-chart-area.d.ts +1 -0
  243. package/types/ojiepermana-angular-component-chart-bar.d.ts +1 -0
  244. package/types/ojiepermana-angular-component-chart-line.d.ts +1 -0
  245. package/types/ojiepermana-angular-component-chart-pie.d.ts +1 -0
  246. package/types/ojiepermana-angular-component-chart-radar.d.ts +1 -0
  247. package/types/ojiepermana-angular-component-chart-radial.d.ts +1 -0
  248. package/types/ojiepermana-angular-component-chart-scatter.d.ts +1 -0
  249. package/types/{ojiepermana-angular-chart.d.ts → ojiepermana-angular-component-chart.d.ts} +15 -15
  250. package/types/ojiepermana-angular-component-checkbox.d.ts +35 -0
  251. package/types/ojiepermana-angular-component-collapsible.d.ts +42 -0
  252. package/types/ojiepermana-angular-component-combobox.d.ts +51 -0
  253. package/types/ojiepermana-angular-component-command.d.ts +99 -0
  254. package/types/ojiepermana-angular-component-context-menu.d.ts +35 -0
  255. package/types/ojiepermana-angular-component-date-picker.d.ts +41 -0
  256. package/types/ojiepermana-angular-component-dialog.d.ts +87 -0
  257. package/types/ojiepermana-angular-component-drawer.d.ts +1 -0
  258. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +135 -0
  259. package/types/ojiepermana-angular-component-form.d.ts +92 -0
  260. package/types/ojiepermana-angular-component-input-group.d.ts +51 -0
  261. package/types/ojiepermana-angular-component-input.d.ts +16 -0
  262. package/types/ojiepermana-angular-component-item.d.ts +88 -0
  263. package/types/ojiepermana-angular-component-label.d.ts +11 -0
  264. package/types/ojiepermana-angular-component-pagination.d.ts +27 -0
  265. package/types/ojiepermana-angular-component-popover.d.ts +43 -0
  266. package/types/ojiepermana-angular-component-progress.d.ts +17 -0
  267. package/types/ojiepermana-angular-component-radio.d.ts +34 -0
  268. package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -0
  269. package/types/ojiepermana-angular-component-select.d.ts +45 -0
  270. package/types/ojiepermana-angular-component-separator.d.ts +14 -0
  271. package/types/ojiepermana-angular-component-sheet.d.ts +74 -0
  272. package/types/ojiepermana-angular-component-skeleton.d.ts +10 -0
  273. package/types/ojiepermana-angular-component-slider.d.ts +16 -0
  274. package/types/ojiepermana-angular-component-switch.d.ts +30 -0
  275. package/types/ojiepermana-angular-component-table.d.ts +52 -0
  276. package/types/ojiepermana-angular-component-tabs.d.ts +92 -0
  277. package/types/ojiepermana-angular-component-textarea.d.ts +12 -0
  278. package/types/ojiepermana-angular-component-toast.d.ts +29 -0
  279. package/types/ojiepermana-angular-component-tooltip.d.ts +22 -0
  280. package/types/ojiepermana-angular-component-utils.d.ts +5 -0
  281. package/types/ojiepermana-angular-generator-api.d.ts +2 -1
  282. package/types/ojiepermana-angular-layout-component.d.ts +205 -0
  283. package/types/ojiepermana-angular-layout-empty.d.ts +22 -0
  284. package/types/ojiepermana-angular-layout-horizontal.d.ts +36 -0
  285. package/types/ojiepermana-angular-layout-provider.d.ts +6 -0
  286. package/types/ojiepermana-angular-layout-services.d.ts +25 -0
  287. package/types/ojiepermana-angular-layout-shell.d.ts +8 -0
  288. package/types/ojiepermana-angular-layout-token-directive.d.ts +13 -0
  289. package/types/ojiepermana-angular-layout-token.d.ts +36 -0
  290. package/types/ojiepermana-angular-layout-vertical.d.ts +38 -0
  291. package/types/ojiepermana-angular-layout.d.ts +27 -26
  292. package/types/ojiepermana-angular-navigation-demo-data.d.ts +5 -0
  293. package/types/ojiepermana-angular-navigation-icon.d.ts +17 -0
  294. package/types/ojiepermana-angular-navigation-item.d.ts +54 -0
  295. package/types/ojiepermana-angular-navigation-service.d.ts +77 -0
  296. package/types/ojiepermana-angular-navigation-sidebar.d.ts +75 -0
  297. package/types/ojiepermana-angular-navigation-topbar.d.ts +54 -0
  298. package/types/ojiepermana-angular-navigation-types.d.ts +129 -0
  299. package/types/ojiepermana-angular-theme-provider.d.ts +11 -0
  300. package/types/ojiepermana-angular-theme-services.d.ts +55 -0
  301. package/types/ojiepermana-angular-theme-token.d.ts +57 -0
  302. package/types/ojiepermana-angular-theme.d.ts +11 -66
  303. package/chart/README.md +0 -0
  304. package/chart/package.json +0 -4
  305. package/component/package.json +0 -4
  306. package/fesm2022/ojiepermana-angular-chart.mjs.map +0 -1
  307. package/fesm2022/ojiepermana-angular-component.mjs +0 -5774
  308. package/fesm2022/ojiepermana-angular-component.mjs.map +0 -1
  309. package/fesm2022/ojiepermana-angular-navigation.mjs +0 -2369
  310. package/fesm2022/ojiepermana-angular-navigation.mjs.map +0 -1
  311. package/navigation/package.json +0 -4
  312. package/types/ojiepermana-angular-component.d.ts +0 -1927
  313. package/types/ojiepermana-angular-navigation.d.ts +0 -393
  314. /package/theme/styles/{themes/library/_components.css → foundation/components.css} +0 -0
  315. /package/theme/styles/{themes/library/_layers.css → foundation/layers.css} +0 -0
  316. /package/theme/styles/{themes/library/_tokens.css → foundation/tokens.css} +0 -0
  317. /package/theme/styles/{themes/library/_material-overrides.css → integrations/material.css} +0 -0
  318. /package/theme/styles/{themes → integrations}/tailwind.css +0 -0
  319. /package/theme/styles/{themes/library → variants}/color/amber.css +0 -0
  320. /package/theme/styles/{themes/library → variants}/color/base.css +0 -0
  321. /package/theme/styles/{themes/library → variants}/color/blue.css +0 -0
  322. /package/theme/styles/{themes/library → variants}/color/cyan.css +0 -0
  323. /package/theme/styles/{themes/library → variants}/color/emerald.css +0 -0
  324. /package/theme/styles/{themes/library → variants}/color/fuchsia.css +0 -0
  325. /package/theme/styles/{themes/library → variants}/color/green.css +0 -0
  326. /package/theme/styles/{themes/library → variants}/color/index.css +0 -0
  327. /package/theme/styles/{themes/library → variants}/color/indigo.css +0 -0
  328. /package/theme/styles/{themes/library → variants}/color/lime.css +0 -0
  329. /package/theme/styles/{themes/library → variants}/color/orange.css +0 -0
  330. /package/theme/styles/{themes/library → variants}/color/pink.css +0 -0
  331. /package/theme/styles/{themes/library → variants}/color/purple.css +0 -0
  332. /package/theme/styles/{themes/library → variants}/color/red.css +0 -0
  333. /package/theme/styles/{themes/library → variants}/color/rose.css +0 -0
  334. /package/theme/styles/{themes/library → variants}/color/sky.css +0 -0
  335. /package/theme/styles/{themes/library → variants}/color/teal.css +0 -0
  336. /package/theme/styles/{themes/library → variants}/color/violet.css +0 -0
  337. /package/theme/styles/{themes/library → variants}/color/yellow.css +0 -0
  338. /package/theme/styles/{themes → variants}/mode/dark.css +0 -0
  339. /package/theme/styles/{themes → variants}/mode/index.css +0 -0
  340. /package/theme/styles/{themes → variants}/mode/light.css +0 -0
  341. /package/theme/styles/{themes/library → variants}/style/brutal.css +0 -0
  342. /package/theme/styles/{themes/library → variants}/style/default.css +0 -0
  343. /package/theme/styles/{themes/library → variants}/style/index.css +0 -0
  344. /package/theme/styles/{themes/library → variants}/style/sharp.css +0 -0
  345. /package/theme/styles/{themes/library → variants}/style/soft.css +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-select.mjs","sources":["../../../projects/angular/component/select/src/lib/select.component.ts","../../../projects/angular/component/select/src/lib/option.component.ts","../../../projects/angular/component/select/ojiepermana-angular-component-select.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatFormField } from '@angular/material/form-field';\nimport { MatSelect, MatSelectChange } from '@angular/material/select';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n@Component({\n selector: 'ui-select',\n imports: [MatFormField, MatSelect],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectComponent), multi: true }],\n template: `\n <mat-form-field [class]=\"classes()\" subscriptSizing=\"dynamic\">\n <mat-select\n #ref\n disableRipple\n panelClass=\"ui-select-panel\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [multiple]=\"multiple()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n (selectionChange)=\"handleChange($event)\"\n (openedChange)=\"openedChange.emit($event)\">\n <ng-content />\n </mat-select>\n </mat-form-field>\n `,\n styleUrl: './select.component.css',\n})\nexport class SelectComponent implements ControlValueAccessor {\n readonly placeholder = input<string>('');\n readonly multiple = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly class = input<string>('');\n\n readonly valueChange = output<unknown>();\n readonly openedChange = output<boolean>();\n\n private readonly ref = viewChild.required<MatSelect>('ref');\n\n protected readonly value = signal<unknown>(null);\n protected readonly disabled = signal<boolean>(false);\n protected readonly classes = computed(() => cn('ui-select-field w-full', this.class()));\n\n private onChange: (v: unknown) => void = () => {};\n private onTouched: () => void = () => {};\n\n protected handleChange(e: MatSelectChange): void {\n this.value.set(e.value);\n this.onChange(e.value);\n this.onTouched();\n this.valueChange.emit(e.value);\n }\n\n open(): void {\n this.ref().open();\n }\n\n close(): void {\n this.ref().close();\n }\n\n focus(): void {\n this.ref().focus();\n }\n\n writeValue(v: unknown): void {\n this.value.set(v);\n }\n registerOnChange(fn: (v: unknown) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(d: boolean): void {\n this.disabled.set(d);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatOption } from '@angular/material/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n/**\n * Option for `<ui-select>`. Wraps `mat-option` so the underlying `mat-select`\n * can still discover it via `@ContentChildren(MatOption, { descendants: true })`.\n */\n@Component({\n selector: 'ui-option',\n imports: [MatOption],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `\n <mat-option [value]=\"value()\" [disabled]=\"disabled()\">\n <ng-content />\n </mat-option>\n `,\n})\nexport class OptionComponent {\n readonly value = input.required<unknown>();\n readonly disabled = input<boolean>(false);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('contents', this.class()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAyCa,eAAe,CAAA;AACjB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;AAC/B,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;AAChC,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;IAChC,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;IAC/D,cAAc,GAAG,KAAK,CAAgB,IAAI,sFAAI,KAAK,EAAE,iBAAiB,EAAA,CAAG;AACzE,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;IAEzB,WAAW,GAAG,MAAM,EAAW;IAC/B,YAAY,GAAG,MAAM,EAAW;AAExB,IAAA,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAY,KAAK,CAAC;AAExC,I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AA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EANhB;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAPS,SAAS,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,IAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FASR,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;oBACrB,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AAChC,oBAAA,QAAQ,EAAE;;;;AAIT,EAAA,CAAA;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
@@ -0,0 +1,33 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { cn } from '@ojiepermana/angular/component/utils';
4
+
5
+ class SeparatorComponent {
6
+ orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
7
+ decorative = input(true, ...(ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []));
8
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
9
+ classes = computed(() => cn('shrink-0 bg-border', this.orientation() === 'horizontal' ? 'h-px w-full' : 'h-full w-px', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SeparatorComponent, isStandalone: true, selector: "ui-separator", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "decorative() ? \"none\" : \"separator\"", "attr.aria-orientation": "decorative() ? null : orientation()", "attr.data-orientation": "orientation()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SeparatorComponent, decorators: [{
14
+ type: Component,
15
+ args: [{
16
+ selector: 'ui-separator',
17
+ changeDetection: ChangeDetectionStrategy.OnPush,
18
+ host: {
19
+ '[class]': 'classes()',
20
+ '[attr.role]': 'decorative() ? "none" : "separator"',
21
+ '[attr.aria-orientation]': 'decorative() ? null : orientation()',
22
+ '[attr.data-orientation]': 'orientation()',
23
+ },
24
+ template: '',
25
+ }]
26
+ }], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
27
+
28
+ /**
29
+ * Generated bundle index. Do not edit.
30
+ */
31
+
32
+ export { SeparatorComponent };
33
+ //# sourceMappingURL=ojiepermana-angular-component-separator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-separator.mjs","sources":["../../../projects/angular/component/separator/src/lib/separator.component.ts","../../../projects/angular/component/separator/ojiepermana-angular-component-separator.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\nexport type SeparatorOrientation = 'horizontal' | 'vertical';\n\n@Component({\n selector: 'ui-separator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.role]': 'decorative() ? \"none\" : \"separator\"',\n '[attr.aria-orientation]': 'decorative() ? null : orientation()',\n '[attr.data-orientation]': 'orientation()',\n },\n template: '',\n})\nexport class SeparatorComponent {\n readonly orientation = input<SeparatorOrientation>('horizontal');\n readonly decorative = input<boolean>(true);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('shrink-0 bg-border', this.orientation() === 'horizontal' ? 'h-px w-full' : 'h-full w-px', this.class()),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAgBa,kBAAkB,CAAA;AACpB,IAAA,WAAW,GAAG,KAAK,CAAuB,YAAY,kFAAC;AACvD,IAAA,UAAU,GAAG,KAAK,CAAU,IAAI,iFAAC;AACjC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAEf,IAAA,OAAO,GAAG,QAAQ,CAAC,MACpC,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,YAAY,GAAG,aAAa,GAAG,aAAa,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,8EAC5G;wGAPU,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,+qBAFnB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAED,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;oBACxB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,aAAa,EAAE,qCAAqC;AACpD,wBAAA,yBAAyB,EAAE,qCAAqC;AAChE,wBAAA,yBAAyB,EAAE,eAAe;AAC3C,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACfD;;AAEG;;;;"}
@@ -0,0 +1,235 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ViewContainerRef, DestroyRef, ElementRef, model, input, output, viewChild, computed, effect, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
3
+ import { Overlay } from '@angular/cdk/overlay';
4
+ import { TemplatePortal } from '@angular/cdk/portal';
5
+ import { FocusTrapFactory } from '@angular/cdk/a11y';
6
+ import { DOCUMENT } from '@angular/common';
7
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
+ import { filter } from 'rxjs/operators';
9
+ import { cn } from '@ojiepermana/angular/component/utils';
10
+
11
+ const SIDE_BASE = {
12
+ top: 'inset-x-0 top-0 border-b border-border',
13
+ bottom: 'inset-x-0 bottom-0 border-t border-border',
14
+ left: 'inset-y-0 left-0 h-full w-3/4 border-r border-border sm:max-w-sm',
15
+ right: 'inset-y-0 right-0 h-full w-3/4 border-l border-border sm:max-w-sm',
16
+ };
17
+ const DRAWER_SIDE_CLASSES = {
18
+ top: 'max-h-[85vh] rounded-b-lg',
19
+ bottom: 'max-h-[85vh] rounded-t-lg',
20
+ left: 'rounded-r-lg',
21
+ right: 'rounded-l-lg',
22
+ };
23
+ const SIDE_ENTER_FROM = {
24
+ top: 'translateY(-100%)',
25
+ bottom: 'translateY(100%)',
26
+ left: 'translateX(-100%)',
27
+ right: 'translateX(100%)',
28
+ };
29
+ class SheetComponent {
30
+ overlay = inject(Overlay);
31
+ vcr = inject(ViewContainerRef);
32
+ trapFactory = inject(FocusTrapFactory);
33
+ doc = inject(DOCUMENT);
34
+ destroyRef = inject(DestroyRef);
35
+ host = inject((ElementRef));
36
+ open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
37
+ side = input(undefined, ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
38
+ closeOnEscape = input(true, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
39
+ closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : /* istanbul ignore next */ []));
40
+ labelledBy = input(null, { ...(ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
41
+ describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
42
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
43
+ openedChange = output();
44
+ tpl = viewChild.required('tpl');
45
+ overlayRef = null;
46
+ focusTrap = null;
47
+ previousFocus = null;
48
+ resolvedSide = computed(() => this.side() ?? (this.isDrawerHost() ? 'bottom' : 'right'), ...(ngDevMode ? [{ debugName: "resolvedSide" }] : /* istanbul ignore next */ []));
49
+ surfaceClasses = computed(() => cn('gap-4 p-6 flex flex-col', SIDE_BASE[this.resolvedSide()], this.isDrawerHost() ? DRAWER_SIDE_CLASSES[this.resolvedSide()] : '', this.class()), ...(ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []));
50
+ enterFrom = computed(() => SIDE_ENTER_FROM[this.resolvedSide()], ...(ngDevMode ? [{ debugName: "enterFrom" }] : /* istanbul ignore next */ []));
51
+ constructor() {
52
+ effect(() => {
53
+ this.open() ? this.attach() : this.detach();
54
+ });
55
+ }
56
+ attach() {
57
+ if (this.overlayRef)
58
+ return;
59
+ this.previousFocus = this.doc.activeElement;
60
+ this.overlayRef = this.overlay.create({
61
+ hasBackdrop: true,
62
+ backdropClass: 'ui-dialog-backdrop',
63
+ panelClass: 'ui-sheet-panel',
64
+ scrollStrategy: this.overlay.scrollStrategies.block(),
65
+ positionStrategy: this.overlay.position().global(),
66
+ });
67
+ const portal = new TemplatePortal(this.tpl(), this.vcr);
68
+ this.overlayRef.attach(portal);
69
+ this.focusTrap = this.trapFactory.create(this.overlayRef.hostElement);
70
+ this.focusTrap.focusInitialElementWhenReady();
71
+ if (this.closeOnBackdropClick()) {
72
+ this.overlayRef
73
+ .backdropClick()
74
+ .pipe(takeUntilDestroyed(this.destroyRef))
75
+ .subscribe(() => this.open.set(false));
76
+ }
77
+ this.overlayRef
78
+ .keydownEvents()
79
+ .pipe(takeUntilDestroyed(this.destroyRef), filter((e) => e.key === 'Escape' && this.closeOnEscape()))
80
+ .subscribe((e) => {
81
+ e.preventDefault();
82
+ this.open.set(false);
83
+ });
84
+ this.openedChange.emit(true);
85
+ }
86
+ detach() {
87
+ if (!this.overlayRef)
88
+ return;
89
+ this.focusTrap?.destroy();
90
+ this.focusTrap = null;
91
+ this.overlayRef.dispose();
92
+ this.overlayRef = null;
93
+ this.previousFocus?.focus?.();
94
+ this.openedChange.emit(false);
95
+ }
96
+ close() {
97
+ this.open.set(false);
98
+ }
99
+ isDrawerHost() {
100
+ return this.host.nativeElement.localName === 'ui-drawer';
101
+ }
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
103
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.14", type: SheetComponent, isStandalone: true, selector: "ui-sheet, ui-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
104
+ <ng-template #tpl>
105
+ <div
106
+ class="ui-sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
107
+ role="dialog"
108
+ aria-modal="true"
109
+ [attr.aria-labelledby]="labelledBy()"
110
+ [attr.aria-describedby]="describedBy()"
111
+ [class]="surfaceClasses()"
112
+ [style.--ui-sheet-from]="enterFrom()">
113
+ <ng-content />
114
+ </div>
115
+ </ng-template>
116
+ `, isInline: true, styles: [".ui-sheet-surface{animation:ui-sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes ui-sheet-in{0%{transform:var(--ui-sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.ui-sheet-surface{animation-duration:0ms}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetComponent, decorators: [{
119
+ type: Component,
120
+ args: [{ selector: 'ui-sheet, ui-drawer', changeDetection: ChangeDetectionStrategy.OnPush, template: `
121
+ <ng-template #tpl>
122
+ <div
123
+ class="ui-sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
124
+ role="dialog"
125
+ aria-modal="true"
126
+ [attr.aria-labelledby]="labelledBy()"
127
+ [attr.aria-describedby]="describedBy()"
128
+ [class]="surfaceClasses()"
129
+ [style.--ui-sheet-from]="enterFrom()">
130
+ <ng-content />
131
+ </div>
132
+ </ng-template>
133
+ `, styles: [".ui-sheet-surface{animation:ui-sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes ui-sheet-in{0%{transform:var(--ui-sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.ui-sheet-surface{animation-duration:0ms}}\n"] }]
134
+ }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
135
+
136
+ class SheetCloseDirective {
137
+ sheet = inject(SheetComponent);
138
+ closeSheet() {
139
+ this.sheet.close();
140
+ }
141
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
142
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: SheetCloseDirective, isStandalone: true, selector: "button[ui-sheet-close], a[ui-sheet-close], button[ui-drawer-close], a[ui-drawer-close]", host: { listeners: { "click": "closeSheet()" } }, ngImport: i0 });
143
+ }
144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetCloseDirective, decorators: [{
145
+ type: Directive,
146
+ args: [{
147
+ selector: 'button[ui-sheet-close], a[ui-sheet-close], button[ui-drawer-close], a[ui-drawer-close]',
148
+ host: {
149
+ '(click)': 'closeSheet()',
150
+ },
151
+ }]
152
+ }] });
153
+
154
+ class SheetHeaderComponent {
155
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
156
+ classes = computed(() => cn('flex flex-col gap-2 text-center sm:text-left', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
157
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SheetHeaderComponent, isStandalone: true, selector: "ui-sheet-header, ui-drawer-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
159
+ }
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetHeaderComponent, decorators: [{
161
+ type: Component,
162
+ args: [{
163
+ selector: 'ui-sheet-header, ui-drawer-header',
164
+ changeDetection: ChangeDetectionStrategy.OnPush,
165
+ host: { '[class]': 'classes()' },
166
+ template: `<ng-content />`,
167
+ }]
168
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
169
+ class SheetTitleComponent {
170
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
171
+ classes = computed(() => cn('text-lg font-semibold text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SheetTitleComponent, isStandalone: true, selector: "ui-sheet-title, ui-drawer-title, h2[ui-sheet-title], h2[ui-drawer-title]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
174
+ }
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetTitleComponent, decorators: [{
176
+ type: Component,
177
+ args: [{
178
+ selector: 'ui-sheet-title, ui-drawer-title, h2[ui-sheet-title], h2[ui-drawer-title]',
179
+ changeDetection: ChangeDetectionStrategy.OnPush,
180
+ host: { '[class]': 'classes()' },
181
+ template: `<ng-content />`,
182
+ }]
183
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
184
+ class SheetDescriptionComponent {
185
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
186
+ classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
188
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SheetDescriptionComponent, isStandalone: true, selector: "ui-sheet-description, ui-drawer-description, p[ui-sheet-description], p[ui-drawer-description]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
189
+ }
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetDescriptionComponent, decorators: [{
191
+ type: Component,
192
+ args: [{
193
+ selector: 'ui-sheet-description, ui-drawer-description, p[ui-sheet-description], p[ui-drawer-description]',
194
+ changeDetection: ChangeDetectionStrategy.OnPush,
195
+ host: { '[class]': 'classes()' },
196
+ template: `<ng-content />`,
197
+ }]
198
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
199
+ class SheetContentComponent {
200
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
201
+ classes = computed(() => cn('flex-1 overflow-auto', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
202
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
203
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SheetContentComponent, isStandalone: true, selector: "ui-sheet-content, ui-drawer-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
204
+ }
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetContentComponent, decorators: [{
206
+ type: Component,
207
+ args: [{
208
+ selector: 'ui-sheet-content, ui-drawer-content',
209
+ changeDetection: ChangeDetectionStrategy.OnPush,
210
+ host: { '[class]': 'classes()' },
211
+ template: `<ng-content />`,
212
+ }]
213
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
214
+ class SheetFooterComponent {
215
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
216
+ classes = computed(() => cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
217
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
218
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SheetFooterComponent, isStandalone: true, selector: "ui-sheet-footer, ui-drawer-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
219
+ }
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SheetFooterComponent, decorators: [{
221
+ type: Component,
222
+ args: [{
223
+ selector: 'ui-sheet-footer, ui-drawer-footer',
224
+ changeDetection: ChangeDetectionStrategy.OnPush,
225
+ host: { '[class]': 'classes()' },
226
+ template: `<ng-content />`,
227
+ }]
228
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
229
+
230
+ /**
231
+ * Generated bundle index. Do not edit.
232
+ */
233
+
234
+ export { SheetCloseDirective, SheetComponent, SheetContentComponent, SheetDescriptionComponent, SheetFooterComponent, SheetHeaderComponent, SheetTitleComponent };
235
+ //# sourceMappingURL=ojiepermana-angular-component-sheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-sheet.mjs","sources":["../../../projects/angular/component/sheet/src/lib/sheet.component.ts","../../../projects/angular/component/sheet/src/lib/sheet-close.directive.ts","../../../projects/angular/component/sheet/src/lib/sheet-parts.component.ts","../../../projects/angular/component/sheet/ojiepermana-angular-component-sheet.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter } from 'rxjs/operators';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\nexport type SheetSide = 'top' | 'right' | 'bottom' | 'left';\n\nconst SIDE_BASE: Record<SheetSide, string> = {\n top: 'inset-x-0 top-0 border-b border-border',\n bottom: 'inset-x-0 bottom-0 border-t border-border',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r border-border sm:max-w-sm',\n right: 'inset-y-0 right-0 h-full w-3/4 border-l border-border sm:max-w-sm',\n};\n\nconst DRAWER_SIDE_CLASSES: Record<SheetSide, string> = {\n top: 'max-h-[85vh] rounded-b-lg',\n bottom: 'max-h-[85vh] rounded-t-lg',\n left: 'rounded-r-lg',\n right: 'rounded-l-lg',\n};\n\nconst SIDE_ENTER_FROM: Record<SheetSide, string> = {\n top: 'translateY(-100%)',\n bottom: 'translateY(100%)',\n left: 'translateX(-100%)',\n right: 'translateX(100%)',\n};\n\n@Component({\n selector: 'ui-sheet, ui-drawer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-template #tpl>\n <div\n class=\"ui-sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [class]=\"surfaceClasses()\"\n [style.--ui-sheet-from]=\"enterFrom()\">\n <ng-content />\n </div>\n </ng-template>\n `,\n styles: [\n `\n .ui-sheet-surface {\n animation: ui-sheet-in 300ms cubic-bezier(0.2, 0, 0, 1);\n }\n @keyframes ui-sheet-in {\n from {\n transform: var(--ui-sheet-from);\n }\n to {\n transform: translate(0, 0);\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .ui-sheet-surface {\n animation-duration: 0ms;\n }\n }\n `,\n ],\n})\nexport class SheetComponent {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly trapFactory = inject(FocusTrapFactory);\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n readonly open = model<boolean>(false);\n readonly side = input<SheetSide | undefined>(undefined);\n readonly closeOnEscape = input<boolean>(true);\n readonly closeOnBackdropClick = input<boolean>(true);\n readonly labelledBy = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly describedBy = input<string | null>(null, { alias: 'aria-describedby' });\n readonly class = input<string>('');\n\n readonly openedChange = output<boolean>();\n\n private readonly tpl = viewChild.required<TemplateRef<unknown>>('tpl');\n private overlayRef: OverlayRef | null = null;\n private focusTrap: FocusTrap | null = null;\n private previousFocus: HTMLElement | null = null;\n\n private readonly resolvedSide = computed<SheetSide>(() => this.side() ?? (this.isDrawerHost() ? 'bottom' : 'right'));\n\n protected readonly surfaceClasses = computed(() =>\n cn(\n 'gap-4 p-6 flex flex-col',\n SIDE_BASE[this.resolvedSide()],\n this.isDrawerHost() ? DRAWER_SIDE_CLASSES[this.resolvedSide()] : '',\n this.class(),\n ),\n );\n\n protected readonly enterFrom = computed(() => SIDE_ENTER_FROM[this.resolvedSide()]);\n\n constructor() {\n effect(() => {\n this.open() ? this.attach() : this.detach();\n });\n }\n\n private attach(): void {\n if (this.overlayRef) return;\n this.previousFocus = this.doc.activeElement as HTMLElement | null;\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'ui-dialog-backdrop',\n panelClass: 'ui-sheet-panel',\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy: this.overlay.position().global(),\n });\n\n const portal = new TemplatePortal(this.tpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n this.focusTrap = this.trapFactory.create(this.overlayRef.hostElement);\n this.focusTrap.focusInitialElementWhenReady();\n\n if (this.closeOnBackdropClick()) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.open.set(false));\n }\n\n this.overlayRef\n .keydownEvents()\n .pipe(\n takeUntilDestroyed(this.destroyRef),\n filter((e) => e.key === 'Escape' && this.closeOnEscape()),\n )\n .subscribe((e) => {\n e.preventDefault();\n this.open.set(false);\n });\n\n this.openedChange.emit(true);\n }\n\n private detach(): void {\n if (!this.overlayRef) return;\n this.focusTrap?.destroy();\n this.focusTrap = null;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.previousFocus?.focus?.();\n this.openedChange.emit(false);\n }\n\n close(): void {\n this.open.set(false);\n }\n\n private isDrawerHost(): boolean {\n return this.host.nativeElement.localName === 'ui-drawer';\n }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { SheetComponent } from './sheet.component';\n\n@Directive({\n selector: 'button[ui-sheet-close], a[ui-sheet-close], button[ui-drawer-close], a[ui-drawer-close]',\n host: {\n '(click)': 'closeSheet()',\n },\n})\nexport class SheetCloseDirective {\n private readonly sheet = inject(SheetComponent);\n\n closeSheet(): void {\n this.sheet.close();\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n@Component({\n selector: 'ui-sheet-header, ui-drawer-header',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetHeaderComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('flex flex-col gap-2 text-center sm:text-left', this.class()));\n}\n\n@Component({\n selector: 'ui-sheet-title, ui-drawer-title, h2[ui-sheet-title], h2[ui-drawer-title]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetTitleComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('text-lg font-semibold text-foreground', this.class()));\n}\n\n@Component({\n selector: 'ui-sheet-description, ui-drawer-description, p[ui-sheet-description], p[ui-drawer-description]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetDescriptionComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('text-sm text-muted-foreground', this.class()));\n}\n\n@Component({\n selector: 'ui-sheet-content, ui-drawer-content',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetContentComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('flex-1 overflow-auto', this.class()));\n}\n\n@Component({\n selector: 'ui-sheet-footer, ui-drawer-footer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class SheetFooterComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.class()),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAyBA,MAAM,SAAS,GAA8B;AAC3C,IAAA,GAAG,EAAE,wCAAwC;AAC7C,IAAA,MAAM,EAAE,2CAA2C;AACnD,IAAA,IAAI,EAAE,kEAAkE;AACxE,IAAA,KAAK,EAAE,mEAAmE;CAC3E;AAED,MAAM,mBAAmB,GAA8B;AACrD,IAAA,GAAG,EAAE,2BAA2B;AAChC,IAAA,MAAM,EAAE,2BAA2B;AACnC,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,KAAK,EAAE,cAAc;CACtB;AAED,MAAM,eAAe,GAA8B;AACjD,IAAA,GAA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AAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,iRAFrB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAEf,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;oBAC7C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AAChC,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACpDD;;AAEG;;;;"}
@@ -0,0 +1,29 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { cn } from '@ojiepermana/angular/component/utils';
4
+
5
+ class SkeletonComponent {
6
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
7
+ classes = computed(() => cn('block animate-pulse rounded-md bg-muted', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
8
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SkeletonComponent, isStandalone: true, selector: "ui-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "\"true\"" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
10
+ }
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SkeletonComponent, decorators: [{
12
+ type: Component,
13
+ args: [{
14
+ selector: 'ui-skeleton',
15
+ changeDetection: ChangeDetectionStrategy.OnPush,
16
+ host: {
17
+ '[class]': 'classes()',
18
+ '[attr.aria-hidden]': '"true"',
19
+ },
20
+ template: '',
21
+ }]
22
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
23
+
24
+ /**
25
+ * Generated bundle index. Do not edit.
26
+ */
27
+
28
+ export { SkeletonComponent };
29
+ //# sourceMappingURL=ojiepermana-angular-component-skeleton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-skeleton.mjs","sources":["../../../projects/angular/component/skeleton/src/lib/skeleton.component.ts","../../../projects/angular/component/skeleton/ojiepermana-angular-component-skeleton.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n@Component({\n selector: 'ui-skeleton',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.aria-hidden]': '\"true\"',\n },\n template: '',\n})\nexport class SkeletonComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('block animate-pulse rounded-md bg-muted', this.class()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAYa,iBAAiB,CAAA;AACnB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAEf,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,yCAAyC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,8EAAC;wGAH7F,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,2RAFlB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAED,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;oBACvB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,oBAAoB,EAAE,QAAQ;AAC/B,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -0,0 +1,29 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ElementRef, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { cn } from '@ojiepermana/angular/component/utils';
4
+
5
+ /**
6
+ * Styled native range input. Works with `ngModel` / `FormControl` via
7
+ * Angular's built-in `RangeValueAccessor`. Keyboard + ARIA handled by the browser.
8
+ */
9
+ class SliderComponent {
10
+ el = inject(ElementRef);
11
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
12
+ classes = computed(() => cn('ui-slider relative w-full appearance-none bg-transparent', 'focus-visible:outline-none', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
13
+ focus() {
14
+ this.el.nativeElement.focus();
15
+ }
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: SliderComponent, isStandalone: true, selector: "input[type=range][ui-slider]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, styles: [":host.ui-slider{height:1.25rem;cursor:pointer}:host.ui-slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.ui-slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SliderComponent, decorators: [{
20
+ type: Component,
21
+ args: [{ selector: 'input[type=range][ui-slider]', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'classes()' }, template: '', styles: [":host.ui-slider{height:1.25rem;cursor:pointer}:host.ui-slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.ui-slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"] }]
22
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
23
+
24
+ /**
25
+ * Generated bundle index. Do not edit.
26
+ */
27
+
28
+ export { SliderComponent };
29
+ //# sourceMappingURL=ojiepermana-angular-component-slider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-slider.mjs","sources":["../../../projects/angular/component/slider/src/lib/slider.component.ts","../../../projects/angular/component/slider/ojiepermana-angular-component-slider.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, computed, inject, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n/**\n * Styled native range input. Works with `ngModel` / `FormControl` via\n * Angular's built-in `RangeValueAccessor`. Keyboard + ARIA handled by the browser.\n */\n@Component({\n selector: 'input[type=range][ui-slider]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: '',\n styleUrl: './slider.component.css',\n})\nexport class SliderComponent {\n private readonly el = inject<ElementRef<HTMLInputElement>>(ElementRef);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'ui-slider relative w-full appearance-none bg-transparent',\n 'focus-visible:outline-none',\n 'disabled:pointer-events-none disabled:opacity-50',\n this.class(),\n ),\n );\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAGA;;;AAGG;MAQU,eAAe,CAAA;AACT,IAAA,EAAE,GAAG,MAAM,CAA+B,UAAU,CAAC;AAC7D,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;IAEf,OAAO,GAAG,QAAQ,CAAC,MACpC,EAAE,CACA,0DAA0D,EAC1D,4BAA4B,EAC5B,kDAAkD,EAClD,IAAI,CAAC,KAAK,EAAE,CACb,8EACF;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE;IAC/B;wGAfW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,4QAHhB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,kpCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAGD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;+BACE,8BAA8B,EAAA,eAAA,EACvB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,QAAA,EACtB,EAAE,EAAA,MAAA,EAAA,CAAA,kpCAAA,CAAA,EAAA;;;ACXd;;AAEG;;;;"}
@@ -0,0 +1,84 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, viewChild, signal, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+ import { MatSlideToggle } from '@angular/material/slide-toggle';
5
+ import { cn } from '@ojiepermana/angular/component/utils';
6
+
7
+ /**
8
+ * Switch — shadcn-styled wrapper around `mat-slide-toggle`.
9
+ */
10
+ class SwitchComponent {
11
+ required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
12
+ ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
13
+ ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
14
+ class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
15
+ checkedChange = output();
16
+ ref = viewChild.required('ref');
17
+ checked = signal(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
18
+ disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
19
+ classes = computed(() => cn('ui-switch', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
20
+ onChange = () => { };
21
+ onTouched = () => { };
22
+ handleChange(e) {
23
+ this.checked.set(e.checked);
24
+ this.onChange(e.checked);
25
+ this.onTouched();
26
+ this.checkedChange.emit(e.checked);
27
+ }
28
+ focus() {
29
+ this.ref().focus();
30
+ }
31
+ writeValue(v) {
32
+ this.checked.set(!!v);
33
+ }
34
+ registerOnChange(fn) {
35
+ this.onChange = fn;
36
+ }
37
+ registerOnTouched(fn) {
38
+ this.onTouched = fn;
39
+ }
40
+ setDisabledState(d) {
41
+ this.disabled.set(d);
42
+ }
43
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
44
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.14", type: SwitchComponent, isStandalone: true, selector: "ui-switch", inputs: { required: { classPropertyName: "required", publicName: "required", 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 }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwitchComponent), multi: true }], viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, isSignal: true }], ngImport: i0, template: `
45
+ <mat-slide-toggle
46
+ #ref
47
+ hideIcon
48
+ disableRipple
49
+ [class]="classes()"
50
+ [checked]="checked()"
51
+ [disabled]="disabled()"
52
+ [required]="required()"
53
+ [attr.aria-label]="ariaLabel()"
54
+ [attr.aria-labelledby]="ariaLabelledby()"
55
+ (change)="handleChange($event)">
56
+ <ng-content />
57
+ </mat-slide-toggle>
58
+ `, isInline: true, styles: [":host{display:inline-flex}:host ::ng-deep .mat-mdc-slide-toggle{--mdc-switch-track-width: 2rem;--mdc-switch-track-height: 1.15rem;--mdc-switch-track-shape: 9999px;--mdc-switch-handle-shape: 9999px;--mdc-switch-handle-width: .875rem;--mdc-switch-handle-height: .875rem;--mdc-switch-state-layer-size: 0;--mdc-switch-selected-track-color: hsl(var(--primary));--mdc-switch-selected-focus-track-color: hsl(var(--primary));--mdc-switch-selected-hover-track-color: hsl(var(--primary));--mdc-switch-selected-pressed-track-color: hsl(var(--primary));--mdc-switch-unselected-track-color: hsl(var(--input));--mdc-switch-unselected-focus-track-color: hsl(var(--input));--mdc-switch-unselected-hover-track-color: hsl(var(--input));--mdc-switch-unselected-pressed-track-color: hsl(var(--input));--mdc-switch-selected-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--primary-foreground));--mdc-switch-unselected-handle-color: hsl(var(--background));--mdc-switch-unselected-focus-handle-color: hsl(var(--background));--mdc-switch-unselected-hover-handle-color: hsl(var(--background));--mdc-switch-unselected-pressed-handle-color: hsl(var(--background));--mdc-switch-selected-icon-color: transparent;--mdc-switch-unselected-icon-color: transparent}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-focus-indicator{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__icons{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-form-field{gap:.5rem;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-slide-toggle .mdc-label{padding:0;cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
59
+ }
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: SwitchComponent, decorators: [{
61
+ type: Component,
62
+ args: [{ selector: 'ui-switch', imports: [MatSlideToggle], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwitchComponent), multi: true }], template: `
63
+ <mat-slide-toggle
64
+ #ref
65
+ hideIcon
66
+ disableRipple
67
+ [class]="classes()"
68
+ [checked]="checked()"
69
+ [disabled]="disabled()"
70
+ [required]="required()"
71
+ [attr.aria-label]="ariaLabel()"
72
+ [attr.aria-labelledby]="ariaLabelledby()"
73
+ (change)="handleChange($event)">
74
+ <ng-content />
75
+ </mat-slide-toggle>
76
+ `, styles: [":host{display:inline-flex}:host ::ng-deep .mat-mdc-slide-toggle{--mdc-switch-track-width: 2rem;--mdc-switch-track-height: 1.15rem;--mdc-switch-track-shape: 9999px;--mdc-switch-handle-shape: 9999px;--mdc-switch-handle-width: .875rem;--mdc-switch-handle-height: .875rem;--mdc-switch-state-layer-size: 0;--mdc-switch-selected-track-color: hsl(var(--primary));--mdc-switch-selected-focus-track-color: hsl(var(--primary));--mdc-switch-selected-hover-track-color: hsl(var(--primary));--mdc-switch-selected-pressed-track-color: hsl(var(--primary));--mdc-switch-unselected-track-color: hsl(var(--input));--mdc-switch-unselected-focus-track-color: hsl(var(--input));--mdc-switch-unselected-hover-track-color: hsl(var(--input));--mdc-switch-unselected-pressed-track-color: hsl(var(--input));--mdc-switch-selected-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--primary-foreground));--mdc-switch-unselected-handle-color: hsl(var(--background));--mdc-switch-unselected-focus-handle-color: hsl(var(--background));--mdc-switch-unselected-hover-handle-color: hsl(var(--background));--mdc-switch-unselected-pressed-handle-color: hsl(var(--background));--mdc-switch-selected-icon-color: transparent;--mdc-switch-unselected-icon-color: transparent}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-focus-indicator{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__icons{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-form-field{gap:.5rem;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-slide-toggle .mdc-label{padding:0;cursor:pointer}\n"] }]
77
+ }], propDecorators: { required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], ref: [{ type: i0.ViewChild, args: ['ref', { isSignal: true }] }] } });
78
+
79
+ /**
80
+ * Generated bundle index. Do not edit.
81
+ */
82
+
83
+ export { SwitchComponent };
84
+ //# sourceMappingURL=ojiepermana-angular-component-switch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ojiepermana-angular-component-switch.mjs","sources":["../../../projects/angular/component/switch/src/lib/switch.component.ts","../../../projects/angular/component/switch/ojiepermana-angular-component-switch.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatSlideToggle, MatSlideToggleChange } from '@angular/material/slide-toggle';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n/**\n * Switch — shadcn-styled wrapper around `mat-slide-toggle`.\n */\n@Component({\n selector: 'ui-switch',\n imports: [MatSlideToggle],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwitchComponent), multi: true }],\n template: `\n <mat-slide-toggle\n #ref\n hideIcon\n disableRipple\n [class]=\"classes()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n (change)=\"handleChange($event)\">\n <ng-content />\n </mat-slide-toggle>\n `,\n styleUrl: './switch.component.css',\n})\nexport class SwitchComponent implements ControlValueAccessor {\n readonly required = input<boolean>(false);\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly class = input<string>('');\n\n readonly checkedChange = output<boolean>();\n\n private readonly ref = viewChild.required<MatSlideToggle>('ref');\n\n protected readonly checked = signal<boolean>(false);\n protected readonly disabled = signal<boolean>(false);\n protected readonly classes = computed(() => cn('ui-switch', this.class()));\n\n private onChange: (v: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n protected handleChange(e: MatSlideToggleChange): void {\n this.checked.set(e.checked);\n this.onChange(e.checked);\n this.onTouched();\n this.checkedChange.emit(e.checked);\n }\n\n focus(): void {\n this.ref().focus();\n }\n\n writeValue(v: boolean): void {\n this.checked.set(!!v);\n }\n registerOnChange(fn: (v: boolean) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(d: boolean): void {\n this.disabled.set(d);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAcA;;AAEG;MAuBU,eAAe,CAAA;AACjB,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;IAChC,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;IAC/D,cAAc,GAAG,KAAK,CAAgB,IAAI,sFAAI,KAAK,EAAE,iBAAiB,EAAA,CAAG;AACzE,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;IAEzB,aAAa,GAAG,MAAM,EAAW;AAEzB,IAAA,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAiB,KAAK,CAAC;AAE7C,IAAA,OAAO,GAAG,MAAM,CAAU,KAAK,8EA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