@open-mercato/core 0.7.1-develop.7202.1.a52dc6707c → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/build.mjs +11 -0
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +23 -0
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/[id]/page.js +2 -1
- package/dist/modules/customers/backend/customers/companies/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +2 -1
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/[id]/page.js +2 -2
- package/dist/modules/customers/backend/customers/people/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +2 -1
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/lib/detailHelpers.js +4 -0
- package/dist/modules/customers/lib/detailHelpers.js.map +2 -2
- package/dist/modules/customers/lib/todoCompatibility.js +5 -0
- package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
- package/dist/modules/design_system/backend/design-system/page.meta.js +3 -2
- package/dist/modules/design_system/backend/design-system/page.meta.js.map +2 -2
- package/dist/modules/design_system/gallery/assets/ai-prompt-image.png +0 -0
- package/dist/modules/design_system/gallery/assets/avatar-illustration.png +0 -0
- package/dist/modules/design_system/gallery/assets/avatar-memoji.png +0 -0
- package/dist/modules/design_system/gallery/assets/avatar-photo.png +0 -0
- package/dist/modules/design_system/gallery/assets/blog-photo-0.png +0 -0
- package/dist/modules/design_system/gallery/assets/contact-support-portrait.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-ada.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-avax.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-bnb.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-brand.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-btc.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-clock.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-crown.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-dot.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-eth.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-hbar.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-history.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-link.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-menu.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-metamask.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-more.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-phantom.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-rewards.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-sad-face.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-sol.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-star.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-cancelled.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-pending.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-success.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-warning.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-trx.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-usdc.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-usdt.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-walletconnect.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-wei.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-xrp.png +0 -0
- package/dist/modules/design_system/gallery/assets/cryptocurrency-artwork.js +67 -0
- package/dist/modules/design_system/gallery/assets/cryptocurrency-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/github-logo.png +0 -0
- package/dist/modules/design_system/gallery/assets/images.d.js +1 -0
- package/dist/modules/design_system/gallery/assets/images.d.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/input-european-union.svg +18 -0
- package/dist/modules/design_system/gallery/assets/landing-teams-01.png +0 -0
- package/dist/modules/design_system/gallery/assets/marketing-artwork.js +83 -0
- package/dist/modules/design_system/gallery/assets/marketing-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/menu-apex.svg +18 -0
- package/dist/modules/design_system/gallery/assets/menu-mastercard.svg +7 -0
- package/dist/modules/design_system/gallery/assets/menu-spotify.svg +4 -0
- package/dist/modules/design_system/gallery/assets/menu-united-states.svg +16 -0
- package/dist/modules/design_system/gallery/assets/select-google.png +0 -0
- package/dist/modules/design_system/gallery/assets/select-poland.png +0 -0
- package/dist/modules/design_system/gallery/assets/selection-artwork.js +5 -0
- package/dist/modules/design_system/gallery/assets/selection-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/social-apple-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-apple-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-dropbox-filled.svg +5 -0
- package/dist/modules/design_system/gallery/assets/social-dropbox-stroke.svg +5 -0
- package/dist/modules/design_system/gallery/assets/social-facebook-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-facebook-stroke.svg +10 -0
- package/dist/modules/design_system/gallery/assets/social-github-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-github-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-google-filled.svg +7 -0
- package/dist/modules/design_system/gallery/assets/social-google-stroke.svg +7 -0
- package/dist/modules/design_system/gallery/assets/social-linkedin-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-linkedin-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-x-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-x-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/style-studio-product.png +0 -0
- package/dist/modules/design_system/gallery/assets/upload-images.js +8 -0
- package/dist/modules/design_system/gallery/assets/upload-images.js.map +7 -0
- package/dist/modules/design_system/gallery/components/BrandStylePreview.js +74 -0
- package/dist/modules/design_system/gallery/components/BrandStylePreview.js.map +7 -0
- package/dist/modules/design_system/gallery/components/CodeSnippet.js +31 -31
- package/dist/modules/design_system/gallery/components/CodeSnippet.js.map +2 -2
- package/dist/modules/design_system/gallery/components/ColorPlayground.js +408 -0
- package/dist/modules/design_system/gallery/components/ColorPlayground.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ColorStudioCompositions.js +166 -0
- package/dist/modules/design_system/gallery/components/ColorStudioCompositions.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ColorStudioSpecimen.js +182 -0
- package/dist/modules/design_system/gallery/components/ColorStudioSpecimen.js.map +7 -0
- package/dist/modules/design_system/gallery/components/CompactEntrySpecimen.js +80 -0
- package/dist/modules/design_system/gallery/components/CompactEntrySpecimen.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ComponentIndex.js +42 -0
- package/dist/modules/design_system/gallery/components/ComponentIndex.js.map +7 -0
- package/dist/modules/design_system/gallery/components/DesignSystemHome.js +69 -0
- package/dist/modules/design_system/gallery/components/DesignSystemHome.js.map +7 -0
- package/dist/modules/design_system/gallery/components/EntryCard.js +47 -41
- package/dist/modules/design_system/gallery/components/EntryCard.js.map +2 -2
- package/dist/modules/design_system/gallery/components/EntryHeader.js +68 -0
- package/dist/modules/design_system/gallery/components/EntryHeader.js.map +7 -0
- package/dist/modules/design_system/gallery/components/FamilyEntryPreview.js +19 -0
- package/dist/modules/design_system/gallery/components/FamilyEntryPreview.js.map +7 -0
- package/dist/modules/design_system/gallery/components/FoundationGuide.js +46 -0
- package/dist/modules/design_system/gallery/components/FoundationGuide.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryLink.js +21 -0
- package/dist/modules/design_system/gallery/components/GalleryLink.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryNavigation.js +82 -0
- package/dist/modules/design_system/gallery/components/GalleryNavigation.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryShell.js +147 -67
- package/dist/modules/design_system/gallery/components/GalleryShell.js.map +3 -3
- package/dist/modules/design_system/gallery/components/IconsBrowser.js +33 -0
- package/dist/modules/design_system/gallery/components/IconsBrowser.js.map +7 -0
- package/dist/modules/design_system/gallery/components/SourceLibrary.js +93 -0
- package/dist/modules/design_system/gallery/components/SourceLibrary.js.map +7 -0
- package/dist/modules/design_system/gallery/components/StyleAgents.js +139 -0
- package/dist/modules/design_system/gallery/components/StyleAgents.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ThemeTokenReference.js +101 -0
- package/dist/modules/design_system/gallery/components/ThemeTokenReference.js.map +7 -0
- package/dist/modules/design_system/gallery/components/VariantPreview.js +2 -2
- package/dist/modules/design_system/gallery/components/VariantPreview.js.map +2 -2
- package/dist/modules/design_system/gallery/components/colorPreview.js +58 -0
- package/dist/modules/design_system/gallery/components/colorPreview.js.map +7 -0
- package/dist/modules/design_system/gallery/components/colorStudio.js +218 -0
- package/dist/modules/design_system/gallery/components/colorStudio.js.map +7 -0
- package/dist/modules/design_system/gallery/components/styleAgentBranding.js +46 -0
- package/dist/modules/design_system/gallery/components/styleAgentBranding.js.map +7 -0
- package/dist/modules/design_system/gallery/components/themeTokens.js +32 -0
- package/dist/modules/design_system/gallery/components/themeTokens.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/ai-product-code.generated.js +194 -0
- package/dist/modules/design_system/gallery/demos/ai-product-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/ai-product.js +423 -0
- package/dist/modules/design_system/gallery/demos/ai-product.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/buttons.js +289 -0
- package/dist/modules/design_system/gallery/demos/buttons.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/cryptocurrency.js +1708 -0
- package/dist/modules/design_system/gallery/demos/cryptocurrency.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/feeds-code.generated.js +92 -0
- package/dist/modules/design_system/gallery/demos/feeds-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/feeds.js +148 -0
- package/dist/modules/design_system/gallery/demos/feeds.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/file-upload.js +72 -0
- package/dist/modules/design_system/gallery/demos/file-upload.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/foundation-reference-data.js +4875 -0
- package/dist/modules/design_system/gallery/demos/foundation-reference-data.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/foundation-references.js +188 -0
- package/dist/modules/design_system/gallery/demos/foundation-references.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/key-components-code.generated.js +6 -0
- package/dist/modules/design_system/gallery/demos/key-components-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/key-components.js +127 -0
- package/dist/modules/design_system/gallery/demos/key-components.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls-code.generated.js +98 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls.js +134 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets-code.generated.js +195 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets.js +586 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/menu-fixtures.js +40 -0
- package/dist/modules/design_system/gallery/demos/menu-fixtures.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/menu-sources.js +295 -0
- package/dist/modules/design_system/gallery/demos/menu-sources.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/menus.js +150 -0
- package/dist/modules/design_system/gallery/demos/menus.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/rating-reviews.js +53 -0
- package/dist/modules/design_system/gallery/demos/rating-reviews.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/registered-icons.js +104 -0
- package/dist/modules/design_system/gallery/demos/registered-icons.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/selection-cards.js +99 -0
- package/dist/modules/design_system/gallery/demos/selection-cards.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/shell-code.generated.js +189 -0
- package/dist/modules/design_system/gallery/demos/shell-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/shell.js +330 -0
- package/dist/modules/design_system/gallery/demos/shell.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-artwork.js +120 -0
- package/dist/modules/design_system/gallery/demos/source-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-filters-code.generated.js +125 -0
- package/dist/modules/design_system/gallery/demos/source-filters-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-filters.js +185 -0
- package/dist/modules/design_system/gallery/demos/source-filters.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-icons.js +69 -0
- package/dist/modules/design_system/gallery/demos/source-icons.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/table-cells-code.generated.js +150 -0
- package/dist/modules/design_system/gallery/demos/table-cells-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/table-cells.js +181 -0
- package/dist/modules/design_system/gallery/demos/table-cells.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/text-inputs.js +113 -0
- package/dist/modules/design_system/gallery/demos/text-inputs.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/time-picker-code.generated.js +41 -0
- package/dist/modules/design_system/gallery/demos/time-picker-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/time-picker.js +41 -0
- package/dist/modules/design_system/gallery/demos/time-picker.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/banners.js +123 -60
- package/dist/modules/design_system/gallery/entries/banners.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/buttons-snippets.js +433 -0
- package/dist/modules/design_system/gallery/entries/buttons-snippets.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/buttons.js +127 -148
- package/dist/modules/design_system/gallery/entries/buttons.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/charts.js +532 -186
- package/dist/modules/design_system/gallery/entries/charts.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/dates.js +191 -3
- package/dist/modules/design_system/gallery/entries/dates.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/detail.js +118 -77
- package/dist/modules/design_system/gallery/entries/detail.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/display.js +1449 -240
- package/dist/modules/design_system/gallery/entries/display.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/feedback.js +1058 -132
- package/dist/modules/design_system/gallery/entries/feedback.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/filters.js +231 -103
- package/dist/modules/design_system/gallery/entries/filters.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/foundations.js +368 -57
- package/dist/modules/design_system/gallery/entries/foundations.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/icons.js +29 -91
- package/dist/modules/design_system/gallery/entries/icons.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/inputs-snippets.js +154 -0
- package/dist/modules/design_system/gallery/entries/inputs-snippets.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/inputs.js +2043 -306
- package/dist/modules/design_system/gallery/entries/inputs.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/library.js +20 -0
- package/dist/modules/design_system/gallery/entries/library.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/messages.js +121 -103
- package/dist/modules/design_system/gallery/entries/messages.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/navigation.js +676 -103
- package/dist/modules/design_system/gallery/entries/navigation.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/notifications.js +131 -78
- package/dist/modules/design_system/gallery/entries/notifications.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/overlays.js +611 -203
- package/dist/modules/design_system/gallery/entries/overlays.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/scaffolding.js +1175 -120
- package/dist/modules/design_system/gallery/entries/scaffolding.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/schedule.js +79 -54
- package/dist/modules/design_system/gallery/entries/schedule.js.map +2 -2
- package/dist/modules/design_system/gallery/presentation.js +108 -0
- package/dist/modules/design_system/gallery/presentation.js.map +7 -0
- package/dist/modules/design_system/gallery/registry.js +8 -5
- package/dist/modules/design_system/gallery/registry.js.map +2 -2
- package/dist/modules/design_system/gallery/source-library.generated.js +5 -0
- package/dist/modules/design_system/gallery/source-library.generated.js.map +7 -0
- package/dist/modules/design_system/i18n/de.json +7167 -0
- package/dist/modules/design_system/i18n/en.json +7167 -0
- package/dist/modules/design_system/i18n/es.json +7167 -0
- package/dist/modules/design_system/i18n/ko.json +7167 -0
- package/dist/modules/design_system/i18n/pl.json +7167 -0
- package/dist/modules/push_notifications/lib/queue.js +1 -31
- package/dist/modules/push_notifications/lib/queue.js.map +2 -2
- package/jest.config.cjs +1 -0
- package/jest.mocks/image.js +1 -0
- package/package.json +8 -9
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +50 -0
- package/src/modules/customers/backend/customers/companies/[id]/page.tsx +2 -1
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +2 -1
- package/src/modules/customers/backend/customers/people/[id]/page.tsx +2 -2
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +2 -1
- package/src/modules/customers/lib/detailHelpers.ts +4 -0
- package/src/modules/customers/lib/todoCompatibility.ts +10 -0
- package/src/modules/design_system/backend/design-system/page.meta.ts +3 -2
- package/src/modules/design_system/gallery/assets/README.md +30 -0
- package/src/modules/design_system/gallery/assets/ai-prompt-image.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-illustration.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-memoji.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-photo.png +0 -0
- package/src/modules/design_system/gallery/assets/blog-photo-0.png +0 -0
- package/src/modules/design_system/gallery/assets/contact-support-portrait.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-ada.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-avax.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-bnb.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-brand.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-btc.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-clock.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-crown.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-dot.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-eth.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-hbar.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-history.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-link.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-menu.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-metamask.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-more.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-phantom.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-rewards.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-sad-face.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-sol.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-star.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-cancelled.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-pending.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-success.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-warning.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-trx.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-usdc.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-usdt.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-walletconnect.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-wei.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-xrp.png +0 -0
- package/src/modules/design_system/gallery/assets/cryptocurrency-artwork.ts +63 -0
- package/src/modules/design_system/gallery/assets/github-logo.png +0 -0
- package/src/modules/design_system/gallery/assets/images.d.ts +9 -0
- package/src/modules/design_system/gallery/assets/input-european-union.svg +18 -0
- package/src/modules/design_system/gallery/assets/landing-teams-01.png +0 -0
- package/src/modules/design_system/gallery/assets/marketing-artwork.ts +79 -0
- package/src/modules/design_system/gallery/assets/menu-apex.svg +18 -0
- package/src/modules/design_system/gallery/assets/menu-mastercard.svg +7 -0
- package/src/modules/design_system/gallery/assets/menu-spotify.svg +4 -0
- package/src/modules/design_system/gallery/assets/menu-united-states.svg +16 -0
- package/src/modules/design_system/gallery/assets/select-google.png +0 -0
- package/src/modules/design_system/gallery/assets/select-poland.png +0 -0
- package/src/modules/design_system/gallery/assets/selection-artwork.ts +1 -0
- package/src/modules/design_system/gallery/assets/social-apple-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-apple-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-dropbox-filled.svg +5 -0
- package/src/modules/design_system/gallery/assets/social-dropbox-stroke.svg +5 -0
- package/src/modules/design_system/gallery/assets/social-facebook-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-facebook-stroke.svg +10 -0
- package/src/modules/design_system/gallery/assets/social-github-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-github-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-google-filled.svg +7 -0
- package/src/modules/design_system/gallery/assets/social-google-stroke.svg +7 -0
- package/src/modules/design_system/gallery/assets/social-linkedin-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-linkedin-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-x-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-x-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/style-studio-product.png +0 -0
- package/src/modules/design_system/gallery/assets/upload-images.ts +5 -0
- package/src/modules/design_system/gallery/components/BrandStylePreview.tsx +94 -0
- package/src/modules/design_system/gallery/components/CodeSnippet.tsx +34 -34
- package/src/modules/design_system/gallery/components/ColorPlayground.tsx +324 -0
- package/src/modules/design_system/gallery/components/ColorStudioCompositions.tsx +96 -0
- package/src/modules/design_system/gallery/components/ColorStudioSpecimen.tsx +164 -0
- package/src/modules/design_system/gallery/components/CompactEntrySpecimen.tsx +65 -0
- package/src/modules/design_system/gallery/components/ComponentIndex.tsx +47 -0
- package/src/modules/design_system/gallery/components/DesignSystemHome.tsx +66 -0
- package/src/modules/design_system/gallery/components/EntryCard.tsx +52 -37
- package/src/modules/design_system/gallery/components/EntryHeader.tsx +80 -0
- package/src/modules/design_system/gallery/components/FamilyEntryPreview.tsx +22 -0
- package/src/modules/design_system/gallery/components/FoundationGuide.tsx +43 -0
- package/src/modules/design_system/gallery/components/GalleryLink.tsx +19 -0
- package/src/modules/design_system/gallery/components/GalleryNavigation.tsx +86 -0
- package/src/modules/design_system/gallery/components/GalleryShell.tsx +149 -63
- package/src/modules/design_system/gallery/components/IconsBrowser.tsx +40 -0
- package/src/modules/design_system/gallery/components/SourceLibrary.tsx +90 -0
- package/src/modules/design_system/gallery/components/StyleAgents.tsx +115 -0
- package/src/modules/design_system/gallery/components/ThemeTokenReference.tsx +76 -0
- package/src/modules/design_system/gallery/components/VariantPreview.tsx +2 -2
- package/src/modules/design_system/gallery/components/colorPreview.ts +63 -0
- package/src/modules/design_system/gallery/components/colorStudio.ts +260 -0
- package/src/modules/design_system/gallery/components/styleAgentBranding.ts +42 -0
- package/src/modules/design_system/gallery/components/themeTokens.ts +26 -0
- package/src/modules/design_system/gallery/demos/ai-product-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/ai-product.tsx +188 -0
- package/src/modules/design_system/gallery/demos/buttons.tsx +331 -0
- package/src/modules/design_system/gallery/demos/cryptocurrency.tsx +1943 -0
- package/src/modules/design_system/gallery/demos/feeds-code.generated.ts +4 -0
- package/src/modules/design_system/gallery/demos/feeds.tsx +82 -0
- package/src/modules/design_system/gallery/demos/file-upload.tsx +61 -0
- package/src/modules/design_system/gallery/demos/foundation-reference-data.ts +4872 -0
- package/src/modules/design_system/gallery/demos/foundation-references.tsx +140 -0
- package/src/modules/design_system/gallery/demos/key-components-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/key-components.tsx +106 -0
- package/src/modules/design_system/gallery/demos/marketing-controls-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/marketing-controls.tsx +92 -0
- package/src/modules/design_system/gallery/demos/marketing-widgets-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/marketing-widgets.tsx +189 -0
- package/src/modules/design_system/gallery/demos/menu-fixtures.tsx +48 -0
- package/src/modules/design_system/gallery/demos/menu-sources.ts +5 -0
- package/src/modules/design_system/gallery/demos/menus.tsx +122 -0
- package/src/modules/design_system/gallery/demos/rating-reviews.tsx +44 -0
- package/src/modules/design_system/gallery/demos/registered-icons.tsx +117 -0
- package/src/modules/design_system/gallery/demos/selection-cards.tsx +97 -0
- package/src/modules/design_system/gallery/demos/shell-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/shell.tsx +183 -0
- package/src/modules/design_system/gallery/demos/source-artwork.tsx +88 -0
- package/src/modules/design_system/gallery/demos/source-filters-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/source-filters.tsx +119 -0
- package/src/modules/design_system/gallery/demos/source-icons.tsx +62 -0
- package/src/modules/design_system/gallery/demos/table-cells-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/table-cells.tsx +144 -0
- package/src/modules/design_system/gallery/demos/text-inputs.tsx +90 -0
- package/src/modules/design_system/gallery/demos/time-picker-code.generated.ts +5 -0
- package/src/modules/design_system/gallery/demos/time-picker.tsx +31 -0
- package/src/modules/design_system/gallery/entries/banners.tsx +143 -94
- package/src/modules/design_system/gallery/entries/buttons-snippets.ts +432 -0
- package/src/modules/design_system/gallery/entries/buttons.tsx +125 -196
- package/src/modules/design_system/gallery/entries/charts.tsx +545 -233
- package/src/modules/design_system/gallery/entries/dates.tsx +171 -3
- package/src/modules/design_system/gallery/entries/detail.tsx +142 -115
- package/src/modules/design_system/gallery/entries/display.tsx +1691 -319
- package/src/modules/design_system/gallery/entries/feedback.tsx +1082 -169
- package/src/modules/design_system/gallery/entries/filters.tsx +238 -143
- package/src/modules/design_system/gallery/entries/foundations.tsx +404 -61
- package/src/modules/design_system/gallery/entries/icons.tsx +31 -117
- package/src/modules/design_system/gallery/entries/inputs-snippets.ts +156 -0
- package/src/modules/design_system/gallery/entries/inputs.tsx +2146 -503
- package/src/modules/design_system/gallery/entries/library.tsx +16 -0
- package/src/modules/design_system/gallery/entries/messages.tsx +114 -106
- package/src/modules/design_system/gallery/entries/navigation.tsx +782 -192
- package/src/modules/design_system/gallery/entries/notifications.tsx +145 -120
- package/src/modules/design_system/gallery/entries/overlays.tsx +696 -280
- package/src/modules/design_system/gallery/entries/scaffolding.tsx +1192 -158
- package/src/modules/design_system/gallery/entries/schedule.tsx +72 -58
- package/src/modules/design_system/gallery/presentation.ts +106 -0
- package/src/modules/design_system/gallery/registry.ts +8 -6
- package/src/modules/design_system/gallery/source-library.generated.ts +2 -0
- package/src/modules/design_system/i18n/de.json +7112 -3
- package/src/modules/design_system/i18n/en.json +7112 -3
- package/src/modules/design_system/i18n/es.json +7112 -3
- package/src/modules/design_system/i18n/ko.json +7112 -3
- package/src/modules/design_system/i18n/pl.json +7112 -3
- package/src/modules/push_notifications/AGENTS.md +9 -5
- package/src/modules/push_notifications/lib/queue.ts +15 -44
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
2
|
+
import { MarketingWidgetDemo } from '../demos/marketing-widgets'
|
|
3
|
+
import { marketingWidgetExampleCode } from '../demos/marketing-widgets-code.generated'
|
|
1
4
|
import * as React from 'react'
|
|
2
5
|
import {
|
|
3
6
|
BarChart,
|
|
@@ -20,69 +23,432 @@ import type { GalleryEntry } from '../types'
|
|
|
20
23
|
// Inline mock datasets — realistic dashboard shapes, no API calls. All charts
|
|
21
24
|
// pick up the DS palette (`--chart-1`…`--chart-5`) natively; no color props.
|
|
22
25
|
// ---------------------------------------------------------------------------
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
function KpiCardEntryDeltaBadgePreview() {
|
|
27
|
+
const t = useT()
|
|
28
|
+
return (
|
|
29
|
+
<div className="flex items-center gap-3">
|
|
30
|
+
<DeltaBadge direction="up" value={12.4} />
|
|
31
|
+
<DeltaBadge direction="down" value={4.7} />
|
|
32
|
+
<DeltaBadge direction="unchanged" value={0} />
|
|
33
|
+
<DeltaBadge direction="up" value={38} unit={t('design_system.gallery.samples.content.pts')} />
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
function SparklineEntryDefaultPreview() {
|
|
38
|
+
const t = useT()
|
|
39
|
+
return (
|
|
40
|
+
<span className="text-muted-foreground">
|
|
41
|
+
<Sparkline values={weeklyOrdersTrend} ariaLabel={t('design_system.gallery.samples.content.weeklyOrdersTrend')} />
|
|
42
|
+
</span>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
function SparklineEntrySemanticColorPreview() {
|
|
46
|
+
const t = useT()
|
|
47
|
+
return (
|
|
48
|
+
<div className="flex items-center gap-6">
|
|
49
|
+
<span className="text-primary">
|
|
50
|
+
<Sparkline values={weeklyOrdersTrend} ariaLabel={t('design_system.gallery.samples.content.ordersTrendingUp')} />
|
|
51
|
+
</span>
|
|
52
|
+
<span className="text-destructive">
|
|
53
|
+
<Sparkline
|
|
54
|
+
values={[...weeklyOrdersTrend].reverse()}
|
|
55
|
+
ariaLabel={t('design_system.gallery.samples.content.returnsTrendingDown')}
|
|
56
|
+
/>
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
function SparklineEntrySizesPreview() {
|
|
62
|
+
const t = useT()
|
|
63
|
+
return (
|
|
64
|
+
<div className="flex items-end gap-6 text-muted-foreground">
|
|
65
|
+
<Sparkline
|
|
66
|
+
values={weeklyOrdersTrend}
|
|
67
|
+
ariaLabel={t('design_system.gallery.samples.content.smallTrend')}
|
|
68
|
+
width={64}
|
|
69
|
+
height={20}
|
|
70
|
+
/>
|
|
71
|
+
<Sparkline values={weeklyOrdersTrend} ariaLabel={t('design_system.gallery.samples.content.defaultTrend')} />
|
|
72
|
+
<Sparkline
|
|
73
|
+
values={weeklyOrdersTrend}
|
|
74
|
+
ariaLabel={t('design_system.gallery.samples.content.largeTrend')}
|
|
75
|
+
width={160}
|
|
76
|
+
height={40}
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
function KpiCardEntryTrendDirectionsPreview() {
|
|
82
|
+
const t = useT()
|
|
83
|
+
return (
|
|
84
|
+
<div className="grid w-full max-w-3xl grid-cols-1 gap-4 sm:grid-cols-3">
|
|
85
|
+
<KpiCard
|
|
86
|
+
title={t('design_system.gallery.samples.content.revenue')}
|
|
87
|
+
value={67300}
|
|
88
|
+
prefix="€"
|
|
89
|
+
trend={{
|
|
90
|
+
value: 14.8,
|
|
91
|
+
direction: 'up',
|
|
92
|
+
}}
|
|
93
|
+
comparisonLabel={t('design_system.gallery.samples.content.vsPreviousMonth')}
|
|
94
|
+
/>
|
|
95
|
+
<KpiCard
|
|
96
|
+
title={t('design_system.gallery.samples.content.cancelledOrders')}
|
|
97
|
+
value={22}
|
|
98
|
+
trend={{
|
|
99
|
+
value: 6.1,
|
|
100
|
+
direction: 'down',
|
|
101
|
+
}}
|
|
102
|
+
comparisonLabel={t('design_system.gallery.samples.content.vsPreviousMonth')}
|
|
103
|
+
/>
|
|
104
|
+
<KpiCard
|
|
105
|
+
title={t('design_system.gallery.samples.content.activeCustomers')}
|
|
106
|
+
value={1284}
|
|
107
|
+
trend={{
|
|
108
|
+
value: 0,
|
|
109
|
+
direction: 'unchanged',
|
|
110
|
+
}}
|
|
111
|
+
comparisonLabel={t('design_system.gallery.samples.content.vsPreviousMonth')}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
function KpiCardEntrySuffixAndFooterPreview() {
|
|
117
|
+
const t = useT()
|
|
118
|
+
return (
|
|
119
|
+
<div className="w-full max-w-xs">
|
|
120
|
+
<KpiCard
|
|
121
|
+
title={t('design_system.gallery.samples.content.averageOrderValue')}
|
|
122
|
+
value={86.4}
|
|
123
|
+
prefix="€"
|
|
124
|
+
suffix={t('design_system.gallery.samples.content.net')}
|
|
125
|
+
trend={{
|
|
126
|
+
value: 3.2,
|
|
127
|
+
direction: 'up',
|
|
128
|
+
}}
|
|
129
|
+
footer={
|
|
130
|
+
<span className="text-muted-foreground">
|
|
131
|
+
<Sparkline
|
|
132
|
+
values={weeklyOrdersTrend}
|
|
133
|
+
ariaLabel={t('design_system.gallery.samples.content.weeklyOrdersTrend')}
|
|
134
|
+
/>
|
|
135
|
+
</span>
|
|
136
|
+
}
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
function KpiCardEntryStatesPreview() {
|
|
142
|
+
const t = useT()
|
|
143
|
+
return (
|
|
144
|
+
<div className="grid w-full max-w-3xl grid-cols-1 gap-4 sm:grid-cols-3">
|
|
145
|
+
<KpiCard title={t('design_system.gallery.samples.content.loading')} value={null} loading />
|
|
146
|
+
<KpiCard
|
|
147
|
+
title={t('design_system.gallery.samples.content.error')}
|
|
148
|
+
value={null}
|
|
149
|
+
error={t('design_system.gallery.samples.content.failedToLoadMetric')}
|
|
150
|
+
/>
|
|
151
|
+
<KpiCard title={t('design_system.gallery.samples.content.noData')} value={null} />
|
|
152
|
+
</div>
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
function BarChartEntryBasicPreview() {
|
|
156
|
+
const t = useT()
|
|
157
|
+
return (
|
|
158
|
+
<div className="w-full max-w-xl">
|
|
159
|
+
<BarChart
|
|
160
|
+
title={t('design_system.gallery.samples.content.revenueByMonth')}
|
|
161
|
+
data={revenueByMonth(t)}
|
|
162
|
+
index="month"
|
|
163
|
+
categories={['revenue']}
|
|
164
|
+
showLegend={false}
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
function BarChartEntryHorizontalPreview() {
|
|
170
|
+
const t = useT()
|
|
171
|
+
return (
|
|
172
|
+
<div className="w-full max-w-xl">
|
|
173
|
+
<BarChart
|
|
174
|
+
title={t('design_system.gallery.samples.content.revenueByChannel')}
|
|
175
|
+
data={revenueByChannel(t)}
|
|
176
|
+
index="channel"
|
|
177
|
+
categories={['revenue']}
|
|
178
|
+
layout="horizontal"
|
|
179
|
+
showLegend={false}
|
|
180
|
+
/>
|
|
181
|
+
</div>
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
function BarChartEntryMultiSeriesPreview() {
|
|
185
|
+
const t = useT()
|
|
186
|
+
return (
|
|
187
|
+
<div className="w-full max-w-xl">
|
|
188
|
+
<BarChart
|
|
189
|
+
title={t('design_system.gallery.samples.content.ordersByMonth')}
|
|
190
|
+
data={ordersByMonth(t)}
|
|
191
|
+
index="month"
|
|
192
|
+
categories={['online', 'retail']}
|
|
193
|
+
categoryLabels={{
|
|
194
|
+
online: t('design_system.gallery.samples.content.online'),
|
|
195
|
+
retail: t('design_system.gallery.samples.content.retail'),
|
|
196
|
+
}}
|
|
197
|
+
/>
|
|
198
|
+
</div>
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
function LineChartEntryBasicPreview() {
|
|
202
|
+
const t = useT()
|
|
203
|
+
return (
|
|
204
|
+
<div className="w-full max-w-xl">
|
|
205
|
+
<LineChart
|
|
206
|
+
title={t('design_system.gallery.samples.content.revenueByMonth')}
|
|
207
|
+
data={revenueByMonth(t)}
|
|
208
|
+
index="month"
|
|
209
|
+
categories={['revenue']}
|
|
210
|
+
showLegend={false}
|
|
211
|
+
/>
|
|
212
|
+
</div>
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
function LineChartEntryAreaPreview() {
|
|
216
|
+
const t = useT()
|
|
217
|
+
return (
|
|
218
|
+
<div className="w-full max-w-xl">
|
|
219
|
+
<LineChart
|
|
220
|
+
title={t('design_system.gallery.samples.content.revenueByMonth')}
|
|
221
|
+
data={revenueByMonth(t)}
|
|
222
|
+
index="month"
|
|
223
|
+
categories={['revenue']}
|
|
224
|
+
showArea
|
|
225
|
+
showLegend={false}
|
|
226
|
+
/>
|
|
227
|
+
</div>
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
function LineChartEntryMultiSeriesPreview() {
|
|
231
|
+
const t = useT()
|
|
232
|
+
return (
|
|
233
|
+
<div className="w-full max-w-xl">
|
|
234
|
+
<LineChart
|
|
235
|
+
title={t('design_system.gallery.samples.content.ordersByMonth')}
|
|
236
|
+
data={ordersByMonth(t)}
|
|
237
|
+
index="month"
|
|
238
|
+
categories={['online', 'retail']}
|
|
239
|
+
categoryLabels={{
|
|
240
|
+
online: t('design_system.gallery.samples.content.online'),
|
|
241
|
+
retail: t('design_system.gallery.samples.content.retail'),
|
|
242
|
+
}}
|
|
243
|
+
curveType="monotone"
|
|
244
|
+
/>
|
|
245
|
+
</div>
|
|
246
|
+
)
|
|
247
|
+
}
|
|
248
|
+
function PieChartEntryPiePreview() {
|
|
249
|
+
const t = useT()
|
|
250
|
+
return (
|
|
251
|
+
<div className="w-full max-w-md">
|
|
252
|
+
<PieChart title={t('design_system.gallery.samples.content.ordersByStatus')} data={ordersByStatus(t)} />
|
|
253
|
+
</div>
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
function PieChartEntryDonutPreview() {
|
|
257
|
+
const t = useT()
|
|
258
|
+
return (
|
|
259
|
+
<div className="w-full max-w-md">
|
|
260
|
+
<PieChart
|
|
261
|
+
title={t('design_system.gallery.samples.content.ordersByStatus')}
|
|
262
|
+
data={ordersByStatus(t)}
|
|
263
|
+
variant="donut"
|
|
264
|
+
/>
|
|
265
|
+
</div>
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
function TopNTableEntryBasicPreview() {
|
|
269
|
+
const t = useT()
|
|
270
|
+
return (
|
|
271
|
+
<div className="w-full max-w-xl">
|
|
272
|
+
<TopNTable
|
|
273
|
+
title={t('design_system.gallery.samples.content.topProducts')}
|
|
274
|
+
data={topProducts(t)}
|
|
275
|
+
columns={topProductColumns(t)}
|
|
276
|
+
/>
|
|
277
|
+
</div>
|
|
278
|
+
)
|
|
279
|
+
}
|
|
280
|
+
function TopNTableEntryMaxRowsPreview() {
|
|
281
|
+
const t = useT()
|
|
282
|
+
return (
|
|
283
|
+
<div className="w-full max-w-xl">
|
|
284
|
+
<TopNTable
|
|
285
|
+
title={t('design_system.gallery.samples.content.top3Products')}
|
|
286
|
+
data={topProducts(t)}
|
|
287
|
+
columns={topProductColumns(t)}
|
|
288
|
+
maxRows={3}
|
|
289
|
+
/>
|
|
290
|
+
</div>
|
|
291
|
+
)
|
|
292
|
+
}
|
|
293
|
+
function TopNTableEntryEmptyPreview() {
|
|
294
|
+
const t = useT()
|
|
295
|
+
return (
|
|
296
|
+
<div className="w-full max-w-xl">
|
|
297
|
+
<TopNTable
|
|
298
|
+
title={t('design_system.gallery.samples.content.topProducts')}
|
|
299
|
+
data={[]}
|
|
300
|
+
columns={topProductColumns(t)}
|
|
301
|
+
emptyMessage={t('design_system.gallery.samples.content.noSalesInThisPeriod')}
|
|
302
|
+
/>
|
|
303
|
+
</div>
|
|
304
|
+
)
|
|
305
|
+
}
|
|
306
|
+
const revenueByMonth = (t: ReturnType<typeof useT>) => [
|
|
307
|
+
{
|
|
308
|
+
month: t('design_system.gallery.samples.content.jan'),
|
|
309
|
+
revenue: 48200,
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
month: t('design_system.gallery.samples.content.feb'),
|
|
313
|
+
revenue: 51400,
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
month: t('design_system.gallery.samples.content.mar'),
|
|
317
|
+
revenue: 47900,
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
month: t('design_system.gallery.samples.content.apr'),
|
|
321
|
+
revenue: 61200,
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
month: t('design_system.gallery.samples.content.may'),
|
|
325
|
+
revenue: 58600,
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
month: t('design_system.gallery.samples.content.jun'),
|
|
329
|
+
revenue: 67300,
|
|
330
|
+
},
|
|
31
331
|
]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
332
|
+
const revenueByChannel = (t: ReturnType<typeof useT>) => [
|
|
333
|
+
{
|
|
334
|
+
channel: t('design_system.gallery.samples.content.onlineStore'),
|
|
335
|
+
revenue: 182400,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
channel: t('design_system.gallery.samples.content.marketplace'),
|
|
339
|
+
revenue: 96800,
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
channel: t('design_system.gallery.samples.content.retail'),
|
|
343
|
+
revenue: 64200,
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
channel: t('design_system.gallery.samples.content.wholesale'),
|
|
347
|
+
revenue: 41500,
|
|
348
|
+
},
|
|
38
349
|
]
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
|
|
350
|
+
const ordersByMonth = (t: ReturnType<typeof useT>) => [
|
|
351
|
+
{
|
|
352
|
+
month: t('design_system.gallery.samples.content.jan'),
|
|
353
|
+
online: 320,
|
|
354
|
+
retail: 180,
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
month: t('design_system.gallery.samples.content.feb'),
|
|
358
|
+
online: 348,
|
|
359
|
+
retail: 164,
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
month: t('design_system.gallery.samples.content.mar'),
|
|
363
|
+
online: 331,
|
|
364
|
+
retail: 196,
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
month: t('design_system.gallery.samples.content.apr'),
|
|
368
|
+
online: 402,
|
|
369
|
+
retail: 214,
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
month: t('design_system.gallery.samples.content.may'),
|
|
373
|
+
online: 389,
|
|
374
|
+
retail: 205,
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
month: t('design_system.gallery.samples.content.jun'),
|
|
378
|
+
online: 446,
|
|
379
|
+
retail: 232,
|
|
380
|
+
},
|
|
47
381
|
]
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{
|
|
382
|
+
const ordersByStatus = (t: ReturnType<typeof useT>) => [
|
|
383
|
+
{
|
|
384
|
+
name: t('design_system.gallery.samples.content.completed'),
|
|
385
|
+
value: 268,
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: t('design_system.gallery.samples.content.processing'),
|
|
389
|
+
value: 84,
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: t('design_system.gallery.samples.content.pendingPayment'),
|
|
393
|
+
value: 37,
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
name: t('design_system.gallery.samples.content.cancelled'),
|
|
397
|
+
value: 22,
|
|
398
|
+
},
|
|
54
399
|
]
|
|
55
|
-
|
|
56
400
|
const weeklyOrdersTrend = [12, 18, 14, 22, 19, 27, 24, 31, 28, 35, 33, 41]
|
|
57
|
-
|
|
58
401
|
type TopProductRow = {
|
|
59
402
|
product: string
|
|
60
403
|
orders: number
|
|
61
404
|
revenue: number
|
|
62
405
|
[key: string]: unknown
|
|
63
406
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
{
|
|
407
|
+
const topProducts = (t: ReturnType<typeof useT>): TopProductRow[] => [
|
|
408
|
+
{
|
|
409
|
+
product: t('design_system.gallery.samples.content.auroraDeskLamp'),
|
|
410
|
+
orders: 412,
|
|
411
|
+
revenue: 28840,
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
product: t('design_system.gallery.samples.content.birchSideTable'),
|
|
415
|
+
orders: 366,
|
|
416
|
+
revenue: 47580,
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
product: t('design_system.gallery.samples.content.linenThrowPillow'),
|
|
420
|
+
orders: 341,
|
|
421
|
+
revenue: 11935,
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
product: t('design_system.gallery.samples.content.oakBookshelf'),
|
|
425
|
+
orders: 214,
|
|
426
|
+
revenue: 53500,
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
product: t('design_system.gallery.samples.content.ceramicVaseSet'),
|
|
430
|
+
orders: 198,
|
|
431
|
+
revenue: 8910,
|
|
432
|
+
},
|
|
71
433
|
]
|
|
72
|
-
|
|
73
434
|
const formatCurrency = (value: number) => `€${value.toLocaleString('en-US')}`
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
435
|
+
const topProductColumns = (t: ReturnType<typeof useT>): TopNTableColumn<TopProductRow>[] => [
|
|
436
|
+
{
|
|
437
|
+
key: 'product',
|
|
438
|
+
header: t('design_system.gallery.samples.content.product'),
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
key: 'orders',
|
|
442
|
+
header: t('design_system.gallery.samples.content.orders'),
|
|
443
|
+
align: 'right',
|
|
444
|
+
},
|
|
78
445
|
{
|
|
79
446
|
key: 'revenue',
|
|
80
|
-
header: '
|
|
447
|
+
header: t('design_system.gallery.samples.content.revenue'),
|
|
81
448
|
align: 'right',
|
|
82
449
|
formatter: (value) => formatCurrency(value as number),
|
|
83
450
|
},
|
|
84
451
|
]
|
|
85
|
-
|
|
86
452
|
const kpiCardEntry: GalleryEntry = {
|
|
87
453
|
id: 'kpi-card',
|
|
88
454
|
title: 'KpiCard',
|
|
@@ -91,29 +457,7 @@ const kpiCardEntry: GalleryEntry = {
|
|
|
91
457
|
{
|
|
92
458
|
id: 'trend-directions',
|
|
93
459
|
title: 'Trend directions',
|
|
94
|
-
render: () =>
|
|
95
|
-
<div className="grid w-full max-w-3xl grid-cols-1 gap-4 sm:grid-cols-3">
|
|
96
|
-
<KpiCard
|
|
97
|
-
title="Revenue"
|
|
98
|
-
value={67300}
|
|
99
|
-
prefix="€"
|
|
100
|
-
trend={{ value: 14.8, direction: 'up' }}
|
|
101
|
-
comparisonLabel="vs. previous month"
|
|
102
|
-
/>
|
|
103
|
-
<KpiCard
|
|
104
|
-
title="Cancelled orders"
|
|
105
|
-
value={22}
|
|
106
|
-
trend={{ value: 6.1, direction: 'down' }}
|
|
107
|
-
comparisonLabel="vs. previous month"
|
|
108
|
-
/>
|
|
109
|
-
<KpiCard
|
|
110
|
-
title="Active customers"
|
|
111
|
-
value={1284}
|
|
112
|
-
trend={{ value: 0, direction: 'unchanged' }}
|
|
113
|
-
comparisonLabel="vs. previous month"
|
|
114
|
-
/>
|
|
115
|
-
</div>
|
|
116
|
-
),
|
|
460
|
+
render: () => <KpiCardEntryTrendDirectionsPreview />,
|
|
117
461
|
code: `import { KpiCard } from '@open-mercato/ui/backend/charts'
|
|
118
462
|
|
|
119
463
|
<KpiCard
|
|
@@ -127,22 +471,7 @@ const kpiCardEntry: GalleryEntry = {
|
|
|
127
471
|
{
|
|
128
472
|
id: 'suffix-and-footer',
|
|
129
473
|
title: 'Suffix and footer slot',
|
|
130
|
-
render: () =>
|
|
131
|
-
<div className="w-full max-w-xs">
|
|
132
|
-
<KpiCard
|
|
133
|
-
title="Average order value"
|
|
134
|
-
value={86.4}
|
|
135
|
-
prefix="€"
|
|
136
|
-
suffix="net"
|
|
137
|
-
trend={{ value: 3.2, direction: 'up' }}
|
|
138
|
-
footer={
|
|
139
|
-
<span className="text-muted-foreground">
|
|
140
|
-
<Sparkline values={weeklyOrdersTrend} ariaLabel="Weekly orders trend" />
|
|
141
|
-
</span>
|
|
142
|
-
}
|
|
143
|
-
/>
|
|
144
|
-
</div>
|
|
145
|
-
),
|
|
474
|
+
render: () => <KpiCardEntrySuffixAndFooterPreview />,
|
|
146
475
|
code: `import { KpiCard, Sparkline } from '@open-mercato/ui/backend/charts'
|
|
147
476
|
|
|
148
477
|
<KpiCard
|
|
@@ -157,13 +486,7 @@ const kpiCardEntry: GalleryEntry = {
|
|
|
157
486
|
{
|
|
158
487
|
id: 'states',
|
|
159
488
|
title: 'Loading, error and empty states',
|
|
160
|
-
render: () =>
|
|
161
|
-
<div className="grid w-full max-w-3xl grid-cols-1 gap-4 sm:grid-cols-3">
|
|
162
|
-
<KpiCard title="Loading" value={null} loading />
|
|
163
|
-
<KpiCard title="Error" value={null} error="Failed to load metric" />
|
|
164
|
-
<KpiCard title="No data" value={null} />
|
|
165
|
-
</div>
|
|
166
|
-
),
|
|
489
|
+
render: () => <KpiCardEntryStatesPreview />,
|
|
167
490
|
code: `import { KpiCard } from '@open-mercato/ui/backend/charts'
|
|
168
491
|
|
|
169
492
|
<KpiCard title="Loading" value={null} loading />
|
|
@@ -173,14 +496,7 @@ const kpiCardEntry: GalleryEntry = {
|
|
|
173
496
|
{
|
|
174
497
|
id: 'delta-badge',
|
|
175
498
|
title: 'DeltaBadge (standalone)',
|
|
176
|
-
render: () =>
|
|
177
|
-
<div className="flex items-center gap-3">
|
|
178
|
-
<DeltaBadge direction="up" value={12.4} />
|
|
179
|
-
<DeltaBadge direction="down" value={4.7} />
|
|
180
|
-
<DeltaBadge direction="unchanged" value={0} />
|
|
181
|
-
<DeltaBadge direction="up" value={38} unit=" pts" />
|
|
182
|
-
</div>
|
|
183
|
-
),
|
|
499
|
+
render: () => <KpiCardEntryDeltaBadgePreview />,
|
|
184
500
|
code: `import { DeltaBadge } from '@open-mercato/ui/backend/charts'
|
|
185
501
|
|
|
186
502
|
<DeltaBadge direction="up" value={12.4} />
|
|
@@ -190,7 +506,6 @@ const kpiCardEntry: GalleryEntry = {
|
|
|
190
506
|
},
|
|
191
507
|
],
|
|
192
508
|
}
|
|
193
|
-
|
|
194
509
|
const sparklineEntry: GalleryEntry = {
|
|
195
510
|
id: 'sparkline',
|
|
196
511
|
title: 'Sparkline',
|
|
@@ -199,11 +514,7 @@ const sparklineEntry: GalleryEntry = {
|
|
|
199
514
|
{
|
|
200
515
|
id: 'default',
|
|
201
516
|
title: 'default',
|
|
202
|
-
render: () =>
|
|
203
|
-
<span className="text-muted-foreground">
|
|
204
|
-
<Sparkline values={weeklyOrdersTrend} ariaLabel="Weekly orders trend" />
|
|
205
|
-
</span>
|
|
206
|
-
),
|
|
517
|
+
render: () => <SparklineEntryDefaultPreview />,
|
|
207
518
|
code: `import { Sparkline } from '@open-mercato/ui/backend/charts'
|
|
208
519
|
|
|
209
520
|
<Sparkline values={[12, 18, 14, 22, 19, 27, 24, 31]} ariaLabel="Weekly orders trend" />`,
|
|
@@ -211,19 +522,7 @@ const sparklineEntry: GalleryEntry = {
|
|
|
211
522
|
{
|
|
212
523
|
id: 'semantic-color',
|
|
213
524
|
title: 'Colored via currentColor',
|
|
214
|
-
render: () =>
|
|
215
|
-
<div className="flex items-center gap-6">
|
|
216
|
-
<span className="text-primary">
|
|
217
|
-
<Sparkline values={weeklyOrdersTrend} ariaLabel="Orders trending up" />
|
|
218
|
-
</span>
|
|
219
|
-
<span className="text-destructive">
|
|
220
|
-
<Sparkline
|
|
221
|
-
values={[...weeklyOrdersTrend].reverse()}
|
|
222
|
-
ariaLabel="Returns trending down"
|
|
223
|
-
/>
|
|
224
|
-
</span>
|
|
225
|
-
</div>
|
|
226
|
-
),
|
|
525
|
+
render: () => <SparklineEntrySemanticColorPreview />,
|
|
227
526
|
code: `import { Sparkline } from '@open-mercato/ui/backend/charts'
|
|
228
527
|
|
|
229
528
|
// Sparkline strokes with currentColor — set a semantic text token on the wrapper.
|
|
@@ -234,13 +533,7 @@ const sparklineEntry: GalleryEntry = {
|
|
|
234
533
|
{
|
|
235
534
|
id: 'sizes',
|
|
236
535
|
title: 'Custom width and height',
|
|
237
|
-
render: () =>
|
|
238
|
-
<div className="flex items-end gap-6 text-muted-foreground">
|
|
239
|
-
<Sparkline values={weeklyOrdersTrend} ariaLabel="Small trend" width={64} height={20} />
|
|
240
|
-
<Sparkline values={weeklyOrdersTrend} ariaLabel="Default trend" />
|
|
241
|
-
<Sparkline values={weeklyOrdersTrend} ariaLabel="Large trend" width={160} height={40} />
|
|
242
|
-
</div>
|
|
243
|
-
),
|
|
536
|
+
render: () => <SparklineEntrySizesPreview />,
|
|
244
537
|
code: `import { Sparkline } from '@open-mercato/ui/backend/charts'
|
|
245
538
|
|
|
246
539
|
<Sparkline values={values} ariaLabel="Small trend" width={64} height={20} />
|
|
@@ -249,7 +542,6 @@ const sparklineEntry: GalleryEntry = {
|
|
|
249
542
|
},
|
|
250
543
|
],
|
|
251
544
|
}
|
|
252
|
-
|
|
253
545
|
const barChartEntry: GalleryEntry = {
|
|
254
546
|
id: 'bar-chart',
|
|
255
547
|
title: 'BarChart',
|
|
@@ -258,17 +550,7 @@ const barChartEntry: GalleryEntry = {
|
|
|
258
550
|
{
|
|
259
551
|
id: 'basic',
|
|
260
552
|
title: 'Basic (revenue by month)',
|
|
261
|
-
render: () =>
|
|
262
|
-
<div className="w-full max-w-xl">
|
|
263
|
-
<BarChart
|
|
264
|
-
title="Revenue by month"
|
|
265
|
-
data={revenueByMonth}
|
|
266
|
-
index="month"
|
|
267
|
-
categories={['revenue']}
|
|
268
|
-
showLegend={false}
|
|
269
|
-
/>
|
|
270
|
-
</div>
|
|
271
|
-
),
|
|
553
|
+
render: () => <BarChartEntryBasicPreview />,
|
|
272
554
|
code: `import { BarChart } from '@open-mercato/ui/backend/charts'
|
|
273
555
|
|
|
274
556
|
<BarChart
|
|
@@ -282,18 +564,7 @@ const barChartEntry: GalleryEntry = {
|
|
|
282
564
|
{
|
|
283
565
|
id: 'horizontal',
|
|
284
566
|
title: 'Horizontal layout',
|
|
285
|
-
render: () =>
|
|
286
|
-
<div className="w-full max-w-xl">
|
|
287
|
-
<BarChart
|
|
288
|
-
title="Revenue by channel"
|
|
289
|
-
data={revenueByChannel}
|
|
290
|
-
index="channel"
|
|
291
|
-
categories={['revenue']}
|
|
292
|
-
layout="horizontal"
|
|
293
|
-
showLegend={false}
|
|
294
|
-
/>
|
|
295
|
-
</div>
|
|
296
|
-
),
|
|
567
|
+
render: () => <BarChartEntryHorizontalPreview />,
|
|
297
568
|
code: `import { BarChart } from '@open-mercato/ui/backend/charts'
|
|
298
569
|
|
|
299
570
|
<BarChart
|
|
@@ -308,17 +579,7 @@ const barChartEntry: GalleryEntry = {
|
|
|
308
579
|
{
|
|
309
580
|
id: 'multi-series',
|
|
310
581
|
title: 'Multiple series with legend',
|
|
311
|
-
render: () =>
|
|
312
|
-
<div className="w-full max-w-xl">
|
|
313
|
-
<BarChart
|
|
314
|
-
title="Orders by month"
|
|
315
|
-
data={ordersByMonth}
|
|
316
|
-
index="month"
|
|
317
|
-
categories={['online', 'retail']}
|
|
318
|
-
categoryLabels={{ online: 'Online', retail: 'Retail' }}
|
|
319
|
-
/>
|
|
320
|
-
</div>
|
|
321
|
-
),
|
|
582
|
+
render: () => <BarChartEntryMultiSeriesPreview />,
|
|
322
583
|
code: `import { BarChart } from '@open-mercato/ui/backend/charts'
|
|
323
584
|
|
|
324
585
|
<BarChart
|
|
@@ -331,7 +592,6 @@ const barChartEntry: GalleryEntry = {
|
|
|
331
592
|
},
|
|
332
593
|
],
|
|
333
594
|
}
|
|
334
|
-
|
|
335
595
|
const lineChartEntry: GalleryEntry = {
|
|
336
596
|
id: 'line-chart',
|
|
337
597
|
title: 'LineChart',
|
|
@@ -340,17 +600,7 @@ const lineChartEntry: GalleryEntry = {
|
|
|
340
600
|
{
|
|
341
601
|
id: 'basic',
|
|
342
602
|
title: 'Basic (revenue by month)',
|
|
343
|
-
render: () =>
|
|
344
|
-
<div className="w-full max-w-xl">
|
|
345
|
-
<LineChart
|
|
346
|
-
title="Revenue by month"
|
|
347
|
-
data={revenueByMonth}
|
|
348
|
-
index="month"
|
|
349
|
-
categories={['revenue']}
|
|
350
|
-
showLegend={false}
|
|
351
|
-
/>
|
|
352
|
-
</div>
|
|
353
|
-
),
|
|
603
|
+
render: () => <LineChartEntryBasicPreview />,
|
|
354
604
|
code: `import { LineChart } from '@open-mercato/ui/backend/charts'
|
|
355
605
|
|
|
356
606
|
<LineChart
|
|
@@ -364,18 +614,7 @@ const lineChartEntry: GalleryEntry = {
|
|
|
364
614
|
{
|
|
365
615
|
id: 'area',
|
|
366
616
|
title: 'Area fill',
|
|
367
|
-
render: () =>
|
|
368
|
-
<div className="w-full max-w-xl">
|
|
369
|
-
<LineChart
|
|
370
|
-
title="Revenue by month"
|
|
371
|
-
data={revenueByMonth}
|
|
372
|
-
index="month"
|
|
373
|
-
categories={['revenue']}
|
|
374
|
-
showArea
|
|
375
|
-
showLegend={false}
|
|
376
|
-
/>
|
|
377
|
-
</div>
|
|
378
|
-
),
|
|
617
|
+
render: () => <LineChartEntryAreaPreview />,
|
|
379
618
|
code: `import { LineChart } from '@open-mercato/ui/backend/charts'
|
|
380
619
|
|
|
381
620
|
<LineChart
|
|
@@ -390,18 +629,7 @@ const lineChartEntry: GalleryEntry = {
|
|
|
390
629
|
{
|
|
391
630
|
id: 'multi-series',
|
|
392
631
|
title: 'Multiple series, monotone curve',
|
|
393
|
-
render: () =>
|
|
394
|
-
<div className="w-full max-w-xl">
|
|
395
|
-
<LineChart
|
|
396
|
-
title="Orders by month"
|
|
397
|
-
data={ordersByMonth}
|
|
398
|
-
index="month"
|
|
399
|
-
categories={['online', 'retail']}
|
|
400
|
-
categoryLabels={{ online: 'Online', retail: 'Retail' }}
|
|
401
|
-
curveType="monotone"
|
|
402
|
-
/>
|
|
403
|
-
</div>
|
|
404
|
-
),
|
|
632
|
+
render: () => <LineChartEntryMultiSeriesPreview />,
|
|
405
633
|
code: `import { LineChart } from '@open-mercato/ui/backend/charts'
|
|
406
634
|
|
|
407
635
|
<LineChart
|
|
@@ -415,7 +643,6 @@ const lineChartEntry: GalleryEntry = {
|
|
|
415
643
|
},
|
|
416
644
|
],
|
|
417
645
|
}
|
|
418
|
-
|
|
419
646
|
const pieChartEntry: GalleryEntry = {
|
|
420
647
|
id: 'pie-chart',
|
|
421
648
|
title: 'PieChart',
|
|
@@ -424,11 +651,7 @@ const pieChartEntry: GalleryEntry = {
|
|
|
424
651
|
{
|
|
425
652
|
id: 'pie',
|
|
426
653
|
title: 'Pie (orders by status)',
|
|
427
|
-
render: () =>
|
|
428
|
-
<div className="w-full max-w-md">
|
|
429
|
-
<PieChart title="Orders by status" data={ordersByStatus} />
|
|
430
|
-
</div>
|
|
431
|
-
),
|
|
654
|
+
render: () => <PieChartEntryPiePreview />,
|
|
432
655
|
code: `import { PieChart } from '@open-mercato/ui/backend/charts'
|
|
433
656
|
|
|
434
657
|
<PieChart title="Orders by status" data={ordersByStatus} />`,
|
|
@@ -436,18 +659,13 @@ const pieChartEntry: GalleryEntry = {
|
|
|
436
659
|
{
|
|
437
660
|
id: 'donut',
|
|
438
661
|
title: 'Donut',
|
|
439
|
-
render: () =>
|
|
440
|
-
<div className="w-full max-w-md">
|
|
441
|
-
<PieChart title="Orders by status" data={ordersByStatus} variant="donut" />
|
|
442
|
-
</div>
|
|
443
|
-
),
|
|
662
|
+
render: () => <PieChartEntryDonutPreview />,
|
|
444
663
|
code: `import { PieChart } from '@open-mercato/ui/backend/charts'
|
|
445
664
|
|
|
446
665
|
<PieChart title="Orders by status" data={ordersByStatus} variant="donut" />`,
|
|
447
666
|
},
|
|
448
667
|
],
|
|
449
668
|
}
|
|
450
|
-
|
|
451
669
|
const topNTableEntry: GalleryEntry = {
|
|
452
670
|
id: 'top-n-table',
|
|
453
671
|
title: 'TopNTable',
|
|
@@ -456,11 +674,7 @@ const topNTableEntry: GalleryEntry = {
|
|
|
456
674
|
{
|
|
457
675
|
id: 'basic',
|
|
458
676
|
title: 'Top products by revenue',
|
|
459
|
-
render: () =>
|
|
460
|
-
<div className="w-full max-w-xl">
|
|
461
|
-
<TopNTable title="Top products" data={topProducts} columns={topProductColumns} />
|
|
462
|
-
</div>
|
|
463
|
-
),
|
|
677
|
+
render: () => <TopNTableEntryBasicPreview />,
|
|
464
678
|
code: `import { TopNTable, type TopNTableColumn } from '@open-mercato/ui/backend/charts'
|
|
465
679
|
|
|
466
680
|
const columns: TopNTableColumn<TopProductRow>[] = [
|
|
@@ -474,16 +688,7 @@ const columns: TopNTableColumn<TopProductRow>[] = [
|
|
|
474
688
|
{
|
|
475
689
|
id: 'max-rows',
|
|
476
690
|
title: 'Capped with maxRows',
|
|
477
|
-
render: () =>
|
|
478
|
-
<div className="w-full max-w-xl">
|
|
479
|
-
<TopNTable
|
|
480
|
-
title="Top 3 products"
|
|
481
|
-
data={topProducts}
|
|
482
|
-
columns={topProductColumns}
|
|
483
|
-
maxRows={3}
|
|
484
|
-
/>
|
|
485
|
-
</div>
|
|
486
|
-
),
|
|
691
|
+
render: () => <TopNTableEntryMaxRowsPreview />,
|
|
487
692
|
code: `import { TopNTable } from '@open-mercato/ui/backend/charts'
|
|
488
693
|
|
|
489
694
|
<TopNTable title="Top 3 products" data={topProducts} columns={columns} maxRows={3} />`,
|
|
@@ -491,24 +696,131 @@ const columns: TopNTableColumn<TopProductRow>[] = [
|
|
|
491
696
|
{
|
|
492
697
|
id: 'empty',
|
|
493
698
|
title: 'Empty state',
|
|
494
|
-
render: () =>
|
|
495
|
-
<div className="w-full max-w-xl">
|
|
496
|
-
<TopNTable
|
|
497
|
-
title="Top products"
|
|
498
|
-
data={[]}
|
|
499
|
-
columns={topProductColumns}
|
|
500
|
-
emptyMessage="No sales in this period"
|
|
501
|
-
/>
|
|
502
|
-
</div>
|
|
503
|
-
),
|
|
699
|
+
render: () => <TopNTableEntryEmptyPreview />,
|
|
504
700
|
code: `import { TopNTable } from '@open-mercato/ui/backend/charts'
|
|
505
701
|
|
|
506
702
|
<TopNTable title="Top products" data={[]} columns={columns} emptyMessage="No sales in this period" />`,
|
|
507
703
|
},
|
|
508
704
|
],
|
|
509
705
|
}
|
|
510
|
-
|
|
706
|
+
const marketingWidgetsEntry: GalleryEntry = {
|
|
707
|
+
id: 'marketing-widgets',
|
|
708
|
+
title: 'Marketing & Sales Widgets',
|
|
709
|
+
importPath: '@open-mercato/ui/primitives/card',
|
|
710
|
+
figmaNodeId: '164628:1734',
|
|
711
|
+
variants: [
|
|
712
|
+
{
|
|
713
|
+
id: 'total-sales',
|
|
714
|
+
title: 'total-sales',
|
|
715
|
+
render: () => <MarketingWidgetDemo kind="total-sales" />,
|
|
716
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="total-sales" />'),
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
id: 'total-visitors',
|
|
720
|
+
title: 'total-visitors',
|
|
721
|
+
render: () => <MarketingWidgetDemo kind="total-visitors" />,
|
|
722
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="total-visitors" />'),
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
id: 'conversion-rate',
|
|
726
|
+
title: 'conversion-rate',
|
|
727
|
+
render: () => <MarketingWidgetDemo kind="conversion-rate" />,
|
|
728
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="conversion-rate" />'),
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
id: 'user-retention',
|
|
732
|
+
title: 'user-retention',
|
|
733
|
+
render: () => <MarketingWidgetDemo kind="user-retention" />,
|
|
734
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="user-retention" />'),
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
id: 'weekly-visitors',
|
|
738
|
+
title: 'weekly-visitors',
|
|
739
|
+
render: () => <MarketingWidgetDemo kind="weekly-visitors" />,
|
|
740
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="weekly-visitors" />'),
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
id: 'visitor-channels',
|
|
744
|
+
title: 'visitor-channels',
|
|
745
|
+
render: () => <MarketingWidgetDemo kind="visitor-channels" />,
|
|
746
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="visitor-channels" />'),
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
id: 'geography',
|
|
750
|
+
title: 'geography',
|
|
751
|
+
render: () => <MarketingWidgetDemo kind="geography" />,
|
|
752
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="geography" />'),
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
id: 'realtime-visitors',
|
|
756
|
+
title: 'realtime-visitors',
|
|
757
|
+
render: () => <MarketingWidgetDemo kind="realtime-visitors" />,
|
|
758
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="realtime-visitors" />'),
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
id: 'marketing-channels',
|
|
762
|
+
title: 'marketing-channels',
|
|
763
|
+
render: () => <MarketingWidgetDemo kind="marketing-channels" />,
|
|
764
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="marketing-channels" />'),
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
id: 'product-performance',
|
|
768
|
+
title: 'product-performance',
|
|
769
|
+
render: () => <MarketingWidgetDemo kind="product-performance" />,
|
|
770
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="product-performance" />'),
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
id: 'shipping-tracking',
|
|
774
|
+
title: 'shipping-tracking',
|
|
775
|
+
render: () => <MarketingWidgetDemo kind="shipping-tracking" />,
|
|
776
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="shipping-tracking" />'),
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
id: 'my-products',
|
|
780
|
+
title: 'my-products',
|
|
781
|
+
render: () => <MarketingWidgetDemo kind="my-products" />,
|
|
782
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="my-products" />'),
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
id: 'product-categories',
|
|
786
|
+
title: 'product-categories',
|
|
787
|
+
render: () => <MarketingWidgetDemo kind="product-categories" />,
|
|
788
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="product-categories" />'),
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
id: 'customer-segments',
|
|
792
|
+
title: 'customer-segments',
|
|
793
|
+
render: () => <MarketingWidgetDemo kind="customer-segments" />,
|
|
794
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="customer-segments" />'),
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
id: 'sales-channels',
|
|
798
|
+
title: 'sales-channels',
|
|
799
|
+
render: () => <MarketingWidgetDemo kind="sales-channels" />,
|
|
800
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="sales-channels" />'),
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
id: 'campaign-data',
|
|
804
|
+
title: 'campaign-data',
|
|
805
|
+
render: () => <MarketingWidgetDemo kind="campaign-data" />,
|
|
806
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="campaign-data" />'),
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
id: 'support-analytics',
|
|
810
|
+
title: 'support-analytics',
|
|
811
|
+
render: () => <MarketingWidgetDemo kind="support-analytics" />,
|
|
812
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="support-analytics" />'),
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
id: 'recent-activities',
|
|
816
|
+
title: 'recent-activities',
|
|
817
|
+
render: () => <MarketingWidgetDemo kind="recent-activities" />,
|
|
818
|
+
code: marketingWidgetExampleCode('<MarketingWidgetDemo kind="recent-activities" />'),
|
|
819
|
+
},
|
|
820
|
+
],
|
|
821
|
+
}
|
|
511
822
|
export const entries: GalleryEntry[] = [
|
|
823
|
+
marketingWidgetsEntry,
|
|
512
824
|
kpiCardEntry,
|
|
513
825
|
sparklineEntry,
|
|
514
826
|
barChartEntry,
|