@sixbell-telco/sdk 0.71.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/CHANGELOG.md +307 -26
  2. package/README.md +285 -224
  3. package/_index.css +452 -0
  4. package/components/accordion/accordion-item/accordion-item.component.d.ts +1 -1
  5. package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +2 -2
  6. package/components/audio-player/button-play/button-play.component.d.ts +6 -6
  7. package/components/audio-player/services/audio.service.d.ts +1 -0
  8. package/components/audio-player/src/audio-player.component.d.ts +14 -8
  9. package/components/audio-player/volume-control/volume-control.component.d.ts +2 -2
  10. package/components/avatar/src/avatar.component.d.ts +116 -8
  11. package/components/badge/src/badge.component.d.ts +69 -7
  12. package/components/button/src/button.component.d.ts +120 -8
  13. package/components/card/card-actions/card-actions.component.d.ts +29 -1
  14. package/components/card/card-content/card-content.component.d.ts +25 -0
  15. package/components/card/card-title/card-title.component.d.ts +22 -0
  16. package/components/card/src/card.component.d.ts +90 -5
  17. package/components/countdown/src/countdown.component.d.ts +2 -6
  18. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +35 -2
  19. package/components/dropdown/src/dropdown.component.d.ts +151 -9
  20. package/components/dual-list/src/dual-list.component.d.ts +7 -8
  21. package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +254 -0
  22. package/components/file-upload/file-uploader/file-uploader.component.d.ts +209 -0
  23. package/components/file-upload/index.d.ts +5 -0
  24. package/components/file-upload/public-api.d.ts +4 -0
  25. package/components/file-upload/shared/types/file-upload.d.ts +8 -0
  26. package/components/forms/checkbox/src/checkbox.component.d.ts +68 -5
  27. package/components/forms/combobox/src/combobox.component.d.ts +476 -39
  28. package/components/forms/datepicker/src/datepicker.component.d.ts +2 -2
  29. package/components/forms/form-error/src/form-error.component.d.ts +2 -2
  30. package/components/forms/input/input-content/input-content.component.d.ts +8 -0
  31. package/components/forms/input/public-api.d.ts +1 -0
  32. package/components/forms/input/src/input.component.d.ts +148 -25
  33. package/components/forms/radio/src/radio.component.d.ts +83 -7
  34. package/components/forms/range/src/range.component.d.ts +101 -6
  35. package/components/forms/select/src/select.component.d.ts +316 -24
  36. package/components/forms/switch/src/switch.component.d.ts +74 -7
  37. package/components/forms/textarea/src/textarea.component.d.ts +172 -16
  38. package/components/forms/toggle/src/toggle.component.d.ts +3 -3
  39. package/components/icon/src/icon.component.d.ts +5 -5
  40. package/components/link/src/link.component.d.ts +1 -1
  41. package/components/modal/modal-actions/modal-actions.component.d.ts +1 -1
  42. package/components/modal/src/modal.component.d.ts +10 -10
  43. package/components/notification/src/notification.component.d.ts +2 -3
  44. package/components/paginator/components/pagination-item/pagination-item.component.d.ts +64 -15
  45. package/components/paginator/src/paginator.component.d.ts +93 -2
  46. package/components/product-card/src/product-card.component.d.ts +7 -8
  47. package/components/progress/src/progress.component.d.ts +59 -4
  48. package/components/tab/directives/tab-content/tab-content.directive.d.ts +1 -1
  49. package/components/tab/directives/tab-header/tab-header.directive.d.ts +1 -1
  50. package/components/tab/src/tab.component.d.ts +3 -3
  51. package/components/table/public-api.d.ts +2 -0
  52. package/components/table/src/table.component.d.ts +160 -14
  53. package/components/table/table-action/table-action.component.d.ts +49 -0
  54. package/components/table/table-actions/table-actions.component.d.ts +25 -0
  55. package/components/table/table-header-checkbox/table-header-checkbox.component.d.ts +42 -0
  56. package/components/table/table-row-checkbox/table-row-checkbox.component.d.ts +46 -0
  57. package/components/toast/toast-message/toast-message.component.d.ts +3 -3
  58. package/components/tooltip/public-api.d.ts +1 -0
  59. package/components/tooltip/src/tooltip.component.d.ts +66 -5
  60. package/components/tooltip/tooltip-content/tooltip-content.component.d.ts +38 -0
  61. package/components/wizard/public-api.d.ts +2 -3
  62. package/components/wizard/services/wizard.service.d.ts +221 -0
  63. package/components/wizard/wizard-actions/wizard-actions.component.d.ts +8 -0
  64. package/components/wizard/wizard-content/wizard-content.component.d.ts +67 -13
  65. package/components/wizard/wizard-marker/wizard-marker.component.d.ts +81 -6
  66. package/components/wizard/wizard-step/wizard-step.component.d.ts +76 -9
  67. package/components/wizard/wizard-sub-step/wizard-sub-step.component.d.ts +91 -9
  68. package/components/wizard/wizard-wrapper/wizard-wrapper.component.d.ts +152 -16
  69. package/directives/auto-focus/index.d.ts +5 -0
  70. package/directives/auto-focus/public-api.d.ts +1 -0
  71. package/directives/auto-focus/src/autofocus.directive.d.ts +93 -0
  72. package/directives/click-outside/src/click-outside.directive.d.ts +48 -3
  73. package/directives/only-numbers/index.d.ts +5 -0
  74. package/directives/only-numbers/public-api.d.ts +1 -0
  75. package/directives/only-numbers/src/just-numbers.directive.d.ts +9 -0
  76. package/directives/typography/src/typography.directive.d.ts +47 -1
  77. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +10 -12
  78. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
  79. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +119 -69
  80. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
  81. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +109 -19
  82. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  83. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +92 -46
  84. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  85. package/fesm2022/sixbell-telco-sdk-components-button.mjs +153 -34
  86. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  87. package/fesm2022/sixbell-telco-sdk-components-card.mjs +195 -33
  88. package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
  89. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs +8 -11
  90. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
  91. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +197 -26
  92. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  93. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +30 -18
  94. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  95. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +706 -0
  96. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -0
  97. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +85 -25
  98. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
  99. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +996 -113
  100. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  101. package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs +11 -11
  102. package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs.map +1 -1
  103. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +13 -12
  104. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
  105. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +221 -121
  106. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  107. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +98 -26
  108. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
  109. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +117 -25
  110. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
  111. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +671 -74
  112. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  113. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +95 -45
  114. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
  115. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +236 -75
  116. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  117. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +74 -258
  118. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
  119. package/fesm2022/sixbell-telco-sdk-components-icon.mjs +23 -14
  120. package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
  121. package/fesm2022/sixbell-telco-sdk-components-link.mjs +16 -16
  122. package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
  123. package/fesm2022/sixbell-telco-sdk-components-modal.mjs +39 -36
  124. package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +1 -1
  125. package/fesm2022/sixbell-telco-sdk-components-notification.mjs +16 -9
  126. package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
  127. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +189 -59
  128. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
  129. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +35 -43
  130. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
  131. package/fesm2022/sixbell-telco-sdk-components-progress.mjs +60 -12
  132. package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
  133. package/fesm2022/sixbell-telco-sdk-components-tab.mjs +33 -35
  134. package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
  135. package/fesm2022/sixbell-telco-sdk-components-table.mjs +403 -58
  136. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  137. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +28 -44
  138. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
  139. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +112 -10
  140. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
  141. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +897 -161
  142. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
  143. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +206 -0
  144. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -0
  145. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs +54 -11
  146. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs.map +1 -1
  147. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +52 -0
  148. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -0
  149. package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +66 -15
  150. package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +1 -1
  151. package/fesm2022/sixbell-telco-sdk-utils-cn.mjs.map +1 -1
  152. package/fesm2022/sixbell-telco-sdk-utils-generators-uuid.mjs.map +1 -1
  153. package/fesm2022/sixbell-telco-sdk-utils-pipes-extract-extension.mjs +3 -3
  154. package/fesm2022/sixbell-telco-sdk-utils-pipes-extract-extension.mjs.map +1 -1
  155. package/fesm2022/sixbell-telco-sdk-utils-pipes-time.mjs +3 -3
  156. package/fesm2022/sixbell-telco-sdk-utils-pipes-time.mjs.map +1 -1
  157. package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs +3 -3
  158. package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs.map +1 -1
  159. package/package.json +49 -145
  160. package/sixbell-telco-sdk-1.0.1.tgz +0 -0
  161. package/_index.scss +0 -146
  162. package/assets/styles/combobox.scss +0 -454
  163. package/components/file-upload/file-dropzone/index.d.ts +0 -5
  164. package/components/file-upload/file-dropzone/public-api.d.ts +0 -1
  165. package/components/file-upload/file-dropzone/src/file-dropzone.component.d.ts +0 -68
  166. package/components/file-upload/file-uploader/index.d.ts +0 -5
  167. package/components/file-upload/file-uploader/public-api.d.ts +0 -1
  168. package/components/file-upload/file-uploader/src/file-uploader.component.d.ts +0 -46
  169. package/esm2022/components/accordion/accordion-item/accordion-item.component.mjs +0 -43
  170. package/esm2022/components/accordion/public-api.mjs +0 -3
  171. package/esm2022/components/accordion/sixbell-telco-sdk-components-accordion.mjs +0 -5
  172. package/esm2022/components/accordion/src/accordion.component.mjs +0 -13
  173. package/esm2022/components/audio-player/audio-timeline/audio-timeline.component.mjs +0 -76
  174. package/esm2022/components/audio-player/button-play/button-play.component.mjs +0 -71
  175. package/esm2022/components/audio-player/public-api.mjs +0 -4
  176. package/esm2022/components/audio-player/services/audio.service.mjs +0 -189
  177. package/esm2022/components/audio-player/sixbell-telco-sdk-components-audio-player.mjs +0 -5
  178. package/esm2022/components/audio-player/src/audio-player.component.mjs +0 -84
  179. package/esm2022/components/audio-player/track-info/track-info.component.mjs +0 -17
  180. package/esm2022/components/audio-player/volume-control/volume-control.component.mjs +0 -83
  181. package/esm2022/components/avatar/public-api.mjs +0 -2
  182. package/esm2022/components/avatar/sixbell-telco-sdk-components-avatar.mjs +0 -5
  183. package/esm2022/components/avatar/src/avatar.component.mjs +0 -59
  184. package/esm2022/components/badge/public-api.mjs +0 -2
  185. package/esm2022/components/badge/sixbell-telco-sdk-components-badge.mjs +0 -5
  186. package/esm2022/components/badge/src/badge.component.mjs +0 -76
  187. package/esm2022/components/button/public-api.mjs +0 -2
  188. package/esm2022/components/button/sixbell-telco-sdk-components-button.mjs +0 -5
  189. package/esm2022/components/button/src/button.component.mjs +0 -84
  190. package/esm2022/components/card/card-actions/card-actions.component.mjs +0 -22
  191. package/esm2022/components/card/card-content/card-content.component.mjs +0 -12
  192. package/esm2022/components/card/card-title/card-title.component.mjs +0 -12
  193. package/esm2022/components/card/public-api.mjs +0 -5
  194. package/esm2022/components/card/sixbell-telco-sdk-components-card.mjs +0 -5
  195. package/esm2022/components/card/src/card.component.mjs +0 -32
  196. package/esm2022/components/countdown/public-api.mjs +0 -2
  197. package/esm2022/components/countdown/sixbell-telco-sdk-components-countdown.mjs +0 -5
  198. package/esm2022/components/countdown/src/countdown.component.mjs +0 -60
  199. package/esm2022/components/dropdown/dropdown-item/dropdown-item.component.mjs +0 -24
  200. package/esm2022/components/dropdown/public-api.mjs +0 -3
  201. package/esm2022/components/dropdown/sixbell-telco-sdk-components-dropdown.mjs +0 -5
  202. package/esm2022/components/dropdown/src/dropdown.component.mjs +0 -127
  203. package/esm2022/components/dual-list/public-api.mjs +0 -2
  204. package/esm2022/components/dual-list/sixbell-telco-sdk-components-dual-list.mjs +0 -5
  205. package/esm2022/components/dual-list/src/dual-list.component.mjs +0 -174
  206. package/esm2022/components/file-upload/file-dropzone/public-api.mjs +0 -2
  207. package/esm2022/components/file-upload/file-dropzone/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs +0 -5
  208. package/esm2022/components/file-upload/file-dropzone/src/file-dropzone.component.mjs +0 -232
  209. package/esm2022/components/file-upload/file-dropzone/src/file-dropzone.constants.mjs +0 -7
  210. package/esm2022/components/file-upload/file-uploader/public-api.mjs +0 -2
  211. package/esm2022/components/file-upload/file-uploader/sixbell-telco-sdk-components-file-upload-file-uploader.mjs +0 -5
  212. package/esm2022/components/file-upload/file-uploader/src/file-uploader.component.mjs +0 -114
  213. package/esm2022/components/forms/checkbox/public-api.mjs +0 -2
  214. package/esm2022/components/forms/checkbox/sixbell-telco-sdk-components-forms-checkbox.mjs +0 -5
  215. package/esm2022/components/forms/checkbox/src/checkbox.component.mjs +0 -94
  216. package/esm2022/components/forms/combobox/public-api.mjs +0 -2
  217. package/esm2022/components/forms/combobox/sixbell-telco-sdk-components-forms-combobox.mjs +0 -5
  218. package/esm2022/components/forms/combobox/src/combobox.component.mjs +0 -165
  219. package/esm2022/components/forms/datepicker/public-api.mjs +0 -3
  220. package/esm2022/components/forms/datepicker/sixbell-telco-sdk-components-forms-datepicker.mjs +0 -5
  221. package/esm2022/components/forms/datepicker/src/datepicker-format-month.pipe.mjs +0 -20
  222. package/esm2022/components/forms/datepicker/src/datepicker.component.mjs +0 -190
  223. package/esm2022/components/forms/form-error/public-api.mjs +0 -2
  224. package/esm2022/components/forms/form-error/sixbell-telco-sdk-components-forms-form-error.mjs +0 -5
  225. package/esm2022/components/forms/form-error/src/form-error.component.mjs +0 -32
  226. package/esm2022/components/forms/input/public-api.mjs +0 -2
  227. package/esm2022/components/forms/input/sixbell-telco-sdk-components-forms-input.mjs +0 -5
  228. package/esm2022/components/forms/input/src/input.component.mjs +0 -201
  229. package/esm2022/components/forms/radio/public-api.mjs +0 -2
  230. package/esm2022/components/forms/radio/sixbell-telco-sdk-components-forms-radio.mjs +0 -5
  231. package/esm2022/components/forms/radio/src/radio.component.mjs +0 -96
  232. package/esm2022/components/forms/range/public-api.mjs +0 -2
  233. package/esm2022/components/forms/range/sixbell-telco-sdk-components-forms-range.mjs +0 -5
  234. package/esm2022/components/forms/range/src/range.component.mjs +0 -103
  235. package/esm2022/components/forms/select/public-api.mjs +0 -2
  236. package/esm2022/components/forms/select/sixbell-telco-sdk-components-forms-select.mjs +0 -5
  237. package/esm2022/components/forms/select/src/select.component.mjs +0 -138
  238. package/esm2022/components/forms/switch/public-api.mjs +0 -2
  239. package/esm2022/components/forms/switch/sixbell-telco-sdk-components-forms-switch.mjs +0 -5
  240. package/esm2022/components/forms/switch/src/switch.component.mjs +0 -108
  241. package/esm2022/components/forms/textarea/public-api.mjs +0 -2
  242. package/esm2022/components/forms/textarea/sixbell-telco-sdk-components-forms-textarea.mjs +0 -5
  243. package/esm2022/components/forms/textarea/src/textarea.component.mjs +0 -167
  244. package/esm2022/components/forms/toggle/public-api.mjs +0 -2
  245. package/esm2022/components/forms/toggle/sixbell-telco-sdk-components-forms-toggle.mjs +0 -5
  246. package/esm2022/components/forms/toggle/src/toggle.component.mjs +0 -404
  247. package/esm2022/components/icon/heroicons/mini/public-api.mjs +0 -2
  248. package/esm2022/components/icon/heroicons/mini/sixbell-telco-sdk-components-icon-heroicons-mini.mjs +0 -5
  249. package/esm2022/components/icon/heroicons/outline/public-api.mjs +0 -2
  250. package/esm2022/components/icon/heroicons/outline/sixbell-telco-sdk-components-icon-heroicons-outline.mjs +0 -5
  251. package/esm2022/components/icon/heroicons/solid/public-api.mjs +0 -2
  252. package/esm2022/components/icon/heroicons/solid/sixbell-telco-sdk-components-icon-heroicons-solid.mjs +0 -5
  253. package/esm2022/components/icon/ionicons/public-api.mjs +0 -2
  254. package/esm2022/components/icon/ionicons/sixbell-telco-sdk-components-icon-ionicons.mjs +0 -5
  255. package/esm2022/components/icon/material/baseline/public-api.mjs +0 -2
  256. package/esm2022/components/icon/material/baseline/sixbell-telco-sdk-components-icon-material-baseline.mjs +0 -5
  257. package/esm2022/components/icon/material/outline/public-api.mjs +0 -2
  258. package/esm2022/components/icon/material/outline/sixbell-telco-sdk-components-icon-material-outline.mjs +0 -5
  259. package/esm2022/components/icon/material/round/public-api.mjs +0 -2
  260. package/esm2022/components/icon/material/round/sixbell-telco-sdk-components-icon-material-round.mjs +0 -5
  261. package/esm2022/components/icon/material/sharp/public-api.mjs +0 -2
  262. package/esm2022/components/icon/material/sharp/sixbell-telco-sdk-components-icon-material-sharp.mjs +0 -5
  263. package/esm2022/components/icon/public-api.mjs +0 -2
  264. package/esm2022/components/icon/sixbell-telco-sdk-components-icon.mjs +0 -5
  265. package/esm2022/components/icon/src/icon.component.mjs +0 -41
  266. package/esm2022/components/link/public-api.mjs +0 -2
  267. package/esm2022/components/link/sixbell-telco-sdk-components-link.mjs +0 -5
  268. package/esm2022/components/link/src/link.component.mjs +0 -63
  269. package/esm2022/components/modal/modal-actions/modal-actions.component.mjs +0 -22
  270. package/esm2022/components/modal/modal-content/modal-content.component.mjs +0 -12
  271. package/esm2022/components/modal/modal-title/modal-title.component.mjs +0 -13
  272. package/esm2022/components/modal/public-api.mjs +0 -5
  273. package/esm2022/components/modal/sixbell-telco-sdk-components-modal.mjs +0 -5
  274. package/esm2022/components/modal/src/modal.component.mjs +0 -154
  275. package/esm2022/components/notification/public-api.mjs +0 -2
  276. package/esm2022/components/notification/sixbell-telco-sdk-components-notification.mjs +0 -5
  277. package/esm2022/components/notification/src/notification.component.mjs +0 -55
  278. package/esm2022/components/paginator/components/pagination-item/pagination-item.component.mjs +0 -113
  279. package/esm2022/components/paginator/public-api.mjs +0 -3
  280. package/esm2022/components/paginator/sixbell-telco-sdk-components-paginator.mjs +0 -5
  281. package/esm2022/components/paginator/src/paginator.component.mjs +0 -52
  282. package/esm2022/components/product-card/directives/product-card-actions.directive.mjs +0 -15
  283. package/esm2022/components/product-card/directives/product-card-content.directive.mjs +0 -15
  284. package/esm2022/components/product-card/directives/product-card-header.directive.mjs +0 -15
  285. package/esm2022/components/product-card/public-api.mjs +0 -5
  286. package/esm2022/components/product-card/sixbell-telco-sdk-components-product-card.mjs +0 -5
  287. package/esm2022/components/product-card/src/product-card.component.mjs +0 -140
  288. package/esm2022/components/progress/public-api.mjs +0 -2
  289. package/esm2022/components/progress/sixbell-telco-sdk-components-progress.mjs +0 -5
  290. package/esm2022/components/progress/src/progress.component.mjs +0 -43
  291. package/esm2022/components/tab/directives/tab-content/tab-content.directive.mjs +0 -51
  292. package/esm2022/components/tab/directives/tab-header/tab-header.directive.mjs +0 -56
  293. package/esm2022/components/tab/public-api.mjs +0 -4
  294. package/esm2022/components/tab/sixbell-telco-sdk-components-tab.mjs +0 -5
  295. package/esm2022/components/tab/src/tab.component.mjs +0 -42
  296. package/esm2022/components/table/public-api.mjs +0 -4
  297. package/esm2022/components/table/sixbell-telco-sdk-components-table.mjs +0 -5
  298. package/esm2022/components/table/src/table.component.mjs +0 -143
  299. package/esm2022/components/table/table-header-checkbox/table-header-checkbox.component.mjs +0 -25
  300. package/esm2022/components/table/table-row-checkbox/table-row-checkbox.component.mjs +0 -26
  301. package/esm2022/components/toast/public-api.mjs +0 -4
  302. package/esm2022/components/toast/services/toast.service.mjs +0 -67
  303. package/esm2022/components/toast/sixbell-telco-sdk-components-toast.mjs +0 -5
  304. package/esm2022/components/toast/toast-message/toast-message.component.mjs +0 -80
  305. package/esm2022/components/toast/toasts-container/toasts-container.component.mjs +0 -41
  306. package/esm2022/components/tooltip/public-api.mjs +0 -2
  307. package/esm2022/components/tooltip/sixbell-telco-sdk-components-tooltip.mjs +0 -5
  308. package/esm2022/components/tooltip/src/tooltip.component.mjs +0 -45
  309. package/esm2022/components/wizard/public-api.mjs +0 -6
  310. package/esm2022/components/wizard/sixbell-telco-sdk-components-wizard.mjs +0 -5
  311. package/esm2022/components/wizard/wizard-content/wizard-content.component.mjs +0 -30
  312. package/esm2022/components/wizard/wizard-marker/wizard-marker.component.mjs +0 -24
  313. package/esm2022/components/wizard/wizard-step/wizard-step.component.mjs +0 -44
  314. package/esm2022/components/wizard/wizard-sub-step/wizard-sub-step.component.mjs +0 -34
  315. package/esm2022/components/wizard/wizard-wrapper/wizard-wrapper.component.mjs +0 -88
  316. package/esm2022/directives/click-outside/public-api.mjs +0 -2
  317. package/esm2022/directives/click-outside/sixbell-telco-sdk-directives-click-outside.mjs +0 -5
  318. package/esm2022/directives/click-outside/src/click-outside.directive.mjs +0 -30
  319. package/esm2022/directives/typography/public-api.mjs +0 -2
  320. package/esm2022/directives/typography/sixbell-telco-sdk-directives-typography.mjs +0 -5
  321. package/esm2022/directives/typography/src/typography.directive.mjs +0 -68
  322. package/esm2022/public_api.mjs +0 -2
  323. package/esm2022/sixbell-telco-sdk.mjs +0 -5
  324. package/esm2022/utils/cn/public-api.mjs +0 -2
  325. package/esm2022/utils/cn/sixbell-telco-sdk-utils-cn.mjs +0 -5
  326. package/esm2022/utils/cn/src/cn.mjs +0 -6
  327. package/esm2022/utils/generators/uuid/public-api.mjs +0 -2
  328. package/esm2022/utils/generators/uuid/sixbell-telco-sdk-utils-generators-uuid.mjs +0 -5
  329. package/esm2022/utils/generators/uuid/src/uuid.mjs +0 -5
  330. package/esm2022/utils/pipes/extract-extension/public-api.mjs +0 -2
  331. package/esm2022/utils/pipes/extract-extension/sixbell-telco-sdk-utils-pipes-extract-extension.mjs +0 -5
  332. package/esm2022/utils/pipes/extract-extension/src/extract-extension.mjs +0 -30
  333. package/esm2022/utils/pipes/time/public-api.mjs +0 -2
  334. package/esm2022/utils/pipes/time/sixbell-telco-sdk-utils-pipes-time.mjs +0 -5
  335. package/esm2022/utils/pipes/time/src/time.pipe.mjs +0 -19
  336. package/esm2022/utils/pipes/to-bytes-extesion/public-api.mjs +0 -2
  337. package/esm2022/utils/pipes/to-bytes-extesion/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs +0 -5
  338. package/esm2022/utils/pipes/to-bytes-extesion/src/to-bytes.pipe.mjs +0 -29
  339. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs +0 -245
  340. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs.map +0 -1
  341. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs +0 -121
  342. package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs.map +0 -1
  343. /package/assets/styles/{toast.scss → toast.css} +0 -0
  344. /package/components/file-upload/{file-dropzone/src/file-dropzone.constants.d.ts → shared/const/file-upload.constants.d.ts} +0 -0
@@ -1,13 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, model, output, effect, Component } from '@angular/core';
3
- import * as i1 from '@angular/forms';
4
- import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
5
- import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
2
+ import { inject, input, model, output, signal, viewChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { toObservable, toSignal } from '@angular/core/rxjs-interop';
4
+ import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { TranslateService } from '@ngx-translate/core';
6
6
  import { cn } from '@sixbell-telco/sdk/utils/cn';
7
7
  import { cva } from 'class-variance-authority';
8
+ import { switchMap, startWith } from 'rxjs';
9
+ import { CdkListbox, CdkOption } from '@angular/cdk/listbox';
10
+ import * as i1 from '@angular/cdk/overlay';
11
+ import { OverlayModule } from '@angular/cdk/overlay';
12
+ import { PortalModule } from '@angular/cdk/portal';
13
+ import { IconComponent } from '@sixbell-telco/sdk/components/icon';
14
+ import { matKeyboardArrowDownOutline, matCheckOutline, matCloseOutline } from '@sixbell-telco/sdk/components/icon/material/outline';
8
15
 
9
16
  /* eslint-disable @typescript-eslint/no-explicit-any */
10
- const selectComponent = cva(['w-full', 'min-w-fit', 'text-pretty', 'font-body', 'font-normal', 'rounded-btn', 'select', 'leading-normal'], {
17
+ // ==============================================================================
18
+ // COMPONENT STYLES
19
+ // ==============================================================================
20
+ /**
21
+ * @internal
22
+ * Generates base select classes with style variants
23
+ */
24
+ const selectComponent = cva(['w-full', 'min-w-fit', 'text-pretty', 'font-body', 'font-normal', 'select', 'leading-normal', 'bg-none'], {
11
25
  variants: {
12
26
  variant: {
13
27
  primary: ['select-primary'],
@@ -20,10 +34,11 @@ const selectComponent = cva(['w-full', 'min-w-fit', 'text-pretty', 'font-body',
20
34
  warning: ['select-warning'],
21
35
  },
22
36
  size: {
23
- xs: ['select-xs', 'text-xs'],
24
- sm: ['select-sm', 'text-sm'],
25
- md: ['select-md', 'text-base'],
26
- lg: ['select-lg', 'text-lg'],
37
+ xs: ['select-xs'],
38
+ sm: ['select-sm'],
39
+ md: ['select-md'],
40
+ lg: ['select-lg'],
41
+ xl: ['select-xl'],
27
42
  },
28
43
  },
29
44
  compoundVariants: [],
@@ -32,109 +47,691 @@ const selectComponent = cva(['w-full', 'min-w-fit', 'text-pretty', 'font-body',
32
47
  size: 'md',
33
48
  },
34
49
  });
50
+ // ==============================================================================
51
+ // COMPONENT
52
+ // ==============================================================================
53
+ /**
54
+ * A customizable select dropdown component with CDK overlay integration
55
+ *
56
+ * @remarks
57
+ * Uses the same visual design as the combobox but simplified for single selection only.
58
+ * No search functionality or multi-select support. Implements ControlValueAccessor
59
+ * for Angular form compatibility.
60
+ *
61
+ * @example
62
+ * ```html
63
+ * <!-- Basic usage with primitive values -->
64
+ * <st-select
65
+ * [options]="['Option 1', 'Option 2']"
66
+ * [(value)]="selectedValue"
67
+ * ></st-select>
68
+ * ```
69
+ *
70
+ * @example
71
+ * ```html
72
+ * <!-- Object options with custom keys -->
73
+ * <st-select
74
+ * [options]="users"
75
+ * valueKey="id"
76
+ * displayKey="name"
77
+ * label="Select user"
78
+ * [parentForm]="userForm"
79
+ * formControlName="selectedUser"
80
+ * ></st-select>
81
+ * ```
82
+ */
35
83
  class SelectComponent {
36
- // Base input properties
37
- variant = input();
38
- size = input();
84
+ // ==============================================================================
85
+ // SERVICES
86
+ // ==============================================================================
87
+ /** @internal Translation service instance */
88
+ translateService = inject(TranslateService);
89
+ // ==============================================================================
90
+ // INPUT PROPERTIES
91
+ // ==============================================================================
92
+ /**
93
+ * Select dropdown style variant
94
+ * @defaultValue 'secondary'
95
+ */
96
+ variant = input('secondary');
97
+ /**
98
+ * Select dropdown size variant
99
+ * @defaultValue 'md'
100
+ */
101
+ size = input('md');
102
+ /**
103
+ * Whether to use ghost (transparent) styling
104
+ * @defaultValue false
105
+ */
39
106
  ghost = input(false);
107
+ /**
108
+ * HTML name attribute for the select
109
+ */
40
110
  name = input(null);
111
+ /**
112
+ * Placeholder text when no option is selected
113
+ */
41
114
  placeholder = input('');
115
+ /**
116
+ * Label text displayed above the select
117
+ */
42
118
  label = input('');
119
+ /**
120
+ * Two-way bindable selected value
121
+ */
43
122
  value = model();
123
+ /**
124
+ * Array of available options (primitives or objects)
125
+ */
44
126
  options = input([]);
45
- emptyOptionText = input('');
46
- // Options properties
47
- trackBy = input('id');
48
- key = input('name');
49
- // Form control properties
127
+ /**
128
+ * The object property to use for display text when options are objects
129
+ * Falls back to common property names if not specified
130
+ */
131
+ displayKey = input('');
132
+ /**
133
+ * The object property to use as the value when options are objects
134
+ * Uses the entire object if not specified
135
+ */
136
+ valueKey = input('');
137
+ /**
138
+ * Whether to show a clear button next to the selected value
139
+ * @default true
140
+ */
141
+ allowClear = input(true);
142
+ /**
143
+ * Parent form group for reactive forms
144
+ */
50
145
  parentForm = input(null);
146
+ /**
147
+ * Form control name for reactive forms
148
+ */
51
149
  formControlName = input('');
52
- get formField() {
53
- if (!this.parentForm())
54
- return null;
55
- return this.parentForm()?.get(this.formControlName());
56
- }
57
- // ControlValueAccessor attributes
58
- onControlChange = () => { };
59
- onControlTouch = () => { };
150
+ /**
151
+ * Whether the select is disabled
152
+ * @defaultValue false
153
+ */
60
154
  disabled = model(false);
61
- // ControlValueAccessor methods
62
- writeValue(obj) {
63
- this.value.set(obj);
155
+ /**
156
+ * Event emitted when select loses focus
157
+ */
158
+ blurred = output();
159
+ /**
160
+ * Event emitted when selection changes
161
+ */
162
+ valueUpdated = output();
163
+ // ==============================================================================
164
+ // ICONS
165
+ // ==============================================================================
166
+ /** Dropdown chevron icon */
167
+ iconChevronDown = matKeyboardArrowDownOutline;
168
+ /** Check icon for selected options */
169
+ iconCheck = matCheckOutline;
170
+ /** Close/clear icon */
171
+ iconClose = matCloseOutline;
172
+ // ==============================================================================
173
+ // PRIVATE PROPERTIES
174
+ // ==============================================================================
175
+ /** Current animation state of the overlay */
176
+ animationState = signal('closed');
177
+ /** Trigger for blur events in form validation */
178
+ blurTrigger = signal(0);
179
+ /** Active option index for keyboard navigation */
180
+ activeOptionIndex = signal(-1);
181
+ // ==============================================================================
182
+ // VIEW CHILDREN
183
+ // ==============================================================================
184
+ /** Reference to the trigger button element */
185
+ triggerRef = viewChild('trigger');
186
+ /** Reference to the options list container */
187
+ optionsList = viewChild('optionsList');
188
+ /** Reference to the CDK listbox for keyboard navigation */
189
+ listbox = viewChild('listbox');
190
+ // ==============================================================================
191
+ // SIGNALS
192
+ // ==============================================================================
193
+ /** Width of the trigger button for overlay positioning */
194
+ triggerWidth = signal(0);
195
+ // ==============================================================================
196
+ // FORM CONTROL INTEGRATION
197
+ // ==============================================================================
198
+ /** Form control reference for reactive forms */
199
+ formControl = computed(() => this.parentForm()?.get(this.formControlName()));
200
+ /** Observable stream of form control */
201
+ formControl$ = toObservable(this.formControl);
202
+ /** Stream of form control status changes */
203
+ statusChanges$ = this.formControl$.pipe(switchMap((control) => control?.statusChanges.pipe(startWith(control.status)) || []));
204
+ /** Stream of form control value changes */
205
+ stateChanges$ = this.formControl$.pipe(switchMap((control) => control?.valueChanges.pipe(startWith(control.value)) || []));
206
+ /** Signal for form control status */
207
+ statusSignal = toSignal(this.statusChanges$);
208
+ /** Signal for form control state */
209
+ stateSignal = toSignal(this.stateChanges$);
210
+ // ==============================================================================
211
+ // CONTROL VALUE ACCESSOR
212
+ // ==============================================================================
213
+ /** Callback function for value changes */
214
+ onChange = (value) => { };
215
+ /** Callback function for touch events */
216
+ onTouched = () => { };
217
+ // ==============================================================================
218
+ // COMPUTED PROPERTIES
219
+ // ==============================================================================
220
+ /**
221
+ * Whether the overlay is currently open or in the process of opening/closing
222
+ * @returns True if overlay is visible or animating
223
+ */
224
+ isOpen = computed(() => {
225
+ const state = this.animationState();
226
+ return state === 'opening' || state === 'open' || state === 'closing';
227
+ });
228
+ /**
229
+ * Whether the overlay is currently animating to open state
230
+ * @returns True if overlay is opening or open
231
+ */
232
+ isAnimatingOpen = computed(() => {
233
+ const state = this.animationState();
234
+ return state === 'opening' || state === 'open';
235
+ });
236
+ /**
237
+ * Current animation state for template binding
238
+ * @returns Current animation state
239
+ */
240
+ dataState = computed(() => this.animationState());
241
+ /**
242
+ * Display value for the selected option
243
+ * @returns Formatted display string for the current selection
244
+ */
245
+ displayValue = computed(() => {
246
+ const currentValue = this.value();
247
+ if (!currentValue)
248
+ return this.translatedPlaceholder();
249
+ // If the current value is a string that matches one of the options, display it
250
+ const options = this.options();
251
+ const matchingOption = options.find((option) => {
252
+ if (typeof option === 'string' && typeof currentValue === 'string') {
253
+ return option === currentValue;
254
+ }
255
+ // For objects, check if the current value matches the option or its value property
256
+ const optionValue = this.getOptionValue(option);
257
+ const currentOptionValue = this.getOptionValue(currentValue);
258
+ return optionValue === currentOptionValue || option === currentValue;
259
+ });
260
+ if (matchingOption) {
261
+ return this.getDisplayValue(matchingOption);
262
+ }
263
+ // If no matching option found, show placeholder (invalid value)
264
+ return this.translatedPlaceholder();
265
+ });
266
+ /**
267
+ * Whether the clear button should be shown
268
+ * @returns True if there's a valid selected value and clear is allowed
269
+ */
270
+ showClearButton = computed(() => {
271
+ if (!this.allowClear() || this.disabled()) {
272
+ return false;
273
+ }
274
+ const currentValue = this.value();
275
+ if (!currentValue)
276
+ return false;
277
+ // Only show clear button if the value is valid (exists in options)
278
+ const options = this.options();
279
+ return options.some((option) => {
280
+ if (typeof option === 'string' && typeof currentValue === 'string') {
281
+ return option === currentValue;
282
+ }
283
+ // For objects, check if the current value matches the option or its value property
284
+ const optionValue = this.getOptionValue(option);
285
+ const currentOptionValue = this.getOptionValue(currentValue);
286
+ return optionValue === currentOptionValue || option === currentValue;
287
+ });
288
+ });
289
+ /**
290
+ * Translated placeholder text
291
+ * @returns Translated placeholder or input value
292
+ */
293
+ translatedPlaceholder = computed(() => {
294
+ const customPlaceholder = this.placeholder();
295
+ return customPlaceholder || this.translateService.instant('sdk.select.placeholder');
296
+ });
297
+ /**
298
+ * @internal
299
+ * Computed base select classes
300
+ */
301
+ componentClass = computed(() => {
302
+ return cn(selectComponent({
303
+ variant: this.variant(),
304
+ size: this.size(),
305
+ }), { 'select-ghost': this.ghost() });
306
+ });
307
+ /**
308
+ * @internal
309
+ * Computed error state classes
310
+ */
311
+ errorClass = computed(() => {
312
+ return cn(selectComponent({
313
+ variant: 'error',
314
+ size: this.size(),
315
+ }), { 'select-ghost': this.ghost() });
316
+ });
317
+ /**
318
+ * @internal
319
+ * Computed success state classes
320
+ */
321
+ successClass = computed(() => {
322
+ return cn(selectComponent({
323
+ variant: 'success',
324
+ size: this.size(),
325
+ }), { 'select-ghost': this.ghost() });
326
+ });
327
+ /**
328
+ * Validation-aware CSS classes based on form control state
329
+ * @internal
330
+ */
331
+ validationClass = computed(() => {
332
+ const control = this.formControl();
333
+ const trigger = this.blurTrigger();
334
+ if (!control)
335
+ return this.componentClass();
336
+ const isTouched = control.touched || trigger > 0;
337
+ this.statusSignal();
338
+ this.stateSignal();
339
+ if (control.dirty || isTouched) {
340
+ if (control.invalid)
341
+ return this.errorClass();
342
+ if (control.valid)
343
+ return this.successClass();
344
+ }
345
+ return this.componentClass();
346
+ });
347
+ /**
348
+ * CSS classes for the options menu
349
+ * @internal
350
+ */
351
+ menuClass = computed(() => {
352
+ return cn('menu flex-nowrap max-h-72 overflow-y-auto overscroll-contain w-full p-0 focus-within:outline-none focus:outline-none focus-visible:outline-none', {
353
+ 'menu-xs': this.size() === 'xs',
354
+ 'menu-sm': this.size() === 'sm',
355
+ 'menu-md': this.size() === 'md',
356
+ 'menu-lg': this.size() === 'lg',
357
+ 'menu-xl': this.size() === 'xl',
358
+ });
359
+ });
360
+ // ==============================================================================
361
+ // LIFECYCLE METHODS
362
+ // ==============================================================================
363
+ /**
364
+ * Angular lifecycle hook called after view initialization
365
+ * Updates the trigger width for proper overlay positioning
366
+ */
367
+ ngAfterViewInit() {
368
+ this.updateTriggerWidth();
64
369
  }
370
+ // ==============================================================================
371
+ // CONTROL VALUE ACCESSOR IMPLEMENTATION
372
+ // ==============================================================================
373
+ /**
374
+ * Writes a new value to the component
375
+ * @param value - The new value to set
376
+ */
377
+ writeValue(value) {
378
+ // Only set the value if it's null/undefined or if it exists in the options
379
+ if (!value) {
380
+ this.value.set(value);
381
+ return;
382
+ }
383
+ const options = this.options();
384
+ const isValidValue = options.some((option) => {
385
+ if (typeof option === 'string' && typeof value === 'string') {
386
+ return option === value;
387
+ }
388
+ // For objects, check if the value matches the option or its value property
389
+ const optionValue = this.getOptionValue(option);
390
+ const currentValue = this.getOptionValue(value);
391
+ return optionValue === currentValue || option === value;
392
+ });
393
+ // Only set the value if it's valid, otherwise set null
394
+ this.value.set(isValidValue ? value : null);
395
+ }
396
+ /**
397
+ * Registers a callback function to be called when the value changes
398
+ * @param fn - The callback function
399
+ */
65
400
  registerOnChange(fn) {
66
- this.onControlChange = fn;
401
+ this.onChange = fn;
67
402
  }
403
+ /**
404
+ * Registers a callback function to be called when the component is touched
405
+ * @param fn - The callback function
406
+ */
68
407
  registerOnTouched(fn) {
69
- this.onControlTouch = fn;
408
+ this.onTouched = fn;
70
409
  }
410
+ /**
411
+ * Sets the disabled state of the component
412
+ * @param isDisabled - Whether the component should be disabled
413
+ */
71
414
  setDisabledState(isDisabled) {
72
415
  this.disabled.set(isDisabled);
73
416
  }
74
- // Select handler
75
- onChange = output();
76
- handleSelect() {
77
- this.onChange.emit(this.value());
78
- this.onControlChange(this.value());
417
+ // ==============================================================================
418
+ // PUBLIC METHODS
419
+ // ==============================================================================
420
+ /**
421
+ * Toggles the overlay open/closed state
422
+ * Handles focus management and animation state transitions
423
+ */
424
+ toggleOverlay() {
425
+ const currentState = this.animationState();
426
+ if (currentState === 'closed') {
427
+ this.updateTriggerWidth();
428
+ this.animationState.set('opening');
429
+ // Set first option as active and focus listbox after opening
430
+ setTimeout(() => {
431
+ this.setDefaultActiveOption();
432
+ // Focus the listbox for keyboard navigation
433
+ this.optionsList()?.nativeElement?.focus();
434
+ }, 100);
435
+ }
436
+ else if (currentState === 'open') {
437
+ this.animationState.set('closing');
438
+ }
79
439
  }
80
- // Blur handler
81
- handleBlur() {
82
- this.onControlTouch();
440
+ /**
441
+ * Handles animation end events to update state
442
+ * @param event - The animation event
443
+ */
444
+ onAnimationEnd(event) {
445
+ if (event.animationName === 'fade-in-up') {
446
+ this.animationState.set('open');
447
+ }
448
+ else if (event.animationName === 'fade-out-down') {
449
+ this.animationState.set('closed');
450
+ this.activeOptionIndex.set(-1);
451
+ this.triggerBlur();
452
+ // Return focus to trigger
453
+ setTimeout(() => {
454
+ this.triggerRef()?.nativeElement?.focus();
455
+ }, 0);
456
+ }
83
457
  }
84
- // Checks if options are primitives or not
85
- simpleOption = false;
86
- optionsEffect = effect(() => {
87
- this.simpleOption = this.options().every((option) => typeof option !== 'object');
88
- });
89
- get componentClass() {
90
- return cn(selectComponent({
91
- variant: this.variant(),
92
- size: this.size(),
93
- }), { 'select-bordered': !this.ghost() });
458
+ /**
459
+ * Handles overlay detachment
460
+ * Cleans up state and triggers blur
461
+ */
462
+ handleDetach() {
463
+ this.animationState.set('closed');
464
+ this.activeOptionIndex.set(-1);
465
+ this.triggerBlur();
466
+ // Return focus to trigger
467
+ setTimeout(() => {
468
+ this.triggerRef()?.nativeElement?.focus();
469
+ }, 0);
94
470
  }
95
- get errorClass() {
96
- return cn(selectComponent({
97
- variant: 'error',
98
- size: this.size(),
99
- }), { 'select-bordered': !this.ghost() });
471
+ /**
472
+ * Handles clicks outside the component
473
+ * @param event - The mouse event
474
+ */
475
+ handleClickOutside(event) {
476
+ if (this.animationState() === 'open') {
477
+ this.animationState.set('closing');
478
+ }
479
+ event.stopPropagation();
480
+ this.triggerBlur();
100
481
  }
101
- get successClass() {
102
- return cn(selectComponent({
103
- variant: 'success',
104
- size: this.size(),
105
- }), { 'select-bordered': !this.ghost() });
106
- }
107
- get validationClass() {
108
- if (!this.formField)
109
- return this.componentClass;
110
- if (this.formField.dirty || this.formField.touched) {
111
- if (this.formField.invalid) {
112
- return this.errorClass;
482
+ /**
483
+ * Handles option selection
484
+ * @param option - The selected option
485
+ */
486
+ handleOptionSelect(option) {
487
+ this.value.set(option);
488
+ this.onChange(option);
489
+ this.onTouched();
490
+ this.valueUpdated.emit(option);
491
+ this.animationState.set('closing');
492
+ }
493
+ /**
494
+ * Handles CDK listbox selection changes
495
+ * @param event - The selection change event
496
+ */
497
+ handleSelectionChange(event) {
498
+ if (event.option) {
499
+ this.handleOptionSelect(event.option.value);
500
+ }
501
+ }
502
+ /**
503
+ * Handles keyboard events for option selection
504
+ * @param event - The keyboard event
505
+ */
506
+ handleListboxKeydown(event) {
507
+ const options = this.options();
508
+ const currentIndex = this.activeOptionIndex();
509
+ switch (event.key) {
510
+ case 'ArrowDown': {
511
+ event.preventDefault();
512
+ event.stopPropagation();
513
+ const nextIndex = currentIndex < options.length - 1 ? currentIndex + 1 : 0;
514
+ this.setActiveOption(nextIndex);
515
+ break;
516
+ }
517
+ case 'ArrowUp': {
518
+ event.preventDefault();
519
+ event.stopPropagation();
520
+ const prevIndex = currentIndex > 0 ? currentIndex - 1 : options.length - 1;
521
+ this.setActiveOption(prevIndex);
522
+ break;
113
523
  }
114
- else if (this.formField.valid) {
115
- return this.successClass;
524
+ case 'Enter':
525
+ case ' ':
526
+ event.preventDefault();
527
+ event.stopPropagation();
528
+ if (currentIndex >= 0 && currentIndex < options.length) {
529
+ this.handleOptionSelect(options[currentIndex]);
530
+ }
531
+ break;
532
+ case 'Escape':
533
+ event.preventDefault();
534
+ event.stopPropagation();
535
+ this.animationState.set('closing');
536
+ this.activeOptionIndex.set(-1);
537
+ break;
538
+ }
539
+ }
540
+ /**
541
+ * Handles keyboard events on the trigger button
542
+ * @param event - The keyboard event
543
+ */
544
+ handleTriggerKeydown(event) {
545
+ switch (event.key) {
546
+ case 'ArrowDown':
547
+ case 'ArrowUp':
548
+ case 'Enter':
549
+ case ' ':
550
+ event.preventDefault();
551
+ event.stopPropagation();
552
+ if (this.animationState() === 'closed') {
553
+ this.toggleOverlay();
554
+ }
555
+ else {
556
+ // If already open, handle navigation
557
+ this.handleListboxKeydown(event);
558
+ }
559
+ break;
560
+ case 'Escape':
561
+ if (this.animationState() === 'open') {
562
+ event.preventDefault();
563
+ event.stopPropagation();
564
+ this.animationState.set('closing');
565
+ }
566
+ break;
567
+ }
568
+ }
569
+ /**
570
+ * Clears the current selection
571
+ */
572
+ clearSelection() {
573
+ this.value.set(null);
574
+ this.onChange(null);
575
+ this.onTouched();
576
+ this.valueUpdated.emit(null);
577
+ }
578
+ /**
579
+ * Handles clear selection button click
580
+ * @param event - The click event
581
+ */
582
+ handleClearSelection(event) {
583
+ event.stopPropagation();
584
+ this.clearSelection();
585
+ }
586
+ /**
587
+ * Checks if an option is currently selected
588
+ * @param option - The option to check
589
+ * @returns True if the option is selected
590
+ */
591
+ isOptionSelected(option) {
592
+ const currentValue = this.value();
593
+ if (!currentValue)
594
+ return false;
595
+ // Direct comparison for strings
596
+ if (typeof option === 'string' && typeof currentValue === 'string') {
597
+ return option === currentValue;
598
+ }
599
+ // For objects or mixed types, compare values
600
+ const optionValue = this.getOptionValue(option);
601
+ const currentValueForComparison = this.getOptionValue(currentValue);
602
+ // Also check direct object equality
603
+ return optionValue === currentValueForComparison || option === currentValue;
604
+ }
605
+ /**
606
+ * Checks if an option is currently active for keyboard navigation
607
+ * @param index - The option index
608
+ * @returns True if the option is active
609
+ */
610
+ isActiveOption(index) {
611
+ return this.activeOptionIndex() === index;
612
+ }
613
+ /**
614
+ * Gets the display value for an option
615
+ * @param option - The option to get display value for
616
+ * @returns The display string for the option
617
+ */
618
+ getDisplayValue(option) {
619
+ if (!option)
620
+ return '';
621
+ const displayKey = this.displayKey();
622
+ if (displayKey && typeof option === 'object') {
623
+ return option[displayKey] || '';
624
+ }
625
+ if (typeof option === 'object') {
626
+ const commonKeys = ['name', 'label', 'text', 'title', 'displayName'];
627
+ for (const key of commonKeys) {
628
+ if (option[key] !== undefined && option[key] !== null) {
629
+ return String(option[key]);
630
+ }
631
+ }
632
+ const keys = Object.keys(option);
633
+ for (const key of keys) {
634
+ const value = option[key];
635
+ if (typeof value === 'string' || typeof value === 'number') {
636
+ return String(value);
637
+ }
638
+ }
639
+ return JSON.stringify(option);
640
+ }
641
+ return String(option);
642
+ }
643
+ // ==============================================================================
644
+ // PRIVATE METHODS
645
+ // ==============================================================================
646
+ /**
647
+ * Updates the trigger button width for overlay positioning
648
+ */
649
+ updateTriggerWidth() {
650
+ if (this.triggerRef) {
651
+ const width = this.triggerRef()?.nativeElement.offsetWidth;
652
+ if (!width)
653
+ return;
654
+ this.triggerWidth.set(width);
655
+ }
656
+ }
657
+ /**
658
+ * Gets the value property from an option
659
+ * @param option - The option to get value from
660
+ * @returns The option value
661
+ */
662
+ getOptionValue(option) {
663
+ if (!option)
664
+ return option;
665
+ const valueKey = this.valueKey();
666
+ return valueKey && typeof option === 'object' ? option[valueKey] : option;
667
+ }
668
+ /**
669
+ * Triggers blur event for form validation
670
+ */
671
+ triggerBlur() {
672
+ this.blurTrigger.update((val) => val + 1);
673
+ this.onTouched();
674
+ this.blurred.emit(this.value());
675
+ }
676
+ /**
677
+ * Sets the active option for keyboard navigation
678
+ * @param index - The index of the option to make active
679
+ */
680
+ setActiveOption(index) {
681
+ this.activeOptionIndex.set(index);
682
+ this.updateActiveOptionVisually();
683
+ }
684
+ /**
685
+ * Sets the first option as active by default
686
+ */
687
+ setDefaultActiveOption() {
688
+ const options = this.options();
689
+ if (options.length > 0) {
690
+ this.setActiveOption(0);
691
+ }
692
+ }
693
+ /**
694
+ * Updates the visual state of the active option
695
+ */
696
+ updateActiveOptionVisually() {
697
+ if (!this.optionsList()?.nativeElement)
698
+ return;
699
+ // Remove active class from all options
700
+ const allOptions = this.optionsList()?.nativeElement.querySelectorAll('[data-option-index]');
701
+ if (!allOptions)
702
+ return;
703
+ allOptions.forEach((option) => {
704
+ option.classList.remove('cdk-option-active');
705
+ });
706
+ // Add active class to current option
707
+ const currentIndex = this.activeOptionIndex();
708
+ if (currentIndex >= 0) {
709
+ const activeOption = this.optionsList()?.nativeElement.querySelector(`[data-option-index="${currentIndex}"]`);
710
+ if (activeOption) {
711
+ activeOption.classList.add('cdk-option-active');
712
+ // Scroll into view if needed
713
+ activeOption.scrollIntoView({ block: 'nearest' });
116
714
  }
117
715
  }
118
- return this.componentClass;
119
716
  }
120
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
121
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: SelectComponent, isStandalone: true, selector: "st-select", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, emptyOptionText: { classPropertyName: "emptyOptionText", publicName: "emptyOptionText", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", onChange: "onChange" }, providers: [
717
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
718
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: SelectComponent, isStandalone: true, selector: "st-select", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayKey: { classPropertyName: "displayKey", publicName: "displayKey", isSignal: true, isRequired: false, transformFunction: null }, valueKey: { classPropertyName: "valueKey", publicName: "valueKey", isSignal: true, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", blurred: "blurred", valueUpdated: "valueUpdated" }, providers: [
122
719
  {
123
720
  provide: NG_VALUE_ACCESSOR,
124
721
  useExisting: SelectComponent,
125
722
  multi: true,
126
723
  },
127
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\">{{ label() }}</label>\n\t}\n\t<select\n\t\t[class]=\"validationClass\"\n\t\t[attr.name]=\"name()\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t(ngModelChange)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t>\n\t\t@if (emptyOptionText()) {\n\t\t\t<option value=\"\">\n\t\t\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ emptyOptionText() }}</span>\n\t\t\t</option>\n\t\t}\n\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<option [ngValue]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<option [ngValue]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</option>\n\t\t\t}\n\t\t}\n\t</select>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }] });
724
+ ], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "optionsList", first: true, predicate: ["optionsList"], descendants: true, isSignal: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, isSignal: true }], ngImport: i0, template: "@let isOpen = this.isOpen(); @let isAnimatingOpen = this.isAnimatingOpen(); @let triggerWidth = this.triggerWidth();\n@let dataState = this.dataState(); @let options = this.options(); @let displayValue = this.displayValue();\n@let label = this.label();\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body pt-0 text-pretty\">{{ label }}</legend>\n\t}\n\n\t<button\n\t\t#trigger\n\t\t[class]=\"validationClass()\"\n\t\t(click)=\"toggleOverlay()\"\n\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\ttype=\"button\"\n\t\tcdkOverlayOrigin\n\t\taria-haspopup=\"true\"\n\t\trole=\"combobox\"\n\t\t[attr.aria-controls]=\"'select-list'\"\n\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t[disabled]=\"disabled()\"\n\t>\n\t\t<span class=\"flex-1 truncate text-left\">\n\t\t\t{{ displayValue }}\n\t\t</span>\n\t\t<div class=\"inline-flex items-center justify-items-end gap-2\">\n\t\t\t<!-- Clear button -->\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<div class=\"grid translate-x-full place-content-center\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclass=\"btn font-body btn-sm btn-secondary h-[1.5em] w-[1.5em] items-center p-0 align-top [font-size:inherit] leading-normal font-medium text-pretty\"\n\t\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t[attr.aria-label]=\"'Clear selection'\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<st-icon\n\t\t\t\tclass=\"h-[1.5em] w-[1.5em] flex-0 translate-x-full transition-transform duration-200\"\n\t\t\t\t[class.rotate-180]=\"isAnimatingOpen\"\n\t\t\t\t[icon]=\"iconChevronDown\"\n\t\t\t></st-icon>\n\t\t</div>\n\t</button>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"trigger\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayWidth]=\"triggerWidth\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t>\n\t\t<div\n\t\t\tclass=\"bg-base-200 rounded-box shadow-primary border-neutral data-[state=closing]:animate-fade-out-down data-[state=opening]:animate-fade-in-up data-[state=open]:animate-fade-in-up data-[state=closing]:animate-duration-150 data-[state=opening]:animate-duration-150 data-[state=open]:animate-duration-150 mt-1 w-full overflow-hidden border border-solid\"\n\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t[attr.data-state]=\"dataState\"\n\t\t>\n\t\t\t<!-- Options List -->\n\t\t\t@let menuClass = this.menuClass();\n\t\t\t<ul\n\t\t\t\t[class]=\"menuClass\"\n\t\t\t\tcdkListbox\n\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\taria-labelledby=\"Select options\"\n\t\t\t\trole=\"listbox\"\n\t\t\t\t#optionsList\n\t\t\t\t[tabindex]=\"0\"\n\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t>\n\t\t\t\t@for (option of options; track $index) {\n\t\t\t\t\t<li [cdkOption]=\"option\" class=\"group\" [attr.data-option-index]=\"$index\" [class.cdk-option-active]=\"isActiveOption($index)\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"group-[.cdk-option-active]:bg-base-300 font-body flex w-full items-center justify-between rounded-none px-4 py-2 text-left leading-normal font-normal text-pretty transition-colors duration-150 ease-in-out\"\n\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"flex-1 truncate\">{{ getDisplayValue(option) }}</span>\n\n\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\n\t\t\t\t<!-- Empty state -->\n\t\t\t\t@if (options.length === 0) {\n\t\t\t\t\t<li class=\"text-base-content/60 px-4 py-2 text-center\">\n\t\t\t\t\t\t<span>No options available</span>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t</div>\n\t</ng-template>\n\n\t<!-- Hidden label for accessibility -->\n\t<label class=\"sr-only\" [for]=\"name()\">{{ label }}</label>\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
128
725
  }
129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SelectComponent, decorators: [{
726
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: SelectComponent, decorators: [{
130
727
  type: Component,
131
- args: [{ selector: 'st-select', standalone: true, imports: [FormsModule, TypographyDirective], providers: [
728
+ args: [{ selector: 'st-select', imports: [FormsModule, OverlayModule, PortalModule, CdkListbox, CdkOption, IconComponent], providers: [
132
729
  {
133
730
  provide: NG_VALUE_ACCESSOR,
134
731
  useExisting: SelectComponent,
135
732
  multi: true,
136
733
  },
137
- ], template: "<div class=\"flex flex-col gap-1\">\n\t@if (label()) {\n\t\t<label [for]=\"this.name()\" class=\"block\">{{ label() }}</label>\n\t}\n\t<select\n\t\t[class]=\"validationClass\"\n\t\t[attr.name]=\"name()\"\n\t\t[(ngModel)]=\"value\"\n\t\t[disabled]=\"disabled()\"\n\t\t(ngModelChange)=\"handleSelect()\"\n\t\t(blur)=\"handleBlur()\"\n\t>\n\t\t@if (emptyOptionText()) {\n\t\t\t<option value=\"\">\n\t\t\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ emptyOptionText() }}</span>\n\t\t\t</option>\n\t\t}\n\n\t\t@if (simpleOption) {\n\t\t\t@for (option of options(); track option) {\n\t\t\t\t<option [ngValue]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option }}</span>\n\t\t\t\t</option>\n\t\t\t}\n\t\t} @else {\n\t\t\t@for (option of options(); track option[trackBy()]) {\n\t\t\t\t<option [ngValue]=\"option\">\n\t\t\t\t\t<span typography [tyVariant]=\"'body'\" [tyColor]=\"'base'\" [tyFontWeight]=\"'normal'\">{{ option[key()] }}</span>\n\t\t\t\t</option>\n\t\t\t}\n\t\t}\n\t</select>\n</div>\n" }]
734
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let isOpen = this.isOpen(); @let isAnimatingOpen = this.isAnimatingOpen(); @let triggerWidth = this.triggerWidth();\n@let dataState = this.dataState(); @let options = this.options(); @let displayValue = this.displayValue();\n@let label = this.label();\n\n<fieldset class=\"fieldset p-0\">\n\t@if (label) {\n\t\t<legend class=\"fieldset-legend font-body pt-0 text-pretty\">{{ label }}</legend>\n\t}\n\n\t<button\n\t\t#trigger\n\t\t[class]=\"validationClass()\"\n\t\t(click)=\"toggleOverlay()\"\n\t\t(keydown)=\"handleTriggerKeydown($event)\"\n\t\ttype=\"button\"\n\t\tcdkOverlayOrigin\n\t\taria-haspopup=\"true\"\n\t\trole=\"combobox\"\n\t\t[attr.aria-controls]=\"'select-list'\"\n\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t[disabled]=\"disabled()\"\n\t>\n\t\t<span class=\"flex-1 truncate text-left\">\n\t\t\t{{ displayValue }}\n\t\t</span>\n\t\t<div class=\"inline-flex items-center justify-items-end gap-2\">\n\t\t\t<!-- Clear button -->\n\t\t\t@if (showClearButton()) {\n\t\t\t\t<div class=\"grid translate-x-full place-content-center\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclass=\"btn font-body btn-sm btn-secondary h-[1.5em] w-[1.5em] items-center p-0 align-top [font-size:inherit] leading-normal font-medium text-pretty\"\n\t\t\t\t\t\t(click)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.enter)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t(keydown.space)=\"handleClearSelection($event)\"\n\t\t\t\t\t\t[attr.aria-label]=\"'Clear selection'\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<st-icon [icon]=\"iconClose\"></st-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<st-icon\n\t\t\t\tclass=\"h-[1.5em] w-[1.5em] flex-0 translate-x-full transition-transform duration-200\"\n\t\t\t\t[class.rotate-180]=\"isAnimatingOpen\"\n\t\t\t\t[icon]=\"iconChevronDown\"\n\t\t\t></st-icon>\n\t\t</div>\n\t</button>\n\n\t<ng-template\n\t\tcdkConnectedOverlay\n\t\t[cdkConnectedOverlayOrigin]=\"trigger\"\n\t\t[cdkConnectedOverlayOpen]=\"isOpen\"\n\t\t[cdkConnectedOverlayWidth]=\"triggerWidth\"\n\t\t[cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n\t\t(detach)=\"handleDetach()\"\n\t\t(overlayOutsideClick)=\"handleClickOutside($event)\"\n\t>\n\t\t<div\n\t\t\tclass=\"bg-base-200 rounded-box shadow-primary border-neutral data-[state=closing]:animate-fade-out-down data-[state=opening]:animate-fade-in-up data-[state=open]:animate-fade-in-up data-[state=closing]:animate-duration-150 data-[state=opening]:animate-duration-150 data-[state=open]:animate-duration-150 mt-1 w-full overflow-hidden border border-solid\"\n\t\t\t(animationend)=\"onAnimationEnd($event)\"\n\t\t\t[attr.data-state]=\"dataState\"\n\t\t>\n\t\t\t<!-- Options List -->\n\t\t\t@let menuClass = this.menuClass();\n\t\t\t<ul\n\t\t\t\t[class]=\"menuClass\"\n\t\t\t\tcdkListbox\n\t\t\t\tcdkListboxUseActiveDescendant\n\t\t\t\taria-labelledby=\"Select options\"\n\t\t\t\trole=\"listbox\"\n\t\t\t\t#optionsList\n\t\t\t\t[tabindex]=\"0\"\n\t\t\t\t(keydown)=\"handleListboxKeydown($event)\"\n\t\t\t\t(selectionChange)=\"handleSelectionChange($event)\"\n\t\t\t>\n\t\t\t\t@for (option of options; track $index) {\n\t\t\t\t\t<li [cdkOption]=\"option\" class=\"group\" [attr.data-option-index]=\"$index\" [class.cdk-option-active]=\"isActiveOption($index)\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tclass=\"group-[.cdk-option-active]:bg-base-300 font-body flex w-full items-center justify-between rounded-none px-4 py-2 text-left leading-normal font-normal text-pretty transition-colors duration-150 ease-in-out\"\n\t\t\t\t\t\t\t(click)=\"handleOptionSelect(option)\"\n\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"flex-1 truncate\">{{ getDisplayValue(option) }}</span>\n\n\t\t\t\t\t\t\t@if (isOptionSelected(option)) {\n\t\t\t\t\t\t\t\t<st-icon class=\"h-4 w-4 shrink-0\" [icon]=\"iconCheck\"></st-icon>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\n\t\t\t\t<!-- Empty state -->\n\t\t\t\t@if (options.length === 0) {\n\t\t\t\t\t<li class=\"text-base-content/60 px-4 py-2 text-center\">\n\t\t\t\t\t\t<span>No options available</span>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t</div>\n\t</ng-template>\n\n\t<!-- Hidden label for accessibility -->\n\t<label class=\"sr-only\" [for]=\"name()\">{{ label }}</label>\n\n\t<!-- Additional content -->\n\t<ng-content></ng-content>\n</fieldset>\n" }]
138
735
  }] });
139
736
 
140
737
  /**