@mich8060/unified-design-system 0.2.13 → 0.2.14

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.
Files changed (265) hide show
  1. package/dist/ai/discovery.json +33 -0
  2. package/dist/ai/examples/index.cjs +1 -0
  3. package/dist/ai/examples/index.js +1 -0
  4. package/dist/ai/examples/training.examples.cjs +1 -0
  5. package/dist/ai/examples/training.examples.js +1 -0
  6. package/dist/ai/index.cjs +1 -1
  7. package/dist/ai/index.js +1 -1
  8. package/dist/ai/manifest/components.manifest.cjs +1 -1
  9. package/dist/ai/manifest/components.manifest.js +1 -1
  10. package/dist/ai/manifest/composition.manifest.cjs +1 -0
  11. package/dist/ai/manifest/composition.manifest.js +1 -0
  12. package/dist/ai/manifest/governance.manifest.cjs +1 -1
  13. package/dist/ai/manifest/governance.manifest.js +1 -1
  14. package/dist/ai/manifest/index.cjs +1 -0
  15. package/dist/ai/manifest/index.js +1 -0
  16. package/dist/ai/manifest/layout.manifest.cjs +1 -1
  17. package/dist/ai/manifest/layout.manifest.js +1 -1
  18. package/dist/ai/manifest/prop-aliases.manifest.cjs +1 -0
  19. package/dist/ai/manifest/prop-aliases.manifest.js +1 -0
  20. package/dist/ai/manifest/system.manifest.cjs +1 -1
  21. package/dist/ai/manifest/system.manifest.js +1 -1
  22. package/dist/ai/manifest.json +2801 -0
  23. package/dist/ai/policies/policy.engine.cjs +1 -1
  24. package/dist/ai/policies/policy.engine.js +1 -1
  25. package/dist/ai/policies/rules/composition.rules.cjs +1 -1
  26. package/dist/ai/policies/rules/composition.rules.js +1 -1
  27. package/dist/ai/policies/rules/props.rules.cjs +1 -0
  28. package/dist/ai/policies/rules/props.rules.js +1 -0
  29. package/dist/ai/schemas/ai-output.schema.json +71 -0
  30. package/dist/ai/sdk/index.cjs +1 -0
  31. package/dist/ai/sdk/index.js +1 -0
  32. package/dist/ai/sdk/runtime-sdk.cjs +2 -0
  33. package/dist/ai/sdk/runtime-sdk.js +2 -0
  34. package/dist/ai/templates/layouts.json +181 -0
  35. package/dist/ai/validation/deterministicFeedback.cjs +1 -0
  36. package/dist/ai/validation/deterministicFeedback.js +1 -0
  37. package/dist/ai/validation/index.cjs +1 -0
  38. package/dist/ai/validation/index.js +1 -0
  39. package/dist/ai/validation/validateAIOutput.cjs +1 -1
  40. package/dist/ai/validation/validateAIOutput.js +1 -1
  41. package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -1
  42. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  43. package/dist/components/Button/Button.cjs +1 -1
  44. package/dist/components/Button/Button.js +1 -1
  45. package/dist/components/Chip/Chip.cjs +1 -1
  46. package/dist/components/Chip/Chip.js +1 -1
  47. package/dist/components/Dialog/Dialog.cjs +1 -1
  48. package/dist/components/Dialog/Dialog.js +1 -1
  49. package/dist/components/DotStatus/DotStatus.cjs +1 -1
  50. package/dist/components/DotStatus/DotStatus.js +1 -1
  51. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  52. package/dist/components/EmptyState/EmptyState.js +1 -1
  53. package/dist/components/Field/Field.cjs +1 -1
  54. package/dist/components/Field/Field.js +1 -1
  55. package/dist/components/FileUpload/FileUpload.cjs +1 -1
  56. package/dist/components/FileUpload/FileUpload.js +1 -1
  57. package/dist/components/Menu/Menu.cjs +1 -1
  58. package/dist/components/Menu/Menu.js +1 -1
  59. package/dist/components/Modal/Modal.cjs +1 -1
  60. package/dist/components/Modal/Modal.js +1 -1
  61. package/dist/components/Pagination/Pagination.cjs +1 -1
  62. package/dist/components/Pagination/Pagination.js +1 -1
  63. package/dist/components/ProgressCircle/ProgressCircle.cjs +1 -1
  64. package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
  65. package/dist/components/ProgressIndicator/ProgressIndicator.cjs +1 -1
  66. package/dist/components/ProgressIndicator/ProgressIndicator.js +1 -1
  67. package/dist/components/Steps/Steps.cjs +1 -1
  68. package/dist/components/Steps/Steps.js +1 -1
  69. package/dist/components/Text/Text.cjs +1 -1
  70. package/dist/components/Text/Text.js +1 -1
  71. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  72. package/dist/components/Tooltip/Tooltip.js +1 -1
  73. package/dist/design-system/ai/audit/audit.types.d.ts +1 -0
  74. package/dist/design-system/ai/examples/index.d.ts +4 -0
  75. package/dist/design-system/ai/examples/training.examples.d.ts +22 -0
  76. package/dist/design-system/ai/index.d.ts +9 -3
  77. package/dist/design-system/ai/manifest/composition.manifest.d.ts +11 -0
  78. package/dist/design-system/ai/manifest/governance.manifest.d.ts +5 -0
  79. package/dist/design-system/ai/manifest/index.d.ts +9 -0
  80. package/dist/design-system/ai/manifest/prop-aliases.manifest.d.ts +10 -0
  81. package/dist/design-system/ai/manifest/system.manifest.d.ts +2 -0
  82. package/dist/design-system/ai/manifest/types.d.ts +3 -0
  83. package/dist/design-system/ai/policies/rules/props.rules.d.ts +2 -0
  84. package/dist/design-system/ai/sdk/index.d.ts +1 -0
  85. package/dist/design-system/ai/sdk/runtime-sdk.d.ts +21 -0
  86. package/dist/design-system/ai/validation/deterministicFeedback.d.ts +15 -0
  87. package/dist/design-system/ai/validation/index.d.ts +5 -0
  88. package/dist/design-system/ai/validation/validateAIOutput.d.ts +13 -0
  89. package/dist/design-system/components/Button/Button.d.ts +1 -1
  90. package/dist/design-system/components/Button/Button.types.d.ts +1 -0
  91. package/dist/design-system/components/Chip/Chip.d.ts +4 -3
  92. package/dist/design-system/components/Chip/Chip.types.d.ts +13 -9
  93. package/dist/design-system/components/Dialog/Dialog.types.d.ts +9 -8
  94. package/dist/design-system/components/Field/Field.d.ts +1 -1
  95. package/dist/design-system/components/Field/Field.types.d.ts +11 -9
  96. package/dist/design-system/components/FileUpload/FileUpload.d.ts +1 -1
  97. package/dist/design-system/components/FileUpload/FileUpload.types.d.ts +2 -0
  98. package/dist/design-system/components/Pagination/Pagination.d.ts +5 -3
  99. package/dist/design-system/components/Pagination/Pagination.types.d.ts +4 -1
  100. package/dist/design-system/components/ProgressCircle/ProgressCircle.d.ts +3 -2
  101. package/dist/design-system/components/ProgressCircle/ProgressCircle.types.d.ts +7 -3
  102. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
  103. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.types.d.ts +8 -4
  104. package/dist/design-system/components/Tooltip/Tooltip.d.ts +1 -1
  105. package/dist/design-system/components/Tooltip/Tooltip.types.d.ts +1 -0
  106. package/dist/design-system/generated/component-api.d.ts +1568 -0
  107. package/dist/design-system/index.d.ts +1 -2
  108. package/dist/generated/component-api.cjs +1 -0
  109. package/dist/generated/component-api.js +1 -0
  110. package/dist/index.cjs +1 -1
  111. package/dist/index.js +1 -1
  112. package/dist/style.css +1 -1
  113. package/package.json +23 -19
  114. package/dist/components/Accordion/Accordion.spec.cjs +0 -1
  115. package/dist/components/Accordion/Accordion.spec.js +0 -1
  116. package/dist/components/ActionMenu/ActionMenu.spec.cjs +0 -1
  117. package/dist/components/ActionMenu/ActionMenu.spec.js +0 -1
  118. package/dist/components/Avatar/Avatar.spec.cjs +0 -1
  119. package/dist/components/Avatar/Avatar.spec.js +0 -1
  120. package/dist/components/Badge/Badge.spec.cjs +0 -1
  121. package/dist/components/Badge/Badge.spec.js +0 -1
  122. package/dist/components/Branding/Branding.spec.cjs +0 -1
  123. package/dist/components/Branding/Branding.spec.js +0 -1
  124. package/dist/components/Breadcrumb/Breadcrumb.spec.cjs +0 -1
  125. package/dist/components/Breadcrumb/Breadcrumb.spec.js +0 -1
  126. package/dist/components/Button/Button.spec.cjs +0 -1
  127. package/dist/components/Button/Button.spec.js +0 -1
  128. package/dist/components/Calendar/Calendar.spec.cjs +0 -1
  129. package/dist/components/Calendar/Calendar.spec.js +0 -1
  130. package/dist/components/Card/Card.spec.cjs +0 -1
  131. package/dist/components/Card/Card.spec.js +0 -1
  132. package/dist/components/Checkbox/Checkbox.spec.cjs +0 -1
  133. package/dist/components/Checkbox/Checkbox.spec.js +0 -1
  134. package/dist/components/Chip/Chip.spec.cjs +0 -1
  135. package/dist/components/Chip/Chip.spec.js +0 -1
  136. package/dist/components/Code/Code.spec.cjs +0 -1
  137. package/dist/components/Code/Code.spec.js +0 -1
  138. package/dist/components/Container/Container.spec.cjs +0 -1
  139. package/dist/components/Container/Container.spec.js +0 -1
  140. package/dist/components/Datepicker/Datepicker.spec.cjs +0 -1
  141. package/dist/components/Datepicker/Datepicker.spec.js +0 -1
  142. package/dist/components/Dialog/Dialog.spec.cjs +0 -1
  143. package/dist/components/Dialog/Dialog.spec.js +0 -1
  144. package/dist/components/Divider/Divider.spec.cjs +0 -1
  145. package/dist/components/Divider/Divider.spec.js +0 -1
  146. package/dist/components/DotStatus/DotStatus.spec.cjs +0 -1
  147. package/dist/components/DotStatus/DotStatus.spec.js +0 -1
  148. package/dist/components/Dropdown/Dropdown.spec.cjs +0 -1
  149. package/dist/components/Dropdown/Dropdown.spec.js +0 -1
  150. package/dist/components/EmptyState/EmptyState.spec.cjs +0 -1
  151. package/dist/components/EmptyState/EmptyState.spec.js +0 -1
  152. package/dist/components/EventCard/EventCard.spec.cjs +0 -1
  153. package/dist/components/EventCard/EventCard.spec.js +0 -1
  154. package/dist/components/Field/Field.spec.cjs +0 -1
  155. package/dist/components/Field/Field.spec.js +0 -1
  156. package/dist/components/FileUpload/FileUpload.spec.cjs +0 -1
  157. package/dist/components/FileUpload/FileUpload.spec.js +0 -1
  158. package/dist/components/Flex/Flex.spec.cjs +0 -1
  159. package/dist/components/Flex/Flex.spec.js +0 -1
  160. package/dist/components/Icon/Icon.spec.cjs +0 -1
  161. package/dist/components/Icon/Icon.spec.js +0 -1
  162. package/dist/components/ImageAspect/ImageAspect.spec.cjs +0 -1
  163. package/dist/components/ImageAspect/ImageAspect.spec.js +0 -1
  164. package/dist/components/Key/Key.spec.cjs +0 -1
  165. package/dist/components/Key/Key.spec.js +0 -1
  166. package/dist/components/Menu/Menu.spec.cjs +0 -1
  167. package/dist/components/Menu/Menu.spec.js +0 -1
  168. package/dist/components/MicroCalendar/MicroCalendar.spec.cjs +0 -1
  169. package/dist/components/MicroCalendar/MicroCalendar.spec.js +0 -1
  170. package/dist/components/Modal/Modal.spec.cjs +0 -1
  171. package/dist/components/Modal/Modal.spec.js +0 -1
  172. package/dist/components/Pagination/Pagination.spec.cjs +0 -1
  173. package/dist/components/Pagination/Pagination.spec.js +0 -1
  174. package/dist/components/PillToggle/PillToggle.cjs +0 -1
  175. package/dist/components/PillToggle/PillToggle.js +0 -1
  176. package/dist/components/PillToggle/PillToggle.spec.cjs +0 -1
  177. package/dist/components/PillToggle/PillToggle.spec.js +0 -1
  178. package/dist/components/Playground/Playground.cjs +0 -9
  179. package/dist/components/Playground/Playground.js +0 -9
  180. package/dist/components/Playground/Playground.spec.cjs +0 -1
  181. package/dist/components/Playground/Playground.spec.js +0 -1
  182. package/dist/components/ProgressCircle/ProgressCircle.spec.cjs +0 -1
  183. package/dist/components/ProgressCircle/ProgressCircle.spec.js +0 -1
  184. package/dist/components/ProgressIndicator/ProgressIndicator.spec.cjs +0 -1
  185. package/dist/components/ProgressIndicator/ProgressIndicator.spec.js +0 -1
  186. package/dist/components/Radio/Radio.spec.cjs +0 -1
  187. package/dist/components/Radio/Radio.spec.js +0 -1
  188. package/dist/components/Slider/Slider.spec.cjs +0 -1
  189. package/dist/components/Slider/Slider.spec.js +0 -1
  190. package/dist/components/Status/Status.spec.cjs +0 -1
  191. package/dist/components/Status/Status.spec.js +0 -1
  192. package/dist/components/Steps/Steps.spec.cjs +0 -1
  193. package/dist/components/Steps/Steps.spec.js +0 -1
  194. package/dist/components/Table/Table.spec.cjs +0 -1
  195. package/dist/components/Table/Table.spec.js +0 -1
  196. package/dist/components/Tabs/Tabs.spec.cjs +0 -1
  197. package/dist/components/Tabs/Tabs.spec.js +0 -1
  198. package/dist/components/Tag/Tag.spec.cjs +0 -1
  199. package/dist/components/Tag/Tag.spec.js +0 -1
  200. package/dist/components/Text/Text.spec.cjs +0 -1
  201. package/dist/components/Text/Text.spec.js +0 -1
  202. package/dist/components/TextInput/TextInput.spec.cjs +0 -1
  203. package/dist/components/TextInput/TextInput.spec.js +0 -1
  204. package/dist/components/Textarea/Textarea.spec.cjs +0 -1
  205. package/dist/components/Textarea/Textarea.spec.js +0 -1
  206. package/dist/components/Toast/Toast.spec.cjs +0 -1
  207. package/dist/components/Toast/Toast.spec.js +0 -1
  208. package/dist/components/Toggle/Toggle.spec.cjs +0 -1
  209. package/dist/components/Toggle/Toggle.spec.js +0 -1
  210. package/dist/components/Tooltip/Tooltip.spec.cjs +0 -1
  211. package/dist/components/Tooltip/Tooltip.spec.js +0 -1
  212. package/dist/design-system/components/Accordion/Accordion.spec.d.ts +0 -4
  213. package/dist/design-system/components/ActionMenu/ActionMenu.spec.d.ts +0 -4
  214. package/dist/design-system/components/Avatar/Avatar.spec.d.ts +0 -6
  215. package/dist/design-system/components/Badge/Badge.spec.d.ts +0 -12
  216. package/dist/design-system/components/Branding/Branding.spec.d.ts +0 -6
  217. package/dist/design-system/components/Breadcrumb/Breadcrumb.spec.d.ts +0 -4
  218. package/dist/design-system/components/Button/Button.spec.d.ts +0 -12
  219. package/dist/design-system/components/Calendar/Calendar.spec.d.ts +0 -4
  220. package/dist/design-system/components/Card/Card.spec.d.ts +0 -4
  221. package/dist/design-system/components/Checkbox/Checkbox.spec.d.ts +0 -4
  222. package/dist/design-system/components/Chip/Chip.spec.d.ts +0 -13
  223. package/dist/design-system/components/Code/Code.spec.d.ts +0 -10
  224. package/dist/design-system/components/Container/Container.spec.d.ts +0 -2
  225. package/dist/design-system/components/Datepicker/Datepicker.spec.d.ts +0 -6
  226. package/dist/design-system/components/Dialog/Dialog.spec.d.ts +0 -8
  227. package/dist/design-system/components/Divider/Divider.spec.d.ts +0 -10
  228. package/dist/design-system/components/DotStatus/DotStatus.spec.d.ts +0 -10
  229. package/dist/design-system/components/Dropdown/Dropdown.spec.d.ts +0 -12
  230. package/dist/design-system/components/EmptyState/EmptyState.spec.d.ts +0 -2
  231. package/dist/design-system/components/EventCard/EventCard.spec.d.ts +0 -8
  232. package/dist/design-system/components/Field/Field.spec.d.ts +0 -4
  233. package/dist/design-system/components/FileUpload/FileUpload.spec.d.ts +0 -6
  234. package/dist/design-system/components/Flex/Flex.spec.d.ts +0 -2
  235. package/dist/design-system/components/Icon/Icon.spec.d.ts +0 -6
  236. package/dist/design-system/components/ImageAspect/ImageAspect.spec.d.ts +0 -8
  237. package/dist/design-system/components/Key/Key.spec.d.ts +0 -8
  238. package/dist/design-system/components/Menu/Menu.spec.d.ts +0 -6
  239. package/dist/design-system/components/MicroCalendar/MicroCalendar.spec.d.ts +0 -4
  240. package/dist/design-system/components/Modal/Modal.spec.d.ts +0 -8
  241. package/dist/design-system/components/Pagination/Pagination.spec.d.ts +0 -6
  242. package/dist/design-system/components/PillToggle/PillToggle.d.ts +0 -13
  243. package/dist/design-system/components/PillToggle/PillToggle.spec.d.ts +0 -6
  244. package/dist/design-system/components/PillToggle/PillToggle.types.d.ts +0 -9
  245. package/dist/design-system/components/PillToggle/index.d.ts +0 -3
  246. package/dist/design-system/components/Playground/Playground.d.ts +0 -12
  247. package/dist/design-system/components/Playground/Playground.spec.d.ts +0 -6
  248. package/dist/design-system/components/Playground/Playground.types.d.ts +0 -7
  249. package/dist/design-system/components/Playground/index.d.ts +0 -3
  250. package/dist/design-system/components/ProgressCircle/ProgressCircle.spec.d.ts +0 -10
  251. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.spec.d.ts +0 -10
  252. package/dist/design-system/components/Radio/Radio.spec.d.ts +0 -4
  253. package/dist/design-system/components/Slider/Slider.spec.d.ts +0 -4
  254. package/dist/design-system/components/Status/Status.spec.d.ts +0 -11
  255. package/dist/design-system/components/Steps/Steps.spec.d.ts +0 -11
  256. package/dist/design-system/components/Table/Table.spec.d.ts +0 -4
  257. package/dist/design-system/components/Tabs/Tabs.spec.d.ts +0 -7
  258. package/dist/design-system/components/Tag/Tag.spec.d.ts +0 -13
  259. package/dist/design-system/components/Text/Text.spec.d.ts +0 -2
  260. package/dist/design-system/components/TextInput/TextInput.spec.d.ts +0 -12
  261. package/dist/design-system/components/Textarea/Textarea.spec.d.ts +0 -10
  262. package/dist/design-system/components/Toast/Toast.spec.d.ts +0 -8
  263. package/dist/design-system/components/Toggle/Toggle.spec.d.ts +0 -8
  264. package/dist/design-system/components/Tooltip/Tooltip.spec.d.ts +0 -8
  265. package/dist/design-system/specs/spec.types.d.ts +0 -18
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../manifest/governance.manifest.cjs"),o=require("./rules/composition.rules.cjs"),c=require("./rules/action.rules.cjs"),t=require("./rules/spacing.rules.cjs"),s=require("./rules/accessibility.rules.cjs"),u=[o.enforceCompositionRule,c.enforcePrimaryActionLimitRule,t.enforceSpacingTokenRule,s.enforceAccessibilityRule];function l(e,n=r.UDSGovernance){return u.flatMap(i=>i({tree:e,governanceConfig:n}))}exports.runPolicyEngine=l;
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"),s=require("./rules/spacing.rules.cjs"),t=require("./rules/accessibility.rules.cjs"),u=require("./rules/props.rules.cjs"),l=[o.enforceCompositionRule,c.enforcePrimaryActionLimitRule,s.enforceSpacingTokenRule,t.enforceAccessibilityRule,u.enforceCanonicalPropsRule];function a(e,n=i.UDSGovernance){return l.flatMap(r=>r({tree:e,governanceConfig:n}))}exports.runPolicyEngine=a;
@@ -1 +1 @@
1
- import{UDSGovernance as i}from"../manifest/governance.manifest.js";import{enforceCompositionRule as n}from"./rules/composition.rules.js";import{enforcePrimaryActionLimitRule as t}from"./rules/action.rules.js";import{enforceSpacingTokenRule as m}from"./rules/spacing.rules.js";import{enforceAccessibilityRule as c}from"./rules/accessibility.rules.js";const f=[n,t,m,c];function s(o,r=i){return f.flatMap(e=>e({tree:o,governanceConfig:r}))}export{s as runPolicyEngine};
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 t}from"./rules/spacing.rules.js";import{enforceAccessibilityRule as c}from"./rules/accessibility.rules.js";import{enforceCanonicalPropsRule as f}from"./rules/props.rules.js";const p=[n,m,t,c,f];function y(o,r=i){return p.flatMap(e=>e({tree:o,governanceConfig:r}))}export{y as runPolicyEngine};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../manifest/components.manifest.cjs"),m=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),u=({tree:i,governanceConfig:n})=>{const o=[],s=(e,t)=>{const l=!!p.ComponentRegistry[e.type],r=m.has(e.type);!l&&!n.enforcement.allowUnknownComponents&&o.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),r&&!n.enforcement.allowAdHocValues&&o.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),(e.children??[]).forEach((c,a)=>s(c,`${t}.children[${a}]`))};return s(i,"root"),o};exports.enforceCompositionRule=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../manifest/components.manifest.cjs"),r=require("../../manifest/composition.manifest.cjs"),f=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),R=({tree:m,governanceConfig:c})=>{const n=[],y=(e,t)=>r.CompositionRules.disallowedPairs.some(o=>o.parent===e&&o.child===t),p=(e,t,o)=>{const u=!!w.ComponentRegistry[e.type],d=f.has(e.type);if(!u&&!c.enforcement.allowUnknownComponents&&n.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),d&&!c.enforcement.allowAdHocValues&&n.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),o){const s=r.CompositionRules.allowedParentsByChild[e.type];if(Array.isArray(s)&&!s.includes(o)&&n.push({severity:"error",code:"RULE_INVALID_PARENT_COMPOSITION",message:`${e.type} must be nested under one of: ${s.join(", ")}.`,path:t,component:e.type}),y(o,e.type)){const i=r.CompositionRules.disallowedPairs.find(l=>l.parent===o&&l.child===e.type);n.push({severity:"error",code:"RULE_DISALLOWED_NESTING",message:`${e.type} cannot be nested in ${o}.${i!=null&&i.reason?` ${i.reason}`:""}`,path:t,component:e.type})}}const a=r.CompositionRules.allowedChildrenByParent[e.type];(e.children??[]).forEach((s,i)=>{const l=`${t}.children[${i}]`;Array.isArray(a)&&!a.includes(s.type)&&n.push({severity:"error",code:"RULE_INVALID_COMPOSITION",message:`${s.type} is not an allowed child of ${e.type}. Allowed: ${a.join(", ")}.`,path:l,component:s.type}),p(s,l,e.type)})};return p(m,"root"),n};exports.enforceCompositionRule=R;
@@ -1 +1 @@
1
- import{ComponentRegistry as p}from"../../manifest/components.manifest.js";const m=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),u=({tree:l,governanceConfig:n})=>{const o=[],s=(e,t)=>{const r=!!p[e.type],i=m.has(e.type);!r&&!n.enforcement.allowUnknownComponents&&o.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),i&&!n.enforcement.allowAdHocValues&&o.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),(e.children??[]).forEach((a,c)=>s(a,`${t}.children[${c}]`))};return s(l,"root"),o};export{u as enforceCompositionRule};
1
+ import{ComponentRegistry as u}from"../../manifest/components.manifest.js";import{CompositionRules as l}from"../../manifest/composition.manifest.js";const f=new Set(["div","span","button","input","textarea","select","option","label","ul","li","section","article","header","footer","main","nav","form"]),_=({tree:y,governanceConfig:c})=>{const n=[],m=(e,t)=>l.disallowedPairs.some(o=>o.parent===e&&o.child===t),p=(e,t,o)=>{const d=!!u[e.type],w=f.has(e.type);if(!d&&!c.enforcement.allowUnknownComponents&&n.push({severity:"error",code:"RULE_UNKNOWN_COMPONENT",message:`Unknown component "${e.type}" is not allowed in governed mode.`,path:t,component:e.type}),w&&!c.enforcement.allowAdHocValues&&n.push({severity:"error",code:"RULE_RAW_HTML_DISALLOWED",message:`Raw HTML tag "${e.type}" is disallowed unless policy allows ad-hoc values.`,path:t,component:e.type}),o){const s=l.allowedParentsByChild[e.type];if(Array.isArray(s)&&!s.includes(o)&&n.push({severity:"error",code:"RULE_INVALID_PARENT_COMPOSITION",message:`${e.type} must be nested under one of: ${s.join(", ")}.`,path:t,component:e.type}),m(o,e.type)){const r=l.disallowedPairs.find(i=>i.parent===o&&i.child===e.type);n.push({severity:"error",code:"RULE_DISALLOWED_NESTING",message:`${e.type} cannot be nested in ${o}.${r!=null&&r.reason?` ${r.reason}`:""}`,path:t,component:e.type})}}const a=l.allowedChildrenByParent[e.type];(e.children??[]).forEach((s,r)=>{const i=`${t}.children[${r}]`;Array.isArray(a)&&!a.includes(s.type)&&n.push({severity:"error",code:"RULE_INVALID_COMPOSITION",message:`${s.type} is not an allowed child of ${e.type}. Allowed: ${a.join(", ")}.`,path:i,component:s.type}),p(s,i,e.type)})};return p(y,"root"),n};export{_ as enforceCompositionRule};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../manifest/prop-aliases.manifest.cjs"),l=r=>({...a.PropAliasRules.global??{},...a.PropAliasRules.byComponent[r]??{}}),u=({tree:r})=>{const n=[],t=(o,p)=>{const c=l(o.type),i=o.props??{};for(const e of Object.keys(i)){const s=c[e];s&&n.push({severity:"error",code:"RULE_AMBIGUOUS_PROP_ALIAS",message:`Prop "${e}" is ambiguous for ${o.type}. Use canonical prop "${s}".`,path:`${p}.props.${e}`,component:o.type})}(o.children??[]).forEach((e,s)=>t(e,`${p}.children[${s}]`))};return t(r,"root"),n};exports.enforceCanonicalPropsRule=u;
@@ -0,0 +1 @@
1
+ import{PropAliasRules as c}from"../../manifest/prop-aliases.manifest.js";const l=p=>({...c.global??{},...c.byComponent[p]??{}}),f=({tree:p})=>{const n=[],t=(o,e)=>{const a=l(o.type),i=o.props??{};for(const r of Object.keys(i)){const s=a[r];s&&n.push({severity:"error",code:"RULE_AMBIGUOUS_PROP_ALIAS",message:`Prop "${r}" is ambiguous for ${o.type}. Use canonical prop "${s}".`,path:`${e}.props.${r}`,component:o.type})}(o.children??[]).forEach((r,s)=>t(r,`${e}.children[${s}]`))};return t(p,"root"),n};export{f as enforceCanonicalPropsRule};
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "UDS AI Output",
4
+ "type": "object",
5
+ "required": [
6
+ "manifestVersion",
7
+ "governanceVersion",
8
+ "policyVersion",
9
+ "tree",
10
+ "audit"
11
+ ],
12
+ "properties": {
13
+ "manifestVersion": { "type": "string", "minLength": 1 },
14
+ "governanceVersion": { "type": "string", "minLength": 1 },
15
+ "policyVersion": { "type": "string", "minLength": 1 },
16
+ "tree": {
17
+ "type": "object",
18
+ "required": ["type"],
19
+ "properties": {
20
+ "type": { "type": "string", "minLength": 1 },
21
+ "props": { "type": "object" },
22
+ "children": {
23
+ "type": "array",
24
+ "items": { "$ref": "#/$defs/node" }
25
+ }
26
+ },
27
+ "additionalProperties": true
28
+ },
29
+ "audit": {
30
+ "type": "object",
31
+ "required": [
32
+ "timestamp",
33
+ "model",
34
+ "promptHash",
35
+ "udsVersion",
36
+ "manifestVersion",
37
+ "policyVersion",
38
+ "componentsUsed",
39
+ "tokensUsed",
40
+ "violationsCount",
41
+ "validationStatus"
42
+ ],
43
+ "properties": {
44
+ "timestamp": { "type": "string" },
45
+ "model": { "type": "string" },
46
+ "promptHash": { "type": "string" },
47
+ "udsVersion": { "type": "string" },
48
+ "manifestVersion": { "type": "string" },
49
+ "policyVersion": { "type": "string" },
50
+ "componentsUsed": { "type": "array", "items": { "type": "string" } },
51
+ "tokensUsed": { "type": "array", "items": { "type": "string" } },
52
+ "violationsCount": { "type": "number", "minimum": 0 },
53
+ "validationStatus": { "type": "string", "enum": ["pass", "fail"] }
54
+ },
55
+ "additionalProperties": true
56
+ }
57
+ },
58
+ "$defs": {
59
+ "node": {
60
+ "type": "object",
61
+ "required": ["type"],
62
+ "properties": {
63
+ "type": { "type": "string", "minLength": 1 },
64
+ "props": { "type": "object" },
65
+ "children": { "type": "array", "items": { "$ref": "#/$defs/node" } }
66
+ },
67
+ "additionalProperties": true
68
+ }
69
+ },
70
+ "additionalProperties": true
71
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./runtime-sdk.cjs");exports.createUDSRuntimeHelperSDK=e.createUDSRuntimeHelperSDK;
@@ -0,0 +1 @@
1
+ import{createUDSRuntimeHelperSDK as t}from"./runtime-sdk.js";export{t as createUDSRuntimeHelperSDK};
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../manifest/components.manifest.cjs"),u=require("../manifest/governance.manifest.cjs"),f=require("../manifest/system.manifest.cjs"),g=require("../manifest/prop-aliases.manifest.cjs"),l=require("../validation/validateAIOutput.cjs");function d(p={}){const s=p.governance??u.UDSGovernance;return{governance:s,getVersionLineage:()=>u.getVersionLineage(),getManifest:()=>f.UDSManifest,getComponent:e=>m.ComponentRegistry[e],canonicalizeProps(e,t){const i={},a={};for(const[n,o]of Object.entries(t)){const r=g.getCanonicalPropName(e,n);i[r]=o,r!==n&&(a[n]=r)}return{canonicalProps:i,aliasesApplied:a}},validate(e){return l.validateAIOutput(e,s)},validateOrThrow(e){var r,c;const t=l.validateAIOutput(e,s);if(t.status==="pass")return t;const i=`Validation failed with ${t.violations.length} error(s).`,a=((r=t.deterministicFeedback)==null?void 0:r.summary)??i,n=(c=t.deterministicFeedback)==null?void 0:c.fingerprint,o=[`[UDS AI SDK] ${a}`];throw n&&o.push(`Fingerprint: ${n}`),new Error(o.join(`
2
+ `))}}}exports.createUDSRuntimeHelperSDK=d;
@@ -0,0 +1,2 @@
1
+ import{ComponentRegistry as l}from"../manifest/components.manifest.js";import{UDSGovernance as f,getVersionLineage as g}from"../manifest/governance.manifest.js";import{UDSManifest as u}from"../manifest/system.manifest.js";import{getCanonicalPropName as d}from"../manifest/prop-aliases.manifest.js";import{validateAIOutput as m}from"../validation/validateAIOutput.js";function b(p={}){const s=p.governance??f;return{governance:s,getVersionLineage:()=>g(),getManifest:()=>u,getComponent:e=>l[e],canonicalizeProps(e,n){const i={},o={};for(const[t,a]of Object.entries(n)){const r=d(e,t);i[r]=a,r!==t&&(o[t]=r)}return{canonicalProps:i,aliasesApplied:o}},validate(e){return m(e,s)},validateOrThrow(e){var r,c;const n=m(e,s);if(n.status==="pass")return n;const i=`Validation failed with ${n.violations.length} error(s).`,o=((r=n.deterministicFeedback)==null?void 0:r.summary)??i,t=(c=n.deterministicFeedback)==null?void 0:c.fingerprint,a=[`[UDS AI SDK] ${o}`];throw t&&a.push(`Fingerprint: ${t}`),new Error(a.join(`
2
+ `))}}}export{b as createUDSRuntimeHelperSDK};
@@ -0,0 +1,181 @@
1
+ {
2
+ "contractName": "uds.ai.layout-templates",
3
+ "schemaVersion": "1.0.0",
4
+ "templates": [
5
+ {
6
+ "id": "auth-form-card",
7
+ "intent": "Authentication form with one primary action and optional secondary action.",
8
+ "tags": ["form", "auth", "card"],
9
+ "slots": {
10
+ "title": "Sign in",
11
+ "subtitle": "Use your work account",
12
+ "primaryActionLabel": "Sign in",
13
+ "secondaryActionLabel": "Forgot password?"
14
+ },
15
+ "tree": {
16
+ "type": "Container",
17
+ "props": { "gap": "--uds-spacing-24" },
18
+ "children": [
19
+ {
20
+ "type": "Card",
21
+ "children": [
22
+ { "type": "Text", "props": { "variant": "heading-24", "text": "{{title}}" } },
23
+ { "type": "Text", "props": { "variant": "body-16", "text": "{{subtitle}}" } },
24
+ { "type": "Field", "children": [{ "type": "TextInput", "props": { "type": "email" } }] },
25
+ { "type": "Field", "children": [{ "type": "TextInput", "props": { "type": "password" } }] },
26
+ {
27
+ "type": "Flex",
28
+ "children": [
29
+ { "type": "Button", "props": { "appearance": "primary", "label": "{{primaryActionLabel}}" } },
30
+ { "type": "Button", "props": { "appearance": "text", "label": "{{secondaryActionLabel}}" } }
31
+ ]
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ },
37
+ "constraints": [
38
+ "Keep max one primary Button in the section.",
39
+ "Wrap all form controls with Field."
40
+ ]
41
+ },
42
+ {
43
+ "id": "dashboard-table-summary",
44
+ "intent": "Summary header with data table and row actions.",
45
+ "tags": ["dashboard", "table", "summary"],
46
+ "slots": {
47
+ "heading": "Open Requests",
48
+ "primaryActionLabel": "Create request"
49
+ },
50
+ "tree": {
51
+ "type": "Container",
52
+ "props": { "gap": "--uds-spacing-16" },
53
+ "children": [
54
+ {
55
+ "type": "Flex",
56
+ "children": [
57
+ { "type": "Text", "props": { "variant": "heading-24", "text": "{{heading}}" } },
58
+ { "type": "Button", "props": { "appearance": "primary", "label": "{{primaryActionLabel}}" } }
59
+ ]
60
+ },
61
+ {
62
+ "type": "Table",
63
+ "children": [
64
+ { "type": "Status", "props": { "variant": "success", "text": "Ready" } },
65
+ { "type": "Tag", "props": { "color": "blue", "label": "Active" } },
66
+ { "type": "ActionMenu", "props": { "triggerLabel": "Row actions" } }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ "constraints": [
72
+ "Only use allowed Table children (Tag, Status, Avatar, Button, ActionMenu, ProgressIndicator, DotStatus)."
73
+ ]
74
+ },
75
+ {
76
+ "id": "settings-two-column",
77
+ "intent": "Two-column settings page with form area and contextual summary card.",
78
+ "tags": ["settings", "form", "two-column"],
79
+ "slots": {
80
+ "pageTitle": "Account Settings",
81
+ "saveLabel": "Save changes"
82
+ },
83
+ "tree": {
84
+ "type": "Container",
85
+ "props": { "gap": "--uds-spacing-24" },
86
+ "children": [
87
+ { "type": "Text", "props": { "variant": "heading-24", "text": "{{pageTitle}}" } },
88
+ {
89
+ "type": "Flex",
90
+ "props": { "gap": "--uds-spacing-24" },
91
+ "children": [
92
+ {
93
+ "type": "Card",
94
+ "children": [
95
+ { "type": "Field", "children": [{ "type": "TextInput", "props": { "type": "text" } }] },
96
+ { "type": "Field", "children": [{ "type": "Dropdown" }] },
97
+ { "type": "Button", "props": { "appearance": "primary", "label": "{{saveLabel}}" } }
98
+ ]
99
+ },
100
+ {
101
+ "type": "Card",
102
+ "children": [
103
+ { "type": "Text", "props": { "variant": "body-16", "text": "Changes apply to your profile." } },
104
+ { "type": "Tag", "props": { "color": "neutral", "label": "Profile" } }
105
+ ]
106
+ }
107
+ ]
108
+ }
109
+ ]
110
+ },
111
+ "constraints": [
112
+ "Avoid multiple primary buttons in the same section.",
113
+ "Use spacing tokens from the governed spacing system."
114
+ ]
115
+ },
116
+ {
117
+ "id": "modal-confirmation",
118
+ "intent": "Confirmation flow in modal with primary and dismissive actions.",
119
+ "tags": ["modal", "confirmation", "destructive"],
120
+ "slots": {
121
+ "title": "Delete item?",
122
+ "body": "This action cannot be undone.",
123
+ "confirmLabel": "Delete",
124
+ "cancelLabel": "Cancel"
125
+ },
126
+ "tree": {
127
+ "type": "Modal",
128
+ "children": [
129
+ { "type": "Text", "props": { "variant": "heading-24", "text": "{{title}}" } },
130
+ { "type": "Text", "props": { "variant": "body-16", "text": "{{body}}" } },
131
+ {
132
+ "type": "Flex",
133
+ "children": [
134
+ { "type": "Button", "props": { "appearance": "text", "label": "{{cancelLabel}}" } },
135
+ { "type": "Button", "props": { "appearance": "destructive", "label": "{{confirmLabel}}" } }
136
+ ]
137
+ }
138
+ ]
139
+ },
140
+ "constraints": [
141
+ "Do not nest Modal inside Modal.",
142
+ "Keep one destructive primary-like action."
143
+ ]
144
+ },
145
+ {
146
+ "id": "wizard-steps-form",
147
+ "intent": "Multi-step form shell with progress indicator and staged actions.",
148
+ "tags": ["wizard", "steps", "form"],
149
+ "slots": {
150
+ "title": "Create Job Posting",
151
+ "nextLabel": "Next",
152
+ "backLabel": "Back"
153
+ },
154
+ "tree": {
155
+ "type": "Container",
156
+ "children": [
157
+ { "type": "Text", "props": { "variant": "heading-24", "text": "{{title}}" } },
158
+ { "type": "Steps" },
159
+ {
160
+ "type": "Card",
161
+ "children": [
162
+ { "type": "Field", "children": [{ "type": "TextInput", "props": { "type": "text" } }] },
163
+ { "type": "Field", "children": [{ "type": "Textarea" }] },
164
+ {
165
+ "type": "Flex",
166
+ "children": [
167
+ { "type": "Button", "props": { "appearance": "text", "label": "{{backLabel}}" } },
168
+ { "type": "Button", "props": { "appearance": "primary", "label": "{{nextLabel}}" } }
169
+ ]
170
+ }
171
+ ]
172
+ }
173
+ ]
174
+ },
175
+ "constraints": [
176
+ "Fields must contain form controls.",
177
+ "Keep one primary action for each step section."
178
+ ]
179
+ }
180
+ ]
181
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m={SCHEMA_NODE_OBJECT:"Return each tree node as an object with type/props/children keys.",SCHEMA_NODE_TYPE:"Set node.type to a non-empty UDS component name.",SCHEMA_NODE_PROPS:"Provide node.props as a plain object.",SCHEMA_NODE_CHILDREN:"Provide node.children as an array of child nodes.",RULE_UNKNOWN_COMPONENT:"Replace unknown components with supported UDS components.",RULE_RAW_HTML_DISALLOWED:"Use UDS components instead of raw HTML tags.",RULE_INVALID_COMPOSITION:"Use only allowed child components for the parent component.",RULE_INVALID_PARENT_COMPOSITION:"Move the component under one of its allowed parent components.",RULE_DISALLOWED_NESTING:"Remove or refactor disallowed parent/child nesting.",RULE_MAX_PRIMARY_ACTIONS:"Keep at most one primary Button per section.",RULE_SPACING_TOKEN_ONLY:"Use --uds-spacing-* tokens for spacing-related props.",RULE_UNKNOWN_SPACING_TOKEN:"Replace unknown spacing token with an allowed spacing token.",RULE_AMBIGUOUS_PROP_ALIAS:"Replace ambiguous alias props with canonical prop names.",RULE_VERSION_MISMATCH_MANIFESTVERSION:"Set manifestVersion to the current manifest contract version.",RULE_VERSION_MISMATCH_GOVERNANCEVERSION:"Set governanceVersion to the current governance version.",RULE_VERSION_MISMATCH_POLICYVERSION:"Set policyVersion to the current policy version.",RULE_MAX_NESTING_DEPTH:"Reduce UI nesting depth to stay within governance limits.",RULE_INLINE_STYLE_DISALLOWED:"Remove inline styles and use tokenized component props.",DRIFT_UNKNOWN_COMPONENT:"Align with ComponentRegistry component names.",DRIFT_DISALLOWED_NESTING:"Align nesting with layout disallowed pair rules.",DRIFT_MARGIN_USAGE:"Replace margin usage with composition spacing tokens.",DRIFT_INLINE_STYLE:"Replace inline style usage with UDS tokenized styling.",DRIFT_UNKNOWN_TOKEN:"Use a known token from the published UDS token contract.",DRIFT_HARDCODED_COLOR:"Replace color literals with semantic UDS tokens."},i=(e,t)=>String(e??"").localeCompare(String(t??"")),a=e=>[e.severity,e.code,e.path,e.component??"",e.token??"",e.message].join("|"),N=e=>{let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")};function S(e){const t=[...e].sort((n,o)=>{const s=i(n.severity,o.severity);if(s!==0)return s;const p=i(n.code,o.code);if(p!==0)return p;const _=i(n.path,o.path);if(_!==0)return _;const d=i(n.component,o.component);if(d!==0)return d;const E=i(n.token,o.token);return E!==0?E:i(n.message,o.message)}),r=[],c=new Set;for(const n of t){const o=a(n);c.has(o)||(c.add(o),r.push(n))}return r}function l(e){const t=S(e),r=t.map(a).join("||"),c=`fb-${N(r)}`,n=t.map(s=>({id:`${s.code}:${s.path}:${N(a(s))}`,code:s.code,path:s.path,message:s.message,fix:m[s.code]??"Apply governance-compliant correction for this violation.",severity:s.severity})),o=`${n.length} deterministic violation(s)`;return{fingerprint:c,summary:o,items:n}}exports.buildDeterministicFeedback=l;exports.sortAndDedupeViolations=S;
@@ -0,0 +1 @@
1
+ const S={SCHEMA_NODE_OBJECT:"Return each tree node as an object with type/props/children keys.",SCHEMA_NODE_TYPE:"Set node.type to a non-empty UDS component name.",SCHEMA_NODE_PROPS:"Provide node.props as a plain object.",SCHEMA_NODE_CHILDREN:"Provide node.children as an array of child nodes.",RULE_UNKNOWN_COMPONENT:"Replace unknown components with supported UDS components.",RULE_RAW_HTML_DISALLOWED:"Use UDS components instead of raw HTML tags.",RULE_INVALID_COMPOSITION:"Use only allowed child components for the parent component.",RULE_INVALID_PARENT_COMPOSITION:"Move the component under one of its allowed parent components.",RULE_DISALLOWED_NESTING:"Remove or refactor disallowed parent/child nesting.",RULE_MAX_PRIMARY_ACTIONS:"Keep at most one primary Button per section.",RULE_SPACING_TOKEN_ONLY:"Use --uds-spacing-* tokens for spacing-related props.",RULE_UNKNOWN_SPACING_TOKEN:"Replace unknown spacing token with an allowed spacing token.",RULE_AMBIGUOUS_PROP_ALIAS:"Replace ambiguous alias props with canonical prop names.",RULE_VERSION_MISMATCH_MANIFESTVERSION:"Set manifestVersion to the current manifest contract version.",RULE_VERSION_MISMATCH_GOVERNANCEVERSION:"Set governanceVersion to the current governance version.",RULE_VERSION_MISMATCH_POLICYVERSION:"Set policyVersion to the current policy version.",RULE_MAX_NESTING_DEPTH:"Reduce UI nesting depth to stay within governance limits.",RULE_INLINE_STYLE_DISALLOWED:"Remove inline styles and use tokenized component props.",DRIFT_UNKNOWN_COMPONENT:"Align with ComponentRegistry component names.",DRIFT_DISALLOWED_NESTING:"Align nesting with layout disallowed pair rules.",DRIFT_MARGIN_USAGE:"Replace margin usage with composition spacing tokens.",DRIFT_INLINE_STYLE:"Replace inline style usage with UDS tokenized styling.",DRIFT_UNKNOWN_TOKEN:"Use a known token from the published UDS token contract.",DRIFT_HARDCODED_COLOR:"Replace color literals with semantic UDS tokens."},c=(e,t)=>String(e??"").localeCompare(String(t??"")),a=e=>[e.severity,e.code,e.path,e.component??"",e.token??"",e.message].join("|"),d=e=>{let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")};function R(e){const t=[...e].sort((n,o)=>{const s=c(n.severity,o.severity);if(s!==0)return s;const p=c(n.code,o.code);if(p!==0)return p;const _=c(n.path,o.path);if(_!==0)return _;const E=c(n.component,o.component);if(E!==0)return E;const N=c(n.token,o.token);return N!==0?N:c(n.message,o.message)}),r=[],i=new Set;for(const n of t){const o=a(n);i.has(o)||(i.add(o),r.push(n))}return r}function m(e){const t=R(e),r=t.map(a).join("||"),i=`fb-${d(r)}`,n=t.map(s=>({id:`${s.code}:${s.path}:${d(a(s))}`,code:s.code,path:s.path,message:s.message,fix:S[s.code]??"Apply governance-compliant correction for this violation.",severity:s.severity})),o=`${n.length} deterministic violation(s)`;return{fingerprint:i,summary:o,items:n}}export{m as buildDeterministicFeedback,R as sortAndDedupeViolations};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./validateTree.cjs"),i=require("./schemaValidation.cjs"),a=require("./driftDetection.cjs"),r=require("./validateAIOutput.cjs"),e=require("./deterministicFeedback.cjs");exports.validateTree=t.validateTree;exports.validateSchema=i.validateSchema;exports.detectDrift=a.detectDrift;exports.validateAIOutput=r.validateAIOutput;exports.buildDeterministicFeedback=e.buildDeterministicFeedback;exports.sortAndDedupeViolations=e.sortAndDedupeViolations;
@@ -0,0 +1 @@
1
+ import{validateTree as r}from"./validateTree.js";import{validateSchema as i}from"./schemaValidation.js";import{detectDrift as d}from"./driftDetection.js";import{validateAIOutput as p}from"./validateAIOutput.js";import{buildDeterministicFeedback as l,sortAndDedupeViolations as x}from"./deterministicFeedback.js";export{l as buildDeterministicFeedback,d as detectDrift,x as sortAndDedupeViolations,p as validateAIOutput,i as validateSchema,r as validateTree};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../manifest/governance.manifest.cjs"),p=require("../policies/policy.engine.cjs"),m=require("./driftDetection.cjs"),v=require("./schemaValidation.cjs");function V(r,t=o.UDSGovernance){const e=v.validateSchema(r),a=new Date().toISOString(),c=o.getVersionLineage(),s=[...e.violations],n=[];if(e.tree){const d=p.runPolicyEngine(e.tree,t),f=m.detectDrift(e.tree);for(const i of[...d,...f])i.severity==="error"?s.push(i):n.push(i)}const l=t.enforcement.strictMode,u=s.length>0;return{status:l&&u?"fail":"pass",violations:s,warnings:n,governanceVersionUsed:t.policyVersion,manifestVersionUsed:t.manifestVersion,timestamp:a,versionLineage:c}}exports.validateAIOutput=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../manifest/governance.manifest.cjs"),k=require("../policies/policy.engine.cjs"),v=require("./driftDetection.cjs"),d=require("./deterministicFeedback.cjs"),S=require("./schemaValidation.cjs"),b=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),g=e=>typeof e=="string"&&e.trim().length>0?e:void 0;function A(e,t){const s=b(e)?e:null;if(!s)return[];const r=[{key:"manifestVersion",expected:t.manifestVersion},{key:"governanceVersion",expected:t.governanceVersion},{key:"policyVersion",expected:t.policyVersion}],n=[];for(const i of r){const o=g(s[i.key]);o&&o!==i.expected&&n.push({severity:"error",code:`RULE_VERSION_MISMATCH_${i.key.toUpperCase()}`,message:`${i.key} "${o}" does not match expected "${i.expected}".`,path:i.key})}return n}function D(e,t=p.UDSGovernance){const s=S.validateSchema(e),r=new Date().toISOString(),n=p.getVersionLineage(),i=[...s.violations],o=[];if(i.push(...A(e,t)),s.tree){const f=k.runPolicyEngine(s.tree,t),h=v.detectDrift(s.tree);for(const a of[...f,...h])a.severity==="error"?i.push(a):o.push(a)}const c=d.sortAndDedupeViolations(i),y=d.sortAndDedupeViolations(o),u=t.enforcement.strictMode,l=c.length>0,V=u&&l?"fail":"pass",m=l?d.buildDeterministicFeedback(c):void 0;return{status:V,violations:c,warnings:y,deterministicFeedback:m,governanceVersionUsed:t.governanceVersion,manifestVersionUsed:t.manifestVersion,policyVersionUsed:t.policyVersion,timestamp:r,versionLineage:n}}exports.validateAIOutput=D;
@@ -1 +1 @@
1
- import{UDSGovernance as f,getVersionLineage as u}from"../manifest/governance.manifest.js";import{runPolicyEngine as d}from"../policies/policy.engine.js";import{detectDrift as V}from"./driftDetection.js";import{validateSchema as h}from"./schemaValidation.js";function g(r,t=f){const s=h(r),n=new Date().toISOString(),a=u(),o=[...s.violations],i=[];if(s.tree){const l=d(s.tree,t),p=V(s.tree);for(const e of[...l,...p])e.severity==="error"?o.push(e):i.push(e)}const c=t.enforcement.strictMode,m=o.length>0;return{status:c&&m?"fail":"pass",violations:o,warnings:i,governanceVersionUsed:t.policyVersion,manifestVersionUsed:t.manifestVersion,timestamp:n,versionLineage:a}}export{g as validateAIOutput};
1
+ import{UDSGovernance as k,getVersionLineage as u}from"../manifest/governance.manifest.js";import{runPolicyEngine as x}from"../policies/policy.engine.js";import{detectDrift as S}from"./driftDetection.js";import{sortAndDedupeViolations as d,buildDeterministicFeedback as v}from"./deterministicFeedback.js";import{validateSchema as U}from"./schemaValidation.js";const A=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),D=e=>typeof e=="string"&&e.trim().length>0?e:void 0;function b(e,t){const i=A(e)?e:null;if(!i)return[];const r=[{key:"manifestVersion",expected:t.manifestVersion},{key:"governanceVersion",expected:t.governanceVersion},{key:"policyVersion",expected:t.policyVersion}],n=[];for(const o of r){const s=D(i[o.key]);s&&s!==o.expected&&n.push({severity:"error",code:`RULE_VERSION_MISMATCH_${o.key.toUpperCase()}`,message:`${o.key} "${s}" does not match expected "${o.expected}".`,path:o.key})}return n}function L(e,t=k){const i=U(e),r=new Date().toISOString(),n=u(),o=[...i.violations],s=[];if(o.push(...b(e,t)),i.tree){const f=x(i.tree,t),h=S(i.tree);for(const a of[...f,...h])a.severity==="error"?o.push(a):s.push(a)}const c=d(o),l=d(s),m=t.enforcement.strictMode,p=c.length>0,y=m&&p?"fail":"pass",V=p?v(c):void 0;return{status:y,violations:c,warnings:l,deterministicFeedback:V,governanceVersionUsed:t.governanceVersion,manifestVersionUsed:t.manifestVersion,policyVersionUsed:t.policyVersion,timestamp:r,versionLineage:n}}export{L as validateAIOutput};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),u=require("react"),n=require("react-router-dom");;/* empty css */const h=[{path:"/app-shell",label:"Application"},{path:"/border-radius",label:"Border Radius"},{path:"/colors",label:"Colors"},{path:"/flex",label:"Flex Layout"},{path:"/icons",label:"Icons"},{path:"/shadows",label:"Shadows"},{path:"/spacing",label:"Spacing"},{path:"/figma-variables",label:"Design Tokens"},{path:"/typography",label:"Typography"},{path:"/utilities",label:"Utility Classes"},{path:"/vertical-rhythm",label:"Vertical Rhythm"}],p=[{path:"/accordion",label:"Accordion"},{path:"/action-menu",label:"Action Menu"},{path:"/avatar",label:"Avatar"},{path:"/badge",label:"Badge"},{path:"/branding",label:"Branding"},{path:"/breadcrumb",label:"Breadcrumb"},{path:"/buttons",label:"Buttons"},{path:"/calendar",label:"Calendar"},{path:"/datepicker",label:"Datepicker"},{path:"/checkbox",label:"Checkbox"},{path:"/chip",label:"Chip"},{path:"/divider",label:"Divider"},{path:"/dot-status",label:"Dot Status"},{path:"/dropdown",label:"Dropdown"},{path:"/event-card",label:"Event Card"},{path:"/field",label:"Field"},{path:"/file-upload",label:"File Upload"},{path:"/image-aspect",label:"Image Aspect"},{path:"/input",label:"Text Input"},{path:"/key",label:"Key"},{path:"/pill-toggle",label:"Pill Toggle"},{path:"/progress-indicator",label:"Progress Indicator"},{path:"/progress-circle",label:"Progress Circle"},{path:"/radio",label:"Radio"},{path:"/slider",label:"Slider"},{path:"/status",label:"Status"},{path:"/steps",label:"Steps"},{path:"/table",label:"Table"},{path:"/tabs",label:"Tabs"},{path:"/tag",label:"Tag"},{path:"/textarea",label:"Textarea"},{path:"/toast",label:"Toast"},{path:"/toggle",label:"Toggle"},{path:"/tooltip",label:"Tooltip"}],d=[{path:"/menu",label:"Menu"}];function m({items:s}){const c=n.useLocation().pathname;if(s&&s.length>0){const e=s.slice(0,5);return a.jsx("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:a.jsx("ol",{className:"breadcrumb__list",children:e.map((l,b)=>{const i=b===e.length-1,o=l.href&&(l.href.startsWith("http://")||l.href.startsWith("https://"));return a.jsxs(u.Fragment,{children:[a.jsx("li",{className:`breadcrumb__item ${i?"breadcrumb__item--current":""}`,children:l.href&&!i?o?a.jsx("a",{href:l.href,className:"breadcrumb__link",target:"_blank",rel:"noopener noreferrer",children:a.jsx("span",{className:"breadcrumb__text",children:l.label})}):a.jsx(n.Link,{to:l.href,className:"breadcrumb__link",children:a.jsx("span",{className:"breadcrumb__text",children:l.label})}):a.jsx("span",{className:"breadcrumb__text",children:l.label})}),!i&&a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})})]},b)})})})}if(c==="/")return null;const t=[...h,...p,...d].find(e=>c===e.path||c.startsWith(e.path+"/"));if(!t)return null;let r="Design System";return h.some(e=>e.path===t.path)?r="Foundations":p.some(e=>e.path===t.path)?r="Components":d.some(e=>e.path===t.path)&&(r="Patterns"),a.jsx("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:a.jsxs("ol",{className:"breadcrumb__list",children:[a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__text",children:"Unified Design System"})}),a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__text",children:r})}),a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a.jsx("li",{className:"breadcrumb__item breadcrumb__item--current",children:a.jsx("span",{className:"breadcrumb__text",children:t.label})})]})})}exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),u=require("react"),b=require("react-router-dom");;/* empty css */const h=[{path:"/app-shell",label:"Application"},{path:"/border-radius",label:"Border Radius"},{path:"/colors",label:"Colors"},{path:"/flex",label:"Flex Layout"},{path:"/icons",label:"Icons"},{path:"/shadows",label:"Shadows"},{path:"/spacing",label:"Spacing"},{path:"/figma-variables",label:"Design Tokens"},{path:"/typography",label:"Typography"},{path:"/utilities",label:"Utility Classes"},{path:"/vertical-rhythm",label:"Vertical Rhythm"}],p=[{path:"/accordion",label:"Accordion"},{path:"/action-menu",label:"Action Menu"},{path:"/avatar",label:"Avatar"},{path:"/badge",label:"Badge"},{path:"/branding",label:"Branding"},{path:"/breadcrumb",label:"Breadcrumb"},{path:"/buttons",label:"Buttons"},{path:"/calendar",label:"Calendar"},{path:"/datepicker",label:"Datepicker"},{path:"/checkbox",label:"Checkbox"},{path:"/chip",label:"Chip"},{path:"/divider",label:"Divider"},{path:"/dot-status",label:"Dot Status"},{path:"/dropdown",label:"Dropdown"},{path:"/event-card",label:"Event Card"},{path:"/field",label:"Field"},{path:"/file-upload",label:"File Upload"},{path:"/image-aspect",label:"Image Aspect"},{path:"/input",label:"Text Input"},{path:"/key",label:"Key"},{path:"/progress-indicator",label:"Progress Indicator"},{path:"/progress-circle",label:"Progress Circle"},{path:"/radio",label:"Radio"},{path:"/slider",label:"Slider"},{path:"/status",label:"Status"},{path:"/steps",label:"Steps"},{path:"/table",label:"Table"},{path:"/tabs",label:"Tabs"},{path:"/tag",label:"Tag"},{path:"/textarea",label:"Textarea"},{path:"/toast",label:"Toast"},{path:"/toggle",label:"Toggle"},{path:"/tooltip",label:"Tooltip"}],d=[{path:"/menu",label:"Menu"}];function m({items:s}){const c=b.useLocation().pathname;if(s&&s.length>0){const e=s.slice(0,5);return a.jsx("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:a.jsx("ol",{className:"breadcrumb__list",children:e.map((l,n)=>{const i=n===e.length-1,o=l.href&&(l.href.startsWith("http://")||l.href.startsWith("https://"));return a.jsxs(u.Fragment,{children:[a.jsx("li",{className:`breadcrumb__item ${i?"breadcrumb__item--current":""}`,children:l.href&&!i?o?a.jsx("a",{href:l.href,className:"breadcrumb__link",target:"_blank",rel:"noopener noreferrer",children:a.jsx("span",{className:"breadcrumb__text",children:l.label})}):a.jsx(b.Link,{to:l.href,className:"breadcrumb__link",children:a.jsx("span",{className:"breadcrumb__text",children:l.label})}):a.jsx("span",{className:"breadcrumb__text",children:l.label})}),!i&&a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})})]},n)})})})}if(c==="/")return null;const t=[...h,...p,...d].find(e=>c===e.path||c.startsWith(e.path+"/"));if(!t)return null;let r="Design System";return h.some(e=>e.path===t.path)?r="Foundations":p.some(e=>e.path===t.path)?r="Components":d.some(e=>e.path===t.path)&&(r="Patterns"),a.jsx("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:a.jsxs("ol",{className:"breadcrumb__list",children:[a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__text",children:"Unified Design System"})}),a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__text",children:r})}),a.jsx("li",{className:"breadcrumb__item",children:a.jsx("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a.jsx("li",{className:"breadcrumb__item breadcrumb__item--current",children:a.jsx("span",{className:"breadcrumb__text",children:t.label})})]})})}exports.default=m;
@@ -1 +1 @@
1
- import{jsx as a,jsxs as n}from"react/jsx-runtime";import m from"react";import{useLocation as u,Link as _}from"react-router-dom";/* empty css */const h=[{path:"/app-shell",label:"Application"},{path:"/border-radius",label:"Border Radius"},{path:"/colors",label:"Colors"},{path:"/flex",label:"Flex Layout"},{path:"/icons",label:"Icons"},{path:"/shadows",label:"Shadows"},{path:"/spacing",label:"Spacing"},{path:"/figma-variables",label:"Design Tokens"},{path:"/typography",label:"Typography"},{path:"/utilities",label:"Utility Classes"},{path:"/vertical-rhythm",label:"Vertical Rhythm"}],p=[{path:"/accordion",label:"Accordion"},{path:"/action-menu",label:"Action Menu"},{path:"/avatar",label:"Avatar"},{path:"/badge",label:"Badge"},{path:"/branding",label:"Branding"},{path:"/breadcrumb",label:"Breadcrumb"},{path:"/buttons",label:"Buttons"},{path:"/calendar",label:"Calendar"},{path:"/datepicker",label:"Datepicker"},{path:"/checkbox",label:"Checkbox"},{path:"/chip",label:"Chip"},{path:"/divider",label:"Divider"},{path:"/dot-status",label:"Dot Status"},{path:"/dropdown",label:"Dropdown"},{path:"/event-card",label:"Event Card"},{path:"/field",label:"Field"},{path:"/file-upload",label:"File Upload"},{path:"/image-aspect",label:"Image Aspect"},{path:"/input",label:"Text Input"},{path:"/key",label:"Key"},{path:"/pill-toggle",label:"Pill Toggle"},{path:"/progress-indicator",label:"Progress Indicator"},{path:"/progress-circle",label:"Progress Circle"},{path:"/radio",label:"Radio"},{path:"/slider",label:"Slider"},{path:"/status",label:"Status"},{path:"/steps",label:"Steps"},{path:"/table",label:"Table"},{path:"/tabs",label:"Tabs"},{path:"/tag",label:"Tag"},{path:"/textarea",label:"Textarea"},{path:"/toast",label:"Toast"},{path:"/toggle",label:"Toggle"},{path:"/tooltip",label:"Tooltip"}],d=[{path:"/menu",label:"Menu"}];function S({items:s}){const c=u().pathname;if(s&&s.length>0){const e=s.slice(0,5);return a("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:a("ol",{className:"breadcrumb__list",children:e.map((l,i)=>{const b=i===e.length-1,o=l.href&&(l.href.startsWith("http://")||l.href.startsWith("https://"));return n(m.Fragment,{children:[a("li",{className:`breadcrumb__item ${b?"breadcrumb__item--current":""}`,children:l.href&&!b?o?a("a",{href:l.href,className:"breadcrumb__link",target:"_blank",rel:"noopener noreferrer",children:a("span",{className:"breadcrumb__text",children:l.label})}):a(_,{to:l.href,className:"breadcrumb__link",children:a("span",{className:"breadcrumb__text",children:l.label})}):a("span",{className:"breadcrumb__text",children:l.label})}),!b&&a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})})]},i)})})})}if(c==="/")return null;const t=[...h,...p,...d].find(e=>c===e.path||c.startsWith(e.path+"/"));if(!t)return null;let r="Design System";return h.some(e=>e.path===t.path)?r="Foundations":p.some(e=>e.path===t.path)?r="Components":d.some(e=>e.path===t.path)&&(r="Patterns"),a("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:n("ol",{className:"breadcrumb__list",children:[a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__text",children:"Unified Design System"})}),a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__text",children:r})}),a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a("li",{className:"breadcrumb__item breadcrumb__item--current",children:a("span",{className:"breadcrumb__text",children:t.label})})]})})}export{S as default};
1
+ import{jsx as a,jsxs as n}from"react/jsx-runtime";import m from"react";import{useLocation as u,Link as _}from"react-router-dom";/* empty css */const h=[{path:"/app-shell",label:"Application"},{path:"/border-radius",label:"Border Radius"},{path:"/colors",label:"Colors"},{path:"/flex",label:"Flex Layout"},{path:"/icons",label:"Icons"},{path:"/shadows",label:"Shadows"},{path:"/spacing",label:"Spacing"},{path:"/figma-variables",label:"Design Tokens"},{path:"/typography",label:"Typography"},{path:"/utilities",label:"Utility Classes"},{path:"/vertical-rhythm",label:"Vertical Rhythm"}],p=[{path:"/accordion",label:"Accordion"},{path:"/action-menu",label:"Action Menu"},{path:"/avatar",label:"Avatar"},{path:"/badge",label:"Badge"},{path:"/branding",label:"Branding"},{path:"/breadcrumb",label:"Breadcrumb"},{path:"/buttons",label:"Buttons"},{path:"/calendar",label:"Calendar"},{path:"/datepicker",label:"Datepicker"},{path:"/checkbox",label:"Checkbox"},{path:"/chip",label:"Chip"},{path:"/divider",label:"Divider"},{path:"/dot-status",label:"Dot Status"},{path:"/dropdown",label:"Dropdown"},{path:"/event-card",label:"Event Card"},{path:"/field",label:"Field"},{path:"/file-upload",label:"File Upload"},{path:"/image-aspect",label:"Image Aspect"},{path:"/input",label:"Text Input"},{path:"/key",label:"Key"},{path:"/progress-indicator",label:"Progress Indicator"},{path:"/progress-circle",label:"Progress Circle"},{path:"/radio",label:"Radio"},{path:"/slider",label:"Slider"},{path:"/status",label:"Status"},{path:"/steps",label:"Steps"},{path:"/table",label:"Table"},{path:"/tabs",label:"Tabs"},{path:"/tag",label:"Tag"},{path:"/textarea",label:"Textarea"},{path:"/toast",label:"Toast"},{path:"/toggle",label:"Toggle"},{path:"/tooltip",label:"Tooltip"}],d=[{path:"/menu",label:"Menu"}];function S({items:s}){const c=u().pathname;if(s&&s.length>0){const e=s.slice(0,5);return a("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:a("ol",{className:"breadcrumb__list",children:e.map((l,i)=>{const b=i===e.length-1,o=l.href&&(l.href.startsWith("http://")||l.href.startsWith("https://"));return n(m.Fragment,{children:[a("li",{className:`breadcrumb__item ${b?"breadcrumb__item--current":""}`,children:l.href&&!b?o?a("a",{href:l.href,className:"breadcrumb__link",target:"_blank",rel:"noopener noreferrer",children:a("span",{className:"breadcrumb__text",children:l.label})}):a(_,{to:l.href,className:"breadcrumb__link",children:a("span",{className:"breadcrumb__text",children:l.label})}):a("span",{className:"breadcrumb__text",children:l.label})}),!b&&a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})})]},i)})})})}if(c==="/")return null;const t=[...h,...p,...d].find(e=>c===e.path||c.startsWith(e.path+"/"));if(!t)return null;let r="Design System";return h.some(e=>e.path===t.path)?r="Foundations":p.some(e=>e.path===t.path)?r="Components":d.some(e=>e.path===t.path)&&(r="Patterns"),a("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:n("ol",{className:"breadcrumb__list",children:[a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__text",children:"Unified Design System"})}),a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__text",children:r})}),a("li",{className:"breadcrumb__item",children:a("span",{className:"breadcrumb__separator","aria-hidden":"true",children:"/"})}),a("li",{className:"breadcrumb__item breadcrumb__item--current",children:a("span",{className:"breadcrumb__text",children:t.label})})]})})}export{S as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),S=require("../Icon/Icon.cjs");;/* empty css */const e="uds-button",q={"label-only":`${e}--label-only`,"icon-left":`${e}--icon-left`,"icon-right":`${e}--icon-right`,"icon-only":`${e}--icon-only`,only:`${e}--only`},w={primary:`${e}--primary`,soft:`${e}--soft`,outline:`${e}--outline`,text:`${e}--text`,ghost:`${e}--ghost`,disabled:`${e}--disabled`,destructive:`${e}--destructive`},A={large:`${e}--large`,default:`${e}--default`,small:`${e}--small`,xsmall:`${e}--xsmall`};function E({label:t,appearance:d="primary",layout:o="label-only",size:f="default",icon:s,iconSize:m,icons:p,children:$,tracking:l,className:b,onClick:c,disabled:y,"aria-label":h,...g}){const x=[e,w[d],q[o],A[f],b].filter(Boolean).join(" "),i=o==="icon-only"||o==="only",j=!!t&&!i,u=(typeof s=="string"?n.jsx(S.default,{name:s,size:m,appearance:"regular"}):s??null)||p||$||null,a=u?n.jsx("span",{className:`${e}__icon`,"aria-hidden":j?"true":void 0,children:u}):null,r=t?n.jsx("span",{className:`${e}__label`,children:t}):null,v=()=>o==="icon-left"?n.jsxs(n.Fragment,{children:[a,r]}):o==="icon-right"?n.jsxs(n.Fragment,{children:[r,a]}):i?a||r:r||a,C=d==="disabled"||!!y,_=N=>{if(l){const M={component:"Button",action:"click",label:t,...typeof l=="object"?l:{event:l}};window.dispatchEvent(new CustomEvent("uds:track",{detail:M}))}c==null||c(N)},B=h||(i&&t?t:void 0)||(i&&typeof s=="string"?`${s} icon`:void 0);return n.jsx("button",{type:"button",className:x,disabled:C,"aria-label":B,onClick:_,...g,children:v()})}exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),f=require("../Icon/Icon.cjs");;/* empty css */const e="uds-button",w={"label-only":`${e}--label-only`,"icon-left":`${e}--icon-left`,"icon-right":`${e}--icon-right`,"icon-only":`${e}--icon-only`,only:`${e}--only`},A={primary:`${e}--primary`,soft:`${e}--soft`,outline:`${e}--outline`,text:`${e}--text`,ghost:`${e}--ghost`,disabled:`${e}--disabled`,destructive:`${e}--destructive`},E={large:`${e}--large`,default:`${e}--default`,small:`${e}--small`,xsmall:`${e}--xsmall`};function L({label:t,appearance:u="primary",layout:s="label-only",size:$="default",icon:o,iconSize:p,icons:h,children:b,tracking:a,loading:l=!1,className:y,onClick:d,disabled:x,"aria-label":j,...v}){const _=[e,A[u],w[s],E[$],l&&`${e}--loading`,y].filter(Boolean).join(" "),i=s==="icon-only"||s==="only",g=!!t&&!i,m=(typeof o=="string"?n.jsx(f.default,{name:o,size:p,appearance:"regular"}):o??null)||h||b||null,r=m?n.jsx("span",{className:`${e}__icon`,"aria-hidden":g?"true":void 0,children:m}):null,c=t?n.jsx("span",{className:`${e}__label`,children:t}):null,N=()=>s==="icon-left"?n.jsxs(n.Fragment,{children:[r,c]}):s==="icon-right"?n.jsxs(n.Fragment,{children:[c,r]}):i?r||c:c||r,C=u==="disabled"||!!x||l,B=S=>{if(a){const q={component:"Button",action:"click",label:t,...typeof a=="object"?a:{event:a}};window.dispatchEvent(new CustomEvent("uds:track",{detail:q}))}d==null||d(S)},M=j||(i&&t?t:void 0)||(i&&typeof o=="string"?`${o} icon`:void 0);return n.jsxs("button",{type:"button",className:_,disabled:C,"aria-busy":l?"true":void 0,"aria-label":M,onClick:B,...v,children:[n.jsx("span",{className:`${e}__content`,"aria-hidden":l?"true":void 0,children:N()}),l?n.jsx("span",{className:`${e}__loader`,"aria-hidden":"true",children:n.jsx(f.default,{name:"CircleNotch",size:p,appearance:"regular"})}):null]})}exports.default=L;
@@ -1 +1 @@
1
- import{jsx as r,jsxs as p,Fragment as m}from"react/jsx-runtime";import L from"../Icon/Icon.js";/* empty css */const n="uds-button",M={"label-only":`${n}--label-only`,"icon-left":`${n}--icon-left`,"icon-right":`${n}--icon-right`,"icon-only":`${n}--icon-only`,only:`${n}--only`},S={primary:`${n}--primary`,soft:`${n}--soft`,outline:`${n}--outline`,text:`${n}--text`,ghost:`${n}--ghost`,disabled:`${n}--disabled`,destructive:`${n}--destructive`},z={large:`${n}--large`,default:`${n}--default`,small:`${n}--small`,xsmall:`${n}--xsmall`};function V({label:t,appearance:d="primary",layout:o="label-only",size:f="default",icon:e,iconSize:$,icons:b,children:y,tracking:l,className:h,onClick:c,disabled:g,"aria-label":v,...x}){const C=[n,S[d],M[o],z[f],h].filter(Boolean).join(" "),s=o==="icon-only"||o==="only",B=!!t&&!s,u=(typeof e=="string"?r(L,{name:e,size:$,appearance:"regular"}):e??null)||b||y||null,a=u?r("span",{className:`${n}__icon`,"aria-hidden":B?"true":void 0,children:u}):null,i=t?r("span",{className:`${n}__label`,children:t}):null,N=()=>o==="icon-left"?p(m,{children:[a,i]}):o==="icon-right"?p(m,{children:[i,a]}):s?a||i:i||a,_=d==="disabled"||!!g,j=A=>{if(l){const E={component:"Button",action:"click",label:t,...typeof l=="object"?l:{event:l}};window.dispatchEvent(new CustomEvent("uds:track",{detail:E}))}c==null||c(A)},w=v||(s&&t?t:void 0)||(s&&typeof e=="string"?`${e} icon`:void 0);return r("button",{type:"button",className:C,disabled:_,"aria-label":w,onClick:j,...x,children:N()})}export{V as default};
1
+ import{jsxs as u,jsx as t,Fragment as f}from"react/jsx-runtime";import h from"../Icon/Icon.js";/* empty css */const n="uds-button",z={"label-only":`${n}--label-only`,"icon-left":`${n}--icon-left`,"icon-right":`${n}--icon-right`,"icon-only":`${n}--icon-only`,only:`${n}--only`},I={primary:`${n}--primary`,soft:`${n}--soft`,outline:`${n}--outline`,text:`${n}--text`,ghost:`${n}--ghost`,disabled:`${n}--disabled`,destructive:`${n}--destructive`},S={large:`${n}--large`,default:`${n}--default`,small:`${n}--small`,xsmall:`${n}--xsmall`};function q({label:e,appearance:p="primary",layout:o="label-only",size:b="default",icon:a,iconSize:m,icons:y,children:v,tracking:l,loading:s=!1,className:N,onClick:d,disabled:_,"aria-label":C,...x}){const g=[n,I[p],z[o],S[b],s&&`${n}--loading`,N].filter(Boolean).join(" "),i=o==="icon-only"||o==="only",B=!!e&&!i,$=(typeof a=="string"?t(h,{name:a,size:m,appearance:"regular"}):a??null)||y||v||null,r=$?t("span",{className:`${n}__icon`,"aria-hidden":B?"true":void 0,children:$}):null,c=e?t("span",{className:`${n}__label`,children:e}):null,j=()=>o==="icon-left"?u(f,{children:[r,c]}):o==="icon-right"?u(f,{children:[c,r]}):i?r||c:c||r,w=p==="disabled"||!!_||s,A=L=>{if(l){const M={component:"Button",action:"click",label:e,...typeof l=="object"?l:{event:l}};window.dispatchEvent(new CustomEvent("uds:track",{detail:M}))}d==null||d(L)},E=C||(i&&e?e:void 0)||(i&&typeof a=="string"?`${a} icon`:void 0);return u("button",{type:"button",className:g,disabled:w,"aria-busy":s?"true":void 0,"aria-label":E,onClick:A,...x,children:[t("span",{className:`${n}__content`,"aria-hidden":s?"true":void 0,children:j()}),s?t("span",{className:`${n}__loader`,"aria-hidden":"true",children:t(h,{name:"CircleNotch",size:m,appearance:"regular"})}):null]})}export{q as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),c=require("../Icon/Icon.cjs"),x=require("../Badge/Badge.cjs");;/* empty css */const e="uds-chip",p={outline:"outline",primary:"primary"},d={pill:"pill",rounded:"rounded"},h={both:"icon-both",left:"icon-left",right:"icon-right",none:"icon-none"};function N({label:o,appearance:r="outline",shape:l="pill",iconPlacement:s="none",icon:n,badge:i,badgeVariant:_="red",className:f="",onClick:u,disabled:a=!1,...$}){const g=[e,p[r]&&`${e}--${p[r]}`,d[l]&&`${e}--${d[l]}`,h[s]&&`${e}--${h[s]}`,a&&`${e}--disabled`,f].filter(Boolean).join(" "),m=s==="both"||s==="left",j=s==="both"||s==="right",b=u?"button":"span";return t.jsxs(b,{className:g,onClick:a?void 0:u,disabled:a,...$,children:[m&&n&&t.jsx(c.default,{name:n,size:16,appearance:"regular",className:`${e}__icon ${e}__icon--left`}),o&&t.jsx("span",{className:`${e}__label`,children:o}),j&&n&&t.jsx(c.default,{name:n,size:16,appearance:"regular",className:`${e}__icon ${e}__icon--right`}),i&&t.jsx(x.default,{count:i,variant:_,className:`${e}__badge`})]})}exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),C=require("react"),d=require("../Icon/Icon.cjs"),z=require("../Badge/Badge.cjs");;/* empty css */const e="uds-chip",h={default:"default",compact:"compact"},p={both:"icon-both",left:"icon-left",right:"icon-right",none:"icon-none"};function A({label:r,selected:a,rounded:$=!0,size:c="default",iconPlacement:n="none",icon:t,badge:i,badgeVariant:g="sky",className:m="",onClick:o,disabled:l=!1,...j}){const u=typeof a=="boolean",[N,b]=C.useState(a??!1),f=u?a:N,x=$,S=v=>{l||(u||b(B=>!B),o==null||o(v))},I=[e,f&&`${e}--selected`,`${e}--rounded-${x?"true":"false"}`,h[c]&&`${e}--${h[c]}`,p[n]&&`${e}--${p[n]}`,l&&`${e}--disabled`,m].filter(Boolean).join(" "),q=n==="both"||n==="left",y=n==="both"||n==="right",_=typeof t=="string",M=q&&t?_?s.jsx(d.default,{name:t,size:20,appearance:"regular",className:`${e}__icon ${e}__icon--left`}):s.jsx("span",{className:`${e}__icon ${e}__icon--left`,children:t}):null,R=y&&t?_?s.jsx(d.default,{name:t,size:20,appearance:"regular",className:`${e}__icon ${e}__icon--right`}):s.jsx("span",{className:`${e}__icon ${e}__icon--right`,children:t}):null;return s.jsxs("button",{type:"button",className:I,onClick:S,"aria-pressed":f,disabled:l,...j,children:[M,r?s.jsx("span",{className:`${e}__label`,children:r}):null,R,i?s.jsx(z.default,{count:i,variant:g,className:`${e}__badge`}):null]})}exports.default=A;
@@ -1 +1 @@
1
- import{jsxs as C,jsx as a}from"react/jsx-runtime";import p from"../Icon/Icon.js";import b from"../Badge/Badge.js";/* empty css */const o="uds-chip",h={outline:"outline",primary:"primary"},m={pill:"pill",rounded:"rounded"},u={both:"icon-both",left:"icon-left",right:"icon-right",none:"icon-none"};function M({label:e,appearance:r="outline",shape:i="pill",iconPlacement:s="none",icon:n,badge:l,badgeVariant:_="red",className:$="",onClick:c,disabled:t=!1,...f}){const d=[o,h[r]&&`${o}--${h[r]}`,m[i]&&`${o}--${m[i]}`,u[s]&&`${o}--${u[s]}`,t&&`${o}--disabled`,$].filter(Boolean).join(" "),g=s==="both"||s==="left",N=s==="both"||s==="right";return C(c?"button":"span",{className:d,onClick:t?void 0:c,disabled:t,...f,children:[g&&n&&a(p,{name:n,size:16,appearance:"regular",className:`${o}__icon ${o}__icon--left`}),e&&a("span",{className:`${o}__label`,children:e}),N&&n&&a(p,{name:n,size:16,appearance:"regular",className:`${o}__icon ${o}__icon--right`}),l&&a(b,{count:l,variant:_,className:`${o}__badge`})]})}export{M as default};
1
+ import{jsxs as M,jsx as n}from"react/jsx-runtime";import{useState as R}from"react";import _ from"../Icon/Icon.js";import v from"../Badge/Badge.js";/* empty css */const t="uds-chip",h={default:"default",compact:"compact"},m={both:"icon-both",left:"icon-left",right:"icon-right",none:"icon-none"};function F({label:l,selected:o,rounded:$=!0,size:c="default",iconPlacement:e="none",icon:s,badge:i,badgeVariant:d="sky",className:g="",onClick:a,disabled:r=!1,...N}){const f=typeof o=="boolean",[I,b]=R(o??!1),p=f?o:I,S=$,y=A=>{r||(f||b(L=>!L),a==null||a(A))},j=[t,p&&`${t}--selected`,`${t}--rounded-${S?"true":"false"}`,h[c]&&`${t}--${h[c]}`,m[e]&&`${t}--${m[e]}`,r&&`${t}--disabled`,g].filter(Boolean).join(" "),x=e==="both"||e==="left",B=e==="both"||e==="right",u=typeof s=="string",C=x&&s?u?n(_,{name:s,size:20,appearance:"regular",className:`${t}__icon ${t}__icon--left`}):n("span",{className:`${t}__icon ${t}__icon--left`,children:s}):null,z=B&&s?u?n(_,{name:s,size:20,appearance:"regular",className:`${t}__icon ${t}__icon--right`}):n("span",{className:`${t}__icon ${t}__icon--right`,children:s}):null;return M("button",{type:"button",className:j,onClick:y,"aria-pressed":p,disabled:r,...N,children:[C,l?n("span",{className:`${t}__label`,children:l}):null,z,i?n(v,{count:i,variant:d,className:`${t}__badge`}):null]})}export{F as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),t=require("react"),z=require("react-dom"),B=require("../Icon/Icon.cjs"),g=require("../Button/Button.cjs");;/* empty css */const a="uds-dialog",b={info:"Info",success:"CheckCircle",warning:"Warning",destructive:"WarningOctagon"},p={info:"var(--uds-system-action-primary)",success:"var(--uds-system-constructive-primary)",warning:"var(--uds-system-warning-primary)",destructive:"var(--uds-system-destructive-primary)"};function O({open:c=!1,onClose:s,intent:i="info",icon:j,title:n,description:l,confirmLabel:h="Confirm",cancelLabel:x="Cancel",onConfirm:u,onCancel:o,showCancel:N=!0,loading:$=!1,closeOnBackdrop:d=!0,closeOnEscape:f=!0,container:k,className:q="",children:m,...w}){const v=t.useRef(null),y=t.useRef(null);t.useEffect(()=>{if(c)return y.current=document.activeElement,document.body.style.overflow="hidden",requestAnimationFrame(()=>{var e;(e=v.current)==null||e.focus()}),()=>{var e,_;document.body.style.overflow="",(_=(e=y.current)==null?void 0:e.focus)==null||_.call(e)}},[c]);const I=t.useCallback(e=>{e.key==="Escape"&&f&&s&&(e.stopPropagation(),s())},[f,s]),S=t.useCallback(e=>{e.target===e.currentTarget&&d&&s&&s()},[d,s]),C=t.useCallback(()=>{o?o():s&&s()},[o,s]);if(!c)return null;const E=j||b[i]||b.info,R=p[i]||p.info,T=[a,`${a}--${i}`,q].filter(Boolean).join(" "),A=i==="destructive"?"destructive":"primary",D=r.jsx("div",{className:`${a}__overlay`,onClick:S,"aria-hidden":"true",children:r.jsxs("div",{ref:v,className:T,role:"alertdialog","aria-modal":"true","aria-labelledby":n?`${a}-title`:void 0,"aria-describedby":l?`${a}-desc`:void 0,tabIndex:-1,onKeyDown:I,...w,children:[r.jsx("div",{className:`${a}__icon`,style:{color:R},children:r.jsx(B.default,{name:E,size:32,appearance:"duotone"})}),r.jsxs("div",{className:`${a}__content`,children:[n&&r.jsx("h2",{id:`${a}-title`,className:`${a}__title`,children:n}),l&&r.jsx("p",{id:`${a}-desc`,className:`${a}__description`,children:l}),m&&r.jsx("div",{className:`${a}__body`,children:m})]}),r.jsxs("div",{className:`${a}__actions`,children:[N&&r.jsx(g.default,{label:x,appearance:"outline",onClick:C,size:"default"}),u&&r.jsx(g.default,{label:h,appearance:A,onClick:u,loading:$,size:"default"})]})]})});return z.createPortal(D,k||document.body)}exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),r=require("react"),P=require("react-dom"),H=require("../Icon/Icon.cjs"),E=require("../Button/Button.cjs");;/* empty css */const t="uds-dialog",b=".app-shell",D={info:"Info",success:"CheckCircle",warning:"Warning",destructive:"WarningOctagon"},O={info:"var(--uds-system-action-primary)",success:"var(--uds-system-constructive-primary)",warning:"var(--uds-system-warning-primary)",destructive:"var(--uds-system-destructive-primary)"};function z({open:i=!1,onClose:a,intent:c="info",icon:h,title:l,description:o,confirmLabel:j="Confirm",cancelLabel:x="Cancel",onConfirm:d,onCancel:u,showCancel:N=!0,loading:$=!1,closeOnBackdrop:m=!0,closeOnEscape:f=!0,container:v,className:T="",children:y,...S}){const _=r.useRef(null),g=r.useRef(null);r.useEffect(()=>{if(i)return g.current=document.activeElement instanceof HTMLElement?document.activeElement:null,document.body.style.overflow="hidden",requestAnimationFrame(()=>{var e;(e=_.current)==null||e.focus()}),()=>{var e,n;document.body.style.overflow="",(n=(e=g.current)==null?void 0:e.focus)==null||n.call(e)}},[i]);const k=r.useCallback(e=>{e.key==="Escape"&&f&&a&&(e.stopPropagation(),a())},[f,a]),L=r.useCallback(e=>{e.target===e.currentTarget&&m&&a&&a()},[m,a]),q=r.useCallback(()=>{u?u():a&&a()},[u,a]);if(!i)return null;const R=()=>{if(v instanceof HTMLElement)return v;const e=document.activeElement;if(e instanceof Element){const p=e.closest(b);if(p instanceof HTMLElement)return p}const n=document.querySelector(b);return n instanceof HTMLElement?n:document.body},w=h||D[c],C=O[c],I=[t,`${t}--${c}`,T].filter(Boolean).join(" "),A=c==="destructive"?"destructive":"primary",M=s.jsx("div",{className:`${t}__overlay`,onClick:L,"aria-hidden":"true",children:s.jsxs("div",{ref:_,className:I,role:"alertdialog","aria-modal":"true","aria-labelledby":l?`${t}-title`:void 0,"aria-describedby":o?`${t}-desc`:void 0,tabIndex:-1,onKeyDown:k,...S,children:[s.jsx("div",{className:`${t}__icon`,style:{color:C},children:s.jsx(H.default,{name:w,size:32,appearance:"duotone"})}),s.jsxs("div",{className:`${t}__content`,children:[l&&s.jsx("h2",{id:`${t}-title`,className:`${t}__title`,children:l}),o&&s.jsx("p",{id:`${t}-desc`,className:`${t}__description`,children:o}),y&&s.jsx("div",{className:`${t}__body`,children:y})]}),s.jsxs("div",{className:`${t}__actions`,children:[N&&s.jsx(E.default,{label:x,appearance:"outline",onClick:q,size:"default"}),d&&s.jsx(E.default,{label:j,appearance:A,onClick:d,loading:$,size:"default"})]})]})});return P.createPortal(M,R())}exports.default=z;
@@ -1 +1 @@
1
- import{jsx as i,jsxs as l}from"react/jsx-runtime";import{useRef as g,useEffect as L,useCallback as d}from"react";import{createPortal as O}from"react-dom";import P from"../Icon/Icon.js";import h from"../Button/Button.js";/* empty css */const r="uds-dialog",N={info:"Info",success:"CheckCircle",warning:"Warning",destructive:"WarningOctagon"},$={info:"var(--uds-system-action-primary)",success:"var(--uds-system-constructive-primary)",warning:"var(--uds-system-warning-primary)",destructive:"var(--uds-system-destructive-primary)"};function M({open:c=!1,onClose:a,intent:t="info",icon:b,title:s,description:n,confirmLabel:k="Confirm",cancelLabel:w="Cancel",onConfirm:u,onCancel:o,showCancel:I=!0,loading:E=!1,closeOnBackdrop:m=!0,closeOnEscape:f=!0,container:A,className:S="",children:v,...T}){const y=g(null),p=g(null);L(()=>{if(c)return p.current=document.activeElement,document.body.style.overflow="hidden",requestAnimationFrame(()=>{var e;(e=y.current)==null||e.focus()}),()=>{var e,_;document.body.style.overflow="",(_=(e=p.current)==null?void 0:e.focus)==null||_.call(e)}},[c]);const x=d(e=>{e.key==="Escape"&&f&&a&&(e.stopPropagation(),a())},[f,a]),C=d(e=>{e.target===e.currentTarget&&m&&a&&a()},[m,a]),j=d(()=>{o?o():a&&a()},[o,a]);if(!c)return null;const z=b||N[t]||N.info,B=$[t]||$.info,D=[r,`${r}--${t}`,S].filter(Boolean).join(" "),R=t==="destructive"?"destructive":"primary",K=i("div",{className:`${r}__overlay`,onClick:C,"aria-hidden":"true",children:l("div",{ref:y,className:D,role:"alertdialog","aria-modal":"true","aria-labelledby":s?`${r}-title`:void 0,"aria-describedby":n?`${r}-desc`:void 0,tabIndex:-1,onKeyDown:x,...T,children:[i("div",{className:`${r}__icon`,style:{color:B},children:i(P,{name:z,size:32,appearance:"duotone"})}),l("div",{className:`${r}__content`,children:[s&&i("h2",{id:`${r}-title`,className:`${r}__title`,children:s}),n&&i("p",{id:`${r}-desc`,className:`${r}__description`,children:n}),v&&i("div",{className:`${r}__body`,children:v})]}),l("div",{className:`${r}__actions`,children:[I&&i(h,{label:w,appearance:"outline",onClick:j,size:"default"}),u&&i(h,{label:k,appearance:R,onClick:u,loading:E,size:"default"})]})]})});return O(K,A||document.body)}export{M as default};
1
+ import{jsx as a,jsxs as d}from"react/jsx-runtime";import{useRef as h,useEffect as B,useCallback as u}from"react";import{createPortal as D}from"react-dom";import O from"../Icon/Icon.js";import N from"../Button/Button.js";/* empty css */const t="uds-dialog",$=".app-shell",q={info:"Info",success:"CheckCircle",warning:"Warning",destructive:"WarningOctagon"},K={info:"var(--uds-system-action-primary)",success:"var(--uds-system-constructive-primary)",warning:"var(--uds-system-warning-primary)",destructive:"var(--uds-system-destructive-primary)"};function V({open:i=!1,onClose:r,intent:c="info",icon:b,title:s,description:o,confirmLabel:T="Confirm",cancelLabel:L="Cancel",onConfirm:m,onCancel:l,showCancel:S=!0,loading:k=!1,closeOnBackdrop:f=!0,closeOnEscape:v=!0,container:p,className:w="",children:y,...I}){const _=h(null),E=h(null);B(()=>{if(i)return E.current=document.activeElement instanceof HTMLElement?document.activeElement:null,document.body.style.overflow="hidden",requestAnimationFrame(()=>{var e;(e=_.current)==null||e.focus()}),()=>{var e,n;document.body.style.overflow="",(n=(e=E.current)==null?void 0:e.focus)==null||n.call(e)}},[i]);const A=u(e=>{e.key==="Escape"&&v&&r&&(e.stopPropagation(),r())},[v,r]),C=u(e=>{e.target===e.currentTarget&&f&&r&&r()},[f,r]),H=u(()=>{l?l():r&&r()},[l,r]);if(!i)return null;const P=()=>{if(p instanceof HTMLElement)return p;const e=document.activeElement;if(e instanceof Element){const g=e.closest($);if(g instanceof HTMLElement)return g}const n=document.querySelector($);return n instanceof HTMLElement?n:document.body},R=b||q[c],x=K[c],M=[t,`${t}--${c}`,w].filter(Boolean).join(" "),j=c==="destructive"?"destructive":"primary",z=a("div",{className:`${t}__overlay`,onClick:C,"aria-hidden":"true",children:d("div",{ref:_,className:M,role:"alertdialog","aria-modal":"true","aria-labelledby":s?`${t}-title`:void 0,"aria-describedby":o?`${t}-desc`:void 0,tabIndex:-1,onKeyDown:A,...I,children:[a("div",{className:`${t}__icon`,style:{color:x},children:a(O,{name:R,size:32,appearance:"duotone"})}),d("div",{className:`${t}__content`,children:[s&&a("h2",{id:`${t}-title`,className:`${t}__title`,children:s}),o&&a("p",{id:`${t}-desc`,className:`${t}__description`,children:o}),y&&a("div",{className:`${t}__body`,children:y})]}),d("div",{className:`${t}__actions`,children:[S&&a(N,{label:L,appearance:"outline",onClick:H,size:"default"}),m&&a(N,{label:T,appearance:j,onClick:m,loading:k,size:"default"})]})]})});return D(z,P())}export{V as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react/jsx-runtime");;/* empty css */const e="uds-dot-status",r={"light-gray":"light-gray",red:"red",orange:"orange",yellow:"yellow","light-green":"light-green",green:"green",blue:"blue","dark-blue":"dark-blue",teal:"teal",purple:"purple",pink:"pink",magenta:"magenta","dark-red":"dark-red","dark-gray":"dark-gray"},t={small:"small",medium:"medium",large:"large"};function d({variant:a="blue",size:l="medium",outline:s=!1,className:u="","aria-label":n,...o}){const i=[e,r[a]&&`${e}--${r[a]}`,t[l]&&`${e}--${t[l]}`,s&&`${e}--outline`,u].filter(Boolean).join(" ");return g.jsx("span",{className:i,role:"status","aria-label":n||`${a} status`,...o})}exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime");;/* empty css */const e="uds-dot-status",r={red:"red",blue:"blue",inverse:"inverse",orange:"orange",sky:"sky",indigo:"indigo",rose:"rose",neutral:"neutral",celery:"celery",lime:"lime",yellow:"yellow",green:"green",cyan:"cyan",purple:"purple",fuchsia:"fuchsia"},t={small:"small",medium:"medium",large:"large"};function m({variant:s="blue",size:l="medium",outline:a=!1,className:u="","aria-label":n,...i}){const o=a===!0||a==="true",c=[e,r[s]&&`${e}--${r[s]}`,t[l]&&`${e}--${t[l]}`,o&&`${e}--outline`,u].filter(Boolean).join(" ");return d.jsx("span",{className:c,role:"status","aria-label":n||`${s} status`,...i})}exports.default=m;
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";/* empty css */const e="uds-dot-status",r={"light-gray":"light-gray",red:"red",orange:"orange",yellow:"yellow","light-green":"light-green",green:"green",blue:"blue","dark-blue":"dark-blue",teal:"teal",purple:"purple",pink:"pink",magenta:"magenta","dark-red":"dark-red","dark-gray":"dark-gray"},t={small:"small",medium:"medium",large:"large"};function p({variant:a="blue",size:l="medium",outline:s=!1,className:n="","aria-label":o,...u}){const g=[e,r[a]&&`${e}--${r[a]}`,t[l]&&`${e}--${t[l]}`,s&&`${e}--outline`,n].filter(Boolean).join(" ");return d("span",{className:g,role:"status","aria-label":o||`${a} status`,...u})}export{p as default};
1
+ import{jsx as c}from"react/jsx-runtime";/* empty css */const e="uds-dot-status",r={red:"red",blue:"blue",inverse:"inverse",orange:"orange",sky:"sky",indigo:"indigo",rose:"rose",neutral:"neutral",celery:"celery",lime:"lime",yellow:"yellow",green:"green",cyan:"cyan",purple:"purple",fuchsia:"fuchsia"},t={small:"small",medium:"medium",large:"large"};function g({variant:s="blue",size:l="medium",outline:a=!1,className:n="","aria-label":o,...u}){const i=a===!0||a==="true",m=[e,r[s]&&`${e}--${r[s]}`,t[l]&&`${e}--${t[l]}`,i&&`${e}--outline`,n].filter(Boolean).join(" ");return c("span",{className:m,role:"status","aria-label":o||`${s} status`,...u})}export{g as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../Icon/Icon.cjs");;/* empty css */function o({title:i,description:s,icon:n="Inbox",iconSize:l=32,action:t,secondaryAction:a,align:d="center",className:c="",...r}){const u=["uds-empty-state",`uds-empty-state--${d}`,c].filter(Boolean).join(" ");return e.jsxs("div",{className:u,...r,children:[e.jsx("div",{className:"uds-empty-state__icon","aria-hidden":"true",children:e.jsx(m.default,{name:n,size:l})}),e.jsxs("div",{className:"uds-empty-state__content",children:[e.jsx("div",{className:"uds-empty-state__title",children:i}),s?e.jsx("div",{className:"uds-empty-state__description",children:s}):null]}),t||a?e.jsxs("div",{className:"uds-empty-state__actions",children:[t,a]}):null]})}exports.EmptyState=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../Icon/Icon.cjs");;/* empty css */function o({title:i,description:s,icon:n="Inbox",iconSize:l=32,action:t,secondaryAction:a,align:d="center",className:c="",...r}){const u=["uds-empty-state",`uds-empty-state--${d}`,c].filter(Boolean).join(" ");return e.jsxs("div",{className:u,...r,children:[e.jsx("div",{className:"uds-empty-state__icon","aria-hidden":"true",children:e.jsx(m.default,{name:n,size:l})}),e.jsxs("div",{className:"uds-empty-state__content",children:[e.jsx("div",{className:"uds-empty-state__title",children:i}),s?e.jsx("div",{className:"uds-empty-state__description",children:s}):null]}),t||a?e.jsxs("div",{className:"uds-empty-state__actions",children:[a,t]}):null]})}exports.EmptyState=o;
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import p from"../Icon/Icon.js";/* empty css */function y({title:m,description:s,icon:d="Inbox",iconSize:l=32,action:a,secondaryAction:i,align:n="center",className:c="",...r}){const o=["uds-empty-state",`uds-empty-state--${n}`,c].filter(Boolean).join(" ");return t("div",{className:o,...r,children:[e("div",{className:"uds-empty-state__icon","aria-hidden":"true",children:e(p,{name:d,size:l})}),t("div",{className:"uds-empty-state__content",children:[e("div",{className:"uds-empty-state__title",children:m}),s?e("div",{className:"uds-empty-state__description",children:s}):null]}),a||i?t("div",{className:"uds-empty-state__actions",children:[a,i]}):null]})}export{y as EmptyState};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import p from"../Icon/Icon.js";/* empty css */function y({title:m,description:s,icon:d="Inbox",iconSize:l=32,action:a,secondaryAction:i,align:n="center",className:c="",...r}){const o=["uds-empty-state",`uds-empty-state--${n}`,c].filter(Boolean).join(" ");return t("div",{className:o,...r,children:[e("div",{className:"uds-empty-state__icon","aria-hidden":"true",children:e(p,{name:d,size:l})}),t("div",{className:"uds-empty-state__content",children:[e("div",{className:"uds-empty-state__title",children:m}),s?e("div",{className:"uds-empty-state__description",children:s}):null]}),a||i?t("div",{className:"uds-empty-state__actions",children:[i,a]}):null]})}export{y as EmptyState};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("react"),f=require("../Icon/Icon.cjs");;/* empty css */const s="uds-field";function N({label:t,required:d=!1,helperMessage:i,infoIcon:n,onInfoClick:u,maxLength:r,value:c,id:_,className:m="",children:a,...p}){const l=_||`field-${Math.random().toString(36).substr(2,9)}`,j=c?String(c).length:0,h=r!=null,x=[s,m].filter(Boolean).join(" ");return e.jsxs("div",{className:x,...p,children:[(t||n)&&e.jsxs("div",{className:`${s}__label-row`,children:[t&&e.jsxs("label",{htmlFor:l,className:`${s}__label`,children:[t,d&&e.jsx("span",{className:`${s}__required`,children:"*"})]}),n&&e.jsx("button",{type:"button",className:`${s}__info-icon`,onClick:u,"aria-label":"More information",tabIndex:0,children:e.jsx(f.default,{name:n,size:16,appearance:"regular"})})]}),e.jsxs("div",{className:`${s}__input-wrapper`,children:[o.isValidElement(a)&&l?o.cloneElement(a,{id:l,maxLength:r||a.props.maxLength,...a.props}):a,h&&e.jsxs("span",{className:`${s}__character-count`,children:[j,"/",r]})]}),i&&e.jsx("div",{className:`${s}__helper`,children:i})]})}exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),m=require("react"),v=require("../Icon/Icon.cjs"),b=require("../Tooltip/Tooltip.cjs");;/* empty css */const s="uds-field";function S({label:r,state:f="default",required:j=!1,helperMessage:i,maxLength:u,value:a,infoIcon:l,onInfoClick:o,id:x,className:p="",children:n,...h}){const c=x||`field-${Math.random().toString(36).substr(2,9)}`,t=typeof o=="function",_=typeof u=="number",$=a==null?0:String(a).length,N=[s,`${s}--${f}`,p].filter(Boolean).join(" ");return e.jsxs("div",{className:N,...h,children:[(r||l)&&e.jsxs("div",{className:`${s}__label-row`,children:[r&&e.jsxs("label",{htmlFor:c,className:`${s}__label`,children:[r,j&&e.jsx("span",{className:`${s}__required`,children:"*"})]}),l&&e.jsxs("div",{className:`${s}__info`,children:[e.jsx("span",{className:`${s}__info-text`,children:"Info"}),e.jsx(b.default,{content:"More information",children:e.jsx("span",{className:`${s}__info-icon`,role:t?"button":void 0,tabIndex:t?0:void 0,"aria-label":t?"More information":void 0,onClick:o,onKeyDown:d=>{t&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),o())},children:e.jsx(v.default,{name:l,size:16,appearance:"regular"})})})]})]}),e.jsx("div",{className:`${s}__input-wrapper`,children:m.isValidElement(n)&&c?m.cloneElement(n,{id:c,...n.props}):n}),(i||_)&&e.jsxs("div",{className:`${s}__meta`,children:[i?e.jsx("div",{className:`${s}__helper`,children:i}):e.jsx("span",{}),_&&e.jsxs("div",{className:`${s}__character-count`,children:[$,"/",u]})]})]})}exports.default=S;