@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,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import {
|
|
3
|
+
CircleAlert,
|
|
4
|
+
CircleCheck,
|
|
5
|
+
Globe,
|
|
3
6
|
FilePlus2,
|
|
4
7
|
Info,
|
|
5
8
|
LayoutDashboard,
|
|
@@ -7,7 +10,12 @@ import {
|
|
|
7
10
|
TriangleAlert,
|
|
8
11
|
UserRound,
|
|
9
12
|
Users,
|
|
13
|
+
X,
|
|
10
14
|
} from 'lucide-react'
|
|
15
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
16
|
+
import { CheckboxField } from '@open-mercato/ui/primitives/checkbox-field'
|
|
17
|
+
import { SwitchField } from '@open-mercato/ui/primitives/switch-field'
|
|
18
|
+
import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'
|
|
11
19
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
12
20
|
import {
|
|
13
21
|
Dialog,
|
|
@@ -41,10 +49,12 @@ import {
|
|
|
41
49
|
} from '@open-mercato/ui/primitives/sheet'
|
|
42
50
|
import {
|
|
43
51
|
Popover,
|
|
52
|
+
PopoverArrow,
|
|
53
|
+
PopoverClose,
|
|
44
54
|
PopoverContent,
|
|
45
55
|
PopoverTrigger,
|
|
46
56
|
} from '@open-mercato/ui/primitives/popover'
|
|
47
|
-
import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
|
|
57
|
+
import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
|
|
48
58
|
import {
|
|
49
59
|
CommandMenu,
|
|
50
60
|
CommandMenuContent,
|
|
@@ -57,50 +67,451 @@ import {
|
|
|
57
67
|
CommandMenuSeparator,
|
|
58
68
|
CommandMenuTrigger,
|
|
59
69
|
} from '@open-mercato/ui/primitives/command-menu'
|
|
70
|
+
import { CommandSourceExample } from '../demos/menus'
|
|
71
|
+
import { commandSourceCode } from '../demos/menu-sources'
|
|
60
72
|
import type { GalleryEntry } from '../types'
|
|
61
73
|
|
|
62
74
|
// Component titles and variant names are proper nouns from the codebase and
|
|
63
75
|
// are deliberately not translated. `code` MUST contain the entry's importPath
|
|
64
76
|
// (enforced by the registry-integrity test) and is always reviewed alongside
|
|
65
77
|
// its sibling `render`.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
|
|
79
|
+
type FooterKind = 'basic' | 'equal' | 'checkbox' | 'toggle' | 'stepper' | 'link' | 'information'
|
|
80
|
+
type HeaderKind = 'basic' | 'default' | 'error' | 'warning' | 'success' | 'info'
|
|
81
|
+
type OverlayExample = { id: string; title: string; header?: HeaderKind; compact?: boolean; footer?: FooterKind; alignment?: 'horizontal' | 'vertical'; status?: boolean }
|
|
82
|
+
|
|
83
|
+
const headerIcons = { default: Settings, error: CircleAlert, warning: TriangleAlert, success: CircleCheck, info: Info }
|
|
84
|
+
|
|
85
|
+
function FooterLeading({ kind }: { kind: FooterKind }) {
|
|
86
|
+
const t = useT()
|
|
87
|
+
if (kind === 'checkbox') return <CheckboxField label={t('design_system.gallery.samples.overlay.remember')} />
|
|
88
|
+
if (kind === 'toggle') return <SwitchField label={t('design_system.gallery.samples.overlay.remember')} />
|
|
89
|
+
if (kind === 'stepper') return <StepperDots count={3} activeStep={0} size="sm" aria-label={t('design_system.gallery.samples.overlay.steps')} />
|
|
90
|
+
if (kind === 'link') return <Button variant="link" size="sm">{t('design_system.gallery.samples.overlay.help')}</Button>
|
|
91
|
+
if (kind === 'information') return <span className="inline-flex items-center gap-1.5 text-xs text-muted-foreground"><Info aria-hidden="true" className="size-4" />{t('design_system.gallery.samples.overlay.information')}</span>
|
|
92
|
+
return null
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function DialogExample({ header = 'basic', compact = false, footer = 'basic', alignment = 'horizontal', status = false }: Omit<OverlayExample, 'id' | 'title'>) {
|
|
96
|
+
const t = useT()
|
|
97
|
+
const Icon = header === 'basic' ? undefined : headerIcons[header]
|
|
98
|
+
return (
|
|
99
|
+
<Dialog>
|
|
100
|
+
<section data-dialog-preview="" aria-label={t('design_system.gallery.samples.overlay.title')} className="relative w-full max-w-md overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-sm">
|
|
101
|
+
{!status ? <X aria-hidden="true" className="absolute right-4 top-4 size-4 text-muted-foreground" /> : null}
|
|
102
|
+
<DialogHeader className={status ? 'p-6' : 'p-4 pr-12'} compact={compact} alignment={alignment} leadingTone={header === 'basic' ? 'default' : header} leading={Icon ? <Icon className={compact || status ? 'size-6' : 'size-5'} /> : undefined}>
|
|
103
|
+
<DialogTitle className={status ? 'text-base font-medium leading-6 tracking-normal' : 'text-sm font-medium leading-5 tracking-normal'}>{t('design_system.gallery.samples.overlay.title')}</DialogTitle>
|
|
104
|
+
<DialogDescription className={compact ? 'sr-only' : undefined}>{t('design_system.gallery.samples.overlay.description')}</DialogDescription>
|
|
105
|
+
</DialogHeader>
|
|
106
|
+
{!status ? <div className="px-4 py-6 text-sm text-muted-foreground">{t('design_system.gallery.samples.overlay.body')}</div> : null}
|
|
107
|
+
<DialogFooter layout={footer === 'equal' ? 'equal' : 'default'} leading={footer === 'basic' || footer === 'equal' ? undefined : <FooterLeading kind={footer} />} className="mx-0 gap-3 px-4 py-4">
|
|
108
|
+
<Button asChild variant="outline" size="default"><span>{t('design_system.gallery.samples.overlay.cancel')}</span></Button>
|
|
109
|
+
<Button asChild variant="primary-filled" size="default"><span>{t('design_system.gallery.samples.overlay.continue')}</span></Button>
|
|
110
|
+
</DialogFooter>
|
|
111
|
+
</section>
|
|
112
|
+
</Dialog>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function DrawerExample({ header = 'basic', compact = false, footer = 'basic' }: Omit<OverlayExample, 'id' | 'title'>) {
|
|
117
|
+
const t = useT()
|
|
118
|
+
return (
|
|
119
|
+
<Drawer>
|
|
120
|
+
<DrawerTrigger asChild><Button variant="outline">{t('design_system.gallery.samples.overlay.openDrawer')}</Button></DrawerTrigger>
|
|
121
|
+
<DrawerContent closeAriaLabel={t('design_system.gallery.samples.overlay.close')}>
|
|
122
|
+
<DrawerHeader compact={compact} leading={header === 'default' ? <Settings className={compact ? 'size-6' : 'size-5'} /> : undefined}>
|
|
123
|
+
<DrawerTitle className="text-sm font-medium leading-5">{t('design_system.gallery.samples.overlay.title')}</DrawerTitle>
|
|
124
|
+
<DrawerDescription className={compact ? 'sr-only' : undefined}>{t('design_system.gallery.samples.overlay.description')}</DrawerDescription>
|
|
125
|
+
</DrawerHeader>
|
|
126
|
+
<DrawerBody><p className="py-6 text-sm text-muted-foreground">{t('design_system.gallery.samples.overlay.body')}</p></DrawerBody>
|
|
127
|
+
<DrawerFooter layout={footer === 'equal' ? 'equal' : 'default'} leading={footer === 'basic' || footer === 'equal' ? undefined : <FooterLeading kind={footer} />} className="flex-wrap [&_[data-slot=drawer-footer-trailing]]:ml-auto">
|
|
128
|
+
<DrawerClose asChild><Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button></DrawerClose>
|
|
129
|
+
<DrawerClose asChild><Button variant="primary-filled">{t('design_system.gallery.samples.overlay.continue')}</Button></DrawerClose>
|
|
130
|
+
</DrawerFooter>
|
|
131
|
+
</DrawerContent>
|
|
132
|
+
</Drawer>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function overlayExampleCode(kind: 'Dialog' | 'Drawer', example: OverlayExample) {
|
|
137
|
+
const header = example.header ?? 'basic'
|
|
138
|
+
const icon = header === 'basic' ? null : { default: 'Settings', error: 'CircleAlert', warning: 'TriangleAlert', success: 'CircleCheck', info: 'Info' }[header]
|
|
139
|
+
const footer = example.footer ?? 'basic'
|
|
140
|
+
const leading = footer === 'checkbox' ? '<CheckboxField label="Don’t show again" />' : footer === 'toggle' ? '<SwitchField label="Don’t show again" />' : footer === 'stepper' ? '<StepperDots count={3} activeStep={0} size="sm" aria-label="Step 1 of 3" />' : footer === 'link' ? '<Button variant="link" size="sm">Help</Button>' : footer === 'information' ? '<span className="text-xs text-muted-foreground">Changes apply immediately</span>' : null
|
|
141
|
+
if (kind === 'Dialog') return `${icon ? `import { ${icon}, X } from 'lucide-react'\n` : "import { X } from 'lucide-react'\n"}${footer === 'checkbox' ? "import { CheckboxField } from '@open-mercato/ui/primitives/checkbox-field'\n" : ''}${footer === 'toggle' ? "import { SwitchField } from '@open-mercato/ui/primitives/switch-field'\n" : ''}${footer === 'stepper' ? "import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'\n" : ''}import { Button } from '@open-mercato/ui/primitives/button'
|
|
142
|
+
import { Dialog, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '@open-mercato/ui/primitives/dialog'
|
|
143
|
+
|
|
144
|
+
<Dialog>
|
|
145
|
+
<section aria-label="Workspace settings" className="relative w-full max-w-md overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-sm">
|
|
146
|
+
${example.status ? '' : '<X aria-hidden="true" className="absolute right-4 top-4 size-4 text-muted-foreground" />'}
|
|
147
|
+
<DialogHeader className="${example.status ? 'p-6' : 'p-4 pr-12'}" alignment="${example.alignment ?? 'horizontal'}" leadingTone="${header === 'basic' ? 'default' : header}"${example.compact ? ' compact' : ''}${icon ? ` leading={<${icon} className="${example.compact || example.status ? 'size-6' : 'size-5'}" />}` : ''}>
|
|
148
|
+
<DialogTitle className="${example.status ? 'text-base font-medium leading-6 tracking-normal' : 'text-sm font-medium leading-5 tracking-normal'}">Workspace settings</DialogTitle>
|
|
149
|
+
<DialogDescription${example.compact ? ' className="sr-only"' : ''}>Choose how these changes apply to your workspace.</DialogDescription>
|
|
150
|
+
</DialogHeader>
|
|
151
|
+
${example.status ? '' : '<div className="px-4 py-6 text-sm text-muted-foreground">Review your settings before continuing.</div>'}
|
|
152
|
+
<DialogFooter layout="${footer === 'equal' ? 'equal' : 'default'}"${leading ? ` leading={${leading}}` : ''} className="mx-0 gap-3 px-4 py-4">
|
|
153
|
+
<Button asChild variant="outline" size="default"><span>Cancel</span></Button>
|
|
154
|
+
<Button asChild variant="primary-filled" size="default"><span>Continue</span></Button>
|
|
155
|
+
</DialogFooter>
|
|
156
|
+
</section>
|
|
157
|
+
</Dialog>`
|
|
158
|
+
return `${icon ? `import { ${icon} } from 'lucide-react'\n` : ''}${footer === 'checkbox' ? "import { CheckboxField } from '@open-mercato/ui/primitives/checkbox-field'\n" : ''}${footer === 'toggle' ? "import { SwitchField } from '@open-mercato/ui/primitives/switch-field'\n" : ''}${footer === 'stepper' ? "import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'\n" : ''}import { Button } from '@open-mercato/ui/primitives/button'
|
|
159
|
+
import { ${kind}, ${kind}Trigger, ${kind}Content, ${kind}Header, ${kind}Title, ${kind}Description, ${kind}Footer, ${kind}Close, DrawerBody } from '@open-mercato/ui/primitives/${kind.toLowerCase()}'
|
|
160
|
+
|
|
161
|
+
<${kind}>
|
|
162
|
+
<${kind}Trigger asChild><Button variant="outline">Open ${kind.toLowerCase()}</Button></${kind}Trigger>
|
|
163
|
+
<${kind}Content>
|
|
164
|
+
<${kind}Header${example.compact ? ' compact' : ''}${icon ? ` leading={<${icon} className="${example.compact || example.status ? 'size-6' : 'size-5'}" />}` : ''}>
|
|
165
|
+
<${kind}Title className="${example.status ? 'text-base font-medium leading-6 tracking-normal' : 'text-sm font-medium leading-5 tracking-normal'}">Workspace settings</${kind}Title>
|
|
166
|
+
<${kind}Description${example.compact ? ' className="sr-only"' : ''}>Choose how these changes apply to your workspace.</${kind}Description>
|
|
167
|
+
</${kind}Header>
|
|
168
|
+
<DrawerBody><p className="py-6 text-sm text-muted-foreground">Review your settings before continuing.</p></DrawerBody>
|
|
169
|
+
<${kind}Footer layout="${footer === 'equal' ? 'equal' : 'default'}"${leading ? ` leading={${leading}}` : ''} className="flex-wrap [&_[data-slot=drawer-footer-trailing]]:ml-auto">
|
|
170
|
+
<${kind}Close asChild><Button variant="outline">Cancel</Button></${kind}Close>
|
|
171
|
+
<${kind}Close asChild><Button variant="primary-filled">Continue</Button></${kind}Close>
|
|
172
|
+
</${kind}Footer>
|
|
173
|
+
</${kind}Content>
|
|
174
|
+
</${kind}>`
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Figma names the edge containing the arrow; Radix names the content's side
|
|
178
|
+
// relative to the trigger, so a source "Top" arrow uses side="bottom".
|
|
179
|
+
const overlayPlacements: { label: string; side: 'top' | 'bottom' | 'left' | 'right'; align: 'start' | 'center' | 'end' }[] = [
|
|
180
|
+
{ label: 'Top left', side: 'bottom', align: 'start' },
|
|
181
|
+
{ label: 'Top center', side: 'bottom', align: 'center' },
|
|
182
|
+
{ label: 'Top right', side: 'bottom', align: 'end' },
|
|
183
|
+
{ label: 'Bottom left', side: 'top', align: 'start' },
|
|
184
|
+
{ label: 'Bottom center', side: 'top', align: 'center' },
|
|
185
|
+
{ label: 'Bottom right', side: 'top', align: 'end' },
|
|
186
|
+
{ label: 'Left', side: 'right', align: 'center' },
|
|
187
|
+
{ label: 'Right', side: 'left', align: 'center' },
|
|
188
|
+
{ label: 'Left top', side: 'right', align: 'start' },
|
|
189
|
+
{ label: 'Left bottom', side: 'right', align: 'end' },
|
|
190
|
+
{ label: 'Right top', side: 'left', align: 'start' },
|
|
191
|
+
{ label: 'Right bottom', side: 'left', align: 'end' },
|
|
192
|
+
]
|
|
193
|
+
|
|
194
|
+
function TooltipPlacements({ size, variant }: { size: 'sm' | 'default' | 'lg'; variant: 'dark' | 'light' }) {
|
|
195
|
+
const t = useT()
|
|
196
|
+
return <div className="grid w-full grid-cols-2 gap-3 sm:grid-cols-4">{overlayPlacements.slice(0, 8).map(({ label, side, align }) => size === 'lg' ? (
|
|
197
|
+
<TooltipCard key={label} title={t('design_system.gallery.samples.overlay.tooltip')} description={t('design_system.gallery.samples.overlay.description')} leading={<Globe className="size-5" />} variant={variant} side={side} align={align}>
|
|
198
|
+
<Button variant="outline" size="sm" className="justify-self-center">{label}</Button>
|
|
199
|
+
</TooltipCard>
|
|
200
|
+
) : (
|
|
201
|
+
<SimpleTooltip key={label} content={t('design_system.gallery.samples.overlay.tooltip')} size={size} variant={variant} side={side} align={align} delayDuration={0}>
|
|
202
|
+
<Button variant="outline" size="sm" className="justify-self-center">{label}</Button>
|
|
203
|
+
</SimpleTooltip>
|
|
204
|
+
))}</div>
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function tooltipPlacementCode({ size, variant }: { size: 'sm' | 'default' | 'lg'; variant: 'dark' | 'light' }) {
|
|
208
|
+
const component = size === 'lg' ? 'TooltipCard' : 'SimpleTooltip'
|
|
209
|
+
return `import { ${component} } from '@open-mercato/ui/primitives/tooltip'
|
|
210
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
211
|
+
${size === 'lg' ? "import { Globe } from 'lucide-react'\n" : ''}
|
|
212
|
+
// Figma's arrow edge is opposite Radix's content side. Collision handling stays enabled.
|
|
213
|
+
<div className="grid w-full grid-cols-2 gap-3 sm:grid-cols-4">
|
|
214
|
+
${overlayPlacements.slice(0, 8).map(({label,side,align}) => ` <${component} ${size === 'lg' ? 'title="Workspace settings" description="Choose how these changes apply to your workspace." leading={<Globe className="size-5" />}' : `content="Workspace settings" size="${size}"`} variant="${variant}" side="${side}" align="${align}"${size === 'lg' ? '' : ' delayDuration={0}'}>
|
|
215
|
+
<Button variant="outline" size="sm" className="justify-self-center">${label}</Button>
|
|
216
|
+
</${component}>`).join('\n')}
|
|
217
|
+
</div>`
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function PopoverExample({ placements = false, footer = 'equal' }: { placements?: boolean; footer?: 'equal' | 'stepper' | 'text' }) {
|
|
221
|
+
const t = useT()
|
|
222
|
+
const [step, setStep] = React.useState(0)
|
|
223
|
+
const options = placements ? overlayPlacements : [overlayPlacements[0]]
|
|
224
|
+
return <div className="grid w-full grid-cols-2 gap-3 sm:grid-cols-4">{options.map(({ label, side, align }) => (
|
|
225
|
+
<Popover key={label}>
|
|
226
|
+
<PopoverTrigger asChild><Button variant="outline" size="sm" className="justify-self-center">{placements ? label : t('design_system.gallery.samples.overlay.openPopover')}</Button></PopoverTrigger>
|
|
227
|
+
<PopoverContent side={side} align={align} sideOffset={6} role="dialog" aria-label={t('design_system.gallery.samples.overlay.title')} className="w-[312px] max-w-[calc(100vw-24px)] min-w-0 overflow-visible rounded-xl">
|
|
228
|
+
<div className="space-y-1 p-5 pb-0"><p className="text-sm font-medium">{t('design_system.gallery.samples.overlay.title')}</p><p className="text-sm text-muted-foreground">{t('design_system.gallery.samples.overlay.description')}</p></div>
|
|
229
|
+
<div className="flex flex-wrap items-center gap-3 px-5 py-4">
|
|
230
|
+
{footer === 'stepper' ? <StepperDots count={3} activeStep={step} size="sm" aria-label={t('design_system.gallery.samples.overlay.steps')} /> : null}
|
|
231
|
+
{footer === 'text' ? <span className="text-xs text-muted-foreground">{step + 1} / 3</span> : null}
|
|
232
|
+
<div className={footer === 'equal' ? 'flex w-full gap-3 [&>*]:flex-1' : 'ml-auto flex gap-3'}>
|
|
233
|
+
<Button variant="outline" size="sm" disabled={step === 0} onClick={() => setStep(previous => Math.max(0, previous - 1))}>{t('design_system.gallery.samples.overlay.back')}</Button>
|
|
234
|
+
{step === 2 ? <PopoverClose asChild><Button variant="primary-filled" size="sm">{t('design_system.gallery.samples.overlay.done')}</Button></PopoverClose> : <Button variant="primary-filled" size="sm" onClick={() => setStep(previous => Math.min(2, previous + 1))}>{t('design_system.gallery.samples.overlay.next')}</Button>}
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
<PopoverArrow />
|
|
238
|
+
</PopoverContent>
|
|
239
|
+
</Popover>
|
|
240
|
+
))}</div>
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function popoverExampleCode(footer: 'equal' | 'stepper' | 'text') {
|
|
244
|
+
return `import * as React from 'react'
|
|
245
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
246
|
+
import { Popover, PopoverTrigger, PopoverContent, PopoverArrow, PopoverClose } from '@open-mercato/ui/primitives/popover'
|
|
247
|
+
${footer === 'stepper' ? "import { StepperDots } from '@open-mercato/ui/primitives/step-indicator'\n" : ''}
|
|
248
|
+
function Example() {
|
|
249
|
+
const [step, setStep] = React.useState(0)
|
|
250
|
+
return <Popover>
|
|
251
|
+
<PopoverTrigger asChild><Button variant="outline">Open popover</Button></PopoverTrigger>
|
|
252
|
+
<PopoverContent side="bottom" align="start" sideOffset={6} role="dialog" aria-label="Workspace settings" className="w-[312px] max-w-[calc(100vw-24px)] min-w-0 rounded-xl">
|
|
253
|
+
<div className="space-y-1 p-5 pb-0"><p className="text-sm font-medium">Workspace settings</p><p className="text-sm text-muted-foreground">Choose how these changes apply to your workspace.</p></div>
|
|
254
|
+
<div className="flex flex-wrap items-center gap-3 px-5 py-4">
|
|
255
|
+
${footer === 'stepper' ? '<StepperDots count={3} activeStep={step} size="sm" aria-label="Progress" />' : footer === 'text' ? '<span className="text-xs text-muted-foreground">{step + 1} / 3</span>' : ''}
|
|
256
|
+
<div className="${footer === 'equal' ? 'flex w-full gap-3 [&>*]:flex-1' : 'ml-auto flex gap-3'}">
|
|
257
|
+
<Button variant="outline" size="sm" disabled={step === 0} onClick={() => setStep(value => value - 1)}>Back</Button>
|
|
258
|
+
{step === 2 ? <PopoverClose asChild><Button variant="primary-filled" size="sm">Done</Button></PopoverClose> : <Button variant="primary-filled" size="sm" onClick={() => setStep(value => value + 1)}>Next</Button>}
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
<PopoverArrow />
|
|
262
|
+
</PopoverContent>
|
|
263
|
+
</Popover>
|
|
264
|
+
}`
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const dialogExamples: OverlayExample[] = [
|
|
268
|
+
{
|
|
269
|
+
"id": "header-small-basic",
|
|
270
|
+
"title": "Header / small / basic",
|
|
271
|
+
"header": "basic",
|
|
272
|
+
"compact": true
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"id": "header-small-default",
|
|
276
|
+
"title": "Header / small / default",
|
|
277
|
+
"header": "default",
|
|
278
|
+
"compact": true
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"id": "header-small-error",
|
|
282
|
+
"title": "Header / small / error",
|
|
283
|
+
"header": "error",
|
|
284
|
+
"compact": true
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"id": "header-small-warning",
|
|
288
|
+
"title": "Header / small / warning",
|
|
289
|
+
"header": "warning",
|
|
290
|
+
"compact": true
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "header-small-success",
|
|
294
|
+
"title": "Header / small / success",
|
|
295
|
+
"header": "success",
|
|
296
|
+
"compact": true
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"id": "header-small-info",
|
|
300
|
+
"title": "Header / small / info",
|
|
301
|
+
"header": "info",
|
|
302
|
+
"compact": true
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "header-medium-basic",
|
|
306
|
+
"title": "Header / medium / basic",
|
|
307
|
+
"header": "basic",
|
|
308
|
+
"compact": false
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"id": "header-medium-default",
|
|
312
|
+
"title": "Header / medium / default",
|
|
313
|
+
"header": "default",
|
|
314
|
+
"compact": false
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"id": "header-medium-error",
|
|
318
|
+
"title": "Header / medium / error",
|
|
319
|
+
"header": "error",
|
|
320
|
+
"compact": false
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"id": "header-medium-warning",
|
|
324
|
+
"title": "Header / medium / warning",
|
|
325
|
+
"header": "warning",
|
|
326
|
+
"compact": false
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"id": "header-medium-success",
|
|
330
|
+
"title": "Header / medium / success",
|
|
331
|
+
"header": "success",
|
|
332
|
+
"compact": false
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"id": "header-medium-info",
|
|
336
|
+
"title": "Header / medium / info",
|
|
337
|
+
"header": "info",
|
|
338
|
+
"compact": false
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "footer-basic",
|
|
342
|
+
"title": "Footer / basic",
|
|
343
|
+
"footer": "basic"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"id": "footer-equal",
|
|
347
|
+
"title": "Footer / equal",
|
|
348
|
+
"footer": "equal"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"id": "footer-checkbox",
|
|
352
|
+
"title": "Footer / checkbox",
|
|
353
|
+
"footer": "checkbox"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"id": "footer-information",
|
|
357
|
+
"title": "Footer / information",
|
|
358
|
+
"footer": "information"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"id": "footer-toggle",
|
|
362
|
+
"title": "Footer / toggle",
|
|
363
|
+
"footer": "toggle"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"id": "footer-stepper",
|
|
367
|
+
"title": "Footer / stepper",
|
|
368
|
+
"footer": "stepper"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"id": "footer-link",
|
|
372
|
+
"title": "Footer / link",
|
|
373
|
+
"footer": "link"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"id": "status-horizontal-error",
|
|
377
|
+
"title": "Status / horizontal / error",
|
|
378
|
+
"header": "error",
|
|
379
|
+
"alignment": "horizontal",
|
|
380
|
+
"status": true,
|
|
381
|
+
"footer": "checkbox"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"id": "status-horizontal-warning",
|
|
385
|
+
"title": "Status / horizontal / warning",
|
|
386
|
+
"header": "warning",
|
|
387
|
+
"alignment": "horizontal",
|
|
388
|
+
"status": true,
|
|
389
|
+
"footer": "checkbox"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"id": "status-horizontal-success",
|
|
393
|
+
"title": "Status / horizontal / success",
|
|
394
|
+
"header": "success",
|
|
395
|
+
"alignment": "horizontal",
|
|
396
|
+
"status": true,
|
|
397
|
+
"footer": "checkbox"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"id": "status-horizontal-info",
|
|
401
|
+
"title": "Status / horizontal / info",
|
|
402
|
+
"header": "info",
|
|
403
|
+
"alignment": "horizontal",
|
|
404
|
+
"status": true,
|
|
405
|
+
"footer": "checkbox"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"id": "status-vertical-error",
|
|
409
|
+
"title": "Status / vertical / error",
|
|
410
|
+
"header": "error",
|
|
411
|
+
"alignment": "vertical",
|
|
412
|
+
"status": true,
|
|
413
|
+
"footer": "checkbox"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"id": "status-vertical-warning",
|
|
417
|
+
"title": "Status / vertical / warning",
|
|
418
|
+
"header": "warning",
|
|
419
|
+
"alignment": "vertical",
|
|
420
|
+
"status": true,
|
|
421
|
+
"footer": "checkbox"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"id": "status-vertical-success",
|
|
425
|
+
"title": "Status / vertical / success",
|
|
426
|
+
"header": "success",
|
|
427
|
+
"alignment": "vertical",
|
|
428
|
+
"status": true,
|
|
429
|
+
"footer": "checkbox"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"id": "status-vertical-info",
|
|
433
|
+
"title": "Status / vertical / info",
|
|
434
|
+
"header": "info",
|
|
435
|
+
"alignment": "vertical",
|
|
436
|
+
"status": true,
|
|
437
|
+
"footer": "checkbox"
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
|
|
441
|
+
const drawerExamples: OverlayExample[] = [
|
|
442
|
+
{
|
|
443
|
+
"id": "header-small-basic",
|
|
444
|
+
"title": "Header / small / basic",
|
|
445
|
+
"header": "basic",
|
|
446
|
+
"compact": true
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"id": "header-small-default",
|
|
450
|
+
"title": "Header / small / default",
|
|
451
|
+
"header": "default",
|
|
452
|
+
"compact": true
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"id": "header-large-basic",
|
|
456
|
+
"title": "Header / large / basic",
|
|
457
|
+
"header": "basic",
|
|
458
|
+
"compact": false
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"id": "header-large-default",
|
|
462
|
+
"title": "Header / large / default",
|
|
463
|
+
"header": "default",
|
|
464
|
+
"compact": false
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"id": "footer-equal",
|
|
468
|
+
"title": "Footer / equal",
|
|
469
|
+
"footer": "equal"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"id": "footer-basic",
|
|
473
|
+
"title": "Footer / basic",
|
|
474
|
+
"footer": "basic"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"id": "footer-checkbox",
|
|
478
|
+
"title": "Footer / checkbox",
|
|
479
|
+
"footer": "checkbox"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"id": "footer-toggle",
|
|
483
|
+
"title": "Footer / toggle",
|
|
484
|
+
"footer": "toggle"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"id": "footer-stepper",
|
|
488
|
+
"title": "Footer / stepper",
|
|
489
|
+
"footer": "stepper"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"id": "footer-link",
|
|
493
|
+
"title": "Footer / link",
|
|
494
|
+
"footer": "link"
|
|
495
|
+
}
|
|
496
|
+
]
|
|
70
497
|
|
|
71
498
|
const dialogEntry: GalleryEntry = {
|
|
72
499
|
id: 'dialog',
|
|
500
|
+
figmaNodeId: '466:4778',
|
|
73
501
|
title: 'Dialog',
|
|
74
502
|
importPath: '@open-mercato/ui/primitives/dialog',
|
|
75
503
|
docsAnchor: '#dialog',
|
|
76
504
|
variants: [
|
|
505
|
+
...dialogExamples.map(example => ({
|
|
506
|
+
id: example.id,
|
|
507
|
+
title: example.title,
|
|
508
|
+
render: () => <DialogExample {...example} />,
|
|
509
|
+
code: overlayExampleCode('Dialog', example),
|
|
510
|
+
})),
|
|
77
511
|
{
|
|
78
512
|
id: 'default',
|
|
79
513
|
title: 'default',
|
|
80
|
-
render: () =>
|
|
81
|
-
<Dialog>
|
|
82
|
-
<DialogTrigger asChild>
|
|
83
|
-
<Button variant="outline">Open dialog</Button>
|
|
84
|
-
</DialogTrigger>
|
|
85
|
-
<DialogContent>
|
|
86
|
-
<DialogHeader>
|
|
87
|
-
<DialogTitle>Rename view</DialogTitle>
|
|
88
|
-
<DialogDescription>
|
|
89
|
-
The new name is visible to everyone in this workspace.
|
|
90
|
-
</DialogDescription>
|
|
91
|
-
</DialogHeader>
|
|
92
|
-
<p className="text-sm text-muted-foreground">
|
|
93
|
-
Press Escape or click outside to dismiss.
|
|
94
|
-
</p>
|
|
95
|
-
<DialogFooter>
|
|
96
|
-
<DialogClose asChild>
|
|
97
|
-
<Button variant="outline">Cancel</Button>
|
|
98
|
-
</DialogClose>
|
|
99
|
-
<Button>Save changes</Button>
|
|
100
|
-
</DialogFooter>
|
|
101
|
-
</DialogContent>
|
|
102
|
-
</Dialog>
|
|
103
|
-
),
|
|
514
|
+
render: () => <DialogOverlaysDefaultSample />,
|
|
104
515
|
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
105
516
|
import {
|
|
106
517
|
Dialog,
|
|
@@ -136,27 +547,7 @@ import {
|
|
|
136
547
|
{
|
|
137
548
|
id: 'status-leading',
|
|
138
549
|
title: 'Status leading badge',
|
|
139
|
-
render: () =>
|
|
140
|
-
<Dialog>
|
|
141
|
-
<DialogTrigger asChild>
|
|
142
|
-
<Button variant="destructive-outline">Delete record</Button>
|
|
143
|
-
</DialogTrigger>
|
|
144
|
-
<DialogContent size="sm">
|
|
145
|
-
<DialogHeader leading={<TriangleAlert className="size-4" />} leadingTone="error">
|
|
146
|
-
<DialogTitle>Delete this record?</DialogTitle>
|
|
147
|
-
<DialogDescription>
|
|
148
|
-
This removes the record from every linked view.
|
|
149
|
-
</DialogDescription>
|
|
150
|
-
</DialogHeader>
|
|
151
|
-
<DialogFooter layout="equal">
|
|
152
|
-
<DialogClose asChild>
|
|
153
|
-
<Button variant="outline">Cancel</Button>
|
|
154
|
-
</DialogClose>
|
|
155
|
-
<Button variant="destructive-solid">Delete</Button>
|
|
156
|
-
</DialogFooter>
|
|
157
|
-
</DialogContent>
|
|
158
|
-
</Dialog>
|
|
159
|
-
),
|
|
550
|
+
render: () => <DialogOverlaysStatusLeadingSample />,
|
|
160
551
|
code: `import { TriangleAlert } from 'lucide-react'
|
|
161
552
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
162
553
|
import {
|
|
@@ -200,44 +591,16 @@ const drawerEntry: GalleryEntry = {
|
|
|
200
591
|
docsAnchor: '#drawer',
|
|
201
592
|
figmaNodeId: '486:7366',
|
|
202
593
|
variants: [
|
|
594
|
+
...drawerExamples.map(example => ({
|
|
595
|
+
id: example.id,
|
|
596
|
+
title: example.title,
|
|
597
|
+
render: () => <DrawerExample {...example} />,
|
|
598
|
+
code: overlayExampleCode('Drawer', example),
|
|
599
|
+
})),
|
|
203
600
|
{
|
|
204
601
|
id: 'default',
|
|
205
602
|
title: 'default',
|
|
206
|
-
render: () =>
|
|
207
|
-
<Drawer>
|
|
208
|
-
<DrawerTrigger asChild>
|
|
209
|
-
<Button variant="outline">Open drawer</Button>
|
|
210
|
-
</DrawerTrigger>
|
|
211
|
-
<DrawerContent>
|
|
212
|
-
<DrawerHeader>
|
|
213
|
-
<DrawerTitle>Edit person</DrawerTitle>
|
|
214
|
-
<DrawerDescription>Update the contact details below.</DrawerDescription>
|
|
215
|
-
</DrawerHeader>
|
|
216
|
-
<DrawerBody>
|
|
217
|
-
<div className="divide-y divide-input text-sm">
|
|
218
|
-
<div className="flex items-center justify-between py-3">
|
|
219
|
-
<span className="text-muted-foreground">Name</span>
|
|
220
|
-
<span className="text-foreground">Anna Kowalska</span>
|
|
221
|
-
</div>
|
|
222
|
-
<div className="flex items-center justify-between py-3">
|
|
223
|
-
<span className="text-muted-foreground">Role</span>
|
|
224
|
-
<span className="text-foreground">Account manager</span>
|
|
225
|
-
</div>
|
|
226
|
-
<div className="flex items-center justify-between py-3">
|
|
227
|
-
<span className="text-muted-foreground">Team</span>
|
|
228
|
-
<span className="text-foreground">Sales EU</span>
|
|
229
|
-
</div>
|
|
230
|
-
</div>
|
|
231
|
-
</DrawerBody>
|
|
232
|
-
<DrawerFooter layout="equal">
|
|
233
|
-
<DrawerClose asChild>
|
|
234
|
-
<Button variant="outline">Cancel</Button>
|
|
235
|
-
</DrawerClose>
|
|
236
|
-
<Button>Save changes</Button>
|
|
237
|
-
</DrawerFooter>
|
|
238
|
-
</DrawerContent>
|
|
239
|
-
</Drawer>
|
|
240
|
-
),
|
|
603
|
+
render: () => <DrawerOverlaysDefaultSample />,
|
|
241
604
|
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
242
605
|
import {
|
|
243
606
|
Drawer,
|
|
@@ -273,30 +636,7 @@ import {
|
|
|
273
636
|
{
|
|
274
637
|
id: 'leading-icon',
|
|
275
638
|
title: 'Header leading icon',
|
|
276
|
-
render: () =>
|
|
277
|
-
<Drawer>
|
|
278
|
-
<DrawerTrigger asChild>
|
|
279
|
-
<Button variant="outline">Open profile drawer</Button>
|
|
280
|
-
</DrawerTrigger>
|
|
281
|
-
<DrawerContent>
|
|
282
|
-
<DrawerHeader leading={<UserRound className="size-4" />}>
|
|
283
|
-
<DrawerTitle>Profile details</DrawerTitle>
|
|
284
|
-
<DrawerDescription>Read-only summary of this account.</DrawerDescription>
|
|
285
|
-
</DrawerHeader>
|
|
286
|
-
<DrawerBody>
|
|
287
|
-
<p className="text-sm text-muted-foreground">
|
|
288
|
-
The header badge takes any Lucide icon via the <code>leading</code> prop.
|
|
289
|
-
</p>
|
|
290
|
-
</DrawerBody>
|
|
291
|
-
<DrawerFooter layout="equal">
|
|
292
|
-
<DrawerClose asChild>
|
|
293
|
-
<Button variant="outline">Cancel</Button>
|
|
294
|
-
</DrawerClose>
|
|
295
|
-
<Button>Continue</Button>
|
|
296
|
-
</DrawerFooter>
|
|
297
|
-
</DrawerContent>
|
|
298
|
-
</Drawer>
|
|
299
|
-
),
|
|
639
|
+
render: () => <DrawerOverlaysLeadingIconSample />,
|
|
300
640
|
code: `import { UserRound } from 'lucide-react'
|
|
301
641
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
302
642
|
import {
|
|
@@ -341,26 +681,7 @@ const sheetEntry: GalleryEntry = {
|
|
|
341
681
|
{
|
|
342
682
|
id: 'right',
|
|
343
683
|
title: 'right (default)',
|
|
344
|
-
render: () =>
|
|
345
|
-
<Sheet>
|
|
346
|
-
<SheetTrigger asChild>
|
|
347
|
-
<Button variant="outline">Open sheet</Button>
|
|
348
|
-
</SheetTrigger>
|
|
349
|
-
<SheetContent>
|
|
350
|
-
<SheetHeader>
|
|
351
|
-
<SheetTitle>Filters</SheetTitle>
|
|
352
|
-
<SheetDescription>Narrow down the current list.</SheetDescription>
|
|
353
|
-
</SheetHeader>
|
|
354
|
-
<div className="flex-1 px-4 text-sm text-muted-foreground">
|
|
355
|
-
Sheet body content scrolls independently of the header and footer.
|
|
356
|
-
</div>
|
|
357
|
-
<SheetFooter>
|
|
358
|
-
<Button variant="outline">Reset</Button>
|
|
359
|
-
<Button>Apply</Button>
|
|
360
|
-
</SheetFooter>
|
|
361
|
-
</SheetContent>
|
|
362
|
-
</Sheet>
|
|
363
|
-
),
|
|
684
|
+
render: () => <SheetOverlaysRightSample />,
|
|
364
685
|
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
365
686
|
import {
|
|
366
687
|
Sheet,
|
|
@@ -392,22 +713,7 @@ import {
|
|
|
392
713
|
{
|
|
393
714
|
id: 'left',
|
|
394
715
|
title: 'side="left"',
|
|
395
|
-
render: () =>
|
|
396
|
-
<Sheet>
|
|
397
|
-
<SheetTrigger asChild>
|
|
398
|
-
<Button variant="outline">Open left sheet</Button>
|
|
399
|
-
</SheetTrigger>
|
|
400
|
-
<SheetContent side="left">
|
|
401
|
-
<SheetHeader>
|
|
402
|
-
<SheetTitle>Navigation</SheetTitle>
|
|
403
|
-
<SheetDescription>Slides in from the left edge.</SheetDescription>
|
|
404
|
-
</SheetHeader>
|
|
405
|
-
<div className="flex-1 px-4 text-sm text-muted-foreground">
|
|
406
|
-
Use the left side for mobile menus and secondary navigation.
|
|
407
|
-
</div>
|
|
408
|
-
</SheetContent>
|
|
409
|
-
</Sheet>
|
|
410
|
-
),
|
|
716
|
+
render: () => <SheetOverlaysLeftSample />,
|
|
411
717
|
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
412
718
|
import {
|
|
413
719
|
Sheet,
|
|
@@ -436,27 +742,18 @@ import {
|
|
|
436
742
|
|
|
437
743
|
const popoverEntry: GalleryEntry = {
|
|
438
744
|
id: 'popover',
|
|
745
|
+
figmaNodeId: '4431:81573',
|
|
439
746
|
title: 'Popover',
|
|
440
747
|
importPath: '@open-mercato/ui/primitives/popover',
|
|
441
748
|
variants: [
|
|
749
|
+
{ id: 'positions', title: '12 arrow positions', render: () => <PopoverExample placements />, code: popoverExampleCode('equal') + '\n\n// Source arrow edge → content side / alignment\n' + overlayPlacements.map(item => `// ${item.label} → side="${item.side}" align="${item.align}"`).join('\n') },
|
|
750
|
+
{ id: 'footer-equal', title: 'Footer / equal', render: () => <PopoverExample footer="equal" />, code: popoverExampleCode('equal') },
|
|
751
|
+
{ id: 'footer-text', title: 'Footer / text', render: () => <PopoverExample footer="text" />, code: popoverExampleCode('text') },
|
|
752
|
+
{ id: 'footer-stepper', title: 'Footer / stepper', render: () => <PopoverExample footer="stepper" />, code: popoverExampleCode('stepper') },
|
|
442
753
|
{
|
|
443
754
|
id: 'default',
|
|
444
755
|
title: 'default',
|
|
445
|
-
render: () =>
|
|
446
|
-
<Popover>
|
|
447
|
-
<PopoverTrigger asChild>
|
|
448
|
-
<Button variant="outline">Open popover</Button>
|
|
449
|
-
</PopoverTrigger>
|
|
450
|
-
<PopoverContent className="p-4">
|
|
451
|
-
<div className="flex flex-col gap-1">
|
|
452
|
-
<span className="text-sm font-medium text-foreground">Display density</span>
|
|
453
|
-
<span className="text-sm text-muted-foreground">
|
|
454
|
-
Anchored to its trigger; Escape and outside-click dismiss it.
|
|
455
|
-
</span>
|
|
456
|
-
</div>
|
|
457
|
-
</PopoverContent>
|
|
458
|
-
</Popover>
|
|
459
|
-
),
|
|
756
|
+
render: () => <PopoverOverlaysDefaultSample />,
|
|
460
757
|
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
461
758
|
import {
|
|
462
759
|
Popover,
|
|
@@ -476,18 +773,7 @@ import {
|
|
|
476
773
|
{
|
|
477
774
|
id: 'align-end',
|
|
478
775
|
title: 'align="end" + side="top"',
|
|
479
|
-
render: () =>
|
|
480
|
-
<Popover>
|
|
481
|
-
<PopoverTrigger asChild>
|
|
482
|
-
<Button variant="outline">Open above</Button>
|
|
483
|
-
</PopoverTrigger>
|
|
484
|
-
<PopoverContent side="top" align="end" className="p-4">
|
|
485
|
-
<span className="text-sm text-muted-foreground">
|
|
486
|
-
Placement follows Radix side/align props and flips when space runs out.
|
|
487
|
-
</span>
|
|
488
|
-
</PopoverContent>
|
|
489
|
-
</Popover>
|
|
490
|
-
),
|
|
776
|
+
render: () => <PopoverOverlaysAlignEndSample />,
|
|
491
777
|
code: `import { Button } from '@open-mercato/ui/primitives/button'
|
|
492
778
|
import {
|
|
493
779
|
Popover,
|
|
@@ -509,19 +795,22 @@ import {
|
|
|
509
795
|
|
|
510
796
|
const tooltipEntry: GalleryEntry = {
|
|
511
797
|
id: 'tooltip',
|
|
798
|
+
figmaNodeId: '2604:269',
|
|
512
799
|
title: 'Tooltip',
|
|
513
800
|
importPath: '@open-mercato/ui/primitives/tooltip',
|
|
514
801
|
docsAnchor: '#tooltip--simpletooltip',
|
|
515
802
|
variants: [
|
|
803
|
+
{ id: 'positions-sm-light', title: '8 positions / sm / light', render: () => <TooltipPlacements size="sm" variant="light" />, code: tooltipPlacementCode({ size: 'sm', variant: 'light' }) },
|
|
804
|
+
{ id: 'positions-sm-dark', title: '8 positions / sm / dark', render: () => <TooltipPlacements size="sm" variant="dark" />, code: tooltipPlacementCode({ size: 'sm', variant: 'dark' }) },
|
|
805
|
+
{ id: 'positions-default-light', title: '8 positions / default / light', render: () => <TooltipPlacements size="default" variant="light" />, code: tooltipPlacementCode({ size: 'default', variant: 'light' }) },
|
|
806
|
+
{ id: 'positions-default-dark', title: '8 positions / default / dark', render: () => <TooltipPlacements size="default" variant="dark" />, code: tooltipPlacementCode({ size: 'default', variant: 'dark' }) },
|
|
807
|
+
{ id: 'positions-lg-light', title: '8 positions / lg / light', render: () => <TooltipPlacements size="lg" variant="light" />, code: tooltipPlacementCode({ size: 'lg', variant: 'light' }) },
|
|
808
|
+
{ id: 'positions-lg-dark', title: '8 positions / lg / dark', render: () => <TooltipPlacements size="lg" variant="dark" />, code: tooltipPlacementCode({ size: 'lg', variant: 'dark' }) },
|
|
516
809
|
{
|
|
517
810
|
id: 'default',
|
|
518
811
|
title: 'default (dark)',
|
|
519
|
-
render: () =>
|
|
520
|
-
|
|
521
|
-
<Button variant="outline">Hover me</Button>
|
|
522
|
-
</SimpleTooltip>
|
|
523
|
-
),
|
|
524
|
-
code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
|
|
812
|
+
render: () => <TooltipOverlaysDefaultSample />,
|
|
813
|
+
code: `import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
|
|
525
814
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
526
815
|
|
|
527
816
|
<SimpleTooltip content="Duplicates this view with all filters">
|
|
@@ -531,16 +820,9 @@ import { Button } from '@open-mercato/ui/primitives/button'
|
|
|
531
820
|
{
|
|
532
821
|
id: 'light',
|
|
533
822
|
title: 'light',
|
|
534
|
-
render: () =>
|
|
535
|
-
<SimpleTooltip content="Help text on a light surface" variant="light">
|
|
536
|
-
<Button variant="outline">
|
|
537
|
-
<Info />
|
|
538
|
-
Light variant
|
|
539
|
-
</Button>
|
|
540
|
-
</SimpleTooltip>
|
|
541
|
-
),
|
|
823
|
+
render: () => <TooltipOverlaysLightSample />,
|
|
542
824
|
code: `import { Info } from 'lucide-react'
|
|
543
|
-
import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
|
|
825
|
+
import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
|
|
544
826
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
545
827
|
|
|
546
828
|
<SimpleTooltip content="Help text on a light surface" variant="light">
|
|
@@ -550,20 +832,8 @@ import { Button } from '@open-mercato/ui/primitives/button'
|
|
|
550
832
|
{
|
|
551
833
|
id: 'sizes',
|
|
552
834
|
title: 'Sizes',
|
|
553
|
-
render: () =>
|
|
554
|
-
|
|
555
|
-
<SimpleTooltip content="Small" size="sm">
|
|
556
|
-
<Button variant="outline" size="sm">sm</Button>
|
|
557
|
-
</SimpleTooltip>
|
|
558
|
-
<SimpleTooltip content="Default">
|
|
559
|
-
<Button variant="outline" size="sm">default</Button>
|
|
560
|
-
</SimpleTooltip>
|
|
561
|
-
<SimpleTooltip content="Large tooltip for longer helper copy" size="lg">
|
|
562
|
-
<Button variant="outline" size="sm">lg</Button>
|
|
563
|
-
</SimpleTooltip>
|
|
564
|
-
</>
|
|
565
|
-
),
|
|
566
|
-
code: `import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
|
|
835
|
+
render: () => <TooltipOverlaysSizesSample />,
|
|
836
|
+
code: `import { SimpleTooltip, TooltipCard } from '@open-mercato/ui/primitives/tooltip'
|
|
567
837
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
568
838
|
|
|
569
839
|
<SimpleTooltip content="Small" size="sm">
|
|
@@ -581,89 +851,20 @@ import { Button } from '@open-mercato/ui/primitives/button'
|
|
|
581
851
|
|
|
582
852
|
const commandMenuEntry: GalleryEntry = {
|
|
583
853
|
id: 'command-menu',
|
|
854
|
+
figmaNodeId: '4171:15653',
|
|
584
855
|
title: 'CommandMenu',
|
|
585
856
|
importPath: '@open-mercato/ui/primitives/command-menu',
|
|
586
857
|
docsAnchor: '#commandmenu',
|
|
858
|
+
usage: { do: [
|
|
859
|
+
'The source Small (48) label is inaccurate: all six small rows measure 40 px. The larger rows measure 64 px. Numeric sizes opt into these measurements; unsized rows keep the legacy layout.',
|
|
860
|
+
'Basic, Avatar, Left Icon, Brand, Company and Country use real source assets or production primitives. Keyboard selection updates the result and closes the palette.',
|
|
861
|
+
'Search and clear stay synchronized. Group captions and actions flow together without overlapping long headings; the footer includes real keyboard hints and a local help action.',
|
|
862
|
+
] },
|
|
587
863
|
variants: [
|
|
588
|
-
{
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
<CommandMenu>
|
|
593
|
-
<CommandMenuTrigger asChild>
|
|
594
|
-
<Button variant="outline">Open command menu</Button>
|
|
595
|
-
</CommandMenuTrigger>
|
|
596
|
-
<CommandMenuContent>
|
|
597
|
-
<CommandMenuInput placeholder="Search actions..." />
|
|
598
|
-
<CommandMenuList>
|
|
599
|
-
<CommandMenuEmpty>No results.</CommandMenuEmpty>
|
|
600
|
-
<CommandMenuGroup heading="Actions">
|
|
601
|
-
<CommandMenuItem leading={<FilePlus2 className="size-4 text-muted-foreground" />}>
|
|
602
|
-
Create record
|
|
603
|
-
</CommandMenuItem>
|
|
604
|
-
<CommandMenuItem leading={<Users className="size-4 text-muted-foreground" />} description="Invite teammates to this workspace">
|
|
605
|
-
Manage members
|
|
606
|
-
</CommandMenuItem>
|
|
607
|
-
</CommandMenuGroup>
|
|
608
|
-
<CommandMenuSeparator />
|
|
609
|
-
<CommandMenuGroup heading="Navigate">
|
|
610
|
-
<CommandMenuItem leading={<LayoutDashboard className="size-4 text-muted-foreground" />}>
|
|
611
|
-
Go to dashboard
|
|
612
|
-
</CommandMenuItem>
|
|
613
|
-
<CommandMenuItem leading={<Settings className="size-4 text-muted-foreground" />}>
|
|
614
|
-
Open settings
|
|
615
|
-
</CommandMenuItem>
|
|
616
|
-
</CommandMenuGroup>
|
|
617
|
-
</CommandMenuList>
|
|
618
|
-
<CommandMenuFooter />
|
|
619
|
-
</CommandMenuContent>
|
|
620
|
-
</CommandMenu>
|
|
621
|
-
),
|
|
622
|
-
code: `import { FilePlus2, LayoutDashboard, Settings, Users } from 'lucide-react'
|
|
623
|
-
import { Button } from '@open-mercato/ui/primitives/button'
|
|
624
|
-
import {
|
|
625
|
-
CommandMenu,
|
|
626
|
-
CommandMenuTrigger,
|
|
627
|
-
CommandMenuContent,
|
|
628
|
-
CommandMenuInput,
|
|
629
|
-
CommandMenuList,
|
|
630
|
-
CommandMenuEmpty,
|
|
631
|
-
CommandMenuGroup,
|
|
632
|
-
CommandMenuItem,
|
|
633
|
-
CommandMenuSeparator,
|
|
634
|
-
CommandMenuFooter,
|
|
635
|
-
} from '@open-mercato/ui/primitives/command-menu'
|
|
636
|
-
|
|
637
|
-
<CommandMenu>
|
|
638
|
-
<CommandMenuTrigger asChild>
|
|
639
|
-
<Button variant="outline">Open command menu</Button>
|
|
640
|
-
</CommandMenuTrigger>
|
|
641
|
-
<CommandMenuContent>
|
|
642
|
-
<CommandMenuInput placeholder="Search actions..." />
|
|
643
|
-
<CommandMenuList>
|
|
644
|
-
<CommandMenuEmpty>No results.</CommandMenuEmpty>
|
|
645
|
-
<CommandMenuGroup heading="Actions">
|
|
646
|
-
<CommandMenuItem leading={<FilePlus2 className="size-4" />}>
|
|
647
|
-
Create record
|
|
648
|
-
</CommandMenuItem>
|
|
649
|
-
<CommandMenuItem leading={<Users className="size-4" />} description="Invite teammates to this workspace">
|
|
650
|
-
Manage members
|
|
651
|
-
</CommandMenuItem>
|
|
652
|
-
</CommandMenuGroup>
|
|
653
|
-
<CommandMenuSeparator />
|
|
654
|
-
<CommandMenuGroup heading="Navigate">
|
|
655
|
-
<CommandMenuItem leading={<LayoutDashboard className="size-4" />}>
|
|
656
|
-
Go to dashboard
|
|
657
|
-
</CommandMenuItem>
|
|
658
|
-
<CommandMenuItem leading={<Settings className="size-4" />}>
|
|
659
|
-
Open settings
|
|
660
|
-
</CommandMenuItem>
|
|
661
|
-
</CommandMenuGroup>
|
|
662
|
-
</CommandMenuList>
|
|
663
|
-
<CommandMenuFooter />
|
|
664
|
-
</CommandMenuContent>
|
|
665
|
-
</CommandMenu>`,
|
|
666
|
-
},
|
|
864
|
+
{ id: 'default', title: 'All six types / 40 px', render: () => <CommandSourceExample />, code: commandSourceCode + '\n<CommandSourceExample size={40} />' },
|
|
865
|
+
{ id: 'medium', title: 'All six types / 64 px', render: () => <CommandSourceExample size={64} />, code: commandSourceCode + '\n<CommandSourceExample size={64} />' },
|
|
866
|
+
{ id: 'groups', title: 'Captions / action / separator / footer', render: () => <CommandSourceExample withGroups />, code: commandSourceCode + '\n<CommandSourceExample withGroups />' },
|
|
867
|
+
{ id: 'empty', title: 'No results / clear to recover', render: () => <CommandSourceExample empty />, code: commandSourceCode + '\n<CommandSourceExample empty />' },
|
|
667
868
|
],
|
|
668
869
|
}
|
|
669
870
|
|
|
@@ -675,3 +876,218 @@ export const entries: GalleryEntry[] = [
|
|
|
675
876
|
tooltipEntry,
|
|
676
877
|
commandMenuEntry,
|
|
677
878
|
]
|
|
879
|
+
|
|
880
|
+
function DialogOverlaysDefaultSample() {
|
|
881
|
+
const t = useT()
|
|
882
|
+
return (<Dialog>
|
|
883
|
+
<DialogTrigger asChild>
|
|
884
|
+
<Button variant="outline">{t('design_system.gallery.samples.overlay.openDialog')}</Button>
|
|
885
|
+
</DialogTrigger>
|
|
886
|
+
<DialogContent>
|
|
887
|
+
<DialogHeader>
|
|
888
|
+
<DialogTitle>{t('design_system.gallery.sampleCopy.renameView')}</DialogTitle>
|
|
889
|
+
<DialogDescription>
|
|
890
|
+
{t('design_system.gallery.sampleCopy.theNewNameIsVisibleToEveryoneInThisWorkspace')}
|
|
891
|
+
</DialogDescription>
|
|
892
|
+
</DialogHeader>
|
|
893
|
+
<p className="text-sm text-muted-foreground">
|
|
894
|
+
{t('design_system.gallery.sampleCopy.pressEscapeOrClickOutsideToDismiss')}
|
|
895
|
+
</p>
|
|
896
|
+
<DialogFooter>
|
|
897
|
+
<DialogClose asChild>
|
|
898
|
+
<Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
|
|
899
|
+
</DialogClose>
|
|
900
|
+
<Button>{t('design_system.gallery.samples.primaryAction')}</Button>
|
|
901
|
+
</DialogFooter>
|
|
902
|
+
</DialogContent>
|
|
903
|
+
</Dialog>)
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
function DialogOverlaysStatusLeadingSample() {
|
|
907
|
+
const t = useT()
|
|
908
|
+
return (<Dialog>
|
|
909
|
+
<DialogTrigger asChild>
|
|
910
|
+
<Button variant="destructive-outline">{t('design_system.gallery.sampleCopy.deleteRecord')}</Button>
|
|
911
|
+
</DialogTrigger>
|
|
912
|
+
<DialogContent size="sm">
|
|
913
|
+
<DialogHeader leading={<TriangleAlert className="size-4" />} leadingTone="error">
|
|
914
|
+
<DialogTitle>{t('design_system.gallery.sampleCopy.deleteThisRecord')}</DialogTitle>
|
|
915
|
+
<DialogDescription>
|
|
916
|
+
{t('design_system.gallery.sampleCopy.thisRemovesTheRecordFromEveryLinkedView')}
|
|
917
|
+
</DialogDescription>
|
|
918
|
+
</DialogHeader>
|
|
919
|
+
<DialogFooter layout="equal">
|
|
920
|
+
<DialogClose asChild>
|
|
921
|
+
<Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
|
|
922
|
+
</DialogClose>
|
|
923
|
+
<Button variant="destructive-solid">{t('design_system.gallery.sampleCopy.delete')}</Button>
|
|
924
|
+
</DialogFooter>
|
|
925
|
+
</DialogContent>
|
|
926
|
+
</Dialog>)
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
function DrawerOverlaysDefaultSample() {
|
|
930
|
+
const t = useT()
|
|
931
|
+
return (<Drawer>
|
|
932
|
+
<DrawerTrigger asChild>
|
|
933
|
+
<Button variant="outline">{t('design_system.gallery.samples.overlay.openDrawer')}</Button>
|
|
934
|
+
</DrawerTrigger>
|
|
935
|
+
<DrawerContent>
|
|
936
|
+
<DrawerHeader>
|
|
937
|
+
<DrawerTitle>{t('design_system.gallery.sampleCopy.editPerson')}</DrawerTitle>
|
|
938
|
+
<DrawerDescription>{t('design_system.gallery.sampleCopy.updateTheContactDetailsBelow')}</DrawerDescription>
|
|
939
|
+
</DrawerHeader>
|
|
940
|
+
<DrawerBody>
|
|
941
|
+
<div className="divide-y divide-input text-sm">
|
|
942
|
+
<div className="flex items-center justify-between py-3">
|
|
943
|
+
<span className="text-muted-foreground">{t('design_system.gallery.samples.textInput.basic')}</span>
|
|
944
|
+
<span className="text-foreground">Anna Kowalska</span>
|
|
945
|
+
</div>
|
|
946
|
+
<div className="flex items-center justify-between py-3">
|
|
947
|
+
<span className="text-muted-foreground">{t('design_system.gallery.sampleCopy.role')}</span>
|
|
948
|
+
<span className="text-foreground">{t('design_system.gallery.samples.table.description')}</span>
|
|
949
|
+
</div>
|
|
950
|
+
<div className="flex items-center justify-between py-3">
|
|
951
|
+
<span className="text-muted-foreground">{t('design_system.gallery.samples.hr.team')}</span>
|
|
952
|
+
<span className="text-foreground">{t('design_system.gallery.sampleCopy.salesEU')}</span>
|
|
953
|
+
</div>
|
|
954
|
+
</div>
|
|
955
|
+
</DrawerBody>
|
|
956
|
+
<DrawerFooter layout="equal">
|
|
957
|
+
<DrawerClose asChild>
|
|
958
|
+
<Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
|
|
959
|
+
</DrawerClose>
|
|
960
|
+
<Button>{t('design_system.gallery.samples.primaryAction')}</Button>
|
|
961
|
+
</DrawerFooter>
|
|
962
|
+
</DrawerContent>
|
|
963
|
+
</Drawer>)
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
function DrawerOverlaysLeadingIconSample() {
|
|
967
|
+
const t = useT()
|
|
968
|
+
return (<Drawer>
|
|
969
|
+
<DrawerTrigger asChild>
|
|
970
|
+
<Button variant="outline">{t('design_system.gallery.sampleCopy.openProfileDrawer')}</Button>
|
|
971
|
+
</DrawerTrigger>
|
|
972
|
+
<DrawerContent>
|
|
973
|
+
<DrawerHeader leading={<UserRound className="size-4" />}>
|
|
974
|
+
<DrawerTitle>{t('design_system.gallery.sampleCopy.profileDetails')}</DrawerTitle>
|
|
975
|
+
<DrawerDescription>{t('design_system.gallery.sampleCopy.readonlySummaryOfThisAccount')}</DrawerDescription>
|
|
976
|
+
</DrawerHeader>
|
|
977
|
+
<DrawerBody>
|
|
978
|
+
<p className="text-sm text-muted-foreground">
|
|
979
|
+
{t('design_system.gallery.sampleCopy.theHeaderBadgeTakesAnyLucideIconViaThe')} <code>leading</code> {t('design_system.gallery.sampleCopy.prop')}
|
|
980
|
+
</p>
|
|
981
|
+
</DrawerBody>
|
|
982
|
+
<DrawerFooter layout="equal">
|
|
983
|
+
<DrawerClose asChild>
|
|
984
|
+
<Button variant="outline">{t('design_system.gallery.samples.overlay.cancel')}</Button>
|
|
985
|
+
</DrawerClose>
|
|
986
|
+
<Button>{t('design_system.gallery.samples.overlay.continue')}</Button>
|
|
987
|
+
</DrawerFooter>
|
|
988
|
+
</DrawerContent>
|
|
989
|
+
</Drawer>)
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
function SheetOverlaysRightSample() {
|
|
993
|
+
const t = useT()
|
|
994
|
+
return (<Sheet>
|
|
995
|
+
<SheetTrigger asChild>
|
|
996
|
+
<Button variant="outline">{t('design_system.gallery.sampleCopy.openSheet')}</Button>
|
|
997
|
+
</SheetTrigger>
|
|
998
|
+
<SheetContent>
|
|
999
|
+
<SheetHeader>
|
|
1000
|
+
<SheetTitle>{t('design_system.families.filters')}</SheetTitle>
|
|
1001
|
+
<SheetDescription>{t('design_system.gallery.sampleCopy.narrowDownTheCurrentList')}</SheetDescription>
|
|
1002
|
+
</SheetHeader>
|
|
1003
|
+
<div className="flex-1 px-4 text-sm text-muted-foreground">
|
|
1004
|
+
{t('design_system.gallery.sampleCopy.sheetBodyContentScrollsIndependentlyOfTheHeaderAndFooter')}
|
|
1005
|
+
</div>
|
|
1006
|
+
<SheetFooter>
|
|
1007
|
+
<Button variant="outline">{t('design_system.gallery.sampleCopy.reset')}</Button>
|
|
1008
|
+
<Button>{t('design_system.gallery.examples.sourceFilters.apply')}</Button>
|
|
1009
|
+
</SheetFooter>
|
|
1010
|
+
</SheetContent>
|
|
1011
|
+
</Sheet>)
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
function SheetOverlaysLeftSample() {
|
|
1015
|
+
const t = useT()
|
|
1016
|
+
return (<Sheet>
|
|
1017
|
+
<SheetTrigger asChild>
|
|
1018
|
+
<Button variant="outline">{t('design_system.gallery.sampleCopy.openLeftSheet')}</Button>
|
|
1019
|
+
</SheetTrigger>
|
|
1020
|
+
<SheetContent side="left">
|
|
1021
|
+
<SheetHeader>
|
|
1022
|
+
<SheetTitle>{t('design_system.families.navigation')}</SheetTitle>
|
|
1023
|
+
<SheetDescription>{t('design_system.gallery.sampleCopy.slidesInFromTheLeftEdge')}</SheetDescription>
|
|
1024
|
+
</SheetHeader>
|
|
1025
|
+
<div className="flex-1 px-4 text-sm text-muted-foreground">
|
|
1026
|
+
{t('design_system.gallery.sampleCopy.useTheLeftSideForMobileMenusAndSecondaryNavigation')}
|
|
1027
|
+
</div>
|
|
1028
|
+
</SheetContent>
|
|
1029
|
+
</Sheet>)
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
function PopoverOverlaysDefaultSample() {
|
|
1033
|
+
const t = useT()
|
|
1034
|
+
return (<Popover>
|
|
1035
|
+
<PopoverTrigger asChild>
|
|
1036
|
+
<Button variant="outline">{t('design_system.gallery.samples.overlay.openPopover')}</Button>
|
|
1037
|
+
</PopoverTrigger>
|
|
1038
|
+
<PopoverContent className="p-4">
|
|
1039
|
+
<div className="flex flex-col gap-1">
|
|
1040
|
+
<span className="text-sm font-medium text-foreground">{t('design_system.gallery.sampleCopy.displayDensity')}</span>
|
|
1041
|
+
<span className="text-sm text-muted-foreground">
|
|
1042
|
+
{t('design_system.gallery.sampleCopy.anchoredToItsTriggerEscapeAndOutsideclickDismissIt')}
|
|
1043
|
+
</span>
|
|
1044
|
+
</div>
|
|
1045
|
+
</PopoverContent>
|
|
1046
|
+
</Popover>)
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
function PopoverOverlaysAlignEndSample() {
|
|
1050
|
+
const t = useT()
|
|
1051
|
+
return (<Popover>
|
|
1052
|
+
<PopoverTrigger asChild>
|
|
1053
|
+
<Button variant="outline">{t('design_system.gallery.sampleCopy.openAbove')}</Button>
|
|
1054
|
+
</PopoverTrigger>
|
|
1055
|
+
<PopoverContent side="top" align="end" className="p-4">
|
|
1056
|
+
<span className="text-sm text-muted-foreground">
|
|
1057
|
+
{t('design_system.gallery.sampleCopy.placementFollowsRadixSidealignPropsAndFlipsWhenSpaceRuns')}
|
|
1058
|
+
</span>
|
|
1059
|
+
</PopoverContent>
|
|
1060
|
+
</Popover>)
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
function TooltipOverlaysDefaultSample() {
|
|
1064
|
+
const t = useT()
|
|
1065
|
+
return (<SimpleTooltip content={t('design_system.gallery.sampleCopy.duplicatesThisViewWithAllFilters')}>
|
|
1066
|
+
<Button variant="outline">{t('design_system.gallery.sampleCopy.hoverMe')}</Button>
|
|
1067
|
+
</SimpleTooltip>)
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
function TooltipOverlaysLightSample() {
|
|
1071
|
+
const t = useT()
|
|
1072
|
+
return (<SimpleTooltip content={t('design_system.gallery.sampleCopy.helpTextOnALightSurface')} variant="light">
|
|
1073
|
+
<Button variant="outline">
|
|
1074
|
+
<Info />
|
|
1075
|
+
{t('design_system.gallery.sampleCopy.lightVariant')}
|
|
1076
|
+
</Button>
|
|
1077
|
+
</SimpleTooltip>)
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
function TooltipOverlaysSizesSample() {
|
|
1081
|
+
const t = useT()
|
|
1082
|
+
return (<>
|
|
1083
|
+
<SimpleTooltip content={t('design_system.gallery.sampleCopy.small')} size="sm">
|
|
1084
|
+
<Button variant="outline" size="sm">sm</Button>
|
|
1085
|
+
</SimpleTooltip>
|
|
1086
|
+
<SimpleTooltip content={t('design_system.gallery.examples.aiProduct.default')}>
|
|
1087
|
+
<Button variant="outline" size="sm">default</Button>
|
|
1088
|
+
</SimpleTooltip>
|
|
1089
|
+
<SimpleTooltip content={t('design_system.gallery.sampleCopy.largeTooltipForLongerHelperCopy')} size="lg">
|
|
1090
|
+
<Button variant="outline" size="sm">lg</Button>
|
|
1091
|
+
</SimpleTooltip>
|
|
1092
|
+
</>)
|
|
1093
|
+
}
|