@open-mercato/core 0.7.1-develop.7203.1.9396450b78 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,4 @@
|
|
|
1
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
1
2
|
import * as React from 'react'
|
|
2
3
|
import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
3
4
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
@@ -23,88 +24,187 @@ import type { GalleryEntry } from '../types'
|
|
|
23
24
|
// inline in-memory adapters, so previews never touch an API. AttachmentsSection
|
|
24
25
|
// fetches through `apiCall` internally and cannot take an adapter; it is shown
|
|
25
26
|
// in its `recordId={null}` state, where fetching is disabled by design.
|
|
26
|
-
|
|
27
|
+
function LoadingMessageEntryDefaultPreview() {
|
|
28
|
+
const t = useT()
|
|
29
|
+
return (
|
|
30
|
+
<div className="w-full max-w-md">
|
|
31
|
+
<LoadingMessage label={t('design_system.gallery.samples.content.loadingCustomer')} />
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
function ErrorMessageEntryBasicPreview() {
|
|
36
|
+
const t = useT()
|
|
37
|
+
return (
|
|
38
|
+
<div className="w-full max-w-md">
|
|
39
|
+
<ErrorMessage label={t('design_system.gallery.samples.content.failedToLoadCustomer')} />
|
|
40
|
+
</div>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
function ErrorMessageEntryWithDescriptionActionPreview() {
|
|
44
|
+
const t = useT()
|
|
45
|
+
return (
|
|
46
|
+
<div className="w-full max-w-md">
|
|
47
|
+
<ErrorMessage
|
|
48
|
+
label={t('design_system.gallery.samples.content.failedToLoadAttachments')}
|
|
49
|
+
description={t('design_system.gallery.samples.content.theStorageServiceDidNotRespondInTime')}
|
|
50
|
+
action={
|
|
51
|
+
<Button variant="outline" size="sm">
|
|
52
|
+
{t('design_system.gallery.samples.content.retry')}
|
|
53
|
+
</Button>
|
|
54
|
+
}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
function NotesSectionEntryMockAdapterPreview() {
|
|
60
|
+
const t = useT()
|
|
61
|
+
return (
|
|
62
|
+
<div className="w-full max-w-2xl">
|
|
63
|
+
<NotesSection
|
|
64
|
+
entityId="person-1"
|
|
65
|
+
viewerUserId="user-1"
|
|
66
|
+
viewerName="Anna Nowak"
|
|
67
|
+
emptyLabel={t('design_system.gallery.samples.content.noNotesYet')}
|
|
68
|
+
addActionLabel={t('design_system.gallery.samples.content.addNote')}
|
|
69
|
+
emptyState={{
|
|
70
|
+
title: t('design_system.gallery.samples.content.noNotesYet'),
|
|
71
|
+
actionLabel: t('design_system.gallery.samples.content.addNote'),
|
|
72
|
+
description: t('design_system.gallery.samples.content.notesAddedHereAreVisibleToTheWholeTeam'),
|
|
73
|
+
}}
|
|
74
|
+
translator={t}
|
|
75
|
+
dataAdapter={notesAdapter(t)}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
function AddressesSectionEntryMockAdapterPreview() {
|
|
81
|
+
const t = useT()
|
|
82
|
+
return (
|
|
83
|
+
<div className="w-full max-w-2xl">
|
|
84
|
+
<AddressesSection
|
|
85
|
+
entityId="person-1"
|
|
86
|
+
emptyLabel={t('design_system.gallery.samples.content.noAddressesYet')}
|
|
87
|
+
addActionLabel={t('design_system.gallery.samples.content.addAddress')}
|
|
88
|
+
emptyState={{
|
|
89
|
+
title: t('design_system.gallery.samples.content.noAddressesYet'),
|
|
90
|
+
actionLabel: t('design_system.gallery.samples.content.addAddress'),
|
|
91
|
+
}}
|
|
92
|
+
translator={t}
|
|
93
|
+
dataAdapter={addressesAdapter(t)}
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
function AttachmentsSectionEntryUnsavedRecordPreview() {
|
|
99
|
+
const t = useT()
|
|
100
|
+
return (
|
|
101
|
+
<div className="w-full max-w-2xl">
|
|
102
|
+
<AttachmentsSection
|
|
103
|
+
entityId="customers:person"
|
|
104
|
+
recordId={null}
|
|
105
|
+
title={t('design_system.gallery.samples.content.attachments')}
|
|
106
|
+
description={t('design_system.gallery.samples.content.filesLinkedToThisRecord')}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
function DetailFieldsSectionEntryFieldGridPreview() {
|
|
112
|
+
const t = useT()
|
|
113
|
+
return (
|
|
114
|
+
<div className="w-full">
|
|
115
|
+
<DetailFieldsSection fields={fieldGrid(t)} />
|
|
116
|
+
</div>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
function DetailFieldsSectionEntryCustomFieldPreview() {
|
|
120
|
+
const t = useT()
|
|
121
|
+
return (
|
|
122
|
+
<div className="w-full">
|
|
123
|
+
<DetailFieldsSection fields={fieldGridWithCustom(t)} />
|
|
124
|
+
</div>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
27
127
|
const saveNoop = async () => {}
|
|
28
|
-
|
|
29
|
-
const fieldGrid: DetailFieldConfig[] = [
|
|
128
|
+
const fieldGrid = (t: ReturnType<typeof useT>): DetailFieldConfig[] => [
|
|
30
129
|
{
|
|
31
130
|
key: 'first-name',
|
|
32
131
|
kind: 'text',
|
|
33
|
-
label: '
|
|
132
|
+
label: t('design_system.gallery.samples.content.firstName'),
|
|
34
133
|
value: 'Anna',
|
|
35
|
-
emptyLabel: '
|
|
134
|
+
emptyLabel: t('design_system.gallery.samples.content.addFirstName'),
|
|
36
135
|
onSave: saveNoop,
|
|
37
136
|
},
|
|
38
137
|
{
|
|
39
138
|
key: 'phone',
|
|
40
139
|
kind: 'text',
|
|
41
|
-
label: '
|
|
140
|
+
label: t('design_system.gallery.samples.content.phone'),
|
|
42
141
|
value: null,
|
|
43
|
-
emptyLabel: '
|
|
142
|
+
emptyLabel: t('design_system.gallery.samples.content.addPhone'),
|
|
44
143
|
onSave: saveNoop,
|
|
45
144
|
},
|
|
46
145
|
{
|
|
47
146
|
key: 'status',
|
|
48
147
|
kind: 'select',
|
|
49
|
-
label: '
|
|
148
|
+
label: t('design_system.gallery.samples.content.status'),
|
|
50
149
|
value: 'active',
|
|
51
|
-
emptyLabel: '
|
|
150
|
+
emptyLabel: t('design_system.gallery.samples.content.setStatus'),
|
|
52
151
|
options: [
|
|
53
|
-
{
|
|
54
|
-
|
|
152
|
+
{
|
|
153
|
+
value: 'active',
|
|
154
|
+
label: t('design_system.gallery.samples.content.active'),
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
value: 'inactive',
|
|
158
|
+
label: t('design_system.gallery.samples.content.inactive'),
|
|
159
|
+
},
|
|
55
160
|
],
|
|
56
161
|
onSave: saveNoop,
|
|
57
162
|
},
|
|
58
163
|
{
|
|
59
164
|
key: 'notes',
|
|
60
165
|
kind: 'multiline',
|
|
61
|
-
label: '
|
|
62
|
-
value: '
|
|
63
|
-
emptyLabel: '
|
|
166
|
+
label: t('design_system.gallery.samples.content.notes'),
|
|
167
|
+
value: t('design_system.gallery.samples.content.prefersEmailContact'),
|
|
168
|
+
emptyLabel: t('design_system.gallery.samples.content.addNotes'),
|
|
64
169
|
onSave: saveNoop,
|
|
65
170
|
gridClassName: 'sm:col-span-2 md:col-span-3',
|
|
66
171
|
},
|
|
67
172
|
]
|
|
68
|
-
|
|
69
|
-
const fieldGridWithCustom: DetailFieldConfig[] = [
|
|
173
|
+
const fieldGridWithCustom = (t: ReturnType<typeof useT>): DetailFieldConfig[] => [
|
|
70
174
|
{
|
|
71
175
|
key: 'email',
|
|
72
176
|
kind: 'text',
|
|
73
|
-
label: '
|
|
177
|
+
label: t('design_system.gallery.samples.content.email'),
|
|
74
178
|
value: 'anna@example.com',
|
|
75
|
-
emptyLabel: '
|
|
179
|
+
emptyLabel: t('design_system.gallery.samples.content.addEmail'),
|
|
76
180
|
onSave: saveNoop,
|
|
77
181
|
},
|
|
78
182
|
{
|
|
79
183
|
key: 'owner',
|
|
80
184
|
kind: 'custom',
|
|
81
|
-
label: '
|
|
82
|
-
emptyLabel: '
|
|
185
|
+
label: t('design_system.gallery.samples.content.owner'),
|
|
186
|
+
emptyLabel: t('design_system.gallery.samples.content.unassigned'),
|
|
83
187
|
render: () => (
|
|
84
188
|
<div className="space-y-1">
|
|
85
|
-
<div className="text-xs text-muted-foreground">
|
|
86
|
-
<Badge variant="muted">
|
|
189
|
+
<div className="text-xs text-muted-foreground">{t('design_system.gallery.samples.content.owner')}</div>
|
|
190
|
+
<Badge variant="muted">{t('design_system.gallery.samples.content.unassigned')}</Badge>
|
|
87
191
|
</div>
|
|
88
192
|
),
|
|
89
193
|
},
|
|
90
194
|
]
|
|
91
195
|
|
|
92
|
-
// Sections resolve their labels through an app translator in real pages; the
|
|
93
|
-
// gallery translator just surfaces each key's fallback (or last segment).
|
|
94
|
-
const galleryTranslator = (key: string, fallback?: string) =>
|
|
95
|
-
fallback ?? key.split('.').pop() ?? key
|
|
96
196
|
|
|
97
|
-
const notesAdapter: NotesSectionProps['dataAdapter']
|
|
197
|
+
const notesAdapter = (t: ReturnType<typeof useT>): NotesSectionProps['dataAdapter'] => ({
|
|
98
198
|
list: async () => [
|
|
99
199
|
{
|
|
100
200
|
id: 'note-1',
|
|
101
|
-
body: '
|
|
201
|
+
body: t('design_system.gallery.samples.content.askedForARevisedQuoteFollowUpOnFriday'),
|
|
102
202
|
createdAt: '2026-07-15T09:30:00.000Z',
|
|
103
203
|
authorName: 'Anna Nowak',
|
|
104
204
|
},
|
|
105
205
|
{
|
|
106
206
|
id: 'note-2',
|
|
107
|
-
body: '
|
|
207
|
+
body: t('design_system.gallery.samples.content.prefersEmailContactOverPhone'),
|
|
108
208
|
createdAt: '2026-07-10T14:05:00.000Z',
|
|
109
209
|
authorName: 'Jan Kowalski',
|
|
110
210
|
},
|
|
@@ -112,13 +212,12 @@ const notesAdapter: NotesSectionProps['dataAdapter'] = {
|
|
|
112
212
|
create: async () => {},
|
|
113
213
|
update: async () => {},
|
|
114
214
|
delete: async () => {},
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const addressesAdapter: AddressDataAdapter = {
|
|
215
|
+
})
|
|
216
|
+
const addressesAdapter = (t: ReturnType<typeof useT>): AddressDataAdapter => ({
|
|
118
217
|
list: async () => [
|
|
119
218
|
{
|
|
120
219
|
id: 'address-1',
|
|
121
|
-
name: '
|
|
220
|
+
name: t('design_system.gallery.samples.content.headquarters'),
|
|
122
221
|
addressLine1: 'Prosta 51',
|
|
123
222
|
city: 'Warszawa',
|
|
124
223
|
postalCode: '00-838',
|
|
@@ -127,7 +226,7 @@ const addressesAdapter: AddressDataAdapter = {
|
|
|
127
226
|
},
|
|
128
227
|
{
|
|
129
228
|
id: 'address-2',
|
|
130
|
-
name: '
|
|
229
|
+
name: t('design_system.gallery.samples.content.warehouse'),
|
|
131
230
|
addressLine1: 'Magazynowa 7',
|
|
132
231
|
city: 'Pruszków',
|
|
133
232
|
postalCode: '05-800',
|
|
@@ -137,8 +236,7 @@ const addressesAdapter: AddressDataAdapter = {
|
|
|
137
236
|
create: async () => {},
|
|
138
237
|
update: async () => {},
|
|
139
238
|
delete: async () => {},
|
|
140
|
-
}
|
|
141
|
-
|
|
239
|
+
})
|
|
142
240
|
const detailFieldsSectionEntry: GalleryEntry = {
|
|
143
241
|
id: 'detail-fields-section',
|
|
144
242
|
title: 'DetailFieldsSection',
|
|
@@ -147,11 +245,7 @@ const detailFieldsSectionEntry: GalleryEntry = {
|
|
|
147
245
|
{
|
|
148
246
|
id: 'field-grid',
|
|
149
247
|
title: 'Inline-editable field grid',
|
|
150
|
-
render: () =>
|
|
151
|
-
<div className="w-full">
|
|
152
|
-
<DetailFieldsSection fields={fieldGrid} />
|
|
153
|
-
</div>
|
|
154
|
-
),
|
|
248
|
+
render: () => <DetailFieldsSectionEntryFieldGridPreview />,
|
|
155
249
|
code: `import { DetailFieldsSection, type DetailFieldConfig } from '@open-mercato/ui/backend/detail'
|
|
156
250
|
|
|
157
251
|
const fields: DetailFieldConfig[] = [
|
|
@@ -173,11 +267,7 @@ const fields: DetailFieldConfig[] = [
|
|
|
173
267
|
{
|
|
174
268
|
id: 'custom-field',
|
|
175
269
|
title: 'With a custom field cell',
|
|
176
|
-
render: () =>
|
|
177
|
-
<div className="w-full">
|
|
178
|
-
<DetailFieldsSection fields={fieldGridWithCustom} />
|
|
179
|
-
</div>
|
|
180
|
-
),
|
|
270
|
+
render: () => <DetailFieldsSectionEntryCustomFieldPreview />,
|
|
181
271
|
code: `import { DetailFieldsSection, type DetailFieldConfig } from '@open-mercato/ui/backend/detail'
|
|
182
272
|
import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
183
273
|
|
|
@@ -198,7 +288,6 @@ const fields: DetailFieldConfig[] = [
|
|
|
198
288
|
},
|
|
199
289
|
],
|
|
200
290
|
}
|
|
201
|
-
|
|
202
291
|
const loadingMessageEntry: GalleryEntry = {
|
|
203
292
|
id: 'loading-message',
|
|
204
293
|
title: 'LoadingMessage',
|
|
@@ -207,18 +296,13 @@ const loadingMessageEntry: GalleryEntry = {
|
|
|
207
296
|
{
|
|
208
297
|
id: 'default',
|
|
209
298
|
title: 'default',
|
|
210
|
-
render: () =>
|
|
211
|
-
<div className="w-full max-w-md">
|
|
212
|
-
<LoadingMessage label="Loading customer…" />
|
|
213
|
-
</div>
|
|
214
|
-
),
|
|
299
|
+
render: () => <LoadingMessageEntryDefaultPreview />,
|
|
215
300
|
code: `import { LoadingMessage } from '@open-mercato/ui/backend/detail'
|
|
216
301
|
|
|
217
302
|
if (isLoading) return <LoadingMessage label={t('customers.people.detail.loading')} />`,
|
|
218
303
|
},
|
|
219
304
|
],
|
|
220
305
|
}
|
|
221
|
-
|
|
222
306
|
const errorMessageEntry: GalleryEntry = {
|
|
223
307
|
id: 'error-message',
|
|
224
308
|
title: 'ErrorMessage',
|
|
@@ -227,11 +311,7 @@ const errorMessageEntry: GalleryEntry = {
|
|
|
227
311
|
{
|
|
228
312
|
id: 'basic',
|
|
229
313
|
title: 'Label only',
|
|
230
|
-
render: () =>
|
|
231
|
-
<div className="w-full max-w-md">
|
|
232
|
-
<ErrorMessage label="Failed to load customer." />
|
|
233
|
-
</div>
|
|
234
|
-
),
|
|
314
|
+
render: () => <ErrorMessageEntryBasicPreview />,
|
|
235
315
|
code: `import { ErrorMessage } from '@open-mercato/ui/backend/detail'
|
|
236
316
|
|
|
237
317
|
if (error) return <ErrorMessage label={error} />`,
|
|
@@ -239,19 +319,7 @@ if (error) return <ErrorMessage label={error} />`,
|
|
|
239
319
|
{
|
|
240
320
|
id: 'with-description-action',
|
|
241
321
|
title: 'With description and action',
|
|
242
|
-
render: () =>
|
|
243
|
-
<div className="w-full max-w-md">
|
|
244
|
-
<ErrorMessage
|
|
245
|
-
label="Failed to load attachments."
|
|
246
|
-
description="The storage service did not respond in time."
|
|
247
|
-
action={
|
|
248
|
-
<Button variant="outline" size="sm">
|
|
249
|
-
Retry
|
|
250
|
-
</Button>
|
|
251
|
-
}
|
|
252
|
-
/>
|
|
253
|
-
</div>
|
|
254
|
-
),
|
|
322
|
+
render: () => <ErrorMessageEntryWithDescriptionActionPreview />,
|
|
255
323
|
code: `import { ErrorMessage } from '@open-mercato/ui/backend/detail'
|
|
256
324
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
257
325
|
|
|
@@ -263,7 +331,6 @@ import { Button } from '@open-mercato/ui/primitives/button'
|
|
|
263
331
|
},
|
|
264
332
|
],
|
|
265
333
|
}
|
|
266
|
-
|
|
267
334
|
const notesSectionEntry: GalleryEntry = {
|
|
268
335
|
id: 'notes-section',
|
|
269
336
|
title: 'NotesSection',
|
|
@@ -272,24 +339,7 @@ const notesSectionEntry: GalleryEntry = {
|
|
|
272
339
|
{
|
|
273
340
|
id: 'mock-adapter',
|
|
274
341
|
title: 'Timeline (inline mock adapter — no API)',
|
|
275
|
-
render: () =>
|
|
276
|
-
<div className="w-full max-w-2xl">
|
|
277
|
-
<NotesSection
|
|
278
|
-
entityId="person-1"
|
|
279
|
-
viewerUserId="user-1"
|
|
280
|
-
viewerName="Anna Nowak"
|
|
281
|
-
emptyLabel="No notes yet"
|
|
282
|
-
addActionLabel="Add note"
|
|
283
|
-
emptyState={{
|
|
284
|
-
title: 'No notes yet',
|
|
285
|
-
actionLabel: 'Add note',
|
|
286
|
-
description: 'Notes added here are visible to the whole team.',
|
|
287
|
-
}}
|
|
288
|
-
translator={galleryTranslator}
|
|
289
|
-
dataAdapter={notesAdapter}
|
|
290
|
-
/>
|
|
291
|
-
</div>
|
|
292
|
-
),
|
|
342
|
+
render: () => <NotesSectionEntryMockAdapterPreview />,
|
|
293
343
|
code: `import { NotesSection, type NotesDataAdapter } from '@open-mercato/ui/backend/detail'
|
|
294
344
|
|
|
295
345
|
// Implement the adapter against your module's API (apiCall) — never fork the section.
|
|
@@ -316,7 +366,6 @@ const notesAdapter: NotesDataAdapter = {
|
|
|
316
366
|
},
|
|
317
367
|
],
|
|
318
368
|
}
|
|
319
|
-
|
|
320
369
|
const addressesSectionEntry: GalleryEntry = {
|
|
321
370
|
id: 'addresses-section',
|
|
322
371
|
title: 'AddressesSection',
|
|
@@ -325,18 +374,7 @@ const addressesSectionEntry: GalleryEntry = {
|
|
|
325
374
|
{
|
|
326
375
|
id: 'mock-adapter',
|
|
327
376
|
title: 'Address tiles (inline mock adapter — no API)',
|
|
328
|
-
render: () =>
|
|
329
|
-
<div className="w-full max-w-2xl">
|
|
330
|
-
<AddressesSection
|
|
331
|
-
entityId="person-1"
|
|
332
|
-
emptyLabel="No addresses yet"
|
|
333
|
-
addActionLabel="Add address"
|
|
334
|
-
emptyState={{ title: 'No addresses yet', actionLabel: 'Add address' }}
|
|
335
|
-
translator={galleryTranslator}
|
|
336
|
-
dataAdapter={addressesAdapter}
|
|
337
|
-
/>
|
|
338
|
-
</div>
|
|
339
|
-
),
|
|
377
|
+
render: () => <AddressesSectionEntryMockAdapterPreview />,
|
|
340
378
|
code: `import { AddressesSection, type AddressDataAdapter } from '@open-mercato/ui/backend/detail'
|
|
341
379
|
|
|
342
380
|
const addressesAdapter: AddressDataAdapter = {
|
|
@@ -360,7 +398,6 @@ const addressesAdapter: AddressDataAdapter = {
|
|
|
360
398
|
},
|
|
361
399
|
],
|
|
362
400
|
}
|
|
363
|
-
|
|
364
401
|
const attachmentsSectionEntry: GalleryEntry = {
|
|
365
402
|
id: 'attachments-section',
|
|
366
403
|
title: 'AttachmentsSection',
|
|
@@ -369,16 +406,7 @@ const attachmentsSectionEntry: GalleryEntry = {
|
|
|
369
406
|
{
|
|
370
407
|
id: 'unsaved-record',
|
|
371
408
|
title: 'Unsaved record (recordId null — API fetch disabled)',
|
|
372
|
-
render: () =>
|
|
373
|
-
<div className="w-full max-w-2xl">
|
|
374
|
-
<AttachmentsSection
|
|
375
|
-
entityId="customers:person"
|
|
376
|
-
recordId={null}
|
|
377
|
-
title="Attachments"
|
|
378
|
-
description="Files linked to this record."
|
|
379
|
-
/>
|
|
380
|
-
</div>
|
|
381
|
-
),
|
|
409
|
+
render: () => <AttachmentsSectionEntryUnsavedRecordPreview />,
|
|
382
410
|
code: `import { AttachmentsSection } from '@open-mercato/ui/backend/detail'
|
|
383
411
|
|
|
384
412
|
// Fetches /api/attachments internally once recordId is set;
|
|
@@ -392,7 +420,6 @@ const attachmentsSectionEntry: GalleryEntry = {
|
|
|
392
420
|
},
|
|
393
421
|
],
|
|
394
422
|
}
|
|
395
|
-
|
|
396
423
|
export const entries: GalleryEntry[] = [
|
|
397
424
|
detailFieldsSectionEntry,
|
|
398
425
|
loadingMessageEntry,
|