@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,1119 @@
1
+ import { Component, input, computed, signal, output, effect, forwardRef, inject, ContentChildren, ElementRef, ViewChild, DestroyRef, isDevMode, } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { SolarisFormControl } from '../../form-field/model/form-control.contract';
4
+ import { SolarisFormFieldComponent } from '../../form-field/component/form-field.component';
5
+ import { SolarisFormFieldTriggerDirective } from '../../form-field/directives/form-field-trigger.directive';
6
+ import { SolarisFormPrefixDirective } from '../../form-field/directives/form-prefix.directive';
7
+ import { SolarisFormSuffixDirective } from '../../form-field/directives/form-suffix.directive';
8
+ import { SolarisTranslateService } from '../../../../services/translation';
9
+ import { SolarisOptionComponent } from '../../option';
10
+ import { SolarisOptionGroupComponent } from '../../option-group';
11
+ import { SolarisIconComponent } from '../../../icon';
12
+ import { SolarisPopoverDirective, SolarisPopoverTriggerDirective, } from '../../../interaction/popover';
13
+ import { SolarisTooltipDirective } from '../../../interaction/tooltip';
14
+ import * as i0 from "@angular/core";
15
+ let nextId = 0;
16
+ function generateId() {
17
+ return `solaris-multi-select-${++nextId}`;
18
+ }
19
+ function normalizeArray(value) {
20
+ if (value === null || value === undefined)
21
+ return [];
22
+ if (Array.isArray(value))
23
+ return value;
24
+ return [];
25
+ }
26
+ export class SolarisMultiSelectComponent extends SolarisFormControl {
27
+ elementRef = inject(ElementRef);
28
+ translateService = inject(SolarisTranslateService);
29
+ parentFormField = inject(SolarisFormFieldComponent, {
30
+ optional: true,
31
+ });
32
+ popoverTrigger;
33
+ searchInputRef;
34
+ triggerElement;
35
+ formFieldElement;
36
+ options;
37
+ optionGroups;
38
+ hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : /* istanbul ignore next */ []));
39
+ label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
40
+ error = input(...(ngDevMode ? [undefined, { debugName: "error" }] : /* istanbul ignore next */ []));
41
+ hintKey = input(...(ngDevMode ? [undefined, { debugName: "hintKey" }] : /* istanbul ignore next */ []));
42
+ labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : /* istanbul ignore next */ []));
43
+ errorKey = input(...(ngDevMode ? [undefined, { debugName: "errorKey" }] : /* istanbul ignore next */ []));
44
+ emptyText = input(...(ngDevMode ? [undefined, { debugName: "emptyText" }] : /* istanbul ignore next */ []));
45
+ ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
46
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
47
+ loadingText = input(...(ngDevMode ? [undefined, { debugName: "loadingText" }] : /* istanbul ignore next */ []));
48
+ emptyTextKey = input(...(ngDevMode ? [undefined, { debugName: "emptyTextKey" }] : /* istanbul ignore next */ []));
49
+ ariaLabelKey = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
50
+ placeholderKey = input(...(ngDevMode ? [undefined, { debugName: "placeholderKey" }] : /* istanbul ignore next */ []));
51
+ loadingTextKey = input(...(ngDevMode ? [undefined, { debugName: "loadingTextKey" }] : /* istanbul ignore next */ []));
52
+ ariaLabelledby = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
53
+ loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
54
+ searchPlaceholder = input(...(ngDevMode ? [undefined, { debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
55
+ clearable = input(false, ...(ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []));
56
+ clearLabel = input(...(ngDevMode ? [undefined, { debugName: "clearLabel" }] : /* istanbul ignore next */ []));
57
+ clearLabelKey = input(...(ngDevMode ? [undefined, { debugName: "clearLabelKey" }] : /* istanbul ignore next */ []));
58
+ removeChipLabel = input(...(ngDevMode ? [undefined, { debugName: "removeChipLabel" }] : /* istanbul ignore next */ []));
59
+ removeChipLabelKey = input(...(ngDevMode ? [undefined, { debugName: "removeChipLabelKey" }] : /* istanbul ignore next */ []));
60
+ noResultsText = input(...(ngDevMode ? [undefined, { debugName: "noResultsText" }] : /* istanbul ignore next */ []));
61
+ noResultsTextKey = input(...(ngDevMode ? [undefined, { debugName: "noResultsTextKey" }] : /* istanbul ignore next */ []));
62
+ value = input([], ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
63
+ searchable = input(false, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
64
+ searchPlaceholderKey = input(...(ngDevMode ? [undefined, { debugName: "searchPlaceholderKey" }] : /* istanbul ignore next */ []));
65
+ panelMinWidth = input(...(ngDevMode ? [undefined, { debugName: "panelMinWidth" }] : /* istanbul ignore next */ []));
66
+ panelMaxWidth = input(...(ngDevMode ? [undefined, { debugName: "panelMaxWidth" }] : /* istanbul ignore next */ []));
67
+ density = input(...(ngDevMode ? [undefined, { debugName: "density" }] : /* istanbul ignore next */ []));
68
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
69
+ panelMatchTriggerWidth = input(true, ...(ngDevMode ? [{ debugName: "panelMatchTriggerWidth" }] : /* istanbul ignore next */ []));
70
+ radius = input('md', ...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
71
+ disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled' });
72
+ readonlyInput = input(false, { ...(ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {}), alias: 'readonly' });
73
+ requiredInput = input(false, { ...(ngDevMode ? { debugName: "requiredInput" } : /* istanbul ignore next */ {}), alias: 'required' });
74
+ panelMaxHeight = input('20rem', ...(ngDevMode ? [{ debugName: "panelMaxHeight" }] : /* istanbul ignore next */ []));
75
+ icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
76
+ displayWith = input(...(ngDevMode ? [undefined, { debugName: "displayWith" }] : /* istanbul ignore next */ []));
77
+ appearance = input('outline', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
78
+ compareWith = input(Object.is, ...(ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []));
79
+ manualInvalid = input(undefined, { ...(ngDevMode ? { debugName: "manualInvalid" } : /* istanbul ignore next */ {}), alias: 'invalid' });
80
+ selectAll = input(false, ...(ngDevMode ? [{ debugName: "selectAll" }] : /* istanbul ignore next */ []));
81
+ selectAllLabel = input(...(ngDevMode ? [undefined, { debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
82
+ selectAllLabelKey = input(...(ngDevMode ? [undefined, { debugName: "selectAllLabelKey" }] : /* istanbul ignore next */ []));
83
+ displayMode = input('auto', ...(ngDevMode ? [{ debugName: "displayMode" }] : /* istanbul ignore next */ []));
84
+ maxVisibleChips = input(3, ...(ngDevMode ? [{ debugName: "maxVisibleChips" }] : /* istanbul ignore next */ []));
85
+ selectedCountLabel = input(...(ngDevMode ? [undefined, { debugName: "selectedCountLabel" }] : /* istanbul ignore next */ []));
86
+ selectedCountLabelKey = input(...(ngDevMode ? [undefined, { debugName: "selectedCountLabelKey" }] : /* istanbul ignore next */ []));
87
+ overflowLabel = input(...(ngDevMode ? [undefined, { debugName: "overflowLabel" }] : /* istanbul ignore next */ []));
88
+ overflowLabelKey = input(...(ngDevMode ? [undefined, { debugName: "overflowLabelKey" }] : /* istanbul ignore next */ []));
89
+ minSelected = input(undefined, ...(ngDevMode ? [{ debugName: "minSelected" }] : /* istanbul ignore next */ []));
90
+ maxSelected = input(undefined, ...(ngDevMode ? [{ debugName: "maxSelected" }] : /* istanbul ignore next */ []));
91
+ showSelectionTooltip = input(false, ...(ngDevMode ? [{ debugName: "showSelectionTooltip" }] : /* istanbul ignore next */ []));
92
+ name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
93
+ opened = output();
94
+ closed = output();
95
+ cleared = output();
96
+ openChange = output();
97
+ searchChange = output();
98
+ valueChange = output();
99
+ selectionChange = output();
100
+ panelId = `solaris-multi-select-panel-${generateId()}`;
101
+ panelOpen = signal(false, ...(ngDevMode ? [{ debugName: "panelOpen" }] : /* istanbul ignore next */ []));
102
+ internalValue = signal([], ...(ngDevMode ? [{ debugName: "internalValue" }] : /* istanbul ignore next */ []));
103
+ internalFocused = signal(false, ...(ngDevMode ? [{ debugName: "internalFocused" }] : /* istanbul ignore next */ []));
104
+ internalDisabled = signal(false, ...(ngDevMode ? [{ debugName: "internalDisabled" }] : /* istanbul ignore next */ []));
105
+ searchQuery = signal('', ...(ngDevMode ? [{ debugName: "searchQuery" }] : /* istanbul ignore next */ []));
106
+ activeOptionIndex = signal(-1, ...(ngDevMode ? [{ debugName: "activeOptionIndex" }] : /* istanbul ignore next */ []));
107
+ touched = signal(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
108
+ optionsInitialized = signal(false, ...(ngDevMode ? [{ debugName: "optionsInitialized" }] : /* istanbul ignore next */ []));
109
+ triggerContentRef;
110
+ onChange = () => undefined;
111
+ onTouched = () => undefined;
112
+ optionsSubscription;
113
+ optionInteractionSubscriptions = [];
114
+ popoverSubscriptions = [];
115
+ triggerWidth = signal(0, ...(ngDevMode ? [{ debugName: "triggerWidth" }] : /* istanbul ignore next */ []));
116
+ resizeObserver = null;
117
+ destroyRef = inject(DestroyRef);
118
+ elementId = computed(() => {
119
+ // SECURITY_EXCEPTION: nativeElement.getAttribute('id') is standard DOM API to check existing ID before generating one. Same approach used by Solaris Select and Option.
120
+ const existing = this.elementRef.nativeElement.getAttribute('id');
121
+ return existing ?? generateId();
122
+ }, ...(ngDevMode ? [{ debugName: "elementId" }] : /* istanbul ignore next */ []));
123
+ effectiveDensity = computed(() => {
124
+ return this.density() ?? 'comfortable';
125
+ }, ...(ngDevMode ? [{ debugName: "effectiveDensity" }] : /* istanbul ignore next */ []));
126
+ isEffectivelyDisabled = computed(() => {
127
+ return this.disabledInput() || this.internalDisabled();
128
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyDisabled" }] : /* istanbul ignore next */ []));
129
+ isEffectivelyReadonly = computed(() => {
130
+ return this.readonlyInput();
131
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyReadonly" }] : /* istanbul ignore next */ []));
132
+ isEffectivelyInvalid = computed(() => {
133
+ const manual = this.manualInvalid();
134
+ if (manual !== undefined) {
135
+ return manual;
136
+ }
137
+ if (this.touched()) {
138
+ const min = this.minSelected();
139
+ const max = this.maxSelected();
140
+ const count = this.internalValue().length;
141
+ if (min !== undefined && count < min)
142
+ return true;
143
+ if (max !== undefined && count > max)
144
+ return true;
145
+ if (this.requiredInput() && !this.hasValue())
146
+ return true;
147
+ }
148
+ return false;
149
+ }, ...(ngDevMode ? [{ debugName: "isEffectivelyInvalid" }] : /* istanbul ignore next */ []));
150
+ popoverAppearance = computed(() => {
151
+ const a = this.appearance();
152
+ return a === 'filled' ? 'surface' : a;
153
+ }, ...(ngDevMode ? [{ debugName: "popoverAppearance" }] : /* istanbul ignore next */ []));
154
+ canOpen = computed(() => {
155
+ return !this.isEffectivelyDisabled() && !this.isEffectivelyReadonly();
156
+ }, ...(ngDevMode ? [{ debugName: "canOpen" }] : /* istanbul ignore next */ []));
157
+ hasValue = computed(() => {
158
+ return this.internalValue().length > 0;
159
+ }, ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
160
+ canClear = computed(() => {
161
+ return (this.clearable() &&
162
+ this.hasValue() &&
163
+ !this.isEffectivelyDisabled() &&
164
+ !this.isEffectivelyReadonly());
165
+ }, ...(ngDevMode ? [{ debugName: "canClear" }] : /* istanbul ignore next */ []));
166
+ selectedOptions = computed(() => {
167
+ const value = this.internalValue();
168
+ const comp = this.compareWith();
169
+ const opts = this.options;
170
+ if (!opts || value.length === 0) {
171
+ return [];
172
+ }
173
+ return opts.filter((opt) => value.some((v) => comp(opt.value(), v)));
174
+ }, ...(ngDevMode ? [{ debugName: "selectedOptions" }] : /* istanbul ignore next */ []));
175
+ selectedCount = computed(() => {
176
+ return this.internalValue().length;
177
+ }, ...(ngDevMode ? [{ debugName: "selectedCount" }] : /* istanbul ignore next */ []));
178
+ selectedLabels = computed(() => {
179
+ const dw = this.displayWith();
180
+ const selected = this.selectedOptions();
181
+ return selected
182
+ .map((opt) => {
183
+ if (dw) {
184
+ const result = dw(opt.value());
185
+ if (result !== undefined)
186
+ return result;
187
+ }
188
+ const label = opt.labelText();
189
+ if (label)
190
+ return label;
191
+ const native = this.getOptionNativeText(opt);
192
+ if (native)
193
+ return native;
194
+ return '';
195
+ })
196
+ .filter(Boolean);
197
+ }, ...(ngDevMode ? [{ debugName: "selectedLabels" }] : /* istanbul ignore next */ []));
198
+ summaryText = computed(() => {
199
+ const count = this.selectedCount();
200
+ if (count === 0)
201
+ return '';
202
+ const key = this.selectedCountLabelKey();
203
+ if (key) {
204
+ return this.translateService.translate(key, { count: String(count) });
205
+ }
206
+ const text = this.selectedCountLabel();
207
+ if (text)
208
+ return text;
209
+ if (count === 1) {
210
+ return this.translateService.translate('solaris.multiSelect.selectedCount.singular', { count: '1' });
211
+ }
212
+ return this.translateService.translate('solaris.multiSelect.selectedCount.plural', { count: String(count) });
213
+ }, ...(ngDevMode ? [{ debugName: "summaryText" }] : /* istanbul ignore next */ []));
214
+ availableContentWidth = computed(() => {
215
+ const tw = this.triggerWidth();
216
+ if (tw <= 0)
217
+ return 0;
218
+ const searchWidth = this.searchable() && this.panelOpen() ? 80 : 0;
219
+ return Math.max(0, tw - searchWidth);
220
+ }, ...(ngDevMode ? [{ debugName: "availableContentWidth" }] : /* istanbul ignore next */ []));
221
+ autoChipCount = computed(() => {
222
+ if (this.displayMode() !== 'auto')
223
+ return 0;
224
+ const selected = this.selectedOptions();
225
+ if (selected.length === 0)
226
+ return 0;
227
+ const avail = this.availableContentWidth();
228
+ if (avail <= 0)
229
+ return 0;
230
+ let remaining = avail;
231
+ let count = 0;
232
+ for (const opt of selected) {
233
+ const label = this.getOptionDisplayLabel(opt);
234
+ const canRemove = !this.isEffectivelyDisabled() && !this.isEffectivelyReadonly();
235
+ const labelWidth = label.length * 9;
236
+ const chipPaddingX = 16;
237
+ const removeWidth = canRemove ? 20 : 0;
238
+ const chipWidth = labelWidth + chipPaddingX + removeWidth + 4;
239
+ if (chipWidth <= remaining) {
240
+ remaining -= chipWidth;
241
+ count++;
242
+ }
243
+ else {
244
+ break;
245
+ }
246
+ }
247
+ return count;
248
+ }, ...(ngDevMode ? [{ debugName: "autoChipCount" }] : /* istanbul ignore next */ []));
249
+ autoOverflowCount = computed(() => {
250
+ return Math.max(0, this.selectedOptions().length - this.autoChipCount());
251
+ }, ...(ngDevMode ? [{ debugName: "autoOverflowCount" }] : /* istanbul ignore next */ []));
252
+ autoShowOverflow = computed(() => {
253
+ return this.autoOverflowCount() > 0;
254
+ }, ...(ngDevMode ? [{ debugName: "autoShowOverflow" }] : /* istanbul ignore next */ []));
255
+ showCountOnly = computed(() => {
256
+ return (this.displayMode() === 'auto' &&
257
+ this.autoChipCount() === 0 &&
258
+ this.selectedCount() > 0);
259
+ }, ...(ngDevMode ? [{ debugName: "showCountOnly" }] : /* istanbul ignore next */ []));
260
+ autoVisibleChips = computed(() => {
261
+ return this.selectedOptions().slice(0, this.autoChipCount());
262
+ }, ...(ngDevMode ? [{ debugName: "autoVisibleChips" }] : /* istanbul ignore next */ []));
263
+ autoOverflowTooltipText = computed(() => {
264
+ const selected = this.selectedOptions();
265
+ const count = this.autoChipCount();
266
+ return selected
267
+ .slice(count)
268
+ .map((opt) => this.getOptionDisplayLabel(opt))
269
+ .join(', ');
270
+ }, ...(ngDevMode ? [{ debugName: "autoOverflowTooltipText" }] : /* istanbul ignore next */ []));
271
+ countTooltipText = computed(() => {
272
+ return this.selectedLabels().join(', ');
273
+ }, ...(ngDevMode ? [{ debugName: "countTooltipText" }] : /* istanbul ignore next */ []));
274
+ overflowCount = computed(() => {
275
+ return Math.max(0, this.selectedOptions().length - this.maxVisibleChips());
276
+ }, ...(ngDevMode ? [{ debugName: "overflowCount" }] : /* istanbul ignore next */ []));
277
+ overflowText = computed(() => {
278
+ const count = this.overflowCount();
279
+ if (count <= 0)
280
+ return '';
281
+ const key = this.overflowLabelKey();
282
+ if (key) {
283
+ return this.translateService.translate(key, { count: String(count) });
284
+ }
285
+ const text = this.overflowLabel();
286
+ if (text)
287
+ return text;
288
+ return `+${count}`;
289
+ }, ...(ngDevMode ? [{ debugName: "overflowText" }] : /* istanbul ignore next */ []));
290
+ commaText = computed(() => {
291
+ return this.selectedLabels().join(', ');
292
+ }, ...(ngDevMode ? [{ debugName: "commaText" }] : /* istanbul ignore next */ []));
293
+ displayText = computed(() => {
294
+ const mode = this.displayMode();
295
+ if (mode === 'summary')
296
+ return this.summaryText();
297
+ if (mode === 'comma')
298
+ return this.commaText();
299
+ return '';
300
+ }, ...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
301
+ placeholderText = computed(() => {
302
+ const key = this.placeholderKey();
303
+ if (key) {
304
+ return this.translateService.translate(key) || this.placeholder() || '';
305
+ }
306
+ return this.placeholder() ?? '';
307
+ }, ...(ngDevMode ? [{ debugName: "placeholderText" }] : /* istanbul ignore next */ []));
308
+ searchPlaceholderText = computed(() => {
309
+ const key = this.searchPlaceholderKey();
310
+ if (key) {
311
+ return this.translateService.translate(key);
312
+ }
313
+ const text = this.searchPlaceholder();
314
+ if (text) {
315
+ return text;
316
+ }
317
+ return this.translateService.translate('solaris.multiSelect.search.placeholder');
318
+ }, ...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : /* istanbul ignore next */ []));
319
+ loadingTextValue = computed(() => {
320
+ const key = this.loadingTextKey();
321
+ if (key) {
322
+ return this.translateService.translate(key);
323
+ }
324
+ const text = this.loadingText();
325
+ if (text) {
326
+ return text;
327
+ }
328
+ return this.translateService.translate('solaris.multiSelect.loading');
329
+ }, ...(ngDevMode ? [{ debugName: "loadingTextValue" }] : /* istanbul ignore next */ []));
330
+ emptyTextValue = computed(() => {
331
+ const key = this.emptyTextKey();
332
+ if (key) {
333
+ return this.translateService.translate(key);
334
+ }
335
+ const text = this.emptyText();
336
+ if (text) {
337
+ return text;
338
+ }
339
+ return this.translateService.translate('solaris.multiSelect.empty');
340
+ }, ...(ngDevMode ? [{ debugName: "emptyTextValue" }] : /* istanbul ignore next */ []));
341
+ noResultsTextValue = computed(() => {
342
+ const key = this.noResultsTextKey();
343
+ if (key) {
344
+ return this.translateService.translate(key);
345
+ }
346
+ const text = this.noResultsText();
347
+ if (text) {
348
+ return text;
349
+ }
350
+ return this.translateService.translate('solaris.multiSelect.noResults');
351
+ }, ...(ngDevMode ? [{ debugName: "noResultsTextValue" }] : /* istanbul ignore next */ []));
352
+ clearAriaLabel = computed(() => {
353
+ const key = this.clearLabelKey();
354
+ if (key) {
355
+ return this.translateService.translate(key);
356
+ }
357
+ const text = this.clearLabel();
358
+ if (text) {
359
+ return text;
360
+ }
361
+ return this.translateService.translate('solaris.multiSelect.clear');
362
+ }, ...(ngDevMode ? [{ debugName: "clearAriaLabel" }] : /* istanbul ignore next */ []));
363
+ selectAllLabelText = computed(() => {
364
+ const key = this.selectAllLabelKey();
365
+ if (key) {
366
+ return this.translateService.translate(key);
367
+ }
368
+ const text = this.selectAllLabel();
369
+ if (text) {
370
+ return text;
371
+ }
372
+ return this.translateService.translate('solaris.multiSelect.selectAll');
373
+ }, ...(ngDevMode ? [{ debugName: "selectAllLabelText" }] : /* istanbul ignore next */ []));
374
+ removeChipAriaLabel = computed(() => {
375
+ const key = this.removeChipLabelKey();
376
+ if (key) {
377
+ return this.translateService.translate(key);
378
+ }
379
+ const text = this.removeChipLabel();
380
+ if (text) {
381
+ return text;
382
+ }
383
+ return this.translateService.translate('solaris.multiSelect.removeChip');
384
+ }, ...(ngDevMode ? [{ debugName: "removeChipAriaLabel" }] : /* istanbul ignore next */ []));
385
+ ariaLabelText = computed(() => {
386
+ const key = this.ariaLabelKey();
387
+ if (key) {
388
+ return this.translateService.translate(key);
389
+ }
390
+ return this.ariaLabel();
391
+ }, ...(ngDevMode ? [{ debugName: "ariaLabelText" }] : /* istanbul ignore next */ []));
392
+ ariaLabelledbyText = computed(() => {
393
+ return this.ariaLabelledby();
394
+ }, ...(ngDevMode ? [{ debugName: "ariaLabelledbyText" }] : /* istanbul ignore next */ []));
395
+ labelText = computed(() => {
396
+ const key = this.labelKey();
397
+ if (key) {
398
+ return this.translateService.translate(key) || this.label() || '';
399
+ }
400
+ return this.label() ?? '';
401
+ }, ...(ngDevMode ? [{ debugName: "labelText" }] : /* istanbul ignore next */ []));
402
+ hintText = computed(() => {
403
+ const key = this.hintKey();
404
+ if (key) {
405
+ return this.translateService.translate(key) || this.hint() || '';
406
+ }
407
+ return this.hint() ?? '';
408
+ }, ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
409
+ errorText = computed(() => {
410
+ const key = this.errorKey();
411
+ if (key) {
412
+ return this.translateService.translate(key) || this.error() || '';
413
+ }
414
+ return this.error() ?? '';
415
+ }, ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
416
+ activeDescendantId = computed(() => {
417
+ if (!this.panelOpen())
418
+ return null;
419
+ const idx = this.activeOptionIndex();
420
+ const opts = this.visibleOptions();
421
+ if (idx >= 0 && idx < opts.length) {
422
+ return opts[idx].elementId();
423
+ }
424
+ return null;
425
+ }, ...(ngDevMode ? [{ debugName: "activeDescendantId" }] : /* istanbul ignore next */ []));
426
+ _describedByIds = signal([], ...(ngDevMode ? [{ debugName: "_describedByIds" }] : /* istanbul ignore next */ []));
427
+ ariaDescribedBy = computed(() => {
428
+ const ids = this._describedByIds();
429
+ return ids.length > 0 ? ids.join(' ') : null;
430
+ }, ...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
431
+ visibleOptions = computed(() => {
432
+ const opts = this.options;
433
+ if (!opts)
434
+ return [];
435
+ if (!this.panelOpen())
436
+ return [];
437
+ const query = this.searchQuery().toLowerCase().trim();
438
+ if (!query)
439
+ return opts.toArray();
440
+ return opts.toArray().filter((opt) => {
441
+ if (opt.isEffectivelyDisabled())
442
+ return false;
443
+ return this.optionMatchesSearch(opt, query);
444
+ });
445
+ }, ...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
446
+ showNoResults = computed(() => {
447
+ return (this.searchQuery().trim().length > 0 &&
448
+ this.visibleOptions().length === 0 &&
449
+ !this.loading());
450
+ }, ...(ngDevMode ? [{ debugName: "showNoResults" }] : /* istanbul ignore next */ []));
451
+ showEmpty = computed(() => {
452
+ const opts = this.options;
453
+ return ((!opts || opts.length === 0) &&
454
+ !this.loading() &&
455
+ this.searchQuery().trim().length === 0);
456
+ }, ...(ngDevMode ? [{ debugName: "showEmpty" }] : /* istanbul ignore next */ []));
457
+ allSelectedCount = computed(() => {
458
+ const value = this.internalValue();
459
+ const comp = this.compareWith();
460
+ const opts = this.selectableOptions();
461
+ return opts.filter((opt) => value.some((v) => comp(opt.value(), v))).length;
462
+ }, ...(ngDevMode ? [{ debugName: "allSelectedCount" }] : /* istanbul ignore next */ []));
463
+ selectableOptions = computed(() => {
464
+ const opts = this.options;
465
+ if (!opts)
466
+ return [];
467
+ const query = this.searchQuery().trim();
468
+ let filtered;
469
+ if (query) {
470
+ filtered = opts
471
+ .toArray()
472
+ .filter((o) => !o.isEffectivelyDisabled() && this.optionMatchesSearch(o, query));
473
+ }
474
+ else {
475
+ filtered = opts.toArray().filter((o) => !o.isEffectivelyDisabled());
476
+ }
477
+ return filtered;
478
+ }, ...(ngDevMode ? [{ debugName: "selectableOptions" }] : /* istanbul ignore next */ []));
479
+ isAllSelected = computed(() => {
480
+ const selectable = this.selectableOptions();
481
+ if (selectable.length === 0)
482
+ return false;
483
+ return this.allSelectedCount() === selectable.length;
484
+ }, ...(ngDevMode ? [{ debugName: "isAllSelected" }] : /* istanbul ignore next */ []));
485
+ isPartialSelected = computed(() => {
486
+ const selectable = this.selectableOptions();
487
+ if (selectable.length === 0)
488
+ return false;
489
+ return (this.allSelectedCount() > 0 && this.allSelectedCount() < selectable.length);
490
+ }, ...(ngDevMode ? [{ debugName: "isPartialSelected" }] : /* istanbul ignore next */ []));
491
+ effectiveDisplayMode = computed(() => {
492
+ if (this.hasValue() && this.displayMode() === 'chips')
493
+ return 'chips';
494
+ return this.displayMode();
495
+ }, ...(ngDevMode ? [{ debugName: "effectiveDisplayMode" }] : /* istanbul ignore next */ []));
496
+ get id() {
497
+ return this.elementId();
498
+ }
499
+ get focused() {
500
+ return this.internalFocused();
501
+ }
502
+ get disabled() {
503
+ return this.isEffectivelyDisabled();
504
+ }
505
+ get readonly() {
506
+ return this.isEffectivelyReadonly();
507
+ }
508
+ get invalid() {
509
+ return this.isEffectivelyInvalid();
510
+ }
511
+ get required() {
512
+ return this.requiredInput();
513
+ }
514
+ get describedByIds() {
515
+ return this._describedByIds();
516
+ }
517
+ setDescribedByIds(ids) {
518
+ this._describedByIds.set([...ids]);
519
+ }
520
+ focus() {
521
+ // SECURITY_EXCEPTION: nativeElement.focus() required to programmatically focus the multi-select trigger. Standard DOM method used by Angular CDK.
522
+ if (this.triggerElement) {
523
+ this.triggerElement.nativeElement.focus();
524
+ }
525
+ else {
526
+ // SECURITY_EXCEPTION: nativeElement.focus() required as fallback when no triggerElement ref. Standard DOM method.
527
+ this.elementRef.nativeElement.focus();
528
+ }
529
+ }
530
+ writeValue(safe) {
531
+ const arr = normalizeArray(safe);
532
+ this.internalValue.set([...arr]);
533
+ }
534
+ registerOnChange(fn) {
535
+ this.onChange = fn;
536
+ }
537
+ registerOnTouched(fn) {
538
+ this.onTouched = fn;
539
+ }
540
+ setDisabledState(isDisabled) {
541
+ this.internalDisabled.set(isDisabled);
542
+ }
543
+ constructor() {
544
+ super();
545
+ effect(() => {
546
+ if (!this.optionsInitialized())
547
+ return;
548
+ this.internalValue();
549
+ this.setOptionsSelectedState();
550
+ });
551
+ }
552
+ ngAfterContentInit() {
553
+ this.optionsInitialized.set(true);
554
+ this.setOptionsMultiSelectMode();
555
+ this.setOptionsSelectedState();
556
+ this.setOptionGroupDisabledState();
557
+ this.syncActiveStates();
558
+ this.syncVisibility();
559
+ this.subscribeToOptionInteractions();
560
+ const optionsSub = this.options.changes.subscribe(() => {
561
+ this.setOptionsMultiSelectMode();
562
+ this.setOptionsSelectedState();
563
+ this.setOptionGroupDisabledState();
564
+ this.syncVisibility();
565
+ this.subscribeToOptionInteractions();
566
+ });
567
+ this.optionsSubscription = () => optionsSub.unsubscribe();
568
+ if (isDevMode() && this.parentFormField) {
569
+ console.warn('SolarisMultiSelectComponent already includes SolarisFormField internally. ' +
570
+ 'Do not wrap it with <solaris-form-field>; pass label, hint, error, prefix and suffix directly to <solaris-multi-select>.');
571
+ }
572
+ }
573
+ ngAfterViewInit() {
574
+ if (this.popoverTrigger) {
575
+ const openedSub = this.popoverTrigger.solarisPopoverOpened.subscribe(() => {
576
+ this.onPanelOpened();
577
+ });
578
+ const closedSub = this.popoverTrigger.solarisPopoverClosed.subscribe(() => {
579
+ this.onPanelClosed();
580
+ });
581
+ this.popoverSubscriptions.push(() => openedSub.unsubscribe(), () => closedSub.unsubscribe());
582
+ }
583
+ this.setupResizeObserver();
584
+ }
585
+ ngOnDestroy() {
586
+ this.optionsSubscription?.();
587
+ this.optionInteractionSubscriptions.forEach((fn) => fn());
588
+ this.popoverSubscriptions.forEach((fn) => fn());
589
+ this.resizeObserver?.disconnect();
590
+ this.resizeObserver = null;
591
+ }
592
+ setupResizeObserver() {
593
+ // SECURITY_EXCEPTION: nativeElement access needed to measure trigger content width for auto display mode. ResizeObserver is SSR-safe (guarded by typeof check). offsetWidth is read-only, no XSS risk.
594
+ const el = this.triggerContentRef?.nativeElement;
595
+ if (!el)
596
+ return;
597
+ this.triggerWidth.set(el.offsetWidth);
598
+ if (typeof ResizeObserver !== 'undefined') {
599
+ this.resizeObserver?.disconnect();
600
+ this.resizeObserver = new ResizeObserver((entries) => {
601
+ for (const entry of entries) {
602
+ this.triggerWidth.set(entry.contentRect.width);
603
+ }
604
+ });
605
+ this.resizeObserver.observe(el);
606
+ }
607
+ }
608
+ onPanelOpened() {
609
+ this.searchQuery.set('');
610
+ this.panelOpen.set(true);
611
+ this.setOptionsSelectedState();
612
+ this.syncActiveStates();
613
+ this.syncVisibility();
614
+ this.opened.emit();
615
+ this.openChange.emit(true);
616
+ this.setConnectedSide('bottom');
617
+ if (this.searchable()) {
618
+ requestAnimationFrame(() => {
619
+ // SECURITY_EXCEPTION: nativeElement.focus() required to focus search input when panel opens. Standard DOM method.
620
+ this.searchInputRef?.nativeElement.focus();
621
+ });
622
+ }
623
+ }
624
+ onPanelClosed() {
625
+ this.panelOpen.set(false);
626
+ this.searchQuery.set('');
627
+ this.syncVisibility();
628
+ this.closed.emit();
629
+ this.openChange.emit(false);
630
+ this.markAsTouched();
631
+ this.clearConnectedSide();
632
+ }
633
+ setConnectedSide(side) {
634
+ // SECURITY_EXCEPTION: nativeElement required to access form-field DOM for connected-side sync. ElementRef SSR-safe.
635
+ const el = this.formFieldElement?.nativeElement;
636
+ if (el) {
637
+ // SECURITY_EXCEPTION: nativeElement.querySelector required to find control-wrapper for connected-side sync.
638
+ const wrapper = el.querySelector('.solaris-form-field__control-wrapper');
639
+ if (wrapper) {
640
+ wrapper.dataset['connectedSide'] = side;
641
+ }
642
+ }
643
+ }
644
+ clearConnectedSide() {
645
+ // SECURITY_EXCEPTION: nativeElement required to access form-field DOM for connected-side cleanup. ElementRef SSR-safe.
646
+ const el = this.formFieldElement?.nativeElement;
647
+ if (el) {
648
+ const wrapper = el.querySelector('.solaris-form-field__control-wrapper');
649
+ if (wrapper) {
650
+ delete wrapper.dataset['connectedSide'];
651
+ }
652
+ }
653
+ }
654
+ toggleOption(option) {
655
+ if (option.isEffectivelyDisabled())
656
+ return;
657
+ const value = this.internalValue();
658
+ const optValue = option.value();
659
+ const comp = this.compareWith();
660
+ const idx = value.findIndex((v) => comp(v, optValue));
661
+ let newValue;
662
+ if (idx >= 0) {
663
+ newValue = [...value.slice(0, idx), ...value.slice(idx + 1)];
664
+ }
665
+ else {
666
+ newValue = [...value, optValue];
667
+ }
668
+ this.internalValue.set(newValue);
669
+ this.onChange(newValue);
670
+ this.valueChange.emit(newValue);
671
+ this.selectionChange.emit(option);
672
+ this.setOptionsSelectedState();
673
+ if (this.searchable() && this.panelOpen()) {
674
+ requestAnimationFrame(() => {
675
+ // SECURITY_EXCEPTION: nativeElement.focus() required to restore focus to search input after selection. ElementRef SSR-safe.
676
+ this.searchInputRef?.nativeElement.focus();
677
+ });
678
+ }
679
+ }
680
+ clearValue() {
681
+ this.internalValue.set([]);
682
+ this.onChange([]);
683
+ this.valueChange.emit([]);
684
+ this.selectionChange.emit(undefined);
685
+ this.cleared.emit();
686
+ this.setOptionsSelectedState();
687
+ this.markAsTouched();
688
+ }
689
+ handleSelectAll() {
690
+ if (this.isEffectivelyReadonly() || this.isEffectivelyDisabled())
691
+ return;
692
+ const selectable = this.selectableOptions();
693
+ if (selectable.length === 0)
694
+ return;
695
+ const value = this.internalValue();
696
+ const comp = this.compareWith();
697
+ if (this.isAllSelected()) {
698
+ const selectableValues = new Set(selectable.map((o) => o.value()));
699
+ const newValue = value.filter((v) => {
700
+ for (const sv of selectableValues) {
701
+ if (comp(v, sv))
702
+ return false;
703
+ }
704
+ return true;
705
+ });
706
+ this.internalValue.set(newValue);
707
+ this.onChange(newValue);
708
+ this.valueChange.emit(newValue);
709
+ }
710
+ else {
711
+ const existingValues = new Set(value);
712
+ const newValues = [...value];
713
+ selectable.forEach((opt) => {
714
+ const ov = opt.value();
715
+ let found = false;
716
+ for (const ev of existingValues) {
717
+ if (comp(ev, ov)) {
718
+ found = true;
719
+ break;
720
+ }
721
+ }
722
+ if (!found) {
723
+ newValues.push(ov);
724
+ }
725
+ });
726
+ this.internalValue.set(newValues);
727
+ this.onChange(newValues);
728
+ this.valueChange.emit(newValues);
729
+ }
730
+ this.setOptionsSelectedState();
731
+ }
732
+ removeChip(option, event) {
733
+ event.stopPropagation();
734
+ this.toggleOption(option);
735
+ }
736
+ onTriggerKeydown(event) {
737
+ if (!this.canOpen()) {
738
+ event.preventDefault();
739
+ return;
740
+ }
741
+ if (this.maybeClosePanel(event))
742
+ return;
743
+ if (this.maybeNavigateToBound(event))
744
+ return;
745
+ switch (event.key) {
746
+ case 'Enter':
747
+ case ' ':
748
+ event.preventDefault();
749
+ this.handleToggleOpen();
750
+ break;
751
+ case 'ArrowDown':
752
+ event.preventDefault();
753
+ this.handleArrow(1);
754
+ break;
755
+ case 'ArrowUp':
756
+ event.preventDefault();
757
+ this.handleArrow(-1);
758
+ break;
759
+ }
760
+ }
761
+ handleToggleOpen() {
762
+ if (this.panelOpen()) {
763
+ this.selectActiveOption();
764
+ }
765
+ else {
766
+ this.popoverTrigger?.open();
767
+ }
768
+ }
769
+ handleArrow(direction) {
770
+ if (this.panelOpen()) {
771
+ this.focusNextOption(direction);
772
+ }
773
+ else {
774
+ this.popoverTrigger?.open();
775
+ requestAnimationFrame(() => this.focusNextOption(direction));
776
+ }
777
+ }
778
+ maybeClosePanel(event) {
779
+ if (!this.panelOpen())
780
+ return false;
781
+ if (event.key === 'Escape') {
782
+ event.preventDefault();
783
+ this.popoverTrigger?.close();
784
+ return true;
785
+ }
786
+ if (event.key === 'Tab') {
787
+ this.popoverTrigger?.close();
788
+ return true;
789
+ }
790
+ return false;
791
+ }
792
+ maybeNavigateToBound(event) {
793
+ if (!this.panelOpen())
794
+ return false;
795
+ if (event.key === 'Home') {
796
+ event.preventDefault();
797
+ this.activeOptionIndex.set(this.getFirstEnabledOptionIndex());
798
+ this.syncActiveStates();
799
+ return true;
800
+ }
801
+ if (event.key === 'End') {
802
+ event.preventDefault();
803
+ this.activeOptionIndex.set(this.getLastEnabledOptionIndex());
804
+ this.syncActiveStates();
805
+ return true;
806
+ }
807
+ return false;
808
+ }
809
+ onSearchInput(event) {
810
+ const target = event.target;
811
+ const value = target.value;
812
+ this.searchQuery.set(value);
813
+ this.searchChange.emit(value);
814
+ this.activeOptionIndex.set(-1);
815
+ this.syncActiveStates();
816
+ this.syncVisibility();
817
+ }
818
+ onSearchKeydown(event) {
819
+ switch (event.key) {
820
+ case 'ArrowDown':
821
+ event.preventDefault();
822
+ event.stopPropagation();
823
+ this.focusNextOption(1);
824
+ break;
825
+ case 'ArrowUp':
826
+ event.preventDefault();
827
+ event.stopPropagation();
828
+ this.focusNextOption(-1);
829
+ break;
830
+ case 'Enter':
831
+ event.preventDefault();
832
+ event.stopPropagation();
833
+ this.selectActiveOption();
834
+ break;
835
+ case 'Escape':
836
+ event.preventDefault();
837
+ event.stopPropagation();
838
+ if (this.searchQuery()) {
839
+ this.searchQuery.set('');
840
+ this.searchChange.emit('');
841
+ this.syncVisibility();
842
+ this.syncActiveStates();
843
+ }
844
+ else {
845
+ this.popoverTrigger?.close();
846
+ }
847
+ break;
848
+ case 'Tab':
849
+ this.popoverTrigger?.close();
850
+ break;
851
+ case 'Backspace':
852
+ if (!this.searchQuery() &&
853
+ !this.isEffectivelyDisabled() &&
854
+ !this.isEffectivelyReadonly()) {
855
+ event.preventDefault();
856
+ const selected = this.selectedOptions();
857
+ if (selected.length > 0) {
858
+ this.toggleOption(selected[selected.length - 1]);
859
+ }
860
+ }
861
+ break;
862
+ }
863
+ }
864
+ onPanelClick(event) {
865
+ event.stopPropagation();
866
+ }
867
+ onPanelKeydown(event) {
868
+ event.stopPropagation();
869
+ switch (event.key) {
870
+ case 'ArrowDown':
871
+ event.preventDefault();
872
+ this.focusNextOption(1);
873
+ break;
874
+ case 'ArrowUp':
875
+ event.preventDefault();
876
+ this.focusNextOption(-1);
877
+ break;
878
+ case 'Enter':
879
+ case ' ':
880
+ event.preventDefault();
881
+ this.selectActiveOption();
882
+ break;
883
+ case 'Escape':
884
+ event.preventDefault();
885
+ this.popoverTrigger?.close();
886
+ break;
887
+ case 'Home':
888
+ event.preventDefault();
889
+ this.activeOptionIndex.set(this.getFirstEnabledOptionIndex());
890
+ break;
891
+ case 'End':
892
+ event.preventDefault();
893
+ this.activeOptionIndex.set(this.getLastEnabledOptionIndex());
894
+ break;
895
+ }
896
+ }
897
+ onTriggerFocus() {
898
+ this.internalFocused.set(true);
899
+ }
900
+ onTriggerBlur() {
901
+ this.internalFocused.set(false);
902
+ }
903
+ subscribeToOptionInteractions() {
904
+ this.optionInteractionSubscriptions.forEach((fn) => fn());
905
+ this.optionInteractionSubscriptions = [];
906
+ this.options.forEach((opt) => {
907
+ const sub = opt.optionInteraction.subscribe(({ option }) => {
908
+ this.toggleOption(option);
909
+ });
910
+ this.optionInteractionSubscriptions.push(() => sub.unsubscribe());
911
+ });
912
+ }
913
+ setOptionsMultiSelectMode() {
914
+ this.options.forEach((opt) => {
915
+ opt.setSelectionMode('multiple');
916
+ opt.setShowSelectionIndicator(true);
917
+ });
918
+ }
919
+ setOptionsSelectedState() {
920
+ const value = this.internalValue();
921
+ const comp = this.compareWith();
922
+ this.options.forEach((opt) => {
923
+ const isSelected = value.some((v) => comp(opt.value(), v));
924
+ opt.setSelected(isSelected);
925
+ });
926
+ }
927
+ setOptionGroupDisabledState() {
928
+ this.optionGroups.forEach((group) => {
929
+ group.options.forEach((opt) => {
930
+ opt.setGroupDisabledState(group.isEffectivelyDisabled());
931
+ });
932
+ });
933
+ }
934
+ syncActiveStates() {
935
+ const idx = this.activeOptionIndex();
936
+ const opts = this.visibleOptions();
937
+ this.options.forEach((opt) => opt.setActive(false));
938
+ if (idx >= 0 && idx < opts.length) {
939
+ opts[idx].setActive(true);
940
+ }
941
+ }
942
+ syncVisibility() {
943
+ const query = this.searchQuery().trim();
944
+ if (!query) {
945
+ this.options.forEach((o) => o.setHidden(false));
946
+ this.optionGroups.forEach((g) => g.setHidden(false));
947
+ return;
948
+ }
949
+ const visible = new Set(this.visibleOptions());
950
+ this.options.forEach((o) => o.setHidden(!visible.has(o)));
951
+ this.optionGroups.forEach((g) => {
952
+ const anyVisible = g.options.some((o) => visible.has(o));
953
+ g.setHidden(!anyVisible);
954
+ });
955
+ }
956
+ getOptionDisplayLabel(option) {
957
+ const dw = this.displayWith();
958
+ if (dw) {
959
+ const result = dw(option.value());
960
+ if (result !== undefined)
961
+ return result;
962
+ }
963
+ const label = option.labelText();
964
+ if (label)
965
+ return label;
966
+ const native = this.getOptionNativeText(option);
967
+ if (native)
968
+ return native;
969
+ return '';
970
+ }
971
+ getOptionNativeText(option) {
972
+ const nativeEl = option.elementRef;
973
+ // SECURITY_EXCEPTION: nativeElement access needed to read option text for search filtering. Read-only, SSR-safe.
974
+ if (nativeEl?.nativeElement) {
975
+ // SECURITY_EXCEPTION: nativeElement.textContent needed to read option text for search filtering. Read-only, SSR-safe.
976
+ return nativeEl.nativeElement.textContent?.trim() || '';
977
+ }
978
+ return '';
979
+ }
980
+ optionMatchesSearch(option, query) {
981
+ const label = (option.labelText() || '').toLowerCase();
982
+ const desc = (option.descriptionText() || '').toLowerCase();
983
+ const native = this.getOptionNativeText(option).toLowerCase();
984
+ const normalizedQuery = query
985
+ .normalize('NFD')
986
+ .replace(/[\u0300-\u036f]/g, '');
987
+ const normalizedLabel = label
988
+ .normalize('NFD')
989
+ .replace(/[\u0300-\u036f]/g, '');
990
+ const normalizedDesc = desc
991
+ .normalize('NFD')
992
+ .replace(/[\u0300-\u036f]/g, '');
993
+ const normalizedNative = native
994
+ .normalize('NFD')
995
+ .replace(/[\u0300-\u036f]/g, '');
996
+ return (normalizedLabel.includes(normalizedQuery) ||
997
+ normalizedDesc.includes(normalizedQuery) ||
998
+ normalizedNative.includes(normalizedQuery));
999
+ }
1000
+ markAsTouched() {
1001
+ if (!this.touched()) {
1002
+ this.touched.set(true);
1003
+ this.onTouched();
1004
+ }
1005
+ }
1006
+ selectActiveOption() {
1007
+ const idx = this.activeOptionIndex();
1008
+ const opts = this.visibleOptions();
1009
+ if (idx >= 0 && idx < opts.length) {
1010
+ this.toggleOption(opts[idx]);
1011
+ }
1012
+ }
1013
+ focusNextOption(direction) {
1014
+ const opts = this.visibleOptions();
1015
+ if (opts.length === 0)
1016
+ return;
1017
+ let current = this.activeOptionIndex();
1018
+ if (current < 0 || current >= opts.length) {
1019
+ current = direction === 1 ? -1 : opts.length;
1020
+ }
1021
+ let next = current + direction;
1022
+ while (next >= 0 && next < opts.length) {
1023
+ if (!opts[next].isEffectivelyDisabled()) {
1024
+ this.activeOptionIndex.set(next);
1025
+ this.syncActiveStates();
1026
+ return;
1027
+ }
1028
+ next += direction;
1029
+ }
1030
+ if (direction === 1 && next >= opts.length) {
1031
+ this.activeOptionIndex.set(this.getFirstEnabledOptionIndex());
1032
+ this.syncActiveStates();
1033
+ }
1034
+ else if (direction === -1 && next < 0) {
1035
+ this.activeOptionIndex.set(this.getLastEnabledOptionIndex());
1036
+ this.syncActiveStates();
1037
+ }
1038
+ }
1039
+ getFirstEnabledOptionIndex() {
1040
+ const opts = this.visibleOptions();
1041
+ for (let i = 0; i < opts.length; i++) {
1042
+ if (!opts[i].isEffectivelyDisabled())
1043
+ return i;
1044
+ }
1045
+ return -1;
1046
+ }
1047
+ getLastEnabledOptionIndex() {
1048
+ const opts = this.visibleOptions();
1049
+ for (let i = opts.length - 1; i >= 0; i--) {
1050
+ if (!opts[i].isEffectivelyDisabled())
1051
+ return i;
1052
+ }
1053
+ return -1;
1054
+ }
1055
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisMultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1056
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisMultiSelectComponent, isStandalone: true, selector: "solaris-multi-select", inputs: { hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hintKey: { classPropertyName: "hintKey", publicName: "hintKey", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, errorKey: { classPropertyName: "errorKey", publicName: "errorKey", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, emptyTextKey: { classPropertyName: "emptyTextKey", publicName: "emptyTextKey", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelKey: { classPropertyName: "ariaLabelKey", publicName: "ariaLabelKey", isSignal: true, isRequired: false, transformFunction: null }, placeholderKey: { classPropertyName: "placeholderKey", publicName: "placeholderKey", isSignal: true, isRequired: false, transformFunction: null }, loadingTextKey: { classPropertyName: "loadingTextKey", publicName: "loadingTextKey", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: true, isRequired: false, transformFunction: null }, clearLabelKey: { classPropertyName: "clearLabelKey", publicName: "clearLabelKey", isSignal: true, isRequired: false, transformFunction: null }, removeChipLabel: { classPropertyName: "removeChipLabel", publicName: "removeChipLabel", isSignal: true, isRequired: false, transformFunction: null }, removeChipLabelKey: { classPropertyName: "removeChipLabelKey", publicName: "removeChipLabelKey", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, noResultsTextKey: { classPropertyName: "noResultsTextKey", publicName: "noResultsTextKey", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholderKey: { classPropertyName: "searchPlaceholderKey", publicName: "searchPlaceholderKey", isSignal: true, isRequired: false, transformFunction: null }, panelMinWidth: { classPropertyName: "panelMinWidth", publicName: "panelMinWidth", isSignal: true, isRequired: false, transformFunction: null }, panelMaxWidth: { classPropertyName: "panelMaxWidth", publicName: "panelMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, panelMatchTriggerWidth: { classPropertyName: "panelMatchTriggerWidth", publicName: "panelMatchTriggerWidth", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, requiredInput: { classPropertyName: "requiredInput", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, panelMaxHeight: { classPropertyName: "panelMaxHeight", publicName: "panelMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, manualInvalid: { classPropertyName: "manualInvalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, selectAll: { classPropertyName: "selectAll", publicName: "selectAll", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabelKey: { classPropertyName: "selectAllLabelKey", publicName: "selectAllLabelKey", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleChips: { classPropertyName: "maxVisibleChips", publicName: "maxVisibleChips", isSignal: true, isRequired: false, transformFunction: null }, selectedCountLabel: { classPropertyName: "selectedCountLabel", publicName: "selectedCountLabel", isSignal: true, isRequired: false, transformFunction: null }, selectedCountLabelKey: { classPropertyName: "selectedCountLabelKey", publicName: "selectedCountLabelKey", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, overflowLabelKey: { classPropertyName: "overflowLabelKey", publicName: "overflowLabelKey", isSignal: true, isRequired: false, transformFunction: null }, minSelected: { classPropertyName: "minSelected", publicName: "minSelected", isSignal: true, isRequired: false, transformFunction: null }, maxSelected: { classPropertyName: "maxSelected", publicName: "maxSelected", isSignal: true, isRequired: false, transformFunction: null }, showSelectionTooltip: { classPropertyName: "showSelectionTooltip", publicName: "showSelectionTooltip", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", cleared: "cleared", openChange: "openChange", searchChange: "searchChange", valueChange: "valueChange", selectionChange: "selectionChange" }, host: { attributes: { "solaris-multi-select": "" }, properties: { "attr.id": "elementId()", "attr.data-size": "size()", "attr.data-open": "panelOpen() ? \"\" : null", "attr.aria-label": "ariaLabelText() ?? null", "attr.data-has-value": "hasValue() ? \"\" : null" } }, providers: [
1057
+ {
1058
+ provide: NG_VALUE_ACCESSOR,
1059
+ useExisting: forwardRef(() => SolarisMultiSelectComponent),
1060
+ multi: true,
1061
+ },
1062
+ {
1063
+ provide: SolarisFormControl,
1064
+ useExisting: forwardRef(() => SolarisMultiSelectComponent),
1065
+ },
1066
+ ], queries: [{ propertyName: "options", predicate: SolarisOptionComponent, descendants: true }, { propertyName: "optionGroups", predicate: SolarisOptionGroupComponent, descendants: true }], viewQueries: [{ propertyName: "popoverTrigger", first: true, predicate: SolarisPopoverTriggerDirective, descendants: true }, { propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true, read: ElementRef }, { propertyName: "triggerElement", first: true, predicate: ["triggerEl"], descendants: true, read: ElementRef }, { propertyName: "formFieldElement", first: true, predicate: ["formFieldRef"], descendants: true, read: ElementRef }, { propertyName: "triggerContentRef", first: true, predicate: ["triggerContent"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<solaris-form-field\r\n #formFieldRef\r\n [control]=\"this\"\r\n [label]=\"labelText()\"\r\n [hint]=\"hintText()\"\r\n [error]=\"errorText()\"\r\n [appearance]=\"appearance()\"\r\n [size]=\"size()\"\r\n [density]=\"effectiveDensity()\"\r\n [radius]=\"radius()\"\r\n [invalid]=\"isEffectivelyInvalid()\"\r\n [required]=\"requiredInput()\"\r\n solaris-popover-trigger\r\n [solarisPopoverDisabled]=\"!canOpen()\"\r\n [solarisPopoverTriggerFor]=\"matchWidthPopover\"\r\n [class.solaris-multi-select--panel-open]=\"panelOpen()\"\r\n [solarisPopoverMatchTriggerWidth]=\"panelMatchTriggerWidth()\"\r\n [solarisPopoverAppearance]=\"popoverAppearance()\"\r\n [solarisPopoverPlacement]=\"'bottom'\"\r\n [solarisPopoverAlign]=\"'start'\"\r\n [solarisPopoverOffset]=\"0\"\r\n [solarisPopoverPadding]=\"'none'\"\r\n [solarisPopoverRadius]=\"radius()\"\r\n [solarisPopoverTopConnected]=\"true\"\r\n [solarisPopoverMinWidth]=\"panelMinWidth()\"\r\n [solarisPopoverMaxWidth]=\"panelMaxWidth()\"\r\n [solarisPopoverScrollStrategy]=\"'reposition'\"\r\n [solarisPopoverCloseOnEscape]=\"false\"\r\n [solarisPopoverAriaHasPopup]=\"'listbox'\"\r\n>\r\n @if (icon(); as iconName) {\r\n <solaris-icon solaris-form-prefix [name]=\"iconName\" [decorative]=\"true\" />\r\n }\r\n <ng-content select=\"[solaris-form-prefix]\" />\r\n\r\n <div\r\n #triggerEl\r\n class=\"solaris-multi-select__trigger\"\r\n [id]=\"elementId() + '--trigger'\"\r\n solaris-form-field-trigger\r\n role=\"combobox\"\r\n tabindex=\"0\"\r\n [attr.aria-expanded]=\"panelOpen() ? 'true' : 'false'\"\r\n [attr.aria-controls]=\"panelOpen() ? panelId : null\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-activedescendant]=\"activeDescendantId()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n (focus)=\"onTriggerFocus()\"\r\n (blur)=\"onTriggerBlur()\"\r\n >\r\n <div class=\"solaris-multi-select__trigger-content\" #triggerContent>\r\n @if (displayMode() === 'auto') {\r\n @if (hasValue()) {\r\n @if (showCountOnly()) {\r\n <span\r\n class=\"solaris-multi-select__chip\"\r\n [solarisTooltip]=\"countTooltipText()\"\r\n [solarisTooltipTrigger]=\"'hover'\"\r\n tabindex=\"0\"\r\n >\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n summaryText()\r\n }}</span>\r\n </span>\r\n } @else {\r\n <div\r\n class=\"solaris-multi-select__chips solaris-multi-select__chips--auto\"\r\n >\r\n @for (opt of autoVisibleChips(); track opt) {\r\n <span class=\"solaris-multi-select__chip\" role=\"listitem\">\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n getOptionDisplayLabel(opt)\r\n }}</span>\r\n @if (!isEffectivelyDisabled() && !isEffectivelyReadonly()) {\r\n <button\r\n type=\"button\"\r\n class=\"solaris-multi-select__chip-remove\"\r\n [attr.aria-label]=\"removeChipAriaLabel()\"\r\n (click)=\"removeChip(opt, $event)\"\r\n tabindex=\"-1\"\r\n >\r\n <solaris-icon name=\"x\" [decorative]=\"true\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n @if (autoShowOverflow()) {\r\n <span\r\n class=\"solaris-multi-select__chip-overflow\"\r\n [solarisTooltip]=\"autoOverflowTooltipText()\"\r\n [solarisTooltipTrigger]=\"'hover'\"\r\n tabindex=\"0\"\r\n [attr.aria-label]=\"\r\n '+ ' +\r\n autoOverflowCount() +\r\n ' ' +\r\n selectedLabels().join(', ')\r\n \"\r\n >+{{ autoOverflowCount() }}</span\r\n >\r\n }\r\n </div>\r\n }\r\n }\r\n @if (searchable() && panelOpen()) {\r\n <input\r\n #searchInput\r\n type=\"text\"\r\n class=\"solaris-multi-select__search-input\"\r\n [attr.placeholder]=\"searchPlaceholderText()\"\r\n [value]=\"searchQuery()\"\r\n (input)=\"onSearchInput($event)\"\r\n (keydown)=\"onSearchKeydown($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n />\r\n }\r\n @if (!hasValue() && !(searchable() && panelOpen())) {\r\n <span class=\"solaris-multi-select__value\">\r\n <span class=\"solaris-multi-select__placeholder\">{{\r\n placeholderText()\r\n }}</span>\r\n </span>\r\n }\r\n } @else {\r\n @if (searchable() && panelOpen()) {\r\n <input\r\n #searchInput\r\n type=\"text\"\r\n class=\"solaris-multi-select__search-input\"\r\n [attr.placeholder]=\"searchPlaceholderText()\"\r\n [value]=\"searchQuery()\"\r\n (input)=\"onSearchInput($event)\"\r\n (keydown)=\"onSearchKeydown($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n />\r\n } @else {\r\n @if (hasValue()) {\r\n @if (displayMode() === 'chips') {\r\n <div class=\"solaris-multi-select__chips\">\r\n @for (\r\n opt of selectedOptions().slice(0, maxVisibleChips());\r\n track opt\r\n ) {\r\n <span class=\"solaris-multi-select__chip\" role=\"listitem\">\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n getOptionDisplayLabel(opt)\r\n }}</span>\r\n @if (!isEffectivelyDisabled() && !isEffectivelyReadonly()) {\r\n <button\r\n type=\"button\"\r\n class=\"solaris-multi-select__chip-remove\"\r\n [attr.aria-label]=\"removeChipAriaLabel()\"\r\n (click)=\"removeChip(opt, $event)\"\r\n tabindex=\"-1\"\r\n >\r\n <solaris-icon name=\"x\" [decorative]=\"true\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n @if (overflowCount() > 0) {\r\n <span\r\n class=\"solaris-multi-select__chip-overflow\"\r\n [attr.aria-label]=\"\r\n '+ ' + overflowCount() + ' ' + selectedLabels().join(', ')\r\n \"\r\n >\r\n {{ overflowText() }}\r\n </span>\r\n }\r\n </div>\r\n } @else if (displayMode() === 'comma') {\r\n <span class=\"solaris-multi-select__value\">\r\n <span class=\"solaris-multi-select__value-text\">{{\r\n commaText()\r\n }}</span>\r\n </span>\r\n } @else {\r\n <span\r\n class=\"solaris-multi-select__chip\"\r\n [solarisTooltip]=\"countTooltipText()\"\r\n [solarisTooltipTrigger]=\"'hover'\"\r\n tabindex=\"0\"\r\n >\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n summaryText()\r\n }}</span>\r\n </span>\r\n }\r\n } @else {\r\n <span class=\"solaris-multi-select__value\">\r\n <span class=\"solaris-multi-select__placeholder\">{{\r\n placeholderText()\r\n }}</span>\r\n </span>\r\n }\r\n }\r\n }\r\n </div>\r\n\r\n <span class=\"solaris-multi-select__actions\">\r\n @if (canClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"solaris-multi-select__clear\"\r\n [attr.aria-label]=\"clearAriaLabel()\"\r\n (click)=\"clearValue(); $event.stopPropagation()\"\r\n tabindex=\"-1\"\r\n >\r\n <solaris-icon name=\"x\" [decorative]=\"true\" />\r\n </button>\r\n }\r\n\r\n <solaris-icon\r\n class=\"solaris-multi-select__dropdown-icon\"\r\n name=\"chevron-down\"\r\n [decorative]=\"true\"\r\n size=\"sm\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <ng-content select=\"[solaris-form-suffix]\" />\r\n</solaris-form-field>\r\n\r\n<ng-template #matchWidthPopover=\"solarisPopover\" solaris-popover>\r\n <div\r\n class=\"solaris-multi-select__panel\"\r\n role=\"listbox\"\r\n [attr.aria-multiselectable]=\"'true'\"\r\n [attr.id]=\"panelId\"\r\n tabindex=\"-1\"\r\n (click)=\"onPanelClick($event)\"\r\n (keydown)=\"onPanelKeydown($event)\"\r\n >\r\n @if (selectAll() && !loading()) {\r\n <div\r\n class=\"solaris-multi-select__select-all\"\r\n role=\"option\"\r\n aria-selected=\"false\"\r\n tabindex=\"-1\"\r\n (click)=\"handleSelectAll()\"\r\n (keydown.enter)=\"handleSelectAll()\"\r\n (keydown.space)=\"handleSelectAll(); $event.preventDefault()\"\r\n [class.solaris-multi-select__select-all--readonly]=\"\r\n isEffectivelyReadonly()\r\n \"\r\n >\r\n <span\r\n class=\"solaris-multi-select__select-all-checkbox\"\r\n [class.solaris-multi-select__select-all-checkbox--checked]=\"\r\n isAllSelected()\r\n \"\r\n [class.solaris-multi-select__select-all-checkbox--partial]=\"\r\n isPartialSelected()\r\n \"\r\n >\r\n @if (isAllSelected()) {\r\n <span class=\"solaris-multi-select__select-all-checkbox-icon\">\r\n <solaris-icon name=\"check\" [decorative]=\"true\" />\r\n </span>\r\n } @else if (isPartialSelected()) {\r\n <span class=\"solaris-multi-select__select-all-checkbox-icon\">\r\n <solaris-icon name=\"minus\" [decorative]=\"true\" />\r\n </span>\r\n }\r\n </span>\r\n <span class=\"solaris-multi-select__select-all-label\">{{\r\n selectAllLabelText()\r\n }}</span>\r\n </div>\r\n }\r\n\r\n @if (loading()) {\r\n <div class=\"solaris-multi-select__loading\">\r\n <span class=\"solaris-multi-select__loading-text\">{{\r\n loadingTextValue()\r\n }}</span>\r\n </div>\r\n } @else if (showNoResults()) {\r\n <div class=\"solaris-multi-select__no-results\">\r\n <span class=\"solaris-multi-select__no-results-text\">{{\r\n noResultsTextValue()\r\n }}</span>\r\n </div>\r\n } @else if (showEmpty()) {\r\n <div class=\"solaris-multi-select__empty\">\r\n <span class=\"solaris-multi-select__empty-text\">{{\r\n emptyTextValue()\r\n }}</span>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"solaris-multi-select__options\"\r\n [style.max-height]=\"panelMaxHeight()\"\r\n >\r\n <ng-content select=\"solaris-option, solaris-option-group\" />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":host{--solaris-multi-select-chip-gap: var(--solaris-spacing-1);--solaris-multi-select-chip-radius: var(--solaris-radius-sm);--solaris-multi-select-icon-color: var(--solaris-text-muted);--solaris-multi-select-font-size: var(--solaris-font-size-md);--solaris-multi-select-chip-color: var(--solaris-text-default);--solaris-multi-select-value-color: var(--solaris-text-default);--solaris-multi-select-chip-padding-y: var(--solaris-spacing-1);--solaris-multi-select-chip-padding-x: var(--solaris-spacing-2);--solaris-multi-select-line-height: var(--solaris-line-height-md);--solaris-multi-select-chip-font-size: var(--solaris-font-size-sm);--solaris-multi-select-select-all-height: var(--solaris-spacing-9);--solaris-multi-select-placeholder-color: var(--solaris-text-muted);--solaris-multi-select-chip-remove-size: var(--solaris-font-size-md);--solaris-multi-select-chip-background: var(--solaris-surface-subtle);outline:none;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;flex-direction:column;box-sizing:border-box;font-family:var(--solaris-font-family-sans, system-ui)}.solaris-multi-select__trigger{flex:1;min-width:0;display:flex;align-items:center;box-sizing:border-box;gap:var(--solaris-spacing-2);padding:0;outline:none;border:none;background:transparent;cursor:pointer}:host ::ng-deep .solaris-form-field__message-row{margin-top:0}:host ::ng-deep .solaris-multi-select--panel-open .solaris-form-field__message-row{display:none}.solaris-multi-select__trigger-content{flex:1;min-width:0;display:flex;overflow:hidden;align-items:center;gap:var(--solaris-spacing-2)}.solaris-multi-select__value{flex:none;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.solaris-multi-select__value-text{color:var(--solaris-multi-select-value-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__placeholder{font-size:var(--solaris-multi-select-font-size);color:var(--solaris-multi-select-placeholder-color);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__chips{flex:1;min-width:0;display:flex;flex-wrap:wrap;overflow:hidden;align-items:center;gap:var(--solaris-multi-select-chip-gap)}.solaris-multi-select__chips--auto{flex:none;flex-wrap:nowrap}.solaris-multi-select__chips--auto .solaris-multi-select__chip{flex-shrink:0}.solaris-multi-select__chip{align-items:center;white-space:nowrap;display:inline-flex;gap:var(--solaris-spacing-1);line-height:var(--solaris-line-height-sm);color:var(--solaris-multi-select-chip-color);font-size:var(--solaris-multi-select-chip-font-size);border-radius:var(--solaris-multi-select-chip-radius);background:var(--solaris-multi-select-chip-background);border:var(--solaris-border-width-sm) solid var(--solaris-border-default);padding:var(--solaris-multi-select-chip-padding-y) var(--solaris-multi-select-chip-padding-x)}.solaris-multi-select__chip-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.solaris-multi-select__chip-remove{padding:0;border:none;display:flex;cursor:pointer;border-radius:50%;align-items:center;justify-content:center;background:transparent;color:var(--solaris-multi-select-icon-color);width:var(--solaris-multi-select-chip-remove-size);height:var(--solaris-multi-select-chip-remove-size);transition:background var(--solaris-motion-duration-normal) ease;flex-shrink:0}.solaris-multi-select__chip-remove solaris-icon{width:var(--solaris-multi-select-chip-remove-size);height:var(--solaris-multi-select-chip-remove-size)}.solaris-multi-select__chip-remove:hover{background:var(--solaris-surface-hover)}.solaris-multi-select__chip-overflow{flex-shrink:0;white-space:nowrap;color:var(--solaris-multi-select-icon-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__actions{display:flex;flex-shrink:0;align-items:center;gap:var(--solaris-spacing-2)}.solaris-multi-select__clear{padding:0;border:none;display:flex;cursor:pointer;border-radius:50%;align-items:center;justify-content:center;background:transparent;width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl);color:var(--solaris-multi-select-icon-color);transition:color var(--solaris-motion-duration-normal) ease}.solaris-multi-select__clear solaris-icon{width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl)}.solaris-multi-select__clear:hover{color:var(--solaris-text-default)}.solaris-multi-select__dropdown-icon{width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl);color:var(--solaris-multi-select-icon-color);transition:transform var(--solaris-motion-duration-normal) ease}.solaris-multi-select__dropdown-icon solaris-icon{width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl)}:host([data-open]) .solaris-multi-select__dropdown-icon{transform:rotate(180deg)}.solaris-multi-select__panel{display:flex;overflow-y:auto;flex-direction:column;overscroll-behavior:contain}.solaris-multi-select__search-input{flex:1;margin:0;padding:0;min-width:0;border:none;outline:none;font-family:inherit;box-sizing:border-box;background:transparent;color:var(--solaris-multi-select-value-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__search-input::placeholder{color:var(--solaris-multi-select-placeholder-color)}.solaris-multi-select__loading,.solaris-multi-select__no-results,.solaris-multi-select__empty{display:flex;align-items:center;justify-content:center;color:var(--solaris-text-muted);padding:var(--solaris-spacing-4);font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md)}.solaris-multi-select__options{display:flex;flex-direction:column;gap:var(--solaris-spacing-1);padding:var(--solaris-spacing-1) var(--solaris-spacing-2)}.solaris-multi-select__select-all{display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:var(--solaris-spacing-2);min-height:var(--solaris-multi-select-select-all-height);padding:var(--solaris-spacing-2) var(--solaris-spacing-3);transition:background var(--solaris-motion-duration-normal) ease}.solaris-multi-select__select-all:hover{background:var(--solaris-surface-hover)}.solaris-multi-select__select-all-checkbox{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--solaris-font-size-lg);height:var(--solaris-font-size-lg);border-radius:var(--solaris-radius-sm);background:var(--solaris-surface-base);border:var(--solaris-border-width-sm) solid var(--solaris-border-default)}.solaris-multi-select__select-all-checkbox--checked{background:var(--solaris-primary-base);border-color:var(--solaris-primary-base)}.solaris-multi-select__select-all-checkbox--partial{background:var(--solaris-primary-muted);border-color:var(--solaris-primary-base)}.solaris-multi-select__select-all-checkbox-icon{display:flex;align-items:center;justify-content:center;color:var(--solaris-on-primary);width:var(--solaris-font-size-sm);height:var(--solaris-font-size-sm)}.solaris-multi-select__select-all-label{color:var(--solaris-multi-select-value-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__select-all--readonly{cursor:default;opacity:.5}:host([data-disabled]){cursor:not-allowed}:host([data-readonly]){cursor:default}@media(prefers-reduced-motion:reduce){.solaris-multi-select__dropdown-icon,.solaris-multi-select__clear{transition:none}}[data-reduced-motion=true] .solaris-multi-select__dropdown-icon,[data-reduced-motion=true] .solaris-multi-select__clear{transition:none}\n"], dependencies: [{ kind: "component", type: SolarisFormFieldComponent, selector: "solaris-form-field", inputs: ["hintKey", "labelKey", "hint", "errorKey", "label", "error", "optionalLabel", "requiredLabel", "optionalLabelKey", "requiredLabelKey", "required", "optional", "invalid", "disabled", "readonly", "density", "size", "radius", "appearance", "control"] }, { kind: "directive", type: SolarisFormFieldTriggerDirective, selector: "[solaris-form-field-trigger]" }, { kind: "directive", type: SolarisFormPrefixDirective, selector: "[solaris-form-prefix]" }, { kind: "component", type: SolarisIconComponent, selector: "solaris-icon", inputs: ["name", "ariaLabel", "decorative"] }, { kind: "directive", type: SolarisPopoverDirective, selector: "ng-template[solaris-popover]", exportAs: ["solarisPopover"] }, { kind: "directive", type: SolarisPopoverTriggerDirective, selector: "[solaris-popover-trigger]", inputs: ["solarisPopoverTriggerFor", "solarisPopoverOpen", "solarisPopoverDisabled", "solarisPopoverPlacement", "solarisPopoverAlign", "solarisPopoverOffset", "solarisPopoverMatchTriggerWidth", "solarisPopoverMinWidth", "solarisPopoverMaxWidth", "solarisPopoverCloseOnOutsideClick", "solarisPopoverCloseOnEscape", "solarisPopoverRestoreFocus", "solarisPopoverAutoFocus", "solarisPopoverScrollStrategy", "solarisPopoverPanelRole", "solarisPopoverAriaHasPopup", "solarisPopoverAppearance", "solarisPopoverPadding", "solarisPopoverRadius", "solarisPopoverTopConnected"], outputs: ["solarisPopoverOpened", "solarisPopoverClosed", "solarisPopoverOpenChange"] }, { kind: "directive", type: SolarisTooltipDirective, selector: "[solaris-tooltip], [solarisTooltip], [solarisTooltipFor]", inputs: ["solarisTooltip", "solarisTooltipKey", "solarisTooltipFor", "solarisTooltipTitle", "solarisTooltipTitleKey", "solarisTooltipIcon", "solarisTooltipIconDecorative", "solarisTooltipTrigger", "solarisTooltipPlacement", "solarisTooltipOffset", "solarisTooltipDisabled", "solarisTooltipCloseable", "solarisTooltipCloseLabel", "solarisTooltipCloseLabelKey", "solarisTooltipShowDelay", "solarisTooltipHideDelay", "solarisTooltipAppearance", "solarisTooltipSize", "solarisTooltipRadius", "solarisTooltipMaxWidth", "solarisTooltipArrow", "solarisTooltipOpen"], outputs: ["solarisTooltipOpened", "solarisTooltipClosed", "solarisTooltipOpenChange"], exportAs: ["solarisTooltip"] }] });
1067
+ }
1068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisMultiSelectComponent, decorators: [{
1069
+ type: Component,
1070
+ args: [{ selector: 'solaris-multi-select', standalone: true, imports: [
1071
+ SolarisFormFieldComponent,
1072
+ SolarisFormFieldTriggerDirective,
1073
+ SolarisFormPrefixDirective,
1074
+ SolarisFormSuffixDirective,
1075
+ SolarisIconComponent,
1076
+ SolarisPopoverDirective,
1077
+ SolarisPopoverTriggerDirective,
1078
+ SolarisTooltipDirective,
1079
+ ], providers: [
1080
+ {
1081
+ provide: NG_VALUE_ACCESSOR,
1082
+ useExisting: forwardRef(() => SolarisMultiSelectComponent),
1083
+ multi: true,
1084
+ },
1085
+ {
1086
+ provide: SolarisFormControl,
1087
+ useExisting: forwardRef(() => SolarisMultiSelectComponent),
1088
+ },
1089
+ ], host: {
1090
+ 'solaris-multi-select': '',
1091
+ '[attr.id]': 'elementId()',
1092
+ '[attr.data-size]': 'size()',
1093
+ '[attr.data-open]': 'panelOpen() ? "" : null',
1094
+ '[attr.aria-label]': 'ariaLabelText() ?? null',
1095
+ '[attr.data-has-value]': 'hasValue() ? "" : null',
1096
+ }, template: "<solaris-form-field\r\n #formFieldRef\r\n [control]=\"this\"\r\n [label]=\"labelText()\"\r\n [hint]=\"hintText()\"\r\n [error]=\"errorText()\"\r\n [appearance]=\"appearance()\"\r\n [size]=\"size()\"\r\n [density]=\"effectiveDensity()\"\r\n [radius]=\"radius()\"\r\n [invalid]=\"isEffectivelyInvalid()\"\r\n [required]=\"requiredInput()\"\r\n solaris-popover-trigger\r\n [solarisPopoverDisabled]=\"!canOpen()\"\r\n [solarisPopoverTriggerFor]=\"matchWidthPopover\"\r\n [class.solaris-multi-select--panel-open]=\"panelOpen()\"\r\n [solarisPopoverMatchTriggerWidth]=\"panelMatchTriggerWidth()\"\r\n [solarisPopoverAppearance]=\"popoverAppearance()\"\r\n [solarisPopoverPlacement]=\"'bottom'\"\r\n [solarisPopoverAlign]=\"'start'\"\r\n [solarisPopoverOffset]=\"0\"\r\n [solarisPopoverPadding]=\"'none'\"\r\n [solarisPopoverRadius]=\"radius()\"\r\n [solarisPopoverTopConnected]=\"true\"\r\n [solarisPopoverMinWidth]=\"panelMinWidth()\"\r\n [solarisPopoverMaxWidth]=\"panelMaxWidth()\"\r\n [solarisPopoverScrollStrategy]=\"'reposition'\"\r\n [solarisPopoverCloseOnEscape]=\"false\"\r\n [solarisPopoverAriaHasPopup]=\"'listbox'\"\r\n>\r\n @if (icon(); as iconName) {\r\n <solaris-icon solaris-form-prefix [name]=\"iconName\" [decorative]=\"true\" />\r\n }\r\n <ng-content select=\"[solaris-form-prefix]\" />\r\n\r\n <div\r\n #triggerEl\r\n class=\"solaris-multi-select__trigger\"\r\n [id]=\"elementId() + '--trigger'\"\r\n solaris-form-field-trigger\r\n role=\"combobox\"\r\n tabindex=\"0\"\r\n [attr.aria-expanded]=\"panelOpen() ? 'true' : 'false'\"\r\n [attr.aria-controls]=\"panelOpen() ? panelId : null\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-activedescendant]=\"activeDescendantId()\"\r\n (keydown)=\"onTriggerKeydown($event)\"\r\n (focus)=\"onTriggerFocus()\"\r\n (blur)=\"onTriggerBlur()\"\r\n >\r\n <div class=\"solaris-multi-select__trigger-content\" #triggerContent>\r\n @if (displayMode() === 'auto') {\r\n @if (hasValue()) {\r\n @if (showCountOnly()) {\r\n <span\r\n class=\"solaris-multi-select__chip\"\r\n [solarisTooltip]=\"countTooltipText()\"\r\n [solarisTooltipTrigger]=\"'hover'\"\r\n tabindex=\"0\"\r\n >\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n summaryText()\r\n }}</span>\r\n </span>\r\n } @else {\r\n <div\r\n class=\"solaris-multi-select__chips solaris-multi-select__chips--auto\"\r\n >\r\n @for (opt of autoVisibleChips(); track opt) {\r\n <span class=\"solaris-multi-select__chip\" role=\"listitem\">\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n getOptionDisplayLabel(opt)\r\n }}</span>\r\n @if (!isEffectivelyDisabled() && !isEffectivelyReadonly()) {\r\n <button\r\n type=\"button\"\r\n class=\"solaris-multi-select__chip-remove\"\r\n [attr.aria-label]=\"removeChipAriaLabel()\"\r\n (click)=\"removeChip(opt, $event)\"\r\n tabindex=\"-1\"\r\n >\r\n <solaris-icon name=\"x\" [decorative]=\"true\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n @if (autoShowOverflow()) {\r\n <span\r\n class=\"solaris-multi-select__chip-overflow\"\r\n [solarisTooltip]=\"autoOverflowTooltipText()\"\r\n [solarisTooltipTrigger]=\"'hover'\"\r\n tabindex=\"0\"\r\n [attr.aria-label]=\"\r\n '+ ' +\r\n autoOverflowCount() +\r\n ' ' +\r\n selectedLabels().join(', ')\r\n \"\r\n >+{{ autoOverflowCount() }}</span\r\n >\r\n }\r\n </div>\r\n }\r\n }\r\n @if (searchable() && panelOpen()) {\r\n <input\r\n #searchInput\r\n type=\"text\"\r\n class=\"solaris-multi-select__search-input\"\r\n [attr.placeholder]=\"searchPlaceholderText()\"\r\n [value]=\"searchQuery()\"\r\n (input)=\"onSearchInput($event)\"\r\n (keydown)=\"onSearchKeydown($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n />\r\n }\r\n @if (!hasValue() && !(searchable() && panelOpen())) {\r\n <span class=\"solaris-multi-select__value\">\r\n <span class=\"solaris-multi-select__placeholder\">{{\r\n placeholderText()\r\n }}</span>\r\n </span>\r\n }\r\n } @else {\r\n @if (searchable() && panelOpen()) {\r\n <input\r\n #searchInput\r\n type=\"text\"\r\n class=\"solaris-multi-select__search-input\"\r\n [attr.placeholder]=\"searchPlaceholderText()\"\r\n [value]=\"searchQuery()\"\r\n (input)=\"onSearchInput($event)\"\r\n (keydown)=\"onSearchKeydown($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n />\r\n } @else {\r\n @if (hasValue()) {\r\n @if (displayMode() === 'chips') {\r\n <div class=\"solaris-multi-select__chips\">\r\n @for (\r\n opt of selectedOptions().slice(0, maxVisibleChips());\r\n track opt\r\n ) {\r\n <span class=\"solaris-multi-select__chip\" role=\"listitem\">\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n getOptionDisplayLabel(opt)\r\n }}</span>\r\n @if (!isEffectivelyDisabled() && !isEffectivelyReadonly()) {\r\n <button\r\n type=\"button\"\r\n class=\"solaris-multi-select__chip-remove\"\r\n [attr.aria-label]=\"removeChipAriaLabel()\"\r\n (click)=\"removeChip(opt, $event)\"\r\n tabindex=\"-1\"\r\n >\r\n <solaris-icon name=\"x\" [decorative]=\"true\" />\r\n </button>\r\n }\r\n </span>\r\n }\r\n @if (overflowCount() > 0) {\r\n <span\r\n class=\"solaris-multi-select__chip-overflow\"\r\n [attr.aria-label]=\"\r\n '+ ' + overflowCount() + ' ' + selectedLabels().join(', ')\r\n \"\r\n >\r\n {{ overflowText() }}\r\n </span>\r\n }\r\n </div>\r\n } @else if (displayMode() === 'comma') {\r\n <span class=\"solaris-multi-select__value\">\r\n <span class=\"solaris-multi-select__value-text\">{{\r\n commaText()\r\n }}</span>\r\n </span>\r\n } @else {\r\n <span\r\n class=\"solaris-multi-select__chip\"\r\n [solarisTooltip]=\"countTooltipText()\"\r\n [solarisTooltipTrigger]=\"'hover'\"\r\n tabindex=\"0\"\r\n >\r\n <span class=\"solaris-multi-select__chip-label\">{{\r\n summaryText()\r\n }}</span>\r\n </span>\r\n }\r\n } @else {\r\n <span class=\"solaris-multi-select__value\">\r\n <span class=\"solaris-multi-select__placeholder\">{{\r\n placeholderText()\r\n }}</span>\r\n </span>\r\n }\r\n }\r\n }\r\n </div>\r\n\r\n <span class=\"solaris-multi-select__actions\">\r\n @if (canClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"solaris-multi-select__clear\"\r\n [attr.aria-label]=\"clearAriaLabel()\"\r\n (click)=\"clearValue(); $event.stopPropagation()\"\r\n tabindex=\"-1\"\r\n >\r\n <solaris-icon name=\"x\" [decorative]=\"true\" />\r\n </button>\r\n }\r\n\r\n <solaris-icon\r\n class=\"solaris-multi-select__dropdown-icon\"\r\n name=\"chevron-down\"\r\n [decorative]=\"true\"\r\n size=\"sm\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <ng-content select=\"[solaris-form-suffix]\" />\r\n</solaris-form-field>\r\n\r\n<ng-template #matchWidthPopover=\"solarisPopover\" solaris-popover>\r\n <div\r\n class=\"solaris-multi-select__panel\"\r\n role=\"listbox\"\r\n [attr.aria-multiselectable]=\"'true'\"\r\n [attr.id]=\"panelId\"\r\n tabindex=\"-1\"\r\n (click)=\"onPanelClick($event)\"\r\n (keydown)=\"onPanelKeydown($event)\"\r\n >\r\n @if (selectAll() && !loading()) {\r\n <div\r\n class=\"solaris-multi-select__select-all\"\r\n role=\"option\"\r\n aria-selected=\"false\"\r\n tabindex=\"-1\"\r\n (click)=\"handleSelectAll()\"\r\n (keydown.enter)=\"handleSelectAll()\"\r\n (keydown.space)=\"handleSelectAll(); $event.preventDefault()\"\r\n [class.solaris-multi-select__select-all--readonly]=\"\r\n isEffectivelyReadonly()\r\n \"\r\n >\r\n <span\r\n class=\"solaris-multi-select__select-all-checkbox\"\r\n [class.solaris-multi-select__select-all-checkbox--checked]=\"\r\n isAllSelected()\r\n \"\r\n [class.solaris-multi-select__select-all-checkbox--partial]=\"\r\n isPartialSelected()\r\n \"\r\n >\r\n @if (isAllSelected()) {\r\n <span class=\"solaris-multi-select__select-all-checkbox-icon\">\r\n <solaris-icon name=\"check\" [decorative]=\"true\" />\r\n </span>\r\n } @else if (isPartialSelected()) {\r\n <span class=\"solaris-multi-select__select-all-checkbox-icon\">\r\n <solaris-icon name=\"minus\" [decorative]=\"true\" />\r\n </span>\r\n }\r\n </span>\r\n <span class=\"solaris-multi-select__select-all-label\">{{\r\n selectAllLabelText()\r\n }}</span>\r\n </div>\r\n }\r\n\r\n @if (loading()) {\r\n <div class=\"solaris-multi-select__loading\">\r\n <span class=\"solaris-multi-select__loading-text\">{{\r\n loadingTextValue()\r\n }}</span>\r\n </div>\r\n } @else if (showNoResults()) {\r\n <div class=\"solaris-multi-select__no-results\">\r\n <span class=\"solaris-multi-select__no-results-text\">{{\r\n noResultsTextValue()\r\n }}</span>\r\n </div>\r\n } @else if (showEmpty()) {\r\n <div class=\"solaris-multi-select__empty\">\r\n <span class=\"solaris-multi-select__empty-text\">{{\r\n emptyTextValue()\r\n }}</span>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"solaris-multi-select__options\"\r\n [style.max-height]=\"panelMaxHeight()\"\r\n >\r\n <ng-content select=\"solaris-option, solaris-option-group\" />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":host{--solaris-multi-select-chip-gap: var(--solaris-spacing-1);--solaris-multi-select-chip-radius: var(--solaris-radius-sm);--solaris-multi-select-icon-color: var(--solaris-text-muted);--solaris-multi-select-font-size: var(--solaris-font-size-md);--solaris-multi-select-chip-color: var(--solaris-text-default);--solaris-multi-select-value-color: var(--solaris-text-default);--solaris-multi-select-chip-padding-y: var(--solaris-spacing-1);--solaris-multi-select-chip-padding-x: var(--solaris-spacing-2);--solaris-multi-select-line-height: var(--solaris-line-height-md);--solaris-multi-select-chip-font-size: var(--solaris-font-size-sm);--solaris-multi-select-select-all-height: var(--solaris-spacing-9);--solaris-multi-select-placeholder-color: var(--solaris-text-muted);--solaris-multi-select-chip-remove-size: var(--solaris-font-size-md);--solaris-multi-select-chip-background: var(--solaris-surface-subtle);outline:none;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;flex-direction:column;box-sizing:border-box;font-family:var(--solaris-font-family-sans, system-ui)}.solaris-multi-select__trigger{flex:1;min-width:0;display:flex;align-items:center;box-sizing:border-box;gap:var(--solaris-spacing-2);padding:0;outline:none;border:none;background:transparent;cursor:pointer}:host ::ng-deep .solaris-form-field__message-row{margin-top:0}:host ::ng-deep .solaris-multi-select--panel-open .solaris-form-field__message-row{display:none}.solaris-multi-select__trigger-content{flex:1;min-width:0;display:flex;overflow:hidden;align-items:center;gap:var(--solaris-spacing-2)}.solaris-multi-select__value{flex:none;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.solaris-multi-select__value-text{color:var(--solaris-multi-select-value-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__placeholder{font-size:var(--solaris-multi-select-font-size);color:var(--solaris-multi-select-placeholder-color);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__chips{flex:1;min-width:0;display:flex;flex-wrap:wrap;overflow:hidden;align-items:center;gap:var(--solaris-multi-select-chip-gap)}.solaris-multi-select__chips--auto{flex:none;flex-wrap:nowrap}.solaris-multi-select__chips--auto .solaris-multi-select__chip{flex-shrink:0}.solaris-multi-select__chip{align-items:center;white-space:nowrap;display:inline-flex;gap:var(--solaris-spacing-1);line-height:var(--solaris-line-height-sm);color:var(--solaris-multi-select-chip-color);font-size:var(--solaris-multi-select-chip-font-size);border-radius:var(--solaris-multi-select-chip-radius);background:var(--solaris-multi-select-chip-background);border:var(--solaris-border-width-sm) solid var(--solaris-border-default);padding:var(--solaris-multi-select-chip-padding-y) var(--solaris-multi-select-chip-padding-x)}.solaris-multi-select__chip-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.solaris-multi-select__chip-remove{padding:0;border:none;display:flex;cursor:pointer;border-radius:50%;align-items:center;justify-content:center;background:transparent;color:var(--solaris-multi-select-icon-color);width:var(--solaris-multi-select-chip-remove-size);height:var(--solaris-multi-select-chip-remove-size);transition:background var(--solaris-motion-duration-normal) ease;flex-shrink:0}.solaris-multi-select__chip-remove solaris-icon{width:var(--solaris-multi-select-chip-remove-size);height:var(--solaris-multi-select-chip-remove-size)}.solaris-multi-select__chip-remove:hover{background:var(--solaris-surface-hover)}.solaris-multi-select__chip-overflow{flex-shrink:0;white-space:nowrap;color:var(--solaris-multi-select-icon-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__actions{display:flex;flex-shrink:0;align-items:center;gap:var(--solaris-spacing-2)}.solaris-multi-select__clear{padding:0;border:none;display:flex;cursor:pointer;border-radius:50%;align-items:center;justify-content:center;background:transparent;width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl);color:var(--solaris-multi-select-icon-color);transition:color var(--solaris-motion-duration-normal) ease}.solaris-multi-select__clear solaris-icon{width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl)}.solaris-multi-select__clear:hover{color:var(--solaris-text-default)}.solaris-multi-select__dropdown-icon{width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl);color:var(--solaris-multi-select-icon-color);transition:transform var(--solaris-motion-duration-normal) ease}.solaris-multi-select__dropdown-icon solaris-icon{width:var(--solaris-font-size-xl);height:var(--solaris-font-size-xl)}:host([data-open]) .solaris-multi-select__dropdown-icon{transform:rotate(180deg)}.solaris-multi-select__panel{display:flex;overflow-y:auto;flex-direction:column;overscroll-behavior:contain}.solaris-multi-select__search-input{flex:1;margin:0;padding:0;min-width:0;border:none;outline:none;font-family:inherit;box-sizing:border-box;background:transparent;color:var(--solaris-multi-select-value-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__search-input::placeholder{color:var(--solaris-multi-select-placeholder-color)}.solaris-multi-select__loading,.solaris-multi-select__no-results,.solaris-multi-select__empty{display:flex;align-items:center;justify-content:center;color:var(--solaris-text-muted);padding:var(--solaris-spacing-4);font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md)}.solaris-multi-select__options{display:flex;flex-direction:column;gap:var(--solaris-spacing-1);padding:var(--solaris-spacing-1) var(--solaris-spacing-2)}.solaris-multi-select__select-all{display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:var(--solaris-spacing-2);min-height:var(--solaris-multi-select-select-all-height);padding:var(--solaris-spacing-2) var(--solaris-spacing-3);transition:background var(--solaris-motion-duration-normal) ease}.solaris-multi-select__select-all:hover{background:var(--solaris-surface-hover)}.solaris-multi-select__select-all-checkbox{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--solaris-font-size-lg);height:var(--solaris-font-size-lg);border-radius:var(--solaris-radius-sm);background:var(--solaris-surface-base);border:var(--solaris-border-width-sm) solid var(--solaris-border-default)}.solaris-multi-select__select-all-checkbox--checked{background:var(--solaris-primary-base);border-color:var(--solaris-primary-base)}.solaris-multi-select__select-all-checkbox--partial{background:var(--solaris-primary-muted);border-color:var(--solaris-primary-base)}.solaris-multi-select__select-all-checkbox-icon{display:flex;align-items:center;justify-content:center;color:var(--solaris-on-primary);width:var(--solaris-font-size-sm);height:var(--solaris-font-size-sm)}.solaris-multi-select__select-all-label{color:var(--solaris-multi-select-value-color);font-size:var(--solaris-multi-select-font-size);line-height:var(--solaris-multi-select-line-height)}.solaris-multi-select__select-all--readonly{cursor:default;opacity:.5}:host([data-disabled]){cursor:not-allowed}:host([data-readonly]){cursor:default}@media(prefers-reduced-motion:reduce){.solaris-multi-select__dropdown-icon,.solaris-multi-select__clear{transition:none}}[data-reduced-motion=true] .solaris-multi-select__dropdown-icon,[data-reduced-motion=true] .solaris-multi-select__clear{transition:none}\n"] }]
1097
+ }], ctorParameters: () => [], propDecorators: { popoverTrigger: [{
1098
+ type: ViewChild,
1099
+ args: [SolarisPopoverTriggerDirective]
1100
+ }], searchInputRef: [{
1101
+ type: ViewChild,
1102
+ args: ['searchInput', { read: ElementRef }]
1103
+ }], triggerElement: [{
1104
+ type: ViewChild,
1105
+ args: ['triggerEl', { read: ElementRef }]
1106
+ }], formFieldElement: [{
1107
+ type: ViewChild,
1108
+ args: ['formFieldRef', { read: ElementRef }]
1109
+ }], options: [{
1110
+ type: ContentChildren,
1111
+ args: [SolarisOptionComponent, { descendants: true }]
1112
+ }], optionGroups: [{
1113
+ type: ContentChildren,
1114
+ args: [SolarisOptionGroupComponent, { descendants: true }]
1115
+ }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], hintKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintKey", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], errorKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorKey", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], emptyTextKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTextKey", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }], placeholderKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderKey", required: false }] }], loadingTextKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingTextKey", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], clearLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabelKey", required: false }] }], removeChipLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeChipLabel", required: false }] }], removeChipLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeChipLabelKey", required: false }] }], noResultsText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsText", required: false }] }], noResultsTextKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsTextKey", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchPlaceholderKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholderKey", required: false }] }], panelMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelMinWidth", required: false }] }], panelMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelMaxWidth", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], panelMatchTriggerWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelMatchTriggerWidth", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], requiredInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], panelMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelMaxHeight", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], displayWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayWith", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], manualInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], selectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAll", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], selectAllLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabelKey", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], maxVisibleChips: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleChips", required: false }] }], selectedCountLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCountLabel", required: false }] }], selectedCountLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCountLabelKey", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], overflowLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabelKey", required: false }] }], minSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSelected", required: false }] }], maxSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelected", required: false }] }], showSelectionTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSelectionTooltip", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], triggerContentRef: [{
1116
+ type: ViewChild,
1117
+ args: ['triggerContent', { read: ElementRef }]
1118
+ }] } });
1119
+ //# sourceMappingURL=multi-select.component.js.map