@educarehq/solaris-ui 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/fesm2022/educarehq-solaris-ui.mjs +12261 -0
  2. package/fesm2022/educarehq-solaris-ui.mjs.map +1 -0
  3. package/package.json +5 -5
  4. package/styles/_button.scss +510 -510
  5. package/styles/_dropdown-menu.scss +72 -0
  6. package/styles/_icon-button.scss +481 -481
  7. package/styles/_input.scss +255 -255
  8. package/styles/_popover.scss +73 -68
  9. package/styles/_theme.scss +46 -36
  10. package/styles/_toast.scss +9 -0
  11. package/styles/token/border/_border.scss +5 -0
  12. package/styles/token/border/_index.scss +1 -0
  13. package/styles/token/color/_dark.scss +78 -0
  14. package/styles/token/color/_high-contrast.scss +27 -0
  15. package/styles/token/color/_index.scss +3 -0
  16. package/styles/token/color/_light.scss +69 -0
  17. package/styles/token/density/_comfortable.scss +15 -0
  18. package/styles/token/density/_compact.scss +15 -0
  19. package/styles/token/density/_index.scss +2 -0
  20. package/styles/token/motion/_index.scss +2 -0
  21. package/styles/token/motion/_motion.scss +15 -0
  22. package/styles/token/motion/_reduced-motion.scss +15 -0
  23. package/styles/token/opacity/_index.scss +1 -0
  24. package/styles/token/opacity/_opacity.scss +4 -0
  25. package/styles/token/radius/_index.scss +1 -0
  26. package/styles/token/radius/_radius.scss +8 -0
  27. package/styles/token/shadow/_index.scss +1 -0
  28. package/styles/token/shadow/_shadow.scss +26 -0
  29. package/styles/token/spacing/_index.scss +1 -0
  30. package/styles/token/spacing/_spacing.scss +15 -0
  31. package/styles/token/typography/_font-family.scss +13 -0
  32. package/styles/token/typography/_index.scss +2 -0
  33. package/styles/token/typography/_typography.scss +25 -0
  34. package/styles/token/z-index/_index.scss +1 -0
  35. package/styles/token/z-index/_z-index.scss +10 -0
  36. package/types/educarehq-solaris-ui.d.ts +3201 -0
  37. package/educarehq-solaris-ui.d.ts +0 -5
  38. package/esm2022/educarehq-solaris-ui.js +0 -5
  39. package/esm2022/educarehq-solaris-ui.js.map +0 -1
  40. package/esm2022/index.js +0 -70
  41. package/esm2022/index.js.map +0 -1
  42. package/esm2022/lib/components/actions/button/directives/button-icon.directive.js +0 -17
  43. package/esm2022/lib/components/actions/button/directives/button-icon.directive.js.map +0 -1
  44. package/esm2022/lib/components/actions/button/directives/button.directive.js +0 -60
  45. package/esm2022/lib/components/actions/button/directives/button.directive.js.map +0 -1
  46. package/esm2022/lib/components/actions/button/model/button.types.js +0 -1
  47. package/esm2022/lib/components/actions/button/model/button.types.js.map +0 -1
  48. package/esm2022/lib/components/actions/button-group/component/button-group.component.js +0 -21
  49. package/esm2022/lib/components/actions/button-group/component/button-group.component.js.map +0 -1
  50. package/esm2022/lib/components/actions/button-group/model/button-group.types.js +0 -1
  51. package/esm2022/lib/components/actions/button-group/model/button-group.types.js.map +0 -1
  52. package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js +0 -17
  53. package/esm2022/lib/components/actions/icon-button/directives/icon-button-badge.directive.js.map +0 -1
  54. package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js +0 -58
  55. package/esm2022/lib/components/actions/icon-button/directives/icon-button.directive.js.map +0 -1
  56. package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js +0 -1
  57. package/esm2022/lib/components/actions/icon-button/model/icon-button.types.js.map +0 -1
  58. package/esm2022/lib/components/data-display/badge/component/badge.component.js +0 -24
  59. package/esm2022/lib/components/data-display/badge/component/badge.component.js.map +0 -1
  60. package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js +0 -17
  61. package/esm2022/lib/components/data-display/badge/directives/badge-icon.directive.js.map +0 -1
  62. package/esm2022/lib/components/data-display/badge/model/badge.types.js +0 -1
  63. package/esm2022/lib/components/data-display/badge/model/badge.types.js.map +0 -1
  64. package/esm2022/lib/components/data-display/card/component/card.component.js +0 -20
  65. package/esm2022/lib/components/data-display/card/component/card.component.js.map +0 -1
  66. package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js +0 -17
  67. package/esm2022/lib/components/data-display/card/directives/card-actions.directive.js.map +0 -1
  68. package/esm2022/lib/components/data-display/card/directives/card-content.directive.js +0 -17
  69. package/esm2022/lib/components/data-display/card/directives/card-content.directive.js.map +0 -1
  70. package/esm2022/lib/components/data-display/card/directives/card-description.directive.js +0 -17
  71. package/esm2022/lib/components/data-display/card/directives/card-description.directive.js.map +0 -1
  72. package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js +0 -19
  73. package/esm2022/lib/components/data-display/card/directives/card-footer.directive.js.map +0 -1
  74. package/esm2022/lib/components/data-display/card/directives/card-header.directive.js +0 -17
  75. package/esm2022/lib/components/data-display/card/directives/card-header.directive.js.map +0 -1
  76. package/esm2022/lib/components/data-display/card/directives/card-media.directive.js +0 -17
  77. package/esm2022/lib/components/data-display/card/directives/card-media.directive.js.map +0 -1
  78. package/esm2022/lib/components/data-display/card/directives/card-title.directive.js +0 -17
  79. package/esm2022/lib/components/data-display/card/directives/card-title.directive.js.map +0 -1
  80. package/esm2022/lib/components/data-display/card/model/card.types.js +0 -1
  81. package/esm2022/lib/components/data-display/card/model/card.types.js.map +0 -1
  82. package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js +0 -18
  83. package/esm2022/lib/components/feedback/alert/component/alert-actions.component.js.map +0 -1
  84. package/esm2022/lib/components/feedback/alert/component/alert.component.js +0 -90
  85. package/esm2022/lib/components/feedback/alert/component/alert.component.js.map +0 -1
  86. package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js +0 -17
  87. package/esm2022/lib/components/feedback/alert/directives/alert-description.directive.js.map +0 -1
  88. package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js +0 -17
  89. package/esm2022/lib/components/feedback/alert/directives/alert-title.directive.js.map +0 -1
  90. package/esm2022/lib/components/feedback/alert/model/alert.types.js +0 -1
  91. package/esm2022/lib/components/feedback/alert/model/alert.types.js.map +0 -1
  92. package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js +0 -69
  93. package/esm2022/lib/components/feedback/skeleton/component/skeleton.component.js.map +0 -1
  94. package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js +0 -1
  95. package/esm2022/lib/components/feedback/skeleton/model/skeleton.types.js.map +0 -1
  96. package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js +0 -227
  97. package/esm2022/lib/components/forms/checkbox/component/checkbox.component.js.map +0 -1
  98. package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js +0 -1
  99. package/esm2022/lib/components/forms/checkbox/model/checkbox.types.js.map +0 -1
  100. package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js +0 -441
  101. package/esm2022/lib/components/forms/checkbox-group/component/checkbox-group.component.js.map +0 -1
  102. package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js +0 -1
  103. package/esm2022/lib/components/forms/checkbox-group/model/checkbox-group.types.js.map +0 -1
  104. package/esm2022/lib/components/forms/email-field/component/email-field.component.js +0 -214
  105. package/esm2022/lib/components/forms/email-field/component/email-field.component.js.map +0 -1
  106. package/esm2022/lib/components/forms/email-field/model/email-field.types.js +0 -1
  107. package/esm2022/lib/components/forms/email-field/model/email-field.types.js.map +0 -1
  108. package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js +0 -69
  109. package/esm2022/lib/components/forms/email-field/validators/email-field.validators.js.map +0 -1
  110. package/esm2022/lib/components/forms/form-field/component/form-error.component.js +0 -19
  111. package/esm2022/lib/components/forms/form-field/component/form-error.component.js.map +0 -1
  112. package/esm2022/lib/components/forms/form-field/component/form-field.component.js +0 -394
  113. package/esm2022/lib/components/forms/form-field/component/form-field.component.js.map +0 -1
  114. package/esm2022/lib/components/forms/form-field/component/form-hint.component.js +0 -18
  115. package/esm2022/lib/components/forms/form-field/component/form-hint.component.js.map +0 -1
  116. package/esm2022/lib/components/forms/form-field/component/form-label.component.js +0 -18
  117. package/esm2022/lib/components/forms/form-field/component/form-label.component.js.map +0 -1
  118. package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js +0 -14
  119. package/esm2022/lib/components/forms/form-field/directives/form-field-trigger.directive.js.map +0 -1
  120. package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js +0 -17
  121. package/esm2022/lib/components/forms/form-field/directives/form-prefix.directive.js.map +0 -1
  122. package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js +0 -17
  123. package/esm2022/lib/components/forms/form-field/directives/form-suffix.directive.js.map +0 -1
  124. package/esm2022/lib/components/forms/form-field/index.js +0 -8
  125. package/esm2022/lib/components/forms/form-field/index.js.map +0 -1
  126. package/esm2022/lib/components/forms/form-field/model/form-control.contract.js +0 -3
  127. package/esm2022/lib/components/forms/form-field/model/form-control.contract.js.map +0 -1
  128. package/esm2022/lib/components/forms/form-field/model/form-field.types.js +0 -1
  129. package/esm2022/lib/components/forms/form-field/model/form-field.types.js.map +0 -1
  130. package/esm2022/lib/components/forms/input/directives/input.directive.js +0 -148
  131. package/esm2022/lib/components/forms/input/directives/input.directive.js.map +0 -1
  132. package/esm2022/lib/components/forms/input/index.js +0 -2
  133. package/esm2022/lib/components/forms/input/index.js.map +0 -1
  134. package/esm2022/lib/components/forms/input/model/input.defaults.js +0 -27
  135. package/esm2022/lib/components/forms/input/model/input.defaults.js.map +0 -1
  136. package/esm2022/lib/components/forms/input/model/input.types.js +0 -1
  137. package/esm2022/lib/components/forms/input/model/input.types.js.map +0 -1
  138. package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js +0 -1119
  139. package/esm2022/lib/components/forms/multi-select/component/multi-select.component.js.map +0 -1
  140. package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js +0 -1
  141. package/esm2022/lib/components/forms/multi-select/model/multi-select.types.js.map +0 -1
  142. package/esm2022/lib/components/forms/option/component/option.component.js +0 -149
  143. package/esm2022/lib/components/forms/option/component/option.component.js.map +0 -1
  144. package/esm2022/lib/components/forms/option/directives/option-slots.directive.js +0 -58
  145. package/esm2022/lib/components/forms/option/directives/option-slots.directive.js.map +0 -1
  146. package/esm2022/lib/components/forms/option/index.js +0 -3
  147. package/esm2022/lib/components/forms/option/index.js.map +0 -1
  148. package/esm2022/lib/components/forms/option/model/option.types.js +0 -1
  149. package/esm2022/lib/components/forms/option/model/option.types.js.map +0 -1
  150. package/esm2022/lib/components/forms/option-group/component/option-group.component.js +0 -103
  151. package/esm2022/lib/components/forms/option-group/component/option-group.component.js.map +0 -1
  152. package/esm2022/lib/components/forms/option-group/index.js +0 -2
  153. package/esm2022/lib/components/forms/option-group/index.js.map +0 -1
  154. package/esm2022/lib/components/forms/option-group/model/option-group.types.js +0 -1
  155. package/esm2022/lib/components/forms/option-group/model/option-group.types.js.map +0 -1
  156. package/esm2022/lib/components/forms/password-field/component/password-field.component.js +0 -299
  157. package/esm2022/lib/components/forms/password-field/component/password-field.component.js.map +0 -1
  158. package/esm2022/lib/components/forms/password-field/model/password-field-constants.js +0 -5
  159. package/esm2022/lib/components/forms/password-field/model/password-field-constants.js.map +0 -1
  160. package/esm2022/lib/components/forms/password-field/model/password-field.types.js +0 -1
  161. package/esm2022/lib/components/forms/password-field/model/password-field.types.js.map +0 -1
  162. package/esm2022/lib/components/forms/password-field/model/password-policy.types.js +0 -1
  163. package/esm2022/lib/components/forms/password-field/model/password-policy.types.js.map +0 -1
  164. package/esm2022/lib/components/forms/password-field/model/password-strength.js +0 -67
  165. package/esm2022/lib/components/forms/password-field/model/password-strength.js.map +0 -1
  166. package/esm2022/lib/components/forms/password-field/validators/password.validator.js +0 -45
  167. package/esm2022/lib/components/forms/password-field/validators/password.validator.js.map +0 -1
  168. package/esm2022/lib/components/forms/radio/component/radio.component.js +0 -219
  169. package/esm2022/lib/components/forms/radio/component/radio.component.js.map +0 -1
  170. package/esm2022/lib/components/forms/radio/model/radio.types.js +0 -1
  171. package/esm2022/lib/components/forms/radio/model/radio.types.js.map +0 -1
  172. package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js +0 -348
  173. package/esm2022/lib/components/forms/radio-group/component/radio-group.component.js.map +0 -1
  174. package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js +0 -3
  175. package/esm2022/lib/components/forms/radio-group/model/radio-group.token.js.map +0 -1
  176. package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js +0 -1
  177. package/esm2022/lib/components/forms/radio-group/model/radio-group.types.js.map +0 -1
  178. package/esm2022/lib/components/forms/select/component/select.component.js +0 -819
  179. package/esm2022/lib/components/forms/select/component/select.component.js.map +0 -1
  180. package/esm2022/lib/components/forms/select/model/select.types.js +0 -1
  181. package/esm2022/lib/components/forms/select/model/select.types.js.map +0 -1
  182. package/esm2022/lib/components/forms/switch/component/switch.component.js +0 -211
  183. package/esm2022/lib/components/forms/switch/component/switch.component.js.map +0 -1
  184. package/esm2022/lib/components/forms/switch/index.js +0 -2
  185. package/esm2022/lib/components/forms/switch/index.js.map +0 -1
  186. package/esm2022/lib/components/forms/switch/model/switch.types.js +0 -1
  187. package/esm2022/lib/components/forms/switch/model/switch.types.js.map +0 -1
  188. package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js +0 -369
  189. package/esm2022/lib/components/forms/switch-group/component/switch-group.component.js.map +0 -1
  190. package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js +0 -1
  191. package/esm2022/lib/components/forms/switch-group/model/switch-group.types.js.map +0 -1
  192. package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js +0 -137
  193. package/esm2022/lib/components/forms/textarea/directives/textarea.directive.js.map +0 -1
  194. package/esm2022/lib/components/forms/textarea/model/textarea.types.js +0 -1
  195. package/esm2022/lib/components/forms/textarea/model/textarea.types.js.map +0 -1
  196. package/esm2022/lib/components/icon/component/solaris-icon.component.js +0 -20
  197. package/esm2022/lib/components/icon/component/solaris-icon.component.js.map +0 -1
  198. package/esm2022/lib/components/icon/index.js +0 -2
  199. package/esm2022/lib/components/icon/index.js.map +0 -1
  200. package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js +0 -29
  201. package/esm2022/lib/components/interaction/popover/component/popover-panel.component.js.map +0 -1
  202. package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js +0 -317
  203. package/esm2022/lib/components/interaction/popover/directives/popover-trigger.directive.js.map +0 -1
  204. package/esm2022/lib/components/interaction/popover/directives/popover.directive.js +0 -16
  205. package/esm2022/lib/components/interaction/popover/directives/popover.directive.js.map +0 -1
  206. package/esm2022/lib/components/interaction/popover/index.js +0 -4
  207. package/esm2022/lib/components/interaction/popover/index.js.map +0 -1
  208. package/esm2022/lib/components/interaction/popover/model/popover-position.js +0 -145
  209. package/esm2022/lib/components/interaction/popover/model/popover-position.js.map +0 -1
  210. package/esm2022/lib/components/interaction/popover/model/popover.types.js +0 -1
  211. package/esm2022/lib/components/interaction/popover/model/popover.types.js.map +0 -1
  212. package/esm2022/lib/components/interaction/popover/token/popover.tokens.js +0 -3
  213. package/esm2022/lib/components/interaction/popover/token/popover.tokens.js.map +0 -1
  214. package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js +0 -23
  215. package/esm2022/lib/components/interaction/tooltip/component/tooltip-panel.component.js.map +0 -1
  216. package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js +0 -405
  217. package/esm2022/lib/components/interaction/tooltip/directive/tooltip.directive.js.map +0 -1
  218. package/esm2022/lib/components/interaction/tooltip/index.js +0 -3
  219. package/esm2022/lib/components/interaction/tooltip/index.js.map +0 -1
  220. package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js +0 -209
  221. package/esm2022/lib/components/interaction/tooltip/model/tooltip-position.js.map +0 -1
  222. package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js +0 -1
  223. package/esm2022/lib/components/interaction/tooltip/model/tooltip.types.js.map +0 -1
  224. package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js +0 -3
  225. package/esm2022/lib/components/interaction/tooltip/token/tooltip.tokens.js.map +0 -1
  226. package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js +0 -25
  227. package/esm2022/lib/services/accessibility/directives/visually-hidden.directive.js.map +0 -1
  228. package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js +0 -1
  229. package/esm2022/lib/services/accessibility/model/solaris-accessibility-config.interface.js.map +0 -1
  230. package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js +0 -1
  231. package/esm2022/lib/services/accessibility/model/solaris-accessibility.types.js.map +0 -1
  232. package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js +0 -10
  233. package/esm2022/lib/services/accessibility/provider/provide-solaris-accessibility.js.map +0 -1
  234. package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js +0 -60
  235. package/esm2022/lib/services/accessibility/service/solaris-accessibility.service.js.map +0 -1
  236. package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js +0 -10
  237. package/esm2022/lib/services/accessibility/testing/solaris-accessibility-testing.provider.js.map +0 -1
  238. package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js +0 -3
  239. package/esm2022/lib/services/accessibility/token/solaris-accessibility.tokens.js.map +0 -1
  240. package/esm2022/lib/services/icon/icons/index.js +0 -2
  241. package/esm2022/lib/services/icon/icons/index.js.map +0 -1
  242. package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js +0 -207
  243. package/esm2022/lib/services/icon/icons/solaris-built-in-icons.js.map +0 -1
  244. package/esm2022/lib/services/icon/index.js +0 -5
  245. package/esm2022/lib/services/icon/index.js.map +0 -1
  246. package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js +0 -1
  247. package/esm2022/lib/services/icon/model/solaris-icon-definition.interface.js.map +0 -1
  248. package/esm2022/lib/services/icon/model/solaris-icon.types.js +0 -1
  249. package/esm2022/lib/services/icon/model/solaris-icon.types.js.map +0 -1
  250. package/esm2022/lib/services/icon/provider/provide-solaris-icons.js +0 -10
  251. package/esm2022/lib/services/icon/provider/provide-solaris-icons.js.map +0 -1
  252. package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js +0 -43
  253. package/esm2022/lib/services/icon/service/solaris-icon-registry.service.js.map +0 -1
  254. package/esm2022/lib/services/icon/token/solaris-icon.tokens.js +0 -3
  255. package/esm2022/lib/services/icon/token/solaris-icon.tokens.js.map +0 -1
  256. package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js +0 -1
  257. package/esm2022/lib/services/theme/model/solaris-theme-config.interface.js.map +0 -1
  258. package/esm2022/lib/services/theme/model/solaris-theme.types.js +0 -1
  259. package/esm2022/lib/services/theme/model/solaris-theme.types.js.map +0 -1
  260. package/esm2022/lib/services/theme/provider/provide-solaris-theme.js +0 -10
  261. package/esm2022/lib/services/theme/provider/provide-solaris-theme.js.map +0 -1
  262. package/esm2022/lib/services/theme/service/solaris-theme.service.js +0 -22
  263. package/esm2022/lib/services/theme/service/solaris-theme.service.js.map +0 -1
  264. package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js +0 -10
  265. package/esm2022/lib/services/theme/testing/solaris-theme-testing.provider.js.map +0 -1
  266. package/esm2022/lib/services/theme/token/solaris-theme.tokens.js +0 -3
  267. package/esm2022/lib/services/theme/token/solaris-theme.tokens.js.map +0 -1
  268. package/esm2022/lib/services/translation/index.js +0 -6
  269. package/esm2022/lib/services/translation/index.js.map +0 -1
  270. package/esm2022/lib/services/translation/model/solaris-locale.types.js +0 -1
  271. package/esm2022/lib/services/translation/model/solaris-locale.types.js.map +0 -1
  272. package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js +0 -1
  273. package/esm2022/lib/services/translation/model/solaris-translate-config.interface.js.map +0 -1
  274. package/esm2022/lib/services/translation/model/solaris-translate-defaults.js +0 -40
  275. package/esm2022/lib/services/translation/model/solaris-translate-defaults.js.map +0 -1
  276. package/esm2022/lib/services/translation/model/solaris-translation.types.js +0 -1
  277. package/esm2022/lib/services/translation/model/solaris-translation.types.js.map +0 -1
  278. package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js +0 -20
  279. package/esm2022/lib/services/translation/pipe/solaris-translate.pipe.js.map +0 -1
  280. package/esm2022/lib/services/translation/provider/provide-solaris-translate.js +0 -10
  281. package/esm2022/lib/services/translation/provider/provide-solaris-translate.js.map +0 -1
  282. package/esm2022/lib/services/translation/service/solaris-translate.service.js +0 -87
  283. package/esm2022/lib/services/translation/service/solaris-translate.service.js.map +0 -1
  284. package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js +0 -32
  285. package/esm2022/lib/services/translation/testing/solaris-translate-testing.provider.js.map +0 -1
  286. package/esm2022/lib/services/translation/token/solaris-translate.tokens.js +0 -3
  287. package/esm2022/lib/services/translation/token/solaris-translate.tokens.js.map +0 -1
  288. package/esm2022/lib/testing/provide-solaris-testing.js +0 -11
  289. package/esm2022/lib/testing/provide-solaris-testing.js.map +0 -1
  290. package/esm2022/lib/testing/solaris-test-utilities.js +0 -12
  291. package/esm2022/lib/testing/solaris-test-utilities.js.map +0 -1
  292. package/index.d.ts +0 -106
  293. package/lib/components/actions/button/directives/button-icon.directive.d.ts +0 -5
  294. package/lib/components/actions/button/directives/button.directive.d.ts +0 -22
  295. package/lib/components/actions/button/model/button.types.d.ts +0 -5
  296. package/lib/components/actions/button-group/component/button-group.component.d.ts +0 -10
  297. package/lib/components/actions/button-group/model/button-group.types.d.ts +0 -2
  298. package/lib/components/actions/icon-button/directives/icon-button-badge.directive.d.ts +0 -5
  299. package/lib/components/actions/icon-button/directives/icon-button.directive.d.ts +0 -21
  300. package/lib/components/actions/icon-button/model/icon-button.types.d.ts +0 -5
  301. package/lib/components/data-display/badge/component/badge.component.d.ts +0 -12
  302. package/lib/components/data-display/badge/directives/badge-icon.directive.d.ts +0 -5
  303. package/lib/components/data-display/badge/model/badge.types.d.ts +0 -6
  304. package/lib/components/data-display/card/component/card.component.d.ts +0 -10
  305. package/lib/components/data-display/card/directives/card-actions.directive.d.ts +0 -5
  306. package/lib/components/data-display/card/directives/card-content.directive.d.ts +0 -5
  307. package/lib/components/data-display/card/directives/card-description.directive.d.ts +0 -5
  308. package/lib/components/data-display/card/directives/card-footer.directive.d.ts +0 -6
  309. package/lib/components/data-display/card/directives/card-header.directive.d.ts +0 -5
  310. package/lib/components/data-display/card/directives/card-media.directive.d.ts +0 -5
  311. package/lib/components/data-display/card/directives/card-title.directive.d.ts +0 -5
  312. package/lib/components/data-display/card/model/card.types.d.ts +0 -4
  313. package/lib/components/feedback/alert/component/alert-actions.component.d.ts +0 -5
  314. package/lib/components/feedback/alert/component/alert.component.d.ts +0 -26
  315. package/lib/components/feedback/alert/directives/alert-description.directive.d.ts +0 -5
  316. package/lib/components/feedback/alert/directives/alert-title.directive.d.ts +0 -5
  317. package/lib/components/feedback/alert/model/alert.types.d.ts +0 -5
  318. package/lib/components/feedback/skeleton/component/skeleton.component.d.ts +0 -17
  319. package/lib/components/feedback/skeleton/model/skeleton.types.d.ts +0 -5
  320. package/lib/components/forms/checkbox/component/checkbox.component.d.ts +0 -70
  321. package/lib/components/forms/checkbox/model/checkbox.types.d.ts +0 -5
  322. package/lib/components/forms/checkbox-group/component/checkbox-group.component.d.ts +0 -123
  323. package/lib/components/forms/checkbox-group/model/checkbox-group.types.d.ts +0 -5
  324. package/lib/components/forms/email-field/component/email-field.component.d.ts +0 -66
  325. package/lib/components/forms/email-field/model/email-field.types.d.ts +0 -6
  326. package/lib/components/forms/email-field/validators/email-field.validators.d.ts +0 -8
  327. package/lib/components/forms/form-field/component/form-error.component.d.ts +0 -5
  328. package/lib/components/forms/form-field/component/form-field.component.d.ts +0 -90
  329. package/lib/components/forms/form-field/component/form-hint.component.d.ts +0 -5
  330. package/lib/components/forms/form-field/component/form-label.component.d.ts +0 -5
  331. package/lib/components/forms/form-field/directives/form-field-trigger.directive.d.ts +0 -5
  332. package/lib/components/forms/form-field/directives/form-prefix.directive.d.ts +0 -5
  333. package/lib/components/forms/form-field/directives/form-suffix.directive.d.ts +0 -5
  334. package/lib/components/forms/form-field/index.d.ts +0 -8
  335. package/lib/components/forms/form-field/model/form-control.contract.d.ts +0 -11
  336. package/lib/components/forms/form-field/model/form-field.types.d.ts +0 -5
  337. package/lib/components/forms/input/directives/input.directive.d.ts +0 -37
  338. package/lib/components/forms/input/index.d.ts +0 -2
  339. package/lib/components/forms/input/model/input.defaults.d.ts +0 -2
  340. package/lib/components/forms/input/model/input.types.d.ts +0 -4
  341. package/lib/components/forms/multi-select/component/multi-select.component.d.ts +0 -202
  342. package/lib/components/forms/multi-select/model/multi-select.types.d.ts +0 -5
  343. package/lib/components/forms/option/component/option.component.d.ts +0 -58
  344. package/lib/components/forms/option/directives/option-slots.directive.d.ts +0 -21
  345. package/lib/components/forms/option/index.d.ts +0 -3
  346. package/lib/components/forms/option/model/option.types.d.ts +0 -3
  347. package/lib/components/forms/option-group/component/option-group.component.d.ts +0 -32
  348. package/lib/components/forms/option-group/index.d.ts +0 -2
  349. package/lib/components/forms/option-group/model/option-group.types.d.ts +0 -2
  350. package/lib/components/forms/password-field/component/password-field.component.d.ts +0 -81
  351. package/lib/components/forms/password-field/model/password-field-constants.d.ts +0 -4
  352. package/lib/components/forms/password-field/model/password-field.types.d.ts +0 -6
  353. package/lib/components/forms/password-field/model/password-policy.types.d.ts +0 -10
  354. package/lib/components/forms/password-field/model/password-strength.d.ts +0 -2
  355. package/lib/components/forms/password-field/validators/password.validator.d.ts +0 -3
  356. package/lib/components/forms/radio/component/radio.component.d.ts +0 -68
  357. package/lib/components/forms/radio/model/radio.types.d.ts +0 -4
  358. package/lib/components/forms/radio-group/component/radio-group.component.d.ts +0 -86
  359. package/lib/components/forms/radio-group/model/radio-group.token.d.ts +0 -2
  360. package/lib/components/forms/radio-group/model/radio-group.types.d.ts +0 -5
  361. package/lib/components/forms/select/component/select.component.d.ts +0 -158
  362. package/lib/components/forms/select/model/select.types.d.ts +0 -4
  363. package/lib/components/forms/switch/component/switch.component.d.ts +0 -66
  364. package/lib/components/forms/switch/index.d.ts +0 -2
  365. package/lib/components/forms/switch/model/switch.types.d.ts +0 -4
  366. package/lib/components/forms/switch-group/component/switch-group.component.d.ts +0 -91
  367. package/lib/components/forms/switch-group/model/switch-group.types.d.ts +0 -5
  368. package/lib/components/forms/textarea/directives/textarea.directive.d.ts +0 -37
  369. package/lib/components/forms/textarea/model/textarea.types.d.ts +0 -5
  370. package/lib/components/icon/component/solaris-icon.component.d.ts +0 -13
  371. package/lib/components/icon/index.d.ts +0 -1
  372. package/lib/components/interaction/popover/component/popover-panel.component.d.ts +0 -10
  373. package/lib/components/interaction/popover/directives/popover-trigger.directive.d.ts +0 -65
  374. package/lib/components/interaction/popover/directives/popover.directive.d.ts +0 -7
  375. package/lib/components/interaction/popover/index.d.ts +0 -4
  376. package/lib/components/interaction/popover/model/popover-position.d.ts +0 -4
  377. package/lib/components/interaction/popover/model/popover.types.d.ts +0 -7
  378. package/lib/components/interaction/popover/token/popover.tokens.d.ts +0 -12
  379. package/lib/components/interaction/tooltip/component/tooltip-panel.component.d.ts +0 -9
  380. package/lib/components/interaction/tooltip/directive/tooltip.directive.d.ts +0 -80
  381. package/lib/components/interaction/tooltip/index.d.ts +0 -3
  382. package/lib/components/interaction/tooltip/model/tooltip-position.d.ts +0 -5
  383. package/lib/components/interaction/tooltip/model/tooltip.types.d.ts +0 -22
  384. package/lib/components/interaction/tooltip/token/tooltip.tokens.d.ts +0 -21
  385. package/lib/services/accessibility/directives/visually-hidden.directive.d.ts +0 -5
  386. package/lib/services/accessibility/model/solaris-accessibility-config.interface.d.ts +0 -4
  387. package/lib/services/accessibility/model/solaris-accessibility.types.d.ts +0 -5
  388. package/lib/services/accessibility/provider/provide-solaris-accessibility.d.ts +0 -3
  389. package/lib/services/accessibility/service/solaris-accessibility.service.d.ts +0 -15
  390. package/lib/services/accessibility/testing/solaris-accessibility-testing.provider.d.ts +0 -3
  391. package/lib/services/accessibility/token/solaris-accessibility.tokens.d.ts +0 -3
  392. package/lib/services/icon/icons/index.d.ts +0 -1
  393. package/lib/services/icon/icons/solaris-built-in-icons.d.ts +0 -2
  394. package/lib/services/icon/index.d.ts +0 -8
  395. package/lib/services/icon/model/solaris-icon-definition.interface.d.ts +0 -36
  396. package/lib/services/icon/model/solaris-icon.types.d.ts +0 -4
  397. package/lib/services/icon/provider/provide-solaris-icons.d.ts +0 -3
  398. package/lib/services/icon/service/solaris-icon-registry.service.d.ts +0 -12
  399. package/lib/services/icon/token/solaris-icon.tokens.d.ts +0 -6
  400. package/lib/services/theme/model/solaris-theme-config.interface.d.ts +0 -5
  401. package/lib/services/theme/model/solaris-theme.types.d.ts +0 -3
  402. package/lib/services/theme/provider/provide-solaris-theme.d.ts +0 -3
  403. package/lib/services/theme/service/solaris-theme.service.d.ts +0 -9
  404. package/lib/services/theme/testing/solaris-theme-testing.provider.d.ts +0 -3
  405. package/lib/services/theme/token/solaris-theme.tokens.d.ts +0 -3
  406. package/lib/services/translation/index.d.ts +0 -8
  407. package/lib/services/translation/model/solaris-locale.types.d.ts +0 -4
  408. package/lib/services/translation/model/solaris-translate-config.interface.d.ts +0 -8
  409. package/lib/services/translation/model/solaris-translate-defaults.d.ts +0 -2
  410. package/lib/services/translation/model/solaris-translation.types.d.ts +0 -3
  411. package/lib/services/translation/pipe/solaris-translate.pipe.d.ts +0 -8
  412. package/lib/services/translation/provider/provide-solaris-translate.d.ts +0 -3
  413. package/lib/services/translation/service/solaris-translate.service.d.ts +0 -15
  414. package/lib/services/translation/testing/solaris-translate-testing.provider.d.ts +0 -3
  415. package/lib/services/translation/token/solaris-translate.tokens.d.ts +0 -3
  416. package/lib/testing/provide-solaris-testing.d.ts +0 -10
  417. package/lib/testing/solaris-test-utilities.d.ts +0 -3
@@ -1,405 +0,0 @@
1
- import { Directive, ElementRef, Injector, ViewContainerRef, computed, effect, inject, input, output, signal, DestroyRef, HostListener, booleanAttribute, numberAttribute, NgZone, } 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 { SolarisTranslateService } from '../../../../services/translation';
6
- import { SolarisTooltipPanelComponent } from '../component/tooltip-panel.component';
7
- import { SOLARIS_TOOLTIP_PANEL_DATA, } from '../token/tooltip.tokens';
8
- import { getTooltipPositions, getTooltipArrowClass, derivePlacementFromConnectionPair, } from '../model/tooltip-position';
9
- import * as i0 from "@angular/core";
10
- let nextPanelId = 0;
11
- const TOOLTIP_TRIGGER_GAP = 3;
12
- const ARROW_SIZE_PX = {
13
- sm: 12,
14
- md: 20,
15
- lg: 24,
16
- };
17
- export class SolarisTooltipDirective {
18
- overlay = inject(Overlay);
19
- elementRef = inject(ElementRef);
20
- viewContainerRef = inject(ViewContainerRef);
21
- injector = inject(Injector);
22
- document = inject(DOCUMENT);
23
- destroyRef = inject(DestroyRef);
24
- translate = inject(SolarisTranslateService);
25
- ngZone = inject(NgZone);
26
- panelId = `solaris-tooltip-panel-${++nextPanelId}`;
27
- isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
28
- isClickTrigger = computed(() => this.solarisTooltipTrigger() === 'click', ...(ngDevMode ? [{ debugName: "isClickTrigger" }] : /* istanbul ignore next */ []));
29
- overlayRef = null;
30
- outsideClickCleanup = null;
31
- previousActiveElement = null;
32
- hoverTimeout = null;
33
- isHovered = false;
34
- isFocused = false;
35
- tooltipComponentRef = null;
36
- positionChangesSub = null;
37
- currentPlacement = 'top';
38
- solarisTooltip = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltip" } : /* istanbul ignore next */ {}), alias: 'solarisTooltip' });
39
- solarisTooltipKey = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipKey" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipKey' });
40
- solarisTooltipFor = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipFor" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipFor' });
41
- solarisTooltipTitle = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipTitle" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipTitle' });
42
- solarisTooltipTitleKey = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipTitleKey" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipTitleKey' });
43
- solarisTooltipIcon = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipIcon" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipIcon' });
44
- solarisTooltipIconDecorative = input(true, { ...(ngDevMode ? { debugName: "solarisTooltipIconDecorative" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipIconDecorative',
45
- transform: booleanAttribute });
46
- solarisTooltipTrigger = input('hover', { ...(ngDevMode ? { debugName: "solarisTooltipTrigger" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipTrigger' });
47
- solarisTooltipPlacement = input('top', { ...(ngDevMode ? { debugName: "solarisTooltipPlacement" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipPlacement' });
48
- solarisTooltipOffset = input(0, { ...(ngDevMode ? { debugName: "solarisTooltipOffset" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipOffset',
49
- transform: numberAttribute });
50
- solarisTooltipDisabled = input(false, { ...(ngDevMode ? { debugName: "solarisTooltipDisabled" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipDisabled',
51
- transform: booleanAttribute });
52
- solarisTooltipCloseable = input(false, { ...(ngDevMode ? { debugName: "solarisTooltipCloseable" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipCloseable',
53
- transform: booleanAttribute });
54
- solarisTooltipCloseLabel = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipCloseLabel" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipCloseLabel' });
55
- solarisTooltipCloseLabelKey = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipCloseLabelKey" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipCloseLabelKey' });
56
- solarisTooltipShowDelay = input(300, { ...(ngDevMode ? { debugName: "solarisTooltipShowDelay" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipShowDelay',
57
- transform: numberAttribute });
58
- solarisTooltipHideDelay = input(100, { ...(ngDevMode ? { debugName: "solarisTooltipHideDelay" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipHideDelay',
59
- transform: numberAttribute });
60
- solarisTooltipAppearance = input('outline', { ...(ngDevMode ? { debugName: "solarisTooltipAppearance" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipAppearance' });
61
- solarisTooltipSize = input('sm', { ...(ngDevMode ? { debugName: "solarisTooltipSize" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipSize' });
62
- solarisTooltipRadius = input('md', { ...(ngDevMode ? { debugName: "solarisTooltipRadius" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipRadius' });
63
- solarisTooltipMaxWidth = input('20rem', { ...(ngDevMode ? { debugName: "solarisTooltipMaxWidth" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipMaxWidth' });
64
- solarisTooltipArrow = input(true, { ...(ngDevMode ? { debugName: "solarisTooltipArrow" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipArrow',
65
- transform: booleanAttribute });
66
- solarisTooltipOpen = input(undefined, { ...(ngDevMode ? { debugName: "solarisTooltipOpen" } : /* istanbul ignore next */ {}), alias: 'solarisTooltipOpen' });
67
- solarisTooltipOpened = output();
68
- solarisTooltipClosed = output();
69
- solarisTooltipOpenChange = output();
70
- constructor() {
71
- effect(() => {
72
- const shouldBeOpen = this.solarisTooltipOpen();
73
- if (shouldBeOpen === true && !this.isOpen()) {
74
- this.open();
75
- }
76
- else if (shouldBeOpen === false && this.isOpen()) {
77
- this.close();
78
- }
79
- });
80
- this.destroyRef.onDestroy(() => {
81
- this.disposeOverlay();
82
- this.clearHoverTimeout();
83
- });
84
- }
85
- ngAfterViewInit() {
86
- if (!this.solarisTooltip() &&
87
- !this.solarisTooltipKey() &&
88
- !this.solarisTooltipFor()) {
89
- console.warn('[SolarisTooltip] Tooltip requires solaris-tooltip, solarisTooltip, solarisTooltipKey, or solarisTooltipFor.');
90
- }
91
- }
92
- onMouseEnter() {
93
- this.isHovered = true;
94
- if (this.solarisTooltipTrigger() === 'hover' &&
95
- !this.solarisTooltipDisabled()) {
96
- this.scheduleOpen(Number(this.solarisTooltipShowDelay()));
97
- }
98
- }
99
- onMouseLeave() {
100
- this.isHovered = false;
101
- if (this.solarisTooltipTrigger() === 'hover') {
102
- this.scheduleClose(Number(this.solarisTooltipHideDelay()));
103
- }
104
- }
105
- onFocusIn() {
106
- this.isFocused = true;
107
- if (this.solarisTooltipTrigger() === 'hover' &&
108
- !this.solarisTooltipDisabled()) {
109
- this.scheduleOpen(Number(this.solarisTooltipShowDelay()));
110
- }
111
- }
112
- onFocusOut() {
113
- this.isFocused = false;
114
- if (this.solarisTooltipTrigger() === 'hover') {
115
- this.scheduleClose(Number(this.solarisTooltipHideDelay()));
116
- }
117
- }
118
- onClick() {
119
- if (this.solarisTooltipDisabled()) {
120
- return;
121
- }
122
- if (this.solarisTooltipTrigger() === 'click') {
123
- this.toggle();
124
- }
125
- }
126
- onEscape() {
127
- if (this.isOpen() && this.solarisTooltipTrigger() !== 'manual') {
128
- this.close();
129
- }
130
- }
131
- open() {
132
- if (this.isOpen() || this.solarisTooltipDisabled()) {
133
- return;
134
- }
135
- this.clearHoverTimeout();
136
- if (this.solarisTooltipTrigger() === 'click') {
137
- // SECURITY_EXCEPTION: this.document.activeElement required for restoreFocus. SSR-safe via injected DOCUMENT.
138
- this.previousActiveElement = this.document.activeElement;
139
- }
140
- this.createOverlay();
141
- this.attachPanel();
142
- this.addOutsideClickHandler();
143
- this.isOpen.set(true);
144
- this.solarisTooltipOpened.emit();
145
- this.solarisTooltipOpenChange.emit(true);
146
- }
147
- close() {
148
- if (!this.isOpen()) {
149
- return;
150
- }
151
- this.clearHoverTimeout();
152
- this.detachPanel();
153
- this.restoreFocus();
154
- this.isOpen.set(false);
155
- this.solarisTooltipClosed.emit();
156
- this.solarisTooltipOpenChange.emit(false);
157
- }
158
- toggle() {
159
- if (this.isOpen()) {
160
- this.close();
161
- }
162
- else {
163
- this.open();
164
- }
165
- }
166
- reposition() {
167
- if (this.overlayRef) {
168
- this.overlayRef.updatePosition();
169
- }
170
- }
171
- getResolvedBody() {
172
- const text = this.solarisTooltip();
173
- if (text) {
174
- return text;
175
- }
176
- const key = this.solarisTooltipKey();
177
- if (key) {
178
- return this.translate.translate(key);
179
- }
180
- return undefined;
181
- }
182
- getResolvedTitle() {
183
- const title = this.solarisTooltipTitle();
184
- if (title) {
185
- return title;
186
- }
187
- const titleKey = this.solarisTooltipTitleKey();
188
- if (titleKey) {
189
- return this.translate.translate(titleKey);
190
- }
191
- return undefined;
192
- }
193
- getResolvedCloseLabel() {
194
- const closeLabel = this.solarisTooltipCloseLabel();
195
- if (closeLabel) {
196
- return closeLabel;
197
- }
198
- const closeLabelKey = this.solarisTooltipCloseLabelKey();
199
- if (closeLabelKey) {
200
- return this.translate.translate(closeLabelKey);
201
- }
202
- return this.translate.translate('solaris.tooltip.close');
203
- }
204
- scheduleOpen(delay) {
205
- this.clearHoverTimeout();
206
- if (delay > 0) {
207
- this.hoverTimeout = setTimeout(() => {
208
- this.ngZone.run(() => {
209
- if ((this.isHovered || this.isFocused) && !this.isOpen()) {
210
- this.open();
211
- }
212
- });
213
- }, delay);
214
- }
215
- else {
216
- this.open();
217
- }
218
- }
219
- scheduleClose(delay) {
220
- this.clearHoverTimeout();
221
- if (this.solarisTooltipTrigger() !== 'hover') {
222
- return;
223
- }
224
- if (delay > 0) {
225
- this.hoverTimeout = setTimeout(() => {
226
- this.ngZone.run(() => {
227
- if (!this.isHovered && !this.isFocused && this.isOpen()) {
228
- this.close();
229
- }
230
- });
231
- }, delay);
232
- }
233
- else if (!this.isHovered && !this.isFocused) {
234
- this.close();
235
- }
236
- }
237
- clearHoverTimeout() {
238
- if (this.hoverTimeout !== null) {
239
- clearTimeout(this.hoverTimeout);
240
- this.hoverTimeout = null;
241
- }
242
- }
243
- createOverlay() {
244
- this.disposeOverlay();
245
- const positionStrategy = this.createPositionStrategy();
246
- const scrollStrategy = this.overlay.scrollStrategies.reposition();
247
- const config = new OverlayConfig({
248
- positionStrategy,
249
- scrollStrategy,
250
- disposeOnNavigation: true,
251
- panelClass: 'solaris-tooltip-panel-overlay',
252
- });
253
- this.overlayRef = this.overlay.create(config);
254
- }
255
- createPositionStrategy() {
256
- const placement = this.solarisTooltipPlacement();
257
- const userOffset = Number(this.solarisTooltipOffset());
258
- const hasArrow = this.solarisTooltipArrow();
259
- const size = this.solarisTooltipSize();
260
- const arrowPx = hasArrow ? (ARROW_SIZE_PX[size] ?? 20) : 0;
261
- const effectiveOffset = arrowPx + TOOLTIP_TRIGGER_GAP + userOffset;
262
- const positions = getTooltipPositions(placement, effectiveOffset);
263
- return this.overlay
264
- .position()
265
- .flexibleConnectedTo(this.elementRef)
266
- .withPositions(positions)
267
- .withFlexibleDimensions(true)
268
- .withPush(true)
269
- .withGrowAfterOpen(true);
270
- }
271
- attachPanel() {
272
- if (!this.overlayRef) {
273
- return;
274
- }
275
- this.currentPlacement = this.solarisTooltipPlacement();
276
- const trigger = this.solarisTooltipTrigger();
277
- const effectiveCloseable = trigger === 'click' ? this.solarisTooltipCloseable() : false;
278
- const closeFn = () => this.close();
279
- const data = {
280
- title: this.getResolvedTitle(),
281
- body: this.getResolvedBody(),
282
- icon: this.solarisTooltipIcon(),
283
- iconDecorative: this.solarisTooltipIconDecorative(),
284
- contentTemplate: this.solarisTooltipFor(),
285
- appearance: this.solarisTooltipAppearance(),
286
- size: this.solarisTooltipSize(),
287
- radius: this.solarisTooltipRadius(),
288
- maxWidth: this.solarisTooltipMaxWidth(),
289
- arrow: this.solarisTooltipArrow(),
290
- arrowClass: getTooltipArrowClass(this.currentPlacement),
291
- closeable: effectiveCloseable,
292
- closeLabel: this.getResolvedCloseLabel(),
293
- panelId: this.panelId,
294
- placement: this.currentPlacement,
295
- trigger,
296
- close: closeFn,
297
- };
298
- const panelInjector = Injector.create({
299
- parent: this.injector,
300
- providers: [{ provide: SOLARIS_TOOLTIP_PANEL_DATA, useValue: data }],
301
- });
302
- const portal = new ComponentPortal(SolarisTooltipPanelComponent, this.viewContainerRef, panelInjector);
303
- this.tooltipComponentRef = this.overlayRef.attach(portal);
304
- const strategy = this.overlayRef.getConfig()
305
- .positionStrategy;
306
- this.positionChangesSub = strategy.positionChanges.subscribe((change) => {
307
- const actualPlacement = derivePlacementFromConnectionPair(change.connectionPair);
308
- if (actualPlacement !== this.currentPlacement) {
309
- this.currentPlacement = actualPlacement;
310
- this.tooltipComponentRef?.instance.updatePlacement(actualPlacement, getTooltipArrowClass(actualPlacement));
311
- }
312
- });
313
- }
314
- detachPanel() {
315
- if (this.overlayRef) {
316
- this.overlayRef.detach();
317
- this.disposeOverlay();
318
- }
319
- this.removeOutsideClickHandler();
320
- }
321
- disposeOverlay() {
322
- this.positionChangesSub?.unsubscribe();
323
- this.positionChangesSub = null;
324
- this.tooltipComponentRef = null;
325
- if (this.overlayRef) {
326
- this.overlayRef.dispose();
327
- this.overlayRef = null;
328
- }
329
- this.removeOutsideClickHandler();
330
- }
331
- addOutsideClickHandler() {
332
- if (this.solarisTooltipTrigger() !== 'click') {
333
- return;
334
- }
335
- this.removeOutsideClickHandler();
336
- this.outsideClickCleanup = this.rendererListen(this.document, 'click', this.handleOutsideClick);
337
- }
338
- removeOutsideClickHandler() {
339
- if (this.outsideClickCleanup) {
340
- this.outsideClickCleanup();
341
- this.outsideClickCleanup = null;
342
- }
343
- }
344
- handleOutsideClick = (event) => {
345
- if (!this.overlayRef) {
346
- return;
347
- }
348
- const overlayElement = this.overlayRef.overlayElement;
349
- // SECURITY_EXCEPTION: nativeElement needed for outside-click containment check. ElementRef SSR-safe.
350
- const triggerElement = this.elementRef.nativeElement;
351
- const target = event.target;
352
- if (target &&
353
- !overlayElement.contains(target) &&
354
- !triggerElement.contains(target)) {
355
- this.close();
356
- }
357
- };
358
- rendererListen(target, event, callback) {
359
- target.addEventListener(event, callback);
360
- return () => {
361
- target.removeEventListener(event, callback);
362
- };
363
- }
364
- restoreFocus() {
365
- if (this.solarisTooltipTrigger() === 'click' &&
366
- this.previousActiveElement &&
367
- // SECURITY_EXCEPTION: this.document.contains() to safely verify trigger still exists before focus.
368
- this.document.contains(this.previousActiveElement)) {
369
- this.previousActiveElement.focus();
370
- }
371
- this.previousActiveElement = null;
372
- }
373
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
374
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: SolarisTooltipDirective, isStandalone: true, selector: "[solaris-tooltip], [solarisTooltip], [solarisTooltipFor]", inputs: { solarisTooltip: { classPropertyName: "solarisTooltip", publicName: "solarisTooltip", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipKey: { classPropertyName: "solarisTooltipKey", publicName: "solarisTooltipKey", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipFor: { classPropertyName: "solarisTooltipFor", publicName: "solarisTooltipFor", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipTitle: { classPropertyName: "solarisTooltipTitle", publicName: "solarisTooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipTitleKey: { classPropertyName: "solarisTooltipTitleKey", publicName: "solarisTooltipTitleKey", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipIcon: { classPropertyName: "solarisTooltipIcon", publicName: "solarisTooltipIcon", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipIconDecorative: { classPropertyName: "solarisTooltipIconDecorative", publicName: "solarisTooltipIconDecorative", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipTrigger: { classPropertyName: "solarisTooltipTrigger", publicName: "solarisTooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipPlacement: { classPropertyName: "solarisTooltipPlacement", publicName: "solarisTooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipOffset: { classPropertyName: "solarisTooltipOffset", publicName: "solarisTooltipOffset", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipDisabled: { classPropertyName: "solarisTooltipDisabled", publicName: "solarisTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipCloseable: { classPropertyName: "solarisTooltipCloseable", publicName: "solarisTooltipCloseable", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipCloseLabel: { classPropertyName: "solarisTooltipCloseLabel", publicName: "solarisTooltipCloseLabel", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipCloseLabelKey: { classPropertyName: "solarisTooltipCloseLabelKey", publicName: "solarisTooltipCloseLabelKey", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipShowDelay: { classPropertyName: "solarisTooltipShowDelay", publicName: "solarisTooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipHideDelay: { classPropertyName: "solarisTooltipHideDelay", publicName: "solarisTooltipHideDelay", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipAppearance: { classPropertyName: "solarisTooltipAppearance", publicName: "solarisTooltipAppearance", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipSize: { classPropertyName: "solarisTooltipSize", publicName: "solarisTooltipSize", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipRadius: { classPropertyName: "solarisTooltipRadius", publicName: "solarisTooltipRadius", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipMaxWidth: { classPropertyName: "solarisTooltipMaxWidth", publicName: "solarisTooltipMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipArrow: { classPropertyName: "solarisTooltipArrow", publicName: "solarisTooltipArrow", isSignal: true, isRequired: false, transformFunction: null }, solarisTooltipOpen: { classPropertyName: "solarisTooltipOpen", publicName: "solarisTooltipOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { solarisTooltipOpened: "solarisTooltipOpened", solarisTooltipClosed: "solarisTooltipClosed", solarisTooltipOpenChange: "solarisTooltipOpenChange" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focusin": "onFocusIn()", "focusout": "onFocusOut()", "click": "onClick()", "keydown.escape": "onEscape()" }, properties: { "attr.aria-describedby": "isOpen() && !isClickTrigger() ? panelId : null" } }, exportAs: ["solarisTooltip"], ngImport: i0 });
375
- }
376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisTooltipDirective, decorators: [{
377
- type: Directive,
378
- args: [{
379
- selector: '[solaris-tooltip], [solarisTooltip], [solarisTooltipFor]',
380
- standalone: true,
381
- exportAs: 'solarisTooltip',
382
- host: {
383
- '[attr.aria-describedby]': 'isOpen() && !isClickTrigger() ? panelId : null',
384
- },
385
- }]
386
- }], ctorParameters: () => [], propDecorators: { solarisTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltip", required: false }] }], solarisTooltipKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipKey", required: false }] }], solarisTooltipFor: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipFor", required: false }] }], solarisTooltipTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipTitle", required: false }] }], solarisTooltipTitleKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipTitleKey", required: false }] }], solarisTooltipIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipIcon", required: false }] }], solarisTooltipIconDecorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipIconDecorative", required: false }] }], solarisTooltipTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipTrigger", required: false }] }], solarisTooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipPlacement", required: false }] }], solarisTooltipOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipOffset", required: false }] }], solarisTooltipDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipDisabled", required: false }] }], solarisTooltipCloseable: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipCloseable", required: false }] }], solarisTooltipCloseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipCloseLabel", required: false }] }], solarisTooltipCloseLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipCloseLabelKey", required: false }] }], solarisTooltipShowDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipShowDelay", required: false }] }], solarisTooltipHideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipHideDelay", required: false }] }], solarisTooltipAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipAppearance", required: false }] }], solarisTooltipSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipSize", required: false }] }], solarisTooltipRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipRadius", required: false }] }], solarisTooltipMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipMaxWidth", required: false }] }], solarisTooltipArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipArrow", required: false }] }], solarisTooltipOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "solarisTooltipOpen", required: false }] }], solarisTooltipOpened: [{ type: i0.Output, args: ["solarisTooltipOpened"] }], solarisTooltipClosed: [{ type: i0.Output, args: ["solarisTooltipClosed"] }], solarisTooltipOpenChange: [{ type: i0.Output, args: ["solarisTooltipOpenChange"] }], onMouseEnter: [{
387
- type: HostListener,
388
- args: ['mouseenter']
389
- }], onMouseLeave: [{
390
- type: HostListener,
391
- args: ['mouseleave']
392
- }], onFocusIn: [{
393
- type: HostListener,
394
- args: ['focusin']
395
- }], onFocusOut: [{
396
- type: HostListener,
397
- args: ['focusout']
398
- }], onClick: [{
399
- type: HostListener,
400
- args: ['click']
401
- }], onEscape: [{
402
- type: HostListener,
403
- args: ['keydown.escape']
404
- }] } });
405
- //# sourceMappingURL=tooltip.directive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip.directive.js","sourceRoot":"","sources":["../../../../../../../../../packages/angular/src/lib/components/interaction/tooltip/directive/tooltip.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,gBAAgB,EAEhB,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,UAAU,EACV,YAAY,EAGZ,gBAAgB,EAChB,eAAe,EACf,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,OAAO,EAEP,aAAa,GAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EACL,0BAA0B,GAE3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,iCAAiC,GAClC,MAAM,2BAA2B,CAAC;;AAUnC,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,MAAM,aAAa,GAA2B;IAC5C,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAC;AAUF,MAAM,OAAO,uBAAuB;IACjB,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1B,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;IACzD,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC5C,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC5B,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC5B,UAAU,GAAG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AAQ,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;wGA3gBU,uBAAuB;4FAAvB,uBAAuB;;4FAAvB,uBAAuB;kBARnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,0DAA0D;oBACpE,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,gBAAgB;oBAC1B,IAAI,EAAE;wBACJ,yBAAyB,EAAE,gDAAgD;qBAC5E;iBACF;;sBAiKE,YAAY;uBAAC,YAAY;;sBAWzB,YAAY;uBAAC,YAAY;;sBAQzB,YAAY;uBAAC,SAAS;;sBAWtB,YAAY;uBAAC,UAAU;;sBAQvB,YAAY;uBAAC,OAAO;;sBAWpB,YAAY;uBAAC,gBAAgB","sourcesContent":["import {\r\n Directive,\r\n ElementRef,\r\n Injector,\r\n ViewContainerRef,\r\n ComponentRef,\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 AfterViewInit,\r\n booleanAttribute,\r\n numberAttribute,\r\n NgZone,\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 type ConnectedOverlayPositionChange,\r\n} from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { SolarisTranslateService } from '../../../../services/translation';\r\n\r\nimport { SolarisTooltipPanelComponent } from '../component/tooltip-panel.component';\r\nimport {\r\n SOLARIS_TOOLTIP_PANEL_DATA,\r\n type SolarisTooltipPanelData,\r\n} from '../token/tooltip.tokens';\r\nimport {\r\n getTooltipPositions,\r\n getTooltipArrowClass,\r\n derivePlacementFromConnectionPair,\r\n} from '../model/tooltip-position';\r\n\r\nimport type {\r\n SolarisTooltipPlacement,\r\n SolarisTooltipTrigger,\r\n SolarisTooltipAppearance,\r\n SolarisTooltipSize,\r\n SolarisTooltipRadius,\r\n} from '../model/tooltip.types';\r\n\r\nlet nextPanelId = 0;\r\n\r\nconst TOOLTIP_TRIGGER_GAP = 3;\r\n\r\nconst ARROW_SIZE_PX: Record<string, number> = {\r\n sm: 12,\r\n md: 20,\r\n lg: 24,\r\n};\r\n\r\n@Directive({\r\n selector: '[solaris-tooltip], [solarisTooltip], [solarisTooltipFor]',\r\n standalone: true,\r\n exportAs: 'solarisTooltip',\r\n host: {\r\n '[attr.aria-describedby]': 'isOpen() && !isClickTrigger() ? panelId : null',\r\n },\r\n})\r\nexport class SolarisTooltipDirective implements AfterViewInit {\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 private readonly translate = inject(SolarisTranslateService);\r\n private readonly ngZone = inject(NgZone);\r\n\r\n protected readonly panelId = `solaris-tooltip-panel-${++nextPanelId}`;\r\n protected readonly isOpen = signal(false);\r\n protected readonly isClickTrigger = computed(\r\n () => this.solarisTooltipTrigger() === 'click',\r\n );\r\n\r\n private overlayRef: OverlayRef | null = null;\r\n private outsideClickCleanup: (() => void) | null = null;\r\n private previousActiveElement: HTMLElement | null = null;\r\n private hoverTimeout: ReturnType<typeof setTimeout> | null = null;\r\n private isHovered = false;\r\n private isFocused = false;\r\n private tooltipComponentRef: ComponentRef<SolarisTooltipPanelComponent> | null =\r\n null;\r\n private positionChangesSub: Subscription | null = null;\r\n private currentPlacement: SolarisTooltipPlacement = 'top';\r\n\r\n readonly solarisTooltip = input<string | undefined>(undefined, {\r\n alias: 'solarisTooltip',\r\n });\r\n\r\n readonly solarisTooltipKey = input<string | undefined>(undefined, {\r\n alias: 'solarisTooltipKey',\r\n });\r\n\r\n readonly solarisTooltipFor = input<TemplateRef<unknown> | undefined>(\r\n undefined,\r\n {\r\n alias: 'solarisTooltipFor',\r\n },\r\n );\r\n\r\n readonly solarisTooltipTitle = input<string | undefined>(undefined, {\r\n alias: 'solarisTooltipTitle',\r\n });\r\n\r\n readonly solarisTooltipTitleKey = input<string | undefined>(undefined, {\r\n alias: 'solarisTooltipTitleKey',\r\n });\r\n\r\n readonly solarisTooltipIcon = input<string | undefined>(undefined, {\r\n alias: 'solarisTooltipIcon',\r\n });\r\n\r\n readonly solarisTooltipIconDecorative = input<boolean, boolean>(true, {\r\n alias: 'solarisTooltipIconDecorative',\r\n transform: booleanAttribute,\r\n });\r\n\r\n readonly solarisTooltipTrigger = input<SolarisTooltipTrigger>('hover', {\r\n alias: 'solarisTooltipTrigger',\r\n });\r\n\r\n readonly solarisTooltipPlacement = input<SolarisTooltipPlacement>('top', {\r\n alias: 'solarisTooltipPlacement',\r\n });\r\n\r\n readonly solarisTooltipOffset = input<number, string | number>(0, {\r\n alias: 'solarisTooltipOffset',\r\n transform: numberAttribute,\r\n });\r\n\r\n readonly solarisTooltipDisabled = input<boolean, boolean>(false, {\r\n alias: 'solarisTooltipDisabled',\r\n transform: booleanAttribute,\r\n });\r\n\r\n readonly solarisTooltipCloseable = input<boolean, boolean>(false, {\r\n alias: 'solarisTooltipCloseable',\r\n transform: booleanAttribute,\r\n });\r\n\r\n readonly solarisTooltipCloseLabel = input<string | undefined>(undefined, {\r\n alias: 'solarisTooltipCloseLabel',\r\n });\r\n\r\n readonly solarisTooltipCloseLabelKey = input<string | undefined>(undefined, {\r\n alias: 'solarisTooltipCloseLabelKey',\r\n });\r\n\r\n readonly solarisTooltipShowDelay = input<number, string | number>(300, {\r\n alias: 'solarisTooltipShowDelay',\r\n transform: numberAttribute,\r\n });\r\n\r\n readonly solarisTooltipHideDelay = input<number, string | number>(100, {\r\n alias: 'solarisTooltipHideDelay',\r\n transform: numberAttribute,\r\n });\r\n\r\n readonly solarisTooltipAppearance = input<SolarisTooltipAppearance>(\r\n 'outline',\r\n {\r\n alias: 'solarisTooltipAppearance',\r\n },\r\n );\r\n\r\n readonly solarisTooltipSize = input<SolarisTooltipSize>('sm', {\r\n alias: 'solarisTooltipSize',\r\n });\r\n\r\n readonly solarisTooltipRadius = input<SolarisTooltipRadius>('md', {\r\n alias: 'solarisTooltipRadius',\r\n });\r\n\r\n readonly solarisTooltipMaxWidth = input<string | number>('20rem', {\r\n alias: 'solarisTooltipMaxWidth',\r\n });\r\n\r\n readonly solarisTooltipArrow = input<boolean, boolean>(true, {\r\n alias: 'solarisTooltipArrow',\r\n transform: booleanAttribute,\r\n });\r\n\r\n readonly solarisTooltipOpen = input<boolean | undefined>(undefined, {\r\n alias: 'solarisTooltipOpen',\r\n });\r\n\r\n readonly solarisTooltipOpened = output<void>();\r\n readonly solarisTooltipClosed = output<void>();\r\n readonly solarisTooltipOpenChange = output<boolean>();\r\n\r\n constructor() {\r\n effect(() => {\r\n const shouldBeOpen = this.solarisTooltipOpen();\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 this.clearHoverTimeout();\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (\r\n !this.solarisTooltip() &&\r\n !this.solarisTooltipKey() &&\r\n !this.solarisTooltipFor()\r\n ) {\r\n console.warn(\r\n '[SolarisTooltip] Tooltip requires solaris-tooltip, solarisTooltip, solarisTooltipKey, or solarisTooltipFor.',\r\n );\r\n }\r\n }\r\n\r\n @HostListener('mouseenter')\r\n onMouseEnter(): void {\r\n this.isHovered = true;\r\n if (\r\n this.solarisTooltipTrigger() === 'hover' &&\r\n !this.solarisTooltipDisabled()\r\n ) {\r\n this.scheduleOpen(Number(this.solarisTooltipShowDelay()));\r\n }\r\n }\r\n\r\n @HostListener('mouseleave')\r\n onMouseLeave(): void {\r\n this.isHovered = false;\r\n if (this.solarisTooltipTrigger() === 'hover') {\r\n this.scheduleClose(Number(this.solarisTooltipHideDelay()));\r\n }\r\n }\r\n\r\n @HostListener('focusin')\r\n onFocusIn(): void {\r\n this.isFocused = true;\r\n if (\r\n this.solarisTooltipTrigger() === 'hover' &&\r\n !this.solarisTooltipDisabled()\r\n ) {\r\n this.scheduleOpen(Number(this.solarisTooltipShowDelay()));\r\n }\r\n }\r\n\r\n @HostListener('focusout')\r\n onFocusOut(): void {\r\n this.isFocused = false;\r\n if (this.solarisTooltipTrigger() === 'hover') {\r\n this.scheduleClose(Number(this.solarisTooltipHideDelay()));\r\n }\r\n }\r\n\r\n @HostListener('click')\r\n onClick(): void {\r\n if (this.solarisTooltipDisabled()) {\r\n return;\r\n }\r\n\r\n if (this.solarisTooltipTrigger() === 'click') {\r\n this.toggle();\r\n }\r\n }\r\n\r\n @HostListener('keydown.escape')\r\n onEscape(): void {\r\n if (this.isOpen() && this.solarisTooltipTrigger() !== 'manual') {\r\n this.close();\r\n }\r\n }\r\n\r\n open(): void {\r\n if (this.isOpen() || this.solarisTooltipDisabled()) {\r\n return;\r\n }\r\n\r\n this.clearHoverTimeout();\r\n\r\n if (this.solarisTooltipTrigger() === 'click') {\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 }\r\n\r\n this.createOverlay();\r\n this.attachPanel();\r\n this.addOutsideClickHandler();\r\n this.isOpen.set(true);\r\n this.solarisTooltipOpened.emit();\r\n this.solarisTooltipOpenChange.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.clearHoverTimeout();\r\n this.detachPanel();\r\n this.restoreFocus();\r\n this.isOpen.set(false);\r\n this.solarisTooltipClosed.emit();\r\n this.solarisTooltipOpenChange.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 reposition(): void {\r\n if (this.overlayRef) {\r\n this.overlayRef.updatePosition();\r\n }\r\n }\r\n\r\n private getResolvedBody(): string | undefined {\r\n const text = this.solarisTooltip();\r\n if (text) {\r\n return text;\r\n }\r\n\r\n const key = this.solarisTooltipKey();\r\n if (key) {\r\n return this.translate.translate(key);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private getResolvedTitle(): string | undefined {\r\n const title = this.solarisTooltipTitle();\r\n if (title) {\r\n return title;\r\n }\r\n\r\n const titleKey = this.solarisTooltipTitleKey();\r\n if (titleKey) {\r\n return this.translate.translate(titleKey);\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private getResolvedCloseLabel(): string {\r\n const closeLabel = this.solarisTooltipCloseLabel();\r\n if (closeLabel) {\r\n return closeLabel;\r\n }\r\n\r\n const closeLabelKey = this.solarisTooltipCloseLabelKey();\r\n if (closeLabelKey) {\r\n return this.translate.translate(closeLabelKey);\r\n }\r\n\r\n return this.translate.translate('solaris.tooltip.close');\r\n }\r\n\r\n private scheduleOpen(delay: number): void {\r\n this.clearHoverTimeout();\r\n if (delay > 0) {\r\n this.hoverTimeout = setTimeout(() => {\r\n this.ngZone.run(() => {\r\n if ((this.isHovered || this.isFocused) && !this.isOpen()) {\r\n this.open();\r\n }\r\n });\r\n }, delay);\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n private scheduleClose(delay: number): void {\r\n this.clearHoverTimeout();\r\n\r\n if (this.solarisTooltipTrigger() !== 'hover') {\r\n return;\r\n }\r\n\r\n if (delay > 0) {\r\n this.hoverTimeout = setTimeout(() => {\r\n this.ngZone.run(() => {\r\n if (!this.isHovered && !this.isFocused && this.isOpen()) {\r\n this.close();\r\n }\r\n });\r\n }, delay);\r\n } else if (!this.isHovered && !this.isFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n private clearHoverTimeout(): void {\r\n if (this.hoverTimeout !== null) {\r\n clearTimeout(this.hoverTimeout);\r\n this.hoverTimeout = null;\r\n }\r\n }\r\n\r\n private createOverlay(): void {\r\n this.disposeOverlay();\r\n\r\n const positionStrategy = this.createPositionStrategy();\r\n const scrollStrategy = this.overlay.scrollStrategies.reposition();\r\n\r\n const config = new OverlayConfig({\r\n positionStrategy,\r\n scrollStrategy,\r\n disposeOnNavigation: true,\r\n panelClass: 'solaris-tooltip-panel-overlay',\r\n });\r\n\r\n this.overlayRef = this.overlay.create(config);\r\n }\r\n\r\n private createPositionStrategy(): FlexibleConnectedPositionStrategy {\r\n const placement = this.solarisTooltipPlacement();\r\n const userOffset = Number(this.solarisTooltipOffset());\r\n const hasArrow = this.solarisTooltipArrow();\r\n const size = this.solarisTooltipSize();\r\n const arrowPx = hasArrow ? (ARROW_SIZE_PX[size] ?? 20) : 0;\r\n const effectiveOffset = arrowPx + TOOLTIP_TRIGGER_GAP + userOffset;\r\n const positions = getTooltipPositions(placement, effectiveOffset);\r\n\r\n return this.overlay\r\n .position()\r\n .flexibleConnectedTo(this.elementRef)\r\n .withPositions(positions)\r\n .withFlexibleDimensions(true)\r\n .withPush(true)\r\n .withGrowAfterOpen(true);\r\n }\r\n\r\n private attachPanel(): void {\r\n if (!this.overlayRef) {\r\n return;\r\n }\r\n\r\n this.currentPlacement = this.solarisTooltipPlacement();\r\n const trigger = this.solarisTooltipTrigger();\r\n const effectiveCloseable =\r\n trigger === 'click' ? this.solarisTooltipCloseable() : false;\r\n const closeFn = () => this.close();\r\n\r\n const data: SolarisTooltipPanelData = {\r\n title: this.getResolvedTitle(),\r\n body: this.getResolvedBody(),\r\n icon: this.solarisTooltipIcon(),\r\n iconDecorative: this.solarisTooltipIconDecorative(),\r\n contentTemplate: this.solarisTooltipFor(),\r\n appearance: this.solarisTooltipAppearance(),\r\n size: this.solarisTooltipSize(),\r\n radius: this.solarisTooltipRadius(),\r\n maxWidth: this.solarisTooltipMaxWidth(),\r\n arrow: this.solarisTooltipArrow(),\r\n arrowClass: getTooltipArrowClass(this.currentPlacement),\r\n closeable: effectiveCloseable,\r\n closeLabel: this.getResolvedCloseLabel(),\r\n panelId: this.panelId,\r\n placement: this.currentPlacement,\r\n trigger,\r\n close: closeFn,\r\n };\r\n\r\n const panelInjector = Injector.create({\r\n parent: this.injector,\r\n providers: [{ provide: SOLARIS_TOOLTIP_PANEL_DATA, useValue: data }],\r\n });\r\n\r\n const portal = new ComponentPortal(\r\n SolarisTooltipPanelComponent,\r\n this.viewContainerRef,\r\n panelInjector,\r\n );\r\n\r\n this.tooltipComponentRef = this.overlayRef.attach(portal);\r\n\r\n const strategy = this.overlayRef.getConfig()\r\n .positionStrategy as FlexibleConnectedPositionStrategy;\r\n this.positionChangesSub = strategy.positionChanges.subscribe(\r\n (change: ConnectedOverlayPositionChange) => {\r\n const actualPlacement = derivePlacementFromConnectionPair(\r\n change.connectionPair,\r\n );\r\n if (actualPlacement !== this.currentPlacement) {\r\n this.currentPlacement = actualPlacement;\r\n this.tooltipComponentRef?.instance.updatePlacement(\r\n actualPlacement,\r\n getTooltipArrowClass(actualPlacement),\r\n );\r\n }\r\n },\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 this.positionChangesSub?.unsubscribe();\r\n this.positionChangesSub = null;\r\n this.tooltipComponentRef = null;\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.solarisTooltipTrigger() !== 'click') {\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.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 restoreFocus(): void {\r\n if (\r\n this.solarisTooltipTrigger() === 'click' &&\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"]}
@@ -1,3 +0,0 @@
1
- export { SolarisTooltipDirective } from './directive/tooltip.directive';
2
- export { SolarisTooltipPanelComponent } from './component/tooltip-panel.component';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/lib/components/interaction/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["export { SolarisTooltipDirective } from './directive/tooltip.directive';\nexport { SolarisTooltipPanelComponent } from './component/tooltip-panel.component';\n\nexport type {\n SolarisTooltipPlacement,\n SolarisTooltipTrigger,\n SolarisTooltipAppearance,\n SolarisTooltipSize,\n SolarisTooltipRadius,\n SolarisTooltipConfig,\n} from './model/tooltip.types';\n"]}