@cellarnode/ui 0.17.3 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (655) hide show
  1. package/dist/chat/unified-timeline.d.ts +15 -0
  2. package/dist/chat/unified-timeline.d.ts.map +1 -1
  3. package/dist/chat/unified-timeline.js.map +1 -1
  4. package/dist/components/__tests__/countdown-pill.test.d.ts +2 -0
  5. package/dist/components/__tests__/countdown-pill.test.d.ts.map +1 -0
  6. package/dist/components/__tests__/countdown-pill.test.js +28 -0
  7. package/dist/components/__tests__/countdown-pill.test.js.map +1 -0
  8. package/dist/components/__tests__/country-flag.test.d.ts +2 -0
  9. package/dist/components/__tests__/country-flag.test.d.ts.map +1 -0
  10. package/dist/components/__tests__/country-flag.test.js +20 -0
  11. package/dist/components/__tests__/country-flag.test.js.map +1 -0
  12. package/dist/components/__tests__/status-pill.test.d.ts +2 -0
  13. package/dist/components/__tests__/status-pill.test.d.ts.map +1 -0
  14. package/dist/components/__tests__/status-pill.test.js +24 -0
  15. package/dist/components/__tests__/status-pill.test.js.map +1 -0
  16. package/dist/components/confirmation-dialog.stories.d.ts +26 -0
  17. package/dist/components/confirmation-dialog.stories.d.ts.map +1 -0
  18. package/dist/components/confirmation-dialog.stories.js +94 -0
  19. package/dist/components/confirmation-dialog.stories.js.map +1 -0
  20. package/dist/components/countdown-pill.d.ts +7 -0
  21. package/dist/components/countdown-pill.d.ts.map +1 -0
  22. package/dist/components/countdown-pill.js +27 -0
  23. package/dist/components/countdown-pill.js.map +1 -0
  24. package/dist/components/countdown-pill.stories.d.ts +15 -0
  25. package/dist/components/countdown-pill.stories.d.ts.map +1 -0
  26. package/dist/components/countdown-pill.stories.js +14 -0
  27. package/dist/components/countdown-pill.stories.js.map +1 -0
  28. package/dist/components/country-flag.d.ts +6 -0
  29. package/dist/components/country-flag.d.ts.map +1 -0
  30. package/dist/components/country-flag.js +31 -0
  31. package/dist/components/country-flag.js.map +1 -0
  32. package/dist/components/country-flag.stories.d.ts +14 -0
  33. package/dist/components/country-flag.stories.d.ts.map +1 -0
  34. package/dist/components/country-flag.stories.js +16 -0
  35. package/dist/components/country-flag.stories.js.map +1 -0
  36. package/dist/components/period-select.stories.d.ts +29 -0
  37. package/dist/components/period-select.stories.d.ts.map +1 -0
  38. package/dist/components/period-select.stories.js +65 -0
  39. package/dist/components/period-select.stories.js.map +1 -0
  40. package/dist/components/sidebar/context.d.ts +24 -0
  41. package/dist/components/sidebar/context.d.ts.map +1 -0
  42. package/dist/components/sidebar/context.js +73 -0
  43. package/dist/components/sidebar/context.js.map +1 -0
  44. package/dist/components/sidebar/index.d.ts +9 -0
  45. package/dist/components/sidebar/index.d.ts.map +1 -0
  46. package/dist/components/sidebar/index.js +9 -0
  47. package/dist/components/sidebar/index.js.map +1 -0
  48. package/dist/components/sidebar/sidebar-group.d.ts +10 -0
  49. package/dist/components/sidebar/sidebar-group.d.ts.map +1 -0
  50. package/dist/components/sidebar/sidebar-group.js +21 -0
  51. package/dist/components/sidebar/sidebar-group.js.map +1 -0
  52. package/dist/components/sidebar/sidebar-inset.d.ts +3 -0
  53. package/dist/components/sidebar/sidebar-inset.d.ts.map +1 -0
  54. package/dist/components/sidebar/sidebar-inset.js +7 -0
  55. package/dist/components/sidebar/sidebar-inset.js.map +1 -0
  56. package/dist/components/sidebar/sidebar-menu-sub.d.ts +9 -0
  57. package/dist/components/sidebar/sidebar-menu-sub.d.ts.map +1 -0
  58. package/dist/components/sidebar/sidebar-menu-sub.js +15 -0
  59. package/dist/components/sidebar/sidebar-menu-sub.js.map +1 -0
  60. package/dist/components/sidebar/sidebar-menu.d.ts +23 -0
  61. package/dist/components/sidebar/sidebar-menu.d.ts.map +1 -0
  62. package/dist/components/sidebar/sidebar-menu.js +63 -0
  63. package/dist/components/sidebar/sidebar-menu.js.map +1 -0
  64. package/dist/components/sidebar/sidebar-sections.d.ts +8 -0
  65. package/dist/components/sidebar/sidebar-sections.d.ts.map +1 -0
  66. package/dist/components/sidebar/sidebar-sections.js +20 -0
  67. package/dist/components/sidebar/sidebar-sections.js.map +1 -0
  68. package/dist/components/sidebar/sidebar-trigger.d.ts +4 -0
  69. package/dist/components/sidebar/sidebar-trigger.d.ts.map +1 -0
  70. package/dist/components/sidebar/sidebar-trigger.js +17 -0
  71. package/dist/components/sidebar/sidebar-trigger.js.map +1 -0
  72. package/dist/components/sidebar/sidebar.d.ts +7 -0
  73. package/dist/components/sidebar/sidebar.d.ts.map +1 -0
  74. package/dist/components/sidebar/sidebar.js +26 -0
  75. package/dist/components/sidebar/sidebar.js.map +1 -0
  76. package/dist/components/status-pill.d.ts +7 -0
  77. package/dist/components/status-pill.d.ts.map +1 -0
  78. package/dist/components/status-pill.js +14 -0
  79. package/dist/components/status-pill.js.map +1 -0
  80. package/dist/components/status-pill.stories.d.ts +21 -0
  81. package/dist/components/status-pill.stories.d.ts.map +1 -0
  82. package/dist/components/status-pill.stories.js +18 -0
  83. package/dist/components/status-pill.stories.js.map +1 -0
  84. package/dist/components/toast.stories.d.ts +25 -0
  85. package/dist/components/toast.stories.d.ts.map +1 -0
  86. package/dist/components/toast.stories.js +38 -0
  87. package/dist/components/toast.stories.js.map +1 -0
  88. package/dist/components/toaster.stories.d.ts +19 -0
  89. package/dist/components/toaster.stories.d.ts.map +1 -0
  90. package/dist/components/toaster.stories.js +27 -0
  91. package/dist/components/toaster.stories.js.map +1 -0
  92. package/dist/globe/globe-scene-camera.d.ts +25 -0
  93. package/dist/globe/globe-scene-camera.d.ts.map +1 -0
  94. package/dist/globe/globe-scene-camera.js +59 -0
  95. package/dist/globe/globe-scene-camera.js.map +1 -0
  96. package/dist/globe/globe-scene-channel.d.ts +27 -0
  97. package/dist/globe/globe-scene-channel.d.ts.map +1 -0
  98. package/dist/globe/globe-scene-channel.js +60 -0
  99. package/dist/globe/globe-scene-channel.js.map +1 -0
  100. package/dist/globe/globe-scene-controls.d.ts +38 -0
  101. package/dist/globe/globe-scene-controls.d.ts.map +1 -0
  102. package/dist/globe/globe-scene-controls.js +62 -0
  103. package/dist/globe/globe-scene-controls.js.map +1 -0
  104. package/dist/globe/globe-scene-data.d.ts +16 -0
  105. package/dist/globe/globe-scene-data.d.ts.map +1 -0
  106. package/dist/globe/globe-scene-data.js +51 -0
  107. package/dist/globe/globe-scene-data.js.map +1 -0
  108. package/dist/globe/globe-scene-interactions.d.ts +11 -0
  109. package/dist/globe/globe-scene-interactions.d.ts.map +1 -0
  110. package/dist/globe/globe-scene-interactions.js +54 -0
  111. package/dist/globe/globe-scene-interactions.js.map +1 -0
  112. package/dist/globe/globe-scene-layers.d.ts +22 -0
  113. package/dist/globe/globe-scene-layers.d.ts.map +1 -0
  114. package/dist/globe/globe-scene-layers.js +170 -0
  115. package/dist/globe/globe-scene-layers.js.map +1 -0
  116. package/dist/globe/globe-scene-props.d.ts +32 -0
  117. package/dist/globe/globe-scene-props.d.ts.map +1 -0
  118. package/dist/globe/globe-scene-props.js +8 -0
  119. package/dist/globe/globe-scene-props.js.map +1 -0
  120. package/dist/globe/globe-scene-types.d.ts +34 -0
  121. package/dist/globe/globe-scene-types.d.ts.map +1 -0
  122. package/dist/globe/globe-scene-types.js +14 -0
  123. package/dist/globe/globe-scene-types.js.map +1 -0
  124. package/dist/globe/globe-scene.d.ts +10 -25
  125. package/dist/globe/globe-scene.d.ts.map +1 -1
  126. package/dist/globe/globe-scene.js +54 -349
  127. package/dist/globe/globe-scene.js.map +1 -1
  128. package/dist/hooks/__tests__/use-animated-number.test.d.ts +2 -0
  129. package/dist/hooks/__tests__/use-animated-number.test.d.ts.map +1 -0
  130. package/dist/hooks/__tests__/use-animated-number.test.js +58 -0
  131. package/dist/hooks/__tests__/use-animated-number.test.js.map +1 -0
  132. package/dist/hooks/index.d.ts +3 -0
  133. package/dist/hooks/index.d.ts.map +1 -0
  134. package/dist/hooks/index.js +2 -0
  135. package/dist/hooks/index.js.map +1 -0
  136. package/dist/hooks/use-animated-number.d.ts +6 -0
  137. package/dist/hooks/use-animated-number.d.ts.map +1 -0
  138. package/dist/hooks/use-animated-number.js +56 -0
  139. package/dist/hooks/use-animated-number.js.map +1 -0
  140. package/dist/index.d.ts +8 -0
  141. package/dist/index.d.ts.map +1 -1
  142. package/dist/index.js +6 -0
  143. package/dist/index.js.map +1 -1
  144. package/dist/notifications/notification-badge.stories.d.ts +42 -0
  145. package/dist/notifications/notification-badge.stories.d.ts.map +1 -0
  146. package/dist/notifications/notification-badge.stories.js +42 -0
  147. package/dist/notifications/notification-badge.stories.js.map +1 -0
  148. package/dist/notifications/notification-empty-state.stories.d.ts +16 -0
  149. package/dist/notifications/notification-empty-state.stories.d.ts.map +1 -0
  150. package/dist/notifications/notification-empty-state.stories.js +22 -0
  151. package/dist/notifications/notification-empty-state.stories.js.map +1 -0
  152. package/dist/notifications/notification-item.stories.d.ts +41 -0
  153. package/dist/notifications/notification-item.stories.d.ts.map +1 -0
  154. package/dist/notifications/notification-item.stories.js +110 -0
  155. package/dist/notifications/notification-item.stories.js.map +1 -0
  156. package/dist/notifications/notification-list.stories.d.ts +25 -0
  157. package/dist/notifications/notification-list.stories.d.ts.map +1 -0
  158. package/dist/notifications/notification-list.stories.js +148 -0
  159. package/dist/notifications/notification-list.stories.js.map +1 -0
  160. package/dist/notifications/notification-page.stories.d.ts +20 -0
  161. package/dist/notifications/notification-page.stories.d.ts.map +1 -0
  162. package/dist/notifications/notification-page.stories.js +140 -0
  163. package/dist/notifications/notification-page.stories.js.map +1 -0
  164. package/dist/notifications/notification-tray.stories.d.ts +21 -0
  165. package/dist/notifications/notification-tray.stories.d.ts.map +1 -0
  166. package/dist/notifications/notification-tray.stories.js +123 -0
  167. package/dist/notifications/notification-tray.stories.js.map +1 -0
  168. package/dist/notifications/push-prompt-banner.stories.d.ts +27 -0
  169. package/dist/notifications/push-prompt-banner.stories.d.ts.map +1 -0
  170. package/dist/notifications/push-prompt-banner.stories.js +33 -0
  171. package/dist/notifications/push-prompt-banner.stories.js.map +1 -0
  172. package/dist/offer/__tests__/opportunity-requirements.test.d.ts +2 -0
  173. package/dist/offer/__tests__/opportunity-requirements.test.d.ts.map +1 -0
  174. package/dist/offer/__tests__/opportunity-requirements.test.js +33 -0
  175. package/dist/offer/__tests__/opportunity-requirements.test.js.map +1 -0
  176. package/dist/offer/attachments-card.d.ts +9 -0
  177. package/dist/offer/attachments-card.d.ts.map +1 -0
  178. package/dist/offer/attachments-card.js +16 -0
  179. package/dist/offer/attachments-card.js.map +1 -0
  180. package/dist/offer/attachments-card.stories.d.ts +17 -0
  181. package/dist/offer/attachments-card.stories.d.ts.map +1 -0
  182. package/dist/offer/attachments-card.stories.js +24 -0
  183. package/dist/offer/attachments-card.stories.js.map +1 -0
  184. package/dist/offer/buyer-notes-card.d.ts +7 -0
  185. package/dist/offer/buyer-notes-card.d.ts.map +1 -0
  186. package/dist/offer/buyer-notes-card.js +6 -0
  187. package/dist/offer/buyer-notes-card.js.map +1 -0
  188. package/dist/offer/buyer-notes-card.stories.d.ts +16 -0
  189. package/dist/offer/buyer-notes-card.stories.d.ts.map +1 -0
  190. package/dist/offer/buyer-notes-card.stories.js +25 -0
  191. package/dist/offer/buyer-notes-card.stories.js.map +1 -0
  192. package/dist/offer/counter-slide-over.d.ts +44 -0
  193. package/dist/offer/counter-slide-over.d.ts.map +1 -0
  194. package/dist/offer/counter-slide-over.js +81 -0
  195. package/dist/offer/counter-slide-over.js.map +1 -0
  196. package/dist/offer/counter-slide-over.stories.d.ts +23 -0
  197. package/dist/offer/counter-slide-over.stories.d.ts.map +1 -0
  198. package/dist/offer/counter-slide-over.stories.js +235 -0
  199. package/dist/offer/counter-slide-over.stories.js.map +1 -0
  200. package/dist/offer/facts-card.d.ts +32 -0
  201. package/dist/offer/facts-card.d.ts.map +1 -0
  202. package/dist/offer/facts-card.js +87 -0
  203. package/dist/offer/facts-card.js.map +1 -0
  204. package/dist/offer/facts-card.stories.d.ts +25 -0
  205. package/dist/offer/facts-card.stories.d.ts.map +1 -0
  206. package/dist/offer/facts-card.stories.js +177 -0
  207. package/dist/offer/facts-card.stories.js.map +1 -0
  208. package/dist/offer/index.d.ts +39 -0
  209. package/dist/offer/index.d.ts.map +1 -1
  210. package/dist/offer/index.js +21 -0
  211. package/dist/offer/index.js.map +1 -1
  212. package/dist/offer/inline-counter-form.d.ts +16 -0
  213. package/dist/offer/inline-counter-form.d.ts.map +1 -1
  214. package/dist/offer/inline-counter-form.js +8 -0
  215. package/dist/offer/inline-counter-form.js.map +1 -1
  216. package/dist/offer/match-compatibility-card.d.ts +16 -0
  217. package/dist/offer/match-compatibility-card.d.ts.map +1 -0
  218. package/dist/offer/match-compatibility-card.js +27 -0
  219. package/dist/offer/match-compatibility-card.js.map +1 -0
  220. package/dist/offer/match-compatibility-card.stories.d.ts +19 -0
  221. package/dist/offer/match-compatibility-card.stories.d.ts.map +1 -0
  222. package/dist/offer/match-compatibility-card.stories.js +111 -0
  223. package/dist/offer/match-compatibility-card.stories.js.map +1 -0
  224. package/dist/offer/match-glyph.d.ts +14 -0
  225. package/dist/offer/match-glyph.d.ts.map +1 -0
  226. package/dist/offer/match-glyph.js +40 -0
  227. package/dist/offer/match-glyph.js.map +1 -0
  228. package/dist/offer/match-glyph.stories.d.ts +26 -0
  229. package/dist/offer/match-glyph.stories.d.ts.map +1 -0
  230. package/dist/offer/match-glyph.stories.js +26 -0
  231. package/dist/offer/match-glyph.stories.js.map +1 -0
  232. package/dist/offer/match-headline-bar.d.ts +11 -0
  233. package/dist/offer/match-headline-bar.d.ts.map +1 -0
  234. package/dist/offer/match-headline-bar.js +28 -0
  235. package/dist/offer/match-headline-bar.js.map +1 -0
  236. package/dist/offer/match-headline-bar.stories.d.ts +17 -0
  237. package/dist/offer/match-headline-bar.stories.d.ts.map +1 -0
  238. package/dist/offer/match-headline-bar.stories.js +39 -0
  239. package/dist/offer/match-headline-bar.stories.js.map +1 -0
  240. package/dist/offer/match-preview.d.ts +18 -0
  241. package/dist/offer/match-preview.d.ts.map +1 -0
  242. package/dist/offer/match-preview.js +13 -0
  243. package/dist/offer/match-preview.js.map +1 -0
  244. package/dist/offer/match-preview.stories.d.ts +18 -0
  245. package/dist/offer/match-preview.stories.d.ts.map +1 -0
  246. package/dist/offer/match-preview.stories.js +103 -0
  247. package/dist/offer/match-preview.stories.js.map +1 -0
  248. package/dist/offer/negotiation-section.d.ts +11 -0
  249. package/dist/offer/negotiation-section.d.ts.map +1 -0
  250. package/dist/offer/negotiation-section.js +99 -0
  251. package/dist/offer/negotiation-section.js.map +1 -0
  252. package/dist/offer/negotiation-section.stories.d.ts +18 -0
  253. package/dist/offer/negotiation-section.stories.d.ts.map +1 -0
  254. package/dist/offer/negotiation-section.stories.js +156 -0
  255. package/dist/offer/negotiation-section.stories.js.map +1 -0
  256. package/dist/offer/new-activity-pill.d.ts +7 -0
  257. package/dist/offer/new-activity-pill.d.ts.map +1 -0
  258. package/dist/offer/new-activity-pill.js +8 -0
  259. package/dist/offer/new-activity-pill.js.map +1 -0
  260. package/dist/offer/new-activity-pill.stories.d.ts +17 -0
  261. package/dist/offer/new-activity-pill.stories.d.ts.map +1 -0
  262. package/dist/offer/new-activity-pill.stories.js +22 -0
  263. package/dist/offer/new-activity-pill.stories.js.map +1 -0
  264. package/dist/offer/offer-detail-header.stories.d.ts +19 -0
  265. package/dist/offer/offer-detail-header.stories.d.ts.map +1 -0
  266. package/dist/offer/offer-detail-header.stories.js +59 -0
  267. package/dist/offer/offer-detail-header.stories.js.map +1 -0
  268. package/dist/offer/offer-detail-shell.stories.d.ts +17 -0
  269. package/dist/offer/offer-detail-shell.stories.d.ts.map +1 -0
  270. package/dist/offer/offer-detail-shell.stories.js +69 -0
  271. package/dist/offer/offer-detail-shell.stories.js.map +1 -0
  272. package/dist/offer/offer-detail-tabs.stories.d.ts +17 -0
  273. package/dist/offer/offer-detail-tabs.stories.d.ts.map +1 -0
  274. package/dist/offer/offer-detail-tabs.stories.js +66 -0
  275. package/dist/offer/offer-detail-tabs.stories.js.map +1 -0
  276. package/dist/offer/offer-document.d.ts +33 -0
  277. package/dist/offer/offer-document.d.ts.map +1 -0
  278. package/dist/offer/offer-document.js +125 -0
  279. package/dist/offer/offer-document.js.map +1 -0
  280. package/dist/offer/offer-document.stories.d.ts +25 -0
  281. package/dist/offer/offer-document.stories.d.ts.map +1 -0
  282. package/dist/offer/offer-document.stories.js +168 -0
  283. package/dist/offer/offer-document.stories.js.map +1 -0
  284. package/dist/offer/offer-export-button.d.ts +8 -0
  285. package/dist/offer/offer-export-button.d.ts.map +1 -0
  286. package/dist/offer/offer-export-button.js +11 -0
  287. package/dist/offer/offer-export-button.js.map +1 -0
  288. package/dist/offer/offer-export-button.stories.d.ts +15 -0
  289. package/dist/offer/offer-export-button.stories.d.ts.map +1 -0
  290. package/dist/offer/offer-export-button.stories.js +11 -0
  291. package/dist/offer/offer-export-button.stories.js.map +1 -0
  292. package/dist/offer/offer-product-card.d.ts +32 -0
  293. package/dist/offer/offer-product-card.d.ts.map +1 -0
  294. package/dist/offer/offer-product-card.js +10 -0
  295. package/dist/offer/offer-product-card.js.map +1 -0
  296. package/dist/offer/offer-product-card.stories.d.ts +16 -0
  297. package/dist/offer/offer-product-card.stories.d.ts.map +1 -0
  298. package/dist/offer/offer-product-card.stories.js +40 -0
  299. package/dist/offer/offer-product-card.stories.js.map +1 -0
  300. package/dist/offer/opportunity-card.d.ts +16 -0
  301. package/dist/offer/opportunity-card.d.ts.map +1 -0
  302. package/dist/offer/opportunity-card.js +9 -0
  303. package/dist/offer/opportunity-card.js.map +1 -0
  304. package/dist/offer/opportunity-card.stories.d.ts +16 -0
  305. package/dist/offer/opportunity-card.stories.d.ts.map +1 -0
  306. package/dist/offer/opportunity-card.stories.js +33 -0
  307. package/dist/offer/opportunity-card.stories.js.map +1 -0
  308. package/dist/offer/opportunity-requirements.d.ts.map +1 -1
  309. package/dist/offer/opportunity-requirements.js +4 -0
  310. package/dist/offer/opportunity-requirements.js.map +1 -1
  311. package/dist/offer/parties-card.d.ts +11 -0
  312. package/dist/offer/parties-card.d.ts.map +1 -0
  313. package/dist/offer/parties-card.js +14 -0
  314. package/dist/offer/parties-card.js.map +1 -0
  315. package/dist/offer/parties-card.stories.d.ts +17 -0
  316. package/dist/offer/parties-card.stories.d.ts.map +1 -0
  317. package/dist/offer/parties-card.stories.js +37 -0
  318. package/dist/offer/parties-card.stories.js.map +1 -0
  319. package/dist/offer/terms-card.d.ts +17 -0
  320. package/dist/offer/terms-card.d.ts.map +1 -0
  321. package/dist/offer/terms-card.js +50 -0
  322. package/dist/offer/terms-card.js.map +1 -0
  323. package/dist/offer/terms-card.stories.d.ts +17 -0
  324. package/dist/offer/terms-card.stories.d.ts.map +1 -0
  325. package/dist/offer/terms-card.stories.js +42 -0
  326. package/dist/offer/terms-card.stories.js.map +1 -0
  327. package/dist/offer/timeline-event.d.ts +12 -0
  328. package/dist/offer/timeline-event.d.ts.map +1 -0
  329. package/dist/offer/timeline-event.js +57 -0
  330. package/dist/offer/timeline-event.js.map +1 -0
  331. package/dist/offer/timeline-event.stories.d.ts +21 -0
  332. package/dist/offer/timeline-event.stories.d.ts.map +1 -0
  333. package/dist/offer/timeline-event.stories.js +57 -0
  334. package/dist/offer/timeline-event.stories.js.map +1 -0
  335. package/dist/offer/types.d.ts +118 -0
  336. package/dist/offer/types.d.ts.map +1 -1
  337. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts +2 -0
  338. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts.map +1 -0
  339. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js +40 -0
  340. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js.map +1 -0
  341. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts +2 -0
  342. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts.map +1 -0
  343. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js +31 -0
  344. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js.map +1 -0
  345. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts +2 -0
  346. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts.map +1 -0
  347. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js +42 -0
  348. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js.map +1 -0
  349. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts +2 -0
  350. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts.map +1 -0
  351. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js +59 -0
  352. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js.map +1 -0
  353. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts +2 -0
  354. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts.map +1 -0
  355. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js +54 -0
  356. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js.map +1 -0
  357. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts +2 -0
  358. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts.map +1 -0
  359. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js +40 -0
  360. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js.map +1 -0
  361. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts +2 -0
  362. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts.map +1 -0
  363. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js +40 -0
  364. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js.map +1 -0
  365. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts +2 -0
  366. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts.map +1 -0
  367. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js +74 -0
  368. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js.map +1 -0
  369. package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts +2 -0
  370. package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts.map +1 -0
  371. package/dist/opportunities/__tests__/opportunity-celebration.test.js +46 -0
  372. package/dist/opportunities/__tests__/opportunity-celebration.test.js.map +1 -0
  373. package/dist/opportunities/__tests__/opportunity-channel-badge.test.d.ts +2 -0
  374. package/dist/opportunities/__tests__/opportunity-channel-badge.test.d.ts.map +1 -0
  375. package/dist/opportunities/__tests__/opportunity-channel-badge.test.js +23 -0
  376. package/dist/opportunities/__tests__/opportunity-channel-badge.test.js.map +1 -0
  377. package/dist/opportunities/__tests__/opportunity-detail-panel.test.d.ts +2 -0
  378. package/dist/opportunities/__tests__/opportunity-detail-panel.test.d.ts.map +1 -0
  379. package/dist/opportunities/__tests__/opportunity-detail-panel.test.js +50 -0
  380. package/dist/opportunities/__tests__/opportunity-detail-panel.test.js.map +1 -0
  381. package/dist/opportunities/__tests__/opportunity-empty-state.test.d.ts +2 -0
  382. package/dist/opportunities/__tests__/opportunity-empty-state.test.d.ts.map +1 -0
  383. package/dist/opportunities/__tests__/opportunity-empty-state.test.js +19 -0
  384. package/dist/opportunities/__tests__/opportunity-empty-state.test.js.map +1 -0
  385. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts +2 -0
  386. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts.map +1 -0
  387. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js +77 -0
  388. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js.map +1 -0
  389. package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts +2 -0
  390. package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts.map +1 -0
  391. package/dist/opportunities/__tests__/opportunity-filter-bar.test.js +107 -0
  392. package/dist/opportunities/__tests__/opportunity-filter-bar.test.js.map +1 -0
  393. package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.d.ts +2 -0
  394. package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.d.ts.map +1 -0
  395. package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.js +25 -0
  396. package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.js.map +1 -0
  397. package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts +2 -0
  398. package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts.map +1 -0
  399. package/dist/opportunities/__tests__/opportunity-reopen-button.test.js +29 -0
  400. package/dist/opportunities/__tests__/opportunity-reopen-button.test.js.map +1 -0
  401. package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts +2 -0
  402. package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts.map +1 -0
  403. package/dist/opportunities/__tests__/opportunity-republish-button.test.js +29 -0
  404. package/dist/opportunities/__tests__/opportunity-republish-button.test.js.map +1 -0
  405. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts +2 -0
  406. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts.map +1 -0
  407. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js +19 -0
  408. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js.map +1 -0
  409. package/dist/opportunities/__tests__/opportunity-stacked-card.test.d.ts +2 -0
  410. package/dist/opportunities/__tests__/opportunity-stacked-card.test.d.ts.map +1 -0
  411. package/dist/opportunities/__tests__/opportunity-stacked-card.test.js +99 -0
  412. package/dist/opportunities/__tests__/opportunity-stacked-card.test.js.map +1 -0
  413. package/dist/opportunities/__tests__/opportunity-stacked-list.test.d.ts +2 -0
  414. package/dist/opportunities/__tests__/opportunity-stacked-list.test.d.ts.map +1 -0
  415. package/dist/opportunities/__tests__/opportunity-stacked-list.test.js +98 -0
  416. package/dist/opportunities/__tests__/opportunity-stacked-list.test.js.map +1 -0
  417. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts +2 -0
  418. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts.map +1 -0
  419. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js +23 -0
  420. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js.map +1 -0
  421. package/dist/opportunities/__tests__/section-field.test.d.ts +2 -0
  422. package/dist/opportunities/__tests__/section-field.test.d.ts.map +1 -0
  423. package/dist/opportunities/__tests__/section-field.test.js +28 -0
  424. package/dist/opportunities/__tests__/section-field.test.js.map +1 -0
  425. package/dist/opportunities/__tests__/two-column-section.test.d.ts +2 -0
  426. package/dist/opportunities/__tests__/two-column-section.test.d.ts.map +1 -0
  427. package/dist/opportunities/__tests__/two-column-section.test.js +25 -0
  428. package/dist/opportunities/__tests__/two-column-section.test.js.map +1 -0
  429. package/dist/opportunities/index.d.ts +51 -1
  430. package/dist/opportunities/index.d.ts.map +1 -1
  431. package/dist/opportunities/index.js +35 -0
  432. package/dist/opportunities/index.js.map +1 -1
  433. package/dist/opportunities/opportunities-table.d.ts +4 -0
  434. package/dist/opportunities/opportunities-table.d.ts.map +1 -1
  435. package/dist/opportunities/opportunities-table.js +4 -0
  436. package/dist/opportunities/opportunities-table.js.map +1 -1
  437. package/dist/opportunities/opportunity-add-to-journey-button.d.ts +12 -0
  438. package/dist/opportunities/opportunity-add-to-journey-button.d.ts.map +1 -0
  439. package/dist/opportunities/opportunity-add-to-journey-button.js +42 -0
  440. package/dist/opportunities/opportunity-add-to-journey-button.js.map +1 -0
  441. package/dist/opportunities/opportunity-card-actions-menu.d.ts +9 -0
  442. package/dist/opportunities/opportunity-card-actions-menu.d.ts.map +1 -0
  443. package/dist/opportunities/opportunity-card-actions-menu.js +33 -0
  444. package/dist/opportunities/opportunity-card-actions-menu.js.map +1 -0
  445. package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts +14 -0
  446. package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts.map +1 -0
  447. package/dist/opportunities/opportunity-card-actions-menu.stories.js +12 -0
  448. package/dist/opportunities/opportunity-card-actions-menu.stories.js.map +1 -0
  449. package/dist/opportunities/opportunity-celebration.d.ts +8 -0
  450. package/dist/opportunities/opportunity-celebration.d.ts.map +1 -0
  451. package/dist/opportunities/opportunity-celebration.js +17 -0
  452. package/dist/opportunities/opportunity-celebration.js.map +1 -0
  453. package/dist/opportunities/opportunity-celebration.stories.d.ts +17 -0
  454. package/dist/opportunities/opportunity-celebration.stories.d.ts.map +1 -0
  455. package/dist/opportunities/opportunity-celebration.stories.js +30 -0
  456. package/dist/opportunities/opportunity-celebration.stories.js.map +1 -0
  457. package/dist/opportunities/opportunity-channel-badge.d.ts +7 -0
  458. package/dist/opportunities/opportunity-channel-badge.d.ts.map +1 -0
  459. package/dist/opportunities/opportunity-channel-badge.js +13 -0
  460. package/dist/opportunities/opportunity-channel-badge.js.map +1 -0
  461. package/dist/opportunities/opportunity-channel-badge.stories.d.ts +13 -0
  462. package/dist/opportunities/opportunity-channel-badge.stories.d.ts.map +1 -0
  463. package/dist/opportunities/opportunity-channel-badge.stories.js +11 -0
  464. package/dist/opportunities/opportunity-channel-badge.stories.js.map +1 -0
  465. package/dist/opportunities/opportunity-detail-panel.d.ts +13 -0
  466. package/dist/opportunities/opportunity-detail-panel.d.ts.map +1 -0
  467. package/dist/opportunities/opportunity-detail-panel.js +19 -0
  468. package/dist/opportunities/opportunity-detail-panel.js.map +1 -0
  469. package/dist/opportunities/opportunity-detail-panel.stories.d.ts +14 -0
  470. package/dist/opportunities/opportunity-detail-panel.stories.d.ts.map +1 -0
  471. package/dist/opportunities/opportunity-detail-panel.stories.js +53 -0
  472. package/dist/opportunities/opportunity-detail-panel.stories.js.map +1 -0
  473. package/dist/opportunities/opportunity-empty-state.d.ts +10 -0
  474. package/dist/opportunities/opportunity-empty-state.d.ts.map +1 -0
  475. package/dist/opportunities/opportunity-empty-state.js +6 -0
  476. package/dist/opportunities/opportunity-empty-state.js.map +1 -0
  477. package/dist/opportunities/opportunity-empty-state.stories.d.ts +13 -0
  478. package/dist/opportunities/opportunity-empty-state.stories.d.ts.map +1 -0
  479. package/dist/opportunities/opportunity-empty-state.stories.js +13 -0
  480. package/dist/opportunities/opportunity-empty-state.stories.js.map +1 -0
  481. package/dist/opportunities/opportunity-filter-bar-drawer.d.ts +10 -0
  482. package/dist/opportunities/opportunity-filter-bar-drawer.d.ts.map +1 -0
  483. package/dist/opportunities/opportunity-filter-bar-drawer.js +54 -0
  484. package/dist/opportunities/opportunity-filter-bar-drawer.js.map +1 -0
  485. package/dist/opportunities/opportunity-filter-bar.d.ts +14 -0
  486. package/dist/opportunities/opportunity-filter-bar.d.ts.map +1 -0
  487. package/dist/opportunities/opportunity-filter-bar.js +65 -0
  488. package/dist/opportunities/opportunity-filter-bar.js.map +1 -0
  489. package/dist/opportunities/opportunity-filter-bar.stories.d.ts +25 -0
  490. package/dist/opportunities/opportunity-filter-bar.stories.d.ts.map +1 -0
  491. package/dist/opportunities/opportunity-filter-bar.stories.js +63 -0
  492. package/dist/opportunities/opportunity-filter-bar.stories.js.map +1 -0
  493. package/dist/opportunities/opportunity-offers-count-chip.d.ts +6 -0
  494. package/dist/opportunities/opportunity-offers-count-chip.d.ts.map +1 -0
  495. package/dist/opportunities/opportunity-offers-count-chip.js +8 -0
  496. package/dist/opportunities/opportunity-offers-count-chip.js.map +1 -0
  497. package/dist/opportunities/opportunity-offers-count-chip.stories.d.ts +13 -0
  498. package/dist/opportunities/opportunity-offers-count-chip.stories.d.ts.map +1 -0
  499. package/dist/opportunities/opportunity-offers-count-chip.stories.js +11 -0
  500. package/dist/opportunities/opportunity-offers-count-chip.stories.js.map +1 -0
  501. package/dist/opportunities/opportunity-reopen-button.d.ts +11 -0
  502. package/dist/opportunities/opportunity-reopen-button.d.ts.map +1 -0
  503. package/dist/opportunities/opportunity-reopen-button.js +20 -0
  504. package/dist/opportunities/opportunity-reopen-button.js.map +1 -0
  505. package/dist/opportunities/opportunity-republish-button.d.ts +7 -0
  506. package/dist/opportunities/opportunity-republish-button.d.ts.map +1 -0
  507. package/dist/opportunities/opportunity-republish-button.js +14 -0
  508. package/dist/opportunities/opportunity-republish-button.js.map +1 -0
  509. package/dist/opportunities/opportunity-resume-draft-button.d.ts +7 -0
  510. package/dist/opportunities/opportunity-resume-draft-button.d.ts.map +1 -0
  511. package/dist/opportunities/opportunity-resume-draft-button.js +7 -0
  512. package/dist/opportunities/opportunity-resume-draft-button.js.map +1 -0
  513. package/dist/opportunities/opportunity-stacked-card.d.ts +20 -0
  514. package/dist/opportunities/opportunity-stacked-card.d.ts.map +1 -0
  515. package/dist/opportunities/opportunity-stacked-card.js +48 -0
  516. package/dist/opportunities/opportunity-stacked-card.js.map +1 -0
  517. package/dist/opportunities/opportunity-stacked-card.stories.d.ts +23 -0
  518. package/dist/opportunities/opportunity-stacked-card.stories.d.ts.map +1 -0
  519. package/dist/opportunities/opportunity-stacked-card.stories.js +143 -0
  520. package/dist/opportunities/opportunity-stacked-card.stories.js.map +1 -0
  521. package/dist/opportunities/opportunity-stacked-list.d.ts +28 -0
  522. package/dist/opportunities/opportunity-stacked-list.d.ts.map +1 -0
  523. package/dist/opportunities/opportunity-stacked-list.js +51 -0
  524. package/dist/opportunities/opportunity-stacked-list.js.map +1 -0
  525. package/dist/opportunities/opportunity-stacked-list.stories.d.ts +16 -0
  526. package/dist/opportunities/opportunity-stacked-list.stories.d.ts.map +1 -0
  527. package/dist/opportunities/opportunity-stacked-list.stories.js +38 -0
  528. package/dist/opportunities/opportunity-stacked-list.stories.js.map +1 -0
  529. package/dist/opportunities/opportunity-view-offers-button.d.ts +7 -0
  530. package/dist/opportunities/opportunity-view-offers-button.d.ts.map +1 -0
  531. package/dist/opportunities/opportunity-view-offers-button.js +8 -0
  532. package/dist/opportunities/opportunity-view-offers-button.js.map +1 -0
  533. package/dist/opportunities/section-field.d.ts +8 -0
  534. package/dist/opportunities/section-field.d.ts.map +1 -0
  535. package/dist/opportunities/section-field.js +9 -0
  536. package/dist/opportunities/section-field.js.map +1 -0
  537. package/dist/opportunities/section-field.stories.d.ts +13 -0
  538. package/dist/opportunities/section-field.stories.d.ts.map +1 -0
  539. package/dist/opportunities/section-field.stories.js +15 -0
  540. package/dist/opportunities/section-field.stories.js.map +1 -0
  541. package/dist/opportunities/two-column-section.d.ts +10 -0
  542. package/dist/opportunities/two-column-section.d.ts.map +1 -0
  543. package/dist/opportunities/two-column-section.js +22 -0
  544. package/dist/opportunities/two-column-section.js.map +1 -0
  545. package/dist/opportunities/two-column-section.stories.d.ts +12 -0
  546. package/dist/opportunities/two-column-section.stories.d.ts.map +1 -0
  547. package/dist/opportunities/two-column-section.stories.js +26 -0
  548. package/dist/opportunities/two-column-section.stories.js.map +1 -0
  549. package/dist/opportunities/types.d.ts +76 -0
  550. package/dist/opportunities/types.d.ts.map +1 -0
  551. package/dist/opportunities/types.js +2 -0
  552. package/dist/opportunities/types.js.map +1 -0
  553. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts +2 -0
  554. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts.map +1 -0
  555. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js +53 -0
  556. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js.map +1 -0
  557. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts +2 -0
  558. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts.map +1 -0
  559. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js +32 -0
  560. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js.map +1 -0
  561. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts +2 -0
  562. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts.map +1 -0
  563. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js +127 -0
  564. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js.map +1 -0
  565. package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts +2 -0
  566. package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts.map +1 -0
  567. package/dist/opportunities/wizard/__tests__/step-opportunities.test.js +93 -0
  568. package/dist/opportunities/wizard/__tests__/step-opportunities.test.js.map +1 -0
  569. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts +2 -0
  570. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts.map +1 -0
  571. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js +141 -0
  572. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js.map +1 -0
  573. package/dist/opportunities/wizard/__tests__/step-review.test.d.ts +2 -0
  574. package/dist/opportunities/wizard/__tests__/step-review.test.d.ts.map +1 -0
  575. package/dist/opportunities/wizard/__tests__/step-review.test.js +80 -0
  576. package/dist/opportunities/wizard/__tests__/step-review.test.js.map +1 -0
  577. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts +2 -0
  578. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts.map +1 -0
  579. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js +76 -0
  580. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js.map +1 -0
  581. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts +2 -0
  582. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts.map +1 -0
  583. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js +192 -0
  584. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js.map +1 -0
  585. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts +2 -0
  586. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts.map +1 -0
  587. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js +61 -0
  588. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js.map +1 -0
  589. package/dist/opportunities/wizard/opportunity-wizard.d.ts +29 -0
  590. package/dist/opportunities/wizard/opportunity-wizard.d.ts.map +1 -0
  591. package/dist/opportunities/wizard/opportunity-wizard.js +196 -0
  592. package/dist/opportunities/wizard/opportunity-wizard.js.map +1 -0
  593. package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts +12 -0
  594. package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts.map +1 -0
  595. package/dist/opportunities/wizard/opportunity-wizard.stories.js +49 -0
  596. package/dist/opportunities/wizard/opportunity-wizard.stories.js.map +1 -0
  597. package/dist/opportunities/wizard/step-opportunities.d.ts +9 -0
  598. package/dist/opportunities/wizard/step-opportunities.d.ts.map +1 -0
  599. package/dist/opportunities/wizard/step-opportunities.js +80 -0
  600. package/dist/opportunities/wizard/step-opportunities.js.map +1 -0
  601. package/dist/opportunities/wizard/step-pricing-timeline.d.ts +9 -0
  602. package/dist/opportunities/wizard/step-pricing-timeline.d.ts.map +1 -0
  603. package/dist/opportunities/wizard/step-pricing-timeline.js +64 -0
  604. package/dist/opportunities/wizard/step-pricing-timeline.js.map +1 -0
  605. package/dist/opportunities/wizard/step-review.d.ts +9 -0
  606. package/dist/opportunities/wizard/step-review.d.ts.map +1 -0
  607. package/dist/opportunities/wizard/step-review.js +34 -0
  608. package/dist/opportunities/wizard/step-review.js.map +1 -0
  609. package/dist/opportunities/wizard/step-tender-basics.d.ts +16 -0
  610. package/dist/opportunities/wizard/step-tender-basics.d.ts.map +1 -0
  611. package/dist/opportunities/wizard/step-tender-basics.js +39 -0
  612. package/dist/opportunities/wizard/step-tender-basics.js.map +1 -0
  613. package/dist/opportunities/wizard/use-wizard-draft.d.ts +41 -0
  614. package/dist/opportunities/wizard/use-wizard-draft.d.ts.map +1 -0
  615. package/dist/opportunities/wizard/use-wizard-draft.js +214 -0
  616. package/dist/opportunities/wizard/use-wizard-draft.js.map +1 -0
  617. package/dist/opportunities/wizard/wizard-stepper.d.ts +20 -0
  618. package/dist/opportunities/wizard/wizard-stepper.d.ts.map +1 -0
  619. package/dist/opportunities/wizard/wizard-stepper.js +26 -0
  620. package/dist/opportunities/wizard/wizard-stepper.js.map +1 -0
  621. package/dist/opportunities/wizard/wizard-stepper.stories.d.ts +22 -0
  622. package/dist/opportunities/wizard/wizard-stepper.stories.d.ts.map +1 -0
  623. package/dist/opportunities/wizard/wizard-stepper.stories.js +47 -0
  624. package/dist/opportunities/wizard/wizard-stepper.stories.js.map +1 -0
  625. package/dist/opportunities/wizard/wizard.types.d.ts +176 -0
  626. package/dist/opportunities/wizard/wizard.types.d.ts.map +1 -0
  627. package/dist/opportunities/wizard/wizard.types.js +62 -0
  628. package/dist/opportunities/wizard/wizard.types.js.map +1 -0
  629. package/dist/org/invite-member-dialog.stories.d.ts +24 -0
  630. package/dist/org/invite-member-dialog.stories.d.ts.map +1 -0
  631. package/dist/org/invite-member-dialog.stories.js +34 -0
  632. package/dist/org/invite-member-dialog.stories.js.map +1 -0
  633. package/dist/org/team-hero-banner.stories.d.ts +25 -0
  634. package/dist/org/team-hero-banner.stories.d.ts.map +1 -0
  635. package/dist/org/team-hero-banner.stories.js +53 -0
  636. package/dist/org/team-hero-banner.stories.js.map +1 -0
  637. package/dist/org/team-member-menu.stories.d.ts +19 -0
  638. package/dist/org/team-member-menu.stories.d.ts.map +1 -0
  639. package/dist/org/team-member-menu.stories.js +27 -0
  640. package/dist/org/team-member-menu.stories.js.map +1 -0
  641. package/dist/org/team-member-row.stories.d.ts +26 -0
  642. package/dist/org/team-member-row.stories.d.ts.map +1 -0
  643. package/dist/org/team-member-row.stories.js +61 -0
  644. package/dist/org/team-member-row.stories.js.map +1 -0
  645. package/dist/org/team-pending-row.stories.d.ts +23 -0
  646. package/dist/org/team-pending-row.stories.d.ts.map +1 -0
  647. package/dist/org/team-pending-row.stories.js +45 -0
  648. package/dist/org/team-pending-row.stories.js.map +1 -0
  649. package/package.json +13 -4
  650. package/src/offer/offer-document.print.css +72 -0
  651. package/src/theme/tokens.css +78 -0
  652. package/dist/components/sidebar.d.ts +0 -68
  653. package/dist/components/sidebar.d.ts.map +0 -1
  654. package/dist/components/sidebar.js +0 -208
  655. package/dist/components/sidebar.js.map +0 -1
@@ -0,0 +1,196 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Info, X } from "lucide-react";
4
+ import { WizardStepper } from "./wizard-stepper";
5
+ import { StepTenderBasics } from "./step-tender-basics";
6
+ import { StepOpportunities } from "./step-opportunities";
7
+ import { StepPricingTimeline } from "./step-pricing-timeline";
8
+ import { StepReview } from "./step-review";
9
+ import { useWizardDraft } from "./use-wizard-draft";
10
+ import { tenderPublishSchema, wizardStepIds, } from "./wizard.types";
11
+ import { cn } from "../../lib/utils";
12
+ const stepLabels = {
13
+ tender: "Tender",
14
+ opportunities: "Opportunities",
15
+ pricing: "Pricing",
16
+ review: "Review",
17
+ };
18
+ export function OpportunityWizard(props) {
19
+ const { mode, initialDraft, initialVersion, createDraft, patchDraft, publishDraft, saveEdit, onClose, onPublished, className, } = props;
20
+ const draftHook = useWizardDraft({
21
+ create: createDraft,
22
+ patch: patchDraft,
23
+ initialDraftId: initialDraft?.id,
24
+ initialDraft: initialDraft ?? {},
25
+ initialVersion: initialVersion ?? 1,
26
+ disableAutosave: mode === "edit",
27
+ });
28
+ const [currentStep, setCurrentStep] = React.useState(0);
29
+ const [completedSteps, setCompletedSteps] = React.useState([]);
30
+ const [stepValidity, setStepValidity] = React.useState({
31
+ tender: false,
32
+ opportunities: false,
33
+ pricing: false,
34
+ review: true,
35
+ });
36
+ const [publishError, setPublishError] = React.useState(null);
37
+ const [publishing, setPublishing] = React.useState(false);
38
+ const [idempotencyKey] = React.useState(() => crypto.randomUUID());
39
+ const effectiveDraft = { ...initialDraft, ...draftHook.draft };
40
+ // Stable references so child onChange / onValidityChange effects don't loop.
41
+ const applyChangeRef = React.useRef(draftHook.applyChange);
42
+ React.useEffect(() => { applyChangeRef.current = draftHook.applyChange; }, [draftHook.applyChange]);
43
+ const applyTenderFields = React.useCallback((fields) => {
44
+ applyChangeRef.current(fields);
45
+ }, []);
46
+ const onApplyOpportunities = React.useCallback((next) => {
47
+ applyChangeRef.current({ opportunities: next });
48
+ }, []);
49
+ const onValidityTender = React.useCallback((v) => {
50
+ setStepValidity(s => (s.tender === v ? s : { ...s, tender: v }));
51
+ }, []);
52
+ const onValidityOpportunities = React.useCallback((v) => {
53
+ setStepValidity(s => (s.opportunities === v ? s : { ...s, opportunities: v }));
54
+ }, []);
55
+ const onValidityPricing = React.useCallback((v) => {
56
+ setStepValidity(s => (s.pricing === v ? s : { ...s, pricing: v }));
57
+ }, []);
58
+ const announceRef = React.useRef(null);
59
+ // Focus management: capture the element that opened the wizard, focus first input on mount,
60
+ // restore focus on unmount.
61
+ const triggerElRef = React.useRef(null);
62
+ React.useEffect(() => {
63
+ triggerElRef.current = document.activeElement ?? null;
64
+ const initialStepId = wizardStepIds[0];
65
+ const first = document.querySelector(`[data-wizard-step="${initialStepId}"] input, [data-wizard-step="${initialStepId}"] textarea, [data-wizard-step="${initialStepId}"] button`);
66
+ first?.focus();
67
+ return () => {
68
+ triggerElRef.current?.focus();
69
+ };
70
+ }, []);
71
+ // Escape → save-and-exit confirmation (or close directly if nothing unsaved).
72
+ React.useEffect(() => {
73
+ const onKey = (e) => {
74
+ if (e.key !== "Escape")
75
+ return;
76
+ e.stopPropagation();
77
+ const hasUnsaved = draftHook.state.phase === "creating" ||
78
+ (draftHook.state.phase === "created" && draftHook.state.savingPhase !== "idle");
79
+ if (!hasUnsaved) {
80
+ onClose();
81
+ return;
82
+ }
83
+ if (window.confirm("Save and exit? Your changes will be kept as a draft.")) {
84
+ void draftHook.flush().then(onClose);
85
+ }
86
+ };
87
+ document.addEventListener("keydown", onKey);
88
+ return () => document.removeEventListener("keydown", onKey);
89
+ }, [draftHook, onClose]);
90
+ const setStep = (idx) => {
91
+ if (idx === currentStep)
92
+ return;
93
+ setCurrentStep(idx);
94
+ if (announceRef.current) {
95
+ announceRef.current.textContent = `Step ${idx + 1} of 4: ${stepLabels[wizardStepIds[idx]]}`;
96
+ }
97
+ // Focus first input of the new step.
98
+ setTimeout(() => {
99
+ const first = document.querySelector(`[data-wizard-step="${wizardStepIds[idx]}"] input, [data-wizard-step="${wizardStepIds[idx]}"] textarea, [data-wizard-step="${wizardStepIds[idx]}"] button`);
100
+ first?.focus();
101
+ }, 0);
102
+ };
103
+ const goBack = (idx) => {
104
+ if (!completedSteps.includes(idx))
105
+ return;
106
+ setStep(idx);
107
+ };
108
+ const goNext = () => {
109
+ const currentId = wizardStepIds[currentStep];
110
+ if (!stepValidity[currentId])
111
+ return;
112
+ setCompletedSteps(prev => Array.from(new Set([...prev, currentStep])));
113
+ setStep(Math.min(currentStep + 1, wizardStepIds.length - 1));
114
+ };
115
+ const doPublish = async () => {
116
+ setPublishError(null);
117
+ setPublishing(true);
118
+ try {
119
+ const parsed = tenderPublishSchema.safeParse(effectiveDraft);
120
+ if (!parsed.success) {
121
+ setPublishError({ code: "VALIDATION", message: parsed.error.issues.map(i => i.message).join("; ") });
122
+ setPublishing(false);
123
+ return;
124
+ }
125
+ const s = draftHook.state;
126
+ if (s.phase !== "created") {
127
+ setPublishError({ code: "VALIDATION", message: "No draft to publish. Autosave may still be in progress." });
128
+ setPublishing(false);
129
+ return;
130
+ }
131
+ const { tenderId } = await publishDraft(s.draftId, idempotencyKey);
132
+ onPublished?.(tenderId);
133
+ }
134
+ catch (e) {
135
+ const err = e;
136
+ setPublishError({ code: err?.code ?? "SERVER", message: err?.message ?? "Publish failed. Retry." });
137
+ }
138
+ finally {
139
+ setPublishing(false);
140
+ }
141
+ };
142
+ const doSaveEdit = async () => {
143
+ setPublishError(null);
144
+ setPublishing(true);
145
+ try {
146
+ const parsed = tenderPublishSchema.safeParse(effectiveDraft);
147
+ if (!parsed.success) {
148
+ setPublishError({ code: "VALIDATION", message: parsed.error.issues.map(i => i.message).join("; ") });
149
+ setPublishing(false);
150
+ return;
151
+ }
152
+ const s = draftHook.state;
153
+ if (s.phase !== "created" || !saveEdit) {
154
+ setPublishError({ code: "VALIDATION", message: "Nothing to save." });
155
+ setPublishing(false);
156
+ return;
157
+ }
158
+ await saveEdit(s.draftId, effectiveDraft, s.version);
159
+ onClose();
160
+ }
161
+ catch (e) {
162
+ const err = e;
163
+ setPublishError({ code: err?.code ?? "SERVER", message: err?.message ?? "Save failed." });
164
+ }
165
+ finally {
166
+ setPublishing(false);
167
+ }
168
+ };
169
+ const stepContent = () => {
170
+ switch (wizardStepIds[currentStep]) {
171
+ case "tender":
172
+ return (_jsx("div", { "data-wizard-step": "tender", children: _jsx(StepTenderBasics, { initialValues: {
173
+ name: effectiveDraft.name,
174
+ targetCountry: effectiveDraft.targetCountry,
175
+ instructions: effectiveDraft.instructions,
176
+ }, onChange: applyTenderFields, onValidityChange: onValidityTender }) }));
177
+ case "opportunities":
178
+ return (_jsx("div", { "data-wizard-step": "opportunities", children: _jsx(StepOpportunities, { items: effectiveDraft.opportunities ?? [], onChange: onApplyOpportunities, onValidityChange: onValidityOpportunities }) }));
179
+ case "pricing":
180
+ return (_jsx("div", { "data-wizard-step": "pricing", children: _jsx(StepPricingTimeline, { items: effectiveDraft.opportunities ?? [], onChange: onApplyOpportunities, onValidityChange: onValidityPricing }) }));
181
+ case "review":
182
+ return _jsx("div", { "data-wizard-step": "review", children: _jsx(StepReview, { tender: effectiveDraft }) });
183
+ }
184
+ };
185
+ const isLastStep = currentStep === wizardStepIds.length - 1;
186
+ const currentId = wizardStepIds[currentStep];
187
+ const canContinue = stepValidity[currentId];
188
+ return (_jsxs("div", { className: cn("flex h-full flex-col gap-6 bg-background p-6", className), children: [_jsxs("header", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold", children: mode === "edit" ? "Edit opportunity" : "Create opportunity" }), _jsx("p", { className: "sr-only", children: "Press Escape to save and exit. Tab to navigate fields." })] }), _jsx("button", { type: "button", onClick: onClose, "aria-label": "Close", className: "rounded-sm p-1 hover:bg-accent", children: _jsx(X, { "aria-hidden": true, className: "size-5" }) })] }), mode === "edit" ? (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900", children: [_jsx(Info, { "aria-hidden": true, className: "size-5 mt-0.5 flex-shrink-0" }), _jsx("p", { children: "Editing published opportunity - your changes will be visible to producers as soon as you save." })] })) : null, draftHook.conflictDetected ? (_jsxs("div", { role: "alert", "aria-live": "assertive", className: "flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-900", children: [_jsx(Info, { "aria-hidden": true, className: "size-5 mt-0.5 flex-shrink-0" }), _jsx("p", { className: "flex-1", children: "Your draft was updated in another tab. Accept the server version to continue, or keep your local changes and try again." }), _jsx("button", { type: "button", onClick: () => {
189
+ if (draftHook.state.phase !== "created")
190
+ return;
191
+ draftHook.acceptServerConflict({}, draftHook.state.version + 1);
192
+ }, className: "rounded-md bg-emerald-700 px-3 py-1 text-xs text-white", children: "Accept server version" })] })) : null, draftHook.resumeSuggestion === "local" ? (_jsxs("div", { role: "status", "aria-live": "polite", className: "flex items-start gap-2 rounded-md border border-sky-200 bg-sky-50 p-3 text-sm text-sky-900", children: [_jsx(Info, { "aria-hidden": true, className: "size-5 mt-0.5 flex-shrink-0" }), _jsx("p", { className: "flex-1", children: "Local changes found from your last session." }), _jsx("button", { type: "button", onClick: draftHook.acceptLocalResume, className: "rounded-md bg-emerald-700 px-3 py-1 text-xs text-white", children: "Keep local" }), _jsx("button", { type: "button", onClick: draftHook.dismissLocalResume, className: "rounded-md border border-border bg-background px-3 py-1 text-xs", children: "Use server" })] })) : null, _jsx(WizardStepper, { steps: wizardStepIds.map(id => ({ id, label: stepLabels[id] })), currentIndex: currentStep, completedIndexes: completedSteps, activeSubStatus: mode === "draft" && draftHook.state.phase === "created"
193
+ ? draftHook.localOnly ? "Local only" : "Autosaved"
194
+ : null, onJumpBack: goBack }), _jsx("div", { className: "flex-1 overflow-auto", children: stepContent() }), _jsx("div", { ref: announceRef, role: "status", "aria-live": "polite", className: "sr-only" }), publishError ? (_jsxs("div", { role: "alert", "aria-live": "assertive", className: "rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-800", children: [_jsxs("strong", { children: [publishError.code, ":"] }), " ", publishError.message] })) : null, _jsxs("footer", { className: "flex items-center justify-between gap-2 border-t border-border pt-4", children: [_jsx("button", { type: "button", onClick: onClose, className: "rounded-md border border-border bg-background px-3 py-1.5 text-sm", children: "Cancel" }), _jsxs("div", { className: "flex items-center gap-2", children: [currentStep > 0 ? (_jsx("button", { type: "button", onClick: () => setStep(currentStep - 1), className: "rounded-md border border-border bg-background px-3 py-1.5 text-sm", children: "Back" })) : null, mode === "edit" ? (_jsxs(_Fragment, { children: [!isLastStep ? (_jsx("button", { type: "button", onClick: goNext, "aria-disabled": !canContinue || undefined, title: !canContinue ? "Complete required fields to continue" : undefined, className: cn("rounded-md border border-border bg-background px-3 py-1.5 text-sm", canContinue ? "hover:bg-accent" : "opacity-60 cursor-not-allowed"), children: "Continue" })) : null, _jsx("button", { type: "button", onClick: doSaveEdit, disabled: publishing, className: "rounded-md bg-emerald-700 px-3 py-1.5 text-sm text-white", children: publishing ? "Saving..." : "Save changes" })] })) : !isLastStep ? (_jsx("button", { type: "button", onClick: goNext, "aria-disabled": !canContinue || undefined, title: !canContinue ? "Complete required fields to continue" : undefined, className: cn("rounded-md px-3 py-1.5 text-sm text-white", canContinue ? "bg-emerald-700 hover:bg-emerald-800" : "bg-slate-300 cursor-not-allowed"), children: "Continue" })) : (_jsx("button", { type: "button", onClick: doPublish, disabled: publishing, className: "rounded-md bg-emerald-700 px-3 py-1.5 text-sm text-white", children: publishing ? "Publishing..." : "Publish" }))] })] })] }));
195
+ }
196
+ //# sourceMappingURL=opportunity-wizard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-wizard.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/opportunity-wizard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,C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AC,CAAC,CACb,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,MAAM,mBACA,CAAC,WAAW,IAAI,SAAS,EACxC,KAAK,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,SAAS,EACxE,SAAS,EAAE,EAAE,CACX,mEAAmE,EACnE,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,+BAA+B,CAClE,yBAGM,CACV,CAAC,CAAC,CAAC,IAAI,EACR,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAC,0DAA0D,YAClI,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc,GACnC,IACR,CACJ,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAChB,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,MAAM,mBACA,CAAC,WAAW,IAAI,SAAS,EACxC,KAAK,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,SAAS,EACxE,SAAS,EAAE,EAAE,CACX,2CAA2C,EAC3C,WAAW,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAC,iCAAiC,CACxF,yBAGM,CACV,CAAC,CAAC,CAAC,CACF,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAC,0DAA0D,YACjI,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,GAClC,CACV,IACG,IACC,IACL,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { OpportunityWizard } from "./opportunity-wizard";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof OpportunityWizard;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const DraftMode: Story;
11
+ export declare const EditMode: Story;
12
+ //# sourceMappingURL=opportunity-wizard.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-wizard.stories.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/opportunity-wizard.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,IAAI;;;;CAIgC,CAAC;AAC3C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAWnC,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA4BtB,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { OpportunityWizard } from "./opportunity-wizard";
3
+ const meta = {
4
+ title: "Opportunities/Wizard/OpportunityWizard",
5
+ component: OpportunityWizard,
6
+ tags: ["autodocs"],
7
+ };
8
+ export default meta;
9
+ const mockCallbacks = {
10
+ createDraft: async () => ({ id: "mock-draft", version: 1 }),
11
+ patchDraft: async () => ({ version: 2 }),
12
+ publishDraft: async () => ({ tenderId: "mock-tender" }),
13
+ saveEdit: async () => ({ version: 3 }),
14
+ onClose: () => console.warn("close"),
15
+ onPublished: (id) => console.warn("published", id),
16
+ };
17
+ export const DraftMode = {
18
+ args: {
19
+ mode: "draft",
20
+ ...mockCallbacks,
21
+ },
22
+ render: (args) => (_jsx("div", { className: "h-[700px] border border-border", children: _jsx(OpportunityWizard, { ...args }) })),
23
+ };
24
+ export const EditMode = {
25
+ args: {
26
+ mode: "edit",
27
+ initialDraft: {
28
+ id: "existing-1",
29
+ name: "Existing Tender",
30
+ targetCountry: "SE",
31
+ instructions: "Already-published tender being edited.",
32
+ opportunities: [{
33
+ clientId: "c1",
34
+ name: "Existing opportunity",
35
+ category: "wine",
36
+ countryOfOrigin: "FR",
37
+ volume: 5000,
38
+ priceMin: 8,
39
+ priceMax: 12,
40
+ currency: "EUR",
41
+ submissionDeadline: new Date("2026-06-01"),
42
+ }],
43
+ },
44
+ initialVersion: 1,
45
+ ...mockCallbacks,
46
+ },
47
+ render: (args) => (_jsx("div", { className: "h-[700px] border border-border", children: _jsx(OpportunityWizard, { ...args }) })),
48
+ };
49
+ //# sourceMappingURL=opportunity-wizard.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-wizard.stories.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/opportunity-wizard.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,wCAAwC;IAC/C,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;CACsB,CAAC;AAC3C,eAAe,IAAI,CAAC;AAGpB,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3D,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACxC,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;IACvD,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;IACpC,WAAW,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;CAC3D,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,GAAG,aAAa;KACjB;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAChB,cAAK,SAAS,EAAC,gCAAgC,YAC7C,KAAC,iBAAiB,OAAK,IAAI,GAAI,GAC3B,CACP;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,YAAY,EAAE;YACZ,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,iBAAiB;YACvB,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,wCAAwC;YACtD,aAAa,EAAE,CAAC;oBACd,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,sBAAsB;oBAC5B,QAAQ,EAAE,MAAM;oBAChB,eAAe,EAAE,IAAI;oBACrB,MAAM,EAAE,IAAI;oBACZ,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,EAAE;oBACZ,QAAQ,EAAE,KAAK;oBACf,kBAAkB,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;iBAC3C,CAAC;SACH;QACD,cAAc,EAAE,CAAC;QACjB,GAAG,aAAa;KACjB;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAChB,cAAK,SAAS,EAAC,gCAAgC,YAC7C,KAAC,iBAAiB,OAAK,IAAI,GAAI,GAC3B,CACP;CACF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { OpportunityDraft } from "./wizard.types";
2
+ export interface StepOpportunitiesProps {
3
+ items: OpportunityDraft[];
4
+ onChange: (next: OpportunityDraft[]) => void;
5
+ onValidityChange?: (valid: boolean) => void;
6
+ className?: string;
7
+ }
8
+ export declare function StepOpportunities({ items, onChange, onValidityChange, className }: StepOpportunitiesProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=step-opportunities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-opportunities.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-opportunities.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC7C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,sBAAsB,2CA6EzG"}
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { useVirtualizer } from "@tanstack/react-virtual";
4
+ import { Plus, Trash2 } from "lucide-react";
5
+ import { cn } from "../../lib/utils";
6
+ const VIRTUALIZE_THRESHOLD = 20;
7
+ function makeNewOpportunity() {
8
+ return {
9
+ clientId: crypto.randomUUID(),
10
+ name: "",
11
+ };
12
+ }
13
+ export function StepOpportunities({ items, onChange, onValidityChange, className }) {
14
+ const [expandedSet, setExpandedSet] = React.useState(() => new Set(items.map(i => i.clientId)));
15
+ const updateItem = (clientId, patch) => {
16
+ onChange(items.map(it => (it.clientId === clientId ? { ...it, ...patch } : it)));
17
+ };
18
+ const addItem = () => {
19
+ const next = makeNewOpportunity();
20
+ onChange([...items, next]);
21
+ setExpandedSet(prev => new Set([...prev, next.clientId]));
22
+ };
23
+ const removeItem = (clientId) => {
24
+ onChange(items.filter(it => it.clientId !== clientId));
25
+ setExpandedSet(prev => { const s = new Set(prev); s.delete(clientId); return s; });
26
+ };
27
+ const toggle = (clientId) => {
28
+ setExpandedSet(prev => {
29
+ const s = new Set(prev);
30
+ if (s.has(clientId))
31
+ s.delete(clientId);
32
+ else
33
+ s.add(clientId);
34
+ return s;
35
+ });
36
+ };
37
+ React.useEffect(() => {
38
+ const valid = items.length >= 1 && items.every(i => (i.name ?? "").trim().length > 0);
39
+ onValidityChange?.(valid);
40
+ }, [items, onValidityChange]);
41
+ if (items.length >= VIRTUALIZE_THRESHOLD) {
42
+ return (_jsx(VirtualizedList, { items: items, expandedSet: expandedSet, onToggle: toggle, onUpdateItem: updateItem, onRemoveItem: removeItem, onAddItem: addItem, className: className }));
43
+ }
44
+ return (_jsxs("div", { className: cn("flex flex-col gap-3", className), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "text-xs text-muted-foreground", children: [items.length, " opportunit", items.length === 1 ? "y" : "ies"] }), items.length >= 3 ? (_jsx("button", { type: "button", className: "text-xs underline underline-offset-2 text-muted-foreground", onClick: () => setExpandedSet(new Set(items.map(i => i.clientId))), children: "Expand all" })) : null] }), items.map(it => (_jsx(OpportunityCard, { opp: it, expanded: expandedSet.has(it.clientId), onToggle: () => toggle(it.clientId), onUpdate: (p) => updateItem(it.clientId, p), onRemove: items.length > 1 ? () => removeItem(it.clientId) : undefined }, it.clientId))), _jsxs("button", { type: "button", onClick: addItem, className: "inline-flex items-center gap-1 self-start rounded-md border border-dashed border-border px-3 py-2 text-sm text-muted-foreground hover:bg-accent", children: [_jsx(Plus, { "aria-hidden": true, className: "size-4" }), " Add another opportunity"] })] }));
45
+ }
46
+ function VirtualizedList(props) {
47
+ const parentRef = React.useRef(null);
48
+ // eslint-disable-next-line react-hooks/incompatible-library -- TanStack Virtual's useVirtualizer is a known exception; memoization is handled internally
49
+ const rowVirtualizer = useVirtualizer({
50
+ count: props.items.length,
51
+ getScrollElement: () => parentRef.current,
52
+ estimateSize: (i) => (props.expandedSet.has(props.items[i].clientId) ? 420 : 72),
53
+ overscan: 5,
54
+ });
55
+ return (_jsxs("div", { className: cn("flex flex-col gap-3", props.className), children: [_jsx("div", { className: "flex items-center justify-between", children: _jsxs("div", { className: "text-xs text-muted-foreground", children: [props.items.length, " opportunities \u00B7 virtualized"] }) }), _jsx("div", { ref: parentRef, className: "max-h-[60vh] overflow-auto", children: _jsx("div", { style: { height: `${rowVirtualizer.getTotalSize()}px`, position: "relative" }, children: rowVirtualizer.getVirtualItems().map(row => {
56
+ const it = props.items[row.index];
57
+ return (_jsx("div", { style: { position: "absolute", top: 0, left: 0, right: 0, transform: `translateY(${row.start}px)` }, children: _jsx(OpportunityCard, { opp: it, expanded: props.expandedSet.has(it.clientId), onToggle: () => props.onToggle(it.clientId), onUpdate: (p) => props.onUpdateItem(it.clientId, p), onRemove: props.items.length > 1 ? () => props.onRemoveItem(it.clientId) : undefined }) }, it.clientId));
58
+ }) }) }), _jsxs("button", { type: "button", onClick: props.onAddItem, className: "inline-flex items-center gap-1 self-start rounded-md border border-dashed border-border px-3 py-2 text-sm text-muted-foreground hover:bg-accent", children: [_jsx(Plus, { "aria-hidden": true, className: "size-4" }), " Add another opportunity"] })] }));
59
+ }
60
+ function OpportunityCard({ opp, expanded, onToggle, onUpdate, onRemove, }) {
61
+ return (_jsxs("div", { className: "rounded-lg border border-border bg-card p-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("button", { type: "button", onClick: onToggle, className: "text-left flex-1", "aria-expanded": expanded, children: [_jsx("div", { className: "text-sm font-semibold", children: opp.name?.trim() || "Untitled opportunity" }), _jsxs("div", { className: "text-xs text-muted-foreground", children: [opp.category ?? "-", " \u00B7 ", opp.countryOfOrigin ?? "-", " \u00B7 ", opp.volume ?? "-", " bottles"] })] }), onRemove ? (_jsx("button", { type: "button", onClick: onRemove, "aria-label": "Remove opportunity", className: "ml-2 rounded-xs p-1 text-muted-foreground hover:bg-red-50 hover:text-red-700", children: _jsx(Trash2, { "aria-hidden": true, className: "size-4" }) })) : null] }), expanded ? (_jsxs("div", { className: "mt-3 grid grid-cols-1 gap-3 md:grid-cols-2", children: [_jsx(LabeledInput, { label: "Name", value: opp.name ?? "", onChange: (v) => onUpdate({ name: v }), required: true }), _jsx(LabeledInput, { label: "Category", value: opp.category ?? "", onChange: (v) => onUpdate({ category: v }) }), _jsx(LabeledInput, { label: "Subtype", value: opp.subtype ?? "", onChange: (v) => onUpdate({ subtype: v }) }), _jsx(LabeledInput, { label: "Country of origin (ISO-2)", value: opp.countryOfOrigin ?? "", onChange: (v) => onUpdate({ countryOfOrigin: v.toUpperCase() }) }), _jsx(LabeledInput, { label: "Packaging", value: opp.packaging ?? "", onChange: (v) => onUpdate({ packaging: v }) }), _jsx(LabeledInput, { label: "Closure", value: opp.closure ?? "", onChange: (v) => onUpdate({ closure: v }) }), _jsx(LabeledInput, { label: "Volume (bottles)", type: "number", value: opp.volume ?? "", onChange: (v) => onUpdate({ volume: v ? Number(v) : undefined }) })] })) : null] }));
62
+ }
63
+ function LabeledInput({ label, value, onChange, type = "text", required, }) {
64
+ const [internal, setInternal] = React.useState(String(value ?? ""));
65
+ // Sync from parent when value changes externally (e.g. item replaced)
66
+ const prevValueRef = React.useRef(String(value ?? ""));
67
+ React.useEffect(() => {
68
+ const next = String(value ?? "");
69
+ if (next !== prevValueRef.current) {
70
+ // eslint-disable-next-line @eslint-react/set-state-in-effect -- idempotent: only updates when value differs from previous
71
+ setInternal(next);
72
+ prevValueRef.current = next;
73
+ }
74
+ }, [value]);
75
+ return (_jsxs("label", { className: "block text-sm", children: [_jsxs("span", { className: "block font-medium", children: [label, required ? " *" : ""] }), _jsx("input", { type: type, value: internal, onChange: (e) => {
76
+ setInternal(e.target.value);
77
+ onChange(e.target.value);
78
+ }, required: required, className: "mt-1 w-full rounded-xs border border-border bg-background px-3 py-2 text-sm" })] }));
79
+ }
80
+ //# sourceMappingURL=step-opportunities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-opportunities.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-opportunities.tsx"],"names":[],"mappings":";AAAA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C,IAAI,IAAI,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;YAClC,0HAA0H;YAC1H,WAAW,CAAC,IAAI,CAAC,CAAC;YAClB,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;QAC9B,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACL,iBAAO,SAAS,EAAC,eAAe,aAC9B,gBAAM,SAAS,EAAC,mBAAmB,aAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAQ,EACxE,gBACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAC5B,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,6EAA6E,GACvF,IACI,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { OpportunityDraft } from "./wizard.types";
2
+ export interface StepPricingTimelineProps {
3
+ items: OpportunityDraft[];
4
+ onChange: (next: OpportunityDraft[]) => void;
5
+ onValidityChange?: (valid: boolean) => void;
6
+ className?: string;
7
+ }
8
+ export declare function StepPricingTimeline({ items, onChange, onValidityChange, className }: StepPricingTimelineProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=step-pricing-timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-pricing-timeline.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-pricing-timeline.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,gBAAgB,CAAC;AAErE,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC7C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,wBAAwB,2CA8F7G"}
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as Tabs from "@radix-ui/react-tabs";
4
+ import { cn } from "../../lib/utils";
5
+ const pricingKeys = ["priceMin", "priceMax", "currency", "targetMargin", "distributionRequirements", "submissionDeadline", "sampleDeadline", "launchDate"];
6
+ function isComplete(it) {
7
+ return (it.priceMin != null &&
8
+ it.priceMax != null &&
9
+ it.priceMin <= it.priceMax &&
10
+ !!it.submissionDeadline &&
11
+ (!it.sampleDeadline || it.sampleDeadline <= it.submissionDeadline) &&
12
+ (!it.launchDate || it.launchDate >= it.submissionDeadline));
13
+ }
14
+ export function StepPricingTimeline({ items, onChange, onValidityChange, className }) {
15
+ const firstId = items[0]?.clientId;
16
+ const [activeId, setActiveId] = React.useState(firstId ?? "");
17
+ React.useEffect(() => {
18
+ if (!items.some(i => i.clientId === activeId)) {
19
+ // eslint-disable-next-line @eslint-react/set-state-in-effect -- idempotent: only updates when activeId is stale (not in items)
20
+ setActiveId(items[0]?.clientId ?? "");
21
+ }
22
+ }, [items, activeId]);
23
+ const updateItem = (clientId, patch) => {
24
+ onChange(items.map(it => it.clientId === clientId ? { ...it, ...patch } : it));
25
+ };
26
+ const fillFromFirst = () => {
27
+ if (items.length < 2)
28
+ return;
29
+ const src = items[0];
30
+ const confirmed = window.confirm(`Apply opportunity 1's pricing and timeline to all ${items.length - 1} other opportunit${items.length - 1 === 1 ? "y" : "ies"}?`);
31
+ if (!confirmed)
32
+ return;
33
+ const copyFields = {};
34
+ for (const k of pricingKeys) {
35
+ copyFields[k] = src[k];
36
+ }
37
+ onChange(items.map((it, i) => i === 0 ? it : { ...it, ...copyFields }));
38
+ };
39
+ React.useEffect(() => {
40
+ const allValid = items.length > 0 && items.every(isComplete);
41
+ onValidityChange?.(allValid);
42
+ }, [items, onValidityChange]);
43
+ if (items.length === 0) {
44
+ return _jsx("p", { className: "text-sm text-muted-foreground", children: "Add at least one opportunity in Step 2 to configure pricing." });
45
+ }
46
+ return (_jsxs("div", { className: cn("flex flex-col gap-4", className), children: [items.length > 1 ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "text-xs text-muted-foreground", children: [items.length, " opportunities"] }), _jsx("button", { type: "button", onClick: fillFromFirst, className: "rounded-md border border-border bg-background px-3 py-1.5 text-xs hover:bg-accent", children: "Fill from opportunity 1" })] })) : null, items.length === 1 ? (_jsx(PricingFields, { opp: items[0], onUpdate: (p) => updateItem(items[0].clientId, p) }, items[0].clientId)) : (_jsxs(Tabs.Root, { value: activeId, onValueChange: setActiveId, activationMode: "manual", children: [_jsx(Tabs.List, { className: "flex flex-wrap gap-1 border-b border-border overflow-x-auto", "aria-label": "Opportunities pricing tabs", children: items.map((it, idx) => {
47
+ const complete = isComplete(it);
48
+ const title = it.name?.trim() || `Opportunity ${idx + 1}`;
49
+ return (_jsxs(Tabs.Trigger, { value: it.clientId, className: "inline-flex items-center gap-1 rounded-t-md px-3 py-2 text-xs font-medium data-[state=active]:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-emerald-500", children: [_jsx("span", { "aria-hidden": true, className: cn("size-2 rounded-full", complete ? "bg-emerald-600" : "bg-amber-400") }), title] }, it.clientId));
50
+ }) }), items.map(it => (_jsx(Tabs.Content, { value: it.clientId, className: "pt-4", children: _jsx(PricingFields, { opp: it, onUpdate: (p) => updateItem(it.clientId, p) }, it.clientId) }, it.clientId)))] }))] }));
51
+ }
52
+ function PricingFields({ opp, onUpdate }) {
53
+ // Local state mirrors props so validation errors show immediately on user input
54
+ // even when the parent's onChange is a no-op (e.g., in tests or uncontrolled usage).
55
+ const [local, setLocal] = React.useState({});
56
+ // Merge: props win unless local has an explicit override (tracked by key presence).
57
+ const merged = { ...opp, ...local };
58
+ const update = (patch) => {
59
+ setLocal(prev => ({ ...prev, ...patch }));
60
+ onUpdate(patch);
61
+ };
62
+ return (_jsxs("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [_jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Price min" }), _jsx("input", { "aria-label": "Price min", type: "number", min: "0", step: "0.01", value: merged.priceMin ?? "", onChange: (e) => update({ priceMin: e.target.value === "" ? undefined : Number(e.target.value) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Price max" }), _jsx("input", { "aria-label": "Price max", type: "number", min: "0", step: "0.01", value: merged.priceMax ?? "", onChange: (e) => update({ priceMax: e.target.value === "" ? undefined : Number(e.target.value) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" }), merged.priceMin != null && merged.priceMax != null && merged.priceMin > merged.priceMax ? (_jsx("p", { className: "mt-1 text-xs text-red-700", children: "Maximum price must be at least the minimum." })) : null] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Currency" }), _jsxs("select", { "aria-label": "Currency", value: merged.currency ?? "", onChange: (e) => update({ currency: (e.target.value || undefined) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm", children: [_jsx("option", { value: "", children: "Select..." }), ["EUR", "USD", "SEK", "NOK", "DKK", "GBP", "CHF", "JPY"].map(c => _jsx("option", { value: c, children: c }, c))] })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Target margin (0-1)" }), _jsx("input", { "aria-label": "Target margin", type: "number", min: "0", max: "1", step: "0.01", value: merged.targetMargin ?? "", onChange: (e) => update({ targetMargin: e.target.value === "" ? undefined : Number(e.target.value) }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm md:col-span-2", children: [_jsx("span", { className: "block font-medium", children: "Distribution requirements (optional)" }), _jsx("textarea", { "aria-label": "Distribution requirements", rows: 3, value: merged.distributionRequirements ?? "", onChange: (e) => update({ distributionRequirements: e.target.value }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Submission deadline *" }), _jsx("input", { "aria-label": "Submission deadline", type: "date", value: merged.submissionDeadline ? merged.submissionDeadline.toISOString().slice(0, 10) : "", onChange: (e) => update({ submissionDeadline: e.target.value ? new Date(e.target.value) : undefined }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" })] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Sample deadline (optional)" }), _jsx("input", { "aria-label": "Sample deadline", type: "date", value: merged.sampleDeadline ? merged.sampleDeadline.toISOString().slice(0, 10) : "", onChange: (e) => update({ sampleDeadline: e.target.value ? new Date(e.target.value) : undefined }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" }), merged.sampleDeadline && merged.submissionDeadline && merged.sampleDeadline > merged.submissionDeadline ? (_jsx("p", { className: "mt-1 text-xs text-red-700", children: "Sample deadline must be on or before the submission deadline." })) : null] }), _jsxs("label", { className: "block text-sm", children: [_jsx("span", { className: "block font-medium", children: "Launch date (optional)" }), _jsx("input", { "aria-label": "Launch date", type: "date", value: merged.launchDate ? merged.launchDate.toISOString().slice(0, 10) : "", onChange: (e) => update({ launchDate: e.target.value ? new Date(e.target.value) : undefined }), className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm" }), merged.launchDate && merged.submissionDeadline && merged.launchDate < merged.submissionDeadline ? (_jsx("p", { className: "mt-1 text-xs text-red-700", children: "Launch date must be on or after the submission deadline." })) : null] })] }));
63
+ }
64
+ //# sourceMappingURL=step-pricing-timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-pricing-timeline.js","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-pricing-timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAUrC,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,CAAU,CAAC;AAEpK,SAAS,UAAU,CAAC,EAAoB;IACtC,OAAO,CACL,EAAE,CAAC,QAAQ,IAAI,IAAI;QACnB,EAAE,CAAC,QAAQ,IAAI,IAAI;QACnB,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,QAAQ;QAC1B,CAAC,CAAC,EAAE,CAAC,kBAAkB;QACvB,CAAC,CAAC,EAAE,CAAC,cAAc,IAAI,EAAE,CAAC,cAAc,IAAI,EAAE,CAAC,kBAAkB,CAAC;QAClE,CAAC,CAAC,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,kBAAkB,CAAC,CAC3D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAA4B;IAC5G,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IACnC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAC9D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,KAAK,CAAC,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type { OpportunityView } from "../types";
3
+ export interface StepReviewProps {
4
+ tender: Partial<TenderDraft>;
5
+ className?: string;
6
+ }
7
+ export declare function draftToView(tenderName: string, targetCountry: string, opp: OpportunityDraft): OpportunityView;
8
+ export declare function StepReview({ tender, className }: StepReviewProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=step-review.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-review.d.ts","sourceRoot":"","sources":["../../../src/opportunities/wizard/step-review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,UAAU,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,eAAe,CAe7G;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,2CAsDhE"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { OpportunityStackedCard } from "../opportunity-stacked-card";
3
+ import { ChannelBadge } from "../opportunity-channel-badge";
4
+ import { CountdownPill } from "../../components/countdown-pill";
5
+ import { cn } from "../../lib/utils";
6
+ export function draftToView(tenderName, targetCountry, opp) {
7
+ const subtitleFacts = [];
8
+ if (opp.category)
9
+ subtitleFacts.push({ type: "text", text: opp.category });
10
+ if (opp.volume != null)
11
+ subtitleFacts.push({ type: "count", value: opp.volume, suffix: "bottles" });
12
+ return {
13
+ id: opp.clientId,
14
+ tenderId: "draft",
15
+ productName: opp.name?.trim() || "Untitled opportunity",
16
+ buyerName: tenderName || "Your tender",
17
+ countryCode: opp.countryOfOrigin ?? targetCountry ?? "",
18
+ subtitleFacts,
19
+ deadline: opp.submissionDeadline ?? null,
20
+ status: "open",
21
+ };
22
+ }
23
+ export function StepReview({ tender, className }) {
24
+ const opps = tender.opportunities ?? [];
25
+ return (_jsxs("div", { className: cn("flex flex-col gap-5", className), children: [_jsxs("section", { className: "rounded-lg border border-border bg-card p-4", children: [_jsx("h3", { className: "text-sm font-semibold", children: "Tender summary" }), _jsxs("dl", { className: "mt-3 grid grid-cols-1 gap-x-6 gap-y-2 text-sm md:grid-cols-2", children: [_jsxs("div", { children: [_jsx("dt", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Name" }), _jsx("dd", { className: "mt-0.5", children: tender.name || "-" })] }), _jsxs("div", { children: [_jsx("dt", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Target country" }), _jsx("dd", { className: "mt-0.5", children: tender.targetCountry || "-" })] }), tender.instructions ? (_jsxs("div", { className: "md:col-span-2", children: [_jsx("dt", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Instructions" }), _jsx("dd", { className: "mt-0.5 whitespace-pre-wrap", children: tender.instructions })] })) : null] })] }), _jsxs("section", { children: [_jsx("h3", { className: "text-sm font-semibold mb-2", children: "Opportunities producers will see" }), opps.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "No opportunities yet - go back to Step 2." })) : (_jsx("div", { className: "flex flex-col gap-2", children: opps.map(opp => {
26
+ const view = draftToView(tender.name ?? "", tender.targetCountry ?? "", opp);
27
+ return (_jsx(OpportunityStackedCard, { opportunity: view, leftBadge: _jsx(ChannelBadge, { channel: "importer" }), metaRight: _jsx(CountdownPill, { date: view.deadline }), primaryAction: null, readOnly: true, tabs: [{
28
+ id: "overview",
29
+ label: "Overview",
30
+ content: _jsx("div", { className: "p-3 text-xs text-muted-foreground", children: "Producers see the full detail here." }),
31
+ }] }, opp.clientId));
32
+ }) }))] })] }));
33
+ }
34
+ //# sourceMappingUR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ACR,IAAI,EAAE,CAAC;wCACL,EAAE,EAAE,UAAU;wCACd,KAAK,EAAE,UAAU;wCACjB,OAAO,EAAE,cAAK,SAAS,EAAC,mCAAmC,oDAA0C;qCACtG,CAAC,IAVG,GAAG,CAAC,QAAQ,CAWjB,CACH,CAAC;wBACJ,CAAC,CAAC,GACE,CACP,IACO,IACN,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ declare const stepSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ targetCountry: z.ZodString;
5
+ instructions: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type StepTenderBasicsValues = z.infer<typeof stepSchema>;
8
+ export interface StepTenderBasicsProps {
9
+ initialValues?: Partial<StepTenderBasicsValues>;
10
+ onChange: (partial: Partial<StepTenderBasicsValues>) => void;
11
+ onValidityChange?: (valid: boolean) => void;
12
+ className?: string;
13
+ }
14
+ export declare function StepTenderBasics({ initialValues, onChange, onValidityChange, className }: StepTenderBasicsProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=step-tender-basics.d.ts.map