@forgeroute/ui 0.5.16 → 0.5.18

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 (345) hide show
  1. package/fesm2022/forgeroute-ui-action-bar.mjs +190 -0
  2. package/fesm2022/forgeroute-ui-action-bar.mjs.map +1 -0
  3. package/fesm2022/forgeroute-ui-address-input.mjs +1164 -0
  4. package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -0
  5. package/fesm2022/forgeroute-ui-alert.mjs +223 -0
  6. package/fesm2022/forgeroute-ui-alert.mjs.map +1 -0
  7. package/fesm2022/forgeroute-ui-avatar.mjs +320 -0
  8. package/fesm2022/forgeroute-ui-avatar.mjs.map +1 -0
  9. package/fesm2022/forgeroute-ui-badge.mjs +158 -0
  10. package/fesm2022/forgeroute-ui-badge.mjs.map +1 -0
  11. package/fesm2022/forgeroute-ui-bar-row.mjs +255 -0
  12. package/fesm2022/forgeroute-ui-bar-row.mjs.map +1 -0
  13. package/fesm2022/forgeroute-ui-boards.mjs +2201 -0
  14. package/fesm2022/forgeroute-ui-boards.mjs.map +1 -0
  15. package/fesm2022/forgeroute-ui-bulk-eligible.mjs +172 -0
  16. package/fesm2022/forgeroute-ui-bulk-eligible.mjs.map +1 -0
  17. package/fesm2022/forgeroute-ui-business-hours.mjs +771 -0
  18. package/fesm2022/forgeroute-ui-business-hours.mjs.map +1 -0
  19. package/fesm2022/forgeroute-ui-calendar.mjs +2006 -0
  20. package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -0
  21. package/fesm2022/forgeroute-ui-card-list-item.mjs +556 -0
  22. package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -0
  23. package/fesm2022/forgeroute-ui-charts.mjs +1 -1
  24. package/fesm2022/forgeroute-ui-charts.mjs.map +1 -1
  25. package/fesm2022/forgeroute-ui-checkbox.mjs +815 -0
  26. package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -0
  27. package/fesm2022/forgeroute-ui-chip.mjs +379 -0
  28. package/fesm2022/forgeroute-ui-chip.mjs.map +1 -0
  29. package/fesm2022/forgeroute-ui-color-input.mjs +492 -0
  30. package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -0
  31. package/fesm2022/forgeroute-ui-column-filter.mjs +645 -0
  32. package/fesm2022/forgeroute-ui-column-filter.mjs.map +1 -0
  33. package/fesm2022/forgeroute-ui-columns.mjs +351 -0
  34. package/fesm2022/forgeroute-ui-columns.mjs.map +1 -0
  35. package/fesm2022/forgeroute-ui-combobox.mjs +772 -0
  36. package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -0
  37. package/fesm2022/forgeroute-ui-confirm.mjs +48 -0
  38. package/fesm2022/forgeroute-ui-confirm.mjs.map +1 -0
  39. package/fesm2022/forgeroute-ui-contact-picker.mjs +865 -0
  40. package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -0
  41. package/fesm2022/forgeroute-ui-conversations.mjs +3627 -0
  42. package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -0
  43. package/fesm2022/forgeroute-ui-copy-field.mjs +378 -0
  44. package/fesm2022/forgeroute-ui-copy-field.mjs.map +1 -0
  45. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzj_XJJM.mjs → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs} +186 -2
  46. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzj_XJJM.mjs.map → forgeroute-ui-core-ui-labels.es-Woi3az70.mjs.map} +1 -1
  47. package/fesm2022/forgeroute-ui-core.mjs +186 -2
  48. package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
  49. package/fesm2022/forgeroute-ui-data-table-core.mjs +6150 -0
  50. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -0
  51. package/fesm2022/forgeroute-ui-date-input.mjs +384 -0
  52. package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -0
  53. package/fesm2022/forgeroute-ui-date-range-picker.mjs +453 -0
  54. package/fesm2022/forgeroute-ui-date-range-picker.mjs.map +1 -0
  55. package/fesm2022/forgeroute-ui-datetime-input.mjs +375 -0
  56. package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -0
  57. package/fesm2022/forgeroute-ui-detail-card.mjs +655 -0
  58. package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -0
  59. package/fesm2022/forgeroute-ui-discount-selector.mjs +259 -0
  60. package/fesm2022/forgeroute-ui-discount-selector.mjs.map +1 -0
  61. package/fesm2022/forgeroute-ui-divider.mjs +111 -0
  62. package/fesm2022/forgeroute-ui-divider.mjs.map +1 -0
  63. package/fesm2022/forgeroute-ui-dropdown.mjs +550 -0
  64. package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -0
  65. package/fesm2022/forgeroute-ui-editor.mjs +4545 -0
  66. package/fesm2022/forgeroute-ui-editor.mjs.map +1 -0
  67. package/fesm2022/forgeroute-ui-empty-state.mjs +231 -0
  68. package/fesm2022/forgeroute-ui-empty-state.mjs.map +1 -0
  69. package/fesm2022/forgeroute-ui-error-state.mjs +195 -0
  70. package/fesm2022/forgeroute-ui-error-state.mjs.map +1 -0
  71. package/fesm2022/forgeroute-ui-error.mjs +93 -0
  72. package/fesm2022/forgeroute-ui-error.mjs.map +1 -0
  73. package/fesm2022/forgeroute-ui-fade.mjs +117 -0
  74. package/fesm2022/forgeroute-ui-fade.mjs.map +1 -0
  75. package/fesm2022/forgeroute-ui-file-input.mjs +999 -0
  76. package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -0
  77. package/fesm2022/forgeroute-ui-fixed-footer.mjs +115 -0
  78. package/fesm2022/forgeroute-ui-fixed-footer.mjs.map +1 -0
  79. package/fesm2022/forgeroute-ui-form-row.mjs +126 -0
  80. package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -0
  81. package/fesm2022/forgeroute-ui-form-section.mjs +93 -0
  82. package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -0
  83. package/fesm2022/forgeroute-ui-form.mjs +139 -0
  84. package/fesm2022/forgeroute-ui-form.mjs.map +1 -0
  85. package/fesm2022/forgeroute-ui-hint.mjs +47 -0
  86. package/fesm2022/forgeroute-ui-hint.mjs.map +1 -0
  87. package/fesm2022/forgeroute-ui-icon-picker.mjs +424 -0
  88. package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -0
  89. package/fesm2022/forgeroute-ui-icon.mjs +311 -0
  90. package/fesm2022/forgeroute-ui-icon.mjs.map +1 -0
  91. package/fesm2022/forgeroute-ui-image-preview.mjs +237 -0
  92. package/fesm2022/forgeroute-ui-image-preview.mjs.map +1 -0
  93. package/fesm2022/forgeroute-ui-keypad.mjs +278 -0
  94. package/fesm2022/forgeroute-ui-keypad.mjs.map +1 -0
  95. package/fesm2022/forgeroute-ui-kpi-card.mjs +490 -0
  96. package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -0
  97. package/fesm2022/forgeroute-ui-language-switcher.mjs +134 -0
  98. package/fesm2022/forgeroute-ui-language-switcher.mjs.map +1 -0
  99. package/fesm2022/forgeroute-ui-layout.mjs +18 -0
  100. package/fesm2022/forgeroute-ui-layout.mjs.map +1 -0
  101. package/fesm2022/forgeroute-ui-list-item.mjs +620 -0
  102. package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -0
  103. package/fesm2022/forgeroute-ui-list.mjs +866 -0
  104. package/fesm2022/forgeroute-ui-list.mjs.map +1 -0
  105. package/fesm2022/forgeroute-ui-live-region.mjs +118 -0
  106. package/fesm2022/forgeroute-ui-live-region.mjs.map +1 -0
  107. package/fesm2022/forgeroute-ui-map.mjs +5 -1
  108. package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
  109. package/fesm2022/forgeroute-ui-maps.mjs +2 -1
  110. package/fesm2022/forgeroute-ui-maps.mjs.map +1 -1
  111. package/fesm2022/forgeroute-ui-media.mjs +4615 -0
  112. package/fesm2022/forgeroute-ui-media.mjs.map +1 -0
  113. package/fesm2022/forgeroute-ui-messaging.mjs +20 -1
  114. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  115. package/fesm2022/forgeroute-ui-more-menu.mjs +418 -0
  116. package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -0
  117. package/fesm2022/forgeroute-ui-multi-select.mjs +532 -0
  118. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -0
  119. package/fesm2022/forgeroute-ui-notes.mjs +768 -0
  120. package/fesm2022/forgeroute-ui-notes.mjs.map +1 -0
  121. package/fesm2022/forgeroute-ui-notification-bell.mjs +587 -0
  122. package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -0
  123. package/fesm2022/forgeroute-ui-offline-banner.mjs +156 -0
  124. package/fesm2022/forgeroute-ui-offline-banner.mjs.map +1 -0
  125. package/fesm2022/forgeroute-ui-option-card.mjs +379 -0
  126. package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -0
  127. package/fesm2022/forgeroute-ui-page.mjs +317 -0
  128. package/fesm2022/forgeroute-ui-page.mjs.map +1 -0
  129. package/fesm2022/forgeroute-ui-pagination.mjs +225 -0
  130. package/fesm2022/forgeroute-ui-pagination.mjs.map +1 -0
  131. package/fesm2022/forgeroute-ui-panel-info-list.mjs +422 -0
  132. package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -0
  133. package/fesm2022/forgeroute-ui-password-requirements.mjs +237 -0
  134. package/fesm2022/forgeroute-ui-password-requirements.mjs.map +1 -0
  135. package/fesm2022/forgeroute-ui-payments.mjs +6258 -0
  136. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -0
  137. package/fesm2022/forgeroute-ui-pdf.mjs +9 -1
  138. package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
  139. package/fesm2022/forgeroute-ui-phone-number-picker.mjs +840 -0
  140. package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -0
  141. package/fesm2022/forgeroute-ui-pill-tabs.mjs +546 -0
  142. package/fesm2022/forgeroute-ui-pill-tabs.mjs.map +1 -0
  143. package/fesm2022/forgeroute-ui-print.mjs +76 -0
  144. package/fesm2022/forgeroute-ui-print.mjs.map +1 -0
  145. package/fesm2022/forgeroute-ui-progress-bar.mjs +252 -0
  146. package/fesm2022/forgeroute-ui-progress-bar.mjs.map +1 -0
  147. package/fesm2022/forgeroute-ui-progress-ring.mjs +277 -0
  148. package/fesm2022/forgeroute-ui-progress-ring.mjs.map +1 -0
  149. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs +301 -0
  150. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs.map +1 -0
  151. package/fesm2022/forgeroute-ui-quickbooks.mjs +18 -1
  152. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  153. package/fesm2022/forgeroute-ui-radio-matrix.mjs +471 -0
  154. package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -0
  155. package/fesm2022/forgeroute-ui-radio.mjs +911 -0
  156. package/fesm2022/forgeroute-ui-radio.mjs.map +1 -0
  157. package/fesm2022/forgeroute-ui-read-only-mode.mjs +15 -0
  158. package/fesm2022/forgeroute-ui-read-only-mode.mjs.map +1 -0
  159. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs +146 -0
  160. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs.map +1 -0
  161. package/fesm2022/forgeroute-ui-reminder-alerts.mjs +249 -0
  162. package/fesm2022/forgeroute-ui-reminder-alerts.mjs.map +1 -0
  163. package/fesm2022/forgeroute-ui-search-input.mjs +373 -0
  164. package/fesm2022/forgeroute-ui-search-input.mjs.map +1 -0
  165. package/fesm2022/forgeroute-ui-section-header.mjs +296 -0
  166. package/fesm2022/forgeroute-ui-section-header.mjs.map +1 -0
  167. package/fesm2022/forgeroute-ui-select.mjs +498 -0
  168. package/fesm2022/forgeroute-ui-select.mjs.map +1 -0
  169. package/fesm2022/forgeroute-ui-setup.mjs +4649 -0
  170. package/fesm2022/forgeroute-ui-setup.mjs.map +1 -0
  171. package/fesm2022/forgeroute-ui-share-menu.mjs +461 -0
  172. package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -0
  173. package/fesm2022/forgeroute-ui-shell.mjs +981 -0
  174. package/fesm2022/forgeroute-ui-shell.mjs.map +1 -0
  175. package/fesm2022/forgeroute-ui-show.mjs +129 -0
  176. package/fesm2022/forgeroute-ui-show.mjs.map +1 -0
  177. package/fesm2022/forgeroute-ui-sidebar-layout.mjs +355 -0
  178. package/fesm2022/forgeroute-ui-sidebar-layout.mjs.map +1 -0
  179. package/fesm2022/forgeroute-ui-skeleton.mjs +152 -0
  180. package/fesm2022/forgeroute-ui-skeleton.mjs.map +1 -0
  181. package/fesm2022/forgeroute-ui-skip-link.mjs +129 -0
  182. package/fesm2022/forgeroute-ui-skip-link.mjs.map +1 -0
  183. package/fesm2022/forgeroute-ui-snackbar.mjs +200 -0
  184. package/fesm2022/forgeroute-ui-snackbar.mjs.map +1 -0
  185. package/fesm2022/forgeroute-ui-square.mjs +15 -1
  186. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  187. package/fesm2022/forgeroute-ui-stack.mjs +233 -0
  188. package/fesm2022/forgeroute-ui-stack.mjs.map +1 -0
  189. package/fesm2022/forgeroute-ui-stacked-bar.mjs +200 -0
  190. package/fesm2022/forgeroute-ui-stacked-bar.mjs.map +1 -0
  191. package/fesm2022/forgeroute-ui-stacking-plan.mjs +365 -0
  192. package/fesm2022/forgeroute-ui-stacking-plan.mjs.map +1 -0
  193. package/fesm2022/forgeroute-ui-star-rating.mjs +498 -0
  194. package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -0
  195. package/fesm2022/forgeroute-ui-star.mjs +184 -0
  196. package/fesm2022/forgeroute-ui-star.mjs.map +1 -0
  197. package/fesm2022/forgeroute-ui-stepper.mjs +615 -0
  198. package/fesm2022/forgeroute-ui-stepper.mjs.map +1 -0
  199. package/fesm2022/forgeroute-ui-stripe.mjs +6254 -1188
  200. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  201. package/fesm2022/forgeroute-ui-swatch-picker.mjs +416 -0
  202. package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -0
  203. package/fesm2022/forgeroute-ui-table-toolbar.mjs +770 -0
  204. package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -0
  205. package/fesm2022/forgeroute-ui-table-types.mjs +277 -0
  206. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -0
  207. package/fesm2022/forgeroute-ui-text-input.mjs +1003 -0
  208. package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -0
  209. package/fesm2022/forgeroute-ui-text-template-picker.mjs +356 -0
  210. package/fesm2022/forgeroute-ui-text-template-picker.mjs.map +1 -0
  211. package/fesm2022/forgeroute-ui-text.mjs +195 -0
  212. package/fesm2022/forgeroute-ui-text.mjs.map +1 -0
  213. package/fesm2022/forgeroute-ui-textarea-input.mjs +542 -0
  214. package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -0
  215. package/fesm2022/forgeroute-ui-time-input.mjs +401 -0
  216. package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -0
  217. package/fesm2022/forgeroute-ui-timeline.mjs +549 -0
  218. package/fesm2022/forgeroute-ui-timeline.mjs.map +1 -0
  219. package/fesm2022/forgeroute-ui-toast.mjs +507 -0
  220. package/fesm2022/forgeroute-ui-toast.mjs.map +1 -0
  221. package/fesm2022/forgeroute-ui-toggle-badge.mjs +177 -0
  222. package/fesm2022/forgeroute-ui-toggle-badge.mjs.map +1 -0
  223. package/fesm2022/forgeroute-ui-toggle.mjs +275 -0
  224. package/fesm2022/forgeroute-ui-toggle.mjs.map +1 -0
  225. package/fesm2022/forgeroute-ui-tooltip.mjs +155 -0
  226. package/fesm2022/forgeroute-ui-tooltip.mjs.map +1 -0
  227. package/fesm2022/forgeroute-ui-utils.mjs +1071 -0
  228. package/fesm2022/forgeroute-ui-utils.mjs.map +1 -0
  229. package/fesm2022/forgeroute-ui.mjs +105 -70663
  230. package/package.json +422 -2
  231. package/types/forgeroute-ui-action-bar.d.ts +74 -0
  232. package/types/forgeroute-ui-address-input.d.ts +354 -0
  233. package/types/forgeroute-ui-alert.d.ts +89 -0
  234. package/types/forgeroute-ui-avatar.d.ts +85 -0
  235. package/types/forgeroute-ui-badge.d.ts +45 -0
  236. package/types/forgeroute-ui-bar-row.d.ts +90 -0
  237. package/types/forgeroute-ui-boards.d.ts +575 -0
  238. package/types/forgeroute-ui-bulk-eligible.d.ts +53 -0
  239. package/types/forgeroute-ui-business-hours.d.ts +191 -0
  240. package/types/forgeroute-ui-calendar.d.ts +544 -0
  241. package/types/forgeroute-ui-card-list-item.d.ts +186 -0
  242. package/types/forgeroute-ui-charts.d.ts +1 -1
  243. package/types/forgeroute-ui-checkbox.d.ts +270 -0
  244. package/types/forgeroute-ui-chip.d.ts +125 -0
  245. package/types/forgeroute-ui-color-input.d.ts +160 -0
  246. package/types/forgeroute-ui-column-filter.d.ts +130 -0
  247. package/types/forgeroute-ui-columns.d.ts +150 -0
  248. package/types/forgeroute-ui-combobox.d.ts +252 -0
  249. package/types/forgeroute-ui-confirm.d.ts +34 -0
  250. package/types/forgeroute-ui-contact-picker.d.ts +173 -0
  251. package/types/forgeroute-ui-conversations.d.ts +993 -0
  252. package/types/forgeroute-ui-copy-field.d.ts +122 -0
  253. package/types/forgeroute-ui-core.d.ts +188 -4
  254. package/types/forgeroute-ui-data-table-core.d.ts +1221 -0
  255. package/types/forgeroute-ui-date-input.d.ts +101 -0
  256. package/types/forgeroute-ui-date-range-picker.d.ts +109 -0
  257. package/types/forgeroute-ui-datetime-input.d.ts +97 -0
  258. package/types/forgeroute-ui-detail-card.d.ts +252 -0
  259. package/types/forgeroute-ui-discount-selector.d.ts +57 -0
  260. package/types/forgeroute-ui-divider.d.ts +40 -0
  261. package/types/forgeroute-ui-dropdown.d.ts +156 -0
  262. package/types/forgeroute-ui-editor.d.ts +873 -0
  263. package/types/forgeroute-ui-empty-state.d.ts +29 -0
  264. package/types/forgeroute-ui-error-state.d.ts +38 -0
  265. package/types/forgeroute-ui-error.d.ts +29 -0
  266. package/types/forgeroute-ui-fade.d.ts +39 -0
  267. package/types/forgeroute-ui-file-input.d.ts +337 -0
  268. package/types/forgeroute-ui-fixed-footer.d.ts +53 -0
  269. package/types/forgeroute-ui-form-row.d.ts +30 -0
  270. package/types/forgeroute-ui-form-section.d.ts +18 -0
  271. package/types/forgeroute-ui-form.d.ts +68 -0
  272. package/types/forgeroute-ui-hint.d.ts +10 -0
  273. package/types/forgeroute-ui-icon-picker.d.ts +122 -0
  274. package/types/forgeroute-ui-icon.d.ts +95 -0
  275. package/types/forgeroute-ui-image-preview.d.ts +88 -0
  276. package/types/forgeroute-ui-keypad.d.ts +73 -0
  277. package/types/forgeroute-ui-kpi-card.d.ts +161 -0
  278. package/types/forgeroute-ui-language-switcher.d.ts +41 -0
  279. package/types/forgeroute-ui-layout.d.ts +13 -0
  280. package/types/forgeroute-ui-list-item.d.ts +253 -0
  281. package/types/forgeroute-ui-list.d.ts +282 -0
  282. package/types/forgeroute-ui-live-region.d.ts +49 -0
  283. package/types/forgeroute-ui-map.d.ts +1 -1
  284. package/types/forgeroute-ui-maps.d.ts +1 -1
  285. package/types/forgeroute-ui-media.d.ts +1221 -0
  286. package/types/forgeroute-ui-messaging.d.ts +11 -6
  287. package/types/forgeroute-ui-more-menu.d.ts +91 -0
  288. package/types/forgeroute-ui-multi-select.d.ts +119 -0
  289. package/types/forgeroute-ui-notes.d.ts +172 -0
  290. package/types/forgeroute-ui-notification-bell.d.ts +135 -0
  291. package/types/forgeroute-ui-offline-banner.d.ts +44 -0
  292. package/types/forgeroute-ui-option-card.d.ts +106 -0
  293. package/types/forgeroute-ui-page.d.ts +115 -0
  294. package/types/forgeroute-ui-pagination.d.ts +55 -0
  295. package/types/forgeroute-ui-panel-info-list.d.ts +147 -0
  296. package/types/forgeroute-ui-password-requirements.d.ts +89 -0
  297. package/types/forgeroute-ui-payments.d.ts +1826 -0
  298. package/types/forgeroute-ui-pdf.d.ts +1 -1
  299. package/types/forgeroute-ui-phone-number-picker.d.ts +199 -0
  300. package/types/forgeroute-ui-pill-tabs.d.ts +208 -0
  301. package/types/forgeroute-ui-print.d.ts +40 -0
  302. package/types/forgeroute-ui-progress-bar.d.ts +88 -0
  303. package/types/forgeroute-ui-progress-ring.d.ts +102 -0
  304. package/types/forgeroute-ui-quick-filter-tabs.d.ts +51 -0
  305. package/types/forgeroute-ui-quickbooks.d.ts +6 -3
  306. package/types/forgeroute-ui-radio-matrix.d.ts +131 -0
  307. package/types/forgeroute-ui-radio.d.ts +311 -0
  308. package/types/forgeroute-ui-read-only-mode.d.ts +26 -0
  309. package/types/forgeroute-ui-readonly-fieldset.d.ts +62 -0
  310. package/types/forgeroute-ui-reminder-alerts.d.ts +71 -0
  311. package/types/forgeroute-ui-search-input.d.ts +93 -0
  312. package/types/forgeroute-ui-section-header.d.ts +149 -0
  313. package/types/forgeroute-ui-select.d.ts +183 -0
  314. package/types/forgeroute-ui-setup.d.ts +775 -0
  315. package/types/forgeroute-ui-share-menu.d.ts +99 -0
  316. package/types/forgeroute-ui-shell.d.ts +173 -0
  317. package/types/forgeroute-ui-show.d.ts +40 -0
  318. package/types/forgeroute-ui-sidebar-layout.d.ts +161 -0
  319. package/types/forgeroute-ui-skeleton.d.ts +51 -0
  320. package/types/forgeroute-ui-skip-link.d.ts +51 -0
  321. package/types/forgeroute-ui-snackbar.d.ts +50 -0
  322. package/types/forgeroute-ui-square.d.ts +5 -3
  323. package/types/forgeroute-ui-stack.d.ts +99 -0
  324. package/types/forgeroute-ui-stacked-bar.d.ts +84 -0
  325. package/types/forgeroute-ui-stacking-plan.d.ts +116 -0
  326. package/types/forgeroute-ui-star-rating.d.ts +151 -0
  327. package/types/forgeroute-ui-star.d.ts +46 -0
  328. package/types/forgeroute-ui-stepper.d.ts +273 -0
  329. package/types/forgeroute-ui-stripe.d.ts +1458 -3
  330. package/types/forgeroute-ui-swatch-picker.d.ts +118 -0
  331. package/types/forgeroute-ui-table-toolbar.d.ts +116 -0
  332. package/types/forgeroute-ui-table-types.d.ts +624 -0
  333. package/types/forgeroute-ui-text-input.d.ts +359 -0
  334. package/types/forgeroute-ui-text-template-picker.d.ts +100 -0
  335. package/types/forgeroute-ui-text.d.ts +76 -0
  336. package/types/forgeroute-ui-textarea-input.d.ts +174 -0
  337. package/types/forgeroute-ui-time-input.d.ts +105 -0
  338. package/types/forgeroute-ui-timeline.d.ts +196 -0
  339. package/types/forgeroute-ui-toast.d.ts +131 -0
  340. package/types/forgeroute-ui-toggle-badge.d.ts +64 -0
  341. package/types/forgeroute-ui-toggle.d.ts +92 -0
  342. package/types/forgeroute-ui-tooltip.d.ts +36 -0
  343. package/types/forgeroute-ui-utils.d.ts +210 -0
  344. package/types/forgeroute-ui.d.ts +106 -19539
  345. package/fesm2022/forgeroute-ui.mjs.map +0 -1
@@ -0,0 +1,177 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, inject, input, output } from "@angular/core";
3
+ import { TooltipDirective } from "@forgeroute/ui/tooltip";
4
+ import { UiLabelsService } from "@forgeroute/ui/core";
5
+ var ToggleBadgeComponent = class ToggleBadgeComponent {
6
+ constructor() {
7
+ this.labels = inject(UiLabelsService);
8
+ this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
9
+ this.active = input(false, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
10
+ this.actions = input([], ...ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []);
11
+ this.tooltip = input("", ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
12
+ this.toggle = output();
13
+ this.action = output();
14
+ }
15
+ static {
16
+ this.ɵfac = i0.ɵɵngDeclareFactory({
17
+ minVersion: "12.0.0",
18
+ version: "22.2.2",
19
+ ngImport: i0,
20
+ type: ToggleBadgeComponent,
21
+ deps: [],
22
+ target: i0.ɵɵFactoryTarget.Component
23
+ });
24
+ }
25
+ static {
26
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
27
+ minVersion: "17.0.0",
28
+ version: "22.2.2",
29
+ type: ToggleBadgeComponent,
30
+ isStandalone: true,
31
+ selector: "ui-toggle-badge",
32
+ inputs: {
33
+ label: {
34
+ classPropertyName: "label",
35
+ publicName: "label",
36
+ isSignal: true,
37
+ isRequired: false,
38
+ transformFunction: null
39
+ },
40
+ active: {
41
+ classPropertyName: "active",
42
+ publicName: "active",
43
+ isSignal: true,
44
+ isRequired: false,
45
+ transformFunction: null
46
+ },
47
+ actions: {
48
+ classPropertyName: "actions",
49
+ publicName: "actions",
50
+ isSignal: true,
51
+ isRequired: false,
52
+ transformFunction: null
53
+ },
54
+ tooltip: {
55
+ classPropertyName: "tooltip",
56
+ publicName: "tooltip",
57
+ isSignal: true,
58
+ isRequired: false,
59
+ transformFunction: null
60
+ }
61
+ },
62
+ outputs: {
63
+ toggle: "toggle",
64
+ action: "action"
65
+ },
66
+ ngImport: i0,
67
+ template: `
68
+ <span class="tb" [class.active]="active()" [class.tb-has-actions]="actions().length > 0">
69
+ <button type="button" class="toggle-badge" [class.active]="active()" [attr.aria-pressed]="active()" [uiTooltip]="tooltip()" (click)="toggle.emit()">
70
+ <ng-content />
71
+ {{ label() }}
72
+ </button>
73
+ @if (actions().length > 0) {
74
+ <span class="tb-actions" role="group" [attr.aria-label]="labels.t('toggleBadge.actions', { label: label() }).trim()">
75
+ <span class="tb-divider" aria-hidden="true"></span>
76
+ @for (a of actions(); track a.id) {
77
+ <button type="button" class="tb-action" [disabled]="a.disabled ?? false" [attr.aria-label]="a.label" [uiTooltip]="a.tooltip || a.label"
78
+ (click)="action.emit(a.id)">
79
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="a.icon" /></svg>
80
+ </button>
81
+ }
82
+ </span>
83
+ }
84
+ </span>
85
+ `,
86
+ isInline: true,
87
+ styles: [":host{display:inline-flex}.tb{display:inline-flex;align-items:center;border-radius:999px;border:1px solid #e2e8f0;background:#fff;color:#64748b;transition:all .15s ease}.tb:hover{background:#f8fafc;border-color:#94a3b8}.tb.active{background:#1e293b;color:#fff;border-color:#1e293b}.toggle-badge{display:inline-flex;align-items:center;gap:5px;padding:var(--ui-toggle-badge-pad-y, 3px) var(--ui-toggle-badge-pad-x, 10px);border-radius:999px;border:none;background:transparent;font-size:.75rem;font-weight:500;color:inherit;cursor:pointer;font-family:inherit;line-height:1}.toggle-badge:focus-visible,.tb-action:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.tb-has-actions .toggle-badge{padding-right:6px}@media(pointer:coarse){.toggle-badge{position:relative}.toggle-badge:after{content:\"\";position:absolute;left:-4px;right:-4px;top:50%;height:44px;transform:translateY(-50%)}}.tb-actions{display:inline-flex;align-items:center;gap:1px;padding-right:4px}.tb-divider{width:1px;height:12px;background:currentColor;opacity:.25;margin-right:3px}.tb-action{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:none;border-radius:50%;background:transparent;color:inherit;cursor:pointer;opacity:.75;font-family:inherit;transition:background .15s ease,opacity .15s ease}.tb-action:hover:not(:disabled){opacity:1;background:#64748b2e}.tb.active .tb-action:hover:not(:disabled){background:#fff3}.tb-action:disabled{opacity:.35;cursor:not-allowed}@media(pointer:coarse){.tb-action{position:relative}.tb-action+.tb-action{margin-left:23px}.tb-action:after{content:\"\";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%)}}\n"],
88
+ dependencies: [{
89
+ kind: "directive",
90
+ type: TooltipDirective,
91
+ selector: "[uiTooltip]",
92
+ inputs: ["uiTooltip", "tooltipPosition"]
93
+ }],
94
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
95
+ });
96
+ }
97
+ };
98
+ i0.ɵɵngDeclareClassMetadata({
99
+ minVersion: "12.0.0",
100
+ version: "22.2.2",
101
+ ngImport: i0,
102
+ type: ToggleBadgeComponent,
103
+ decorators: [{
104
+ type: Component,
105
+ args: [{
106
+ selector: "ui-toggle-badge",
107
+ standalone: true,
108
+ imports: [TooltipDirective],
109
+ changeDetection: ChangeDetectionStrategy.OnPush,
110
+ template: `
111
+ <span class="tb" [class.active]="active()" [class.tb-has-actions]="actions().length > 0">
112
+ <button type="button" class="toggle-badge" [class.active]="active()" [attr.aria-pressed]="active()" [uiTooltip]="tooltip()" (click)="toggle.emit()">
113
+ <ng-content />
114
+ {{ label() }}
115
+ </button>
116
+ @if (actions().length > 0) {
117
+ <span class="tb-actions" role="group" [attr.aria-label]="labels.t('toggleBadge.actions', { label: label() }).trim()">
118
+ <span class="tb-divider" aria-hidden="true"></span>
119
+ @for (a of actions(); track a.id) {
120
+ <button type="button" class="tb-action" [disabled]="a.disabled ?? false" [attr.aria-label]="a.label" [uiTooltip]="a.tooltip || a.label"
121
+ (click)="action.emit(a.id)">
122
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="a.icon" /></svg>
123
+ </button>
124
+ }
125
+ </span>
126
+ }
127
+ </span>
128
+ `,
129
+ styles: [":host{display:inline-flex}.tb{display:inline-flex;align-items:center;border-radius:999px;border:1px solid #e2e8f0;background:#fff;color:#64748b;transition:all .15s ease}.tb:hover{background:#f8fafc;border-color:#94a3b8}.tb.active{background:#1e293b;color:#fff;border-color:#1e293b}.toggle-badge{display:inline-flex;align-items:center;gap:5px;padding:var(--ui-toggle-badge-pad-y, 3px) var(--ui-toggle-badge-pad-x, 10px);border-radius:999px;border:none;background:transparent;font-size:.75rem;font-weight:500;color:inherit;cursor:pointer;font-family:inherit;line-height:1}.toggle-badge:focus-visible,.tb-action:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.tb-has-actions .toggle-badge{padding-right:6px}@media(pointer:coarse){.toggle-badge{position:relative}.toggle-badge:after{content:\"\";position:absolute;left:-4px;right:-4px;top:50%;height:44px;transform:translateY(-50%)}}.tb-actions{display:inline-flex;align-items:center;gap:1px;padding-right:4px}.tb-divider{width:1px;height:12px;background:currentColor;opacity:.25;margin-right:3px}.tb-action{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:none;border-radius:50%;background:transparent;color:inherit;cursor:pointer;opacity:.75;font-family:inherit;transition:background .15s ease,opacity .15s ease}.tb-action:hover:not(:disabled){opacity:1;background:#64748b2e}.tb.active .tb-action:hover:not(:disabled){background:#fff3}.tb-action:disabled{opacity:.35;cursor:not-allowed}@media(pointer:coarse){.tb-action{position:relative}.tb-action+.tb-action{margin-left:23px}.tb-action:after{content:\"\";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%)}}\n"]
130
+ }]
131
+ }],
132
+ propDecorators: {
133
+ label: [{
134
+ type: i0.Input,
135
+ args: [{
136
+ isSignal: true,
137
+ alias: "label",
138
+ required: false
139
+ }]
140
+ }],
141
+ active: [{
142
+ type: i0.Input,
143
+ args: [{
144
+ isSignal: true,
145
+ alias: "active",
146
+ required: false
147
+ }]
148
+ }],
149
+ actions: [{
150
+ type: i0.Input,
151
+ args: [{
152
+ isSignal: true,
153
+ alias: "actions",
154
+ required: false
155
+ }]
156
+ }],
157
+ tooltip: [{
158
+ type: i0.Input,
159
+ args: [{
160
+ isSignal: true,
161
+ alias: "tooltip",
162
+ required: false
163
+ }]
164
+ }],
165
+ toggle: [{
166
+ type: i0.Output,
167
+ args: ["toggle"]
168
+ }],
169
+ action: [{
170
+ type: i0.Output,
171
+ args: ["action"]
172
+ }]
173
+ }
174
+ });
175
+ export { ToggleBadgeComponent };
176
+
177
+ //# sourceMappingURL=forgeroute-ui-toggle-badge.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-toggle-badge.mjs","names":[],"sources":["../../../projects/forgeroute-ui/toggle-badge/src/lib/toggle-badge/toggle-badge.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output, inject } from '@angular/core';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** A small icon button shown inside a toggle badge, after the label (e.g. Configure, Analytics). */\nexport interface ToggleBadgeAction {\n /** Emitted by `(action)` when the button is clicked. */\n id: string;\n /** Accessible name of the button (also used as the tooltip when `tooltip` is empty). */\n label: string;\n /** SVG path data (`d`) of a 24x24 stroked icon. Several shapes can be joined in one string (`M..M..`). */\n icon: string;\n /** Text of the hover / focus tooltip. */\n tooltip?: string;\n disabled?: boolean;\n}\n\n/**\n * Pill that toggles on / off. Optional `actions` put small icon buttons INSIDE the pill, after the label and a divider, each with its own\n * tooltip; the label button and the icon buttons are separate buttons (never nested). Clicking an icon button emits `(action)` with its id and\n * never `(toggle)`. Content projected into the component (an icon) goes before the label, as before.\n *\n * Accessibility: the label button is a toggle button, so it carries `aria-pressed` (true while `active`); on touch devices\n * (`pointer: coarse`) its hit area, and each icon button's, is 44px (an invisible overlay; it can reach into a neighbouring badge when the\n * host's gap between badges is smaller than the overlay, see docs/ui-timeline-and-small-additions.md).\n */\n@Component({\n selector: 'ui-toggle-badge',\n standalone: true,\n imports: [TooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span class=\"tb\" [class.active]=\"active()\" [class.tb-has-actions]=\"actions().length > 0\">\n <button type=\"button\" class=\"toggle-badge\" [class.active]=\"active()\" [attr.aria-pressed]=\"active()\" [uiTooltip]=\"tooltip()\" (click)=\"toggle.emit()\">\n <ng-content />\n {{ label() }}\n </button>\n @if (actions().length > 0) {\n <span class=\"tb-actions\" role=\"group\" [attr.aria-label]=\"labels.t('toggleBadge.actions', { label: label() }).trim()\">\n <span class=\"tb-divider\" aria-hidden=\"true\"></span>\n @for (a of actions(); track a.id) {\n <button type=\"button\" class=\"tb-action\" [disabled]=\"a.disabled ?? false\" [attr.aria-label]=\"a.label\" [uiTooltip]=\"a.tooltip || a.label\"\n (click)=\"action.emit(a.id)\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"a.icon\" /></svg>\n </button>\n }\n </span>\n }\n </span>\n `,\n styles: [`\n :host { display: inline-flex; }\n .tb {\n display: inline-flex;\n align-items: center;\n border-radius: 999px;\n border: 1px solid #e2e8f0;\n background: #fff;\n color: #64748b;\n transition: all 150ms ease;\n }\n .tb:hover { background: #f8fafc; border-color: #94a3b8; }\n .tb.active { background: #1e293b; color: #fff; border-color: #1e293b; }\n .toggle-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: var(--ui-toggle-badge-pad-y, 3px) var(--ui-toggle-badge-pad-x, 10px); /* a page can make its badges roomier with these two custom properties, no deep selectors needed */\n border-radius: 999px;\n border: none;\n background: transparent;\n font-size: 0.75rem;\n font-weight: 500;\n color: inherit;\n cursor: pointer;\n font-family: inherit;\n line-height: 1;\n }\n .toggle-badge:focus-visible, .tb-action:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }\n .tb-has-actions .toggle-badge { padding-right: 6px; }\n /* Touch: the label button's hit area is always 44px tall, centred on the pill; the look stays the same. 44px is the platform / WCAG 2.5.5 (AAA) guideline;\n the AA minimum, 2.5.8 Target Size (Minimum), is 24px. */\n @media (pointer: coarse) {\n .toggle-badge { position: relative; }\n .toggle-badge::after { content: ''; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; transform: translateY(-50%); }\n }\n .tb-actions { display: inline-flex; align-items: center; gap: 1px; padding-right: 4px; }\n .tb-divider { width: 1px; height: 12px; background: currentColor; opacity: 0.25; margin-right: 3px; }\n .tb-action {\n display: inline-flex; align-items: center; justify-content: center;\n width: 20px; height: 20px; padding: 0; border: none; border-radius: 50%;\n background: transparent; color: inherit; cursor: pointer; opacity: 0.75; font-family: inherit;\n transition: background 150ms ease, opacity 150ms ease;\n }\n .tb-action:hover:not(:disabled) { opacity: 1; background: rgba(100, 116, 139, 0.18); }\n .tb.active .tb-action:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }\n .tb-action:disabled { opacity: 0.35; cursor: not-allowed; }\n /* Touch: the small icon buttons get a 44px hit area (the look stays the same). A single action changes nothing in the layout. Between two\n icons the pitch is 20px button + 1px gap + 23px margin = 44px, so neighbouring hit areas touch but never overlap: a tap always reaches\n the icon it was aimed at. (The divider before the first icon is not separated, so there is no layout shift for one action.) */\n @media (pointer: coarse) {\n .tb-action { position: relative; }\n .tb-action + .tb-action { margin-left: 23px; }\n .tb-action::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }\n }\n `],\n})\nexport class ToggleBadgeComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly label = input('');\n readonly active = input(false);\n /** Icon buttons shown inside the pill after the label. Empty (default) = a plain pill, exactly as before. */\n readonly actions = input<ToggleBadgeAction[]>([]);\n /**\n * Hover / focus tooltip of the LABEL button only. Use this instead of `uiTooltip` on `<ui-toggle-badge>` when the badge has `actions`:\n * a tooltip on the host would also open while the pointer is over an icon button and stack on top of that icon's own tooltip.\n */\n readonly tooltip = input('');\n readonly toggle = output<void>();\n /** An icon button was clicked: its `id`. Never emits `toggle`. */\n readonly action = output<string>();\n}\n"],"mappings":";;;;AA2GA,IAAa,uBAAb,MAAa,qBAAoB;CAjFjC,cAAA;EAkFqB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,QAAS,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAClB,KAAA,SAAS,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAErB,KAAA,UAAU,MAA2B,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAKxC,KAAA,UAAU,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAA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ChangeDetectionStrategy, Component, computed, forwardRef, input, model, signal } from "@angular/core";
3
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
4
+ let nextToggleId = 0;
5
+ var ToggleComponent = class ToggleComponent {
6
+ constructor() {
7
+ this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
8
+ this.hint = input("", ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
9
+ this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
10
+ this.ariaDescribedBy = input("", ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
11
+ this.inputTestId = input("", ...ngDevMode ? [{ debugName: "inputTestId" }] : /* istanbul ignore next */ []);
12
+ this.checked = model(false, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
13
+ this._disabledInput = input(false, {
14
+ ...ngDevMode ? { debugName: "_disabledInput" } : /* istanbul ignore next */ {},
15
+ alias: "disabled"
16
+ });
17
+ this._cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []);
18
+ this.disabled = computed(() => this._disabledInput() || this._cvaDisabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
19
+ this._id = `ui-tg-${++nextToggleId}`;
20
+ this._inputId = `${this._id}-input`;
21
+ this._labelId = `${this._id}-label`;
22
+ this._hintId = `${this._id}-hint`;
23
+ this._describedBy = computed(() => {
24
+ const ids = [this.hint() ? this._hintId : "", this.ariaDescribedBy().trim()].filter(Boolean);
25
+ return ids.length ? ids.join(" ") : null;
26
+ }, ...ngDevMode ? [{ debugName: "_describedBy" }] : /* istanbul ignore next */ []);
27
+ this._onChange = (_) => {};
28
+ this._onTouched = () => {};
29
+ }
30
+ writeValue(val) {
31
+ this.checked.set(!!val);
32
+ }
33
+ registerOnChange(fn) {
34
+ this._onChange = fn;
35
+ }
36
+ registerOnTouched(fn) {
37
+ this._onTouched = fn;
38
+ }
39
+ setDisabledState(d) {
40
+ this._cvaDisabled.set(d);
41
+ }
42
+ onTouched() {
43
+ this._onTouched();
44
+ }
45
+ onToggle(event) {
46
+ const input = event.target;
47
+ if (this.disabled()) {
48
+ input.checked = this.checked();
49
+ return;
50
+ }
51
+ this.checked.set(input.checked);
52
+ this._onChange(input.checked);
53
+ this._onTouched();
54
+ }
55
+ static {
56
+ this.ɵfac = i0.ɵɵngDeclareFactory({
57
+ minVersion: "12.0.0",
58
+ version: "22.2.2",
59
+ ngImport: i0,
60
+ type: ToggleComponent,
61
+ deps: [],
62
+ target: i0.ɵɵFactoryTarget.Component
63
+ });
64
+ }
65
+ static {
66
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
67
+ minVersion: "17.0.0",
68
+ version: "22.2.2",
69
+ type: ToggleComponent,
70
+ isStandalone: true,
71
+ selector: "ui-toggle",
72
+ inputs: {
73
+ label: {
74
+ classPropertyName: "label",
75
+ publicName: "label",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ },
80
+ hint: {
81
+ classPropertyName: "hint",
82
+ publicName: "hint",
83
+ isSignal: true,
84
+ isRequired: false,
85
+ transformFunction: null
86
+ },
87
+ ariaLabel: {
88
+ classPropertyName: "ariaLabel",
89
+ publicName: "ariaLabel",
90
+ isSignal: true,
91
+ isRequired: false,
92
+ transformFunction: null
93
+ },
94
+ ariaDescribedBy: {
95
+ classPropertyName: "ariaDescribedBy",
96
+ publicName: "ariaDescribedBy",
97
+ isSignal: true,
98
+ isRequired: false,
99
+ transformFunction: null
100
+ },
101
+ inputTestId: {
102
+ classPropertyName: "inputTestId",
103
+ publicName: "inputTestId",
104
+ isSignal: true,
105
+ isRequired: false,
106
+ transformFunction: null
107
+ },
108
+ checked: {
109
+ classPropertyName: "checked",
110
+ publicName: "checked",
111
+ isSignal: true,
112
+ isRequired: false,
113
+ transformFunction: null
114
+ },
115
+ _disabledInput: {
116
+ classPropertyName: "_disabledInput",
117
+ publicName: "disabled",
118
+ isSignal: true,
119
+ isRequired: false,
120
+ transformFunction: null
121
+ }
122
+ },
123
+ outputs: { checked: "checkedChange" },
124
+ providers: [{
125
+ provide: NG_VALUE_ACCESSOR,
126
+ useExisting: forwardRef(() => ToggleComponent),
127
+ multi: true
128
+ }],
129
+ ngImport: i0,
130
+ template: `
131
+ <div class="tg-row" [class.tg-disabled]="disabled()">
132
+ @if (label() || hint()) {
133
+ <div class="tg-text">
134
+ @if (label()) { <label class="tg-label" [id]="_labelId" [attr.for]="_inputId">{{ label() }}</label> }
135
+ @if (hint()) { <span class="tg-hint" [id]="_hintId">{{ hint() }}</span> }
136
+ </div>
137
+ }
138
+ <span class="tg-before"><ng-content select="[toggle-before-switch]" /></span>
139
+ <label class="tg-wrap">
140
+ <input
141
+ type="checkbox"
142
+ role="switch"
143
+ class="tg-input"
144
+ [id]="_inputId"
145
+ [attr.data-testid]="inputTestId() || null"
146
+ [checked]="checked()"
147
+ [disabled]="disabled()"
148
+ [attr.aria-checked]="checked() ? 'true' : 'false'"
149
+ [attr.aria-labelledby]="label() ? _labelId : null"
150
+ [attr.aria-label]="label() ? null : (ariaLabel() || null)"
151
+ [attr.aria-describedby]="_describedBy()"
152
+ (change)="onToggle($event)"
153
+ (blur)="onTouched()" />
154
+ <span class="tg-slider" aria-hidden="true"></span>
155
+ </label>
156
+ </div>
157
+ `,
158
+ isInline: true,
159
+ styles: [":host{display:block}.tg-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0}.tg-text{display:flex;flex-direction:column;gap:2px;min-width:0}.tg-label{font-size:.875rem;font-weight:600;color:#1e293b;line-height:1.4;cursor:pointer}.tg-disabled .tg-label{cursor:not-allowed}.tg-hint{font-size:.8125rem;color:#64748b;line-height:1.4}.tg-before{display:inline-flex;align-items:center;flex-shrink:0;margin-left:auto}.tg-before:empty{display:none}.tg-before:not(:empty)+.tg-wrap{margin-left:0}.tg-wrap{position:relative;display:inline-flex;align-items:center;flex-shrink:0;cursor:pointer;margin-left:auto}.tg-disabled .tg-wrap{cursor:not-allowed}.tg-disabled{opacity:.5}.tg-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit;z-index:1}.tg-slider{position:relative;width:44px;height:24px;border-radius:999px;background:#cbd5e1;transition:background .15s}.tg-slider:before{content:\"\";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #00000040;transition:transform .15s}.tg-input:checked+.tg-slider{background:#1d4ed8}.tg-input:checked+.tg-slider:before{transform:translate(20px)}.tg-input:focus-visible+.tg-slider{outline:2px solid #3b82f6;outline-offset:2px}@media(hover:hover){.tg-wrap:hover .tg-input:not(:disabled):not(:checked)+.tg-slider{background:#94a3b8}}@media(pointer:coarse),(max-width:480px){.tg-wrap:after{content:\"\";position:absolute;inset:-10px -6px}}@media(prefers-reduced-motion:reduce){.tg-slider,.tg-slider:before{transition:none}}\n"],
160
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
161
+ });
162
+ }
163
+ };
164
+ i0.ɵɵngDeclareClassMetadata({
165
+ minVersion: "12.0.0",
166
+ version: "22.2.2",
167
+ ngImport: i0,
168
+ type: ToggleComponent,
169
+ decorators: [{
170
+ type: Component,
171
+ args: [{
172
+ selector: "ui-toggle",
173
+ standalone: true,
174
+ changeDetection: ChangeDetectionStrategy.OnPush,
175
+ providers: [{
176
+ provide: NG_VALUE_ACCESSOR,
177
+ useExisting: forwardRef(() => ToggleComponent),
178
+ multi: true
179
+ }],
180
+ template: `
181
+ <div class="tg-row" [class.tg-disabled]="disabled()">
182
+ @if (label() || hint()) {
183
+ <div class="tg-text">
184
+ @if (label()) { <label class="tg-label" [id]="_labelId" [attr.for]="_inputId">{{ label() }}</label> }
185
+ @if (hint()) { <span class="tg-hint" [id]="_hintId">{{ hint() }}</span> }
186
+ </div>
187
+ }
188
+ <span class="tg-before"><ng-content select="[toggle-before-switch]" /></span>
189
+ <label class="tg-wrap">
190
+ <input
191
+ type="checkbox"
192
+ role="switch"
193
+ class="tg-input"
194
+ [id]="_inputId"
195
+ [attr.data-testid]="inputTestId() || null"
196
+ [checked]="checked()"
197
+ [disabled]="disabled()"
198
+ [attr.aria-checked]="checked() ? 'true' : 'false'"
199
+ [attr.aria-labelledby]="label() ? _labelId : null"
200
+ [attr.aria-label]="label() ? null : (ariaLabel() || null)"
201
+ [attr.aria-describedby]="_describedBy()"
202
+ (change)="onToggle($event)"
203
+ (blur)="onTouched()" />
204
+ <span class="tg-slider" aria-hidden="true"></span>
205
+ </label>
206
+ </div>
207
+ `,
208
+ styles: [":host{display:block}.tg-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0}.tg-text{display:flex;flex-direction:column;gap:2px;min-width:0}.tg-label{font-size:.875rem;font-weight:600;color:#1e293b;line-height:1.4;cursor:pointer}.tg-disabled .tg-label{cursor:not-allowed}.tg-hint{font-size:.8125rem;color:#64748b;line-height:1.4}.tg-before{display:inline-flex;align-items:center;flex-shrink:0;margin-left:auto}.tg-before:empty{display:none}.tg-before:not(:empty)+.tg-wrap{margin-left:0}.tg-wrap{position:relative;display:inline-flex;align-items:center;flex-shrink:0;cursor:pointer;margin-left:auto}.tg-disabled .tg-wrap{cursor:not-allowed}.tg-disabled{opacity:.5}.tg-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit;z-index:1}.tg-slider{position:relative;width:44px;height:24px;border-radius:999px;background:#cbd5e1;transition:background .15s}.tg-slider:before{content:\"\";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #00000040;transition:transform .15s}.tg-input:checked+.tg-slider{background:#1d4ed8}.tg-input:checked+.tg-slider:before{transform:translate(20px)}.tg-input:focus-visible+.tg-slider{outline:2px solid #3b82f6;outline-offset:2px}@media(hover:hover){.tg-wrap:hover .tg-input:not(:disabled):not(:checked)+.tg-slider{background:#94a3b8}}@media(pointer:coarse),(max-width:480px){.tg-wrap:after{content:\"\";position:absolute;inset:-10px -6px}}@media(prefers-reduced-motion:reduce){.tg-slider,.tg-slider:before{transition:none}}\n"]
209
+ }]
210
+ }],
211
+ propDecorators: {
212
+ label: [{
213
+ type: i0.Input,
214
+ args: [{
215
+ isSignal: true,
216
+ alias: "label",
217
+ required: false
218
+ }]
219
+ }],
220
+ hint: [{
221
+ type: i0.Input,
222
+ args: [{
223
+ isSignal: true,
224
+ alias: "hint",
225
+ required: false
226
+ }]
227
+ }],
228
+ ariaLabel: [{
229
+ type: i0.Input,
230
+ args: [{
231
+ isSignal: true,
232
+ alias: "ariaLabel",
233
+ required: false
234
+ }]
235
+ }],
236
+ ariaDescribedBy: [{
237
+ type: i0.Input,
238
+ args: [{
239
+ isSignal: true,
240
+ alias: "ariaDescribedBy",
241
+ required: false
242
+ }]
243
+ }],
244
+ inputTestId: [{
245
+ type: i0.Input,
246
+ args: [{
247
+ isSignal: true,
248
+ alias: "inputTestId",
249
+ required: false
250
+ }]
251
+ }],
252
+ checked: [{
253
+ type: i0.Input,
254
+ args: [{
255
+ isSignal: true,
256
+ alias: "checked",
257
+ required: false
258
+ }]
259
+ }, {
260
+ type: i0.Output,
261
+ args: ["checkedChange"]
262
+ }],
263
+ _disabledInput: [{
264
+ type: i0.Input,
265
+ args: [{
266
+ isSignal: true,
267
+ alias: "disabled",
268
+ required: false
269
+ }]
270
+ }]
271
+ }
272
+ });
273
+ export { ToggleComponent };
274
+
275
+ //# sourceMappingURL=forgeroute-ui-toggle.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-toggle.mjs","names":[],"sources":["../../../projects/forgeroute-ui/toggle/src/lib/toggle/toggle.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, input, model, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet nextToggleId = 0;\n\n/**\n * On/off switch for settings: a label and optional hint on the left, the switch on the right\n * (ControlValueAccessor with a boolean value; `[(checked)]` also works).\n *\n * <ui-toggle label=\"SMS Enabled\" hint=\"Allow sending texts\" [(ngModel)]=\"form.sms\" />\n * <ui-toggle label=\"Autoplay\" [checked]=\"on()\" (checkedChange)=\"on.set($event)\" />\n * <ui-toggle ariaLabel=\"Enable feature\" [(checked)]=\"on\" /> <!-- no visible label -->\n *\n * Built on a native `<input type=\"checkbox\" role=\"switch\">`, so Space toggles it, it is focusable, and a screen reader\n * announces it as a switch (on / off). The label and hint name and describe it. `disabled` (input or form control) dims it\n * and blocks changes. `ariaDescribedBy` adds the id of a description rendered elsewhere. On touch devices and phones the switch has a >= 44px hit area.\n *\n * Optional: content with the `toggle-before-switch` attribute is shown between the text and the switch (e.g. a preview icon button):\n *\n * <ui-toggle label=\"E-Signature Reminders\" [(checked)]=\"on\"><ui-icon toggle-before-switch name=\"view\" ariaLabel=\"Preview\" /></ui-toggle>\n *\n * Without it nothing changes. Clicking the slotted content does not toggle the switch.\n */\n@Component({\n selector: 'ui-toggle',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ToggleComponent), multi: true }],\n template: `\n <div class=\"tg-row\" [class.tg-disabled]=\"disabled()\">\n @if (label() || hint()) {\n <div class=\"tg-text\">\n @if (label()) { <label class=\"tg-label\" [id]=\"_labelId\" [attr.for]=\"_inputId\">{{ label() }}</label> }\n @if (hint()) { <span class=\"tg-hint\" [id]=\"_hintId\">{{ hint() }}</span> }\n </div>\n }\n <span class=\"tg-before\"><ng-content select=\"[toggle-before-switch]\" /></span>\n <label class=\"tg-wrap\">\n <input\n type=\"checkbox\"\n role=\"switch\"\n class=\"tg-input\"\n [id]=\"_inputId\"\n [attr.data-testid]=\"inputTestId() || null\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.aria-checked]=\"checked() ? 'true' : 'false'\"\n [attr.aria-labelledby]=\"label() ? _labelId : null\"\n [attr.aria-label]=\"label() ? null : (ariaLabel() || null)\"\n [attr.aria-describedby]=\"_describedBy()\"\n (change)=\"onToggle($event)\"\n (blur)=\"onTouched()\" />\n <span class=\"tg-slider\" aria-hidden=\"true\"></span>\n </label>\n </div>\n `,\n styles: [`\n :host { display: block; }\n .tg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }\n .tg-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n .tg-label { font-size: 0.875rem; font-weight: 600; color: #1e293b; line-height: 1.4; cursor: pointer; }\n .tg-disabled .tg-label { cursor: not-allowed; }\n .tg-hint { font-size: 0.8125rem; color: #64748b; line-height: 1.4; }\n\n /* Optional content (an icon button, a badge) right before the switch, after the text. Empty = not rendered, so a toggle without it looks exactly as before. */\n .tg-before { display: inline-flex; align-items: center; flex-shrink: 0; margin-left: auto; }\n .tg-before:empty { display: none; }\n .tg-before:not(:empty) + .tg-wrap { margin-left: 0; } /* only when content was projected: the empty (display: none) slot must not cancel the switch's push to the end */\n .tg-wrap { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; cursor: pointer; margin-left: auto; }\n .tg-disabled .tg-wrap { cursor: not-allowed; }\n .tg-disabled { opacity: 0.5; }\n\n /* The real input sits over the whole switch, invisible, so clicks and keyboard land on it. */\n .tg-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; z-index: 1; }\n\n .tg-slider {\n position: relative; width: 44px; height: 24px; border-radius: 999px; background: #cbd5e1;\n transition: background 0.15s;\n }\n .tg-slider::before {\n content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;\n background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s;\n }\n .tg-input:checked + .tg-slider { background: #1d4ed8; }\n .tg-input:checked + .tg-slider::before { transform: translateX(20px); }\n .tg-input:focus-visible + .tg-slider { outline: 2px solid #3b82f6; outline-offset: 2px; }\n @media (hover: hover) { .tg-wrap:hover .tg-input:not(:disabled):not(:checked) + .tg-slider { background: #94a3b8; } }\n\n /* Touch targets: a >= 44px tall hit area around the 24px switch (desktop unchanged). */\n @media (pointer: coarse), (max-width: 480px) {\n .tg-wrap::after { content: ''; position: absolute; inset: -10px -6px; }\n }\n @media (prefers-reduced-motion: reduce) { .tg-slider, .tg-slider::before { transition: none; } }\n `],\n})\nexport class ToggleComponent implements ControlValueAccessor {\n /** Bold line on the left. */\n readonly label = input('');\n /** Grey helper text under the label. */\n readonly hint = input('');\n /** Accessible name when there is no visible `label`. */\n readonly ariaLabel = input('');\n /** Id of another element that describes the switch (e.g. a description rendered elsewhere); announced after the hint. Absent when empty. */\n readonly ariaDescribedBy = input('');\n /** `data-testid` put on the inner `<input role=\"switch\">` (the host keeps its own attributes), so e2e can target the switch directly. Absent when empty. */\n readonly inputTestId = input('');\n /** Whether the switch is on. Two-way: `[(checked)]`. */\n readonly checked = model(false);\n\n /** Public so a host template can bind `[disabled]` (a protected input fails strict template type-checking, TS2445). */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _id = `ui-tg-${++nextToggleId}`;\n protected readonly _inputId = `${this._id}-input`;\n protected readonly _labelId = `${this._id}-label`;\n protected readonly _hintId = `${this._id}-hint`;\n /** The hint's id (when there is a hint) followed by the host's `ariaDescribedBy`; null when neither exists. */\n protected readonly _describedBy = computed(() => {\n const ids = [this.hint() ? this._hintId : '', this.ariaDescribedBy().trim()].filter(Boolean);\n return ids.length ? ids.join(' ') : null;\n });\n\n private _onChange = (_: boolean) => {};\n private _onTouched = () => {};\n\n writeValue(val: boolean) { this.checked.set(!!val); }\n registerOnChange(fn: (v: boolean) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onTouched() { this._onTouched(); }\n\n protected onToggle(event: Event) {\n const input = event.target as HTMLInputElement;\n if (this.disabled()) { input.checked = this.checked(); return; }\n this.checked.set(input.checked);\n this._onChange(input.checked);\n this._onTouched();\n }\n}\n"],"mappings":";;;AAGA,IAAI,eAAe;AA4FnB,IAAa,kBAAb,MAAa,gBAAe;CAxE5B,cAAA;EA0EW,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEjB,KAAA,OAAO,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAEhB,KAAA,YAAY,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAErB,KAAA,kBAAkB,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;EAE3B,KAAA,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAEvB,KAAA,UAAU,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAGtB,KAAA,iBAAiB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,iBAAA,+BAAA,CAAA;GAAI,OAAO;EAAU,CAAA;EACzC,KAAA,eAAe,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EAC1B,KAAA,WAAW,eAAe,KAAK,eAAc,KAAM,KAAK,aAAY,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAEzE,KAAA,MAAM,SAAS,EAAE;EACf,KAAA,WAAW,GAAG,KAAK,IAAG;EACtB,KAAA,WAAW,GAAG,KAAK,IAAG;EACtB,KAAA,UAAU,GAAG,KAAK,IAAG;EAErB,KAAA,eAAe,eAAc;GAC9C,MAAM,MAAM,CA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YAAA;KAAA,mBAAA;IAAA;IAAA,iBAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,aAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,SAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,gBAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA,EAAA,SAAA,gBAAA;GAAA,WApEf,CAAC;IAAE,SAAS;IAAmB,aAAa,iBAAiB,eAAe;IAAG,OAAO;GAAI,CAAE;GAAC,UAAA;GAAA,UAC9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BT,UAAA;GAAA,QAAA,CAAA,sjDAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAwCU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAe,YAAA,CAAA;EAxE3B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAW,YACT;GAAI,iBACC,wBAAwB;GAAM,WACpC,CAAC;IAAE,SAAS;IAAmB,aAAa,iBAAgB,eAAgB;IAAG,OAAO;GAAI,CAAE;GAAC,UAC9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BT,QAAA,CAAA,sjDAAA;EAAA,CAAA"}
@@ -0,0 +1,155 @@
1
+ import * as i0 from "@angular/core";
2
+ import { DestroyRef, Directive, ElementRef, inject, input } from "@angular/core";
3
+ import { DOCUMENT } from "@angular/common";
4
+ let nextTooltipId = 0;
5
+ let openTooltip = null;
6
+ var TooltipDirective = class TooltipDirective {
7
+ constructor() {
8
+ this.uiTooltip = input("", ...ngDevMode ? [{ debugName: "uiTooltip" }] : /* istanbul ignore next */ []);
9
+ this.tooltipPosition = input("top", ...ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []);
10
+ this.host = inject(ElementRef).nativeElement;
11
+ this.doc = inject(DOCUMENT);
12
+ this.bubble = null;
13
+ this.previousDescribedBy = null;
14
+ this.id = `ui-tooltip-${nextTooltipId++}`;
15
+ inject(DestroyRef).onDestroy(() => this.hide());
16
+ }
17
+ show() {
18
+ const text = this.uiTooltip();
19
+ if (!text || this.bubble) return;
20
+ openTooltip?.close();
21
+ openTooltip = {
22
+ owner: this,
23
+ close: () => this.hide()
24
+ };
25
+ const el = this.doc.createElement("div");
26
+ el.id = this.id;
27
+ el.setAttribute("role", "tooltip");
28
+ el.textContent = text;
29
+ Object.assign(el.style, {
30
+ position: "fixed",
31
+ zIndex: "10000",
32
+ maxWidth: "280px",
33
+ padding: "6px 10px",
34
+ background: "#0f172a",
35
+ color: "#fff",
36
+ fontSize: "0.75rem",
37
+ lineHeight: "1.4",
38
+ borderRadius: "6px",
39
+ boxShadow: "0 4px 12px rgba(15,23,42,.25)",
40
+ whiteSpace: "pre-line",
41
+ pointerEvents: "none",
42
+ visibility: "hidden"
43
+ });
44
+ this.doc.body.appendChild(el);
45
+ this.bubble = el;
46
+ this.previousDescribedBy = this.host.getAttribute("aria-describedby");
47
+ this.host.setAttribute("aria-describedby", this.previousDescribedBy ? `${this.previousDescribedBy} ${this.id}` : this.id);
48
+ const r = this.host.getBoundingClientRect();
49
+ const b = el.getBoundingClientRect();
50
+ const gap = 6;
51
+ let top = this.tooltipPosition() === "top" ? r.top - b.height - gap : r.bottom + gap;
52
+ if (top < 4) top = r.bottom + gap;
53
+ else if (top + b.height > window.innerHeight - 4) top = r.top - b.height - gap;
54
+ const left = Math.min(Math.max(4, r.left + r.width / 2 - b.width / 2), window.innerWidth - b.width - 4);
55
+ el.style.top = `${top}px`;
56
+ el.style.left = `${left}px`;
57
+ el.style.visibility = "visible";
58
+ }
59
+ hide() {
60
+ if (!this.bubble) return;
61
+ this.bubble.remove();
62
+ this.bubble = null;
63
+ if (openTooltip?.owner === this) openTooltip = null;
64
+ if (this.previousDescribedBy) this.host.setAttribute("aria-describedby", this.previousDescribedBy);
65
+ else this.host.removeAttribute("aria-describedby");
66
+ this.previousDescribedBy = null;
67
+ }
68
+ static {
69
+ this.ɵfac = i0.ɵɵngDeclareFactory({
70
+ minVersion: "12.0.0",
71
+ version: "22.2.2",
72
+ ngImport: i0,
73
+ type: TooltipDirective,
74
+ deps: [],
75
+ target: i0.ɵɵFactoryTarget.Directive
76
+ });
77
+ }
78
+ static {
79
+ this.ɵdir = i0.ɵɵngDeclareDirective({
80
+ minVersion: "17.1.0",
81
+ version: "22.2.2",
82
+ type: TooltipDirective,
83
+ isStandalone: true,
84
+ selector: "[uiTooltip]",
85
+ inputs: {
86
+ uiTooltip: {
87
+ classPropertyName: "uiTooltip",
88
+ publicName: "uiTooltip",
89
+ isSignal: true,
90
+ isRequired: false,
91
+ transformFunction: null
92
+ },
93
+ tooltipPosition: {
94
+ classPropertyName: "tooltipPosition",
95
+ publicName: "tooltipPosition",
96
+ isSignal: true,
97
+ isRequired: false,
98
+ transformFunction: null
99
+ }
100
+ },
101
+ host: { listeners: {
102
+ "mouseenter": "show()",
103
+ "mouseleave": "hide()",
104
+ "focusin": "show()",
105
+ "focusout": "hide()",
106
+ "keydown.escape": "hide()",
107
+ "click": "hide()"
108
+ } },
109
+ ngImport: i0
110
+ });
111
+ }
112
+ };
113
+ i0.ɵɵngDeclareClassMetadata({
114
+ minVersion: "12.0.0",
115
+ version: "22.2.2",
116
+ ngImport: i0,
117
+ type: TooltipDirective,
118
+ decorators: [{
119
+ type: Directive,
120
+ args: [{
121
+ selector: "[uiTooltip]",
122
+ standalone: true,
123
+ host: {
124
+ "(mouseenter)": "show()",
125
+ "(mouseleave)": "hide()",
126
+ "(focusin)": "show()",
127
+ "(focusout)": "hide()",
128
+ "(keydown.escape)": "hide()",
129
+ "(click)": "hide()"
130
+ }
131
+ }]
132
+ }],
133
+ ctorParameters: () => [],
134
+ propDecorators: {
135
+ uiTooltip: [{
136
+ type: i0.Input,
137
+ args: [{
138
+ isSignal: true,
139
+ alias: "uiTooltip",
140
+ required: false
141
+ }]
142
+ }],
143
+ tooltipPosition: [{
144
+ type: i0.Input,
145
+ args: [{
146
+ isSignal: true,
147
+ alias: "tooltipPosition",
148
+ required: false
149
+ }]
150
+ }]
151
+ }
152
+ });
153
+ export { TooltipDirective };
154
+
155
+ //# sourceMappingURL=forgeroute-ui-tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-tooltip.mjs","names":[],"sources":["../../../projects/forgeroute-ui/tooltip/src/lib/tooltip/tooltip.directive.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, inject, input } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nlet nextTooltipId = 0;\n/** The tooltip that is open right now: only one is ever shown, so two tooltips can never stack on top of each other. */\nlet openTooltip: { owner: object; close: () => void } | null = null;\n\n/**\n * Hover / focus tooltip for any element: `<span uiTooltip=\"Saved\">`.\n * Empty text shows nothing. Line breaks (`\\n`) are kept. Escape or leaving the element closes it.\n * Only one tooltip is open at a time anywhere on the page: opening one closes the previous (e.g. a tooltip on a container and on a control inside\n * it never both show; the innermost one the pointer entered last wins).\n * The bubble is rendered on `document.body` (position: fixed) so table/panel overflow never clips it.\n */\n@Directive({\n selector: '[uiTooltip]',\n standalone: true,\n host: {\n '(mouseenter)': 'show()',\n '(mouseleave)': 'hide()',\n '(focusin)': 'show()',\n '(focusout)': 'hide()',\n '(keydown.escape)': 'hide()',\n '(click)': 'hide()',\n },\n})\nexport class TooltipDirective {\n /** Tooltip text; empty or null disables the tooltip. */\n readonly uiTooltip = input<string | null | undefined>('');\n /** Preferred side; flips to the other side when there is no room. */\n readonly tooltipPosition = input<'top' | 'bottom'>('top');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly doc = inject(DOCUMENT);\n private bubble: HTMLElement | null = null;\n /** The host's own `aria-describedby` (e.g. an error id) before the tooltip was added, put back when it closes. */\n private previousDescribedBy: string | null = null;\n private readonly id = `ui-tooltip-${nextTooltipId++}`;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.hide());\n }\n\n protected show() {\n const text = this.uiTooltip();\n if (!text || this.bubble) return;\n openTooltip?.close();\n openTooltip = { owner: this, close: () => this.hide() };\n const el = this.doc.createElement('div');\n el.id = this.id;\n el.setAttribute('role', 'tooltip');\n el.textContent = text;\n Object.assign(el.style, {\n position: 'fixed', zIndex: '10000', maxWidth: '280px', padding: '6px 10px',\n background: '#0f172a', color: '#fff', fontSize: '0.75rem', lineHeight: '1.4',\n borderRadius: '6px', boxShadow: '0 4px 12px rgba(15,23,42,.25)',\n whiteSpace: 'pre-line', pointerEvents: 'none', visibility: 'hidden',\n });\n this.doc.body.appendChild(el);\n this.bubble = el;\n this.previousDescribedBy = this.host.getAttribute('aria-describedby');\n this.host.setAttribute('aria-describedby', this.previousDescribedBy ? `${this.previousDescribedBy} ${this.id}` : this.id);\n\n const r = this.host.getBoundingClientRect();\n const b = el.getBoundingClientRect();\n const gap = 6;\n let top = this.tooltipPosition() === 'top' ? r.top - b.height - gap : r.bottom + gap;\n if (top < 4) top = r.bottom + gap;\n else if (top + b.height > window.innerHeight - 4) top = r.top - b.height - gap;\n const left = Math.min(Math.max(4, r.left + r.width / 2 - b.width / 2), window.innerWidth - b.width - 4);\n el.style.top = `${top}px`;\n el.style.left = `${left}px`;\n el.style.visibility = 'visible';\n }\n\n protected hide() {\n if (!this.bubble) return; // this tooltip is not open: the host's attributes are not ours to touch\n this.bubble.remove();\n this.bubble = null;\n if (openTooltip?.owner === this) openTooltip = null;\n if (this.previousDescribedBy) this.host.setAttribute('aria-describedby', this.previousDescribedBy);\n else this.host.removeAttribute('aria-describedby');\n this.previousDescribedBy = null;\n }\n}\n"],"mappings":";;;AAGA,IAAI,gBAAgB;AAEpB,IAAI,cAA2D;AAqB/D,IAAa,mBAAb,MAAa,iBAAgB;C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