@open-mercato/core 0.7.1-develop.7202.1.a52dc6707c → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/build.mjs +11 -0
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +23 -0
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies/[id]/page.js +2 -1
- package/dist/modules/customers/backend/customers/companies/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +2 -1
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people/[id]/page.js +2 -2
- package/dist/modules/customers/backend/customers/people/[id]/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js +2 -1
- package/dist/modules/customers/backend/customers/people-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/lib/detailHelpers.js +4 -0
- package/dist/modules/customers/lib/detailHelpers.js.map +2 -2
- package/dist/modules/customers/lib/todoCompatibility.js +5 -0
- package/dist/modules/customers/lib/todoCompatibility.js.map +2 -2
- package/dist/modules/design_system/backend/design-system/page.meta.js +3 -2
- package/dist/modules/design_system/backend/design-system/page.meta.js.map +2 -2
- package/dist/modules/design_system/gallery/assets/ai-prompt-image.png +0 -0
- package/dist/modules/design_system/gallery/assets/avatar-illustration.png +0 -0
- package/dist/modules/design_system/gallery/assets/avatar-memoji.png +0 -0
- package/dist/modules/design_system/gallery/assets/avatar-photo.png +0 -0
- package/dist/modules/design_system/gallery/assets/blog-photo-0.png +0 -0
- package/dist/modules/design_system/gallery/assets/contact-support-portrait.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-ada.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-avax.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-bnb.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-brand.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-btc.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-clock.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-crown.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-dot.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-eth.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-hbar.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-history.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-link.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-menu.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-metamask.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-more.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-phantom.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-rewards.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-sad-face.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-sol.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-star.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-cancelled.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-pending.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-success.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-status-warning.svg +3 -0
- package/dist/modules/design_system/gallery/assets/crypto-trx.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-usdc.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-usdt.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-walletconnect.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-wei.png +0 -0
- package/dist/modules/design_system/gallery/assets/crypto-xrp.png +0 -0
- package/dist/modules/design_system/gallery/assets/cryptocurrency-artwork.js +67 -0
- package/dist/modules/design_system/gallery/assets/cryptocurrency-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/github-logo.png +0 -0
- package/dist/modules/design_system/gallery/assets/images.d.js +1 -0
- package/dist/modules/design_system/gallery/assets/images.d.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/input-european-union.svg +18 -0
- package/dist/modules/design_system/gallery/assets/landing-teams-01.png +0 -0
- package/dist/modules/design_system/gallery/assets/marketing-artwork.js +83 -0
- package/dist/modules/design_system/gallery/assets/marketing-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/menu-apex.svg +18 -0
- package/dist/modules/design_system/gallery/assets/menu-mastercard.svg +7 -0
- package/dist/modules/design_system/gallery/assets/menu-spotify.svg +4 -0
- package/dist/modules/design_system/gallery/assets/menu-united-states.svg +16 -0
- package/dist/modules/design_system/gallery/assets/select-google.png +0 -0
- package/dist/modules/design_system/gallery/assets/select-poland.png +0 -0
- package/dist/modules/design_system/gallery/assets/selection-artwork.js +5 -0
- package/dist/modules/design_system/gallery/assets/selection-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/assets/social-apple-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-apple-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-dropbox-filled.svg +5 -0
- package/dist/modules/design_system/gallery/assets/social-dropbox-stroke.svg +5 -0
- package/dist/modules/design_system/gallery/assets/social-facebook-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-facebook-stroke.svg +10 -0
- package/dist/modules/design_system/gallery/assets/social-github-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-github-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-google-filled.svg +7 -0
- package/dist/modules/design_system/gallery/assets/social-google-stroke.svg +7 -0
- package/dist/modules/design_system/gallery/assets/social-linkedin-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-linkedin-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-x-filled.svg +4 -0
- package/dist/modules/design_system/gallery/assets/social-x-stroke.svg +4 -0
- package/dist/modules/design_system/gallery/assets/style-studio-product.png +0 -0
- package/dist/modules/design_system/gallery/assets/upload-images.js +8 -0
- package/dist/modules/design_system/gallery/assets/upload-images.js.map +7 -0
- package/dist/modules/design_system/gallery/components/BrandStylePreview.js +74 -0
- package/dist/modules/design_system/gallery/components/BrandStylePreview.js.map +7 -0
- package/dist/modules/design_system/gallery/components/CodeSnippet.js +31 -31
- package/dist/modules/design_system/gallery/components/CodeSnippet.js.map +2 -2
- package/dist/modules/design_system/gallery/components/ColorPlayground.js +408 -0
- package/dist/modules/design_system/gallery/components/ColorPlayground.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ColorStudioCompositions.js +166 -0
- package/dist/modules/design_system/gallery/components/ColorStudioCompositions.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ColorStudioSpecimen.js +182 -0
- package/dist/modules/design_system/gallery/components/ColorStudioSpecimen.js.map +7 -0
- package/dist/modules/design_system/gallery/components/CompactEntrySpecimen.js +80 -0
- package/dist/modules/design_system/gallery/components/CompactEntrySpecimen.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ComponentIndex.js +42 -0
- package/dist/modules/design_system/gallery/components/ComponentIndex.js.map +7 -0
- package/dist/modules/design_system/gallery/components/DesignSystemHome.js +69 -0
- package/dist/modules/design_system/gallery/components/DesignSystemHome.js.map +7 -0
- package/dist/modules/design_system/gallery/components/EntryCard.js +47 -41
- package/dist/modules/design_system/gallery/components/EntryCard.js.map +2 -2
- package/dist/modules/design_system/gallery/components/EntryHeader.js +68 -0
- package/dist/modules/design_system/gallery/components/EntryHeader.js.map +7 -0
- package/dist/modules/design_system/gallery/components/FamilyEntryPreview.js +19 -0
- package/dist/modules/design_system/gallery/components/FamilyEntryPreview.js.map +7 -0
- package/dist/modules/design_system/gallery/components/FoundationGuide.js +46 -0
- package/dist/modules/design_system/gallery/components/FoundationGuide.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryLink.js +21 -0
- package/dist/modules/design_system/gallery/components/GalleryLink.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryNavigation.js +82 -0
- package/dist/modules/design_system/gallery/components/GalleryNavigation.js.map +7 -0
- package/dist/modules/design_system/gallery/components/GalleryShell.js +147 -67
- package/dist/modules/design_system/gallery/components/GalleryShell.js.map +3 -3
- package/dist/modules/design_system/gallery/components/IconsBrowser.js +33 -0
- package/dist/modules/design_system/gallery/components/IconsBrowser.js.map +7 -0
- package/dist/modules/design_system/gallery/components/SourceLibrary.js +93 -0
- package/dist/modules/design_system/gallery/components/SourceLibrary.js.map +7 -0
- package/dist/modules/design_system/gallery/components/StyleAgents.js +139 -0
- package/dist/modules/design_system/gallery/components/StyleAgents.js.map +7 -0
- package/dist/modules/design_system/gallery/components/ThemeTokenReference.js +101 -0
- package/dist/modules/design_system/gallery/components/ThemeTokenReference.js.map +7 -0
- package/dist/modules/design_system/gallery/components/VariantPreview.js +2 -2
- package/dist/modules/design_system/gallery/components/VariantPreview.js.map +2 -2
- package/dist/modules/design_system/gallery/components/colorPreview.js +58 -0
- package/dist/modules/design_system/gallery/components/colorPreview.js.map +7 -0
- package/dist/modules/design_system/gallery/components/colorStudio.js +218 -0
- package/dist/modules/design_system/gallery/components/colorStudio.js.map +7 -0
- package/dist/modules/design_system/gallery/components/styleAgentBranding.js +46 -0
- package/dist/modules/design_system/gallery/components/styleAgentBranding.js.map +7 -0
- package/dist/modules/design_system/gallery/components/themeTokens.js +32 -0
- package/dist/modules/design_system/gallery/components/themeTokens.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/ai-product-code.generated.js +194 -0
- package/dist/modules/design_system/gallery/demos/ai-product-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/ai-product.js +423 -0
- package/dist/modules/design_system/gallery/demos/ai-product.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/buttons.js +289 -0
- package/dist/modules/design_system/gallery/demos/buttons.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/cryptocurrency.js +1708 -0
- package/dist/modules/design_system/gallery/demos/cryptocurrency.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/feeds-code.generated.js +92 -0
- package/dist/modules/design_system/gallery/demos/feeds-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/feeds.js +148 -0
- package/dist/modules/design_system/gallery/demos/feeds.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/file-upload.js +72 -0
- package/dist/modules/design_system/gallery/demos/file-upload.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/foundation-reference-data.js +4875 -0
- package/dist/modules/design_system/gallery/demos/foundation-reference-data.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/foundation-references.js +188 -0
- package/dist/modules/design_system/gallery/demos/foundation-references.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/key-components-code.generated.js +6 -0
- package/dist/modules/design_system/gallery/demos/key-components-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/key-components.js +127 -0
- package/dist/modules/design_system/gallery/demos/key-components.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls-code.generated.js +98 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls.js +134 -0
- package/dist/modules/design_system/gallery/demos/marketing-controls.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets-code.generated.js +195 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets.js +586 -0
- package/dist/modules/design_system/gallery/demos/marketing-widgets.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/menu-fixtures.js +40 -0
- package/dist/modules/design_system/gallery/demos/menu-fixtures.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/menu-sources.js +295 -0
- package/dist/modules/design_system/gallery/demos/menu-sources.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/menus.js +150 -0
- package/dist/modules/design_system/gallery/demos/menus.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/rating-reviews.js +53 -0
- package/dist/modules/design_system/gallery/demos/rating-reviews.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/registered-icons.js +104 -0
- package/dist/modules/design_system/gallery/demos/registered-icons.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/selection-cards.js +99 -0
- package/dist/modules/design_system/gallery/demos/selection-cards.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/shell-code.generated.js +189 -0
- package/dist/modules/design_system/gallery/demos/shell-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/shell.js +330 -0
- package/dist/modules/design_system/gallery/demos/shell.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-artwork.js +120 -0
- package/dist/modules/design_system/gallery/demos/source-artwork.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-filters-code.generated.js +125 -0
- package/dist/modules/design_system/gallery/demos/source-filters-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-filters.js +185 -0
- package/dist/modules/design_system/gallery/demos/source-filters.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/source-icons.js +69 -0
- package/dist/modules/design_system/gallery/demos/source-icons.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/table-cells-code.generated.js +150 -0
- package/dist/modules/design_system/gallery/demos/table-cells-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/table-cells.js +181 -0
- package/dist/modules/design_system/gallery/demos/table-cells.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/text-inputs.js +113 -0
- package/dist/modules/design_system/gallery/demos/text-inputs.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/time-picker-code.generated.js +41 -0
- package/dist/modules/design_system/gallery/demos/time-picker-code.generated.js.map +7 -0
- package/dist/modules/design_system/gallery/demos/time-picker.js +41 -0
- package/dist/modules/design_system/gallery/demos/time-picker.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/banners.js +123 -60
- package/dist/modules/design_system/gallery/entries/banners.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/buttons-snippets.js +433 -0
- package/dist/modules/design_system/gallery/entries/buttons-snippets.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/buttons.js +127 -148
- package/dist/modules/design_system/gallery/entries/buttons.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/charts.js +532 -186
- package/dist/modules/design_system/gallery/entries/charts.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/dates.js +191 -3
- package/dist/modules/design_system/gallery/entries/dates.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/detail.js +118 -77
- package/dist/modules/design_system/gallery/entries/detail.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/display.js +1449 -240
- package/dist/modules/design_system/gallery/entries/display.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/feedback.js +1058 -132
- package/dist/modules/design_system/gallery/entries/feedback.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/filters.js +231 -103
- package/dist/modules/design_system/gallery/entries/filters.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/foundations.js +368 -57
- package/dist/modules/design_system/gallery/entries/foundations.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/icons.js +29 -91
- package/dist/modules/design_system/gallery/entries/icons.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/inputs-snippets.js +154 -0
- package/dist/modules/design_system/gallery/entries/inputs-snippets.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/inputs.js +2043 -306
- package/dist/modules/design_system/gallery/entries/inputs.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/library.js +20 -0
- package/dist/modules/design_system/gallery/entries/library.js.map +7 -0
- package/dist/modules/design_system/gallery/entries/messages.js +121 -103
- package/dist/modules/design_system/gallery/entries/messages.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/navigation.js +676 -103
- package/dist/modules/design_system/gallery/entries/navigation.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/notifications.js +131 -78
- package/dist/modules/design_system/gallery/entries/notifications.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/overlays.js +611 -203
- package/dist/modules/design_system/gallery/entries/overlays.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/scaffolding.js +1175 -120
- package/dist/modules/design_system/gallery/entries/scaffolding.js.map +2 -2
- package/dist/modules/design_system/gallery/entries/schedule.js +79 -54
- package/dist/modules/design_system/gallery/entries/schedule.js.map +2 -2
- package/dist/modules/design_system/gallery/presentation.js +108 -0
- package/dist/modules/design_system/gallery/presentation.js.map +7 -0
- package/dist/modules/design_system/gallery/registry.js +8 -5
- package/dist/modules/design_system/gallery/registry.js.map +2 -2
- package/dist/modules/design_system/gallery/source-library.generated.js +5 -0
- package/dist/modules/design_system/gallery/source-library.generated.js.map +7 -0
- package/dist/modules/design_system/i18n/de.json +7167 -0
- package/dist/modules/design_system/i18n/en.json +7167 -0
- package/dist/modules/design_system/i18n/es.json +7167 -0
- package/dist/modules/design_system/i18n/ko.json +7167 -0
- package/dist/modules/design_system/i18n/pl.json +7167 -0
- package/dist/modules/push_notifications/lib/queue.js +1 -31
- package/dist/modules/push_notifications/lib/queue.js.map +2 -2
- package/jest.config.cjs +1 -0
- package/jest.mocks/image.js +1 -0
- package/package.json +8 -9
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +50 -0
- package/src/modules/customers/backend/customers/companies/[id]/page.tsx +2 -1
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +2 -1
- package/src/modules/customers/backend/customers/people/[id]/page.tsx +2 -2
- package/src/modules/customers/backend/customers/people-v2/[id]/page.tsx +2 -1
- package/src/modules/customers/lib/detailHelpers.ts +4 -0
- package/src/modules/customers/lib/todoCompatibility.ts +10 -0
- package/src/modules/design_system/backend/design-system/page.meta.ts +3 -2
- package/src/modules/design_system/gallery/assets/README.md +30 -0
- package/src/modules/design_system/gallery/assets/ai-prompt-image.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-illustration.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-memoji.png +0 -0
- package/src/modules/design_system/gallery/assets/avatar-photo.png +0 -0
- package/src/modules/design_system/gallery/assets/blog-photo-0.png +0 -0
- package/src/modules/design_system/gallery/assets/contact-support-portrait.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-ada.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-avax.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-bnb.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-brand.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-btc.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-clock.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-crown.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-dot.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-eth.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-hbar.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-history.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-link.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-menu.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-metamask.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-more.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-phantom.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-rewards.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-sad-face.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-sol.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-star.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-cancelled.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-pending.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-success.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-status-warning.svg +3 -0
- package/src/modules/design_system/gallery/assets/crypto-trx.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-usdc.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-usdt.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-walletconnect.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-wei.png +0 -0
- package/src/modules/design_system/gallery/assets/crypto-xrp.png +0 -0
- package/src/modules/design_system/gallery/assets/cryptocurrency-artwork.ts +63 -0
- package/src/modules/design_system/gallery/assets/github-logo.png +0 -0
- package/src/modules/design_system/gallery/assets/images.d.ts +9 -0
- package/src/modules/design_system/gallery/assets/input-european-union.svg +18 -0
- package/src/modules/design_system/gallery/assets/landing-teams-01.png +0 -0
- package/src/modules/design_system/gallery/assets/marketing-artwork.ts +79 -0
- package/src/modules/design_system/gallery/assets/menu-apex.svg +18 -0
- package/src/modules/design_system/gallery/assets/menu-mastercard.svg +7 -0
- package/src/modules/design_system/gallery/assets/menu-spotify.svg +4 -0
- package/src/modules/design_system/gallery/assets/menu-united-states.svg +16 -0
- package/src/modules/design_system/gallery/assets/select-google.png +0 -0
- package/src/modules/design_system/gallery/assets/select-poland.png +0 -0
- package/src/modules/design_system/gallery/assets/selection-artwork.ts +1 -0
- package/src/modules/design_system/gallery/assets/social-apple-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-apple-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-dropbox-filled.svg +5 -0
- package/src/modules/design_system/gallery/assets/social-dropbox-stroke.svg +5 -0
- package/src/modules/design_system/gallery/assets/social-facebook-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-facebook-stroke.svg +10 -0
- package/src/modules/design_system/gallery/assets/social-github-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-github-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-google-filled.svg +7 -0
- package/src/modules/design_system/gallery/assets/social-google-stroke.svg +7 -0
- package/src/modules/design_system/gallery/assets/social-linkedin-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-linkedin-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-x-filled.svg +4 -0
- package/src/modules/design_system/gallery/assets/social-x-stroke.svg +4 -0
- package/src/modules/design_system/gallery/assets/style-studio-product.png +0 -0
- package/src/modules/design_system/gallery/assets/upload-images.ts +5 -0
- package/src/modules/design_system/gallery/components/BrandStylePreview.tsx +94 -0
- package/src/modules/design_system/gallery/components/CodeSnippet.tsx +34 -34
- package/src/modules/design_system/gallery/components/ColorPlayground.tsx +324 -0
- package/src/modules/design_system/gallery/components/ColorStudioCompositions.tsx +96 -0
- package/src/modules/design_system/gallery/components/ColorStudioSpecimen.tsx +164 -0
- package/src/modules/design_system/gallery/components/CompactEntrySpecimen.tsx +65 -0
- package/src/modules/design_system/gallery/components/ComponentIndex.tsx +47 -0
- package/src/modules/design_system/gallery/components/DesignSystemHome.tsx +66 -0
- package/src/modules/design_system/gallery/components/EntryCard.tsx +52 -37
- package/src/modules/design_system/gallery/components/EntryHeader.tsx +80 -0
- package/src/modules/design_system/gallery/components/FamilyEntryPreview.tsx +22 -0
- package/src/modules/design_system/gallery/components/FoundationGuide.tsx +43 -0
- package/src/modules/design_system/gallery/components/GalleryLink.tsx +19 -0
- package/src/modules/design_system/gallery/components/GalleryNavigation.tsx +86 -0
- package/src/modules/design_system/gallery/components/GalleryShell.tsx +149 -63
- package/src/modules/design_system/gallery/components/IconsBrowser.tsx +40 -0
- package/src/modules/design_system/gallery/components/SourceLibrary.tsx +90 -0
- package/src/modules/design_system/gallery/components/StyleAgents.tsx +115 -0
- package/src/modules/design_system/gallery/components/ThemeTokenReference.tsx +76 -0
- package/src/modules/design_system/gallery/components/VariantPreview.tsx +2 -2
- package/src/modules/design_system/gallery/components/colorPreview.ts +63 -0
- package/src/modules/design_system/gallery/components/colorStudio.ts +260 -0
- package/src/modules/design_system/gallery/components/styleAgentBranding.ts +42 -0
- package/src/modules/design_system/gallery/components/themeTokens.ts +26 -0
- package/src/modules/design_system/gallery/demos/ai-product-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/ai-product.tsx +188 -0
- package/src/modules/design_system/gallery/demos/buttons.tsx +331 -0
- package/src/modules/design_system/gallery/demos/cryptocurrency.tsx +1943 -0
- package/src/modules/design_system/gallery/demos/feeds-code.generated.ts +4 -0
- package/src/modules/design_system/gallery/demos/feeds.tsx +82 -0
- package/src/modules/design_system/gallery/demos/file-upload.tsx +61 -0
- package/src/modules/design_system/gallery/demos/foundation-reference-data.ts +4872 -0
- package/src/modules/design_system/gallery/demos/foundation-references.tsx +140 -0
- package/src/modules/design_system/gallery/demos/key-components-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/key-components.tsx +106 -0
- package/src/modules/design_system/gallery/demos/marketing-controls-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/marketing-controls.tsx +92 -0
- package/src/modules/design_system/gallery/demos/marketing-widgets-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/marketing-widgets.tsx +189 -0
- package/src/modules/design_system/gallery/demos/menu-fixtures.tsx +48 -0
- package/src/modules/design_system/gallery/demos/menu-sources.ts +5 -0
- package/src/modules/design_system/gallery/demos/menus.tsx +122 -0
- package/src/modules/design_system/gallery/demos/rating-reviews.tsx +44 -0
- package/src/modules/design_system/gallery/demos/registered-icons.tsx +117 -0
- package/src/modules/design_system/gallery/demos/selection-cards.tsx +97 -0
- package/src/modules/design_system/gallery/demos/shell-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/shell.tsx +183 -0
- package/src/modules/design_system/gallery/demos/source-artwork.tsx +88 -0
- package/src/modules/design_system/gallery/demos/source-filters-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/source-filters.tsx +119 -0
- package/src/modules/design_system/gallery/demos/source-icons.tsx +62 -0
- package/src/modules/design_system/gallery/demos/table-cells-code.generated.ts +3 -0
- package/src/modules/design_system/gallery/demos/table-cells.tsx +144 -0
- package/src/modules/design_system/gallery/demos/text-inputs.tsx +90 -0
- package/src/modules/design_system/gallery/demos/time-picker-code.generated.ts +5 -0
- package/src/modules/design_system/gallery/demos/time-picker.tsx +31 -0
- package/src/modules/design_system/gallery/entries/banners.tsx +143 -94
- package/src/modules/design_system/gallery/entries/buttons-snippets.ts +432 -0
- package/src/modules/design_system/gallery/entries/buttons.tsx +125 -196
- package/src/modules/design_system/gallery/entries/charts.tsx +545 -233
- package/src/modules/design_system/gallery/entries/dates.tsx +171 -3
- package/src/modules/design_system/gallery/entries/detail.tsx +142 -115
- package/src/modules/design_system/gallery/entries/display.tsx +1691 -319
- package/src/modules/design_system/gallery/entries/feedback.tsx +1082 -169
- package/src/modules/design_system/gallery/entries/filters.tsx +238 -143
- package/src/modules/design_system/gallery/entries/foundations.tsx +404 -61
- package/src/modules/design_system/gallery/entries/icons.tsx +31 -117
- package/src/modules/design_system/gallery/entries/inputs-snippets.ts +156 -0
- package/src/modules/design_system/gallery/entries/inputs.tsx +2146 -503
- package/src/modules/design_system/gallery/entries/library.tsx +16 -0
- package/src/modules/design_system/gallery/entries/messages.tsx +114 -106
- package/src/modules/design_system/gallery/entries/navigation.tsx +782 -192
- package/src/modules/design_system/gallery/entries/notifications.tsx +145 -120
- package/src/modules/design_system/gallery/entries/overlays.tsx +696 -280
- package/src/modules/design_system/gallery/entries/scaffolding.tsx +1192 -158
- package/src/modules/design_system/gallery/entries/schedule.tsx +72 -58
- package/src/modules/design_system/gallery/presentation.ts +106 -0
- package/src/modules/design_system/gallery/registry.ts +8 -6
- package/src/modules/design_system/gallery/source-library.generated.ts +2 -0
- package/src/modules/design_system/i18n/de.json +7112 -3
- package/src/modules/design_system/i18n/en.json +7112 -3
- package/src/modules/design_system/i18n/es.json +7112 -3
- package/src/modules/design_system/i18n/ko.json +7112 -3
- package/src/modules/design_system/i18n/pl.json +7112 -3
- package/src/modules/push_notifications/AGENTS.md +9 -5
- package/src/modules/push_notifications/lib/queue.ts +15 -44
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import { TimePickerDurationExamples, TimePickerSlotExamples, TimePickerStatusExamples } from '../demos/time-picker'
|
|
3
|
+
import { timePickerDurationCode, timePickerSlotCode, timePickerStatusCode } from '../demos/time-picker-code.generated'
|
|
4
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
2
5
|
import { Clock } from 'lucide-react'
|
|
3
|
-
import { Calendar } from '@open-mercato/ui/primitives/calendar'
|
|
6
|
+
import { Calendar, CalendarMonthSelector } from '@open-mercato/ui/primitives/calendar'
|
|
4
7
|
import { DatePicker } from '@open-mercato/ui/primitives/date-picker'
|
|
8
|
+
import { defaultDateRangePresets } from '@open-mercato/ui/primitives/date-picker-helpers'
|
|
5
9
|
import { DateRangePicker } from '@open-mercato/ui/primitives/date-range-picker'
|
|
6
10
|
import {
|
|
7
11
|
TimePicker,
|
|
@@ -50,8 +54,59 @@ function DemoCalendarRange() {
|
|
|
50
54
|
)
|
|
51
55
|
}
|
|
52
56
|
|
|
57
|
+
function CalendarMarkedDemo() {
|
|
58
|
+
const t = useT()
|
|
59
|
+
const [selected, setSelected] = React.useState<Date | undefined>(new Date(2026, 5, 12))
|
|
60
|
+
const marked = [new Date(2026, 5, 8), new Date(2026, 5, 12), new Date(2026, 5, 20)]
|
|
61
|
+
return <Calendar mode="single" daySize={40} defaultMonth={new Date(2026, 5, 1)} today={new Date(2026, 5, 12)} selected={selected} onSelect={setSelected}
|
|
62
|
+
disabled={[new Date(2026, 5, 20)]} modifiers={{ marked }}
|
|
63
|
+
modifiersClassNames={{ marked: "after:absolute after:bottom-1.5 after:left-1/2 after:size-0.75 after:-translate-x-1/2 after:rounded-full after:bg-current after:content-['']" }}
|
|
64
|
+
labels={{ labelDayButton: (day, modifiers) => modifiers.marked
|
|
65
|
+
? t('design_system.gallery.examples.controls.markedDate', { date: new Intl.DateTimeFormat(undefined, { dateStyle: 'full' }).format(day) })
|
|
66
|
+
: new Intl.DateTimeFormat(undefined, { dateStyle: 'full' }).format(day) }} />
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function CalendarBoundaryDemo() {
|
|
70
|
+
const [range, setRange] = React.useState<{ from: Date | undefined; to?: Date }>({ from: new Date(2026, 5, 8), to: new Date(2026, 5, 19) })
|
|
71
|
+
return <Calendar mode="range" daySize={40} defaultMonth={new Date(2026, 5, 1)} today={new Date(2026, 5, 12)}
|
|
72
|
+
startMonth={new Date(2026, 5, 1)} endMonth={new Date(2026, 5, 30)}
|
|
73
|
+
selected={range} onSelect={(value) => setRange(value ?? { from: undefined })}
|
|
74
|
+
disabled={[{ before: new Date(2026, 5, 5) }, { after: new Date(2026, 5, 25) }]} excludeDisabled />
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function CalendarSelectorDemo({ previous, next }: { previous: boolean; next: boolean }) {
|
|
78
|
+
const [month, setMonth] = React.useState(new Date(2026, 5, 1))
|
|
79
|
+
const [selected, setSelected] = React.useState<Date | undefined>()
|
|
80
|
+
const move = (offset: number) => setMonth(current => new Date(current.getFullYear(), current.getMonth() + offset, 1))
|
|
81
|
+
return <div className="w-fit">
|
|
82
|
+
<CalendarMonthSelector month={month} onPreviousMonth={previous ? () => move(-1) : undefined} onNextMonth={next ? () => move(1) : undefined} />
|
|
83
|
+
<Calendar mode="single" daySize={40} month={month} onMonthChange={setMonth} selected={selected} onSelect={setSelected} today={new Date(2026, 5, 12)} components={{ MonthCaption: () => <></> }} />
|
|
84
|
+
</div>
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function DatePickerBoundaryDemo() {
|
|
88
|
+
const t = useT()
|
|
89
|
+
const [value, setValue] = React.useState<Date | null>(new Date(2026, 5, 12))
|
|
90
|
+
return <div className="flex w-full max-w-sm flex-col gap-3">
|
|
91
|
+
<DatePicker value={value} onChange={setValue} minDate={new Date(2026, 5, 5)} maxDate={new Date(2026, 5, 25)} aria-label={t('design_system.gallery.examples.controls.date')} />
|
|
92
|
+
<DatePicker value={value} onChange={setValue} readOnly aria-label={t('design_system.gallery.examples.controls.readOnlyDate')} />
|
|
93
|
+
<output className="text-sm text-muted-foreground">{value?.toLocaleDateString()}</output>
|
|
94
|
+
</div>
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function DateRangePresetDemo() {
|
|
98
|
+
const t = useT()
|
|
99
|
+
const [value, setValue] = React.useState<DateRange | null>({ start: new Date(2026, 5, 8), end: new Date(2026, 5, 12) })
|
|
100
|
+
const presets = React.useMemo(() => defaultDateRangePresets().map(preset => ({ ...preset, range: () => preset.range(new Date(2026, 5, 12)) })), [])
|
|
101
|
+
return <div className="flex w-full max-w-sm flex-col gap-3">
|
|
102
|
+
<DateRangePicker value={value} onChange={setValue} presets={presets} aria-label={t('design_system.gallery.examples.controls.period')} />
|
|
103
|
+
<output className="text-sm text-muted-foreground">{value ? `${value.start.toLocaleDateString()} – ${value.end.toLocaleDateString()}` : t('design_system.gallery.examples.controls.empty')}</output>
|
|
104
|
+
</div>
|
|
105
|
+
}
|
|
106
|
+
|
|
53
107
|
const calendarEntry: GalleryEntry = {
|
|
54
108
|
id: 'calendar',
|
|
109
|
+
figmaNodeId: '437:175',
|
|
55
110
|
title: 'Calendar',
|
|
56
111
|
importPath: '@open-mercato/ui/primitives/calendar',
|
|
57
112
|
variants: [
|
|
@@ -83,6 +138,69 @@ const [selected, setSelected] = React.useState<{ from?: Date; to?: Date }>()
|
|
|
83
138
|
|
|
84
139
|
<Calendar disabled={{ dayOfWeek: [0, 6] }} />`,
|
|
85
140
|
},
|
|
141
|
+
{
|
|
142
|
+
id: 'marked-days',
|
|
143
|
+
title: 'Marked / selected / disabled days',
|
|
144
|
+
render: () => <CalendarMarkedDemo />,
|
|
145
|
+
code: `import * as React from 'react'
|
|
146
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
147
|
+
import { Calendar } from '@open-mercato/ui/primitives/calendar'
|
|
148
|
+
|
|
149
|
+
function CalendarMarkedDemo() {
|
|
150
|
+
const t = useT()
|
|
151
|
+
const [selected, setSelected] = React.useState<Date | undefined>(new Date(2026, 5, 12))
|
|
152
|
+
const marked = [new Date(2026, 5, 8), new Date(2026, 5, 12), new Date(2026, 5, 20)]
|
|
153
|
+
return <Calendar mode="single" daySize={40} defaultMonth={new Date(2026, 5, 1)} today={new Date(2026, 5, 12)} selected={selected} onSelect={setSelected}
|
|
154
|
+
disabled={[new Date(2026, 5, 20)]} modifiers={{ marked }}
|
|
155
|
+
modifiersClassNames={{ marked: "after:absolute after:bottom-1.5 after:left-1/2 after:size-0.75 after:-translate-x-1/2 after:rounded-full after:bg-current after:content-['']" }}
|
|
156
|
+
labels={{ labelDayButton: (day, modifiers) => modifiers.marked
|
|
157
|
+
? t('design_system.gallery.examples.controls.markedDate', { date: new Intl.DateTimeFormat(undefined, { dateStyle: 'full' }).format(day) })
|
|
158
|
+
: new Intl.DateTimeFormat(undefined, { dateStyle: 'full' }).format(day) }} />
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
<CalendarMarkedDemo />`,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 'range-boundaries',
|
|
165
|
+
title: 'Range boundaries',
|
|
166
|
+
render: () => <CalendarBoundaryDemo />,
|
|
167
|
+
code: `import * as React from 'react'
|
|
168
|
+
import { Calendar } from '@open-mercato/ui/primitives/calendar'
|
|
169
|
+
|
|
170
|
+
function CalendarBoundaryDemo() {
|
|
171
|
+
const [range, setRange] = React.useState<{ from: Date | undefined; to?: Date }>({ from: new Date(2026, 5, 8), to: new Date(2026, 5, 19) })
|
|
172
|
+
return <Calendar mode="range" daySize={40} defaultMonth={new Date(2026, 5, 1)} today={new Date(2026, 5, 12)}
|
|
173
|
+
startMonth={new Date(2026, 5, 1)} endMonth={new Date(2026, 5, 30)}
|
|
174
|
+
selected={range} onSelect={(value) => setRange(value ?? { from: undefined })}
|
|
175
|
+
disabled={[{ before: new Date(2026, 5, 5) }, { after: new Date(2026, 5, 25) }]} excludeDisabled />
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
<CalendarBoundaryDemo />`,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 'month-selectors',
|
|
182
|
+
title: 'Month selectors · 4 icon combinations',
|
|
183
|
+
render: () => <div className="flex flex-wrap gap-6"><CalendarSelectorDemo previous={false} next={false} /><CalendarSelectorDemo previous next={false} /><CalendarSelectorDemo previous={false} next /><CalendarSelectorDemo previous next /></div>,
|
|
184
|
+
code: `import * as React from 'react'
|
|
185
|
+
import { Calendar, CalendarMonthSelector } from '@open-mercato/ui/primitives/calendar'
|
|
186
|
+
|
|
187
|
+
function CalendarSelectorDemo({ previous, next }: { previous: boolean; next: boolean }) {
|
|
188
|
+
const [month, setMonth] = React.useState(new Date(2026, 5, 1))
|
|
189
|
+
const [selected, setSelected] = React.useState<Date | undefined>()
|
|
190
|
+
const move = (offset: number) => setMonth(current => new Date(current.getFullYear(), current.getMonth() + offset, 1))
|
|
191
|
+
return <div className="w-fit">
|
|
192
|
+
<CalendarMonthSelector month={month} onPreviousMonth={previous ? () => move(-1) : undefined} onNextMonth={next ? () => move(1) : undefined} />
|
|
193
|
+
<Calendar mode="single" daySize={40} month={month} onMonthChange={setMonth} selected={selected} onSelect={setSelected} today={new Date(2026, 5, 12)} components={{ MonthCaption: () => <></> }} />
|
|
194
|
+
</div>
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
<div className="flex w-full flex-wrap gap-6">
|
|
198
|
+
<CalendarSelectorDemo previous={false} next={false} />
|
|
199
|
+
<CalendarSelectorDemo previous next={false} />
|
|
200
|
+
<CalendarSelectorDemo previous={false} next />
|
|
201
|
+
<CalendarSelectorDemo previous next />
|
|
202
|
+
</div>`,
|
|
203
|
+
},
|
|
86
204
|
],
|
|
87
205
|
}
|
|
88
206
|
|
|
@@ -103,6 +221,7 @@ function DemoDatePickerTodayClear() {
|
|
|
103
221
|
|
|
104
222
|
const datePickerEntry: GalleryEntry = {
|
|
105
223
|
id: 'date-picker',
|
|
224
|
+
figmaNodeId: '446:7413',
|
|
106
225
|
title: 'DatePicker',
|
|
107
226
|
importPath: '@open-mercato/ui/primitives/date-picker',
|
|
108
227
|
variants: [
|
|
@@ -150,6 +269,26 @@ const [value, setValue] = React.useState<Date | null>(null)
|
|
|
150
269
|
<DatePicker value={value} onChange={setValue} size="sm" />
|
|
151
270
|
<DatePicker value={value} onChange={setValue} disabled />`,
|
|
152
271
|
},
|
|
272
|
+
{
|
|
273
|
+
id: 'boundaries-readonly',
|
|
274
|
+
title: 'Date boundaries and readOnly',
|
|
275
|
+
render: () => <DatePickerBoundaryDemo />,
|
|
276
|
+
code: `import * as React from 'react'
|
|
277
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
278
|
+
import { DatePicker } from '@open-mercato/ui/primitives/date-picker'
|
|
279
|
+
|
|
280
|
+
function DatePickerBoundaryDemo() {
|
|
281
|
+
const t = useT()
|
|
282
|
+
const [value, setValue] = React.useState<Date | null>(new Date(2026, 5, 12))
|
|
283
|
+
return <div className="flex w-full max-w-sm flex-col gap-3">
|
|
284
|
+
<DatePicker value={value} onChange={setValue} minDate={new Date(2026, 5, 5)} maxDate={new Date(2026, 5, 25)} aria-label={t('design_system.gallery.examples.controls.date')} />
|
|
285
|
+
<DatePicker value={value} onChange={setValue} readOnly aria-label={t('design_system.gallery.examples.controls.readOnlyDate')} />
|
|
286
|
+
<output className="text-sm text-muted-foreground">{value?.toLocaleDateString()}</output>
|
|
287
|
+
</div>
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
<DatePickerBoundaryDemo />`,
|
|
291
|
+
},
|
|
153
292
|
],
|
|
154
293
|
}
|
|
155
294
|
|
|
@@ -173,6 +312,7 @@ function DemoDateRangePickerCompact() {
|
|
|
173
312
|
|
|
174
313
|
const dateRangePickerEntry: GalleryEntry = {
|
|
175
314
|
id: 'date-range-picker',
|
|
315
|
+
figmaNodeId: '446:7412',
|
|
176
316
|
title: 'DateRangePicker',
|
|
177
317
|
importPath: '@open-mercato/ui/primitives/date-range-picker',
|
|
178
318
|
variants: [
|
|
@@ -209,36 +349,64 @@ const [value, setValue] = React.useState<DateRange | null>(null)
|
|
|
209
349
|
|
|
210
350
|
<DateRangePicker value={value} onChange={setValue} disabled />`,
|
|
211
351
|
},
|
|
352
|
+
{
|
|
353
|
+
id: 'fixed-presets',
|
|
354
|
+
title: 'Eight reproducible presets and draft/apply',
|
|
355
|
+
render: () => <DateRangePresetDemo />,
|
|
356
|
+
code: `import * as React from 'react'
|
|
357
|
+
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
358
|
+
import { DateRangePicker } from '@open-mercato/ui/primitives/date-range-picker'
|
|
359
|
+
import { defaultDateRangePresets } from '@open-mercato/ui/primitives/date-picker-helpers'
|
|
360
|
+
import type { DateRange } from '@open-mercato/ui/backend/date-range'
|
|
361
|
+
|
|
362
|
+
function DateRangePresetDemo() {
|
|
363
|
+
const t = useT()
|
|
364
|
+
const [value, setValue] = React.useState<DateRange | null>({ start: new Date(2026, 5, 8), end: new Date(2026, 5, 12) })
|
|
365
|
+
const presets = React.useMemo(() => defaultDateRangePresets().map(preset => ({ ...preset, range: () => preset.range(new Date(2026, 5, 12)) })), [])
|
|
366
|
+
return <div className="flex w-full max-w-sm flex-col gap-3">
|
|
367
|
+
<DateRangePicker value={value} onChange={setValue} presets={presets} aria-label={t('design_system.gallery.examples.controls.period')} />
|
|
368
|
+
<output className="text-sm text-muted-foreground">{value ? \`\${value.start.toLocaleDateString()} – \${value.end.toLocaleDateString()}\` : t('design_system.gallery.examples.controls.empty')}</output>
|
|
369
|
+
</div>
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
<DateRangePresetDemo />`,
|
|
373
|
+
},
|
|
212
374
|
],
|
|
213
375
|
}
|
|
214
376
|
|
|
215
377
|
const sampleSlots = ['09:00', '09:30', '10:00', '10:30', '11:00', '11:30']
|
|
216
378
|
|
|
217
379
|
function DemoTimePickerTrigger() {
|
|
380
|
+
const t = useT()
|
|
218
381
|
return (
|
|
219
382
|
<TimePicker
|
|
220
383
|
defaultValue="10:00"
|
|
221
384
|
slots={sampleSlots}
|
|
222
385
|
maxHeight={200}
|
|
223
|
-
trigger={<Button variant="outline">
|
|
386
|
+
trigger={<Button variant="outline">{t('design_system.gallery.sampleCopy.pickATime')}</Button>}
|
|
224
387
|
/>
|
|
225
388
|
)
|
|
226
389
|
}
|
|
227
390
|
|
|
228
391
|
const timePickerEntry: GalleryEntry = {
|
|
229
392
|
id: 'time-picker',
|
|
393
|
+
figmaNodeId: '165483:5687',
|
|
230
394
|
title: 'TimePicker',
|
|
231
395
|
importPath: '@open-mercato/ui/primitives/time-picker',
|
|
232
396
|
variants: [
|
|
397
|
+
{ id: 'source-statuses', title: '4 statuses / 4 states', render: () => <TimePickerStatusExamples />, code: timePickerStatusCode },
|
|
398
|
+
{ id: 'source-durations', title: 'Duration / 4 states', render: () => <TimePickerDurationExamples />, code: timePickerDurationCode },
|
|
399
|
+
{ id: 'source-slots', title: 'Selection indicator right / center / 4 states', render: () => <TimePickerSlotExamples />, code: timePickerSlotCode },
|
|
233
400
|
{
|
|
234
401
|
id: 'inline-card',
|
|
235
402
|
title: 'Inline card',
|
|
236
403
|
render: () => (
|
|
237
|
-
<TimePicker defaultValue="10:00" slots={sampleSlots} maxHeight={160} />
|
|
404
|
+
<TimePicker defaultValue="10:00" slots={sampleSlots} maxHeight={160} className="max-w-full" />
|
|
238
405
|
),
|
|
239
406
|
code: `import { TimePicker } from '@open-mercato/ui/primitives/time-picker'
|
|
240
407
|
|
|
241
408
|
<TimePicker
|
|
409
|
+
className="max-w-full"
|
|
242
410
|
defaultValue="10:00"
|
|
243
411
|
slots={['09:00', '09:30', '10:00', '10:30', '11:00', '11:30']}
|
|
244
412
|
/>`,
|