@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 @@
1
+ {"version":3,"file":"textarea.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/forms/textarea/model/textarea.types.ts"],"names":[],"mappings":"","sourcesContent":["export type SolarisTextareaAppearance = 'outline' | 'surface' | 'filled';\n\nexport type SolarisTextareaSize = 'sm' | 'md' | 'lg';\n\nexport type SolarisTextareaDensity = 'compact' | 'comfortable';\n\nexport type SolarisTextareaRadius = 'none' | 'sm' | 'md' | 'lg';\n\nexport type SolarisTextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';\n"]}
@@ -0,0 +1,20 @@
1
+ import { Component, inject, input, computed } from '@angular/core';
2
+ import { SolarisIconRegistryService } from '../../../services/icon';
3
+ import * as i0 from "@angular/core";
4
+ export class SolarisIconComponent {
5
+ registry = inject(SolarisIconRegistryService);
6
+ name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
7
+ ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
8
+ decorative = input(false, ...(ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []));
9
+ definition = computed(() => this.registry.getIcon(this.name()), ...(ngDevMode ? [{ debugName: "definition" }] : /* istanbul ignore next */ []));
10
+ isHidden = computed(() => this.decorative(), ...(ngDevMode ? [{ debugName: "isHidden" }] : /* istanbul ignore next */ []));
11
+ accessibleLabel = computed(() => this.ariaLabel() ?? '', ...(ngDevMode ? [{ debugName: "accessibleLabel" }] : /* istanbul ignore next */ []));
12
+ hasSemanticLabel = computed(() => !this.decorative() && !!this.ariaLabel(), ...(ngDevMode ? [{ debugName: "hasSemanticLabel" }] : /* istanbul ignore next */ []));
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisIconComponent, isStandalone: true, selector: "solaris-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (definition(); as icon) {\n <svg\n width=\"100%\"\n height=\"100%\"\n [attr.viewBox]=\"icon.viewBox\"\n [attr.fill]=\"icon.fill ?? 'none'\"\n [attr.stroke]=\"icon.stroke ?? 'currentColor'\"\n [attr.stroke-width]=\"icon.strokeWidth ?? 2\"\n [attr.stroke-linecap]=\"icon.strokeLinecap ?? 'round'\"\n [attr.stroke-linejoin]=\"icon.strokeLinejoin ?? 'round'\"\n [attr.aria-hidden]=\"isHidden() ? 'true' : null\"\n [attr.aria-label]=\"hasSemanticLabel() ? accessibleLabel() : null\"\n [attr.role]=\"isHidden() ? 'presentation' : 'img'\"\n >\n @for (element of icon.elements; track $index) {\n @switch (element.type) {\n @case ('path') {\n <path [attr.d]=\"element.d\" />\n }\n @case ('line') {\n <line\n [attr.x1]=\"element.x1\"\n [attr.y1]=\"element.y1\"\n [attr.x2]=\"element.x2\"\n [attr.y2]=\"element.y2\"\n />\n }\n @case ('polyline') {\n <polyline [attr.points]=\"element.points\" />\n }\n @case ('polygon') {\n <polygon [attr.points]=\"element.points\" />\n }\n @case ('circle') {\n <circle\n [attr.cx]=\"element.cx\"\n [attr.cy]=\"element.cy\"\n [attr.r]=\"element.r\"\n />\n }\n }\n }\n </svg>\n}\n", styles: [":host{width:1em;height:1em;align-items:center;display:inline-flex;justify-content:center}:host svg{width:100%;height:100%}\n"] });
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisIconComponent, decorators: [{
17
+ type: Component,
18
+ args: [{ selector: 'solaris-icon', standalone: true, template: "@if (definition(); as icon) {\n <svg\n width=\"100%\"\n height=\"100%\"\n [attr.viewBox]=\"icon.viewBox\"\n [attr.fill]=\"icon.fill ?? 'none'\"\n [attr.stroke]=\"icon.stroke ?? 'currentColor'\"\n [attr.stroke-width]=\"icon.strokeWidth ?? 2\"\n [attr.stroke-linecap]=\"icon.strokeLinecap ?? 'round'\"\n [attr.stroke-linejoin]=\"icon.strokeLinejoin ?? 'round'\"\n [attr.aria-hidden]=\"isHidden() ? 'true' : null\"\n [attr.aria-label]=\"hasSemanticLabel() ? accessibleLabel() : null\"\n [attr.role]=\"isHidden() ? 'presentation' : 'img'\"\n >\n @for (element of icon.elements; track $index) {\n @switch (element.type) {\n @case ('path') {\n <path [attr.d]=\"element.d\" />\n }\n @case ('line') {\n <line\n [attr.x1]=\"element.x1\"\n [attr.y1]=\"element.y1\"\n [attr.x2]=\"element.x2\"\n [attr.y2]=\"element.y2\"\n />\n }\n @case ('polyline') {\n <polyline [attr.points]=\"element.points\" />\n }\n @case ('polygon') {\n <polygon [attr.points]=\"element.points\" />\n }\n @case ('circle') {\n <circle\n [attr.cx]=\"element.cx\"\n [attr.cy]=\"element.cy\"\n [attr.r]=\"element.r\"\n />\n }\n }\n }\n </svg>\n}\n", styles: [":host{width:1em;height:1em;align-items:center;display:inline-flex;justify-content:center}:host svg{width:100%;height:100%}\n"] }]
19
+ }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }] } });
20
+ //# sourceMappingURL=solaris-icon.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solaris-icon.component.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/lib/components/icon/component/solaris-icon.component.ts","../../../../../../../../packages/angular/src/lib/components/icon/component/solaris-icon.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;;AAQpE,MAAM,OAAO,oBAAoB;IACd,QAAQ,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;IAEtD,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAU,CAAC;IAChC,SAAS,GAAG,KAAK,0FAAU,CAAC;IAC5B,UAAU,GAAG,KAAK,CAAC,KAAK,iFAAC,CAAC;IAEhB,UAAU,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC5C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,iFACnC,CAAC;IAEiB,QAAQ,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,+EAAC,CAAC;IAC7C,eAAe,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,sFAAC,CAAC;IACzD,gBAAgB,GAAG,QAAQ,CAC5C,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,uFAC/C,CAAC;wGAfS,oBAAoB;4FAApB,oBAAoB,mdCVjC,01CA4CA;;4FDlCa,oBAAoB;kBANhC,SAAS;+BACE,cAAc,cACZ,IAAI","sourcesContent":["import { Component, inject, input, computed } from '@angular/core';\n\nimport { SolarisIconRegistryService } from '../../../services/icon';\n\n@Component({\n selector: 'solaris-icon',\n standalone: true,\n templateUrl: './solaris-icon.component.html',\n styleUrls: ['./solaris-icon.component.scss'],\n})\nexport class SolarisIconComponent {\n private readonly registry = inject(SolarisIconRegistryService);\n\n readonly name = input.required<string>();\n readonly ariaLabel = input<string>();\n readonly decorative = input(false);\n\n protected readonly definition = computed(() =>\n this.registry.getIcon(this.name()),\n );\n\n protected readonly isHidden = computed(() => this.decorative());\n protected readonly accessibleLabel = computed(() => this.ariaLabel() ?? '');\n protected readonly hasSemanticLabel = computed(\n () => !this.decorative() && !!this.ariaLabel(),\n );\n}\n","@if (definition(); as icon) {\n <svg\n width=\"100%\"\n height=\"100%\"\n [attr.viewBox]=\"icon.viewBox\"\n [attr.fill]=\"icon.fill ?? 'none'\"\n [attr.stroke]=\"icon.stroke ?? 'currentColor'\"\n [attr.stroke-width]=\"icon.strokeWidth ?? 2\"\n [attr.stroke-linecap]=\"icon.strokeLinecap ?? 'round'\"\n [attr.stroke-linejoin]=\"icon.strokeLinejoin ?? 'round'\"\n [attr.aria-hidden]=\"isHidden() ? 'true' : null\"\n [attr.aria-label]=\"hasSemanticLabel() ? accessibleLabel() : null\"\n [attr.role]=\"isHidden() ? 'presentation' : 'img'\"\n >\n @for (element of icon.elements; track $index) {\n @switch (element.type) {\n @case ('path') {\n <path [attr.d]=\"element.d\" />\n }\n @case ('line') {\n <line\n [attr.x1]=\"element.x1\"\n [attr.y1]=\"element.y1\"\n [attr.x2]=\"element.x2\"\n [attr.y2]=\"element.y2\"\n />\n }\n @case ('polyline') {\n <polyline [attr.points]=\"element.points\" />\n }\n @case ('polygon') {\n <polygon [attr.points]=\"element.points\" />\n }\n @case ('circle') {\n <circle\n [attr.cx]=\"element.cx\"\n [attr.cy]=\"element.cy\"\n [attr.r]=\"element.r\"\n />\n }\n }\n }\n </svg>\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { SolarisIconComponent } from './component/solaris-icon.component';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/angular/src/lib/components/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["export { SolarisIconComponent } from './component/solaris-icon.component';\r\n"]}
@@ -0,0 +1,29 @@
1
+ import { Component, inject, ElementRef } from '@angular/core';
2
+ import { NgTemplateOutlet } from '@angular/common';
3
+ import { SOLARIS_POPOVER_PANEL_DATA, } from '../token/popover.tokens';
4
+ import * as i0 from "@angular/core";
5
+ export class SolarisPopoverPanelComponent {
6
+ elementRef = inject(ElementRef);
7
+ data = inject(SOLARIS_POPOVER_PANEL_DATA);
8
+ ngAfterViewInit() {
9
+ if (this.data.autoFocus === 'panel') {
10
+ // SECURITY_EXCEPTION: nativeElement.focus() required for autoFocus='panel'. SSR-safe via ElementRef.
11
+ this.elementRef.nativeElement.focus();
12
+ }
13
+ else if (this.data.autoFocus === 'first-tabbable') {
14
+ const firstTabbable = this.elementRef.nativeElement // SECURITY_EXCEPTION: nativeElement.querySelector needed for autoFocus='first-tabbable'. Standard query only.
15
+ .querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
16
+ firstTabbable?.focus();
17
+ }
18
+ }
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisPopoverPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: SolarisPopoverPanelComponent, isStandalone: true, selector: "solaris-popover-panel", host: { properties: { "attr.tabindex": "data.autoFocus === \"panel\" ? \"-1\" : null" }, classAttribute: "solaris-popover-panel" }, ngImport: i0, template: "<div\n class=\"solaris-popover-panel__container\"\n [attr.data-appearance]=\"data.appearance\"\n [attr.data-padding]=\"data.padding\"\n [attr.data-radius]=\"data.radius\"\n [attr.data-connected-side]=\"data.connectedSide ?? null\"\n [attr.role]=\"data.role\"\n [id]=\"data.panelId\"\n tabindex=\"-1\"\n>\n <ng-container *ngTemplateOutlet=\"data.contentTemplate\" />\n</div>\n", styles: [":host{display:block;width:100%;outline:none}.solaris-popover-panel__container{width:100%;box-sizing:border-box;background:var(--solaris-popover-background, var(--solaris-surface-raised));color:var(--solaris-popover-color, var(--solaris-text-default));border:var(--solaris-popover-border-width, 0) solid var(--solaris-popover-border-color, transparent);border-radius:var(--solaris-popover-radius, var(--solaris-radius-md));box-shadow:var(--solaris-popover-shadow, var(--solaris-shadow-lg));padding:var(--solaris-popover-padding, var(--solaris-spacing-3));min-width:var(--solaris-popover-min-width, auto);max-width:var(--solaris-popover-max-width, none);outline:none}.solaris-popover-panel__container[data-appearance=outline]{background:var(--solaris-popover-background, var(--solaris-surface-base));border:var(--solaris-popover-border-width, var(--solaris-border-width-sm)) solid var(--solaris-popover-border-color, var(--solaris-popover-outline-border-color, var(--solaris-border-default)))}.solaris-popover-panel__container[data-padding=none]{--solaris-popover-padding: 0}.solaris-popover-panel__container[data-padding=sm]{--solaris-popover-padding: var(--solaris-spacing-2)}.solaris-popover-panel__container[data-padding=md]{--solaris-popover-padding: var(--solaris-spacing-3)}.solaris-popover-panel__container[data-padding=lg]{--solaris-popover-padding: var(--solaris-spacing-4)}.solaris-popover-panel__container[data-radius=none]{border-radius:var(--solaris-radius-none)}.solaris-popover-panel__container[data-radius=sm]{border-radius:var(--solaris-radius-sm)}.solaris-popover-panel__container[data-radius=md]{border-radius:var(--solaris-radius-md)}.solaris-popover-panel__container[data-radius=lg]{border-radius:var(--solaris-radius-lg)}.solaris-popover-panel__container[data-radius=xl]{border-radius:var(--solaris-radius-xl)}.solaris-popover-panel__container[data-connected-side=bottom]{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.solaris-popover-panel__container[data-connected-side=top]{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisPopoverPanelComponent, decorators: [{
23
+ type: Component,
24
+ args: [{ selector: 'solaris-popover-panel', standalone: true, imports: [NgTemplateOutlet], host: {
25
+ class: 'solaris-popover-panel',
26
+ '[attr.tabindex]': 'data.autoFocus === "panel" ? "-1" : null',
27
+ }, template: "<div\n class=\"solaris-popover-panel__container\"\n [attr.data-appearance]=\"data.appearance\"\n [attr.data-padding]=\"data.padding\"\n [attr.data-radius]=\"data.radius\"\n [attr.data-connected-side]=\"data.connectedSide ?? null\"\n [attr.role]=\"data.role\"\n [id]=\"data.panelId\"\n tabindex=\"-1\"\n>\n <ng-container *ngTemplateOutlet=\"data.contentTemplate\" />\n</div>\n", styles: [":host{display:block;width:100%;outline:none}.solaris-popover-panel__container{width:100%;box-sizing:border-box;background:var(--solaris-popover-background, var(--solaris-surface-raised));color:var(--solaris-popover-color, var(--solaris-text-default));border:var(--solaris-popover-border-width, 0) solid var(--solaris-popover-border-color, transparent);border-radius:var(--solaris-popover-radius, var(--solaris-radius-md));box-shadow:var(--solaris-popover-shadow, var(--solaris-shadow-lg));padding:var(--solaris-popover-padding, var(--solaris-spacing-3));min-width:var(--solaris-popover-min-width, auto);max-width:var(--solaris-popover-max-width, none);outline:none}.solaris-popover-panel__container[data-appearance=outline]{background:var(--solaris-popover-background, var(--solaris-surface-base));border:var(--solaris-popover-border-width, var(--solaris-border-width-sm)) solid var(--solaris-popover-border-color, var(--solaris-popover-outline-border-color, var(--solaris-border-default)))}.solaris-popover-panel__container[data-padding=none]{--solaris-popover-padding: 0}.solaris-popover-panel__container[data-padding=sm]{--solaris-popover-padding: var(--solaris-spacing-2)}.solaris-popover-panel__container[data-padding=md]{--solaris-popover-padding: var(--solaris-spacing-3)}.solaris-popover-panel__container[data-padding=lg]{--solaris-popover-padding: var(--solaris-spacing-4)}.solaris-popover-panel__container[data-radius=none]{border-radius:var(--solaris-radius-none)}.solaris-popover-panel__container[data-radius=sm]{border-radius:var(--solaris-radius-sm)}.solaris-popover-panel__container[data-radius=md]{border-radius:var(--solaris-radius-md)}.solaris-popover-panel__container[data-radius=lg]{border-radius:var(--solaris-radius-lg)}.solaris-popover-panel__container[data-radius=xl]{border-radius:var(--solaris-radius-xl)}.solaris-popover-panel__container[data-connected-side=bottom]{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.solaris-popover-panel__container[data-connected-side=top]{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}\n"] }]
28
+ }] });
29
+ //# sourceMappingURL=popover-panel.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-panel.component.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/interaction/popover/component/popover-panel.component.ts","../../../../../../../../../packages/angular/src/lib/components/interaction/popover/component/popover-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAiB,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EACL,0BAA0B,GAE3B,MAAM,yBAAyB,CAAC;;AAajC,MAAM,OAAO,4BAA4B;IACtB,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;IACjE,IAAI,GAA4B,MAAM,CAAC,0BAA0B,CAAC,CAAC;IAE5E,eAAe;QACb,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,OAAO,EAAE,CAAC;YACpC,qGAAqG;YACpG,IAAI,CAAC,UAAsC,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QACrE,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,gBAAgB,EAAE,CAAC;YACpD,MAAM,aAAa,GACjB,IAAI,CAAC,UACN,CAAC,aAAa,CAAC,8GAA8G;iBAC3H,aAAa,CACZ,0EAA0E,CAC3E,CAAC;YACJ,aAAa,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;wGAjBU,4BAA4B;4FAA5B,4BAA4B,qNCnBzC,kYAYA,2mEDDY,gBAAgB;;4FAQf,4BAA4B;kBAXxC,SAAS;+BACE,uBAAuB,cACrB,IAAI,WACP,CAAC,gBAAgB,CAAC,QAGrB;wBACJ,KAAK,EAAE,uBAAuB;wBAC9B,iBAAiB,EAAE,0CAA0C;qBAC9D","sourcesContent":["import { Component, inject, AfterViewInit, ElementRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\nimport {\n SOLARIS_POPOVER_PANEL_DATA,\n type SolarisPopoverPanelData,\n} from '../token/popover.tokens';\n\n@Component({\n selector: 'solaris-popover-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './popover-panel.component.html',\n styleUrls: ['./popover-panel.component.scss'],\n host: {\n class: 'solaris-popover-panel',\n '[attr.tabindex]': 'data.autoFocus === \"panel\" ? \"-1\" : null',\n },\n})\nexport class SolarisPopoverPanelComponent implements AfterViewInit {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly data: SolarisPopoverPanelData = inject(SOLARIS_POPOVER_PANEL_DATA);\n\n ngAfterViewInit(): void {\n if (this.data.autoFocus === 'panel') {\n // SECURITY_EXCEPTION: nativeElement.focus() required for autoFocus='panel'. SSR-safe via ElementRef.\n (this.elementRef as ElementRef<HTMLElement>).nativeElement.focus();\n } else if (this.data.autoFocus === 'first-tabbable') {\n const firstTabbable = (\n this.elementRef as ElementRef<HTMLElement>\n ).nativeElement // SECURITY_EXCEPTION: nativeElement.querySelector needed for autoFocus='first-tabbable'. Standard query only.\n .querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n firstTabbable?.focus();\n }\n }\n}\n","<div\n class=\"solaris-popover-panel__container\"\n [attr.data-appearance]=\"data.appearance\"\n [attr.data-padding]=\"data.padding\"\n [attr.data-radius]=\"data.radius\"\n [attr.data-connected-side]=\"data.connectedSide ?? null\"\n [attr.role]=\"data.role\"\n [id]=\"data.panelId\"\n tabindex=\"-1\"\n>\n <ng-container *ngTemplateOutlet=\"data.contentTemplate\" />\n</div>\n"]}
@@ -0,0 +1,317 @@
1
+ import { Directive, ElementRef, Injector, ViewContainerRef, computed, effect, inject, input, output, signal, DestroyRef, HostListener, } from '@angular/core';
2
+ import { DOCUMENT } from '@angular/common';
3
+ import { Overlay, OverlayConfig, } from '@angular/cdk/overlay';
4
+ import { ComponentPortal } from '@angular/cdk/portal';
5
+ import { SolarisPopoverPanelComponent } from '../component/popover-panel.component';
6
+ import { SOLARIS_POPOVER_PANEL_DATA, } from '../token/popover.tokens';
7
+ import { getPrimaryPosition, getFallbackPositions, } from '../model/popover-position';
8
+ import * as i0 from "@angular/core";
9
+ let nextPanelId = 0;
10
+ export class SolarisPopoverTriggerDirective {
11
+ overlay = inject(Overlay);
12
+ elementRef = inject(ElementRef);
13
+ viewContainerRef = inject(ViewContainerRef);
14
+ injector = inject(Injector);
15
+ document = inject(DOCUMENT);
16
+ destroyRef = inject(DestroyRef);
17
+ panelId = `solaris-popover-panel-${++nextPanelId}`;
18
+ isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
19
+ overlayRef = null;
20
+ positionStrategy = null;
21
+ outsideClickCleanup = null;
22
+ previousActiveElement = null;
23
+ panelContainerRef = null;
24
+ connectedSide = 'bottom';
25
+ solarisPopoverTriggerFor = input(undefined, { ...(ngDevMode ? { debugName: "solarisPopoverTriggerFor" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverTriggerFor' });
26
+ solarisPopoverOpen = input(undefined, { ...(ngDevMode ? { debugName: "solarisPopoverOpen" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverOpen' });
27
+ solarisPopoverDisabled = input(false, { ...(ngDevMode ? { debugName: "solarisPopoverDisabled" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverDisabled' });
28
+ solarisPopoverPlacement = input('bottom', { ...(ngDevMode ? { debugName: "solarisPopoverPlacement" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverPlacement' });
29
+ solarisPopoverAlign = input('start', { ...(ngDevMode ? { debugName: "solarisPopoverAlign" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverAlign' });
30
+ solarisPopoverOffset = input(8, { ...(ngDevMode ? { debugName: "solarisPopoverOffset" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverOffset' });
31
+ solarisPopoverMatchTriggerWidth = input(false, { ...(ngDevMode ? { debugName: "solarisPopoverMatchTriggerWidth" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverMatchTriggerWidth' });
32
+ solarisPopoverMinWidth = input(undefined, { ...(ngDevMode ? { debugName: "solarisPopoverMinWidth" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverMinWidth' });
33
+ solarisPopoverMaxWidth = input(undefined, { ...(ngDevMode ? { debugName: "solarisPopoverMaxWidth" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverMaxWidth' });
34
+ solarisPopoverCloseOnOutsideClick = input(true, { ...(ngDevMode ? { debugName: "solarisPopoverCloseOnOutsideClick" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverCloseOnOutsideClick' });
35
+ solarisPopoverCloseOnEscape = input(true, { ...(ngDevMode ? { debugName: "solarisPopoverCloseOnEscape" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverCloseOnEscape' });
36
+ solarisPopoverRestoreFocus = input(true, { ...(ngDevMode ? { debugName: "solarisPopoverRestoreFocus" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverRestoreFocus' });
37
+ solarisPopoverAutoFocus = input(false, { ...(ngDevMode ? { debugName: "solarisPopoverAutoFocus" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverAutoFocus' });
38
+ solarisPopoverScrollStrategy = input('reposition', { ...(ngDevMode ? { debugName: "solarisPopoverScrollStrategy" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverScrollStrategy' });
39
+ solarisPopoverPanelRole = input(undefined, { ...(ngDevMode ? { debugName: "solarisPopoverPanelRole" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverPanelRole' });
40
+ solarisPopoverAriaHasPopup = input(undefined, { ...(ngDevMode ? { debugName: "solarisPopoverAriaHasPopup" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverAriaHasPopup' });
41
+ solarisPopoverAppearance = input('surface', { ...(ngDevMode ? { debugName: "solarisPopoverAppearance" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverAppearance' });
42
+ solarisPopoverPadding = input('md', { ...(ngDevMode ? { debugName: "solarisPopoverPadding" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverPadding' });
43
+ solarisPopoverRadius = input('md', { ...(ngDevMode ? { debugName: "solarisPopoverRadius" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverRadius' });
44
+ solarisPopoverTopConnected = input(false, { ...(ngDevMode ? { debugName: "solarisPopoverTopConnected" } : /* istanbul ignore next */ {}), alias: 'solarisPopoverTopConnected' });
45
+ solarisPopoverOpened = output();
46
+ solarisPopoverClosed = output();
47
+ solarisPopoverOpenChange = output();
48
+ ariaHasPopupComputed = computed(() => {
49
+ const value = this.solarisPopoverAriaHasPopup();
50
+ if (value === undefined)
51
+ return null;
52
+ return String(value);
53
+ }, ...(ngDevMode ? [{ debugName: "ariaHasPopupComputed" }] : /* istanbul ignore next */ []));
54
+ popoverTemplateRef = computed(() => this.solarisPopoverTriggerFor()?.templateRef, ...(ngDevMode ? [{ debugName: "popoverTemplateRef" }] : /* istanbul ignore next */ []));
55
+ constructor() {
56
+ effect(() => {
57
+ const shouldBeOpen = this.solarisPopoverOpen();
58
+ if (shouldBeOpen === true && !this.isOpen()) {
59
+ this.open();
60
+ }
61
+ else if (shouldBeOpen === false && this.isOpen()) {
62
+ this.close();
63
+ }
64
+ });
65
+ this.destroyRef.onDestroy(() => {
66
+ this.disposeOverlay();
67
+ });
68
+ }
69
+ onClick() {
70
+ if (!this.solarisPopoverDisabled()) {
71
+ this.toggle();
72
+ }
73
+ }
74
+ onEscape() {
75
+ if (this.solarisPopoverCloseOnEscape() && this.isOpen()) {
76
+ this.close();
77
+ }
78
+ }
79
+ open() {
80
+ if (this.isOpen() || this.solarisPopoverDisabled()) {
81
+ return;
82
+ }
83
+ // SECURITY_EXCEPTION: this.document.activeElement required for restoreFocus. SSR-safe via injected DOCUMENT.
84
+ this.previousActiveElement = this.document.activeElement;
85
+ this.createOverlay();
86
+ this.attachPanel();
87
+ this.addOutsideClickHandler();
88
+ this.updateOverlaySize();
89
+ this.isOpen.set(true);
90
+ this.solarisPopoverOpened.emit();
91
+ this.solarisPopoverOpenChange.emit(true);
92
+ }
93
+ close() {
94
+ if (!this.isOpen()) {
95
+ return;
96
+ }
97
+ this.detachPanel();
98
+ this.restoreFocus();
99
+ this.isOpen.set(false);
100
+ this.solarisPopoverClosed.emit();
101
+ this.solarisPopoverOpenChange.emit(false);
102
+ }
103
+ toggle() {
104
+ if (this.isOpen()) {
105
+ this.close();
106
+ }
107
+ else {
108
+ this.open();
109
+ }
110
+ }
111
+ updatePosition() {
112
+ if (this.overlayRef) {
113
+ this.overlayRef.updatePosition();
114
+ }
115
+ }
116
+ createOverlay() {
117
+ this.disposeOverlay();
118
+ this.positionStrategy = this.createPositionStrategy();
119
+ const scrollStrategy = this.createScrollStrategy();
120
+ const config = new OverlayConfig({
121
+ positionStrategy: this.positionStrategy,
122
+ scrollStrategy,
123
+ disposeOnNavigation: true,
124
+ panelClass: 'solaris-popover-panel-overlay',
125
+ });
126
+ this.overlayRef = this.overlay.create(config);
127
+ this.positionStrategy.positionChanges.subscribe((change) => {
128
+ this.connectedSide =
129
+ change.connectionPair.originY === 'bottom' ? 'bottom' : 'top';
130
+ if (this.panelContainerRef) {
131
+ this.panelContainerRef.dataset['connectedSide'] = this.connectedSide;
132
+ }
133
+ // SECURITY_EXCEPTION: nativeElement.setAttribute required to sync data-connected-side. Read-only DOM access.
134
+ this.elementRef.nativeElement.dataset['connectedSide'] =
135
+ this.connectedSide;
136
+ // SECURITY_EXCEPTION: closest() required to find ancestor form-field wrapper. SSR-safe via injected ElementRef.
137
+ const formFieldWrapper = this.elementRef.nativeElement.closest('.solaris-form-field__control-wrapper');
138
+ if (formFieldWrapper) {
139
+ formFieldWrapper.dataset['connectedSide'] = this.connectedSide;
140
+ }
141
+ });
142
+ }
143
+ createPositionStrategy() {
144
+ const placement = this.solarisPopoverPlacement();
145
+ const align = this.solarisPopoverAlign();
146
+ const offset = this.solarisPopoverOffset();
147
+ const primaryPosition = getPrimaryPosition(placement, align);
148
+ const fallbackPositions = getFallbackPositions(placement, align);
149
+ let offsetX = 0;
150
+ let offsetY = 0;
151
+ if (placement === 'right') {
152
+ offsetX = offset;
153
+ }
154
+ else if (placement === 'left') {
155
+ offsetX = -offset;
156
+ }
157
+ if (placement === 'bottom') {
158
+ offsetY = offset;
159
+ }
160
+ else if (placement === 'top') {
161
+ offsetY = -offset;
162
+ }
163
+ return this.overlay
164
+ .position()
165
+ .flexibleConnectedTo(this.elementRef)
166
+ .withPositions([primaryPosition, ...fallbackPositions])
167
+ .withFlexibleDimensions(true)
168
+ .withPush(true)
169
+ .withDefaultOffsetX(offsetX)
170
+ .withDefaultOffsetY(offsetY);
171
+ }
172
+ createScrollStrategy() {
173
+ const strategy = this.solarisPopoverScrollStrategy();
174
+ switch (strategy) {
175
+ case 'reposition':
176
+ return this.overlay.scrollStrategies.reposition();
177
+ case 'close':
178
+ return this.overlay.scrollStrategies.close();
179
+ case 'block':
180
+ return this.overlay.scrollStrategies.block();
181
+ }
182
+ }
183
+ attachPanel() {
184
+ if (!this.overlayRef) {
185
+ return;
186
+ }
187
+ const templateRef = this.popoverTemplateRef();
188
+ if (!templateRef) {
189
+ return;
190
+ }
191
+ const topConnected = this.solarisPopoverTopConnected();
192
+ const initialSide = topConnected ? 'bottom' : undefined;
193
+ this.connectedSide = 'bottom';
194
+ const data = {
195
+ contentTemplate: templateRef,
196
+ appearance: this.solarisPopoverAppearance(),
197
+ padding: this.solarisPopoverPadding(),
198
+ radius: this.solarisPopoverRadius(),
199
+ role: this.solarisPopoverPanelRole(),
200
+ panelId: this.panelId,
201
+ autoFocus: this.solarisPopoverAutoFocus(),
202
+ connectedSide: initialSide,
203
+ };
204
+ const panelInjector = Injector.create({
205
+ parent: this.injector,
206
+ providers: [{ provide: SOLARIS_POPOVER_PANEL_DATA, useValue: data }],
207
+ });
208
+ const portal = new ComponentPortal(SolarisPopoverPanelComponent, this.viewContainerRef, panelInjector);
209
+ const componentRef = this.overlayRef.attach(portal);
210
+ // SECURITY_EXCEPTION: nativeElement.querySelector required to find panel container in attached overlay. CDK overlay provides no typed API for this.
211
+ this.panelContainerRef = componentRef.location.nativeElement.querySelector('.solaris-popover-panel__container');
212
+ if (this.panelContainerRef && initialSide) {
213
+ this.panelContainerRef.dataset['connectedSide'] = initialSide;
214
+ }
215
+ }
216
+ detachPanel() {
217
+ if (this.overlayRef) {
218
+ this.overlayRef.detach();
219
+ this.disposeOverlay();
220
+ }
221
+ this.removeOutsideClickHandler();
222
+ }
223
+ disposeOverlay() {
224
+ if (this.overlayRef) {
225
+ this.overlayRef.dispose();
226
+ this.overlayRef = null;
227
+ }
228
+ this.removeOutsideClickHandler();
229
+ }
230
+ addOutsideClickHandler() {
231
+ if (!this.solarisPopoverCloseOnOutsideClick()) {
232
+ return;
233
+ }
234
+ this.removeOutsideClickHandler();
235
+ this.outsideClickCleanup = this.rendererListen(this.document, 'click', this.handleOutsideClick);
236
+ }
237
+ removeOutsideClickHandler() {
238
+ if (this.outsideClickCleanup) {
239
+ this.outsideClickCleanup();
240
+ this.outsideClickCleanup = null;
241
+ }
242
+ }
243
+ handleOutsideClick = (event) => {
244
+ if (!this.solarisPopoverCloseOnOutsideClick() || !this.overlayRef) {
245
+ return;
246
+ }
247
+ const overlayElement = this.overlayRef.overlayElement;
248
+ // SECURITY_EXCEPTION: nativeElement needed for outside-click containment check. ElementRef SSR-safe.
249
+ const triggerElement = this.elementRef.nativeElement;
250
+ const target = event.target;
251
+ if (target &&
252
+ !overlayElement.contains(target) &&
253
+ !triggerElement.contains(target)) {
254
+ this.close();
255
+ }
256
+ };
257
+ rendererListen(target, event, callback) {
258
+ target.addEventListener(event, callback);
259
+ return () => {
260
+ target.removeEventListener(event, callback);
261
+ };
262
+ }
263
+ updateOverlaySize() {
264
+ if (!this.overlayRef) {
265
+ return;
266
+ }
267
+ const size = {};
268
+ // SECURITY_EXCEPTION: nativeElement.offsetWidth — required for matchTriggerWidth.
269
+ // ElementRef is SSR-safe. offsetWidth is a read-only layout property.
270
+ const triggerWidth = this.elementRef.nativeElement.offsetWidth;
271
+ const matchWidth = this.solarisPopoverMatchTriggerWidth();
272
+ const minWidth = this.solarisPopoverMinWidth();
273
+ const maxWidth = this.solarisPopoverMaxWidth();
274
+ if (matchWidth) {
275
+ size.width = triggerWidth;
276
+ // Also set minWidth so it won't shrink below trigger width on flexible dimensions.
277
+ size.minWidth = triggerWidth;
278
+ }
279
+ if (minWidth !== undefined) {
280
+ size.minWidth = typeof minWidth === 'number' ? `${minWidth}px` : minWidth;
281
+ }
282
+ if (maxWidth !== undefined) {
283
+ size.maxWidth = typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth;
284
+ }
285
+ this.overlayRef.updateSize(size);
286
+ }
287
+ restoreFocus() {
288
+ if (this.solarisPopoverRestoreFocus() &&
289
+ this.previousActiveElement &&
290
+ // SECURITY_EXCEPTION: this.document.contains() to safely verify trigger still exists before focus.
291
+ this.document.contains(this.previousActiveElement)) {
292
+ this.previousActiveElement.focus();
293
+ }
294
+ this.previousActiveElement = null;
295
+ }
296
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisPopoverTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
297
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: SolarisPopoverTriggerDirective, isStandalone: true, selector: "[solaris-popover-trigger]", inputs: { solarisPopoverTriggerFor: { classPropertyName: "solarisPopoverTriggerFor", publicName: "solarisPopoverTriggerFor", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverOpen: { classPropertyName: "solarisPopoverOpen", publicName: "solarisPopoverOpen", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverDisabled: { classPropertyName: "solarisPopoverDisabled", publicName: "solarisPopoverDisabled", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverPlacement: { classPropertyName: "solarisPopoverPlacement", publicName: "solarisPopoverPlacement", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverAlign: { classPropertyName: "solarisPopoverAlign", publicName: "solarisPopoverAlign", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverOffset: { classPropertyName: "solarisPopoverOffset", publicName: "solarisPopoverOffset", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverMatchTriggerWidth: { classPropertyName: "solarisPopoverMatchTriggerWidth", publicName: "solarisPopoverMatchTriggerWidth", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverMinWidth: { classPropertyName: "solarisPopoverMinWidth", publicName: "solarisPopoverMinWidth", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverMaxWidth: { classPropertyName: "solarisPopoverMaxWidth", publicName: "solarisPopoverMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverCloseOnOutsideClick: { classPropertyName: "solarisPopoverCloseOnOutsideClick", publicName: "solarisPopoverCloseOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverCloseOnEscape: { classPropertyName: "solarisPopoverCloseOnEscape", publicName: "solarisPopoverCloseOnEscape", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverRestoreFocus: { classPropertyName: "solarisPopoverRestoreFocus", publicName: "solarisPopoverRestoreFocus", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverAutoFocus: { classPropertyName: "solarisPopoverAutoFocus", publicName: "solarisPopoverAutoFocus", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverScrollStrategy: { classPropertyName: "solarisPopoverScrollStrategy", publicName: "solarisPopoverScrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverPanelRole: { classPropertyName: "solarisPopoverPanelRole", publicName: "solarisPopoverPanelRole", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverAriaHasPopup: { classPropertyName: "solarisPopoverAriaHasPopup", publicName: "solarisPopoverAriaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverAppearance: { classPropertyName: "solarisPopoverAppearance", publicName: "solarisPopoverAppearance", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverPadding: { classPropertyName: "solarisPopoverPadding", publicName: "solarisPopoverPadding", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverRadius: { classPropertyName: "solarisPopoverRadius", publicName: "solarisPopoverRadius", isSignal: true, isRequired: false, transformFunction: null }, solarisPopoverTopConnected: { classPropertyName: "solarisPopoverTopConnected", publicName: "solarisPopoverTopConnected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { solarisPopoverOpened: "solarisPopoverOpened", solarisPopoverClosed: "solarisPopoverClosed", solarisPopoverOpenChange: "solarisPopoverOpenChange" }, host: { listeners: { "click": "onClick()", "keydown.escape": "onEscape()" }, properties: { "attr.aria-expanded": "isOpen() ? \"true\" : \"false\"", "attr.aria-controls": "isOpen() ? panelId : null", "attr.aria-haspopup": "ariaHasPopupComputed()" } }, ngImport: i0 });
298
+ }
299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisPopoverTriggerDirective, decorators: [{
300
+ type: Directive,
301
+ args: [{
302
+ selector: '[solaris-popover-trigger]',
303
+ standalone: true,
304
+ host: {
305
+ '[attr.aria-expanded]': 'isOpen() ? "true" : "false"',
306
+ '[attr.aria-controls]': 'isOpen() ? panelId : null',
307
+ '[attr.aria-haspopup]': 'ariaHasPopupComputed()',
308
+ },
309
+ }]
310
+ }], ctorParameters: () => [], propDecorators: { solarisPopoverTriggerFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverTriggerFor", required: false }] }], solarisPopoverOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverOpen", required: false }] }], solarisPopoverDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverDisabled", required: false }] }], solarisPopoverPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverPlacement", required: false }] }], solarisPopoverAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverAlign", required: false }] }], solarisPopoverOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverOffset", required: false }] }], solarisPopoverMatchTriggerWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverMatchTriggerWidth", required: false }] }], solarisPopoverMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverMinWidth", required: false }] }], solarisPopoverMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverMaxWidth", required: false }] }], solarisPopoverCloseOnOutsideClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverCloseOnOutsideClick", required: false }] }], solarisPopoverCloseOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverCloseOnEscape", required: false }] }], solarisPopoverRestoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverRestoreFocus", required: false }] }], solarisPopoverAutoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverAutoFocus", required: false }] }], solarisPopoverScrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverScrollStrategy", required: false }] }], solarisPopoverPanelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverPanelRole", required: false }] }], solarisPopoverAriaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverAriaHasPopup", required: false }] }], solarisPopoverAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverAppearance", required: false }] }], solarisPopoverPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverPadding", required: false }] }], solarisPopoverRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverRadius", required: false }] }], solarisPopoverTopConnected: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisPopoverTopConnected", required: false }] }], solarisPopoverOpened: [{ type: i0.Output, args: ["solarisPopoverOpened"] }], solarisPopoverClosed: [{ type: i0.Output, args: ["solarisPopoverClosed"] }], solarisPopoverOpenChange: [{ type: i0.Output, args: ["solarisPopoverOpenChange"] }], onClick: [{
311
+ type: HostListener,
312
+ args: ['click']
313
+ }], onEscape: [{
314
+ type: HostListener,
315
+ args: ['keydown.escape']
316
+ }] } });
317
+ //# sourceMappingURL=popover-trigger.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-trigger.directive.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/interaction/popover/directives/popover-trigger.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,UAAU,EACV,YAAY,GAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,OAAO,EAEP,aAAa,GAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EACL,0BAA0B,GAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;;AAYnC,IAAI,WAAW,G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CAAC,CAAC,CAAC,QAAQ,CAAC;QAC5E,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAEO,YAAY;QAClB,IACE,IAAI,CAAC,0BAA0B,EAAE;YACjC,IAAI,CAAC,qBAAqB;YAC1B,mGAAmG;YACnG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAClD,CAAC;YACD,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC;QACrC,CAAC;QACD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;IACpC,CAAC;wGAtbU,8BAA8B;4FAA9B,8BAA8B;;4FAA9B,8BAA8B;kBAT1C,SAAS;mBAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,UAAU,EAAE,IAAI;oBAChB,IAAI,EAAE;wBACJ,sBAAsB,EAAE,6BAA6B;wBACrD,sBAAsB,EAAE,2BAA2B;wBACnD,sBAAsB,EAAE,wBAAwB;qBACjD;iBACF;;sBAiJE,YAAY;uBAAC,OAAO;;sBAOpB,YAAY;uBAAC,gBAAgB","sourcesContent":["import {\r\n Directive,\r\n ElementRef,\r\n Injector,\r\n ViewContainerRef,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n DestroyRef,\r\n HostListener,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport {\r\n Overlay,\r\n OverlayRef,\r\n OverlayConfig,\r\n FlexibleConnectedPositionStrategy,\r\n} from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\n\r\nimport { SolarisPopoverDirective } from './popover.directive';\r\nimport { SolarisPopoverPanelComponent } from '../component/popover-panel.component';\r\nimport {\r\n SOLARIS_POPOVER_PANEL_DATA,\r\n type SolarisPopoverPanelData,\r\n} from '../token/popover.tokens';\r\nimport {\r\n getPrimaryPosition,\r\n getFallbackPositions,\r\n} from '../model/popover-position';\r\n\r\nimport type {\r\n SolarisPopoverPlacement,\r\n SolarisPopoverAlign,\r\n SolarisPopoverAppearance,\r\n SolarisPopoverPadding,\r\n SolarisPopoverRadius,\r\n SolarisPopoverScrollStrategy,\r\n SolarisPopoverAutoFocus,\r\n} from '../model/popover.types';\r\n\r\nlet nextPanelId = 0;\r\n\r\n@Directive({\r\n selector: '[solaris-popover-trigger]',\r\n standalone: true,\r\n host: {\r\n '[attr.aria-expanded]': 'isOpen() ? \"true\" : \"false\"',\r\n '[attr.aria-controls]': 'isOpen() ? panelId : null',\r\n '[attr.aria-haspopup]': 'ariaHasPopupComputed()',\r\n },\r\n})\r\nexport class SolarisPopoverTriggerDirective {\r\n private readonly overlay = inject(Overlay);\r\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly viewContainerRef = inject(ViewContainerRef);\r\n private readonly injector = inject(Injector);\r\n private readonly document = inject(DOCUMENT);\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n protected readonly panelId = `solaris-popover-panel-${++nextPanelId}`;\r\n protected readonly isOpen = signal(false);\r\n\r\n private overlayRef: OverlayRef | null = null;\r\n private positionStrategy: FlexibleConnectedPositionStrategy | null = null;\r\n private outsideClickCleanup: (() => void) | null = null;\r\n private previousActiveElement: HTMLElement | null = null;\r\n private panelContainerRef: HTMLElement | null = null;\r\n private connectedSide: 'top' | 'bottom' = 'bottom';\r\n\r\n readonly solarisPopoverTriggerFor = input<\r\n SolarisPopoverDirective | undefined\r\n >(undefined, {\r\n alias: 'solarisPopoverTriggerFor',\r\n });\r\n\r\n readonly solarisPopoverOpen = input<boolean | undefined>(undefined, {\r\n alias: 'solarisPopoverOpen',\r\n });\r\n\r\n readonly solarisPopoverDisabled = input<boolean>(false, {\r\n alias: 'solarisPopoverDisabled',\r\n });\r\n\r\n readonly solarisPopoverPlacement = input<SolarisPopoverPlacement>('bottom', {\r\n alias: 'solarisPopoverPlacement',\r\n });\r\n\r\n readonly solarisPopoverAlign = input<SolarisPopoverAlign>('start', {\r\n alias: 'solarisPopoverAlign',\r\n });\r\n\r\n readonly solarisPopoverOffset = input<number>(8, {\r\n alias: 'solarisPopoverOffset',\r\n });\r\n\r\n readonly solarisPopoverMatchTriggerWidth = input<boolean>(false, {\r\n alias: 'solarisPopoverMatchTriggerWidth',\r\n });\r\n\r\n readonly solarisPopoverMinWidth = input<string | number | undefined>(\r\n undefined,\r\n {\r\n alias: 'solarisPopoverMinWidth',\r\n },\r\n );\r\n\r\n readonly solarisPopoverMaxWidth = input<string | number | undefined>(\r\n undefined,\r\n {\r\n alias: 'solarisPopoverMaxWidth',\r\n },\r\n );\r\n\r\n readonly solarisPopoverCloseOnOutsideClick = input<boolean>(true, {\r\n alias: 'solarisPopoverCloseOnOutsideClick',\r\n });\r\n\r\n readonly solarisPopoverCloseOnEscape = input<boolean>(true, {\r\n alias: 'solarisPopoverCloseOnEscape',\r\n });\r\n\r\n readonly solarisPopoverRestoreFocus = input<boolean>(true, {\r\n alias: 'solarisPopoverRestoreFocus',\r\n });\r\n\r\n readonly solarisPopoverAutoFocus = input<SolarisPopoverAutoFocus>(false, {\r\n alias: 'solarisPopoverAutoFocus',\r\n });\r\n\r\n readonly solarisPopoverScrollStrategy = input<SolarisPopoverScrollStrategy>(\r\n 'reposition',\r\n {\r\n alias: 'solarisPopoverScrollStrategy',\r\n },\r\n );\r\n\r\n readonly solarisPopoverPanelRole = input<string | undefined>(undefined, {\r\n alias: 'solarisPopoverPanelRole',\r\n });\r\n\r\n readonly solarisPopoverAriaHasPopup = input<string | boolean | undefined>(\r\n undefined,\r\n {\r\n alias: 'solarisPopoverAriaHasPopup',\r\n },\r\n );\r\n\r\n readonly solarisPopoverAppearance = input<SolarisPopoverAppearance>(\r\n 'surface',\r\n {\r\n alias: 'solarisPopoverAppearance',\r\n },\r\n );\r\n\r\n readonly solarisPopoverPadding = input<SolarisPopoverPadding>('md', {\r\n alias: 'solarisPopoverPadding',\r\n });\r\n\r\n readonly solarisPopoverRadius = input<SolarisPopoverRadius>('md', {\r\n alias: 'solarisPopoverRadius',\r\n });\r\n\r\n readonly solarisPopoverTopConnected = input<boolean>(false, {\r\n alias: 'solarisPopoverTopConnected',\r\n });\r\n\r\n readonly solarisPopoverOpened = output<void>();\r\n readonly solarisPopoverClosed = output<void>();\r\n readonly solarisPopoverOpenChange = output<boolean>();\r\n\r\n protected readonly ariaHasPopupComputed = computed(() => {\r\n const value = this.solarisPopoverAriaHasPopup();\r\n if (value === undefined) return null;\r\n return String(value);\r\n });\r\n\r\n private readonly popoverTemplateRef = computed<\r\n TemplateRef<unknown> | undefined\r\n >(() => this.solarisPopoverTriggerFor()?.templateRef);\r\n\r\n constructor() {\r\n effect(() => {\r\n const shouldBeOpen = this.solarisPopoverOpen();\r\n if (shouldBeOpen === true && !this.isOpen()) {\r\n this.open();\r\n } else if (shouldBeOpen === false && this.isOpen()) {\r\n this.close();\r\n }\r\n });\r\n\r\n this.destroyRef.onDestroy(() => {\r\n this.disposeOverlay();\r\n });\r\n }\r\n\r\n @HostListener('click')\r\n onClick(): void {\r\n if (!this.solarisPopoverDisabled()) {\r\n this.toggle();\r\n }\r\n }\r\n\r\n @HostListener('keydown.escape')\r\n onEscape(): void {\r\n if (this.solarisPopoverCloseOnEscape() && this.isOpen()) {\r\n this.close();\r\n }\r\n }\r\n\r\n open(): void {\r\n if (this.isOpen() || this.solarisPopoverDisabled()) {\r\n return;\r\n }\r\n\r\n // SECURITY_EXCEPTION: this.document.activeElement required for restoreFocus. SSR-safe via injected DOCUMENT.\r\n this.previousActiveElement = this.document.activeElement as HTMLElement;\r\n this.createOverlay();\r\n this.attachPanel();\r\n this.addOutsideClickHandler();\r\n this.updateOverlaySize();\r\n this.isOpen.set(true);\r\n this.solarisPopoverOpened.emit();\r\n this.solarisPopoverOpenChange.emit(true);\r\n }\r\n\r\n close(): void {\r\n if (!this.isOpen()) {\r\n return;\r\n }\r\n\r\n this.detachPanel();\r\n this.restoreFocus();\r\n this.isOpen.set(false);\r\n this.solarisPopoverClosed.emit();\r\n this.solarisPopoverOpenChange.emit(false);\r\n }\r\n\r\n toggle(): void {\r\n if (this.isOpen()) {\r\n this.close();\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n updatePosition(): void {\r\n if (this.overlayRef) {\r\n this.overlayRef.updatePosition();\r\n }\r\n }\r\n\r\n private createOverlay(): void {\r\n this.disposeOverlay();\r\n\r\n this.positionStrategy = this.createPositionStrategy();\r\n const scrollStrategy = this.createScrollStrategy();\r\n\r\n const config = new OverlayConfig({\r\n positionStrategy: this.positionStrategy,\r\n scrollStrategy,\r\n disposeOnNavigation: true,\r\n panelClass: 'solaris-popover-panel-overlay',\r\n });\r\n\r\n this.overlayRef = this.overlay.create(config);\r\n\r\n this.positionStrategy.positionChanges.subscribe((change) => {\r\n this.connectedSide =\r\n change.connectionPair.originY === 'bottom' ? 'bottom' : 'top';\r\n if (this.panelContainerRef) {\r\n this.panelContainerRef.dataset['connectedSide'] = this.connectedSide;\r\n }\r\n // SECURITY_EXCEPTION: nativeElement.setAttribute required to sync data-connected-side. Read-only DOM access.\r\n this.elementRef.nativeElement.dataset['connectedSide'] =\r\n this.connectedSide;\r\n // SECURITY_EXCEPTION: closest() required to find ancestor form-field wrapper. SSR-safe via injected ElementRef.\r\n const formFieldWrapper = this.elementRef.nativeElement.closest(\r\n '.solaris-form-field__control-wrapper',\r\n ) as HTMLElement | null;\r\n if (formFieldWrapper) {\r\n formFieldWrapper.dataset['connectedSide'] = this.connectedSide;\r\n }\r\n });\r\n }\r\n\r\n private createPositionStrategy(): FlexibleConnectedPositionStrategy {\r\n const placement = this.solarisPopoverPlacement();\r\n const align = this.solarisPopoverAlign();\r\n const offset = this.solarisPopoverOffset();\r\n\r\n const primaryPosition = getPrimaryPosition(placement, align);\r\n const fallbackPositions = getFallbackPositions(placement, align);\r\n\r\n let offsetX = 0;\r\n let offsetY = 0;\r\n\r\n if (placement === 'right') {\r\n offsetX = offset;\r\n } else if (placement === 'left') {\r\n offsetX = -offset;\r\n }\r\n\r\n if (placement === 'bottom') {\r\n offsetY = offset;\r\n } else if (placement === 'top') {\r\n offsetY = -offset;\r\n }\r\n\r\n return this.overlay\r\n .position()\r\n .flexibleConnectedTo(this.elementRef)\r\n .withPositions([primaryPosition, ...fallbackPositions])\r\n .withFlexibleDimensions(true)\r\n .withPush(true)\r\n .withDefaultOffsetX(offsetX)\r\n .withDefaultOffsetY(offsetY);\r\n }\r\n\r\n private createScrollStrategy() {\r\n const strategy = this.solarisPopoverScrollStrategy();\r\n switch (strategy) {\r\n case 'reposition':\r\n return this.overlay.scrollStrategies.reposition();\r\n case 'close':\r\n return this.overlay.scrollStrategies.close();\r\n case 'block':\r\n return this.overlay.scrollStrategies.block();\r\n }\r\n }\r\n\r\n private attachPanel(): void {\r\n if (!this.overlayRef) {\r\n return;\r\n }\r\n\r\n const templateRef = this.popoverTemplateRef();\r\n if (!templateRef) {\r\n return;\r\n }\r\n\r\n const topConnected = this.solarisPopoverTopConnected();\r\n const initialSide = topConnected ? 'bottom' : undefined;\r\n this.connectedSide = 'bottom';\r\n\r\n const data: SolarisPopoverPanelData = {\r\n contentTemplate: templateRef,\r\n appearance: this.solarisPopoverAppearance(),\r\n padding: this.solarisPopoverPadding(),\r\n radius: this.solarisPopoverRadius(),\r\n role: this.solarisPopoverPanelRole(),\r\n panelId: this.panelId,\r\n autoFocus: this.solarisPopoverAutoFocus(),\r\n connectedSide: initialSide,\r\n };\r\n\r\n const panelInjector = Injector.create({\r\n parent: this.injector,\r\n providers: [{ provide: SOLARIS_POPOVER_PANEL_DATA, useValue: data }],\r\n });\r\n\r\n const portal = new ComponentPortal(\r\n SolarisPopoverPanelComponent,\r\n this.viewContainerRef,\r\n panelInjector,\r\n );\r\n\r\n const componentRef = this.overlayRef.attach(portal);\r\n // SECURITY_EXCEPTION: nativeElement.querySelector required to find panel container in attached overlay. CDK overlay provides no typed API for this.\r\n this.panelContainerRef = componentRef.location.nativeElement.querySelector(\r\n '.solaris-popover-panel__container',\r\n );\r\n\r\n if (this.panelContainerRef && initialSide) {\r\n this.panelContainerRef.dataset['connectedSide'] = initialSide;\r\n }\r\n }\r\n\r\n private detachPanel(): void {\r\n if (this.overlayRef) {\r\n this.overlayRef.detach();\r\n this.disposeOverlay();\r\n }\r\n this.removeOutsideClickHandler();\r\n }\r\n\r\n private disposeOverlay(): void {\r\n if (this.overlayRef) {\r\n this.overlayRef.dispose();\r\n this.overlayRef = null;\r\n }\r\n this.removeOutsideClickHandler();\r\n }\r\n\r\n private addOutsideClickHandler(): void {\r\n if (!this.solarisPopoverCloseOnOutsideClick()) {\r\n return;\r\n }\r\n\r\n this.removeOutsideClickHandler();\r\n\r\n this.outsideClickCleanup = this.rendererListen(\r\n this.document,\r\n 'click',\r\n this.handleOutsideClick,\r\n );\r\n }\r\n\r\n private removeOutsideClickHandler(): void {\r\n if (this.outsideClickCleanup) {\r\n this.outsideClickCleanup();\r\n this.outsideClickCleanup = null;\r\n }\r\n }\r\n\r\n private readonly handleOutsideClick = (event: Event): void => {\r\n if (!this.solarisPopoverCloseOnOutsideClick() || !this.overlayRef) {\r\n return;\r\n }\r\n\r\n const overlayElement = this.overlayRef.overlayElement;\r\n // SECURITY_EXCEPTION: nativeElement needed for outside-click containment check. ElementRef SSR-safe.\r\n const triggerElement = this.elementRef.nativeElement;\r\n const target = event.target as Node;\r\n\r\n if (\r\n target &&\r\n !overlayElement.contains(target) &&\r\n !triggerElement.contains(target)\r\n ) {\r\n this.close();\r\n }\r\n };\r\n\r\n private rendererListen(\r\n target: EventTarget,\r\n event: string,\r\n callback: (event: Event) => void,\r\n ): () => void {\r\n target.addEventListener(event, callback);\r\n return () => {\r\n target.removeEventListener(event, callback);\r\n };\r\n }\r\n\r\n private updateOverlaySize(): void {\r\n if (!this.overlayRef) {\r\n return;\r\n }\r\n\r\n const size: {\r\n width?: number | string;\r\n minWidth?: number | string;\r\n maxWidth?: number | string;\r\n } = {};\r\n\r\n // SECURITY_EXCEPTION: nativeElement.offsetWidth — required for matchTriggerWidth.\r\n // ElementRef is SSR-safe. offsetWidth is a read-only layout property.\r\n const triggerWidth = this.elementRef.nativeElement.offsetWidth;\r\n const matchWidth = this.solarisPopoverMatchTriggerWidth();\r\n const minWidth = this.solarisPopoverMinWidth();\r\n const maxWidth = this.solarisPopoverMaxWidth();\r\n\r\n if (matchWidth) {\r\n size.width = triggerWidth;\r\n // Also set minWidth so it won't shrink below trigger width on flexible dimensions.\r\n size.minWidth = triggerWidth;\r\n }\r\n\r\n if (minWidth !== undefined) {\r\n size.minWidth = typeof minWidth === 'number' ? `${minWidth}px` : minWidth;\r\n }\r\n\r\n if (maxWidth !== undefined) {\r\n size.maxWidth = typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth;\r\n }\r\n\r\n this.overlayRef.updateSize(size);\r\n }\r\n\r\n private restoreFocus(): void {\r\n if (\r\n this.solarisPopoverRestoreFocus() &&\r\n this.previousActiveElement &&\r\n // SECURITY_EXCEPTION: this.document.contains() to safely verify trigger still exists before focus.\r\n this.document.contains(this.previousActiveElement)\r\n ) {\r\n this.previousActiveElement.focus();\r\n }\r\n this.previousActiveElement = null;\r\n }\r\n}\r\n"]}
@@ -0,0 +1,16 @@
1
+ import { Directive, inject, TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class SolarisPopoverDirective {
4
+ templateRef = inject(TemplateRef);
5
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: SolarisPopoverDirective, isStandalone: true, selector: "ng-template[solaris-popover]", exportAs: ["solarisPopover"], ngImport: i0 });
7
+ }
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisPopoverDirective, decorators: [{
9
+ type: Directive,
10
+ args: [{
11
+ selector: 'ng-template[solaris-popover]',
12
+ standalone: true,
13
+ exportAs: 'solarisPopover',
14
+ }]
15
+ }] });
16
+ //# sourceMappingURL=popover.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.directive.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/interaction/popover/directives/popover.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;AAO/D,MAAM,OAAO,uBAAuB;IACzB,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;wGADhC,uBAAuB;4FAAvB,uBAAuB;;4FAAvB,uBAAuB;kBALnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,8BAA8B;oBACxC,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,gBAAgB;iBAC3B","sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: 'ng-template[solaris-popover]',\n standalone: true,\n exportAs: 'solarisPopover',\n})\nexport class SolarisPopoverDirective {\n readonly templateRef = inject(TemplateRef);\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export { SolarisPopoverDirective } from './directives/popover.directive';
2
+ export { SolarisPopoverTriggerDirective } from './directives/popover-trigger.directive';
3
+ export { SolarisPopoverPanelComponent } from './component/popover-panel.component';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/lib/components/interaction/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["export { SolarisPopoverDirective } from './directives/popover.directive';\nexport { SolarisPopoverTriggerDirective } from './directives/popover-trigger.directive';\nexport { SolarisPopoverPanelComponent } from './component/popover-panel.component';\n\nexport type {\n SolarisPopoverPlacement,\n SolarisPopoverAlign,\n SolarisPopoverAppearance,\n SolarisPopoverPadding,\n SolarisPopoverRadius,\n SolarisPopoverScrollStrategy,\n SolarisPopoverAutoFocus,\n} from './model/popover.types';\n"]}