@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,125 +1,12 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { SourceIconCatalogue, sourceIconCatalogueCode } from '../demos/source-icons'
|
|
3
|
+
import { SourceArtworkCatalogue, sourceArtworkCode } from '../demos/source-artwork'
|
|
4
|
+
import { IconGrid } from '../demos/registered-icons'
|
|
3
5
|
import { LUCIDE_ICON_REGISTRY } from '@open-mercato/ui/backend/icons/lucideRegistry'
|
|
4
|
-
import { SearchInput } from '@open-mercato/ui/primitives/search-input'
|
|
5
|
-
import {
|
|
6
|
-
Popover,
|
|
7
|
-
PopoverClose,
|
|
8
|
-
PopoverContent,
|
|
9
|
-
PopoverTrigger,
|
|
10
|
-
} from '@open-mercato/ui/primitives/popover'
|
|
11
|
-
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
12
6
|
import type { GalleryEntry } from '../types'
|
|
13
7
|
|
|
14
|
-
// Mirrors the DS Figma icon sheet (node 2716:25504, "Lucide icons"): a plain
|
|
15
|
-
// grid of outline icons with the name beneath each. The gallery shows the
|
|
16
|
-
// icons REGISTERED in the string-icon registry β the set page.meta.ts `icon`
|
|
17
|
-
// accepts; components import from lucide-react directly.
|
|
18
|
-
|
|
19
8
|
const FIGMA_ICONS_NODE = '2716:25504'
|
|
20
9
|
|
|
21
|
-
function pascalCase(registryName: string): string {
|
|
22
|
-
return registryName
|
|
23
|
-
.split(/[-_]/)
|
|
24
|
-
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
25
|
-
.join('')
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Clicking a tile opens an explicit two-option menu instead of a hidden
|
|
29
|
-
// copy-mode: each option shows exactly what will land in the clipboard.
|
|
30
|
-
function IconTile({ name }: { name: string }) {
|
|
31
|
-
const t = useT()
|
|
32
|
-
const Icon = LUCIDE_ICON_REGISTRY[name]
|
|
33
|
-
const jsxSnippet = `<${pascalCase(name)} aria-hidden className="size-4" />`
|
|
34
|
-
|
|
35
|
-
const copy = React.useCallback(async (payload: string) => {
|
|
36
|
-
try {
|
|
37
|
-
await navigator.clipboard.writeText(payload)
|
|
38
|
-
flash(t('design_system.gallery.iconCopied', 'Copied: {snippet}', { snippet: payload }), 'success')
|
|
39
|
-
} catch {
|
|
40
|
-
flash(t('design_system.gallery.copyFailed', 'Could not copy the snippet'), 'error')
|
|
41
|
-
}
|
|
42
|
-
}, [t])
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<Popover>
|
|
46
|
-
<PopoverTrigger asChild>
|
|
47
|
-
<button
|
|
48
|
-
type="button"
|
|
49
|
-
className="flex flex-col items-center gap-1.5 rounded-md border border-transparent p-2 transition-colors hover:border-border hover:bg-muted/40 focus-visible:outline-none focus-visible:shadow-focus"
|
|
50
|
-
>
|
|
51
|
-
<Icon aria-hidden className="size-5 text-foreground" strokeWidth={1.75} />
|
|
52
|
-
<code className="max-w-full truncate text-[10px] leading-tight text-muted-foreground">{name}</code>
|
|
53
|
-
</button>
|
|
54
|
-
</PopoverTrigger>
|
|
55
|
-
<PopoverContent align="center" className="w-auto max-w-xs p-2">
|
|
56
|
-
<div className="space-y-1">
|
|
57
|
-
<PopoverClose asChild>
|
|
58
|
-
<button
|
|
59
|
-
type="button"
|
|
60
|
-
onClick={() => copy(name)}
|
|
61
|
-
className="flex w-full flex-col items-start gap-0.5 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-muted focus-visible:outline-none focus-visible:shadow-focus"
|
|
62
|
-
>
|
|
63
|
-
<span className="text-xs font-medium text-foreground">
|
|
64
|
-
{t('design_system.gallery.iconCopyMeta', 'Copy name for page.meta icon')}
|
|
65
|
-
</span>
|
|
66
|
-
<code className="text-[11px] text-muted-foreground">{name}</code>
|
|
67
|
-
</button>
|
|
68
|
-
</PopoverClose>
|
|
69
|
-
<PopoverClose asChild>
|
|
70
|
-
<button
|
|
71
|
-
type="button"
|
|
72
|
-
onClick={() => copy(jsxSnippet)}
|
|
73
|
-
className="flex w-full flex-col items-start gap-0.5 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-muted focus-visible:outline-none focus-visible:shadow-focus"
|
|
74
|
-
>
|
|
75
|
-
<span className="text-xs font-medium text-foreground">
|
|
76
|
-
{t('design_system.gallery.iconCopyJsx', 'Copy JSX (lucide-react)')}
|
|
77
|
-
</span>
|
|
78
|
-
<code className="max-w-full truncate text-[11px] text-muted-foreground">{jsxSnippet}</code>
|
|
79
|
-
</button>
|
|
80
|
-
</PopoverClose>
|
|
81
|
-
</div>
|
|
82
|
-
</PopoverContent>
|
|
83
|
-
</Popover>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function IconGrid() {
|
|
88
|
-
const t = useT()
|
|
89
|
-
const [query, setQuery] = React.useState('')
|
|
90
|
-
const names = React.useMemo(() => Object.keys(LUCIDE_ICON_REGISTRY).sort((a, b) => a.localeCompare(b)), [])
|
|
91
|
-
const needle = query.trim().toLowerCase()
|
|
92
|
-
const visible = needle ? names.filter((name) => name.toLowerCase().includes(needle)) : names
|
|
93
|
-
|
|
94
|
-
return (
|
|
95
|
-
<div className="space-y-4">
|
|
96
|
-
<div className="flex flex-wrap items-center gap-3">
|
|
97
|
-
<div className="max-w-sm flex-1">
|
|
98
|
-
<SearchInput
|
|
99
|
-
value={query}
|
|
100
|
-
onChange={setQuery}
|
|
101
|
-
placeholder={t('design_system.gallery.iconSearchPlaceholder', 'Filter iconsβ¦')}
|
|
102
|
-
aria-label={t('design_system.gallery.iconSearchPlaceholder', 'Filter iconsβ¦')}
|
|
103
|
-
/>
|
|
104
|
-
</div>
|
|
105
|
-
<p className="text-xs text-muted-foreground">
|
|
106
|
-
{needle
|
|
107
|
-
? t('design_system.gallery.iconCountFiltered', '{visible} of {total} icons', {
|
|
108
|
-
visible: visible.length,
|
|
109
|
-
total: names.length,
|
|
110
|
-
})
|
|
111
|
-
: t('design_system.gallery.iconCountAll', '{total} icons', { total: names.length })}
|
|
112
|
-
</p>
|
|
113
|
-
</div>
|
|
114
|
-
<div className="grid grid-cols-4 gap-1 sm:grid-cols-6 lg:grid-cols-8">
|
|
115
|
-
{visible.map((name) => (
|
|
116
|
-
<IconTile key={name} name={name} />
|
|
117
|
-
))}
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
10
|
const iconRegistryEntry: GalleryEntry = {
|
|
124
11
|
id: 'icon-registry',
|
|
125
12
|
title: 'Icon registry',
|
|
@@ -165,4 +52,31 @@ const iconRegistryEntry: GalleryEntry = {
|
|
|
165
52
|
],
|
|
166
53
|
}
|
|
167
54
|
|
|
168
|
-
|
|
55
|
+
const sourceIconsEntry: GalleryEntry = {
|
|
56
|
+
id: 'source-icons',
|
|
57
|
+
title: 'Source icon library',
|
|
58
|
+
importPath: '@open-mercato/ui/assets/source-icons',
|
|
59
|
+
figmaNodeId: '199678:19375',
|
|
60
|
+
descriptionKey: 'design_system.entries.sourceIcons.description',
|
|
61
|
+
variants: [
|
|
62
|
+
{ id: 'catalogue', title: 'All 1667 source icons / search and copy', render: () => <SourceIconCatalogue />, code: sourceIconCatalogueCode },
|
|
63
|
+
],
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const sourceArtworkEntry: GalleryEntry = {
|
|
67
|
+
id: 'source-artwork',
|
|
68
|
+
title: 'Source artwork library',
|
|
69
|
+
importPath: '@open-mercato/ui/assets/source-artwork',
|
|
70
|
+
figmaNodeId: '2771:1469',
|
|
71
|
+
descriptionKey: 'design_system.gallery.sourceArtwork.description',
|
|
72
|
+
variants: [
|
|
73
|
+
{ id: 'brands', title: 'Brands / 439 original logos and styles', render: () => <SourceArtworkCatalogue group="brand" />, code: sourceArtworkCode('brand') },
|
|
74
|
+
{ id: 'flags', title: 'Country flags / 263 original assets', render: () => <SourceArtworkCatalogue group="country-flags" />, code: sourceArtworkCode('country-flags') },
|
|
75
|
+
{ id: 'emoji', title: 'Emoji / 607 original assets', render: () => <SourceArtworkCatalogue group="emojies" />, code: sourceArtworkCode('emojies') },
|
|
76
|
+
{ id: 'store-badges', title: 'Store badges / 16 original variants', render: () => <SourceArtworkCatalogue group="appstore-badges" />, code: sourceArtworkCode('appstore-badges') },
|
|
77
|
+
{ id: 'thumbnails', title: 'Thumbnails / 78 component and landing illustrations', render: () => <SourceArtworkCatalogue group="thumbnails" />, code: sourceArtworkCode('thumbnails') },
|
|
78
|
+
{ id: 'cursors', title: 'Cursors / 10 original assets', render: () => <SourceArtworkCatalogue group="others" />, code: sourceArtworkCode('others') },
|
|
79
|
+
],
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const entries: GalleryEntry[] = [iconRegistryEntry, sourceIconsEntry, sourceArtworkEntry]
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// Copy-paste snippets for the Inputs family. The previews render full source matrices from
|
|
2
|
+
// ../demos; the snippet shows the smallest self-contained usage a developer can paste into a
|
|
3
|
+
// module: real imports, literal sample text, no gallery helpers, assets or translation keys.
|
|
4
|
+
|
|
5
|
+
const SPECIALISED_INPUTS_NOTE = `// Email, phone, card, website, amount, search and password have dedicated primitives:
|
|
6
|
+
// EmailInput, PhoneNumberField, CardInput, WebsiteInput, AmountInput, SearchInput, PasswordInput.`
|
|
7
|
+
|
|
8
|
+
export function inputFieldCode({ inputProps = '', fieldProps = '' }: { inputProps?: string; fieldProps?: string } = {}): string {
|
|
9
|
+
return `import { User } from 'lucide-react'
|
|
10
|
+
import { Input } from '@open-mercato/ui/primitives/input'
|
|
11
|
+
import { FormField } from '@open-mercato/ui/primitives/form-field'
|
|
12
|
+
|
|
13
|
+
<FormField label="Full name" description="Shown on invoices"${fieldProps}>
|
|
14
|
+
<Input${inputProps} leftIcon={<User />} placeholder="Alex Morgan" />
|
|
15
|
+
</FormField>
|
|
16
|
+
|
|
17
|
+
${SPECIALISED_INPUTS_NOTE}`
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const textareaFieldCode = `import { Textarea } from '@open-mercato/ui/primitives/textarea'
|
|
21
|
+
import { FormField } from '@open-mercato/ui/primitives/form-field'
|
|
22
|
+
|
|
23
|
+
<FormField label="Note" description="Visible to your team">
|
|
24
|
+
<Textarea appearance="source" showCount maxLength={200} placeholder="Add a note" />
|
|
25
|
+
</FormField>
|
|
26
|
+
|
|
27
|
+
// States: pass error="..." or disabled to FormField, and disabled to Textarea.`
|
|
28
|
+
|
|
29
|
+
export function phoneNumberFieldCode(extraProps = ''): string {
|
|
30
|
+
return `import * as React from 'react'
|
|
31
|
+
import { PhoneNumberField, type PhoneCountry } from '@open-mercato/ui/backend/inputs/PhoneNumberField'
|
|
32
|
+
|
|
33
|
+
const countries: PhoneCountry[] = [
|
|
34
|
+
{ iso2: 'US', dialCode: '+1', label: 'United States', flag: 'πΊπΈ' },
|
|
35
|
+
{ iso2: 'PL', dialCode: '+48', label: 'Poland', flag: 'π΅π±' },
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
function PhoneExample() {
|
|
39
|
+
const [phone, setPhone] = React.useState<string | undefined>()
|
|
40
|
+
return (
|
|
41
|
+
<PhoneNumberField size={36} ariaLabel="Phone number" countryLabel="Country"
|
|
42
|
+
value={phone} onValueChange={setPhone} countries={countries}${extraProps} />
|
|
43
|
+
)
|
|
44
|
+
}`
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function selectFieldCode({ size = 36, leading = false, selectProps = '', fieldProps = '', initialValue = 'warsaw' }: {
|
|
48
|
+
size?: 32 | 36 | 40
|
|
49
|
+
leading?: boolean
|
|
50
|
+
selectProps?: string
|
|
51
|
+
fieldProps?: string
|
|
52
|
+
initialValue?: string
|
|
53
|
+
} = {}): string {
|
|
54
|
+
const leadingImport = leading ? `import { Building2 } from 'lucide-react'\n` : ''
|
|
55
|
+
const triggerImports = leading ? 'Select, SelectContent, SelectItem, SelectTrigger, SelectTriggerLeading, SelectValue' : 'Select, SelectContent, SelectItem, SelectTrigger, SelectValue'
|
|
56
|
+
const triggerLeading = leading ? `\n <SelectTriggerLeading><Building2 aria-hidden="true" className="size-5" /></SelectTriggerLeading>` : ''
|
|
57
|
+
const itemLeading = leading ? ` leading={<Building2 aria-hidden="true" className="size-5" />}` : ''
|
|
58
|
+
return `import * as React from 'react'
|
|
59
|
+
${leadingImport}import { FormField } from '@open-mercato/ui/primitives/form-field'
|
|
60
|
+
import { ${triggerImports} } from '@open-mercato/ui/primitives/select'
|
|
61
|
+
|
|
62
|
+
function SelectExample() {
|
|
63
|
+
const [value, setValue] = React.useState('${initialValue}')
|
|
64
|
+
return (
|
|
65
|
+
<Select value={value} onValueChange={setValue}${selectProps}>
|
|
66
|
+
<FormField label="Office" description="You can change it later"${fieldProps}>
|
|
67
|
+
<SelectTrigger size={${size}}>${triggerLeading}
|
|
68
|
+
<SelectValue placeholder="Choose an office" />
|
|
69
|
+
</SelectTrigger>
|
|
70
|
+
</FormField>
|
|
71
|
+
<SelectContent>
|
|
72
|
+
<SelectItem value="warsaw"${itemLeading}>Warsaw</SelectItem>
|
|
73
|
+
<SelectItem value="berlin"${itemLeading}>Berlin</SelectItem>
|
|
74
|
+
<SelectItem value="archive" disabled${itemLeading}>Archive</SelectItem>
|
|
75
|
+
</SelectContent>
|
|
76
|
+
</Select>
|
|
77
|
+
)
|
|
78
|
+
}`
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function dropdownCode({ size = 36, initialQuery = '' }: { size?: 36 | 56; initialQuery?: string } = {}): string {
|
|
82
|
+
const description = size === 56 ? ` description="12 members"` : ''
|
|
83
|
+
return `import * as React from 'react'
|
|
84
|
+
import { Building2, Plus } from 'lucide-react'
|
|
85
|
+
import { Button } from '@open-mercato/ui/primitives/button'
|
|
86
|
+
import { Dropdown, DropdownTrigger, DropdownContent, DropdownInput, DropdownList, DropdownEmpty, DropdownItem, DropdownFooter } from '@open-mercato/ui/primitives/dropdown'
|
|
87
|
+
|
|
88
|
+
const workspaces = ['Warsaw', 'Berlin', 'Lisbon']
|
|
89
|
+
|
|
90
|
+
function DropdownExample() {
|
|
91
|
+
const [open, setOpen] = React.useState(false)
|
|
92
|
+
const [value, setValue] = React.useState('Warsaw')
|
|
93
|
+
const [query, setQuery] = React.useState('${initialQuery}')
|
|
94
|
+
return (
|
|
95
|
+
<Dropdown open={open} onOpenChange={setOpen}>
|
|
96
|
+
<DropdownTrigger asChild><Button variant="outline">{value}</Button></DropdownTrigger>
|
|
97
|
+
<DropdownContent className="w-96 max-w-full" aria-label="Choose a workspace" commandProps={{ label: 'Workspaces' }}>
|
|
98
|
+
<DropdownInput value={query} onValueChange={setQuery} aria-label="Search workspaces" placeholder="Search workspaces" />
|
|
99
|
+
<DropdownList>
|
|
100
|
+
<DropdownEmpty>No workspaces match your search</DropdownEmpty>
|
|
101
|
+
{workspaces.map((workspace) => (
|
|
102
|
+
<DropdownItem key={workspace} value={workspace} size={${size}} checked={value === workspace}${description}
|
|
103
|
+
leading={<Building2 aria-hidden="true" className="size-5" />}
|
|
104
|
+
onSelect={() => { setValue(workspace); setOpen(false) }}>
|
|
105
|
+
{workspace}
|
|
106
|
+
</DropdownItem>
|
|
107
|
+
))}
|
|
108
|
+
</DropdownList>
|
|
109
|
+
<DropdownFooter>
|
|
110
|
+
<Button variant="outline" size="sm" className="w-full"><Plus className="size-5" />Add workspace</Button>
|
|
111
|
+
</DropdownFooter>
|
|
112
|
+
</DropdownContent>
|
|
113
|
+
</Dropdown>
|
|
114
|
+
)
|
|
115
|
+
}`
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function fieldLabelCode(labelProps = '', imports = ''): string {
|
|
119
|
+
return `import { FieldLabel } from '@open-mercato/ui/primitives/label'
|
|
120
|
+
import { Input } from '@open-mercato/ui/primitives/input'
|
|
121
|
+
${imports}
|
|
122
|
+
<FieldLabel htmlFor="company-name"${labelProps}>Company name</FieldLabel>
|
|
123
|
+
<Input id="company-name" />`
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const fieldLabelInformationCode = fieldLabelCode(
|
|
127
|
+
`\n information={<SimpleTooltip content="Used on invoices and quotes"><CompactButton size={20} appearance="ghost" aria-label="More information"><KeyIconGlyph name="labelInformation" /></CompactButton></SimpleTooltip>}`,
|
|
128
|
+
`import { CompactButton } from '@open-mercato/ui/primitives/compact-button'
|
|
129
|
+
import { SimpleTooltip } from '@open-mercato/ui/primitives/tooltip'
|
|
130
|
+
import { KeyIconGlyph } from '@open-mercato/ui/primitives/key-icon'
|
|
131
|
+
`,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
export const fieldLabelActionCode = fieldLabelCode(
|
|
135
|
+
`\n action={<LinkButton type="button" size="sm" variant="gray" onClick={openHelp}>Help</LinkButton>}`,
|
|
136
|
+
`import { LinkButton } from '@open-mercato/ui/primitives/link-button'
|
|
137
|
+
`,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
export const formFieldLabelCode = `import { FieldLabel } from '@open-mercato/ui/primitives/label'
|
|
141
|
+
import { FormField } from '@open-mercato/ui/primitives/form-field'
|
|
142
|
+
import { Input } from '@open-mercato/ui/primitives/input'
|
|
143
|
+
|
|
144
|
+
// FormField renders FieldLabel for you: sourceLabel switches to the source layout.
|
|
145
|
+
<FormField sourceLabel label="Company name" labelSublabel="(optional)" description="Used on invoices and quotes">
|
|
146
|
+
<Input />
|
|
147
|
+
</FormField>`
|
|
148
|
+
|
|
149
|
+
export function hintTextCode({ state, icon = true }: { state?: 'error' | 'disabled'; icon?: boolean } = {}): string {
|
|
150
|
+
const stateProp = state ? ` state="${state}"` : ''
|
|
151
|
+
const iconImport = icon ? `import { KeyIconGlyph } from '@open-mercato/ui/primitives/key-icon'\n` : ''
|
|
152
|
+
const leading = icon ? ` leading={<KeyIconGlyph name="information" />}` : ''
|
|
153
|
+
return `import { HintText } from '@open-mercato/ui/primitives/hint-text'
|
|
154
|
+
${iconImport}
|
|
155
|
+
<HintText${stateProp}${leading}>Used on invoices and quotes</HintText>`
|
|
156
|
+
}
|