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