@sarjallab09/figma-intelligence 1.1.0 → 1.2.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/README.md +69 -36
- package/dist/bin/cli.js +2 -0
- package/dist/design-bridge/bridge.js +2 -0
- package/dist/figma-bridge-plugin/bridge-relay.js +2 -0
- package/dist/figma-bridge-plugin/code.js +1 -0
- package/{figma-bridge-plugin → dist/figma-bridge-plugin}/package-lock.json +0 -3
- package/dist/figma-bridge-plugin/ui.html +4970 -0
- package/dist/figma-intelligence-layer/dist/index.js +2 -0
- package/dist/scripts/clean-existing-chunks.js +2 -0
- package/dist/scripts/connect-ai-tool.js +2 -0
- package/dist/scripts/convert-hub-pdfs.js +2 -0
- package/dist/scripts/figma-mcp-status.js +2 -0
- package/dist/scripts/register-codex-mcp.js +2 -0
- package/dist/scripts/test-copilot-chat.js +2 -0
- package/package.json +11 -8
- package/bin/cli.js +0 -859
- package/design-bridge/bridge.js +0 -196
- package/design-bridge/lib/assets.js +0 -367
- package/design-bridge/lib/prompt.js +0 -85
- package/design-bridge/lib/server.js +0 -66
- package/design-bridge/lib/stitch.js +0 -37
- package/design-bridge/lib/tokens.js +0 -82
- package/design-bridge/package-lock.json +0 -579
- package/figma-bridge-plugin/README.md +0 -97
- package/figma-bridge-plugin/anthropic-chat-runner.js +0 -192
- package/figma-bridge-plugin/bridge-relay.js +0 -2505
- package/figma-bridge-plugin/chat-runner.js +0 -485
- package/figma-bridge-plugin/code.js +0 -1534
- package/figma-bridge-plugin/codex-runner.js +0 -505
- package/figma-bridge-plugin/component-schemas.js +0 -110
- package/figma-bridge-plugin/content-context.js +0 -869
- package/figma-bridge-plugin/create-button.js +0 -216
- package/figma-bridge-plugin/gemini-cli-runner.js +0 -291
- package/figma-bridge-plugin/gemini-runner.js +0 -187
- package/figma-bridge-plugin/html-to-figma.js +0 -927
- package/figma-bridge-plugin/knowledge-hub/.gitkeep +0 -0
- package/figma-bridge-plugin/knowledge-hub/uspec-references/anatomy-spec.md +0 -159
- package/figma-bridge-plugin/knowledge-hub/uspec-references/api-spec.md +0 -162
- package/figma-bridge-plugin/knowledge-hub/uspec-references/color-spec.md +0 -148
- package/figma-bridge-plugin/knowledge-hub/uspec-references/full-spec-template.md +0 -314
- package/figma-bridge-plugin/knowledge-hub/uspec-references/property-spec.md +0 -175
- package/figma-bridge-plugin/knowledge-hub/uspec-references/screen-reader-spec.md +0 -180
- package/figma-bridge-plugin/knowledge-hub/uspec-references/structure-spec.md +0 -165
- package/figma-bridge-plugin/perplexity-runner.js +0 -188
- package/figma-bridge-plugin/references/SKILL.md +0 -178
- package/figma-bridge-plugin/references/anatomy-spec.md +0 -159
- package/figma-bridge-plugin/references/api-spec.md +0 -162
- package/figma-bridge-plugin/references/color-spec.md +0 -148
- package/figma-bridge-plugin/references/full-spec-template.md +0 -314
- package/figma-bridge-plugin/references/property-spec.md +0 -175
- package/figma-bridge-plugin/references/screen-reader-spec.md +0 -180
- package/figma-bridge-plugin/references/structure-spec.md +0 -165
- package/figma-bridge-plugin/shared-prompt-config.js +0 -645
- package/figma-bridge-plugin/spec-helpers/build-table.js +0 -269
- package/figma-bridge-plugin/spec-helpers/classify-elements.js +0 -189
- package/figma-bridge-plugin/spec-helpers/index.js +0 -35
- package/figma-bridge-plugin/spec-helpers/parse-figma-link.js +0 -49
- package/figma-bridge-plugin/spec-helpers/position-markers.js +0 -158
- package/figma-bridge-plugin/stitch-auth.js +0 -322
- package/figma-bridge-plugin/stitch-runner.js +0 -1427
- package/figma-bridge-plugin/token-resolver.js +0 -107
- package/figma-bridge-plugin/ui.html +0 -4542
- package/figma-intelligence-layer/.env.example +0 -39
- package/figma-intelligence-layer/docs/local-image-generation.md +0 -60
- package/figma-intelligence-layer/examples/comfyui-workflow-template.example.json +0 -101
- package/figma-intelligence-layer/jest.config.js +0 -14
- package/figma-intelligence-layer/mcp-config.json +0 -19
- package/figma-intelligence-layer/package-lock.json +0 -5892
- package/figma-intelligence-layer/scripts/setup-comfyui-local.sh +0 -67
- package/figma-intelligence-layer/scripts/start-comfyui.sh +0 -33
- package/figma-intelligence-layer/src/index.ts +0 -2233
- package/figma-intelligence-layer/src/shared/auto-layout-validator.ts +0 -404
- package/figma-intelligence-layer/src/shared/cache.ts +0 -187
- package/figma-intelligence-layer/src/shared/color-operations.ts +0 -533
- package/figma-intelligence-layer/src/shared/color-utils.ts +0 -138
- package/figma-intelligence-layer/src/shared/component-script-builder.ts +0 -413
- package/figma-intelligence-layer/src/shared/component-templates.ts +0 -2767
- package/figma-intelligence-layer/src/shared/concept-taxonomy.ts +0 -694
- package/figma-intelligence-layer/src/shared/decision-log.ts +0 -128
- package/figma-intelligence-layer/src/shared/design-system-context.ts +0 -568
- package/figma-intelligence-layer/src/shared/design-system-intelligence.ts +0 -131
- package/figma-intelligence-layer/src/shared/design-system-matcher.ts +0 -184
- package/figma-intelligence-layer/src/shared/design-system-normalizers.ts +0 -196
- package/figma-intelligence-layer/src/shared/design-system-tokens.ts +0 -295
- package/figma-intelligence-layer/src/shared/dtcg-validator.ts +0 -530
- package/figma-intelligence-layer/src/shared/enrichment-pipeline.ts +0 -671
- package/figma-intelligence-layer/src/shared/figma-bridge.ts +0 -1418
- package/figma-intelligence-layer/src/shared/font-config.ts +0 -126
- package/figma-intelligence-layer/src/shared/icon-catalog.ts +0 -360
- package/figma-intelligence-layer/src/shared/icon-fetch.ts +0 -80
- package/figma-intelligence-layer/src/shared/prototype-script-builder.ts +0 -162
- package/figma-intelligence-layer/src/shared/response-compression.ts +0 -440
- package/figma-intelligence-layer/src/shared/semantic-token-catalog.ts +0 -324
- package/figma-intelligence-layer/src/shared/token-binder.ts +0 -505
- package/figma-intelligence-layer/src/shared/token-math.ts +0 -427
- package/figma-intelligence-layer/src/shared/token-naming.ts +0 -468
- package/figma-intelligence-layer/src/shared/token-utils.ts +0 -420
- package/figma-intelligence-layer/src/shared/types.ts +0 -346
- package/figma-intelligence-layer/src/shared/typography-presets.ts +0 -94
- package/figma-intelligence-layer/src/shared/unsplash.ts +0 -165
- package/figma-intelligence-layer/src/shared/vision-client.ts +0 -607
- package/figma-intelligence-layer/src/shared/vision-provider-anthropic.ts +0 -334
- package/figma-intelligence-layer/src/shared/vision-provider-openai.ts +0 -446
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/a11y-annotate-handler.ts +0 -782
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/a11y-annotate-renderer.ts +0 -496
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/a11y-annotation-kit.ts +0 -230
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/colorblind-sim.ts +0 -66
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/index.ts +0 -810
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/keyboard-sr-order-analyzer.ts +0 -1191
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/keyboard-sr-order-figma-page.ts +0 -1346
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/keyboard-sr-order-handler.ts +0 -148
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/vpat-figma-page.ts +0 -499
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/vpat-report.ts +0 -910
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/wcag-checker.ts +0 -989
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/wcag-criteria.ts +0 -1160
- package/figma-intelligence-layer/src/tools/phase1-vision/design-from-ref/index.ts +0 -424
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/component-recognizer.ts +0 -38
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/ds-matcher.ts +0 -111
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/font-matcher.ts +0 -114
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/icon-resolver.ts +0 -103
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/index.ts +0 -1060
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/layout-segmenter.ts +0 -18
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/token-inferencer.ts +0 -39
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/vision-pipeline.ts +0 -58
- package/figma-intelligence-layer/src/tools/phase1-vision/sketch-to-design/index.ts +0 -298
- package/figma-intelligence-layer/src/tools/phase1-vision/visual-audit/index.ts +0 -197
- package/figma-intelligence-layer/src/tools/phase2-accuracy/component-audit/index.ts +0 -494
- package/figma-intelligence-layer/src/tools/phase2-accuracy/intent-translator/index.ts +0 -356
- package/figma-intelligence-layer/src/tools/phase2-accuracy/layout-intelligence/container-patterns.ts +0 -123
- package/figma-intelligence-layer/src/tools/phase2-accuracy/layout-intelligence/index.ts +0 -663
- package/figma-intelligence-layer/src/tools/phase2-accuracy/lint-rules/built-in-rules.yaml +0 -56
- package/figma-intelligence-layer/src/tools/phase2-accuracy/lint-rules/index.ts +0 -614
- package/figma-intelligence-layer/src/tools/phase2-accuracy/lint-rules/rule-engine.ts +0 -113
- package/figma-intelligence-layer/src/tools/phase2-accuracy/theme-generator/color-theory.ts +0 -178
- package/figma-intelligence-layer/src/tools/phase2-accuracy/theme-generator/index.ts +0 -470
- package/figma-intelligence-layer/src/tools/phase2-accuracy/variant-expander/index.ts +0 -429
- package/figma-intelligence-layer/src/tools/phase2-accuracy/variant-expander/token-override-maps.ts +0 -226
- package/figma-intelligence-layer/src/tools/phase3-generation/ai-image-insert/index.ts +0 -535
- package/figma-intelligence-layer/src/tools/phase3-generation/component-archaeologist/index.ts +0 -660
- package/figma-intelligence-layer/src/tools/phase3-generation/component-archaeologist/pattern-fingerprints.ts +0 -209
- package/figma-intelligence-layer/src/tools/phase3-generation/composition-builder/index.ts +0 -540
- package/figma-intelligence-layer/src/tools/phase3-generation/figma-animated-build.ts +0 -391
- package/figma-intelligence-layer/src/tools/phase3-generation/page-architect/index.ts +0 -2019
- package/figma-intelligence-layer/src/tools/phase3-generation/page-architect/screen-templates.ts +0 -131
- package/figma-intelligence-layer/src/tools/phase3-generation/prototype-map/index.ts +0 -381
- package/figma-intelligence-layer/src/tools/phase3-generation/prototype-wire/index.ts +0 -565
- package/figma-intelligence-layer/src/tools/phase3-generation/swarm-build/index.ts +0 -764
- package/figma-intelligence-layer/src/tools/phase3-generation/system-drift/index.ts +0 -535
- package/figma-intelligence-layer/src/tools/phase3-generation/unsplash-search/index.ts +0 -84
- package/figma-intelligence-layer/src/tools/phase3-generation/url-to-frame/index.ts +0 -401
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/code-generators/css-animations.ts +0 -68
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/code-generators/framer-motion.ts +0 -78
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/code-generators/swift-animations.ts +0 -93
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/index.ts +0 -596
- package/figma-intelligence-layer/src/tools/phase4-sync/ci-check/index.ts +0 -462
- package/figma-intelligence-layer/src/tools/phase4-sync/export-tokens/index.ts +0 -1470
- package/figma-intelligence-layer/src/tools/phase4-sync/generate-component-code/index.ts +0 -829
- package/figma-intelligence-layer/src/tools/phase4-sync/handoff-spec/index.ts +0 -702
- package/figma-intelligence-layer/src/tools/phase4-sync/icon-library-sync/index.ts +0 -483
- package/figma-intelligence-layer/src/tools/phase4-sync/sync-from-code/index.ts +0 -501
- package/figma-intelligence-layer/src/tools/phase4-sync/sync-from-code/storybook-parser.ts +0 -106
- package/figma-intelligence-layer/src/tools/phase4-sync/watch-docs/index.ts +0 -676
- package/figma-intelligence-layer/src/tools/phase4-sync/webhook-listener/index.ts +0 -560
- package/figma-intelligence-layer/src/tools/phase5-governance/apg-doc/index.ts +0 -1043
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/component-detection.ts +0 -620
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/anatomy.ts +0 -331
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/color-tokens.ts +0 -77
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/properties.ts +0 -54
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/snapshot.ts +0 -287
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/spacing.ts +0 -71
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/states.ts +0 -43
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/typography.ts +0 -71
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/index.ts +0 -221
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/_default.ts +0 -166
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/accordion.ts +0 -232
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/alert.ts +0 -234
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/avatar-group.ts +0 -270
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/avatar.ts +0 -249
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/badge.ts +0 -231
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/banner.ts +0 -293
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/breadcrumb.ts +0 -240
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/button.ts +0 -243
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/calendar.ts +0 -307
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/card.ts +0 -143
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/checkbox.ts +0 -227
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/chip.ts +0 -233
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/combobox.ts +0 -282
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/datepicker.ts +0 -276
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/divider.ts +0 -223
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/drawer.ts +0 -255
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/dropdown-menu.ts +0 -289
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/empty-state.ts +0 -261
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/file-uploader.ts +0 -290
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/form.ts +0 -265
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/grid.ts +0 -238
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/icon.ts +0 -255
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/index.ts +0 -128
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/inline-edit.ts +0 -286
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/inline-message.ts +0 -255
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/input.ts +0 -330
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/link.ts +0 -247
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/list.ts +0 -250
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/menu.ts +0 -247
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/modal.ts +0 -144
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/navbar.ts +0 -264
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/navigation.ts +0 -251
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/number-input.ts +0 -261
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/pagination.ts +0 -248
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/popover.ts +0 -270
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/progress.ts +0 -251
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/radio.ts +0 -142
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/range-slider.ts +0 -282
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/rating.ts +0 -250
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/search.ts +0 -258
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/segmented-control.ts +0 -265
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/select.ts +0 -319
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/skeleton.ts +0 -256
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/slider.ts +0 -232
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/spinner.ts +0 -239
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/status-dot.ts +0 -252
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/stepper.ts +0 -270
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/table.ts +0 -244
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/tabs.ts +0 -143
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/tag.ts +0 -243
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/textarea.ts +0 -259
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/time-picker.ts +0 -293
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/toast.ts +0 -144
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/toggle.ts +0 -289
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/toolbar.ts +0 -267
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/tooltip.ts +0 -232
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/treeview.ts +0 -257
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/typography.ts +0 -319
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/legacy-compat.ts +0 -121
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/anatomy-diagram.ts +0 -430
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/figma-page.ts +0 -312
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/json.ts +0 -129
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/markdown.ts +0 -78
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/visual-doc.ts +0 -2333
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/accessibility.ts +0 -100
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/anatomy.ts +0 -32
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/color-tokens.ts +0 -59
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/content-guidance.ts +0 -18
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/design-tokens.ts +0 -53
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/interaction-rules.ts +0 -19
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/overview.ts +0 -91
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/properties-api.ts +0 -71
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/qa-criteria.ts +0 -19
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/related-components.ts +0 -110
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/responsive.ts +0 -19
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/size-specs.ts +0 -67
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/spacing-structure.ts +0 -58
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/state-specs.ts +0 -79
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/states.ts +0 -50
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/type-hierarchy.ts +0 -33
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/typography.ts +0 -55
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/usage-guidelines.ts +0 -73
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/variants.ts +0 -81
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/types.ts +0 -409
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec-sheet/index.ts +0 -198
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec-sheet/renderer.ts +0 -701
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec-sheet/types.ts +0 -88
- package/figma-intelligence-layer/src/tools/phase5-governance/decision-log/index.ts +0 -135
- package/figma-intelligence-layer/src/tools/phase5-governance/design-decision-log/index.ts +0 -491
- package/figma-intelligence-layer/src/tools/phase5-governance/ds-primitives/index.ts +0 -416
- package/figma-intelligence-layer/src/tools/phase5-governance/ds-scaffolder/index.ts +0 -722
- package/figma-intelligence-layer/src/tools/phase5-governance/ds-variables/index.ts +0 -449
- package/figma-intelligence-layer/src/tools/phase5-governance/health-report/index.ts +0 -393
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/index.ts +0 -406
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/figma-page.ts +0 -292
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/json.ts +0 -24
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/markdown.ts +0 -172
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/naming-guide.ts +0 -409
- package/figma-intelligence-layer/src/tools/phase5-governance/token-analytics/index.ts +0 -594
- package/figma-intelligence-layer/src/tools/phase5-governance/token-docs/index.ts +0 -710
- package/figma-intelligence-layer/src/tools/phase5-governance/token-migrate/index.ts +0 -458
- package/figma-intelligence-layer/src/tools/phase5-governance/token-naming/index.ts +0 -134
- package/figma-intelligence-layer/tests/apg-doc.test.ts +0 -101
- package/figma-intelligence-layer/tests/design-system-context.test.ts +0 -152
- package/figma-intelligence-layer/tests/design-system-matcher.test.ts +0 -144
- package/figma-intelligence-layer/tests/figma-bridge.test.ts +0 -83
- package/figma-intelligence-layer/tests/generate-image-and-insert.test.ts +0 -56
- package/figma-intelligence-layer/tests/screen-cloner-regression.test.ts +0 -69
- package/figma-intelligence-layer/tests/smoke.test.ts +0 -174
- package/figma-intelligence-layer/tests/spec-generator.test.ts +0 -127
- package/figma-intelligence-layer/tests/token-migrate.test.ts +0 -21
- package/figma-intelligence-layer/tests/token-naming.test.ts +0 -30
- package/figma-intelligence-layer/tsconfig.json +0 -19
- package/scripts/clean-existing-chunks.js +0 -179
- package/scripts/connect-ai-tool.js +0 -490
- package/scripts/convert-hub-pdfs.js +0 -425
- package/scripts/figma-mcp-status.js +0 -349
- package/scripts/register-codex-mcp.js +0 -96
- /package/{design-bridge → dist/design-bridge}/.env.example +0 -0
- /package/{design-bridge → dist/design-bridge}/package.json +0 -0
- /package/{figma-bridge-plugin → dist/figma-bridge-plugin}/manifest.json +0 -0
- /package/{figma-bridge-plugin → dist/figma-bridge-plugin}/package.json +0 -0
- /package/{figma-intelligence-layer → dist/figma-intelligence-layer}/package.json +0 -0
package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/radio.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import type { ComponentKnowledge } from "../types.js";
|
|
2
|
-
|
|
3
|
-
export const radioKnowledge: ComponentKnowledge = {
|
|
4
|
-
description:
|
|
5
|
-
"Exclusive selection control | Single choice from group | Mutually exclusive options",
|
|
6
|
-
|
|
7
|
-
stateSpecifications: [
|
|
8
|
-
{ state: "Unchecked-Default", visualChange: "Empty circle with border", opacity: "1", cursorWeb: "pointer", usage: "Idle option not yet selected by the user" },
|
|
9
|
-
{ state: "Unchecked-Hover", visualChange: "Border darkens, subtle fill tint on circle", opacity: "1", cursorWeb: "pointer", usage: "Pointer over an unselected radio" },
|
|
10
|
-
{ state: "Unchecked-Focus", visualChange: "Focus ring around circle, no fill change", opacity: "1", cursorWeb: "default", usage: "Keyboard navigation lands on the option" },
|
|
11
|
-
{ state: "Checked-Default", visualChange: "Filled inner dot appears inside circle", opacity: "1", cursorWeb: "pointer", usage: "Currently selected option in the group" },
|
|
12
|
-
{ state: "Checked-Hover", visualChange: "Filled dot with darker border highlight", opacity: "1", cursorWeb: "pointer", usage: "Pointer hovers over the active selection" },
|
|
13
|
-
{ state: "Disabled-Unchecked", visualChange: "Faded circle, muted border", opacity: "0.4", cursorWeb: "not-allowed", usage: "Option unavailable for selection" },
|
|
14
|
-
{ state: "Disabled-Checked", visualChange: "Faded filled dot, muted border", opacity: "0.4", cursorWeb: "not-allowed", usage: "Selected but locked option" },
|
|
15
|
-
],
|
|
16
|
-
|
|
17
|
-
propertyDescriptions: {
|
|
18
|
-
checked: "Whether this radio is the currently selected option in the group",
|
|
19
|
-
disabled: "Prevents interaction and dims the radio visually",
|
|
20
|
-
name: "Shared group name that enforces mutual exclusivity across radios",
|
|
21
|
-
value: "Unique value submitted when this option is selected",
|
|
22
|
-
label: "Visible text describing the option; always required",
|
|
23
|
-
helperText: "Optional secondary line clarifying the option's meaning",
|
|
24
|
-
error: "Displays validation styling and error message for the group",
|
|
25
|
-
size: "Controls the diameter of the radio circle and label font size",
|
|
26
|
-
orientation: "Vertical (stacked) or horizontal (inline) layout for the group",
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
sizeSpecifications: [
|
|
30
|
-
{ size: "sm", height: "16px", paddingLR: "4px", fontSize: "12px", iconSize: "8px", borderRadius: "50%" },
|
|
31
|
-
{ size: "md", height: "20px", paddingLR: "6px", fontSize: "14px", iconSize: "10px", borderRadius: "50%" },
|
|
32
|
-
{ size: "lg", height: "24px", paddingLR: "8px", fontSize: "16px", iconSize: "12px", borderRadius: "50%" },
|
|
33
|
-
{ size: "xl", height: "28px", paddingLR: "10px", fontSize: "18px", iconSize: "14px", borderRadius: "50%" },
|
|
34
|
-
{ size: "compact", height: "14px", paddingLR: "2px", fontSize: "11px", iconSize: "6px", borderRadius: "50%" },
|
|
35
|
-
],
|
|
36
|
-
|
|
37
|
-
designTokenBindings: [
|
|
38
|
-
{ property: "circle-border", tokenName: "color/border/interactive", role: "Outer ring of unselected radio", fallback: "#8D8D8D" },
|
|
39
|
-
{ property: "dot-fill", tokenName: "color/icon/interactive", role: "Inner dot fill when selected", fallback: "#0F62FE" },
|
|
40
|
-
{ property: "circle-bg", tokenName: "color/field/01", role: "Background of the radio circle", fallback: "#FFFFFF" },
|
|
41
|
-
{ property: "label-text", tokenName: "color/text/primary", role: "Label text beside the radio", fallback: "#161616" },
|
|
42
|
-
{ property: "focus-ring", tokenName: "color/focus", role: "Keyboard focus outline", fallback: "#0F62FE" },
|
|
43
|
-
{ property: "error-border", tokenName: "color/support/error", role: "Circle border when group is invalid", fallback: "#DA1E28" },
|
|
44
|
-
{ property: "disabled-fill", tokenName: "color/disabled/02", role: "Muted fill for disabled state", fallback: "#C6C6C6" },
|
|
45
|
-
],
|
|
46
|
-
|
|
47
|
-
structureRules: [
|
|
48
|
-
"Radios must always be grouped inside a <fieldset> with a <legend> labelling the question",
|
|
49
|
-
"Each radio input must have an associated <label> element linked via htmlFor/id",
|
|
50
|
-
"Only one radio in a group may have checked=true at any time",
|
|
51
|
-
"The inner dot must be centered within the circle and scale proportionally with size",
|
|
52
|
-
"Label text sits to the right (LTR) or left (RTL) of the circle with consistent gap",
|
|
53
|
-
"Helper text, if present, aligns below the label at the same inline-start position",
|
|
54
|
-
"Error messages render below the entire radio group, not per individual option",
|
|
55
|
-
],
|
|
56
|
-
|
|
57
|
-
typeHierarchyRules: [
|
|
58
|
-
"Label uses body-compact-01 for md size, body-compact-02 for lg size",
|
|
59
|
-
"Helper text is one step smaller than its label counterpart",
|
|
60
|
-
"Error message uses body-compact-01 in the support-error color",
|
|
61
|
-
"Legend text uses heading-compact-01 to distinguish the group question from options",
|
|
62
|
-
"Label and helper text must maintain a minimum 4.5:1 contrast ratio",
|
|
63
|
-
"Disabled label text drops to 3:1 ratio but must still be legible",
|
|
64
|
-
"No text truncation; labels should wrap if they exceed the container width",
|
|
65
|
-
],
|
|
66
|
-
|
|
67
|
-
interactionRules: [
|
|
68
|
-
{ event: "click", trigger: "User clicks on circle or label", action: "Select this radio and deselect any other checked radio in the group" },
|
|
69
|
-
{ event: "keydown:ArrowDown/ArrowRight", trigger: "Focus is on a radio in the group", action: "Move focus and selection to the next radio, wrapping to first" },
|
|
70
|
-
{ event: "keydown:ArrowUp/ArrowLeft", trigger: "Focus is on a radio in the group", action: "Move focus and selection to the previous radio, wrapping to last" },
|
|
71
|
-
{ event: "keydown:Tab", trigger: "Focus is on any radio in the group", action: "Move focus out of the radio group to the next focusable element" },
|
|
72
|
-
{ event: "keydown:Space", trigger: "Focus is on an unchecked radio", action: "Select the focused radio" },
|
|
73
|
-
{ event: "focus", trigger: "Keyboard navigates into the group", action: "Focus lands on the currently checked radio or the first radio if none checked" },
|
|
74
|
-
],
|
|
75
|
-
|
|
76
|
-
contentGuidance: [
|
|
77
|
-
"Keep option labels concise — ideally one line of text",
|
|
78
|
-
"Write labels as noun phrases, not full sentences (e.g. 'Standard shipping' not 'I want standard shipping')",
|
|
79
|
-
"Present options in a logical order: most common first or in ascending/descending value",
|
|
80
|
-
"Use a legend that clearly frames the question — e.g. 'Payment method'",
|
|
81
|
-
"Limit groups to 7 or fewer options; use a select/dropdown for longer lists",
|
|
82
|
-
"Avoid negative phrasing in labels — prefer 'Opt out' over 'Do not include'",
|
|
83
|
-
"If helper text is needed, use it sparingly and only on options that need clarification",
|
|
84
|
-
],
|
|
85
|
-
|
|
86
|
-
responsiveBehaviour: [
|
|
87
|
-
{ breakpoint: "≥ 1056px (lg)", behavior: "Horizontal layout if 4 or fewer options; otherwise vertical stack" },
|
|
88
|
-
{ breakpoint: "672–1055px (md)", behavior: "Vertical stack recommended; horizontal only for 2–3 short-label options" },
|
|
89
|
-
{ breakpoint: "< 672px (sm)", behavior: "Always vertical stack; label wraps, hit target fills full width" },
|
|
90
|
-
{ breakpoint: "Touch devices", behavior: "Minimum 44×44px touch target around circle and label area" },
|
|
91
|
-
{ breakpoint: "RTL layouts", behavior: "Circle moves to inline-end, label to inline-start; arrow key directions invert" },
|
|
92
|
-
],
|
|
93
|
-
|
|
94
|
-
accessibilitySpec: {
|
|
95
|
-
intro:
|
|
96
|
-
"Radio groups must be perceivable, operable, and understandable by assistive technology users. The <fieldset>/<legend> pattern ensures screen readers announce the group question.",
|
|
97
|
-
requirements: [
|
|
98
|
-
{ requirement: "Each radio must have role='radio' and be inside a group with role='radiogroup'", level: "A", notes: "Native <input type='radio'> in <fieldset> satisfies this automatically" },
|
|
99
|
-
{ requirement: "The group must have an accessible name via <legend> or aria-labelledby", level: "A", notes: "Visible legend preferred over aria-label" },
|
|
100
|
-
{ requirement: "Arrow keys must move both focus and selection within the group", level: "A", notes: "Roving tabindex pattern recommended" },
|
|
101
|
-
{ requirement: "Only the active/checked radio should be in the tab order (tabindex 0)", level: "A", notes: "Other radios get tabindex -1" },
|
|
102
|
-
{ requirement: "State change must be announced via aria-checked", level: "A", notes: "Native inputs handle this; custom implementations must manage it" },
|
|
103
|
-
{ requirement: "Error messages must be linked to the group via aria-describedby", level: "A", notes: "Use a live region or aria-invalid on the group container" },
|
|
104
|
-
{ requirement: "Focus indicator must have at least 3:1 contrast against adjacent colors", level: "AA", notes: "WCAG 2.4.11 focus appearance" },
|
|
105
|
-
],
|
|
106
|
-
outro: [
|
|
107
|
-
"Test with VoiceOver, NVDA, and JAWS to confirm group name and option announcement",
|
|
108
|
-
"Verify arrow-key roving works correctly when radios wrap between first and last",
|
|
109
|
-
"Ensure disabled radios are excluded from the arrow-key cycle",
|
|
110
|
-
],
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
qaAcceptanceCriteria: [
|
|
114
|
-
{ check: "Only one radio in a group can be selected at a time", platform: "All", expectedResult: "Selecting a new radio deselects the previous one" },
|
|
115
|
-
{ check: "Arrow keys cycle through options", platform: "Web", expectedResult: "Focus and selection move; wrap at boundaries" },
|
|
116
|
-
{ check: "Tab key exits the group", platform: "Web", expectedResult: "Focus moves to next focusable element outside the group" },
|
|
117
|
-
{ check: "Disabled radios cannot be selected", platform: "All", expectedResult: "Click and keyboard interactions are blocked" },
|
|
118
|
-
{ check: "Error state displays below the group", platform: "All", expectedResult: "Red border on circles and error text visible" },
|
|
119
|
-
{ check: "Touch target meets 44px minimum", platform: "Mobile", expectedResult: "Tapping near the radio reliably triggers selection" },
|
|
120
|
-
{ check: "Screen reader announces group label and selected state", platform: "Web", expectedResult: "'Payment method, Standard shipping, selected, radio button 1 of 3'" },
|
|
121
|
-
],
|
|
122
|
-
|
|
123
|
-
dos: [
|
|
124
|
-
"Always provide a default selected option when one choice is strongly recommended",
|
|
125
|
-
"Use fieldset/legend to semantically group radios under a question",
|
|
126
|
-
"Keep the number of options between 2 and 7",
|
|
127
|
-
"Vertically stack options on small viewports for easy scanning",
|
|
128
|
-
"Use helper text to clarify options that might be ambiguous",
|
|
129
|
-
"Ensure the selected dot color meets 3:1 contrast against the circle background",
|
|
130
|
-
"Provide clear error messaging at the group level when validation fails",
|
|
131
|
-
],
|
|
132
|
-
|
|
133
|
-
donts: [
|
|
134
|
-
"Don't use radios for toggling a single binary setting — use a toggle or checkbox instead",
|
|
135
|
-
"Don't mix radios and checkboxes in the same option group",
|
|
136
|
-
"Don't pre-select an option in legal or consent scenarios where explicit choice is required",
|
|
137
|
-
"Don't rely on color alone to indicate selected state — the filled dot shape is essential",
|
|
138
|
-
"Don't place radios in a horizontal row if labels vary significantly in length",
|
|
139
|
-
"Don't omit the group label/legend — screen readers need it for context",
|
|
140
|
-
"Don't disable all options in a group without explaining why via helper text",
|
|
141
|
-
],
|
|
142
|
-
};
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* range-slider.ts — Gold-standard design knowledge for Range Slider (dual-thumb) components
|
|
3
|
-
*/
|
|
4
|
-
import type { ComponentKnowledge } from "../types.js";
|
|
5
|
-
|
|
6
|
-
export const rangeSliderKnowledge: ComponentKnowledge = {
|
|
7
|
-
description:
|
|
8
|
-
"Dual-thumb range slider | Min/max value selection | Continuous or stepped range input with two draggable handles",
|
|
9
|
-
|
|
10
|
-
stateSpecifications: [
|
|
11
|
-
{
|
|
12
|
-
state: "Default",
|
|
13
|
-
visualChange: "Track shows filled range between two thumbs; unfilled portions are muted; thumbs are at their current positions",
|
|
14
|
-
opacity: "1",
|
|
15
|
-
cursorWeb: "pointer",
|
|
16
|
-
usage: "Resting state — both thumbs are interactive and positioned at their current values",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
state: "Hover (Thumb)",
|
|
20
|
-
visualChange: "Hovered thumb increases in size slightly or gains a subtle glow/ring effect",
|
|
21
|
-
opacity: "1",
|
|
22
|
-
cursorWeb: "grab",
|
|
23
|
-
usage: "Mouse cursor enters a thumb's hit area — indicates the thumb can be dragged",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
state: "Active (Dragging)",
|
|
27
|
-
visualChange: "Active thumb is visually elevated (shadow or scale-up); value tooltip appears above showing current value",
|
|
28
|
-
opacity: "1",
|
|
29
|
-
cursorWeb: "grabbing",
|
|
30
|
-
usage: "User is actively dragging a thumb to adjust the range boundary",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
state: "Focus",
|
|
34
|
-
visualChange: "Focused thumb shows a 2px focus ring; keyboard adjustments are possible",
|
|
35
|
-
opacity: "1",
|
|
36
|
-
cursorWeb: "pointer",
|
|
37
|
-
usage: "A thumb receives keyboard focus via Tab navigation for keyboard-driven value adjustment",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
state: "Disabled",
|
|
41
|
-
visualChange: "Track and both thumbs are muted/desaturated; no interaction possible",
|
|
42
|
-
opacity: "0.4",
|
|
43
|
-
cursorWeb: "not-allowed",
|
|
44
|
-
usage: "Range selection is unavailable — the component is non-interactive",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
state: "Error",
|
|
48
|
-
visualChange: "Track filled portion turns error color; error message appears below; thumbs may show error ring",
|
|
49
|
-
opacity: "1",
|
|
50
|
-
cursorWeb: "pointer",
|
|
51
|
-
usage: "Selected range is invalid — e.g. range too narrow or too wide for business rules",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
|
|
55
|
-
propertyDescriptions: {
|
|
56
|
-
min: "Minimum possible value for the slider range — the leftmost position of the track",
|
|
57
|
-
max: "Maximum possible value for the slider range — the rightmost position of the track",
|
|
58
|
-
step: "Increment between selectable values — determines the snap points on the track (e.g. 1, 5, 10)",
|
|
59
|
-
value: "Tuple [minValue, maxValue] representing the current range selection; controlled by parent component",
|
|
60
|
-
onChange: "Callback invoked with the new [minValue, maxValue] tuple when either thumb is moved",
|
|
61
|
-
size: "Dimensional preset — Small, Medium, or Large — controlling track height, thumb size, and label font size",
|
|
62
|
-
label: "Visible label text for the range slider; positioned above the track",
|
|
63
|
-
showValues: "When true, displays the current min and max values as text labels at each end or above each thumb",
|
|
64
|
-
showTooltip: "When true, shows a value tooltip above the thumb while dragging or on hover",
|
|
65
|
-
marks: "Array of labeled tick marks to display along the track at specific value positions",
|
|
66
|
-
disabled: "When true, the slider is non-interactive; both thumbs and the track are muted",
|
|
67
|
-
minRange: "Minimum allowed distance between the two thumbs; prevents them from being too close together",
|
|
68
|
-
maxRange: "Maximum allowed distance between the two thumbs; constrains the range width",
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
sizeSpecifications: [
|
|
72
|
-
{
|
|
73
|
-
size: "Small",
|
|
74
|
-
height: "4px (track)",
|
|
75
|
-
paddingLR: "0px",
|
|
76
|
-
fontSize: "12px",
|
|
77
|
-
iconSize: "14px (thumb)",
|
|
78
|
-
borderRadius: "2px (track) / 50% (thumb)",
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
size: "Medium",
|
|
82
|
-
height: "6px (track)",
|
|
83
|
-
paddingLR: "0px",
|
|
84
|
-
fontSize: "14px",
|
|
85
|
-
iconSize: "18px (thumb)",
|
|
86
|
-
borderRadius: "3px (track) / 50% (thumb)",
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
size: "Large",
|
|
90
|
-
height: "8px (track)",
|
|
91
|
-
paddingLR: "0px",
|
|
92
|
-
fontSize: "16px",
|
|
93
|
-
iconSize: "24px (thumb)",
|
|
94
|
-
borderRadius: "4px (track) / 50% (thumb)",
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
|
|
98
|
-
designTokenBindings: [
|
|
99
|
-
{
|
|
100
|
-
property: "Track Background",
|
|
101
|
-
tokenName: "$range-slider-track-bg",
|
|
102
|
-
role: "Unfilled track background color (portions outside the selected range)",
|
|
103
|
-
fallback: "#E4E7EC",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
property: "Track Fill",
|
|
107
|
-
tokenName: "$range-slider-fill",
|
|
108
|
-
role: "Filled track color between the two thumbs (the selected range)",
|
|
109
|
-
fallback: "#2563EB",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
property: "Thumb Background",
|
|
113
|
-
tokenName: "$range-slider-thumb-bg",
|
|
114
|
-
role: "Background fill of both thumb elements",
|
|
115
|
-
fallback: "#FFFFFF",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
property: "Thumb Border",
|
|
119
|
-
tokenName: "$range-slider-thumb-border",
|
|
120
|
-
role: "Border around both thumb elements",
|
|
121
|
-
fallback: "#2563EB",
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
property: "Thumb Shadow",
|
|
125
|
-
tokenName: "$range-slider-thumb-shadow",
|
|
126
|
-
role: "Elevation shadow on thumb elements",
|
|
127
|
-
fallback: "0 1px 3px rgba(0, 0, 0, 0.2)",
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
property: "Thumb Hover Ring",
|
|
131
|
-
tokenName: "$range-slider-thumb-hover",
|
|
132
|
-
role: "Subtle ring or glow effect on thumb hover",
|
|
133
|
-
fallback: "rgba(37, 99, 235, 0.15)",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
property: "Tooltip Background",
|
|
137
|
-
tokenName: "$range-slider-tooltip-bg",
|
|
138
|
-
role: "Background of the value tooltip shown during dragging",
|
|
139
|
-
fallback: "#101828",
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
property: "Tooltip Text",
|
|
143
|
-
tokenName: "$range-slider-tooltip-text",
|
|
144
|
-
role: "Text color inside the value tooltip",
|
|
145
|
-
fallback: "#FFFFFF",
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
property: "Label Color",
|
|
149
|
-
tokenName: "$range-slider-label",
|
|
150
|
-
role: "Label text color above the slider",
|
|
151
|
-
fallback: "#344054",
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
property: "Value Text",
|
|
155
|
-
tokenName: "$range-slider-value-text",
|
|
156
|
-
role: "Text color for the displayed min/max values",
|
|
157
|
-
fallback: "#667085",
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
property: "Mark Color",
|
|
161
|
-
tokenName: "$range-slider-mark",
|
|
162
|
-
role: "Color for tick marks along the track",
|
|
163
|
-
fallback: "#98A2B3",
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
property: "Focus Ring",
|
|
167
|
-
tokenName: "$focus-ring",
|
|
168
|
-
role: "Keyboard focus indicator around the focused thumb",
|
|
169
|
-
fallback: "0 0 0 2px #FFFFFF, 0 0 0 4px #2E90FA",
|
|
170
|
-
},
|
|
171
|
-
],
|
|
172
|
-
|
|
173
|
-
structureRules: [
|
|
174
|
-
"Container uses vertical Auto Layout: label (optional) → slider track with thumbs → value labels/marks (optional)",
|
|
175
|
-
"Track is a horizontal bar with the filled range portion colored between the two thumb positions",
|
|
176
|
-
"Two thumb elements are positioned absolutely along the track based on their respective values",
|
|
177
|
-
"Each thumb is a circular element (border-radius: 50%) centered vertically on the track",
|
|
178
|
-
"Thumb hit area extends beyond the visible thumb to at least 44x44px for touch accessibility",
|
|
179
|
-
"Value tooltip is positioned above the active thumb using absolute positioning with a small arrow pointer",
|
|
180
|
-
"Tick marks are positioned along the track at values specified in the marks array",
|
|
181
|
-
"Mark labels are positioned below the track, centered on their corresponding tick mark",
|
|
182
|
-
"The filled track segment starts at the min thumb position and ends at the max thumb position",
|
|
183
|
-
"Thumbs cannot cross each other — the min thumb is constrained to values less than or equal to the max thumb",
|
|
184
|
-
],
|
|
185
|
-
|
|
186
|
-
typeHierarchyRules: [
|
|
187
|
-
"Label text uses Medium weight (500) at the standard fontSize for the size preset",
|
|
188
|
-
"Value display text uses Regular weight (400) at the same fontSize or one step smaller",
|
|
189
|
-
"Tooltip text uses Medium weight (500) at 12px with inverted (light-on-dark) color scheme",
|
|
190
|
-
"Mark labels use Regular weight (400) at 10-12px in a muted color",
|
|
191
|
-
"All numeric values should use tabular/monospace figures to prevent layout shifts during dragging",
|
|
192
|
-
],
|
|
193
|
-
|
|
194
|
-
interactionRules: [
|
|
195
|
-
{ event: "Drag Thumb", trigger: "Pointer down on a thumb then drag horizontally", action: "Move the thumb along the track; update value in real-time; fire onChange continuously" },
|
|
196
|
-
{ event: "Click Track", trigger: "Click/tap on the track between or outside the thumbs", action: "Move the nearest thumb to the clicked position; fire onChange" },
|
|
197
|
-
{ event: "Hover Thumb", trigger: "Pointer enters a thumb's hit area", action: "Show hover ring effect; cursor changes to 'grab'" },
|
|
198
|
-
{ event: "Focus Thumb", trigger: "Tab key reaches a thumb element", action: "Focus ring appears on the thumb; ready for keyboard adjustment" },
|
|
199
|
-
{ event: "Arrow Right/Up", trigger: "Arrow key while a thumb is focused", action: "Increase the thumb value by one step; fire onChange" },
|
|
200
|
-
{ event: "Arrow Left/Down", trigger: "Arrow key while a thumb is focused", action: "Decrease the thumb value by one step; fire onChange" },
|
|
201
|
-
{ event: "Page Up", trigger: "Page Up while a thumb is focused", action: "Increase the thumb value by 10 steps (or 10% of range); fire onChange" },
|
|
202
|
-
{ event: "Page Down", trigger: "Page Down while a thumb is focused", action: "Decrease the thumb value by 10 steps (or 10% of range); fire onChange" },
|
|
203
|
-
{ event: "Home", trigger: "Home key while a thumb is focused", action: "Set the thumb to its minimum allowed value (min for low thumb, low thumb value for high thumb)" },
|
|
204
|
-
{ event: "End", trigger: "End key while a thumb is focused", action: "Set the thumb to its maximum allowed value (high thumb value for low thumb, max for high thumb)" },
|
|
205
|
-
{ event: "Touch Drag", trigger: "Touch start + move on a thumb", action: "Same as pointer drag; ensure no page scroll while dragging" },
|
|
206
|
-
],
|
|
207
|
-
|
|
208
|
-
contentGuidance: [
|
|
209
|
-
"Label the slider clearly with the dimension being controlled: 'Price range', 'Distance', 'Age range'",
|
|
210
|
-
"Always display the current min and max values so users know their exact selection",
|
|
211
|
-
"Use units in value displays: '$50 - $200', '10km - 50km' — not just raw numbers",
|
|
212
|
-
"For financial values, use appropriate formatting with currency symbols and separators",
|
|
213
|
-
"Consider showing the full range bounds (min and max) at the track endpoints for context",
|
|
214
|
-
"Use tick marks with labels for sliders with discrete, meaningful stops (e.g. t-shirt sizes, price tiers)",
|
|
215
|
-
"Tooltip values should match the format of the displayed value labels for consistency",
|
|
216
|
-
],
|
|
217
|
-
|
|
218
|
-
responsiveBehaviour: [
|
|
219
|
-
{ breakpoint: "Mobile (<768px)", behavior: "Slider takes full container width; thumb size increases to 24px minimum for touch; value labels may stack vertically" },
|
|
220
|
-
{ breakpoint: "Tablet (768-1023px)", behavior: "Standard slider width; comfortable thumb sizes; value labels positioned inline" },
|
|
221
|
-
{ breakpoint: "Desktop (1024-1439px)", behavior: "Standard layout; tooltips appear on hover/drag; mark labels fully visible" },
|
|
222
|
-
{ breakpoint: "Ultra-wide (>=1440px)", behavior: "Slider width remains capped at container max-width; does not scale with viewport" },
|
|
223
|
-
],
|
|
224
|
-
|
|
225
|
-
accessibilitySpec: {
|
|
226
|
-
intro:
|
|
227
|
-
"Range sliders use two separate slider ARIA roles to enable independent control of min and max values. Each thumb must be independently operable via keyboard with proper value announcements.",
|
|
228
|
-
requirements: [
|
|
229
|
-
{ requirement: "Slider Role (Min)", level: "A", notes: "Min thumb must have role='slider' with aria-valuemin, aria-valuemax (capped at max thumb), and aria-valuenow" },
|
|
230
|
-
{ requirement: "Slider Role (Max)", level: "A", notes: "Max thumb must have role='slider' with aria-valuemin (capped at min thumb), aria-valuemax, and aria-valuenow" },
|
|
231
|
-
{ requirement: "Accessible Labels", level: "A", notes: "Each thumb needs a distinct aria-label: 'Minimum price' and 'Maximum price' to differentiate them" },
|
|
232
|
-
{ requirement: "Value Text", level: "A", notes: "Use aria-valuetext to provide formatted values (e.g. '$50') instead of raw numbers" },
|
|
233
|
-
{ requirement: "Keyboard Navigation", level: "A", notes: "Arrow keys change value by step; Page Up/Down by 10x step; Home/End to boundaries" },
|
|
234
|
-
{ requirement: "Tab Order", level: "A", notes: "Both thumbs must be in the tab order; Tab moves between thumbs; the min thumb comes first" },
|
|
235
|
-
{ requirement: "Contrast", level: "AA", notes: "Track fill and thumbs must meet 3:1 non-text contrast against the background; value text must meet 4.5:1" },
|
|
236
|
-
{ requirement: "Touch Target", level: "AA", notes: "Each thumb's interactive area must be at least 44x44px on touch devices" },
|
|
237
|
-
{ requirement: "Value Announcement", level: "AA", notes: "Screen readers should announce the new value as the thumb is moved via keyboard" },
|
|
238
|
-
],
|
|
239
|
-
outro: [
|
|
240
|
-
"Test that both thumbs can be independently controlled via keyboard without the values crossing",
|
|
241
|
-
"Verify screen readers announce the correct formatted value (aria-valuetext) when thumbs move",
|
|
242
|
-
"Ensure the relationship between the two thumbs is clear — use a group label like 'Price range'",
|
|
243
|
-
],
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
qaAcceptanceCriteria: [
|
|
247
|
-
{ check: "Default Render", platform: "All", expectedResult: "Track shows filled range between two thumbs; unfilled portions are muted" },
|
|
248
|
-
{ check: "Drag Min Thumb", platform: "All", expectedResult: "Min thumb moves along track; value updates in real-time; cannot cross max thumb" },
|
|
249
|
-
{ check: "Drag Max Thumb", platform: "All", expectedResult: "Max thumb moves along track; value updates in real-time; cannot cross min thumb" },
|
|
250
|
-
{ check: "Track Click", platform: "All", expectedResult: "Clicking track moves the nearest thumb to the clicked position" },
|
|
251
|
-
{ check: "Step Snapping", platform: "All", expectedResult: "Thumbs snap to valid step positions; no intermediate values" },
|
|
252
|
-
{ check: "Value Display", platform: "All", expectedResult: "Current min and max values are displayed with correct formatting and units" },
|
|
253
|
-
{ check: "Tooltip", platform: "Web", expectedResult: "Value tooltip appears above the active thumb during dragging; shows formatted value" },
|
|
254
|
-
{ check: "Keyboard Control", platform: "Web", expectedResult: "Arrow keys change value by step; Page Up/Down by 10x; Home/End to boundaries" },
|
|
255
|
-
{ check: "Min Range Constraint", platform: "All", expectedResult: "Thumbs cannot be closer than minRange; movement stops at the constraint boundary" },
|
|
256
|
-
{ check: "Max Range Constraint", platform: "All", expectedResult: "Thumbs cannot be farther apart than maxRange; movement stops at the constraint boundary" },
|
|
257
|
-
{ check: "Disabled State", platform: "All", expectedResult: "Track and thumbs are muted; no drag, click, or keyboard interaction" },
|
|
258
|
-
{ check: "Screen Reader", platform: "Web", expectedResult: "Both thumbs announce slider role, label, and current formatted value" },
|
|
259
|
-
{ check: "Touch Target", platform: "Mobile", expectedResult: "Each thumb has at least 44x44px touch area; drag works on touch devices without page scroll" },
|
|
260
|
-
{ check: "RTL Support", platform: "Web", expectedResult: "Track direction reverses; min thumb on right, max thumb on left; keyboard directions adjust" },
|
|
261
|
-
],
|
|
262
|
-
|
|
263
|
-
dos: [
|
|
264
|
-
"Give each thumb a distinct aria-label so screen readers can differentiate them (e.g. 'Minimum' and 'Maximum')",
|
|
265
|
-
"Use aria-valuetext to announce formatted values with units ('$50') instead of raw numbers",
|
|
266
|
-
"Display current values prominently so users always know their exact selection",
|
|
267
|
-
"Prevent thumbs from crossing each other — the min value must always be less than or equal to the max value",
|
|
268
|
-
"Support both drag interaction and keyboard step-by-step adjustment for accessibility",
|
|
269
|
-
"Enlarge thumb hit areas on touch devices to at least 44x44px for comfortable interaction",
|
|
270
|
-
"Use tick marks with labels for sliders with meaningful discrete stops",
|
|
271
|
-
],
|
|
272
|
-
|
|
273
|
-
donts: [
|
|
274
|
-
"Do not use a range slider for simple single-value selection — use a standard slider instead",
|
|
275
|
-
"Do not allow thumbs to overlap or cross — enforce min/max constraints",
|
|
276
|
-
"Do not fire onChange only on drag-end — provide continuous updates during dragging for real-time feedback",
|
|
277
|
-
"Do not make the track thinner than 4px — it must be a visible, clickable target",
|
|
278
|
-
"Do not use a range slider for precise numeric entry — pair with input fields for exact values",
|
|
279
|
-
"Do not omit value labels — users need to see the exact numbers, not just relative positions",
|
|
280
|
-
"Do not use the same aria-label for both thumbs — they must be distinguishable by screen readers",
|
|
281
|
-
],
|
|
282
|
-
};
|