@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
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
// Copy-paste snippets for the Buttons family. Kept out of buttons.tsx so the entry file stays a
|
|
2
|
+
// short canonical example the agent harness can read within its byte budget.
|
|
3
|
+
|
|
4
|
+
export const compactButtonDefaultCode = `import * as React from 'react'
|
|
5
|
+
import { Plus } from 'lucide-react'
|
|
6
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
7
|
+
import { CompactButton } from '@open-mercato/ui/primitives/compact-button'
|
|
8
|
+
|
|
9
|
+
function CompactButtonExample({ appearance, size, fullRadius, initialPressed, disabled }: {
|
|
10
|
+
appearance: 'stroke' | 'ghost' | 'white' | 'modifiable'
|
|
11
|
+
size: 20 | 24
|
|
12
|
+
fullRadius: boolean
|
|
13
|
+
initialPressed: boolean
|
|
14
|
+
disabled: boolean
|
|
15
|
+
}) {
|
|
16
|
+
const t = useT()
|
|
17
|
+
const [pressed, setPressed] = React.useState(initialPressed)
|
|
18
|
+
return (
|
|
19
|
+
<CompactButton appearance={appearance} size={size} fullRadius={fullRadius} disabled={disabled}
|
|
20
|
+
aria-label={t('design_system.gallery.examples.buttons.compactAction')}
|
|
21
|
+
aria-pressed={disabled ? undefined : pressed} onClick={() => setPressed((value) => !value)}>
|
|
22
|
+
<Plus aria-hidden="true" />
|
|
23
|
+
</CompactButton>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function CompactButtonMatrix({ initialPressed = false, disabled = false }: { initialPressed?: boolean; disabled?: boolean }) {
|
|
28
|
+
return (
|
|
29
|
+
<div className="grid w-full gap-4 sm:grid-cols-2">
|
|
30
|
+
{(['stroke', 'ghost', 'white', 'modifiable'] as const).map((appearance) => (
|
|
31
|
+
<div key={appearance} className={appearance === 'modifiable' ? 'grid gap-4 rounded-md bg-primary p-4 text-primary-foreground' : appearance === 'white' ? 'grid gap-4 rounded-md border border-border bg-muted p-4' : 'grid gap-4 rounded-md border border-border p-4'}>
|
|
32
|
+
<code className="text-xs">{appearance}</code>
|
|
33
|
+
<div className="flex flex-wrap gap-6">
|
|
34
|
+
{([20, 24] as const).flatMap((size) => [false, true].map((fullRadius) => (
|
|
35
|
+
<div key={\`\${size}-\${fullRadius}\`} className="flex flex-col items-center gap-2">
|
|
36
|
+
<CompactButtonExample appearance={appearance} size={size} fullRadius={fullRadius} initialPressed={initialPressed} disabled={disabled} />
|
|
37
|
+
<code className="text-xs">{size}px · {fullRadius ? 'full' : '6px'}</code>
|
|
38
|
+
</div>
|
|
39
|
+
)))}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
))}
|
|
43
|
+
</div>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
<CompactButtonMatrix />`
|
|
48
|
+
|
|
49
|
+
export const compactButtonActiveCode = `import * as React from 'react'
|
|
50
|
+
import { Plus } from 'lucide-react'
|
|
51
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
52
|
+
import { CompactButton } from '@open-mercato/ui/primitives/compact-button'
|
|
53
|
+
|
|
54
|
+
function CompactButtonExample({ appearance, size, fullRadius, initialPressed, disabled }: {
|
|
55
|
+
appearance: 'stroke' | 'ghost' | 'white' | 'modifiable'
|
|
56
|
+
size: 20 | 24
|
|
57
|
+
fullRadius: boolean
|
|
58
|
+
initialPressed: boolean
|
|
59
|
+
disabled: boolean
|
|
60
|
+
}) {
|
|
61
|
+
const t = useT()
|
|
62
|
+
const [pressed, setPressed] = React.useState(initialPressed)
|
|
63
|
+
return (
|
|
64
|
+
<CompactButton appearance={appearance} size={size} fullRadius={fullRadius} disabled={disabled}
|
|
65
|
+
aria-label={t('design_system.gallery.examples.buttons.compactAction')}
|
|
66
|
+
aria-pressed={disabled ? undefined : pressed} onClick={() => setPressed((value) => !value)}>
|
|
67
|
+
<Plus aria-hidden="true" />
|
|
68
|
+
</CompactButton>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function CompactButtonMatrix({ initialPressed = false, disabled = false }: { initialPressed?: boolean; disabled?: boolean }) {
|
|
73
|
+
return (
|
|
74
|
+
<div className="grid w-full gap-4 sm:grid-cols-2">
|
|
75
|
+
{(['stroke', 'ghost', 'white', 'modifiable'] as const).map((appearance) => (
|
|
76
|
+
<div key={appearance} className={appearance === 'modifiable' ? 'grid gap-4 rounded-md bg-primary p-4 text-primary-foreground' : appearance === 'white' ? 'grid gap-4 rounded-md border border-border bg-muted p-4' : 'grid gap-4 rounded-md border border-border p-4'}>
|
|
77
|
+
<code className="text-xs">{appearance}</code>
|
|
78
|
+
<div className="flex flex-wrap gap-6">
|
|
79
|
+
{([20, 24] as const).flatMap((size) => [false, true].map((fullRadius) => (
|
|
80
|
+
<div key={\`\${size}-\${fullRadius}\`} className="flex flex-col items-center gap-2">
|
|
81
|
+
<CompactButtonExample appearance={appearance} size={size} fullRadius={fullRadius} initialPressed={initialPressed} disabled={disabled} />
|
|
82
|
+
<code className="text-xs">{size}px · {fullRadius ? 'full' : '6px'}</code>
|
|
83
|
+
</div>
|
|
84
|
+
)))}
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
))}
|
|
88
|
+
</div>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
<CompactButtonMatrix initialPressed />`
|
|
93
|
+
|
|
94
|
+
export const compactButtonDisabledCode = `import { Plus } from 'lucide-react'
|
|
95
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
96
|
+
import { CompactButton } from '@open-mercato/ui/primitives/compact-button'
|
|
97
|
+
|
|
98
|
+
function CompactButtonDisabledPreview() {
|
|
99
|
+
const t = useT()
|
|
100
|
+
return (
|
|
101
|
+
<div className="grid w-full gap-4">
|
|
102
|
+
<p className="max-w-prose text-sm text-muted-foreground">{t('design_system.gallery.examples.buttons.compactDisabledNote')}</p>
|
|
103
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
104
|
+
{(['stroke', 'modifiable'] as const).map((appearance) => (
|
|
105
|
+
<div key={appearance} className={appearance === 'modifiable' ? 'grid gap-4 rounded-md bg-primary p-4 text-primary-foreground' : 'grid gap-4 rounded-md border border-border p-4'}>
|
|
106
|
+
<code className="text-xs">{appearance === 'modifiable' ? 'modifiable' : 'stroke · ghost · white'}</code>
|
|
107
|
+
<div className="flex flex-wrap gap-6">
|
|
108
|
+
{([20, 24] as const).flatMap((size) => [false, true].map((fullRadius) => (
|
|
109
|
+
<div key={\`\${size}-\${fullRadius}\`} className="flex flex-col items-center gap-2">
|
|
110
|
+
<CompactButton appearance={appearance} size={size} fullRadius={fullRadius} disabled
|
|
111
|
+
aria-label={t('design_system.gallery.examples.buttons.compactAction')}>
|
|
112
|
+
<Plus aria-hidden="true" />
|
|
113
|
+
</CompactButton>
|
|
114
|
+
<code className="text-xs">{size}px · {fullRadius ? 'full' : '6px'}</code>
|
|
115
|
+
</div>
|
|
116
|
+
)))}
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
))}
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
<CompactButtonDisabledPreview />`
|
|
126
|
+
|
|
127
|
+
export const iconButtonVariantsCode = `import { Pencil } from 'lucide-react'
|
|
128
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
129
|
+
|
|
130
|
+
<IconButton variant="primary" aria-label="Add"><Plus /></IconButton>
|
|
131
|
+
<IconButton variant="outline" aria-label="Edit"><Pencil /></IconButton>
|
|
132
|
+
<IconButton variant="ghost" aria-label="More"><MoreHorizontal /></IconButton>
|
|
133
|
+
<IconButton variant="white" aria-label="Edit"><Pencil /></IconButton>
|
|
134
|
+
<IconButton variant="destructive" aria-label="Delete"><Trash2 /></IconButton>`
|
|
135
|
+
|
|
136
|
+
export const iconButtonSizesCode = `import { Pencil } from 'lucide-react'
|
|
137
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
138
|
+
|
|
139
|
+
<IconButton size="lg" aria-label="Edit"><Pencil /></IconButton>
|
|
140
|
+
<IconButton size="default" aria-label="Edit"><Pencil /></IconButton>
|
|
141
|
+
<IconButton size="sm" aria-label="Edit"><Pencil /></IconButton>
|
|
142
|
+
<IconButton size="xs" aria-label="Edit"><Pencil /></IconButton>`
|
|
143
|
+
|
|
144
|
+
export const iconButtonFullRadiusCode = `import { Plus } from 'lucide-react'
|
|
145
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
146
|
+
|
|
147
|
+
<IconButton fullRadius aria-label="Add"><Plus /></IconButton>`
|
|
148
|
+
|
|
149
|
+
export const iconButtonDisabledCode = `import { Pencil } from 'lucide-react'
|
|
150
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
151
|
+
|
|
152
|
+
<IconButton type="button" variant="outline" disabled aria-label={t('design_system.gallery.samples.states.edit')}>
|
|
153
|
+
<Pencil aria-hidden="true" />
|
|
154
|
+
</IconButton>`
|
|
155
|
+
|
|
156
|
+
export const linkButtonVariantsCode = `import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
157
|
+
|
|
158
|
+
<LinkButton>primary</LinkButton>
|
|
159
|
+
<LinkButton variant="gray">gray</LinkButton>
|
|
160
|
+
<LinkButton variant="black">black</LinkButton>
|
|
161
|
+
<LinkButton variant="error">error</LinkButton>`
|
|
162
|
+
|
|
163
|
+
export const linkButtonUnderlineCode = `import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
164
|
+
|
|
165
|
+
<LinkButton underline="always">always</LinkButton>
|
|
166
|
+
<LinkButton underline="hover">hover</LinkButton>
|
|
167
|
+
<LinkButton underline="none">none</LinkButton>`
|
|
168
|
+
|
|
169
|
+
export const linkButtonAsAnchorCode = `import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
170
|
+
|
|
171
|
+
<LinkButton asChild>
|
|
172
|
+
<a href="/backend/docs">Open link</a>
|
|
173
|
+
</LinkButton>`
|
|
174
|
+
|
|
175
|
+
export const socialButtonFilledCode = `import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
176
|
+
import { SocialButton } from '@open-mercato/ui/primitives/social-button'
|
|
177
|
+
import appleFilled from '../assets/social-apple-filled.svg'
|
|
178
|
+
import githubFilled from '../assets/social-github-filled.svg'
|
|
179
|
+
import xFilled from '../assets/social-x-filled.svg'
|
|
180
|
+
import googleFilled from '../assets/social-google-filled.svg'
|
|
181
|
+
import facebookFilled from '../assets/social-facebook-filled.svg'
|
|
182
|
+
import dropboxFilled from '../assets/social-dropbox-filled.svg'
|
|
183
|
+
import linkedinFilled from '../assets/social-linkedin-filled.svg'
|
|
184
|
+
import appleStroke from '../assets/social-apple-stroke.svg'
|
|
185
|
+
import githubStroke from '../assets/social-github-stroke.svg'
|
|
186
|
+
import xStroke from '../assets/social-x-stroke.svg'
|
|
187
|
+
import googleStroke from '../assets/social-google-stroke.svg'
|
|
188
|
+
import facebookStroke from '../assets/social-facebook-stroke.svg'
|
|
189
|
+
import dropboxStroke from '../assets/social-dropbox-stroke.svg'
|
|
190
|
+
import linkedinStroke from '../assets/social-linkedin-stroke.svg'
|
|
191
|
+
|
|
192
|
+
const socialProviders = [
|
|
193
|
+
{ brand: 'apple', name: 'Apple', filled: appleFilled, stroke: appleStroke },
|
|
194
|
+
{ brand: 'github', name: 'GitHub', filled: githubFilled, stroke: githubStroke },
|
|
195
|
+
{ brand: 'x', name: 'X', filled: xFilled, stroke: xStroke },
|
|
196
|
+
{ brand: 'google', name: 'Google', filled: googleFilled, stroke: googleStroke },
|
|
197
|
+
{ brand: 'facebook', name: 'Facebook', filled: facebookFilled, stroke: facebookStroke },
|
|
198
|
+
{ brand: 'dropbox', name: 'Dropbox', filled: dropboxFilled, stroke: dropboxStroke },
|
|
199
|
+
{ brand: 'linkedin', name: 'LinkedIn', filled: linkedinFilled, stroke: linkedinStroke },
|
|
200
|
+
] as const
|
|
201
|
+
|
|
202
|
+
function SocialButtonsDemo({ appearance, iconOnly = false }: { appearance: 'filled' | 'stroke'; iconOnly?: boolean }) {
|
|
203
|
+
const t = useT()
|
|
204
|
+
return (
|
|
205
|
+
<div className="flex flex-wrap gap-3 p-1">
|
|
206
|
+
{socialProviders.map((provider) => {
|
|
207
|
+
const asset = provider[appearance]
|
|
208
|
+
const source = typeof asset === 'string' ? asset : asset.src
|
|
209
|
+
const label = t('design_system.gallery.examples.buttons.provider', { brand: provider.name })
|
|
210
|
+
const useForeground = appearance === 'stroke' && ['apple', 'github', 'x'].includes(provider.brand)
|
|
211
|
+
return (
|
|
212
|
+
<SocialButton key={provider.brand} brand={provider.brand} appearance={appearance} iconOnly={iconOnly} aria-label={iconOnly ? label : undefined}>
|
|
213
|
+
{useForeground ? (
|
|
214
|
+
<span aria-hidden="true" className="size-5 shrink-0 bg-current" style={{ maskImage: \`url("\${source}")\`, maskSize: 'contain', maskPosition: 'center', maskRepeat: 'no-repeat' }} />
|
|
215
|
+
) : <img src={source} alt="" aria-hidden="true" className="size-5 shrink-0" />}
|
|
216
|
+
{!iconOnly && label}
|
|
217
|
+
</SocialButton>
|
|
218
|
+
)
|
|
219
|
+
})}
|
|
220
|
+
</div>
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
<SocialButtonsDemo appearance="filled" />`
|
|
225
|
+
|
|
226
|
+
export const socialButtonStrokeCode = `import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
227
|
+
import { SocialButton } from '@open-mercato/ui/primitives/social-button'
|
|
228
|
+
import appleFilled from '../assets/social-apple-filled.svg'
|
|
229
|
+
import githubFilled from '../assets/social-github-filled.svg'
|
|
230
|
+
import xFilled from '../assets/social-x-filled.svg'
|
|
231
|
+
import googleFilled from '../assets/social-google-filled.svg'
|
|
232
|
+
import facebookFilled from '../assets/social-facebook-filled.svg'
|
|
233
|
+
import dropboxFilled from '../assets/social-dropbox-filled.svg'
|
|
234
|
+
import linkedinFilled from '../assets/social-linkedin-filled.svg'
|
|
235
|
+
import appleStroke from '../assets/social-apple-stroke.svg'
|
|
236
|
+
import githubStroke from '../assets/social-github-stroke.svg'
|
|
237
|
+
import xStroke from '../assets/social-x-stroke.svg'
|
|
238
|
+
import googleStroke from '../assets/social-google-stroke.svg'
|
|
239
|
+
import facebookStroke from '../assets/social-facebook-stroke.svg'
|
|
240
|
+
import dropboxStroke from '../assets/social-dropbox-stroke.svg'
|
|
241
|
+
import linkedinStroke from '../assets/social-linkedin-stroke.svg'
|
|
242
|
+
|
|
243
|
+
const socialProviders = [
|
|
244
|
+
{ brand: 'apple', name: 'Apple', filled: appleFilled, stroke: appleStroke },
|
|
245
|
+
{ brand: 'github', name: 'GitHub', filled: githubFilled, stroke: githubStroke },
|
|
246
|
+
{ brand: 'x', name: 'X', filled: xFilled, stroke: xStroke },
|
|
247
|
+
{ brand: 'google', name: 'Google', filled: googleFilled, stroke: googleStroke },
|
|
248
|
+
{ brand: 'facebook', name: 'Facebook', filled: facebookFilled, stroke: facebookStroke },
|
|
249
|
+
{ brand: 'dropbox', name: 'Dropbox', filled: dropboxFilled, stroke: dropboxStroke },
|
|
250
|
+
{ brand: 'linkedin', name: 'LinkedIn', filled: linkedinFilled, stroke: linkedinStroke },
|
|
251
|
+
] as const
|
|
252
|
+
|
|
253
|
+
function SocialButtonsDemo({ appearance, iconOnly = false }: { appearance: 'filled' | 'stroke'; iconOnly?: boolean }) {
|
|
254
|
+
const t = useT()
|
|
255
|
+
return (
|
|
256
|
+
<div className="flex flex-wrap gap-3 p-1">
|
|
257
|
+
{socialProviders.map((provider) => {
|
|
258
|
+
const asset = provider[appearance]
|
|
259
|
+
const source = typeof asset === 'string' ? asset : asset.src
|
|
260
|
+
const label = t('design_system.gallery.examples.buttons.provider', { brand: provider.name })
|
|
261
|
+
const useForeground = appearance === 'stroke' && ['apple', 'github', 'x'].includes(provider.brand)
|
|
262
|
+
return (
|
|
263
|
+
<SocialButton key={provider.brand} brand={provider.brand} appearance={appearance} iconOnly={iconOnly} aria-label={iconOnly ? label : undefined}>
|
|
264
|
+
{useForeground ? (
|
|
265
|
+
<span aria-hidden="true" className="size-5 shrink-0 bg-current" style={{ maskImage: \`url("\${source}")\`, maskSize: 'contain', maskPosition: 'center', maskRepeat: 'no-repeat' }} />
|
|
266
|
+
) : <img src={source} alt="" aria-hidden="true" className="size-5 shrink-0" />}
|
|
267
|
+
{!iconOnly && label}
|
|
268
|
+
</SocialButton>
|
|
269
|
+
)
|
|
270
|
+
})}
|
|
271
|
+
</div>
|
|
272
|
+
)
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
<SocialButtonsDemo appearance="stroke" />`
|
|
276
|
+
|
|
277
|
+
export const socialButtonIconOnlyCode = `import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
278
|
+
import { SocialButton } from '@open-mercato/ui/primitives/social-button'
|
|
279
|
+
import appleFilled from '../assets/social-apple-filled.svg'
|
|
280
|
+
import githubFilled from '../assets/social-github-filled.svg'
|
|
281
|
+
import xFilled from '../assets/social-x-filled.svg'
|
|
282
|
+
import googleFilled from '../assets/social-google-filled.svg'
|
|
283
|
+
import facebookFilled from '../assets/social-facebook-filled.svg'
|
|
284
|
+
import dropboxFilled from '../assets/social-dropbox-filled.svg'
|
|
285
|
+
import linkedinFilled from '../assets/social-linkedin-filled.svg'
|
|
286
|
+
import appleStroke from '../assets/social-apple-stroke.svg'
|
|
287
|
+
import githubStroke from '../assets/social-github-stroke.svg'
|
|
288
|
+
import xStroke from '../assets/social-x-stroke.svg'
|
|
289
|
+
import googleStroke from '../assets/social-google-stroke.svg'
|
|
290
|
+
import facebookStroke from '../assets/social-facebook-stroke.svg'
|
|
291
|
+
import dropboxStroke from '../assets/social-dropbox-stroke.svg'
|
|
292
|
+
import linkedinStroke from '../assets/social-linkedin-stroke.svg'
|
|
293
|
+
|
|
294
|
+
const socialProviders = [
|
|
295
|
+
{ brand: 'apple', name: 'Apple', filled: appleFilled, stroke: appleStroke },
|
|
296
|
+
{ brand: 'github', name: 'GitHub', filled: githubFilled, stroke: githubStroke },
|
|
297
|
+
{ brand: 'x', name: 'X', filled: xFilled, stroke: xStroke },
|
|
298
|
+
{ brand: 'google', name: 'Google', filled: googleFilled, stroke: googleStroke },
|
|
299
|
+
{ brand: 'facebook', name: 'Facebook', filled: facebookFilled, stroke: facebookStroke },
|
|
300
|
+
{ brand: 'dropbox', name: 'Dropbox', filled: dropboxFilled, stroke: dropboxStroke },
|
|
301
|
+
{ brand: 'linkedin', name: 'LinkedIn', filled: linkedinFilled, stroke: linkedinStroke },
|
|
302
|
+
] as const
|
|
303
|
+
|
|
304
|
+
function SocialButtonsDemo({ appearance, iconOnly = false }: { appearance: 'filled' | 'stroke'; iconOnly?: boolean }) {
|
|
305
|
+
const t = useT()
|
|
306
|
+
return (
|
|
307
|
+
<div className="flex flex-wrap gap-3 p-1">
|
|
308
|
+
{socialProviders.map((provider) => {
|
|
309
|
+
const asset = provider[appearance]
|
|
310
|
+
const source = typeof asset === 'string' ? asset : asset.src
|
|
311
|
+
const label = t('design_system.gallery.examples.buttons.provider', { brand: provider.name })
|
|
312
|
+
const useForeground = appearance === 'stroke' && ['apple', 'github', 'x'].includes(provider.brand)
|
|
313
|
+
return (
|
|
314
|
+
<SocialButton key={provider.brand} brand={provider.brand} appearance={appearance} iconOnly={iconOnly} aria-label={iconOnly ? label : undefined}>
|
|
315
|
+
{useForeground ? (
|
|
316
|
+
<span aria-hidden="true" className="size-5 shrink-0 bg-current" style={{ maskImage: \`url("\${source}")\`, maskSize: 'contain', maskPosition: 'center', maskRepeat: 'no-repeat' }} />
|
|
317
|
+
) : <img src={source} alt="" aria-hidden="true" className="size-5 shrink-0" />}
|
|
318
|
+
{!iconOnly && label}
|
|
319
|
+
</SocialButton>
|
|
320
|
+
)
|
|
321
|
+
})}
|
|
322
|
+
</div>
|
|
323
|
+
)
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
<SocialButtonsDemo appearance="filled" iconOnly />
|
|
327
|
+
<SocialButtonsDemo appearance="stroke" iconOnly />`
|
|
328
|
+
|
|
329
|
+
export const fancyButtonIntentsCode = `import { FancyButton } from '@open-mercato/ui/primitives/fancy-button'
|
|
330
|
+
|
|
331
|
+
<FancyButton intent="neutral">Neutral</FancyButton>
|
|
332
|
+
<FancyButton intent="basic">Basic</FancyButton>
|
|
333
|
+
<FancyButton intent="primary">Primary</FancyButton>
|
|
334
|
+
<FancyButton intent="destructive">Destructive</FancyButton>`
|
|
335
|
+
|
|
336
|
+
export const fancyButtonSizesCode = `import { FancyButton } from '@open-mercato/ui/primitives/fancy-button'
|
|
337
|
+
|
|
338
|
+
<FancyButton size="default">Default</FancyButton>
|
|
339
|
+
<FancyButton size="sm">Small</FancyButton>
|
|
340
|
+
<FancyButton size="xs">X-Small</FancyButton>`
|
|
341
|
+
|
|
342
|
+
export const buttonGroupSizeQuantityMatrixCode = `import { MoreHorizontal, Pencil, Plus } from 'lucide-react'
|
|
343
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
344
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
345
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
346
|
+
import { ButtonGroup } from '@open-mercato/ui/primitives/button-group'
|
|
347
|
+
|
|
348
|
+
function ButtonGroupMatrix({ content = false }: { content?: boolean }) {
|
|
349
|
+
const t = useT()
|
|
350
|
+
return (
|
|
351
|
+
<div className="grid w-full min-w-0 gap-6">
|
|
352
|
+
{([24, 32, 36] as const).flatMap((size) => (content ? [5] : [2, 3, 4, 5, 6]).map((count) => (
|
|
353
|
+
<div key={\`\${size}-\${count}\`} className="grid min-w-0 gap-2">
|
|
354
|
+
<code className="text-xs text-muted-foreground">{size}px · {count}</code>
|
|
355
|
+
<div className="max-w-full overflow-x-auto p-1">
|
|
356
|
+
<ButtonGroup size={size} aria-label={t('design_system.gallery.examples.buttons.groupActions')}>
|
|
357
|
+
{content ? (
|
|
358
|
+
<>
|
|
359
|
+
<Button type="button" variant="outline">{t('design_system.gallery.examples.buttons.groupItem', { number: 1 })}</Button>
|
|
360
|
+
<Button type="button" variant="outline"><Pencil aria-hidden="true" />{t('design_system.gallery.examples.buttons.groupItem', { number: 2 })}</Button>
|
|
361
|
+
<Button type="button" variant="outline">{t('design_system.gallery.examples.buttons.groupItem', { number: 3 })}<Plus aria-hidden="true" /></Button>
|
|
362
|
+
<Button type="button" variant="outline"><Pencil aria-hidden="true" />{t('design_system.gallery.examples.buttons.groupItem', { number: 4 })}<Plus aria-hidden="true" /></Button>
|
|
363
|
+
<IconButton aria-label={t('design_system.gallery.examples.buttons.moreActions')}><MoreHorizontal aria-hidden="true" /></IconButton>
|
|
364
|
+
</>
|
|
365
|
+
) : Array.from({ length: count }, (_, index) => (
|
|
366
|
+
<Button key={index} type="button" variant="outline">{t('design_system.gallery.examples.buttons.groupItem', { number: index + 1 })}</Button>
|
|
367
|
+
))}
|
|
368
|
+
</ButtonGroup>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
)))}
|
|
372
|
+
</div>
|
|
373
|
+
)
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
<ButtonGroupMatrix />`
|
|
377
|
+
|
|
378
|
+
export const buttonGroupItemContentCode = `import { MoreHorizontal, Pencil, Plus } from 'lucide-react'
|
|
379
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
380
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
381
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
382
|
+
import { ButtonGroup } from '@open-mercato/ui/primitives/button-group'
|
|
383
|
+
|
|
384
|
+
function ButtonGroupMatrix({ content = false }: { content?: boolean }) {
|
|
385
|
+
const t = useT()
|
|
386
|
+
return (
|
|
387
|
+
<div className="grid w-full min-w-0 gap-6">
|
|
388
|
+
{([24, 32, 36] as const).flatMap((size) => (content ? [5] : [2, 3, 4, 5, 6]).map((count) => (
|
|
389
|
+
<div key={\`\${size}-\${count}\`} className="grid min-w-0 gap-2">
|
|
390
|
+
<code className="text-xs text-muted-foreground">{size}px · {count}</code>
|
|
391
|
+
<div className="max-w-full overflow-x-auto p-1">
|
|
392
|
+
<ButtonGroup size={size} aria-label={t('design_system.gallery.examples.buttons.groupActions')}>
|
|
393
|
+
{content ? (
|
|
394
|
+
<>
|
|
395
|
+
<Button type="button" variant="outline">{t('design_system.gallery.examples.buttons.groupItem', { number: 1 })}</Button>
|
|
396
|
+
<Button type="button" variant="outline"><Pencil aria-hidden="true" />{t('design_system.gallery.examples.buttons.groupItem', { number: 2 })}</Button>
|
|
397
|
+
<Button type="button" variant="outline">{t('design_system.gallery.examples.buttons.groupItem', { number: 3 })}<Plus aria-hidden="true" /></Button>
|
|
398
|
+
<Button type="button" variant="outline"><Pencil aria-hidden="true" />{t('design_system.gallery.examples.buttons.groupItem', { number: 4 })}<Plus aria-hidden="true" /></Button>
|
|
399
|
+
<IconButton aria-label={t('design_system.gallery.examples.buttons.moreActions')}><MoreHorizontal aria-hidden="true" /></IconButton>
|
|
400
|
+
</>
|
|
401
|
+
) : Array.from({ length: count }, (_, index) => (
|
|
402
|
+
<Button key={index} type="button" variant="outline">{t('design_system.gallery.examples.buttons.groupItem', { number: index + 1 })}</Button>
|
|
403
|
+
))}
|
|
404
|
+
</ButtonGroup>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
)))}
|
|
408
|
+
</div>
|
|
409
|
+
)
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
<ButtonGroupMatrix content />`
|
|
413
|
+
|
|
414
|
+
export const buttonGroupHorizontalCode = `import { MoreHorizontal } from 'lucide-react'
|
|
415
|
+
import { ButtonGroup } from '@open-mercato/ui/primitives/button-group'
|
|
416
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
417
|
+
import { IconButton } from '@open-mercato/ui/primitives/icon-button'
|
|
418
|
+
|
|
419
|
+
<ButtonGroup>
|
|
420
|
+
<Button variant="outline">Save</Button>
|
|
421
|
+
<Button variant="outline">Save & New</Button>
|
|
422
|
+
<IconButton size="lg" aria-label="More"><MoreHorizontal /></IconButton>
|
|
423
|
+
</ButtonGroup>`
|
|
424
|
+
|
|
425
|
+
export const buttonGroupVerticalCode = `import { ButtonGroup } from '@open-mercato/ui/primitives/button-group'
|
|
426
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
427
|
+
|
|
428
|
+
<ButtonGroup orientation="vertical" size="sm">
|
|
429
|
+
<Button variant="outline" size="sm">Top</Button>
|
|
430
|
+
<Button variant="outline" size="sm">Middle</Button>
|
|
431
|
+
<Button variant="outline" size="sm">Bottom</Button>
|
|
432
|
+
</ButtonGroup>`
|