noecosystem-design 0.1.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/.editorconfig +12 -0
- package/.github/CODEOWNERS +10 -0
- package/.github/dependabot.yml +12 -0
- package/.github/pull_request_template.md +17 -0
- package/.github/workflows/ci.yml +173 -0
- package/.github/workflows/security.yml +40 -0
- package/.mcp.json +8 -0
- package/.node-version +1 -0
- package/AGENTS.md +62 -0
- package/CONTRIBUTING.md +9 -0
- package/README.md +48 -0
- package/SECURITY.md +7 -0
- package/apps/showcase/index.html +28 -0
- package/apps/showcase/package.json +30 -0
- package/apps/showcase/src/app.css +8 -0
- package/apps/showcase/src/app.tsx +10 -0
- package/apps/showcase/src/catalog/agent-composer-preview.tsx +17 -0
- package/apps/showcase/src/catalog/catalog-index.tsx +2676 -0
- package/apps/showcase/src/catalog/catalog-shell.browser.test.tsx +73 -0
- package/apps/showcase/src/catalog/catalog-shell.tsx +506 -0
- package/apps/showcase/src/main.tsx +17 -0
- package/apps/showcase/tsconfig.json +11 -0
- package/apps/showcase/vite.config.ts +15 -0
- package/apps/storybook/.storybook/main.ts +21 -0
- package/apps/storybook/.storybook/preview.tsx +87 -0
- package/apps/storybook/.storybook/vitest.setup.ts +26 -0
- package/apps/storybook/README.md +5 -0
- package/apps/storybook/package.json +31 -0
- package/apps/storybook/stories/AgentStates.stories.tsx +72 -0
- package/apps/storybook/stories/Bidi.stories.tsx +31 -0
- package/apps/storybook/stories/Button.stories.tsx +19 -0
- package/apps/storybook/stories/Surfaces.stories.tsx +28 -0
- package/apps/storybook/stories/catalog/about-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/activity-feed.stories.tsx +50 -0
- package/apps/storybook/stories/catalog/activity-gauge.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/agent-composer.stories.tsx +49 -0
- package/apps/storybook/stories/catalog/agent-message.stories.tsx +37 -0
- package/apps/storybook/stories/catalog/agent-plan.stories.tsx +35 -0
- package/apps/storybook/stories/catalog/agent-workspace.stories.tsx +60 -0
- package/apps/storybook/stories/catalog/alert.stories.tsx +41 -0
- package/apps/storybook/stories/catalog/app-frame.stories.tsx +47 -0
- package/apps/storybook/stories/catalog/approval-request.stories.tsx +30 -0
- package/apps/storybook/stories/catalog/avatar.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/badge-group.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/badge.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/banner.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/bidi-text.stories.tsx +47 -0
- package/apps/storybook/stories/catalog/blog-index-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/blog-post-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/blog-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/bottom-navigation.stories.tsx +27 -0
- package/apps/storybook/stories/catalog/button-group.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/button.stories.tsx +27 -0
- package/apps/storybook/stories/catalog/calendar.stories.tsx +47 -0
- package/apps/storybook/stories/catalog/card.stories.tsx +40 -0
- package/apps/storybook/stories/catalog/careers-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/carousel.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/chart-frame.stories.tsx +34 -0
- package/apps/storybook/stories/catalog/chart.stories.tsx +43 -0
- package/apps/storybook/stories/catalog/checkbox.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/code-and-terminal.stories.tsx +39 -0
- package/apps/storybook/stories/catalog/color-picker.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/command-menu.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/contact-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/contact-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/content-divider.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/content-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/context-menu.stories.tsx +66 -0
- package/apps/storybook/stories/catalog/credit-card.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/cta-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/dashboard-01.stories.tsx +28 -0
- package/apps/storybook/stories/catalog/dashboard-02.stories.tsx +28 -0
- package/apps/storybook/stories/catalog/dashboard-shell.stories.tsx +65 -0
- package/apps/storybook/stories/catalog/data-list.stories.tsx +37 -0
- package/apps/storybook/stories/catalog/data-table.stories.tsx +51 -0
- package/apps/storybook/stories/catalog/date-picker.stories.tsx +31 -0
- package/apps/storybook/stories/catalog/dialog.stories.tsx +68 -0
- package/apps/storybook/stories/catalog/direction-provider.stories.tsx +36 -0
- package/apps/storybook/stories/catalog/drawer.stories.tsx +58 -0
- package/apps/storybook/stories/catalog/dropdown.stories.tsx +67 -0
- package/apps/storybook/stories/catalog/email-template.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/empty-state.stories.tsx +19 -0
- package/apps/storybook/stories/catalog/error-state.stories.tsx +19 -0
- package/apps/storybook/stories/catalog/fab.stories.tsx +22 -0
- package/apps/storybook/stories/catalog/faq-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/faq-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/feature-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/featured-icon.stories.tsx +45 -0
- package/apps/storybook/stories/catalog/field.stories.tsx +35 -0
- package/apps/storybook/stories/catalog/file-uploader.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/filter-bar.stories.tsx +33 -0
- package/apps/storybook/stories/catalog/footer.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/forgot-password-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/gradient-picker.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/header-navigation.stories.tsx +46 -0
- package/apps/storybook/stories/catalog/hero-header.stories.tsx +36 -0
- package/apps/storybook/stories/catalog/icon-system.stories.tsx +48 -0
- package/apps/storybook/stories/catalog/illustration.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/image-picker.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/informational-page-01.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/informational-page-02.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/inline-cta.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/input.stories.tsx +21 -0
- package/apps/storybook/stories/catalog/landing-page.stories.tsx +28 -0
- package/apps/storybook/stories/catalog/legal-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/login-page.stories.tsx +42 -0
- package/apps/storybook/stories/catalog/marketing-404-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/marketing-header.stories.tsx +35 -0
- package/apps/storybook/stories/catalog/menu.stories.tsx +46 -0
- package/apps/storybook/stories/catalog/messaging.stories.tsx +33 -0
- package/apps/storybook/stories/catalog/metric-card.stories.tsx +20 -0
- package/apps/storybook/stories/catalog/metrics-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/mobile-screen.stories.tsx +56 -0
- package/apps/storybook/stories/catalog/multi-select.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/newsletter.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/not-found.stories.tsx +30 -0
- package/apps/storybook/stories/catalog/notification.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/page-header.stories.tsx +37 -0
- package/apps/storybook/stories/catalog/pagination.stories.tsx +27 -0
- package/apps/storybook/stories/catalog/pie-chart.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/pricing-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/pricing-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/progress-indicator.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/progress-steps.stories.tsx +33 -0
- package/apps/storybook/stories/catalog/qr-code.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/radar-chart.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/radio-group.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/rating.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/rich-text-editor.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/run-inspector.stories.tsx +23 -0
- package/apps/storybook/stories/catalog/section-footer.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/section-header.stories.tsx +31 -0
- package/apps/storybook/stories/catalog/select.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/settings-01.stories.tsx +24 -0
- package/apps/storybook/stories/catalog/settings-02.stories.tsx +24 -0
- package/apps/storybook/stories/catalog/settings-page.stories.tsx +48 -0
- package/apps/storybook/stories/catalog/sidebar-navigation.stories.tsx +40 -0
- package/apps/storybook/stories/catalog/sign-in-form.stories.tsx +28 -0
- package/apps/storybook/stories/catalog/sign-up-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/skeleton.stories.tsx +21 -0
- package/apps/storybook/stories/catalog/slider.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/social-button.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/social-proof.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/spinner.stories.tsx +15 -0
- package/apps/storybook/stories/catalog/store-button.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/tabs.stories.tsx +38 -0
- package/apps/storybook/stories/catalog/tags.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/team-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/team-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/testimonial-section.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/textarea.stories.tsx +22 -0
- package/apps/storybook/stories/catalog/toggle.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/tool-call.stories.tsx +40 -0
- package/apps/storybook/stories/catalog/tooltip.stories.tsx +30 -0
- package/apps/storybook/stories/catalog/tree-view.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/utility-button.stories.tsx +60 -0
- package/apps/storybook/stories/catalog/verification-code.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/verification-page.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/video-player.stories.tsx +18 -0
- package/apps/storybook/stories/catalog/workflow-canvas.stories.tsx +45 -0
- package/apps/storybook/stories/catalog/workflow-node.stories.tsx +24 -0
- package/apps/storybook/vitest.config.ts +39 -0
- package/apps/web/README.md +13 -0
- package/apps/web/app.js +483 -0
- package/apps/web/favicon.svg +6 -0
- package/apps/web/index.html +205 -0
- package/apps/web/styles.css +1823 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/README-FIRST.txt +20 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/SHA256SUMS.txt +11 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-delivery-metadata.json +25 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-design-system-evidence.zip +0 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-design-system-execution-report.md +60 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-design-system-manifest.json +106 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-design-system-source.tar.gz +0 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-design-system-source.zip +0 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-design-system.bundle +0 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-evidence-index.html +38 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-verification-status.txt +15 -0
- package/artifacts/original-delivery/NOE-Design-System-Delivery/noe-visual-contact-sheet.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/README.txt +13 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/browser-console.json +4 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/layout-audit.json +4 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/review/contact-sheet.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-dark-1024.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-dark-1280.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-dark-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-dark-390.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-dark-768.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-light-1024.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-light-1280.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-light-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-light-390.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-en-light-768.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-dark-1024.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-dark-1280.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-dark-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-dark-390.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-dark-768.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-light-1024.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-light-1280.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-light-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-light-390.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-fa-light-768.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-pseudo-ltr-1024.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/agent-pseudo-rtl-1024.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/consumer-en-light-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/consumer-fa-dark-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/dashboard-en-light-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/dashboard-fa-dark-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/workflow-en-light-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots/workflow-fa-dark-1440.png +0 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/screenshots-manifest.json +203 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/verification-result.json +165 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/verification-result.txt +32 -0
- package/artifacts/original-delivery/noe-design-system-evidence/evidence/visual-index.html +1 -0
- package/artifacts/original-delivery/noe-design-system-evidence/noe-delivery-metadata.json +25 -0
- package/artifacts/original-delivery/noe-design-system-evidence/noe-design-system-execution-report.md +60 -0
- package/artifacts/original-delivery/noe-design-system-evidence/noe-design-system-manifest.json +106 -0
- package/artifacts/original-delivery/noe-design-system-evidence/noe-verification-status.txt +15 -0
- package/artifacts/original-delivery/noe-design-system.bundle +0 -0
- package/artifacts/original-delivery/source-evidence/verification-result.json +165 -0
- package/artifacts/original-delivery/source-evidence/verification-result.txt +32 -0
- package/artifacts/registry-consumer-report.json +153 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-Black.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-Bold.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-DemiBold.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-ExtraBlack.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-ExtraBold.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-Heavy.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-Light.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-Medium.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-Regular.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-Thin.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff/IRANYekanXFaNum-UltraLight.woff +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-Black.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-Bold.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-DemiBold.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-ExtraBlack.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-ExtraBold.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-Heavy.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-Light.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-Medium.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-Regular.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-Thin.woff2 +0 -0
- package/artifacts/source-inputs/persian-fonts/Woff2/IRANYekanXFaNum-UltraLight.woff2 +0 -0
- package/biome.json +170 -0
- package/components.json +23 -0
- package/docs/adr/0001-semantic-foundation.md +5 -0
- package/docs/adr/0002-locale-direction.md +5 -0
- package/docs/adr/0003-registry-mcp.md +5 -0
- package/docs/adr/0004-testing-evidence.md +5 -0
- package/docs/adr/0005-noe-package-namespace.md +9 -0
- package/docs/adr/0006-icons8-icon-policy.md +9 -0
- package/docs/adr/0007-registry-publication-contract.md +9 -0
- package/docs/adr/0008-capability-library-adapter-boundaries.md +16 -0
- package/docs/adr/0009-calendar-system-jalali.md +29 -0
- package/docs/adr/0010-canonical-manifest-ownership.md +29 -0
- package/docs/adr/0011-palette-graphite-governance.md +27 -0
- package/docs/adr/0012-persian-font-gating.md +25 -0
- package/docs/adr/0013-cinematic-token-exception.md +32 -0
- package/docs/design-system/README.md +16 -0
- package/docs/design-system/accessibility.md +20 -0
- package/docs/design-system/agent-guide.md +11 -0
- package/docs/design-system/agentic-ui.md +21 -0
- package/docs/design-system/architecture.md +40 -0
- package/docs/design-system/brand.md +59 -0
- package/docs/design-system/ci-cd.md +46 -0
- package/docs/design-system/components.md +88 -0
- package/docs/design-system/contributing.md +7 -0
- package/docs/design-system/foundations.md +40 -0
- package/docs/design-system/i18n.md +24 -0
- package/docs/design-system/inventory.md +389 -0
- package/docs/design-system/mcp.md +7 -0
- package/docs/design-system/motion.md +7 -0
- package/docs/design-system/noe-brand-audit.md +33 -0
- package/docs/design-system/registry.md +16 -0
- package/docs/design-system/rtl.md +27 -0
- package/docs/design-system/security.md +16 -0
- package/docs/design-system/testing.md +39 -0
- package/docs/design-system/tokens.md +38 -0
- package/docs/design-system/visual-qa.md +10 -0
- package/docs/superpowers/plans/2026-08-25-noe-design-system-development-ready.md +833 -0
- package/docs/superpowers/plans/2026-08-26-noe-complete-catalog.md +422 -0
- package/docs/superpowers/specs/2026-08-25-noe-design-system-development-ready-design.md +260 -0
- package/docs/superpowers/specs/2026-08-26-noe-complete-catalog-design.md +187 -0
- package/llms.txt +20 -0
- package/package.json +68 -0
- package/packages/ai-ui/package.json +15 -0
- package/packages/ai-ui/src/activity-feed.tsx +60 -0
- package/packages/ai-ui/src/agent-composer.tsx +54 -0
- package/packages/ai-ui/src/agent-message.tsx +50 -0
- package/packages/ai-ui/src/agent-plan.tsx +69 -0
- package/packages/ai-ui/src/agent-workspace.tsx +63 -0
- package/packages/ai-ui/src/approval-request.tsx +93 -0
- package/packages/ai-ui/src/index.ts +8 -0
- package/packages/ai-ui/src/run-inspector.tsx +54 -0
- package/packages/ai-ui/src/tool-call.tsx +71 -0
- package/packages/data-ui/package.json +16 -0
- package/packages/data-ui/src/activity-gauge.tsx +38 -0
- package/packages/data-ui/src/chart-frame.tsx +41 -0
- package/packages/data-ui/src/chart.tsx +131 -0
- package/packages/data-ui/src/dashboard-01.tsx +39 -0
- package/packages/data-ui/src/dashboard-02.tsx +33 -0
- package/packages/data-ui/src/dashboard-shell.tsx +56 -0
- package/packages/data-ui/src/data-table.tsx +99 -0
- package/packages/data-ui/src/filter-bar.tsx +28 -0
- package/packages/data-ui/src/index.ts +12 -0
- package/packages/data-ui/src/metric-card.tsx +43 -0
- package/packages/data-ui/src/pagination.tsx +67 -0
- package/packages/data-ui/src/pie-chart.tsx +38 -0
- package/packages/data-ui/src/radar-chart.tsx +38 -0
- package/packages/design-tokens/package.json +23 -0
- package/packages/design-tokens/src/base.css +255 -0
- package/packages/design-tokens/src/fonts/IRANYekanXFaNum-Bold.woff2 +0 -0
- package/packages/design-tokens/src/fonts/IRANYekanXFaNum-DemiBold.woff2 +0 -0
- package/packages/design-tokens/src/fonts/IRANYekanXFaNum-Medium.woff2 +0 -0
- package/packages/design-tokens/src/fonts/IRANYekanXFaNum-Regular.woff2 +0 -0
- package/packages/design-tokens/src/fonts/IRANYekanXVF.ttf +0 -0
- package/packages/design-tokens/src/fonts/README.md +13 -0
- package/packages/design-tokens/src/fonts.css +49 -0
- package/packages/design-tokens/src/index.test.ts +36 -0
- package/packages/design-tokens/src/index.ts +5 -0
- package/packages/design-tokens/src/palette.ts +27 -0
- package/packages/design-tokens/src/tailwind.css +3 -0
- package/packages/design-tokens/src/theme.css +67 -0
- package/packages/design-tokens/src/tokens.css +251 -0
- package/packages/design-tokens/src/tokens.json +275 -0
- package/packages/design-tokens/src/tokens.mjs +276 -0
- package/packages/i18n/package.json +13 -0
- package/packages/i18n/src/index.ts +17 -0
- package/packages/i18n/src/messages/en.json +116 -0
- package/packages/i18n/src/messages/fa.json +116 -0
- package/packages/i18n/src/runtime.d.mts +42 -0
- package/packages/i18n/src/runtime.mjs +113 -0
- package/packages/i18n/src/translate.test.ts +50 -0
- package/packages/i18n/src/translate.ts +29 -0
- package/packages/icons/package.json +12 -0
- package/packages/icons/src/adapters.tsx +167 -0
- package/packages/icons/src/index.tsx +103 -0
- package/packages/registry/README.md +7 -0
- package/packages/registry/catalog-index.json +1345 -0
- package/packages/registry/component-audit.json +1038 -0
- package/packages/registry/coss-adoption.json +281 -0
- package/packages/registry/docs-index.json +1881 -0
- package/packages/registry/manifest.json +11081 -0
- package/packages/registry/manifest.schema.json +135 -0
- package/packages/registry/package.json +10 -0
- package/packages/registry/r/activity-feed.json +67 -0
- package/packages/registry/r/agent-composer.json +79 -0
- package/packages/registry/r/agent-message.json +72 -0
- package/packages/registry/r/agent-plan.json +67 -0
- package/packages/registry/r/agent-workspace.json +67 -0
- package/packages/registry/r/alert.json +68 -0
- package/packages/registry/r/app-frame.json +67 -0
- package/packages/registry/r/approval-request.json +84 -0
- package/packages/registry/r/badge.json +68 -0
- package/packages/registry/r/bidi-text.json +70 -0
- package/packages/registry/r/bottom-navigation.json +67 -0
- package/packages/registry/r/button.json +83 -0
- package/packages/registry/r/calendar.json +97 -0
- package/packages/registry/r/card.json +67 -0
- package/packages/registry/r/chart-frame.json +67 -0
- package/packages/registry/r/chart.json +67 -0
- package/packages/registry/r/code-block.json +67 -0
- package/packages/registry/r/context-menu.json +81 -0
- package/packages/registry/r/dashboard-01.json +86 -0
- package/packages/registry/r/dashboard-02.json +84 -0
- package/packages/registry/r/dashboard-shell.json +67 -0
- package/packages/registry/r/data-list.json +67 -0
- package/packages/registry/r/data-table.json +72 -0
- package/packages/registry/r/date-picker.json +117 -0
- package/packages/registry/r/dialog.json +84 -0
- package/packages/registry/r/direction-provider.json +54 -0
- package/packages/registry/r/drawer.json +80 -0
- package/packages/registry/r/dropdown.json +78 -0
- package/packages/registry/r/empty-state.json +67 -0
- package/packages/registry/r/error-state.json +67 -0
- package/packages/registry/r/fab.json +80 -0
- package/packages/registry/r/featured-icon.json +71 -0
- package/packages/registry/r/filter-bar.json +69 -0
- package/packages/registry/r/gradient-picker.json +62 -0
- package/packages/registry/r/header-navigation.json +67 -0
- package/packages/registry/r/hero-header.json +63 -0
- package/packages/registry/r/icon-system.json +59 -0
- package/packages/registry/r/image-picker.json +62 -0
- package/packages/registry/r/inline-cta.json +73 -0
- package/packages/registry/r/input.json +73 -0
- package/packages/registry/r/landing-page.json +70 -0
- package/packages/registry/r/login-page.json +71 -0
- package/packages/registry/r/marketing-header.json +63 -0
- package/packages/registry/r/menu.json +74 -0
- package/packages/registry/r/messaging.json +69 -0
- package/packages/registry/r/metric-card.json +67 -0
- package/packages/registry/r/mobile-screen.json +67 -0
- package/packages/registry/r/not-found.json +63 -0
- package/packages/registry/r/page-header.json +67 -0
- package/packages/registry/r/pagination.json +91 -0
- package/packages/registry/r/progress-steps.json +69 -0
- package/packages/registry/r/run-inspector.json +72 -0
- package/packages/registry/r/section-header.json +67 -0
- package/packages/registry/r/settings-01.json +94 -0
- package/packages/registry/r/settings-02.json +99 -0
- package/packages/registry/r/settings-page.json +67 -0
- package/packages/registry/r/sidebar-navigation.json +67 -0
- package/packages/registry/r/sign-in-form.json +89 -0
- package/packages/registry/r/skeleton.json +67 -0
- package/packages/registry/r/spinner.json +67 -0
- package/packages/registry/r/tabs.json +69 -0
- package/packages/registry/r/textarea.json +73 -0
- package/packages/registry/r/tool-call.json +72 -0
- package/packages/registry/r/tooltip.json +73 -0
- package/packages/registry/r/utility-button.json +83 -0
- package/packages/registry/r/workflow-canvas.json +67 -0
- package/packages/registry/r/workflow-node.json +72 -0
- package/packages/registry/r-planned-backup/about-page.json +14 -0
- package/packages/registry/r-planned-backup/activity-gauge.json +14 -0
- package/packages/registry/r-planned-backup/avatar.json +14 -0
- package/packages/registry/r-planned-backup/badge-group.json +14 -0
- package/packages/registry/r-planned-backup/banner.json +14 -0
- package/packages/registry/r-planned-backup/blog-index-page.json +14 -0
- package/packages/registry/r-planned-backup/blog-post-page.json +14 -0
- package/packages/registry/r-planned-backup/blog-section.json +14 -0
- package/packages/registry/r-planned-backup/button-group.json +14 -0
- package/packages/registry/r-planned-backup/careers-section.json +14 -0
- package/packages/registry/r-planned-backup/carousel.json +14 -0
- package/packages/registry/r-planned-backup/checkbox.json +14 -0
- package/packages/registry/r-planned-backup/color-picker.json +14 -0
- package/packages/registry/r-planned-backup/command-menu.json +14 -0
- package/packages/registry/r-planned-backup/contact-page.json +14 -0
- package/packages/registry/r-planned-backup/contact-section.json +14 -0
- package/packages/registry/r-planned-backup/content-divider.json +14 -0
- package/packages/registry/r-planned-backup/content-section.json +14 -0
- package/packages/registry/r-planned-backup/credit-card.json +14 -0
- package/packages/registry/r-planned-backup/cta-section.json +14 -0
- package/packages/registry/r-planned-backup/email-template.json +14 -0
- package/packages/registry/r-planned-backup/faq-page.json +14 -0
- package/packages/registry/r-planned-backup/faq-section.json +14 -0
- package/packages/registry/r-planned-backup/feature-section.json +14 -0
- package/packages/registry/r-planned-backup/file-uploader.json +14 -0
- package/packages/registry/r-planned-backup/footer.json +14 -0
- package/packages/registry/r-planned-backup/forgot-password-page.json +14 -0
- package/packages/registry/r-planned-backup/illustration.json +14 -0
- package/packages/registry/r-planned-backup/informational-page-01.json +14 -0
- package/packages/registry/r-planned-backup/informational-page-02.json +14 -0
- package/packages/registry/r-planned-backup/legal-page.json +14 -0
- package/packages/registry/r-planned-backup/marketing-404-page.json +14 -0
- package/packages/registry/r-planned-backup/metrics-section.json +14 -0
- package/packages/registry/r-planned-backup/multi-select.json +14 -0
- package/packages/registry/r-planned-backup/newsletter.json +14 -0
- package/packages/registry/r-planned-backup/notification.json +14 -0
- package/packages/registry/r-planned-backup/pie-chart.json +14 -0
- package/packages/registry/r-planned-backup/pricing-page.json +14 -0
- package/packages/registry/r-planned-backup/pricing-section.json +14 -0
- package/packages/registry/r-planned-backup/progress-indicator.json +14 -0
- package/packages/registry/r-planned-backup/qr-code.json +14 -0
- package/packages/registry/r-planned-backup/radar-chart.json +14 -0
- package/packages/registry/r-planned-backup/radio-group.json +14 -0
- package/packages/registry/r-planned-backup/rating.json +14 -0
- package/packages/registry/r-planned-backup/rich-text-editor.json +14 -0
- package/packages/registry/r-planned-backup/section-footer.json +14 -0
- package/packages/registry/r-planned-backup/select.json +14 -0
- package/packages/registry/r-planned-backup/sign-up-page.json +14 -0
- package/packages/registry/r-planned-backup/slider.json +14 -0
- package/packages/registry/r-planned-backup/social-button.json +14 -0
- package/packages/registry/r-planned-backup/social-proof.json +14 -0
- package/packages/registry/r-planned-backup/store-button.json +14 -0
- package/packages/registry/r-planned-backup/tags.json +14 -0
- package/packages/registry/r-planned-backup/team-page.json +14 -0
- package/packages/registry/r-planned-backup/team-section.json +14 -0
- package/packages/registry/r-planned-backup/testimonial-section.json +14 -0
- package/packages/registry/r-planned-backup/toggle.json +14 -0
- package/packages/registry/r-planned-backup/tree-view.json +14 -0
- package/packages/registry/r-planned-backup/verification-code.json +14 -0
- package/packages/registry/r-planned-backup/verification-page.json +14 -0
- package/packages/registry/r-planned-backup/video-player.json +14 -0
- package/packages/registry/registry.json +1997 -0
- package/packages/registry/search-index.json +3942 -0
- package/packages/testing/package.json +9 -0
- package/packages/testing/src/index.mjs +10 -0
- package/packages/ui/package.json +26 -0
- package/packages/ui/src/about-page.tsx +19 -0
- package/packages/ui/src/alert.tsx +67 -0
- package/packages/ui/src/app-frame.tsx +63 -0
- package/packages/ui/src/avatar.tsx +19 -0
- package/packages/ui/src/badge-group.tsx +19 -0
- package/packages/ui/src/badge.tsx +35 -0
- package/packages/ui/src/banner.tsx +19 -0
- package/packages/ui/src/bidi.tsx +80 -0
- package/packages/ui/src/blog-index-page.tsx +19 -0
- package/packages/ui/src/blog-post-page.tsx +19 -0
- package/packages/ui/src/blog-section.tsx +19 -0
- package/packages/ui/src/bottom-navigation.tsx +60 -0
- package/packages/ui/src/button-group.tsx +19 -0
- package/packages/ui/src/button.browser.test.tsx +38 -0
- package/packages/ui/src/button.tsx +81 -0
- package/packages/ui/src/calendar-system.test.ts +103 -0
- package/packages/ui/src/calendar-system.ts +120 -0
- package/packages/ui/src/calendar.browser.test.tsx +52 -0
- package/packages/ui/src/calendar.tsx +339 -0
- package/packages/ui/src/card.tsx +63 -0
- package/packages/ui/src/careers-section.tsx +19 -0
- package/packages/ui/src/carousel.tsx +19 -0
- package/packages/ui/src/checkbox.tsx +17 -0
- package/packages/ui/src/cinematic/cinematic.css +2020 -0
- package/packages/ui/src/cinematic/ecosystem-motion-showcase.tsx +265 -0
- package/packages/ui/src/cinematic/ecosystem-sphere.tsx +627 -0
- package/packages/ui/src/cinematic/index.ts +5 -0
- package/packages/ui/src/cinematic/kinetic-experience.tsx +207 -0
- package/packages/ui/src/cinematic/portfolio.ts +132 -0
- package/packages/ui/src/cinematic/system-anatomy.tsx +173 -0
- package/packages/ui/src/code.tsx +119 -0
- package/packages/ui/src/color-picker.tsx +22 -0
- package/packages/ui/src/command-menu.tsx +19 -0
- package/packages/ui/src/contact-page.tsx +19 -0
- package/packages/ui/src/contact-section.tsx +19 -0
- package/packages/ui/src/content-divider.tsx +19 -0
- package/packages/ui/src/content-section.tsx +19 -0
- package/packages/ui/src/context-menu.tsx +208 -0
- package/packages/ui/src/credit-card.tsx +19 -0
- package/packages/ui/src/cta-section.tsx +19 -0
- package/packages/ui/src/data-list.tsx +81 -0
- package/packages/ui/src/date-picker.browser.test.tsx +48 -0
- package/packages/ui/src/date-picker.tsx +248 -0
- package/packages/ui/src/dialog.browser.test.tsx +32 -0
- package/packages/ui/src/dialog.tsx +144 -0
- package/packages/ui/src/direction.tsx +46 -0
- package/packages/ui/src/drawer.tsx +179 -0
- package/packages/ui/src/dropdown.tsx +200 -0
- package/packages/ui/src/email-template.tsx +19 -0
- package/packages/ui/src/empty-state.tsx +43 -0
- package/packages/ui/src/error-state.tsx +44 -0
- package/packages/ui/src/fab.tsx +32 -0
- package/packages/ui/src/faq-page.tsx +19 -0
- package/packages/ui/src/faq-section.tsx +19 -0
- package/packages/ui/src/feature-section.tsx +19 -0
- package/packages/ui/src/featured-icon.tsx +63 -0
- package/packages/ui/src/field.browser.test.tsx +33 -0
- package/packages/ui/src/field.tsx +117 -0
- package/packages/ui/src/file-uploader.tsx +19 -0
- package/packages/ui/src/footer.tsx +19 -0
- package/packages/ui/src/forgot-password-page.tsx +19 -0
- package/packages/ui/src/gradient-picker.tsx +65 -0
- package/packages/ui/src/header-navigation.tsx +71 -0
- package/packages/ui/src/hero-header.tsx +57 -0
- package/packages/ui/src/illustration.tsx +19 -0
- package/packages/ui/src/image-picker.tsx +56 -0
- package/packages/ui/src/index.ts +110 -0
- package/packages/ui/src/informational-page-01.tsx +19 -0
- package/packages/ui/src/informational-page-02.tsx +19 -0
- package/packages/ui/src/inline-cta.tsx +29 -0
- package/packages/ui/src/input.tsx +44 -0
- package/packages/ui/src/landing-page.tsx +56 -0
- package/packages/ui/src/legal-page.tsx +19 -0
- package/packages/ui/src/lib/cn.ts +6 -0
- package/packages/ui/src/lib/i18n-messages.ts +40 -0
- package/packages/ui/src/login-page.tsx +78 -0
- package/packages/ui/src/marketing-404-page.tsx +19 -0
- package/packages/ui/src/marketing-header.tsx +53 -0
- package/packages/ui/src/menu.tsx +220 -0
- package/packages/ui/src/messaging.tsx +62 -0
- package/packages/ui/src/metrics-section.tsx +19 -0
- package/packages/ui/src/mobile-screen.tsx +37 -0
- package/packages/ui/src/multi-select.tsx +16 -0
- package/packages/ui/src/newsletter.tsx +19 -0
- package/packages/ui/src/not-found.tsx +60 -0
- package/packages/ui/src/notification.tsx +19 -0
- package/packages/ui/src/page-header.tsx +80 -0
- package/packages/ui/src/pricing-page.tsx +19 -0
- package/packages/ui/src/pricing-section.tsx +19 -0
- package/packages/ui/src/progress-indicator.tsx +19 -0
- package/packages/ui/src/progress-steps.tsx +85 -0
- package/packages/ui/src/qr-code.tsx +19 -0
- package/packages/ui/src/radio-group.tsx +26 -0
- package/packages/ui/src/rating.tsx +19 -0
- package/packages/ui/src/rich-text-editor.tsx +18 -0
- package/packages/ui/src/section-footer.tsx +19 -0
- package/packages/ui/src/section-header.tsx +37 -0
- package/packages/ui/src/select.tsx +27 -0
- package/packages/ui/src/settings-01.tsx +49 -0
- package/packages/ui/src/settings-02.tsx +58 -0
- package/packages/ui/src/settings-page.tsx +62 -0
- package/packages/ui/src/sidebar-navigation.tsx +77 -0
- package/packages/ui/src/sign-in-form.tsx +60 -0
- package/packages/ui/src/sign-up-page.tsx +19 -0
- package/packages/ui/src/skeleton.tsx +14 -0
- package/packages/ui/src/slider.tsx +13 -0
- package/packages/ui/src/social-button.tsx +19 -0
- package/packages/ui/src/social-proof.tsx +19 -0
- package/packages/ui/src/spinner.tsx +26 -0
- package/packages/ui/src/store-button.tsx +19 -0
- package/packages/ui/src/tabs.browser.test.tsx +33 -0
- package/packages/ui/src/tabs.tsx +175 -0
- package/packages/ui/src/tags.tsx +11 -0
- package/packages/ui/src/team-page.tsx +19 -0
- package/packages/ui/src/team-section.tsx +19 -0
- package/packages/ui/src/testimonial-section.tsx +19 -0
- package/packages/ui/src/textarea.tsx +45 -0
- package/packages/ui/src/theme-provider.browser.test.tsx +90 -0
- package/packages/ui/src/theme-provider.tsx +417 -0
- package/packages/ui/src/theme-toggle.tsx +107 -0
- package/packages/ui/src/toggle.tsx +34 -0
- package/packages/ui/src/tooltip.tsx +50 -0
- package/packages/ui/src/tree-view.tsx +19 -0
- package/packages/ui/src/utility-button.tsx +33 -0
- package/packages/ui/src/utils.ts +13 -0
- package/packages/ui/src/verification-code.tsx +27 -0
- package/packages/ui/src/verification-page.tsx +19 -0
- package/packages/ui/src/video-player.tsx +19 -0
- package/packages/workflow-ui/package.json +15 -0
- package/packages/workflow-ui/src/index.ts +2 -0
- package/packages/workflow-ui/src/workflow-canvas.tsx +51 -0
- package/packages/workflow-ui/src/workflow-node.tsx +61 -0
- package/playwright.config.ts +58 -0
- package/pnpm-workspace.yaml +5 -0
- package/registry.json +216 -0
- package/scripts/build-static.mjs +68 -0
- package/scripts/capture-visuals.py +106 -0
- package/scripts/capture-visuals.sh +10 -0
- package/scripts/create-visual-index.mjs +16 -0
- package/scripts/enrich-registry-payloads.mjs +83 -0
- package/scripts/fix-noe-imports.mjs +134 -0
- package/scripts/fix-registry-closure.mjs +110 -0
- package/scripts/fix-registry-deps-cleanup.mjs +149 -0
- package/scripts/fix-relative-for-registry.mjs +103 -0
- package/scripts/generate-design-tokens.mjs +134 -0
- package/scripts/generate-inventory.mjs +62 -0
- package/scripts/generate-manifest.mjs +1149 -0
- package/scripts/generate-phase4.mjs +875 -0
- package/scripts/validate-manifest.mjs +477 -0
- package/scripts/validate-pngs.mjs +31 -0
- package/scripts/verify-registry-consumer.mjs +319 -0
- package/scripts/verify-registry-dependencies.mjs +162 -0
- package/scripts/verify.mjs +316 -0
- package/tests/catalog-audit.test.mjs +156 -0
- package/tests/e2e/capture-visuals.mjs +34 -0
- package/tests/e2e/catalog-typography.spec.ts +110 -0
- package/tests/e2e/catalog.spec.ts +68 -0
- package/tests/e2e/direction.spec.ts +60 -0
- package/tests/e2e/responsive.spec.ts +30 -0
- package/tests/e2e/surfaces.spec.ts +51 -0
- package/tests/i18n.test.mjs +36 -0
- package/tests/icons.test.mjs +21 -0
- package/tests/registry-publication.test.mjs +88 -0
- package/tests/registry.test.mjs +51 -0
- package/tests/rtl.test.mjs +21 -0
- package/tests/static-app.test.mjs +49 -0
- package/tests/tokens.test.mjs +24 -0
- package/tests/workspace.test.mjs +25 -0
- package/tsconfig.base.json +69 -0
- package/tsconfig.json +27 -0
- package/tsconfig.verify.json +19 -0
- package/types/offline-react.d.ts +73 -0
- package/vitest.config.ts +91 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { expect, test } from 'vitest';
|
|
2
|
+
import { render } from 'vitest-browser-react';
|
|
3
|
+
import type { CatalogEntry } from './catalog-index';
|
|
4
|
+
import { CatalogShell } from './catalog-shell';
|
|
5
|
+
|
|
6
|
+
const entries: CatalogEntry[] = [
|
|
7
|
+
{
|
|
8
|
+
id: 'dialog',
|
|
9
|
+
category: 'Overlays',
|
|
10
|
+
status: 'available',
|
|
11
|
+
name: 'Dialog',
|
|
12
|
+
description: 'Direction-preserving modal primitive.',
|
|
13
|
+
package: '@noe/ui',
|
|
14
|
+
registryItem: 'dialog',
|
|
15
|
+
preview: () => <span>Dialog preview</span>,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'button',
|
|
19
|
+
category: 'Primitives / Actions',
|
|
20
|
+
status: 'available',
|
|
21
|
+
name: 'Button',
|
|
22
|
+
description: 'Primary action primitive.',
|
|
23
|
+
package: '@noe/ui',
|
|
24
|
+
registryItem: 'button',
|
|
25
|
+
preview: () => <span>Button preview</span>,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'select',
|
|
29
|
+
category: 'Primitives / Forms',
|
|
30
|
+
status: 'planned',
|
|
31
|
+
name: 'Select',
|
|
32
|
+
description: 'Not yet adopted.',
|
|
33
|
+
package: '@noe/ui',
|
|
34
|
+
registryItem: null,
|
|
35
|
+
preview: () => <span>Select preview</span>,
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
test('filters the component inventory and exposes the selected audit state', async () => {
|
|
40
|
+
const screen = await render(<CatalogShell initialEntries={entries} />);
|
|
41
|
+
|
|
42
|
+
await expect.element(screen.getByRole('heading', { name: 'Dialog' })).toBeVisible();
|
|
43
|
+
await expect.element(screen.getByRole('heading', { name: 'Button' })).toBeVisible();
|
|
44
|
+
|
|
45
|
+
const search = screen.getByRole('searchbox', { name: /search components/i });
|
|
46
|
+
await search.fill('dialog');
|
|
47
|
+
|
|
48
|
+
await expect.element(screen.getByRole('heading', { name: 'Dialog' })).toBeVisible();
|
|
49
|
+
await expect.element(screen.getByRole('heading', { name: 'Button' })).not.toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('opens a component detail view and returns to the grid', async () => {
|
|
53
|
+
const screen = await render(<CatalogShell initialEntries={entries} />);
|
|
54
|
+
|
|
55
|
+
await screen
|
|
56
|
+
.getByRole('button', { name: /view details/i })
|
|
57
|
+
.first()
|
|
58
|
+
.click();
|
|
59
|
+
await expect.element(screen.getByRole('heading', { level: 2 })).toBeVisible();
|
|
60
|
+
|
|
61
|
+
await screen.getByRole('button', { name: /back to catalog/i }).click();
|
|
62
|
+
await expect.element(screen.getByRole('heading', { name: 'Dialog' })).toBeVisible();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test('switching locale to Persian updates document direction to rtl', async () => {
|
|
66
|
+
const screen = await render(<CatalogShell initialEntries={entries} />);
|
|
67
|
+
|
|
68
|
+
const localeSelect = screen.getByRole('combobox').nth(1);
|
|
69
|
+
await localeSelect.selectOptions('fa');
|
|
70
|
+
|
|
71
|
+
await expect.poll(() => document.documentElement.dir).toBe('rtl');
|
|
72
|
+
await expect.poll(() => document.documentElement.lang).toBe('fa');
|
|
73
|
+
});
|
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { DirectionProvider } from '@noe/ui';
|
|
4
|
+
import type { Direction, DirectionOverride, LocaleCode } from '@noe/i18n';
|
|
5
|
+
import { applyDocumentLocale, getLocaleMetadata, pseudoLocalize } from '@noe/i18n';
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
catalogCategories,
|
|
9
|
+
catalogEntries,
|
|
10
|
+
type CatalogEntry,
|
|
11
|
+
type CatalogStatus,
|
|
12
|
+
} from './catalog-index';
|
|
13
|
+
import { getMessages } from '@noe/i18n';
|
|
14
|
+
|
|
15
|
+
const statusLabelKey: Record<CatalogStatus, string> = {
|
|
16
|
+
available: 'catalog.status.available',
|
|
17
|
+
'in-progress': 'catalog.status.inProgress',
|
|
18
|
+
planned: 'catalog.status.planned',
|
|
19
|
+
partial: 'catalog.status.planned',
|
|
20
|
+
experimental: 'catalog.status.inProgress',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const statusBadgeClassName: Record<CatalogStatus, string> = {
|
|
24
|
+
available: 'border-success/30 bg-success/10 text-success',
|
|
25
|
+
'in-progress': 'border-warning/40 bg-warning/15 text-warning-foreground',
|
|
26
|
+
planned: 'border-border bg-muted text-muted-foreground',
|
|
27
|
+
partial: 'border-warning/40 bg-warning/15 text-warning-foreground',
|
|
28
|
+
experimental: 'border-border bg-muted text-muted-foreground',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
function readParam(name: string): string | null {
|
|
32
|
+
if (typeof window === 'undefined') return null;
|
|
33
|
+
return new URLSearchParams(window.location.search).get(name);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function writeParams(next: Record<string, string | null>) {
|
|
37
|
+
if (typeof window === 'undefined') return;
|
|
38
|
+
const params = new URLSearchParams(window.location.search);
|
|
39
|
+
for (const [key, value] of Object.entries(next)) {
|
|
40
|
+
if (value === null || value === '') params.delete(key);
|
|
41
|
+
else params.set(key, value);
|
|
42
|
+
}
|
|
43
|
+
const query = params.toString();
|
|
44
|
+
window.history.replaceState(null, '', query ? `?${query}` : window.location.pathname);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface CatalogShellProps {
|
|
48
|
+
initialEntries?: readonly CatalogEntry[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CatalogShell({ initialEntries = catalogEntries }: CatalogShellProps) {
|
|
52
|
+
const [locale, setLocale] = React.useState<LocaleCode>(
|
|
53
|
+
() => (readParam('locale') as LocaleCode | null) ?? 'en',
|
|
54
|
+
);
|
|
55
|
+
const [directionOverride, setDirectionOverride] = React.useState<DirectionOverride>(
|
|
56
|
+
() => (readParam('direction') as DirectionOverride | null) ?? 'auto',
|
|
57
|
+
);
|
|
58
|
+
const [effectiveLocale, setEffectiveLocale] = React.useState<LocaleCode>(() => {
|
|
59
|
+
const initial = (readParam('locale') as LocaleCode | null) ?? 'en';
|
|
60
|
+
return initial === 'fa' ? 'en' : initial;
|
|
61
|
+
});
|
|
62
|
+
const [theme, setTheme] = React.useState<'light' | 'dark'>(
|
|
63
|
+
() => (readParam('theme') as 'light' | 'dark' | null) ?? 'light',
|
|
64
|
+
);
|
|
65
|
+
const [search, setSearch] = React.useState(() => readParam('q') ?? '');
|
|
66
|
+
const [category, setCategory] = React.useState<string>(() => readParam('category') ?? 'all');
|
|
67
|
+
const [statusFilter, setStatusFilter] = React.useState<CatalogStatus | 'all'>('all');
|
|
68
|
+
const [selectedId, setSelectedId] = React.useState<string | null>(() => readParam('component'));
|
|
69
|
+
|
|
70
|
+
const localeMeta = getLocaleMetadata(effectiveLocale);
|
|
71
|
+
const direction: Direction =
|
|
72
|
+
directionOverride === 'auto' ? localeMeta.direction : directionOverride;
|
|
73
|
+
const baseMessages: Record<string, string> = getMessages(effectiveLocale) as unknown as Record<
|
|
74
|
+
string,
|
|
75
|
+
string
|
|
76
|
+
>;
|
|
77
|
+
|
|
78
|
+
const t = React.useCallback(
|
|
79
|
+
(key: string) => {
|
|
80
|
+
const raw = baseMessages[key] ?? key;
|
|
81
|
+
return localeMeta.pseudo ? pseudoLocalize(raw, localeMeta.pseudo) : raw;
|
|
82
|
+
},
|
|
83
|
+
[baseMessages, localeMeta.pseudo],
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
if (locale !== 'fa') {
|
|
88
|
+
setEffectiveLocale(locale);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (effectiveLocale === 'fa') return;
|
|
92
|
+
let cancelled = false;
|
|
93
|
+
const fontSpec = '16px IRANYekanX';
|
|
94
|
+
const FONT_TIMEOUT_MS = 3000;
|
|
95
|
+
const check = () => {
|
|
96
|
+
try {
|
|
97
|
+
return (
|
|
98
|
+
typeof document !== 'undefined' &&
|
|
99
|
+
(document as unknown as { fonts?: { check: (s: string) => boolean } }).fonts?.check(fontSpec) === true
|
|
100
|
+
);
|
|
101
|
+
} catch {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const markReady = () => {
|
|
106
|
+
if (!cancelled) setEffectiveLocale('fa');
|
|
107
|
+
};
|
|
108
|
+
if (check()) {
|
|
109
|
+
markReady();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const hasLoad = typeof document !== 'undefined' && typeof (document as unknown as { fonts?: { load: (s: string) => Promise<unknown> } }).fonts?.load === 'function';
|
|
113
|
+
if (hasLoad) {
|
|
114
|
+
let timedOut = false;
|
|
115
|
+
const timeoutId = setTimeout(() => {
|
|
116
|
+
timedOut = true;
|
|
117
|
+
// keep English on timeout — do not activate Persian without confirmed font
|
|
118
|
+
}, FONT_TIMEOUT_MS);
|
|
119
|
+
(document as unknown as { fonts: { load: (s: string) => Promise<unknown> } }).fonts
|
|
120
|
+
.load(fontSpec)
|
|
121
|
+
.then(() => {
|
|
122
|
+
clearTimeout(timeoutId);
|
|
123
|
+
if (timedOut || cancelled) return;
|
|
124
|
+
if (check()) markReady();
|
|
125
|
+
})
|
|
126
|
+
.catch(() => {
|
|
127
|
+
clearTimeout(timeoutId);
|
|
128
|
+
});
|
|
129
|
+
return () => {
|
|
130
|
+
cancelled = true;
|
|
131
|
+
clearTimeout(timeoutId);
|
|
132
|
+
};
|
|
133
|
+
} else {
|
|
134
|
+
// Unsupported Font Loading API — keep English, do not switch to Persian
|
|
135
|
+
return () => {
|
|
136
|
+
cancelled = true;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}, [locale, effectiveLocale]);
|
|
140
|
+
|
|
141
|
+
React.useLayoutEffect(() => {
|
|
142
|
+
applyDocumentLocale(document.documentElement, effectiveLocale, directionOverride);
|
|
143
|
+
document.documentElement.dataset.theme = theme;
|
|
144
|
+
}, [effectiveLocale, directionOverride, theme]);
|
|
145
|
+
|
|
146
|
+
React.useEffect(() => {
|
|
147
|
+
writeParams({
|
|
148
|
+
locale,
|
|
149
|
+
direction: directionOverride === 'auto' ? null : directionOverride,
|
|
150
|
+
theme: theme === 'light' ? null : theme,
|
|
151
|
+
q: search || null,
|
|
152
|
+
category: category === 'all' ? null : category,
|
|
153
|
+
component: selectedId,
|
|
154
|
+
});
|
|
155
|
+
}, [locale, directionOverride, theme, search, category, selectedId]);
|
|
156
|
+
|
|
157
|
+
const filtered = React.useMemo(() => {
|
|
158
|
+
const needle = search.trim().toLowerCase();
|
|
159
|
+
return initialEntries.filter((entry) => {
|
|
160
|
+
if (category !== 'all' && entry.category !== category) return false;
|
|
161
|
+
if (statusFilter !== 'all' && entry.status !== statusFilter) return false;
|
|
162
|
+
if (!needle) return true;
|
|
163
|
+
return (
|
|
164
|
+
entry.name.toLowerCase().includes(needle) ||
|
|
165
|
+
entry.description.toLowerCase().includes(needle) ||
|
|
166
|
+
entry.category.toLowerCase().includes(needle) ||
|
|
167
|
+
entry.id.includes(needle)
|
|
168
|
+
);
|
|
169
|
+
});
|
|
170
|
+
}, [initialEntries, search, category, statusFilter]);
|
|
171
|
+
|
|
172
|
+
const selectedEntry = selectedId ? initialEntries.find((entry) => entry.id === selectedId) : null;
|
|
173
|
+
|
|
174
|
+
const counts = React.useMemo(() => {
|
|
175
|
+
const result: Record<CatalogStatus, number> = {
|
|
176
|
+
available: 0,
|
|
177
|
+
'in-progress': 0,
|
|
178
|
+
planned: 0,
|
|
179
|
+
partial: 0,
|
|
180
|
+
experimental: 0,
|
|
181
|
+
};
|
|
182
|
+
for (const entry of initialEntries) result[entry.status] += 1;
|
|
183
|
+
return result;
|
|
184
|
+
}, [initialEntries]);
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<DirectionProvider direction={direction}>
|
|
188
|
+
<div className="min-h-dvh bg-background text-foreground" data-noe-app-root data-theme={theme}>
|
|
189
|
+
<header className="bg-surface-raised">
|
|
190
|
+
<div className="mx-auto flex max-w-7xl flex-col gap-4 px-6 py-8">
|
|
191
|
+
<div className="flex flex-wrap items-start justify-between gap-4">
|
|
192
|
+
<div className="flex flex-col gap-1.5">
|
|
193
|
+
<p
|
|
194
|
+
className="m-0 font-mono text-xs uppercase tracking-wide text-muted-foreground"
|
|
195
|
+
dir="ltr"
|
|
196
|
+
>
|
|
197
|
+
NOECOSYSTEM / DESIGN SYSTEM
|
|
198
|
+
</p>
|
|
199
|
+
<h1 className="m-0 font-heading text-2xl font-semibold tracking-tight sm:text-3xl">
|
|
200
|
+
{t('catalog.title')}
|
|
201
|
+
</h1>
|
|
202
|
+
<p className="m-0 max-w-2xl text-sm leading-normal text-muted-foreground">
|
|
203
|
+
{t('catalog.subtitle')}
|
|
204
|
+
</p>
|
|
205
|
+
</div>
|
|
206
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
207
|
+
<label className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
|
208
|
+
<span className="sr-only">Theme</span>
|
|
209
|
+
<select
|
|
210
|
+
className="h-(--noe-control-height-sm) rounded-md border border-border bg-background px-2 text-sm text-foreground"
|
|
211
|
+
onChange={(event) => setTheme(event.target.value as 'light' | 'dark')}
|
|
212
|
+
value={theme}
|
|
213
|
+
>
|
|
214
|
+
<option value="light">Light</option>
|
|
215
|
+
<option value="dark">Dark</option>
|
|
216
|
+
</select>
|
|
217
|
+
</label>
|
|
218
|
+
<label className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
|
219
|
+
<span className="sr-only">Locale</span>
|
|
220
|
+
<select
|
|
221
|
+
className="h-(--noe-control-height-sm) rounded-md border border-border bg-background px-2 text-sm text-foreground"
|
|
222
|
+
onChange={(event) => setLocale(event.target.value as LocaleCode)}
|
|
223
|
+
value={locale}
|
|
224
|
+
>
|
|
225
|
+
<option value="en">{t('catalog.locale.en')}</option>
|
|
226
|
+
<option value="fa">{t('catalog.locale.fa')}</option>
|
|
227
|
+
<option value="en-XA">{t('catalog.locale.pseudoLTR')}</option>
|
|
228
|
+
<option value="ar-XB">{t('catalog.locale.pseudoRTL')}</option>
|
|
229
|
+
</select>
|
|
230
|
+
</label>
|
|
231
|
+
<label className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
|
232
|
+
<span className="sr-only">Direction</span>
|
|
233
|
+
<select
|
|
234
|
+
className="h-(--noe-control-height-sm) rounded-md border border-border bg-background px-2 text-sm text-foreground"
|
|
235
|
+
onChange={(event) =>
|
|
236
|
+
setDirectionOverride(event.target.value as DirectionOverride)
|
|
237
|
+
}
|
|
238
|
+
value={directionOverride}
|
|
239
|
+
>
|
|
240
|
+
<option value="auto">Auto</option>
|
|
241
|
+
<option value="ltr">LTR</option>
|
|
242
|
+
<option value="rtl">RTL</option>
|
|
243
|
+
</select>
|
|
244
|
+
</label>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
</header>
|
|
249
|
+
|
|
250
|
+
{selectedEntry ? (
|
|
251
|
+
<CatalogDetail
|
|
252
|
+
entry={selectedEntry}
|
|
253
|
+
onBack={() => setSelectedId(null)}
|
|
254
|
+
t={t}
|
|
255
|
+
locale={effectiveLocale}
|
|
256
|
+
direction={direction}
|
|
257
|
+
/>
|
|
258
|
+
) : (
|
|
259
|
+
<main className="mx-auto max-w-7xl px-6 py-8">
|
|
260
|
+
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
261
|
+
<input
|
|
262
|
+
aria-label={t('catalog.searchPlaceholder')}
|
|
263
|
+
className="h-(--noe-control-height-md) w-full max-w-sm rounded-md border border-border bg-background px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:border-accent focus-visible:ring-2 focus-visible:ring-focus-ring"
|
|
264
|
+
onChange={(event) => setSearch(event.target.value)}
|
|
265
|
+
placeholder={t('catalog.searchPlaceholder')}
|
|
266
|
+
type="search"
|
|
267
|
+
value={search}
|
|
268
|
+
/>
|
|
269
|
+
<fieldset className="flex flex-wrap gap-1.5 border-0 p-0 m-0">
|
|
270
|
+
<legend className="sr-only">{t('catalog.allCategories')}</legend>
|
|
271
|
+
<CategoryPill active={category === 'all'} onClick={() => setCategory('all')}>
|
|
272
|
+
{t('catalog.allCategories')}
|
|
273
|
+
</CategoryPill>
|
|
274
|
+
{catalogCategories.map((cat) => (
|
|
275
|
+
<CategoryPill
|
|
276
|
+
active={category === cat}
|
|
277
|
+
key={cat}
|
|
278
|
+
onClick={() => setCategory(cat)}
|
|
279
|
+
>
|
|
280
|
+
{cat}
|
|
281
|
+
</CategoryPill>
|
|
282
|
+
))}
|
|
283
|
+
</fieldset>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
<div className="mt-4 flex flex-wrap items-center gap-2">
|
|
287
|
+
{(['available', 'in-progress', 'planned'] as const).map((status) => (
|
|
288
|
+
<button
|
|
289
|
+
aria-pressed={statusFilter === status}
|
|
290
|
+
className={`inline-flex items-center gap-1.5 rounded-pill border px-2.5 py-1 text-xs font-medium transition-colors ${statusBadgeClassName[status]} ${statusFilter === status ? 'ring-2 ring-focus-ring' : ''}`}
|
|
291
|
+
key={status}
|
|
292
|
+
onClick={() =>
|
|
293
|
+
setStatusFilter((current) => (current === status ? 'all' : status))
|
|
294
|
+
}
|
|
295
|
+
type="button"
|
|
296
|
+
>
|
|
297
|
+
{t(statusLabelKey[status])} · {counts[status]}
|
|
298
|
+
</button>
|
|
299
|
+
))}
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
{filtered.length === 0 ? (
|
|
303
|
+
<p className="mt-10 text-sm text-muted-foreground">{t('catalog.resultsEmpty')}</p>
|
|
304
|
+
) : (
|
|
305
|
+
<div className="mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
306
|
+
{filtered.map((entry) => (
|
|
307
|
+
<CatalogCard
|
|
308
|
+
entry={entry}
|
|
309
|
+
key={entry.id}
|
|
310
|
+
onSelect={() => setSelectedId(entry.id)}
|
|
311
|
+
t={t}
|
|
312
|
+
locale={effectiveLocale}
|
|
313
|
+
direction={direction}
|
|
314
|
+
/>
|
|
315
|
+
))}
|
|
316
|
+
</div>
|
|
317
|
+
)}
|
|
318
|
+
</main>
|
|
319
|
+
)}
|
|
320
|
+
</div>
|
|
321
|
+
</DirectionProvider>
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function CategoryPill({
|
|
326
|
+
active,
|
|
327
|
+
children,
|
|
328
|
+
onClick,
|
|
329
|
+
}: {
|
|
330
|
+
active: boolean;
|
|
331
|
+
children: React.ReactNode;
|
|
332
|
+
onClick: () => void;
|
|
333
|
+
}) {
|
|
334
|
+
return (
|
|
335
|
+
<button
|
|
336
|
+
aria-pressed={active}
|
|
337
|
+
className={`h-(--noe-control-height-sm) rounded-md border px-3 text-xs font-medium transition-colors ${
|
|
338
|
+
active
|
|
339
|
+
? 'border-accent bg-accent/10 text-accent'
|
|
340
|
+
: 'border-border bg-transparent text-muted-foreground hover:text-foreground'
|
|
341
|
+
}`}
|
|
342
|
+
onClick={onClick}
|
|
343
|
+
type="button"
|
|
344
|
+
>
|
|
345
|
+
{children}
|
|
346
|
+
</button>
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function CatalogCard({
|
|
351
|
+
entry,
|
|
352
|
+
onSelect,
|
|
353
|
+
t,
|
|
354
|
+
locale,
|
|
355
|
+
direction,
|
|
356
|
+
}: {
|
|
357
|
+
entry: CatalogEntry;
|
|
358
|
+
onSelect: () => void;
|
|
359
|
+
t: (key: string) => string;
|
|
360
|
+
locale: LocaleCode;
|
|
361
|
+
direction: Direction;
|
|
362
|
+
}) {
|
|
363
|
+
const isPlanned = entry.status === 'planned';
|
|
364
|
+
const isPartial = entry.status === 'partial';
|
|
365
|
+
const previewCtx = { locale, direction, t, status: entry.status } as const;
|
|
366
|
+
return (
|
|
367
|
+
<article className="flex flex-col gap-4 rounded-lg bg-surface-raised p-5 shadow-raised">
|
|
368
|
+
<div className="flex items-start justify-between gap-3">
|
|
369
|
+
<div className="flex flex-col gap-1">
|
|
370
|
+
<h3 className="m-0 font-heading text-sm font-semibold leading-snug text-foreground">
|
|
371
|
+
{entry.name}
|
|
372
|
+
</h3>
|
|
373
|
+
<p className="m-0 text-xs text-muted-foreground">{entry.category}</p>
|
|
374
|
+
</div>
|
|
375
|
+
<span
|
|
376
|
+
className={`shrink-0 rounded-pill border px-2 py-0.5 text-[0.6875rem] font-medium ${statusBadgeClassName[entry.status]}`}
|
|
377
|
+
lang={locale}
|
|
378
|
+
>
|
|
379
|
+
{t(statusLabelKey[entry.status])}
|
|
380
|
+
</span>
|
|
381
|
+
</div>
|
|
382
|
+
<p className="m-0 text-xs leading-normal text-muted-foreground" lang={locale}>
|
|
383
|
+
{entry.description}
|
|
384
|
+
</p>
|
|
385
|
+
{isPlanned ? (
|
|
386
|
+
<div className="flex flex-col gap-2 rounded-md bg-surface-sunken/60 p-4">
|
|
387
|
+
<p className="m-0 text-sm font-medium text-foreground" lang={locale}>
|
|
388
|
+
{t('catalog.preview.planned.title')}
|
|
389
|
+
</p>
|
|
390
|
+
<p className="m-0 text-xs leading-normal text-muted-foreground" lang={locale}>
|
|
391
|
+
{t('catalog.preview.planned.description')}
|
|
392
|
+
</p>
|
|
393
|
+
<span className="text-xs text-muted-foreground" lang={locale}>
|
|
394
|
+
{t('catalog.preview.planned.notAvailable')}
|
|
395
|
+
</span>
|
|
396
|
+
</div>
|
|
397
|
+
) : (
|
|
398
|
+
<div className="flex flex-col gap-2">
|
|
399
|
+
<div className="flex items-center justify-center overflow-hidden rounded-md bg-surface-sunken/60 p-4">
|
|
400
|
+
{entry.preview(previewCtx)}
|
|
401
|
+
</div>
|
|
402
|
+
{isPartial && (
|
|
403
|
+
<p className="m-0 text-xs text-warning-foreground" lang={locale}>
|
|
404
|
+
{t('catalog.preview.partial.limitation')}
|
|
405
|
+
</p>
|
|
406
|
+
)}
|
|
407
|
+
</div>
|
|
408
|
+
)}
|
|
409
|
+
<div className="flex justify-end">
|
|
410
|
+
<button
|
|
411
|
+
className="text-xs font-medium text-accent hover:underline focus-visible:underline"
|
|
412
|
+
onClick={onSelect}
|
|
413
|
+
type="button"
|
|
414
|
+
>
|
|
415
|
+
{isPlanned ? t('catalog.preview.planned.readSpec') : t('catalog.viewDetail')}
|
|
416
|
+
</button>
|
|
417
|
+
</div>
|
|
418
|
+
</article>
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function CatalogDetail({
|
|
423
|
+
entry,
|
|
424
|
+
onBack,
|
|
425
|
+
t,
|
|
426
|
+
locale,
|
|
427
|
+
direction,
|
|
428
|
+
}: {
|
|
429
|
+
entry: CatalogEntry;
|
|
430
|
+
onBack: () => void;
|
|
431
|
+
t: (key: string) => string;
|
|
432
|
+
locale: LocaleCode;
|
|
433
|
+
direction: Direction;
|
|
434
|
+
}) {
|
|
435
|
+
const isPlanned = entry.status === 'planned';
|
|
436
|
+
const isPartial = entry.status === 'partial';
|
|
437
|
+
const previewCtx = { locale, direction, t, status: entry.status } as const;
|
|
438
|
+
return (
|
|
439
|
+
<main className="mx-auto max-w-4xl px-6 py-8">
|
|
440
|
+
<button
|
|
441
|
+
className="mb-6 text-sm font-medium text-accent hover:underline"
|
|
442
|
+
onClick={onBack}
|
|
443
|
+
type="button"
|
|
444
|
+
>
|
|
445
|
+
← {t('catalog.backToGrid')}
|
|
446
|
+
</button>
|
|
447
|
+
<div className="flex flex-wrap items-start justify-between gap-3">
|
|
448
|
+
<div className="flex flex-col gap-1">
|
|
449
|
+
<h2 className="m-0 font-heading text-2xl font-semibold tracking-tight" lang={locale}>
|
|
450
|
+
{entry.name}
|
|
451
|
+
</h2>
|
|
452
|
+
<p className="m-0 text-sm text-muted-foreground" lang={locale}>
|
|
453
|
+
{entry.category}
|
|
454
|
+
</p>
|
|
455
|
+
</div>
|
|
456
|
+
<span
|
|
457
|
+
className={`shrink-0 rounded-pill border px-2.5 py-1 text-xs font-medium ${statusBadgeClassName[entry.status]}`}
|
|
458
|
+
lang={locale}
|
|
459
|
+
>
|
|
460
|
+
{t(statusLabelKey[entry.status])}
|
|
461
|
+
</span>
|
|
462
|
+
</div>
|
|
463
|
+
<p className="mt-3 max-w-2xl text-sm leading-normal text-muted-foreground" lang={locale}>
|
|
464
|
+
{entry.description}
|
|
465
|
+
</p>
|
|
466
|
+
<dl className="mt-4 grid grid-cols-2 gap-4 text-sm sm:max-w-md">
|
|
467
|
+
<div>
|
|
468
|
+
<dt className="text-xs text-muted-foreground">Package</dt>
|
|
469
|
+
<dd className="m-0 font-mono text-xs" dir="ltr">
|
|
470
|
+
{entry.package}
|
|
471
|
+
</dd>
|
|
472
|
+
</div>
|
|
473
|
+
<div>
|
|
474
|
+
<dt className="text-xs text-muted-foreground">Registry item</dt>
|
|
475
|
+
<dd className="m-0 font-mono text-xs" dir="ltr">
|
|
476
|
+
{entry.registryItem ?? '—'}
|
|
477
|
+
</dd>
|
|
478
|
+
</div>
|
|
479
|
+
</dl>
|
|
480
|
+
{isPlanned ? (
|
|
481
|
+
<div className="mt-6 flex flex-col gap-3 rounded-lg bg-surface-sunken/60 p-8">
|
|
482
|
+
<p className="m-0 text-sm font-medium text-foreground" lang={locale}>
|
|
483
|
+
{t('catalog.preview.planned.title')}
|
|
484
|
+
</p>
|
|
485
|
+
<p className="m-0 text-sm leading-normal text-muted-foreground" lang={locale}>
|
|
486
|
+
{t('catalog.preview.planned.description')}
|
|
487
|
+
</p>
|
|
488
|
+
<span className="text-xs text-muted-foreground" lang={locale}>
|
|
489
|
+
{t('catalog.preview.planned.notAvailable')}
|
|
490
|
+
</span>
|
|
491
|
+
</div>
|
|
492
|
+
) : (
|
|
493
|
+
<div className="mt-6 flex flex-col gap-3">
|
|
494
|
+
<div className="flex items-center justify-center overflow-hidden rounded-lg bg-surface-sunken/60 p-8">
|
|
495
|
+
{entry.preview(previewCtx)}
|
|
496
|
+
</div>
|
|
497
|
+
{isPartial && (
|
|
498
|
+
<p className="m-0 text-xs text-warning-foreground" lang={locale}>
|
|
499
|
+
{t('catalog.preview.partial.limitation')}
|
|
500
|
+
</p>
|
|
501
|
+
)}
|
|
502
|
+
</div>
|
|
503
|
+
)}
|
|
504
|
+
</main>
|
|
505
|
+
);
|
|
506
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
|
|
4
|
+
import { App } from './app';
|
|
5
|
+
import './app.css';
|
|
6
|
+
|
|
7
|
+
const root = document.getElementById('root');
|
|
8
|
+
|
|
9
|
+
if (!root) {
|
|
10
|
+
throw new Error('NOE showcase root element was not found.');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
createRoot(root).render(
|
|
14
|
+
<React.StrictMode>
|
|
15
|
+
<App />
|
|
16
|
+
</React.StrictMode>,
|
|
17
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import { defineConfig } from 'vite';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [react(), tailwindcss()],
|
|
7
|
+
build: {
|
|
8
|
+
// Showcase bundles the full catalog (47 previews) including heavy cinematic canvases.
|
|
9
|
+
// Initial JS is ~560k (gzip ~173k) largely due to inlined cinematic demos that are
|
|
10
|
+
// not needed for consumer installs. Phase 1 keeps them inline for visual parity;
|
|
11
|
+
// Phase 2 will lazy-load cinematic/showcase code into separate chunks.
|
|
12
|
+
// Raising limit avoids noisy warning without hiding real regressions (ADR pending).
|
|
13
|
+
chunkSizeWarningLimit: 650,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
3
|
+
|
|
4
|
+
const config: StorybookConfig = {
|
|
5
|
+
stories: ['../stories/**/*.stories.@(ts|tsx|mdx)'],
|
|
6
|
+
addons: ['@storybook/addon-docs', '@storybook/addon-a11y', '@storybook/addon-vitest'],
|
|
7
|
+
framework: { name: '@storybook/react-vite', options: {} },
|
|
8
|
+
docs: { autodocs: 'tag' },
|
|
9
|
+
staticDirs: ['../../../packages/design-tokens/src'],
|
|
10
|
+
typescript: { check: true },
|
|
11
|
+
// Storybook's react-vite framework does not read a root vite.config.ts and this
|
|
12
|
+
// workspace has none; without this hook Tailwind's `@import "tailwindcss"` in
|
|
13
|
+
// tailwind.css never expands, so every story renders with the right class names
|
|
14
|
+
// but no generated utility CSS at all.
|
|
15
|
+
async viteFinal(viteConfig) {
|
|
16
|
+
viteConfig.plugins = [...(viteConfig.plugins ?? []), tailwindcss()];
|
|
17
|
+
return viteConfig;
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default config;
|