@mich8060/unified-design-system 0.2.14 → 0.2.16
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/ai/discovery.json +14 -0
- package/dist/ai/examples/training.examples.cjs +1 -1
- package/dist/ai/examples/training.examples.js +1 -1
- package/dist/ai/figma-make.contract.json +190 -0
- package/dist/ai/figma-make.md +71 -0
- package/dist/ai/icons/catalog.json +76 -0
- package/dist/ai/index.cjs +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/manifest/components.manifest.cjs +1 -1
- package/dist/ai/manifest/components.manifest.js +1 -1
- package/dist/ai/manifest/index.cjs +1 -1
- package/dist/ai/manifest/index.js +1 -1
- package/dist/ai/manifest/intent-mappings.manifest.cjs +1 -0
- package/dist/ai/manifest/intent-mappings.manifest.js +1 -0
- package/dist/ai/manifest/system.manifest.cjs +1 -1
- package/dist/ai/manifest/system.manifest.js +1 -1
- package/dist/ai/manifest.json +366 -2
- package/dist/ai/policies/policy.engine.cjs +1 -1
- package/dist/ai/policies/policy.engine.js +1 -1
- package/dist/ai/policies/rules/props.rules.cjs +1 -1
- package/dist/ai/policies/rules/props.rules.js +1 -1
- package/dist/ai/policies/rules/tailwind.rules.cjs +1 -0
- package/dist/ai/policies/rules/tailwind.rules.js +1 -0
- package/dist/ai/policies/rules/token-variable.rules.cjs +1 -0
- package/dist/ai/policies/rules/token-variable.rules.js +1 -0
- package/dist/ai/prompts/figma-make.prompt.md +59 -0
- package/dist/ai/prompts/repair.prompt.md +13 -0
- package/dist/ai/prompts/starter.prompt.md +59 -0
- package/dist/ai/prompts/system.prompt.md +33 -0
- package/dist/ai/templates/layouts.json +272 -37
- package/dist/ai/validation/deterministicFeedback.cjs +1 -1
- package/dist/ai/validation/deterministicFeedback.js +1 -1
- package/dist/ai/validation/driftDetection.cjs +1 -1
- package/dist/ai/validation/driftDetection.js +1 -1
- package/dist/app-shell/AppShell.d.ts +8 -0
- package/dist/charts/BizChartsAdapters.cjs +1 -0
- package/dist/charts/BizChartsAdapters.js +1 -0
- package/dist/charts-bizcharts/index.cjs +1 -0
- package/dist/charts-bizcharts/index.js +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.cjs +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -0
- package/dist/components/Checklist/Checklist.cjs +1 -0
- package/dist/components/Checklist/Checklist.js +1 -0
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -0
- package/dist/components/CurrencyInput/CurrencyInput.js +1 -0
- package/dist/components/DateInput/DateInput.cjs +1 -0
- package/dist/components/DateInput/DateInput.js +1 -0
- package/dist/components/DateRangeInput/DateRangeInput.cjs +1 -0
- package/dist/components/DateRangeInput/DateRangeInput.js +1 -0
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/NumberInput/NumberInput.cjs +1 -0
- package/dist/components/NumberInput/NumberInput.js +1 -0
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -0
- package/dist/components/PasswordInput/PasswordInput.js +1 -0
- package/dist/components/PhoneInput/PhoneInput.cjs +1 -0
- package/dist/components/PhoneInput/PhoneInput.js +1 -0
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -0
- package/dist/components/RadioGroup/RadioGroup.js +1 -0
- package/dist/components/SearchInput/SearchInput.cjs +1 -0
- package/dist/components/SearchInput/SearchInput.js +1 -0
- package/dist/components/SectionHeader/SectionHeader.cjs +1 -0
- package/dist/components/SectionHeader/SectionHeader.js +1 -0
- package/dist/components/Statistics/Statistics.cjs +1 -0
- package/dist/components/Statistics/Statistics.js +1 -0
- package/dist/components/Status/Status.cjs +1 -1
- package/dist/components/Status/Status.js +1 -1
- package/dist/components/Table/Table.cjs +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Tabs/Tabs.cjs +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/TimeInput/TimeInput.cjs +1 -0
- package/dist/components/TimeInput/TimeInput.js +1 -0
- package/dist/components/TokenInput/TokenInput.cjs +1 -0
- package/dist/components/TokenInput/TokenInput.js +1 -0
- package/dist/components/Toolbar/Toolbar.cjs +1 -0
- package/dist/components/Toolbar/Toolbar.js +1 -0
- package/dist/design-system/ai/index.d.ts +2 -1
- package/dist/design-system/ai/manifest/index.d.ts +1 -0
- package/dist/design-system/ai/manifest/intent-mappings.manifest.d.ts +63 -0
- package/dist/design-system/ai/manifest/types.d.ts +8 -0
- package/dist/design-system/ai/policies/rules/tailwind.rules.d.ts +2 -0
- package/dist/design-system/ai/policies/rules/token-variable.rules.d.ts +2 -0
- package/dist/design-system/charts/BizChartsAdapters.d.ts +40 -0
- package/dist/design-system/charts/index.d.ts +1 -0
- package/dist/design-system/components/ButtonGroup/ButtonGroup.d.ts +3 -0
- package/dist/design-system/components/ButtonGroup/ButtonGroup.types.d.ts +19 -0
- package/dist/design-system/components/ButtonGroup/index.d.ts +2 -0
- package/dist/design-system/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
- package/dist/design-system/components/CheckboxGroup/CheckboxGroup.types.d.ts +15 -0
- package/dist/design-system/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/design-system/components/Checklist/Checklist.d.ts +3 -0
- package/dist/design-system/components/Checklist/Checklist.types.d.ts +13 -0
- package/dist/design-system/components/Checklist/index.d.ts +2 -0
- package/dist/design-system/components/Chip/Chip.d.ts +1 -1
- package/dist/design-system/components/Chip/Chip.types.d.ts +1 -1
- package/dist/design-system/components/CurrencyInput/CurrencyInput.d.ts +2 -0
- package/dist/design-system/components/CurrencyInput/CurrencyInput.types.d.ts +3 -0
- package/dist/design-system/components/CurrencyInput/index.d.ts +2 -0
- package/dist/design-system/components/DateInput/DateInput.d.ts +2 -0
- package/dist/design-system/components/DateInput/DateInput.types.d.ts +3 -0
- package/dist/design-system/components/DateInput/index.d.ts +2 -0
- package/dist/design-system/components/DateRangeInput/DateRangeInput.d.ts +3 -0
- package/dist/design-system/components/DateRangeInput/DateRangeInput.types.d.ts +15 -0
- package/dist/design-system/components/DateRangeInput/index.d.ts +2 -0
- package/dist/design-system/components/Menu/index.d.ts +3 -0
- package/dist/design-system/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/design-system/components/NumberInput/NumberInput.types.d.ts +2 -0
- package/dist/design-system/components/NumberInput/index.d.ts +2 -0
- package/dist/design-system/components/PasswordInput/PasswordInput.d.ts +2 -0
- package/dist/design-system/components/PasswordInput/PasswordInput.types.d.ts +5 -0
- package/dist/design-system/components/PasswordInput/index.d.ts +2 -0
- package/dist/design-system/components/PhoneInput/PhoneInput.d.ts +2 -0
- package/dist/design-system/components/PhoneInput/PhoneInput.types.d.ts +5 -0
- package/dist/design-system/components/PhoneInput/index.d.ts +2 -0
- package/dist/design-system/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/design-system/components/RadioGroup/RadioGroup.types.d.ts +16 -0
- package/dist/design-system/components/RadioGroup/index.d.ts +2 -0
- package/dist/design-system/components/SearchInput/SearchInput.d.ts +2 -0
- package/dist/design-system/components/SearchInput/SearchInput.types.d.ts +3 -0
- package/dist/design-system/components/SearchInput/index.d.ts +2 -0
- package/dist/design-system/components/SectionHeader/SectionHeader.d.ts +3 -0
- package/dist/design-system/components/SectionHeader/SectionHeader.types.d.ts +9 -0
- package/dist/design-system/components/SectionHeader/index.d.ts +2 -0
- package/dist/design-system/components/Statistics/Statistics.d.ts +3 -0
- package/dist/design-system/components/Statistics/Statistics.types.d.ts +18 -0
- package/dist/design-system/components/Statistics/index.d.ts +2 -0
- package/dist/design-system/components/Status/Status.types.d.ts +4 -2
- package/dist/design-system/components/Tabs/Tabs.d.ts +1 -1
- package/dist/design-system/components/Tabs/Tabs.types.d.ts +4 -1
- package/dist/design-system/components/TimeInput/TimeInput.d.ts +2 -0
- package/dist/design-system/components/TimeInput/TimeInput.types.d.ts +3 -0
- package/dist/design-system/components/TimeInput/index.d.ts +2 -0
- package/dist/design-system/components/Toggle/index.d.ts +2 -0
- package/dist/design-system/components/TokenInput/TokenInput.d.ts +4 -0
- package/dist/design-system/components/TokenInput/TokenInput.types.d.ts +17 -0
- package/dist/design-system/components/TokenInput/index.d.ts +3 -0
- package/dist/design-system/components/Toolbar/Toolbar.d.ts +3 -0
- package/dist/design-system/components/Toolbar/Toolbar.types.d.ts +8 -0
- package/dist/design-system/components/Toolbar/index.d.ts +2 -0
- package/dist/design-system/figma-make/index.d.ts +42 -0
- package/dist/design-system/generated/component-api.d.ts +477 -2
- package/dist/design-system/index.d.ts +17 -0
- package/dist/figma-make/index.cjs +1 -0
- package/dist/figma-make/index.js +1 -0
- package/dist/generated/component-api.cjs +1 -1
- package/dist/generated/component-api.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/src/app-shell/AppShell.cjs +1 -1
- package/dist/src/app-shell/AppShell.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +52 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./system.manifest.cjs"),e=require("./governance.manifest.cjs"),s=require("./components.manifest.cjs"),i=require("./patterns.manifest.cjs"),o=require("./layout.manifest.cjs"),_=require("./composition.manifest.cjs"),n=require("./prop-aliases.manifest.cjs"),I=require("./tokens.intent.manifest.cjs"),r=require("./intent-mappings.manifest.cjs");exports.UDSManifest=t.UDSManifest;exports.UDS_AI_MANIFEST=t.UDS_AI_MANIFEST;exports.AI_API_SCHEMA_VERSION=e.AI_API_SCHEMA_VERSION;exports.AI_COMPONENT_API_SCHEMA_VERSION=e.AI_COMPONENT_API_SCHEMA_VERSION;exports.AI_CONTRACT_SCHEMA_VERSION=e.AI_CONTRACT_SCHEMA_VERSION;exports.AI_GOVERNANCE_VERSION=e.AI_GOVERNANCE_VERSION;exports.AI_MANIFEST_VERSION=e.AI_MANIFEST_VERSION;exports.AI_POLICY_VERSION=e.AI_POLICY_VERSION;exports.AI_SCHEMA_VERSION=e.AI_SCHEMA_VERSION;exports.UDSGovernance=e.UDSGovernance;exports.getVersionLineage=e.getVersionLineage;exports.ComponentRegistry=s.ComponentRegistry;exports.PatternRegistry=i.PatternRegistry;exports.LayoutRules=o.LayoutRules;exports.CompositionRules=_.CompositionRules;exports.PropAliasRules=n.PropAliasRules;exports.getAliasEntries=n.getAliasEntries;exports.getCanonicalPropName=n.getCanonicalPropName;exports.TokenIntentMap=I.TokenIntentMap;exports.IntentComponentMappings=r.IntentComponentMappings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UDSManifest as r,UDS_AI_MANIFEST as t}from"./system.manifest.js";import{AI_API_SCHEMA_VERSION as
|
|
1
|
+
import{UDSManifest as r,UDS_AI_MANIFEST as t}from"./system.manifest.js";import{AI_API_SCHEMA_VERSION as n,AI_COMPONENT_API_SCHEMA_VERSION as A,AI_CONTRACT_SCHEMA_VERSION as _,AI_GOVERNANCE_VERSION as p,AI_MANIFEST_VERSION as E,AI_POLICY_VERSION as S,AI_SCHEMA_VERSION as N,UDSGovernance as R,getVersionLineage as m}from"./governance.manifest.js";import{ComponentRegistry as a}from"./components.manifest.js";import{PatternRegistry as s}from"./patterns.manifest.js";import{LayoutRules as f}from"./layout.manifest.js";import{CompositionRules as x}from"./composition.manifest.js";import{PropAliasRules as g,getAliasEntries as P,getCanonicalPropName as l}from"./prop-aliases.manifest.js";import{TokenIntentMap as u}from"./tokens.intent.manifest.js";import{IntentComponentMappings as y}from"./intent-mappings.manifest.js";export{n as AI_API_SCHEMA_VERSION,A as AI_COMPONENT_API_SCHEMA_VERSION,_ as AI_CONTRACT_SCHEMA_VERSION,p as AI_GOVERNANCE_VERSION,E as AI_MANIFEST_VERSION,S as AI_POLICY_VERSION,N as AI_SCHEMA_VERSION,a as ComponentRegistry,x as CompositionRules,y as IntentComponentMappings,f as LayoutRules,s as PatternRegistry,g as PropAliasRules,u as TokenIntentMap,R as UDSGovernance,r as UDSManifest,t as UDS_AI_MANIFEST,P as getAliasEntries,l as getCanonicalPropName,m as getVersionLineage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={primaryAction:{component:"Button",props:{appearance:"primary"},notes:"Use one primary action per section max."},secondaryAction:{component:"Button",props:{appearance:"text"},notes:"Use non-primary appearance for secondary actions."},sectionContainer:{component:"Container",props:{gap:"--uds-spacing-24"},notes:"Default section wrapper with governed spacing."},contentStack:{component:"Flex",props:{direction:"column",gap:"--uds-spacing-16"},notes:"Primary stack for vertical rhythm."},formFieldWrapper:{component:"Field",notes:"Wrap inputs that require label/helper/error messaging."},textInputControl:{component:"TextInput",notes:"Use TextInput for freeform single-line text."},selectionControl:{component:"Dropdown",notes:"Use Dropdown for controlled selection."},statusIndicator:{component:"Status",notes:"Use semantic status component for state communication."},badgeLabel:{component:"Tag",notes:"Use Tag for concise categorical labels."},contextualActions:{component:"ActionMenu",notes:"Use ActionMenu for row/object-level secondary actions."},dataPresentation:{component:"Table",notes:"Use Table for tabular datasets and structured records."},confirmationDialog:{component:"Modal",notes:"Use Modal for confirmation/destructive decision points."}};exports.IntentComponentMappings=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={primaryAction:{component:"Button",props:{appearance:"primary"},notes:"Use one primary action per section max."},secondaryAction:{component:"Button",props:{appearance:"text"},notes:"Use non-primary appearance for secondary actions."},sectionContainer:{component:"Container",props:{gap:"--uds-spacing-24"},notes:"Default section wrapper with governed spacing."},contentStack:{component:"Flex",props:{direction:"column",gap:"--uds-spacing-16"},notes:"Primary stack for vertical rhythm."},formFieldWrapper:{component:"Field",notes:"Wrap inputs that require label/helper/error messaging."},textInputControl:{component:"TextInput",notes:"Use TextInput for freeform single-line text."},selectionControl:{component:"Dropdown",notes:"Use Dropdown for controlled selection."},statusIndicator:{component:"Status",notes:"Use semantic status component for state communication."},badgeLabel:{component:"Tag",notes:"Use Tag for concise categorical labels."},contextualActions:{component:"ActionMenu",notes:"Use ActionMenu for row/object-level secondary actions."},dataPresentation:{component:"Table",notes:"Use Table for tabular datasets and structured records."},confirmationDialog:{component:"Modal",notes:"Use Modal for confirmation/destructive decision points."}};export{o as IntentComponentMappings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../tokens/runtime/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../tokens/runtime/index.cjs"),i=require("../../version.cjs"),s=require("./components.manifest.cjs"),e=require("./governance.manifest.cjs"),r=require("./intent-mappings.manifest.cjs"),a=require("./layout.manifest.cjs"),c=require("./patterns.manifest.cjs"),u=require("./tokens.intent.manifest.cjs"),n={version:i.UDS_RUNTIME_VERSION,tokenVersion:o.tokenVersion,components:s.ComponentRegistry,patterns:c.PatternRegistry,layout:a.LayoutRules,tokens:u.TokenIntentMap,intentComponentMappings:r.IntentComponentMappings,governance:{maxPrimaryActionsPerSection:e.UDSGovernance.limits.maxPrimaryActionsPerSection,spacingUnit:e.UDSGovernance.compliance.spacingUnit,defaultRadius:"--uds-radius-8"}},t=n,m=t,p=n;exports.UDSAIContract=t;exports.UDSManifest=n;exports.UDS_AI_CONTRACT=m;exports.UDS_AI_MANIFEST=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tokenVersion as n}from"../../tokens/runtime/index.js";import{UDS_RUNTIME_VERSION as r}from"../../version.js";import{ComponentRegistry as i}from"./components.manifest.js";import{UDSGovernance as o}from"./governance.manifest.js";import{
|
|
1
|
+
import{tokenVersion as n}from"../../tokens/runtime/index.js";import{UDS_RUNTIME_VERSION as r}from"../../version.js";import{ComponentRegistry as i}from"./components.manifest.js";import{UDSGovernance as o}from"./governance.manifest.js";import{IntentComponentMappings as e}from"./intent-mappings.manifest.js";import{LayoutRules as m}from"./layout.manifest.js";import{PatternRegistry as s}from"./patterns.manifest.js";import{TokenIntentMap as p}from"./tokens.intent.manifest.js";const t={version:r,tokenVersion:n,components:i,patterns:s,layout:m,tokens:p,intentComponentMappings:e,governance:{maxPrimaryActionsPerSection:o.limits.maxPrimaryActionsPerSection,spacingUnit:o.compliance.spacingUnit,defaultRadius:"--uds-radius-8"}},a=t,R=a,y=t;export{a as UDSAIContract,t as UDSManifest,R as UDS_AI_CONTRACT,y as UDS_AI_MANIFEST};
|
package/dist/ai/manifest.json
CHANGED
|
@@ -393,6 +393,64 @@
|
|
|
393
393
|
]
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
|
+
"ButtonGroup": {
|
|
397
|
+
"name": "ButtonGroup",
|
|
398
|
+
"category": "action",
|
|
399
|
+
"intent": "Grouped related button actions",
|
|
400
|
+
"purpose": "Groups related button actions with consistent spacing and orientation.",
|
|
401
|
+
"tier": 2,
|
|
402
|
+
"description": "A compositional wrapper that arranges multiple Button actions with consistent spacing and orientation for related decisions.",
|
|
403
|
+
"roles": [
|
|
404
|
+
"group"
|
|
405
|
+
],
|
|
406
|
+
"slots": null,
|
|
407
|
+
"states": [
|
|
408
|
+
"default"
|
|
409
|
+
],
|
|
410
|
+
"props": {
|
|
411
|
+
"orientation": {
|
|
412
|
+
"type": "enum",
|
|
413
|
+
"values": [
|
|
414
|
+
"horizontal",
|
|
415
|
+
"vertical"
|
|
416
|
+
],
|
|
417
|
+
"default": "horizontal"
|
|
418
|
+
},
|
|
419
|
+
"size": {
|
|
420
|
+
"type": "enum",
|
|
421
|
+
"values": [
|
|
422
|
+
"xsmall",
|
|
423
|
+
"small",
|
|
424
|
+
"default",
|
|
425
|
+
"large"
|
|
426
|
+
],
|
|
427
|
+
"default": "default"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"defaults": {
|
|
431
|
+
"orientation": "horizontal",
|
|
432
|
+
"size": "default"
|
|
433
|
+
},
|
|
434
|
+
"composition": {
|
|
435
|
+
"preferredParents": [
|
|
436
|
+
"Card",
|
|
437
|
+
"Container",
|
|
438
|
+
"Dialog",
|
|
439
|
+
"Modal"
|
|
440
|
+
],
|
|
441
|
+
"allowedChildren": [],
|
|
442
|
+
"allowedParents": [],
|
|
443
|
+
"disallowedChildren": [],
|
|
444
|
+
"constraints": null
|
|
445
|
+
},
|
|
446
|
+
"tokens": {
|
|
447
|
+
"allowed": [
|
|
448
|
+
"--uds-spacing-8",
|
|
449
|
+
"--uds-color-neutral-700",
|
|
450
|
+
"--uds-radius-8"
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
},
|
|
396
454
|
"Calendar": {
|
|
397
455
|
"name": "Calendar",
|
|
398
456
|
"category": "form",
|
|
@@ -508,6 +566,102 @@
|
|
|
508
566
|
]
|
|
509
567
|
}
|
|
510
568
|
},
|
|
569
|
+
"CheckboxGroup": {
|
|
570
|
+
"name": "CheckboxGroup",
|
|
571
|
+
"category": "form",
|
|
572
|
+
"intent": "Grouped multi-select checkboxes",
|
|
573
|
+
"purpose": "Provides grouped multi-select choices using Checkbox controls.",
|
|
574
|
+
"tier": 2,
|
|
575
|
+
"description": "A grouped set of Checkbox controls for selecting multiple options with shared label, orientation, and change handling.",
|
|
576
|
+
"roles": [
|
|
577
|
+
"group"
|
|
578
|
+
],
|
|
579
|
+
"slots": null,
|
|
580
|
+
"states": [
|
|
581
|
+
"default"
|
|
582
|
+
],
|
|
583
|
+
"props": {
|
|
584
|
+
"orientation": {
|
|
585
|
+
"type": "enum",
|
|
586
|
+
"values": [
|
|
587
|
+
"vertical",
|
|
588
|
+
"horizontal"
|
|
589
|
+
],
|
|
590
|
+
"default": "vertical"
|
|
591
|
+
},
|
|
592
|
+
"disabled": {
|
|
593
|
+
"type": "boolean",
|
|
594
|
+
"default": false
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"defaults": {
|
|
598
|
+
"orientation": "vertical",
|
|
599
|
+
"disabled": false
|
|
600
|
+
},
|
|
601
|
+
"composition": {
|
|
602
|
+
"preferredParents": [
|
|
603
|
+
"Field",
|
|
604
|
+
"Form",
|
|
605
|
+
"Card"
|
|
606
|
+
],
|
|
607
|
+
"allowedChildren": [],
|
|
608
|
+
"allowedParents": [],
|
|
609
|
+
"disallowedChildren": [],
|
|
610
|
+
"constraints": null
|
|
611
|
+
},
|
|
612
|
+
"tokens": {
|
|
613
|
+
"allowed": [
|
|
614
|
+
"--uds-spacing-8",
|
|
615
|
+
"--uds-spacing-12",
|
|
616
|
+
"--uds-color-neutral-700",
|
|
617
|
+
"--uds-color-blue-600"
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
"Checklist": {
|
|
622
|
+
"name": "Checklist",
|
|
623
|
+
"category": "navigation",
|
|
624
|
+
"intent": "Sidebar step checklist with completion progress",
|
|
625
|
+
"purpose": "Sidebar checklist for multi-step flows with completion status.",
|
|
626
|
+
"tier": 2,
|
|
627
|
+
"description": "A vertical step checklist used as a sidebar to track progress through multi-step workflows and forms.",
|
|
628
|
+
"roles": [
|
|
629
|
+
"navigation"
|
|
630
|
+
],
|
|
631
|
+
"slots": null,
|
|
632
|
+
"states": [
|
|
633
|
+
"default",
|
|
634
|
+
"active",
|
|
635
|
+
"completed",
|
|
636
|
+
"disabled"
|
|
637
|
+
],
|
|
638
|
+
"props": {},
|
|
639
|
+
"defaults": {},
|
|
640
|
+
"composition": {
|
|
641
|
+
"preferredParents": [
|
|
642
|
+
"AppShell",
|
|
643
|
+
"Container",
|
|
644
|
+
"Card"
|
|
645
|
+
],
|
|
646
|
+
"allowedChildren": [],
|
|
647
|
+
"allowedParents": [],
|
|
648
|
+
"disallowedChildren": [],
|
|
649
|
+
"constraints": null
|
|
650
|
+
},
|
|
651
|
+
"tokens": {
|
|
652
|
+
"allowed": [
|
|
653
|
+
"--uds-surface-primary",
|
|
654
|
+
"--uds-border-primary",
|
|
655
|
+
"--uds-text-primary",
|
|
656
|
+
"--uds-text-secondary",
|
|
657
|
+
"--uds-surface-brand-primary",
|
|
658
|
+
"--uds-spacing-8",
|
|
659
|
+
"--uds-spacing-12",
|
|
660
|
+
"--uds-spacing-20",
|
|
661
|
+
"--uds-spacing-24"
|
|
662
|
+
]
|
|
663
|
+
}
|
|
664
|
+
},
|
|
511
665
|
"Chip": {
|
|
512
666
|
"name": "Chip",
|
|
513
667
|
"category": "form",
|
|
@@ -537,7 +691,8 @@
|
|
|
537
691
|
"type": "enum",
|
|
538
692
|
"values": [
|
|
539
693
|
"default",
|
|
540
|
-
"compact"
|
|
694
|
+
"compact",
|
|
695
|
+
"mini"
|
|
541
696
|
],
|
|
542
697
|
"default": "default"
|
|
543
698
|
},
|
|
@@ -1777,6 +1932,58 @@
|
|
|
1777
1932
|
]
|
|
1778
1933
|
}
|
|
1779
1934
|
},
|
|
1935
|
+
"RadioGroup": {
|
|
1936
|
+
"name": "RadioGroup",
|
|
1937
|
+
"category": "form",
|
|
1938
|
+
"intent": "Grouped single-select radios",
|
|
1939
|
+
"purpose": "Provides grouped single-select choices using Radio controls.",
|
|
1940
|
+
"tier": 2,
|
|
1941
|
+
"description": "A grouped set of Radio controls for selecting exactly one option with shared name, layout orientation, and state handling.",
|
|
1942
|
+
"roles": [
|
|
1943
|
+
"radiogroup"
|
|
1944
|
+
],
|
|
1945
|
+
"slots": null,
|
|
1946
|
+
"states": [
|
|
1947
|
+
"default"
|
|
1948
|
+
],
|
|
1949
|
+
"props": {
|
|
1950
|
+
"orientation": {
|
|
1951
|
+
"type": "enum",
|
|
1952
|
+
"values": [
|
|
1953
|
+
"vertical",
|
|
1954
|
+
"horizontal"
|
|
1955
|
+
],
|
|
1956
|
+
"default": "vertical"
|
|
1957
|
+
},
|
|
1958
|
+
"disabled": {
|
|
1959
|
+
"type": "boolean",
|
|
1960
|
+
"default": false
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
"defaults": {
|
|
1964
|
+
"orientation": "vertical",
|
|
1965
|
+
"disabled": false
|
|
1966
|
+
},
|
|
1967
|
+
"composition": {
|
|
1968
|
+
"preferredParents": [
|
|
1969
|
+
"Field",
|
|
1970
|
+
"Form",
|
|
1971
|
+
"Card"
|
|
1972
|
+
],
|
|
1973
|
+
"allowedChildren": [],
|
|
1974
|
+
"allowedParents": [],
|
|
1975
|
+
"disallowedChildren": [],
|
|
1976
|
+
"constraints": null
|
|
1977
|
+
},
|
|
1978
|
+
"tokens": {
|
|
1979
|
+
"allowed": [
|
|
1980
|
+
"--uds-spacing-8",
|
|
1981
|
+
"--uds-spacing-12",
|
|
1982
|
+
"--uds-color-neutral-700",
|
|
1983
|
+
"--uds-color-blue-600"
|
|
1984
|
+
]
|
|
1985
|
+
}
|
|
1986
|
+
},
|
|
1780
1987
|
"Slider": {
|
|
1781
1988
|
"name": "Slider",
|
|
1782
1989
|
"category": "form",
|
|
@@ -1812,6 +2019,53 @@
|
|
|
1812
2019
|
]
|
|
1813
2020
|
}
|
|
1814
2021
|
},
|
|
2022
|
+
"Statistics": {
|
|
2023
|
+
"name": "Statistics",
|
|
2024
|
+
"category": "data-display",
|
|
2025
|
+
"intent": "KPI and metric summary display",
|
|
2026
|
+
"purpose": "Displays a KPI value with optional context, trend, and icon.",
|
|
2027
|
+
"tier": 2,
|
|
2028
|
+
"description": "A metric display component for KPI values with optional trend indication, helper context, and icon.",
|
|
2029
|
+
"roles": [
|
|
2030
|
+
"status"
|
|
2031
|
+
],
|
|
2032
|
+
"slots": null,
|
|
2033
|
+
"states": [
|
|
2034
|
+
"default"
|
|
2035
|
+
],
|
|
2036
|
+
"props": {
|
|
2037
|
+
"trend": {
|
|
2038
|
+
"type": "enum",
|
|
2039
|
+
"values": [
|
|
2040
|
+
"up",
|
|
2041
|
+
"down",
|
|
2042
|
+
"neutral"
|
|
2043
|
+
],
|
|
2044
|
+
"default": "neutral"
|
|
2045
|
+
}
|
|
2046
|
+
},
|
|
2047
|
+
"defaults": {
|
|
2048
|
+
"trend": "neutral"
|
|
2049
|
+
},
|
|
2050
|
+
"composition": {
|
|
2051
|
+
"preferredParents": [
|
|
2052
|
+
"Card",
|
|
2053
|
+
"Container",
|
|
2054
|
+
"Flex"
|
|
2055
|
+
],
|
|
2056
|
+
"allowedChildren": [],
|
|
2057
|
+
"allowedParents": [],
|
|
2058
|
+
"disallowedChildren": [],
|
|
2059
|
+
"constraints": null
|
|
2060
|
+
},
|
|
2061
|
+
"tokens": {
|
|
2062
|
+
"allowed": [
|
|
2063
|
+
"--uds-spacing-8",
|
|
2064
|
+
"--uds-color-neutral-700",
|
|
2065
|
+
"--uds-radius-8"
|
|
2066
|
+
]
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
1815
2069
|
"Status": {
|
|
1816
2070
|
"name": "Status",
|
|
1817
2071
|
"category": "data-display",
|
|
@@ -1829,7 +2083,8 @@
|
|
|
1829
2083
|
"type": "enum",
|
|
1830
2084
|
"values": [
|
|
1831
2085
|
"light-gray",
|
|
1832
|
-
"white"
|
|
2086
|
+
"white",
|
|
2087
|
+
"transparent"
|
|
1833
2088
|
],
|
|
1834
2089
|
"default": "light-gray"
|
|
1835
2090
|
},
|
|
@@ -2005,6 +2260,14 @@
|
|
|
2005
2260
|
"slots": null,
|
|
2006
2261
|
"states": [],
|
|
2007
2262
|
"props": {
|
|
2263
|
+
"orientation": {
|
|
2264
|
+
"type": "enum",
|
|
2265
|
+
"values": [
|
|
2266
|
+
"horizontal",
|
|
2267
|
+
"vertical"
|
|
2268
|
+
],
|
|
2269
|
+
"default": "horizontal"
|
|
2270
|
+
},
|
|
2008
2271
|
"appearance": {
|
|
2009
2272
|
"type": "string",
|
|
2010
2273
|
"default": "underline"
|
|
@@ -2015,6 +2278,7 @@
|
|
|
2015
2278
|
}
|
|
2016
2279
|
},
|
|
2017
2280
|
"defaults": {
|
|
2281
|
+
"orientation": "horizontal",
|
|
2018
2282
|
"appearance": "underline",
|
|
2019
2283
|
"tagVariant": "red"
|
|
2020
2284
|
},
|
|
@@ -2453,6 +2717,43 @@
|
|
|
2453
2717
|
]
|
|
2454
2718
|
}
|
|
2455
2719
|
},
|
|
2720
|
+
"Toolbar": {
|
|
2721
|
+
"name": "Toolbar",
|
|
2722
|
+
"category": "layout",
|
|
2723
|
+
"intent": "Top bar with edge actions and centered identity/title",
|
|
2724
|
+
"purpose": "Top action bar with left and right action regions and centered title/branding.",
|
|
2725
|
+
"tier": 2,
|
|
2726
|
+
"description": "A horizontal application bar that reserves left and right action regions and a centered title or branding slot.",
|
|
2727
|
+
"roles": [
|
|
2728
|
+
"toolbar"
|
|
2729
|
+
],
|
|
2730
|
+
"slots": null,
|
|
2731
|
+
"states": [
|
|
2732
|
+
"default"
|
|
2733
|
+
],
|
|
2734
|
+
"props": {},
|
|
2735
|
+
"defaults": {},
|
|
2736
|
+
"composition": {
|
|
2737
|
+
"preferredParents": [
|
|
2738
|
+
"AppShell",
|
|
2739
|
+
"Container",
|
|
2740
|
+
"root"
|
|
2741
|
+
],
|
|
2742
|
+
"allowedChildren": [],
|
|
2743
|
+
"allowedParents": [],
|
|
2744
|
+
"disallowedChildren": [],
|
|
2745
|
+
"constraints": null
|
|
2746
|
+
},
|
|
2747
|
+
"tokens": {
|
|
2748
|
+
"allowed": [
|
|
2749
|
+
"--uds-surface-primary",
|
|
2750
|
+
"--uds-border-primary",
|
|
2751
|
+
"--uds-spacing-8",
|
|
2752
|
+
"--uds-spacing-12",
|
|
2753
|
+
"--uds-spacing-16"
|
|
2754
|
+
]
|
|
2755
|
+
}
|
|
2756
|
+
},
|
|
2456
2757
|
"Tooltip": {
|
|
2457
2758
|
"name": "Tooltip",
|
|
2458
2759
|
"category": "feedback",
|
|
@@ -2770,6 +3071,69 @@
|
|
|
2770
3071
|
},
|
|
2771
3072
|
"maxNestingDepth": 8
|
|
2772
3073
|
},
|
|
3074
|
+
"intentComponentMappings": {
|
|
3075
|
+
"primaryAction": {
|
|
3076
|
+
"component": "Button",
|
|
3077
|
+
"props": {
|
|
3078
|
+
"appearance": "primary"
|
|
3079
|
+
},
|
|
3080
|
+
"notes": "Use one primary action per section max."
|
|
3081
|
+
},
|
|
3082
|
+
"secondaryAction": {
|
|
3083
|
+
"component": "Button",
|
|
3084
|
+
"props": {
|
|
3085
|
+
"appearance": "text"
|
|
3086
|
+
},
|
|
3087
|
+
"notes": "Use non-primary appearance for secondary actions."
|
|
3088
|
+
},
|
|
3089
|
+
"sectionContainer": {
|
|
3090
|
+
"component": "Container",
|
|
3091
|
+
"props": {
|
|
3092
|
+
"gap": "--uds-spacing-24"
|
|
3093
|
+
},
|
|
3094
|
+
"notes": "Default section wrapper with governed spacing."
|
|
3095
|
+
},
|
|
3096
|
+
"contentStack": {
|
|
3097
|
+
"component": "Flex",
|
|
3098
|
+
"props": {
|
|
3099
|
+
"direction": "column",
|
|
3100
|
+
"gap": "--uds-spacing-16"
|
|
3101
|
+
},
|
|
3102
|
+
"notes": "Primary stack for vertical rhythm."
|
|
3103
|
+
},
|
|
3104
|
+
"formFieldWrapper": {
|
|
3105
|
+
"component": "Field",
|
|
3106
|
+
"notes": "Wrap inputs that require label/helper/error messaging."
|
|
3107
|
+
},
|
|
3108
|
+
"textInputControl": {
|
|
3109
|
+
"component": "TextInput",
|
|
3110
|
+
"notes": "Use TextInput for freeform single-line text."
|
|
3111
|
+
},
|
|
3112
|
+
"selectionControl": {
|
|
3113
|
+
"component": "Dropdown",
|
|
3114
|
+
"notes": "Use Dropdown for controlled selection."
|
|
3115
|
+
},
|
|
3116
|
+
"statusIndicator": {
|
|
3117
|
+
"component": "Status",
|
|
3118
|
+
"notes": "Use semantic status component for state communication."
|
|
3119
|
+
},
|
|
3120
|
+
"badgeLabel": {
|
|
3121
|
+
"component": "Tag",
|
|
3122
|
+
"notes": "Use Tag for concise categorical labels."
|
|
3123
|
+
},
|
|
3124
|
+
"contextualActions": {
|
|
3125
|
+
"component": "ActionMenu",
|
|
3126
|
+
"notes": "Use ActionMenu for row/object-level secondary actions."
|
|
3127
|
+
},
|
|
3128
|
+
"dataPresentation": {
|
|
3129
|
+
"component": "Table",
|
|
3130
|
+
"notes": "Use Table for tabular datasets and structured records."
|
|
3131
|
+
},
|
|
3132
|
+
"confirmationDialog": {
|
|
3133
|
+
"component": "Modal",
|
|
3134
|
+
"notes": "Use Modal for confirmation/destructive decision points."
|
|
3135
|
+
}
|
|
3136
|
+
},
|
|
2773
3137
|
"tokenIntents": {
|
|
2774
3138
|
"surface/background": [
|
|
2775
3139
|
"--uds-color-neutral-0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../manifest/governance.manifest.cjs"),o=require("./rules/composition.rules.cjs"),c=require("./rules/action.rules.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../manifest/governance.manifest.cjs"),o=require("./rules/composition.rules.cjs"),c=require("./rules/action.rules.cjs"),l=require("./rules/spacing.rules.cjs"),s=require("./rules/accessibility.rules.cjs"),u=require("./rules/props.rules.cjs"),t=require("./rules/token-variable.rules.cjs"),a=require("./rules/tailwind.rules.cjs"),f=[o.enforceCompositionRule,c.enforcePrimaryActionLimitRule,l.enforceSpacingTokenRule,t.enforceTokenVariableRule,a.enforceTailwindDisallowRule,s.enforceAccessibilityRule,u.enforceCanonicalPropsRule];function p(e,r=i.UDSGovernance){return f.flatMap(n=>n({tree:e,governanceConfig:r}))}exports.runPolicyEngine=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UDSGovernance as i}from"../manifest/governance.manifest.js";import{enforceCompositionRule as n}from"./rules/composition.rules.js";import{enforcePrimaryActionLimitRule as m}from"./rules/action.rules.js";import{enforceSpacingTokenRule as
|
|
1
|
+
import{UDSGovernance as i}from"../manifest/governance.manifest.js";import{enforceCompositionRule as n}from"./rules/composition.rules.js";import{enforcePrimaryActionLimitRule as m}from"./rules/action.rules.js";import{enforceSpacingTokenRule as f}from"./rules/spacing.rules.js";import{enforceAccessibilityRule as t}from"./rules/accessibility.rules.js";import{enforceCanonicalPropsRule as c}from"./rules/props.rules.js";import{enforceTokenVariableRule as l}from"./rules/token-variable.rules.js";import{enforceTailwindDisallowRule as p}from"./rules/tailwind.rules.js";const a=[n,m,f,l,p,t,c];function T(o,r=i){return a.flatMap(e=>e({tree:o,governanceConfig:r}))}export{T as runPolicyEngine};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../../manifest/prop-aliases.manifest.cjs"),g=a=>({...l.PropAliasRules.global??{},...l.PropAliasRules.byComponent[a]??{}}),y={Menu:{items:{replacement:"navItems",reason:"Menu uses navItems contract, not Ant-style items."},selectedKeys:{reason:"Menu selection is route-driven via nav item paths and app state."},mode:{replacement:"activeMode",reason:"Menu mode is governed by activeMode light/dark values."}},Flex:{vertical:{replacement:"direction",reason:"Flex direction is governed by row/column direction prop."},justify:{replacement:"justifyContent",reason:"Flex alignment uses justifyContent canonical prop."},align:{replacement:"alignItems",reason:"Flex alignment uses alignItems canonical prop."}},Text:{type:{replacement:"variant",reason:"Text semantics use UDS typography variant tokens."},strong:{replacement:"weight",reason:"Text weight should be controlled by weight prop."}},Button:{type:{replacement:"appearance",reason:"Button style is governed by appearance variants."}},Badge:{status:{replacement:"variant",reason:"Badge uses variant semantic color names, not status."},color:{replacement:"variant",reason:"Badge color intent is governed through variant values."}},Statistics:{title:{replacement:"label",reason:"Statistics title maps to label in UDS contract."},suffix:{replacement:"helperText",reason:"Use helperText/statusLabel/changeText fields for supporting copy."},prefix:{replacement:"helperText",reason:"Use helperText/statusLabel/changeText fields for supporting copy."},valueStyle:{reason:"Styling is token-governed; avoid inline styling props."}}},d=({tree:a})=>{const o=[],r=(e,s)=>{const p=g(e.type),c=y[e.type]??{},u=e.props??{};for(const t of Object.keys(u)){const n=c[t];if(n){const m=n.replacement?` Use "${n.replacement}" instead.`:"";o.push({severity:"error",code:"RULE_FORBIDDEN_PROP",message:`Prop "${t}" is disallowed on ${e.type}. ${n.reason}${m}`,path:`${s}.props.${t}`,component:e.type})}const i=p[t];i&&o.push({severity:"error",code:"RULE_AMBIGUOUS_PROP_ALIAS",message:`Prop "${t}" is ambiguous for ${e.type}. Use canonical prop "${i}".`,path:`${s}.props.${t}`,component:e.type})}(e.children??[]).forEach((t,n)=>r(t,`${s}.children[${n}]`))};return r(a,"root"),o};exports.enforceCanonicalPropsRule=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PropAliasRules as
|
|
1
|
+
import{PropAliasRules as p}from"../../manifest/prop-aliases.manifest.js";const g=a=>({...p.global??{},...p.byComponent[a]??{}}),y={Menu:{items:{replacement:"navItems",reason:"Menu uses navItems contract, not Ant-style items."},selectedKeys:{reason:"Menu selection is route-driven via nav item paths and app state."},mode:{replacement:"activeMode",reason:"Menu mode is governed by activeMode light/dark values."}},Flex:{vertical:{replacement:"direction",reason:"Flex direction is governed by row/column direction prop."},justify:{replacement:"justifyContent",reason:"Flex alignment uses justifyContent canonical prop."},align:{replacement:"alignItems",reason:"Flex alignment uses alignItems canonical prop."}},Text:{type:{replacement:"variant",reason:"Text semantics use UDS typography variant tokens."},strong:{replacement:"weight",reason:"Text weight should be controlled by weight prop."}},Button:{type:{replacement:"appearance",reason:"Button style is governed by appearance variants."}},Badge:{status:{replacement:"variant",reason:"Badge uses variant semantic color names, not status."},color:{replacement:"variant",reason:"Badge color intent is governed through variant values."}},Statistics:{title:{replacement:"label",reason:"Statistics title maps to label in UDS contract."},suffix:{replacement:"helperText",reason:"Use helperText/statusLabel/changeText fields for supporting copy."},prefix:{replacement:"helperText",reason:"Use helperText/statusLabel/changeText fields for supporting copy."},valueStyle:{reason:"Styling is token-governed; avoid inline styling props."}}},v=({tree:a})=>{const o=[],r=(e,s)=>{const l=g(e.type),c=y[e.type]??{},m=e.props??{};for(const t of Object.keys(m)){const n=c[t];if(n){const u=n.replacement?` Use "${n.replacement}" instead.`:"";o.push({severity:"error",code:"RULE_FORBIDDEN_PROP",message:`Prop "${t}" is disallowed on ${e.type}. ${n.reason}${u}`,path:`${s}.props.${t}`,component:e.type})}const i=l[t];i&&o.push({severity:"error",code:"RULE_AMBIGUOUS_PROP_ALIAS",message:`Prop "${t}" is ambiguous for ${e.type}. Use canonical prop "${i}".`,path:`${s}.props.${t}`,component:e.type})}(e.children??[]).forEach((t,n)=>r(t,`${s}.children[${n}]`))};return r(a,"root"),o};export{v as enforceCanonicalPropsRule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=new Set(["class","className","classes","tw","tailwind"]),f=[/^(?:sm|md|lg|xl|2xl):/,/^(?:hover|focus|active|disabled|dark|group-hover):/,/^(?:m|mx|my|mt|mr|mb|ml|p|px|py|pt|pr|pb|pl)-/,/^(?:w|h|min-w|min-h|max-w|max-h)-/,/^(?:bg|text|font|tracking|leading|rounded|shadow|border|ring)-/,/^(?:flex|grid|inline-flex|inline-grid|contents|block|inline-block|hidden)$/,/^(?:items|justify|content|self|place-items|place-content|place-self)-/,/^(?:gap|space-x|space-y|col-span|row-span|order)-/,/^tw-/],d=e=>{const t=e.trim();return t?f.some(n=>n.test(t)):!1},m=e=>e.split(/\s+/g).map(t=>t.trim()).filter(Boolean),l=(e,t,n,i)=>{if(typeof e=="string"){const s=m(e);for(const r of s)d(r)&&i.push({severity:"error",code:"RULE_TAILWIND_CLASS_DISALLOWED",message:`Tailwind utility token "${r}" is disallowed. Use UDS components and tokenized props.`,path:t,component:n,token:r});return}if(Array.isArray(e)){e.forEach((s,r)=>l(s,`${t}[${r}]`,n,i));return}typeof e!="object"||e===null||Object.entries(e).forEach(([s,r])=>{if(a.has(s)){l(r,`${t}.${s}`,n,i);return}l(r,`${t}.${s}`,n,i)})},p=({tree:e})=>{const t=[],n=(i,s)=>{const r=i.props??{};Object.entries(r).forEach(([o,c])=>{if(a.has(o)){l(c,`${s}.props.${o}`,i.type,t);return}typeof c=="string"&&/\b(?:className|tailwind|tw)\b/i.test(o)&&l(c,`${s}.props.${o}`,i.type,t)}),(i.children??[]).forEach((o,c)=>n(o,`${s}.children[${c}]`))};return n(e,"root"),t};exports.enforceTailwindDisallowRule=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=new Set(["class","className","classes","tw","tailwind"]),f=[/^(?:sm|md|lg|xl|2xl):/,/^(?:hover|focus|active|disabled|dark|group-hover):/,/^(?:m|mx|my|mt|mr|mb|ml|p|px|py|pt|pr|pb|pl)-/,/^(?:w|h|min-w|min-h|max-w|max-h)-/,/^(?:bg|text|font|tracking|leading|rounded|shadow|border|ring)-/,/^(?:flex|grid|inline-flex|inline-grid|contents|block|inline-block|hidden)$/,/^(?:items|justify|content|self|place-items|place-content|place-self)-/,/^(?:gap|space-x|space-y|col-span|row-span|order)-/,/^tw-/],d=e=>{const s=e.trim();return s?f.some(n=>n.test(s)):!1},p=e=>e.split(/\s+/g).map(s=>s.trim()).filter(Boolean),l=(e,s,n,i)=>{if(typeof e=="string"){const t=p(e);for(const r of t)d(r)&&i.push({severity:"error",code:"RULE_TAILWIND_CLASS_DISALLOWED",message:`Tailwind utility token "${r}" is disallowed. Use UDS components and tokenized props.`,path:s,component:n,token:r});return}if(Array.isArray(e)){e.forEach((t,r)=>l(t,`${s}[${r}]`,n,i));return}typeof e!="object"||e===null||Object.entries(e).forEach(([t,r])=>{if(a.has(t)){l(r,`${s}.${t}`,n,i);return}l(r,`${s}.${t}`,n,i)})},m=({tree:e})=>{const s=[],n=(i,t)=>{const r=i.props??{};Object.entries(r).forEach(([o,c])=>{if(a.has(o)){l(c,`${t}.props.${o}`,i.type,s);return}typeof c=="string"&&/\b(?:className|tailwind|tw)\b/i.test(o)&&l(c,`${t}.props.${o}`,i.type,s)}),(i.children??[]).forEach((o,c)=>n(o,`${t}.children[${c}]`))};return n(e,"root"),s};export{m as enforceTailwindDisallowRule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=/--[a-zA-Z0-9_-]+/g,u=(e,s,i,t,r,o)=>{e.push({severity:"error",code:s,message:i,path:t,component:r,token:o})},a=(e,s,i,t)=>{if(typeof e=="string"){const r=e.match(f)??[];new Set(r).forEach(n=>{n.startsWith("--uds-")||u(t,"RULE_CUSTOM_CSS_VAR_DISALLOWED",`Custom CSS variable "${n}" is not allowed. Use --uds-* variables or hardcoded literals.`,s,i,n)});return}if(Array.isArray(e)){e.forEach((r,o)=>a(r,`${s}[${o}]`,i,t));return}typeof e!="object"||e===null||Object.entries(e).forEach(([r,o])=>{r.startsWith("--")&&u(t,"RULE_CSS_VAR_DEFINITION_DISALLOWED",`Defining CSS variable "${r}" is not allowed in generated output.`,`${s}.${r}`,i,r),a(o,`${s}.${r}`,i,t)})},S=({tree:e})=>{const s=[],i=(t,r)=>{const o=t.props??{};Object.entries(o).forEach(([n,c])=>{a(c,`${r}.props.${n}`,t.type,s)}),(t.children??[]).forEach((n,c)=>i(n,`${r}.children[${c}]`))};return i(e,"root"),s};exports.enforceTokenVariableRule=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const S=/--[a-zA-Z0-9_-]+/g,f=(t,e,i,s,r,o)=>{t.push({severity:"error",code:e,message:i,path:s,component:r,token:o})},a=(t,e,i,s)=>{if(typeof t=="string"){const r=t.match(S)??[];new Set(r).forEach(c=>{c.startsWith("--uds-")||f(s,"RULE_CUSTOM_CSS_VAR_DISALLOWED",`Custom CSS variable "${c}" is not allowed. Use --uds-* variables or hardcoded literals.`,e,i,c)});return}if(Array.isArray(t)){t.forEach((r,o)=>a(r,`${e}[${o}]`,i,s));return}typeof t!="object"||t===null||Object.entries(t).forEach(([r,o])=>{r.startsWith("--")&&f(s,"RULE_CSS_VAR_DEFINITION_DISALLOWED",`Defining CSS variable "${r}" is not allowed in generated output.`,`${e}.${r}`,i,r),a(o,`${e}.${r}`,i,s)})},u=({tree:t})=>{const e=[],i=(s,r)=>{const o=s.props??{};Object.entries(o).forEach(([c,n])=>{a(n,`${r}.props.${c}`,s.type,e)}),(s.children??[]).forEach((c,n)=>i(c,`${r}.children[${n}]`))};return i(t,"root"),e};export{u as enforceTokenVariableRule};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
You are implementing UI from Figma Make using `@mich8060/unified-design-system`.
|
|
2
|
+
|
|
3
|
+
Hard requirements:
|
|
4
|
+
- Use only UDS components and UDS exports.
|
|
5
|
+
- Use only package-level imports from `@mich8060/unified-design-system` (or `/figma-make`).
|
|
6
|
+
- Never deep import `@/.../components/*`.
|
|
7
|
+
- Do not use Tailwind classes or utility CSS.
|
|
8
|
+
- Do not use ad-hoc `className` styling.
|
|
9
|
+
- Do not create custom CSS variables.
|
|
10
|
+
- Use only `--uds-*` variables or hardcoded literals.
|
|
11
|
+
- Use canonical prop names only (reject Ant-style aliases like `Menu.items`, `Flex.vertical`, `Button.type`).
|
|
12
|
+
- Return deterministic JSON only.
|
|
13
|
+
|
|
14
|
+
Preferred flow:
|
|
15
|
+
1. Start from `@mich8060/unified-design-system/ai/templates`.
|
|
16
|
+
2. Resolve remaining intent decisions using `@mich8060/unified-design-system/ai/manifest.json` -> `intentComponentMappings`.
|
|
17
|
+
3. Fill template slots.
|
|
18
|
+
4. Keep canonical prop names.
|
|
19
|
+
5. Validate against `@mich8060/unified-design-system/ai/validation`.
|
|
20
|
+
|
|
21
|
+
Invalid to valid prop examples:
|
|
22
|
+
- `Menu.items` -> `Menu.navItems`
|
|
23
|
+
- `Menu.mode` -> `Menu.activeMode`
|
|
24
|
+
- `Flex.vertical` -> `Flex.direction`
|
|
25
|
+
- `Flex.justify` -> `Flex.justifyContent`
|
|
26
|
+
- `Flex.align` -> `Flex.alignItems`
|
|
27
|
+
- `Button.type` -> `Button.appearance`
|
|
28
|
+
|
|
29
|
+
Starter scaffold:
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"manifestVersion": "1.0.0",
|
|
33
|
+
"governanceVersion": "1.0.0",
|
|
34
|
+
"policyVersion": "1.0.0",
|
|
35
|
+
"tree": {
|
|
36
|
+
"type": "Container",
|
|
37
|
+
"props": { "gap": "--uds-spacing-24" },
|
|
38
|
+
"children": [
|
|
39
|
+
{
|
|
40
|
+
"type": "Card",
|
|
41
|
+
"children": [
|
|
42
|
+
{ "type": "Text", "props": { "variant": "heading-24", "text": "Title" } },
|
|
43
|
+
{
|
|
44
|
+
"type": "Flex",
|
|
45
|
+
"children": [
|
|
46
|
+
{ "type": "Button", "props": { "appearance": "primary", "label": "Primary" } },
|
|
47
|
+
{ "type": "Button", "props": { "appearance": "text", "label": "Secondary" } }
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"audit": {
|
|
55
|
+
"source": "figma-make",
|
|
56
|
+
"notes": "UDS-only generation"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
You must repair the JSON tree and return corrected JSON only.
|
|
2
|
+
|
|
3
|
+
Rules:
|
|
4
|
+
- Do not add prose.
|
|
5
|
+
- Preserve intent.
|
|
6
|
+
- Fix all violations.
|
|
7
|
+
- Keep output deterministic and policy-compliant.
|
|
8
|
+
- Use canonical prop names (no alias props).
|
|
9
|
+
- Keep version fields aligned with current governance (`manifestVersion`, `governanceVersion`, `policyVersion`).
|
|
10
|
+
- Do not define custom CSS variables; use `--uds-*` references or hardcoded literals only.
|
|
11
|
+
|
|
12
|
+
Violations:
|
|
13
|
+
{{violations_json}}
|