@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,461 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ElementRef, Injector, afterNextRender, computed, inject, input, signal, viewChild } from "@angular/core";
3
+ import { DOCUMENT } from "@angular/common";
4
+ import { ToastComponent } from "@forgeroute/ui/toast";
5
+ import { ToastService, UiLabelsService } from "@forgeroute/ui/core";
6
+ const facebookShareUrl = (url) => `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;
7
+ const xShareUrl = (url, text) => `https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`;
8
+ const linkedInShareUrl = (url) => `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`;
9
+ const gmailShareUrl = (url, title) => `https://mail.google.com/mail/?view=cm&fs=1&su=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\n\n${url}`)}`;
10
+ const outlookShareUrl = (url, title) => `https://outlook.live.com/mail/0/deeplink/compose?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\n\n${url}`)}`;
11
+ const emailShareUrl = (url, title) => `mailto:?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\n\n${url}`)}`;
12
+ let nextShareMenuId = 0;
13
+ var ShareMenuComponent = class ShareMenuComponent {
14
+ constructor() {
15
+ this.labels = inject(UiLabelsService);
16
+ this.url = input.required(...ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []);
17
+ this.title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
18
+ this.labelInput = input(null, {
19
+ ...ngDevMode ? { debugName: "labelInput" } : /* istanbul ignore next */ {},
20
+ alias: "label"
21
+ });
22
+ this.label = computed(() => this.labelInput() ?? this.labels.t("shareMenu.label"), ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
23
+ this.panelId = `ui-share-panel-${nextShareMenuId++}`;
24
+ this.doc = inject(DOCUMENT);
25
+ this.toast = inject(ToastService);
26
+ this.injector = inject(Injector);
27
+ this.host = inject(ElementRef);
28
+ this.trigger = viewChild("trigger", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
29
+ this.panel = viewChild("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
30
+ this.open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
31
+ this.shiftX = signal(0, ...ngDevMode ? [{ debugName: "shiftX" }] : /* istanbul ignore next */ []);
32
+ this.isTouchDevice = computed(() => this.doc.defaultView?.matchMedia?.("(pointer: coarse)").matches === true, ...ngDevMode ? [{ debugName: "isTouchDevice" }] : /* istanbul ignore next */ []);
33
+ this.canNativeShare = computed(() => typeof this.doc.defaultView?.navigator?.share === "function" && this.isTouchDevice(), ...ngDevMode ? [{ debugName: "canNativeShare" }] : /* istanbul ignore next */ []);
34
+ this.tiles = computed(() => [
35
+ {
36
+ value: "facebook",
37
+ label: "Facebook",
38
+ background: "#1877f2"
39
+ },
40
+ {
41
+ value: "x",
42
+ label: "X",
43
+ background: "#000000"
44
+ },
45
+ {
46
+ value: "linkedin",
47
+ label: "LinkedIn",
48
+ background: "#0a66c2"
49
+ },
50
+ ...this.isTouchDevice() ? [{
51
+ value: "email",
52
+ label: this.labels.t("common.email"),
53
+ background: "#78716c"
54
+ }] : [{
55
+ value: "gmail",
56
+ label: "Gmail",
57
+ background: "#ea4335"
58
+ }, {
59
+ value: "outlook",
60
+ label: "Outlook",
61
+ background: "#0078d4"
62
+ }],
63
+ {
64
+ value: "copy",
65
+ label: this.labels.t("shareMenu.copyLink"),
66
+ background: "var(--ui-share-accent, var(--primary, #2563eb))"
67
+ },
68
+ ...this.canNativeShare() ? [{
69
+ value: "native",
70
+ label: this.labels.t("common.more"),
71
+ background: "#57534e"
72
+ }] : []
73
+ ], ...ngDevMode ? [{ debugName: "tiles" }] : /* istanbul ignore next */ []);
74
+ this.links = computed(() => ({
75
+ facebook: facebookShareUrl(this.url()),
76
+ x: xShareUrl(this.url(), this.title()),
77
+ linkedin: linkedInShareUrl(this.url()),
78
+ email: emailShareUrl(this.url(), this.title()),
79
+ gmail: gmailShareUrl(this.url(), this.title()),
80
+ outlook: outlookShareUrl(this.url(), this.title())
81
+ }), ...ngDevMode ? [{ debugName: "links" }] : /* istanbul ignore next */ []);
82
+ }
83
+ toggle(event) {
84
+ event.stopPropagation();
85
+ if (this.open()) this.close();
86
+ else this.show();
87
+ }
88
+ show() {
89
+ this.shiftX.set(0);
90
+ this.open.set(true);
91
+ afterNextRender(() => {
92
+ const panel = this.panel()?.nativeElement;
93
+ if (!panel) return;
94
+ const view = this.doc.documentElement.clientWidth;
95
+ const rect = panel.getBoundingClientRect();
96
+ const margin = 8;
97
+ if (rect.right > view - margin) this.shiftX.set(Math.round(view - margin - rect.right));
98
+ else if (rect.left < margin) this.shiftX.set(Math.round(margin - rect.left));
99
+ if (this.doc.activeElement === this.trigger()?.nativeElement) panel.querySelector("button")?.focus();
100
+ }, { injector: this.injector });
101
+ }
102
+ close(returnFocus = false) {
103
+ if (!this.open()) return;
104
+ this.open.set(false);
105
+ if (returnFocus) this.trigger()?.nativeElement.focus();
106
+ }
107
+ onEscape() {
108
+ if (!this.open()) return;
109
+ const focusInside = this.host.nativeElement.contains(this.doc.activeElement);
110
+ this.close(focusInside);
111
+ }
112
+ onDocumentClick(event) {
113
+ if (this.open() && !this.host.nativeElement.contains(event.target)) this.close();
114
+ }
115
+ onFocusOut(event) {
116
+ const next = event.relatedTarget;
117
+ if (this.open() && next && !this.host.nativeElement.contains(next)) this.close();
118
+ }
119
+ onPanelKeydown(event) {
120
+ const options = Array.from(this.panel().nativeElement.querySelectorAll("button"));
121
+ const i = options.indexOf(this.doc.activeElement);
122
+ const to = event.key === "ArrowRight" ? (i + 1) % options.length : event.key === "ArrowLeft" ? (i - 1 + options.length) % options.length : event.key === "Home" ? 0 : event.key === "End" ? options.length - 1 : -1;
123
+ if (to < 0) return;
124
+ event.preventDefault();
125
+ options[to].focus();
126
+ }
127
+ choose(option) {
128
+ switch (option) {
129
+ case "native":
130
+ this.nativeShare();
131
+ break;
132
+ case "facebook":
133
+ case "x":
134
+ case "linkedin":
135
+ case "gmail":
136
+ case "outlook":
137
+ this.doc.defaultView?.open(this.links()[option], "_blank", "noopener,noreferrer");
138
+ break;
139
+ case "email":
140
+ this.email();
141
+ break;
142
+ case "copy": this.copy();
143
+ }
144
+ this.close(true);
145
+ }
146
+ async nativeShare() {
147
+ try {
148
+ await this.doc.defaultView.navigator.share({
149
+ title: this.title(),
150
+ url: this.url()
151
+ });
152
+ } catch (err) {
153
+ if (err?.name !== "AbortError") this.toast.error(this.labels.t("shareMenu.unavailable"));
154
+ }
155
+ }
156
+ email() {
157
+ const link = this.doc.createElement("a");
158
+ link.href = this.links().email;
159
+ link.rel = "noopener noreferrer";
160
+ link.click();
161
+ }
162
+ async copy() {
163
+ const url = this.url();
164
+ try {
165
+ await this.doc.defaultView.navigator.clipboard.writeText(url);
166
+ this.toast.show(this.labels.t("shareMenu.linkCopied"));
167
+ return;
168
+ } catch {}
169
+ if (this.legacyCopy(url)) {
170
+ this.toast.show(this.labels.t("shareMenu.linkCopied"));
171
+ return;
172
+ }
173
+ this.doc.defaultView?.prompt(this.labels.t("shareMenu.copyThisLink"), url);
174
+ }
175
+ legacyCopy(text) {
176
+ const textarea = this.doc.createElement("textarea");
177
+ textarea.value = text;
178
+ textarea.setAttribute("readonly", "");
179
+ textarea.style.position = "fixed";
180
+ textarea.style.opacity = "0";
181
+ this.doc.body.appendChild(textarea);
182
+ try {
183
+ textarea.select();
184
+ textarea.setSelectionRange(0, text.length);
185
+ return this.doc.execCommand("copy");
186
+ } catch {
187
+ return false;
188
+ } finally {
189
+ textarea.remove();
190
+ }
191
+ }
192
+ static {
193
+ this.ɵfac = i0.ɵɵngDeclareFactory({
194
+ minVersion: "12.0.0",
195
+ version: "22.2.2",
196
+ ngImport: i0,
197
+ type: ShareMenuComponent,
198
+ deps: [],
199
+ target: i0.ɵɵFactoryTarget.Component
200
+ });
201
+ }
202
+ static {
203
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
204
+ minVersion: "17.0.0",
205
+ version: "22.2.2",
206
+ type: ShareMenuComponent,
207
+ isStandalone: true,
208
+ selector: "ui-share-menu",
209
+ inputs: {
210
+ url: {
211
+ classPropertyName: "url",
212
+ publicName: "url",
213
+ isSignal: true,
214
+ isRequired: true,
215
+ transformFunction: null
216
+ },
217
+ title: {
218
+ classPropertyName: "title",
219
+ publicName: "title",
220
+ isSignal: true,
221
+ isRequired: true,
222
+ transformFunction: null
223
+ },
224
+ labelInput: {
225
+ classPropertyName: "labelInput",
226
+ publicName: "label",
227
+ isSignal: true,
228
+ isRequired: false,
229
+ transformFunction: null
230
+ }
231
+ },
232
+ host: { listeners: {
233
+ "document:keydown.escape": "onEscape()",
234
+ "document:click": "onDocumentClick($event)",
235
+ "focusout": "onFocusOut($event)"
236
+ } },
237
+ viewQueries: [{
238
+ propertyName: "trigger",
239
+ first: true,
240
+ predicate: ["trigger"],
241
+ descendants: true,
242
+ isSignal: true
243
+ }, {
244
+ propertyName: "panel",
245
+ first: true,
246
+ predicate: ["panel"],
247
+ descendants: true,
248
+ isSignal: true
249
+ }],
250
+ ngImport: i0,
251
+ template: `
252
+ <div class="share-wrap">
253
+ <button
254
+ #trigger
255
+ type="button"
256
+ class="share-trigger"
257
+ data-testid="share-trigger"
258
+ [attr.aria-label]="labels.t('shareMenu.shareNamed', { name: label() })"
259
+ [attr.aria-expanded]="open()"
260
+ [attr.aria-controls]="open() ? panelId : null"
261
+ (click)="toggle($event)"
262
+ >
263
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
264
+ <circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/>
265
+ <line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
266
+ </svg>{{ labels.t('common.share') }}</button>
267
+
268
+ @if (open()) {
269
+ <div
270
+ #panel
271
+ [id]="panelId"
272
+ class="share-panel"
273
+ role="group"
274
+ [attr.aria-label]="labels.t('shareMenu.shareOptions')"
275
+ data-testid="share-panel"
276
+ [style.transform]="'translateX(' + shiftX() + 'px)'"
277
+ (keydown)="onPanelKeydown($event)"
278
+ >
279
+ @for (tile of tiles(); track tile.value) {
280
+ <button type="button" class="share-tile" [attr.data-testid]="'share-' + tile.value" (click)="choose(tile.value)">
281
+ <span class="share-icon" [style.background]="tile.background" aria-hidden="true">
282
+ @switch (tile.value) {
283
+ @case ('facebook') {
284
+ <svg width="26" height="26" viewBox="0 0 24 24" fill="currentColor"><path d="M13.5 21v-7.5h2.6l.4-3h-3V8.6c0-.9.3-1.5 1.6-1.5h1.5V4.4c-.3 0-1.2-.1-2.3-.1-2.3 0-3.8 1.4-3.8 3.9v2.3H8v3h2.5V21h3z"/></svg>
285
+ }
286
+ @case ('x') {
287
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor"><path d="M17.8 3h3.1l-6.8 7.7L22 21h-6.2l-4.9-6.4L5.3 21H2.2l7.3-8.3L2 3h6.4l4.4 5.8L17.8 3zm-1.1 16.2h1.7L7.3 4.7H5.5l11.2 14.5z"/></svg>
288
+ }
289
+ @case ('linkedin') {
290
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M6.9 8.9H3.6V20h3.3V8.9zM5.2 3.5a1.9 1.9 0 100 3.8 1.9 1.9 0 000-3.8zM20.4 13.4c0-3-1.6-4.7-4.1-4.7-1.2 0-2.2.6-2.7 1.4V8.9h-3.2V20h3.3v-6c0-1.4.7-2.4 1.9-2.4s1.5 1 1.5 2.4V20h3.3v-6.6z"/></svg>
291
+ }
292
+ @case ('email') {
293
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
294
+ }
295
+ @case ('gmail') {
296
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
297
+ }
298
+ @case ('outlook') {
299
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
300
+ }
301
+ @case ('copy') {
302
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 007.1 0l3-3a5 5 0 00-7.1-7.1l-1.7 1.7"/><path d="M14 11a5 5 0 00-7.1 0l-3 3A5 5 0 0011 21l1.7-1.7"/></svg>
303
+ }
304
+ @case ('native') {
305
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="19" cy="12" r="2"/></svg>
306
+ }
307
+ }
308
+ </span>
309
+ <span class="share-name">{{ tile.label }}</span>
310
+ </button>
311
+ }
312
+ </div>
313
+ }
314
+ </div>
315
+ <ui-toast />
316
+ `,
317
+ isInline: true,
318
+ styles: [":host{display:inline-block}.share-wrap{position:relative}.share-trigger{display:inline-flex;align-items:center;gap:.4rem;min-height:2.25rem;padding:.35rem .95rem;border:1px solid #d6d3d1;border-radius:9999px;background:#fff;color:#44403c;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-trigger:hover{border-color:#a8a29e;background:#fafaf9}.share-trigger[aria-expanded=true]{border-color:#78716c;background:#f5f5f4}.share-trigger:focus-visible,.share-tile:focus-visible{outline:2px solid var(--ui-share-accent, var(--primary, #2563eb));outline-offset:2px}@media(pointer:coarse){.share-trigger{min-height:2.75rem}}.share-panel{position:absolute;top:calc(100% + 8px);left:0;z-index:50;display:flex;align-items:flex-start;gap:4px;padding:14px 12px 10px;width:max-content;max-width:calc(100vw - 16px);overflow-x:auto;-webkit-overflow-scrolling:touch;background:#fff;border:1px solid #e7e5e4;border-radius:16px;box-shadow:0 10px 30px #1c19172e}.share-tile{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none;width:64px;padding:2px 0;border:0;background:none;border-radius:10px;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:9999px;color:#fff;transition:transform .12s ease,box-shadow .12s ease}.share-tile:hover .share-icon{transform:translateY(-2px);box-shadow:0 4px 10px #1c191740}.share-name{font-size:.75rem;line-height:1.1;font-weight:500;color:#57534e;text-align:center}@media(max-width:480px){.share-panel{padding:12px 8px 8px;gap:2px}.share-tile{width:auto;min-width:48px;padding:2px 1px}.share-icon{width:44px;height:44px}.share-name{white-space:nowrap;font-size:.8125rem}}@media(prefers-reduced-motion:reduce){.share-icon{transition:none}.share-tile:hover .share-icon{transform:none}}\n"],
319
+ dependencies: [{
320
+ kind: "component",
321
+ type: ToastComponent,
322
+ selector: "ui-toast",
323
+ inputs: [
324
+ "dismissible",
325
+ "persistentLiveRegion",
326
+ "queue",
327
+ "countdown",
328
+ "maxQueued",
329
+ "countdownLabel",
330
+ "queueLabel"
331
+ ],
332
+ outputs: ["action"]
333
+ }],
334
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
335
+ });
336
+ }
337
+ };
338
+ i0.ɵɵngDeclareClassMetadata({
339
+ minVersion: "12.0.0",
340
+ version: "22.2.2",
341
+ ngImport: i0,
342
+ type: ShareMenuComponent,
343
+ decorators: [{
344
+ type: Component,
345
+ args: [{
346
+ selector: "ui-share-menu",
347
+ standalone: true,
348
+ changeDetection: ChangeDetectionStrategy.OnPush,
349
+ imports: [ToastComponent],
350
+ host: {
351
+ "(document:keydown.escape)": "onEscape()",
352
+ "(document:click)": "onDocumentClick($event)",
353
+ "(focusout)": "onFocusOut($event)"
354
+ },
355
+ template: `
356
+ <div class="share-wrap">
357
+ <button
358
+ #trigger
359
+ type="button"
360
+ class="share-trigger"
361
+ data-testid="share-trigger"
362
+ [attr.aria-label]="labels.t('shareMenu.shareNamed', { name: label() })"
363
+ [attr.aria-expanded]="open()"
364
+ [attr.aria-controls]="open() ? panelId : null"
365
+ (click)="toggle($event)"
366
+ >
367
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
368
+ <circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/>
369
+ <line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
370
+ </svg>{{ labels.t('common.share') }}</button>
371
+
372
+ @if (open()) {
373
+ <div
374
+ #panel
375
+ [id]="panelId"
376
+ class="share-panel"
377
+ role="group"
378
+ [attr.aria-label]="labels.t('shareMenu.shareOptions')"
379
+ data-testid="share-panel"
380
+ [style.transform]="'translateX(' + shiftX() + 'px)'"
381
+ (keydown)="onPanelKeydown($event)"
382
+ >
383
+ @for (tile of tiles(); track tile.value) {
384
+ <button type="button" class="share-tile" [attr.data-testid]="'share-' + tile.value" (click)="choose(tile.value)">
385
+ <span class="share-icon" [style.background]="tile.background" aria-hidden="true">
386
+ @switch (tile.value) {
387
+ @case ('facebook') {
388
+ <svg width="26" height="26" viewBox="0 0 24 24" fill="currentColor"><path d="M13.5 21v-7.5h2.6l.4-3h-3V8.6c0-.9.3-1.5 1.6-1.5h1.5V4.4c-.3 0-1.2-.1-2.3-.1-2.3 0-3.8 1.4-3.8 3.9v2.3H8v3h2.5V21h3z"/></svg>
389
+ }
390
+ @case ('x') {
391
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor"><path d="M17.8 3h3.1l-6.8 7.7L22 21h-6.2l-4.9-6.4L5.3 21H2.2l7.3-8.3L2 3h6.4l4.4 5.8L17.8 3zm-1.1 16.2h1.7L7.3 4.7H5.5l11.2 14.5z"/></svg>
392
+ }
393
+ @case ('linkedin') {
394
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M6.9 8.9H3.6V20h3.3V8.9zM5.2 3.5a1.9 1.9 0 100 3.8 1.9 1.9 0 000-3.8zM20.4 13.4c0-3-1.6-4.7-4.1-4.7-1.2 0-2.2.6-2.7 1.4V8.9h-3.2V20h3.3v-6c0-1.4.7-2.4 1.9-2.4s1.5 1 1.5 2.4V20h3.3v-6.6z"/></svg>
395
+ }
396
+ @case ('email') {
397
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
398
+ }
399
+ @case ('gmail') {
400
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
401
+ }
402
+ @case ('outlook') {
403
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
404
+ }
405
+ @case ('copy') {
406
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 007.1 0l3-3a5 5 0 00-7.1-7.1l-1.7 1.7"/><path d="M14 11a5 5 0 00-7.1 0l-3 3A5 5 0 0011 21l1.7-1.7"/></svg>
407
+ }
408
+ @case ('native') {
409
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="19" cy="12" r="2"/></svg>
410
+ }
411
+ }
412
+ </span>
413
+ <span class="share-name">{{ tile.label }}</span>
414
+ </button>
415
+ }
416
+ </div>
417
+ }
418
+ </div>
419
+ <ui-toast />
420
+ `,
421
+ styles: [":host{display:inline-block}.share-wrap{position:relative}.share-trigger{display:inline-flex;align-items:center;gap:.4rem;min-height:2.25rem;padding:.35rem .95rem;border:1px solid #d6d3d1;border-radius:9999px;background:#fff;color:#44403c;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-trigger:hover{border-color:#a8a29e;background:#fafaf9}.share-trigger[aria-expanded=true]{border-color:#78716c;background:#f5f5f4}.share-trigger:focus-visible,.share-tile:focus-visible{outline:2px solid var(--ui-share-accent, var(--primary, #2563eb));outline-offset:2px}@media(pointer:coarse){.share-trigger{min-height:2.75rem}}.share-panel{position:absolute;top:calc(100% + 8px);left:0;z-index:50;display:flex;align-items:flex-start;gap:4px;padding:14px 12px 10px;width:max-content;max-width:calc(100vw - 16px);overflow-x:auto;-webkit-overflow-scrolling:touch;background:#fff;border:1px solid #e7e5e4;border-radius:16px;box-shadow:0 10px 30px #1c19172e}.share-tile{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none;width:64px;padding:2px 0;border:0;background:none;border-radius:10px;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:9999px;color:#fff;transition:transform .12s ease,box-shadow .12s ease}.share-tile:hover .share-icon{transform:translateY(-2px);box-shadow:0 4px 10px #1c191740}.share-name{font-size:.75rem;line-height:1.1;font-weight:500;color:#57534e;text-align:center}@media(max-width:480px){.share-panel{padding:12px 8px 8px;gap:2px}.share-tile{width:auto;min-width:48px;padding:2px 1px}.share-icon{width:44px;height:44px}.share-name{white-space:nowrap;font-size:.8125rem}}@media(prefers-reduced-motion:reduce){.share-icon{transition:none}.share-tile:hover .share-icon{transform:none}}\n"]
422
+ }]
423
+ }],
424
+ propDecorators: {
425
+ url: [{
426
+ type: i0.Input,
427
+ args: [{
428
+ isSignal: true,
429
+ alias: "url",
430
+ required: true
431
+ }]
432
+ }],
433
+ title: [{
434
+ type: i0.Input,
435
+ args: [{
436
+ isSignal: true,
437
+ alias: "title",
438
+ required: true
439
+ }]
440
+ }],
441
+ labelInput: [{
442
+ type: i0.Input,
443
+ args: [{
444
+ isSignal: true,
445
+ alias: "label",
446
+ required: false
447
+ }]
448
+ }],
449
+ trigger: [{
450
+ type: i0.ViewChild,
451
+ args: ["trigger", { isSignal: true }]
452
+ }],
453
+ panel: [{
454
+ type: i0.ViewChild,
455
+ args: ["panel", { isSignal: true }]
456
+ }]
457
+ }
458
+ });
459
+ export { ShareMenuComponent, emailShareUrl, facebookShareUrl, gmailShareUrl, linkedInShareUrl, outlookShareUrl, xShareUrl };
460
+
461
+ //# sourceMappingURL=forgeroute-ui-share-menu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-share-menu.mjs","names":[],"sources":["../../../projects/forgeroute-ui/share-menu/src/lib/share-menu/share-links.ts","../../../projects/forgeroute-ui/share-menu/src/lib/share-menu/share-menu.component.ts"],"sourcesContent":["/**\n * The links the public Share control builds. Pure functions so the component and its spec produce the exact same text.\n * Every value is URL-encoded, so a title holding `&`, `#`, quotes or non-ASCII text can never break out of its query parameter.\n */\nexport const facebookShareUrl = (url: string): string =>\n `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;\n\nexport const xShareUrl = (url: string, text: string): string =>\n `https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`;\n\nexport const linkedInShareUrl = (url: string): string =>\n `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`;\n\n/** Gmail's compose window (a new tab) with the subject and body filled in: for desktop visitors, who often have no mail app for `mailto:`. */\nexport const gmailShareUrl = (url: string, title: string): string =>\n `https://mail.google.com/mail/?view=cm&fs=1&su=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\\n\\n${url}`)}`;\n\n/** Outlook.com's compose window (a new tab) with the subject and body filled in. */\nexport const outlookShareUrl = (url: string, title: string): string =>\n `https://outlook.live.com/mail/0/deeplink/compose?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\\n\\n${url}`)}`;\n\n/** `mailto:` with the title as the subject and the title plus the link as the body (encodeURIComponent, never `+` for spaces). */\nexport const emailShareUrl = (url: string, title: string): string =>\n `mailto:?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\\n\\n${url}`)}`;\n","import { ChangeDetectionStrategy, Component, ElementRef, Injector, afterNextRender, computed, inject, input, signal, viewChild } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { ToastComponent as UiToastComponent } from '@forgeroute/ui/toast';\nimport { ToastService } from '@forgeroute/ui/core';\nimport { emailShareUrl, facebookShareUrl, gmailShareUrl, linkedInShareUrl, outlookShareUrl, xShareUrl } from './share-links';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nlet nextShareMenuId = 0;\n\nexport type ShareOption = 'native' | 'facebook' | 'x' | 'linkedin' | 'email' | 'gmail' | 'outlook' | 'copy';\n\ninterface ShareTile { value: ShareOption; label: string; background: string }\n\n/**\n * \"Share\" control for a public page (an obituary, a blog post, any shareable item). The button opens a floating panel (over the page, so nothing moves)\n * with one round icon per option and its name underneath, in a row like a phone's share sheet. Phones and tablets get Facebook, X,\n * LinkedIn, Email (their mail app), Copy link and \"More\" (the device's own share sheet). Desktops get Gmail and Outlook instead of Email:\n * a `mailto:` link does nothing on a computer without a mail app, while the webmail compose windows always open. \"Link copied\" is the library toast. The link is the public page\n * of the item (never an `?embed=true` widget URL). Theming: `--ui-share-accent` (focus ring and the Copy link tile; default the library `--primary`).\n *\n * <ui-share-menu [url]=\"pageUrl\" [title]=\"post.title\" label=\"blog post\" />\n */\n@Component({\n selector: 'ui-share-menu',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [UiToastComponent],\n // Escape closes from anywhere (Safari does not focus a button on click); a click or Tab outside closes too\n host: { '(document:keydown.escape)': 'onEscape()', '(document:click)': 'onDocumentClick($event)', '(focusout)': 'onFocusOut($event)' },\n template: `\n <div class=\"share-wrap\">\n <button\n #trigger\n type=\"button\"\n class=\"share-trigger\"\n data-testid=\"share-trigger\"\n [attr.aria-label]=\"labels.t('shareMenu.shareNamed', { name: label() })\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"open() ? panelId : null\"\n (click)=\"toggle($event)\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <circle cx=\"18\" cy=\"5\" r=\"3\"/><circle cx=\"6\" cy=\"12\" r=\"3\"/><circle cx=\"18\" cy=\"19\" r=\"3\"/>\n <line x1=\"8.59\" y1=\"13.51\" x2=\"15.42\" y2=\"17.49\"/><line x1=\"15.41\" y1=\"6.51\" x2=\"8.59\" y2=\"10.49\"/>\n </svg>{{ labels.t('common.share') }}</button>\n\n @if (open()) {\n <div\n #panel\n [id]=\"panelId\"\n class=\"share-panel\"\n role=\"group\"\n [attr.aria-label]=\"labels.t('shareMenu.shareOptions')\"\n data-testid=\"share-panel\"\n [style.transform]=\"'translateX(' + shiftX() + 'px)'\"\n (keydown)=\"onPanelKeydown($event)\"\n >\n @for (tile of tiles(); track tile.value) {\n <button type=\"button\" class=\"share-tile\" [attr.data-testid]=\"'share-' + tile.value\" (click)=\"choose(tile.value)\">\n <span class=\"share-icon\" [style.background]=\"tile.background\" aria-hidden=\"true\">\n @switch (tile.value) {\n @case ('facebook') {\n <svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M13.5 21v-7.5h2.6l.4-3h-3V8.6c0-.9.3-1.5 1.6-1.5h1.5V4.4c-.3 0-1.2-.1-2.3-.1-2.3 0-3.8 1.4-3.8 3.9v2.3H8v3h2.5V21h3z\"/></svg>\n }\n @case ('x') {\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M17.8 3h3.1l-6.8 7.7L22 21h-6.2l-4.9-6.4L5.3 21H2.2l7.3-8.3L2 3h6.4l4.4 5.8L17.8 3zm-1.1 16.2h1.7L7.3 4.7H5.5l11.2 14.5z\"/></svg>\n }\n @case ('linkedin') {\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M6.9 8.9H3.6V20h3.3V8.9zM5.2 3.5a1.9 1.9 0 100 3.8 1.9 1.9 0 000-3.8zM20.4 13.4c0-3-1.6-4.7-4.1-4.7-1.2 0-2.2.6-2.7 1.4V8.9h-3.2V20h3.3v-6c0-1.4.7-2.4 1.9-2.4s1.5 1 1.5 2.4V20h3.3v-6.6z\"/></svg>\n }\n @case ('email') {\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M3 7l9 6 9-6\"/></svg>\n }\n @case ('gmail') {\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M3 7l9 6 9-6\"/></svg>\n }\n @case ('outlook') {\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M3 7l9 6 9-6\"/></svg>\n }\n @case ('copy') {\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 13a5 5 0 007.1 0l3-3a5 5 0 00-7.1-7.1l-1.7 1.7\"/><path d=\"M14 11a5 5 0 00-7.1 0l-3 3A5 5 0 0011 21l1.7-1.7\"/></svg>\n }\n @case ('native') {\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><circle cx=\"5\" cy=\"12\" r=\"2\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/><circle cx=\"19\" cy=\"12\" r=\"2\"/></svg>\n }\n }\n </span>\n <span class=\"share-name\">{{ tile.label }}</span>\n </button>\n }\n </div>\n }\n </div>\n <ui-toast />\n `,\n styles: [`\n :host { display: inline-block; }\n .share-wrap { position: relative; }\n .share-trigger {\n display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; padding: 0.35rem 0.95rem;\n border: 1px solid #d6d3d1; border-radius: 9999px; background: #fff; color: #44403c; font-size: 0.875rem; font-weight: 600;\n font-family: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;\n }\n .share-trigger:hover { border-color: #a8a29e; background: #fafaf9; }\n .share-trigger[aria-expanded='true'] { border-color: #78716c; background: #f5f5f4; }\n .share-trigger:focus-visible, .share-tile:focus-visible { outline: 2px solid var(--ui-share-accent, var(--primary, #2563eb)); outline-offset: 2px; }\n @media (pointer: coarse) { .share-trigger { min-height: 2.75rem; } }\n\n .share-panel {\n position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;\n display: flex; align-items: flex-start; gap: 4px; padding: 14px 12px 10px;\n width: max-content; max-width: calc(100vw - 16px); overflow-x: auto; -webkit-overflow-scrolling: touch;\n background: #fff; border: 1px solid #e7e5e4; border-radius: 16px; box-shadow: 0 10px 30px rgba(28, 25, 23, 0.18);\n }\n .share-tile {\n display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; width: 64px; padding: 2px 0;\n border: 0; background: none; border-radius: 10px; font-family: inherit; cursor: pointer;\n touch-action: manipulation; -webkit-tap-highlight-color: transparent;\n }\n .share-icon {\n display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 9999px; color: #fff;\n transition: transform 120ms ease, box-shadow 120ms ease;\n }\n .share-tile:hover .share-icon { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(28, 25, 23, 0.25); }\n .share-name { font-size: 0.75rem; line-height: 1.1; font-weight: 500; color: #57534e; text-align: center; }\n @media (max-width: 480px) {\n /* A phone, or a narrow embedded frame: slightly smaller icons so all the options fit without scrolling the panel */\n .share-panel { padding: 12px 8px 8px; gap: 2px; }\n .share-tile { width: auto; min-width: 48px; padding: 2px 1px; }\n .share-icon { width: 44px; height: 44px; }\n .share-name { white-space: nowrap; font-size: 0.8125rem; }\n }\n @media (prefers-reduced-motion: reduce) { .share-icon { transition: none; } .share-tile:hover .share-icon { transform: none; } }\n `],\n})\nexport class ShareMenuComponent {\n protected readonly labels = inject(UiLabelsService);\n /** The public page link to share. */\n readonly url = input.required<string>();\n /** The headline: the item's name or title (the X text, the email subject and the share-sheet title). */\n readonly title = input.required<string>();\n /** Used in the accessible name, e.g. \"obituary\" or \"blog post\" (→ \"Share obituary\"). */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('shareMenu.label'));\n\n /** Unique id of the floating panel (several menus can be on one page). */\n protected readonly panelId = `ui-share-panel-${nextShareMenuId++}`;\n\n private readonly doc = inject(DOCUMENT);\n private readonly toast = inject(ToastService);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly trigger = viewChild<ElementRef<HTMLButtonElement>>('trigger');\n private readonly panel = viewChild<ElementRef<HTMLElement>>('panel');\n\n readonly open = signal(false);\n /** Pixels the panel is moved sideways so it never runs off either edge of the screen (or of the embedding frame). */\n readonly shiftX = signal(0);\n\n /**\n * \"More\" opens the device's own share sheet (Messages, AirDrop, Mail, WhatsApp…). It is offered on touch devices only: a desktop\n * browser has the other options already, and its share sheet is limited (or absent), so \"More\" there would look broken.\n */\n private readonly isTouchDevice = computed(() => this.doc.defaultView?.matchMedia?.('(pointer: coarse)').matches === true);\n private readonly canNativeShare = computed(() => typeof this.doc.defaultView?.navigator?.share === 'function' && this.isTouchDevice());\n\n readonly tiles = computed((): ShareTile[] => [\n { value: 'facebook', label: 'Facebook', background: '#1877f2' },\n { value: 'x', label: 'X', background: '#000000' },\n { value: 'linkedin', label: 'LinkedIn', background: '#0a66c2' },\n ...(this.isTouchDevice()\n ? [{ value: 'email' as const, label: this.labels.t('common.email'), background: '#78716c' }]\n : [{ value: 'gmail' as const, label: 'Gmail', background: '#ea4335' }, { value: 'outlook' as const, label: 'Outlook', background: '#0078d4' }]),\n { value: 'copy', label: this.labels.t('shareMenu.copyLink'), background: 'var(--ui-share-accent, var(--primary, #2563eb))' },\n ...(this.canNativeShare() ? [{ value: 'native' as const, label: this.labels.t('common.more'), background: '#57534e' }] : []),\n ]);\n\n /** The link each option opens (social sites in a new tab; the mail app in this window). */\n readonly links = computed(() => ({\n facebook: facebookShareUrl(this.url()),\n x: xShareUrl(this.url(), this.title()),\n linkedin: linkedInShareUrl(this.url()),\n email: emailShareUrl(this.url(), this.title()),\n gmail: gmailShareUrl(this.url(), this.title()),\n outlook: outlookShareUrl(this.url(), this.title()),\n }));\n\n toggle(event: Event) {\n event.stopPropagation();\n if (this.open()) this.close(); else this.show();\n }\n\n private show() {\n this.shiftX.set(0);\n this.open.set(true);\n // After the panel renders: keep it on screen, and put focus on the first option for keyboard users\n afterNextRender(() => {\n const panel = this.panel()?.nativeElement;\n if (!panel) return;\n const view = this.doc.documentElement.clientWidth;\n const rect = panel.getBoundingClientRect();\n const margin = 8;\n if (rect.right > view - margin) this.shiftX.set(Math.round(view - margin - rect.right));\n else if (rect.left < margin) this.shiftX.set(Math.round(margin - rect.left));\n if (this.doc.activeElement === this.trigger()?.nativeElement) panel.querySelector<HTMLElement>('button')?.focus();\n }, { injector: this.injector });\n }\n\n close(returnFocus = false) {\n if (!this.open()) return;\n this.open.set(false);\n if (returnFocus) this.trigger()?.nativeElement.focus();\n }\n\n onEscape() {\n if (!this.open()) return;\n const focusInside = this.host.nativeElement.contains(this.doc.activeElement);\n this.close(focusInside);\n }\n\n onDocumentClick(event: Event) {\n if (this.open() && !this.host.nativeElement.contains(event.target as Node)) this.close();\n }\n\n onFocusOut(event: FocusEvent) {\n const next = event.relatedTarget as Node | null;\n if (this.open() && next && !this.host.nativeElement.contains(next)) this.close();\n }\n\n /** Left / Right / Home / End move between the options. */\n onPanelKeydown(event: KeyboardEvent) {\n const options = Array.from(this.panel()!.nativeElement.querySelectorAll<HTMLElement>('button'));\n const i = options.indexOf(this.doc.activeElement as HTMLElement);\n const to = event.key === 'ArrowRight' ? (i + 1) % options.length\n : event.key === 'ArrowLeft' ? (i - 1 + options.length) % options.length\n : event.key === 'Home' ? 0\n : event.key === 'End' ? options.length - 1\n : -1;\n if (to < 0) return;\n event.preventDefault();\n options[to].focus();\n }\n\n choose(option: ShareOption) {\n switch (option) {\n case 'native': void this.nativeShare(); break;\n case 'facebook': case 'x': case 'linkedin': case 'gmail': case 'outlook':\n this.doc.defaultView?.open(this.links()[option], '_blank', 'noopener,noreferrer');\n break;\n case 'email': this.email(); break;\n case 'copy': void this.copy(); break;\n }\n this.close(true);\n }\n\n private async nativeShare() {\n try {\n await this.doc.defaultView!.navigator.share({ title: this.title(), url: this.url() });\n } catch (err) {\n // The user closing the sheet is not an error; a browser that blocks it (an iframe without `allow=\"web-share\"`) leaves the other options.\n if ((err as DOMException)?.name !== 'AbortError') this.toast.error(this.labels.t('shareMenu.unavailable'));\n }\n }\n\n /** Phones and tablets: opens the device's mail app with the subject and body filled in. */\n private email() {\n const link = this.doc.createElement('a');\n link.href = this.links().email;\n link.rel = 'noopener noreferrer';\n link.click();\n }\n\n private async copy() {\n const url = this.url();\n try {\n await this.doc.defaultView!.navigator.clipboard.writeText(url);\n this.toast.show(this.labels.t('shareMenu.linkCopied'));\n return;\n } catch { /* blocked (insecure context, or an iframe without clipboard-write): try the legacy path */ }\n if (this.legacyCopy(url)) { this.toast.show(this.labels.t('shareMenu.linkCopied')); return; }\n // Nothing can copy: show the link in the browser's own dialog, selected, so it can still be copied by hand.\n this.doc.defaultView?.prompt(this.labels.t('shareMenu.copyThisLink'), url);\n }\n\n private legacyCopy(text: string): boolean {\n const textarea = this.doc.createElement('textarea');\n textarea.value = text;\n textarea.setAttribute('readonly', '');\n textarea.style.position = 'fixed';\n textarea.style.opacity = '0';\n this.doc.body.appendChild(textarea);\n try {\n textarea.select();\n textarea.setSelectionRange(0, text.length);\n return this.doc.execCommand('copy');\n } catch {\n return false;\n } finally {\n textarea.remove();\n }\n }\n}\n"],"mappings":";;;;;AAIA,MAAa,oBAAoB,QAC/B,gDAAgD,mBAAmB,GAAG;AAExE,MAAa,aAAa,KAAa,SACrC,wCAAwC,mBAAmB,GAAG,EAAC,QAAS,mBAAmB,IAAI;AAEjG,M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