@educarehq/solaris-ui 0.1.0 → 0.2.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 (393) hide show
  1. package/educarehq-solaris-ui.d.ts +5 -0
  2. package/esm2022/educarehq-solaris-ui.js +5 -0
  3. package/esm2022/educarehq-solaris-ui.js.map +1 -0
  4. package/esm2022/index.js +70 -0
  5. package/esm2022/index.js.map +1 -0
  6. package/esm2022/lib/components/actions/button/directives/button-icon.directive.js +17 -0
  7. package/esm2022/lib/components/actions/button/directives/button-icon.directive.js.map +1 -0
  8. package/esm2022/lib/components/actions/button/directives/button.directive.js +60 -0
  9. package/esm2022/lib/components/actions/button/directives/button.directive.js.map +1 -0
  10. package/esm2022/lib/components/actions/button/model/button.types.js +1 -0
  11. package/esm2022/lib/components/actions/button/model/button.types.js.map +1 -0
  12. package/esm2022/lib/components/actions/button-group/component/button-group.component.js +21 -0
  13. package/esm2022/lib/components/actions/button-group/component/button-group.component.js.map +1 -0
  14. package/esm2022/lib/components/actions/button-group/model/button-group.types.js +1 -0
  15. package/esm2022/lib/components/actions/button-group/model/button-group.types.js.map +1 -0
  16. package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js +17 -0
  17. package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js.map +1 -0
  18. package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js +58 -0
  19. package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js.map +1 -0
  20. package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js +1 -0
  21. package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js.map +1 -0
  22. package/esm2022/lib/components/data-display/badge/component/badge.component.js +24 -0
  23. package/esm2022/lib/components/data-display/badge/component/badge.component.js.map +1 -0
  24. package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js +17 -0
  25. package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js.map +1 -0
  26. package/esm2022/lib/components/data-display/badge/model/badge.types.js +1 -0
  27. package/esm2022/lib/components/data-display/badge/model/badge.types.js.map +1 -0
  28. package/esm2022/lib/components/data-display/card/component/card.component.js +20 -0
  29. package/esm2022/lib/components/data-display/card/component/card.component.js.map +1 -0
  30. package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js +17 -0
  31. package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js.map +1 -0
  32. package/esm2022/lib/components/data-display/card/directives/card-content.directive.js +17 -0
  33. package/esm2022/lib/components/data-display/card/directives/card-content.directive.js.map +1 -0
  34. package/esm2022/lib/components/data-display/card/directives/card-description.directive.js +17 -0
  35. package/esm2022/lib/components/data-display/card/directives/card-description.directive.js.map +1 -0
  36. package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js +19 -0
  37. package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js.map +1 -0
  38. package/esm2022/lib/components/data-display/card/directives/card-header.directive.js +17 -0
  39. package/esm2022/lib/components/data-display/card/directives/card-header.directive.js.map +1 -0
  40. package/esm2022/lib/components/data-display/card/directives/card-media.directive.js +17 -0
  41. package/esm2022/lib/components/data-display/card/directives/card-media.directive.js.map +1 -0
  42. package/esm2022/lib/components/data-display/card/directives/card-title.directive.js +17 -0
  43. package/esm2022/lib/components/data-display/card/directives/card-title.directive.js.map +1 -0
  44. package/esm2022/lib/components/data-display/card/model/card.types.js +1 -0
  45. package/esm2022/lib/components/data-display/card/model/card.types.js.map +1 -0
  46. package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js +18 -0
  47. package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js.map +1 -0
  48. package/esm2022/lib/components/feedback/alert/component/alert.component.js +90 -0
  49. package/esm2022/lib/components/feedback/alert/component/alert.component.js.map +1 -0
  50. package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js +17 -0
  51. package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js.map +1 -0
  52. package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js +17 -0
  53. package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js.map +1 -0
  54. package/esm2022/lib/components/feedback/alert/model/alert.types.js +1 -0
  55. package/esm2022/lib/components/feedback/alert/model/alert.types.js.map +1 -0
  56. package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js +69 -0
  57. package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js.map +1 -0
  58. package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js +1 -0
  59. package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js.map +1 -0
  60. package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js +227 -0
  61. package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js.map +1 -0
  62. package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js +1 -0
  63. package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js.map +1 -0
  64. package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js +441 -0
  65. package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js.map +1 -0
  66. package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js +1 -0
  67. package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js.map +1 -0
  68. package/esm2022/lib/components/forms/email-field/component/email-field.component.js +214 -0
  69. package/esm2022/lib/components/forms/email-field/component/email-field.component.js.map +1 -0
  70. package/esm2022/lib/components/forms/email-field/model/email-field.types.js +1 -0
  71. package/esm2022/lib/components/forms/email-field/model/email-field.types.js.map +1 -0
  72. package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js +69 -0
  73. package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js.map +1 -0
  74. package/esm2022/lib/components/forms/form-field/component/form-error.component.js +19 -0
  75. package/esm2022/lib/components/forms/form-field/component/form-error.component.js.map +1 -0
  76. package/esm2022/lib/components/forms/form-field/component/form-field.component.js +394 -0
  77. package/esm2022/lib/components/forms/form-field/component/form-field.component.js.map +1 -0
  78. package/esm2022/lib/components/forms/form-field/component/form-hint.component.js +18 -0
  79. package/esm2022/lib/components/forms/form-field/component/form-hint.component.js.map +1 -0
  80. package/esm2022/lib/components/forms/form-field/component/form-label.component.js +18 -0
  81. package/esm2022/lib/components/forms/form-field/component/form-label.component.js.map +1 -0
  82. package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js +14 -0
  83. package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js.map +1 -0
  84. package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js +17 -0
  85. package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js.map +1 -0
  86. package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js +17 -0
  87. package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js.map +1 -0
  88. package/esm2022/lib/components/forms/form-field/index.js +8 -0
  89. package/esm2022/lib/components/forms/form-field/index.js.map +1 -0
  90. package/esm2022/lib/components/forms/form-field/model/form-control.contract.js +3 -0
  91. package/esm2022/lib/components/forms/form-field/model/form-control.contract.js.map +1 -0
  92. package/esm2022/lib/components/forms/form-field/model/form-field.types.js +1 -0
  93. package/esm2022/lib/components/forms/form-field/model/form-field.types.js.map +1 -0
  94. package/esm2022/lib/components/forms/input/directives/input.directive.js +148 -0
  95. package/esm2022/lib/components/forms/input/directives/input.directive.js.map +1 -0
  96. package/esm2022/lib/components/forms/input/index.js +2 -0
  97. package/esm2022/lib/components/forms/input/index.js.map +1 -0
  98. package/esm2022/lib/components/forms/input/model/input.defaults.js +27 -0
  99. package/esm2022/lib/components/forms/input/model/input.defaults.js.map +1 -0
  100. package/esm2022/lib/components/forms/input/model/input.types.js +1 -0
  101. package/esm2022/lib/components/forms/input/model/input.types.js.map +1 -0
  102. package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js +1119 -0
  103. package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js.map +1 -0
  104. package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js +1 -0
  105. package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js.map +1 -0
  106. package/esm2022/lib/components/forms/option/component/option.component.js +149 -0
  107. package/esm2022/lib/components/forms/option/component/option.component.js.map +1 -0
  108. package/esm2022/lib/components/forms/option/directives/option-slots.directive.js +58 -0
  109. package/esm2022/lib/components/forms/option/directives/option-slots.directive.js.map +1 -0
  110. package/esm2022/lib/components/forms/option/index.js +3 -0
  111. package/esm2022/lib/components/forms/option/index.js.map +1 -0
  112. package/esm2022/lib/components/forms/option/model/option.types.js +1 -0
  113. package/esm2022/lib/components/forms/option/model/option.types.js.map +1 -0
  114. package/esm2022/lib/components/forms/option-group/component/option-group.component.js +103 -0
  115. package/esm2022/lib/components/forms/option-group/component/option-group.component.js.map +1 -0
  116. package/esm2022/lib/components/forms/option-group/index.js +2 -0
  117. package/esm2022/lib/components/forms/option-group/index.js.map +1 -0
  118. package/esm2022/lib/components/forms/option-group/model/option-group.types.js +1 -0
  119. package/esm2022/lib/components/forms/option-group/model/option-group.types.js.map +1 -0
  120. package/esm2022/lib/components/forms/password-field/component/password-field.component.js +299 -0
  121. package/esm2022/lib/components/forms/password-field/component/password-field.component.js.map +1 -0
  122. package/esm2022/lib/components/forms/password-field/model/password-field-constants.js +5 -0
  123. package/esm2022/lib/components/forms/password-field/model/password-field-constants.js.map +1 -0
  124. package/esm2022/lib/components/forms/password-field/model/password-field.types.js +1 -0
  125. package/esm2022/lib/components/forms/password-field/model/password-field.types.js.map +1 -0
  126. package/esm2022/lib/components/forms/password-field/model/password-policy.types.js +1 -0
  127. package/esm2022/lib/components/forms/password-field/model/password-policy.types.js.map +1 -0
  128. package/esm2022/lib/components/forms/password-field/model/password-strength.js +67 -0
  129. package/esm2022/lib/components/forms/password-field/model/password-strength.js.map +1 -0
  130. package/esm2022/lib/components/forms/password-field/validators/password.validator.js +45 -0
  131. package/esm2022/lib/components/forms/password-field/validators/password.validator.js.map +1 -0
  132. package/esm2022/lib/components/forms/radio/component/radio.component.js +219 -0
  133. package/esm2022/lib/components/forms/radio/component/radio.component.js.map +1 -0
  134. package/esm2022/lib/components/forms/radio/model/radio.types.js +1 -0
  135. package/esm2022/lib/components/forms/radio/model/radio.types.js.map +1 -0
  136. package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js +348 -0
  137. package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js.map +1 -0
  138. package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js +3 -0
  139. package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js.map +1 -0
  140. package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js +1 -0
  141. package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js.map +1 -0
  142. package/esm2022/lib/components/forms/select/component/select.component.js +819 -0
  143. package/esm2022/lib/components/forms/select/component/select.component.js.map +1 -0
  144. package/esm2022/lib/components/forms/select/model/select.types.js +1 -0
  145. package/esm2022/lib/components/forms/select/model/select.types.js.map +1 -0
  146. package/esm2022/lib/components/forms/switch/component/switch.component.js +211 -0
  147. package/esm2022/lib/components/forms/switch/component/switch.component.js.map +1 -0
  148. package/esm2022/lib/components/forms/switch/index.js +2 -0
  149. package/esm2022/lib/components/forms/switch/index.js.map +1 -0
  150. package/esm2022/lib/components/forms/switch/model/switch.types.js +1 -0
  151. package/esm2022/lib/components/forms/switch/model/switch.types.js.map +1 -0
  152. package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js +369 -0
  153. package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js.map +1 -0
  154. package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js +1 -0
  155. package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js.map +1 -0
  156. package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js +137 -0
  157. package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js.map +1 -0
  158. package/esm2022/lib/components/forms/textarea/model/textarea.types.js +1 -0
  159. package/esm2022/lib/components/forms/textarea/model/textarea.types.js.map +1 -0
  160. package/esm2022/lib/components/icon/component/solaris-icon.component.js +20 -0
  161. package/esm2022/lib/components/icon/component/solaris-icon.component.js.map +1 -0
  162. package/esm2022/lib/components/icon/index.js +2 -0
  163. package/esm2022/lib/components/icon/index.js.map +1 -0
  164. package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js +29 -0
  165. package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js.map +1 -0
  166. package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js +317 -0
  167. package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js.map +1 -0
  168. package/esm2022/lib/components/interaction/popover/directives/popover.directive.js +16 -0
  169. package/esm2022/lib/components/interaction/popover/directives/popover.directive.js.map +1 -0
  170. package/esm2022/lib/components/interaction/popover/index.js +4 -0
  171. package/esm2022/lib/components/interaction/popover/index.js.map +1 -0
  172. package/esm2022/lib/components/interaction/popover/model/popover-position.js +145 -0
  173. package/esm2022/lib/components/interaction/popover/model/popover-position.js.map +1 -0
  174. package/esm2022/lib/components/interaction/popover/model/popover.types.js +1 -0
  175. package/esm2022/lib/components/interaction/popover/model/popover.types.js.map +1 -0
  176. package/esm2022/lib/components/interaction/popover/token/popover.tokens.js +3 -0
  177. package/esm2022/lib/components/interaction/popover/token/popover.tokens.js.map +1 -0
  178. package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js +23 -0
  179. package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js.map +1 -0
  180. package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js +405 -0
  181. package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js.map +1 -0
  182. package/esm2022/lib/components/interaction/tooltip/index.js +3 -0
  183. package/esm2022/lib/components/interaction/tooltip/index.js.map +1 -0
  184. package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js +209 -0
  185. package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js.map +1 -0
  186. package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js +1 -0
  187. package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js.map +1 -0
  188. package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js +3 -0
  189. package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js.map +1 -0
  190. package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js +25 -0
  191. package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js.map +1 -0
  192. package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js +1 -0
  193. package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js.map +1 -0
  194. package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js +1 -0
  195. package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js.map +1 -0
  196. package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js +10 -0
  197. package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js.map +1 -0
  198. package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js +60 -0
  199. package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js.map +1 -0
  200. package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js +10 -0
  201. package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js.map +1 -0
  202. package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js +3 -0
  203. package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js.map +1 -0
  204. package/esm2022/lib/services/icon/icons/index.js +2 -0
  205. package/esm2022/lib/services/icon/icons/index.js.map +1 -0
  206. package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js +207 -0
  207. package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js.map +1 -0
  208. package/esm2022/lib/services/icon/index.js +5 -0
  209. package/esm2022/lib/services/icon/index.js.map +1 -0
  210. package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js +1 -0
  211. package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js.map +1 -0
  212. package/esm2022/lib/services/icon/model/solaris-icon.types.js +1 -0
  213. package/esm2022/lib/services/icon/model/solaris-icon.types.js.map +1 -0
  214. package/esm2022/lib/services/icon/provider/provide-solaris-icons.js +10 -0
  215. package/esm2022/lib/services/icon/provider/provide-solaris-icons.js.map +1 -0
  216. package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js +43 -0
  217. package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js.map +1 -0
  218. package/esm2022/lib/services/icon/token/solaris-icon.tokens.js +3 -0
  219. package/esm2022/lib/services/icon/token/solaris-icon.tokens.js.map +1 -0
  220. package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js +1 -0
  221. package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js.map +1 -0
  222. package/esm2022/lib/services/theme/model/solaris-theme.types.js +1 -0
  223. package/esm2022/lib/services/theme/model/solaris-theme.types.js.map +1 -0
  224. package/esm2022/lib/services/theme/provider/provide-solaris-theme.js +10 -0
  225. package/esm2022/lib/services/theme/provider/provide-solaris-theme.js.map +1 -0
  226. package/esm2022/lib/services/theme/service/solaris-theme.service.js +22 -0
  227. package/esm2022/lib/services/theme/service/solaris-theme.service.js.map +1 -0
  228. package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js +10 -0
  229. package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js.map +1 -0
  230. package/esm2022/lib/services/theme/token/solaris-theme.tokens.js +3 -0
  231. package/esm2022/lib/services/theme/token/solaris-theme.tokens.js.map +1 -0
  232. package/esm2022/lib/services/translation/index.js +6 -0
  233. package/esm2022/lib/services/translation/index.js.map +1 -0
  234. package/esm2022/lib/services/translation/model/solaris-locale.types.js +1 -0
  235. package/esm2022/lib/services/translation/model/solaris-locale.types.js.map +1 -0
  236. package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js +1 -0
  237. package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js.map +1 -0
  238. package/esm2022/lib/services/translation/model/solaris-translate-defaults.js +40 -0
  239. package/esm2022/lib/services/translation/model/solaris-translate-defaults.js.map +1 -0
  240. package/esm2022/lib/services/translation/model/solaris-translation.types.js +1 -0
  241. package/esm2022/lib/services/translation/model/solaris-translation.types.js.map +1 -0
  242. package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js +20 -0
  243. package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js.map +1 -0
  244. package/esm2022/lib/services/translation/provider/provide-solaris-translate.js +10 -0
  245. package/esm2022/lib/services/translation/provider/provide-solaris-translate.js.map +1 -0
  246. package/esm2022/lib/services/translation/service/solaris-translate.service.js +87 -0
  247. package/esm2022/lib/services/translation/service/solaris-translate.service.js.map +1 -0
  248. package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js +32 -0
  249. package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js.map +1 -0
  250. package/esm2022/lib/services/translation/token/solaris-translate.tokens.js +3 -0
  251. package/esm2022/lib/services/translation/token/solaris-translate.tokens.js.map +1 -0
  252. package/esm2022/lib/testing/provide-solaris-testing.js +11 -0
  253. package/esm2022/lib/testing/provide-solaris-testing.js.map +1 -0
  254. package/esm2022/lib/testing/solaris-test-utilities.js +12 -0
  255. package/esm2022/lib/testing/solaris-test-utilities.js.map +1 -0
  256. package/index.d.ts +106 -0
  257. package/lib/components/actions/button/directives/button-icon.directive.d.ts +5 -0
  258. package/lib/components/actions/button/directives/button.directive.d.ts +22 -0
  259. package/lib/components/actions/button/model/button.types.d.ts +5 -0
  260. package/lib/components/actions/button-group/component/button-group.component.d.ts +10 -0
  261. package/lib/components/actions/button-group/model/button-group.types.d.ts +2 -0
  262. package/lib/components/actions/icon-button/directives/icon-button-badge.directive.d.ts +5 -0
  263. package/lib/components/actions/icon-button/directives/icon-button.directive.d.ts +21 -0
  264. package/lib/components/actions/icon-button/model/icon-button.types.d.ts +5 -0
  265. package/lib/components/data-display/badge/component/badge.component.d.ts +12 -0
  266. package/lib/components/data-display/badge/directives/badge-icon.directive.d.ts +5 -0
  267. package/lib/components/data-display/badge/model/badge.types.d.ts +6 -0
  268. package/lib/components/data-display/card/component/card.component.d.ts +10 -0
  269. package/lib/components/data-display/card/directives/card-actions.directive.d.ts +5 -0
  270. package/lib/components/data-display/card/directives/card-content.directive.d.ts +5 -0
  271. package/lib/components/data-display/card/directives/card-description.directive.d.ts +5 -0
  272. package/lib/components/data-display/card/directives/card-footer.directive.d.ts +6 -0
  273. package/lib/components/data-display/card/directives/card-header.directive.d.ts +5 -0
  274. package/lib/components/data-display/card/directives/card-media.directive.d.ts +5 -0
  275. package/lib/components/data-display/card/directives/card-title.directive.d.ts +5 -0
  276. package/lib/components/data-display/card/model/card.types.d.ts +4 -0
  277. package/lib/components/feedback/alert/component/alert-actions.component.d.ts +5 -0
  278. package/lib/components/feedback/alert/component/alert.component.d.ts +26 -0
  279. package/lib/components/feedback/alert/directives/alert-description.directive.d.ts +5 -0
  280. package/lib/components/feedback/alert/directives/alert-title.directive.d.ts +5 -0
  281. package/lib/components/feedback/alert/model/alert.types.d.ts +5 -0
  282. package/lib/components/feedback/skeleton/component/skeleton.component.d.ts +17 -0
  283. package/lib/components/feedback/skeleton/model/skeleton.types.d.ts +5 -0
  284. package/lib/components/forms/checkbox/component/checkbox.component.d.ts +70 -0
  285. package/lib/components/forms/checkbox/model/checkbox.types.d.ts +5 -0
  286. package/lib/components/forms/checkbox-group/component/checkbox-group.component.d.ts +123 -0
  287. package/lib/components/forms/checkbox-group/model/checkbox-group.types.d.ts +5 -0
  288. package/lib/components/forms/email-field/component/email-field.component.d.ts +66 -0
  289. package/lib/components/forms/email-field/model/email-field.types.d.ts +6 -0
  290. package/lib/components/forms/email-field/validators/email-field.validators.d.ts +8 -0
  291. package/lib/components/forms/form-field/component/form-error.component.d.ts +5 -0
  292. package/lib/components/forms/form-field/component/form-field.component.d.ts +90 -0
  293. package/lib/components/forms/form-field/component/form-hint.component.d.ts +5 -0
  294. package/lib/components/forms/form-field/component/form-label.component.d.ts +5 -0
  295. package/lib/components/forms/form-field/directives/form-field-trigger.directive.d.ts +5 -0
  296. package/lib/components/forms/form-field/directives/form-prefix.directive.d.ts +5 -0
  297. package/lib/components/forms/form-field/directives/form-suffix.directive.d.ts +5 -0
  298. package/lib/components/forms/form-field/index.d.ts +8 -0
  299. package/lib/components/forms/form-field/model/form-control.contract.d.ts +11 -0
  300. package/lib/components/forms/form-field/model/form-field.types.d.ts +5 -0
  301. package/lib/components/forms/input/directives/input.directive.d.ts +37 -0
  302. package/lib/components/forms/input/index.d.ts +2 -0
  303. package/lib/components/forms/input/model/input.defaults.d.ts +2 -0
  304. package/lib/components/forms/input/model/input.types.d.ts +4 -0
  305. package/lib/components/forms/multi-select/component/multi-select.component.d.ts +202 -0
  306. package/lib/components/forms/multi-select/model/multi-select.types.d.ts +5 -0
  307. package/lib/components/forms/option/component/option.component.d.ts +58 -0
  308. package/lib/components/forms/option/directives/option-slots.directive.d.ts +21 -0
  309. package/lib/components/forms/option/index.d.ts +3 -0
  310. package/lib/components/forms/option/model/option.types.d.ts +3 -0
  311. package/lib/components/forms/option-group/component/option-group.component.d.ts +32 -0
  312. package/lib/components/forms/option-group/index.d.ts +2 -0
  313. package/lib/components/forms/option-group/model/option-group.types.d.ts +2 -0
  314. package/lib/components/forms/password-field/component/password-field.component.d.ts +81 -0
  315. package/lib/components/forms/password-field/model/password-field-constants.d.ts +4 -0
  316. package/lib/components/forms/password-field/model/password-field.types.d.ts +6 -0
  317. package/lib/components/forms/password-field/model/password-policy.types.d.ts +10 -0
  318. package/lib/components/forms/password-field/model/password-strength.d.ts +2 -0
  319. package/lib/components/forms/password-field/validators/password.validator.d.ts +3 -0
  320. package/lib/components/forms/radio/component/radio.component.d.ts +68 -0
  321. package/lib/components/forms/radio/model/radio.types.d.ts +4 -0
  322. package/lib/components/forms/radio-group/component/radio-group.component.d.ts +86 -0
  323. package/lib/components/forms/radio-group/model/radio-group.token.d.ts +2 -0
  324. package/lib/components/forms/radio-group/model/radio-group.types.d.ts +5 -0
  325. package/lib/components/forms/select/component/select.component.d.ts +158 -0
  326. package/lib/components/forms/select/model/select.types.d.ts +4 -0
  327. package/lib/components/forms/switch/component/switch.component.d.ts +66 -0
  328. package/lib/components/forms/switch/index.d.ts +2 -0
  329. package/lib/components/forms/switch/model/switch.types.d.ts +4 -0
  330. package/lib/components/forms/switch-group/component/switch-group.component.d.ts +91 -0
  331. package/lib/components/forms/switch-group/model/switch-group.types.d.ts +5 -0
  332. package/lib/components/forms/textarea/directives/textarea.directive.d.ts +37 -0
  333. package/lib/components/forms/textarea/model/textarea.types.d.ts +5 -0
  334. package/lib/components/icon/component/solaris-icon.component.d.ts +13 -0
  335. package/lib/components/icon/index.d.ts +1 -0
  336. package/lib/components/interaction/popover/component/popover-panel.component.d.ts +10 -0
  337. package/lib/components/interaction/popover/directives/popover-trigger.directive.d.ts +65 -0
  338. package/lib/components/interaction/popover/directives/popover.directive.d.ts +7 -0
  339. package/lib/components/interaction/popover/index.d.ts +4 -0
  340. package/lib/components/interaction/popover/model/popover-position.d.ts +4 -0
  341. package/lib/components/interaction/popover/model/popover.types.d.ts +7 -0
  342. package/lib/components/interaction/popover/token/popover.tokens.d.ts +12 -0
  343. package/lib/components/interaction/tooltip/component/tooltip-panel.component.d.ts +9 -0
  344. package/lib/components/interaction/tooltip/directive/tooltip.directive.d.ts +80 -0
  345. package/lib/components/interaction/tooltip/index.d.ts +3 -0
  346. package/lib/components/interaction/tooltip/model/tooltip-position.d.ts +5 -0
  347. package/lib/components/interaction/tooltip/model/tooltip.types.d.ts +22 -0
  348. package/lib/components/interaction/tooltip/token/tooltip.tokens.d.ts +21 -0
  349. package/lib/services/accessibility/directives/visually-hidden.directive.d.ts +5 -0
  350. package/lib/services/accessibility/model/solaris-accessibility-config.interface.d.ts +4 -0
  351. package/lib/services/accessibility/model/solaris-accessibility.types.d.ts +5 -0
  352. package/lib/services/accessibility/provider/provide-solaris-accessibility.d.ts +3 -0
  353. package/lib/services/accessibility/service/solaris-accessibility.service.d.ts +15 -0
  354. package/lib/services/accessibility/testing/solaris-accessibility-testing.provider.d.ts +3 -0
  355. package/lib/services/accessibility/token/solaris-accessibility.tokens.d.ts +3 -0
  356. package/lib/services/icon/icons/index.d.ts +1 -0
  357. package/lib/services/icon/icons/solaris-built-in-icons.d.ts +2 -0
  358. package/lib/services/icon/index.d.ts +8 -0
  359. package/lib/services/icon/model/solaris-icon-definition.interface.d.ts +36 -0
  360. package/lib/services/icon/model/solaris-icon.types.d.ts +4 -0
  361. package/lib/services/icon/provider/provide-solaris-icons.d.ts +3 -0
  362. package/lib/services/icon/service/solaris-icon-registry.service.d.ts +12 -0
  363. package/lib/services/icon/token/solaris-icon.tokens.d.ts +6 -0
  364. package/lib/services/theme/model/solaris-theme-config.interface.d.ts +5 -0
  365. package/lib/services/theme/model/solaris-theme.types.d.ts +3 -0
  366. package/lib/services/theme/provider/provide-solaris-theme.d.ts +3 -0
  367. package/lib/services/theme/service/solaris-theme.service.d.ts +9 -0
  368. package/lib/services/theme/testing/solaris-theme-testing.provider.d.ts +3 -0
  369. package/lib/services/theme/token/solaris-theme.tokens.d.ts +3 -0
  370. package/lib/services/translation/index.d.ts +8 -0
  371. package/lib/services/translation/model/solaris-locale.types.d.ts +4 -0
  372. package/lib/services/translation/model/solaris-translate-config.interface.d.ts +8 -0
  373. package/lib/services/translation/model/solaris-translate-defaults.d.ts +2 -0
  374. package/lib/services/translation/model/solaris-translation.types.d.ts +3 -0
  375. package/lib/services/translation/pipe/solaris-translate.pipe.d.ts +8 -0
  376. package/lib/services/translation/provider/provide-solaris-translate.d.ts +3 -0
  377. package/lib/services/translation/service/solaris-translate.service.d.ts +15 -0
  378. package/lib/services/translation/testing/solaris-translate-testing.provider.d.ts +3 -0
  379. package/lib/services/translation/token/solaris-translate.tokens.d.ts +3 -0
  380. package/lib/testing/provide-solaris-testing.d.ts +10 -0
  381. package/lib/testing/solaris-test-utilities.d.ts +3 -0
  382. package/package.json +9 -5
  383. package/styles/_button.scss +50 -220
  384. package/styles/_core.scss +37 -37
  385. package/styles/_icon-button.scss +43 -219
  386. package/styles/_index.scss +19 -19
  387. package/styles/_input.scss +255 -0
  388. package/styles/_popover.scss +68 -0
  389. package/styles/_theme.scss +36 -36
  390. package/styles/_tooltip.scss +3 -0
  391. package/fesm2022/educarehq-solaris-ui.mjs +0 -1047
  392. package/fesm2022/educarehq-solaris-ui.mjs.map +0 -1
  393. package/types/educarehq-solaris-ui.d.ts +0 -408
@@ -0,0 +1,369 @@
1
+ import { Component, input, output, computed, signal, effect, forwardRef, inject, ElementRef, ContentChildren, NgZone, } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { SolarisFormControl } from '../../form-field/model/form-control.contract';
4
+ import { SolarisTranslateService } from '../../../../services/translation';
5
+ import { SolarisSwitchComponent } from '../../switch';
6
+ import * as i0 from "@angular/core";
7
+ let nextId = 0;
8
+ function generateId() {
9
+ return `solaris-switch-group-${++nextId}`;
10
+ }
11
+ export class SolarisSwitchGroupComponent extends SolarisFormControl {
12
+ elementRef = inject(ElementRef);
13
+ translateService = inject(SolarisTranslateService);
14
+ ngZone = inject(NgZone);
15
+ switches;
16
+ orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
17
+ layout = input('list', ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
18
+ columns = input(1, ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
19
+ density = input(...(ngDevMode ? [undefined, { debugName: "density" }] : /* istanbul ignore next */ []));
20
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
21
+ disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
22
+ transform: (v) => v ?? false });
23
+ readonlyInput = input(false, { ...(ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {}), alias: 'readonly',
24
+ transform: (v) => v ?? false });
25
+ requiredInput = input(false, { ...(ngDevMode ? { debugName: "requiredInput" } : /* istanbul ignore next */ {}), alias: 'required',
26
+ transform: (v) => v ?? false });
27
+ invalidInput = input(undefined, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), alias: 'invalid' });
28
+ labelInput = input(undefined, { ...(ngDevMode ? { debugName: "labelInput" } : /* istanbul ignore next */ {}), alias: 'label' });
29
+ labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : /* istanbul ignore next */ []));
30
+ hintInput = input(undefined, { ...(ngDevMode ? { debugName: "hintInput" } : /* istanbul ignore next */ {}), alias: 'hint' });
31
+ hintKey = input(...(ngDevMode ? [undefined, { debugName: "hintKey" }] : /* istanbul ignore next */ []));
32
+ errorInput = input(undefined, { ...(ngDevMode ? { debugName: "errorInput" } : /* istanbul ignore next */ {}), alias: 'error' });
33
+ errorKey = input(...(ngDevMode ? [undefined, { debugName: "errorKey" }] : /* istanbul ignore next */ []));
34
+ minEnabled = input(...(ngDevMode ? [undefined, { debugName: "minEnabled" }] : /* istanbul ignore next */ []));
35
+ maxEnabled = input(...(ngDevMode ? [undefined, { debugName: "maxEnabled" }] : /* istanbul ignore next */ []));
36
+ ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
37
+ ariaLabelKey = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
38
+ valueChange = output();
39
+ // eslint-disable-next-line @angular-eslint/no-output-native
40
+ change = output();
41
+ _value = signal({}, ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
42
+ _focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
43
+ _describedByIds = signal([], ...(ngDevMode ? [{ debugName: "_describedByIds" }] : /* istanbul ignore next */ []));
44
+ cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
45
+ autoInvalid = signal(false, ...(ngDevMode ? [{ debugName: "autoInvalid" }] : /* istanbul ignore next */ []));
46
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
47
+ onChange = () => { };
48
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
49
+ onTouched = () => { };
50
+ switchSubscriptions = new Map();
51
+ contentInitialized = false;
52
+ switchQuerySubscription = null;
53
+ focusListenersAttached = false;
54
+ groupId = computed(() => {
55
+ // SECURITY_EXCEPTION: nativeElement.getAttribute('id') is the standard DOM API to check existing ID before generating one. Same approach used by Angular CDK and Solaris Checkbox/Radio groups.
56
+ return this.elementRef.nativeElement.getAttribute('id') || generateId();
57
+ }, ...(ngDevMode ? [{ debugName: "groupId" }] : /* istanbul ignore next */ []));
58
+ labelId = computed(() => `${this.groupId()}-label`, ...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
59
+ hintId = computed(() => `${this.groupId()}-hint`, ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
60
+ errorId = computed(() => `${this.groupId()}-error`, ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
61
+ columnsStr = computed(() => String(this.columns()), ...(ngDevMode ? [{ debugName: "columnsStr" }] : /* istanbul ignore next */ []));
62
+ effectiveDensity = computed(() => {
63
+ return this.density() ?? 'comfortable';
64
+ }, ...(ngDevMode ? [{ debugName: "effectiveDensity" }] : /* istanbul ignore next */ []));
65
+ isEffectivelyDisabled = computed(() => {
66
+ return this.disabledInput() || this.cvaDisabled();
67
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyDisabled" }] : /* istanbul ignore next */ []));
68
+ isEffectivelyReadonly = computed(() => {
69
+ return this.readonlyInput();
70
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyReadonly" }] : /* istanbul ignore next */ []));
71
+ isEffectivelyInvalid = computed(() => {
72
+ return this.invalidInput() ?? this.autoInvalid();
73
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyInvalid" }] : /* istanbul ignore next */ []));
74
+ isEffectivelyRequired = computed(() => {
75
+ return this.requiredInput();
76
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyRequired" }] : /* istanbul ignore next */ []));
77
+ labelText = computed(() => {
78
+ const key = this.labelKey();
79
+ if (key) {
80
+ const translated = this.translateService.translate(key);
81
+ return translated !== key ? translated : undefined;
82
+ }
83
+ return this.labelInput();
84
+ }, ...(ngDevMode ? [{ debugName: "labelText" }] : /* istanbul ignore next */ []));
85
+ hintText = computed(() => {
86
+ const key = this.hintKey();
87
+ if (key) {
88
+ const translated = this.translateService.translate(key);
89
+ return translated !== key ? translated : undefined;
90
+ }
91
+ return this.hintInput();
92
+ }, ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
93
+ errorText = computed(() => {
94
+ const key = this.errorKey();
95
+ if (key) {
96
+ const translated = this.translateService.translate(key);
97
+ return translated !== key ? translated : undefined;
98
+ }
99
+ return this.errorInput();
100
+ }, ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
101
+ effectiveAriaLabel = computed(() => {
102
+ const key = this.ariaLabelKey();
103
+ if (key) {
104
+ const translated = this.translateService.translate(key);
105
+ return translated !== key ? translated : undefined;
106
+ }
107
+ return this.ariaLabel();
108
+ }, ...(ngDevMode ? [{ debugName: "effectiveAriaLabel" }] : /* istanbul ignore next */ []));
109
+ ariaLabelledBy = computed(() => {
110
+ if (this.labelText()) {
111
+ return this.labelId();
112
+ }
113
+ return null;
114
+ }, ...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
115
+ ariaDescribedBy = computed(() => {
116
+ const customIds = this._describedByIds();
117
+ const ownIds = [];
118
+ if (this.hintText())
119
+ ownIds.push(this.hintId());
120
+ if (this.showError())
121
+ ownIds.push(this.errorId());
122
+ const all = [...customIds, ...ownIds];
123
+ return all.length > 0 ? all.join(' ') : null;
124
+ }, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
125
+ showError = computed(() => {
126
+ if (this.isEffectivelyInvalid()) {
127
+ return this.errorText() ?? null;
128
+ }
129
+ return null;
130
+ }, ...(ngDevMode ? [{ debugName: "showError" }] : /* istanbul ignore next */ []));
131
+ get id() {
132
+ return this.groupId();
133
+ }
134
+ get focused() {
135
+ return this._focused();
136
+ }
137
+ get disabled() {
138
+ return this.isEffectivelyDisabled();
139
+ }
140
+ get readonly() {
141
+ return this.isEffectivelyReadonly();
142
+ }
143
+ get invalid() {
144
+ return this.isEffectivelyInvalid();
145
+ }
146
+ get required() {
147
+ return this.isEffectivelyRequired();
148
+ }
149
+ get describedByIds() {
150
+ return this._describedByIds();
151
+ }
152
+ setDescribedByIds(ids) {
153
+ this._describedByIds.set([...ids]);
154
+ }
155
+ focus() {
156
+ const first = this.switches?.get(0);
157
+ if (first) {
158
+ first.focus();
159
+ }
160
+ }
161
+ writeValue(value) {
162
+ this._value.set(value ? { ...value } : {});
163
+ this.syncSwitchesToValue();
164
+ }
165
+ registerOnChange(fn) {
166
+ this.onChange = fn;
167
+ }
168
+ registerOnTouched(fn) {
169
+ this.onTouched = fn;
170
+ }
171
+ setDisabledState(isDisabled) {
172
+ this.cvaDisabled.set(isDisabled);
173
+ this.propagateDisabledToSwitches();
174
+ }
175
+ ngAfterContentInit() {
176
+ this.contentInitialized = true;
177
+ this.validateChildren();
178
+ this.attachFocusListeners();
179
+ this.initSwitches();
180
+ this.syncSwitchesToValue();
181
+ this.propagateDisabledToSwitches();
182
+ this.propagateReadonlyToSwitches();
183
+ this.switchQuerySubscription = this.switches.changes.subscribe(() => {
184
+ this.validateChildren();
185
+ this.initSwitches();
186
+ this.syncSwitchesToValue();
187
+ this.propagateDisabledToSwitches();
188
+ this.propagateReadonlyToSwitches();
189
+ });
190
+ }
191
+ ngOnDestroy() {
192
+ this.unsubscribeAllSwitches();
193
+ if (this.switchQuerySubscription) {
194
+ this.switchQuerySubscription.unsubscribe();
195
+ }
196
+ }
197
+ validateChildren() {
198
+ if (!this.switches)
199
+ return;
200
+ const keys = new Map();
201
+ this.switches.forEach((sw) => {
202
+ const key = sw.value();
203
+ if (key === null || key === undefined) {
204
+ console.warn(`[SolarisSwitchGroup] A <solaris-switch> child is missing a value attribute. ` +
205
+ `Each switch inside <solaris-switch-group> must have a unique value.`);
206
+ return;
207
+ }
208
+ if (keys.has(key)) {
209
+ console.warn(`[SolarisSwitchGroup] Duplicate value "${key}" detected among <solaris-switch> children. ` +
210
+ `Each switch value must be unique within the group.`);
211
+ }
212
+ keys.set(key, sw);
213
+ });
214
+ }
215
+ attachFocusListeners() {
216
+ if (this.focusListenersAttached)
217
+ return;
218
+ this.focusListenersAttached = true;
219
+ // SECURITY_EXCEPTION: nativeElement.focusin/focusout are standard DOM events for focus tracking. Same pattern used by Solaris FormField and Checkbox/Radio groups.
220
+ const native = this.elementRef.nativeElement;
221
+ this.ngZone.runOutsideAngular(() => {
222
+ native.addEventListener('focusin', () => {
223
+ this.ngZone.run(() => this._focused.set(true));
224
+ });
225
+ native.addEventListener('focusout', (e) => {
226
+ const related = e.relatedTarget;
227
+ if (related && native.contains(related))
228
+ return;
229
+ this.ngZone.run(() => {
230
+ this._focused.set(false);
231
+ this.onTouched();
232
+ });
233
+ });
234
+ });
235
+ }
236
+ initSwitches() {
237
+ this.unsubscribeAllSwitches();
238
+ this.switches.forEach((sw) => {
239
+ const sub = sw.checkedChange.subscribe((checked) => {
240
+ this.onChildCheckedChange(sw, checked);
241
+ });
242
+ this.switchSubscriptions.set(sw, sub);
243
+ });
244
+ }
245
+ unsubscribeAllSwitches() {
246
+ this.switchSubscriptions.forEach((sub) => sub.unsubscribe());
247
+ this.switchSubscriptions.clear();
248
+ }
249
+ onChildCheckedChange(child, checked) {
250
+ if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {
251
+ return;
252
+ }
253
+ const key = child.value();
254
+ if (key === null || key === undefined) {
255
+ return;
256
+ }
257
+ const currentValue = { ...this._value() };
258
+ currentValue[key] = checked;
259
+ this.updateValue(currentValue);
260
+ }
261
+ updateValue(newValue) {
262
+ this._value.set(newValue);
263
+ this.onChange(newValue);
264
+ this.valueChange.emit(newValue);
265
+ this.change.emit(newValue);
266
+ }
267
+ syncSwitchesToValue() {
268
+ if (!this.contentInitialized || !this.switches)
269
+ return;
270
+ const currentValue = this._value();
271
+ this.switches.forEach((sw) => {
272
+ const key = sw.value();
273
+ if (key === null || key === undefined) {
274
+ return;
275
+ }
276
+ sw.writeValue(currentValue[key]);
277
+ });
278
+ }
279
+ propagateDisabledToSwitches() {
280
+ if (!this.contentInitialized || !this.switches)
281
+ return;
282
+ const isDisabled = this.isEffectivelyDisabled();
283
+ this.switches.forEach((sw) => {
284
+ sw.setDisabledState(isDisabled);
285
+ });
286
+ }
287
+ propagateReadonlyToSwitches() {
288
+ if (!this.contentInitialized || !this.switches)
289
+ return;
290
+ const isReadonly = this.isEffectivelyReadonly();
291
+ this.switches.forEach((sw) => {
292
+ sw.setCvaReadonlyState(isReadonly);
293
+ });
294
+ }
295
+ _propagateEffect = effect(() => {
296
+ if (!this.contentInitialized)
297
+ return;
298
+ this.isEffectivelyDisabled();
299
+ this.isEffectivelyReadonly();
300
+ this.propagateDisabledToSwitches();
301
+ this.propagateReadonlyToSwitches();
302
+ }, ...(ngDevMode ? [{ debugName: "_propagateEffect" }] : /* istanbul ignore next */ []));
303
+ _validateEffect = effect(() => {
304
+ this._value();
305
+ this.minEnabled();
306
+ this.maxEnabled();
307
+ this.requiredInput();
308
+ this.validateBounds();
309
+ }, ...(ngDevMode ? [{ debugName: "_validateEffect" }] : /* istanbul ignore next */ []));
310
+ validateBounds() {
311
+ const value = this._value();
312
+ const enabledCount = Object.values(value).filter(Boolean).length;
313
+ const min = this.minEnabled();
314
+ const max = this.maxEnabled();
315
+ const isRequired = this.requiredInput();
316
+ const minRequired = min ?? (isRequired ? 1 : 0);
317
+ const isOutOfBounds = (minRequired > 0 && enabledCount < minRequired) ||
318
+ (max != null && enabledCount > max);
319
+ this.autoInvalid.set(isOutOfBounds);
320
+ }
321
+ constructor() {
322
+ super();
323
+ }
324
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisSwitchGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
325
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisSwitchGroupComponent, isStandalone: true, selector: "solaris-switch-group", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, requiredInput: { classPropertyName: "requiredInput", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, labelInput: { classPropertyName: "labelInput", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, hintInput: { classPropertyName: "hintInput", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, hintKey: { classPropertyName: "hintKey", publicName: "hintKey", isSignal: true, isRequired: false, transformFunction: null }, errorInput: { classPropertyName: "errorInput", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorKey: { classPropertyName: "errorKey", publicName: "errorKey", isSignal: true, isRequired: false, transformFunction: null }, minEnabled: { classPropertyName: "minEnabled", publicName: "minEnabled", isSignal: true, isRequired: false, transformFunction: null }, maxEnabled: { classPropertyName: "maxEnabled", publicName: "maxEnabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelKey: { classPropertyName: "ariaLabelKey", publicName: "ariaLabelKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", change: "change" }, host: { attributes: { "role": "group" }, properties: { "attr.data-orientation": "orientation()", "attr.data-layout": "layout()", "attr.data-columns": "columnsStr()", "attr.data-density": "effectiveDensity()", "attr.data-size": "size()", "attr.data-disabled": "isEffectivelyDisabled() ? \"\" : null", "attr.data-readonly": "isEffectivelyReadonly() ? \"\" : null", "attr.data-invalid": "isEffectivelyInvalid() ? \"\" : null", "attr.aria-label": "effectiveAriaLabel() ?? null", "attr.aria-labelledby": "ariaLabelledBy()", "attr.aria-describedby": "ariaDescribedBy()", "attr.aria-invalid": "isEffectivelyInvalid() ? \"true\" : null", "attr.aria-required": "isEffectivelyRequired() ? \"true\" : null" } }, providers: [
326
+ {
327
+ provide: NG_VALUE_ACCESSOR,
328
+ useExisting: forwardRef(() => SolarisSwitchGroupComponent),
329
+ multi: true,
330
+ },
331
+ {
332
+ provide: SolarisFormControl,
333
+ useExisting: forwardRef(() => SolarisSwitchGroupComponent),
334
+ },
335
+ ], queries: [{ propertyName: "switches", predicate: SolarisSwitchComponent }], usesInheritance: true, ngImport: i0, template: "@if (labelText(); as text) {\n <span class=\"solaris-switch-group__label\" [id]=\"labelId()\">\n {{ text }}\n </span>\n}\n<div class=\"solaris-switch-group__options\" role=\"presentation\">\n <ng-content />\n</div>\n@if (hintText(); as text) {\n <p class=\"solaris-switch-group__hint\" [id]=\"hintId()\">\n {{ text }}\n </p>\n}\n@if (showError(); as text) {\n <p class=\"solaris-switch-group__error\" [id]=\"errorId()\" role=\"alert\">\n {{ text }}\n </p>\n}\n", styles: [":host{--solaris-switch-group-gap: var(--solaris-spacing-3);--solaris-switch-group-row-gap: var(--solaris-spacing-3);--solaris-switch-group-column-gap: var(--solaris-spacing-3);--solaris-switch-group-label-color: var(--solaris-text-strong);--solaris-switch-group-hint-color: var(--solaris-text-muted);--solaris-switch-group-error-color: var(--solaris-text-danger);--solaris-switch-group-label-font-size: var(--solaris-font-size-sm);--solaris-switch-group-label-line-height: var(--solaris-line-height-md);--solaris-switch-group-hint-font-size: var(--solaris-font-size-xs);--solaris-switch-group-hint-line-height: var(--solaris-line-height-sm);--solaris-switch-group-error-font-size: var(--solaris-font-size-xs);--solaris-switch-group-error-line-height: var(--solaris-line-height-sm);display:block;box-sizing:border-box}.solaris-switch-group__label{display:block;font:var(--solaris-font-weight-medium) var(--solaris-switch-group-label-font-size)/var(--solaris-switch-group-label-line-height) var(--solaris-font-family-sans);color:var(--solaris-switch-group-label-color);margin:0 0 var(--solaris-spacing-2)}.solaris-switch-group__options{display:flex;flex-direction:column;gap:var(--solaris-switch-group-gap)}:host([data-orientation=horizontal]) .solaris-switch-group__options{flex-direction:row;flex-wrap:wrap}:host([data-layout=grid]) .solaris-switch-group__options{display:grid;grid-template-columns:1fr;gap:var(--solaris-switch-group-row-gap) var(--solaris-switch-group-column-gap)}:host([data-layout=grid][data-columns=\"2\"]) .solaris-switch-group__options{grid-template-columns:repeat(2,1fr)}:host([data-layout=grid][data-columns=\"3\"]) .solaris-switch-group__options{grid-template-columns:repeat(3,1fr)}:host([data-layout=grid][data-columns=\"4\"]) .solaris-switch-group__options{grid-template-columns:repeat(4,1fr)}:host([data-layout=grid][data-columns=auto]) .solaris-switch-group__options{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr))}:host([data-density=compact]){--solaris-switch-group-gap: var(--solaris-spacing-2);--solaris-switch-group-row-gap: var(--solaris-spacing-2);--solaris-switch-group-column-gap: var(--solaris-spacing-2)}:host([data-density=comfortable]){--solaris-switch-group-gap: var(--solaris-spacing-4);--solaris-switch-group-row-gap: var(--solaris-spacing-4);--solaris-switch-group-column-gap: var(--solaris-spacing-4)}:host([data-disabled]){opacity:.5;cursor:not-allowed}:host([data-readonly]){cursor:default}:host([data-invalid]){--solaris-switch-group-label-color: var( --solaris-text-danger, var(--solaris-text-strong) );--solaris-switch-group-error-color: var(--solaris-text-danger)}.solaris-switch-group__hint{font:var(--solaris-font-weight-regular) var(--solaris-switch-group-hint-font-size)/var(--solaris-switch-group-hint-line-height) var(--solaris-font-family-sans);color:var(--solaris-switch-group-hint-color);margin:var(--solaris-spacing-1) 0 0}.solaris-switch-group__error{font:var(--solaris-font-weight-regular) var(--solaris-switch-group-error-font-size)/var(--solaris-switch-group-error-line-height) var(--solaris-font-family-sans);color:var(--solaris-switch-group-error-color);margin:var(--solaris-spacing-1) 0 0}\n"] });
336
+ }
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisSwitchGroupComponent, decorators: [{
338
+ type: Component,
339
+ args: [{ selector: 'solaris-switch-group', standalone: true, providers: [
340
+ {
341
+ provide: NG_VALUE_ACCESSOR,
342
+ useExisting: forwardRef(() => SolarisSwitchGroupComponent),
343
+ multi: true,
344
+ },
345
+ {
346
+ provide: SolarisFormControl,
347
+ useExisting: forwardRef(() => SolarisSwitchGroupComponent),
348
+ },
349
+ ], host: {
350
+ role: 'group',
351
+ '[attr.data-orientation]': 'orientation()',
352
+ '[attr.data-layout]': 'layout()',
353
+ '[attr.data-columns]': 'columnsStr()',
354
+ '[attr.data-density]': 'effectiveDensity()',
355
+ '[attr.data-size]': 'size()',
356
+ '[attr.data-disabled]': 'isEffectivelyDisabled() ? "" : null',
357
+ '[attr.data-readonly]': 'isEffectivelyReadonly() ? "" : null',
358
+ '[attr.data-invalid]': 'isEffectivelyInvalid() ? "" : null',
359
+ '[attr.aria-label]': 'effectiveAriaLabel() ?? null',
360
+ '[attr.aria-labelledby]': 'ariaLabelledBy()',
361
+ '[attr.aria-describedby]': 'ariaDescribedBy()',
362
+ '[attr.aria-invalid]': 'isEffectivelyInvalid() ? "true" : null',
363
+ '[attr.aria-required]': 'isEffectivelyRequired() ? "true" : null',
364
+ }, template: "@if (labelText(); as text) {\n <span class=\"solaris-switch-group__label\" [id]=\"labelId()\">\n {{ text }}\n </span>\n}\n<div class=\"solaris-switch-group__options\" role=\"presentation\">\n <ng-content />\n</div>\n@if (hintText(); as text) {\n <p class=\"solaris-switch-group__hint\" [id]=\"hintId()\">\n {{ text }}\n </p>\n}\n@if (showError(); as text) {\n <p class=\"solaris-switch-group__error\" [id]=\"errorId()\" role=\"alert\">\n {{ text }}\n </p>\n}\n", styles: [":host{--solaris-switch-group-gap: var(--solaris-spacing-3);--solaris-switch-group-row-gap: var(--solaris-spacing-3);--solaris-switch-group-column-gap: var(--solaris-spacing-3);--solaris-switch-group-label-color: var(--solaris-text-strong);--solaris-switch-group-hint-color: var(--solaris-text-muted);--solaris-switch-group-error-color: var(--solaris-text-danger);--solaris-switch-group-label-font-size: var(--solaris-font-size-sm);--solaris-switch-group-label-line-height: var(--solaris-line-height-md);--solaris-switch-group-hint-font-size: var(--solaris-font-size-xs);--solaris-switch-group-hint-line-height: var(--solaris-line-height-sm);--solaris-switch-group-error-font-size: var(--solaris-font-size-xs);--solaris-switch-group-error-line-height: var(--solaris-line-height-sm);display:block;box-sizing:border-box}.solaris-switch-group__label{display:block;font:var(--solaris-font-weight-medium) var(--solaris-switch-group-label-font-size)/var(--solaris-switch-group-label-line-height) var(--solaris-font-family-sans);color:var(--solaris-switch-group-label-color);margin:0 0 var(--solaris-spacing-2)}.solaris-switch-group__options{display:flex;flex-direction:column;gap:var(--solaris-switch-group-gap)}:host([data-orientation=horizontal]) .solaris-switch-group__options{flex-direction:row;flex-wrap:wrap}:host([data-layout=grid]) .solaris-switch-group__options{display:grid;grid-template-columns:1fr;gap:var(--solaris-switch-group-row-gap) var(--solaris-switch-group-column-gap)}:host([data-layout=grid][data-columns=\"2\"]) .solaris-switch-group__options{grid-template-columns:repeat(2,1fr)}:host([data-layout=grid][data-columns=\"3\"]) .solaris-switch-group__options{grid-template-columns:repeat(3,1fr)}:host([data-layout=grid][data-columns=\"4\"]) .solaris-switch-group__options{grid-template-columns:repeat(4,1fr)}:host([data-layout=grid][data-columns=auto]) .solaris-switch-group__options{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr))}:host([data-density=compact]){--solaris-switch-group-gap: var(--solaris-spacing-2);--solaris-switch-group-row-gap: var(--solaris-spacing-2);--solaris-switch-group-column-gap: var(--solaris-spacing-2)}:host([data-density=comfortable]){--solaris-switch-group-gap: var(--solaris-spacing-4);--solaris-switch-group-row-gap: var(--solaris-spacing-4);--solaris-switch-group-column-gap: var(--solaris-spacing-4)}:host([data-disabled]){opacity:.5;cursor:not-allowed}:host([data-readonly]){cursor:default}:host([data-invalid]){--solaris-switch-group-label-color: var( --solaris-text-danger, var(--solaris-text-strong) );--solaris-switch-group-error-color: var(--solaris-text-danger)}.solaris-switch-group__hint{font:var(--solaris-font-weight-regular) var(--solaris-switch-group-hint-font-size)/var(--solaris-switch-group-hint-line-height) var(--solaris-font-family-sans);color:var(--solaris-switch-group-hint-color);margin:var(--solaris-spacing-1) 0 0}.solaris-switch-group__error{font:var(--solaris-font-weight-regular) var(--solaris-switch-group-error-font-size)/var(--solaris-switch-group-error-line-height) var(--solaris-font-family-sans);color:var(--solaris-switch-group-error-color);margin:var(--solaris-spacing-1) 0 0}\n"] }]
365
+ }], ctorParameters: () => [], propDecorators: { switches: [{
366
+ type: ContentChildren,
367
+ args: [SolarisSwitchComponent]
368
+ }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], requiredInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalidInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], labelInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], hintInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], hintKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintKey", required: false }] }], errorInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorKey", required: false }] }], minEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "minEnabled", required: false }] }], maxEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxEnabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], change: [{ type: i0.Output, args: ["change"] }] } });
369
+ //# sourceMappingURL=switch-group.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-group.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/switch-group/component/switch-group.component.ts","../../../../../../../../../packages/angular/src/lib/components/forms/switch-group/component/switch-group.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,UAAU,EACV,MAAM,EACN,UAAU,EACV,eAAe,EAIf,MAAM,GACP,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,iBAAiB,EAA6B,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,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,cACpB,IAAI,aACL;wBACT;4BACE,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,4BAA4B,CAAC;4BAC1D,KAAK,EAAE,IAAI;yBACZ;wBACD;4BACE,OAAO,EAAE,kBAAkB;4BAC3B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,4BAA4B,CAAC;yBAC3D;qBACF,QAGK;wBACJ,IAAI,EAAE,OAAO;wBACb,yBAAyB,EAAE,eAAe;wBAC1C,oBAAoB,EAAE,UAAU;wBAChC,qBAAqB,EAAE,cAAc;wBACrC,qBAAqB,EAAE,oBAAoB;wBAC3C,kBAAkB,EAAE,QAAQ;wBAC5B,sBAAsB,EAAE,qCAAqC;wBAC7D,sBAAsB,EAAE,qCAAqC;wBAC7D,qBAAqB,EAAE,oCAAoC;wBAC3D,mBAAmB,EAAE,8BAA8B;wBACnD,wBAAwB,EAAE,kBAAkB;wBAC5C,yBAAyB,EAAE,mBAAmB;wBAC9C,qBAAqB,EAAE,wCAAwC;wBAC/D,sBAAsB,EAAE,yCAAyC;qBAClE;;sBAUA,eAAe;uBAAC,sBAAsB","sourcesContent":["import {\n Component,\n input,\n output,\n computed,\n signal,\n effect,\n forwardRef,\n inject,\n ElementRef,\n ContentChildren,\n QueryList,\n type AfterContentInit,\n type OnDestroy,\n NgZone,\n} from '@angular/core';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Subscription = any;\nimport { NG_VALUE_ACCESSOR, type ControlValueAccessor } from '@angular/forms';\n\nimport { SolarisFormControl } from '../../form-field/model/form-control.contract';\nimport { SolarisTranslateService } from '../../../../services/translation';\nimport { SolarisSwitchComponent } from '../../switch';\n\nimport type {\n SolarisSwitchGroupOrientation,\n SolarisSwitchGroupLayout,\n SolarisSwitchGroupColumns,\n SolarisSwitchGroupDensity,\n SolarisSwitchGroupSize,\n} from '../model/switch-group.types';\n\nlet nextId = 0;\n\nfunction generateId(): string {\n return `solaris-switch-group-${++nextId}`;\n}\n\n@Component({\n selector: 'solaris-switch-group',\n standalone: true,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SolarisSwitchGroupComponent),\n multi: true,\n },\n {\n provide: SolarisFormControl,\n useExisting: forwardRef(() => SolarisSwitchGroupComponent),\n },\n ],\n templateUrl: './switch-group.component.html',\n styleUrls: ['./switch-group.component.scss'],\n host: {\n role: 'group',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-layout]': 'layout()',\n '[attr.data-columns]': 'columnsStr()',\n '[attr.data-density]': 'effectiveDensity()',\n '[attr.data-size]': 'size()',\n '[attr.data-disabled]': 'isEffectivelyDisabled() ? \"\" : null',\n '[attr.data-readonly]': 'isEffectivelyReadonly() ? \"\" : null',\n '[attr.data-invalid]': 'isEffectivelyInvalid() ? \"\" : null',\n '[attr.aria-label]': 'effectiveAriaLabel() ?? null',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n '[attr.aria-invalid]': 'isEffectivelyInvalid() ? \"true\" : null',\n '[attr.aria-required]': 'isEffectivelyRequired() ? \"true\" : null',\n },\n})\nexport class SolarisSwitchGroupComponent\n extends SolarisFormControl\n implements ControlValueAccessor, AfterContentInit, OnDestroy\n{\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly translateService = inject(SolarisTranslateService);\n private readonly ngZone = inject(NgZone);\n\n @ContentChildren(SolarisSwitchComponent)\n protected switches!: QueryList<SolarisSwitchComponent>;\n\n readonly orientation = input<SolarisSwitchGroupOrientation>('vertical');\n readonly layout = input<SolarisSwitchGroupLayout>('list');\n readonly columns = input<SolarisSwitchGroupColumns>(1);\n readonly density = input<SolarisSwitchGroupDensity>();\n readonly size = input<SolarisSwitchGroupSize>('md');\n readonly disabledInput = input<boolean, boolean>(false, {\n alias: 'disabled',\n transform: (v: boolean) => v ?? false,\n });\n readonly readonlyInput = input<boolean, boolean>(false, {\n alias: 'readonly',\n transform: (v: boolean) => v ?? false,\n });\n readonly requiredInput = input<boolean, boolean>(false, {\n alias: 'required',\n transform: (v: boolean) => v ?? false,\n });\n readonly invalidInput = input<boolean | undefined>(undefined, {\n alias: 'invalid',\n });\n readonly labelInput = input<string>(undefined, { alias: 'label' });\n readonly labelKey = input<string>();\n readonly hintInput = input<string>(undefined, { alias: 'hint' });\n readonly hintKey = input<string>();\n readonly errorInput = input<string>(undefined, { alias: 'error' });\n readonly errorKey = input<string>();\n readonly minEnabled = input<number>();\n readonly maxEnabled = input<number>();\n readonly ariaLabel = input<string>();\n readonly ariaLabelKey = input<string>();\n\n readonly valueChange = output<Record<string, boolean>>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n readonly change = output<Record<string, boolean>>();\n\n private readonly _value = signal<Record<string, boolean>>({});\n private readonly _focused = signal(false);\n private readonly _describedByIds = signal<string[]>([]);\n private readonly cvaDisabled = signal(false);\n private readonly autoInvalid = signal(false);\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: Record<string, boolean>) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n private readonly switchSubscriptions = new Map<\n SolarisSwitchComponent,\n Subscription\n >();\n private contentInitialized = false;\n private switchQuerySubscription: Subscription | null = null;\n private focusListenersAttached = false;\n\n protected readonly groupId = computed(() => {\n // SECURITY_EXCEPTION: nativeElement.getAttribute('id') is the standard DOM API to check existing ID before generating one. Same approach used by Angular CDK and Solaris Checkbox/Radio groups.\n return this.elementRef.nativeElement.getAttribute('id') || generateId();\n });\n protected readonly labelId = computed(() => `${this.groupId()}-label`);\n protected readonly hintId = computed(() => `${this.groupId()}-hint`);\n protected readonly errorId = computed(() => `${this.groupId()}-error`);\n\n protected readonly columnsStr = computed(() => String(this.columns()));\n\n protected readonly effectiveDensity = computed<SolarisSwitchGroupDensity>(\n () => {\n return this.density() ?? 'comfortable';\n },\n );\n\n protected readonly isEffectivelyDisabled = computed(() => {\n return this.disabledInput() || this.cvaDisabled();\n });\n\n protected readonly isEffectivelyReadonly = computed(() => {\n return this.readonlyInput();\n });\n\n protected readonly isEffectivelyInvalid = computed(() => {\n return this.invalidInput() ?? this.autoInvalid();\n });\n\n protected readonly isEffectivelyRequired = computed(() => {\n return this.requiredInput();\n });\n\n protected readonly labelText = computed(() => {\n const key = this.labelKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.labelInput();\n });\n\n protected readonly hintText = computed(() => {\n const key = this.hintKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.hintInput();\n });\n\n protected readonly errorText = computed(() => {\n const key = this.errorKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.errorInput();\n });\n\n protected readonly effectiveAriaLabel = computed(() => {\n const key = this.ariaLabelKey();\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return this.ariaLabel();\n });\n\n protected readonly ariaLabelledBy = computed(() => {\n if (this.labelText()) {\n return this.labelId();\n }\n return null;\n });\n\n protected readonly ariaDescribedBy = computed(() => {\n const customIds = this._describedByIds();\n const ownIds: string[] = [];\n if (this.hintText()) ownIds.push(this.hintId());\n if (this.showError()) ownIds.push(this.errorId());\n const all = [...customIds, ...ownIds];\n return all.length > 0 ? all.join(' ') : null;\n });\n\n protected readonly showError = computed(() => {\n if (this.isEffectivelyInvalid()) {\n return this.errorText() ?? null;\n }\n return null;\n });\n\n get id(): string {\n return this.groupId();\n }\n\n get focused(): boolean {\n return this._focused();\n }\n\n get disabled(): boolean {\n return this.isEffectivelyDisabled();\n }\n\n get readonly(): boolean {\n return this.isEffectivelyReadonly();\n }\n\n get invalid(): boolean {\n return this.isEffectivelyInvalid();\n }\n\n get required(): boolean {\n return this.isEffectivelyRequired();\n }\n\n get describedByIds(): string[] {\n return this._describedByIds();\n }\n\n setDescribedByIds(ids: string[]): void {\n this._describedByIds.set([...ids]);\n }\n\n focus(): void {\n const first = this.switches?.get(0);\n if (first) {\n first.focus();\n }\n }\n\n writeValue(value: Record<string, boolean> | null): void {\n this._value.set(value ? { ...value } : {});\n this.syncSwitchesToValue();\n }\n\n registerOnChange(fn: (value: Record<string, boolean>) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n this.propagateDisabledToSwitches();\n }\n\n ngAfterContentInit(): void {\n this.contentInitialized = true;\n this.validateChildren();\n this.attachFocusListeners();\n this.initSwitches();\n this.syncSwitchesToValue();\n this.propagateDisabledToSwitches();\n this.propagateReadonlyToSwitches();\n\n this.switchQuerySubscription = this.switches.changes.subscribe(() => {\n this.validateChildren();\n this.initSwitches();\n this.syncSwitchesToValue();\n this.propagateDisabledToSwitches();\n this.propagateReadonlyToSwitches();\n });\n }\n\n ngOnDestroy(): void {\n this.unsubscribeAllSwitches();\n if (this.switchQuerySubscription) {\n this.switchQuerySubscription.unsubscribe();\n }\n }\n\n private validateChildren(): void {\n if (!this.switches) return;\n\n const keys = new Map<string, SolarisSwitchComponent>();\n\n this.switches.forEach((sw) => {\n const key = sw.value();\n if (key === null || key === undefined) {\n console.warn(\n `[SolarisSwitchGroup] A <solaris-switch> child is missing a value attribute. ` +\n `Each switch inside <solaris-switch-group> must have a unique value.`,\n );\n return;\n }\n if (keys.has(key)) {\n console.warn(\n `[SolarisSwitchGroup] Duplicate value \"${key}\" detected among <solaris-switch> children. ` +\n `Each switch value must be unique within the group.`,\n );\n }\n keys.set(key, sw);\n });\n }\n\n private attachFocusListeners(): void {\n if (this.focusListenersAttached) return;\n this.focusListenersAttached = true;\n\n // SECURITY_EXCEPTION: nativeElement.focusin/focusout are standard DOM events for focus tracking. Same pattern used by Solaris FormField and Checkbox/Radio groups.\n const native = this.elementRef.nativeElement;\n this.ngZone.runOutsideAngular(() => {\n native.addEventListener('focusin', () => {\n this.ngZone.run(() => this._focused.set(true));\n });\n native.addEventListener('focusout', (e: FocusEvent) => {\n const related = e.relatedTarget as Node | null;\n if (related && native.contains(related)) return;\n this.ngZone.run(() => {\n this._focused.set(false);\n this.onTouched();\n });\n });\n });\n }\n\n private initSwitches(): void {\n this.unsubscribeAllSwitches();\n this.switches.forEach((sw) => {\n const sub = sw.checkedChange.subscribe((checked: boolean) => {\n this.onChildCheckedChange(sw, checked);\n });\n this.switchSubscriptions.set(sw, sub);\n });\n }\n\n private unsubscribeAllSwitches(): void {\n this.switchSubscriptions.forEach((sub) => sub.unsubscribe());\n this.switchSubscriptions.clear();\n }\n\n private onChildCheckedChange(\n child: SolarisSwitchComponent,\n checked: boolean,\n ): void {\n if (this.isEffectivelyDisabled() || this.isEffectivelyReadonly()) {\n return;\n }\n\n const key = child.value();\n if (key === null || key === undefined) {\n return;\n }\n\n const currentValue = { ...this._value() };\n currentValue[key] = checked;\n\n this.updateValue(currentValue);\n }\n\n private updateValue(newValue: Record<string, boolean>): void {\n this._value.set(newValue);\n this.onChange(newValue);\n this.valueChange.emit(newValue);\n this.change.emit(newValue);\n }\n\n private syncSwitchesToValue(): void {\n if (!this.contentInitialized || !this.switches) return;\n const currentValue = this._value();\n\n this.switches.forEach((sw) => {\n const key = sw.value();\n if (key === null || key === undefined) {\n return;\n }\n sw.writeValue(currentValue[key]);\n });\n }\n\n private propagateDisabledToSwitches(): void {\n if (!this.contentInitialized || !this.switches) return;\n const isDisabled = this.isEffectivelyDisabled();\n this.switches.forEach((sw) => {\n sw.setDisabledState(isDisabled);\n });\n }\n\n private propagateReadonlyToSwitches(): void {\n if (!this.contentInitialized || !this.switches) return;\n const isReadonly = this.isEffectivelyReadonly();\n this.switches.forEach((sw) => {\n sw.setCvaReadonlyState(isReadonly);\n });\n }\n\n private readonly _propagateEffect = effect(() => {\n if (!this.contentInitialized) return;\n this.isEffectivelyDisabled();\n this.isEffectivelyReadonly();\n this.propagateDisabledToSwitches();\n this.propagateReadonlyToSwitches();\n });\n\n private readonly _validateEffect = effect(() => {\n this._value();\n this.minEnabled();\n this.maxEnabled();\n this.requiredInput();\n this.validateBounds();\n });\n\n private validateBounds(): void {\n const value = this._value();\n const enabledCount = Object.values(value).filter(Boolean).length;\n const min = this.minEnabled();\n const max = this.maxEnabled();\n const isRequired = this.requiredInput();\n const minRequired = min ?? (isRequired ? 1 : 0);\n\n const isOutOfBounds =\n (minRequired > 0 && enabledCount < minRequired) ||\n (max != null && enabledCount > max);\n this.autoInvalid.set(isOutOfBounds);\n }\n\n constructor() {\n super();\n }\n}\n","@if (labelText(); as text) {\n <span class=\"solaris-switch-group__label\" [id]=\"labelId()\">\n {{ text }}\n </span>\n}\n<div class=\"solaris-switch-group__options\" role=\"presentation\">\n <ng-content />\n</div>\n@if (hintText(); as text) {\n <p class=\"solaris-switch-group__hint\" [id]=\"hintId()\">\n {{ text }}\n </p>\n}\n@if (showError(); as text) {\n <p class=\"solaris-switch-group__error\" [id]=\"errorId()\" role=\"alert\">\n {{ text }}\n </p>\n}\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=switch-group.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-group.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/switch-group/model/switch-group.types.ts"],"names":[],"mappings":"","sourcesContent":["export type SolarisSwitchGroupOrientation = 'vertical' | 'horizontal';\n\nexport type SolarisSwitchGroupLayout = 'list' | 'grid';\n\nexport type SolarisSwitchGroupColumns = 1 | 2 | 3 | 4 | 'auto';\n\nexport type SolarisSwitchGroupDensity = 'compact' | 'comfortable';\n\nexport type SolarisSwitchGroupSize = 'sm' | 'md' | 'lg';\n"]}
@@ -0,0 +1,137 @@
1
+ import { Directive, input, computed, signal, HostListener, inject, ElementRef, isDevMode, } from '@angular/core';
2
+ import { NgControl } from '@angular/forms';
3
+ import { SolarisFormControl } from '../../form-field/model/form-control.contract';
4
+ import * as i0 from "@angular/core";
5
+ let nextId = 0;
6
+ function generateId() {
7
+ return `solaris-textarea-${++nextId}`;
8
+ }
9
+ export class SolarisTextareaDirective extends SolarisFormControl {
10
+ appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
11
+ radius = input('md', ...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
12
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
13
+ density = input(...(ngDevMode ? [undefined, { debugName: "density" }] : /* istanbul ignore next */ []));
14
+ manualInvalid = input(undefined, { ...(ngDevMode ? { debugName: "manualInvalid" } : /* istanbul ignore next */ {}), alias: 'invalid' });
15
+ fullWidth = input(true, ...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
16
+ resize = input('vertical', ...(ngDevMode ? [{ debugName: "resize" }] : /* istanbul ignore next */ []));
17
+ // SECURITY_EXCEPTION: ElementRef.nativeElement is the standard Angular directive API to read host element properties and attributes. Same approach used by Angular CDK and all Solaris directives.
18
+ elementRef = inject(ElementRef);
19
+ // SECURITY_EXCEPTION: nativeElement access required for host element property reads (tagName, disabled, readonly, required, focus, getAttribute). Same pattern used by Angular CDK form controls.
20
+ textareaElement = this.elementRef.nativeElement;
21
+ ngControl = inject(NgControl, {
22
+ optional: true,
23
+ self: true,
24
+ });
25
+ _focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
26
+ _describedByIds = signal([], ...(ngDevMode ? [{ debugName: "_describedByIds" }] : /* istanbul ignore next */ []));
27
+ // SECURITY_EXCEPTION: nativeElement.getAttribute('id') is the standard DOM API to check existing ID before generating one. Same approach used by Angular CDK form controls.
28
+ elementId = computed(() => {
29
+ const existingId = this.textareaElement.getAttribute('id');
30
+ return existingId ?? generateId();
31
+ }, ...(ngDevMode ? [{ debugName: "elementId" }] : /* istanbul ignore next */ []));
32
+ effectiveDensity = computed(() => {
33
+ return this.density() ?? 'comfortable';
34
+ }, ...(ngDevMode ? [{ debugName: "effectiveDensity" }] : /* istanbul ignore next */ []));
35
+ isEffectivelyInvalid = computed(() => {
36
+ const manual = this.manualInvalid();
37
+ if (manual !== undefined) {
38
+ return manual;
39
+ }
40
+ if (this.ngControl?.control) {
41
+ const control = this.ngControl.control;
42
+ return (control.invalid &&
43
+ (control.touched || control.dirty) &&
44
+ !this._focused());
45
+ }
46
+ return false;
47
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyInvalid" }] : /* istanbul ignore next */ []));
48
+ ariaDescribedBy = computed(() => {
49
+ const ids = this._describedByIds();
50
+ return ids.length > 0 ? ids.join(' ') : null;
51
+ }, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
52
+ get id() {
53
+ return this.elementId();
54
+ }
55
+ get focused() {
56
+ return this._focused();
57
+ }
58
+ // SECURITY_EXCEPTION: nativeElement.disabled is the standard DOM property to read textarea disabled state. Same approach used by Angular Forms.
59
+ get disabled() {
60
+ return this.textareaElement.disabled;
61
+ }
62
+ // SECURITY_EXCEPTION: nativeElement.readOnly is the standard DOM property to read textarea readonly state.
63
+ get readonly() {
64
+ return this.textareaElement.readOnly;
65
+ }
66
+ get invalid() {
67
+ return this.isEffectivelyInvalid();
68
+ }
69
+ // SECURITY_EXCEPTION: nativeElement.required is the standard DOM property to read textarea required state.
70
+ get required() {
71
+ return this.textareaElement.required;
72
+ }
73
+ get describedByIds() {
74
+ return this._describedByIds();
75
+ }
76
+ setDescribedByIds(ids) {
77
+ this._describedByIds.set([...ids]);
78
+ }
79
+ // SECURITY_EXCEPTION: nativeElement.focus() is the standard DOM API to programmatically focus a textarea. No alternative exists.
80
+ focus() {
81
+ this.textareaElement.focus();
82
+ }
83
+ onFocus() {
84
+ this._focused.set(true);
85
+ }
86
+ onBlur() {
87
+ this._focused.set(false);
88
+ }
89
+ constructor() {
90
+ super();
91
+ this.validateHost();
92
+ }
93
+ validateHost() {
94
+ // SECURITY_EXCEPTION: nativeElement.tagName is the standard Angular API to validate directive host element. Same pattern used by SolarisInputDirective.
95
+ if (this.textareaElement.tagName !== 'TEXTAREA') {
96
+ if (isDevMode()) {
97
+ console.warn(`[SolarisTextarea] The [solaris-textarea] directive is intended for use on <textarea> elements only. ` +
98
+ `Applying it to <${this.textareaElement.tagName.toLowerCase()}> is unsupported ` +
99
+ `and may cause unexpected behavior.`);
100
+ }
101
+ }
102
+ }
103
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisTextareaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
104
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: SolarisTextareaDirective, isStandalone: true, selector: "[solaris-textarea]", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, manualInvalid: { classPropertyName: "manualInvalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "id": "elementId()", "attr.data-size": "size()", "attr.data-radius": "radius()", "attr.data-appearance": "appearance()", "attr.data-density": "effectiveDensity()", "attr.aria-describedby": "ariaDescribedBy()", "attr.data-focused": "_focused() ? \"\" : null", "attr.data-full-width": "fullWidth() ? \"\" : null", "attr.data-invalid": "isEffectivelyInvalid() ? \"\" : null", "attr.aria-invalid": "isEffectivelyInvalid() ? \"true\" : null", "attr.data-resize": "resize()" } }, providers: [
105
+ { provide: SolarisFormControl, useExisting: SolarisTextareaDirective },
106
+ ], usesInheritance: true, ngImport: i0 });
107
+ }
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisTextareaDirective, decorators: [{
109
+ type: Directive,
110
+ args: [{
111
+ selector: '[solaris-textarea]',
112
+ standalone: true,
113
+ providers: [
114
+ { provide: SolarisFormControl, useExisting: SolarisTextareaDirective },
115
+ ],
116
+ host: {
117
+ '[id]': 'elementId()',
118
+ '[attr.data-size]': 'size()',
119
+ '[attr.data-radius]': 'radius()',
120
+ '[attr.data-appearance]': 'appearance()',
121
+ '[attr.data-density]': 'effectiveDensity()',
122
+ '[attr.aria-describedby]': 'ariaDescribedBy()',
123
+ '[attr.data-focused]': '_focused() ? "" : null',
124
+ '[attr.data-full-width]': 'fullWidth() ? "" : null',
125
+ '[attr.data-invalid]': 'isEffectivelyInvalid() ? "" : null',
126
+ '[attr.aria-invalid]': 'isEffectivelyInvalid() ? "true" : null',
127
+ '[attr.data-resize]': 'resize()',
128
+ },
129
+ }]
130
+ }], ctorParameters: () => [], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], manualInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], resize: [{ type: i0.Input, args: [{ isSignal: true, alias: "resize", required: false }] }], onFocus: [{
131
+ type: HostListener,
132
+ args: ['focus']
133
+ }], onBlur: [{
134
+ type: HostListener,
135
+ args: ['blur']
136
+ }] } });
137
+ //# sourceMappingURL=textarea.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.directive.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular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;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,UAAU,EAAE,IAAI;oBAChB,SAAS,EAAE;wBACT,EAAE,OAAO,EAAE,kBAAkB,EAAE,WAAW,0BAA0B,EAAE;qBACvE;oBACD,IAAI,EAAE;wBACJ,MAAM,EAAE,aAAa;wBACrB,kBAAkB,EAAE,QAAQ;wBAC5B,oBAAoB,EAAE,UAAU;wBAChC,wBAAwB,EAAE,cAAc;wBACxC,qBAAqB,EAAE,oBAAoB;wBAC3C,yBAAyB,EAAE,mBAAmB;wBAC9C,qBAAqB,EAAE,wBAAwB;wBAC/C,wBAAwB,EAAE,yBAAyB;wBACnD,qBAAqB,EAAE,oCAAoC;wBAC3D,qBAAqB,EAAE,wCAAwC;wBAC/D,oBAAoB,EAAE,UAAU;qBACjC;iBACF;;sBAiGE,YAAY;uBAAC,OAAO;;sBAKpB,YAAY;uBAAC,MAAM","sourcesContent":["import {\n Directive,\n input,\n computed,\n signal,\n HostListener,\n inject,\n ElementRef,\n isDevMode,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\nimport { SolarisFormControl } from '../../form-field/model/form-control.contract';\n\nimport type {\n SolarisTextareaAppearance,\n SolarisTextareaSize,\n SolarisTextareaDensity,\n SolarisTextareaRadius,\n SolarisTextareaResize,\n} from '../model/textarea.types';\n\nlet nextId = 0;\n\nfunction generateId(): string {\n return `solaris-textarea-${++nextId}`;\n}\n\n@Directive({\n selector: '[solaris-textarea]',\n standalone: true,\n providers: [\n { provide: SolarisFormControl, useExisting: SolarisTextareaDirective },\n ],\n host: {\n '[id]': 'elementId()',\n '[attr.data-size]': 'size()',\n '[attr.data-radius]': 'radius()',\n '[attr.data-appearance]': 'appearance()',\n '[attr.data-density]': 'effectiveDensity()',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n '[attr.data-focused]': '_focused() ? \"\" : null',\n '[attr.data-full-width]': 'fullWidth() ? \"\" : null',\n '[attr.data-invalid]': 'isEffectivelyInvalid() ? \"\" : null',\n '[attr.aria-invalid]': 'isEffectivelyInvalid() ? \"true\" : null',\n '[attr.data-resize]': 'resize()',\n },\n})\nexport class SolarisTextareaDirective extends SolarisFormControl {\n readonly appearance = input<SolarisTextareaAppearance>('outline');\n readonly radius = input<SolarisTextareaRadius>('md');\n readonly size = input<SolarisTextareaSize>('md');\n readonly density = input<SolarisTextareaDensity>();\n\n readonly manualInvalid = input<boolean | undefined>(undefined, {\n alias: 'invalid',\n });\n readonly fullWidth = input<boolean>(true);\n readonly resize = input<SolarisTextareaResize>('vertical');\n\n // SECURITY_EXCEPTION: ElementRef.nativeElement is the standard Angular directive API to read host element properties and attributes. Same approach used by Angular CDK and all Solaris directives.\n private readonly elementRef =\n inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n // SECURITY_EXCEPTION: nativeElement access required for host element property reads (tagName, disabled, readonly, required, focus, getAttribute). Same pattern used by Angular CDK form controls.\n private readonly textareaElement = this.elementRef.nativeElement;\n protected readonly ngControl = inject(NgControl, {\n optional: true,\n self: true,\n });\n\n protected readonly _focused = signal(false);\n private readonly _describedByIds = signal<string[]>([]);\n\n // SECURITY_EXCEPTION: nativeElement.getAttribute('id') is the standard DOM API to check existing ID before generating one. Same approach used by Angular CDK form controls.\n protected readonly elementId = computed(() => {\n const existingId = this.textareaElement.getAttribute('id');\n return existingId ?? generateId();\n });\n\n protected readonly effectiveDensity = computed<SolarisTextareaDensity>(() => {\n return this.density() ?? 'comfortable';\n });\n\n protected readonly isEffectivelyInvalid = computed(() => {\n const manual = this.manualInvalid();\n if (manual !== undefined) {\n return manual;\n }\n if (this.ngControl?.control) {\n const control = this.ngControl.control;\n return (\n control.invalid &&\n (control.touched || control.dirty) &&\n !this._focused()\n );\n }\n return false;\n });\n\n protected readonly ariaDescribedBy = computed(() => {\n const ids = this._describedByIds();\n return ids.length > 0 ? ids.join(' ') : null;\n });\n\n get id(): string {\n return this.elementId();\n }\n\n get focused(): boolean {\n return this._focused();\n }\n\n // SECURITY_EXCEPTION: nativeElement.disabled is the standard DOM property to read textarea disabled state. Same approach used by Angular Forms.\n get disabled(): boolean {\n return this.textareaElement.disabled;\n }\n\n // SECURITY_EXCEPTION: nativeElement.readOnly is the standard DOM property to read textarea readonly state.\n get readonly(): boolean {\n return this.textareaElement.readOnly;\n }\n\n get invalid(): boolean {\n return this.isEffectivelyInvalid();\n }\n\n // SECURITY_EXCEPTION: nativeElement.required is the standard DOM property to read textarea required state.\n get required(): boolean {\n return this.textareaElement.required;\n }\n\n get describedByIds(): string[] {\n return this._describedByIds();\n }\n\n setDescribedByIds(ids: string[]): void {\n this._describedByIds.set([...ids]);\n }\n\n // SECURITY_EXCEPTION: nativeElement.focus() is the standard DOM API to programmatically focus a textarea. No alternative exists.\n focus(): void {\n this.textareaElement.focus();\n }\n\n @HostListener('focus')\n protected onFocus(): void {\n this._focused.set(true);\n }\n\n @HostListener('blur')\n protected onBlur(): void {\n this._focused.set(false);\n }\n\n constructor() {\n super();\n this.validateHost();\n }\n\n private validateHost(): void {\n // SECURITY_EXCEPTION: nativeElement.tagName is the standard Angular API to validate directive host element. Same pattern used by SolarisInputDirective.\n if (this.textareaElement.tagName !== 'TEXTAREA') {\n if (isDevMode()) {\n console.warn(\n `[SolarisTextarea] The [solaris-textarea] directive is intended for use on <textarea> elements only. ` +\n `Applying it to <${this.textareaElement.tagName.toLowerCase()}> is unsupported ` +\n `and may cause unexpected behavior.`,\n );\n }\n }\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=textarea.types.js.map