@educarehq/solaris-ui 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/fesm2022/educarehq-solaris-ui.mjs +12261 -0
  2. package/fesm2022/educarehq-solaris-ui.mjs.map +1 -0
  3. package/package.json +5 -5
  4. package/styles/_button.scss +510 -510
  5. package/styles/_dropdown-menu.scss +72 -0
  6. package/styles/_icon-button.scss +481 -481
  7. package/styles/_input.scss +255 -255
  8. package/styles/_popover.scss +73 -68
  9. package/styles/_theme.scss +46 -36
  10. package/styles/_toast.scss +9 -0
  11. package/styles/token/border/_border.scss +5 -0
  12. package/styles/token/border/_index.scss +1 -0
  13. package/styles/token/color/_dark.scss +78 -0
  14. package/styles/token/color/_high-contrast.scss +27 -0
  15. package/styles/token/color/_index.scss +3 -0
  16. package/styles/token/color/_light.scss +69 -0
  17. package/styles/token/density/_comfortable.scss +15 -0
  18. package/styles/token/density/_compact.scss +15 -0
  19. package/styles/token/density/_index.scss +2 -0
  20. package/styles/token/motion/_index.scss +2 -0
  21. package/styles/token/motion/_motion.scss +15 -0
  22. package/styles/token/motion/_reduced-motion.scss +15 -0
  23. package/styles/token/opacity/_index.scss +1 -0
  24. package/styles/token/opacity/_opacity.scss +4 -0
  25. package/styles/token/radius/_index.scss +1 -0
  26. package/styles/token/radius/_radius.scss +8 -0
  27. package/styles/token/shadow/_index.scss +1 -0
  28. package/styles/token/shadow/_shadow.scss +26 -0
  29. package/styles/token/spacing/_index.scss +1 -0
  30. package/styles/token/spacing/_spacing.scss +15 -0
  31. package/styles/token/typography/_font-family.scss +13 -0
  32. package/styles/token/typography/_index.scss +2 -0
  33. package/styles/token/typography/_typography.scss +25 -0
  34. package/styles/token/z-index/_index.scss +1 -0
  35. package/styles/token/z-index/_z-index.scss +10 -0
  36. package/types/educarehq-solaris-ui.d.ts +3201 -0
  37. package/educarehq-solaris-ui.d.ts +0 -5
  38. package/esm2022/educarehq-solaris-ui.js +0 -5
  39. package/esm2022/educarehq-solaris-ui.js.map +0 -1
  40. package/esm2022/index.js +0 -70
  41. package/esm2022/index.js.map +0 -1
  42. package/esm2022/lib/components/actions/button/directives/button-icon.directive.js +0 -17
  43. package/esm2022/lib/components/actions/button/directives/button-icon.directive.js.map +0 -1
  44. package/esm2022/lib/components/actions/button/directives/button.directive.js +0 -60
  45. package/esm2022/lib/components/actions/button/directives/button.directive.js.map +0 -1
  46. package/esm2022/lib/components/actions/button/model/button.types.js +0 -1
  47. package/esm2022/lib/components/actions/button/model/button.types.js.map +0 -1
  48. package/esm2022/lib/components/actions/button-group/component/button-group.component.js +0 -21
  49. package/esm2022/lib/components/actions/button-group/component/button-group.component.js.map +0 -1
  50. package/esm2022/lib/components/actions/button-group/model/button-group.types.js +0 -1
  51. package/esm2022/lib/components/actions/button-group/model/button-group.types.js.map +0 -1
  52. package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js +0 -17
  53. package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js.map +0 -1
  54. package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js +0 -58
  55. package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js.map +0 -1
  56. package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js +0 -1
  57. package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js.map +0 -1
  58. package/esm2022/lib/components/data-display/badge/component/badge.component.js +0 -24
  59. package/esm2022/lib/components/data-display/badge/component/badge.component.js.map +0 -1
  60. package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js +0 -17
  61. package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js.map +0 -1
  62. package/esm2022/lib/components/data-display/badge/model/badge.types.js +0 -1
  63. package/esm2022/lib/components/data-display/badge/model/badge.types.js.map +0 -1
  64. package/esm2022/lib/components/data-display/card/component/card.component.js +0 -20
  65. package/esm2022/lib/components/data-display/card/component/card.component.js.map +0 -1
  66. package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js +0 -17
  67. package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js.map +0 -1
  68. package/esm2022/lib/components/data-display/card/directives/card-content.directive.js +0 -17
  69. package/esm2022/lib/components/data-display/card/directives/card-content.directive.js.map +0 -1
  70. package/esm2022/lib/components/data-display/card/directives/card-description.directive.js +0 -17
  71. package/esm2022/lib/components/data-display/card/directives/card-description.directive.js.map +0 -1
  72. package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js +0 -19
  73. package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js.map +0 -1
  74. package/esm2022/lib/components/data-display/card/directives/card-header.directive.js +0 -17
  75. package/esm2022/lib/components/data-display/card/directives/card-header.directive.js.map +0 -1
  76. package/esm2022/lib/components/data-display/card/directives/card-media.directive.js +0 -17
  77. package/esm2022/lib/components/data-display/card/directives/card-media.directive.js.map +0 -1
  78. package/esm2022/lib/components/data-display/card/directives/card-title.directive.js +0 -17
  79. package/esm2022/lib/components/data-display/card/directives/card-title.directive.js.map +0 -1
  80. package/esm2022/lib/components/data-display/card/model/card.types.js +0 -1
  81. package/esm2022/lib/components/data-display/card/model/card.types.js.map +0 -1
  82. package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js +0 -18
  83. package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js.map +0 -1
  84. package/esm2022/lib/components/feedback/alert/component/alert.component.js +0 -90
  85. package/esm2022/lib/components/feedback/alert/component/alert.component.js.map +0 -1
  86. package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js +0 -17
  87. package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js.map +0 -1
  88. package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js +0 -17
  89. package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js.map +0 -1
  90. package/esm2022/lib/components/feedback/alert/model/alert.types.js +0 -1
  91. package/esm2022/lib/components/feedback/alert/model/alert.types.js.map +0 -1
  92. package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js +0 -69
  93. package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js.map +0 -1
  94. package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js +0 -1
  95. package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js.map +0 -1
  96. package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js +0 -227
  97. package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js.map +0 -1
  98. package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js +0 -1
  99. package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js.map +0 -1
  100. package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js +0 -441
  101. package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js.map +0 -1
  102. package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js +0 -1
  103. package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js.map +0 -1
  104. package/esm2022/lib/components/forms/email-field/component/email-field.component.js +0 -214
  105. package/esm2022/lib/components/forms/email-field/component/email-field.component.js.map +0 -1
  106. package/esm2022/lib/components/forms/email-field/model/email-field.types.js +0 -1
  107. package/esm2022/lib/components/forms/email-field/model/email-field.types.js.map +0 -1
  108. package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js +0 -69
  109. package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js.map +0 -1
  110. package/esm2022/lib/components/forms/form-field/component/form-error.component.js +0 -19
  111. package/esm2022/lib/components/forms/form-field/component/form-error.component.js.map +0 -1
  112. package/esm2022/lib/components/forms/form-field/component/form-field.component.js +0 -394
  113. package/esm2022/lib/components/forms/form-field/component/form-field.component.js.map +0 -1
  114. package/esm2022/lib/components/forms/form-field/component/form-hint.component.js +0 -18
  115. package/esm2022/lib/components/forms/form-field/component/form-hint.component.js.map +0 -1
  116. package/esm2022/lib/components/forms/form-field/component/form-label.component.js +0 -18
  117. package/esm2022/lib/components/forms/form-field/component/form-label.component.js.map +0 -1
  118. package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js +0 -14
  119. package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js.map +0 -1
  120. package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js +0 -17
  121. package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js.map +0 -1
  122. package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js +0 -17
  123. package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js.map +0 -1
  124. package/esm2022/lib/components/forms/form-field/index.js +0 -8
  125. package/esm2022/lib/components/forms/form-field/index.js.map +0 -1
  126. package/esm2022/lib/components/forms/form-field/model/form-control.contract.js +0 -3
  127. package/esm2022/lib/components/forms/form-field/model/form-control.contract.js.map +0 -1
  128. package/esm2022/lib/components/forms/form-field/model/form-field.types.js +0 -1
  129. package/esm2022/lib/components/forms/form-field/model/form-field.types.js.map +0 -1
  130. package/esm2022/lib/components/forms/input/directives/input.directive.js +0 -148
  131. package/esm2022/lib/components/forms/input/directives/input.directive.js.map +0 -1
  132. package/esm2022/lib/components/forms/input/index.js +0 -2
  133. package/esm2022/lib/components/forms/input/index.js.map +0 -1
  134. package/esm2022/lib/components/forms/input/model/input.defaults.js +0 -27
  135. package/esm2022/lib/components/forms/input/model/input.defaults.js.map +0 -1
  136. package/esm2022/lib/components/forms/input/model/input.types.js +0 -1
  137. package/esm2022/lib/components/forms/input/model/input.types.js.map +0 -1
  138. package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js +0 -1119
  139. package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js.map +0 -1
  140. package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js +0 -1
  141. package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js.map +0 -1
  142. package/esm2022/lib/components/forms/option/component/option.component.js +0 -149
  143. package/esm2022/lib/components/forms/option/component/option.component.js.map +0 -1
  144. package/esm2022/lib/components/forms/option/directives/option-slots.directive.js +0 -58
  145. package/esm2022/lib/components/forms/option/directives/option-slots.directive.js.map +0 -1
  146. package/esm2022/lib/components/forms/option/index.js +0 -3
  147. package/esm2022/lib/components/forms/option/index.js.map +0 -1
  148. package/esm2022/lib/components/forms/option/model/option.types.js +0 -1
  149. package/esm2022/lib/components/forms/option/model/option.types.js.map +0 -1
  150. package/esm2022/lib/components/forms/option-group/component/option-group.component.js +0 -103
  151. package/esm2022/lib/components/forms/option-group/component/option-group.component.js.map +0 -1
  152. package/esm2022/lib/components/forms/option-group/index.js +0 -2
  153. package/esm2022/lib/components/forms/option-group/index.js.map +0 -1
  154. package/esm2022/lib/components/forms/option-group/model/option-group.types.js +0 -1
  155. package/esm2022/lib/components/forms/option-group/model/option-group.types.js.map +0 -1
  156. package/esm2022/lib/components/forms/password-field/component/password-field.component.js +0 -299
  157. package/esm2022/lib/components/forms/password-field/component/password-field.component.js.map +0 -1
  158. package/esm2022/lib/components/forms/password-field/model/password-field-constants.js +0 -5
  159. package/esm2022/lib/components/forms/password-field/model/password-field-constants.js.map +0 -1
  160. package/esm2022/lib/components/forms/password-field/model/password-field.types.js +0 -1
  161. package/esm2022/lib/components/forms/password-field/model/password-field.types.js.map +0 -1
  162. package/esm2022/lib/components/forms/password-field/model/password-policy.types.js +0 -1
  163. package/esm2022/lib/components/forms/password-field/model/password-policy.types.js.map +0 -1
  164. package/esm2022/lib/components/forms/password-field/model/password-strength.js +0 -67
  165. package/esm2022/lib/components/forms/password-field/model/password-strength.js.map +0 -1
  166. package/esm2022/lib/components/forms/password-field/validators/password.validator.js +0 -45
  167. package/esm2022/lib/components/forms/password-field/validators/password.validator.js.map +0 -1
  168. package/esm2022/lib/components/forms/radio/component/radio.component.js +0 -219
  169. package/esm2022/lib/components/forms/radio/component/radio.component.js.map +0 -1
  170. package/esm2022/lib/components/forms/radio/model/radio.types.js +0 -1
  171. package/esm2022/lib/components/forms/radio/model/radio.types.js.map +0 -1
  172. package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js +0 -348
  173. package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js.map +0 -1
  174. package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js +0 -3
  175. package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js.map +0 -1
  176. package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js +0 -1
  177. package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js.map +0 -1
  178. package/esm2022/lib/components/forms/select/component/select.component.js +0 -819
  179. package/esm2022/lib/components/forms/select/component/select.component.js.map +0 -1
  180. package/esm2022/lib/components/forms/select/model/select.types.js +0 -1
  181. package/esm2022/lib/components/forms/select/model/select.types.js.map +0 -1
  182. package/esm2022/lib/components/forms/switch/component/switch.component.js +0 -211
  183. package/esm2022/lib/components/forms/switch/component/switch.component.js.map +0 -1
  184. package/esm2022/lib/components/forms/switch/index.js +0 -2
  185. package/esm2022/lib/components/forms/switch/index.js.map +0 -1
  186. package/esm2022/lib/components/forms/switch/model/switch.types.js +0 -1
  187. package/esm2022/lib/components/forms/switch/model/switch.types.js.map +0 -1
  188. package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js +0 -369
  189. package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js.map +0 -1
  190. package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js +0 -1
  191. package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js.map +0 -1
  192. package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js +0 -137
  193. package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js.map +0 -1
  194. package/esm2022/lib/components/forms/textarea/model/textarea.types.js +0 -1
  195. package/esm2022/lib/components/forms/textarea/model/textarea.types.js.map +0 -1
  196. package/esm2022/lib/components/icon/component/solaris-icon.component.js +0 -20
  197. package/esm2022/lib/components/icon/component/solaris-icon.component.js.map +0 -1
  198. package/esm2022/lib/components/icon/index.js +0 -2
  199. package/esm2022/lib/components/icon/index.js.map +0 -1
  200. package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js +0 -29
  201. package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js.map +0 -1
  202. package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js +0 -317
  203. package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js.map +0 -1
  204. package/esm2022/lib/components/interaction/popover/directives/popover.directive.js +0 -16
  205. package/esm2022/lib/components/interaction/popover/directives/popover.directive.js.map +0 -1
  206. package/esm2022/lib/components/interaction/popover/index.js +0 -4
  207. package/esm2022/lib/components/interaction/popover/index.js.map +0 -1
  208. package/esm2022/lib/components/interaction/popover/model/popover-position.js +0 -145
  209. package/esm2022/lib/components/interaction/popover/model/popover-position.js.map +0 -1
  210. package/esm2022/lib/components/interaction/popover/model/popover.types.js +0 -1
  211. package/esm2022/lib/components/interaction/popover/model/popover.types.js.map +0 -1
  212. package/esm2022/lib/components/interaction/popover/token/popover.tokens.js +0 -3
  213. package/esm2022/lib/components/interaction/popover/token/popover.tokens.js.map +0 -1
  214. package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js +0 -23
  215. package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js.map +0 -1
  216. package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js +0 -405
  217. package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js.map +0 -1
  218. package/esm2022/lib/components/interaction/tooltip/index.js +0 -3
  219. package/esm2022/lib/components/interaction/tooltip/index.js.map +0 -1
  220. package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js +0 -209
  221. package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js.map +0 -1
  222. package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js +0 -1
  223. package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js.map +0 -1
  224. package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js +0 -3
  225. package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js.map +0 -1
  226. package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js +0 -25
  227. package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js.map +0 -1
  228. package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js +0 -1
  229. package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js.map +0 -1
  230. package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js +0 -1
  231. package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js.map +0 -1
  232. package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js +0 -10
  233. package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js.map +0 -1
  234. package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js +0 -60
  235. package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js.map +0 -1
  236. package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js +0 -10
  237. package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js.map +0 -1
  238. package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js +0 -3
  239. package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js.map +0 -1
  240. package/esm2022/lib/services/icon/icons/index.js +0 -2
  241. package/esm2022/lib/services/icon/icons/index.js.map +0 -1
  242. package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js +0 -207
  243. package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js.map +0 -1
  244. package/esm2022/lib/services/icon/index.js +0 -5
  245. package/esm2022/lib/services/icon/index.js.map +0 -1
  246. package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js +0 -1
  247. package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js.map +0 -1
  248. package/esm2022/lib/services/icon/model/solaris-icon.types.js +0 -1
  249. package/esm2022/lib/services/icon/model/solaris-icon.types.js.map +0 -1
  250. package/esm2022/lib/services/icon/provider/provide-solaris-icons.js +0 -10
  251. package/esm2022/lib/services/icon/provider/provide-solaris-icons.js.map +0 -1
  252. package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js +0 -43
  253. package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js.map +0 -1
  254. package/esm2022/lib/services/icon/token/solaris-icon.tokens.js +0 -3
  255. package/esm2022/lib/services/icon/token/solaris-icon.tokens.js.map +0 -1
  256. package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js +0 -1
  257. package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js.map +0 -1
  258. package/esm2022/lib/services/theme/model/solaris-theme.types.js +0 -1
  259. package/esm2022/lib/services/theme/model/solaris-theme.types.js.map +0 -1
  260. package/esm2022/lib/services/theme/provider/provide-solaris-theme.js +0 -10
  261. package/esm2022/lib/services/theme/provider/provide-solaris-theme.js.map +0 -1
  262. package/esm2022/lib/services/theme/service/solaris-theme.service.js +0 -22
  263. package/esm2022/lib/services/theme/service/solaris-theme.service.js.map +0 -1
  264. package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js +0 -10
  265. package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js.map +0 -1
  266. package/esm2022/lib/services/theme/token/solaris-theme.tokens.js +0 -3
  267. package/esm2022/lib/services/theme/token/solaris-theme.tokens.js.map +0 -1
  268. package/esm2022/lib/services/translation/index.js +0 -6
  269. package/esm2022/lib/services/translation/index.js.map +0 -1
  270. package/esm2022/lib/services/translation/model/solaris-locale.types.js +0 -1
  271. package/esm2022/lib/services/translation/model/solaris-locale.types.js.map +0 -1
  272. package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js +0 -1
  273. package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js.map +0 -1
  274. package/esm2022/lib/services/translation/model/solaris-translate-defaults.js +0 -40
  275. package/esm2022/lib/services/translation/model/solaris-translate-defaults.js.map +0 -1
  276. package/esm2022/lib/services/translation/model/solaris-translation.types.js +0 -1
  277. package/esm2022/lib/services/translation/model/solaris-translation.types.js.map +0 -1
  278. package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js +0 -20
  279. package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js.map +0 -1
  280. package/esm2022/lib/services/translation/provider/provide-solaris-translate.js +0 -10
  281. package/esm2022/lib/services/translation/provider/provide-solaris-translate.js.map +0 -1
  282. package/esm2022/lib/services/translation/service/solaris-translate.service.js +0 -87
  283. package/esm2022/lib/services/translation/service/solaris-translate.service.js.map +0 -1
  284. package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js +0 -32
  285. package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js.map +0 -1
  286. package/esm2022/lib/services/translation/token/solaris-translate.tokens.js +0 -3
  287. package/esm2022/lib/services/translation/token/solaris-translate.tokens.js.map +0 -1
  288. package/esm2022/lib/testing/provide-solaris-testing.js +0 -11
  289. package/esm2022/lib/testing/provide-solaris-testing.js.map +0 -1
  290. package/esm2022/lib/testing/solaris-test-utilities.js +0 -12
  291. package/esm2022/lib/testing/solaris-test-utilities.js.map +0 -1
  292. package/index.d.ts +0 -106
  293. package/lib/components/actions/button/directives/button-icon.directive.d.ts +0 -5
  294. package/lib/components/actions/button/directives/button.directive.d.ts +0 -22
  295. package/lib/components/actions/button/model/button.types.d.ts +0 -5
  296. package/lib/components/actions/button-group/component/button-group.component.d.ts +0 -10
  297. package/lib/components/actions/button-group/model/button-group.types.d.ts +0 -2
  298. package/lib/components/actions/icon-button/directives/icon-button-badge.directive.d.ts +0 -5
  299. package/lib/components/actions/icon-button/directives/icon-button.directive.d.ts +0 -21
  300. package/lib/components/actions/icon-button/model/icon-button.types.d.ts +0 -5
  301. package/lib/components/data-display/badge/component/badge.component.d.ts +0 -12
  302. package/lib/components/data-display/badge/directives/badge-icon.directive.d.ts +0 -5
  303. package/lib/components/data-display/badge/model/badge.types.d.ts +0 -6
  304. package/lib/components/data-display/card/component/card.component.d.ts +0 -10
  305. package/lib/components/data-display/card/directives/card-actions.directive.d.ts +0 -5
  306. package/lib/components/data-display/card/directives/card-content.directive.d.ts +0 -5
  307. package/lib/components/data-display/card/directives/card-description.directive.d.ts +0 -5
  308. package/lib/components/data-display/card/directives/card-footer.directive.d.ts +0 -6
  309. package/lib/components/data-display/card/directives/card-header.directive.d.ts +0 -5
  310. package/lib/components/data-display/card/directives/card-media.directive.d.ts +0 -5
  311. package/lib/components/data-display/card/directives/card-title.directive.d.ts +0 -5
  312. package/lib/components/data-display/card/model/card.types.d.ts +0 -4
  313. package/lib/components/feedback/alert/component/alert-actions.component.d.ts +0 -5
  314. package/lib/components/feedback/alert/component/alert.component.d.ts +0 -26
  315. package/lib/components/feedback/alert/directives/alert-description.directive.d.ts +0 -5
  316. package/lib/components/feedback/alert/directives/alert-title.directive.d.ts +0 -5
  317. package/lib/components/feedback/alert/model/alert.types.d.ts +0 -5
  318. package/lib/components/feedback/skeleton/component/skeleton.component.d.ts +0 -17
  319. package/lib/components/feedback/skeleton/model/skeleton.types.d.ts +0 -5
  320. package/lib/components/forms/checkbox/component/checkbox.component.d.ts +0 -70
  321. package/lib/components/forms/checkbox/model/checkbox.types.d.ts +0 -5
  322. package/lib/components/forms/checkbox-group/component/checkbox-group.component.d.ts +0 -123
  323. package/lib/components/forms/checkbox-group/model/checkbox-group.types.d.ts +0 -5
  324. package/lib/components/forms/email-field/component/email-field.component.d.ts +0 -66
  325. package/lib/components/forms/email-field/model/email-field.types.d.ts +0 -6
  326. package/lib/components/forms/email-field/validators/email-field.validators.d.ts +0 -8
  327. package/lib/components/forms/form-field/component/form-error.component.d.ts +0 -5
  328. package/lib/components/forms/form-field/component/form-field.component.d.ts +0 -90
  329. package/lib/components/forms/form-field/component/form-hint.component.d.ts +0 -5
  330. package/lib/components/forms/form-field/component/form-label.component.d.ts +0 -5
  331. package/lib/components/forms/form-field/directives/form-field-trigger.directive.d.ts +0 -5
  332. package/lib/components/forms/form-field/directives/form-prefix.directive.d.ts +0 -5
  333. package/lib/components/forms/form-field/directives/form-suffix.directive.d.ts +0 -5
  334. package/lib/components/forms/form-field/index.d.ts +0 -8
  335. package/lib/components/forms/form-field/model/form-control.contract.d.ts +0 -11
  336. package/lib/components/forms/form-field/model/form-field.types.d.ts +0 -5
  337. package/lib/components/forms/input/directives/input.directive.d.ts +0 -37
  338. package/lib/components/forms/input/index.d.ts +0 -2
  339. package/lib/components/forms/input/model/input.defaults.d.ts +0 -2
  340. package/lib/components/forms/input/model/input.types.d.ts +0 -4
  341. package/lib/components/forms/multi-select/component/multi-select.component.d.ts +0 -202
  342. package/lib/components/forms/multi-select/model/multi-select.types.d.ts +0 -5
  343. package/lib/components/forms/option/component/option.component.d.ts +0 -58
  344. package/lib/components/forms/option/directives/option-slots.directive.d.ts +0 -21
  345. package/lib/components/forms/option/index.d.ts +0 -3
  346. package/lib/components/forms/option/model/option.types.d.ts +0 -3
  347. package/lib/components/forms/option-group/component/option-group.component.d.ts +0 -32
  348. package/lib/components/forms/option-group/index.d.ts +0 -2
  349. package/lib/components/forms/option-group/model/option-group.types.d.ts +0 -2
  350. package/lib/components/forms/password-field/component/password-field.component.d.ts +0 -81
  351. package/lib/components/forms/password-field/model/password-field-constants.d.ts +0 -4
  352. package/lib/components/forms/password-field/model/password-field.types.d.ts +0 -6
  353. package/lib/components/forms/password-field/model/password-policy.types.d.ts +0 -10
  354. package/lib/components/forms/password-field/model/password-strength.d.ts +0 -2
  355. package/lib/components/forms/password-field/validators/password.validator.d.ts +0 -3
  356. package/lib/components/forms/radio/component/radio.component.d.ts +0 -68
  357. package/lib/components/forms/radio/model/radio.types.d.ts +0 -4
  358. package/lib/components/forms/radio-group/component/radio-group.component.d.ts +0 -86
  359. package/lib/components/forms/radio-group/model/radio-group.token.d.ts +0 -2
  360. package/lib/components/forms/radio-group/model/radio-group.types.d.ts +0 -5
  361. package/lib/components/forms/select/component/select.component.d.ts +0 -158
  362. package/lib/components/forms/select/model/select.types.d.ts +0 -4
  363. package/lib/components/forms/switch/component/switch.component.d.ts +0 -66
  364. package/lib/components/forms/switch/index.d.ts +0 -2
  365. package/lib/components/forms/switch/model/switch.types.d.ts +0 -4
  366. package/lib/components/forms/switch-group/component/switch-group.component.d.ts +0 -91
  367. package/lib/components/forms/switch-group/model/switch-group.types.d.ts +0 -5
  368. package/lib/components/forms/textarea/directives/textarea.directive.d.ts +0 -37
  369. package/lib/components/forms/textarea/model/textarea.types.d.ts +0 -5
  370. package/lib/components/icon/component/solaris-icon.component.d.ts +0 -13
  371. package/lib/components/icon/index.d.ts +0 -1
  372. package/lib/components/interaction/popover/component/popover-panel.component.d.ts +0 -10
  373. package/lib/components/interaction/popover/directives/popover-trigger.directive.d.ts +0 -65
  374. package/lib/components/interaction/popover/directives/popover.directive.d.ts +0 -7
  375. package/lib/components/interaction/popover/index.d.ts +0 -4
  376. package/lib/components/interaction/popover/model/popover-position.d.ts +0 -4
  377. package/lib/components/interaction/popover/model/popover.types.d.ts +0 -7
  378. package/lib/components/interaction/popover/token/popover.tokens.d.ts +0 -12
  379. package/lib/components/interaction/tooltip/component/tooltip-panel.component.d.ts +0 -9
  380. package/lib/components/interaction/tooltip/directive/tooltip.directive.d.ts +0 -80
  381. package/lib/components/interaction/tooltip/index.d.ts +0 -3
  382. package/lib/components/interaction/tooltip/model/tooltip-position.d.ts +0 -5
  383. package/lib/components/interaction/tooltip/model/tooltip.types.d.ts +0 -22
  384. package/lib/components/interaction/tooltip/token/tooltip.tokens.d.ts +0 -21
  385. package/lib/services/accessibility/directives/visually-hidden.directive.d.ts +0 -5
  386. package/lib/services/accessibility/model/solaris-accessibility-config.interface.d.ts +0 -4
  387. package/lib/services/accessibility/model/solaris-accessibility.types.d.ts +0 -5
  388. package/lib/services/accessibility/provider/provide-solaris-accessibility.d.ts +0 -3
  389. package/lib/services/accessibility/service/solaris-accessibility.service.d.ts +0 -15
  390. package/lib/services/accessibility/testing/solaris-accessibility-testing.provider.d.ts +0 -3
  391. package/lib/services/accessibility/token/solaris-accessibility.tokens.d.ts +0 -3
  392. package/lib/services/icon/icons/index.d.ts +0 -1
  393. package/lib/services/icon/icons/solaris-built-in-icons.d.ts +0 -2
  394. package/lib/services/icon/index.d.ts +0 -8
  395. package/lib/services/icon/model/solaris-icon-definition.interface.d.ts +0 -36
  396. package/lib/services/icon/model/solaris-icon.types.d.ts +0 -4
  397. package/lib/services/icon/provider/provide-solaris-icons.d.ts +0 -3
  398. package/lib/services/icon/service/solaris-icon-registry.service.d.ts +0 -12
  399. package/lib/services/icon/token/solaris-icon.tokens.d.ts +0 -6
  400. package/lib/services/theme/model/solaris-theme-config.interface.d.ts +0 -5
  401. package/lib/services/theme/model/solaris-theme.types.d.ts +0 -3
  402. package/lib/services/theme/provider/provide-solaris-theme.d.ts +0 -3
  403. package/lib/services/theme/service/solaris-theme.service.d.ts +0 -9
  404. package/lib/services/theme/testing/solaris-theme-testing.provider.d.ts +0 -3
  405. package/lib/services/theme/token/solaris-theme.tokens.d.ts +0 -3
  406. package/lib/services/translation/index.d.ts +0 -8
  407. package/lib/services/translation/model/solaris-locale.types.d.ts +0 -4
  408. package/lib/services/translation/model/solaris-translate-config.interface.d.ts +0 -8
  409. package/lib/services/translation/model/solaris-translate-defaults.d.ts +0 -2
  410. package/lib/services/translation/model/solaris-translation.types.d.ts +0 -3
  411. package/lib/services/translation/pipe/solaris-translate.pipe.d.ts +0 -8
  412. package/lib/services/translation/provider/provide-solaris-translate.d.ts +0 -3
  413. package/lib/services/translation/service/solaris-translate.service.d.ts +0 -15
  414. package/lib/services/translation/testing/solaris-translate-testing.provider.d.ts +0 -3
  415. package/lib/services/translation/token/solaris-translate.tokens.d.ts +0 -3
  416. package/lib/testing/provide-solaris-testing.d.ts +0 -10
  417. package/lib/testing/solaris-test-utilities.d.ts +0 -3
@@ -1,214 +0,0 @@
1
- import { Component, input, computed, signal, forwardRef, inject, ViewChild, ElementRef, isDevMode, } from '@angular/core';
2
- import { NG_VALUE_ACCESSOR, FormsModule, } from '@angular/forms';
3
- import { isValidEmailFormat, extractDomain, isDomainAllowed, isDomainBlocked, } from '../validators/email-field.validators';
4
- import { SolarisTranslateService } from '../../../../services/translation';
5
- import { SolarisFormFieldComponent } from '../../form-field';
6
- import { SolarisInputDirective } from '../../input';
7
- import * as i0 from "@angular/core";
8
- export class SolarisEmailFieldComponent {
9
- translateService = inject(SolarisTranslateService);
10
- inputElementRef;
11
- id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
12
- name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
13
- hintKey = input(...(ngDevMode ? [undefined, { debugName: "hintKey" }] : /* istanbul ignore next */ []));
14
- hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
15
- labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : /* istanbul ignore next */ []));
16
- errorKey = input(...(ngDevMode ? [undefined, { debugName: "errorKey" }] : /* istanbul ignore next */ []));
17
- value = input('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
18
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
19
- error = input('', ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
20
- placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
21
- invalidError = input(...(ngDevMode ? [undefined, { debugName: "invalidError" }] : /* istanbul ignore next */ []));
22
- requiredError = input(...(ngDevMode ? [undefined, { debugName: "requiredError" }] : /* istanbul ignore next */ []));
23
- placeholderKey = input(...(ngDevMode ? [undefined, { debugName: "placeholderKey" }] : /* istanbul ignore next */ []));
24
- invalidErrorKey = input(...(ngDevMode ? [undefined, { debugName: "invalidErrorKey" }] : /* istanbul ignore next */ []));
25
- requiredErrorKey = input(...(ngDevMode ? [undefined, { debugName: "requiredErrorKey" }] : /* istanbul ignore next */ []));
26
- allowedDomainError = input(...(ngDevMode ? [undefined, { debugName: "allowedDomainError" }] : /* istanbul ignore next */ []));
27
- blockedDomainError = input(...(ngDevMode ? [undefined, { debugName: "blockedDomainError" }] : /* istanbul ignore next */ []));
28
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
29
- optional = input(false, ...(ngDevMode ? [{ debugName: "optional" }] : /* istanbul ignore next */ []));
30
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
31
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
32
- trimOnBlur = input(true, ...(ngDevMode ? [{ debugName: "trimOnBlur" }] : /* istanbul ignore next */ []));
33
- allowedDomainErrorKey = input(...(ngDevMode ? [undefined, { debugName: "allowedDomainErrorKey" }] : /* istanbul ignore next */ []));
34
- blockedDomainErrorKey = input(...(ngDevMode ? [undefined, { debugName: "blockedDomainErrorKey" }] : /* istanbul ignore next */ []));
35
- autocomplete = input('email', ...(ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []));
36
- invalid = input(...(ngDevMode ? [undefined, { debugName: "invalid" }] : /* istanbul ignore next */ []));
37
- normalizeLowercase = input(false, ...(ngDevMode ? [{ debugName: "normalizeLowercase" }] : /* istanbul ignore next */ []));
38
- allowedDomains = input(...(ngDevMode ? [undefined, { debugName: "allowedDomains" }] : /* istanbul ignore next */ []));
39
- blockedDomains = input(...(ngDevMode ? [undefined, { debugName: "blockedDomains" }] : /* istanbul ignore next */ []));
40
- density = input(...(ngDevMode ? [undefined, { debugName: "density" }] : /* istanbul ignore next */ []));
41
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
42
- radius = input('md', ...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
43
- appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
44
- validateDomain = input(false, { ...(ngDevMode ? { debugName: "validateDomain" } : /* istanbul ignore next */ {}), transform: (v) => v });
45
- internalValue = signal('', ...(ngDevMode ? [{ debugName: "internalValue" }] : /* istanbul ignore next */ []));
46
- internalDisabled = signal(false, ...(ngDevMode ? [{ debugName: "internalDisabled" }] : /* istanbul ignore next */ []));
47
- internalFocused = signal(false, ...(ngDevMode ? [{ debugName: "internalFocused" }] : /* istanbul ignore next */ []));
48
- touched = signal(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
49
- dirty = signal(false, ...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
50
- // eslint-disable-next-line @typescript-eslint/no-empty-function
51
- onChange = () => { };
52
- // eslint-disable-next-line @typescript-eslint/no-empty-function
53
- onTouched = () => { };
54
- placeholderText = computed(() => {
55
- const key = this.placeholderKey();
56
- if (key) {
57
- return this.translateService.translate(key);
58
- }
59
- return this.placeholder() ?? '';
60
- }, ...(ngDevMode ? [{ debugName: "placeholderText" }] : /* istanbul ignore next */ []));
61
- isEffectivelyDisabled = computed(() => {
62
- return this.disabled() || this.internalDisabled();
63
- }, ...(ngDevMode ? [{ debugName: "isEffectivelyDisabled" }] : /* istanbul ignore next */ []));
64
- effectiveValidateDomain = computed(() => {
65
- const explicit = this.validateDomain();
66
- if (explicit)
67
- return true;
68
- const allowed = this.allowedDomains();
69
- const blocked = this.blockedDomains();
70
- if (allowed && allowed.length > 0)
71
- return true;
72
- return !!(blocked && blocked.length > 0);
73
- }, ...(ngDevMode ? [{ debugName: "effectiveValidateDomain" }] : /* istanbul ignore next */ []));
74
- computedError = computed(() => {
75
- const manualError = this.error() || this.translateKey(this.errorKey());
76
- if (manualError)
77
- return manualError;
78
- const val = this.internalValue();
79
- const isTouchedOrDirty = this.touched() || this.dirty();
80
- if (!isTouchedOrDirty || this.internalFocused())
81
- return '';
82
- if (!val || val.trim().length === 0) {
83
- if (this.required()) {
84
- return this.buildError(this.requiredError(), this.requiredErrorKey(), 'solaris.email-field.required', 'Email is required.');
85
- }
86
- return '';
87
- }
88
- if (!isValidEmailFormat(val)) {
89
- return this.buildError(this.invalidError(), this.invalidErrorKey(), 'solaris.email-field.invalid', 'Enter a valid email address.');
90
- }
91
- return this.computeDomainError(val) ?? '';
92
- }, ...(ngDevMode ? [{ debugName: "computedError" }] : /* istanbul ignore next */ []));
93
- isFieldInvalid = computed(() => {
94
- const manual = this.invalid();
95
- if (manual !== undefined) {
96
- return manual;
97
- }
98
- if (this.internalFocused()) {
99
- return false;
100
- }
101
- const isTouchedOrDirty = this.touched() || this.dirty();
102
- if (!isTouchedOrDirty) {
103
- return false;
104
- }
105
- return !!this.computedError();
106
- }, ...(ngDevMode ? [{ debugName: "isFieldInvalid" }] : /* istanbul ignore next */ []));
107
- writeValue(safe = '') {
108
- this.internalValue.set(safe);
109
- }
110
- registerOnChange(fn) {
111
- this.onChange = fn;
112
- }
113
- registerOnTouched(fn) {
114
- this.onTouched = fn;
115
- }
116
- setDisabledState(isDisabled) {
117
- this.internalDisabled.set(isDisabled);
118
- }
119
- onInput(event) {
120
- const target = event.target;
121
- const newValue = target.value;
122
- if (!this.dirty()) {
123
- this.dirty.set(true);
124
- }
125
- this.internalValue.set(newValue);
126
- this.onChange(newValue);
127
- }
128
- onInputFocus() {
129
- this.internalFocused.set(true);
130
- }
131
- onInputBlur() {
132
- this.internalFocused.set(false);
133
- let currentValue = this.internalValue();
134
- if (this.trimOnBlur()) {
135
- currentValue = currentValue.trim();
136
- }
137
- if (this.normalizeLowercase()) {
138
- currentValue = currentValue.toLowerCase();
139
- }
140
- if (currentValue !== this.internalValue()) {
141
- this.internalValue.set(currentValue);
142
- this.onChange(currentValue);
143
- if (this.inputElementRef) {
144
- try {
145
- // SECURITY_EXCEPTION: nativeElement.value assignment is required to sync the input element with the normalized value after blur. Angular's data binding may not reflect synchronous value changes to the native input. Same approach is standard for CVA blur normalization.
146
- this.inputElementRef.nativeElement.value = currentValue;
147
- }
148
- catch {
149
- if (isDevMode()) {
150
- console.warn('[SolarisEmailField] Could not update input value after normalization.');
151
- }
152
- }
153
- }
154
- }
155
- if (!this.touched()) {
156
- this.touched.set(true);
157
- }
158
- this.onTouched();
159
- }
160
- translateWithDefault(key, defaultText, params) {
161
- const result = this.translateService.translate(key, params);
162
- return result !== key ? result : defaultText;
163
- }
164
- translateKey(key) {
165
- if (key) {
166
- const translated = this.translateService.translate(key);
167
- return translated !== key ? translated : undefined;
168
- }
169
- return undefined;
170
- }
171
- buildError(direct, key, fallbackKey, fallbackDefault) {
172
- return (direct ??
173
- this.translateKey(key) ??
174
- this.translateWithDefault(fallbackKey, fallbackDefault));
175
- }
176
- computeDomainError(val) {
177
- if (!this.effectiveValidateDomain())
178
- return undefined;
179
- const domain = extractDomain(val);
180
- if (!domain)
181
- return undefined;
182
- const allowed = this.allowedDomains();
183
- if (allowed && allowed.length > 0 && !isDomainAllowed(domain, allowed)) {
184
- return this.buildError(this.allowedDomainError(), this.allowedDomainErrorKey(), 'solaris.email-field.allowedDomain', 'Email domain is not allowed.');
185
- }
186
- const blocked = this.blockedDomains();
187
- if (blocked && blocked.length > 0 && isDomainBlocked(domain, blocked)) {
188
- return this.buildError(this.blockedDomainError(), this.blockedDomainErrorKey(), 'solaris.email-field.blockedDomain', 'Email domain is not allowed.');
189
- }
190
- return undefined;
191
- }
192
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisEmailFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
193
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: SolarisEmailFieldComponent, isStandalone: true, selector: "solaris-email-field", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, hintKey: { classPropertyName: "hintKey", publicName: "hintKey", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, errorKey: { classPropertyName: "errorKey", publicName: "errorKey", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, invalidError: { classPropertyName: "invalidError", publicName: "invalidError", isSignal: true, isRequired: false, transformFunction: null }, requiredError: { classPropertyName: "requiredError", publicName: "requiredError", isSignal: true, isRequired: false, transformFunction: null }, placeholderKey: { classPropertyName: "placeholderKey", publicName: "placeholderKey", isSignal: true, isRequired: false, transformFunction: null }, invalidErrorKey: { classPropertyName: "invalidErrorKey", publicName: "invalidErrorKey", isSignal: true, isRequired: false, transformFunction: null }, requiredErrorKey: { classPropertyName: "requiredErrorKey", publicName: "requiredErrorKey", isSignal: true, isRequired: false, transformFunction: null }, allowedDomainError: { classPropertyName: "allowedDomainError", publicName: "allowedDomainError", isSignal: true, isRequired: false, transformFunction: null }, blockedDomainError: { classPropertyName: "blockedDomainError", publicName: "blockedDomainError", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, trimOnBlur: { classPropertyName: "trimOnBlur", publicName: "trimOnBlur", isSignal: true, isRequired: false, transformFunction: null }, allowedDomainErrorKey: { classPropertyName: "allowedDomainErrorKey", publicName: "allowedDomainErrorKey", isSignal: true, isRequired: false, transformFunction: null }, blockedDomainErrorKey: { classPropertyName: "blockedDomainErrorKey", publicName: "blockedDomainErrorKey", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, normalizeLowercase: { classPropertyName: "normalizeLowercase", publicName: "normalizeLowercase", isSignal: true, isRequired: false, transformFunction: null }, allowedDomains: { classPropertyName: "allowedDomains", publicName: "allowedDomains", isSignal: true, isRequired: false, transformFunction: null }, blockedDomains: { classPropertyName: "blockedDomains", publicName: "blockedDomains", 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 }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, validateDomain: { classPropertyName: "validateDomain", publicName: "validateDomain", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
194
- {
195
- provide: NG_VALUE_ACCESSOR,
196
- useExisting: forwardRef(() => SolarisEmailFieldComponent),
197
- multi: true,
198
- },
199
- ], viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true, read: ElementRef }], ngImport: i0, template: "<solaris-form-field\n [label]=\"label()\"\n [labelKey]=\"labelKey()\"\n [hint]=\"hint()\"\n [hintKey]=\"hintKey()\"\n [error]=\"error() || computedError()\"\n [errorKey]=\"errorKey()\"\n [invalid]=\"isFieldInvalid()\"\n [required]=\"required()\"\n [optional]=\"optional()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"readonly()\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [density]=\"density()\"\n [radius]=\"radius()\"\n>\n <input\n #inputElement\n solaris-input\n type=\"email\"\n [value]=\"internalValue()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"'email'\"\n [attr.autocapitalize]=\"'none'\"\n [attr.spellcheck]=\"'false'\"\n [attr.name]=\"name() ?? null\"\n [attr.id]=\"id() ?? null\"\n [attr.placeholder]=\"placeholderText() || null\"\n (input)=\"onInput($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n />\n</solaris-form-field>\n", styles: [":host{display:block;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: SolarisFormFieldComponent, selector: "solaris-form-field", inputs: ["hintKey", "labelKey", "hint", "errorKey", "label", "error", "optionalLabel", "requiredLabel", "optionalLabelKey", "requiredLabelKey", "required", "optional", "invalid", "disabled", "readonly", "density", "size", "radius", "appearance", "control"] }, { kind: "directive", type: SolarisInputDirective, selector: "[solaris-input]", inputs: ["appearance", "radius", "size", "density", "invalid", "fullWidth"] }] });
200
- }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisEmailFieldComponent, decorators: [{
202
- type: Component,
203
- args: [{ selector: 'solaris-email-field', standalone: true, imports: [FormsModule, SolarisFormFieldComponent, SolarisInputDirective], providers: [
204
- {
205
- provide: NG_VALUE_ACCESSOR,
206
- useExisting: forwardRef(() => SolarisEmailFieldComponent),
207
- multi: true,
208
- },
209
- ], template: "<solaris-form-field\n [label]=\"label()\"\n [labelKey]=\"labelKey()\"\n [hint]=\"hint()\"\n [hintKey]=\"hintKey()\"\n [error]=\"error() || computedError()\"\n [errorKey]=\"errorKey()\"\n [invalid]=\"isFieldInvalid()\"\n [required]=\"required()\"\n [optional]=\"optional()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"readonly()\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [density]=\"density()\"\n [radius]=\"radius()\"\n>\n <input\n #inputElement\n solaris-input\n type=\"email\"\n [value]=\"internalValue()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"'email'\"\n [attr.autocapitalize]=\"'none'\"\n [attr.spellcheck]=\"'false'\"\n [attr.name]=\"name() ?? null\"\n [attr.id]=\"id() ?? null\"\n [attr.placeholder]=\"placeholderText() || null\"\n (input)=\"onInput($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n />\n</solaris-form-field>\n", styles: [":host{display:block;box-sizing:border-box}\n"] }]
210
- }], propDecorators: { inputElementRef: [{
211
- type: ViewChild,
212
- args: ['inputElement', { read: ElementRef }]
213
- }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], hintKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintKey", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], errorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorKey", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], invalidError: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidError", required: false }] }], requiredError: [{ type: i0.Input, args: [{ isSignal: true, alias: "requiredError", required: false }] }], placeholderKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderKey", required: false }] }], invalidErrorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidErrorKey", required: false }] }], requiredErrorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "requiredErrorKey", required: false }] }], allowedDomainError: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedDomainError", required: false }] }], blockedDomainError: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockedDomainError", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], trimOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "trimOnBlur", required: false }] }], allowedDomainErrorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedDomainErrorKey", required: false }] }], blockedDomainErrorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockedDomainErrorKey", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], normalizeLowercase: [{ type: i0.Input, args: [{ isSignal: true, alias: "normalizeLowercase", required: false }] }], allowedDomains: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowedDomains", required: false }] }], blockedDomains: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockedDomains", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], validateDomain: [{ type: i0.Input, args: [{ isSignal: true, alias: "validateDomain", required: false }] }] } });
214
- //# sourceMappingURL=email-field.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email-field.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/email-field/component/email-field.component.ts","../../../../../../../../../packages/angular/src/lib/components/forms/email-field/component/email-field.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EACV,MAAM,EACN,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBA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2BAA2B,CAAC;4BACzD,KAAK,EAAE,IAAI;yBACZ;qBACF;;sBAOA,SAAS;uBAAC,cAAc,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE","sourcesContent":["import {\n Component,\n input,\n computed,\n signal,\n forwardRef,\n inject,\n ViewChild,\n ElementRef,\n isDevMode,\n} from '@angular/core';\nimport {\n NG_VALUE_ACCESSOR,\n ControlValueAccessor,\n FormsModule,\n} from '@angular/forms';\n\nimport type {\n SolarisEmailFieldAppearance,\n SolarisEmailFieldSize,\n SolarisEmailFieldDensity,\n SolarisEmailFieldRadius,\n} from '../model/email-field.types';\nimport {\n isValidEmailFormat,\n extractDomain,\n isDomainAllowed,\n isDomainBlocked,\n} from '../validators/email-field.validators';\nimport type { SolarisTranslateParams } from '../../../../services/translation';\nimport { SolarisTranslateService } from '../../../../services/translation';\nimport { SolarisFormFieldComponent } from '../../form-field';\nimport { SolarisInputDirective } from '../../input';\n\n@Component({\n selector: 'solaris-email-field',\n standalone: true,\n imports: [FormsModule, SolarisFormFieldComponent, SolarisInputDirective],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SolarisEmailFieldComponent),\n multi: true,\n },\n ],\n templateUrl: './email-field.component.html',\n styleUrls: ['./email-field.component.scss'],\n})\nexport class SolarisEmailFieldComponent implements ControlValueAccessor {\n private readonly translateService = inject(SolarisTranslateService);\n\n @ViewChild('inputElement', { read: ElementRef })\n protected inputElementRef?: ElementRef<HTMLInputElement>;\n\n readonly id = input<string>();\n readonly name = input<string>();\n readonly hintKey = input<string>();\n readonly hint = input<string>('');\n readonly labelKey = input<string>();\n readonly errorKey = input<string>();\n readonly value = input<string>('');\n readonly label = input<string>('');\n readonly error = input<string>('');\n readonly placeholder = input<string>();\n readonly invalidError = input<string>();\n readonly requiredError = input<string>();\n readonly placeholderKey = input<string>();\n readonly invalidErrorKey = input<string>();\n readonly requiredErrorKey = input<string>();\n readonly allowedDomainError = input<string>();\n readonly blockedDomainError = input<string>();\n readonly required = input<boolean>(false);\n readonly optional = input<boolean>(false);\n readonly disabled = input<boolean>(false);\n readonly readonly = input<boolean>(false);\n readonly trimOnBlur = input<boolean>(true);\n readonly allowedDomainErrorKey = input<string>();\n readonly blockedDomainErrorKey = input<string>();\n readonly autocomplete = input<string>('email');\n readonly invalid = input<boolean | undefined>();\n readonly normalizeLowercase = input<boolean>(false);\n readonly allowedDomains = input<string[] | undefined>();\n readonly blockedDomains = input<string[] | undefined>();\n readonly density = input<SolarisEmailFieldDensity>();\n readonly size = input<SolarisEmailFieldSize>('md');\n readonly radius = input<SolarisEmailFieldRadius>('md');\n readonly appearance = input<SolarisEmailFieldAppearance>('outline');\n readonly validateDomain = input<boolean, boolean>(false, {\n transform: (v: boolean) => v,\n });\n\n protected readonly internalValue = signal<string>('');\n protected readonly internalDisabled = signal(false);\n protected readonly internalFocused = signal(false);\n protected readonly touched = signal(false);\n protected readonly dirty = signal(false);\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: string) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n protected readonly placeholderText = computed(() => {\n const key = this.placeholderKey();\n if (key) {\n return this.translateService.translate(key);\n }\n return this.placeholder() ?? '';\n });\n\n protected readonly isEffectivelyDisabled = computed(() => {\n return this.disabled() || this.internalDisabled();\n });\n\n protected readonly effectiveValidateDomain = computed(() => {\n const explicit = this.validateDomain();\n if (explicit) return true;\n const allowed = this.allowedDomains();\n const blocked = this.blockedDomains();\n if (allowed && allowed.length > 0) return true;\n return !!(blocked && blocked.length > 0);\n });\n\n protected readonly computedError = computed(() => {\n const manualError = this.error() || this.translateKey(this.errorKey());\n if (manualError) return manualError;\n\n const val = this.internalValue();\n const isTouchedOrDirty = this.touched() || this.dirty();\n if (!isTouchedOrDirty || this.internalFocused()) return '';\n\n if (!val || val.trim().length === 0) {\n if (this.required()) {\n return this.buildError(\n this.requiredError(),\n this.requiredErrorKey(),\n 'solaris.email-field.required',\n 'Email is required.',\n );\n }\n return '';\n }\n\n if (!isValidEmailFormat(val)) {\n return this.buildError(\n this.invalidError(),\n this.invalidErrorKey(),\n 'solaris.email-field.invalid',\n 'Enter a valid email address.',\n );\n }\n\n return this.computeDomainError(val) ?? '';\n });\n\n protected readonly isFieldInvalid = computed(() => {\n const manual = this.invalid();\n if (manual !== undefined) {\n return manual;\n }\n if (this.internalFocused()) {\n return false;\n }\n const isTouchedOrDirty = this.touched() || this.dirty();\n if (!isTouchedOrDirty) {\n return false;\n }\n return !!this.computedError();\n });\n\n writeValue(safe = ''): void {\n this.internalValue.set(safe);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n protected onInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n const newValue = target.value;\n\n if (!this.dirty()) {\n this.dirty.set(true);\n }\n\n this.internalValue.set(newValue);\n this.onChange(newValue);\n }\n\n protected onInputFocus(): void {\n this.internalFocused.set(true);\n }\n\n protected onInputBlur(): void {\n this.internalFocused.set(false);\n\n let currentValue = this.internalValue();\n\n if (this.trimOnBlur()) {\n currentValue = currentValue.trim();\n }\n\n if (this.normalizeLowercase()) {\n currentValue = currentValue.toLowerCase();\n }\n\n if (currentValue !== this.internalValue()) {\n this.internalValue.set(currentValue);\n this.onChange(currentValue);\n\n if (this.inputElementRef) {\n try {\n // SECURITY_EXCEPTION: nativeElement.value assignment is required to sync the input element with the normalized value after blur. Angular's data binding may not reflect synchronous value changes to the native input. Same approach is standard for CVA blur normalization.\n this.inputElementRef.nativeElement.value = currentValue;\n } catch {\n if (isDevMode()) {\n console.warn(\n '[SolarisEmailField] Could not update input value after normalization.',\n );\n }\n }\n }\n }\n\n if (!this.touched()) {\n this.touched.set(true);\n }\n\n this.onTouched();\n }\n\n private translateWithDefault(\n key: string,\n defaultText: string,\n params?: SolarisTranslateParams,\n ): string {\n const result = this.translateService.translate(key, params);\n return result !== key ? result : defaultText;\n }\n\n private translateKey(key: string | undefined): string | undefined {\n if (key) {\n const translated = this.translateService.translate(key);\n return translated !== key ? translated : undefined;\n }\n return undefined;\n }\n\n private buildError(\n direct: string | undefined,\n key: string | undefined,\n fallbackKey: string,\n fallbackDefault: string,\n ): string {\n return (\n direct ??\n this.translateKey(key) ??\n this.translateWithDefault(fallbackKey, fallbackDefault)\n );\n }\n\n private computeDomainError(val: string): string | undefined {\n if (!this.effectiveValidateDomain()) return undefined;\n const domain = extractDomain(val);\n if (!domain) return undefined;\n\n const allowed = this.allowedDomains();\n if (allowed && allowed.length > 0 && !isDomainAllowed(domain, allowed)) {\n return this.buildError(\n this.allowedDomainError(),\n this.allowedDomainErrorKey(),\n 'solaris.email-field.allowedDomain',\n 'Email domain is not allowed.',\n );\n }\n\n const blocked = this.blockedDomains();\n if (blocked && blocked.length > 0 && isDomainBlocked(domain, blocked)) {\n return this.buildError(\n this.blockedDomainError(),\n this.blockedDomainErrorKey(),\n 'solaris.email-field.blockedDomain',\n 'Email domain is not allowed.',\n );\n }\n\n return undefined;\n }\n}\n","<solaris-form-field\n [label]=\"label()\"\n [labelKey]=\"labelKey()\"\n [hint]=\"hint()\"\n [hintKey]=\"hintKey()\"\n [error]=\"error() || computedError()\"\n [errorKey]=\"errorKey()\"\n [invalid]=\"isFieldInvalid()\"\n [required]=\"required()\"\n [optional]=\"optional()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"readonly()\"\n [appearance]=\"appearance()\"\n [size]=\"size()\"\n [density]=\"density()\"\n [radius]=\"radius()\"\n>\n <input\n #inputElement\n solaris-input\n type=\"email\"\n [value]=\"internalValue()\"\n [disabled]=\"isEffectivelyDisabled()\"\n [readonly]=\"readonly()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.inputmode]=\"'email'\"\n [attr.autocapitalize]=\"'none'\"\n [attr.spellcheck]=\"'false'\"\n [attr.name]=\"name() ?? null\"\n [attr.id]=\"id() ?? null\"\n [attr.placeholder]=\"placeholderText() || null\"\n (input)=\"onInput($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n />\n</solaris-form-field>\n"]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=email-field.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email-field.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/email-field/model/email-field.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n SolarisFormFieldAppearance,\n SolarisFormFieldSize,\n SolarisFormFieldDensity,\n SolarisFormFieldRadius,\n} from '../../form-field';\n\nexport type DomainCheckFn = (\n normalizedDomains: string[],\n domain: string,\n) => boolean;\nexport type SolarisEmailFieldAppearance = SolarisFormFieldAppearance;\nexport type SolarisEmailFieldDensity = SolarisFormFieldDensity;\nexport type SolarisEmailFieldRadius = SolarisFormFieldRadius;\nexport type SolarisEmailFieldSize = SolarisFormFieldSize;\n"]}
@@ -1,69 +0,0 @@
1
- const BASIC_EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
2
- export function solarisEmailValidator() {
3
- return (control) => {
4
- const value = control.value;
5
- if (!value || typeof value !== 'string') {
6
- return null;
7
- }
8
- const trimmed = value.trim();
9
- if (trimmed.length === 0) {
10
- return null;
11
- }
12
- if (!BASIC_EMAIL_REGEX.test(trimmed)) {
13
- return { solarisEmail: true };
14
- }
15
- return null;
16
- };
17
- }
18
- function solarisDomainValidator(domains, checkFn, errorKey) {
19
- return (control) => {
20
- const value = control.value;
21
- if (!value || typeof value !== 'string') {
22
- return null;
23
- }
24
- const trimmed = value.trim();
25
- if (trimmed.length === 0) {
26
- return null;
27
- }
28
- const domain = extractDomain(trimmed)?.toLowerCase();
29
- if (!domain) {
30
- return null;
31
- }
32
- const normalizedDomains = domains.map((d) => d.toLowerCase().trim());
33
- if (checkFn(normalizedDomains, domain)) {
34
- return { [errorKey]: true };
35
- }
36
- return null;
37
- };
38
- }
39
- export function solarisAllowedDomainsValidator(allowedDomains) {
40
- return solarisDomainValidator(allowedDomains, (normalized, domain) => !normalized.includes(domain), 'solarisEmailAllowedDomain');
41
- }
42
- export function solarisBlockedDomainsValidator(blockedDomains) {
43
- return solarisDomainValidator(blockedDomains, (normalized, domain) => normalized.includes(domain), 'solarisEmailBlockedDomain');
44
- }
45
- export function extractDomain(value) {
46
- const trimmed = value.trim();
47
- const atIndex = trimmed.lastIndexOf('@');
48
- if (atIndex < 0) {
49
- return null;
50
- }
51
- const domain = trimmed.slice(atIndex + 1);
52
- return domain || null;
53
- }
54
- export function isValidEmailFormat(value) {
55
- if (!value)
56
- return false;
57
- return BASIC_EMAIL_REGEX.test(value.trim());
58
- }
59
- export function isDomainAllowed(domain, allowedDomains) {
60
- return allowedDomains
61
- .map((d) => d.toLowerCase().trim())
62
- .includes(domain.toLowerCase().trim());
63
- }
64
- export function isDomainBlocked(domain, blockedDomains) {
65
- return blockedDomains
66
- .map((d) => d.toLowerCase().trim())
67
- .includes(domain.toLowerCase().trim());
68
- }
69
- //# sourceMappingURL=email-field.validators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email-field.validators.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/email-field/validators/email-field.validators.ts"],"names":[],"mappings":"AAGA,MAAM,iBAAiB,GAAG,kDAAkD,CAAC;AAE7E,MAAM,UAAU,qBAAqB;IACnC,OAAO,CAAC,OAAwB,EAA2B,EAAE;QAC3D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACxC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CA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AE,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { DomainCheckFn } from '../model/email-field.types';\n\nconst BASIC_EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n\nexport function solarisEmailValidator(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value;\n if (!value || typeof value !== 'string') {\n return null;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n return null;\n }\n if (!BASIC_EMAIL_REGEX.test(trimmed)) {\n return { solarisEmail: true };\n }\n return null;\n };\n}\n\nfunction solarisDomainValidator(\n domains: string[],\n checkFn: DomainCheckFn,\n errorKey: string,\n): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const value = control.value;\n if (!value || typeof value !== 'string') {\n return null;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n return null;\n }\n const domain = extractDomain(trimmed)?.toLowerCase();\n if (!domain) {\n return null;\n }\n const normalizedDomains = domains.map((d) => d.toLowerCase().trim());\n if (checkFn(normalizedDomains, domain)) {\n return { [errorKey]: true };\n }\n return null;\n };\n}\n\nexport function solarisAllowedDomainsValidator(\n allowedDomains: string[],\n): ValidatorFn {\n return solarisDomainValidator(\n allowedDomains,\n (normalized, domain) => !normalized.includes(domain),\n 'solarisEmailAllowedDomain',\n );\n}\n\nexport function solarisBlockedDomainsValidator(\n blockedDomains: string[],\n): ValidatorFn {\n return solarisDomainValidator(\n blockedDomains,\n (normalized, domain) => normalized.includes(domain),\n 'solarisEmailBlockedDomain',\n );\n}\n\nexport function extractDomain(value: string): string | null {\n const trimmed = value.trim();\n const atIndex = trimmed.lastIndexOf('@');\n if (atIndex < 0) {\n return null;\n }\n const domain = trimmed.slice(atIndex + 1);\n return domain || null;\n}\n\nexport function isValidEmailFormat(value: string): boolean {\n if (!value) return false;\n return BASIC_EMAIL_REGEX.test(value.trim());\n}\n\nexport function isDomainAllowed(\n domain: string,\n allowedDomains: string[],\n): boolean {\n return allowedDomains\n .map((d) => d.toLowerCase().trim())\n .includes(domain.toLowerCase().trim());\n}\n\nexport function isDomainBlocked(\n domain: string,\n blockedDomains: string[],\n): boolean {\n return blockedDomains\n .map((d) => d.toLowerCase().trim())\n .includes(domain.toLowerCase().trim());\n}\n"]}
@@ -1,19 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class SolarisFormErrorComponent {
4
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisFormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: SolarisFormErrorComponent, isStandalone: true, selector: "solaris-form-error", host: { attributes: { "role": "alert" }, classAttribute: "solaris-form-error" }, ngImport: i0, template: '<ng-content />', isInline: true });
6
- }
7
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisFormErrorComponent, decorators: [{
8
- type: Component,
9
- args: [{
10
- selector: 'solaris-form-error',
11
- standalone: true,
12
- template: '<ng-content />',
13
- host: {
14
- class: 'solaris-form-error',
15
- role: 'alert',
16
- },
17
- }]
18
- }] });
19
- //# sourceMappingURL=form-error.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-error.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/form-field/component/form-error.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAW1C,MAAM,OAAO,yBAAyB;wGAAzB,yBAAyB;4FAAzB,yBAAyB,+JAN1B,gBAAgB;;4FAMf,yBAAyB;kBATrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,gBAAgB;oBAC1B,IAAI,EAAE;wBACJ,KAAK,EAAE,oBAAoB;wBAC3B,IAAI,EAAE,OAAO;qBACd;iBACF","sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'solaris-form-error',\n standalone: true,\n template: '<ng-content />',\n host: {\n class: 'solaris-form-error',\n role: 'alert',\n },\n})\nexport class SolarisFormErrorComponent {}\n"]}