@cellarnode/ui 0.17.4 → 0.19.2

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 (375) 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/journey-card.d.ts +9 -1
  5. package/dist/components/journey-card.d.ts.map +1 -1
  6. package/dist/components/journey-card.js +13 -6
  7. package/dist/components/journey-card.js.map +1 -1
  8. package/dist/components/journey-card.stories.d.ts +2 -0
  9. package/dist/components/journey-card.stories.d.ts.map +1 -1
  10. package/dist/components/journey-card.stories.js +43 -0
  11. package/dist/components/journey-card.stories.js.map +1 -1
  12. package/dist/components/sortable-card-context.d.ts +18 -0
  13. package/dist/components/sortable-card-context.d.ts.map +1 -0
  14. package/dist/components/sortable-card-context.js +18 -0
  15. package/dist/components/sortable-card-context.js.map +1 -0
  16. package/dist/components/sortable-card-shell.d.ts +40 -21
  17. package/dist/components/sortable-card-shell.d.ts.map +1 -1
  18. package/dist/components/sortable-card-shell.js +46 -39
  19. package/dist/components/sortable-card-shell.js.map +1 -1
  20. package/dist/components/sortable-card-shell.stories.d.ts +1 -1
  21. package/dist/components/sortable-card-shell.stories.d.ts.map +1 -1
  22. package/dist/components/sortable-card-shell.stories.js +28 -15
  23. package/dist/components/sortable-card-shell.stories.js.map +1 -1
  24. package/dist/components/sortable-card-shell.test.js +57 -16
  25. package/dist/components/sortable-card-shell.test.js.map +1 -1
  26. package/dist/index.d.ts +8 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +6 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/offer/attachments-card.d.ts +9 -0
  31. package/dist/offer/attachments-card.d.ts.map +1 -0
  32. package/dist/offer/attachments-card.js +16 -0
  33. package/dist/offer/attachments-card.js.map +1 -0
  34. package/dist/offer/attachments-card.stories.d.ts +17 -0
  35. package/dist/offer/attachments-card.stories.d.ts.map +1 -0
  36. package/dist/offer/attachments-card.stories.js +24 -0
  37. package/dist/offer/attachments-card.stories.js.map +1 -0
  38. package/dist/offer/buyer-notes-card.d.ts +7 -0
  39. package/dist/offer/buyer-notes-card.d.ts.map +1 -0
  40. package/dist/offer/buyer-notes-card.js +6 -0
  41. package/dist/offer/buyer-notes-card.js.map +1 -0
  42. package/dist/offer/buyer-notes-card.stories.d.ts +16 -0
  43. package/dist/offer/buyer-notes-card.stories.d.ts.map +1 -0
  44. package/dist/offer/buyer-notes-card.stories.js +25 -0
  45. package/dist/offer/buyer-notes-card.stories.js.map +1 -0
  46. package/dist/offer/counter-slide-over.d.ts +44 -0
  47. package/dist/offer/counter-slide-over.d.ts.map +1 -0
  48. package/dist/offer/counter-slide-over.js +81 -0
  49. package/dist/offer/counter-slide-over.js.map +1 -0
  50. package/dist/offer/counter-slide-over.stories.d.ts +23 -0
  51. package/dist/offer/counter-slide-over.stories.d.ts.map +1 -0
  52. package/dist/offer/counter-slide-over.stories.js +235 -0
  53. package/dist/offer/counter-slide-over.stories.js.map +1 -0
  54. package/dist/offer/facts-card.d.ts +32 -0
  55. package/dist/offer/facts-card.d.ts.map +1 -0
  56. package/dist/offer/facts-card.js +87 -0
  57. package/dist/offer/facts-card.js.map +1 -0
  58. package/dist/offer/facts-card.stories.d.ts +25 -0
  59. package/dist/offer/facts-card.stories.d.ts.map +1 -0
  60. package/dist/offer/facts-card.stories.js +177 -0
  61. package/dist/offer/facts-card.stories.js.map +1 -0
  62. package/dist/offer/index.d.ts +39 -0
  63. package/dist/offer/index.d.ts.map +1 -1
  64. package/dist/offer/index.js +21 -0
  65. package/dist/offer/index.js.map +1 -1
  66. package/dist/offer/inline-counter-form.d.ts +16 -0
  67. package/dist/offer/inline-counter-form.d.ts.map +1 -1
  68. package/dist/offer/inline-counter-form.js +8 -0
  69. package/dist/offer/inline-counter-form.js.map +1 -1
  70. package/dist/offer/match-compatibility-card.d.ts +16 -0
  71. package/dist/offer/match-compatibility-card.d.ts.map +1 -0
  72. package/dist/offer/match-compatibility-card.js +27 -0
  73. package/dist/offer/match-compatibility-card.js.map +1 -0
  74. package/dist/offer/match-compatibility-card.stories.d.ts +19 -0
  75. package/dist/offer/match-compatibility-card.stories.d.ts.map +1 -0
  76. package/dist/offer/match-compatibility-card.stories.js +111 -0
  77. package/dist/offer/match-compatibility-card.stories.js.map +1 -0
  78. package/dist/offer/match-glyph.d.ts +14 -0
  79. package/dist/offer/match-glyph.d.ts.map +1 -0
  80. package/dist/offer/match-glyph.js +40 -0
  81. package/dist/offer/match-glyph.js.map +1 -0
  82. package/dist/offer/match-glyph.stories.d.ts +26 -0
  83. package/dist/offer/match-glyph.stories.d.ts.map +1 -0
  84. package/dist/offer/match-glyph.stories.js +26 -0
  85. package/dist/offer/match-glyph.stories.js.map +1 -0
  86. package/dist/offer/match-headline-bar.d.ts +11 -0
  87. package/dist/offer/match-headline-bar.d.ts.map +1 -0
  88. package/dist/offer/match-headline-bar.js +28 -0
  89. package/dist/offer/match-headline-bar.js.map +1 -0
  90. package/dist/offer/match-headline-bar.stories.d.ts +17 -0
  91. package/dist/offer/match-headline-bar.stories.d.ts.map +1 -0
  92. package/dist/offer/match-headline-bar.stories.js +39 -0
  93. package/dist/offer/match-headline-bar.stories.js.map +1 -0
  94. package/dist/offer/match-preview.d.ts +18 -0
  95. package/dist/offer/match-preview.d.ts.map +1 -0
  96. package/dist/offer/match-preview.js +13 -0
  97. package/dist/offer/match-preview.js.map +1 -0
  98. package/dist/offer/match-preview.stories.d.ts +18 -0
  99. package/dist/offer/match-preview.stories.d.ts.map +1 -0
  100. package/dist/offer/match-preview.stories.js +103 -0
  101. package/dist/offer/match-preview.stories.js.map +1 -0
  102. package/dist/offer/negotiation-section.d.ts +11 -0
  103. package/dist/offer/negotiation-section.d.ts.map +1 -0
  104. package/dist/offer/negotiation-section.js +99 -0
  105. package/dist/offer/negotiation-section.js.map +1 -0
  106. package/dist/offer/negotiation-section.stories.d.ts +18 -0
  107. package/dist/offer/negotiation-section.stories.d.ts.map +1 -0
  108. package/dist/offer/negotiation-section.stories.js +156 -0
  109. package/dist/offer/negotiation-section.stories.js.map +1 -0
  110. package/dist/offer/new-activity-pill.d.ts +7 -0
  111. package/dist/offer/new-activity-pill.d.ts.map +1 -0
  112. package/dist/offer/new-activity-pill.js +8 -0
  113. package/dist/offer/new-activity-pill.js.map +1 -0
  114. package/dist/offer/new-activity-pill.stories.d.ts +17 -0
  115. package/dist/offer/new-activity-pill.stories.d.ts.map +1 -0
  116. package/dist/offer/new-activity-pill.stories.js +22 -0
  117. package/dist/offer/new-activity-pill.stories.js.map +1 -0
  118. package/dist/offer/offer-document.d.ts +33 -0
  119. package/dist/offer/offer-document.d.ts.map +1 -0
  120. package/dist/offer/offer-document.js +125 -0
  121. package/dist/offer/offer-document.js.map +1 -0
  122. package/dist/offer/offer-document.stories.d.ts +25 -0
  123. package/dist/offer/offer-document.stories.d.ts.map +1 -0
  124. package/dist/offer/offer-document.stories.js +168 -0
  125. package/dist/offer/offer-document.stories.js.map +1 -0
  126. package/dist/offer/offer-export-button.d.ts +8 -0
  127. package/dist/offer/offer-export-button.d.ts.map +1 -0
  128. package/dist/offer/offer-export-button.js +11 -0
  129. package/dist/offer/offer-export-button.js.map +1 -0
  130. package/dist/offer/offer-export-button.stories.d.ts +15 -0
  131. package/dist/offer/offer-export-button.stories.d.ts.map +1 -0
  132. package/dist/offer/offer-export-button.stories.js +11 -0
  133. package/dist/offer/offer-export-button.stories.js.map +1 -0
  134. package/dist/offer/offer-product-card.d.ts +32 -0
  135. package/dist/offer/offer-product-card.d.ts.map +1 -0
  136. package/dist/offer/offer-product-card.js +10 -0
  137. package/dist/offer/offer-product-card.js.map +1 -0
  138. package/dist/offer/offer-product-card.stories.d.ts +16 -0
  139. package/dist/offer/offer-product-card.stories.d.ts.map +1 -0
  140. package/dist/offer/offer-product-card.stories.js +40 -0
  141. package/dist/offer/offer-product-card.stories.js.map +1 -0
  142. package/dist/offer/opportunity-card.d.ts +16 -0
  143. package/dist/offer/opportunity-card.d.ts.map +1 -0
  144. package/dist/offer/opportunity-card.js +9 -0
  145. package/dist/offer/opportunity-card.js.map +1 -0
  146. package/dist/offer/opportunity-card.stories.d.ts +16 -0
  147. package/dist/offer/opportunity-card.stories.d.ts.map +1 -0
  148. package/dist/offer/opportunity-card.stories.js +33 -0
  149. package/dist/offer/opportunity-card.stories.js.map +1 -0
  150. package/dist/offer/parties-card.d.ts +11 -0
  151. package/dist/offer/parties-card.d.ts.map +1 -0
  152. package/dist/offer/parties-card.js +14 -0
  153. package/dist/offer/parties-card.js.map +1 -0
  154. package/dist/offer/parties-card.stories.d.ts +17 -0
  155. package/dist/offer/parties-card.stories.d.ts.map +1 -0
  156. package/dist/offer/parties-card.stories.js +37 -0
  157. package/dist/offer/parties-card.stories.js.map +1 -0
  158. package/dist/offer/terms-card.d.ts +17 -0
  159. package/dist/offer/terms-card.d.ts.map +1 -0
  160. package/dist/offer/terms-card.js +50 -0
  161. package/dist/offer/terms-card.js.map +1 -0
  162. package/dist/offer/terms-card.stories.d.ts +17 -0
  163. package/dist/offer/terms-card.stories.d.ts.map +1 -0
  164. package/dist/offer/terms-card.stories.js +42 -0
  165. package/dist/offer/terms-card.stories.js.map +1 -0
  166. package/dist/offer/timeline-event.d.ts +12 -0
  167. package/dist/offer/timeline-event.d.ts.map +1 -0
  168. package/dist/offer/timeline-event.js +57 -0
  169. package/dist/offer/timeline-event.js.map +1 -0
  170. package/dist/offer/timeline-event.stories.d.ts +21 -0
  171. package/dist/offer/timeline-event.stories.d.ts.map +1 -0
  172. package/dist/offer/timeline-event.stories.js +57 -0
  173. package/dist/offer/timeline-event.stories.js.map +1 -0
  174. package/dist/offer/types.d.ts +118 -0
  175. package/dist/offer/types.d.ts.map +1 -1
  176. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts +2 -0
  177. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts.map +1 -0
  178. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js +40 -0
  179. package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js.map +1 -0
  180. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts +2 -0
  181. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts.map +1 -0
  182. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js +31 -0
  183. package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js.map +1 -0
  184. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts +2 -0
  185. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts.map +1 -0
  186. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js +42 -0
  187. package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js.map +1 -0
  188. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts +2 -0
  189. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts.map +1 -0
  190. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js +59 -0
  191. package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js.map +1 -0
  192. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts +2 -0
  193. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts.map +1 -0
  194. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js +54 -0
  195. package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js.map +1 -0
  196. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts +2 -0
  197. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts.map +1 -0
  198. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js +40 -0
  199. package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js.map +1 -0
  200. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts +2 -0
  201. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts.map +1 -0
  202. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js +40 -0
  203. package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js.map +1 -0
  204. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts +2 -0
  205. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts.map +1 -0
  206. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js +74 -0
  207. package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js.map +1 -0
  208. package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts +2 -0
  209. package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts.map +1 -0
  210. package/dist/opportunities/__tests__/opportunity-celebration.test.js +46 -0
  211. package/dist/opportunities/__tests__/opportunity-celebration.test.js.map +1 -0
  212. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts +2 -0
  213. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts.map +1 -0
  214. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js +77 -0
  215. package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js.map +1 -0
  216. package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts +2 -0
  217. package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts.map +1 -0
  218. package/dist/opportunities/__tests__/opportunity-filter-bar.test.js +107 -0
  219. package/dist/opportunities/__tests__/opportunity-filter-bar.test.js.map +1 -0
  220. package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts +2 -0
  221. package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts.map +1 -0
  222. package/dist/opportunities/__tests__/opportunity-reopen-button.test.js +29 -0
  223. package/dist/opportunities/__tests__/opportunity-reopen-button.test.js.map +1 -0
  224. package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts +2 -0
  225. package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts.map +1 -0
  226. package/dist/opportunities/__tests__/opportunity-republish-button.test.js +29 -0
  227. package/dist/opportunities/__tests__/opportunity-republish-button.test.js.map +1 -0
  228. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts +2 -0
  229. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts.map +1 -0
  230. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js +19 -0
  231. package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js.map +1 -0
  232. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts +2 -0
  233. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts.map +1 -0
  234. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js +23 -0
  235. package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js.map +1 -0
  236. package/dist/opportunities/index.d.ts +51 -1
  237. package/dist/opportunities/index.d.ts.map +1 -1
  238. package/dist/opportunities/index.js +35 -0
  239. package/dist/opportunities/index.js.map +1 -1
  240. package/dist/opportunities/opportunities-table.d.ts +4 -0
  241. package/dist/opportunities/opportunities-table.d.ts.map +1 -1
  242. package/dist/opportunities/opportunities-table.js +4 -0
  243. package/dist/opportunities/opportunities-table.js.map +1 -1
  244. package/dist/opportunities/opportunity-add-to-journey-button.d.ts +12 -0
  245. package/dist/opportunities/opportunity-add-to-journey-button.d.ts.map +1 -0
  246. package/dist/opportunities/opportunity-add-to-journey-button.js +42 -0
  247. package/dist/opportunities/opportunity-add-to-journey-button.js.map +1 -0
  248. package/dist/opportunities/opportunity-card-actions-menu.d.ts +9 -0
  249. package/dist/opportunities/opportunity-card-actions-menu.d.ts.map +1 -0
  250. package/dist/opportunities/opportunity-card-actions-menu.js +33 -0
  251. package/dist/opportunities/opportunity-card-actions-menu.js.map +1 -0
  252. package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts +14 -0
  253. package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts.map +1 -0
  254. package/dist/opportunities/opportunity-card-actions-menu.stories.js +12 -0
  255. package/dist/opportunities/opportunity-card-actions-menu.stories.js.map +1 -0
  256. package/dist/opportunities/opportunity-celebration.d.ts +8 -0
  257. package/dist/opportunities/opportunity-celebration.d.ts.map +1 -0
  258. package/dist/opportunities/opportunity-celebration.js +17 -0
  259. package/dist/opportunities/opportunity-celebration.js.map +1 -0
  260. package/dist/opportunities/opportunity-celebration.stories.d.ts +17 -0
  261. package/dist/opportunities/opportunity-celebration.stories.d.ts.map +1 -0
  262. package/dist/opportunities/opportunity-celebration.stories.js +30 -0
  263. package/dist/opportunities/opportunity-celebration.stories.js.map +1 -0
  264. package/dist/opportunities/opportunity-filter-bar-drawer.d.ts +10 -0
  265. package/dist/opportunities/opportunity-filter-bar-drawer.d.ts.map +1 -0
  266. package/dist/opportunities/opportunity-filter-bar-drawer.js +54 -0
  267. package/dist/opportunities/opportunity-filter-bar-drawer.js.map +1 -0
  268. package/dist/opportunities/opportunity-filter-bar.d.ts +14 -0
  269. package/dist/opportunities/opportunity-filter-bar.d.ts.map +1 -0
  270. package/dist/opportunities/opportunity-filter-bar.js +65 -0
  271. package/dist/opportunities/opportunity-filter-bar.js.map +1 -0
  272. package/dist/opportunities/opportunity-filter-bar.stories.d.ts +25 -0
  273. package/dist/opportunities/opportunity-filter-bar.stories.d.ts.map +1 -0
  274. package/dist/opportunities/opportunity-filter-bar.stories.js +63 -0
  275. package/dist/opportunities/opportunity-filter-bar.stories.js.map +1 -0
  276. package/dist/opportunities/opportunity-reopen-button.d.ts +11 -0
  277. package/dist/opportunities/opportunity-reopen-button.d.ts.map +1 -0
  278. package/dist/opportunities/opportunity-reopen-button.js +20 -0
  279. package/dist/opportunities/opportunity-reopen-button.js.map +1 -0
  280. package/dist/opportunities/opportunity-republish-button.d.ts +7 -0
  281. package/dist/opportunities/opportunity-republish-button.d.ts.map +1 -0
  282. package/dist/opportunities/opportunity-republish-button.js +14 -0
  283. package/dist/opportunities/opportunity-republish-button.js.map +1 -0
  284. package/dist/opportunities/opportunity-resume-draft-button.d.ts +7 -0
  285. package/dist/opportunities/opportunity-resume-draft-button.d.ts.map +1 -0
  286. package/dist/opportunities/opportunity-resume-draft-button.js +7 -0
  287. package/dist/opportunities/opportunity-resume-draft-button.js.map +1 -0
  288. package/dist/opportunities/opportunity-stacked-list.d.ts.map +1 -1
  289. package/dist/opportunities/opportunity-stacked-list.js +3 -1
  290. package/dist/opportunities/opportunity-stacked-list.js.map +1 -1
  291. package/dist/opportunities/opportunity-view-offers-button.d.ts +7 -0
  292. package/dist/opportunities/opportunity-view-offers-button.d.ts.map +1 -0
  293. package/dist/opportunities/opportunity-view-offers-button.js +8 -0
  294. package/dist/opportunities/opportunity-view-offers-button.js.map +1 -0
  295. package/dist/opportunities/two-column-section.d.ts.map +1 -1
  296. package/dist/opportunities/two-column-section.js +4 -3
  297. package/dist/opportunities/two-column-section.js.map +1 -1
  298. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts +2 -0
  299. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts.map +1 -0
  300. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js +53 -0
  301. package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js.map +1 -0
  302. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts +2 -0
  303. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts.map +1 -0
  304. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js +32 -0
  305. package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js.map +1 -0
  306. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts +2 -0
  307. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts.map +1 -0
  308. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js +127 -0
  309. package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js.map +1 -0
  310. package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts +2 -0
  311. package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts.map +1 -0
  312. package/dist/opportunities/wizard/__tests__/step-opportunities.test.js +93 -0
  313. package/dist/opportunities/wizard/__tests__/step-opportunities.test.js.map +1 -0
  314. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts +2 -0
  315. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts.map +1 -0
  316. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js +141 -0
  317. package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js.map +1 -0
  318. package/dist/opportunities/wizard/__tests__/step-review.test.d.ts +2 -0
  319. package/dist/opportunities/wizard/__tests__/step-review.test.d.ts.map +1 -0
  320. package/dist/opportunities/wizard/__tests__/step-review.test.js +80 -0
  321. package/dist/opportunities/wizard/__tests__/step-review.test.js.map +1 -0
  322. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts +2 -0
  323. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts.map +1 -0
  324. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js +76 -0
  325. package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js.map +1 -0
  326. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts +2 -0
  327. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts.map +1 -0
  328. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js +192 -0
  329. package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js.map +1 -0
  330. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts +2 -0
  331. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts.map +1 -0
  332. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js +61 -0
  333. package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js.map +1 -0
  334. package/dist/opportunities/wizard/opportunity-wizard.d.ts +29 -0
  335. package/dist/opportunities/wizard/opportunity-wizard.d.ts.map +1 -0
  336. package/dist/opportunities/wizard/opportunity-wizard.js +196 -0
  337. package/dist/opportunities/wizard/opportunity-wizard.js.map +1 -0
  338. package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts +12 -0
  339. package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts.map +1 -0
  340. package/dist/opportunities/wizard/opportunity-wizard.stories.js +49 -0
  341. package/dist/opportunities/wizard/opportunity-wizard.stories.js.map +1 -0
  342. package/dist/opportunities/wizard/step-opportunities.d.ts +9 -0
  343. package/dist/opportunities/wizard/step-opportunities.d.ts.map +1 -0
  344. package/dist/opportunities/wizard/step-opportunities.js +80 -0
  345. package/dist/opportunities/wizard/step-opportunities.js.map +1 -0
  346. package/dist/opportunities/wizard/step-pricing-timeline.d.ts +9 -0
  347. package/dist/opportunities/wizard/step-pricing-timeline.d.ts.map +1 -0
  348. package/dist/opportunities/wizard/step-pricing-timeline.js +64 -0
  349. package/dist/opportunities/wizard/step-pricing-timeline.js.map +1 -0
  350. package/dist/opportunities/wizard/step-review.d.ts +9 -0
  351. package/dist/opportunities/wizard/step-review.d.ts.map +1 -0
  352. package/dist/opportunities/wizard/step-review.js +34 -0
  353. package/dist/opportunities/wizard/step-review.js.map +1 -0
  354. package/dist/opportunities/wizard/step-tender-basics.d.ts +16 -0
  355. package/dist/opportunities/wizard/step-tender-basics.d.ts.map +1 -0
  356. package/dist/opportunities/wizard/step-tender-basics.js +39 -0
  357. package/dist/opportunities/wizard/step-tender-basics.js.map +1 -0
  358. package/dist/opportunities/wizard/use-wizard-draft.d.ts +41 -0
  359. package/dist/opportunities/wizard/use-wizard-draft.d.ts.map +1 -0
  360. package/dist/opportunities/wizard/use-wizard-draft.js +214 -0
  361. package/dist/opportunities/wizard/use-wizard-draft.js.map +1 -0
  362. package/dist/opportunities/wizard/wizard-stepper.d.ts +20 -0
  363. package/dist/opportunities/wizard/wizard-stepper.d.ts.map +1 -0
  364. package/dist/opportunities/wizard/wizard-stepper.js +26 -0
  365. package/dist/opportunities/wizard/wizard-stepper.js.map +1 -0
  366. package/dist/opportunities/wizard/wizard-stepper.stories.d.ts +22 -0
  367. package/dist/opportunities/wizard/wizard-stepper.stories.d.ts.map +1 -0
  368. package/dist/opportunities/wizard/wizard-stepper.stories.js +47 -0
  369. package/dist/opportunities/wizard/wizard-stepper.stories.js.map +1 -0
  370. package/dist/opportunities/wizard/wizard.types.d.ts +176 -0
  371. package/dist/opportunities/wizard/wizard.types.d.ts.map +1 -0
  372. package/dist/opportunities/wizard/wizard.types.js +62 -0
  373. package/dist/opportunities/wizard/wizard.types.js.map +1 -0
  374. package/package.json +13 -4
  375. package/src/offer/offer-document.print.css +72 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-document.stories.js","sourceRoot":"","sources":["../../src/offer/offer-document.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASjD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;CACA,CAAC;AAEvC,eAAe,IAAI,CAAC;AAGpB,MAAM,QAAQ,GAAmB;IAC/B,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,aAAa;CACxB,CAAC;AACF,MAAM,aAAa,GAAmB;IACpC,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,uBAAuB;IAC7B,QAAQ,EAAE,YAAY;CACvB,CAAC;AAEF,MAAM,KAAK,GAAe;IACxB,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,GAAG;IACf,SAAS,EAAE,KAAK;IAChB,YAAY,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?: "full" | "icon";
4
+ disabled?: boolean;
5
+ className?: string;
6
+ }
7
+ export declare function OfferExportButton({ offerId: _offerId, variant, disabled, className, }: OfferExportButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=offer-export-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-export-button.d.ts","sourceRoot":"","sources":["../../src/offer/offer-export-button.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EAAE,QAAQ,EACjB,OAAgB,EAChB,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,2CA2BxB"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Printer } from "lucide-react";
3
+ import { ShadcnButton as Button } from "../components/shadcn-button";
4
+ import { cn } from "../lib/utils";
5
+ export function OfferExportButton({ offerId: _offerId, variant = "full", disabled, className, }) {
6
+ if (variant === "icon") {
7
+ return (_jsx(Button, { variant: "ghost", size: "icon", disabled: disabled, onClick: () => window.print(), "aria-label": "Export offer as PDF", className: cn(className), children: _jsx(Printer, { "aria-hidden": true, className: "size-4" }) }));
8
+ }
9
+ return (_jsxs(Button, { variant: "ghost", size: "sm", disabled: disabled, onClick: () => window.print(), className: cn(className), children: [_jsx(Printer, { "aria-hidden": true, className: "size-4" }), "Export PDF"] }));
10
+ }
11
+ //# sourceMappingURL=offer-export-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-export-button.js","sourceRoot":"","sources":["../../src/offer/offer-export-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AASlC,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EAAE,QAAQ,EACjB,OAAO,GAAG,MAAM,EAChB,QAAQ,EACR,SAAS,GACc;IACvB,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACvB,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,gBAClB,qBAAqB,EAChC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,YAExB,KAAC,OAAO,yBAAa,SAAS,EAAC,QAAQ,GAAG,GACnC,CACV,CAAC;IACJ,CAAC;IACD,OAAO,CACL,MAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,IAAI,EACT,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAC7B,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,aAExB,KAAC,OAAO,yBAAa,SAAS,EAAC,QAAQ,GAAG,kBAEnC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { OfferExportButton } from "./offer-export-button";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof OfferExportButton;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ export declare const IconOnly: Story;
15
+ //# sourceMappingURL=offer-export-button.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-export-button.stories.d.ts","sourceRoot":"","sources":["../../src/offer/offer-export-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,QAAA,MAAM,IAAI;;;;;;;CAKgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAwC,CAAC;AAC/D,eAAO,MAAM,QAAQ,EAAE,KAAyD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { OfferExportButton } from "./offer-export-button";
2
+ const meta = {
3
+ title: "Offer/OfferExportButton",
4
+ component: OfferExportButton,
5
+ tags: ["autodocs"],
6
+ parameters: { layout: "centered" },
7
+ };
8
+ export default meta;
9
+ export const Default = { args: { offerId: "offer-1" } };
10
+ export const IconOnly = { args: { offerId: "offer-1", variant: "icon" } };
11
+ //# sourceMappingURL=offer-export-button.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-export-button.stories.js","sourceRoot":"","sources":["../../src/offer/offer-export-button.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;CACM,CAAC;AAE3C,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;AAC/D,MAAM,CAAC,MAAM,QAAQ,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC"}
@@ -0,0 +1,32 @@
1
+ export interface OfferProductBeverage {
2
+ id: string;
3
+ name: string;
4
+ producer?: string;
5
+ countryOfOrigin?: string;
6
+ beverageType?: {
7
+ category?: string;
8
+ subtype?: string;
9
+ };
10
+ }
11
+ export interface OfferProductVariant {
12
+ id: string;
13
+ vintage?: number | null;
14
+ packaging?: string;
15
+ closure?: string;
16
+ abv?: number | null;
17
+ residualSugar?: number | null;
18
+ organic?: boolean;
19
+ fairtrade?: boolean;
20
+ sustainable?: boolean;
21
+ imageUrl?: string | null;
22
+ }
23
+ export interface OfferProductCardProps {
24
+ variant: OfferProductVariant;
25
+ beverage: OfferProductBeverage;
26
+ variantDisplay?: "collapsed" | "expanded";
27
+ /** True when the variant was frozen at offer time and may not reflect the live record. */
28
+ fromSnapshot?: boolean;
29
+ className?: string;
30
+ }
31
+ export declare function OfferProductCard({ variant, beverage, variantDisplay, fromSnapshot, className, }: OfferProductCardProps): import("react/jsx-runtime").JSX.Element;
32
+ //# sourceMappingURL=offer-product-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-product-card.d.ts","sourceRoot":"","sources":["../../src/offer/offer-product-card.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxD;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,cAAc,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAC1C,0FAA0F;IAC1F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,cAA2B,EAC3B,YAAoB,EACpB,SAAS,GACV,EAAE,qBAAqB,2CAyGvB"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { BadgeCheck, Leaf, Award } from "lucide-react";
3
+ import { cn } from "../lib/utils";
4
+ import { ShadcnBadge as Badge } from "../components/shadcn-badge";
5
+ export function OfferProductCard({ variant, beverage, variantDisplay = "expanded", fromSnapshot = false, className, }) {
6
+ const expanded = variantDisplay === "expanded";
7
+ const category = beverage.beverageType?.subtype ?? beverage.beverageType?.category ?? null;
8
+ return (_jsxs("section", { "aria-labelledby": "product-heading", className: cn("rounded-2xl border border-border/60 bg-card p-4", className), children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsx("h2", { id: "product-heading", className: "text-xs/5 font-semibold uppercase tracking-wide text-muted-foreground", children: "Product" }), fromSnapshot && (_jsx(Badge, { variant: "ghost", className: "text-xs", children: "Snapshot \u2014 live variant may differ" }))] }), _jsxs("div", { className: "mt-3 flex gap-4", children: [_jsx("div", { className: "size-20 shrink-0 overflow-hidden rounded-xl bg-muted", children: variant.imageUrl ? (_jsx("img", { src: variant.imageUrl, alt: "", className: "size-full object-cover", loading: "lazy" })) : (_jsx("div", { className: "flex size-full items-center justify-center text-xs text-muted-foreground", children: "No image" })) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-base/7 font-semibold", children: beverage.name }), beverage.producer && (_jsxs("div", { className: "truncate text-xs text-muted-foreground", children: [beverage.producer, beverage.countryOfOrigin ? ` · ${beverage.countryOfOrigin}` : ""] })), expanded && (_jsxs("dl", { className: "mt-2 grid grid-cols-2 gap-x-3 gap-y-1 text-xs", children: [category && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "Category" }), _jsx("dd", { className: "font-medium capitalize", children: category })] })), variant.vintage != null && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "Vintage" }), _jsx("dd", { className: "font-medium", children: variant.vintage })] })), variant.abv != null && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "ABV" }), _jsxs("dd", { className: "font-medium", children: [variant.abv, "%"] })] })), variant.packaging && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "Packaging" }), _jsx("dd", { className: "font-medium", children: variant.packaging })] })), variant.closure && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "Closure" }), _jsx("dd", { className: "font-medium", children: variant.closure })] })), variant.residualSugar != null && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "Residual sugar" }), _jsxs("dd", { className: "font-medium", children: [variant.residualSugar, " g/L"] })] }))] })), expanded && (_jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [variant.organic && (_jsxs(Badge, { variant: "ghost", className: "text-xs", children: [_jsx(Leaf, { "aria-hidden": true, className: "size-3" }), " Organic"] })), variant.fairtrade && (_jsxs(Badge, { variant: "ghost", className: "text-xs", children: [_jsx(BadgeCheck, { "aria-hidden": true, className: "size-3" }), " Fairtrade"] })), variant.sustainable && (_jsxs(Badge, { variant: "ghost", className: "text-xs", children: [_jsx(Award, { "aria-hidden": true, className: "size-3" }), " Sustainable"] }))] }))] })] })] }));
9
+ }
10
+ //# sourceMappingURL=offer-product-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-product-card.js","sourceRoot":"","sources":["../../src/offer/offer-product-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,IAAI,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAgClE,MAAM,UAAU,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,cAAc,GAAG,UAAU,EAC3B,YAAY,GAAG,KAAK,EACpB,SAAS,GACa;IACtB,MAAM,QAAQ,GAAG,cAAc,KAAK,UAAU,CAAC;IAC/C,MAAM,QAAQ,GACZ,QAAQ,CAAC,YAAY,EAAE,OAAO,IAAI,QAAQ,CAAC,YAAY,EAAE,QAAQ,IAAI,IAAI,CAAC;IAC5E,OAAO,CACL,sCACkB,iBAAiB,EACjC,SAAS,EAAE,EAAE,CAAC,iDAAiD,EAAE,SAAS,CAAC,aAE3E,eAAK,SAAS,EAAC,wCAAwC,aACrD,aAAI,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAC,uEAAuE,wBAErG,EACJ,YAAY,IAAI,CACf,KAAC,KAAK,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,SAAS,wDAElC,CACT,IACG,EACN,eAAK,SAAS,EAAC,iBAAiB,aAC9B,cAAK,SAAS,EAAC,sDAAsD,YAClE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAClB,cACE,GAAG,EAAE,OAAO,CAAC,QAAQ,EACrB,GAAG,EAAC,EAAE,EACN,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAC,MAAM,GACd,CACH,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,0EAA0E,yBAEnF,CACP,GACG,EACN,eAAK,SAAS,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E,CACN,EACA,QAAQ,IAAI,CACX,eAAK,SAAS,EAAC,2BAA2B,aACvC,OAAO,CAAC,OAAO,IAAI,CAClB,MAAC,KAAK,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,SAAS,aACxC,KAAC,IAAI,yBAAa,SAAS,EAAC,QAAQ,GAAG,gBACjC,CACT,EACA,OAAO,CAAC,SAAS,IAAI,CACpB,MAAC,KAAK,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,SAAS,aACxC,KAAC,UAAU,yBAAa,SAAS,EAAC,QAAQ,GAAG,kBACvC,CACT,EACA,OAAO,CAAC,WAAW,IAAI,CACtB,MAAC,KAAK,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,SAAS,aACxC,KAAC,KAAK,yBAAa,SAAS,EAAC,QAAQ,GAAG,oBAClC,CACT,IACG,CACP,IACG,IACF,IACE,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { OfferProductCard } from "./offer-product-card";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof OfferProductCard;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ export declare const NonVintage: Story;
15
+ export declare const FromSnapshot: Story;
16
+ //# sourceMappingURL=offer-product-card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-product-card.stories.d.ts","sourceRoot":"","sources":["../../src/offer/offer-product-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,QAAA,MAAM,IAAI;;;;;;;CAK+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAsBnC,eAAO,MAAM,OAAO,EAAE,KAAmE,CAAC;AAE1F,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { OfferProductCard } from "./offer-product-card";
2
+ const meta = {
3
+ title: "Offer/OfferProductCard",
4
+ component: OfferProductCard,
5
+ tags: ["autodocs"],
6
+ parameters: { layout: "padded" },
7
+ };
8
+ export default meta;
9
+ const variant = {
10
+ id: "var-1",
11
+ vintage: 2020,
12
+ packaging: "750ml glass bottle",
13
+ closure: "cork",
14
+ abv: 13.5,
15
+ residualSugar: 2.3,
16
+ organic: true,
17
+ fairtrade: false,
18
+ sustainable: true,
19
+ imageUrl: null,
20
+ };
21
+ const beverage = {
22
+ id: "bev-1",
23
+ name: "Chianti Riserva",
24
+ producer: "Chianti Wines SRL",
25
+ countryOfOrigin: "Italy",
26
+ beverageType: { category: "wine", subtype: "red" },
27
+ };
28
+ export const Default = { args: { variant, beverage, variantDisplay: "expanded" } };
29
+ export const NonVintage = {
30
+ args: { variant: { ...variant, vintage: null }, beverage, variantDisplay: "expanded" },
31
+ };
32
+ export const FromSnapshot = {
33
+ args: {
34
+ variant,
35
+ beverage,
36
+ variantDisplay: "expanded",
37
+ fromSnapshot: true,
38
+ },
39
+ };
40
+ //# sourceMappingURL=offer-product-card.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offer-product-card.stories.js","sourceRoot":"","sources":["../../src/offer/offer-product-card.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,wBAAwB;IAC/B,SAAS,EAAE,gBAAgB;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACO,CAAC;AAE1C,eAAe,IAAI,CAAC;AAGpB,MAAM,OAAO,GAAG;IACd,EAAE,EAAE,OAAO;IACX,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,oBAAoB;IAC/B,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,IAAI;IACT,aAAa,EAAE,GAAG;IAClB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,IAAqB;CAChC,CAAC;AACF,MAAM,QAAQ,GAAG;IACf,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,mBAAmB;IAC7B,eAAe,EAAE,OAAO;IACxB,YAAY,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE;CACnD,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,CAAC;AAE1F,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE;CACvF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,OAAO;QACP,QAAQ;QACR,cAAc,EAAE,UAAU;QAC1B,YAAY,EAAE,IAAI;KACnB;CACF,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface OpportunityCardData {
2
+ id: string;
3
+ title: string;
4
+ closingDays: number;
5
+ priceCeilingEuro?: number;
6
+ volumeOptions?: number[];
7
+ requirements?: string[];
8
+ deletedAt?: string | null;
9
+ }
10
+ export interface OpportunityCardProps {
11
+ opportunity: OpportunityCardData;
12
+ variant?: "collapsed" | "expanded";
13
+ className?: string;
14
+ }
15
+ export declare function OpportunityCard({ opportunity, variant, className, }: OpportunityCardProps): import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=opportunity-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-card.d.ts","sourceRoot":"","sources":["../../src/offer/opportunity-card.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,mBAAmB,CAAC;IACjC,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,OAAqB,EACrB,SAAS,GACV,EAAE,oBAAoB,2CA4DtB"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Calendar, AlertCircle } from "lucide-react";
3
+ import { cn } from "../lib/utils";
4
+ export function OpportunityCard({ opportunity, variant = "collapsed", className, }) {
5
+ const expanded = variant === "expanded";
6
+ const deleted = !!opportunity.deletedAt;
7
+ return (_jsxs("section", { "aria-labelledby": "opportunity-heading", className: cn("rounded-2xl border border-border/60 bg-card p-4", className), children: [_jsx("h2", { id: "opportunity-heading", className: "text-xs/5 font-semibold uppercase tracking-wide text-muted-foreground", children: "Opportunity" }), _jsxs("div", { className: "mt-3 flex items-baseline gap-2", children: [_jsx("h3", { className: "text-base/7 font-semibold", children: opportunity.title }), !deleted && (_jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [_jsx(Calendar, { "aria-hidden": true, className: "size-3" }), " closes in ", opportunity.closingDays, " day", opportunity.closingDays === 1 ? "" : "s"] }))] }), deleted && (_jsxs("div", { role: "alert", className: "mt-2 flex items-start gap-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-xs text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100", children: [_jsx(AlertCircle, { "aria-hidden": true, className: "size-4 shrink-0" }), "The tender that created this offer has been closed. You can still accept, decline, or withdraw."] })), expanded && opportunity.requirements && (_jsx("ul", { className: "mt-3 list-disc space-y-1 pl-5 text-sm/6", children: opportunity.requirements.map((r) => (_jsx("li", { children: r }, r))) })), expanded && (opportunity.priceCeilingEuro || opportunity.volumeOptions) && (_jsxs("dl", { className: "mt-3 grid grid-cols-2 gap-3 text-xs", children: [opportunity.priceCeilingEuro != null && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "Price ceiling" }), _jsxs("dd", { className: "font-medium", children: ["\u20AC", opportunity.priceCeilingEuro.toFixed(2), "/L"] })] })), opportunity.volumeOptions && (_jsxs("div", { children: [_jsx("dt", { className: "text-muted-foreground", children: "Volume options" }), _jsxs("dd", { className: "font-medium", children: [opportunity.volumeOptions.map((v) => v.toLocaleString()).join(", "), " L"] })] }))] }))] }));
8
+ }
9
+ //# sourceMappingURL=opportunity-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-card.js","sourceRoot":"","sources":["../../src/offer/opportunity-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAkBlC,MAAM,UAAU,eAAe,CAAC,EAC9B,WAAW,EACX,OAAO,GAAG,WAAW,EACrB,SAAS,GACY;IACrB,MAAM,QAAQ,GAAG,OAAO,KAAK,UAAU,CAAC;IACxC,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC;IACxC,OAAO,CACL,sCACkB,q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AW,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UACjE,IACD,CACP,IACE,CACN,IACO,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { OpportunityCard } from "./opportunity-card";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof OpportunityCard;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Collapsed: Story;
14
+ export declare const Expanded: Story;
15
+ export declare const OpportunityDeleted: Story;
16
+ //# sourceMappingURL=opportunity-card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-card.stories.d.ts","sourceRoot":"","sources":["../../src/offer/opportunity-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,QAAA,MAAM,IAAI;;;;;;;CAK8B,CAAC;AAEzC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAenC,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAKhC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { OpportunityCard } from "./opportunity-card";
2
+ const meta = {
3
+ title: "Offer/OpportunityCard",
4
+ component: OpportunityCard,
5
+ tags: ["autodocs"],
6
+ parameters: { layout: "padded" },
7
+ };
8
+ export default meta;
9
+ const opportunity = {
10
+ id: "opp-1",
11
+ title: "Bulk Chianti DOCG — Q3 2026",
12
+ closingDays: 12,
13
+ priceCeilingEuro: 4.2,
14
+ volumeOptions: [10000, 20000, 30000],
15
+ requirements: [
16
+ "ABV between 12.5% and 14.0%",
17
+ "Packaging: 750ml glass bottles",
18
+ "Certifications: Organic required",
19
+ ],
20
+ };
21
+ export const Collapsed = {
22
+ args: { opportunity, variant: "collapsed" },
23
+ };
24
+ export const Expanded = {
25
+ args: { opportunity, variant: "expanded" },
26
+ };
27
+ export const OpportunityDeleted = {
28
+ args: {
29
+ opportunity: { ...opportunity, deletedAt: "2026-04-18T00:00:00Z" },
30
+ variant: "expanded",
31
+ },
32
+ };
33
+ //# sourceMappingURL=opportunity-card.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-card.stories.js","sourceRoot":"","sources":["../../src/offer/opportunity-card.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACM,CAAC;AAEzC,eAAe,IAAI,CAAC;AAGpB,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,EAAE;IACf,gBAAgB,EAAE,GAAG;IACrB,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACpC,YAAY,EAAE;QACZ,6BAA6B;QAC7B,gCAAgC;QAChC,kCAAkC;KACnC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE;CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAU;IACvC,IAAI,EAAE;QACJ,WAAW,EAAE,EAAE,GAAG,WAAW,EAAE,SAAS,EAAE,sBAAsB,EAAE;QAClE,OAAO,EAAE,UAAU;KACpB;CACF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { OfferPartyInfo } from "./types";
2
+ export interface PartiesCardProps {
3
+ producer: OfferPartyInfo;
4
+ importer: OfferPartyInfo;
5
+ /** Viewer's org id — used so "your org" renders on the left. */
6
+ viewerOrgId: string;
7
+ variant?: "collapsed" | "expanded";
8
+ className?: string;
9
+ }
10
+ export declare function PartiesCard({ producer, importer, viewerOrgId, variant, className, }: PartiesCardProps): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=parties-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parties-card.d.ts","sourceRoot":"","sources":["../../src/offer/parties-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmDD,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,OAAqB,EACrB,SAAS,GACV,EAAE,gBAAgB,2CAoBlB"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowLeftRight } from "lucide-react";
3
+ import { cn } from "../lib/utils";
4
+ function PartyBlock({ party, expanded, align, }) {
5
+ return (_jsxs("div", { className: cn("flex flex-1 min-w-0 items-start gap-3", align === "right" && "flex-row-reverse text-right"), children: [_jsx("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold", "aria-hidden": true, children: party.logoUrl ? (_jsx("img", { src: party.logoUrl, alt: "", className: "size-full rounded-full object-cover" })) : (party.name.slice(0, 2).toUpperCase()) }), _jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate text-sm/6 font-semibold", children: party.name }), party.location && (_jsx("div", { className: "truncate text-xs text-muted-foreground", children: party.location })), expanded && party.primaryContactName && (_jsxs("div", { className: "mt-1 text-xs text-muted-foreground", children: [party.primaryContactName, party.primaryContactEmail && (_jsxs(_Fragment, { children: [" · ", _jsx("a", { className: "underline", href: `mailto:${party.primaryContactEmail}`, children: party.primaryContactEmail })] }))] }))] })] }));
6
+ }
7
+ export function PartiesCard({ producer, importer, viewerOrgId, variant = "collapsed", className, }) {
8
+ const expanded = variant === "expanded";
9
+ const viewerIsProducer = viewerOrgId === producer.orgId;
10
+ const left = viewerIsProducer ? producer : importer;
11
+ const right = viewerIsProducer ? importer : producer;
12
+ return (_jsxs("section", { "aria-labelledby": "parties-heading", className: cn("rounded-2xl border border-border/60 bg-card p-4", className), children: [_jsx("h2", { id: "parties-heading", className: "text-xs/5 font-semibold uppercase tracking-wide text-muted-foreground", children: "Parties" }), _jsxs("div", { className: "mt-3 flex items-center gap-3", children: [_jsx(PartyBlock, { party: left, expanded: expanded, align: "left" }), _jsx(ArrowLeftRight, { "aria-hidden": true, className: "size-5 shrink-0 text-muted-foreground" }), _jsx(PartyBlock, { party: right, expanded: expanded, align: "right" })] })] }));
13
+ }
14
+ //# sourceMappingURL=parties-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parties-card.js","sourceRoot":"","sources":["../../src/offer/parties-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAYlC,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,QAAQ,EACR,K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KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,OAAO,CACL,sCACkB,iBAAiB,EACjC,SAAS,EAAE,EAAE,CAAC,iDAAiD,EAAE,SAAS,CAAC,aAE3E,aAAI,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAC,uEAAuE,wBAErG,EACL,eAAK,SAAS,EAAC,8BAA8B,aAC3C,KAAC,UAAU,IAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,GAAG,EAC5D,KAAC,cAAc,yBAAa,SAAS,EAAC,uCAAuC,GAAG,EAChF,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAC,OAAO,GAAG,IAC1D,IACE,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { PartiesCard } from "./parties-card";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof PartiesCard;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const CollapsedProducer: Story;
14
+ export declare const ExpandedProducer: Story;
15
+ export declare const CollapsedImporter: Story;
16
+ export declare const ExpandedImporter: Story;
17
+ //# sourceMappingURL=parties-card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parties-card.stories.d.ts","sourceRoot":"","sources":["../../src/offer/parties-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,QAAA,MAAM,IAAI;;;;;;;CAK0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmBnC,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAE9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAE9B,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { PartiesCard } from "./parties-card";
2
+ const meta = {
3
+ title: "Offer/PartiesCard",
4
+ component: PartiesCard,
5
+ tags: ["autodocs"],
6
+ parameters: { layout: "padded" },
7
+ };
8
+ export default meta;
9
+ const producer = {
10
+ orgId: "org-prod",
11
+ name: "Chianti Wines SRL",
12
+ logoUrl: null,
13
+ location: "Tuscany, IT",
14
+ primaryContactName: "Marco Rossi",
15
+ primaryContactEmail: "marco@chiantiwines.example",
16
+ };
17
+ const importer = {
18
+ orgId: "org-imp",
19
+ name: "Maxwell Importers Ltd",
20
+ logoUrl: null,
21
+ location: "London, UK",
22
+ primaryContactName: "Priya Patel",
23
+ primaryContactEmail: "priya@maxwell.example",
24
+ };
25
+ export const CollapsedProducer = {
26
+ args: { producer, importer, viewerOrgId: "org-prod", variant: "collapsed" },
27
+ };
28
+ export const ExpandedProducer = {
29
+ args: { producer, importer, viewerOrgId: "org-prod", variant: "expanded" },
30
+ };
31
+ export const CollapsedImporter = {
32
+ args: { producer, importer, viewerOrgId: "org-imp", variant: "collapsed" },
33
+ };
34
+ export const ExpandedImporter = {
35
+ args: { producer, importer, viewerOrgId: "org-imp", variant: "expanded" },
36
+ };
37
+ //# sourceMappingURL=parties-card.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parties-card.stories.js","sourceRoot":"","sources":["../../src/offer/parties-card.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACE,CAAC;AAErC,eAAe,IAAI,CAAC;AAGpB,MAAM,QAAQ,GAAG;IACf,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,aAAa;IACvB,kBAAkB,EAAE,aAAa;IACjC,mBAAmB,EAAE,4BAA4B;CAClD,CAAC;AACF,MAAM,QAAQ,GAAG;IACf,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,YAAY;IACtB,kBAAkB,EAAE,aAAa;IACjC,mBAAmB,EAAE,uBAAuB;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAU;IACtC,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE;CAC5E,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAU;IACtC,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE;CAC3E,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE;CAC1E,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { OfferTerms, Perspective } from "./types";
2
+ export interface TermsCardProps {
3
+ terms: OfferTerms;
4
+ previousTerms?: OfferTerms;
5
+ variant?: "collapsed" | "expanded";
6
+ /**
7
+ * Viewer perspective — used to derive per-row delta polarity. Spec §11
8
+ * "Delta polarity (price up =)" is perspective-dependent: a price
9
+ * increase is emerald for a producer and rose for an importer, etc. This
10
+ * replaces the flat `viewerAdvantage` prop from the original plan
11
+ * (blocker B3) — polarity is now per-row, not per-card.
12
+ */
13
+ perspective?: Perspective;
14
+ className?: string;
15
+ }
16
+ export declare function TermsCard({ terms, previousTerms, variant, perspective, className, }: TermsCardProps): import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=terms-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terms-card.d.ts","sourceRoot":"","sources":["../../src/offer/terms-card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACnC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2BD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,aAAa,EACb,OAAqB,EACrB,WAAW,EACX,SAAS,GACV,EAAE,cAAc,2CA8DhB"}
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils";
3
+ /**
4
+ * Per-row direction-to-advantage rule. `positiveDirection` states which
5
+ * `delta > 0` direction is "better" for a producer viewer. The rule
6
+ * flips for an importer viewer. Rows with `neutral` carry no colour.
7
+ */
8
+ const ROWS = [
9
+ // Higher price is an advantage for the producer.
10
+ { id: "price", label: "Price", fmt: (v, t) => `${v} ${t.currency}/${t.volumeUnit ?? "L"}`, positiveDirection: "up" },
11
+ // Higher volume is generally an advantage for the producer.
12
+ { id: "volume", label: "Volume", fmt: (v, t) => `${v.toLocaleString()} ${t.volumeUnit ?? "L"}`, positiveDirection: "up" },
13
+ { id: "incoterms", label: "Incoterms", fmt: (v) => String(v ?? "—"), positiveDirection: "neutral" },
14
+ { id: "paymentTerms", label: "Payment terms", fmt: (v) => String(v ?? "—"), positiveDirection: "neutral" },
15
+ { id: "deliveryDate", label: "Delivery date", fmt: (v) => String(v ?? "—"), positiveDirection: "neutral" },
16
+ { id: "validUntil", label: "Valid until", fmt: (v) => String(v ?? "—"), positiveDirection: "neutral" },
17
+ // Higher MOQ = fewer small-lot buyers = producer's advantage.
18
+ { id: "minimumOrderQuantity", label: "Min. order", fmt: (v) => (v != null ? `${v.toLocaleString()} L` : "—"), positiveDirection: "up" },
19
+ // Higher advance % = better cashflow for the producer.
20
+ { id: "advancePayment", label: "Advance %", fmt: (v) => (v != null ? `${v}%` : "—"), positiveDirection: "up" },
21
+ ];
22
+ export function TermsCard({ terms, previousTerms, variant = "collapsed", perspective, className, }) {
23
+ return (_jsxs("section", { "aria-labelledby": "terms-heading", className: cn("rounded-2xl border border-border/60 bg-card p-4", className), children: [_jsx("h2", { id: "terms-heading", className: "text-xs/5 font-semibold uppercase tracking-wide text-muted-foreground", children: "Terms" }), variant === "collapsed" ? (_jsxs("p", { className: "mt-3 text-sm/6 text-muted-foreground", children: [terms.price, " ", terms.currency, "/", terms.volumeUnit ?? "L", " \u00B7 ", terms.volume.toLocaleString(), " ", terms.volumeUnit ?? "L", " \u00B7 ", terms.incoterms, " \u00B7 ", terms.paymentTerms] })) : (_jsx("dl", { className: "mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-sm/6", children: ROWS.map((row) => {
24
+ const cur = terms[row.id];
25
+ const prev = previousTerms?.[row.id];
26
+ const changed = previousTerms && prev !== cur;
27
+ // Compute per-row polarity (blocker B3). Only numeric rows
28
+ // with a non-neutral positiveDirection derive an advantage;
29
+ // all others stay neutral. `perspective` flips the rule for
30
+ // importer viewers.
31
+ let advantage = "neutral";
32
+ if (changed &&
33
+ row.positiveDirection !== "neutral" &&
34
+ typeof cur === "number" &&
35
+ typeof prev === "number") {
36
+ const direction = cur > prev ? "up" : "down";
37
+ const isProducerPositive = direction === row.positiveDirection;
38
+ advantage =
39
+ perspective === "importer"
40
+ ? isProducerPositive
41
+ ? "worsened"
42
+ : "improved"
43
+ : isProducerPositive
44
+ ? "improved"
45
+ : "worsened";
46
+ }
47
+ return (_jsxs("div", { children: [_jsx("dt", { className: "text-xs uppercase tracking-wide text-muted-foreground", children: row.label }), _jsxs("dd", { className: cn("font-medium", advantage === "improved" && "text-emerald-700", advantage === "worsened" && "text-rose-700"), children: [row.fmt(cur, terms), changed && prev != null && (_jsx("span", { className: "ml-2 text-xs text-muted-foreground line-through", children: row.fmt(prev, previousTerms) }))] })] }, row.id));
48
+ }) }))] }));
49
+ }
50
+ //# sourceMappingURL=terms-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terms-card.js","sourceRoot":"","sources":["../../src/offer/terms-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAkBlC;;;;GAIG;AACH,MAAM,IAAI,GAKL;IACH,iDAAiD;IACjD,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,UAAU,IAAI,GAAG,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE;IACpH,4DAA4D;IAC5D,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAI,CAAY,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,UAAU,IAAI,GAAG,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE;IACrI,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK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AU;gCACxB,CAAC,CAAC,kBAAkB;oCAClB,CAAC,CAAC,UAAU;oCACZ,CAAC,CAAC,UAAU;gCACd,CAAC,CAAC,kBAAkB;oCAClB,CAAC,CAAC,UAAU;oCACZ,CAAC,CAAC,UAAU,CAAC;oBACrB,CAAC;oBACD,OAAO,CACL,0BACE,aAAI,SAAS,EAAC,uDAAuD,YAAE,GAAG,CAAC,KAAK,GAAM,EACtF,cAAI,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,KAAK,UAAU,IAAI,kBAAkB,EAAE,SAAS,KAAK,UAAU,IAAI,eAAe,CAAC,aAC1H,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,EACnB,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,CAC1B,eAAM,SAAS,EAAC,iDAAiD,YAC9D,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,aAAc,CAAC,GACzB,CACR,IACE,KATG,GAAG,CAAC,EAAE,CAUV,CACP,CAAC;gBACJ,CAAC,CAAC,GACC,CACN,IACO,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { TermsCard } from "./terms-card";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof TermsCard;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Collapsed: Story;
14
+ export declare const Expanded: Story;
15
+ export declare const WithPreviousTermsProducer: Story;
16
+ export declare const WithPreviousTermsImporter: Story;
17
+ //# sourceMappingURL=terms-card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terms-card.stories.d.ts","sourceRoot":"","sources":["../../src/offer/terms-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,QAAA,MAAM,IAAI;;;;;;;CAKwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAenC,eAAO,MAAM,SAAS,EAAE,KAA4D,CAAC;AACrF,eAAO,MAAM,QAAQ,EAAE,KAA2D,CAAC;AACnF,eAAO,MAAM,yBAAyB,EAAE,KAOvC,CAAC;AAIF,eAAO,MAAM,yBAAyB,EAAE,KAOvC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { TermsCard } from "./terms-card";
2
+ const meta = {
3
+ title: "Offer/TermsCard",
4
+ component: TermsCard,
5
+ tags: ["autodocs"],
6
+ parameters: { layout: "padded" },
7
+ };
8
+ export default meta;
9
+ const baseTerms = {
10
+ price: 4.1,
11
+ currency: "EUR",
12
+ volume: 20000,
13
+ volumeUnit: "L",
14
+ incoterms: "FOB",
15
+ paymentTerms: "Net 30",
16
+ deliveryDate: "2026-08-15",
17
+ validUntil: "2026-05-22",
18
+ minimumOrderQuantity: 5000,
19
+ advancePayment: 10,
20
+ };
21
+ export const Collapsed = { args: { terms: baseTerms, variant: "collapsed" } };
22
+ export const Expanded = { args: { terms: baseTerms, variant: "expanded" } };
23
+ export const WithPreviousTermsProducer = {
24
+ args: {
25
+ terms: { ...baseTerms, price: 4.4 },
26
+ previousTerms: baseTerms,
27
+ variant: "expanded",
28
+ perspective: "producer",
29
+ },
30
+ };
31
+ // Blocker B3 — same data, flipped perspective. `price 4.10 → 4.40`: the
32
+ // producer sees `+€0.30` in emerald (advantage); the importer sees the
33
+ // same delta in rose (worsened). Per spec §11 "Delta polarity".
34
+ export const WithPreviousTermsImporter = {
35
+ args: {
36
+ terms: { ...baseTerms, price: 4.4 },
37
+ previousTerms: baseTerms,
38
+ variant: "expanded",
39
+ perspective: "importer",
40
+ },
41
+ };
42
+ //# sourceMappingURL=terms-card.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terms-card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B,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,UAAU;KACxB;CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { TimelineEventData, ViewerAdvantage } from "./types";
3
+ export interface TimelineEventProps {
4
+ ref?: React.Ref<HTMLLIElement>;
5
+ event: TimelineEventData;
6
+ viewerAdvantage: ViewerAdvantage;
7
+ tabIndex?: number;
8
+ onFocus?: () => void;
9
+ className?: string;
10
+ }
11
+ export declare function TimelineEvent({ ref, event, viewerAdvantage, tabIndex, onFocus, className }: TimelineEventProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=timeline-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-event.d.ts","sourceRoot":"","sources":["../../src/offer/timeline-event.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B,KAAK,EAAE,iBAAiB,CAAC;IACzB,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA4CD,wBAAgB,aAAa,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,QAAa,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAoFnH"}