@open-mercato/core 0.7.1-develop.7203.1.9396450b78 → 0.8.1-develop.7204.1.83330e271e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -8
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +50 -0
- package/src/modules/customers/backend/customers/companies/[id]/page.tsx +2 -1
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +2 -1
- package/src/modules/customers/backend/customers/people/[id]/page.tsx +2 -2
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +2 -1
- package/src/modules/customers/lib/detailHelpers.ts +4 -0
- package/src/modules/customers/lib/todoCompatibility.ts +10 -0
- package/src/modules/design_system/backend/design-system/page.meta.ts +3 -2
- package/src/modules/design_system/gallery/assets/README.md +30 -0
- package/src/modules/design_system/gallery/assets/ai-prompt-image.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-illustration.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-memoji.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-photo.png +0 -0
- package/src/modules/design_system/gallery/assets/blog-photo-0.png +0 -0
- package/src/modules/design_system/gallery/assets/contact-support-portrait.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-ada.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-avax.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-bnb.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-brand.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-btc.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-clock.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-crown.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-dot.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-eth.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-hbar.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-history.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-link.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-menu.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-metamask.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-more.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-phantom.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-rewards.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-sad-face.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-sol.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-star.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-cancelled.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-pending.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-success.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-warning.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-trx.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-usdc.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-usdt.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-walletconnect.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-wei.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-xrp.png +0 -0
- package/src/modules/design_system/gallery/assets/cryptocurrency-artwork.ts +63 -0
- package/src/modules/design_system/gallery/assets/github-logo.png +0 -0
- package/src/modules/design_system/gallery/assets/images.d.ts +9 -0
- package/src/modules/design_system/gallery/assets/input-european-union.svg +18 -0
- package/src/modules/design_system/gallery/assets/landing-teams-01.png +0 -0
- package/src/modules/design_system/gallery/assets/marketing-artwork.ts +79 -0
- package/src/modules/design_system/gallery/assets/menu-apex.svg +18 -0
- package/src/modules/design_system/gallery/assets/menu-mastercard.svg +7 -0
- package/src/modules/design_system/gallery/assets/menu-spotify.svg +4 -0
- package/src/modules/design_system/gallery/assets/menu-united-states.svg +16 -0
- package/src/modules/design_system/gallery/assets/select-google.png +0 -0
- package/src/modules/design_system/gallery/assets/select-poland.png +0 -0
- package/src/modules/design_system/gallery/assets/selection-artwork.ts +1 -0
- package/src/modules/design_system/gallery/assets/social-apple-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-apple-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-dropbox-filled.svg +5 -0
- package/src/modules/design_system/gallery/assets/social-dropbox-stroke.svg +5 -0
- package/src/modules/design_system/gallery/assets/social-facebook-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-facebook-stroke.svg +10 -0
- package/src/modules/design_system/gallery/assets/social-github-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-github-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-google-filled.svg +7 -0
- package/src/modules/design_system/gallery/assets/social-google-stroke.svg +7 -0
- package/src/modules/design_system/gallery/assets/social-linkedin-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-linkedin-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-x-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-x-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/style-studio-product.png +0 -0
- package/src/modules/design_system/gallery/assets/upload-images.ts +5 -0
- package/src/modules/design_system/gallery/components/BrandStylePreview.tsx +94 -0
- package/src/modules/design_system/gallery/components/CodeSnippet.tsx +34 -34
- package/src/modules/design_system/gallery/components/ColorPlayground.tsx +324 -0
- package/src/modules/design_system/gallery/components/ColorStudioCompositions.tsx +96 -0
- package/src/modules/design_system/gallery/components/ColorStudioSpecimen.tsx +164 -0
- package/src/modules/design_system/gallery/components/CompactEntrySpecimen.tsx +65 -0
- package/src/modules/design_system/gallery/components/ComponentIndex.tsx +47 -0
- package/src/modules/design_system/gallery/components/DesignSystemHome.tsx +66 -0
- package/src/modules/design_system/gallery/components/EntryCard.tsx +52 -37
- package/src/modules/design_system/gallery/components/EntryHeader.tsx +80 -0
- package/src/modules/design_system/gallery/components/FamilyEntryPreview.tsx +22 -0
- package/src/modules/design_system/gallery/components/FoundationGuide.tsx +43 -0
- package/src/modules/design_system/gallery/components/GalleryLink.tsx +19 -0
- package/src/modules/design_system/gallery/components/GalleryNavigation.tsx +86 -0
- package/src/modules/design_system/gallery/components/GalleryShell.tsx +149 -63
- package/src/modules/design_system/gallery/components/IconsBrowser.tsx +40 -0
- package/src/modules/design_system/gallery/components/SourceLibrary.tsx +90 -0
- package/src/modules/design_system/gallery/components/StyleAgents.tsx +115 -0
- package/src/modules/design_system/gallery/components/ThemeTokenReference.tsx +76 -0
- package/src/modules/design_system/gallery/components/VariantPreview.tsx +2 -2
- package/src/modules/design_system/gallery/components/colorPreview.ts +63 -0
- package/src/modules/design_system/gallery/components/colorStudio.ts +260 -0
- package/src/modules/design_system/gallery/components/styleAgentBranding.ts +42 -0
- package/src/modules/design_system/gallery/components/themeTokens.ts +26 -0
- package/src/modules/design_system/gallery/demos/ai-product-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/ai-product.tsx +188 -0
- package/src/modules/design_system/gallery/demos/buttons.tsx +331 -0
- package/src/modules/design_system/gallery/demos/cryptocurrency.tsx +1943 -0
- package/src/modules/design_system/gallery/demos/feeds-code.generated.ts +4 -0
- package/src/modules/design_system/gallery/demos/feeds.tsx +82 -0
- package/src/modules/design_system/gallery/demos/file-upload.tsx +61 -0
- package/src/modules/design_system/gallery/demos/foundation-reference-data.ts +4872 -0
- package/src/modules/design_system/gallery/demos/foundation-references.tsx +140 -0
- package/src/modules/design_system/gallery/demos/key-components-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/key-components.tsx +106 -0
- package/src/modules/design_system/gallery/demos/marketing-controls-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/marketing-controls.tsx +92 -0
- package/src/modules/design_system/gallery/demos/marketing-widgets-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/marketing-widgets.tsx +189 -0
- package/src/modules/design_system/gallery/demos/menu-fixtures.tsx +48 -0
- package/src/modules/design_system/gallery/demos/menu-sources.ts +5 -0
- package/src/modules/design_system/gallery/demos/menus.tsx +122 -0
- package/src/modules/design_system/gallery/demos/rating-reviews.tsx +44 -0
- package/src/modules/design_system/gallery/demos/registered-icons.tsx +117 -0
- package/src/modules/design_system/gallery/demos/selection-cards.tsx +97 -0
- package/src/modules/design_system/gallery/demos/shell-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/shell.tsx +183 -0
- package/src/modules/design_system/gallery/demos/source-artwork.tsx +88 -0
- package/src/modules/design_system/gallery/demos/source-filters-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/source-filters.tsx +119 -0
- package/src/modules/design_system/gallery/demos/source-icons.tsx +62 -0
- package/src/modules/design_system/gallery/demos/table-cells-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/table-cells.tsx +144 -0
- package/src/modules/design_system/gallery/demos/text-inputs.tsx +90 -0
- package/src/modules/design_system/gallery/demos/time-picker-code.generated.ts +5 -0
- package/src/modules/design_system/gallery/demos/time-picker.tsx +31 -0
- package/src/modules/design_system/gallery/entries/banners.tsx +143 -94
- package/src/modules/design_system/gallery/entries/buttons-snippets.ts +432 -0
- package/src/modules/design_system/gallery/entries/buttons.tsx +125 -196
- package/src/modules/design_system/gallery/entries/charts.tsx +545 -233
- package/src/modules/design_system/gallery/entries/dates.tsx +171 -3
- package/src/modules/design_system/gallery/entries/detail.tsx +142 -115
- package/src/modules/design_system/gallery/entries/display.tsx +1691 -319
- package/src/modules/design_system/gallery/entries/feedback.tsx +1082 -169
- package/src/modules/design_system/gallery/entries/filters.tsx +238 -143
- package/src/modules/design_system/gallery/entries/foundations.tsx +404 -61
- package/src/modules/design_system/gallery/entries/icons.tsx +31 -117
- package/src/modules/design_system/gallery/entries/inputs-snippets.ts +156 -0
- package/src/modules/design_system/gallery/entries/inputs.tsx +2146 -503
- package/src/modules/design_system/gallery/entries/library.tsx +16 -0
- package/src/modules/design_system/gallery/entries/messages.tsx +114 -106
- package/src/modules/design_system/gallery/entries/navigation.tsx +782 -192
- package/src/modules/design_system/gallery/entries/notifications.tsx +145 -120
- package/src/modules/design_system/gallery/entries/overlays.tsx +696 -280
- package/src/modules/design_system/gallery/entries/scaffolding.tsx +1192 -158
- package/src/modules/design_system/gallery/entries/schedule.tsx +72 -58
- package/src/modules/design_system/gallery/presentation.ts +106 -0
- package/src/modules/design_system/gallery/registry.ts +8 -6
- package/src/modules/design_system/gallery/source-library.generated.ts +2 -0
- package/src/modules/design_system/i18n/de.json +7112 -3
- package/src/modules/design_system/i18n/en.json +7112 -3
- package/src/modules/design_system/i18n/es.json +7112 -3
- package/src/modules/design_system/i18n/ko.json +7112 -3
- package/src/modules/design_system/i18n/pl.json +7112 -3
- package/src/modules/push_notifications/AGENTS.md +9 -5
- package/src/modules/push_notifications/lib/queue.ts +15 -44
|
@@ -1,43 +1,54 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { Circle } from "lucide-react";
|
|
3
|
+
import { ArrowRight, Circle } from "lucide-react";
|
|
4
|
+
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
4
5
|
import { flash } from "@open-mercato/ui/backend/FlashMessages";
|
|
6
|
+
import { Alert, AlertDescription } from "@open-mercato/ui/primitives/alert";
|
|
7
|
+
import { Button } from "@open-mercato/ui/primitives/button";
|
|
8
|
+
import { SourceColors, SourceGrids, SourceRadius, SourceShadows, SourceTypography } from "../demos/foundation-references.js";
|
|
5
9
|
const TOKENS_IMPORT = "apps/mercato/src/app/globals.css";
|
|
6
10
|
const FIGMA_COLORS_NODE = "553:14956";
|
|
7
|
-
function
|
|
11
|
+
function useCopyToken(copyText) {
|
|
12
|
+
const t = useT();
|
|
8
13
|
const onCopy = React.useCallback(async () => {
|
|
9
14
|
try {
|
|
10
15
|
await navigator.clipboard.writeText(copyText);
|
|
11
|
-
flash(
|
|
16
|
+
flash(t("design_system.gallery.tokenCopied", { token: copyText }), "success");
|
|
12
17
|
} catch {
|
|
13
|
-
flash("
|
|
18
|
+
flash(t("design_system.gallery.tokenCopyFailed"), "error");
|
|
14
19
|
}
|
|
15
|
-
}, [copyText]);
|
|
20
|
+
}, [copyText, t]);
|
|
21
|
+
return { onCopy, copyLabel: t("design_system.gallery.copyToken", { token: copyText }) };
|
|
22
|
+
}
|
|
23
|
+
function SwatchCard({ copyText, label, children }) {
|
|
24
|
+
const { onCopy, copyLabel } = useCopyToken(copyText);
|
|
16
25
|
return /* @__PURE__ */ jsxs(
|
|
17
|
-
|
|
26
|
+
Button,
|
|
18
27
|
{
|
|
19
28
|
type: "button",
|
|
29
|
+
variant: "ghost",
|
|
20
30
|
onClick: onCopy,
|
|
21
|
-
className: "
|
|
22
|
-
title:
|
|
31
|
+
className: "h-auto w-44 max-w-full flex-col items-start gap-3 whitespace-normal border border-border bg-background p-3 text-left hover:bg-muted/50",
|
|
32
|
+
title: copyLabel,
|
|
33
|
+
"aria-label": copyLabel,
|
|
23
34
|
children: [
|
|
24
35
|
children,
|
|
25
|
-
/* @__PURE__ */ jsx("code", { className: "break-all text-
|
|
36
|
+
/* @__PURE__ */ jsx("code", { className: "break-all text-xs text-muted-foreground", children: label })
|
|
26
37
|
]
|
|
27
38
|
}
|
|
28
39
|
);
|
|
29
40
|
}
|
|
30
41
|
function TokenSwatch({ tokenClass, label }) {
|
|
31
|
-
return /* @__PURE__ */ jsx(SwatchCard, { copyText: label, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `h-
|
|
42
|
+
return /* @__PURE__ */ jsx(SwatchCard, { copyText: label, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `h-20 w-full rounded-sm border border-border ${tokenClass}` }) });
|
|
32
43
|
}
|
|
33
44
|
function TextSwatch({ textClass, label }) {
|
|
34
|
-
return /* @__PURE__ */ jsx(SwatchCard, { copyText: textClass, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "flex h-
|
|
45
|
+
return /* @__PURE__ */ jsx(SwatchCard, { copyText: textClass, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "flex h-20 w-full items-center justify-center rounded-sm border border-border bg-background", children: /* @__PURE__ */ jsx("span", { className: `text-3xl font-medium leading-none ${textClass}`, children: "Aa" }) }) });
|
|
35
46
|
}
|
|
36
47
|
function BorderSwatch({ borderClass, label }) {
|
|
37
|
-
return /* @__PURE__ */ jsx(SwatchCard, { copyText: borderClass, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `h-
|
|
48
|
+
return /* @__PURE__ */ jsx(SwatchCard, { copyText: borderClass, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `h-20 w-full rounded-sm border-2 bg-background ${borderClass}` }) });
|
|
38
49
|
}
|
|
39
50
|
function IconSwatch({ iconClass, label }) {
|
|
40
|
-
return /* @__PURE__ */ jsx(SwatchCard, { copyText: iconClass, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "flex h-
|
|
51
|
+
return /* @__PURE__ */ jsx(SwatchCard, { copyText: iconClass, label, children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "flex h-20 w-full items-center justify-center rounded-sm border border-border bg-background", children: /* @__PURE__ */ jsx(Circle, { className: `size-4 fill-current ${iconClass}` }) }) });
|
|
41
52
|
}
|
|
42
53
|
function SwatchRow({ items }) {
|
|
43
54
|
return /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: items.map((item) => /* @__PURE__ */ jsx(TokenSwatch, { tokenClass: item.tokenClass, label: item.label }, item.label)) });
|
|
@@ -47,8 +58,8 @@ const brandColorsEntry = {
|
|
|
47
58
|
title: "Brand colors",
|
|
48
59
|
importPath: TOKENS_IMPORT,
|
|
49
60
|
usage: {
|
|
50
|
-
do: ["brand-violet 10/30/100 pattern (bg/border/text) for
|
|
51
|
-
dont: ["
|
|
61
|
+
do: ["Use the brand-violet 10/30/100 pattern (bg/border/text) for AI features and user-saved views."],
|
|
62
|
+
dont: ["Do not substitute brand colors for semantic status tokens.", "Do not repurpose accent-indigo \u2014 it is the selection-control contract."]
|
|
52
63
|
},
|
|
53
64
|
figmaNodeId: FIGMA_COLORS_NODE,
|
|
54
65
|
variants: [
|
|
@@ -60,7 +71,7 @@ const brandColorsEntry = {
|
|
|
60
71
|
"div",
|
|
61
72
|
{
|
|
62
73
|
"aria-hidden": true,
|
|
63
|
-
className: "h-
|
|
74
|
+
className: "h-32 w-full rounded-lg border border-border bg-linear-135 from-brand-lime from-0% via-brand-yellow via-35% to-brand-violet to-70%"
|
|
64
75
|
}
|
|
65
76
|
),
|
|
66
77
|
/* @__PURE__ */ jsx("code", { className: "text-xs text-muted-foreground", children: "brand-lime 0%, brand-yellow 35%, brand-violet 70%" })
|
|
@@ -114,6 +125,14 @@ const colorTokensEntry = {
|
|
|
114
125
|
},
|
|
115
126
|
figmaNodeId: FIGMA_COLORS_NODE,
|
|
116
127
|
variants: [
|
|
128
|
+
{
|
|
129
|
+
id: "source-palette",
|
|
130
|
+
title: "Complete source palette",
|
|
131
|
+
render: () => /* @__PURE__ */ jsx(SourceColors, {}),
|
|
132
|
+
code: `import { SourceColors } from '@open-mercato/core/modules/design_system/gallery/demos/foundation-references'
|
|
133
|
+
|
|
134
|
+
<SourceColors />`
|
|
135
|
+
},
|
|
117
136
|
{
|
|
118
137
|
id: "primary",
|
|
119
138
|
title: "primary",
|
|
@@ -159,7 +178,7 @@ const colorTokensEntry = {
|
|
|
159
178
|
/* @__PURE__ */ jsx(TextSwatch, { textClass: "text-accent-foreground", label: "text-accent-foreground" }),
|
|
160
179
|
/* @__PURE__ */ jsx(TextSwatch, { textClass: "text-text-disabled", label: "text-text-disabled" })
|
|
161
180
|
] }),
|
|
162
|
-
code: `<p className="text-muted-foreground">
|
|
181
|
+
code: `<p className="text-muted-foreground">{t('design_system.gallery.samples.typeBody')}</p>`
|
|
163
182
|
},
|
|
164
183
|
{
|
|
165
184
|
id: "stroke",
|
|
@@ -202,6 +221,10 @@ function StatusFamilyPreview({ family }) {
|
|
|
202
221
|
] })
|
|
203
222
|
] });
|
|
204
223
|
}
|
|
224
|
+
function FeatureStatePreview() {
|
|
225
|
+
const t = useT();
|
|
226
|
+
return /* @__PURE__ */ jsx(Alert, { status: "feature", className: "max-w-md", children: /* @__PURE__ */ jsx(AlertDescription, { children: t("design_system.gallery.samples.featureState") }) });
|
|
227
|
+
}
|
|
205
228
|
const stateTokensEntry = {
|
|
206
229
|
id: "state-tokens",
|
|
207
230
|
title: "State color tokens",
|
|
@@ -209,7 +232,8 @@ const stateTokensEntry = {
|
|
|
209
232
|
usage: {
|
|
210
233
|
do: [
|
|
211
234
|
"Pair -bg with -text of the same family \u2014 the shades are contrast-tested together.",
|
|
212
|
-
"-icon for glyphs and dots, -border for outlines; both handle dark mode themselves."
|
|
235
|
+
"-icon for glyphs and dots, -border for outlines; both handle dark mode themselves.",
|
|
236
|
+
'Alert status="feature" uses the neutral token family; brand-violet is reserved for AI and saved-view accents.'
|
|
213
237
|
],
|
|
214
238
|
dont: [
|
|
215
239
|
"Never hardcode Tailwind status colors (text-red-*, bg-green-*, text-amber-*).",
|
|
@@ -226,9 +250,13 @@ const stateTokensEntry = {
|
|
|
226
250
|
})),
|
|
227
251
|
{
|
|
228
252
|
id: "feature",
|
|
229
|
-
title: "Feature \u2192
|
|
230
|
-
render: () => /* @__PURE__ */ jsx(
|
|
231
|
-
code:
|
|
253
|
+
title: "Feature \u2192 status-neutral",
|
|
254
|
+
render: () => /* @__PURE__ */ jsx(FeatureStatePreview, {}),
|
|
255
|
+
code: `import { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'
|
|
256
|
+
|
|
257
|
+
<Alert status="feature" className="max-w-md">
|
|
258
|
+
<AlertDescription>{t('design_system.gallery.samples.featureState')}</AlertDescription>
|
|
259
|
+
</Alert>`
|
|
232
260
|
}
|
|
233
261
|
]
|
|
234
262
|
};
|
|
@@ -284,31 +312,25 @@ const chartPaletteEntry = {
|
|
|
284
312
|
]
|
|
285
313
|
};
|
|
286
314
|
function RoleCard({ role }) {
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
await navigator.clipboard.writeText(`${role.surfaceCls} ${role.onSurfaceCls}`);
|
|
291
|
-
flash(`${role.surfaceCls} ${role.onSurfaceCls} copied`, "success");
|
|
292
|
-
} catch {
|
|
293
|
-
flash("Could not copy the classes", "error");
|
|
294
|
-
}
|
|
295
|
-
}, [role]);
|
|
296
|
-
return /* @__PURE__ */ jsxs(
|
|
297
|
-
"button",
|
|
315
|
+
const { onCopy, copyLabel } = useCopyToken(`${role.surfaceCls} ${role.onSurfaceCls}`);
|
|
316
|
+
return /* @__PURE__ */ jsx(
|
|
317
|
+
Button,
|
|
298
318
|
{
|
|
299
319
|
type: "button",
|
|
320
|
+
variant: "ghost",
|
|
300
321
|
onClick: onCopy,
|
|
301
|
-
title:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
322
|
+
title: copyLabel,
|
|
323
|
+
"aria-label": copyLabel,
|
|
324
|
+
className: "h-auto w-full whitespace-normal p-0 text-left transition-opacity hover:bg-transparent hover:opacity-90",
|
|
325
|
+
children: /* @__PURE__ */ jsxs("span", { className: `flex h-36 w-full flex-col items-start justify-between rounded-lg border p-4 ${role.surfaceCls} ${role.onSurfaceCls} ${role.borderCls ?? "border-border"}`, children: [
|
|
326
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-medium leading-tight", children: role.surface }),
|
|
305
327
|
/* @__PURE__ */ jsx("code", { className: "text-xs opacity-80", children: role.onSurface })
|
|
306
|
-
]
|
|
328
|
+
] })
|
|
307
329
|
}
|
|
308
330
|
);
|
|
309
331
|
}
|
|
310
332
|
function RoleGrid({ roles }) {
|
|
311
|
-
return /* @__PURE__ */ jsx("div", { className: "grid w-full gap-
|
|
333
|
+
return /* @__PURE__ */ jsx("div", { className: "grid w-full gap-4 sm:grid-cols-2 xl:grid-cols-3", children: roles.map((role) => /* @__PURE__ */ jsx(RoleCard, { role }, role.surface + role.onSurface)) });
|
|
312
334
|
}
|
|
313
335
|
const colorRolesEntry = {
|
|
314
336
|
id: "color-roles",
|
|
@@ -341,7 +363,9 @@ const colorRolesEntry = {
|
|
|
341
363
|
]
|
|
342
364
|
}
|
|
343
365
|
),
|
|
344
|
-
code:
|
|
366
|
+
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
367
|
+
|
|
368
|
+
<Button type="button">{t('design_system.gallery.samples.primaryAction')}</Button>`
|
|
345
369
|
},
|
|
346
370
|
{
|
|
347
371
|
id: "surfaces",
|
|
@@ -367,12 +391,12 @@ const colorRolesEntry = {
|
|
|
367
391
|
render: () => /* @__PURE__ */ jsx(
|
|
368
392
|
RoleGrid,
|
|
369
393
|
{
|
|
370
|
-
roles:
|
|
371
|
-
surface: `status-${status}-bg`,
|
|
372
|
-
onSurface: `status-${status}-text`,
|
|
373
|
-
surfaceCls:
|
|
374
|
-
onSurfaceCls:
|
|
375
|
-
borderCls:
|
|
394
|
+
roles: FIGMA_STATE_TO_CODE.map((family) => ({
|
|
395
|
+
surface: `status-${family.status}-bg`,
|
|
396
|
+
onSurface: `status-${family.status}-text`,
|
|
397
|
+
surfaceCls: family.bg,
|
|
398
|
+
onSurfaceCls: family.text,
|
|
399
|
+
borderCls: family.border
|
|
376
400
|
}))
|
|
377
401
|
}
|
|
378
402
|
),
|
|
@@ -389,21 +413,16 @@ const RADIUS_SCALE = [
|
|
|
389
413
|
{ cls: "rounded-full", label: "rounded-full", px: "999px" }
|
|
390
414
|
];
|
|
391
415
|
function RadiusCard({ cls, label, px }) {
|
|
392
|
-
const onCopy =
|
|
393
|
-
try {
|
|
394
|
-
await navigator.clipboard.writeText(label);
|
|
395
|
-
flash(`${label} copied`, "success");
|
|
396
|
-
} catch {
|
|
397
|
-
flash("Could not copy the class", "error");
|
|
398
|
-
}
|
|
399
|
-
}, [label]);
|
|
416
|
+
const { onCopy, copyLabel } = useCopyToken(label);
|
|
400
417
|
return /* @__PURE__ */ jsxs(
|
|
401
|
-
|
|
418
|
+
Button,
|
|
402
419
|
{
|
|
403
420
|
type: "button",
|
|
421
|
+
variant: "ghost",
|
|
404
422
|
onClick: onCopy,
|
|
405
|
-
title:
|
|
406
|
-
|
|
423
|
+
title: copyLabel,
|
|
424
|
+
"aria-label": copyLabel,
|
|
425
|
+
className: "h-auto w-36 flex-col items-start gap-2 border border-border bg-background p-2 text-left hover:bg-muted/50",
|
|
407
426
|
children: [
|
|
408
427
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `h-14 w-full border-2 border-dashed border-status-pink-icon bg-status-pink-bg ${cls}` }),
|
|
409
428
|
/* @__PURE__ */ jsxs("span", { className: "space-y-0.5", children: [
|
|
@@ -418,6 +437,7 @@ const radiusEntry = {
|
|
|
418
437
|
id: "corner-radius",
|
|
419
438
|
title: "Corner radius",
|
|
420
439
|
importPath: TOKENS_IMPORT,
|
|
440
|
+
figmaNodeId: "553:14961",
|
|
421
441
|
keywords: ["radius", "rounded", "border-radius", "corners"],
|
|
422
442
|
usage: {
|
|
423
443
|
do: [
|
|
@@ -431,6 +451,14 @@ const radiusEntry = {
|
|
|
431
451
|
]
|
|
432
452
|
},
|
|
433
453
|
variants: [
|
|
454
|
+
{
|
|
455
|
+
id: "source-radius",
|
|
456
|
+
title: "Complete radius scale",
|
|
457
|
+
render: () => /* @__PURE__ */ jsx(SourceRadius, {}),
|
|
458
|
+
code: `import { SourceRadius } from '@open-mercato/core/modules/design_system/gallery/demos/foundation-references'
|
|
459
|
+
|
|
460
|
+
<SourceRadius />`
|
|
461
|
+
},
|
|
434
462
|
{
|
|
435
463
|
id: "scale",
|
|
436
464
|
title: "scale",
|
|
@@ -439,13 +467,296 @@ const radiusEntry = {
|
|
|
439
467
|
}
|
|
440
468
|
]
|
|
441
469
|
};
|
|
470
|
+
const TYPOGRAPHY_ROLES = [
|
|
471
|
+
{ id: "page", className: "text-2xl font-bold tracking-tight", metrics: "24 / 32 px" },
|
|
472
|
+
{ id: "section", className: "text-xl font-semibold", metrics: "20 / 28 px" },
|
|
473
|
+
{ id: "body", className: "text-sm", metrics: "14 / 20 px" },
|
|
474
|
+
{ id: "label", className: "text-sm font-medium", metrics: "14 / 20 px" },
|
|
475
|
+
{ id: "helper", className: "text-xs text-muted-foreground", metrics: "12 / 16 px" }
|
|
476
|
+
];
|
|
477
|
+
function TypographyRolesPreview() {
|
|
478
|
+
const t = useT();
|
|
479
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
480
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-3xl text-sm leading-relaxed text-muted-foreground", children: t("design_system.foundations.typography.guide.intro") }),
|
|
481
|
+
/* @__PURE__ */ jsx("div", { className: "divide-y divide-border border-y border-border", children: TYPOGRAPHY_ROLES.map((role) => /* @__PURE__ */ jsxs("article", { className: "grid min-w-0 gap-4 py-6 md:grid-cols-3 md:gap-8", "data-typography-role": role.id, children: [
|
|
482
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
483
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium", children: t(`design_system.foundations.typography.guide.${role.id}.title`) }),
|
|
484
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: role.metrics })
|
|
485
|
+
] }),
|
|
486
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-3 md:col-span-2", children: [
|
|
487
|
+
/* @__PURE__ */ jsx("p", { className: `${role.className} break-words`, children: t(`design_system.foundations.typography.guide.${role.id}.example`) }),
|
|
488
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-prose text-sm leading-relaxed text-muted-foreground", children: t(`design_system.foundations.typography.guide.${role.id}.usage`) })
|
|
489
|
+
] })
|
|
490
|
+
] }, role.id)) }),
|
|
491
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-3xl text-sm leading-relaxed text-muted-foreground", children: t("design_system.foundations.typography.guide.fonts") })
|
|
492
|
+
] });
|
|
493
|
+
}
|
|
494
|
+
function TypographyReferencePreview() {
|
|
495
|
+
const t = useT();
|
|
496
|
+
return /* @__PURE__ */ jsxs("section", { className: "rounded-lg border border-border", children: [
|
|
497
|
+
/* @__PURE__ */ jsx("h3", { className: "p-4 text-sm font-medium", children: t("design_system.foundations.typography.guide.reference") }),
|
|
498
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-8 border-t border-border p-4 sm:p-6", children: [
|
|
499
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
500
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium", children: t("design_system.foundations.typography.guide.classes") }),
|
|
501
|
+
/* @__PURE__ */ jsx("dl", { className: "divide-y divide-border", children: TYPOGRAPHY_ROLES.map((role) => /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap justify-between gap-2 py-3 text-sm", children: [
|
|
502
|
+
/* @__PURE__ */ jsx("dt", { children: t(`design_system.foundations.typography.guide.${role.id}.title`) }),
|
|
503
|
+
/* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx("code", { className: "break-words text-xs text-muted-foreground", children: role.className }) })
|
|
504
|
+
] }, role.id)) })
|
|
505
|
+
] }),
|
|
506
|
+
/* @__PURE__ */ jsx(SourceTypography, {})
|
|
507
|
+
] })
|
|
508
|
+
] });
|
|
509
|
+
}
|
|
510
|
+
const typographyEntry = {
|
|
511
|
+
id: "typography",
|
|
512
|
+
title: "Typography",
|
|
513
|
+
importPath: TOKENS_IMPORT,
|
|
514
|
+
figmaNodeId: "553:14957",
|
|
515
|
+
keywords: ["font", "type", "heading", "body", "line-height", "Geist", "Inter"],
|
|
516
|
+
usage: {
|
|
517
|
+
do: [
|
|
518
|
+
"Use font-sans for the interface and font-mono for code and identifiers. Both resolve through the host application font tokens, with system fallbacks in globals.css.",
|
|
519
|
+
"Use text-2xl for backend page titles and text-sm for body text. Scale measurements assume a 16px root font size.",
|
|
520
|
+
"The Figma reference uses Inter / Inter Display; these specimens show the shipped font tokens rather than claiming font parity."
|
|
521
|
+
],
|
|
522
|
+
dont: ["Do not copy marketing display sizes into dense backend pages.", "Do not set inline font families or arbitrary text sizes."]
|
|
523
|
+
},
|
|
524
|
+
variants: [
|
|
525
|
+
{
|
|
526
|
+
id: "roles",
|
|
527
|
+
title: "Text hierarchy",
|
|
528
|
+
render: () => /* @__PURE__ */ jsx(TypographyRolesPreview, {}),
|
|
529
|
+
code: `import { Label } from '@open-mercato/ui/primitives/label'
|
|
530
|
+
import { Input } from '@open-mercato/ui/primitives/input'
|
|
531
|
+
|
|
532
|
+
<h1 className="text-2xl font-bold tracking-tight">{t('design_system.foundations.typography.guide.page.example')}</h1>
|
|
533
|
+
<h2 className="text-xl font-semibold">{t('design_system.foundations.typography.guide.section.example')}</h2>
|
|
534
|
+
<p className="text-sm">{t('design_system.foundations.typography.guide.body.example')}</p>
|
|
535
|
+
<Label htmlFor="name">{t('design_system.foundations.typography.guide.label.example')}</Label>
|
|
536
|
+
<Input id="name" aria-describedby="name-hint" />
|
|
537
|
+
<p id="name-hint" className="text-xs text-muted-foreground">{t('design_system.foundations.typography.guide.helper.example')}</p>`
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
id: "source-typography",
|
|
541
|
+
title: "Complete typography scale",
|
|
542
|
+
render: () => /* @__PURE__ */ jsx(TypographyReferencePreview, {}),
|
|
543
|
+
code: `import { SourceTypography } from '@open-mercato/core/modules/design_system/gallery/demos/foundation-references'
|
|
544
|
+
|
|
545
|
+
<SourceTypography />`
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
};
|
|
549
|
+
const SPACING_SCALE = [
|
|
550
|
+
{ token: "1", className: "w-1", pixels: 4 },
|
|
551
|
+
{ token: "2", className: "w-2", pixels: 8 },
|
|
552
|
+
{ token: "3", className: "w-3", pixels: 12 },
|
|
553
|
+
{ token: "4", className: "w-4", pixels: 16 },
|
|
554
|
+
{ token: "6", className: "w-6", pixels: 24 },
|
|
555
|
+
{ token: "8", className: "w-8", pixels: 32 },
|
|
556
|
+
{ token: "12", className: "w-12", pixels: 48 }
|
|
557
|
+
];
|
|
558
|
+
function SpacingScalePreview() {
|
|
559
|
+
const t = useT();
|
|
560
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-6", children: [
|
|
561
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("design_system.foundations.spacing.scaleHint") }),
|
|
562
|
+
SPACING_SCALE.map((item) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 py-2", children: [
|
|
563
|
+
/* @__PURE__ */ jsxs("code", { className: "w-12 shrink-0 text-sm text-muted-foreground", children: [
|
|
564
|
+
"p-",
|
|
565
|
+
item.token
|
|
566
|
+
] }),
|
|
567
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "block h-8 rounded-sm border-l-4 border-primary bg-muted", style: { width: `${item.pixels / 48 * 100}%` } }) }),
|
|
568
|
+
/* @__PURE__ */ jsxs("span", { className: "w-28 shrink-0 font-mono text-xs", children: [
|
|
569
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
570
|
+
item.pixels / 16,
|
|
571
|
+
" rem"
|
|
572
|
+
] }),
|
|
573
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-3 text-muted-foreground", children: [
|
|
574
|
+
item.pixels,
|
|
575
|
+
" px"
|
|
576
|
+
] })
|
|
577
|
+
] })
|
|
578
|
+
] }, item.token))
|
|
579
|
+
] });
|
|
580
|
+
}
|
|
581
|
+
function SpacingRhythmPreview() {
|
|
582
|
+
return /* @__PURE__ */ jsx("div", { className: "grid w-full gap-6 md:grid-cols-2", children: [
|
|
583
|
+
{ padding: "p-4", gap: "gap-2" },
|
|
584
|
+
{ padding: "p-6", gap: "gap-4" }
|
|
585
|
+
].map((item) => /* @__PURE__ */ jsxs("div", { className: `space-y-4 rounded-lg border border-border bg-muted/30 ${item.padding}`, children: [
|
|
586
|
+
/* @__PURE__ */ jsxs("code", { className: "text-xs text-muted-foreground", children: [
|
|
587
|
+
item.padding,
|
|
588
|
+
" / ",
|
|
589
|
+
item.gap
|
|
590
|
+
] }),
|
|
591
|
+
/* @__PURE__ */ jsxs("div", { "aria-hidden": true, className: `flex ${item.gap}`, children: [
|
|
592
|
+
/* @__PURE__ */ jsx("span", { className: "h-12 flex-1 rounded-md border border-border bg-background" }),
|
|
593
|
+
/* @__PURE__ */ jsx("span", { className: "h-12 flex-1 rounded-md border border-border bg-background" }),
|
|
594
|
+
/* @__PURE__ */ jsx("span", { className: "h-12 flex-1 rounded-md border border-border bg-background" })
|
|
595
|
+
] })
|
|
596
|
+
] }, item.padding)) });
|
|
597
|
+
}
|
|
598
|
+
const spacingEntry = {
|
|
599
|
+
id: "spacing",
|
|
600
|
+
title: "Spacing",
|
|
601
|
+
importPath: TOKENS_IMPORT,
|
|
602
|
+
figmaNodeId: "553:14958",
|
|
603
|
+
keywords: ["padding", "gap", "margin", "grid", "rhythm"],
|
|
604
|
+
usage: {
|
|
605
|
+
do: ["Use the 4px spacing grid. Start with gap-2 between controls, p-4 within containers and p-6 for larger panels."],
|
|
606
|
+
dont: ["Do not invent arbitrary spacing values or compensate for layout problems with negative margins."]
|
|
607
|
+
},
|
|
608
|
+
variants: [
|
|
609
|
+
{
|
|
610
|
+
id: "source-grids",
|
|
611
|
+
title: "Layout grids",
|
|
612
|
+
render: () => /* @__PURE__ */ jsx(SourceGrids, {}),
|
|
613
|
+
code: `import { SourceGrids } from '@open-mercato/core/modules/design_system/gallery/demos/foundation-references'
|
|
614
|
+
|
|
615
|
+
<SourceGrids />`
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
id: "scale",
|
|
619
|
+
title: "Spacing scale",
|
|
620
|
+
render: () => /* @__PURE__ */ jsx(SpacingScalePreview, {}),
|
|
621
|
+
code: `<div className="flex gap-2 p-4">{children}</div>
|
|
622
|
+
<section className="space-y-6 p-6">{children}</section>`
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
id: "rhythm",
|
|
626
|
+
title: "Container rhythm",
|
|
627
|
+
render: () => /* @__PURE__ */ jsx(SpacingRhythmPreview, {}),
|
|
628
|
+
code: `<div className="p-4">
|
|
629
|
+
<div className="flex gap-2">{children}</div>
|
|
630
|
+
</div>
|
|
631
|
+
<div className="p-6">
|
|
632
|
+
<div className="flex gap-4">{children}</div>
|
|
633
|
+
</div>`
|
|
634
|
+
}
|
|
635
|
+
]
|
|
636
|
+
};
|
|
637
|
+
const SHADOW_SCALE = ["shadow-none", "shadow-xs", "shadow-sm", "shadow-md", "shadow-lg", "shadow-xl", "shadow-2xl"];
|
|
638
|
+
function ShadowScalePreview() {
|
|
639
|
+
return /* @__PURE__ */ jsx("div", { className: "grid w-full grid-cols-2 gap-6 p-4 md:grid-cols-3 lg:grid-cols-4", children: SHADOW_SCALE.map((className) => /* @__PURE__ */ jsx("div", { className: `flex h-24 items-center justify-center rounded-lg border border-border bg-card p-4 ${className}`, children: /* @__PURE__ */ jsx("code", { className: "text-xs text-card-foreground", children: className }) }, className)) });
|
|
640
|
+
}
|
|
641
|
+
function FocusPreview() {
|
|
642
|
+
const t = useT();
|
|
643
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4 p-2", children: [
|
|
644
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("design_system.gallery.samples.focusHint") }),
|
|
645
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-6", children: [
|
|
646
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", children: t("design_system.gallery.samples.focusAction") }),
|
|
647
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "rounded-md border border-border bg-background px-4 py-2 text-sm shadow-focus", children: "shadow-focus" })
|
|
648
|
+
] })
|
|
649
|
+
] });
|
|
650
|
+
}
|
|
651
|
+
const shadowsEntry = {
|
|
652
|
+
id: "shadows",
|
|
653
|
+
title: "Shadows & focus",
|
|
654
|
+
importPath: TOKENS_IMPORT,
|
|
655
|
+
figmaNodeId: "553:14959",
|
|
656
|
+
keywords: ["elevation", "depth", "focus", "keyboard"],
|
|
657
|
+
usage: {
|
|
658
|
+
do: ["Use shadow-xs for controls, shadow-sm for cards and higher elevations for overlays.", "Keep the visible keyboard focus supplied by DS primitives. Shadow tokens adapt to the active theme."],
|
|
659
|
+
dont: ["Do not draw custom colored glows or arbitrary box shadows.", "Do not remove focus feedback without an equivalent visible indicator."]
|
|
660
|
+
},
|
|
661
|
+
variants: [
|
|
662
|
+
{
|
|
663
|
+
id: "source-shadows",
|
|
664
|
+
title: "Complete shadow collection",
|
|
665
|
+
render: () => /* @__PURE__ */ jsx(SourceShadows, {}),
|
|
666
|
+
code: `import { SourceShadows } from '@open-mercato/core/modules/design_system/gallery/demos/foundation-references'
|
|
667
|
+
|
|
668
|
+
<SourceShadows />`
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
id: "elevation",
|
|
672
|
+
title: "Elevation scale",
|
|
673
|
+
render: () => /* @__PURE__ */ jsx(ShadowScalePreview, {}),
|
|
674
|
+
code: `<div className="rounded-lg border border-border bg-card p-4 shadow-sm">{children}</div>
|
|
675
|
+
<div className="rounded-lg border border-border bg-popover p-4 shadow-lg">{children}</div>`
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
id: "focus",
|
|
679
|
+
title: "Keyboard focus",
|
|
680
|
+
render: () => /* @__PURE__ */ jsx(FocusPreview, {}),
|
|
681
|
+
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
682
|
+
|
|
683
|
+
<Button type="button" variant="outline">{t('design_system.gallery.samples.focusAction')}</Button>`
|
|
684
|
+
}
|
|
685
|
+
]
|
|
686
|
+
};
|
|
687
|
+
function MotionPreview() {
|
|
688
|
+
const t = useT();
|
|
689
|
+
const [active, setActive] = React.useState(false);
|
|
690
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-4", children: [
|
|
691
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", "aria-pressed": active, onClick: () => setActive((value) => !value), children: t("design_system.gallery.samples.toggleMotion") }),
|
|
692
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 md:grid-cols-3", children: [
|
|
693
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border p-4", children: [
|
|
694
|
+
/* @__PURE__ */ jsx("code", { className: "text-xs text-muted-foreground", children: "transition-colors / 150 ms" }),
|
|
695
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: `h-12 rounded-md transition-colors duration-150 motion-reduce:transition-none ${active ? "bg-primary" : "bg-muted"}` })
|
|
696
|
+
] }),
|
|
697
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border p-4", children: [
|
|
698
|
+
/* @__PURE__ */ jsx("code", { className: "text-xs text-muted-foreground", children: "transition-opacity / 200 ms" }),
|
|
699
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: `h-12 rounded-md bg-primary transition-opacity duration-200 ease-out motion-reduce:transition-none ${active ? "opacity-100" : "opacity-30"}` })
|
|
700
|
+
] }),
|
|
701
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border p-4", children: [
|
|
702
|
+
/* @__PURE__ */ jsx("code", { className: "text-xs text-muted-foreground", children: "transition-transform / 300 ms" }),
|
|
703
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "flex h-12 items-center", children: /* @__PURE__ */ jsx(ArrowRight, { className: `size-6 text-foreground transition-transform duration-300 ease-out motion-reduce:transition-none ${active ? "translate-x-8" : "translate-x-0"}` }) })
|
|
704
|
+
] }),
|
|
705
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border p-4", children: [
|
|
706
|
+
/* @__PURE__ */ jsx("code", { className: "text-xs text-muted-foreground", children: "transition-opacity / 400 ms" }),
|
|
707
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: `h-12 rounded-md bg-primary transition-opacity duration-400 ease-out motion-reduce:transition-none ${active ? "opacity-100" : "opacity-30"}` })
|
|
708
|
+
] }),
|
|
709
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-3 rounded-lg border border-border p-4", children: [
|
|
710
|
+
/* @__PURE__ */ jsx("code", { className: "text-xs text-muted-foreground", children: "transition-opacity / 500 ms" }),
|
|
711
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: `h-12 rounded-md bg-primary transition-opacity duration-500 ease-out motion-reduce:transition-none ${active ? "opacity-100" : "opacity-30"}` })
|
|
712
|
+
] })
|
|
713
|
+
] }),
|
|
714
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("design_system.gallery.samples.reducedMotion") })
|
|
715
|
+
] });
|
|
716
|
+
}
|
|
717
|
+
const motionEntry = {
|
|
718
|
+
id: "motion",
|
|
719
|
+
title: "Motion",
|
|
720
|
+
importPath: TOKENS_IMPORT,
|
|
721
|
+
figmaNodeId: "553:14960",
|
|
722
|
+
keywords: ["animation", "transition", "duration", "reduced-motion"],
|
|
723
|
+
usage: {
|
|
724
|
+
do: ["The Figma duration scale is 150, 200, 300, 400 and 500ms; choose timing according to content size and travel distance.", "Name the changing property and respect reduced-motion preferences."],
|
|
725
|
+
dont: ["Do not use animation as the only feedback for a state change.", "Do not use transition-all when only one property changes."]
|
|
726
|
+
},
|
|
727
|
+
variants: [
|
|
728
|
+
{
|
|
729
|
+
id: "durations",
|
|
730
|
+
title: "Interactive duration scale",
|
|
731
|
+
render: () => /* @__PURE__ */ jsx(MotionPreview, {}),
|
|
732
|
+
code: `import * as React from 'react'
|
|
733
|
+
import { ArrowRight } from 'lucide-react'
|
|
734
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
735
|
+
|
|
736
|
+
const [active, setActive] = React.useState(false)
|
|
737
|
+
|
|
738
|
+
<Button type="button" variant="outline" aria-pressed={active} onClick={() => setActive((value) => !value)}>
|
|
739
|
+
{t('design_system.gallery.samples.toggleMotion')}
|
|
740
|
+
</Button>
|
|
741
|
+
<div aria-hidden className={['h-12 rounded-md transition-colors duration-150 motion-reduce:transition-none', active ? 'bg-primary' : 'bg-muted'].join(' ')} />
|
|
742
|
+
<div aria-hidden className={['h-12 rounded-md bg-primary transition-opacity duration-200 ease-out motion-reduce:transition-none', active ? 'opacity-100' : 'opacity-30'].join(' ')} />
|
|
743
|
+
<ArrowRight aria-hidden className={['size-6 transition-transform duration-300 ease-out motion-reduce:transition-none', active ? 'translate-x-8' : 'translate-x-0'].join(' ')} />
|
|
744
|
+
<div aria-hidden className={['h-12 rounded-md bg-primary transition-opacity duration-400 ease-out motion-reduce:transition-none', active ? 'opacity-100' : 'opacity-30'].join(' ')} />
|
|
745
|
+
<div aria-hidden className={['h-12 rounded-md bg-primary transition-opacity duration-500 ease-out motion-reduce:transition-none', active ? 'opacity-100' : 'opacity-30'].join(' ')} />`
|
|
746
|
+
}
|
|
747
|
+
]
|
|
748
|
+
};
|
|
442
749
|
const entries = [
|
|
443
750
|
brandColorsEntry,
|
|
444
751
|
colorRolesEntry,
|
|
445
752
|
colorTokensEntry,
|
|
446
753
|
stateTokensEntry,
|
|
447
754
|
chartPaletteEntry,
|
|
448
|
-
radiusEntry
|
|
755
|
+
radiusEntry,
|
|
756
|
+
typographyEntry,
|
|
757
|
+
spacingEntry,
|
|
758
|
+
shadowsEntry,
|
|
759
|
+
motionEntry
|
|
449
760
|
];
|
|
450
761
|
export {
|
|
451
762
|
entries
|