@forgeroute/ui 0.5.15 → 0.5.17

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 (340) 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-data-table-core.mjs +6150 -0
  46. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -0
  47. package/fesm2022/forgeroute-ui-date-input.mjs +384 -0
  48. package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -0
  49. package/fesm2022/forgeroute-ui-date-range-picker.mjs +453 -0
  50. package/fesm2022/forgeroute-ui-date-range-picker.mjs.map +1 -0
  51. package/fesm2022/forgeroute-ui-datetime-input.mjs +375 -0
  52. package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -0
  53. package/fesm2022/forgeroute-ui-detail-card.mjs +655 -0
  54. package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -0
  55. package/fesm2022/forgeroute-ui-discount-selector.mjs +259 -0
  56. package/fesm2022/forgeroute-ui-discount-selector.mjs.map +1 -0
  57. package/fesm2022/forgeroute-ui-divider.mjs +111 -0
  58. package/fesm2022/forgeroute-ui-divider.mjs.map +1 -0
  59. package/fesm2022/forgeroute-ui-dropdown.mjs +550 -0
  60. package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -0
  61. package/fesm2022/forgeroute-ui-editor.mjs +4545 -0
  62. package/fesm2022/forgeroute-ui-editor.mjs.map +1 -0
  63. package/fesm2022/forgeroute-ui-empty-state.mjs +231 -0
  64. package/fesm2022/forgeroute-ui-empty-state.mjs.map +1 -0
  65. package/fesm2022/forgeroute-ui-error-state.mjs +195 -0
  66. package/fesm2022/forgeroute-ui-error-state.mjs.map +1 -0
  67. package/fesm2022/forgeroute-ui-error.mjs +93 -0
  68. package/fesm2022/forgeroute-ui-error.mjs.map +1 -0
  69. package/fesm2022/forgeroute-ui-fade.mjs +117 -0
  70. package/fesm2022/forgeroute-ui-fade.mjs.map +1 -0
  71. package/fesm2022/forgeroute-ui-file-input.mjs +999 -0
  72. package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -0
  73. package/fesm2022/forgeroute-ui-fixed-footer.mjs +115 -0
  74. package/fesm2022/forgeroute-ui-fixed-footer.mjs.map +1 -0
  75. package/fesm2022/forgeroute-ui-form-row.mjs +126 -0
  76. package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -0
  77. package/fesm2022/forgeroute-ui-form-section.mjs +93 -0
  78. package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -0
  79. package/fesm2022/forgeroute-ui-form.mjs +139 -0
  80. package/fesm2022/forgeroute-ui-form.mjs.map +1 -0
  81. package/fesm2022/forgeroute-ui-hint.mjs +47 -0
  82. package/fesm2022/forgeroute-ui-hint.mjs.map +1 -0
  83. package/fesm2022/forgeroute-ui-icon-picker.mjs +424 -0
  84. package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -0
  85. package/fesm2022/forgeroute-ui-icon.mjs +311 -0
  86. package/fesm2022/forgeroute-ui-icon.mjs.map +1 -0
  87. package/fesm2022/forgeroute-ui-image-preview.mjs +237 -0
  88. package/fesm2022/forgeroute-ui-image-preview.mjs.map +1 -0
  89. package/fesm2022/forgeroute-ui-keypad.mjs +278 -0
  90. package/fesm2022/forgeroute-ui-keypad.mjs.map +1 -0
  91. package/fesm2022/forgeroute-ui-kpi-card.mjs +490 -0
  92. package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -0
  93. package/fesm2022/forgeroute-ui-language-switcher.mjs +134 -0
  94. package/fesm2022/forgeroute-ui-language-switcher.mjs.map +1 -0
  95. package/fesm2022/forgeroute-ui-layout.mjs +18 -0
  96. package/fesm2022/forgeroute-ui-layout.mjs.map +1 -0
  97. package/fesm2022/forgeroute-ui-list-item.mjs +620 -0
  98. package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -0
  99. package/fesm2022/forgeroute-ui-list.mjs +866 -0
  100. package/fesm2022/forgeroute-ui-list.mjs.map +1 -0
  101. package/fesm2022/forgeroute-ui-live-region.mjs +118 -0
  102. package/fesm2022/forgeroute-ui-live-region.mjs.map +1 -0
  103. package/fesm2022/forgeroute-ui-map.mjs +5 -1
  104. package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
  105. package/fesm2022/forgeroute-ui-maps.mjs +2 -1
  106. package/fesm2022/forgeroute-ui-maps.mjs.map +1 -1
  107. package/fesm2022/forgeroute-ui-media.mjs +4615 -0
  108. package/fesm2022/forgeroute-ui-media.mjs.map +1 -0
  109. package/fesm2022/forgeroute-ui-messaging.mjs +20 -1
  110. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  111. package/fesm2022/forgeroute-ui-more-menu.mjs +418 -0
  112. package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -0
  113. package/fesm2022/forgeroute-ui-multi-select.mjs +532 -0
  114. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -0
  115. package/fesm2022/forgeroute-ui-notes.mjs +768 -0
  116. package/fesm2022/forgeroute-ui-notes.mjs.map +1 -0
  117. package/fesm2022/forgeroute-ui-notification-bell.mjs +587 -0
  118. package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -0
  119. package/fesm2022/forgeroute-ui-offline-banner.mjs +156 -0
  120. package/fesm2022/forgeroute-ui-offline-banner.mjs.map +1 -0
  121. package/fesm2022/forgeroute-ui-option-card.mjs +379 -0
  122. package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -0
  123. package/fesm2022/forgeroute-ui-page.mjs +317 -0
  124. package/fesm2022/forgeroute-ui-page.mjs.map +1 -0
  125. package/fesm2022/forgeroute-ui-pagination.mjs +225 -0
  126. package/fesm2022/forgeroute-ui-pagination.mjs.map +1 -0
  127. package/fesm2022/forgeroute-ui-panel-info-list.mjs +422 -0
  128. package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -0
  129. package/fesm2022/forgeroute-ui-password-requirements.mjs +237 -0
  130. package/fesm2022/forgeroute-ui-password-requirements.mjs.map +1 -0
  131. package/fesm2022/forgeroute-ui-payments.mjs +6243 -0
  132. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -0
  133. package/fesm2022/forgeroute-ui-pdf.mjs +9 -1
  134. package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
  135. package/fesm2022/forgeroute-ui-phone-number-picker.mjs +840 -0
  136. package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -0
  137. package/fesm2022/forgeroute-ui-pill-tabs.mjs +546 -0
  138. package/fesm2022/forgeroute-ui-pill-tabs.mjs.map +1 -0
  139. package/fesm2022/forgeroute-ui-print.mjs +76 -0
  140. package/fesm2022/forgeroute-ui-print.mjs.map +1 -0
  141. package/fesm2022/forgeroute-ui-progress-bar.mjs +252 -0
  142. package/fesm2022/forgeroute-ui-progress-bar.mjs.map +1 -0
  143. package/fesm2022/forgeroute-ui-progress-ring.mjs +277 -0
  144. package/fesm2022/forgeroute-ui-progress-ring.mjs.map +1 -0
  145. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs +301 -0
  146. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs.map +1 -0
  147. package/fesm2022/forgeroute-ui-quickbooks.mjs +20 -3
  148. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  149. package/fesm2022/forgeroute-ui-radio-matrix.mjs +471 -0
  150. package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -0
  151. package/fesm2022/forgeroute-ui-radio.mjs +911 -0
  152. package/fesm2022/forgeroute-ui-radio.mjs.map +1 -0
  153. package/fesm2022/forgeroute-ui-read-only-mode.mjs +15 -0
  154. package/fesm2022/forgeroute-ui-read-only-mode.mjs.map +1 -0
  155. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs +146 -0
  156. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs.map +1 -0
  157. package/fesm2022/forgeroute-ui-reminder-alerts.mjs +249 -0
  158. package/fesm2022/forgeroute-ui-reminder-alerts.mjs.map +1 -0
  159. package/fesm2022/forgeroute-ui-search-input.mjs +373 -0
  160. package/fesm2022/forgeroute-ui-search-input.mjs.map +1 -0
  161. package/fesm2022/forgeroute-ui-section-header.mjs +296 -0
  162. package/fesm2022/forgeroute-ui-section-header.mjs.map +1 -0
  163. package/fesm2022/forgeroute-ui-select.mjs +498 -0
  164. package/fesm2022/forgeroute-ui-select.mjs.map +1 -0
  165. package/fesm2022/forgeroute-ui-setup.mjs +4649 -0
  166. package/fesm2022/forgeroute-ui-setup.mjs.map +1 -0
  167. package/fesm2022/forgeroute-ui-share-menu.mjs +461 -0
  168. package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -0
  169. package/fesm2022/forgeroute-ui-shell.mjs +981 -0
  170. package/fesm2022/forgeroute-ui-shell.mjs.map +1 -0
  171. package/fesm2022/forgeroute-ui-show.mjs +129 -0
  172. package/fesm2022/forgeroute-ui-show.mjs.map +1 -0
  173. package/fesm2022/forgeroute-ui-sidebar-layout.mjs +355 -0
  174. package/fesm2022/forgeroute-ui-sidebar-layout.mjs.map +1 -0
  175. package/fesm2022/forgeroute-ui-skeleton.mjs +152 -0
  176. package/fesm2022/forgeroute-ui-skeleton.mjs.map +1 -0
  177. package/fesm2022/forgeroute-ui-skip-link.mjs +129 -0
  178. package/fesm2022/forgeroute-ui-skip-link.mjs.map +1 -0
  179. package/fesm2022/forgeroute-ui-snackbar.mjs +200 -0
  180. package/fesm2022/forgeroute-ui-snackbar.mjs.map +1 -0
  181. package/fesm2022/forgeroute-ui-square.mjs +17 -3
  182. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  183. package/fesm2022/forgeroute-ui-stack.mjs +233 -0
  184. package/fesm2022/forgeroute-ui-stack.mjs.map +1 -0
  185. package/fesm2022/forgeroute-ui-stacked-bar.mjs +200 -0
  186. package/fesm2022/forgeroute-ui-stacked-bar.mjs.map +1 -0
  187. package/fesm2022/forgeroute-ui-stacking-plan.mjs +365 -0
  188. package/fesm2022/forgeroute-ui-stacking-plan.mjs.map +1 -0
  189. package/fesm2022/forgeroute-ui-star-rating.mjs +498 -0
  190. package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -0
  191. package/fesm2022/forgeroute-ui-star.mjs +184 -0
  192. package/fesm2022/forgeroute-ui-star.mjs.map +1 -0
  193. package/fesm2022/forgeroute-ui-stepper.mjs +615 -0
  194. package/fesm2022/forgeroute-ui-stepper.mjs.map +1 -0
  195. package/fesm2022/forgeroute-ui-stripe.mjs +16 -3
  196. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  197. package/fesm2022/forgeroute-ui-swatch-picker.mjs +416 -0
  198. package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -0
  199. package/fesm2022/forgeroute-ui-table-toolbar.mjs +770 -0
  200. package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -0
  201. package/fesm2022/forgeroute-ui-table-types.mjs +277 -0
  202. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -0
  203. package/fesm2022/forgeroute-ui-text-input.mjs +1003 -0
  204. package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -0
  205. package/fesm2022/forgeroute-ui-text-template-picker.mjs +356 -0
  206. package/fesm2022/forgeroute-ui-text-template-picker.mjs.map +1 -0
  207. package/fesm2022/forgeroute-ui-text.mjs +195 -0
  208. package/fesm2022/forgeroute-ui-text.mjs.map +1 -0
  209. package/fesm2022/forgeroute-ui-textarea-input.mjs +542 -0
  210. package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -0
  211. package/fesm2022/forgeroute-ui-time-input.mjs +401 -0
  212. package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -0
  213. package/fesm2022/forgeroute-ui-timeline.mjs +549 -0
  214. package/fesm2022/forgeroute-ui-timeline.mjs.map +1 -0
  215. package/fesm2022/forgeroute-ui-toast.mjs +507 -0
  216. package/fesm2022/forgeroute-ui-toast.mjs.map +1 -0
  217. package/fesm2022/forgeroute-ui-toggle-badge.mjs +177 -0
  218. package/fesm2022/forgeroute-ui-toggle-badge.mjs.map +1 -0
  219. package/fesm2022/forgeroute-ui-toggle.mjs +275 -0
  220. package/fesm2022/forgeroute-ui-toggle.mjs.map +1 -0
  221. package/fesm2022/forgeroute-ui-tooltip.mjs +155 -0
  222. package/fesm2022/forgeroute-ui-tooltip.mjs.map +1 -0
  223. package/fesm2022/forgeroute-ui-utils.mjs +1071 -0
  224. package/fesm2022/forgeroute-ui-utils.mjs.map +1 -0
  225. package/fesm2022/forgeroute-ui.mjs +105 -70663
  226. package/package.json +417 -1
  227. package/types/forgeroute-ui-action-bar.d.ts +74 -0
  228. package/types/forgeroute-ui-address-input.d.ts +354 -0
  229. package/types/forgeroute-ui-alert.d.ts +89 -0
  230. package/types/forgeroute-ui-avatar.d.ts +85 -0
  231. package/types/forgeroute-ui-badge.d.ts +45 -0
  232. package/types/forgeroute-ui-bar-row.d.ts +90 -0
  233. package/types/forgeroute-ui-boards.d.ts +575 -0
  234. package/types/forgeroute-ui-bulk-eligible.d.ts +53 -0
  235. package/types/forgeroute-ui-business-hours.d.ts +191 -0
  236. package/types/forgeroute-ui-calendar.d.ts +544 -0
  237. package/types/forgeroute-ui-card-list-item.d.ts +186 -0
  238. package/types/forgeroute-ui-charts.d.ts +1 -1
  239. package/types/forgeroute-ui-checkbox.d.ts +270 -0
  240. package/types/forgeroute-ui-chip.d.ts +125 -0
  241. package/types/forgeroute-ui-color-input.d.ts +160 -0
  242. package/types/forgeroute-ui-column-filter.d.ts +130 -0
  243. package/types/forgeroute-ui-columns.d.ts +150 -0
  244. package/types/forgeroute-ui-combobox.d.ts +252 -0
  245. package/types/forgeroute-ui-confirm.d.ts +34 -0
  246. package/types/forgeroute-ui-contact-picker.d.ts +173 -0
  247. package/types/forgeroute-ui-conversations.d.ts +993 -0
  248. package/types/forgeroute-ui-copy-field.d.ts +122 -0
  249. package/types/forgeroute-ui-data-table-core.d.ts +1221 -0
  250. package/types/forgeroute-ui-date-input.d.ts +101 -0
  251. package/types/forgeroute-ui-date-range-picker.d.ts +109 -0
  252. package/types/forgeroute-ui-datetime-input.d.ts +97 -0
  253. package/types/forgeroute-ui-detail-card.d.ts +252 -0
  254. package/types/forgeroute-ui-discount-selector.d.ts +57 -0
  255. package/types/forgeroute-ui-divider.d.ts +40 -0
  256. package/types/forgeroute-ui-dropdown.d.ts +156 -0
  257. package/types/forgeroute-ui-editor.d.ts +873 -0
  258. package/types/forgeroute-ui-empty-state.d.ts +29 -0
  259. package/types/forgeroute-ui-error-state.d.ts +38 -0
  260. package/types/forgeroute-ui-error.d.ts +29 -0
  261. package/types/forgeroute-ui-fade.d.ts +39 -0
  262. package/types/forgeroute-ui-file-input.d.ts +337 -0
  263. package/types/forgeroute-ui-fixed-footer.d.ts +53 -0
  264. package/types/forgeroute-ui-form-row.d.ts +30 -0
  265. package/types/forgeroute-ui-form-section.d.ts +18 -0
  266. package/types/forgeroute-ui-form.d.ts +68 -0
  267. package/types/forgeroute-ui-hint.d.ts +10 -0
  268. package/types/forgeroute-ui-icon-picker.d.ts +122 -0
  269. package/types/forgeroute-ui-icon.d.ts +95 -0
  270. package/types/forgeroute-ui-image-preview.d.ts +88 -0
  271. package/types/forgeroute-ui-keypad.d.ts +73 -0
  272. package/types/forgeroute-ui-kpi-card.d.ts +161 -0
  273. package/types/forgeroute-ui-language-switcher.d.ts +41 -0
  274. package/types/forgeroute-ui-layout.d.ts +13 -0
  275. package/types/forgeroute-ui-list-item.d.ts +253 -0
  276. package/types/forgeroute-ui-list.d.ts +282 -0
  277. package/types/forgeroute-ui-live-region.d.ts +49 -0
  278. package/types/forgeroute-ui-map.d.ts +1 -1
  279. package/types/forgeroute-ui-maps.d.ts +1 -1
  280. package/types/forgeroute-ui-media.d.ts +1221 -0
  281. package/types/forgeroute-ui-messaging.d.ts +11 -6
  282. package/types/forgeroute-ui-more-menu.d.ts +91 -0
  283. package/types/forgeroute-ui-multi-select.d.ts +119 -0
  284. package/types/forgeroute-ui-notes.d.ts +172 -0
  285. package/types/forgeroute-ui-notification-bell.d.ts +135 -0
  286. package/types/forgeroute-ui-offline-banner.d.ts +44 -0
  287. package/types/forgeroute-ui-option-card.d.ts +106 -0
  288. package/types/forgeroute-ui-page.d.ts +115 -0
  289. package/types/forgeroute-ui-pagination.d.ts +55 -0
  290. package/types/forgeroute-ui-panel-info-list.d.ts +147 -0
  291. package/types/forgeroute-ui-password-requirements.d.ts +89 -0
  292. package/types/forgeroute-ui-payments.d.ts +1818 -0
  293. package/types/forgeroute-ui-pdf.d.ts +1 -1
  294. package/types/forgeroute-ui-phone-number-picker.d.ts +199 -0
  295. package/types/forgeroute-ui-pill-tabs.d.ts +208 -0
  296. package/types/forgeroute-ui-print.d.ts +40 -0
  297. package/types/forgeroute-ui-progress-bar.d.ts +88 -0
  298. package/types/forgeroute-ui-progress-ring.d.ts +102 -0
  299. package/types/forgeroute-ui-quick-filter-tabs.d.ts +51 -0
  300. package/types/forgeroute-ui-quickbooks.d.ts +6 -3
  301. package/types/forgeroute-ui-radio-matrix.d.ts +131 -0
  302. package/types/forgeroute-ui-radio.d.ts +311 -0
  303. package/types/forgeroute-ui-read-only-mode.d.ts +26 -0
  304. package/types/forgeroute-ui-readonly-fieldset.d.ts +62 -0
  305. package/types/forgeroute-ui-reminder-alerts.d.ts +71 -0
  306. package/types/forgeroute-ui-search-input.d.ts +93 -0
  307. package/types/forgeroute-ui-section-header.d.ts +149 -0
  308. package/types/forgeroute-ui-select.d.ts +183 -0
  309. package/types/forgeroute-ui-setup.d.ts +775 -0
  310. package/types/forgeroute-ui-share-menu.d.ts +99 -0
  311. package/types/forgeroute-ui-shell.d.ts +173 -0
  312. package/types/forgeroute-ui-show.d.ts +40 -0
  313. package/types/forgeroute-ui-sidebar-layout.d.ts +161 -0
  314. package/types/forgeroute-ui-skeleton.d.ts +51 -0
  315. package/types/forgeroute-ui-skip-link.d.ts +51 -0
  316. package/types/forgeroute-ui-snackbar.d.ts +50 -0
  317. package/types/forgeroute-ui-square.d.ts +5 -3
  318. package/types/forgeroute-ui-stack.d.ts +99 -0
  319. package/types/forgeroute-ui-stacked-bar.d.ts +84 -0
  320. package/types/forgeroute-ui-stacking-plan.d.ts +116 -0
  321. package/types/forgeroute-ui-star-rating.d.ts +151 -0
  322. package/types/forgeroute-ui-star.d.ts +46 -0
  323. package/types/forgeroute-ui-stepper.d.ts +273 -0
  324. package/types/forgeroute-ui-stripe.d.ts +4 -2
  325. package/types/forgeroute-ui-swatch-picker.d.ts +118 -0
  326. package/types/forgeroute-ui-table-toolbar.d.ts +116 -0
  327. package/types/forgeroute-ui-table-types.d.ts +624 -0
  328. package/types/forgeroute-ui-text-input.d.ts +359 -0
  329. package/types/forgeroute-ui-text-template-picker.d.ts +100 -0
  330. package/types/forgeroute-ui-text.d.ts +76 -0
  331. package/types/forgeroute-ui-textarea-input.d.ts +174 -0
  332. package/types/forgeroute-ui-time-input.d.ts +105 -0
  333. package/types/forgeroute-ui-timeline.d.ts +196 -0
  334. package/types/forgeroute-ui-toast.d.ts +131 -0
  335. package/types/forgeroute-ui-toggle-badge.d.ts +64 -0
  336. package/types/forgeroute-ui-toggle.d.ts +92 -0
  337. package/types/forgeroute-ui-tooltip.d.ts +36 -0
  338. package/types/forgeroute-ui-utils.d.ts +210 -0
  339. package/types/forgeroute-ui.d.ts +106 -19539
  340. package/fesm2022/forgeroute-ui.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-detail-card.mjs","names":[],"sources":["../../../projects/forgeroute-ui/detail-card/src/lib/detail-card/detail-card.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, model, output, computed, inject } from '@angular/core';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** Elements inside a selectable card whose clicks never toggle the selection (they act on their own). */\nconst SELECT_IGNORE = 'button, a[href], input, select, textarea, label, [role=button], [role=link], [data-no-select]';\n\n/**\n * Card for detail pages: an optional header and a body, both filled by the page that uses it.\n *\n * Header (all optional - set `[showHeader]=\"false\"` and the card is just the body):\n * - `title` / `subtitle`: the bold uppercase title and the grey line under it.\n * - `titleId`: an id for the title text, which also names the card for assistive tech (aria-labelledby).\n * - `ariaLabel`: the card's accessible name when the header does not provide one (`[showHeader]=\"false\"`, or a header with no title). A visible title always wins; `titleId` still names the card by aria-labelledby.\n * - `<div card-header-leading>`: something before the title block, such as a logo or an icon.\n * - `<ng-container card-header>`: your own header content, shown under the title (or instead of it when no title is set).\n * - `<ng-container card-header-action>`: buttons or links on the right side of the header.\n * - `showEdit` + `editLabel` + `(editClick)`: the built-in Edit button. `editAriaLabel` gives it a longer accessible name\n * (\"Edit informant information\") when the visible label alone is ambiguous; it should contain the visible label.\n * - `fill`: the card stretches to the height of its container (a grid cell or flex item) and its body grows, so cards in\n * one row end at the same height; the default card is only as tall as its content.\n * Use it in grid / flex cells: the spacing between cells comes from the gap, so a filled card's margin-bottom is 0 (the default card keeps 16px).\n * - `background`: the card's background colour (any CSS colour; default white).\n * - `headerBackground`: the background colour of the header bar only (any CSS colour; default none, the card's own background shows). The body keeps the card's `background`, and a header-less card (`showHeader` false) has no bar to colour. A collapsible header keeps this colour on hover. Pair it with `textColor` when the colour is dark.\n * - `textColor`: the colour of the title, subtitle, chevron and body text (any CSS colour; default: the normal slate colours). Use it for light text on a dark `background`. Text you colour yourself inside the body keeps its own colour.\n * - `<ng-container card-footer>` / `<div card-footer>`: a footer bar under the body (a pager, totals, a link). Hidden while empty or collapsed, 10px 18px padding,\n * a light top line; `footerBackground` colours it (pair it with `headerBackground` to frame the card). In a `fill` card it is pinned to the bottom edge.\n * - `footerAlign=\"end\"` (library source 2026-11-04, not yet published): turns the `[card-footer]` bar into a right-aligned action row (flex, `justify-content: flex-end`,\n * 8px gap, wraps on a narrow card) for one or several buttons under the body, e.g. `<ui-button card-footer variant=\"secondary\" size=\"sm\">Open Resident</ui-button>`.\n * Default `'start'` = the footer is unchanged (block content, left-aligned). Hidden while empty or collapsed in both modes.\n * - The body has built-in padding (16px 18px, matching the header's 18px side padding); there is no padding-size input. `[noPadding]=\"true\"` (library source 2026-11-06, not yet published) removes the body padding for a table / list / grid that runs edge to edge.\n * - `collapsible` (default true): a chevron toggle and a clickable header; `[(expanded)]` is two-way.\n * Without a header, or with `collapsible` false, the body is always open.\n *\n * The title is shown in capitals unless `[uppercaseTitle]=\"false\"` (then it shows as written, e.g. \"Case IDs\"); the casing is CSS only, so the accessible name and heading text are always the text you gave; the subtitle keeps the case you give it. The body is the default content slot. A collapsed body is removed from the tab order and from assistive tech.\n *\n * - `selectable` (default false) + `[(selected)]` + `selectedColor` / `selectedBackground`: a pickable card (a product card, a plan). A click anywhere on the card\n * toggles `selected`, except a click on or inside an interactive element (`button, a[href], input, select, textarea, label, [role=button],\n * [role=link], [data-no-select]`; mark any other control with `data-no-select`) and except when text inside the card is being selected\n * (a drag). A selected card gets `data-selected=\"true\"` on the host, a 2px outline (`selectedColor`, default `#3b82f6`, drawn 1px inside the edge) and,\n * when `selectedBackground` is set, that background (instead of `background`). A selectable card shows the pointer cursor.\n * The card is NOT focusable and has no extra role: **a selectable card must contain its own checkbox (or radio)**, which is the keyboard and\n * assistive-tech path (`[checked]=\"selected()\"` / `(change)`). With `selectable` false there is no handler, cursor or outline.\n * (A click on a collapsible header outside its controls still collapses the card as before.)\n *\n * <ui-detail-card title=\"COMMUNICATIONS\" subtitle=\"All calls, texts, and emails\"> ...body... </ui-detail-card>\n * <ui-detail-card title=\"CONTACT INFO\" [showEdit]=\"true\" (editClick)=\"openEdit()\"> ... </ui-detail-card>\n * <ui-detail-card [showHeader]=\"false\"> ...body only... </ui-detail-card>\n * <ui-detail-card [showHeader]=\"false\" ariaLabel=\"Report filters\"> ...body only, but named for assistive tech... </ui-detail-card>\n * <ui-detail-card [collapsible]=\"false\">\n * <div card-header>Any markup</div>\n * <ui-button card-header-action size=\"xs\" variant=\"secondary\">Add</ui-button>\n * ...body...\n * </ui-detail-card>\n */\n@Component({\n selector: 'ui-detail-card',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ButtonComponent],\n host: {\n 'role': 'group',\n '[class.dc-fill-host]': 'fill()',\n '[attr.data-selected]': 'selectable() && selected() ? \"true\" : null',\n '[attr.aria-labelledby]': 'showHeader() && title() && titleId() ? titleId() : null',\n '[attr.aria-label]': 'groupLabel()',\n },\n template: `\n <div class=\"dc\" [class.dc-fill]=\"fill()\" [class.dc-has-text-color]=\"!!textColor()\" [class.dc-has-bg]=\"!!((selectable() && selected() && selectedBackground()) || background())\" [class.dc-selectable]=\"selectable()\" [class.dc-selected]=\"selectable() && selected()\"\n [style.outline-color]=\"selectable() && selected() ? selectedColor() : null\"\n [style.background]=\"(selectable() && selected() && selectedBackground()) || background() || null\" (click)=\"onCardClick($event)\"\n [style.color]=\"textColor() || null\" [style.--dc-text]=\"textColor() || null\" [style.--dc-body-max-height]=\"maxBodyHeight() || null\">\n @if (showHeader()) {\n <div class=\"dc-header\" [class.collapsible]=\"collapsible()\" [class.open]=\"isOpen()\" [style.background]=\"headerBackground() || null\" (click)=\"onHeaderClick($event)\">\n @if (collapsible()) {\n <ui-button class=\"dc-chevron\" variant=\"icon\" size=\"sm\"\n [ariaLabel]=\"title() || labels.t('detailCard.toggleSection')\"\n [ariaExpanded]=\"isOpen()\"\n (click)=\"$event.stopPropagation(); toggle()\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\" [class.rotated]=\"!isOpen()\" aria-hidden=\"true\">\n <path d=\"M6 9l6 6 6-6\"/>\n </svg>\n </ui-button>\n }\n <ng-content select=\"[card-header-leading]\" />\n <div class=\"dc-header-text\">\n @if (title()) { <span class=\"dc-title\" [class.dc-title--as-written]=\"!uppercaseTitle()\" [attr.id]=\"titleId() || null\" [attr.role]=\"headingLevel() ? 'heading' : null\" [attr.aria-level]=\"headingLevel() || null\">{{ title() }}</span> }\n @if (subtitle()) { <span class=\"dc-subtitle\">{{ subtitle() }}</span> }\n <ng-content select=\"[card-header]\" />\n </div>\n @if (showEdit()) {\n <span class=\"dc-edit\"><button type=\"button\" class=\"dc-edit-action\" [attr.aria-label]=\"editAriaLabel() || null\" [attr.data-testid]=\"editTestId() || null\" (click)=\"$event.stopPropagation(); editClick.emit()\">\n @if (editIcon()) {\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"/>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"/>\n </svg>\n }\n {{ editLabel() }}\n </button></span>\n }\n <ng-content select=\"[card-header-action]\" />\n </div>\n }\n <div class=\"dc-body-wrap\" [class.collapsed]=\"!isOpen()\" [attr.inert]=\"isOpen() ? null : ''\" [attr.aria-hidden]=\"isOpen() ? null : 'true'\">\n <div class=\"dc-body\" [class.dc-body--flush]=\"noPadding()\">\n <ng-content />\n </div>\n </div>\n <div class=\"dc-footer\" [class.dc-footer--hidden]=\"!isOpen()\" [class.dc-footer--end]=\"footerAlign() === 'end'\" [style.background]=\"footerBackground() || null\"><ng-content select=\"[card-footer]\" /></div>\n </div>\n `,\n styles: [`\n :host { display: block; margin-bottom: 16px; }\n :host(:last-child) { margin-bottom: 0; }\n /* fill: the card takes the height of its grid cell / flex item and the body grows. */\n :host(.dc-fill-host) { height: 100%; margin-bottom: 0; } /* margin 0: height 100% + the 16px margin would overflow the cell; spacing comes from the grid gap */\n .dc.dc-fill { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; } /* border-box: the 1px border must not push the card past its cell */\n .dc.dc-fill .dc-body-wrap { flex: 1 1 auto; min-height: 0; }\n /* fill: the body (a stretched cell of the .dc-body-wrap grid) is a flex column, so projected content can grow to the card's height (e.g. pin a price to the bottom with margin-top: auto) */\n .dc.dc-fill .dc-body { display: flex; flex-direction: column; }\n\n .dc-selectable { cursor: pointer; }\n .dc-selected { outline: 2px solid #3b82f6; outline-offset: -1px; } /* the colour comes from selectedColor (inline outline-color) */\n .dc { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }\n\n .dc-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 14px 18px; }\n .dc-header.open { border-bottom: 1px solid #f1f5f9; }\n /* a card with its own background colour (or a selected background) gets a darker, translucent header line: the pale default vanishes on a tint */\n .dc-has-bg .dc-header.open { border-bottom-color: rgba(148, 163, 184, 0.35); }\n .dc-header.collapsible { cursor: pointer; -webkit-user-select: none; user-select: none; } /* Safari needs the -webkit- prefix */\n @media (hover: hover) { .dc-header.collapsible:hover { background: #f8fafc; } }\n\n .dc-chevron { flex-shrink: 0; color: var(--dc-text, #64748b); }\n .dc-chevron svg { transition: transform 0.2s; }\n .dc-chevron svg.rotated { transform: rotate(-90deg); }\n\n .dc-header-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 160px; min-width: 0; word-break: break-word; overflow-wrap: anywhere; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n .dc-title { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.07em; color: var(--dc-text, #1e293b); line-height: 1.3; text-transform: uppercase; }\n .dc-title--as-written { text-transform: none; }\n .dc-subtitle { font-size: 0.8125rem; color: var(--dc-text, #475569); } /* 13px: the same size as the title (which is bold capitals), no longer the smaller 12px */\n .dc-has-text-color .dc-subtitle { opacity: 0.8; }\n .dc-has-text-color .dc-header.open { border-bottom-color: rgba(148, 163, 184, 0.35); }\n .dc-edit { flex-shrink: 0; margin-left: auto; }\n /* Same look as the contact detail page's Edit link: 0.8rem / 500, slate text, light border, 6px radius. */\n .dc-edit-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-family: inherit; font-size: 0.8rem; font-weight: 500; line-height: 1.4; color: #64748b; background: none; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 10px; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }\n .dc-edit-action:hover { background: #f1f5f9; color: #1e293b; }\n .dc-edit-action:focus-visible { outline: 2px solid var(--ui-focus, #3b82f6); outline-offset: 2px; }\n @media (pointer: coarse), (max-width: 480px) { .dc-edit-action { min-height: 44px; } } /* the library-wide 44px touch target */\n\n .dc-body-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.25s ease; }\n .dc-body-wrap.collapsed { grid-template-rows: 0fr; }\n /* A tall body scrolls inside the card instead of stretching it: set a max height with the maxBodyHeight input or the --dc-body-max-height custom property (default none: the body is as tall as its content). */\n .dc-body { box-sizing: border-box; padding: 16px 18px; min-height: 0; overflow-x: hidden; overflow-y: auto; max-height: var(--dc-body-max-height, none); }\n\n /* noPadding: the body has no padding of its own, for a table, list or grid that runs edge to edge. */\n .dc-body.dc-body--flush { padding: 0; }\n\n /* Footer slot: a bar under the body (e.g. a pager), hidden while empty or collapsed. In a filled card it sits at the bottom edge. */\n .dc-footer { padding: 10px 18px; border-top: 1px solid #f1f5f9; }\n .dc-footer:empty, .dc-footer.dc-footer--hidden { display: none; }\n /* footerAlign=\"end\": a right-aligned action row (never shown while the footer is empty or collapsed). */\n .dc-footer.dc-footer--end:not(:empty):not(.dc-footer--hidden) { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }\n .dc-has-bg .dc-footer { border-top-color: rgba(148, 163, 184, 0.35); }\n\n @media (max-width: 480px) {\n .dc-footer { padding: 10px 14px; }\n .dc-header { padding: 12px 14px; }\n .dc-body { padding: 14px; }\n .dc-edit { margin-left: 0; }\n }\n @media (prefers-reduced-motion: reduce) {\n .dc-body-wrap, .dc-chevron svg { transition: none; }\n }\n `],\n})\nexport class DetailCardComponent {\n protected readonly labels = inject(UiLabelsService);\n /** Bold uppercase title. Empty = no title text. */\n readonly title = input('');\n /** true (default) = the title is displayed in capitals (CSS only); false = shown as written. The text, aria-label and heading name are never changed. */\n readonly uppercaseTitle = input(true);\n /** 1-6 makes the title a real heading for screen readers (role=heading, aria-level); null keeps it plain text. */\n readonly headingLevel = input<1 | 2 | 3 | 4 | 5 | 6 | null>(null);\n /** Optional id for the title text; the card is then labelled by it. Without it the title is the card's aria-label. */\n readonly titleId = input('');\n /** Accessible name of the card when the header gives none (no header, or no title). A visible title wins; blank = no name. */\n readonly ariaLabel = input('');\n /** Grey line under the title. */\n readonly subtitle = input('');\n /** Card background as any CSS colour (`#f8fafc`, `var(--surface)` …). Empty = white. */\n readonly background = input('');\n /** Background colour of the header bar only, as any CSS colour (`#eaf3ff`, `var(--surface-2)` …). Empty = the header has no colour of its own (the card background shows). The body is not affected. */\n readonly headerBackground = input('');\n /** Background colour of the footer bar (the `[card-footer]` slot) as any CSS colour. Empty = no colour of its own. */\n readonly footerBackground = input('');\n /** Alignment of the `[card-footer]` content: `'start'` (default, unchanged) or `'end'` = a right-aligned action row with an 8px gap. */\n readonly footerAlign = input<'start' | 'end'>('start');\n /** Text colour as any CSS colour (`#fff`, `var(--on-dark)` …). Empty = the default colours. Colours the title, subtitle, chevron and body text. */\n readonly textColor = input('');\n /** false = no header at all (no title, edit button, toggle or divider): the card is only the body, always open. */\n readonly showHeader = input(true);\n /** Chevron toggle + clickable header. false = the body is always open. */\n readonly collapsible = input(true);\n /** Two-way: whether the body is open. */\n readonly expanded = model(true);\n /** Show the built-in Edit button in the header. */\n readonly showEdit = input(false);\n readonly editLabelInput = input<string | null>(null, { alias: 'editLabel' });\n readonly editLabel = computed(() => this.editLabelInput() ?? this.labels.t('detailCard.editLabel'));\n readonly editClick = output<void>();\n /** `data-testid` of the built-in Edit button (on the Edit `<button>`); none when empty. */\n readonly editTestId = input('');\n /** false = no pencil icon in the Edit button (text only). Default true: unchanged. */\n readonly editIcon = input(true);\n /** Accessible name of the Edit button, e.g. \"Edit informant information\". Empty = the visible `editLabel`. */\n readonly editAriaLabel = input('');\n /** true = the card fills the height of its container (a grid cell / flex item) so sibling cards line up; the body grows. Spacing between cells comes from the gap: the filled card's margin-bottom is 0. Default false: unchanged. */\n readonly fill = input(false);\n /** true = the body has no padding, so a table, list or grid inside runs edge to edge (the header and footer keep theirs). Default false: the 16px 18px body padding. */\n readonly noPadding = input(false);\n /** Max height of the card body (any CSS length, e.g. `360px`): a longer body scrolls inside the card so the card never gets crazy long. Empty = no limit (or the `--dc-body-max-height` custom property, which a page can set on the card or an ancestor). */\n readonly maxBodyHeight = input('');\n\n /** true = a click on the card (outside interactive controls and text selections) toggles `selected`. The card must contain its own checkbox for keyboard / screen-reader users. Default false: no handler, cursor or outline. */\n readonly selectable = input(false);\n /** Two-way: whether the card is selected (only shown / toggled when `selectable`). */\n readonly selected = model(false);\n /** CSS colour of the 2px outline of a selected card. Default `#3b82f6`. */\n readonly selectedColor = input('#3b82f6');\n /** CSS colour used as the card background while selected (wins over `background`). Empty = the background does not change. */\n readonly selectedBackground = input('');\n\n /** The group's aria-label: the visible title (unless `titleId` names the card instead), else `ariaLabel`, else none. */\n groupLabel(): string | null {\n if (this.showHeader() && this.title()) return this.titleId() ? null : this.title();\n return this.ariaLabel().trim() || null;\n }\n /** The body is open unless the card has a header that is collapsible and was collapsed. */\n isOpen(): boolean { return !(this.showHeader() && this.collapsible()) || this.expanded(); }\n\n /** selectable: a click on the card toggles `selected` unless it came from an interactive element or ends a text selection. */\n onCardClick(event: Event) {\n if (!this.selectable()) return;\n const card = event.currentTarget as HTMLElement | null;\n const target = event.target as Element | null;\n if (!card || !target || typeof target.closest !== 'function') return;\n const control = target.closest(SELECT_IGNORE);\n if (control && card.contains(control)) return;\n const sel = card.ownerDocument.defaultView?.getSelection?.();\n if (sel && !sel.isCollapsed && sel.toString() !== '' && (card.contains(sel.anchorNode) || card.contains(sel.focusNode))) return; // a text drag, not a click\n this.selected.set(!this.selected());\n }\n\n toggle() { this.expanded.set(!this.expanded()); }\n\n /** A click on the header toggles, except on a control inside it (Edit, your own header actions, links, inputs). */\n onHeaderClick(event: Event) {\n if (!this.showHeader() || !this.collapsible()) return;\n const target = event.target as Element | null;\n if (target?.closest('button, a, input, select, textarea, label, [role=\"button\"], [role=\"link\"], [tabindex]:not([tabindex=\"-1\"])')?.closest('.dc-header')) {\n // A real control was clicked: its own handler decides. The chevron button toggles through its own (click).\n return;\n }\n this.toggle();\n }\n}\n"],"mappings":";;;AAKA,MAAM,gBAAgB;AA4KtB,IAAa,sBAAb,MAAa,oBAAmB;CA1HhC,cAAA;EA2HqB,KAAA,SAAS,OAAO,eAAe;EAEzC,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEjB,KAAA,iBAAiB,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;EAE5B,KAAA,eAAe,MAAoC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EAExD,KAAA,UAAU,MAAM,IAAG,GAAA,YAAA,CAAA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AAA;;AAsHd,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EA1H/B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAgB,YACd;GAAI,iBACC,wBAAwB;GAAM,SACtC,CAAC,eAAe;GAAC,MACpB;IACJ,QAAQ;IACR,wBAAwB;IACxB,wBAAwB;IACxB,0BAA0B;IAC1B,qBAAqB;GACtB;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CT,QAAA,CAAA,+zFAAA;EAAA,CAAA"}
@@ -0,0 +1,259 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, computed, inject, input, output, signal } from "@angular/core";
3
+ import { HttpClient } from "@angular/common/http";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { FORGEROUTE_CONFIG, UiLabelsService } from "@forgeroute/ui/core";
6
+ import { CheckboxComponent } from "@forgeroute/ui/checkbox";
7
+ var DiscountSelectorComponent = class DiscountSelectorComponent {
8
+ constructor() {
9
+ this.labels = inject(UiLabelsService);
10
+ this.subtotal = input(0, ...ngDevMode ? [{ debugName: "subtotal" }] : /* istanbul ignore next */ []);
11
+ this.emptyMessageInput = input(null, {
12
+ ...ngDevMode ? { debugName: "emptyMessageInput" } : /* istanbul ignore next */ {},
13
+ alias: "emptyMessage"
14
+ });
15
+ this.emptyMessage = computed(() => this.emptyMessageInput() ?? this.labels.t("discountSelector.emptyMessage"), ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
16
+ this.discountsChanged = output();
17
+ this.http = inject(HttpClient);
18
+ this.apiBase = inject(FORGEROUTE_CONFIG, { optional: true })?.baseUrl ?? "/api";
19
+ this.destroyRef = inject(DestroyRef);
20
+ this._discounts = signal([], ...ngDevMode ? [{ debugName: "_discounts" }] : /* istanbul ignore next */ []);
21
+ this._selectedIds = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "_selectedIds" }] : /* istanbul ignore next */ []);
22
+ this._expanded = signal(false, ...ngDevMode ? [{ debugName: "_expanded" }] : /* istanbul ignore next */ []);
23
+ this._selected = computed(() => this._discounts().filter((d) => this._selectedIds().has(d.id)), ...ngDevMode ? [{ debugName: "_selected" }] : /* istanbul ignore next */ []);
24
+ this.http.get(`${this.apiBase}/discounts/active`).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({
25
+ next: (d) => this._discounts.set(d ?? []),
26
+ error: () => this._discounts.set([])
27
+ });
28
+ }
29
+ toggle(id) {
30
+ const ids = new Set(this._selectedIds());
31
+ if (ids.has(id)) ids.delete(id);
32
+ else ids.add(id);
33
+ this._selectedIds.set(ids);
34
+ const subtotal = this.subtotal();
35
+ this.discountsChanged.emit(this._selected().map((d) => ({
36
+ ...d,
37
+ computedAmount: d.type === "FIXED" ? d.value : subtotal * d.value / 100
38
+ })));
39
+ }
40
+ formatValue(d) {
41
+ return d.type === "FIXED" ? this.labels.formatCurrency(d.value, "USD", {
42
+ minimumFractionDigits: 0,
43
+ maximumFractionDigits: 20,
44
+ useGrouping: false
45
+ }) : this.labels.formatNumber(d.value, {
46
+ maximumFractionDigits: 20,
47
+ useGrouping: false
48
+ }) + "%";
49
+ }
50
+ formatAppliesTo(d) {
51
+ switch (d.appliesTo) {
52
+ case "LABOR": return this.labels.t("discountSelector.applies.labor");
53
+ case "MATERIALS": return this.labels.t("discountSelector.applies.materials");
54
+ default: return this.labels.t("discountSelector.applies.total");
55
+ }
56
+ }
57
+ static {
58
+ this.ɵfac = i0.ɵɵngDeclareFactory({
59
+ minVersion: "12.0.0",
60
+ version: "22.2.2",
61
+ ngImport: i0,
62
+ type: DiscountSelectorComponent,
63
+ deps: [],
64
+ target: i0.ɵɵFactoryTarget.Component
65
+ });
66
+ }
67
+ static {
68
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
69
+ minVersion: "17.0.0",
70
+ version: "22.2.2",
71
+ type: DiscountSelectorComponent,
72
+ isStandalone: true,
73
+ selector: "ui-discount-selector",
74
+ inputs: {
75
+ subtotal: {
76
+ classPropertyName: "subtotal",
77
+ publicName: "subtotal",
78
+ isSignal: true,
79
+ isRequired: false,
80
+ transformFunction: null
81
+ },
82
+ emptyMessageInput: {
83
+ classPropertyName: "emptyMessageInput",
84
+ publicName: "emptyMessage",
85
+ isSignal: true,
86
+ isRequired: false,
87
+ transformFunction: null
88
+ }
89
+ },
90
+ outputs: { discountsChanged: "discountsChanged" },
91
+ ngImport: i0,
92
+ template: `
93
+ <div class="ds">
94
+ <button type="button" class="ds-header" [attr.aria-expanded]="_expanded()" (click)="_expanded.set(!_expanded())">
95
+ <span class="ds-label">
96
+ <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"><path d="M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/></svg>
97
+ {{ labels.t('discountSelector.discounts') }}
98
+ @if (_selectedIds().size > 0) { <span class="ds-badge">{{ _selectedIds().size }}</span> }
99
+ </span>
100
+ <svg class="ds-chevron" [class.ds-chevron-open]="_expanded()" 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"><polyline points="6 9 12 15 18 9"/></svg>
101
+ </button>
102
+
103
+ @if (_expanded()) {
104
+ <div class="ds-body">
105
+ @for (d of _discounts(); track d.id) {
106
+ <div class="ds-option" [class.ds-option-selected]="_selectedIds().has(d.id)">
107
+ <ui-checkbox [checked]="_selectedIds().has(d.id)" (checkedChange)="toggle(d.id)">
108
+ <span class="ds-option-info">
109
+ <span class="ds-option-name">{{ d.name }}</span>
110
+ <span class="ds-option-detail">{{ d.description || labels.t('discountSelector.offApplies', { value: formatValue(d), applies: formatAppliesTo(d) }) }}</span>
111
+ </span>
112
+ </ui-checkbox>
113
+ <span class="ds-option-value">{{ formatValue(d) }}</span>
114
+ </div>
115
+ } @empty {
116
+ <p class="ds-empty">{{ emptyMessage() }}</p>
117
+ }
118
+ </div>
119
+ }
120
+
121
+ @if (_selected().length > 0) {
122
+ <div class="ds-applied">
123
+ @for (d of _selected(); track d.id) {
124
+ <div class="ds-applied-row">
125
+ <span class="ds-applied-name">{{ d.name }}</span>
126
+ <span class="ds-applied-value">-{{ formatValue(d) }}</span>
127
+ <button type="button" class="ds-remove" [attr.aria-label]="labels.t('common.removeNamed', { name: d.name })" (click)="toggle(d.id)">
128
+ <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"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
129
+ </button>
130
+ </div>
131
+ }
132
+ </div>
133
+ }
134
+ </div>
135
+ `,
136
+ isInline: true,
137
+ styles: [":host{display:block}.ds{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff}.ds-header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border:none;background:transparent;font-family:inherit;cursor:pointer}.ds-header:hover{background:#f8fafc}.ds-label{display:flex;align-items:center;gap:8px;font-size:.875rem;font-weight:600;color:#334155}.ds-label svg{color:#d97706}.ds-badge{background:#d97706;color:#fff;font-size:.6875rem;font-weight:700;padding:1px 7px;border-radius:10px;line-height:1.4}.ds-chevron{color:#94a3b8;transition:transform .2s ease}.ds-chevron-open{transform:rotate(180deg)}.ds-body{border-top:1px solid #e2e8f0;padding:4px 0}.ds-empty{padding:16px;margin:0;text-align:center;color:#94a3b8;font-size:.8125rem}.ds-option{display:flex;align-items:center;gap:12px;padding:10px 16px}.ds-option:hover{background:#fffbeb}.ds-option ui-checkbox{flex:1;min-width:0}.ds-option-selected{background:#fffbeb}.ds-option-info{display:flex;flex-direction:column;min-width:0}.ds-option-name{font-size:.8125rem;font-weight:600;color:#0f172a}.ds-option-detail{font-size:.75rem;color:#94a3b8;margin-top:1px}.ds-option-value{font-size:.8125rem;font-weight:700;color:#d97706;white-space:nowrap}.ds-applied{border-top:1px solid #e2e8f0;padding:8px 16px;background:#fffbeb}.ds-applied-row{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:.8125rem;color:#334155}.ds-applied-name{flex:1}.ds-applied-value{font-weight:600;color:#16a34a}.ds-remove{display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;border-radius:4px;background:transparent;color:#94a3b8;cursor:pointer}.ds-remove:hover{background:#fef2f2;color:#dc2626}\n"],
138
+ dependencies: [{
139
+ kind: "component",
140
+ type: CheckboxComponent,
141
+ selector: "ui-checkbox, ui-checkbox-group",
142
+ inputs: [
143
+ "label",
144
+ "ariaLabel",
145
+ "testId",
146
+ "labelTestId",
147
+ "headingLevel",
148
+ "indeterminate",
149
+ "checked",
150
+ "options",
151
+ "legend",
152
+ "orientation",
153
+ "values",
154
+ "labelLinks",
155
+ "description",
156
+ "indent",
157
+ "required",
158
+ "requiredMessage",
159
+ "hint",
160
+ "error",
161
+ "showErrors",
162
+ "disabled"
163
+ ],
164
+ outputs: [
165
+ "checkedChange",
166
+ "valuesChange",
167
+ "invalidChange"
168
+ ]
169
+ }],
170
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
171
+ });
172
+ }
173
+ };
174
+ i0.ɵɵngDeclareClassMetadata({
175
+ minVersion: "12.0.0",
176
+ version: "22.2.2",
177
+ ngImport: i0,
178
+ type: DiscountSelectorComponent,
179
+ decorators: [{
180
+ type: Component,
181
+ args: [{
182
+ selector: "ui-discount-selector",
183
+ standalone: true,
184
+ changeDetection: ChangeDetectionStrategy.OnPush,
185
+ imports: [CheckboxComponent],
186
+ template: `
187
+ <div class="ds">
188
+ <button type="button" class="ds-header" [attr.aria-expanded]="_expanded()" (click)="_expanded.set(!_expanded())">
189
+ <span class="ds-label">
190
+ <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"><path d="M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/></svg>
191
+ {{ labels.t('discountSelector.discounts') }}
192
+ @if (_selectedIds().size > 0) { <span class="ds-badge">{{ _selectedIds().size }}</span> }
193
+ </span>
194
+ <svg class="ds-chevron" [class.ds-chevron-open]="_expanded()" 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"><polyline points="6 9 12 15 18 9"/></svg>
195
+ </button>
196
+
197
+ @if (_expanded()) {
198
+ <div class="ds-body">
199
+ @for (d of _discounts(); track d.id) {
200
+ <div class="ds-option" [class.ds-option-selected]="_selectedIds().has(d.id)">
201
+ <ui-checkbox [checked]="_selectedIds().has(d.id)" (checkedChange)="toggle(d.id)">
202
+ <span class="ds-option-info">
203
+ <span class="ds-option-name">{{ d.name }}</span>
204
+ <span class="ds-option-detail">{{ d.description || labels.t('discountSelector.offApplies', { value: formatValue(d), applies: formatAppliesTo(d) }) }}</span>
205
+ </span>
206
+ </ui-checkbox>
207
+ <span class="ds-option-value">{{ formatValue(d) }}</span>
208
+ </div>
209
+ } @empty {
210
+ <p class="ds-empty">{{ emptyMessage() }}</p>
211
+ }
212
+ </div>
213
+ }
214
+
215
+ @if (_selected().length > 0) {
216
+ <div class="ds-applied">
217
+ @for (d of _selected(); track d.id) {
218
+ <div class="ds-applied-row">
219
+ <span class="ds-applied-name">{{ d.name }}</span>
220
+ <span class="ds-applied-value">-{{ formatValue(d) }}</span>
221
+ <button type="button" class="ds-remove" [attr.aria-label]="labels.t('common.removeNamed', { name: d.name })" (click)="toggle(d.id)">
222
+ <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"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
223
+ </button>
224
+ </div>
225
+ }
226
+ </div>
227
+ }
228
+ </div>
229
+ `,
230
+ styles: [":host{display:block}.ds{border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;background:#fff}.ds-header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border:none;background:transparent;font-family:inherit;cursor:pointer}.ds-header:hover{background:#f8fafc}.ds-label{display:flex;align-items:center;gap:8px;font-size:.875rem;font-weight:600;color:#334155}.ds-label svg{color:#d97706}.ds-badge{background:#d97706;color:#fff;font-size:.6875rem;font-weight:700;padding:1px 7px;border-radius:10px;line-height:1.4}.ds-chevron{color:#94a3b8;transition:transform .2s ease}.ds-chevron-open{transform:rotate(180deg)}.ds-body{border-top:1px solid #e2e8f0;padding:4px 0}.ds-empty{padding:16px;margin:0;text-align:center;color:#94a3b8;font-size:.8125rem}.ds-option{display:flex;align-items:center;gap:12px;padding:10px 16px}.ds-option:hover{background:#fffbeb}.ds-option ui-checkbox{flex:1;min-width:0}.ds-option-selected{background:#fffbeb}.ds-option-info{display:flex;flex-direction:column;min-width:0}.ds-option-name{font-size:.8125rem;font-weight:600;color:#0f172a}.ds-option-detail{font-size:.75rem;color:#94a3b8;margin-top:1px}.ds-option-value{font-size:.8125rem;font-weight:700;color:#d97706;white-space:nowrap}.ds-applied{border-top:1px solid #e2e8f0;padding:8px 16px;background:#fffbeb}.ds-applied-row{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:.8125rem;color:#334155}.ds-applied-name{flex:1}.ds-applied-value{font-weight:600;color:#16a34a}.ds-remove{display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;border-radius:4px;background:transparent;color:#94a3b8;cursor:pointer}.ds-remove:hover{background:#fef2f2;color:#dc2626}\n"]
231
+ }]
232
+ }],
233
+ ctorParameters: () => [],
234
+ propDecorators: {
235
+ subtotal: [{
236
+ type: i0.Input,
237
+ args: [{
238
+ isSignal: true,
239
+ alias: "subtotal",
240
+ required: false
241
+ }]
242
+ }],
243
+ emptyMessageInput: [{
244
+ type: i0.Input,
245
+ args: [{
246
+ isSignal: true,
247
+ alias: "emptyMessage",
248
+ required: false
249
+ }]
250
+ }],
251
+ discountsChanged: [{
252
+ type: i0.Output,
253
+ args: ["discountsChanged"]
254
+ }]
255
+ }
256
+ });
257
+ export { DiscountSelectorComponent };
258
+
259
+ //# sourceMappingURL=forgeroute-ui-discount-selector.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-discount-selector.mjs","names":[],"sources":["../../../projects/forgeroute-ui/discount-selector/src/lib/discount-selector/discount-selector.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, DestroyRef, inject, input, output, signal, computed } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FORGEROUTE_CONFIG } from '@forgeroute/ui/core';\nimport { CheckboxComponent } from '@forgeroute/ui/checkbox';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nexport interface DiscountOption {\n id: string;\n name: string;\n /** 'FIXED' (dollar amount) or a percentage type. */\n type: string;\n value: number;\n /** 'LABOR' | 'MATERIALS' | anything else = whole total. */\n appliesTo: string;\n description: string | null;\n}\n\nexport interface AppliedDiscount extends DiscountOption {\n /** Dollar amount off: `value` for FIXED, otherwise `subtotal * value / 100`. */\n computedAmount: number;\n}\n\n/**\n * Collapsible list of the account's active discounts (`GET <baseUrl>/discounts/active`).\n * Emits the chosen discounts with their computed amounts against `subtotal`.\n *\n * <ui-discount-selector [subtotal]=\"subtotal()\" (discountsChanged)=\"onDiscounts($event)\" />\n */\n@Component({\n selector: 'ui-discount-selector',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CheckboxComponent],\n template: `\n <div class=\"ds\">\n <button type=\"button\" class=\"ds-header\" [attr.aria-expanded]=\"_expanded()\" (click)=\"_expanded.set(!_expanded())\">\n <span class=\"ds-label\">\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\"><path d=\"M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z\"/><line x1=\"7\" y1=\"7\" x2=\"7.01\" y2=\"7\"/></svg>\n {{ labels.t('discountSelector.discounts') }}\n @if (_selectedIds().size > 0) { <span class=\"ds-badge\">{{ _selectedIds().size }}</span> }\n </span>\n <svg class=\"ds-chevron\" [class.ds-chevron-open]=\"_expanded()\" 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\"><polyline points=\"6 9 12 15 18 9\"/></svg>\n </button>\n\n @if (_expanded()) {\n <div class=\"ds-body\">\n @for (d of _discounts(); track d.id) {\n <div class=\"ds-option\" [class.ds-option-selected]=\"_selectedIds().has(d.id)\">\n <ui-checkbox [checked]=\"_selectedIds().has(d.id)\" (checkedChange)=\"toggle(d.id)\">\n <span class=\"ds-option-info\">\n <span class=\"ds-option-name\">{{ d.name }}</span>\n <span class=\"ds-option-detail\">{{ d.description || labels.t('discountSelector.offApplies', { value: formatValue(d), applies: formatAppliesTo(d) }) }}</span>\n </span>\n </ui-checkbox>\n <span class=\"ds-option-value\">{{ formatValue(d) }}</span>\n </div>\n } @empty {\n <p class=\"ds-empty\">{{ emptyMessage() }}</p>\n }\n </div>\n }\n\n @if (_selected().length > 0) {\n <div class=\"ds-applied\">\n @for (d of _selected(); track d.id) {\n <div class=\"ds-applied-row\">\n <span class=\"ds-applied-name\">{{ d.name }}</span>\n <span class=\"ds-applied-value\">-{{ formatValue(d) }}</span>\n <button type=\"button\" class=\"ds-remove\" [attr.aria-label]=\"labels.t('common.removeNamed', { name: d.name })\" (click)=\"toggle(d.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\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/></svg>\n </button>\n </div>\n }\n </div>\n }\n </div>\n `,\n styles: [`\n :host { display: block; }\n\n .ds { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff; }\n\n .ds-header {\n width: 100%; display: flex; justify-content: space-between; align-items: center;\n padding: 12px 16px; border: none; background: transparent; font-family: inherit; cursor: pointer;\n &:hover { background: #f8fafc; }\n }\n .ds-label {\n display: flex; align-items: center; gap: 8px;\n font-size: 0.875rem; font-weight: 600; color: #334155;\n svg { color: #d97706; }\n }\n .ds-badge {\n background: #d97706; color: #fff; font-size: 0.6875rem; font-weight: 700;\n padding: 1px 7px; border-radius: 10px; line-height: 1.4;\n }\n .ds-chevron { color: #94a3b8; transition: transform 0.2s ease; }\n .ds-chevron-open { transform: rotate(180deg); }\n\n .ds-body { border-top: 1px solid #e2e8f0; padding: 4px 0; }\n .ds-empty { padding: 16px; margin: 0; text-align: center; color: #94a3b8; font-size: 0.8125rem; }\n\n .ds-option {\n display: flex; align-items: center; gap: 12px; padding: 10px 16px;\n &:hover { background: #fffbeb; }\n ui-checkbox { flex: 1; min-width: 0; }\n }\n .ds-option-selected { background: #fffbeb; }\n .ds-option-info { display: flex; flex-direction: column; min-width: 0; }\n .ds-option-name { font-size: 0.8125rem; font-weight: 600; color: #0f172a; }\n .ds-option-detail { font-size: 0.75rem; color: #94a3b8; margin-top: 1px; }\n .ds-option-value { font-size: 0.8125rem; font-weight: 700; color: #d97706; white-space: nowrap; }\n\n .ds-applied { border-top: 1px solid #e2e8f0; padding: 8px 16px; background: #fffbeb; }\n .ds-applied-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 0.8125rem; color: #334155; }\n .ds-applied-name { flex: 1; }\n .ds-applied-value { font-weight: 600; color: #16a34a; }\n .ds-remove {\n display: flex; align-items: center; justify-content: center;\n width: 22px; height: 22px; padding: 0; border: none; border-radius: 4px;\n background: transparent; color: #94a3b8; cursor: pointer;\n &:hover { background: #fef2f2; color: #dc2626; }\n }\n `],\n})\nexport class DiscountSelectorComponent {\n protected readonly labels = inject(UiLabelsService);\n /** Amount percentage discounts are computed against. */\n readonly subtotal = input(0);\n readonly emptyMessageInput = input<string | null>(null, { alias: 'emptyMessage' });\n readonly emptyMessage = computed(() => this.emptyMessageInput() ?? this.labels.t('discountSelector.emptyMessage'));\n\n readonly discountsChanged = output<AppliedDiscount[]>();\n\n private readonly http = inject(HttpClient);\n /** API root from FORGEROUTE_CONFIG (e.g. a cross-origin prod API); falls back to same-origin `/api`. */\n private readonly apiBase = inject(FORGEROUTE_CONFIG, { optional: true })?.baseUrl ?? '/api';\n private readonly destroyRef = inject(DestroyRef);\n\n protected readonly _discounts = signal<DiscountOption[]>([]);\n protected readonly _selectedIds = signal(new Set<string>());\n protected readonly _expanded = signal(false);\n protected readonly _selected = computed(() => this._discounts().filter(d => this._selectedIds().has(d.id)));\n\n constructor() {\n this.http.get<DiscountOption[]>(`${this.apiBase}/discounts/active`)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({ next: d => this._discounts.set(d ?? []), error: () => this._discounts.set([]) });\n }\n\n protected toggle(id: string) {\n const ids = new Set(this._selectedIds());\n if (ids.has(id)) ids.delete(id); else ids.add(id);\n this._selectedIds.set(ids);\n const subtotal = this.subtotal();\n this.discountsChanged.emit(this._selected().map(d => ({\n ...d,\n computedAmount: d.type === 'FIXED' ? d.value : (subtotal * d.value) / 100,\n })));\n }\n\n protected formatValue(d: DiscountOption): string {\n // Same digits as before in English (\"$25\", \"$12.5\", \"10%\": no forced decimals, no thousands separator); the locale only changes the separators (de: \"10,5%\").\n return d.type === 'FIXED'\n ? this.labels.formatCurrency(d.value, 'USD', { minimumFractionDigits: 0, maximumFractionDigits: 20, useGrouping: false })\n : this.labels.formatNumber(d.value, { maximumFractionDigits: 20, useGrouping: false }) + '%';\n }\n\n protected formatAppliesTo(d: DiscountOption): string {\n switch (d.appliesTo) {\n case 'LABOR': return this.labels.t('discountSelector.applies.labor');\n case 'MATERIALS': return this.labels.t('discountSelector.applies.materials');\n default: return this.labels.t('discountSelector.applies.total');\n }\n }\n}\n"],"mappings":";;;;;;AA8HA,IAAa,4BAAb,MAAa,0BAAyB;CAmBpC,cAAA;EAlBmB,KAAA,SAAS,OAAO,eAAe;EAEzC,KAAA,WAAe,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EACvB,KAAA,oBAAoB,MAAqB,MAAI;GAAA,GAAA,YAAA,EAAA,WAAA,oBAAA,+BAAA,CAAA;GAAI,OAAO;EAAc,CAAA;EACtE,KAAA,eAAe,eAAe,KAAK,kBAAiB,KAAM,KAAK,OAAO,EAAE,+BAA+B,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EAEzG,KAAA,mBAAmB,OAAM;EAEjB,KAAA,OAAa,OAAO,UAAU;EAE9B,KAAA,UAAa,OAAO,mBAAmB,EAAE,UAAU,KAAI,CAAE,CAAC,EAAE,WAAW;EACvE,KAAA,aAAa,OAAO,UAAU;EAE5B,KAAA,aAAe,OAAyB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAC3C,KAAA,eAAe,uBAAO,IAAI,IAAG,GAAW,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EACxC,KAAA,YAAe,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAC5B,KAAA,YAAe,eAAe,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 sm: 8,
6
+ md: 16,
7
+ lg: 24
8
+ };
9
+ var DividerComponent = class DividerComponent {
10
+ constructor() {
11
+ this.spaceAbove = input("none", ...ngDevMode ? [{ debugName: "spaceAbove" }] : /* istanbul ignore next */ []);
12
+ this.spaceBelow = input("md", ...ngDevMode ? [{ debugName: "spaceBelow" }] : /* istanbul ignore next */ []);
13
+ this.decorative = input(false, ...ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []);
14
+ this.above = computed(() => SPACE_PX[this.spaceAbove()] ?? 0, ...ngDevMode ? [{ debugName: "above" }] : /* istanbul ignore next */ []);
15
+ this.below = computed(() => SPACE_PX[this.spaceBelow()] ?? 0, ...ngDevMode ? [{ debugName: "below" }] : /* istanbul ignore next */ []);
16
+ }
17
+ static {
18
+ this.ɵfac = i0.ɵɵngDeclareFactory({
19
+ minVersion: "12.0.0",
20
+ version: "22.2.2",
21
+ ngImport: i0,
22
+ type: DividerComponent,
23
+ deps: [],
24
+ target: i0.ɵɵFactoryTarget.Component
25
+ });
26
+ }
27
+ static {
28
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
29
+ minVersion: "17.1.0",
30
+ version: "22.2.2",
31
+ type: DividerComponent,
32
+ isStandalone: true,
33
+ selector: "ui-divider",
34
+ inputs: {
35
+ spaceAbove: {
36
+ classPropertyName: "spaceAbove",
37
+ publicName: "spaceAbove",
38
+ isSignal: true,
39
+ isRequired: false,
40
+ transformFunction: null
41
+ },
42
+ spaceBelow: {
43
+ classPropertyName: "spaceBelow",
44
+ publicName: "spaceBelow",
45
+ isSignal: true,
46
+ isRequired: false,
47
+ transformFunction: null
48
+ },
49
+ decorative: {
50
+ classPropertyName: "decorative",
51
+ publicName: "decorative",
52
+ isSignal: true,
53
+ isRequired: false,
54
+ transformFunction: null
55
+ }
56
+ },
57
+ ngImport: i0,
58
+ template: `<hr class="ui-divider" [style.margin-top.px]="above()" [style.margin-bottom.px]="below()"
59
+ [attr.aria-hidden]="decorative() ? 'true' : null" [attr.role]="decorative() ? 'presentation' : null" />`,
60
+ isInline: true,
61
+ styles: [":host{display:block}.ui-divider{display:block;width:100%;height:0;border:0;border-top:1px solid #e2e8f0;padding:0}\n"],
62
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
63
+ });
64
+ }
65
+ };
66
+ i0.ɵɵngDeclareClassMetadata({
67
+ minVersion: "12.0.0",
68
+ version: "22.2.2",
69
+ ngImport: i0,
70
+ type: DividerComponent,
71
+ decorators: [{
72
+ type: Component,
73
+ args: [{
74
+ selector: "ui-divider",
75
+ standalone: true,
76
+ changeDetection: ChangeDetectionStrategy.OnPush,
77
+ template: `<hr class="ui-divider" [style.margin-top.px]="above()" [style.margin-bottom.px]="below()"
78
+ [attr.aria-hidden]="decorative() ? 'true' : null" [attr.role]="decorative() ? 'presentation' : null" />`,
79
+ styles: [":host{display:block}.ui-divider{display:block;width:100%;height:0;border:0;border-top:1px solid #e2e8f0;padding:0}\n"]
80
+ }]
81
+ }],
82
+ propDecorators: {
83
+ spaceAbove: [{
84
+ type: i0.Input,
85
+ args: [{
86
+ isSignal: true,
87
+ alias: "spaceAbove",
88
+ required: false
89
+ }]
90
+ }],
91
+ spaceBelow: [{
92
+ type: i0.Input,
93
+ args: [{
94
+ isSignal: true,
95
+ alias: "spaceBelow",
96
+ required: false
97
+ }]
98
+ }],
99
+ decorative: [{
100
+ type: i0.Input,
101
+ args: [{
102
+ isSignal: true,
103
+ alias: "decorative",
104
+ required: false
105
+ }]
106
+ }]
107
+ }
108
+ });
109
+ export { DividerComponent };
110
+
111
+ //# sourceMappingURL=forgeroute-ui-divider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-divider.mjs","names":[],"sources":["../../../projects/forgeroute-ui/divider/src/lib/divider/divider.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, computed, input } from '@angular/core';\n\nexport type DividerSpace = 'none' | 'sm' | 'md' | 'lg';\n\nconst SPACE_PX: Record<DividerSpace, number> = { none: 0, sm: 8, md: 16, lg: 24 };\n\n/**\n * Horizontal divider line (an `<hr>`) with the app's standard colour and optional space above / below.\n * It is a real separator for assistive tech by default; set `decorative` when it only adds visual rhythm and the\n * content around it already reads as separate (the line is then hidden from screen readers).\n *\n * <section class=\"kpi-grid\"> ... </section>\n * <ui-divider /> // line with 16px below\n * <ui-divider spaceAbove=\"md\" spaceBelow=\"lg\" />\n * <ui-divider [decorative]=\"true\" />\n */\n@Component({\n selector: 'ui-divider',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<hr class=\"ui-divider\" [style.margin-top.px]=\"above()\" [style.margin-bottom.px]=\"below()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\" [attr.role]=\"decorative() ? 'presentation' : null\" />`,\n styles: [`\n :host { display: block; }\n .ui-divider { display: block; width: 100%; height: 0; border: 0; border-top: 1px solid #e2e8f0; padding: 0; }\n `],\n})\nexport class DividerComponent {\n /** Space above the line: none (0), sm (8px), md (16px), lg (24px). */\n readonly spaceAbove = input<DividerSpace>('none');\n /** Space below the line: none (0), sm (8px), md (16px), lg (24px). */\n readonly spaceBelow = input<DividerSpace>('md');\n /** true = purely visual: hidden from assistive tech. */\n readonly decorative = input(false);\n\n protected readonly above = computed(() => SPACE_PX[this.spaceAbove()] ?? 0);\n protected readonly below = computed(() => SPACE_PX[this.spaceBelow()] ?? 0);\n}\n"],"mappings":";;AAIA,MAAM,WAAyC;CAAE,MAAM;CAAG,IAAI;CAAG,IAAI;CAAI,IAAI;AAAE;AAuB/E,IAAa,mBAAb,MAAa,iBAAgB;CAX7B,cAAA;EAaW,KAAA,aAAa,MAAoB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAExC,KAAA,aAAa,MAAoB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAEtC,KAAA,aAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAA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