@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
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Generated by yarn storybook:generate from feeds.tsx.
|
|
2
|
+
const source = "import * as React from 'react'\nimport { FileText, ListFilter, MoreHorizontal, RotateCcw } from 'lucide-react'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { ActivityFeed, ActivityFeedComment, ActivityFeedFileChip, ActivityFeedItem, ActivityFeedStatusChip } from '@open-mercato/ui/primitives/activity-feed'\nimport { Avatar, AvatarStack } from '@open-mercato/ui/primitives/avatar'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@open-mercato/ui/primitives/dialog'\nimport { NotificationFeed, NotificationFeedFooter, NotificationFeedHeader, NotificationFeedItem, NotificationFeedList } from '@open-mercato/ui/primitives/notification-feed'\nimport { Popover, PopoverClose, PopoverContent, PopoverTrigger } from '@open-mercato/ui/primitives/popover'\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'\nimport { Textarea } from '@open-mercato/ui/primitives/textarea'\n\nconst feedKinds = ['basic', 'file', 'comment', 'avatars', 'tasks'] as const\ntype FeedKind = typeof feedKinds[number]\nconst people: Record<FeedKind, string> = { basic: 'Wei Chen', file: 'Omar Haddad', comment: 'Laura Perez', avatars: 'Ines Kowalska', tasks: 'Ravi Patel' }\n\nfunction LocalFilePreview({ open, onOpenChange }: { open: boolean; onOpenChange: (open: boolean) => void }) {\n const t = useT()\n return <Dialog open={open} onOpenChange={onOpenChange}><DialogContent>\n <DialogHeader><DialogTitle>apex-report.pdf</DialogTitle><DialogDescription>{t('design_system.gallery.samples.feeds.filePreview')}</DialogDescription></DialogHeader>\n <p className=\"text-sm text-muted-foreground\">{t('design_system.gallery.samples.feeds.fileBody')}</p>\n </DialogContent></Dialog>\n}\n\nexport function ActivityFeedExample() {\n const t = useT()\n const [filter, setFilter] = React.useState<'all' | 'file' | 'comment'>('all')\n const [hidden, setHidden] = React.useState<FeedKind[]>([])\n const [fileOpen, setFileOpen] = React.useState(false)\n const [replyOpen, setReplyOpen] = React.useState(false)\n const [draft, setDraft] = React.useState('')\n const [reply, setReply] = React.useState('')\n const visible = feedKinds.filter(kind => !hidden.includes(kind) && (filter === 'all' || filter === kind))\n const title = (kind: FeedKind) => <>{people[kind]} <span className=\"font-normal text-muted-foreground\">{t(`design_system.gallery.samples.feeds.${kind}Action`)}</span></>\n return <div className=\"w-full max-w-2xl space-y-5\">\n <div className=\"flex flex-wrap items-center gap-1\" role=\"group\" aria-label={t('design_system.gallery.samples.feeds.filter')}>\n {(['all', 'file', 'comment'] as const).map(value => <Button key={value} size=\"2xs\" variant=\"ghost\" aria-pressed={filter === value} onClick={() => setFilter(value)} className=\"gap-1.5 px-2.5 aria-pressed:bg-status-info-bg aria-pressed:text-status-info-text\">\n {value === 'all' ? <ListFilter className=\"size-[18px]\" /> : value === 'file' ? <FileText className=\"size-[18px]\" /> : null}{t(`design_system.gallery.samples.feeds.${value}`)}\n </Button>)}\n {hidden.length ? <Button variant=\"ghost\" size=\"2xs\" onClick={() => setHidden([])}><RotateCcw />{t('design_system.gallery.samples.feeds.restore')}</Button> : null}\n </div>\n <ActivityFeed className=\"gap-5\">\n {visible.map(kind => <ActivityFeedItem key={kind} className=\"gap-4 [&_[data-slot=activity-feed-item-title]]:leading-5 [&_[data-slot=activity-feed-item-title]>span:first-child]:font-medium\" avatar={<Avatar size={32} label={people[kind]} />} title={title(kind)} timestamp={t('design_system.gallery.samples.feeds.time')}\n actions={<Popover><PopoverTrigger asChild><Button variant=\"ghost\" size=\"icon\" className=\"size-6\" aria-label={t('design_system.gallery.samples.feeds.actions', { name: people[kind] })}><MoreHorizontal /></Button></PopoverTrigger><PopoverContent align=\"end\" className=\"w-auto p-1\"><PopoverClose asChild><Button variant=\"ghost\" size=\"sm\" onClick={() => setHidden(items => [...items, kind])}>{t('design_system.gallery.samples.feeds.hide')}</Button></PopoverClose></PopoverContent></Popover>}>\n {kind === 'file' ? <ActivityFeedFileChip name=\"apex-report.pdf\" size=\"4 MB\" onDownload={() => setFileOpen(true)} downloadAriaLabel={t('design_system.gallery.samples.feeds.openFile')} /> : null}\n {kind === 'comment' ? <div className=\"w-full space-y-2\"><ActivityFeedComment className=\"[&_[data-slot=activity-feed-comment-body]]:whitespace-normal [&_[data-slot=activity-feed-comment-body]]:break-words\" onReply={() => setReplyOpen(value => !value)} replyLabel={t('design_system.gallery.samples.feeds.reply')}>{t('design_system.gallery.samples.feeds.commentBody')}</ActivityFeedComment>\n {replyOpen ? <form className=\"space-y-2\" onSubmit={event => { event.preventDefault(); if (draft.trim()) { setReply(draft.trim()); setDraft(''); setReplyOpen(false) } }}><Textarea aria-label={t('design_system.gallery.samples.feeds.reply')} value={draft} onChange={event => setDraft(event.target.value)} /><Button size=\"sm\" type=\"submit\" disabled={!draft.trim()}>{t('design_system.gallery.samples.feeds.saveReply')}</Button></form> : null}\n {reply ? <p className=\"rounded-md bg-muted p-3 text-sm\" role=\"status\">{reply}</p> : null}\n </div> : null}\n {kind === 'avatars' ? <div className=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-background py-0.5 pl-0.5 pr-2 shadow-xs\"><AvatarStack size={24} max={3}><Avatar size={24} label=\"Wei Chen\" /><Avatar size={24} label=\"Laura Perez\" /><Avatar size={24} label=\"Omar Haddad\" /></AvatarStack><span className=\"text-xs text-muted-foreground\">+4</span></div> : null}\n {kind === 'tasks' ? <><ActivityFeedStatusChip status=\"success\">{t('design_system.gallery.samples.feeds.approved')}</ActivityFeedStatusChip><ActivityFeedStatusChip status=\"warning\">{t('design_system.gallery.samples.feeds.review')}</ActivityFeedStatusChip><ActivityFeedStatusChip status=\"pending\">{t('design_system.gallery.samples.feeds.pending')}</ActivityFeedStatusChip><ActivityFeedStatusChip status=\"error\">{t('design_system.gallery.samples.feeds.blocked')}</ActivityFeedStatusChip></> : null}\n </ActivityFeedItem>)}\n </ActivityFeed>\n {!visible.length ? <p className=\"text-sm text-muted-foreground\" role=\"status\">{t('design_system.gallery.samples.feeds.empty')}</p> : null}\n <LocalFilePreview open={fileOpen} onOpenChange={setFileOpen} />\n </div>\n}\n\nconst notificationKinds = ['basic', 'button', 'file', 'message'] as const\nexport function NotificationFeedExample({ tabs = 4 }: { tabs?: 2 | 3 | 4 }) {\n const t = useT()\n const [filter, setFilter] = React.useState('all')\n const [archived, setArchived] = React.useState(false)\n const [read, setRead] = React.useState(false)\n const [decision, setDecision] = React.useState<'approved' | 'denied' | null>(null)\n const [fileOpen, setFileOpen] = React.useState(false)\n const filters = ['all', 'unread', 'file', 'message'].slice(0, tabs)\n const visible = archived || (filter === 'unread' && read) ? [] : notificationKinds.filter(kind => !['file', 'message'].includes(filter) || kind === filter)\n return <div className=\"w-full max-w-xl space-y-3\"><NotificationFeed>\n <NotificationFeedHeader className=\"flex-wrap\" title={t('design_system.gallery.samples.feeds.notifications')}><Button size=\"2xs\" variant=\"ghost\" onClick={() => setRead(true)} disabled={read || archived}>{t('design_system.gallery.samples.feeds.markRead')}</Button></NotificationFeedHeader>\n <Tabs value={filter} onValueChange={setFilter} variant=\"underline\"><TabsList aria-label={t('design_system.gallery.samples.feeds.filter')} className=\"w-full px-3\">{filters.map(value => <TabsTrigger key={value} value={value}>{t(`design_system.gallery.samples.feeds.${value}`)}</TabsTrigger>)}</TabsList><TabsContent value={filter} className=\"mt-0\">\n <NotificationFeedList className=\"gap-1 divide-y-0 p-2\">\n {visible.map(kind => <NotificationFeedItem key={kind} className=\"rounded-lg p-3 hover:bg-muted/40 [&_[data-slot=notification-feed-item-title]]:font-medium\" icon={<Avatar size={40} label=\"Wei Chen\" />} title={t(`design_system.gallery.samples.feeds.notification${kind}`)} timestamp={<>{t('design_system.gallery.samples.feeds.time')} · Apex</>} unread={!read}>\n {kind === 'button' ? decision ? <p className=\"text-sm\" role=\"status\">{t(`design_system.gallery.samples.feeds.${decision}`)}</p> : <><Button variant=\"outline\" size=\"sm\" onClick={() => setDecision('denied')}>{t('design_system.gallery.samples.feeds.deny')}</Button><Button variant=\"primary-filled\" size=\"sm\" onClick={() => setDecision('approved')}>{t('design_system.gallery.samples.feeds.approve')}</Button></> : null}\n {kind === 'file' ? <ActivityFeedFileChip name=\"apex-report.pdf\" size=\"4 MB\" onDownload={() => setFileOpen(true)} downloadAriaLabel={t('design_system.gallery.samples.feeds.openFile')} /> : null}\n {kind === 'message' ? <p className=\"rounded-md rounded-tl-sm border border-border bg-background px-3 py-2 text-sm text-muted-foreground shadow-xs\">{t('design_system.gallery.samples.feeds.messageBody')}</p> : null}\n </NotificationFeedItem>)}\n </NotificationFeedList>\n {!visible.length ? <p className=\"p-5 text-center text-sm text-muted-foreground\" role=\"status\">{t('design_system.gallery.samples.feeds.empty')}</p> : null}\n <NotificationFeedFooter><Button variant=\"outline\" size=\"sm\" className=\"w-full\" onClick={() => setArchived(true)} disabled={archived}>{t('design_system.gallery.samples.feeds.archive')}</Button></NotificationFeedFooter></TabsContent></Tabs>\n </NotificationFeed><Button variant=\"ghost\" size=\"sm\" onClick={() => { setArchived(false); setRead(false); setDecision(null); setFilter('all') }}><RotateCcw />{t('design_system.gallery.samples.feeds.restore')}</Button><LocalFilePreview open={fileOpen} onOpenChange={setFileOpen} /></div>\n}\n"
|
|
3
|
+
export const activityFeedExampleCode = source + "\n<ActivityFeedExample />\n"
|
|
4
|
+
export const notificationFeedExampleCode = (tabs: 2 | 3 | 4) => source + `\n<NotificationFeedExample tabs={${tabs}} />\n`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { FileText, ListFilter, MoreHorizontal, RotateCcw } from 'lucide-react'
|
|
3
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
4
|
+
import { ActivityFeed, ActivityFeedComment, ActivityFeedFileChip, ActivityFeedItem, ActivityFeedStatusChip } from '@open-mercato/ui/primitives/activity-feed'
|
|
5
|
+
import { Avatar, AvatarStack } from '@open-mercato/ui/primitives/avatar'
|
|
6
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@open-mercato/ui/primitives/dialog'
|
|
8
|
+
import { NotificationFeed, NotificationFeedFooter, NotificationFeedHeader, NotificationFeedItem, NotificationFeedList } from '@open-mercato/ui/primitives/notification-feed'
|
|
9
|
+
import { Popover, PopoverClose, PopoverContent, PopoverTrigger } from '@open-mercato/ui/primitives/popover'
|
|
10
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'
|
|
11
|
+
import { Textarea } from '@open-mercato/ui/primitives/textarea'
|
|
12
|
+
|
|
13
|
+
const feedKinds = ['basic', 'file', 'comment', 'avatars', 'tasks'] as const
|
|
14
|
+
type FeedKind = typeof feedKinds[number]
|
|
15
|
+
const people: Record<FeedKind, string> = { basic: 'Wei Chen', file: 'Omar Haddad', comment: 'Laura Perez', avatars: 'Ines Kowalska', tasks: 'Ravi Patel' }
|
|
16
|
+
|
|
17
|
+
function LocalFilePreview({ open, onOpenChange }: { open: boolean; onOpenChange: (open: boolean) => void }) {
|
|
18
|
+
const t = useT()
|
|
19
|
+
return <Dialog open={open} onOpenChange={onOpenChange}><DialogContent>
|
|
20
|
+
<DialogHeader><DialogTitle>apex-report.pdf</DialogTitle><DialogDescription>{t('design_system.gallery.samples.feeds.filePreview')}</DialogDescription></DialogHeader>
|
|
21
|
+
<p className="text-sm text-muted-foreground">{t('design_system.gallery.samples.feeds.fileBody')}</p>
|
|
22
|
+
</DialogContent></Dialog>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function ActivityFeedExample() {
|
|
26
|
+
const t = useT()
|
|
27
|
+
const [filter, setFilter] = React.useState<'all' | 'file' | 'comment'>('all')
|
|
28
|
+
const [hidden, setHidden] = React.useState<FeedKind[]>([])
|
|
29
|
+
const [fileOpen, setFileOpen] = React.useState(false)
|
|
30
|
+
const [replyOpen, setReplyOpen] = React.useState(false)
|
|
31
|
+
const [draft, setDraft] = React.useState('')
|
|
32
|
+
const [reply, setReply] = React.useState('')
|
|
33
|
+
const visible = feedKinds.filter(kind => !hidden.includes(kind) && (filter === 'all' || filter === kind))
|
|
34
|
+
const title = (kind: FeedKind) => <>{people[kind]} <span className="font-normal text-muted-foreground">{t(`design_system.gallery.samples.feeds.${kind}Action`)}</span></>
|
|
35
|
+
return <div className="w-full max-w-2xl space-y-5">
|
|
36
|
+
<div className="flex flex-wrap items-center gap-1" role="group" aria-label={t('design_system.gallery.samples.feeds.filter')}>
|
|
37
|
+
{(['all', 'file', 'comment'] as const).map(value => <Button key={value} size="2xs" variant="ghost" aria-pressed={filter === value} onClick={() => setFilter(value)} className="gap-1.5 px-2.5 aria-pressed:bg-status-info-bg aria-pressed:text-status-info-text">
|
|
38
|
+
{value === 'all' ? <ListFilter className="size-[18px]" /> : value === 'file' ? <FileText className="size-[18px]" /> : null}{t(`design_system.gallery.samples.feeds.${value}`)}
|
|
39
|
+
</Button>)}
|
|
40
|
+
{hidden.length ? <Button variant="ghost" size="2xs" onClick={() => setHidden([])}><RotateCcw />{t('design_system.gallery.samples.feeds.restore')}</Button> : null}
|
|
41
|
+
</div>
|
|
42
|
+
<ActivityFeed className="gap-5">
|
|
43
|
+
{visible.map(kind => <ActivityFeedItem key={kind} className="gap-4 [&_[data-slot=activity-feed-item-title]]:leading-5 [&_[data-slot=activity-feed-item-title]>span:first-child]:font-medium" avatar={<Avatar size={32} label={people[kind]} />} title={title(kind)} timestamp={t('design_system.gallery.samples.feeds.time')}
|
|
44
|
+
actions={<Popover><PopoverTrigger asChild><Button variant="ghost" size="icon" className="size-6" aria-label={t('design_system.gallery.samples.feeds.actions', { name: people[kind] })}><MoreHorizontal /></Button></PopoverTrigger><PopoverContent align="end" className="w-auto p-1"><PopoverClose asChild><Button variant="ghost" size="sm" onClick={() => setHidden(items => [...items, kind])}>{t('design_system.gallery.samples.feeds.hide')}</Button></PopoverClose></PopoverContent></Popover>}>
|
|
45
|
+
{kind === 'file' ? <ActivityFeedFileChip name="apex-report.pdf" size="4 MB" onDownload={() => setFileOpen(true)} downloadAriaLabel={t('design_system.gallery.samples.feeds.openFile')} /> : null}
|
|
46
|
+
{kind === 'comment' ? <div className="w-full space-y-2"><ActivityFeedComment className="[&_[data-slot=activity-feed-comment-body]]:whitespace-normal [&_[data-slot=activity-feed-comment-body]]:break-words" onReply={() => setReplyOpen(value => !value)} replyLabel={t('design_system.gallery.samples.feeds.reply')}>{t('design_system.gallery.samples.feeds.commentBody')}</ActivityFeedComment>
|
|
47
|
+
{replyOpen ? <form className="space-y-2" onSubmit={event => { event.preventDefault(); if (draft.trim()) { setReply(draft.trim()); setDraft(''); setReplyOpen(false) } }}><Textarea aria-label={t('design_system.gallery.samples.feeds.reply')} value={draft} onChange={event => setDraft(event.target.value)} /><Button size="sm" type="submit" disabled={!draft.trim()}>{t('design_system.gallery.samples.feeds.saveReply')}</Button></form> : null}
|
|
48
|
+
{reply ? <p className="rounded-md bg-muted p-3 text-sm" role="status">{reply}</p> : null}
|
|
49
|
+
</div> : null}
|
|
50
|
+
{kind === 'avatars' ? <div className="inline-flex items-center gap-1.5 rounded-full border border-border bg-background py-0.5 pl-0.5 pr-2 shadow-xs"><AvatarStack size={24} max={3}><Avatar size={24} label="Wei Chen" /><Avatar size={24} label="Laura Perez" /><Avatar size={24} label="Omar Haddad" /></AvatarStack><span className="text-xs text-muted-foreground">+4</span></div> : null}
|
|
51
|
+
{kind === 'tasks' ? <><ActivityFeedStatusChip status="success">{t('design_system.gallery.samples.feeds.approved')}</ActivityFeedStatusChip><ActivityFeedStatusChip status="warning">{t('design_system.gallery.samples.feeds.review')}</ActivityFeedStatusChip><ActivityFeedStatusChip status="pending">{t('design_system.gallery.samples.feeds.pending')}</ActivityFeedStatusChip><ActivityFeedStatusChip status="error">{t('design_system.gallery.samples.feeds.blocked')}</ActivityFeedStatusChip></> : null}
|
|
52
|
+
</ActivityFeedItem>)}
|
|
53
|
+
</ActivityFeed>
|
|
54
|
+
{!visible.length ? <p className="text-sm text-muted-foreground" role="status">{t('design_system.gallery.samples.feeds.empty')}</p> : null}
|
|
55
|
+
<LocalFilePreview open={fileOpen} onOpenChange={setFileOpen} />
|
|
56
|
+
</div>
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const notificationKinds = ['basic', 'button', 'file', 'message'] as const
|
|
60
|
+
export function NotificationFeedExample({ tabs = 4 }: { tabs?: 2 | 3 | 4 }) {
|
|
61
|
+
const t = useT()
|
|
62
|
+
const [filter, setFilter] = React.useState('all')
|
|
63
|
+
const [archived, setArchived] = React.useState(false)
|
|
64
|
+
const [read, setRead] = React.useState(false)
|
|
65
|
+
const [decision, setDecision] = React.useState<'approved' | 'denied' | null>(null)
|
|
66
|
+
const [fileOpen, setFileOpen] = React.useState(false)
|
|
67
|
+
const filters = ['all', 'unread', 'file', 'message'].slice(0, tabs)
|
|
68
|
+
const visible = archived || (filter === 'unread' && read) ? [] : notificationKinds.filter(kind => !['file', 'message'].includes(filter) || kind === filter)
|
|
69
|
+
return <div className="w-full max-w-xl space-y-3"><NotificationFeed>
|
|
70
|
+
<NotificationFeedHeader className="flex-wrap" title={t('design_system.gallery.samples.feeds.notifications')}><Button size="2xs" variant="ghost" onClick={() => setRead(true)} disabled={read || archived}>{t('design_system.gallery.samples.feeds.markRead')}</Button></NotificationFeedHeader>
|
|
71
|
+
<Tabs value={filter} onValueChange={setFilter} variant="underline"><TabsList aria-label={t('design_system.gallery.samples.feeds.filter')} className="w-full px-3">{filters.map(value => <TabsTrigger key={value} value={value}>{t(`design_system.gallery.samples.feeds.${value}`)}</TabsTrigger>)}</TabsList><TabsContent value={filter} className="mt-0">
|
|
72
|
+
<NotificationFeedList className="gap-1 divide-y-0 p-2">
|
|
73
|
+
{visible.map(kind => <NotificationFeedItem key={kind} className="rounded-lg p-3 hover:bg-muted/40 [&_[data-slot=notification-feed-item-title]]:font-medium" icon={<Avatar size={40} label="Wei Chen" />} title={t(`design_system.gallery.samples.feeds.notification${kind}`)} timestamp={<>{t('design_system.gallery.samples.feeds.time')} · Apex</>} unread={!read}>
|
|
74
|
+
{kind === 'button' ? decision ? <p className="text-sm" role="status">{t(`design_system.gallery.samples.feeds.${decision}`)}</p> : <><Button variant="outline" size="sm" onClick={() => setDecision('denied')}>{t('design_system.gallery.samples.feeds.deny')}</Button><Button variant="primary-filled" size="sm" onClick={() => setDecision('approved')}>{t('design_system.gallery.samples.feeds.approve')}</Button></> : null}
|
|
75
|
+
{kind === 'file' ? <ActivityFeedFileChip name="apex-report.pdf" size="4 MB" onDownload={() => setFileOpen(true)} downloadAriaLabel={t('design_system.gallery.samples.feeds.openFile')} /> : null}
|
|
76
|
+
{kind === 'message' ? <p className="rounded-md rounded-tl-sm border border-border bg-background px-3 py-2 text-sm text-muted-foreground shadow-xs">{t('design_system.gallery.samples.feeds.messageBody')}</p> : null}
|
|
77
|
+
</NotificationFeedItem>)}
|
|
78
|
+
</NotificationFeedList>
|
|
79
|
+
{!visible.length ? <p className="p-5 text-center text-sm text-muted-foreground" role="status">{t('design_system.gallery.samples.feeds.empty')}</p> : null}
|
|
80
|
+
<NotificationFeedFooter><Button variant="outline" size="sm" className="w-full" onClick={() => setArchived(true)} disabled={archived}>{t('design_system.gallery.samples.feeds.archive')}</Button></NotificationFeedFooter></TabsContent></Tabs>
|
|
81
|
+
</NotificationFeed><Button variant="ghost" size="sm" onClick={() => { setArchived(false); setRead(false); setDecision(null); setFilter('all') }}><RotateCcw />{t('design_system.gallery.samples.feeds.restore')}</Button><LocalFilePreview open={fileOpen} onOpenChange={setFileOpen} /></div>
|
|
82
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
3
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
4
|
+
import { FileUploadArea } from '@open-mercato/ui/primitives/file-upload'
|
|
5
|
+
import { FileUploadCard, type FileUploadStatus } from '@open-mercato/ui/primitives/file-upload-card'
|
|
6
|
+
import { ImageUpload } from '@open-mercato/ui/primitives/image-upload'
|
|
7
|
+
import { formatAttachmentFileSize } from '@open-mercato/ui/backend/detail/AttachmentVisualPreview'
|
|
8
|
+
import { uploadExampleImages } from '../assets/upload-images'
|
|
9
|
+
|
|
10
|
+
type QueueFile = { id: number; file: File; progress: number }
|
|
11
|
+
|
|
12
|
+
export function FileUploadAreaDemo({ disabled = false }: { disabled?: boolean }) {
|
|
13
|
+
const t = useT()
|
|
14
|
+
const nextId = React.useRef(0)
|
|
15
|
+
const [files, setFiles] = React.useState<QueueFile[]>([])
|
|
16
|
+
const uploading = files.some(file => file.progress < 100)
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (!uploading) return
|
|
19
|
+
const timer = window.setInterval(() => setFiles(current => current.map(file => ({ ...file, progress: Math.min(100, file.progress + 20) }))), 350)
|
|
20
|
+
return () => window.clearInterval(timer)
|
|
21
|
+
}, [uploading])
|
|
22
|
+
return (
|
|
23
|
+
<div className="flex w-100 max-w-full flex-col gap-3">
|
|
24
|
+
<FileUploadArea disabled={disabled} onFilesSelected={selected => setFiles(current => [...current, ...selected.map(file => ({ id: nextId.current++, file, progress: 0 }))])} />
|
|
25
|
+
{files.length > 0 ? <p role="status" className="text-xs text-muted-foreground">{t('design_system.gallery.samples.upload.selected', '{count} files selected', { count: files.length })}</p> : null}
|
|
26
|
+
{files.map(item => <FileUploadCard key={item.id} fileName={item.file.name} sizeLabel={formatAttachmentFileSize(item.file.size)} status={item.progress === 100 ? 'success' : 'uploading'} progress={item.progress} onRemove={() => setFiles(current => current.filter(file => file.id !== item.id))} />)}
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function FileUploadCardDemo({ initialStatus, disabled = false }: { initialStatus: FileUploadStatus; disabled?: boolean }) {
|
|
32
|
+
const t = useT()
|
|
33
|
+
const [removed, setRemoved] = React.useState(false)
|
|
34
|
+
const [status, setStatus] = React.useState(initialStatus)
|
|
35
|
+
const [progress, setProgress] = React.useState(0)
|
|
36
|
+
const [retrying, setRetrying] = React.useState(false)
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
if (!retrying || removed) return
|
|
39
|
+
const timer = window.setInterval(() => setProgress(current => Math.min(100, current + 25)), 250)
|
|
40
|
+
return () => window.clearInterval(timer)
|
|
41
|
+
}, [retrying, removed])
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
if (progress < 100) return
|
|
44
|
+
setStatus('success')
|
|
45
|
+
setRetrying(false)
|
|
46
|
+
}, [progress])
|
|
47
|
+
if (removed) return <Button variant="outline" size="sm" onClick={() => { setRemoved(false); setRetrying(false); setProgress(0); setStatus(initialStatus) }}>{t('design_system.gallery.samples.upload.reset', 'Reset example')}</Button>
|
|
48
|
+
return <FileUploadCard fileName="my-cv.pdf" sizeLabel={t(status === 'success' ? 'design_system.gallery.samples.upload.completeSize' : 'design_system.gallery.samples.upload.size')} status={status} progress={progress} disabled={disabled} onRemove={() => setRemoved(true)} onRetry={() => { setProgress(0); setStatus('uploading'); setRetrying(true) }} />
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ImageUploadDemo({ kind, uploaded, alignment, disabled = false }: { kind: 'avatar' | 'company'; uploaded: boolean; alignment: 'vertical' | 'horizontal'; disabled?: boolean }) {
|
|
52
|
+
const t = useT()
|
|
53
|
+
const [source, setSource] = React.useState<string | null>(uploaded ? uploadExampleImages[kind] : null)
|
|
54
|
+
const objectUrl = React.useRef<string | null>(null)
|
|
55
|
+
React.useEffect(() => () => { if (objectUrl.current) URL.revokeObjectURL(objectUrl.current) }, [])
|
|
56
|
+
return <ImageUpload src={source} alt={t(`design_system.gallery.samples.upload.${kind}`)} kind={kind} alignment={alignment} disabled={disabled} onChange={file => {
|
|
57
|
+
if (objectUrl.current) URL.revokeObjectURL(objectUrl.current)
|
|
58
|
+
objectUrl.current = file ? URL.createObjectURL(file) : null
|
|
59
|
+
setSource(objectUrl.current)
|
|
60
|
+
}} />
|
|
61
|
+
}
|