@aeris-ui/core 22.0.0-alpha.0

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 (295) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +189 -0
  3. package/fesm2022/aeris-ui-core-accordion.mjs +412 -0
  4. package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -0
  5. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +107 -0
  6. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -0
  7. package/fesm2022/aeris-ui-core-auto-complete.mjs +754 -0
  8. package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -0
  9. package/fesm2022/aeris-ui-core-auto-focus.mjs +63 -0
  10. package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -0
  11. package/fesm2022/aeris-ui-core-avatar.mjs +133 -0
  12. package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -0
  13. package/fesm2022/aeris-ui-core-badge.mjs +163 -0
  14. package/fesm2022/aeris-ui-core-badge.mjs.map +1 -0
  15. package/fesm2022/aeris-ui-core-block-ui.mjs +139 -0
  16. package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -0
  17. package/fesm2022/aeris-ui-core-breadcrumb.mjs +433 -0
  18. package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -0
  19. package/fesm2022/aeris-ui-core-button-group.mjs +39 -0
  20. package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -0
  21. package/fesm2022/aeris-ui-core-button.mjs +246 -0
  22. package/fesm2022/aeris-ui-core-button.mjs.map +1 -0
  23. package/fesm2022/aeris-ui-core-card.mjs +134 -0
  24. package/fesm2022/aeris-ui-core-card.mjs.map +1 -0
  25. package/fesm2022/aeris-ui-core-carousel.mjs +542 -0
  26. package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -0
  27. package/fesm2022/aeris-ui-core-cascade-select.mjs +673 -0
  28. package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -0
  29. package/fesm2022/aeris-ui-core-chart.mjs +296 -0
  30. package/fesm2022/aeris-ui-core-chart.mjs.map +1 -0
  31. package/fesm2022/aeris-ui-core-checkbox.mjs +220 -0
  32. package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -0
  33. package/fesm2022/aeris-ui-core-chip.mjs +200 -0
  34. package/fesm2022/aeris-ui-core-chip.mjs.map +1 -0
  35. package/fesm2022/aeris-ui-core-class-names.mjs +67 -0
  36. package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -0
  37. package/fesm2022/aeris-ui-core-color-picker.mjs +1192 -0
  38. package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -0
  39. package/fesm2022/aeris-ui-core-compare.mjs +508 -0
  40. package/fesm2022/aeris-ui-core-compare.mjs.map +1 -0
  41. package/fesm2022/aeris-ui-core-confirm-dialog.mjs +818 -0
  42. package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -0
  43. package/fesm2022/aeris-ui-core-confirm-popup.mjs +1010 -0
  44. package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -0
  45. package/fesm2022/aeris-ui-core-context-menu.mjs +720 -0
  46. package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -0
  47. package/fesm2022/aeris-ui-core-date-picker.mjs +1471 -0
  48. package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -0
  49. package/fesm2022/aeris-ui-core-dialog.mjs +574 -0
  50. package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -0
  51. package/fesm2022/aeris-ui-core-divider.mjs +51 -0
  52. package/fesm2022/aeris-ui-core-divider.mjs.map +1 -0
  53. package/fesm2022/aeris-ui-core-drawer.mjs +549 -0
  54. package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -0
  55. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +333 -0
  56. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -0
  57. package/fesm2022/aeris-ui-core-editor.mjs +1548 -0
  58. package/fesm2022/aeris-ui-core-editor.mjs.map +1 -0
  59. package/fesm2022/aeris-ui-core-file-upload.mjs +965 -0
  60. package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -0
  61. package/fesm2022/aeris-ui-core-filter-service.mjs +304 -0
  62. package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -0
  63. package/fesm2022/aeris-ui-core-fluid.mjs +23 -0
  64. package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -0
  65. package/fesm2022/aeris-ui-core-focus-trap.mjs +185 -0
  66. package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -0
  67. package/fesm2022/aeris-ui-core-galleria.mjs +1657 -0
  68. package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -0
  69. package/fesm2022/aeris-ui-core-glass.mjs +35 -0
  70. package/fesm2022/aeris-ui-core-glass.mjs.map +1 -0
  71. package/fesm2022/aeris-ui-core-icon-field.mjs +113 -0
  72. package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -0
  73. package/fesm2022/aeris-ui-core-inplace.mjs +243 -0
  74. package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -0
  75. package/fesm2022/aeris-ui-core-input-group.mjs +110 -0
  76. package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -0
  77. package/fesm2022/aeris-ui-core-input-mask.mjs +343 -0
  78. package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -0
  79. package/fesm2022/aeris-ui-core-input-number.mjs +497 -0
  80. package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -0
  81. package/fesm2022/aeris-ui-core-input-otp.mjs +361 -0
  82. package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -0
  83. package/fesm2022/aeris-ui-core-input-text.mjs +226 -0
  84. package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -0
  85. package/fesm2022/aeris-ui-core-key-filter.mjs +208 -0
  86. package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -0
  87. package/fesm2022/aeris-ui-core-mega-menu.mjs +835 -0
  88. package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -0
  89. package/fesm2022/aeris-ui-core-menu.mjs +796 -0
  90. package/fesm2022/aeris-ui-core-menu.mjs.map +1 -0
  91. package/fesm2022/aeris-ui-core-menubar.mjs +729 -0
  92. package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -0
  93. package/fesm2022/aeris-ui-core-message.mjs +225 -0
  94. package/fesm2022/aeris-ui-core-message.mjs.map +1 -0
  95. package/fesm2022/aeris-ui-core-meter-group.mjs +377 -0
  96. package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -0
  97. package/fesm2022/aeris-ui-core-multi-select.mjs +1033 -0
  98. package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -0
  99. package/fesm2022/aeris-ui-core-order-list.mjs +351 -0
  100. package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -0
  101. package/fesm2022/aeris-ui-core-organization-chart.mjs +382 -0
  102. package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -0
  103. package/fesm2022/aeris-ui-core-paginator.mjs +254 -0
  104. package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -0
  105. package/fesm2022/aeris-ui-core-panel.mjs +352 -0
  106. package/fesm2022/aeris-ui-core-panel.mjs.map +1 -0
  107. package/fesm2022/aeris-ui-core-password.mjs +479 -0
  108. package/fesm2022/aeris-ui-core-password.mjs.map +1 -0
  109. package/fesm2022/aeris-ui-core-pick-list.mjs +939 -0
  110. package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -0
  111. package/fesm2022/aeris-ui-core-popover.mjs +535 -0
  112. package/fesm2022/aeris-ui-core-popover.mjs.map +1 -0
  113. package/fesm2022/aeris-ui-core-progress-bar.mjs +260 -0
  114. package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -0
  115. package/fesm2022/aeris-ui-core-progress-spinner.mjs +218 -0
  116. package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -0
  117. package/fesm2022/aeris-ui-core-radio-button.mjs +194 -0
  118. package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -0
  119. package/fesm2022/aeris-ui-core-rating.mjs +385 -0
  120. package/fesm2022/aeris-ui-core-rating.mjs.map +1 -0
  121. package/fesm2022/aeris-ui-core-scroll-panel.mjs +211 -0
  122. package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -0
  123. package/fesm2022/aeris-ui-core-scroll-top.mjs +94 -0
  124. package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -0
  125. package/fesm2022/aeris-ui-core-select.mjs +1134 -0
  126. package/fesm2022/aeris-ui-core-select.mjs.map +1 -0
  127. package/fesm2022/aeris-ui-core-skeleton.mjs +47 -0
  128. package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -0
  129. package/fesm2022/aeris-ui-core-slider.mjs +724 -0
  130. package/fesm2022/aeris-ui-core-slider.mjs.map +1 -0
  131. package/fesm2022/aeris-ui-core-speed-dial.mjs +589 -0
  132. package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -0
  133. package/fesm2022/aeris-ui-core-split-button.mjs +532 -0
  134. package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -0
  135. package/fesm2022/aeris-ui-core-splitter.mjs +488 -0
  136. package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -0
  137. package/fesm2022/aeris-ui-core-stepper.mjs +437 -0
  138. package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -0
  139. package/fesm2022/aeris-ui-core-style-class.mjs +344 -0
  140. package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -0
  141. package/fesm2022/aeris-ui-core-table.mjs +1580 -0
  142. package/fesm2022/aeris-ui-core-table.mjs.map +1 -0
  143. package/fesm2022/aeris-ui-core-tabs.mjs +438 -0
  144. package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -0
  145. package/fesm2022/aeris-ui-core-textarea.mjs +349 -0
  146. package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -0
  147. package/fesm2022/aeris-ui-core-theme-builder.mjs +1565 -0
  148. package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -0
  149. package/fesm2022/aeris-ui-core-theming.mjs +150 -0
  150. package/fesm2022/aeris-ui-core-theming.mjs.map +1 -0
  151. package/fesm2022/aeris-ui-core-tiered-menu.mjs +718 -0
  152. package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -0
  153. package/fesm2022/aeris-ui-core-timeline.mjs +278 -0
  154. package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -0
  155. package/fesm2022/aeris-ui-core-toast.mjs +422 -0
  156. package/fesm2022/aeris-ui-core-toast.mjs.map +1 -0
  157. package/fesm2022/aeris-ui-core-toggle-switch.mjs +202 -0
  158. package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -0
  159. package/fesm2022/aeris-ui-core-toolbar.mjs +136 -0
  160. package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -0
  161. package/fesm2022/aeris-ui-core-tooltip.mjs +365 -0
  162. package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -0
  163. package/fesm2022/aeris-ui-core-tree-select.mjs +995 -0
  164. package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -0
  165. package/fesm2022/aeris-ui-core-tree-table.mjs +1600 -0
  166. package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -0
  167. package/fesm2022/aeris-ui-core-tree.mjs +962 -0
  168. package/fesm2022/aeris-ui-core-tree.mjs.map +1 -0
  169. package/fesm2022/aeris-ui-core.mjs +360 -0
  170. package/fesm2022/aeris-ui-core.mjs.map +1 -0
  171. package/package.json +432 -0
  172. package/schematics/aeris-setup.schema.json +52 -0
  173. package/schematics/collection.json +10 -0
  174. package/schematics/ng-add/schema.json +64 -0
  175. package/schematics/runtime/package.json +3 -0
  176. package/schematics/runtime/schematics/ng-add/index.js +13 -0
  177. package/schematics/runtime/schematics/ng-add/index.js.map +1 -0
  178. package/schematics/runtime/schematics/ng-add/options.js +338 -0
  179. package/schematics/runtime/schematics/ng-add/options.js.map +1 -0
  180. package/schematics/runtime/schematics/ng-add/schema.js +3 -0
  181. package/schematics/runtime/schematics/ng-add/schema.js.map +1 -0
  182. package/schematics/runtime/schematics/ng-add/workspace.js +273 -0
  183. package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -0
  184. package/schematics/runtime/theme-builder/aeris-color-derivation.js +12 -0
  185. package/schematics/runtime/theme-builder/aeris-color-derivation.js.map +1 -0
  186. package/schematics/runtime/theme-builder/aeris-color.js +263 -0
  187. package/schematics/runtime/theme-builder/aeris-color.js.map +1 -0
  188. package/schematics/runtime/theme-builder/aeris-contrast.js +245 -0
  189. package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -0
  190. package/schematics/runtime/theme-builder/aeris-foundation.js +47 -0
  191. package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -0
  192. package/schematics/runtime/theme-builder/aeris-semantic-tones.js +121 -0
  193. package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -0
  194. package/schematics/runtime/theme-builder/aeris-theme-generator.js +238 -0
  195. package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -0
  196. package/schematics/runtime/theme-builder/aeris-theme-resolver.js +101 -0
  197. package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -0
  198. package/schematics/runtime/theme-builder/aeris-theme-tokens.js +82 -0
  199. package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -0
  200. package/schematics/runtime/theme-builder/aeris-theme-validation.js +183 -0
  201. package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -0
  202. package/schematics/runtime/theme-builder/aeris-theme.js +322 -0
  203. package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -0
  204. package/schematics/runtime/theme-builder/public-api.js +17 -0
  205. package/schematics/runtime/theme-builder/public-api.js.map +1 -0
  206. package/styles/_index.scss +1 -0
  207. package/styles/_tokens.scss +13 -0
  208. package/styles/aeris.css +555 -0
  209. package/styles/controls.css +169 -0
  210. package/tools/aeris-theme.mjs +149 -0
  211. package/tools/aeris-theme.schema.json +143 -0
  212. package/types/aeris-ui-core-accordion.d.ts +101 -0
  213. package/types/aeris-ui-core-animate-on-scroll.d.ts +34 -0
  214. package/types/aeris-ui-core-auto-complete.d.ts +154 -0
  215. package/types/aeris-ui-core-auto-focus.d.ts +17 -0
  216. package/types/aeris-ui-core-avatar.d.ts +44 -0
  217. package/types/aeris-ui-core-badge.d.ts +48 -0
  218. package/types/aeris-ui-core-block-ui.d.ts +28 -0
  219. package/types/aeris-ui-core-breadcrumb.d.ts +104 -0
  220. package/types/aeris-ui-core-button-group.d.ts +17 -0
  221. package/types/aeris-ui-core-button.d.ts +71 -0
  222. package/types/aeris-ui-core-card.d.ts +43 -0
  223. package/types/aeris-ui-core-carousel.d.ts +126 -0
  224. package/types/aeris-ui-core-cascade-select.d.ts +130 -0
  225. package/types/aeris-ui-core-chart.d.ts +92 -0
  226. package/types/aeris-ui-core-checkbox.d.ts +55 -0
  227. package/types/aeris-ui-core-chip.d.ts +56 -0
  228. package/types/aeris-ui-core-class-names.d.ts +21 -0
  229. package/types/aeris-ui-core-color-picker.d.ts +149 -0
  230. package/types/aeris-ui-core-compare.d.ts +109 -0
  231. package/types/aeris-ui-core-confirm-dialog.d.ts +263 -0
  232. package/types/aeris-ui-core-confirm-popup.d.ts +281 -0
  233. package/types/aeris-ui-core-context-menu.d.ts +156 -0
  234. package/types/aeris-ui-core-date-picker.d.ts +226 -0
  235. package/types/aeris-ui-core-dialog.d.ts +124 -0
  236. package/types/aeris-ui-core-divider.d.ts +21 -0
  237. package/types/aeris-ui-core-drawer.d.ts +119 -0
  238. package/types/aeris-ui-core-dynamic-dialog.d.ts +148 -0
  239. package/types/aeris-ui-core-editor.d.ts +130 -0
  240. package/types/aeris-ui-core-file-upload.d.ts +199 -0
  241. package/types/aeris-ui-core-filter-service.d.ts +54 -0
  242. package/types/aeris-ui-core-fluid.d.ts +10 -0
  243. package/types/aeris-ui-core-focus-trap.d.ts +32 -0
  244. package/types/aeris-ui-core-galleria.d.ts +273 -0
  245. package/types/aeris-ui-core-glass.d.ts +17 -0
  246. package/types/aeris-ui-core-icon-field.d.ts +36 -0
  247. package/types/aeris-ui-core-inplace.d.ts +68 -0
  248. package/types/aeris-ui-core-input-group.d.ts +38 -0
  249. package/types/aeris-ui-core-input-mask.d.ts +73 -0
  250. package/types/aeris-ui-core-input-number.d.ts +87 -0
  251. package/types/aeris-ui-core-input-otp.d.ts +88 -0
  252. package/types/aeris-ui-core-input-text.d.ts +63 -0
  253. package/types/aeris-ui-core-key-filter.d.ts +41 -0
  254. package/types/aeris-ui-core-mega-menu.d.ts +130 -0
  255. package/types/aeris-ui-core-menu.d.ts +182 -0
  256. package/types/aeris-ui-core-menubar.d.ts +145 -0
  257. package/types/aeris-ui-core-message.d.ts +65 -0
  258. package/types/aeris-ui-core-meter-group.d.ts +100 -0
  259. package/types/aeris-ui-core-multi-select.d.ts +193 -0
  260. package/types/aeris-ui-core-order-list.d.ts +73 -0
  261. package/types/aeris-ui-core-organization-chart.d.ts +85 -0
  262. package/types/aeris-ui-core-paginator.d.ts +39 -0
  263. package/types/aeris-ui-core-panel.d.ts +85 -0
  264. package/types/aeris-ui-core-password.d.ts +110 -0
  265. package/types/aeris-ui-core-pick-list.d.ts +193 -0
  266. package/types/aeris-ui-core-popover.d.ts +112 -0
  267. package/types/aeris-ui-core-progress-bar.d.ts +81 -0
  268. package/types/aeris-ui-core-progress-spinner.d.ts +51 -0
  269. package/types/aeris-ui-core-radio-button.d.ts +51 -0
  270. package/types/aeris-ui-core-rating.d.ts +80 -0
  271. package/types/aeris-ui-core-scroll-panel.d.ts +66 -0
  272. package/types/aeris-ui-core-scroll-top.d.ts +29 -0
  273. package/types/aeris-ui-core-select.d.ts +223 -0
  274. package/types/aeris-ui-core-skeleton.d.ts +18 -0
  275. package/types/aeris-ui-core-slider.d.ts +117 -0
  276. package/types/aeris-ui-core-speed-dial.d.ts +119 -0
  277. package/types/aeris-ui-core-split-button.d.ts +122 -0
  278. package/types/aeris-ui-core-splitter.d.ts +113 -0
  279. package/types/aeris-ui-core-stepper.d.ts +99 -0
  280. package/types/aeris-ui-core-style-class.d.ts +73 -0
  281. package/types/aeris-ui-core-table.d.ts +333 -0
  282. package/types/aeris-ui-core-tabs.d.ts +82 -0
  283. package/types/aeris-ui-core-textarea.d.ts +80 -0
  284. package/types/aeris-ui-core-theme-builder.d.ts +499 -0
  285. package/types/aeris-ui-core-theming.d.ts +47 -0
  286. package/types/aeris-ui-core-tiered-menu.d.ts +152 -0
  287. package/types/aeris-ui-core-timeline.d.ts +80 -0
  288. package/types/aeris-ui-core-toast.d.ts +127 -0
  289. package/types/aeris-ui-core-toggle-switch.d.ts +52 -0
  290. package/types/aeris-ui-core-toolbar.d.ts +47 -0
  291. package/types/aeris-ui-core-tooltip.d.ts +92 -0
  292. package/types/aeris-ui-core-tree-select.d.ts +187 -0
  293. package/types/aeris-ui-core-tree-table.d.ts +311 -0
  294. package/types/aeris-ui-core-tree.d.ts +179 -0
  295. package/types/aeris-ui-core.d.ts +85 -0
@@ -0,0 +1,220 @@
1
+ import * as i0 from '@angular/core';
2
+ import { viewChild, signal, model, input, booleanAttribute, output, computed, forwardRef, Component } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+
5
+ let checkboxId = 0;
6
+ class AerisCheckbox {
7
+ inputElement = viewChild('checkboxInput', /* @ts-ignore */
8
+ ...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
9
+ generatedId = `aeris-checkbox-${++checkboxId}`;
10
+ formDisabled = signal(false, /* @ts-ignore */
11
+ ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
12
+ onChange = () => undefined;
13
+ onTouched = () => undefined;
14
+ checked = model(false, /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
16
+ indeterminate = model(false, /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
18
+ inputId = input('', /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
20
+ name = input('', /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
22
+ value = input('on', /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
24
+ label = input('', /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
26
+ ariaLabel = input(/* @ts-ignore */
27
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
28
+ ariaLabelledby = input(/* @ts-ignore */
29
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
30
+ ariaDescribedby = input(/* @ts-ignore */
31
+ ...(ngDevMode ? [undefined, { debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
32
+ size = input('md', /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
34
+ labelPosition = input('end', /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
36
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
37
+ required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
38
+ invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
39
+ tabIndex = input(0, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []));
41
+ checkedInput = output();
42
+ changed = output();
43
+ focused = output();
44
+ blurred = output();
45
+ touch = output();
46
+ resolvedInputId = computed(() => this.inputId() || this.generatedId, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []));
48
+ effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
50
+ focus(options) {
51
+ this.inputElement()?.nativeElement.focus(options);
52
+ }
53
+ writeValue(value) {
54
+ this.checked.set(Boolean(value));
55
+ }
56
+ registerOnChange(callback) {
57
+ this.onChange = callback;
58
+ }
59
+ registerOnTouched(callback) {
60
+ this.onTouched = callback;
61
+ }
62
+ setDisabledState(disabled) {
63
+ this.formDisabled.set(disabled);
64
+ }
65
+ reset() {
66
+ this.indeterminate.set(false);
67
+ this.setChecked(false);
68
+ }
69
+ toggle() {
70
+ if (this.effectiveDisabled())
71
+ return;
72
+ if (this.indeterminate())
73
+ this.indeterminate.set(false);
74
+ this.setChecked(!this.checked());
75
+ this.focus();
76
+ }
77
+ handleChange(event) {
78
+ if (this.effectiveDisabled())
79
+ return;
80
+ const inputElement = event.target;
81
+ if (this.indeterminate())
82
+ this.indeterminate.set(false);
83
+ this.setChecked(inputElement.checked);
84
+ this.changed.emit({
85
+ originalEvent: event,
86
+ checked: inputElement.checked,
87
+ indeterminate: false,
88
+ value: this.value(),
89
+ });
90
+ }
91
+ handleBlur(event) {
92
+ this.touch.emit();
93
+ this.onTouched();
94
+ this.blurred.emit(event);
95
+ }
96
+ setChecked(checked) {
97
+ if (this.checked() === checked)
98
+ return;
99
+ this.checked.set(checked);
100
+ this.checkedInput.emit(checked);
101
+ this.onChange(checked);
102
+ }
103
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
104
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AerisCheckbox, isStandalone: true, selector: "aeris-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", indeterminate: "indeterminateChange", checkedInput: "checkedInput", changed: "changed", focused: "focused", blurred: "blurred", touch: "touch" }, host: { properties: { "attr.data-checked": "checked() || null", "attr.data-indeterminate": "indeterminate() || null", "attr.data-disabled": "effectiveDisabled() || null" } }, providers: [
105
+ {
106
+ provide: NG_VALUE_ACCESSOR,
107
+ useExisting: forwardRef(() => AerisCheckbox),
108
+ multi: true,
109
+ },
110
+ ], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["checkboxInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
111
+ <label
112
+ class="aeris-checkbox"
113
+ [attr.data-size]="size()"
114
+ [attr.data-label-position]="labelPosition()"
115
+ [attr.data-disabled]="effectiveDisabled() || null"
116
+ [attr.data-invalid]="invalid() || null"
117
+ >
118
+ <input
119
+ #checkboxInput
120
+ type="checkbox"
121
+ [id]="resolvedInputId()"
122
+ [name]="name()"
123
+ [value]="value()"
124
+ [checked]="checked()"
125
+ [indeterminate]="indeterminate()"
126
+ [disabled]="effectiveDisabled()"
127
+ [required]="required()"
128
+ [attr.tabindex]="tabIndex()"
129
+ [attr.aria-label]="ariaLabel()"
130
+ [attr.aria-labelledby]="ariaLabelledby()"
131
+ [attr.aria-describedby]="ariaDescribedby()"
132
+ [attr.aria-invalid]="invalid() || null"
133
+ [attr.aria-required]="required() || null"
134
+ (change)="handleChange($event)"
135
+ (focus)="focused.emit($event)"
136
+ (blur)="handleBlur($event)"
137
+ />
138
+ <span class="aeris-checkbox__control" aria-hidden="true">
139
+ <span class="aeris-checkbox__icon">
140
+ @if (indeterminate()) {
141
+ <span class="aeris-checkbox__mixed-mark"></span>
142
+ } @else {
143
+ <span class="aeris-checkbox__check-mark"></span>
144
+ }
145
+ </span>
146
+ </span>
147
+ <span class="aeris-checkbox__label">
148
+ @if (label()) {
149
+ <span>{{ label() }}</span>
150
+ }
151
+ <ng-content />
152
+ </span>
153
+ </label>
154
+ `, isInline: true, styles: [":host{display:inline-block;max-width:100%;vertical-align:middle}.aeris-checkbox{--_control-size: 1.125rem;display:inline-flex;align-items:flex-start;gap:.625rem;max-width:100%;color:var(--aeris-text-2, #555555);font:inherit;font-size:.875rem;line-height:1.45;cursor:pointer}.aeris-checkbox[data-label-position=start]{flex-direction:row-reverse}.aeris-checkbox input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;white-space:nowrap;clip-path:inset(50%)}.aeris-checkbox__control{position:relative;box-sizing:border-box;width:var(--_control-size);min-width:var(--_control-size);max-width:var(--_control-size);height:var(--_control-size);min-height:var(--_control-size);max-height:var(--_control-size);display:grid;place-items:center;flex:0 0 auto;margin-top:.0625rem;border:1.5px solid var(--aeris-border-strong, #c7c9c0);border-radius:var(--aeris-checkbox-radius, .3125rem);background:var(--aeris-surface, #fff);color:var(--aeris-on-primary, #17200f);transition:background-color .15s,border-color .15s,box-shadow .15s}.aeris-checkbox__icon{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;contain:layout paint;font-size:0;line-height:0}.aeris-checkbox:hover:not([data-disabled]) .aeris-checkbox__control{border-color:var(--aeris-primary, #879566)}.aeris-checkbox__check-mark,.aeris-checkbox__mixed-mark{width:72%;height:72%;opacity:0;transform:scale(.7);transition:opacity .12s,transform .12s}.aeris-checkbox__check-mark{position:relative;top:-.0625rem;width:52%;height:30%;border-bottom:2px solid currentColor;border-left:2px solid currentColor;transform:rotate(-45deg) scale(.7)}.aeris-checkbox__mixed-mark{width:56%;height:2px;border-radius:999px;background:currentColor}.aeris-checkbox input:checked+.aeris-checkbox__control,.aeris-checkbox input:indeterminate+.aeris-checkbox__control{border-color:var(--aeris-primary, #879566);background:var(--aeris-primary, #879566)}.aeris-checkbox input:checked+.aeris-checkbox__control .aeris-checkbox__check-mark,.aeris-checkbox input:indeterminate+.aeris-checkbox__control .aeris-checkbox__mixed-mark{opacity:1;transform:scale(1)}.aeris-checkbox input:checked+.aeris-checkbox__control .aeris-checkbox__check-mark{transform:rotate(-45deg) scale(1)}.aeris-checkbox input:focus-visible+.aeris-checkbox__control{outline:3px solid color-mix(in srgb,var(--aeris-focus, #536437) 44%,transparent);outline-offset:2px}.aeris-checkbox[data-invalid] .aeris-checkbox__control{border-color:var(--aeris-danger, #c81e2a)}.aeris-checkbox[data-invalid] input:focus-visible+.aeris-checkbox__control{outline-color:color-mix(in srgb,var(--aeris-danger, #c81e2a) 42%,transparent)}.aeris-checkbox[data-disabled]{opacity:.5;cursor:not-allowed}.aeris-checkbox__label{min-width:0;display:inline;color:inherit}.aeris-checkbox__label:empty{display:none}.aeris-checkbox[data-size=xs]{--_control-size: .875rem;gap:.45rem;font-size:.75rem}.aeris-checkbox[data-size=sm]{--_control-size: 1rem;gap:.5rem;font-size:.8125rem}.aeris-checkbox[data-size=lg]{--_control-size: 1.375rem;gap:.7rem;font-size:.9375rem}@media(prefers-reduced-motion:reduce){.aeris-checkbox__control,.aeris-checkbox__check-mark,.aeris-checkbox__mixed-mark{transition:none}}\n"] });
155
+ }
156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisCheckbox, decorators: [{
157
+ type: Component,
158
+ args: [{ selector: 'aeris-checkbox', template: `
159
+ <label
160
+ class="aeris-checkbox"
161
+ [attr.data-size]="size()"
162
+ [attr.data-label-position]="labelPosition()"
163
+ [attr.data-disabled]="effectiveDisabled() || null"
164
+ [attr.data-invalid]="invalid() || null"
165
+ >
166
+ <input
167
+ #checkboxInput
168
+ type="checkbox"
169
+ [id]="resolvedInputId()"
170
+ [name]="name()"
171
+ [value]="value()"
172
+ [checked]="checked()"
173
+ [indeterminate]="indeterminate()"
174
+ [disabled]="effectiveDisabled()"
175
+ [required]="required()"
176
+ [attr.tabindex]="tabIndex()"
177
+ [attr.aria-label]="ariaLabel()"
178
+ [attr.aria-labelledby]="ariaLabelledby()"
179
+ [attr.aria-describedby]="ariaDescribedby()"
180
+ [attr.aria-invalid]="invalid() || null"
181
+ [attr.aria-required]="required() || null"
182
+ (change)="handleChange($event)"
183
+ (focus)="focused.emit($event)"
184
+ (blur)="handleBlur($event)"
185
+ />
186
+ <span class="aeris-checkbox__control" aria-hidden="true">
187
+ <span class="aeris-checkbox__icon">
188
+ @if (indeterminate()) {
189
+ <span class="aeris-checkbox__mixed-mark"></span>
190
+ } @else {
191
+ <span class="aeris-checkbox__check-mark"></span>
192
+ }
193
+ </span>
194
+ </span>
195
+ <span class="aeris-checkbox__label">
196
+ @if (label()) {
197
+ <span>{{ label() }}</span>
198
+ }
199
+ <ng-content />
200
+ </span>
201
+ </label>
202
+ `, providers: [
203
+ {
204
+ provide: NG_VALUE_ACCESSOR,
205
+ useExisting: forwardRef(() => AerisCheckbox),
206
+ multi: true,
207
+ },
208
+ ], host: {
209
+ '[attr.data-checked]': 'checked() || null',
210
+ '[attr.data-indeterminate]': 'indeterminate() || null',
211
+ '[attr.data-disabled]': 'effectiveDisabled() || null',
212
+ }, styles: [":host{display:inline-block;max-width:100%;vertical-align:middle}.aeris-checkbox{--_control-size: 1.125rem;display:inline-flex;align-items:flex-start;gap:.625rem;max-width:100%;color:var(--aeris-text-2, #555555);font:inherit;font-size:.875rem;line-height:1.45;cursor:pointer}.aeris-checkbox[data-label-position=start]{flex-direction:row-reverse}.aeris-checkbox input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;white-space:nowrap;clip-path:inset(50%)}.aeris-checkbox__control{position:relative;box-sizing:border-box;width:var(--_control-size);min-width:var(--_control-size);max-width:var(--_control-size);height:var(--_control-size);min-height:var(--_control-size);max-height:var(--_control-size);display:grid;place-items:center;flex:0 0 auto;margin-top:.0625rem;border:1.5px solid var(--aeris-border-strong, #c7c9c0);border-radius:var(--aeris-checkbox-radius, .3125rem);background:var(--aeris-surface, #fff);color:var(--aeris-on-primary, #17200f);transition:background-color .15s,border-color .15s,box-shadow .15s}.aeris-checkbox__icon{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;contain:layout paint;font-size:0;line-height:0}.aeris-checkbox:hover:not([data-disabled]) .aeris-checkbox__control{border-color:var(--aeris-primary, #879566)}.aeris-checkbox__check-mark,.aeris-checkbox__mixed-mark{width:72%;height:72%;opacity:0;transform:scale(.7);transition:opacity .12s,transform .12s}.aeris-checkbox__check-mark{position:relative;top:-.0625rem;width:52%;height:30%;border-bottom:2px solid currentColor;border-left:2px solid currentColor;transform:rotate(-45deg) scale(.7)}.aeris-checkbox__mixed-mark{width:56%;height:2px;border-radius:999px;background:currentColor}.aeris-checkbox input:checked+.aeris-checkbox__control,.aeris-checkbox input:indeterminate+.aeris-checkbox__control{border-color:var(--aeris-primary, #879566);background:var(--aeris-primary, #879566)}.aeris-checkbox input:checked+.aeris-checkbox__control .aeris-checkbox__check-mark,.aeris-checkbox input:indeterminate+.aeris-checkbox__control .aeris-checkbox__mixed-mark{opacity:1;transform:scale(1)}.aeris-checkbox input:checked+.aeris-checkbox__control .aeris-checkbox__check-mark{transform:rotate(-45deg) scale(1)}.aeris-checkbox input:focus-visible+.aeris-checkbox__control{outline:3px solid color-mix(in srgb,var(--aeris-focus, #536437) 44%,transparent);outline-offset:2px}.aeris-checkbox[data-invalid] .aeris-checkbox__control{border-color:var(--aeris-danger, #c81e2a)}.aeris-checkbox[data-invalid] input:focus-visible+.aeris-checkbox__control{outline-color:color-mix(in srgb,var(--aeris-danger, #c81e2a) 42%,transparent)}.aeris-checkbox[data-disabled]{opacity:.5;cursor:not-allowed}.aeris-checkbox__label{min-width:0;display:inline;color:inherit}.aeris-checkbox__label:empty{display:none}.aeris-checkbox[data-size=xs]{--_control-size: .875rem;gap:.45rem;font-size:.75rem}.aeris-checkbox[data-size=sm]{--_control-size: 1rem;gap:.5rem;font-size:.8125rem}.aeris-checkbox[data-size=lg]{--_control-size: 1.375rem;gap:.7rem;font-size:.9375rem}@media(prefers-reduced-motion:reduce){.aeris-checkbox__control,.aeris-checkbox__check-mark,.aeris-checkbox__mixed-mark{transition:none}}\n"] }]
213
+ }], propDecorators: { inputElement: [{ type: i0.ViewChild, args: ['checkboxInput', { isSignal: true }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], checkedInput: [{ type: i0.Output, args: ["checkedInput"] }], changed: [{ type: i0.Output, args: ["changed"] }], focused: [{ type: i0.Output, args: ["focused"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
214
+
215
+ /**
216
+ * Generated bundle index. Do not edit.
217
+ */
218
+
219
+ export { AerisCheckbox };
220
+ //# sourceMappingURL=aeris-ui-core-checkbox.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aeris-ui-core-checkbox.mjs","sources":["../../../projects/aeris-ui/checkbox/aeris-checkbox.ts","../../../projects/aeris-ui/checkbox/aeris-ui-core-checkbox.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type AerisCheckboxSize = 'xs' | 'sm' | 'md' | 'lg';\nexport type AerisCheckboxLabelPosition = 'start' | 'end';\n\nexport interface AerisCheckboxChangeEvent {\n readonly originalEvent: Event;\n readonly checked: boolean;\n readonly indeterminate: boolean;\n readonly value: string;\n}\n\nlet checkboxId = 0;\n\n@Component({\n selector: 'aeris-checkbox',\n template: `\n <label\n class=\"aeris-checkbox\"\n [attr.data-size]=\"size()\"\n [attr.data-label-position]=\"labelPosition()\"\n [attr.data-disabled]=\"effectiveDisabled() || null\"\n [attr.data-invalid]=\"invalid() || null\"\n >\n <input\n #checkboxInput\n type=\"checkbox\"\n [id]=\"resolvedInputId()\"\n [name]=\"name()\"\n [value]=\"value()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n [disabled]=\"effectiveDisabled()\"\n [required]=\"required()\"\n [attr.tabindex]=\"tabIndex()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-invalid]=\"invalid() || null\"\n [attr.aria-required]=\"required() || null\"\n (change)=\"handleChange($event)\"\n (focus)=\"focused.emit($event)\"\n (blur)=\"handleBlur($event)\"\n />\n <span class=\"aeris-checkbox__control\" aria-hidden=\"true\">\n <span class=\"aeris-checkbox__icon\">\n @if (indeterminate()) {\n <span class=\"aeris-checkbox__mixed-mark\"></span>\n } @else {\n <span class=\"aeris-checkbox__check-mark\"></span>\n }\n </span>\n </span>\n <span class=\"aeris-checkbox__label\">\n @if (label()) {\n <span>{{ label() }}</span>\n }\n <ng-content />\n </span>\n </label>\n `,\n styleUrl: './aeris-checkbox.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AerisCheckbox),\n multi: true,\n },\n ],\n host: {\n '[attr.data-checked]': 'checked() || null',\n '[attr.data-indeterminate]': 'indeterminate() || null',\n '[attr.data-disabled]': 'effectiveDisabled() || null',\n },\n})\nexport class AerisCheckbox implements ControlValueAccessor {\n private readonly inputElement = viewChild<ElementRef<HTMLInputElement>>('checkboxInput');\n private readonly generatedId = `aeris-checkbox-${++checkboxId}`;\n private readonly formDisabled = signal(false);\n private onChange: (value: boolean) => void = () => undefined;\n private onTouched: () => void = () => undefined;\n\n readonly checked = model(false);\n readonly indeterminate = model(false);\n readonly inputId = input('');\n readonly name = input('');\n readonly value = input('on');\n readonly label = input('');\n readonly ariaLabel = input<string>();\n readonly ariaLabelledby = input<string>();\n readonly ariaDescribedby = input<string>();\n readonly size = input<AerisCheckboxSize>('md');\n readonly labelPosition = input<AerisCheckboxLabelPosition>('end');\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly required = input(false, { transform: booleanAttribute });\n readonly invalid = input(false, { transform: booleanAttribute });\n readonly tabIndex = input(0);\n\n readonly checkedInput = output<boolean>();\n readonly changed = output<AerisCheckboxChangeEvent>();\n readonly focused = output<FocusEvent>();\n readonly blurred = output<FocusEvent>();\n readonly touch = output<void>();\n\n protected readonly resolvedInputId = computed(() => this.inputId() || this.generatedId);\n protected readonly effectiveDisabled = computed(() => this.disabled() || this.formDisabled());\n\n focus(options?: FocusOptions): void {\n this.inputElement()?.nativeElement.focus(options);\n }\n\n writeValue(value: unknown): void {\n this.checked.set(Boolean(value));\n }\n\n registerOnChange(callback: (value: boolean) => void): void {\n this.onChange = callback;\n }\n\n registerOnTouched(callback: () => void): void {\n this.onTouched = callback;\n }\n\n setDisabledState(disabled: boolean): void {\n this.formDisabled.set(disabled);\n }\n\n reset(): void {\n this.indeterminate.set(false);\n this.setChecked(false);\n }\n\n toggle(): void {\n if (this.effectiveDisabled()) return;\n if (this.indeterminate()) this.indeterminate.set(false);\n this.setChecked(!this.checked());\n this.focus();\n }\n\n protected handleChange(event: Event): void {\n if (this.effectiveDisabled()) return;\n const inputElement = event.target as HTMLInputElement;\n if (this.indeterminate()) this.indeterminate.set(false);\n this.setChecked(inputElement.checked);\n this.changed.emit({\n originalEvent: event,\n checked: inputElement.checked,\n indeterminate: false,\n value: this.value(),\n });\n }\n\n protected handleBlur(event: FocusEvent): void {\n this.touch.emit();\n this.onTouched();\n this.blurred.emit(event);\n }\n\n private setChecked(checked: boolean): void {\n if (this.checked() === checked) return;\n this.checked.set(checked);\n this.checkedInput.emit(checked);\n this.onChange(checked);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAwBA,IAAI,UAAU,GAAG,CAAC;MA+DL,aAAa,CAAA;IACP,YAAY,GAAG,SAAS,CAA+B,eAAe;qFAAC;AACvE,IAAA,WAAW,GAAG,CAAA,eAAA,EAAkB,EAAE,UAAU,EAAE;IAC9C,YAAY,GAAG,MAAM,CAAC,KAAK;qFAAC;AACrC,IAAA,QAAQ,GAA6B,MAAM,SAAS;AACpD,IAAA,SAAS,GAAe,MAAM,SAAS;IAEtC,OAAO,GAAG,KAAK,CAAC,KAAK;gFAAC;IACtB,aAAa,GAAG,KAAK,CAAC,KAAK;sFAAC;IAC5B,OAAO,GAAG,KAAK,CAAC,EAAE;gFAAC;IACnB,IAAI,GAAG,KAAK,CAAC,EAAE;6EAAC;IAChB,KAAK,GAAG,KAAK,CAAC,IAAI;8EAAC;IACnB,KAAK,GAAG,KAAK,CAAC,EAAE;8EAAC;AACjB,IAAA,SAAS,GAAG,KAAK;6FAAU;AAC3B,IAAA,cAAc,GAAG,KAAK;kGAAU;AAChC,IAAA,eAAe,GAAG,KAAK;mGAAU;IACjC,IAAI,GAAG,KAAK,CAAoB,IAAI;6EAAC;IACrC,aAAa,GAAG,KAAK,CAA6B,KAAK;sFAAC;IACxD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACvD,QAAQ,GAAG,KAAK,CAAC,CAAC;iFAAC;IAEnB,YAAY,GAAG,MAAM,EAAW;IAChC,OAAO,GAAG,MAAM,EAA4B;IAC5C,OAAO,GAAG,MAAM,EAAc;IAC9B,O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A,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACxFzF;;AAEG;;;;"}
@@ -0,0 +1,200 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { Directive, inject, TemplateRef, input, booleanAttribute, model, output, contentChild, signal, computed, Component } from '@angular/core';
4
+
5
+ class AerisChipLeading {
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisChipLeading, deps: [], target: i0.ɵɵFactoryTarget.Directive });
7
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: AerisChipLeading, isStandalone: true, selector: "[aerisChipLeading]", host: { attributes: { "aria-hidden": "true" }, properties: { "style.inline-size": "\"100%\"", "style.block-size": "\"100%\"" }, classAttribute: "aeris-chip__leading" }, ngImport: i0 });
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisChipLeading, decorators: [{
10
+ type: Directive,
11
+ args: [{
12
+ selector: '[aerisChipLeading]',
13
+ host: {
14
+ class: 'aeris-chip__leading',
15
+ 'aria-hidden': 'true',
16
+ '[style.inline-size]': '"100%"',
17
+ '[style.block-size]': '"100%"',
18
+ },
19
+ }]
20
+ }] });
21
+ class AerisChipRemoveIconTemplate {
22
+ template = inject(TemplateRef);
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisChipRemoveIconTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
24
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: AerisChipRemoveIconTemplate, isStandalone: true, selector: "ng-template[aerisChipRemoveIcon]", ngImport: i0 });
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisChipRemoveIconTemplate, decorators: [{
27
+ type: Directive,
28
+ args: [{ selector: 'ng-template[aerisChipRemoveIcon]' }]
29
+ }] });
30
+ class AerisChip {
31
+ label = input('', /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
33
+ imageSrc = input('', /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "imageSrc" }] : /* istanbul ignore next */ []));
35
+ imageAlt = input('', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "imageAlt" }] : /* istanbul ignore next */ []));
37
+ removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
38
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
39
+ size = input('md', /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
41
+ variant = input('soft', /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
43
+ tone = input('neutral', /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
45
+ shape = input('pill', /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
47
+ removeAriaLabel = input('', /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "removeAriaLabel" }] : /* istanbul ignore next */ []));
49
+ ariaLabel = input('', /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
51
+ ariaLabelledBy = input('', /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
53
+ visible = model(true, /* @ts-ignore */
54
+ ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
55
+ removed = output();
56
+ removeIconTemplate = contentChild(AerisChipRemoveIconTemplate, /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "removeIconTemplate" }] : /* istanbul ignore next */ []));
58
+ failedImageSrc = signal('', /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "failedImageSrc" }] : /* istanbul ignore next */ []));
60
+ showImage = computed(() => !!this.imageSrc() && this.failedImageSrc() !== this.imageSrc(), /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "showImage" }] : /* istanbul ignore next */ []));
62
+ resolvedImageAlt = computed(() => this.label() || this.ariaLabel() || this.ariaLabelledBy() ? '' : this.imageAlt(), /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "resolvedImageAlt" }] : /* istanbul ignore next */ []));
64
+ resolvedRemoveAriaLabel = computed(() => this.removeAriaLabel() || (this.label() ? `Remove ${this.label()}` : 'Remove chip'), /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "resolvedRemoveAriaLabel" }] : /* istanbul ignore next */ []));
66
+ semanticRole = computed(() => this.ariaLabel() || this.ariaLabelledBy() ? 'group' : null, /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "semanticRole" }] : /* istanbul ignore next */ []));
68
+ removeIconContext = computed(() => ({
69
+ $implicit: this,
70
+ disabled: this.disabled(),
71
+ }), /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "removeIconContext" }] : /* istanbul ignore next */ []));
73
+ remove(originalEvent = null) {
74
+ if (!this.removable() || this.disabled() || !this.visible())
75
+ return;
76
+ this.visible.set(false);
77
+ this.removed.emit({ originalEvent, label: this.label() });
78
+ }
79
+ handleRemoveKeydown(event) {
80
+ if (event.key !== 'Backspace' && event.key !== 'Delete')
81
+ return;
82
+ event.preventDefault();
83
+ this.remove(event);
84
+ }
85
+ handleImageError() {
86
+ this.failedImageSrc.set(this.imageSrc());
87
+ }
88
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisChip, deps: [], target: i0.ɵɵFactoryTarget.Component });
89
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AerisChip, isStandalone: true, selector: "aeris-chip", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, removeAriaLabel: { classPropertyName: "removeAriaLabel", publicName: "removeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", removed: "removed" }, host: { properties: { "attr.data-visible": "visible() || null", "attr.data-size": "size()", "attr.data-variant": "variant()", "attr.data-tone": "tone()", "attr.data-shape": "shape()", "attr.data-removable": "removable() || null", "attr.data-disabled": "disabled() || null", "attr.role": "semanticRole()", "attr.aria-label": "semanticRole() ? ariaLabel() || label() || null : null", "attr.aria-labelledby": "semanticRole() ? ariaLabelledBy() || null : null", "attr.aria-disabled": "disabled() || null", "attr.aria-hidden": "visible() ? null : \"true\"" }, classAttribute: "aeris-chip" }, queries: [{ propertyName: "removeIconTemplate", first: true, predicate: AerisChipRemoveIconTemplate, descendants: true, isSignal: true }], ngImport: i0, template: `
90
+ @if (visible()) {
91
+ @if (showImage()) {
92
+ <img
93
+ class="aeris-chip__image"
94
+ [src]="imageSrc()"
95
+ [alt]="resolvedImageAlt()"
96
+ loading="lazy"
97
+ decoding="async"
98
+ draggable="false"
99
+ (error)="handleImageError()"
100
+ />
101
+ }
102
+
103
+ <span class="aeris-chip__leading"><ng-content select="[aerisChipLeading]" /></span>
104
+
105
+ @if (label()) {
106
+ <span class="aeris-chip__label">{{ label() }}</span>
107
+ }
108
+
109
+ <span class="aeris-chip__content"><ng-content /></span>
110
+
111
+ @if (removable()) {
112
+ <button
113
+ class="aeris-chip__remove"
114
+ type="button"
115
+ [disabled]="disabled()"
116
+ [attr.aria-label]="resolvedRemoveAriaLabel()"
117
+ (click)="remove($event)"
118
+ (keydown)="handleRemoveKeydown($event)"
119
+ >
120
+ @if (removeIconTemplate(); as template) {
121
+ <ng-container
122
+ [ngTemplateOutlet]="template.template"
123
+ [ngTemplateOutletContext]="removeIconContext()"
124
+ />
125
+ } @else {
126
+ <span class="aeris-chip__remove-icon" aria-hidden="true"></span>
127
+ }
128
+ </button>
129
+ }
130
+ }
131
+ `, isInline: true, styles: [":host,.aeris-chip,.aeris-chip *{box-sizing:border-box}:host(.aeris-chip){--_aeris-chip-accent: var(--aeris-text-2, #555555);--_aeris-chip-height: var( --aeris-chip-height, calc(var(--aeris-control-height, 2.625rem) - .5rem) );max-inline-size:100%;min-inline-size:0;min-block-size:var(--_aeris-chip-height);display:inline-flex;align-items:center;gap:var(--aeris-chip-gap, calc(var(--aeris-density-gap, .5rem) * .75));padding-block:var(--aeris-chip-padding-block, .25rem);padding-inline:var(--aeris-chip-padding-inline, .75rem);border:1px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:color-mix(in srgb,var(--_aeris-chip-accent) 12%,var(--aeris-surface, #fff));color:color-mix(in srgb,var(--_aeris-chip-accent) 76%,var(--aeris-text, #222222));font:inherit;font-size:var(--aeris-chip-font-size, .8125rem);font-weight:var(--aeris-chip-font-weight, 650);line-height:1.3;vertical-align:middle}:host(.aeris-chip:not([data-visible=true])){display:none}:host(.aeris-chip[data-size=sm]){--_aeris-chip-height: var( --aeris-chip-sm-height, calc(var(--aeris-control-height, 2.625rem) - .875rem) );padding-inline:var(--aeris-chip-sm-padding-inline, .625rem);font-size:var(--aeris-chip-sm-font-size, .75rem)}:host(.aeris-chip[data-size=lg]){--_aeris-chip-height: var( --aeris-chip-lg-height, calc(var(--aeris-control-height, 2.625rem) + .125rem) );padding-inline:var(--aeris-chip-lg-padding-inline, .875rem);font-size:var(--aeris-chip-lg-font-size, .875rem)}:host(.aeris-chip[data-shape=rounded]){border-radius:min(var(--aeris-chip-radius, var(--aeris-radius-md, .6875rem)),1rem)}:host(.aeris-chip[data-variant=outline]){border-color:color-mix(in srgb,var(--_aeris-chip-accent) 42%,var(--aeris-border, #deddd7));background:transparent}:host(.aeris-chip[data-tone=primary]){--_aeris-chip-accent: var(--aeris-primary, #879566)}:host(.aeris-chip[data-tone=success]){--_aeris-chip-accent: var(--aeris-success, #6f8a68)}:host(.aeris-chip[data-tone=info]){--_aeris-chip-accent: var(--aeris-info, #6b8793)}:host(.aeris-chip[data-tone=warning]){--_aeris-chip-accent: var(--aeris-warning, #c38600)}:host(.aeris-chip[data-tone=danger]){--_aeris-chip-accent: var(--aeris-danger, #c81e2a)}:host(.aeris-chip[data-disabled=true]){opacity:var(--aeris-disabled-opacity, .52)}.aeris-chip__image{flex:0 0 auto;inline-size:calc(var(--_aeris-chip-height) - .5rem);block-size:calc(var(--_aeris-chip-height) - .5rem);max-inline-size:none;max-block-size:none;margin-inline-start:calc(var(--aeris-chip-padding-inline, .75rem) * -.55);border:0;border-radius:50%;object-fit:cover;pointer-events:none;-webkit-user-select:none;user-select:none}.aeris-chip__leading{flex:0 0 auto;inline-size:var(--aeris-chip-icon-size, var(--aeris-icon-size, 1rem));block-size:var(--aeris-chip-icon-size, var(--aeris-icon-size, 1rem));display:grid;place-items:center}.aeris-chip__leading>svg{inline-size:100%;block-size:100%}.aeris-chip__leading:empty{display:none}.aeris-chip__label,.aeris-chip__content{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aeris-chip__content:empty{display:none}.aeris-chip__remove{flex:0 0 auto;inline-size:var(--aeris-chip-remove-size, 1.25rem);block-size:var(--aeris-chip-remove-size, 1.25rem);display:grid;place-items:center;margin-inline-end:calc(var(--aeris-chip-padding-inline, .75rem) * -.45);padding:0;border:0;border-radius:50%;background:transparent;color:inherit;font:inherit;cursor:pointer;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}.aeris-chip__remove:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent)}.aeris-chip__remove:focus-visible{outline:2px solid var(--aeris-focus, #59674b);outline-offset:2px}.aeris-chip__remove:disabled{cursor:not-allowed}.aeris-chip__remove-icon{inline-size:var(--aeris-chip-remove-icon-size, .75rem);block-size:var(--aeris-chip-remove-icon-size, .75rem);display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}@media(prefers-reduced-motion:reduce){:host(.aeris-chip),.aeris-chip__remove{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
132
+ }
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisChip, decorators: [{
134
+ type: Component,
135
+ args: [{ selector: 'aeris-chip', imports: [NgTemplateOutlet], template: `
136
+ @if (visible()) {
137
+ @if (showImage()) {
138
+ <img
139
+ class="aeris-chip__image"
140
+ [src]="imageSrc()"
141
+ [alt]="resolvedImageAlt()"
142
+ loading="lazy"
143
+ decoding="async"
144
+ draggable="false"
145
+ (error)="handleImageError()"
146
+ />
147
+ }
148
+
149
+ <span class="aeris-chip__leading"><ng-content select="[aerisChipLeading]" /></span>
150
+
151
+ @if (label()) {
152
+ <span class="aeris-chip__label">{{ label() }}</span>
153
+ }
154
+
155
+ <span class="aeris-chip__content"><ng-content /></span>
156
+
157
+ @if (removable()) {
158
+ <button
159
+ class="aeris-chip__remove"
160
+ type="button"
161
+ [disabled]="disabled()"
162
+ [attr.aria-label]="resolvedRemoveAriaLabel()"
163
+ (click)="remove($event)"
164
+ (keydown)="handleRemoveKeydown($event)"
165
+ >
166
+ @if (removeIconTemplate(); as template) {
167
+ <ng-container
168
+ [ngTemplateOutlet]="template.template"
169
+ [ngTemplateOutletContext]="removeIconContext()"
170
+ />
171
+ } @else {
172
+ <span class="aeris-chip__remove-icon" aria-hidden="true"></span>
173
+ }
174
+ </button>
175
+ }
176
+ }
177
+ `, host: {
178
+ class: 'aeris-chip',
179
+ '[attr.data-visible]': 'visible() || null',
180
+ '[attr.data-size]': 'size()',
181
+ '[attr.data-variant]': 'variant()',
182
+ '[attr.data-tone]': 'tone()',
183
+ '[attr.data-shape]': 'shape()',
184
+ '[attr.data-removable]': 'removable() || null',
185
+ '[attr.data-disabled]': 'disabled() || null',
186
+ '[attr.role]': 'semanticRole()',
187
+ '[attr.aria-label]': 'semanticRole() ? ariaLabel() || label() || null : null',
188
+ '[attr.aria-labelledby]': 'semanticRole() ? ariaLabelledBy() || null : null',
189
+ '[attr.aria-disabled]': 'disabled() || null',
190
+ '[attr.aria-hidden]': 'visible() ? null : "true"',
191
+ }, styles: [":host,.aeris-chip,.aeris-chip *{box-sizing:border-box}:host(.aeris-chip){--_aeris-chip-accent: var(--aeris-text-2, #555555);--_aeris-chip-height: var( --aeris-chip-height, calc(var(--aeris-control-height, 2.625rem) - .5rem) );max-inline-size:100%;min-inline-size:0;min-block-size:var(--_aeris-chip-height);display:inline-flex;align-items:center;gap:var(--aeris-chip-gap, calc(var(--aeris-density-gap, .5rem) * .75));padding-block:var(--aeris-chip-padding-block, .25rem);padding-inline:var(--aeris-chip-padding-inline, .75rem);border:1px solid transparent;border-radius:var(--aeris-radius-pill, 999px);background:color-mix(in srgb,var(--_aeris-chip-accent) 12%,var(--aeris-surface, #fff));color:color-mix(in srgb,var(--_aeris-chip-accent) 76%,var(--aeris-text, #222222));font:inherit;font-size:var(--aeris-chip-font-size, .8125rem);font-weight:var(--aeris-chip-font-weight, 650);line-height:1.3;vertical-align:middle}:host(.aeris-chip:not([data-visible=true])){display:none}:host(.aeris-chip[data-size=sm]){--_aeris-chip-height: var( --aeris-chip-sm-height, calc(var(--aeris-control-height, 2.625rem) - .875rem) );padding-inline:var(--aeris-chip-sm-padding-inline, .625rem);font-size:var(--aeris-chip-sm-font-size, .75rem)}:host(.aeris-chip[data-size=lg]){--_aeris-chip-height: var( --aeris-chip-lg-height, calc(var(--aeris-control-height, 2.625rem) + .125rem) );padding-inline:var(--aeris-chip-lg-padding-inline, .875rem);font-size:var(--aeris-chip-lg-font-size, .875rem)}:host(.aeris-chip[data-shape=rounded]){border-radius:min(var(--aeris-chip-radius, var(--aeris-radius-md, .6875rem)),1rem)}:host(.aeris-chip[data-variant=outline]){border-color:color-mix(in srgb,var(--_aeris-chip-accent) 42%,var(--aeris-border, #deddd7));background:transparent}:host(.aeris-chip[data-tone=primary]){--_aeris-chip-accent: var(--aeris-primary, #879566)}:host(.aeris-chip[data-tone=success]){--_aeris-chip-accent: var(--aeris-success, #6f8a68)}:host(.aeris-chip[data-tone=info]){--_aeris-chip-accent: var(--aeris-info, #6b8793)}:host(.aeris-chip[data-tone=warning]){--_aeris-chip-accent: var(--aeris-warning, #c38600)}:host(.aeris-chip[data-tone=danger]){--_aeris-chip-accent: var(--aeris-danger, #c81e2a)}:host(.aeris-chip[data-disabled=true]){opacity:var(--aeris-disabled-opacity, .52)}.aeris-chip__image{flex:0 0 auto;inline-size:calc(var(--_aeris-chip-height) - .5rem);block-size:calc(var(--_aeris-chip-height) - .5rem);max-inline-size:none;max-block-size:none;margin-inline-start:calc(var(--aeris-chip-padding-inline, .75rem) * -.55);border:0;border-radius:50%;object-fit:cover;pointer-events:none;-webkit-user-select:none;user-select:none}.aeris-chip__leading{flex:0 0 auto;inline-size:var(--aeris-chip-icon-size, var(--aeris-icon-size, 1rem));block-size:var(--aeris-chip-icon-size, var(--aeris-icon-size, 1rem));display:grid;place-items:center}.aeris-chip__leading>svg{inline-size:100%;block-size:100%}.aeris-chip__leading:empty{display:none}.aeris-chip__label,.aeris-chip__content{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aeris-chip__content:empty{display:none}.aeris-chip__remove{flex:0 0 auto;inline-size:var(--aeris-chip-remove-size, 1.25rem);block-size:var(--aeris-chip-remove-size, 1.25rem);display:grid;place-items:center;margin-inline-end:calc(var(--aeris-chip-padding-inline, .75rem) * -.45);padding:0;border:0;border-radius:50%;background:transparent;color:inherit;font:inherit;cursor:pointer;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}.aeris-chip__remove:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent)}.aeris-chip__remove:focus-visible{outline:2px solid var(--aeris-focus, #59674b);outline-offset:2px}.aeris-chip__remove:disabled{cursor:not-allowed}.aeris-chip__remove-icon{inline-size:var(--aeris-chip-remove-icon-size, .75rem);block-size:var(--aeris-chip-remove-icon-size, .75rem);display:block;background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}@media(prefers-reduced-motion:reduce){:host(.aeris-chip),.aeris-chip__remove{transition:none}}\n"] }]
192
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], imageSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageSrc", required: false }] }], imageAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageAlt", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], removeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeAriaLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], removed: [{ type: i0.Output, args: ["removed"] }], removeIconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisChipRemoveIconTemplate), { isSignal: true }] }] } });
193
+ const AerisChipModule = [AerisChip, AerisChipLeading, AerisChipRemoveIconTemplate];
194
+
195
+ /**
196
+ * Generated bundle index. Do not edit.
197
+ */
198
+
199
+ export { AerisChip, AerisChipLeading, AerisChipModule, AerisChipRemoveIconTemplate };
200
+ //# sourceMappingURL=aeris-ui-core-chip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aeris-ui-core-chip.mjs","sources":["../../../projects/aeris-ui/chip/aeris-chip.ts","../../../projects/aeris-ui/chip/aeris-ui-core-chip.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n Directive,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\n\nexport type AerisChipSize = 'sm' | 'md' | 'lg';\nexport type AerisChipVariant = 'soft' | 'outline';\nexport type AerisChipTone = 'primary' | 'neutral' | 'success' | 'info' | 'warning' | 'danger';\nexport type AerisChipShape = 'pill' | 'rounded';\n\nexport interface AerisChipRemoveEvent {\n readonly originalEvent: Event | null;\n readonly label: string;\n}\n\nexport interface AerisChipRemoveIconContext {\n readonly $implicit: AerisChip;\n readonly disabled: boolean;\n}\n\n@Directive({\n selector: '[aerisChipLeading]',\n host: {\n class: 'aeris-chip__leading',\n 'aria-hidden': 'true',\n '[style.inline-size]': '\"100%\"',\n '[style.block-size]': '\"100%\"',\n },\n})\nexport class AerisChipLeading {}\n\n@Directive({ selector: 'ng-template[aerisChipRemoveIcon]' })\nexport class AerisChipRemoveIconTemplate {\n readonly template = inject<TemplateRef<AerisChipRemoveIconContext>>(TemplateRef);\n}\n\n@Component({\n selector: 'aeris-chip',\n imports: [NgTemplateOutlet],\n template: `\n @if (visible()) {\n @if (showImage()) {\n <img\n class=\"aeris-chip__image\"\n [src]=\"imageSrc()\"\n [alt]=\"resolvedImageAlt()\"\n loading=\"lazy\"\n decoding=\"async\"\n draggable=\"false\"\n (error)=\"handleImageError()\"\n />\n }\n\n <span class=\"aeris-chip__leading\"><ng-content select=\"[aerisChipLeading]\" /></span>\n\n @if (label()) {\n <span class=\"aeris-chip__label\">{{ label() }}</span>\n }\n\n <span class=\"aeris-chip__content\"><ng-content /></span>\n\n @if (removable()) {\n <button\n class=\"aeris-chip__remove\"\n type=\"button\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"resolvedRemoveAriaLabel()\"\n (click)=\"remove($event)\"\n (keydown)=\"handleRemoveKeydown($event)\"\n >\n @if (removeIconTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.template\"\n [ngTemplateOutletContext]=\"removeIconContext()\"\n />\n } @else {\n <span class=\"aeris-chip__remove-icon\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n }\n `,\n styleUrl: './aeris-chip.scss',\n host: {\n class: 'aeris-chip',\n '[attr.data-visible]': 'visible() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-variant]': 'variant()',\n '[attr.data-tone]': 'tone()',\n '[attr.data-shape]': 'shape()',\n '[attr.data-removable]': 'removable() || null',\n '[attr.data-disabled]': 'disabled() || null',\n '[attr.role]': 'semanticRole()',\n '[attr.aria-label]': 'semanticRole() ? ariaLabel() || label() || null : null',\n '[attr.aria-labelledby]': 'semanticRole() ? ariaLabelledBy() || null : null',\n '[attr.aria-disabled]': 'disabled() || null',\n '[attr.aria-hidden]': 'visible() ? null : \"true\"',\n },\n})\nexport class AerisChip {\n readonly label = input('');\n readonly imageSrc = input('');\n readonly imageAlt = input('');\n readonly removable = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly size = input<AerisChipSize>('md');\n readonly variant = input<AerisChipVariant>('soft');\n readonly tone = input<AerisChipTone>('neutral');\n readonly shape = input<AerisChipShape>('pill');\n readonly removeAriaLabel = input('');\n readonly ariaLabel = input('');\n readonly ariaLabelledBy = input('');\n readonly visible = model(true);\n\n readonly removed = output<AerisChipRemoveEvent>();\n\n protected readonly removeIconTemplate = contentChild(AerisChipRemoveIconTemplate);\n private readonly failedImageSrc = signal('');\n protected readonly showImage = computed(\n () => !!this.imageSrc() && this.failedImageSrc() !== this.imageSrc(),\n );\n protected readonly resolvedImageAlt = computed(() =>\n this.label() || this.ariaLabel() || this.ariaLabelledBy() ? '' : this.imageAlt(),\n );\n protected readonly resolvedRemoveAriaLabel = computed(\n () => this.removeAriaLabel() || (this.label() ? `Remove ${this.label()}` : 'Remove chip'),\n );\n protected readonly semanticRole = computed(() =>\n this.ariaLabel() || this.ariaLabelledBy() ? 'group' : null,\n );\n protected readonly removeIconContext = computed<AerisChipRemoveIconContext>(() => ({\n $implicit: this,\n disabled: this.disabled(),\n }));\n\n remove(originalEvent: Event | null = null): void {\n if (!this.removable() || this.disabled() || !this.visible()) return;\n this.visible.set(false);\n this.removed.emit({ originalEvent, label: this.label() });\n }\n\n protected handleRemoveKeydown(event: KeyboardEvent): void {\n if (event.key !== 'Backspace' && event.key !== 'Delete') return;\n event.preventDefault();\n this.remove(event);\n }\n\n protected handleImageError(): void {\n this.failedImageSrc.set(this.imageSrc());\n }\n}\n\nexport const AerisChipModule = [AerisChip, AerisChipLeading, AerisChipRemoveIconTemplate] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAuCa,gBAAgB,CAAA;uGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,aAAA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AA,UAAA,EAAA,CAAA;kBA/DrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,OAAA,EACb,CAAC,gBAAgB,CAAC,EAAA,QAAA,EACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CT,EAAA,IAAA,EAEK;AACJ,wBAAA,KAAK,EAAE,YAAY;AACnB,wBAAA,qBAAqB,EAAE,mBAAmB;AAC1C,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,uBAAuB,EAAE,qBAAqB;AAC9C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,aAAa,EAAE,gBAAgB;AAC/B,wBAAA,mBAAmB,EAAE,wDAAwD;AAC7E,wBAAA,wBAAwB,EAAE,kDAAkD;AAC5E,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,oBAAoB,EAAE,2BAA2B;AAClD,qBAAA,EAAA,MAAA,EAAA,CAAA,ojIAAA,CAAA,EAAA;s6CAmBoD,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;AAoC3E,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,gBAAgB,EAAE,2BAA2B;;AClKxF;;AAEG;;;;"}
@@ -0,0 +1,67 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, ElementRef, Renderer2, effect, Directive } from '@angular/core';
3
+
4
+ class AerisClassNamesDirective {
5
+ value = input(null, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: 'aerisClassNames' });
6
+ element = inject(ElementRef).nativeElement;
7
+ renderer = inject(Renderer2);
8
+ initialClasses = new Set(this.tokenize(this.element.getAttribute('class') ?? ''));
9
+ appliedClasses = new Set();
10
+ constructor() {
11
+ effect(() => this.apply(this.resolve(this.value())));
12
+ }
13
+ apply(nextClasses) {
14
+ for (const className of this.appliedClasses) {
15
+ if (!nextClasses.has(className) && !this.initialClasses.has(className)) {
16
+ this.renderer.removeClass(this.element, className);
17
+ }
18
+ }
19
+ for (const className of nextClasses) {
20
+ if (!this.appliedClasses.has(className)) {
21
+ this.renderer.addClass(this.element, className);
22
+ }
23
+ }
24
+ this.appliedClasses = new Set(nextClasses);
25
+ }
26
+ resolve(value, classes = new Set()) {
27
+ if (!value)
28
+ return classes;
29
+ if (typeof value === 'string') {
30
+ for (const className of this.tokenize(value))
31
+ classes.add(className);
32
+ return classes;
33
+ }
34
+ if (Array.isArray(value)) {
35
+ for (const entry of value)
36
+ this.resolve(entry, classes);
37
+ return classes;
38
+ }
39
+ for (const [classNames, enabled] of Object.entries(value)) {
40
+ if (!enabled)
41
+ continue;
42
+ for (const className of this.tokenize(classNames))
43
+ classes.add(className);
44
+ }
45
+ return classes;
46
+ }
47
+ tokenize(value) {
48
+ return value.split(/\s+/u).filter(Boolean);
49
+ }
50
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisClassNamesDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
51
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: AerisClassNamesDirective, isStandalone: true, selector: "[aerisClassNames]", inputs: { value: { classPropertyName: "value", publicName: "aerisClassNames", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["aerisClassNames"], ngImport: i0 });
52
+ }
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisClassNamesDirective, decorators: [{
54
+ type: Directive,
55
+ args: [{
56
+ selector: '[aerisClassNames]',
57
+ exportAs: 'aerisClassNames',
58
+ }]
59
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisClassNames", required: false }] }] } });
60
+ const AerisClassNamesModule = [AerisClassNamesDirective];
61
+
62
+ /**
63
+ * Generated bundle index. Do not edit.
64
+ */
65
+
66
+ export { AerisClassNamesDirective, AerisClassNamesModule };
67
+ //# sourceMappingURL=aeris-ui-core-class-names.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aeris-ui-core-class-names.mjs","sources":["../../../projects/aeris-ui/class-names/aeris-class-names.ts","../../../projects/aeris-ui/class-names/aeris-ui-core-class-names.ts"],"sourcesContent":["import { Directive, ElementRef, Renderer2, effect, inject, input } from '@angular/core';\n\nexport type AerisClassNamesMap = Readonly<Record<string, boolean | null | undefined>>;\nexport type AerisClassNamesValue =\n | string\n | AerisClassNamesMap\n | readonly AerisClassNamesValue[]\n | false\n | null\n | undefined;\n\n@Directive({\n selector: '[aerisClassNames]',\n exportAs: 'aerisClassNames',\n})\nexport class AerisClassNamesDirective {\n readonly value = input<AerisClassNamesValue>(null, { alias: 'aerisClassNames' });\n\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly initialClasses = new Set(\n this.tokenize(this.element.getAttribute('class') ?? ''),\n );\n private appliedClasses = new Set<string>();\n\n constructor() {\n effect(() => this.apply(this.resolve(this.value())));\n }\n\n private apply(nextClasses: ReadonlySet<string>): void {\n for (const className of this.appliedClasses) {\n if (!nextClasses.has(className) && !this.initialClasses.has(className)) {\n this.renderer.removeClass(this.element, className);\n }\n }\n\n for (const className of nextClasses) {\n if (!this.appliedClasses.has(className)) {\n this.renderer.addClass(this.element, className);\n }\n }\n\n this.appliedClasses = new Set(nextClasses);\n }\n\n private resolve(value: AerisClassNamesValue, classes = new Set<string>()): Set<string> {\n if (!value) return classes;\n\n if (typeof value === 'string') {\n for (const className of this.tokenize(value)) classes.add(className);\n return classes;\n }\n\n if (Array.isArray(value)) {\n for (const entry of value) this.resolve(entry, classes);\n return classes;\n }\n\n for (const [classNames, enabled] of Object.entries(value as AerisClassNamesMap)) {\n if (!enabled) continue;\n for (const className of this.tokenize(classNames)) classes.add(className);\n }\n\n return classes;\n }\n\n private tokenize(value: string): readonly string[] {\n return value.split(/\\s+/u).filter(Boolean);\n }\n}\n\nexport const AerisClassNamesModule = [AerisClassNamesDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAea,wBAAwB,CAAA;IAC1B,KAAK,GAAG,KAAK,CAAuB,IAAI,6EAAI,KAAK,EAAE,iBAAiB,EAAA,CAAG;AAE/D,IAAA,OAAO,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;AACnE,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;IAC5B,cAAc,GAAG,IAAI,GAAG,CACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CACxD;AACO,IAAA,cAAc,GAAG,IAAI,GAAG,EAAU;AAE1C,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACtD;AAEQ,IAAA,KAAK,CAAC,WAAgC,EAAA;AAC5C,QAAA,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,cAAc,EAAE;AAC3C,YAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;gBACtE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC;YACpD;QACF;AAEA,QAAA,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE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