@open-mercato/core 0.7.1-develop.7203.1.9396450b78 → 0.8.1-develop.7204.1.83330e271e

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 -8
  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
@@ -0,0 +1,586 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, Radar, RadarChart, ReferenceLine, ResponsiveContainer, Tooltip, XAxis } from "recharts";
4
+ import { ArrowDownLeft, ArrowUp, ArrowUpRight, ChevronLeft, ChevronRight, Clock3, Code, Info, Minus, Plus, Store, Target, UserRound } from "lucide-react";
5
+ import { useLocale, useT } from "@open-mercato/shared/lib/i18n/context";
6
+ import { cn } from "@open-mercato/shared/lib/utils";
7
+ import { ChartContainer, ChartTooltipContent } from "@open-mercato/ui/backend/charts";
8
+ import { Avatar } from "@open-mercato/ui/primitives/avatar";
9
+ import { Badge } from "@open-mercato/ui/primitives/badge";
10
+ import { Button } from "@open-mercato/ui/primitives/button";
11
+ import { Card } from "@open-mercato/ui/primitives/card";
12
+ import { CompactButton } from "@open-mercato/ui/primitives/compact-button";
13
+ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@open-mercato/ui/primitives/dialog";
14
+ import { ScrollArea } from "@open-mercato/ui/primitives/scroll-area";
15
+ import { SearchInput } from "@open-mercato/ui/primitives/search-input";
16
+ import { SegmentedControl, SegmentedControlItem } from "@open-mercato/ui/primitives/segmented-control";
17
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@open-mercato/ui/primitives/select";
18
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@open-mercato/ui/primitives/tabs";
19
+ import { marketingBrands, marketingProducts, marketingWorldMap, marketingActivityIcons } from "../assets/marketing-artwork.js";
20
+ const key = (name) => `design_system.gallery.samples.marketing.${name}`;
21
+ const chartColor = "var(--chart-orange)";
22
+ const palette = ["var(--chart-orange)", "var(--chart-amber)", "var(--chart-teal)", "var(--chart-cyan)", "var(--chart-violet)", "var(--chart-indigo)"];
23
+ function useMarketing() {
24
+ const t = useT();
25
+ const locale = useLocale();
26
+ const number = (value, digits = 0) => new Intl.NumberFormat(locale, { maximumFractionDigits: digits, minimumFractionDigits: digits }).format(value);
27
+ const money = (value) => new Intl.NumberFormat(locale, { style: "currency", currency: "USD", maximumFractionDigits: value % 1 ? 2 : 0 }).format(value);
28
+ const date = (value, options = { month: "short", day: "numeric", year: "numeric" }) => new Intl.DateTimeFormat(locale, { ...options, timeZone: "UTC" }).format(new Date(value));
29
+ return { t, locale, number, money, date };
30
+ }
31
+ function Trend({ value, badge = false, previous = false }) {
32
+ const { t, number } = useMarketing();
33
+ const label = `${value > 0 ? "+" : ""}${number(value, 1)}%`;
34
+ return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 whitespace-nowrap text-sm", children: [
35
+ badge ? /* @__PURE__ */ jsx(Badge, { appearance: "light", tone: value < 0 ? "error" : "success", size: 20, children: label }) : /* @__PURE__ */ jsx("span", { className: value < 0 ? "text-status-error-icon" : "text-status-success-icon", children: label }),
36
+ previous ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t(key("versusWeek")) }) : null
37
+ ] });
38
+ }
39
+ function MarketingFrame({ children, compact = false, tall = false, flush = false, className }) {
40
+ return /* @__PURE__ */ jsx(Card, { "data-slot": "marketing-widget", className: cn("relative w-88 max-w-full overflow-hidden rounded-xl border-0 bg-background ring-1 ring-inset ring-border shadow-xs", tall ? "h-196" : compact ? "h-44.5" : "h-95", flush ? "gap-0 p-0" : "gap-5 p-5", className), children });
41
+ }
42
+ function Header({ title, value, action, children, info = false, className }) {
43
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex h-14 shrink-0 items-start gap-2", className), children: [
44
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
45
+ /* @__PURE__ */ jsxs("h3", { className: "flex items-center gap-1 text-sm font-medium leading-5 text-muted-foreground", children: [
46
+ title,
47
+ info ? /* @__PURE__ */ jsx(Info, { "aria-hidden": "true", className: "size-3 shrink-0 text-text-disabled" }) : null
48
+ ] }),
49
+ /* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-2", children: [
50
+ /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-2xl font-medium leading-8 tracking-tight", children: value }),
51
+ children
52
+ ] })
53
+ ] }),
54
+ action
55
+ ] });
56
+ }
57
+ function Details({ title, children, label, className }) {
58
+ const { t } = useMarketing();
59
+ const [open, setOpen] = React.useState(false);
60
+ return /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange: setOpen, children: [
61
+ /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", className: cn("h-7 shrink-0 rounded-lg px-2.5 text-sm font-normal", className), children: /* @__PURE__ */ jsx(DialogTrigger, { children: label ?? t(key("details")) }) }),
62
+ /* @__PURE__ */ jsxs(DialogContent, { onKeyDownCapture: (event) => {
63
+ if (event.key === "Enter" && (event.ctrlKey || event.metaKey)) {
64
+ event.preventDefault();
65
+ setOpen(false);
66
+ }
67
+ }, children: [
68
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
69
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
70
+ /* @__PURE__ */ jsx(DialogDescription, { children: t(key("localData")) })
71
+ ] }),
72
+ /* @__PURE__ */ jsx(ScrollArea, { className: "max-h-96", scrollbarSize: "sm", children }),
73
+ /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => setOpen(false), children: t(key("close")) }) })
74
+ ] })
75
+ ] });
76
+ }
77
+ function Period({ value, onChange, compact = false }) {
78
+ const { t } = useMarketing();
79
+ return compact ? /* @__PURE__ */ jsxs(Select, { value, onValueChange: onChange, children: [
80
+ /* @__PURE__ */ jsx(SelectTrigger, { "aria-label": t(key("period")), className: "h-7 w-auto gap-2 rounded-lg px-2.5 text-sm", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
81
+ /* @__PURE__ */ jsx(SelectContent, { children: ["weekly", "monthly", "yearly"].map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option, children: t(key(option)) }, option)) })
82
+ ] }) : /* @__PURE__ */ jsx(SegmentedControl, { value, onValueChange: onChange, "aria-label": t(key("period")), className: "h-6 w-full shrink-0 rounded-sm bg-background p-0", children: ["1d", "1w", "1m", "3m", "1y"].map((option) => /* @__PURE__ */ jsx(SegmentedControlItem, { value: option, className: "h-6 flex-1 rounded-none border-r border-border p-0 text-xs last:border-0 data-[state=checked]:bg-muted data-[state=checked]:font-medium data-[state=checked]:shadow-none", children: t(key(`period${option}`)) }, option)) });
83
+ }
84
+ function Choices({ values, value, onChange, label }) {
85
+ const { t } = useMarketing();
86
+ return /* @__PURE__ */ jsx(SegmentedControl, { value, onValueChange: onChange, "aria-label": label, className: "h-7 max-w-full gap-2 rounded-none border-0 bg-transparent p-0", children: values.map((option) => /* @__PURE__ */ jsx(SegmentedControlItem, { value: option, className: "h-7 rounded-lg bg-muted px-2.5 text-sm font-normal data-[state=checked]:bg-accent-orange/10 data-[state=checked]:font-normal data-[state=checked]:text-accent-orange-text data-[state=checked]:shadow-none data-[state=unchecked]:bg-muted", children: t(key(option)) }, option)) });
87
+ }
88
+ function DataList({ rows }) {
89
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: rows.map((row) => /* @__PURE__ */ jsxs("div", { className: "flex min-h-5 items-center gap-2 text-sm text-muted-foreground", children: [
90
+ row.icon,
91
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1", children: row.label }),
92
+ /* @__PURE__ */ jsx("span", { children: row.value }),
93
+ row.detail ? /* @__PURE__ */ jsx("span", { className: "ml-3 flex w-18 items-center justify-end gap-1", children: row.detail }) : null
94
+ ] }, row.label)) });
95
+ }
96
+ const salesSeries = [28, 14, 33, 11, 57, 26, 57, 7, 42, 39, 24, 44, 31, 36, 15, 25, 13, 21, 41, 46, 15, 30, 24, 44, 18];
97
+ function TotalSales() {
98
+ const { t, money } = useMarketing();
99
+ const [period, setPeriod] = React.useState("1w");
100
+ const factor = { "1d": 0.4, "1w": 1, "1m": 2, "3m": 3, "1y": 7 }[period] ?? 1;
101
+ const rows = [{ label: t(key("onlineStore")), value: money(52.12 * factor), icon: /* @__PURE__ */ jsx(Store, { "aria-hidden": "true", className: "size-5" }), delta: 4.5 }, { label: "Facebook", value: money(38.45 * factor), icon: /* @__PURE__ */ jsx("img", { src: marketingBrands.facebook, alt: "", className: "size-5" }), delta: -2.8 }, { label: "Instagram", value: money(37.75 * factor), icon: /* @__PURE__ */ jsx("img", { src: marketingBrands.instagram, alt: "", className: "size-5" }), delta: 3.2 }].map((row) => ({ ...row, detail: /* @__PURE__ */ jsxs(Fragment, { children: [
102
+ /* @__PURE__ */ jsx(ArrowUp, { "aria-hidden": "true", className: cn("size-4", row.delta < 0 ? "rotate-180 text-status-error-icon" : "text-status-success-icon") }),
103
+ row.delta > 0 ? "+" : "",
104
+ row.delta,
105
+ "%"
106
+ ] }) }));
107
+ return /* @__PURE__ */ jsxs(MarketingFrame, { children: [
108
+ /* @__PURE__ */ jsx(Header, { title: t(key("totalSales")), value: money(128.32 * factor), action: /* @__PURE__ */ jsx(Details, { title: t(key("totalSales")), label: t(key("report")), children: /* @__PURE__ */ jsx(DataList, { rows }) }), children: /* @__PURE__ */ jsx(Trend, { value: 2, badge: true }) }),
109
+ /* @__PURE__ */ jsx(Period, { value: period, onChange: setPeriod }),
110
+ /* @__PURE__ */ jsx(ChartContainer, { config: { value: { label: t(key("sales")), color: chartColor } }, className: "h-27 min-h-0 w-full shrink-0", "aria-label": t(key("totalSales")), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(LineChart, { data: salesSeries.map((value, index) => ({ index, value: value * factor })), margin: { top: 0, right: 0, bottom: 0, left: 0 }, children: [
111
+ /* @__PURE__ */ jsx(CartesianGrid, { stroke: "var(--border)", strokeDasharray: "3 3" }),
112
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) }),
113
+ /* @__PURE__ */ jsx(Line, { dataKey: "value", type: "linear", stroke: chartColor, strokeWidth: 1.5, dot: false, isAnimationActive: false })
114
+ ] }) }) }),
115
+ /* @__PURE__ */ jsx(DataList, { rows })
116
+ ] });
117
+ }
118
+ function TotalVisitors() {
119
+ const { t, number } = useMarketing();
120
+ const values = [{ key: "desktop", value: 27, delta: -3.2, color: "bg-chart-amber" }, { key: "tablet", value: 12, delta: -6.4, color: "bg-chart-cyan" }, { key: "mobile", value: 61, delta: 0.8, color: "bg-chart-violet" }];
121
+ return /* @__PURE__ */ jsxs(MarketingFrame, { children: [
122
+ /* @__PURE__ */ jsx(Header, { title: t(key("totalVisitors")), value: number(237456), children: /* @__PURE__ */ jsx(Trend, { value: -1.4, badge: true }) }),
123
+ /* @__PURE__ */ jsx("div", { className: "flex min-h-0 flex-1 border-t border-border pt-5", children: values.map((item) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col border-r border-dashed border-border px-4 first:pl-0 last:border-0 last:pr-0", children: [
124
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t(key(item.key)) }),
125
+ /* @__PURE__ */ jsxs("p", { className: "mt-1 text-xl font-medium", children: [
126
+ item.value,
127
+ "%"
128
+ ] }),
129
+ /* @__PURE__ */ jsxs("span", { className: "mt-auto flex items-center gap-1 text-sm text-muted-foreground", children: [
130
+ item.delta > 0 ? "+" : "",
131
+ number(item.delta, 1),
132
+ "%",
133
+ item.delta < 0 ? /* @__PURE__ */ jsx(ArrowDownLeft, { "aria-hidden": "true", className: "size-3 text-status-error-icon" }) : /* @__PURE__ */ jsx(ArrowUpRight, { "aria-hidden": "true", className: "size-3 text-status-success-icon" })
134
+ ] }),
135
+ /* @__PURE__ */ jsx("span", { className: cn("mt-4 h-2 w-full rounded-sm", item.color) })
136
+ ] }, item.key)) })
137
+ ] });
138
+ }
139
+ function ConversionRate() {
140
+ const { t, number } = useMarketing();
141
+ const rows = [["addedToCart", 3842, 1.8], ["reachedCheckout", 1256, -1.2], ["purchased", 649, 2.4]];
142
+ const list = /* @__PURE__ */ jsx(DataList, { rows: rows.map(([label, value, delta]) => ({ label: t(key(label)), value: number(value), detail: /* @__PURE__ */ jsx(Trend, { value: delta }) })) });
143
+ const series = [12, 9, 6, 12, 3, 8, 7, 6, 23, 19, 28, 3, 14, 4].map((value, index) => ({ month: index, value, previous: value + 8 + index % 3 * 5 }));
144
+ return /* @__PURE__ */ jsxs(MarketingFrame, { children: [
145
+ /* @__PURE__ */ jsx(Header, { title: t(key("conversionRate")), value: `${number(16.9, 1)}%`, action: /* @__PURE__ */ jsx(Details, { title: t(key("conversionRate")), children: list }), children: /* @__PURE__ */ jsx(Trend, { value: 2.1, badge: true }) }),
146
+ /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-5", children: list }),
147
+ /* @__PURE__ */ jsx(ChartContainer, { config: { value: { label: t(key("purchased")), color: chartColor }, previous: { label: t(key("previousPeriod")), color: "var(--chart-orange)" } }, className: "min-h-0 flex-1", "aria-label": t(key("conversionRate")), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(AreaChart, { data: series, margin: { top: 0, right: 0, left: 0, bottom: 0 }, children: [
148
+ /* @__PURE__ */ jsx(CartesianGrid, { stroke: "var(--border)" }),
149
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) }),
150
+ /* @__PURE__ */ jsx(Area, { dataKey: "previous", stroke: "none", fill: chartColor, fillOpacity: 0.18, isAnimationActive: false }),
151
+ /* @__PURE__ */ jsx(Area, { dataKey: "value", stroke: "none", fill: chartColor, fillOpacity: 1, isAnimationActive: false })
152
+ ] }) }) }),
153
+ /* @__PURE__ */ jsx("div", { className: "-mt-3 flex justify-between text-overline text-muted-foreground", children: ["feb", "mar", "apr", "may", "jun", "jul"].map((month) => /* @__PURE__ */ jsx("span", { children: t(key(month)) }, month)) })
154
+ ] });
155
+ }
156
+ function Retention() {
157
+ const { t, number } = useMarketing();
158
+ const [selected, setSelected] = React.useState(null);
159
+ const cells = Array.from({ length: 12 }, (_, row) => Array.from({ length: 12 - row }, (_2, column) => ({ row, column, value: Math.max(8, 100 - row * 6 - column * 4 + row * column % 5 * 5) }))).flat();
160
+ return /* @__PURE__ */ jsxs(MarketingFrame, { children: [
161
+ /* @__PURE__ */ jsx(Header, { title: t(key("retention")), value: "24%", action: /* @__PURE__ */ jsx(Details, { title: t(key("retention")), children: /* @__PURE__ */ jsx(DataList, { rows: cells.filter((cell) => cell.column === 0).map((cell) => ({ label: t(key("month"), void 0, { month: cell.row + 1 }), value: `${cell.value}%` })) }) }), children: /* @__PURE__ */ jsx(Trend, { value: 2, badge: true }) }),
162
+ /* @__PURE__ */ jsx("div", { className: "grid h-48 shrink-0 grid-cols-12 grid-rows-12 gap-0.5", role: "group", "aria-label": t(key("retentionCohorts")), children: cells.map((cell) => /* @__PURE__ */ jsx("button", { type: "button", "aria-label": t(key("cohortCell"), void 0, { cohort: cell.row + 1, month: cell.column + 1, value: cell.value }), "aria-pressed": selected?.[0] === cell.row && selected?.[1] === cell.column, className: "min-h-0 min-w-0 bg-chart-orange outline-none focus-visible:ring-2 focus-visible:ring-foreground focus-visible:ring-offset-1", style: { gridRow: cell.row + 1, gridColumn: cell.column + 1, opacity: cell.value / 100 }, onClick: () => setSelected([cell.row, cell.column]) }, `${cell.row}-${cell.column}`)) }),
163
+ /* @__PURE__ */ jsx("div", { className: "-mt-3 grid grid-cols-12 text-center text-overline text-muted-foreground", children: Array.from({ length: 12 }, (_, index) => /* @__PURE__ */ jsx("span", { children: index + 1 }, index)) }),
164
+ /* @__PURE__ */ jsxs("p", { "aria-live": "polite", className: "mt-auto flex h-7 items-center gap-2 rounded-lg border border-border px-2 text-xs text-muted-foreground", children: [
165
+ /* @__PURE__ */ jsx(Info, { "aria-hidden": "true", className: "size-3 shrink-0" }),
166
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: selected ? t(key("cohortCell"), void 0, { cohort: selected[0] + 1, month: selected[1] + 1, value: number(cells.find((cell) => cell.row === selected[0] && cell.column === selected[1])?.value ?? 0) }) : t(key("retentionUpdated")) })
167
+ ] })
168
+ ] });
169
+ }
170
+ function WeeklyVisitors() {
171
+ const { t, number } = useMarketing();
172
+ const values = ["happiness", "sadness", "anger", "fear", "surprise", "disgust", "love", "excitement"];
173
+ const [series, setSeries] = React.useState({ fresh: true, returning: true });
174
+ return /* @__PURE__ */ jsxs(MarketingFrame, { className: "gap-4", children: [
175
+ /* @__PURE__ */ jsx(Header, { title: t(key("weeklyVisitors")), value: number(16008), children: /* @__PURE__ */ jsx(Trend, { value: 1.1, badge: true }) }),
176
+ /* @__PURE__ */ jsx("div", { className: "flex h-7 shrink-0 rounded-lg border border-border", children: ["fresh", "returning"].map((item, index) => /* @__PURE__ */ jsxs(Button, { variant: "ghost", "aria-pressed": series[item], onClick: () => setSeries((current) => ({ ...current, [item]: !current[item] })), className: "h-7 min-w-0 flex-1 gap-2 p-0 text-xs font-normal", children: [
177
+ /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full", index ? "bg-chart-emerald" : "bg-chart-orange", !series[item] && "opacity-30") }),
178
+ t(key(item === "fresh" ? "newVisitors" : "returningVisitors"))
179
+ ] }, item)) }),
180
+ /* @__PURE__ */ jsx(ChartContainer, { config: { fresh: { label: t(key("newVisitors")), color: chartColor }, returning: { label: t(key("returningVisitors")), color: "var(--chart-emerald)" } }, className: "min-h-0 flex-1", "aria-label": t(key("weeklyVisitors")), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(RadarChart, { data: values.map((label, index) => ({ label: t(key(label)), fresh: [76, 39, 84, 72, 40, 70, 74, 32][index], returning: [43, 75, 39, 40, 0, 54, 39, 75][index] })), outerRadius: "62%", children: [
181
+ /* @__PURE__ */ jsx(PolarGrid, { stroke: "var(--border)" }),
182
+ /* @__PURE__ */ jsx(PolarAngleAxis, { dataKey: "label", tick: { fontSize: 11, fill: "var(--muted-foreground)" } }),
183
+ series.fresh ? /* @__PURE__ */ jsx(Radar, { name: t(key("newVisitors")), dataKey: "fresh", stroke: chartColor, fill: chartColor, fillOpacity: 0.08, dot: { r: 2 }, isAnimationActive: false }) : null,
184
+ series.returning ? /* @__PURE__ */ jsx(Radar, { name: t(key("returningVisitors")), dataKey: "returning", stroke: "var(--chart-emerald)", fill: "var(--chart-emerald)", fillOpacity: 0.08, dot: { r: 2 }, isAnimationActive: false }) : null,
185
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) })
186
+ ] }) }) })
187
+ ] });
188
+ }
189
+ function ChannelRows({ marketing = false }) {
190
+ const { t, money, number } = useMarketing();
191
+ const names = marketing ? ["acquisition", "conversion", "roi"] : ["Facebook", "Instagram", "Google"];
192
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
193
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center text-xs text-muted-foreground", children: [
194
+ /* @__PURE__ */ jsx("span", { className: "flex-1", children: t(key("channels")) }),
195
+ /* @__PURE__ */ jsx("span", { className: "w-22", children: t(key(marketing ? "metric" : "percent")) }),
196
+ /* @__PURE__ */ jsx("span", { className: "w-12", children: t(key("total")) })
197
+ ] }),
198
+ names.map((name, index) => /* @__PURE__ */ jsxs("div", { className: "flex h-5 items-center gap-2 text-sm text-muted-foreground", children: [
199
+ marketing ? index === 0 ? /* @__PURE__ */ jsx(UserRound, { "aria-hidden": "true", className: "size-5" }) : index === 1 ? /* @__PURE__ */ jsx(Clock3, { "aria-hidden": "true", className: "size-5" }) : /* @__PURE__ */ jsx(Target, { "aria-hidden": "true", className: "size-5" }) : /* @__PURE__ */ jsx("img", { src: marketingBrands[name.toLowerCase()], alt: "", className: "size-5" }),
200
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1", children: marketing ? t(key(name)) : name }),
201
+ /* @__PURE__ */ jsx("span", { className: "w-18", children: marketing ? [money(38.25), t(key("days"), void 0, { count: 4.2 }), "324%"][index] : `${[28, 23, 32][index]}%` }),
202
+ /* @__PURE__ */ jsx("span", { className: "w-12 text-right", children: marketing ? /* @__PURE__ */ jsx(Trend, { value: [5.2, 3.8, 4.5][index] }) : number([6958, 5716, 7952][index]) })
203
+ ] }, name))
204
+ ] });
205
+ }
206
+ function Channels({ marketing = false }) {
207
+ const { t } = useMarketing();
208
+ const title = t(key(marketing ? "marketingChannels" : "visitorChannels"));
209
+ return /* @__PURE__ */ jsxs(MarketingFrame, { children: [
210
+ /* @__PURE__ */ jsx(Header, { title, info: marketing, value: marketing ? "82%" : "78%", action: marketing ? /* @__PURE__ */ jsx(Details, { title, children: /* @__PURE__ */ jsx(ChannelRows, { marketing: true }) }) : void 0, children: /* @__PURE__ */ jsx(Trend, { value: marketing ? 2.1 : -0.4, badge: !marketing, previous: marketing }) }),
211
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
212
+ /* @__PURE__ */ jsx("div", { className: "flex h-2 gap-1", children: [41, 41, 16].map((width, index) => /* @__PURE__ */ jsx("span", { className: "rounded-sm", style: { width: `${width}%`, background: marketing ? palette[index] : ["var(--chart-amber)", "var(--chart-cyan)", "var(--chart-violet)"][index] } }, index)) }),
213
+ /* @__PURE__ */ jsx("div", { className: "flex justify-between gap-1 text-xs text-muted-foreground", children: (marketing ? ["organicSearch", "socialMedia", "direct"] : ["organic", "referral", "direct"]).map((name, index) => /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
214
+ /* @__PURE__ */ jsx("span", { className: "size-2 shrink-0 rounded-full", style: { background: marketing ? palette[index] : ["var(--chart-amber)", "var(--chart-cyan)", "var(--chart-violet)"][index] } }),
215
+ t(key(name))
216
+ ] }, name)) })
217
+ ] }),
218
+ /* @__PURE__ */ jsx("div", { className: cn("border-t border-border pt-5", marketing && "border-dashed"), children: /* @__PURE__ */ jsx(ChannelRows, { marketing }) }),
219
+ /* @__PURE__ */ jsx(Details, { title, label: t(key("viewReports")), className: "mt-auto h-8 w-full", children: /* @__PURE__ */ jsx(ChannelRows, { marketing }) })
220
+ ] });
221
+ }
222
+ const mapPoints = [{ key: "greenland", x: 161, y: 7, visitors: 1032 }, { key: "usa", x: 80, y: 69, visitors: 8530 }, { key: "brazil", x: 129, y: 126, visitors: 3240 }, { key: "turkey", x: 222, y: 110, visitors: 6504 }, { key: "china", x: 276, y: 57, visitors: 9322 }];
223
+ function Geography() {
224
+ const { t, number } = useMarketing();
225
+ const [selected, setSelected] = React.useState("turkey");
226
+ const [zoom, setZoom] = React.useState(1);
227
+ const place = mapPoints.find((point) => point.key === selected) ?? mapPoints[3];
228
+ return /* @__PURE__ */ jsxs(MarketingFrame, { className: "gap-4", children: [
229
+ /* @__PURE__ */ jsx(Header, { title: t(key("geography")), value: number(place.visitors), action: /* @__PURE__ */ jsx(Details, { title: t(key("geography")), children: /* @__PURE__ */ jsx(DataList, { rows: mapPoints.map((point) => ({ label: t(key(point.key)), value: number(point.visitors) })) }) }), children: /* @__PURE__ */ jsxs("span", { className: "flex h-6 items-center gap-1 rounded-sm border border-border px-1 text-xs text-muted-foreground", children: [
230
+ selected === "turkey" ? /* @__PURE__ */ jsx("img", { src: marketingBrands.turkey, alt: "", className: "size-4" }) : null,
231
+ t(key(selected))
232
+ ] }) }),
233
+ /* @__PURE__ */ jsx("div", { className: "flex h-7 shrink-0 items-center justify-around rounded-lg border border-border text-xs text-muted-foreground", children: ["men", "women", "other"].map((item, index) => /* @__PURE__ */ jsxs("span", { children: [
234
+ t(key(item)),
235
+ " ",
236
+ /* @__PURE__ */ jsxs("span", { className: "text-foreground", children: [
237
+ [32, 60, 8][index],
238
+ "%"
239
+ ] })
240
+ ] }, item)) }),
241
+ /* @__PURE__ */ jsxs("div", { "data-slot": "marketing-map", className: "relative h-56 w-full shrink-0 overflow-hidden", children: [
242
+ /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 origin-center transition-transform", style: { transform: `scale(${zoom})` }, children: [
243
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "absolute left-0 top-0 h-56 w-83 bg-text-disabled", style: { maskImage: `url("${marketingWorldMap}")`, WebkitMaskImage: `url("${marketingWorldMap}")`, maskSize: "100% 100%", WebkitMaskSize: "100% 100%" } }),
244
+ mapPoints.map((point) => /* @__PURE__ */ jsx("button", { type: "button", "aria-label": t(key(point.key)), "aria-pressed": selected === point.key, onClick: () => setSelected(point.key), style: { left: `${point.x / 312 * 100}%`, top: `${point.y / 224 * 100}%` }, className: cn("absolute flex size-4 items-center justify-center rounded-full bg-background ring-1 ring-inset ring-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground", selected === point.key && "bg-accent-orange ring-4 ring-accent-orange/20"), children: /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full", selected === point.key ? "bg-accent-orange-foreground" : "bg-text-disabled") }) }, point.key))
245
+ ] }),
246
+ /* @__PURE__ */ jsxs("div", { className: "absolute bottom-0 left-0 flex flex-col gap-2", children: [
247
+ /* @__PURE__ */ jsx(CompactButton, { "aria-label": t(key("zoomIn")), disabled: zoom >= 2, onClick: () => setZoom((current) => Math.min(2, current + 0.25)), children: /* @__PURE__ */ jsx(Plus, { "aria-hidden": "true" }) }),
248
+ /* @__PURE__ */ jsx(CompactButton, { "aria-label": t(key("zoomOut")), disabled: zoom <= 1, onClick: () => setZoom((current) => Math.max(1, current - 0.25)), children: /* @__PURE__ */ jsx(Minus, { "aria-hidden": "true" }) })
249
+ ] }),
250
+ /* @__PURE__ */ jsx(CompactButton, { className: "absolute bottom-0 right-0", "aria-label": t(key("resetMap")), onClick: () => {
251
+ setZoom(1);
252
+ setSelected("turkey");
253
+ }, children: /* @__PURE__ */ jsx(Code, { "aria-hidden": "true" }) })
254
+ ] })
255
+ ] });
256
+ }
257
+ function RealtimeVisitors() {
258
+ const { t, number } = useMarketing();
259
+ return /* @__PURE__ */ jsxs(MarketingFrame, { children: [
260
+ /* @__PURE__ */ jsx(Header, { title: t(key("realtimeVisitors")), value: t(key("millions"), void 0, { value: number(32.6, 1) }), children: /* @__PURE__ */ jsx(Trend, { value: 8.4, badge: true }) }),
261
+ /* @__PURE__ */ jsxs("div", { className: "relative h-39 shrink-0", "aria-label": t(key("regionalVisitors")), children: [
262
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -ml-10.5 -mt-9.5 flex size-20 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-chart-emerald/25 text-xl text-status-success-foreground", children: "20%" }),
263
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 ml-10 mt-1 flex size-33 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-chart-orange/25 text-title-4 font-medium text-accent-orange-text", children: "48%" }),
264
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -ml-14.5 mt-7.5 flex size-24 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-chart-amber/25 text-2xl font-medium text-status-warning-foreground", children: "32%" })
265
+ ] }),
266
+ /* @__PURE__ */ jsx(DataList, { rows: ["europe", "asia", "americas"].map((region, index) => ({ label: t(key(region)), value: t(key("millions"), void 0, { value: number([15.8, 10.2, 6.6][index], 1) }), icon: /* @__PURE__ */ jsx("span", { className: "ml-1 size-2 rounded-full", style: { background: [palette[0], palette[1], "var(--chart-emerald)"][index] } }), detail: /* @__PURE__ */ jsxs(Fragment, { children: [
267
+ /* @__PURE__ */ jsx(ArrowUpRight, { "aria-hidden": "true", className: cn("size-4", index === 1 ? "rotate-90 text-status-error-icon" : "text-status-success-icon") }),
268
+ "+",
269
+ number([4.7, 6.2, 3.8][index], 1),
270
+ "%"
271
+ ] }) })) })
272
+ ] });
273
+ }
274
+ function ProductPerformance() {
275
+ const { t, number } = useMarketing();
276
+ const [period, setPeriod] = React.useState("1w");
277
+ const factor = period === "1w" ? 1 : period === "1d" ? 0.6 : 0.85;
278
+ return /* @__PURE__ */ jsxs(MarketingFrame, { children: [
279
+ /* @__PURE__ */ jsx(Header, { title: t(key("productPerformance")), value: `${number(22.8 * factor, 1)}%`, children: /* @__PURE__ */ jsx(Trend, { value: 8.4, badge: true }) }),
280
+ /* @__PURE__ */ jsx(Period, { value: period, onChange: setPeriod }),
281
+ /* @__PURE__ */ jsx("div", { className: "flex h-39.5 shrink-0 items-end gap-2.5", "aria-label": t(key("productPerformance")), children: [50, 80, 100, 60, 40].map((value, index) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-center justify-between rounded-lg bg-chart-orange px-1 py-2 text-xs font-medium text-accent-orange-foreground", style: { height: `${value * factor}%` }, children: [
282
+ /* @__PURE__ */ jsxs("span", { children: [
283
+ Math.round(value * factor),
284
+ "%"
285
+ ] }),
286
+ /* @__PURE__ */ jsx("span", { children: String.fromCharCode(65 + index) })
287
+ ] }, index)) }),
288
+ /* @__PURE__ */ jsx("div", { className: "flex flex-1", children: ["averageRating", "satisfaction", "returnRate"].map((name, index) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-center justify-center border-r border-border last:border-0", children: [
289
+ /* @__PURE__ */ jsx("p", { className: "text-base font-medium text-muted-foreground", children: [number(4.7, 1), "92%", `${number(4.2, 1)}%`][index] }),
290
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: t(key(name)) })
291
+ ] }, name)) })
292
+ ] });
293
+ }
294
+ const productData = [{ image: 0, name: "Apple Watch S5 GPS 40MM", count: 500 }, { image: 4, name: "AirPods Max Green", count: 960 }, { image: 6, name: "iMac M1 24-inch Purple", count: 45 }, { image: 8, name: "iPhone 15 Pro 512GB", count: 150 }, { image: 1, name: "MacBook Air", count: 380 }, { image: 3, name: "AirPods Pro", count: 780 }];
295
+ function ProductRows({ query = "" }) {
296
+ const { t, number } = useMarketing();
297
+ const matches = productData.filter((product) => product.name.toLocaleLowerCase().includes(query.toLocaleLowerCase()));
298
+ return matches.length ? /* @__PURE__ */ jsx("div", { children: matches.map((product) => /* @__PURE__ */ jsxs("div", { className: "flex min-h-17 items-center gap-3 border-b border-border px-5 py-3 last:border-0", children: [
299
+ /* @__PURE__ */ jsx("img", { src: marketingProducts[product.image].src, alt: "", className: "size-8 shrink-0 object-contain" }),
300
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
301
+ /* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium", children: product.name }),
302
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: t(key("unitsSold"), void 0, { count: number(product.count) }) })
303
+ ] })
304
+ ] }, product.name)) }) : /* @__PURE__ */ jsx("p", { role: "status", className: "p-5 text-sm text-muted-foreground", children: t(key("noProducts")) });
305
+ }
306
+ function MyProducts() {
307
+ const { t, number } = useMarketing();
308
+ const [query, setQuery] = React.useState("");
309
+ return /* @__PURE__ */ jsxs(MarketingFrame, { flush: true, children: [
310
+ /* @__PURE__ */ jsx(Header, { title: t(key("myProducts")), info: true, value: number(468), className: "h-23 px-5 py-5", action: /* @__PURE__ */ jsx(Details, { title: t(key("myProducts")), label: t(key("seeAll")), children: /* @__PURE__ */ jsx(ProductRows, { query }) }), children: /* @__PURE__ */ jsx(Trend, { value: 2.1, previous: true }) }),
311
+ /* @__PURE__ */ jsx("div", { className: "border-y border-border px-5", children: /* @__PURE__ */ jsx(SearchInput, { "aria-label": t(key("searchProducts")), placeholder: t(key("searchProducts")), value: query, onChange: setQuery, className: "h-11 rounded-none border-0 px-0 shadow-none" }) }),
312
+ /* @__PURE__ */ jsx(ScrollArea, { className: "min-h-0 flex-1", scrollbarSize: "xs", children: /* @__PURE__ */ jsx(ProductRows, { query }) })
313
+ ] });
314
+ }
315
+ function ShippingTracking() {
316
+ const { t, number, date } = useMarketing();
317
+ const [period, setPeriod] = React.useState("weekly");
318
+ const [status, setStatus] = React.useState("delivered");
319
+ const [product, setProduct] = React.useState(0);
320
+ const factor = (status === "delivered" ? 1 : status === "inTransit" ? 0.55 : 0.2) * (period === "weekly" ? 1 : period === "monthly" ? 3 : 12);
321
+ const data = [0, 10, 44, 59, 0, 29, 0, 0, 45, 29, 29, 10, 29, 29, 0, 59, 29, 29].map((value, index) => ({ day: date(`2024-02-${String(19 + Math.floor(index / 3)).padStart(2, "0")}T00:00:00Z`, { weekday: "short" }), value: (value + product * 3) * factor }));
322
+ return /* @__PURE__ */ jsxs(MarketingFrame, { flush: true, children: [
323
+ /* @__PURE__ */ jsxs("div", { className: "flex h-35 shrink-0 flex-col gap-4 p-5", children: [
324
+ /* @__PURE__ */ jsx(Header, { title: t(key("shippingTracking")), value: number(Math.round(3844 * factor)), info: true, action: /* @__PURE__ */ jsx(Period, { compact: true, value: period, onChange: setPeriod }), children: /* @__PURE__ */ jsx(Trend, { value: 1.8, badge: true }) }),
325
+ /* @__PURE__ */ jsx(Choices, { values: ["delivered", "inTransit", "returned"], value: status, onChange: setStatus, label: t(key("shippingStatus")) })
326
+ ] }),
327
+ /* @__PURE__ */ jsxs("div", { className: "flex h-12 shrink-0 items-center gap-2 border-y border-border px-5", children: [
328
+ /* @__PURE__ */ jsx("img", { src: marketingProducts[product].src, alt: "", className: "size-6" }),
329
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-muted-foreground", children: marketingProducts[product].name }),
330
+ /* @__PURE__ */ jsxs("div", { className: "flex", children: [
331
+ /* @__PURE__ */ jsx(CompactButton, { "aria-label": t(key("previousProduct")), onClick: () => setProduct((current) => (current + marketingProducts.length - 1) % marketingProducts.length), children: /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": "true" }) }),
332
+ /* @__PURE__ */ jsx(CompactButton, { "aria-label": t(key("nextProduct")), onClick: () => setProduct((current) => (current + 1) % marketingProducts.length), children: /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true" }) })
333
+ ] })
334
+ ] }),
335
+ /* @__PURE__ */ jsx(ChartContainer, { config: { value: { label: t(key(status)), color: chartColor } }, className: "min-h-0 flex-1", "aria-label": t(key("shippingTracking")), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(LineChart, { data, margin: { top: 0, right: 20, left: 20, bottom: 0 }, children: [
336
+ /* @__PURE__ */ jsx(CartesianGrid, { stroke: "var(--border)" }),
337
+ /* @__PURE__ */ jsx(XAxis, { dataKey: "day", interval: 2, tickLine: false, axisLine: false, tick: { fontSize: 12, fill: "var(--muted-foreground)" } }),
338
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) }),
339
+ /* @__PURE__ */ jsx(Line, { type: "stepAfter", dataKey: "value", dot: false, stroke: chartColor, strokeWidth: 1.5, isAnimationActive: false })
340
+ ] }) }) })
341
+ ] });
342
+ }
343
+ function ProductCategories() {
344
+ const { t, number } = useMarketing();
345
+ const [category, setCategory] = React.useState(0);
346
+ const categories = ["accessories", "computers", "audio"];
347
+ const percentage = [58, 72, 34][category];
348
+ const details = /* @__PURE__ */ jsx(DataList, { rows: categories.map((name, index) => ({ label: t(key(name)), value: t(key("productsCount"), void 0, { count: [45, 32, 18][index] }) })) });
349
+ return /* @__PURE__ */ jsxs(MarketingFrame, { compact: true, className: "gap-4", children: [
350
+ /* @__PURE__ */ jsx(Header, { title: t(key("productCategories")), value: `${percentage}%`, info: true, action: /* @__PURE__ */ jsx(Details, { title: t(key("productCategories")), children: details }), children: /* @__PURE__ */ jsx(Trend, { value: 2.1, previous: true }) }),
351
+ /* @__PURE__ */ jsx("div", { className: "flex h-7.5 shrink-0 gap-0.5", role: "meter", "aria-label": t(key("productCategories")), "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percentage, children: Array.from({ length: 36 }, (_, index) => /* @__PURE__ */ jsx("span", { className: cn("min-w-0 flex-1", index < Math.round(percentage / 100 * 36) ? "bg-chart-orange" : "bg-border") }, index)) }),
352
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-5 items-center gap-2 text-sm text-muted-foreground", children: [
353
+ /* @__PURE__ */ jsx("span", { children: t(key(categories[category])) }),
354
+ /* @__PURE__ */ jsxs("div", { className: "flex", children: [
355
+ /* @__PURE__ */ jsx(CompactButton, { "aria-label": t(key("previousCategory")), onClick: () => setCategory((current) => (current + 2) % 3), children: /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": "true" }) }),
356
+ /* @__PURE__ */ jsx(CompactButton, { "aria-label": t(key("nextCategory")), onClick: () => setCategory((current) => (current + 1) % 3), children: /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true" }) })
357
+ ] }),
358
+ /* @__PURE__ */ jsx("span", { className: "ml-auto whitespace-nowrap", children: t(key("productsCount"), void 0, { count: number([45, 32, 18][category]) }) }),
359
+ /* @__PURE__ */ jsx(Trend, { value: 3.2 })
360
+ ] })
361
+ ] });
362
+ }
363
+ function CustomerSegments() {
364
+ const { t, money } = useMarketing();
365
+ const data = [{ label: "premium", value: 32, amount: 9450 }, { label: "regular", value: 46, amount: 8320 }, { label: "new", value: 20, amount: 3280 }];
366
+ return /* @__PURE__ */ jsxs(MarketingFrame, { compact: true, children: [
367
+ /* @__PURE__ */ jsxs("div", { className: "flex h-5 shrink-0 items-center justify-between gap-2", children: [
368
+ /* @__PURE__ */ jsxs("h3", { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground", children: [
369
+ t(key("customerSegments")),
370
+ /* @__PURE__ */ jsx(Info, { "aria-hidden": "true", className: "size-3 text-text-disabled" })
371
+ ] }),
372
+ /* @__PURE__ */ jsx(Trend, { value: 5.8, previous: true })
373
+ ] }),
374
+ /* @__PURE__ */ jsxs("div", { className: "flex h-25 items-center gap-5", children: [
375
+ /* @__PURE__ */ jsx(ChartContainer, { config: Object.fromEntries(data.map((item, index) => [item.label, { label: t(key(item.label)), color: palette[index] }])), className: "size-25 shrink-0", "aria-label": t(key("customerSegments")), children: /* @__PURE__ */ jsxs(PieChart, { width: 100, height: 100, children: [
376
+ /* @__PURE__ */ jsx(Pie, { data, dataKey: "value", nameKey: "label", cx: 45, cy: 45, innerRadius: 34, outerRadius: 49, paddingAngle: 3, stroke: "none", startAngle: 90, endAngle: 450, isAnimationActive: false, children: data.map((item, index) => /* @__PURE__ */ jsx(Cell, { fill: palette[index] }, item.label)) }),
377
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) })
378
+ ] }) }),
379
+ /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: data.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
380
+ /* @__PURE__ */ jsx("span", { className: "size-2 shrink-0 rounded-full", style: { background: palette[index] } }),
381
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: t(key(item.label)) }),
382
+ /* @__PURE__ */ jsx("span", { children: money(item.amount) }),
383
+ /* @__PURE__ */ jsxs("span", { className: "text-xs", children: [
384
+ item.value,
385
+ "%"
386
+ ] })
387
+ ] }, item.label)) })
388
+ ] })
389
+ ] });
390
+ }
391
+ function SalesChannels() {
392
+ const { t, number, date } = useMarketing();
393
+ const [period, setPeriod] = React.useState("weekly");
394
+ const multiplier = period === "weekly" ? 1 : period === "monthly" ? 4 : 52;
395
+ return /* @__PURE__ */ jsxs(MarketingFrame, { compact: true, className: "gap-4", children: [
396
+ /* @__PURE__ */ jsx(Header, { title: t(key("salesChannels")), value: number(246 * multiplier), info: true, action: /* @__PURE__ */ jsx(Period, { compact: true, value: period, onChange: setPeriod }), children: /* @__PURE__ */ jsx(Trend, { value: 2.1, previous: true }) }),
397
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
398
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-between text-xs text-muted-foreground", children: [
399
+ /* @__PURE__ */ jsx("span", { children: date("2024-02-21T00:00:00Z") }),
400
+ /* @__PURE__ */ jsx("span", { children: date(period === "weekly" ? "2024-02-28T00:00:00Z" : period === "monthly" ? "2024-03-21T00:00:00Z" : "2025-02-21T00:00:00Z") })
401
+ ] }),
402
+ /* @__PURE__ */ jsx("div", { className: "flex h-10.5 gap-1", "aria-label": t(key("salesChannels")), children: [26, 21, 16, 13, 10, 5, 2].map((width, index) => /* @__PURE__ */ jsx("span", { className: "rounded-sm", style: { flex: width, background: ["var(--chart-indigo)", "var(--chart-cyan)", "var(--chart-violet)", "var(--chart-orange)", "var(--chart-amber)", "var(--chart-emerald)", "var(--chart-teal)"][index] } }, index)) })
403
+ ] })
404
+ ] });
405
+ }
406
+ function CampaignData() {
407
+ const { t, money } = useMarketing();
408
+ return /* @__PURE__ */ jsxs(MarketingFrame, { compact: true, flush: true, children: [
409
+ /* @__PURE__ */ jsx(Header, { title: t(key("campaignData")), value: money(1750), info: true, className: "h-23.5 px-5 py-5", action: /* @__PURE__ */ jsx(Details, { title: t(key("campaignData")), children: /* @__PURE__ */ jsx(DataList, { rows: [{ label: t(key("campaignBudget")), value: money(1750) }, { label: t(key("usedBudget")), value: money(32900) }, { label: t(key("campaignProgress")), value: "45%" }] }) }), children: /* @__PURE__ */ jsx(Badge, { size: 20, appearance: "lighter", tone: "success", children: t(key("lastDays"), void 0, { count: 15 }) }) }),
410
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 border-t border-border", children: [
411
+ /* @__PURE__ */ jsx(ChartContainer, { config: { value: { label: t(key("campaignData")), color: chartColor } }, className: "w-44 min-w-0 shrink-0 border-r border-accent-orange-border", "aria-label": t(key("campaignData")), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(AreaChart, { data: salesSeries.slice(0, 18).map((value, index) => ({ index, value: value + index * 2 })), margin: { top: 0, left: 0, right: 0, bottom: 0 }, children: [
412
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) }),
413
+ /* @__PURE__ */ jsx(Area, { dataKey: "value", type: "linear", stroke: chartColor, strokeWidth: 1.5, fill: chartColor, fillOpacity: 0.18, isAnimationActive: false })
414
+ ] }) }) }),
415
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-end p-4", children: [
416
+ /* @__PURE__ */ jsx("p", { className: "text-base font-medium", children: "45%" }),
417
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t(key("budgetUsed"), void 0, { amount: money(32900) }) })
418
+ ] })
419
+ ] })
420
+ ] });
421
+ }
422
+ const ticketSamples = [{ name: "James Brown", status: "solved", minutes: 12, priority: "high", id: 98745 }, { name: "Sophia Williams", status: "inProgress", minutes: 48, priority: "medium", id: 98744 }, { name: "Matthew Johnson", status: "pending", minutes: 19, priority: "low", id: 98743 }];
423
+ function SupportAnalytics() {
424
+ const { t, number, date } = useMarketing();
425
+ const [period, setPeriod] = React.useState("weekly");
426
+ const [category, setCategory] = React.useState("technical");
427
+ const [tab, setTab] = React.useState("allTickets");
428
+ const [tickets, setTickets] = React.useState(ticketSamples);
429
+ const [selected, setSelected] = React.useState(null);
430
+ const factor = (["technical", "billing", "account", "product"].indexOf(category) + 4) / 4 * (period === "weekly" ? 1 : period === "monthly" ? 4 : 52);
431
+ const current = tickets.find((ticket) => ticket.id === selected);
432
+ const visible = tickets.filter((ticket) => tab === "allTickets" || (tab === "openTickets" ? ticket.status !== "solved" : ticket.status === "solved"));
433
+ const metrics = [{ label: "firstResponse", detail: "belowSla", value: t(key("minutes"), void 0, { count: Math.round(15 * factor) }), delta: -22 }, { label: "resolutionTime", detail: "meetingSla", value: t(key("minutes"), void 0, { count: Math.round(48 * factor) }), delta: -18 }, { label: "csat", detail: "aboveTarget", value: "4.8/5", delta: -0.3 }];
434
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
435
+ /* @__PURE__ */ jsxs(MarketingFrame, { tall: true, flush: true, children: [
436
+ /* @__PURE__ */ jsxs("div", { className: "flex h-34 shrink-0 flex-col gap-3 p-5", children: [
437
+ /* @__PURE__ */ jsxs(Header, { title: t(key("supportAnalytics")), value: number(Math.round(2450 * factor)), info: true, action: /* @__PURE__ */ jsx(Period, { compact: true, value: period, onChange: setPeriod }), children: [
438
+ /* @__PURE__ */ jsx(Trend, { value: 5.4 }),
439
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: t(key("totalTickets")) })
440
+ ] }),
441
+ /* @__PURE__ */ jsx(Choices, { values: ["technical", "billing", "account", "product"], value: category, onChange: setCategory, label: t(key("ticketCategory")) })
442
+ ] }),
443
+ /* @__PURE__ */ jsx(ChartContainer, { config: { value: { label: t(key("responseTime")), color: chartColor } }, className: "h-44 shrink-0 border-y border-border px-3 pt-4", "aria-label": t(key("responseTime")), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(BarChart, { data: [10, 34, 44, 58, 44, 34, 34].map((value, index) => ({ day: date(`2024-02-${19 + index}T00:00:00Z`, { weekday: "short" }), value: Math.round(value * factor) })), margin: { top: 0, right: 0, left: 0, bottom: 0 }, children: [
444
+ /* @__PURE__ */ jsx(XAxis, { dataKey: "day", axisLine: false, tickLine: false, tick: { fontSize: 12, fill: "var(--muted-foreground)" } }),
445
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {}) }),
446
+ /* @__PURE__ */ jsx(ReferenceLine, { y: 30 * factor, stroke: "var(--muted-foreground)", strokeDasharray: "4 4", label: { value: t(key("targetMinutes"), void 0, { count: 30 }), fill: "var(--foreground)", fontSize: 12, position: "insideTopLeft" } }),
447
+ /* @__PURE__ */ jsx(Bar, { dataKey: "value", radius: [6, 6, 6, 6], isAnimationActive: false, children: Array.from({ length: 7 }, (_, index) => /* @__PURE__ */ jsx(Cell, { fill: index === 4 ? chartColor : "var(--border)" }, index)) })
448
+ ] }) }) }),
449
+ /* @__PURE__ */ jsxs(Tabs, { value: tab, onValueChange: setTab, variant: "underline", className: "min-h-0 flex-1 gap-0", children: [
450
+ /* @__PURE__ */ jsxs(TabsList, { className: "h-12 w-full shrink-0 justify-start gap-4 px-5", children: [
451
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "allTickets", className: "min-w-0 flex-auto justify-center px-0 text-sm font-normal data-[state=active]:border-accent-orange-border hover:text-accent-orange-text", children: t(key("allTickets")) }),
452
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "openTickets", className: "min-w-0 flex-auto justify-center px-0 text-sm font-normal data-[state=active]:border-accent-orange-border hover:text-accent-orange-text", children: t(key("openTickets")) }),
453
+ /* @__PURE__ */ jsx(TabsTrigger, { value: "solvedTickets", className: "min-w-0 flex-auto justify-center px-0 text-sm font-normal data-[state=active]:border-accent-orange-border hover:text-accent-orange-text", children: t(key("solvedTickets")) })
454
+ ] }),
455
+ ["allTickets", "openTickets", "solvedTickets"].map((value) => /* @__PURE__ */ jsxs(TabsContent, { value, className: "m-0 flex min-h-0 flex-1 flex-col", children: [
456
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-col gap-4 px-5 pb-5 pt-4", children: [
457
+ /* @__PURE__ */ jsxs("div", { className: "flex text-xs text-muted-foreground", children: [
458
+ /* @__PURE__ */ jsx("span", { className: "flex-1", children: t(key("channels")) }),
459
+ /* @__PURE__ */ jsx("span", { className: "w-18", children: t(key("actual")) }),
460
+ /* @__PURE__ */ jsx("span", { className: "w-10", children: t(key("average")) })
461
+ ] }),
462
+ metrics.map((metric, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center text-sm", children: [
463
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
464
+ /* @__PURE__ */ jsx("p", { children: t(key(metric.label)) }),
465
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: t(key(metric.detail)) })
466
+ ] }),
467
+ /* @__PURE__ */ jsx("span", { className: "w-18 text-muted-foreground", children: metric.value }),
468
+ /* @__PURE__ */ jsxs("span", { className: cn("w-10", index === 2 ? "text-status-error-icon" : "text-status-success-icon"), children: [
469
+ number(metric.delta, index === 2 ? 1 : 0),
470
+ "%"
471
+ ] })
472
+ ] }, metric.label))
473
+ ] }),
474
+ /* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 border-t border-border px-5 pt-4", children: [
475
+ /* @__PURE__ */ jsx("p", { className: "mb-3 text-xs text-muted-foreground", children: t(key("recentTickets")) }),
476
+ /* @__PURE__ */ jsx(ScrollArea, { className: "h-40", scrollbarSize: "xs", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: visible.map((ticket, index) => /* @__PURE__ */ jsxs(Button, { variant: "ghost", onClick: () => setSelected(ticket.id), className: "h-auto min-h-10 w-full justify-start gap-3 p-0 text-left font-normal hover:bg-muted", children: [
477
+ /* @__PURE__ */ jsx(Avatar, { label: ticket.name, size: 32, className: index === 1 ? "bg-chart-amber/20 text-status-warning-foreground" : index === 2 ? "bg-chart-violet/20 text-accent-indigo" : "bg-muted" }),
478
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
479
+ /* @__PURE__ */ jsx("p", { className: "truncate text-sm font-medium", children: ticket.name }),
480
+ /* @__PURE__ */ jsxs("p", { className: "mt-1 flex items-center gap-1 text-xs text-muted-foreground", children: [
481
+ t(key(ticket.priority)),
482
+ " \xB7 ",
483
+ /* @__PURE__ */ jsx("span", { className: ticket.status === "solved" ? "text-status-success-icon" : "text-status-warning-icon", children: t(key(ticket.status)) })
484
+ ] })
485
+ ] }),
486
+ /* @__PURE__ */ jsxs("div", { className: "text-right", children: [
487
+ /* @__PURE__ */ jsx("p", { className: "text-sm", children: t(key("minutes"), void 0, { count: ticket.minutes }) }),
488
+ /* @__PURE__ */ jsxs("p", { className: "mt-1 text-xs text-muted-foreground", children: [
489
+ "#TKT-",
490
+ ticket.id
491
+ ] })
492
+ ] })
493
+ ] }, ticket.id)) }) })
494
+ ] })
495
+ ] }, value))
496
+ ] })
497
+ ] }),
498
+ /* @__PURE__ */ jsx(Dialog, { open: selected !== null, onOpenChange: (open) => {
499
+ if (!open) setSelected(null);
500
+ }, children: /* @__PURE__ */ jsxs(DialogContent, { onKeyDownCapture: (event) => {
501
+ if (event.key === "Enter" && (event.ctrlKey || event.metaKey)) {
502
+ event.preventDefault();
503
+ setSelected(null);
504
+ }
505
+ }, children: [
506
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
507
+ /* @__PURE__ */ jsx(DialogTitle, { children: current?.name }),
508
+ /* @__PURE__ */ jsx(DialogDescription, { children: current ? `#TKT-${current.id}` : t(key("recentTickets")) })
509
+ ] }),
510
+ current ? /* @__PURE__ */ jsx(DataList, { rows: [{ label: t(key("status")), value: t(key(current.status)) }, { label: t(key("priority")), value: t(key(current.priority)) }] }) : null,
511
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
512
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => setSelected(null), children: t(key("close")) }),
513
+ /* @__PURE__ */ jsx(Button, { disabled: current?.status === "solved", onClick: () => {
514
+ setTickets((items) => items.map((ticket) => ticket.id === selected ? { ...ticket, status: "solved" } : ticket));
515
+ setSelected(null);
516
+ }, children: t(key("resolveTicket")) })
517
+ ] })
518
+ ] }) })
519
+ ] });
520
+ }
521
+ const activityKinds = [{ key: "inventory", icon: "stack-line", color: "text-chart-violet", detail: "inventoryDetail" }, { key: "price", icon: "price-tag-line", color: "text-status-success-icon", detail: "priceDetail" }, { key: "newProduct", icon: "add-circle-line", color: "text-chart-violet", detail: "newProductDetail" }, { key: "images", icon: "image-line", color: "text-status-warning-icon", detail: "imagesDetail" }, { key: "descriptionUpdated", icon: "pencil-line", color: "text-muted-foreground", detail: "descriptionDetail" }];
522
+ function RecentActivities() {
523
+ const { t, date } = useMarketing();
524
+ const [period, setPeriod] = React.useState("today");
525
+ const [query, setQuery] = React.useState("");
526
+ const records = Array.from({ length: period === "today" ? 7 : period === "yesterday" ? 2 : 9 }, (_, index) => ({ id: index, ...activityKinds[index % 5] })).filter((item) => [t(key(item.key)), t(key(item.detail)), t(key("activityProduct"))].join(" ").toLocaleLowerCase().includes(query.toLocaleLowerCase()));
527
+ const list = /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
528
+ records.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "relative flex gap-4", children: [
529
+ /* @__PURE__ */ jsxs("div", { className: "relative flex w-7 shrink-0 justify-center", children: [
530
+ /* @__PURE__ */ jsx("span", { className: "z-10 flex size-7 items-center justify-center rounded-full border border-border bg-background shadow-xs", children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("size-4 bg-current", item.color), style: { maskImage: `url("${marketingActivityIcons[item.key]}")`, WebkitMaskImage: `url("${marketingActivityIcons[item.key]}")`, maskSize: "contain", WebkitMaskSize: "contain" } }) }),
531
+ index < records.length - 1 ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "absolute bottom-0 top-8 w-px bg-border" }) : null
532
+ ] }),
533
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
534
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
535
+ /* @__PURE__ */ jsx("p", { className: "min-w-0 flex-1 text-sm font-medium", children: t(key(item.key)) }),
536
+ /* @__PURE__ */ jsx("time", { className: "text-overline text-muted-foreground", children: date("2024-02-21T11:30:00Z", { hour: "numeric", minute: "2-digit" }) })
537
+ ] }),
538
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: item.key === "price" ? t(key("seasonalDiscount")) : t(key("activityProduct")) }),
539
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: t(key(item.detail)) })
540
+ ] })
541
+ ] }, item.id)),
542
+ !records.length ? /* @__PURE__ */ jsx("p", { role: "status", className: "text-sm text-muted-foreground", children: t(key("noActivities")) }) : null
543
+ ] });
544
+ return /* @__PURE__ */ jsxs(MarketingFrame, { tall: true, flush: true, children: [
545
+ /* @__PURE__ */ jsxs("div", { className: "flex h-33 shrink-0 flex-col gap-4 p-5", children: [
546
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start", children: [
547
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
548
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium", children: t(key("recentActivities")) }),
549
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: t(key("newActivities"), void 0, { count: 5 }) })
550
+ ] }),
551
+ /* @__PURE__ */ jsx(Details, { title: t(key("recentActivities")), children: list })
552
+ ] }),
553
+ /* @__PURE__ */ jsx(Choices, { values: ["today", "yesterday", "thisWeek"], value: period, onChange: setPeriod, label: t(key("activityPeriod")) })
554
+ ] }),
555
+ /* @__PURE__ */ jsx("div", { className: "border-y border-border px-5", children: /* @__PURE__ */ jsx(SearchInput, { "aria-label": t(key("searchActivities")), placeholder: t(key("searchActivities")), value: query, onChange: setQuery, className: "h-12 rounded-none border-0 px-0 shadow-none" }) }),
556
+ /* @__PURE__ */ jsx(ScrollArea, { className: "min-h-0 flex-1 px-5 py-5", scrollbarSize: "xs", children: list })
557
+ ] });
558
+ }
559
+ const widgets = {
560
+ "total-sales": TotalSales,
561
+ "total-visitors": TotalVisitors,
562
+ "conversion-rate": ConversionRate,
563
+ "user-retention": Retention,
564
+ "weekly-visitors": WeeklyVisitors,
565
+ "visitor-channels": Channels,
566
+ geography: Geography,
567
+ "realtime-visitors": RealtimeVisitors,
568
+ "marketing-channels": () => /* @__PURE__ */ jsx(Channels, { marketing: true }),
569
+ "product-performance": ProductPerformance,
570
+ "shipping-tracking": ShippingTracking,
571
+ "my-products": MyProducts,
572
+ "product-categories": ProductCategories,
573
+ "customer-segments": CustomerSegments,
574
+ "sales-channels": SalesChannels,
575
+ "campaign-data": CampaignData,
576
+ "support-analytics": SupportAnalytics,
577
+ "recent-activities": RecentActivities
578
+ };
579
+ function MarketingWidgetDemo({ kind }) {
580
+ const Widget = widgets[kind];
581
+ return /* @__PURE__ */ jsx(Widget, {});
582
+ }
583
+ export {
584
+ MarketingWidgetDemo
585
+ };
586
+ //# sourceMappingURL=marketing-widgets.js.map