@luci-dev/skills 0.0.0-stage → 0.5.1
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/dist/benchmark.d.ts +48 -0
- package/dist/benchmark.d.ts.map +1 -0
- package/dist/benchmark.js +84 -0
- package/dist/benchmark.js.map +1 -0
- package/dist/discovery.d.ts +105 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +271 -0
- package/dist/discovery.js.map +1 -0
- package/dist/drafts.d.ts +20 -0
- package/dist/drafts.d.ts.map +1 -0
- package/dist/drafts.js +57 -0
- package/dist/drafts.js.map +1 -0
- package/dist/github.d.ts +49 -0
- package/dist/github.d.ts.map +1 -0
- package/dist/github.js +93 -0
- package/dist/github.js.map +1 -0
- package/dist/import.d.ts +80 -0
- package/dist/import.d.ts.map +1 -0
- package/dist/import.js +286 -0
- package/dist/import.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/licenses.d.ts +30 -0
- package/dist/licenses.d.ts.map +1 -0
- package/dist/licenses.js +116 -0
- package/dist/licenses.js.map +1 -0
- package/dist/linter.d.ts +35 -0
- package/dist/linter.d.ts.map +1 -0
- package/dist/linter.js +262 -0
- package/dist/linter.js.map +1 -0
- package/dist/lss.d.ts +74 -0
- package/dist/lss.d.ts.map +1 -0
- package/dist/lss.js +273 -0
- package/dist/lss.js.map +1 -0
- package/dist/orchestrator.d.ts +164 -0
- package/dist/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator.js +370 -0
- package/dist/orchestrator.js.map +1 -0
- package/dist/packs.d.ts +50 -0
- package/dist/packs.d.ts.map +1 -0
- package/dist/packs.js +166 -0
- package/dist/packs.js.map +1 -0
- package/dist/preferences.d.ts +18 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +57 -0
- package/dist/preferences.js.map +1 -0
- package/dist/project.d.ts +45 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +183 -0
- package/dist/project.js.map +1 -0
- package/dist/rankability.d.ts +51 -0
- package/dist/rankability.d.ts.map +1 -0
- package/dist/rankability.js +217 -0
- package/dist/rankability.js.map +1 -0
- package/dist/registry.d.ts +82 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +300 -0
- package/dist/registry.js.map +1 -0
- package/dist/trust.d.ts +13 -0
- package/dist/trust.d.ts.map +1 -0
- package/dist/trust.js +41 -0
- package/dist/trust.js.map +1 -0
- package/dist/types.d.ts +44 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/library/3d/threejs/LICENSE.txt +21 -0
- package/library/3d/threejs/NOTICE.md +7 -0
- package/library/3d/threejs/SKILL.md +102 -0
- package/library/3d/threejs/luci.json +39 -0
- package/library/accessibility/accessibility-baseline/SKILL.md +51 -0
- package/library/accessibility/accessibility-baseline/luci.json +33 -0
- package/library/accessibility/fixing-accessibility/NOTICE.md +6 -0
- package/library/accessibility/fixing-accessibility/SKILL.md +141 -0
- package/library/accessibility/fixing-accessibility/luci.json +36 -0
- package/library/animation-motion/animation-systems/LICENSE.txt +21 -0
- package/library/animation-motion/animation-systems/NOTICE.md +7 -0
- package/library/animation-motion/animation-systems/SKILL.md +192 -0
- package/library/animation-motion/animation-systems/luci.json +32 -0
- package/library/animation-motion/animejs/SKILL.md +64 -0
- package/library/animation-motion/animejs/luci.json +12 -0
- package/library/animation-motion/motion-dev/SKILL.md +69 -0
- package/library/animation-motion/motion-dev/luci.json +13 -0
- package/library/animation-motion/react-view-transitions/AGENTS.md +1380 -0
- package/library/animation-motion/react-view-transitions/NOTICE.md +6 -0
- package/library/animation-motion/react-view-transitions/README.md +44 -0
- package/library/animation-motion/react-view-transitions/SKILL.md +334 -0
- package/library/animation-motion/react-view-transitions/luci.json +40 -0
- package/library/animation-motion/react-view-transitions/metadata.json +12 -0
- package/library/animation-motion/react-view-transitions/references/css-recipes.md +312 -0
- package/library/animation-motion/react-view-transitions/references/implementation.md +170 -0
- package/library/animation-motion/react-view-transitions/references/nextjs.md +233 -0
- package/library/animation-motion/react-view-transitions/references/patterns.md +274 -0
- package/library/animation-motion/react-view-transitions/references/troubleshooting.md +47 -0
- package/library/code-quality/code-review/NOTICE.md +6 -0
- package/library/code-quality/code-review/SKILL.md +94 -0
- package/library/code-quality/code-review/agents/openai.yaml +3 -0
- package/library/code-quality/code-review/luci.json +33 -0
- package/library/components/company-logos/LICENSE.txt +21 -0
- package/library/components/company-logos/NOTICE.md +7 -0
- package/library/components/company-logos/SKILL.md +27 -0
- package/library/components/company-logos/luci.json +38 -0
- package/library/components/container-lines/LICENSE.txt +21 -0
- package/library/components/container-lines/NOTICE.md +7 -0
- package/library/components/container-lines/SKILL.md +124 -0
- package/library/components/container-lines/luci.json +48 -0
- package/library/design-systems/build-design-system/NOTICE.md +6 -0
- package/library/design-systems/build-design-system/SKILL.md +78 -0
- package/library/design-systems/build-design-system/luci.json +29 -0
- package/library/design-systems/build-design-system/references/components.md +46 -0
- package/library/design-systems/build-design-system/references/glossary.md +77 -0
- package/library/design-systems/build-design-system/references/taste.md +37 -0
- package/library/design-systems/build-design-system/references/tokens.md +59 -0
- package/library/design-systems/build-design-system/references/traps.md +128 -0
- package/library/design-systems/build-design-system/scripts/capture-guard.mjs +470 -0
- package/library/design-systems/build-design-system/scripts/capture.mjs +355 -0
- package/library/design-systems/build-design-system/scripts/check-system.mjs +1883 -0
- package/library/design-systems/build-design-system/scripts/find-chromium.mjs +137 -0
- package/library/design-systems/build-design-system/scripts/oklch.mjs +221 -0
- package/library/design-systems/build-design-system/scripts/pixdiff.mjs +186 -0
- package/library/design-systems/component-docs/NOTICE.md +6 -0
- package/library/design-systems/component-docs/SKILL.md +50 -0
- package/library/design-systems/component-docs/luci.json +30 -0
- package/library/design-systems/component-docs/references/doc-format.md +85 -0
- package/library/design-systems/create-design-md/NOTICE.md +6 -0
- package/library/design-systems/create-design-md/SKILL.md +259 -0
- package/library/design-systems/create-design-md/luci.json +38 -0
- package/library/design-systems/design-system-boss/NOTICE.md +6 -0
- package/library/design-systems/design-system-boss/SKILL.md +58 -0
- package/library/design-systems/design-system-boss/luci.json +29 -0
- package/library/design-systems/design-system-boss/playbooks/build.md +10 -0
- package/library/design-systems/design-system-boss/playbooks/component.md +9 -0
- package/library/design-systems/design-system-boss/playbooks/migrate.md +11 -0
- package/library/design-systems/design-system-boss/playbooks/review.md +9 -0
- package/library/design-systems/migrate-design-system/NOTICE.md +6 -0
- package/library/design-systems/migrate-design-system/SKILL.md +62 -0
- package/library/design-systems/migrate-design-system/luci.json +33 -0
- package/library/design-systems/migrate-design-system/references/correct.md +37 -0
- package/library/design-systems/migrate-design-system/references/lessons.md +69 -0
- package/library/design-systems/migrate-design-system/references/parity.md +44 -0
- package/library/design-systems/migrate-design-system/references/running-many-agents.md +52 -0
- package/library/design-systems/migrate-design-system/scripts/bodies-check.mjs +215 -0
- package/library/design-systems/migrate-design-system/scripts/land.mjs +433 -0
- package/library/design-systems/migrate-design-system/scripts/legacy.mjs +283 -0
- package/library/design-systems/migrate-design-system/scripts/parity.mjs +173 -0
- package/library/design-systems/token-mapping/NOTICE.md +6 -0
- package/library/design-systems/token-mapping/SKILL.md +46 -0
- package/library/design-systems/token-mapping/luci.json +25 -0
- package/library/design-systems/token-mapping/references/mapping-rules.md +54 -0
- package/library/design-systems/ui-review/NOTICE.md +6 -0
- package/library/design-systems/ui-review/SKILL.md +53 -0
- package/library/design-systems/ui-review/luci.json +29 -0
- package/library/design-systems/ui-review/references/criteria.md +49 -0
- package/library/frontend/composition-patterns/AGENTS.md +946 -0
- package/library/frontend/composition-patterns/NOTICE.md +6 -0
- package/library/frontend/composition-patterns/README.md +60 -0
- package/library/frontend/composition-patterns/SKILL.md +86 -0
- package/library/frontend/composition-patterns/luci.json +33 -0
- package/library/frontend/composition-patterns/metadata.json +11 -0
- package/library/frontend/composition-patterns/rules/_sections.md +29 -0
- package/library/frontend/composition-patterns/rules/_template.md +24 -0
- package/library/frontend/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/library/frontend/composition-patterns/rules/architecture-compound-components.md +112 -0
- package/library/frontend/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/library/frontend/composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/library/frontend/composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/library/frontend/composition-patterns/rules/state-context-interface.md +191 -0
- package/library/frontend/composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/library/frontend/composition-patterns/rules/state-lift-state.md +125 -0
- package/library/frontend/design-mobile-apps/NOTICE.md +6 -0
- package/library/frontend/design-mobile-apps/SKILL.md +121 -0
- package/library/frontend/design-mobile-apps/designing.md +56 -0
- package/library/frontend/design-mobile-apps/endpoints.md +362 -0
- package/library/frontend/design-mobile-apps/implementing.md +213 -0
- package/library/frontend/design-mobile-apps/luci.json +31 -0
- package/library/frontend/design-mobile-apps/styling/nativewind.md +57 -0
- package/library/frontend/design-mobile-apps/styling/stylesheet.md +28 -0
- package/library/frontend/design-mobile-apps/styling/uniwind.md +38 -0
- package/library/frontend/frontend-design/LICENSE.txt +202 -0
- package/library/frontend/frontend-design/NOTICE.md +6 -0
- package/library/frontend/frontend-design/SKILL.md +81 -0
- package/library/frontend/frontend-design/luci.json +43 -0
- package/library/frontend/react-native-skills/AGENTS.md +2897 -0
- package/library/frontend/react-native-skills/NOTICE.md +6 -0
- package/library/frontend/react-native-skills/README.md +165 -0
- package/library/frontend/react-native-skills/SKILL.md +119 -0
- package/library/frontend/react-native-skills/luci.json +33 -0
- package/library/frontend/react-native-skills/metadata.json +16 -0
- package/library/frontend/react-native-skills/rules/_sections.md +86 -0
- package/library/frontend/react-native-skills/rules/_template.md +28 -0
- package/library/frontend/react-native-skills/rules/animation-derived-value.md +53 -0
- package/library/frontend/react-native-skills/rules/animation-gesture-detector-press.md +95 -0
- package/library/frontend/react-native-skills/rules/animation-gpu-properties.md +65 -0
- package/library/frontend/react-native-skills/rules/design-system-compound-components.md +66 -0
- package/library/frontend/react-native-skills/rules/fonts-config-plugin.md +71 -0
- package/library/frontend/react-native-skills/rules/imports-design-system-folder.md +68 -0
- package/library/frontend/react-native-skills/rules/js-hoist-intl.md +61 -0
- package/library/frontend/react-native-skills/rules/list-performance-callbacks.md +44 -0
- package/library/frontend/react-native-skills/rules/list-performance-function-references.md +132 -0
- package/library/frontend/react-native-skills/rules/list-performance-images.md +53 -0
- package/library/frontend/react-native-skills/rules/list-performance-inline-objects.md +97 -0
- package/library/frontend/react-native-skills/rules/list-performance-item-expensive.md +94 -0
- package/library/frontend/react-native-skills/rules/list-performance-item-memo.md +82 -0
- package/library/frontend/react-native-skills/rules/list-performance-item-types.md +104 -0
- package/library/frontend/react-native-skills/rules/list-performance-virtualize.md +67 -0
- package/library/frontend/react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
- package/library/frontend/react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
- package/library/frontend/react-native-skills/rules/navigation-native-navigators.md +188 -0
- package/library/frontend/react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
- package/library/frontend/react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
- package/library/frontend/react-native-skills/rules/react-state-dispatcher.md +91 -0
- package/library/frontend/react-native-skills/rules/react-state-fallback.md +56 -0
- package/library/frontend/react-native-skills/rules/react-state-minimize.md +65 -0
- package/library/frontend/react-native-skills/rules/rendering-no-falsy-and.md +74 -0
- package/library/frontend/react-native-skills/rules/rendering-text-in-text-component.md +36 -0
- package/library/frontend/react-native-skills/rules/scroll-position-no-state.md +82 -0
- package/library/frontend/react-native-skills/rules/state-ground-truth.md +80 -0
- package/library/frontend/react-native-skills/rules/ui-expo-image.md +66 -0
- package/library/frontend/react-native-skills/rules/ui-image-gallery.md +104 -0
- package/library/frontend/react-native-skills/rules/ui-measure-views.md +78 -0
- package/library/frontend/react-native-skills/rules/ui-menus.md +174 -0
- package/library/frontend/react-native-skills/rules/ui-native-modals.md +77 -0
- package/library/frontend/react-native-skills/rules/ui-pressable.md +61 -0
- package/library/frontend/react-native-skills/rules/ui-safe-area-scroll.md +65 -0
- package/library/frontend/react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
- package/library/frontend/react-native-skills/rules/ui-styling.md +87 -0
- package/library/frontend/tailwindcss/LICENSE.txt +21 -0
- package/library/frontend/tailwindcss/NOTICE.md +7 -0
- package/library/frontend/tailwindcss/SKILL.md +83 -0
- package/library/frontend/tailwindcss/luci.json +39 -0
- package/library/frontend-frameworks/react-best-practices/NOTICE.md +6 -0
- package/library/frontend-frameworks/react-best-practices/SKILL.md +151 -0
- package/library/frontend-frameworks/react-best-practices/luci.json +39 -0
- package/library/general/algorithmic-art/LICENSE.txt +202 -0
- package/library/general/algorithmic-art/NOTICE.md +6 -0
- package/library/general/algorithmic-art/SKILL.md +409 -0
- package/library/general/algorithmic-art/luci.json +27 -0
- package/library/general/algorithmic-art/templates/generator_template.js +223 -0
- package/library/general/algorithmic-art/templates/viewer.html +599 -0
- package/library/general/canvas-design/LICENSE.txt +202 -0
- package/library/general/canvas-design/NOTICE.md +6 -0
- package/library/general/canvas-design/SKILL.md +134 -0
- package/library/general/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/library/general/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/library/general/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/library/general/canvas-design/luci.json +29 -0
- package/library/index.json +2507 -0
- package/library/interaction/animation-on-scroll/LICENSE.txt +21 -0
- package/library/interaction/animation-on-scroll/NOTICE.md +7 -0
- package/library/interaction/animation-on-scroll/SKILL.md +115 -0
- package/library/interaction/animation-on-scroll/luci.json +38 -0
- package/library/micro-interactions/masked-reveal/LICENSE.txt +21 -0
- package/library/micro-interactions/masked-reveal/NOTICE.md +7 -0
- package/library/micro-interactions/masked-reveal/SKILL.md +187 -0
- package/library/micro-interactions/masked-reveal/luci.json +63 -0
- package/library/micro-interactions/micro-interaction/NOTICE.md +6 -0
- package/library/micro-interactions/micro-interaction/SKILL.md +177 -0
- package/library/micro-interactions/micro-interaction/luci.json +52 -0
- package/library/micro-interactions/micro-interaction/references/css-recipes.md +142 -0
- package/library/micro-interactions/micro-interaction/references/framer-motion-recipes.md +187 -0
- package/library/micro-interactions/micro-interaction/scripts/README.md +42 -0
- package/library/micro-interactions/micro-interaction/scripts/contact-sheet.sh +17 -0
- package/library/micro-interactions/micro-interaction/scripts/seek-shot.sh +21 -0
- package/library/performance/fixing-motion-performance/NOTICE.md +6 -0
- package/library/performance/fixing-motion-performance/SKILL.md +156 -0
- package/library/performance/fixing-motion-performance/luci.json +30 -0
- package/library/seo/fixing-metadata/NOTICE.md +6 -0
- package/library/seo/fixing-metadata/SKILL.md +111 -0
- package/library/seo/fixing-metadata/luci.json +36 -0
- package/library/shadcn-ui/migrate-radix-to-base/NOTICE.md +6 -0
- package/library/shadcn-ui/migrate-radix-to-base/SKILL.md +178 -0
- package/library/shadcn-ui/migrate-radix-to-base/class-mapping.md +62 -0
- package/library/shadcn-ui/migrate-radix-to-base/consumer-props.md +58 -0
- package/library/shadcn-ui/migrate-radix-to-base/disclosure.md +353 -0
- package/library/shadcn-ui/migrate-radix-to-base/display-misc.md +410 -0
- package/library/shadcn-ui/migrate-radix-to-base/form-controls.md +390 -0
- package/library/shadcn-ui/migrate-radix-to-base/luci.json +33 -0
- package/library/shadcn-ui/migrate-radix-to-base/menus.md +409 -0
- package/library/shadcn-ui/migrate-radix-to-base/overlays.md +459 -0
- package/library/shadcn-ui/migrate-radix-to-base/universal-patterns.md +286 -0
- package/library/shadcn-ui/migrate-radix-to-base/wrapper-shapes.md +110 -0
- package/library/shadcn-ui/shadcn/NOTICE.md +6 -0
- package/library/shadcn-ui/shadcn/SKILL.md +187 -0
- package/library/shadcn-ui/shadcn/agents/openai.yml +5 -0
- package/library/shadcn-ui/shadcn/assets/shadcn-small.png +0 -0
- package/library/shadcn-ui/shadcn/assets/shadcn.png +0 -0
- package/library/shadcn-ui/shadcn/assets/showcase/color-pair.tsx +126 -0
- package/library/shadcn-ui/shadcn/assets/showcase/preview-states.css +14 -0
- package/library/shadcn-ui/shadcn/assets/showcase/state-matrix.tsx +72 -0
- package/library/shadcn-ui/shadcn/cli.md +290 -0
- package/library/shadcn-ui/shadcn/customization.md +211 -0
- package/library/shadcn-ui/shadcn/design-system-page.md +268 -0
- package/library/shadcn-ui/shadcn/design-system.md +386 -0
- package/library/shadcn-ui/shadcn/evals/evals.json +126 -0
- package/library/shadcn-ui/shadcn/luci.json +34 -0
- package/library/shadcn-ui/shadcn/mcp.md +105 -0
- package/library/shadcn-ui/shadcn/references/updating-components.md +91 -0
- package/library/shadcn-ui/shadcn/references/workflow.md +31 -0
- package/library/shadcn-ui/shadcn/registry.md +277 -0
- package/library/shadcn-ui/shadcn/rules/base-vs-radix.md +306 -0
- package/library/shadcn-ui/shadcn/rules/chat.md +507 -0
- package/library/shadcn-ui/shadcn/rules/composition.md +213 -0
- package/library/shadcn-ui/shadcn/rules/forms.md +192 -0
- package/library/shadcn-ui/shadcn/rules/icons.md +101 -0
- package/library/shadcn-ui/shadcn/rules/styling.md +185 -0
- package/library/shadcn-ui/shadcn/scripts/showcase-coverage.mjs +53 -0
- package/library/systems/baseline-ui/NOTICE.md +6 -0
- package/library/systems/baseline-ui/SKILL.md +90 -0
- package/library/systems/baseline-ui/luci.json +35 -0
- package/library/testing/tdd/NOTICE.md +6 -0
- package/library/testing/tdd/SKILL.md +43 -0
- package/library/testing/tdd/agents/openai.yaml +3 -0
- package/library/testing/tdd/luci.json +29 -0
- package/library/testing/tdd/mocking.md +59 -0
- package/library/testing/tdd/tests.md +77 -0
- package/library/testing/webapp-testing/LICENSE.txt +202 -0
- package/library/testing/webapp-testing/NOTICE.md +6 -0
- package/library/testing/webapp-testing/SKILL.md +100 -0
- package/library/testing/webapp-testing/examples/console_logging.py +35 -0
- package/library/testing/webapp-testing/examples/element_discovery.py +40 -0
- package/library/testing/webapp-testing/examples/static_html_automation.py +33 -0
- package/library/testing/webapp-testing/luci.json +33 -0
- package/library/testing/webapp-testing/scripts/with_server.py +106 -0
- package/library/ui-ux/improve-ui/NOTICE.md +6 -0
- package/library/ui-ux/improve-ui/SKILL.md +127 -0
- package/library/ui-ux/improve-ui/agents/openai.yaml +13 -0
- package/library/ui-ux/improve-ui/luci.json +47 -0
- package/library/ui-ux/improve-ui/references/plan-template.md +55 -0
- package/library/ui-ux/landing-page/LICENSE.txt +21 -0
- package/library/ui-ux/landing-page/NOTICE.md +7 -0
- package/library/ui-ux/landing-page/SKILL.md +213 -0
- package/library/ui-ux/landing-page/luci.json +47 -0
- package/library/ui-ux/pricing-page/LICENSE.txt +21 -0
- package/library/ui-ux/pricing-page/NOTICE.md +7 -0
- package/library/ui-ux/pricing-page/SKILL.md +217 -0
- package/library/ui-ux/pricing-page/luci.json +47 -0
- package/library/ui-ux/prototype/LOGIC.md +67 -0
- package/library/ui-ux/prototype/NOTICE.md +6 -0
- package/library/ui-ux/prototype/SKILL.md +31 -0
- package/library/ui-ux/prototype/UI.md +112 -0
- package/library/ui-ux/prototype/agents/openai.yaml +3 -0
- package/library/ui-ux/prototype/luci.json +33 -0
- package/library/ui-ux/theme-factory/LICENSE.txt +202 -0
- package/library/ui-ux/theme-factory/NOTICE.md +6 -0
- package/library/ui-ux/theme-factory/SKILL.md +62 -0
- package/library/ui-ux/theme-factory/luci.json +35 -0
- package/library/ui-ux/theme-factory/themes/arctic-frost.md +19 -0
- package/library/ui-ux/theme-factory/themes/botanical-garden.md +19 -0
- package/library/ui-ux/theme-factory/themes/desert-rose.md +19 -0
- package/library/ui-ux/theme-factory/themes/forest-canopy.md +19 -0
- package/library/ui-ux/theme-factory/themes/golden-hour.md +19 -0
- package/library/ui-ux/theme-factory/themes/midnight-galaxy.md +19 -0
- package/library/ui-ux/theme-factory/themes/modern-minimalist.md +19 -0
- package/library/ui-ux/theme-factory/themes/ocean-depths.md +19 -0
- package/library/ui-ux/theme-factory/themes/sunset-boulevard.md +19 -0
- package/library/ui-ux/theme-factory/themes/tech-innovation.md +19 -0
- package/package.json +21 -3
- package/packs/design-system-build.json +10 -0
- package/packs/design-system.json +16 -0
- package/packs/marketing.json +11 -0
- package/packs/motion.json +12 -0
- package/packs/ui.json +13 -0
- package/README.md +0 -3
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Customization & Theming
|
|
2
|
+
|
|
3
|
+
Components reference semantic CSS variable tokens. Change the variables to change every component.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- How it works (CSS variables → Tailwind utilities → components)
|
|
8
|
+
- Color variables and OKLCH format
|
|
9
|
+
- Dark mode setup
|
|
10
|
+
- Changing the theme (presets, CSS variables)
|
|
11
|
+
- Adding custom colors (Tailwind v3 and v4)
|
|
12
|
+
- Border radius
|
|
13
|
+
- Customizing components (variants, className, wrappers)
|
|
14
|
+
- Checking for updates
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## How It Works
|
|
19
|
+
|
|
20
|
+
1. CSS variables defined in `:root` (light) and `.dark` (dark mode).
|
|
21
|
+
2. Tailwind maps them to utilities: `bg-primary`, `text-muted-foreground`, etc.
|
|
22
|
+
3. Components use these utilities — changing a variable changes all components that reference it.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Color Variables
|
|
27
|
+
|
|
28
|
+
Every color follows the `name` / `name-foreground` convention. The base variable is for backgrounds, `-foreground` is for text/icons on that background.
|
|
29
|
+
|
|
30
|
+
| Variable | Purpose |
|
|
31
|
+
| -------------------------------------------- | -------------------------------- |
|
|
32
|
+
| `--background` / `--foreground` | Page background and default text |
|
|
33
|
+
| `--card` / `--card-foreground` | Card surfaces |
|
|
34
|
+
| `--primary` / `--primary-foreground` | Primary buttons and actions |
|
|
35
|
+
| `--secondary` / `--secondary-foreground` | Secondary actions |
|
|
36
|
+
| `--muted` / `--muted-foreground` | Muted/disabled states |
|
|
37
|
+
| `--accent` / `--accent-foreground` | Hover and accent states |
|
|
38
|
+
| `--destructive` / `--destructive-foreground` | Error and destructive actions |
|
|
39
|
+
| `--border` | Default border color |
|
|
40
|
+
| `--input` | Form input borders |
|
|
41
|
+
| `--ring` | Focus ring color |
|
|
42
|
+
| `--chart-1` through `--chart-5` | Chart/data visualization |
|
|
43
|
+
| `--sidebar-*` | Sidebar-specific colors |
|
|
44
|
+
| `--surface` / `--surface-foreground` | Secondary surface |
|
|
45
|
+
|
|
46
|
+
Colors use OKLCH: `--primary: oklch(0.205 0 0)` where values are lightness (0–1), chroma (0 = gray), and hue (0–360).
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Dark Mode
|
|
51
|
+
|
|
52
|
+
Class-based toggle via `.dark` on the root element. In Next.js, use `next-themes`:
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { ThemeProvider } from "next-themes"
|
|
56
|
+
|
|
57
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
58
|
+
{children}
|
|
59
|
+
</ThemeProvider>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Changing the Theme
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Apply a preset code from ui.shadcn.com.
|
|
68
|
+
npx shadcn@latest apply --preset a2r6bw
|
|
69
|
+
|
|
70
|
+
# Positional shorthand also works.
|
|
71
|
+
npx shadcn@latest apply a2r6bw
|
|
72
|
+
|
|
73
|
+
# Switch to a named preset and overwrite existing components.
|
|
74
|
+
npx shadcn@latest apply --preset nova
|
|
75
|
+
|
|
76
|
+
# Preserve existing components instead.
|
|
77
|
+
npx shadcn@latest init --preset nova --force --no-reinstall
|
|
78
|
+
|
|
79
|
+
# Use a custom theme URL.
|
|
80
|
+
npx shadcn@latest apply --preset "https://ui.shadcn.com/init?base=radix&style=nova&theme=blue&..."
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Or edit CSS variables directly in `globals.css`.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Adding Custom Colors
|
|
88
|
+
|
|
89
|
+
Add variables to the file at `tailwindCssFile` from `npx shadcn@latest info` (typically `globals.css`). Never create a new CSS file for this.
|
|
90
|
+
|
|
91
|
+
```css
|
|
92
|
+
/* 1. Define in the global CSS file. */
|
|
93
|
+
:root {
|
|
94
|
+
--warning: oklch(0.84 0.16 84);
|
|
95
|
+
--warning-foreground: oklch(0.28 0.07 46);
|
|
96
|
+
}
|
|
97
|
+
.dark {
|
|
98
|
+
--warning: oklch(0.41 0.11 46);
|
|
99
|
+
--warning-foreground: oklch(0.99 0.02 95);
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```css
|
|
104
|
+
/* 2a. Register with Tailwind v4 (@theme inline). */
|
|
105
|
+
@theme inline {
|
|
106
|
+
--color-warning: var(--warning);
|
|
107
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
When `tailwindVersion` is `"v3"` (check via `npx shadcn@latest info`), register in `tailwind.config.js` instead:
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
// 2b. Register with Tailwind v3 (tailwind.config.js).
|
|
115
|
+
module.exports = {
|
|
116
|
+
theme: {
|
|
117
|
+
extend: {
|
|
118
|
+
colors: {
|
|
119
|
+
warning: "oklch(var(--warning) / <alpha-value>)",
|
|
120
|
+
"warning-foreground":
|
|
121
|
+
"oklch(var(--warning-foreground) / <alpha-value>)",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```tsx
|
|
129
|
+
// 3. Use in components.
|
|
130
|
+
<div className="bg-warning text-warning-foreground">Warning</div>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Border Radius
|
|
136
|
+
|
|
137
|
+
`--radius` controls border radius globally. Components derive values from it (`rounded-lg` = `var(--radius)`, `rounded-md` = `calc(var(--radius) - 2px)`).
|
|
138
|
+
|
|
139
|
+
When a brand spec defines its own radius scale, pin each step in `@theme inline` (`--radius-sm` … `--radius-4xl`) instead of deriving from `--radius`. See [design-system.md](./design-system.md#radius).
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Customizing Components
|
|
144
|
+
|
|
145
|
+
See also: [rules/styling.md](./rules/styling.md) for Incorrect/Correct examples.
|
|
146
|
+
|
|
147
|
+
Prefer these approaches in order:
|
|
148
|
+
|
|
149
|
+
### 1. Built-in variants
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
<Button variant="outline" size="sm">
|
|
153
|
+
Click
|
|
154
|
+
</Button>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 2. Tailwind classes via `className`
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
<Card className="mx-auto max-w-md">...</Card>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 3. Add a new variant
|
|
164
|
+
|
|
165
|
+
Edit the component source to add a variant via `cva`:
|
|
166
|
+
|
|
167
|
+
```tsx
|
|
168
|
+
// components/ui/button.tsx
|
|
169
|
+
warning: "bg-warning text-warning-foreground hover:bg-warning/90",
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 4. Wrapper components
|
|
173
|
+
|
|
174
|
+
Compose shadcn/ui primitives into higher-level components:
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
export function ConfirmDialog({ title, description, onConfirm, children }) {
|
|
178
|
+
return (
|
|
179
|
+
<AlertDialog>
|
|
180
|
+
<AlertDialogTrigger asChild>{children}</AlertDialogTrigger>
|
|
181
|
+
<AlertDialogContent>
|
|
182
|
+
<AlertDialogHeader>
|
|
183
|
+
<AlertDialogTitle>{title}</AlertDialogTitle>
|
|
184
|
+
<AlertDialogDescription>{description}</AlertDialogDescription>
|
|
185
|
+
</AlertDialogHeader>
|
|
186
|
+
<AlertDialogFooter>
|
|
187
|
+
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
188
|
+
<AlertDialogAction onClick={onConfirm}>Confirm</AlertDialogAction>
|
|
189
|
+
</AlertDialogFooter>
|
|
190
|
+
</AlertDialogContent>
|
|
191
|
+
</AlertDialog>
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Checking for Updates
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
npx shadcn@latest add button --diff
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
To preview exactly what would change before updating, use `--dry-run` and `--diff`:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
npx shadcn@latest add button --dry-run # see all affected files
|
|
208
|
+
npx shadcn@latest add button --diff button.tsx # see the diff for a specific file
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
See [Updating Components in SKILL.md](./SKILL.md#updating-components) for the full smart merge workflow.
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# The Design System Page
|
|
2
|
+
|
|
3
|
+
What goes on a design system page, and how to show it. Distilled from Primer, Carbon, Atlassian, GitLab Pajamas, Cloudscape, Twilio Paste, Salesforce Lightning, Material 3, Evergreen and Orbit, and from EightShapes' component documentation guidance.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- Principles
|
|
8
|
+
- Page outline
|
|
9
|
+
- Foundations
|
|
10
|
+
- Components: tiers and block anatomy
|
|
11
|
+
- States without interaction
|
|
12
|
+
- Edge cases
|
|
13
|
+
- Do and Don't
|
|
14
|
+
- Recipes and example screens
|
|
15
|
+
- Helpers
|
|
16
|
+
- Checklist
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Principles
|
|
21
|
+
|
|
22
|
+
1. **Foundations, then components, then compositions.** Every mature system follows this order (Primer, Carbon, Paste, Cloudscape, M3).
|
|
23
|
+
2. **Roles, not palettes.** Show each color as a surface paired with its foreground and the measured contrast. The raw palette comes second.
|
|
24
|
+
3. **Lead with the typical case.** Each component opens with its most common use in real content. Then come variants in priority order, then shared axes (size, icon), then states.
|
|
25
|
+
4. **Pin states so reviewers can see them.** Hover, focus and pressed render side by side without interaction. Use one consistent label, and never put the state name inside the component.
|
|
26
|
+
5. **Don't render every combination.** Primitives get a variant × state matrix. Composed components get a typical example plus additions. Exhaustive combinations belong in tests (Material 3 cut its list kit from 700+ variants to about 45).
|
|
27
|
+
6. **Real content in the brand's voice.** No lorem ipsum. Include the awkward cases: long text, empty, error, loading.
|
|
28
|
+
7. **Composition proves the system.** End with the DESIGN.md's own recipes and one realistic screen built only from the tokens and components.
|
|
29
|
+
8. **Make the DESIGN.md's rules visible.** Turn its Do's and Don'ts into rendered do/don't pairs.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Page Outline
|
|
34
|
+
|
|
35
|
+
| # | Section | Contents |
|
|
36
|
+
| --- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
37
|
+
| 1 | Header | System name, "Themed from DESIGN.md", section anchors, light/dark toggle, primary CTA. |
|
|
38
|
+
| 2 | Overview | The DESIGN.md hero recipe: display type, one-line personality, its signature artifact. |
|
|
39
|
+
| 3 | Foundations | Color roles, palette, typography, spacing, radius, elevation, motion (if specified), icons. |
|
|
40
|
+
| 4 | Actions | Button, ButtonGroup, Toggle, ToggleGroup, Badge, Kbd. |
|
|
41
|
+
| 5 | Inputs | Field, Input, InputGroup, Textarea, Select, NativeSelect, Combobox, Checkbox, RadioGroup, Switch, Slider, InputOTP, Calendar, Label. |
|
|
42
|
+
| 6 | Navigation | Tabs, Breadcrumb, Pagination, NavigationMenu, Menubar, Sidebar. |
|
|
43
|
+
| 7 | Data display | Card, Table, Chart, Item, Avatar, Accordion, Collapsible, Carousel, ScrollArea, Resizable, AspectRatio, Separator. |
|
|
44
|
+
| 8 | Feedback | Alert, toast (and Sonner in Base UI projects), Progress, Spinner, Skeleton, Empty. |
|
|
45
|
+
| 9 | Overlays | Dialog, AlertDialog, Sheet, Drawer, Popover, HoverCard, Tooltip, DropdownMenu, ContextMenu, Command. |
|
|
46
|
+
| 10 | Conversation | MessageScroller, Message, Bubble, Attachment, Marker, Questionnaire. See [rules/chat.md](./rules/chat.md). |
|
|
47
|
+
| 11 | Do and Don't | Rendered pairs for the DESIGN.md's rules. |
|
|
48
|
+
| 12 | Recipes and example screen | The DESIGN.md's named components, then one realistic screen. |
|
|
49
|
+
| 13 | Footer | The DESIGN.md footer recipe. |
|
|
50
|
+
|
|
51
|
+
DirectionProvider goes wherever RTL matters (an RTL row in Inputs or Navigation).
|
|
52
|
+
|
|
53
|
+
Alternate section surfaces the way the DESIGN.md paces its bands. Use `className="dark"` on a section to render a dark band with the same components.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Foundations
|
|
58
|
+
|
|
59
|
+
### Color roles
|
|
60
|
+
|
|
61
|
+
A grid of pairs, each rendered as the surface with "Aa" in its foreground color, plus the token names, resolved value and measured contrast (Paste, Material 3, Pajamas):
|
|
62
|
+
|
|
63
|
+
| Pair | Required |
|
|
64
|
+
| ------------------------------------- | ------------ |
|
|
65
|
+
| `background` / `foreground` | Yes |
|
|
66
|
+
| `card` / `card-foreground` | Yes |
|
|
67
|
+
| `popover` / `popover-foreground` | Yes |
|
|
68
|
+
| `primary` / `primary-foreground` | Yes |
|
|
69
|
+
| `secondary` / `secondary-foreground` | Yes |
|
|
70
|
+
| `muted` / `muted-foreground` | Yes |
|
|
71
|
+
| `accent` / `accent-foreground` | Yes |
|
|
72
|
+
| `destructive` on `background` | Yes |
|
|
73
|
+
| Each extra text token on `background` | When defined |
|
|
74
|
+
|
|
75
|
+
Use `ColorPair` from the helpers. It measures contrast live and re-measures when the theme changes. Report any pair below 4.5:1 for body-size text, even when the DESIGN.md specifies it. A brand primary at 3:1 behind 14px labels is a real finding.
|
|
76
|
+
|
|
77
|
+
### Palette
|
|
78
|
+
|
|
79
|
+
Swatches grouped the way the DESIGN.md groups them (brand, surfaces, text, status, accents). Label each with its DESIGN.md name and token, for example "Warm Stone · `surface-warm`". Show `border`, `input`, `ring`, `chart-1…5` and `sidebar-*` here too.
|
|
80
|
+
|
|
81
|
+
### Typography
|
|
82
|
+
|
|
83
|
+
A specimen table, one row per type token (Cloudscape, Carbon, Atlassian):
|
|
84
|
+
|
|
85
|
+
| Column | Content |
|
|
86
|
+
| -------- | ------------------------------------------------- |
|
|
87
|
+
| Token | `type-display-lg` |
|
|
88
|
+
| Spec | size / line height / weight / tracking |
|
|
89
|
+
| Use | "Section heads", taken from the DESIGN.md |
|
|
90
|
+
| Specimen | Real copy set in the token, truncated to one line |
|
|
91
|
+
|
|
92
|
+
Group the rows display → title → body → label/caption → code. Below the table, show one paragraph of running text at body size, with a link and inline code, so line length and rhythm are visible.
|
|
93
|
+
|
|
94
|
+
### Spacing
|
|
95
|
+
|
|
96
|
+
The base unit and the scale as labeled horizontal bars (Carbon, Atlassian), then a semantic ladder: inside a component, between related items, between groups, between sections (Pajamas). Skip it if the DESIGN.md defines no spacing.
|
|
97
|
+
|
|
98
|
+
### Radius
|
|
99
|
+
|
|
100
|
+
The same box at every step, labeled with the token, the value and what uses it (Material 3). Example: `md · 8px · buttons, inputs`.
|
|
101
|
+
|
|
102
|
+
### Elevation
|
|
103
|
+
|
|
104
|
+
Each level as a raised surface with the components that rest there (Pajamas, Material 3): flat for canvas and bands, hairline for cards, soft for popovers and menus, deep for dialogs.
|
|
105
|
+
|
|
106
|
+
### Motion and icons
|
|
107
|
+
|
|
108
|
+
Show motion only if the DESIGN.md defines durations or easings: a table of token, milliseconds and use. For icons, show one row with the icon library at each size used by components, in `foreground` and `muted-foreground`.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Components: Tiers and Block Anatomy
|
|
113
|
+
|
|
114
|
+
### Tiers
|
|
115
|
+
|
|
116
|
+
| Tier | Components | How to show |
|
|
117
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
118
|
+
| Primitives | Button, Badge, Toggle, ToggleGroup, Input, Textarea, Select, NativeSelect, Checkbox, RadioGroup, Switch, Slider, Tabs | Variant × state matrix, size ladder, icon row. |
|
|
119
|
+
| Fields | Field, InputGroup, Combobox, InputOTP, Calendar, Label | Typical field, then description, error, disabled, required. |
|
|
120
|
+
| Composed | Card, Table, Item, Avatar, Alert, Empty, toast, Sonner, Accordion, Collapsible, Breadcrumb, Pagination, Progress, Skeleton, Spinner, Carousel, Chart, ScrollArea, Resizable, AspectRatio, Separator, Kbd, ButtonGroup | Typical example, then one element added at a time, then edge cases. |
|
|
121
|
+
| Overlays | Dialog, AlertDialog, Sheet, Drawer, Popover, HoverCard, Tooltip, DropdownMenu, ContextMenu, Menubar, NavigationMenu, Command | A real trigger per overlay, labeled with what it opens. |
|
|
122
|
+
| Shell | Sidebar, DirectionProvider | Inline in a framed preview (`collapsible="none"`). |
|
|
123
|
+
| Conversation | MessageScroller, Message, Bubble, Attachment, Marker, Questionnaire | One realistic thread, then variant rows. |
|
|
124
|
+
|
|
125
|
+
### Block anatomy
|
|
126
|
+
|
|
127
|
+
Each component block, in this order. Skip the parts that don't apply:
|
|
128
|
+
|
|
129
|
+
1. **Name and one line on when to use it.** Take the wording from the DESIGN.md recipe when there is one.
|
|
130
|
+
2. **Typical example** in real content.
|
|
131
|
+
3. **Variants** in priority order (primary before secondary before ghost), each with a one-line "when".
|
|
132
|
+
4. **Sizes** as a ladder, smallest to largest.
|
|
133
|
+
5. **With icon**: leading, trailing, icon-only.
|
|
134
|
+
6. **States**: the matrix for primitives, single examples for the rest.
|
|
135
|
+
7. **Edge cases** (see below).
|
|
136
|
+
|
|
137
|
+
Wide components (Table, NavigationMenu, Menubar, Sidebar, Chart, MessageScroller) span the full row.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## States Without Interaction
|
|
142
|
+
|
|
143
|
+
Pin interaction states with a `data-preview` attribute. Override the hover, focus-visible and active variants so each also matches the attribute. Copy [assets/showcase/preview-states.css](./assets/showcase/preview-states.css) into `tailwindCssFile`:
|
|
144
|
+
|
|
145
|
+
```css
|
|
146
|
+
@custom-variant hover {
|
|
147
|
+
@media (hover: hover) {
|
|
148
|
+
&:hover {
|
|
149
|
+
@slot;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
&[data-preview~="hover"] {
|
|
153
|
+
@slot;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
@custom-variant focus-visible (&:focus-visible, &[data-preview~="focus"]);
|
|
157
|
+
@custom-variant active (&:active, &[data-preview~="active"]);
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
If the theme adds an unlayered focus rule (for an outline-style focus), add `[data-preview~="focus"]` to its selector too.
|
|
161
|
+
|
|
162
|
+
Render the matrix with `StateMatrix` and `previewState` from the helpers:
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
const variants = ["default", "secondary", "outline", "ghost", "destructive", "link"] as const
|
|
166
|
+
|
|
167
|
+
<StateMatrix
|
|
168
|
+
rows={variants}
|
|
169
|
+
render={(variant, state) => (
|
|
170
|
+
<Button variant={variant} {...previewState(state)}>
|
|
171
|
+
Save draft
|
|
172
|
+
</Button>
|
|
173
|
+
)}
|
|
174
|
+
/>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The columns are default, hover, focus, active and disabled. Add `loading` with Spinner + `disabled` for Button, and `invalid` (`aria-invalid`) for fields:
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
<StateMatrix
|
|
181
|
+
rows={["input"] as const}
|
|
182
|
+
states={["default", "hover", "focus", "disabled", "invalid"]}
|
|
183
|
+
render={(_, state) => (
|
|
184
|
+
<Input
|
|
185
|
+
placeholder="you@company.com"
|
|
186
|
+
aria-invalid={state === "invalid" || undefined}
|
|
187
|
+
{...previewState(state)}
|
|
188
|
+
/>
|
|
189
|
+
)}
|
|
190
|
+
/>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
If the DESIGN.md says a state doesn't change ("primary darkens on press only"), leave that column identical. The matrix shows the spec is followed.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Edge Cases
|
|
198
|
+
|
|
199
|
+
Show these next to the component they stress:
|
|
200
|
+
|
|
201
|
+
| Case | Where |
|
|
202
|
+
| ------------- | ------------------------------------------------------------------------- |
|
|
203
|
+
| Long text | Button label, Badge, Item title, Table cell, Breadcrumb (truncation). |
|
|
204
|
+
| Empty | Table with no rows → Empty, Combobox with no matches, empty Command. |
|
|
205
|
+
| Error | Field with FieldError, Alert destructive, Attachment `state="error"`. |
|
|
206
|
+
| Loading | Button with Spinner, Skeleton for Card and Item, Progress, toast loading. |
|
|
207
|
+
| Many items | AvatarGroup with count, Pagination with ellipsis, ScrollArea list. |
|
|
208
|
+
| Missing image | Avatar falling back to AvatarFallback. |
|
|
209
|
+
| Disabled | Every field and its Field `data-disabled`. |
|
|
210
|
+
| RTL | One row inside `DirectionProvider` with `dir="rtl"`. |
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Do and Don't
|
|
215
|
+
|
|
216
|
+
Pick the two to four DESIGN.md rules that are easiest to break and render each as a pair (Primer, Orbit, Carbon):
|
|
217
|
+
|
|
218
|
+
```tsx
|
|
219
|
+
<div className="grid gap-4 md:grid-cols-2">
|
|
220
|
+
<Example title="Do">
|
|
221
|
+
<Button>Get started</Button>
|
|
222
|
+
<Button variant="outline">Contact sales</Button>
|
|
223
|
+
</Example>
|
|
224
|
+
<Example title="Don't">
|
|
225
|
+
<Button>Get started</Button>
|
|
226
|
+
<Button>Contact sales</Button>
|
|
227
|
+
</Example>
|
|
228
|
+
</div>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Caption each with the rule in one line, for example "One primary action per group." Mark Don't with `destructive` text, not a new color.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Recipes and Example Screens
|
|
236
|
+
|
|
237
|
+
**Recipes.** Build each named component in the DESIGN.md (`hero-band`, `feature-card`, `pricing-tier-card`, `callout-card-coral`, `footer`) from shadcn components and tokens. These are the spec's acceptance tests. If a recipe can't be built without raw values, the token mapping is incomplete.
|
|
238
|
+
|
|
239
|
+
**Example screen.** One realistic screen in the brand's domain (Cloudscape demos, Paste page templates): a settings page (FieldGroup, Switch, Select, Button) or a list view (Table, Badge, Pagination, Empty). Use only tokens and components.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Helpers
|
|
244
|
+
|
|
245
|
+
Copy from `assets/showcase/` into the showcase folder:
|
|
246
|
+
|
|
247
|
+
| File | Purpose |
|
|
248
|
+
| -------------------- | -------------------------------------------------------------------------- |
|
|
249
|
+
| `preview-states.css` | Variant overrides that pin hover, focus and active through `data-preview`. |
|
|
250
|
+
| `state-matrix.tsx` | `StateMatrix` (labeled variant × state table) and `previewState(state)`. |
|
|
251
|
+
| `color-pair.tsx` | `ColorPair`: surface + foreground with live contrast ratio and WCAG level. |
|
|
252
|
+
|
|
253
|
+
They import `cn` from `@/lib/utils`. Rewrite that path to the project's `utils` alias.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Checklist
|
|
258
|
+
|
|
259
|
+
- [ ] Every installed component renders (run the coverage script).
|
|
260
|
+
- [ ] Color roles shown as pairs with contrast; any pair under 4.5:1 is noted in the report.
|
|
261
|
+
- [ ] Type specimen covers every DESIGN.md type token, in real copy.
|
|
262
|
+
- [ ] Radius and elevation ladders name the components that use each step.
|
|
263
|
+
- [ ] Primitives have a state matrix; Button and fields include loading and invalid.
|
|
264
|
+
- [ ] Edge cases: long text, empty, error, loading, missing image.
|
|
265
|
+
- [ ] Do/Don't pairs for the DESIGN.md's key rules.
|
|
266
|
+
- [ ] DESIGN.md recipes rebuilt, plus one example screen.
|
|
267
|
+
- [ ] Page-level theme toggle works, and at least one scoped dark band if the DESIGN.md has dark surfaces.
|
|
268
|
+
- [ ] No lorem ipsum, and no state names inside components.
|