@open-mercato/core 0.7.1-develop.7203.1.9396450b78 → 0.8.0

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 (416) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/build.mjs +11 -0
  3. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +23 -0
  4. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  5. package/dist/modules/customers/backend/customers/companies/[id]/page.js +2 -1
  6. package/dist/modules/customers/backend/customers/companies/[id]/page.js.map +2 -2
  7. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +2 -1
  8. package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
  9. package/dist/modules/customers/backend/customers/people/[id]/page.js +2 -2
  10. package/dist/modules/customers/backend/customers/people/[id]/page.js.map +2 -2
  11. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +2 -1
  12. package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
  13. package/dist/modules/customers/lib/detailHelpers.js +4 -0
  14. package/dist/modules/customers/lib/detailHelpers.js.map +2 -2
  15. package/dist/modules/customers/lib/todoCompatibility.js +5 -0
  16. package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
  17. package/dist/modules/design_system/backend/design-system/page.meta.js +3 -2
  18. package/dist/modules/design_system/backend/design-system/page.meta.js.map +2 -2
  19. package/dist/modules/design_system/gallery/assets/ai-prompt-image.png +0 -0
  20. package/dist/modules/design_system/gallery/assets/avatar-illustration.png +0 -0
  21. package/dist/modules/design_system/gallery/assets/avatar-memoji.png +0 -0
  22. package/dist/modules/design_system/gallery/assets/avatar-photo.png +0 -0
  23. package/dist/modules/design_system/gallery/assets/blog-photo-0.png +0 -0
  24. package/dist/modules/design_system/gallery/assets/contact-support-portrait.png +0 -0
  25. package/dist/modules/design_system/gallery/assets/crypto-ada.png +0 -0
  26. package/dist/modules/design_system/gallery/assets/crypto-avax.png +0 -0
  27. package/dist/modules/design_system/gallery/assets/crypto-bnb.png +0 -0
  28. package/dist/modules/design_system/gallery/assets/crypto-brand.png +0 -0
  29. package/dist/modules/design_system/gallery/assets/crypto-btc.png +0 -0
  30. package/dist/modules/design_system/gallery/assets/crypto-clock.svg +3 -0
  31. package/dist/modules/design_system/gallery/assets/crypto-crown.svg +3 -0
  32. package/dist/modules/design_system/gallery/assets/crypto-dot.png +0 -0
  33. package/dist/modules/design_system/gallery/assets/crypto-eth.png +0 -0
  34. package/dist/modules/design_system/gallery/assets/crypto-hbar.png +0 -0
  35. package/dist/modules/design_system/gallery/assets/crypto-history.svg +3 -0
  36. package/dist/modules/design_system/gallery/assets/crypto-link.svg +3 -0
  37. package/dist/modules/design_system/gallery/assets/crypto-menu.svg +3 -0
  38. package/dist/modules/design_system/gallery/assets/crypto-metamask.png +0 -0
  39. package/dist/modules/design_system/gallery/assets/crypto-more.svg +3 -0
  40. package/dist/modules/design_system/gallery/assets/crypto-phantom.png +0 -0
  41. package/dist/modules/design_system/gallery/assets/crypto-rewards.svg +3 -0
  42. package/dist/modules/design_system/gallery/assets/crypto-sad-face.png +0 -0
  43. package/dist/modules/design_system/gallery/assets/crypto-sol.png +0 -0
  44. package/dist/modules/design_system/gallery/assets/crypto-star.svg +3 -0
  45. package/dist/modules/design_system/gallery/assets/crypto-status-cancelled.svg +3 -0
  46. package/dist/modules/design_system/gallery/assets/crypto-status-pending.svg +3 -0
  47. package/dist/modules/design_system/gallery/assets/crypto-status-success.svg +3 -0
  48. package/dist/modules/design_system/gallery/assets/crypto-status-warning.svg +3 -0
  49. package/dist/modules/design_system/gallery/assets/crypto-trx.png +0 -0
  50. package/dist/modules/design_system/gallery/assets/crypto-usdc.png +0 -0
  51. package/dist/modules/design_system/gallery/assets/crypto-usdt.png +0 -0
  52. package/dist/modules/design_system/gallery/assets/crypto-walletconnect.png +0 -0
  53. package/dist/modules/design_system/gallery/assets/crypto-wei.png +0 -0
  54. package/dist/modules/design_system/gallery/assets/crypto-xrp.png +0 -0
  55. package/dist/modules/design_system/gallery/assets/cryptocurrency-artwork.js +67 -0
  56. package/dist/modules/design_system/gallery/assets/cryptocurrency-artwork.js.map +7 -0
  57. package/dist/modules/design_system/gallery/assets/github-logo.png +0 -0
  58. package/dist/modules/design_system/gallery/assets/images.d.js +1 -0
  59. package/dist/modules/design_system/gallery/assets/images.d.js.map +7 -0
  60. package/dist/modules/design_system/gallery/assets/input-european-union.svg +18 -0
  61. package/dist/modules/design_system/gallery/assets/landing-teams-01.png +0 -0
  62. package/dist/modules/design_system/gallery/assets/marketing-artwork.js +83 -0
  63. package/dist/modules/design_system/gallery/assets/marketing-artwork.js.map +7 -0
  64. package/dist/modules/design_system/gallery/assets/menu-apex.svg +18 -0
  65. package/dist/modules/design_system/gallery/assets/menu-mastercard.svg +7 -0
  66. package/dist/modules/design_system/gallery/assets/menu-spotify.svg +4 -0
  67. package/dist/modules/design_system/gallery/assets/menu-united-states.svg +16 -0
  68. package/dist/modules/design_system/gallery/assets/select-google.png +0 -0
  69. package/dist/modules/design_system/gallery/assets/select-poland.png +0 -0
  70. package/dist/modules/design_system/gallery/assets/selection-artwork.js +5 -0
  71. package/dist/modules/design_system/gallery/assets/selection-artwork.js.map +7 -0
  72. package/dist/modules/design_system/gallery/assets/social-apple-filled.svg +4 -0
  73. package/dist/modules/design_system/gallery/assets/social-apple-stroke.svg +4 -0
  74. package/dist/modules/design_system/gallery/assets/social-dropbox-filled.svg +5 -0
  75. package/dist/modules/design_system/gallery/assets/social-dropbox-stroke.svg +5 -0
  76. package/dist/modules/design_system/gallery/assets/social-facebook-filled.svg +4 -0
  77. package/dist/modules/design_system/gallery/assets/social-facebook-stroke.svg +10 -0
  78. package/dist/modules/design_system/gallery/assets/social-github-filled.svg +4 -0
  79. package/dist/modules/design_system/gallery/assets/social-github-stroke.svg +4 -0
  80. package/dist/modules/design_system/gallery/assets/social-google-filled.svg +7 -0
  81. package/dist/modules/design_system/gallery/assets/social-google-stroke.svg +7 -0
  82. package/dist/modules/design_system/gallery/assets/social-linkedin-filled.svg +4 -0
  83. package/dist/modules/design_system/gallery/assets/social-linkedin-stroke.svg +4 -0
  84. package/dist/modules/design_system/gallery/assets/social-x-filled.svg +4 -0
  85. package/dist/modules/design_system/gallery/assets/social-x-stroke.svg +4 -0
  86. package/dist/modules/design_system/gallery/assets/style-studio-product.png +0 -0
  87. package/dist/modules/design_system/gallery/assets/upload-images.js +8 -0
  88. package/dist/modules/design_system/gallery/assets/upload-images.js.map +7 -0
  89. package/dist/modules/design_system/gallery/components/BrandStylePreview.js +74 -0
  90. package/dist/modules/design_system/gallery/components/BrandStylePreview.js.map +7 -0
  91. package/dist/modules/design_system/gallery/components/CodeSnippet.js +31 -31
  92. package/dist/modules/design_system/gallery/components/CodeSnippet.js.map +2 -2
  93. package/dist/modules/design_system/gallery/components/ColorPlayground.js +408 -0
  94. package/dist/modules/design_system/gallery/components/ColorPlayground.js.map +7 -0
  95. package/dist/modules/design_system/gallery/components/ColorStudioCompositions.js +166 -0
  96. package/dist/modules/design_system/gallery/components/ColorStudioCompositions.js.map +7 -0
  97. package/dist/modules/design_system/gallery/components/ColorStudioSpecimen.js +182 -0
  98. package/dist/modules/design_system/gallery/components/ColorStudioSpecimen.js.map +7 -0
  99. package/dist/modules/design_system/gallery/components/CompactEntrySpecimen.js +80 -0
  100. package/dist/modules/design_system/gallery/components/CompactEntrySpecimen.js.map +7 -0
  101. package/dist/modules/design_system/gallery/components/ComponentIndex.js +42 -0
  102. package/dist/modules/design_system/gallery/components/ComponentIndex.js.map +7 -0
  103. package/dist/modules/design_system/gallery/components/DesignSystemHome.js +69 -0
  104. package/dist/modules/design_system/gallery/components/DesignSystemHome.js.map +7 -0
  105. package/dist/modules/design_system/gallery/components/EntryCard.js +47 -41
  106. package/dist/modules/design_system/gallery/components/EntryCard.js.map +2 -2
  107. package/dist/modules/design_system/gallery/components/EntryHeader.js +68 -0
  108. package/dist/modules/design_system/gallery/components/EntryHeader.js.map +7 -0
  109. package/dist/modules/design_system/gallery/components/FamilyEntryPreview.js +19 -0
  110. package/dist/modules/design_system/gallery/components/FamilyEntryPreview.js.map +7 -0
  111. package/dist/modules/design_system/gallery/components/FoundationGuide.js +46 -0
  112. package/dist/modules/design_system/gallery/components/FoundationGuide.js.map +7 -0
  113. package/dist/modules/design_system/gallery/components/GalleryLink.js +21 -0
  114. package/dist/modules/design_system/gallery/components/GalleryLink.js.map +7 -0
  115. package/dist/modules/design_system/gallery/components/GalleryNavigation.js +82 -0
  116. package/dist/modules/design_system/gallery/components/GalleryNavigation.js.map +7 -0
  117. package/dist/modules/design_system/gallery/components/GalleryShell.js +147 -67
  118. package/dist/modules/design_system/gallery/components/GalleryShell.js.map +3 -3
  119. package/dist/modules/design_system/gallery/components/IconsBrowser.js +33 -0
  120. package/dist/modules/design_system/gallery/components/IconsBrowser.js.map +7 -0
  121. package/dist/modules/design_system/gallery/components/SourceLibrary.js +93 -0
  122. package/dist/modules/design_system/gallery/components/SourceLibrary.js.map +7 -0
  123. package/dist/modules/design_system/gallery/components/StyleAgents.js +139 -0
  124. package/dist/modules/design_system/gallery/components/StyleAgents.js.map +7 -0
  125. package/dist/modules/design_system/gallery/components/ThemeTokenReference.js +101 -0
  126. package/dist/modules/design_system/gallery/components/ThemeTokenReference.js.map +7 -0
  127. package/dist/modules/design_system/gallery/components/VariantPreview.js +2 -2
  128. package/dist/modules/design_system/gallery/components/VariantPreview.js.map +2 -2
  129. package/dist/modules/design_system/gallery/components/colorPreview.js +58 -0
  130. package/dist/modules/design_system/gallery/components/colorPreview.js.map +7 -0
  131. package/dist/modules/design_system/gallery/components/colorStudio.js +218 -0
  132. package/dist/modules/design_system/gallery/components/colorStudio.js.map +7 -0
  133. package/dist/modules/design_system/gallery/components/styleAgentBranding.js +46 -0
  134. package/dist/modules/design_system/gallery/components/styleAgentBranding.js.map +7 -0
  135. package/dist/modules/design_system/gallery/components/themeTokens.js +32 -0
  136. package/dist/modules/design_system/gallery/components/themeTokens.js.map +7 -0
  137. package/dist/modules/design_system/gallery/demos/ai-product-code.generated.js +194 -0
  138. package/dist/modules/design_system/gallery/demos/ai-product-code.generated.js.map +7 -0
  139. package/dist/modules/design_system/gallery/demos/ai-product.js +423 -0
  140. package/dist/modules/design_system/gallery/demos/ai-product.js.map +7 -0
  141. package/dist/modules/design_system/gallery/demos/buttons.js +289 -0
  142. package/dist/modules/design_system/gallery/demos/buttons.js.map +7 -0
  143. package/dist/modules/design_system/gallery/demos/cryptocurrency.js +1708 -0
  144. package/dist/modules/design_system/gallery/demos/cryptocurrency.js.map +7 -0
  145. package/dist/modules/design_system/gallery/demos/feeds-code.generated.js +92 -0
  146. package/dist/modules/design_system/gallery/demos/feeds-code.generated.js.map +7 -0
  147. package/dist/modules/design_system/gallery/demos/feeds.js +148 -0
  148. package/dist/modules/design_system/gallery/demos/feeds.js.map +7 -0
  149. package/dist/modules/design_system/gallery/demos/file-upload.js +72 -0
  150. package/dist/modules/design_system/gallery/demos/file-upload.js.map +7 -0
  151. package/dist/modules/design_system/gallery/demos/foundation-reference-data.js +4875 -0
  152. package/dist/modules/design_system/gallery/demos/foundation-reference-data.js.map +7 -0
  153. package/dist/modules/design_system/gallery/demos/foundation-references.js +188 -0
  154. package/dist/modules/design_system/gallery/demos/foundation-references.js.map +7 -0
  155. package/dist/modules/design_system/gallery/demos/key-components-code.generated.js +6 -0
  156. package/dist/modules/design_system/gallery/demos/key-components-code.generated.js.map +7 -0
  157. package/dist/modules/design_system/gallery/demos/key-components.js +127 -0
  158. package/dist/modules/design_system/gallery/demos/key-components.js.map +7 -0
  159. package/dist/modules/design_system/gallery/demos/marketing-controls-code.generated.js +98 -0
  160. package/dist/modules/design_system/gallery/demos/marketing-controls-code.generated.js.map +7 -0
  161. package/dist/modules/design_system/gallery/demos/marketing-controls.js +134 -0
  162. package/dist/modules/design_system/gallery/demos/marketing-controls.js.map +7 -0
  163. package/dist/modules/design_system/gallery/demos/marketing-widgets-code.generated.js +195 -0
  164. package/dist/modules/design_system/gallery/demos/marketing-widgets-code.generated.js.map +7 -0
  165. package/dist/modules/design_system/gallery/demos/marketing-widgets.js +586 -0
  166. package/dist/modules/design_system/gallery/demos/marketing-widgets.js.map +7 -0
  167. package/dist/modules/design_system/gallery/demos/menu-fixtures.js +40 -0
  168. package/dist/modules/design_system/gallery/demos/menu-fixtures.js.map +7 -0
  169. package/dist/modules/design_system/gallery/demos/menu-sources.js +295 -0
  170. package/dist/modules/design_system/gallery/demos/menu-sources.js.map +7 -0
  171. package/dist/modules/design_system/gallery/demos/menus.js +150 -0
  172. package/dist/modules/design_system/gallery/demos/menus.js.map +7 -0
  173. package/dist/modules/design_system/gallery/demos/rating-reviews.js +53 -0
  174. package/dist/modules/design_system/gallery/demos/rating-reviews.js.map +7 -0
  175. package/dist/modules/design_system/gallery/demos/registered-icons.js +104 -0
  176. package/dist/modules/design_system/gallery/demos/registered-icons.js.map +7 -0
  177. package/dist/modules/design_system/gallery/demos/selection-cards.js +99 -0
  178. package/dist/modules/design_system/gallery/demos/selection-cards.js.map +7 -0
  179. package/dist/modules/design_system/gallery/demos/shell-code.generated.js +189 -0
  180. package/dist/modules/design_system/gallery/demos/shell-code.generated.js.map +7 -0
  181. package/dist/modules/design_system/gallery/demos/shell.js +330 -0
  182. package/dist/modules/design_system/gallery/demos/shell.js.map +7 -0
  183. package/dist/modules/design_system/gallery/demos/source-artwork.js +120 -0
  184. package/dist/modules/design_system/gallery/demos/source-artwork.js.map +7 -0
  185. package/dist/modules/design_system/gallery/demos/source-filters-code.generated.js +125 -0
  186. package/dist/modules/design_system/gallery/demos/source-filters-code.generated.js.map +7 -0
  187. package/dist/modules/design_system/gallery/demos/source-filters.js +185 -0
  188. package/dist/modules/design_system/gallery/demos/source-filters.js.map +7 -0
  189. package/dist/modules/design_system/gallery/demos/source-icons.js +69 -0
  190. package/dist/modules/design_system/gallery/demos/source-icons.js.map +7 -0
  191. package/dist/modules/design_system/gallery/demos/table-cells-code.generated.js +150 -0
  192. package/dist/modules/design_system/gallery/demos/table-cells-code.generated.js.map +7 -0
  193. package/dist/modules/design_system/gallery/demos/table-cells.js +181 -0
  194. package/dist/modules/design_system/gallery/demos/table-cells.js.map +7 -0
  195. package/dist/modules/design_system/gallery/demos/text-inputs.js +113 -0
  196. package/dist/modules/design_system/gallery/demos/text-inputs.js.map +7 -0
  197. package/dist/modules/design_system/gallery/demos/time-picker-code.generated.js +41 -0
  198. package/dist/modules/design_system/gallery/demos/time-picker-code.generated.js.map +7 -0
  199. package/dist/modules/design_system/gallery/demos/time-picker.js +41 -0
  200. package/dist/modules/design_system/gallery/demos/time-picker.js.map +7 -0
  201. package/dist/modules/design_system/gallery/entries/banners.js +123 -60
  202. package/dist/modules/design_system/gallery/entries/banners.js.map +2 -2
  203. package/dist/modules/design_system/gallery/entries/buttons-snippets.js +433 -0
  204. package/dist/modules/design_system/gallery/entries/buttons-snippets.js.map +7 -0
  205. package/dist/modules/design_system/gallery/entries/buttons.js +127 -148
  206. package/dist/modules/design_system/gallery/entries/buttons.js.map +2 -2
  207. package/dist/modules/design_system/gallery/entries/charts.js +532 -186
  208. package/dist/modules/design_system/gallery/entries/charts.js.map +2 -2
  209. package/dist/modules/design_system/gallery/entries/dates.js +191 -3
  210. package/dist/modules/design_system/gallery/entries/dates.js.map +2 -2
  211. package/dist/modules/design_system/gallery/entries/detail.js +118 -77
  212. package/dist/modules/design_system/gallery/entries/detail.js.map +2 -2
  213. package/dist/modules/design_system/gallery/entries/display.js +1449 -240
  214. package/dist/modules/design_system/gallery/entries/display.js.map +2 -2
  215. package/dist/modules/design_system/gallery/entries/feedback.js +1058 -132
  216. package/dist/modules/design_system/gallery/entries/feedback.js.map +2 -2
  217. package/dist/modules/design_system/gallery/entries/filters.js +231 -103
  218. package/dist/modules/design_system/gallery/entries/filters.js.map +2 -2
  219. package/dist/modules/design_system/gallery/entries/foundations.js +368 -57
  220. package/dist/modules/design_system/gallery/entries/foundations.js.map +2 -2
  221. package/dist/modules/design_system/gallery/entries/icons.js +29 -91
  222. package/dist/modules/design_system/gallery/entries/icons.js.map +2 -2
  223. package/dist/modules/design_system/gallery/entries/inputs-snippets.js +154 -0
  224. package/dist/modules/design_system/gallery/entries/inputs-snippets.js.map +7 -0
  225. package/dist/modules/design_system/gallery/entries/inputs.js +2043 -306
  226. package/dist/modules/design_system/gallery/entries/inputs.js.map +2 -2
  227. package/dist/modules/design_system/gallery/entries/library.js +20 -0
  228. package/dist/modules/design_system/gallery/entries/library.js.map +7 -0
  229. package/dist/modules/design_system/gallery/entries/messages.js +121 -103
  230. package/dist/modules/design_system/gallery/entries/messages.js.map +2 -2
  231. package/dist/modules/design_system/gallery/entries/navigation.js +676 -103
  232. package/dist/modules/design_system/gallery/entries/navigation.js.map +2 -2
  233. package/dist/modules/design_system/gallery/entries/notifications.js +131 -78
  234. package/dist/modules/design_system/gallery/entries/notifications.js.map +2 -2
  235. package/dist/modules/design_system/gallery/entries/overlays.js +611 -203
  236. package/dist/modules/design_system/gallery/entries/overlays.js.map +2 -2
  237. package/dist/modules/design_system/gallery/entries/scaffolding.js +1175 -120
  238. package/dist/modules/design_system/gallery/entries/scaffolding.js.map +2 -2
  239. package/dist/modules/design_system/gallery/entries/schedule.js +79 -54
  240. package/dist/modules/design_system/gallery/entries/schedule.js.map +2 -2
  241. package/dist/modules/design_system/gallery/presentation.js +108 -0
  242. package/dist/modules/design_system/gallery/presentation.js.map +7 -0
  243. package/dist/modules/design_system/gallery/registry.js +8 -5
  244. package/dist/modules/design_system/gallery/registry.js.map +2 -2
  245. package/dist/modules/design_system/gallery/source-library.generated.js +5 -0
  246. package/dist/modules/design_system/gallery/source-library.generated.js.map +7 -0
  247. package/dist/modules/design_system/i18n/de.json +7167 -0
  248. package/dist/modules/design_system/i18n/en.json +7167 -0
  249. package/dist/modules/design_system/i18n/es.json +7167 -0
  250. package/dist/modules/design_system/i18n/ko.json +7167 -0
  251. package/dist/modules/design_system/i18n/pl.json +7167 -0
  252. package/dist/modules/push_notifications/lib/queue.js +1 -31
  253. package/dist/modules/push_notifications/lib/queue.js.map +2 -2
  254. package/jest.config.cjs +1 -0
  255. package/jest.mocks/image.js +1 -0
  256. package/package.json +8 -9
  257. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +50 -0
  258. package/src/modules/customers/backend/customers/companies/[id]/page.tsx +2 -1
  259. package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +2 -1
  260. package/src/modules/customers/backend/customers/people/[id]/page.tsx +2 -2
  261. package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +2 -1
  262. package/src/modules/customers/lib/detailHelpers.ts +4 -0
  263. package/src/modules/customers/lib/todoCompatibility.ts +10 -0
  264. package/src/modules/design_system/backend/design-system/page.meta.ts +3 -2
  265. package/src/modules/design_system/gallery/assets/README.md +30 -0
  266. package/src/modules/design_system/gallery/assets/ai-prompt-image.png +0 -0
  267. package/src/modules/design_system/gallery/assets/avatar-illustration.png +0 -0
  268. package/src/modules/design_system/gallery/assets/avatar-memoji.png +0 -0
  269. package/src/modules/design_system/gallery/assets/avatar-photo.png +0 -0
  270. package/src/modules/design_system/gallery/assets/blog-photo-0.png +0 -0
  271. package/src/modules/design_system/gallery/assets/contact-support-portrait.png +0 -0
  272. package/src/modules/design_system/gallery/assets/crypto-ada.png +0 -0
  273. package/src/modules/design_system/gallery/assets/crypto-avax.png +0 -0
  274. package/src/modules/design_system/gallery/assets/crypto-bnb.png +0 -0
  275. package/src/modules/design_system/gallery/assets/crypto-brand.png +0 -0
  276. package/src/modules/design_system/gallery/assets/crypto-btc.png +0 -0
  277. package/src/modules/design_system/gallery/assets/crypto-clock.svg +3 -0
  278. package/src/modules/design_system/gallery/assets/crypto-crown.svg +3 -0
  279. package/src/modules/design_system/gallery/assets/crypto-dot.png +0 -0
  280. package/src/modules/design_system/gallery/assets/crypto-eth.png +0 -0
  281. package/src/modules/design_system/gallery/assets/crypto-hbar.png +0 -0
  282. package/src/modules/design_system/gallery/assets/crypto-history.svg +3 -0
  283. package/src/modules/design_system/gallery/assets/crypto-link.svg +3 -0
  284. package/src/modules/design_system/gallery/assets/crypto-menu.svg +3 -0
  285. package/src/modules/design_system/gallery/assets/crypto-metamask.png +0 -0
  286. package/src/modules/design_system/gallery/assets/crypto-more.svg +3 -0
  287. package/src/modules/design_system/gallery/assets/crypto-phantom.png +0 -0
  288. package/src/modules/design_system/gallery/assets/crypto-rewards.svg +3 -0
  289. package/src/modules/design_system/gallery/assets/crypto-sad-face.png +0 -0
  290. package/src/modules/design_system/gallery/assets/crypto-sol.png +0 -0
  291. package/src/modules/design_system/gallery/assets/crypto-star.svg +3 -0
  292. package/src/modules/design_system/gallery/assets/crypto-status-cancelled.svg +3 -0
  293. package/src/modules/design_system/gallery/assets/crypto-status-pending.svg +3 -0
  294. package/src/modules/design_system/gallery/assets/crypto-status-success.svg +3 -0
  295. package/src/modules/design_system/gallery/assets/crypto-status-warning.svg +3 -0
  296. package/src/modules/design_system/gallery/assets/crypto-trx.png +0 -0
  297. package/src/modules/design_system/gallery/assets/crypto-usdc.png +0 -0
  298. package/src/modules/design_system/gallery/assets/crypto-usdt.png +0 -0
  299. package/src/modules/design_system/gallery/assets/crypto-walletconnect.png +0 -0
  300. package/src/modules/design_system/gallery/assets/crypto-wei.png +0 -0
  301. package/src/modules/design_system/gallery/assets/crypto-xrp.png +0 -0
  302. package/src/modules/design_system/gallery/assets/cryptocurrency-artwork.ts +63 -0
  303. package/src/modules/design_system/gallery/assets/github-logo.png +0 -0
  304. package/src/modules/design_system/gallery/assets/images.d.ts +9 -0
  305. package/src/modules/design_system/gallery/assets/input-european-union.svg +18 -0
  306. package/src/modules/design_system/gallery/assets/landing-teams-01.png +0 -0
  307. package/src/modules/design_system/gallery/assets/marketing-artwork.ts +79 -0
  308. package/src/modules/design_system/gallery/assets/menu-apex.svg +18 -0
  309. package/src/modules/design_system/gallery/assets/menu-mastercard.svg +7 -0
  310. package/src/modules/design_system/gallery/assets/menu-spotify.svg +4 -0
  311. package/src/modules/design_system/gallery/assets/menu-united-states.svg +16 -0
  312. package/src/modules/design_system/gallery/assets/select-google.png +0 -0
  313. package/src/modules/design_system/gallery/assets/select-poland.png +0 -0
  314. package/src/modules/design_system/gallery/assets/selection-artwork.ts +1 -0
  315. package/src/modules/design_system/gallery/assets/social-apple-filled.svg +4 -0
  316. package/src/modules/design_system/gallery/assets/social-apple-stroke.svg +4 -0
  317. package/src/modules/design_system/gallery/assets/social-dropbox-filled.svg +5 -0
  318. package/src/modules/design_system/gallery/assets/social-dropbox-stroke.svg +5 -0
  319. package/src/modules/design_system/gallery/assets/social-facebook-filled.svg +4 -0
  320. package/src/modules/design_system/gallery/assets/social-facebook-stroke.svg +10 -0
  321. package/src/modules/design_system/gallery/assets/social-github-filled.svg +4 -0
  322. package/src/modules/design_system/gallery/assets/social-github-stroke.svg +4 -0
  323. package/src/modules/design_system/gallery/assets/social-google-filled.svg +7 -0
  324. package/src/modules/design_system/gallery/assets/social-google-stroke.svg +7 -0
  325. package/src/modules/design_system/gallery/assets/social-linkedin-filled.svg +4 -0
  326. package/src/modules/design_system/gallery/assets/social-linkedin-stroke.svg +4 -0
  327. package/src/modules/design_system/gallery/assets/social-x-filled.svg +4 -0
  328. package/src/modules/design_system/gallery/assets/social-x-stroke.svg +4 -0
  329. package/src/modules/design_system/gallery/assets/style-studio-product.png +0 -0
  330. package/src/modules/design_system/gallery/assets/upload-images.ts +5 -0
  331. package/src/modules/design_system/gallery/components/BrandStylePreview.tsx +94 -0
  332. package/src/modules/design_system/gallery/components/CodeSnippet.tsx +34 -34
  333. package/src/modules/design_system/gallery/components/ColorPlayground.tsx +324 -0
  334. package/src/modules/design_system/gallery/components/ColorStudioCompositions.tsx +96 -0
  335. package/src/modules/design_system/gallery/components/ColorStudioSpecimen.tsx +164 -0
  336. package/src/modules/design_system/gallery/components/CompactEntrySpecimen.tsx +65 -0
  337. package/src/modules/design_system/gallery/components/ComponentIndex.tsx +47 -0
  338. package/src/modules/design_system/gallery/components/DesignSystemHome.tsx +66 -0
  339. package/src/modules/design_system/gallery/components/EntryCard.tsx +52 -37
  340. package/src/modules/design_system/gallery/components/EntryHeader.tsx +80 -0
  341. package/src/modules/design_system/gallery/components/FamilyEntryPreview.tsx +22 -0
  342. package/src/modules/design_system/gallery/components/FoundationGuide.tsx +43 -0
  343. package/src/modules/design_system/gallery/components/GalleryLink.tsx +19 -0
  344. package/src/modules/design_system/gallery/components/GalleryNavigation.tsx +86 -0
  345. package/src/modules/design_system/gallery/components/GalleryShell.tsx +149 -63
  346. package/src/modules/design_system/gallery/components/IconsBrowser.tsx +40 -0
  347. package/src/modules/design_system/gallery/components/SourceLibrary.tsx +90 -0
  348. package/src/modules/design_system/gallery/components/StyleAgents.tsx +115 -0
  349. package/src/modules/design_system/gallery/components/ThemeTokenReference.tsx +76 -0
  350. package/src/modules/design_system/gallery/components/VariantPreview.tsx +2 -2
  351. package/src/modules/design_system/gallery/components/colorPreview.ts +63 -0
  352. package/src/modules/design_system/gallery/components/colorStudio.ts +260 -0
  353. package/src/modules/design_system/gallery/components/styleAgentBranding.ts +42 -0
  354. package/src/modules/design_system/gallery/components/themeTokens.ts +26 -0
  355. package/src/modules/design_system/gallery/demos/ai-product-code.generated.ts +3 -0
  356. package/src/modules/design_system/gallery/demos/ai-product.tsx +188 -0
  357. package/src/modules/design_system/gallery/demos/buttons.tsx +331 -0
  358. package/src/modules/design_system/gallery/demos/cryptocurrency.tsx +1943 -0
  359. package/src/modules/design_system/gallery/demos/feeds-code.generated.ts +4 -0
  360. package/src/modules/design_system/gallery/demos/feeds.tsx +82 -0
  361. package/src/modules/design_system/gallery/demos/file-upload.tsx +61 -0
  362. package/src/modules/design_system/gallery/demos/foundation-reference-data.ts +4872 -0
  363. package/src/modules/design_system/gallery/demos/foundation-references.tsx +140 -0
  364. package/src/modules/design_system/gallery/demos/key-components-code.generated.ts +3 -0
  365. package/src/modules/design_system/gallery/demos/key-components.tsx +106 -0
  366. package/src/modules/design_system/gallery/demos/marketing-controls-code.generated.ts +3 -0
  367. package/src/modules/design_system/gallery/demos/marketing-controls.tsx +92 -0
  368. package/src/modules/design_system/gallery/demos/marketing-widgets-code.generated.ts +3 -0
  369. package/src/modules/design_system/gallery/demos/marketing-widgets.tsx +189 -0
  370. package/src/modules/design_system/gallery/demos/menu-fixtures.tsx +48 -0
  371. package/src/modules/design_system/gallery/demos/menu-sources.ts +5 -0
  372. package/src/modules/design_system/gallery/demos/menus.tsx +122 -0
  373. package/src/modules/design_system/gallery/demos/rating-reviews.tsx +44 -0
  374. package/src/modules/design_system/gallery/demos/registered-icons.tsx +117 -0
  375. package/src/modules/design_system/gallery/demos/selection-cards.tsx +97 -0
  376. package/src/modules/design_system/gallery/demos/shell-code.generated.ts +3 -0
  377. package/src/modules/design_system/gallery/demos/shell.tsx +183 -0
  378. package/src/modules/design_system/gallery/demos/source-artwork.tsx +88 -0
  379. package/src/modules/design_system/gallery/demos/source-filters-code.generated.ts +3 -0
  380. package/src/modules/design_system/gallery/demos/source-filters.tsx +119 -0
  381. package/src/modules/design_system/gallery/demos/source-icons.tsx +62 -0
  382. package/src/modules/design_system/gallery/demos/table-cells-code.generated.ts +3 -0
  383. package/src/modules/design_system/gallery/demos/table-cells.tsx +144 -0
  384. package/src/modules/design_system/gallery/demos/text-inputs.tsx +90 -0
  385. package/src/modules/design_system/gallery/demos/time-picker-code.generated.ts +5 -0
  386. package/src/modules/design_system/gallery/demos/time-picker.tsx +31 -0
  387. package/src/modules/design_system/gallery/entries/banners.tsx +143 -94
  388. package/src/modules/design_system/gallery/entries/buttons-snippets.ts +432 -0
  389. package/src/modules/design_system/gallery/entries/buttons.tsx +125 -196
  390. package/src/modules/design_system/gallery/entries/charts.tsx +545 -233
  391. package/src/modules/design_system/gallery/entries/dates.tsx +171 -3
  392. package/src/modules/design_system/gallery/entries/detail.tsx +142 -115
  393. package/src/modules/design_system/gallery/entries/display.tsx +1691 -319
  394. package/src/modules/design_system/gallery/entries/feedback.tsx +1082 -169
  395. package/src/modules/design_system/gallery/entries/filters.tsx +238 -143
  396. package/src/modules/design_system/gallery/entries/foundations.tsx +404 -61
  397. package/src/modules/design_system/gallery/entries/icons.tsx +31 -117
  398. package/src/modules/design_system/gallery/entries/inputs-snippets.ts +156 -0
  399. package/src/modules/design_system/gallery/entries/inputs.tsx +2146 -503
  400. package/src/modules/design_system/gallery/entries/library.tsx +16 -0
  401. package/src/modules/design_system/gallery/entries/messages.tsx +114 -106
  402. package/src/modules/design_system/gallery/entries/navigation.tsx +782 -192
  403. package/src/modules/design_system/gallery/entries/notifications.tsx +145 -120
  404. package/src/modules/design_system/gallery/entries/overlays.tsx +696 -280
  405. package/src/modules/design_system/gallery/entries/scaffolding.tsx +1192 -158
  406. package/src/modules/design_system/gallery/entries/schedule.tsx +72 -58
  407. package/src/modules/design_system/gallery/presentation.ts +106 -0
  408. package/src/modules/design_system/gallery/registry.ts +8 -6
  409. package/src/modules/design_system/gallery/source-library.generated.ts +2 -0
  410. package/src/modules/design_system/i18n/de.json +7112 -3
  411. package/src/modules/design_system/i18n/en.json +7112 -3
  412. package/src/modules/design_system/i18n/es.json +7112 -3
  413. package/src/modules/design_system/i18n/ko.json +7112 -3
  414. package/src/modules/design_system/i18n/pl.json +7112 -3
  415. package/src/modules/push_notifications/AGENTS.md +9 -5
  416. package/src/modules/push_notifications/lib/queue.ts +15 -44
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react'
2
2
  import {
3
+ CircleAlert,
4
+ CircleCheck,
5
+ Globe,
3
6
  FilePlus2,
4
7
  Info,
5
8
  LayoutDashboard,
@@ -7,7 +10,12 @@ import {
7
10
  TriangleAlert,
8
11
  UserRound,
9
12
  Users,
13
+ X,
10
14
  } from 'lucide-react'
15
+ import { useT } from '@open-mercato/shared/lib/i18n/context'
16
+ import { CheckboxField } from '@open-mercato/ui/primitives/checkbox-field'
17
+ import { SwitchField } from '@open-mercato/ui/primitives/switch-field'
18
+ import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'
11
19
  import { Button } from '@open-mercato/ui/primitives/button'
12
20
  import {
13
21
  Dialog,
@@ -41,10 +49,12 @@ import {
41
49
  } from '@open-mercato/ui/primitives/sheet'
42
50
  import {
43
51
  Popover,
52
+ PopoverArrow,
53
+ PopoverClose,
44
54
  PopoverContent,
45
55
  PopoverTrigger,
46
56
  } from '@open-mercato/ui/primitives/popover'
47
- import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
57
+ import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
48
58
  import {
49
59
  CommandMenu,
50
60
  CommandMenuContent,
@@ -57,50 +67,451 @@ import {
57
67
  CommandMenuSeparator,
58
68
  CommandMenuTrigger,
59
69
  } from '@open-mercato/ui/primitives/command-menu'
70
+ import { CommandSourceExample } from '../demos/menus'
71
+ import { commandSourceCode } from '../demos/menu-sources'
60
72
  import type { GalleryEntry } from '../types'
61
73
 
62
74
  // Component titles and variant names are proper nouns from the codebase and
63
75
  // are deliberately not translated. `code` MUST contain the entry's importPath
64
76
  // (enforced by the registry-integrity test) and is always reviewed alongside
65
77
  // its sibling `render`.
66
- //
67
- // Every stateful overlay renders a REAL trigger in the preview stage and opens
68
- // uncontrolled — the actual Radix focus trap, Escape-to-close, and
69
- // outside-click behavior are exercised live, never imitated.
78
+
79
+ type FooterKind = 'basic' | 'equal' | 'checkbox' | 'toggle' | 'stepper' | 'link' | 'information'
80
+ type HeaderKind = 'basic' | 'default' | 'error' | 'warning' | 'success' | 'info'
81
+ type OverlayExample = { id: string; title: string; header?: HeaderKind; compact?: boolean; footer?: FooterKind; alignment?: 'horizontal' | 'vertical'; status?: boolean }
82
+
83
+ const headerIcons = { default: Settings, error: CircleAlert, warning: TriangleAlert, success: CircleCheck, info: Info }
84
+
85
+ function FooterLeading({ kind }: { kind: FooterKind }) {
86
+ const t = useT()
87
+ if (kind === 'checkbox') return <CheckboxField label={t('design_system.gallery.samples.overlay.remember')} />
88
+ if (kind === 'toggle') return <SwitchField label={t('design_system.gallery.samples.overlay.remember')} />
89
+ if (kind === 'stepper') return <StepperDots count={3} activeStep={0} size="sm" aria-label={t('design_system.gallery.samples.overlay.steps')} />
90
+ if (kind === 'link') return <Button variant="link" size="sm">{t('design_system.gallery.samples.overlay.help')}</Button>
91
+ if (kind === 'information') return <span className="inline-flex items-center gap-1.5 text-xs text-muted-foreground"><Info aria-hidden="true" className="size-4" />{t('design_system.gallery.samples.overlay.information')}</span>
92
+ return null
93
+ }
94
+
95
+ function DialogExample({ header = 'basic', compact = false, footer = 'basic', alignment = 'horizontal', status = false }: Omit<OverlayExample, 'id' | 'title'>) {
96
+ const t = useT()
97
+ const Icon = header === 'basic' ? undefined : headerIcons[header]
98
+ return (
99
+ <Dialog>
100
+ <section data-dialog-preview="" aria-label={t('design_system.gallery.samples.overlay.title')} className="relative w-full max-w-md overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-sm">
101
+ {!status ? <X aria-hidden="true" className="absolute right-4 top-4 size-4 text-muted-foreground" /> : null}
102
+ <DialogHeader className={status ? 'p-6' : 'p-4 pr-12'} compact={compact} alignment={alignment} leadingTone={header === 'basic' ? 'default' : header} leading={Icon ? <Icon className={compact || status ? 'size-6' : 'size-5'} /> : undefined}>
103
+ <DialogTitle className={status ? 'text-base font-medium leading-6 tracking-normal' : 'text-sm font-medium leading-5 tracking-normal'}>{t('design_system.gallery.samples.overlay.title')}</DialogTitle>
104
+ <DialogDescription className={compact ? 'sr-only' : undefined}>{t('design_system.gallery.samples.overlay.description')}</DialogDescription>
105
+ </DialogHeader>
106
+ {!status ? <div className="px-4 py-6 text-sm text-muted-foreground">{t('design_system.gallery.samples.overlay.body')}</div> : null}
107
+ <DialogFooter layout={footer === 'equal' ? 'equal' : 'default'} leading={footer === 'basic' || footer === 'equal' ? undefined : <FooterLeading kind={footer} />} className="mx-0 gap-3 px-4 py-4">
108
+ <Button asChild variant="outline" size="default"><span>{t('design_system.gallery.samples.overlay.cancel')}</span></Button>
109
+ <Button asChild variant="primary-filled" size="default"><span>{t('design_system.gallery.samples.overlay.continue')}</span></Button>
110
+ </DialogFooter>
111
+ </section>
112
+ </Dialog>
113
+ )
114
+ }
115
+
116
+ function DrawerExample({ header = 'basic', compact = false, footer = 'basic' }: Omit<OverlayExample, 'id' | 'title'>) {
117
+ const t = useT()
118
+ return (
119
+ <Drawer>
120
+ <DrawerTrigger asChild><Button variant="outline">{t('design_system.gallery.samples.overlay.openDrawer')}</Button></DrawerTrigger>
121
+ <DrawerContent closeAriaLabel={t('design_system.gallery.samples.overlay.close')}>
122
+ <DrawerHeader compact={compact} leading={header === 'default' ? <Settings className={compact ? 'size-6' : 'size-5'} /> : undefined}>
123
+ <DrawerTitle className="text-sm font-medium leading-5">{t('design_system.gallery.samples.overlay.title')}</DrawerTitle>
124
+ <DrawerDescription className={compact ? 'sr-only' : undefined}>{t('design_system.gallery.samples.overlay.description')}</DrawerDescription>
125
+ </DrawerHeader>
126
+ <DrawerBody><p className="py-6 text-sm text-muted-foreground">{t('design_system.gallery.samples.overlay.body')}</p></DrawerBody>
127
+ <DrawerFooter layout={footer === 'equal' ? 'equal' : 'default'} leading={footer === 'basic' || footer === 'equal' ? undefined : <FooterLeading kind={footer} />} className="flex-wrap [&_[data-slot=drawer-footer-trailing]]:ml-auto">
128
+ <DrawerClose asChild><Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button></DrawerClose>
129
+ <DrawerClose asChild><Button variant="primary-filled">{t('design_system.gallery.samples.overlay.continue')}</Button></DrawerClose>
130
+ </DrawerFooter>
131
+ </DrawerContent>
132
+ </Drawer>
133
+ )
134
+ }
135
+
136
+ function overlayExampleCode(kind: 'Dialog' | 'Drawer', example: OverlayExample) {
137
+ const header = example.header ?? 'basic'
138
+ const icon = header === 'basic' ? null : { default: 'Settings', error: 'CircleAlert', warning: 'TriangleAlert', success: 'CircleCheck', info: 'Info' }[header]
139
+ const footer = example.footer ?? 'basic'
140
+ const leading = footer === 'checkbox' ? '<CheckboxField label="Don’t show again" />' : footer === 'toggle' ? '<SwitchField label="Don’t show again" />' : footer === 'stepper' ? '<StepperDots count={3} activeStep={0} size="sm" aria-label="Step 1 of 3" />' : footer === 'link' ? '<Button variant="link" size="sm">Help</Button>' : footer === 'information' ? '<span className="text-xs text-muted-foreground">Changes apply immediately</span>' : null
141
+ if (kind === 'Dialog') return `${icon ? `import { ${icon}, X } from 'lucide-react'\n` : "import { X } from 'lucide-react'\n"}${footer === 'checkbox' ? "import { CheckboxField } from '@open-mercato/ui/primitives/checkbox-field'\n" : ''}${footer === 'toggle' ? "import { SwitchField } from '@open-mercato/ui/primitives/switch-field'\n" : ''}${footer === 'stepper' ? "import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'\n" : ''}import { Button } from '@open-mercato/ui/primitives/button'
142
+ import { Dialog, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '@open-mercato/ui/primitives/dialog'
143
+
144
+ <Dialog>
145
+ <section aria-label="Workspace settings" className="relative w-full max-w-md overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-sm">
146
+ ${example.status ? '' : '<X aria-hidden="true" className="absolute right-4 top-4 size-4 text-muted-foreground" />'}
147
+ <DialogHeader className="${example.status ? 'p-6' : 'p-4 pr-12'}" alignment="${example.alignment ?? 'horizontal'}" leadingTone="${header === 'basic' ? 'default' : header}"${example.compact ? ' compact' : ''}${icon ? ` leading={<${icon} className="${example.compact || example.status ? 'size-6' : 'size-5'}" />}` : ''}>
148
+ <DialogTitle className="${example.status ? 'text-base font-medium leading-6 tracking-normal' : 'text-sm font-medium leading-5 tracking-normal'}">Workspace settings</DialogTitle>
149
+ <DialogDescription${example.compact ? ' className="sr-only"' : ''}>Choose how these changes apply to your workspace.</DialogDescription>
150
+ </DialogHeader>
151
+ ${example.status ? '' : '<div className="px-4 py-6 text-sm text-muted-foreground">Review your settings before continuing.</div>'}
152
+ <DialogFooter layout="${footer === 'equal' ? 'equal' : 'default'}"${leading ? ` leading={${leading}}` : ''} className="mx-0 gap-3 px-4 py-4">
153
+ <Button asChild variant="outline" size="default"><span>Cancel</span></Button>
154
+ <Button asChild variant="primary-filled" size="default"><span>Continue</span></Button>
155
+ </DialogFooter>
156
+ </section>
157
+ </Dialog>`
158
+ return `${icon ? `import { ${icon} } from 'lucide-react'\n` : ''}${footer === 'checkbox' ? "import { CheckboxField } from '@open-mercato/ui/primitives/checkbox-field'\n" : ''}${footer === 'toggle' ? "import { SwitchField } from '@open-mercato/ui/primitives/switch-field'\n" : ''}${footer === 'stepper' ? "import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'\n" : ''}import { Button } from '@open-mercato/ui/primitives/button'
159
+ import { ${kind}, ${kind}Trigger, ${kind}Content, ${kind}Header, ${kind}Title, ${kind}Description, ${kind}Footer, ${kind}Close, DrawerBody } from '@open-mercato/ui/primitives/${kind.toLowerCase()}'
160
+
161
+ <${kind}>
162
+ <${kind}Trigger asChild><Button variant="outline">Open ${kind.toLowerCase()}</Button></${kind}Trigger>
163
+ <${kind}Content>
164
+ <${kind}Header${example.compact ? ' compact' : ''}${icon ? ` leading={<${icon} className="${example.compact || example.status ? 'size-6' : 'size-5'}" />}` : ''}>
165
+ <${kind}Title className="${example.status ? 'text-base font-medium leading-6 tracking-normal' : 'text-sm font-medium leading-5 tracking-normal'}">Workspace settings</${kind}Title>
166
+ <${kind}Description${example.compact ? ' className="sr-only"' : ''}>Choose how these changes apply to your workspace.</${kind}Description>
167
+ </${kind}Header>
168
+ <DrawerBody><p className="py-6 text-sm text-muted-foreground">Review your settings before continuing.</p></DrawerBody>
169
+ <${kind}Footer layout="${footer === 'equal' ? 'equal' : 'default'}"${leading ? ` leading={${leading}}` : ''} className="flex-wrap [&_[data-slot=drawer-footer-trailing]]:ml-auto">
170
+ <${kind}Close asChild><Button variant="outline">Cancel</Button></${kind}Close>
171
+ <${kind}Close asChild><Button variant="primary-filled">Continue</Button></${kind}Close>
172
+ </${kind}Footer>
173
+ </${kind}Content>
174
+ </${kind}>`
175
+ }
176
+
177
+ // Figma names the edge containing the arrow; Radix names the content's side
178
+ // relative to the trigger, so a source "Top" arrow uses side="bottom".
179
+ const overlayPlacements: { label: string; side: 'top' | 'bottom' | 'left' | 'right'; align: 'start' | 'center' | 'end' }[] = [
180
+ { label: 'Top left', side: 'bottom', align: 'start' },
181
+ { label: 'Top center', side: 'bottom', align: 'center' },
182
+ { label: 'Top right', side: 'bottom', align: 'end' },
183
+ { label: 'Bottom left', side: 'top', align: 'start' },
184
+ { label: 'Bottom center', side: 'top', align: 'center' },
185
+ { label: 'Bottom right', side: 'top', align: 'end' },
186
+ { label: 'Left', side: 'right', align: 'center' },
187
+ { label: 'Right', side: 'left', align: 'center' },
188
+ { label: 'Left top', side: 'right', align: 'start' },
189
+ { label: 'Left bottom', side: 'right', align: 'end' },
190
+ { label: 'Right top', side: 'left', align: 'start' },
191
+ { label: 'Right bottom', side: 'left', align: 'end' },
192
+ ]
193
+
194
+ function TooltipPlacements({ size, variant }: { size: 'sm' | 'default' | 'lg'; variant: 'dark' | 'light' }) {
195
+ const t = useT()
196
+ return <div className="grid w-full grid-cols-2 gap-3 sm:grid-cols-4">{overlayPlacements.slice(0, 8).map(({ label, side, align }) => size === 'lg' ? (
197
+ <TooltipCard key={label} title={t('design_system.gallery.samples.overlay.tooltip')} description={t('design_system.gallery.samples.overlay.description')} leading={<Globe className="size-5" />} variant={variant} side={side} align={align}>
198
+ <Button variant="outline" size="sm" className="justify-self-center">{label}</Button>
199
+ </TooltipCard>
200
+ ) : (
201
+ <SimpleTooltip key={label} content={t('design_system.gallery.samples.overlay.tooltip')} size={size} variant={variant} side={side} align={align} delayDuration={0}>
202
+ <Button variant="outline" size="sm" className="justify-self-center">{label}</Button>
203
+ </SimpleTooltip>
204
+ ))}</div>
205
+ }
206
+
207
+ function tooltipPlacementCode({ size, variant }: { size: 'sm' | 'default' | 'lg'; variant: 'dark' | 'light' }) {
208
+ const component = size === 'lg' ? 'TooltipCard' : 'SimpleTooltip'
209
+ return `import { ${component} } from '@open-mercato/ui/primitives/tooltip'
210
+ import { Button } from '@open-mercato/ui/primitives/button'
211
+ ${size === 'lg' ? "import { Globe } from 'lucide-react'\n" : ''}
212
+ // Figma's arrow edge is opposite Radix's content side. Collision handling stays enabled.
213
+ <div className="grid w-full grid-cols-2 gap-3 sm:grid-cols-4">
214
+ ${overlayPlacements.slice(0, 8).map(({label,side,align}) => ` <${component} ${size === 'lg' ? 'title="Workspace settings" description="Choose how these changes apply to your workspace." leading={<Globe className="size-5" />}' : `content="Workspace settings" size="${size}"`} variant="${variant}" side="${side}" align="${align}"${size === 'lg' ? '' : ' delayDuration={0}'}>
215
+ <Button variant="outline" size="sm" className="justify-self-center">${label}</Button>
216
+ </${component}>`).join('\n')}
217
+ </div>`
218
+ }
219
+
220
+ function PopoverExample({ placements = false, footer = 'equal' }: { placements?: boolean; footer?: 'equal' | 'stepper' | 'text' }) {
221
+ const t = useT()
222
+ const [step, setStep] = React.useState(0)
223
+ const options = placements ? overlayPlacements : [overlayPlacements[0]]
224
+ return <div className="grid w-full grid-cols-2 gap-3 sm:grid-cols-4">{options.map(({ label, side, align }) => (
225
+ <Popover key={label}>
226
+ <PopoverTrigger asChild><Button variant="outline" size="sm" className="justify-self-center">{placements ? label : t('design_system.gallery.samples.overlay.openPopover')}</Button></PopoverTrigger>
227
+ <PopoverContent side={side} align={align} sideOffset={6} role="dialog" aria-label={t('design_system.gallery.samples.overlay.title')} className="w-[312px] max-w-[calc(100vw-24px)] min-w-0 overflow-visible rounded-xl">
228
+ <div className="space-y-1 p-5 pb-0"><p className="text-sm font-medium">{t('design_system.gallery.samples.overlay.title')}</p><p className="text-sm text-muted-foreground">{t('design_system.gallery.samples.overlay.description')}</p></div>
229
+ <div className="flex flex-wrap items-center gap-3 px-5 py-4">
230
+ {footer === 'stepper' ? <StepperDots count={3} activeStep={step} size="sm" aria-label={t('design_system.gallery.samples.overlay.steps')} /> : null}
231
+ {footer === 'text' ? <span className="text-xs text-muted-foreground">{step + 1} / 3</span> : null}
232
+ <div className={footer === 'equal' ? 'flex w-full gap-3 [&>*]:flex-1' : 'ml-auto flex gap-3'}>
233
+ <Button variant="outline" size="sm" disabled={step === 0} onClick={() => setStep(previous => Math.max(0, previous - 1))}>{t('design_system.gallery.samples.overlay.back')}</Button>
234
+ {step === 2 ? <PopoverClose asChild><Button variant="primary-filled" size="sm">{t('design_system.gallery.samples.overlay.done')}</Button></PopoverClose> : <Button variant="primary-filled" size="sm" onClick={() => setStep(previous => Math.min(2, previous + 1))}>{t('design_system.gallery.samples.overlay.next')}</Button>}
235
+ </div>
236
+ </div>
237
+ <PopoverArrow />
238
+ </PopoverContent>
239
+ </Popover>
240
+ ))}</div>
241
+ }
242
+
243
+ function popoverExampleCode(footer: 'equal' | 'stepper' | 'text') {
244
+ return `import * as React from 'react'
245
+ import { Button } from '@open-mercato/ui/primitives/button'
246
+ import { Popover, PopoverTrigger, PopoverContent, PopoverArrow, PopoverClose } from '@open-mercato/ui/primitives/popover'
247
+ ${footer === 'stepper' ? "import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'\n" : ''}
248
+ function Example() {
249
+ const [step, setStep] = React.useState(0)
250
+ return <Popover>
251
+ <PopoverTrigger asChild><Button variant="outline">Open popover</Button></PopoverTrigger>
252
+ <PopoverContent side="bottom" align="start" sideOffset={6} role="dialog" aria-label="Workspace settings" className="w-[312px] max-w-[calc(100vw-24px)] min-w-0 rounded-xl">
253
+ <div className="space-y-1 p-5 pb-0"><p className="text-sm font-medium">Workspace settings</p><p className="text-sm text-muted-foreground">Choose how these changes apply to your workspace.</p></div>
254
+ <div className="flex flex-wrap items-center gap-3 px-5 py-4">
255
+ ${footer === 'stepper' ? '<StepperDots count={3} activeStep={step} size="sm" aria-label="Progress" />' : footer === 'text' ? '<span className="text-xs text-muted-foreground">{step + 1} / 3</span>' : ''}
256
+ <div className="${footer === 'equal' ? 'flex w-full gap-3 [&>*]:flex-1' : 'ml-auto flex gap-3'}">
257
+ <Button variant="outline" size="sm" disabled={step === 0} onClick={() => setStep(value => value - 1)}>Back</Button>
258
+ {step === 2 ? <PopoverClose asChild><Button variant="primary-filled" size="sm">Done</Button></PopoverClose> : <Button variant="primary-filled" size="sm" onClick={() => setStep(value => value + 1)}>Next</Button>}
259
+ </div>
260
+ </div>
261
+ <PopoverArrow />
262
+ </PopoverContent>
263
+ </Popover>
264
+ }`
265
+ }
266
+
267
+ const dialogExamples: OverlayExample[] = [
268
+ {
269
+ "id": "header-small-basic",
270
+ "title": "Header / small / basic",
271
+ "header": "basic",
272
+ "compact": true
273
+ },
274
+ {
275
+ "id": "header-small-default",
276
+ "title": "Header / small / default",
277
+ "header": "default",
278
+ "compact": true
279
+ },
280
+ {
281
+ "id": "header-small-error",
282
+ "title": "Header / small / error",
283
+ "header": "error",
284
+ "compact": true
285
+ },
286
+ {
287
+ "id": "header-small-warning",
288
+ "title": "Header / small / warning",
289
+ "header": "warning",
290
+ "compact": true
291
+ },
292
+ {
293
+ "id": "header-small-success",
294
+ "title": "Header / small / success",
295
+ "header": "success",
296
+ "compact": true
297
+ },
298
+ {
299
+ "id": "header-small-info",
300
+ "title": "Header / small / info",
301
+ "header": "info",
302
+ "compact": true
303
+ },
304
+ {
305
+ "id": "header-medium-basic",
306
+ "title": "Header / medium / basic",
307
+ "header": "basic",
308
+ "compact": false
309
+ },
310
+ {
311
+ "id": "header-medium-default",
312
+ "title": "Header / medium / default",
313
+ "header": "default",
314
+ "compact": false
315
+ },
316
+ {
317
+ "id": "header-medium-error",
318
+ "title": "Header / medium / error",
319
+ "header": "error",
320
+ "compact": false
321
+ },
322
+ {
323
+ "id": "header-medium-warning",
324
+ "title": "Header / medium / warning",
325
+ "header": "warning",
326
+ "compact": false
327
+ },
328
+ {
329
+ "id": "header-medium-success",
330
+ "title": "Header / medium / success",
331
+ "header": "success",
332
+ "compact": false
333
+ },
334
+ {
335
+ "id": "header-medium-info",
336
+ "title": "Header / medium / info",
337
+ "header": "info",
338
+ "compact": false
339
+ },
340
+ {
341
+ "id": "footer-basic",
342
+ "title": "Footer / basic",
343
+ "footer": "basic"
344
+ },
345
+ {
346
+ "id": "footer-equal",
347
+ "title": "Footer / equal",
348
+ "footer": "equal"
349
+ },
350
+ {
351
+ "id": "footer-checkbox",
352
+ "title": "Footer / checkbox",
353
+ "footer": "checkbox"
354
+ },
355
+ {
356
+ "id": "footer-information",
357
+ "title": "Footer / information",
358
+ "footer": "information"
359
+ },
360
+ {
361
+ "id": "footer-toggle",
362
+ "title": "Footer / toggle",
363
+ "footer": "toggle"
364
+ },
365
+ {
366
+ "id": "footer-stepper",
367
+ "title": "Footer / stepper",
368
+ "footer": "stepper"
369
+ },
370
+ {
371
+ "id": "footer-link",
372
+ "title": "Footer / link",
373
+ "footer": "link"
374
+ },
375
+ {
376
+ "id": "status-horizontal-error",
377
+ "title": "Status / horizontal / error",
378
+ "header": "error",
379
+ "alignment": "horizontal",
380
+ "status": true,
381
+ "footer": "checkbox"
382
+ },
383
+ {
384
+ "id": "status-horizontal-warning",
385
+ "title": "Status / horizontal / warning",
386
+ "header": "warning",
387
+ "alignment": "horizontal",
388
+ "status": true,
389
+ "footer": "checkbox"
390
+ },
391
+ {
392
+ "id": "status-horizontal-success",
393
+ "title": "Status / horizontal / success",
394
+ "header": "success",
395
+ "alignment": "horizontal",
396
+ "status": true,
397
+ "footer": "checkbox"
398
+ },
399
+ {
400
+ "id": "status-horizontal-info",
401
+ "title": "Status / horizontal / info",
402
+ "header": "info",
403
+ "alignment": "horizontal",
404
+ "status": true,
405
+ "footer": "checkbox"
406
+ },
407
+ {
408
+ "id": "status-vertical-error",
409
+ "title": "Status / vertical / error",
410
+ "header": "error",
411
+ "alignment": "vertical",
412
+ "status": true,
413
+ "footer": "checkbox"
414
+ },
415
+ {
416
+ "id": "status-vertical-warning",
417
+ "title": "Status / vertical / warning",
418
+ "header": "warning",
419
+ "alignment": "vertical",
420
+ "status": true,
421
+ "footer": "checkbox"
422
+ },
423
+ {
424
+ "id": "status-vertical-success",
425
+ "title": "Status / vertical / success",
426
+ "header": "success",
427
+ "alignment": "vertical",
428
+ "status": true,
429
+ "footer": "checkbox"
430
+ },
431
+ {
432
+ "id": "status-vertical-info",
433
+ "title": "Status / vertical / info",
434
+ "header": "info",
435
+ "alignment": "vertical",
436
+ "status": true,
437
+ "footer": "checkbox"
438
+ }
439
+ ]
440
+
441
+ const drawerExamples: OverlayExample[] = [
442
+ {
443
+ "id": "header-small-basic",
444
+ "title": "Header / small / basic",
445
+ "header": "basic",
446
+ "compact": true
447
+ },
448
+ {
449
+ "id": "header-small-default",
450
+ "title": "Header / small / default",
451
+ "header": "default",
452
+ "compact": true
453
+ },
454
+ {
455
+ "id": "header-large-basic",
456
+ "title": "Header / large / basic",
457
+ "header": "basic",
458
+ "compact": false
459
+ },
460
+ {
461
+ "id": "header-large-default",
462
+ "title": "Header / large / default",
463
+ "header": "default",
464
+ "compact": false
465
+ },
466
+ {
467
+ "id": "footer-equal",
468
+ "title": "Footer / equal",
469
+ "footer": "equal"
470
+ },
471
+ {
472
+ "id": "footer-basic",
473
+ "title": "Footer / basic",
474
+ "footer": "basic"
475
+ },
476
+ {
477
+ "id": "footer-checkbox",
478
+ "title": "Footer / checkbox",
479
+ "footer": "checkbox"
480
+ },
481
+ {
482
+ "id": "footer-toggle",
483
+ "title": "Footer / toggle",
484
+ "footer": "toggle"
485
+ },
486
+ {
487
+ "id": "footer-stepper",
488
+ "title": "Footer / stepper",
489
+ "footer": "stepper"
490
+ },
491
+ {
492
+ "id": "footer-link",
493
+ "title": "Footer / link",
494
+ "footer": "link"
495
+ }
496
+ ]
70
497
 
71
498
  const dialogEntry: GalleryEntry = {
72
499
  id: 'dialog',
500
+ figmaNodeId: '466:4778',
73
501
  title: 'Dialog',
74
502
  importPath: '@open-mercato/ui/primitives/dialog',
75
503
  docsAnchor: '#dialog',
76
504
  variants: [
505
+ ...dialogExamples.map(example => ({
506
+ id: example.id,
507
+ title: example.title,
508
+ render: () => <DialogExample {...example} />,
509
+ code: overlayExampleCode('Dialog', example),
510
+ })),
77
511
  {
78
512
  id: 'default',
79
513
  title: 'default',
80
- render: () => (
81
- <Dialog>
82
- <DialogTrigger asChild>
83
- <Button variant="outline">Open dialog</Button>
84
- </DialogTrigger>
85
- <DialogContent>
86
- <DialogHeader>
87
- <DialogTitle>Rename view</DialogTitle>
88
- <DialogDescription>
89
- The new name is visible to everyone in this workspace.
90
- </DialogDescription>
91
- </DialogHeader>
92
- <p className="text-sm text-muted-foreground">
93
- Press Escape or click outside to dismiss.
94
- </p>
95
- <DialogFooter>
96
- <DialogClose asChild>
97
- <Button variant="outline">Cancel</Button>
98
- </DialogClose>
99
- <Button>Save changes</Button>
100
- </DialogFooter>
101
- </DialogContent>
102
- </Dialog>
103
- ),
514
+ render: () => <DialogOverlaysDefaultSample />,
104
515
  code: `import { Button } from '@open-mercato/ui/primitives/button'
105
516
  import {
106
517
  Dialog,
@@ -136,27 +547,7 @@ import {
136
547
  {
137
548
  id: 'status-leading',
138
549
  title: 'Status leading badge',
139
- render: () => (
140
- <Dialog>
141
- <DialogTrigger asChild>
142
- <Button variant="destructive-outline">Delete record</Button>
143
- </DialogTrigger>
144
- <DialogContent size="sm">
145
- <DialogHeader leading={<TriangleAlert className="size-4" />} leadingTone="error">
146
- <DialogTitle>Delete this record?</DialogTitle>
147
- <DialogDescription>
148
- This removes the record from every linked view.
149
- </DialogDescription>
150
- </DialogHeader>
151
- <DialogFooter layout="equal">
152
- <DialogClose asChild>
153
- <Button variant="outline">Cancel</Button>
154
- </DialogClose>
155
- <Button variant="destructive-solid">Delete</Button>
156
- </DialogFooter>
157
- </DialogContent>
158
- </Dialog>
159
- ),
550
+ render: () => <DialogOverlaysStatusLeadingSample />,
160
551
  code: `import { TriangleAlert } from 'lucide-react'
161
552
  import { Button } from '@open-mercato/ui/primitives/button'
162
553
  import {
@@ -200,44 +591,16 @@ const drawerEntry: GalleryEntry = {
200
591
  docsAnchor: '#drawer',
201
592
  figmaNodeId: '486:7366',
202
593
  variants: [
594
+ ...drawerExamples.map(example => ({
595
+ id: example.id,
596
+ title: example.title,
597
+ render: () => <DrawerExample {...example} />,
598
+ code: overlayExampleCode('Drawer', example),
599
+ })),
203
600
  {
204
601
  id: 'default',
205
602
  title: 'default',
206
- render: () => (
207
- <Drawer>
208
- <DrawerTrigger asChild>
209
- <Button variant="outline">Open drawer</Button>
210
- </DrawerTrigger>
211
- <DrawerContent>
212
- <DrawerHeader>
213
- <DrawerTitle>Edit person</DrawerTitle>
214
- <DrawerDescription>Update the contact details below.</DrawerDescription>
215
- </DrawerHeader>
216
- <DrawerBody>
217
- <div className="divide-y divide-input text-sm">
218
- <div className="flex items-center justify-between py-3">
219
- <span className="text-muted-foreground">Name</span>
220
- <span className="text-foreground">Anna Kowalska</span>
221
- </div>
222
- <div className="flex items-center justify-between py-3">
223
- <span className="text-muted-foreground">Role</span>
224
- <span className="text-foreground">Account manager</span>
225
- </div>
226
- <div className="flex items-center justify-between py-3">
227
- <span className="text-muted-foreground">Team</span>
228
- <span className="text-foreground">Sales EU</span>
229
- </div>
230
- </div>
231
- </DrawerBody>
232
- <DrawerFooter layout="equal">
233
- <DrawerClose asChild>
234
- <Button variant="outline">Cancel</Button>
235
- </DrawerClose>
236
- <Button>Save changes</Button>
237
- </DrawerFooter>
238
- </DrawerContent>
239
- </Drawer>
240
- ),
603
+ render: () => <DrawerOverlaysDefaultSample />,
241
604
  code: `import { Button } from '@open-mercato/ui/primitives/button'
242
605
  import {
243
606
  Drawer,
@@ -273,30 +636,7 @@ import {
273
636
  {
274
637
  id: 'leading-icon',
275
638
  title: 'Header leading icon',
276
- render: () => (
277
- <Drawer>
278
- <DrawerTrigger asChild>
279
- <Button variant="outline">Open profile drawer</Button>
280
- </DrawerTrigger>
281
- <DrawerContent>
282
- <DrawerHeader leading={<UserRound className="size-4" />}>
283
- <DrawerTitle>Profile details</DrawerTitle>
284
- <DrawerDescription>Read-only summary of this account.</DrawerDescription>
285
- </DrawerHeader>
286
- <DrawerBody>
287
- <p className="text-sm text-muted-foreground">
288
- The header badge takes any Lucide icon via the <code>leading</code> prop.
289
- </p>
290
- </DrawerBody>
291
- <DrawerFooter layout="equal">
292
- <DrawerClose asChild>
293
- <Button variant="outline">Cancel</Button>
294
- </DrawerClose>
295
- <Button>Continue</Button>
296
- </DrawerFooter>
297
- </DrawerContent>
298
- </Drawer>
299
- ),
639
+ render: () => <DrawerOverlaysLeadingIconSample />,
300
640
  code: `import { UserRound } from 'lucide-react'
301
641
  import { Button } from '@open-mercato/ui/primitives/button'
302
642
  import {
@@ -341,26 +681,7 @@ const sheetEntry: GalleryEntry = {
341
681
  {
342
682
  id: 'right',
343
683
  title: 'right (default)',
344
- render: () => (
345
- <Sheet>
346
- <SheetTrigger asChild>
347
- <Button variant="outline">Open sheet</Button>
348
- </SheetTrigger>
349
- <SheetContent>
350
- <SheetHeader>
351
- <SheetTitle>Filters</SheetTitle>
352
- <SheetDescription>Narrow down the current list.</SheetDescription>
353
- </SheetHeader>
354
- <div className="flex-1 px-4 text-sm text-muted-foreground">
355
- Sheet body content scrolls independently of the header and footer.
356
- </div>
357
- <SheetFooter>
358
- <Button variant="outline">Reset</Button>
359
- <Button>Apply</Button>
360
- </SheetFooter>
361
- </SheetContent>
362
- </Sheet>
363
- ),
684
+ render: () => <SheetOverlaysRightSample />,
364
685
  code: `import { Button } from '@open-mercato/ui/primitives/button'
365
686
  import {
366
687
  Sheet,
@@ -392,22 +713,7 @@ import {
392
713
  {
393
714
  id: 'left',
394
715
  title: 'side="left"',
395
- render: () => (
396
- <Sheet>
397
- <SheetTrigger asChild>
398
- <Button variant="outline">Open left sheet</Button>
399
- </SheetTrigger>
400
- <SheetContent side="left">
401
- <SheetHeader>
402
- <SheetTitle>Navigation</SheetTitle>
403
- <SheetDescription>Slides in from the left edge.</SheetDescription>
404
- </SheetHeader>
405
- <div className="flex-1 px-4 text-sm text-muted-foreground">
406
- Use the left side for mobile menus and secondary navigation.
407
- </div>
408
- </SheetContent>
409
- </Sheet>
410
- ),
716
+ render: () => <SheetOverlaysLeftSample />,
411
717
  code: `import { Button } from '@open-mercato/ui/primitives/button'
412
718
  import {
413
719
  Sheet,
@@ -436,27 +742,18 @@ import {
436
742
 
437
743
  const popoverEntry: GalleryEntry = {
438
744
  id: 'popover',
745
+ figmaNodeId: '4431:81573',
439
746
  title: 'Popover',
440
747
  importPath: '@open-mercato/ui/primitives/popover',
441
748
  variants: [
749
+ { id: 'positions', title: '12 arrow positions', render: () => <PopoverExample placements />, code: popoverExampleCode('equal') + '\n\n// Source arrow edge → content side / alignment\n' + overlayPlacements.map(item => `// ${item.label} → side="${item.side}" align="${item.align}"`).join('\n') },
750
+ { id: 'footer-equal', title: 'Footer / equal', render: () => <PopoverExample footer="equal" />, code: popoverExampleCode('equal') },
751
+ { id: 'footer-text', title: 'Footer / text', render: () => <PopoverExample footer="text" />, code: popoverExampleCode('text') },
752
+ { id: 'footer-stepper', title: 'Footer / stepper', render: () => <PopoverExample footer="stepper" />, code: popoverExampleCode('stepper') },
442
753
  {
443
754
  id: 'default',
444
755
  title: 'default',
445
- render: () => (
446
- <Popover>
447
- <PopoverTrigger asChild>
448
- <Button variant="outline">Open popover</Button>
449
- </PopoverTrigger>
450
- <PopoverContent className="p-4">
451
- <div className="flex flex-col gap-1">
452
- <span className="text-sm font-medium text-foreground">Display density</span>
453
- <span className="text-sm text-muted-foreground">
454
- Anchored to its trigger; Escape and outside-click dismiss it.
455
- </span>
456
- </div>
457
- </PopoverContent>
458
- </Popover>
459
- ),
756
+ render: () => <PopoverOverlaysDefaultSample />,
460
757
  code: `import { Button } from '@open-mercato/ui/primitives/button'
461
758
  import {
462
759
  Popover,
@@ -476,18 +773,7 @@ import {
476
773
  {
477
774
  id: 'align-end',
478
775
  title: 'align="end" + side="top"',
479
- render: () => (
480
- <Popover>
481
- <PopoverTrigger asChild>
482
- <Button variant="outline">Open above</Button>
483
- </PopoverTrigger>
484
- <PopoverContent side="top" align="end" className="p-4">
485
- <span className="text-sm text-muted-foreground">
486
- Placement follows Radix side/align props and flips when space runs out.
487
- </span>
488
- </PopoverContent>
489
- </Popover>
490
- ),
776
+ render: () => <PopoverOverlaysAlignEndSample />,
491
777
  code: `import { Button } from '@open-mercato/ui/primitives/button'
492
778
  import {
493
779
  Popover,
@@ -509,19 +795,22 @@ import {
509
795
 
510
796
  const tooltipEntry: GalleryEntry = {
511
797
  id: 'tooltip',
798
+ figmaNodeId: '2604:269',
512
799
  title: 'Tooltip',
513
800
  importPath: '@open-mercato/ui/primitives/tooltip',
514
801
  docsAnchor: '#tooltip--simpletooltip',
515
802
  variants: [
803
+ { id: 'positions-sm-light', title: '8 positions / sm / light', render: () => <TooltipPlacements size="sm" variant="light" />, code: tooltipPlacementCode({ size: 'sm', variant: 'light' }) },
804
+ { id: 'positions-sm-dark', title: '8 positions / sm / dark', render: () => <TooltipPlacements size="sm" variant="dark" />, code: tooltipPlacementCode({ size: 'sm', variant: 'dark' }) },
805
+ { id: 'positions-default-light', title: '8 positions / default / light', render: () => <TooltipPlacements size="default" variant="light" />, code: tooltipPlacementCode({ size: 'default', variant: 'light' }) },
806
+ { id: 'positions-default-dark', title: '8 positions / default / dark', render: () => <TooltipPlacements size="default" variant="dark" />, code: tooltipPlacementCode({ size: 'default', variant: 'dark' }) },
807
+ { id: 'positions-lg-light', title: '8 positions / lg / light', render: () => <TooltipPlacements size="lg" variant="light" />, code: tooltipPlacementCode({ size: 'lg', variant: 'light' }) },
808
+ { id: 'positions-lg-dark', title: '8 positions / lg / dark', render: () => <TooltipPlacements size="lg" variant="dark" />, code: tooltipPlacementCode({ size: 'lg', variant: 'dark' }) },
516
809
  {
517
810
  id: 'default',
518
811
  title: 'default (dark)',
519
- render: () => (
520
- <SimpleTooltip content="Duplicates this view with all filters">
521
- <Button variant="outline">Hover me</Button>
522
- </SimpleTooltip>
523
- ),
524
- code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
812
+ render: () => <TooltipOverlaysDefaultSample />,
813
+ code: `import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
525
814
  import { Button } from '@open-mercato/ui/primitives/button'
526
815
 
527
816
  <SimpleTooltip content="Duplicates this view with all filters">
@@ -531,16 +820,9 @@ import { Button } from '@open-mercato/ui/primitives/button'
531
820
  {
532
821
  id: 'light',
533
822
  title: 'light',
534
- render: () => (
535
- <SimpleTooltip content="Help text on a light surface" variant="light">
536
- <Button variant="outline">
537
- <Info />
538
- Light variant
539
- </Button>
540
- </SimpleTooltip>
541
- ),
823
+ render: () => <TooltipOverlaysLightSample />,
542
824
  code: `import { Info } from 'lucide-react'
543
- import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
825
+ import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
544
826
  import { Button } from '@open-mercato/ui/primitives/button'
545
827
 
546
828
  <SimpleTooltip content="Help text on a light surface" variant="light">
@@ -550,20 +832,8 @@ import { Button } from '@open-mercato/ui/primitives/button'
550
832
  {
551
833
  id: 'sizes',
552
834
  title: 'Sizes',
553
- render: () => (
554
- <>
555
- <SimpleTooltip content="Small" size="sm">
556
- <Button variant="outline" size="sm">sm</Button>
557
- </SimpleTooltip>
558
- <SimpleTooltip content="Default">
559
- <Button variant="outline" size="sm">default</Button>
560
- </SimpleTooltip>
561
- <SimpleTooltip content="Large tooltip for longer helper copy" size="lg">
562
- <Button variant="outline" size="sm">lg</Button>
563
- </SimpleTooltip>
564
- </>
565
- ),
566
- code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
835
+ render: () => <TooltipOverlaysSizesSample />,
836
+ code: `import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
567
837
  import { Button } from '@open-mercato/ui/primitives/button'
568
838
 
569
839
  <SimpleTooltip content="Small" size="sm">
@@ -581,89 +851,20 @@ import { Button } from '@open-mercato/ui/primitives/button'
581
851
 
582
852
  const commandMenuEntry: GalleryEntry = {
583
853
  id: 'command-menu',
854
+ figmaNodeId: '4171:15653',
584
855
  title: 'CommandMenu',
585
856
  importPath: '@open-mercato/ui/primitives/command-menu',
586
857
  docsAnchor: '#commandmenu',
858
+ usage: { do: [
859
+ 'The source Small (48) label is inaccurate: all six small rows measure 40 px. The larger rows measure 64 px. Numeric sizes opt into these measurements; unsized rows keep the legacy layout.',
860
+ 'Basic, Avatar, Left Icon, Brand, Company and Country use real source assets or production primitives. Keyboard selection updates the result and closes the palette.',
861
+ 'Search and clear stay synchronized. Group captions and actions flow together without overlapping long headings; the footer includes real keyboard hints and a local help action.',
862
+ ] },
587
863
  variants: [
588
- {
589
- id: 'default',
590
- title: 'default',
591
- render: () => (
592
- <CommandMenu>
593
- <CommandMenuTrigger asChild>
594
- <Button variant="outline">Open command menu</Button>
595
- </CommandMenuTrigger>
596
- <CommandMenuContent>
597
- <CommandMenuInput placeholder="Search actions..." />
598
- <CommandMenuList>
599
- <CommandMenuEmpty>No results.</CommandMenuEmpty>
600
- <CommandMenuGroup heading="Actions">
601
- <CommandMenuItem leading={<FilePlus2 className="size-4 text-muted-foreground" />}>
602
- Create record
603
- </CommandMenuItem>
604
- <CommandMenuItem leading={<Users className="size-4 text-muted-foreground" />} description="Invite teammates to this workspace">
605
- Manage members
606
- </CommandMenuItem>
607
- </CommandMenuGroup>
608
- <CommandMenuSeparator />
609
- <CommandMenuGroup heading="Navigate">
610
- <CommandMenuItem leading={<LayoutDashboard className="size-4 text-muted-foreground" />}>
611
- Go to dashboard
612
- </CommandMenuItem>
613
- <CommandMenuItem leading={<Settings className="size-4 text-muted-foreground" />}>
614
- Open settings
615
- </CommandMenuItem>
616
- </CommandMenuGroup>
617
- </CommandMenuList>
618
- <CommandMenuFooter />
619
- </CommandMenuContent>
620
- </CommandMenu>
621
- ),
622
- code: `import { FilePlus2, LayoutDashboard, Settings, Users } from 'lucide-react'
623
- import { Button } from '@open-mercato/ui/primitives/button'
624
- import {
625
- CommandMenu,
626
- CommandMenuTrigger,
627
- CommandMenuContent,
628
- CommandMenuInput,
629
- CommandMenuList,
630
- CommandMenuEmpty,
631
- CommandMenuGroup,
632
- CommandMenuItem,
633
- CommandMenuSeparator,
634
- CommandMenuFooter,
635
- } from '@open-mercato/ui/primitives/command-menu'
636
-
637
- <CommandMenu>
638
- <CommandMenuTrigger asChild>
639
- <Button variant="outline">Open command menu</Button>
640
- </CommandMenuTrigger>
641
- <CommandMenuContent>
642
- <CommandMenuInput placeholder="Search actions..." />
643
- <CommandMenuList>
644
- <CommandMenuEmpty>No results.</CommandMenuEmpty>
645
- <CommandMenuGroup heading="Actions">
646
- <CommandMenuItem leading={<FilePlus2 className="size-4" />}>
647
- Create record
648
- </CommandMenuItem>
649
- <CommandMenuItem leading={<Users className="size-4" />} description="Invite teammates to this workspace">
650
- Manage members
651
- </CommandMenuItem>
652
- </CommandMenuGroup>
653
- <CommandMenuSeparator />
654
- <CommandMenuGroup heading="Navigate">
655
- <CommandMenuItem leading={<LayoutDashboard className="size-4" />}>
656
- Go to dashboard
657
- </CommandMenuItem>
658
- <CommandMenuItem leading={<Settings className="size-4" />}>
659
- Open settings
660
- </CommandMenuItem>
661
- </CommandMenuGroup>
662
- </CommandMenuList>
663
- <CommandMenuFooter />
664
- </CommandMenuContent>
665
- </CommandMenu>`,
666
- },
864
+ { id: 'default', title: 'All six types / 40 px', render: () => <CommandSourceExample />, code: commandSourceCode + '\n<CommandSourceExample size={40} />' },
865
+ { id: 'medium', title: 'All six types / 64 px', render: () => <CommandSourceExample size={64} />, code: commandSourceCode + '\n<CommandSourceExample size={64} />' },
866
+ { id: 'groups', title: 'Captions / action / separator / footer', render: () => <CommandSourceExample withGroups />, code: commandSourceCode + '\n<CommandSourceExample withGroups />' },
867
+ { id: 'empty', title: 'No results / clear to recover', render: () => <CommandSourceExample empty />, code: commandSourceCode + '\n<CommandSourceExample empty />' },
667
868
  ],
668
869
  }
669
870
 
@@ -675,3 +876,218 @@ export const entries: GalleryEntry[] = [
675
876
  tooltipEntry,
676
877
  commandMenuEntry,
677
878
  ]
879
+
880
+ function DialogOverlaysDefaultSample() {
881
+ const t = useT()
882
+ return (<Dialog>
883
+ <DialogTrigger asChild>
884
+ <Button variant="outline">{t('design_system.gallery.samples.overlay.openDialog')}</Button>
885
+ </DialogTrigger>
886
+ <DialogContent>
887
+ <DialogHeader>
888
+ <DialogTitle>{t('design_system.gallery.sampleCopy.renameView')}</DialogTitle>
889
+ <DialogDescription>
890
+ {t('design_system.gallery.sampleCopy.theNewNameIsVisibleToEveryoneInThisWorkspace')}
891
+ </DialogDescription>
892
+ </DialogHeader>
893
+ <p className="text-sm text-muted-foreground">
894
+ {t('design_system.gallery.sampleCopy.pressEscapeOrClickOutsideToDismiss')}
895
+ </p>
896
+ <DialogFooter>
897
+ <DialogClose asChild>
898
+ <Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
899
+ </DialogClose>
900
+ <Button>{t('design_system.gallery.samples.primaryAction')}</Button>
901
+ </DialogFooter>
902
+ </DialogContent>
903
+ </Dialog>)
904
+ }
905
+
906
+ function DialogOverlaysStatusLeadingSample() {
907
+ const t = useT()
908
+ return (<Dialog>
909
+ <DialogTrigger asChild>
910
+ <Button variant="destructive-outline">{t('design_system.gallery.sampleCopy.deleteRecord')}</Button>
911
+ </DialogTrigger>
912
+ <DialogContent size="sm">
913
+ <DialogHeader leading={<TriangleAlert className="size-4" />} leadingTone="error">
914
+ <DialogTitle>{t('design_system.gallery.sampleCopy.deleteThisRecord')}</DialogTitle>
915
+ <DialogDescription>
916
+ {t('design_system.gallery.sampleCopy.thisRemovesTheRecordFromEveryLinkedView')}
917
+ </DialogDescription>
918
+ </DialogHeader>
919
+ <DialogFooter layout="equal">
920
+ <DialogClose asChild>
921
+ <Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
922
+ </DialogClose>
923
+ <Button variant="destructive-solid">{t('design_system.gallery.sampleCopy.delete')}</Button>
924
+ </DialogFooter>
925
+ </DialogContent>
926
+ </Dialog>)
927
+ }
928
+
929
+ function DrawerOverlaysDefaultSample() {
930
+ const t = useT()
931
+ return (<Drawer>
932
+ <DrawerTrigger asChild>
933
+ <Button variant="outline">{t('design_system.gallery.samples.overlay.openDrawer')}</Button>
934
+ </DrawerTrigger>
935
+ <DrawerContent>
936
+ <DrawerHeader>
937
+ <DrawerTitle>{t('design_system.gallery.sampleCopy.editPerson')}</DrawerTitle>
938
+ <DrawerDescription>{t('design_system.gallery.sampleCopy.updateTheContactDetailsBelow')}</DrawerDescription>
939
+ </DrawerHeader>
940
+ <DrawerBody>
941
+ <div className="divide-y divide-input text-sm">
942
+ <div className="flex items-center justify-between py-3">
943
+ <span className="text-muted-foreground">{t('design_system.gallery.samples.textInput.basic')}</span>
944
+ <span className="text-foreground">Anna Kowalska</span>
945
+ </div>
946
+ <div className="flex items-center justify-between py-3">
947
+ <span className="text-muted-foreground">{t('design_system.gallery.sampleCopy.role')}</span>
948
+ <span className="text-foreground">{t('design_system.gallery.samples.table.description')}</span>
949
+ </div>
950
+ <div className="flex items-center justify-between py-3">
951
+ <span className="text-muted-foreground">{t('design_system.gallery.samples.hr.team')}</span>
952
+ <span className="text-foreground">{t('design_system.gallery.sampleCopy.salesEU')}</span>
953
+ </div>
954
+ </div>
955
+ </DrawerBody>
956
+ <DrawerFooter layout="equal">
957
+ <DrawerClose asChild>
958
+ <Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
959
+ </DrawerClose>
960
+ <Button>{t('design_system.gallery.samples.primaryAction')}</Button>
961
+ </DrawerFooter>
962
+ </DrawerContent>
963
+ </Drawer>)
964
+ }
965
+
966
+ function DrawerOverlaysLeadingIconSample() {
967
+ const t = useT()
968
+ return (<Drawer>
969
+ <DrawerTrigger asChild>
970
+ <Button variant="outline">{t('design_system.gallery.sampleCopy.openProfileDrawer')}</Button>
971
+ </DrawerTrigger>
972
+ <DrawerContent>
973
+ <DrawerHeader leading={<UserRound className="size-4" />}>
974
+ <DrawerTitle>{t('design_system.gallery.sampleCopy.profileDetails')}</DrawerTitle>
975
+ <DrawerDescription>{t('design_system.gallery.sampleCopy.readonlySummaryOfThisAccount')}</DrawerDescription>
976
+ </DrawerHeader>
977
+ <DrawerBody>
978
+ <p className="text-sm text-muted-foreground">
979
+ {t('design_system.gallery.sampleCopy.theHeaderBadgeTakesAnyLucideIconViaThe')} <code>leading</code> {t('design_system.gallery.sampleCopy.prop')}
980
+ </p>
981
+ </DrawerBody>
982
+ <DrawerFooter layout="equal">
983
+ <DrawerClose asChild>
984
+ <Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
985
+ </DrawerClose>
986
+ <Button>{t('design_system.gallery.samples.overlay.continue')}</Button>
987
+ </DrawerFooter>
988
+ </DrawerContent>
989
+ </Drawer>)
990
+ }
991
+
992
+ function SheetOverlaysRightSample() {
993
+ const t = useT()
994
+ return (<Sheet>
995
+ <SheetTrigger asChild>
996
+ <Button variant="outline">{t('design_system.gallery.sampleCopy.openSheet')}</Button>
997
+ </SheetTrigger>
998
+ <SheetContent>
999
+ <SheetHeader>
1000
+ <SheetTitle>{t('design_system.families.filters')}</SheetTitle>
1001
+ <SheetDescription>{t('design_system.gallery.sampleCopy.narrowDownTheCurrentList')}</SheetDescription>
1002
+ </SheetHeader>
1003
+ <div className="flex-1 px-4 text-sm text-muted-foreground">
1004
+ {t('design_system.gallery.sampleCopy.sheetBodyContentScrollsIndependentlyOfTheHeaderAndFooter')}
1005
+ </div>
1006
+ <SheetFooter>
1007
+ <Button variant="outline">{t('design_system.gallery.sampleCopy.reset')}</Button>
1008
+ <Button>{t('design_system.gallery.examples.sourceFilters.apply')}</Button>
1009
+ </SheetFooter>
1010
+ </SheetContent>
1011
+ </Sheet>)
1012
+ }
1013
+
1014
+ function SheetOverlaysLeftSample() {
1015
+ const t = useT()
1016
+ return (<Sheet>
1017
+ <SheetTrigger asChild>
1018
+ <Button variant="outline">{t('design_system.gallery.sampleCopy.openLeftSheet')}</Button>
1019
+ </SheetTrigger>
1020
+ <SheetContent side="left">
1021
+ <SheetHeader>
1022
+ <SheetTitle>{t('design_system.families.navigation')}</SheetTitle>
1023
+ <SheetDescription>{t('design_system.gallery.sampleCopy.slidesInFromTheLeftEdge')}</SheetDescription>
1024
+ </SheetHeader>
1025
+ <div className="flex-1 px-4 text-sm text-muted-foreground">
1026
+ {t('design_system.gallery.sampleCopy.useTheLeftSideForMobileMenusAndSecondaryNavigation')}
1027
+ </div>
1028
+ </SheetContent>
1029
+ </Sheet>)
1030
+ }
1031
+
1032
+ function PopoverOverlaysDefaultSample() {
1033
+ const t = useT()
1034
+ return (<Popover>
1035
+ <PopoverTrigger asChild>
1036
+ <Button variant="outline">{t('design_system.gallery.samples.overlay.openPopover')}</Button>
1037
+ </PopoverTrigger>
1038
+ <PopoverContent className="p-4">
1039
+ <div className="flex flex-col gap-1">
1040
+ <span className="text-sm font-medium text-foreground">{t('design_system.gallery.sampleCopy.displayDensity')}</span>
1041
+ <span className="text-sm text-muted-foreground">
1042
+ {t('design_system.gallery.sampleCopy.anchoredToItsTriggerEscapeAndOutsideclickDismissIt')}
1043
+ </span>
1044
+ </div>
1045
+ </PopoverContent>
1046
+ </Popover>)
1047
+ }
1048
+
1049
+ function PopoverOverlaysAlignEndSample() {
1050
+ const t = useT()
1051
+ return (<Popover>
1052
+ <PopoverTrigger asChild>
1053
+ <Button variant="outline">{t('design_system.gallery.sampleCopy.openAbove')}</Button>
1054
+ </PopoverTrigger>
1055
+ <PopoverContent side="top" align="end" className="p-4">
1056
+ <span className="text-sm text-muted-foreground">
1057
+ {t('design_system.gallery.sampleCopy.placementFollowsRadixSidealignPropsAndFlipsWhenSpaceRuns')}
1058
+ </span>
1059
+ </PopoverContent>
1060
+ </Popover>)
1061
+ }
1062
+
1063
+ function TooltipOverlaysDefaultSample() {
1064
+ const t = useT()
1065
+ return (<SimpleTooltip content={t('design_system.gallery.sampleCopy.duplicatesThisViewWithAllFilters')}>
1066
+ <Button variant="outline">{t('design_system.gallery.sampleCopy.hoverMe')}</Button>
1067
+ </SimpleTooltip>)
1068
+ }
1069
+
1070
+ function TooltipOverlaysLightSample() {
1071
+ const t = useT()
1072
+ return (<SimpleTooltip content={t('design_system.gallery.sampleCopy.helpTextOnALightSurface')} variant="light">
1073
+ <Button variant="outline">
1074
+ <Info />
1075
+ {t('design_system.gallery.sampleCopy.lightVariant')}
1076
+ </Button>
1077
+ </SimpleTooltip>)
1078
+ }
1079
+
1080
+ function TooltipOverlaysSizesSample() {
1081
+ const t = useT()
1082
+ return (<>
1083
+ <SimpleTooltip content={t('design_system.gallery.sampleCopy.small')} size="sm">
1084
+ <Button variant="outline" size="sm">sm</Button>
1085
+ </SimpleTooltip>
1086
+ <SimpleTooltip content={t('design_system.gallery.examples.aiProduct.default')}>
1087
+ <Button variant="outline" size="sm">default</Button>
1088
+ </SimpleTooltip>
1089
+ <SimpleTooltip content={t('design_system.gallery.sampleCopy.largeTooltipForLongerHelperCopy')} size="lg">
1090
+ <Button variant="outline" size="sm">lg</Button>
1091
+ </SimpleTooltip>
1092
+ </>)
1093
+ }