@ternent/core 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +17 -0
  3. package/.github/workflows/deploy-armour.yml +42 -0
  4. package/.github/workflows/deploy-identity.yml +42 -0
  5. package/.github/workflows/deploy-seal.yml +42 -0
  6. package/.github/workflows/deploy-ui.yml +42 -0
  7. package/.github/workflows/deploy-utils.yml +42 -0
  8. package/.github/workflows/release-create.yml +59 -0
  9. package/.github/workflows/release-publish.yml +54 -0
  10. package/.nvmrc +1 -0
  11. package/.ops/publish.mjs +31 -0
  12. package/package.json +16 -0
  13. package/packages/README.md +0 -0
  14. package/packages/armour/CHANGELOG.md +66 -0
  15. package/packages/armour/CLAUDE.md +8 -0
  16. package/packages/armour/README.md +103 -0
  17. package/packages/armour/SPEC.md +92 -0
  18. package/packages/armour/package.json +45 -0
  19. package/packages/armour/src/constants.ts +5 -0
  20. package/packages/armour/src/deps.d.ts +56 -0
  21. package/packages/armour/src/errors.ts +172 -0
  22. package/packages/armour/src/files.ts +73 -0
  23. package/packages/armour/src/identity.ts +72 -0
  24. package/packages/armour/src/index.ts +56 -0
  25. package/packages/armour/src/init.ts +10 -0
  26. package/packages/armour/src/passphrase.ts +33 -0
  27. package/packages/armour/src/recipients.ts +73 -0
  28. package/packages/armour/src/text.ts +68 -0
  29. package/packages/armour/src/types.ts +93 -0
  30. package/packages/armour/test/armour.test.ts +270 -0
  31. package/packages/armour/tsconfig.build.json +12 -0
  32. package/packages/armour/tsconfig.json +12 -0
  33. package/packages/armour/vite.config.ts +29 -0
  34. package/packages/concord/CHANGELOG.md +83 -0
  35. package/packages/concord/CLAUDE.md +9 -0
  36. package/packages/concord/README.md +146 -0
  37. package/packages/concord/SPEC.md +287 -0
  38. package/packages/concord/package.json +51 -0
  39. package/packages/concord/src/app.ts +717 -0
  40. package/packages/concord/src/errors.ts +9 -0
  41. package/packages/concord/src/index.ts +20 -0
  42. package/packages/concord/src/types.ts +127 -0
  43. package/packages/concord/test/concord.test.ts +978 -0
  44. package/packages/concord/tsconfig.json +12 -0
  45. package/packages/concord/vite.browser.config.ts +27 -0
  46. package/packages/concord/vite.config.ts +35 -0
  47. package/packages/concord/vite.config.ts.timestamp-1774262297922-ffd76e35ea668.mjs +83 -0
  48. package/packages/identity/CHANGELOG.md +47 -0
  49. package/packages/identity/README.md +236 -0
  50. package/packages/identity/package.json +41 -0
  51. package/packages/identity/src/index.ts +538 -0
  52. package/packages/identity/test/identity.test.ts +172 -0
  53. package/packages/identity/tsconfig.build.json +12 -0
  54. package/packages/identity/vite.config.ts +17 -0
  55. package/packages/ledger/CHANGELOG.md +69 -0
  56. package/packages/ledger/CLAUDE.md +9 -0
  57. package/packages/ledger/SPEC.md +304 -0
  58. package/packages/ledger/package.json +48 -0
  59. package/packages/ledger/src/index.ts +2 -0
  60. package/packages/ledger/src/ledger.ts +1286 -0
  61. package/packages/ledger/src/seal-cli.d.ts +25 -0
  62. package/packages/ledger/src/types.ts +294 -0
  63. package/packages/ledger/test/ledger.test.ts +838 -0
  64. package/packages/ledger/tsconfig.json +12 -0
  65. package/packages/ledger/vite.browser.config.ts +27 -0
  66. package/packages/ledger/vite.config.ts +39 -0
  67. package/packages/seal/CHANGELOG.md +137 -0
  68. package/packages/seal/CLAUDE.md +8 -0
  69. package/packages/seal/README.md +258 -0
  70. package/packages/seal/bin/seal +6 -0
  71. package/packages/seal/package.json +59 -0
  72. package/packages/seal/src/artifact.ts +380 -0
  73. package/packages/seal/src/cli.ts +372 -0
  74. package/packages/seal/src/commands/identity.ts +52 -0
  75. package/packages/seal/src/commands/manifest.ts +71 -0
  76. package/packages/seal/src/commands/publicKey.ts +7 -0
  77. package/packages/seal/src/commands/sign.ts +56 -0
  78. package/packages/seal/src/commands/verify.ts +54 -0
  79. package/packages/seal/src/crypto.ts +85 -0
  80. package/packages/seal/src/errors.ts +88 -0
  81. package/packages/seal/src/index.ts +5 -0
  82. package/packages/seal/src/manifest.ts +114 -0
  83. package/packages/seal/src/node.ts +18 -0
  84. package/packages/seal/src/proof.ts +344 -0
  85. package/packages/seal/test/artifact.test.ts +86 -0
  86. package/packages/seal/test/cli.test.ts +208 -0
  87. package/packages/seal/test/crypto.test.ts +21 -0
  88. package/packages/seal/test/manifest.test.ts +32 -0
  89. package/packages/seal/test/proof.test.ts +60 -0
  90. package/packages/seal/tsconfig.json +12 -0
  91. package/packages/seal/vite.config.ts +54 -0
  92. package/packages/ui/CHANGELOG.md +393 -0
  93. package/packages/ui/README.md +57 -0
  94. package/packages/ui/jsconfig.json +19 -0
  95. package/packages/ui/package.json +64 -0
  96. package/packages/ui/scripts/check-tokens.js +56 -0
  97. package/packages/ui/scripts/generate-theme-css.mjs +85 -0
  98. package/packages/ui/src/design-system/base.css +8 -0
  99. package/packages/ui/src/design-system/docs/ACCESSIBILITY_RULES.md +186 -0
  100. package/packages/ui/src/design-system/docs/AI_SYSTEM.md +281 -0
  101. package/packages/ui/src/design-system/docs/PATTERN_RULES.md +83 -0
  102. package/packages/ui/src/design-system/docs/PRIMITIVE_RULES.md +258 -0
  103. package/packages/ui/src/design-system/docs/TOKEN_RULES.md +235 -0
  104. package/packages/ui/src/design-system/docs/VISUAL_DIRECTION.md +68 -0
  105. package/packages/ui/src/design-system/foundation.js +420 -0
  106. package/packages/ui/src/design-system/tokens.css +140 -0
  107. package/packages/ui/src/design-system/tokens.js +327 -0
  108. package/packages/ui/src/design-system/utils.js +246 -0
  109. package/packages/ui/src/main.js +4 -0
  110. package/packages/ui/src/patterns/FeatureCard/FeatureCard.spec.md +24 -0
  111. package/packages/ui/src/patterns/FeatureCard/FeatureCard.types.ts +8 -0
  112. package/packages/ui/src/patterns/FeatureCard/FeatureCard.vue +175 -0
  113. package/packages/ui/src/patterns/FormField/FormField.spec.md +65 -0
  114. package/packages/ui/src/patterns/FormField/FormField.types.ts +11 -0
  115. package/packages/ui/src/patterns/FormField/FormField.vue +87 -0
  116. package/packages/ui/src/patterns/IdentityGlyph/IdentityGlyph.vue +61 -0
  117. package/packages/ui/src/patterns/IdentityGlyph/IdentityHandle.vue +58 -0
  118. package/packages/ui/src/patterns/IdentityGlyph/identityGlyph.types.ts +36 -0
  119. package/packages/ui/src/patterns/IdentityGlyph/identityGlyph.utils.ts +585 -0
  120. package/packages/ui/src/patterns/IdentityGlyph/index.ts +5 -0
  121. package/packages/ui/src/patterns/KeyValueList/KeyValueList.spec.md +28 -0
  122. package/packages/ui/src/patterns/KeyValueList/KeyValueList.types.ts +16 -0
  123. package/packages/ui/src/patterns/KeyValueList/KeyValueList.vue +50 -0
  124. package/packages/ui/src/patterns/LandingPage/LandingIcon.vue +90 -0
  125. package/packages/ui/src/patterns/LandingPage/LandingPage.spec.md +24 -0
  126. package/packages/ui/src/patterns/LandingPage/LandingPage.types.ts +212 -0
  127. package/packages/ui/src/patterns/LandingPage/LandingPage.vue +599 -0
  128. package/packages/ui/src/patterns/ListWorkspaceLayout/ListWorkspaceLayout.test.ts +33 -0
  129. package/packages/ui/src/patterns/ListWorkspaceLayout/ListWorkspaceLayout.vue +44 -0
  130. package/packages/ui/src/patterns/Logo/Logo.spec.md +22 -0
  131. package/packages/ui/src/patterns/Logo/Logo.vue +160 -0
  132. package/packages/ui/src/patterns/PageSurface/PageSurface.spec.md +15 -0
  133. package/packages/ui/src/patterns/PageSurface/PageSurface.vue +85 -0
  134. package/packages/ui/src/patterns/PanelChrome/PanelChrome.spec.md +39 -0
  135. package/packages/ui/src/patterns/PanelChrome/PanelChrome.types.ts +1 -0
  136. package/packages/ui/src/patterns/PanelChrome/PanelChrome.vue +187 -0
  137. package/packages/ui/src/patterns/PreviewPanel/PreviewPanel.spec.md +31 -0
  138. package/packages/ui/src/patterns/PreviewPanel/PreviewPanel.types.ts +23 -0
  139. package/packages/ui/src/patterns/PreviewPanel/PreviewPanel.vue +354 -0
  140. package/packages/ui/src/patterns/RecordList/RecordList.spec.md +35 -0
  141. package/packages/ui/src/patterns/RecordList/RecordList.test.ts +42 -0
  142. package/packages/ui/src/patterns/RecordList/RecordList.types.ts +9 -0
  143. package/packages/ui/src/patterns/RecordList/RecordList.utils.ts +5 -0
  144. package/packages/ui/src/patterns/RecordList/RecordList.vue +134 -0
  145. package/packages/ui/src/patterns/SectionClarifier/SectionClarifier.vue +85 -0
  146. package/packages/ui/src/patterns/SectionIntro/SectionIntro.spec.md +25 -0
  147. package/packages/ui/src/patterns/SectionIntro/SectionIntro.types.ts +7 -0
  148. package/packages/ui/src/patterns/SectionIntro/SectionIntro.vue +141 -0
  149. package/packages/ui/src/patterns/SidebarNav/SidebarNav.spec.md +34 -0
  150. package/packages/ui/src/patterns/SidebarNav/SidebarNav.types.ts +17 -0
  151. package/packages/ui/src/patterns/SidebarNav/SidebarNav.vue +110 -0
  152. package/packages/ui/src/patterns/SplitView/SplitView.spec.md +28 -0
  153. package/packages/ui/src/patterns/SplitView/SplitView.test.ts +22 -0
  154. package/packages/ui/src/patterns/SplitView/SplitView.types.ts +3 -0
  155. package/packages/ui/src/patterns/SplitView/SplitView.utils.ts +13 -0
  156. package/packages/ui/src/patterns/SplitView/SplitView.vue +39 -0
  157. package/packages/ui/src/patterns/StepList/StepList.spec.md +15 -0
  158. package/packages/ui/src/patterns/StepList/StepList.types.ts +4 -0
  159. package/packages/ui/src/patterns/StepList/StepList.vue +91 -0
  160. package/packages/ui/src/patterns/Verification/VerificationBadge.vue +97 -0
  161. package/packages/ui/src/patterns/Verification/VerificationComponents.test.ts +153 -0
  162. package/packages/ui/src/patterns/Verification/VerificationDetailsPanel.vue +270 -0
  163. package/packages/ui/src/patterns/Verification/VerificationSummary.vue +171 -0
  164. package/packages/ui/src/patterns/Verification/index.ts +6 -0
  165. package/packages/ui/src/patterns/Verification/verification.types.ts +8 -0
  166. package/packages/ui/src/patterns/Verification/verification.utils.test.ts +37 -0
  167. package/packages/ui/src/patterns/Verification/verification.utils.ts +75 -0
  168. package/packages/ui/src/patterns/index.ts +25 -0
  169. package/packages/ui/src/primitives/Accordian/Accordian.vue +11 -0
  170. package/packages/ui/src/primitives/Accordian/AccordianItem.vue +14 -0
  171. package/packages/ui/src/primitives/Accordion/Accordion.props.ts +21 -0
  172. package/packages/ui/src/primitives/Accordion/Accordion.spec.md +50 -0
  173. package/packages/ui/src/primitives/Accordion/Accordion.types.ts +4 -0
  174. package/packages/ui/src/primitives/Accordion/Accordion.variants.ts +12 -0
  175. package/packages/ui/src/primitives/Accordion/Accordion.vue +71 -0
  176. package/packages/ui/src/primitives/Accordion/AccordionItem.props.ts +14 -0
  177. package/packages/ui/src/primitives/Accordion/AccordionItem.vue +40 -0
  178. package/packages/ui/src/primitives/Badge/Badge.props.ts +17 -0
  179. package/packages/ui/src/primitives/Badge/Badge.spec.md +17 -0
  180. package/packages/ui/src/primitives/Badge/Badge.types.ts +15 -0
  181. package/packages/ui/src/primitives/Badge/Badge.variants.ts +48 -0
  182. package/packages/ui/src/primitives/Badge/Badge.vue +31 -0
  183. package/packages/ui/src/primitives/Button/Button.props.ts +29 -0
  184. package/packages/ui/src/primitives/Button/Button.spec.md +139 -0
  185. package/packages/ui/src/primitives/Button/Button.types.ts +19 -0
  186. package/packages/ui/src/primitives/Button/Button.variants.ts +72 -0
  187. package/packages/ui/src/primitives/Button/Button.vue +90 -0
  188. package/packages/ui/src/primitives/Card/Card.props.ts +17 -0
  189. package/packages/ui/src/primitives/Card/Card.spec.md +29 -0
  190. package/packages/ui/src/primitives/Card/Card.types.ts +12 -0
  191. package/packages/ui/src/primitives/Card/Card.variants.ts +27 -0
  192. package/packages/ui/src/primitives/Card/Card.vue +37 -0
  193. package/packages/ui/src/primitives/Checkbox/Checkbox.props.ts +21 -0
  194. package/packages/ui/src/primitives/Checkbox/Checkbox.spec.md +51 -0
  195. package/packages/ui/src/primitives/Checkbox/Checkbox.types.ts +4 -0
  196. package/packages/ui/src/primitives/Checkbox/Checkbox.variants.ts +34 -0
  197. package/packages/ui/src/primitives/Checkbox/Checkbox.vue +92 -0
  198. package/packages/ui/src/primitives/Dialog/Dialog.props.ts +29 -0
  199. package/packages/ui/src/primitives/Dialog/Dialog.spec.md +52 -0
  200. package/packages/ui/src/primitives/Dialog/Dialog.types.ts +3 -0
  201. package/packages/ui/src/primitives/Dialog/Dialog.variants.ts +27 -0
  202. package/packages/ui/src/primitives/Dialog/Dialog.vue +78 -0
  203. package/packages/ui/src/primitives/Drawer/Drawer.props.ts +33 -0
  204. package/packages/ui/src/primitives/Drawer/Drawer.spec.md +50 -0
  205. package/packages/ui/src/primitives/Drawer/Drawer.types.ts +5 -0
  206. package/packages/ui/src/primitives/Drawer/Drawer.variants.ts +35 -0
  207. package/packages/ui/src/primitives/Drawer/Drawer.vue +88 -0
  208. package/packages/ui/src/primitives/FieldMessage/FieldMessage.props.ts +17 -0
  209. package/packages/ui/src/primitives/FieldMessage/FieldMessage.spec.md +35 -0
  210. package/packages/ui/src/primitives/FieldMessage/FieldMessage.types.ts +5 -0
  211. package/packages/ui/src/primitives/FieldMessage/FieldMessage.variants.ts +14 -0
  212. package/packages/ui/src/primitives/FieldMessage/FieldMessage.vue +40 -0
  213. package/packages/ui/src/primitives/FileInput/FileInput.props.ts +41 -0
  214. package/packages/ui/src/primitives/FileInput/FileInput.types.ts +6 -0
  215. package/packages/ui/src/primitives/FileInput/FileInput.variants.ts +46 -0
  216. package/packages/ui/src/primitives/FileInput/FileInput.vue +163 -0
  217. package/packages/ui/src/primitives/Input/Input.props.ts +29 -0
  218. package/packages/ui/src/primitives/Input/Input.spec.md +79 -0
  219. package/packages/ui/src/primitives/Input/Input.types.ts +13 -0
  220. package/packages/ui/src/primitives/Input/Input.variants.ts +54 -0
  221. package/packages/ui/src/primitives/Input/Input.vue +99 -0
  222. package/packages/ui/src/primitives/Label/Label.props.ts +25 -0
  223. package/packages/ui/src/primitives/Label/Label.spec.md +31 -0
  224. package/packages/ui/src/primitives/Label/Label.types.ts +3 -0
  225. package/packages/ui/src/primitives/Label/Label.variants.ts +17 -0
  226. package/packages/ui/src/primitives/Label/Label.vue +38 -0
  227. package/packages/ui/src/primitives/Menu/Menu.props.ts +17 -0
  228. package/packages/ui/src/primitives/Menu/Menu.spec.md +38 -0
  229. package/packages/ui/src/primitives/Menu/Menu.types.ts +10 -0
  230. package/packages/ui/src/primitives/Menu/Menu.variants.ts +10 -0
  231. package/packages/ui/src/primitives/Menu/Menu.vue +57 -0
  232. package/packages/ui/src/primitives/Popover/Popover.props.ts +25 -0
  233. package/packages/ui/src/primitives/Popover/Popover.spec.md +49 -0
  234. package/packages/ui/src/primitives/Popover/Popover.types.ts +3 -0
  235. package/packages/ui/src/primitives/Popover/Popover.variants.ts +18 -0
  236. package/packages/ui/src/primitives/Popover/Popover.vue +74 -0
  237. package/packages/ui/src/primitives/RadioGroup/RadioGroup.props.ts +29 -0
  238. package/packages/ui/src/primitives/RadioGroup/RadioGroup.spec.md +50 -0
  239. package/packages/ui/src/primitives/RadioGroup/RadioGroup.types.ts +12 -0
  240. package/packages/ui/src/primitives/RadioGroup/RadioGroup.variants.ts +48 -0
  241. package/packages/ui/src/primitives/RadioGroup/RadioGroup.vue +87 -0
  242. package/packages/ui/src/primitives/Separator/Separator.props.ts +9 -0
  243. package/packages/ui/src/primitives/Separator/Separator.spec.md +15 -0
  244. package/packages/ui/src/primitives/Separator/Separator.types.ts +3 -0
  245. package/packages/ui/src/primitives/Separator/Separator.variants.ts +8 -0
  246. package/packages/ui/src/primitives/Separator/Separator.vue +23 -0
  247. package/packages/ui/src/primitives/Skeleton/Skeleton.props.ts +21 -0
  248. package/packages/ui/src/primitives/Skeleton/Skeleton.spec.md +18 -0
  249. package/packages/ui/src/primitives/Skeleton/Skeleton.types.ts +5 -0
  250. package/packages/ui/src/primitives/Skeleton/Skeleton.variants.ts +18 -0
  251. package/packages/ui/src/primitives/Skeleton/Skeleton.vue +37 -0
  252. package/packages/ui/src/primitives/Spinner/Spinner.props.ts +13 -0
  253. package/packages/ui/src/primitives/Spinner/Spinner.spec.md +16 -0
  254. package/packages/ui/src/primitives/Spinner/Spinner.types.ts +5 -0
  255. package/packages/ui/src/primitives/Spinner/Spinner.variants.ts +15 -0
  256. package/packages/ui/src/primitives/Spinner/Spinner.vue +33 -0
  257. package/packages/ui/src/primitives/SplitButton/SplitButton.vue +108 -0
  258. package/packages/ui/src/primitives/Switch/Switch.props.ts +21 -0
  259. package/packages/ui/src/primitives/Switch/Switch.spec.md +49 -0
  260. package/packages/ui/src/primitives/Switch/Switch.types.ts +3 -0
  261. package/packages/ui/src/primitives/Switch/Switch.variants.ts +34 -0
  262. package/packages/ui/src/primitives/Switch/Switch.vue +71 -0
  263. package/packages/ui/src/primitives/Tabs/Tabs.props.ts +25 -0
  264. package/packages/ui/src/primitives/Tabs/Tabs.spec.md +48 -0
  265. package/packages/ui/src/primitives/Tabs/Tabs.types.ts +11 -0
  266. package/packages/ui/src/primitives/Tabs/Tabs.variants.ts +28 -0
  267. package/packages/ui/src/primitives/Tabs/Tabs.vue +59 -0
  268. package/packages/ui/src/primitives/Textarea/Textarea.props.ts +33 -0
  269. package/packages/ui/src/primitives/Textarea/Textarea.spec.md +59 -0
  270. package/packages/ui/src/primitives/Textarea/Textarea.types.ts +5 -0
  271. package/packages/ui/src/primitives/Textarea/Textarea.variants.ts +27 -0
  272. package/packages/ui/src/primitives/Textarea/Textarea.vue +74 -0
  273. package/packages/ui/src/primitives/Tooltip/Tooltip.props.ts +21 -0
  274. package/packages/ui/src/primitives/Tooltip/Tooltip.spec.md +45 -0
  275. package/packages/ui/src/primitives/Tooltip/Tooltip.types.ts +3 -0
  276. package/packages/ui/src/primitives/Tooltip/Tooltip.variants.ts +4 -0
  277. package/packages/ui/src/primitives/Tooltip/Tooltip.vue +31 -0
  278. package/packages/ui/src/primitives/TreeView/TreeView.types.ts +10 -0
  279. package/packages/ui/src/primitives/TreeView/TreeView.vue +113 -0
  280. package/packages/ui/src/primitives/TreeView/TreeViewNode.vue +190 -0
  281. package/packages/ui/src/primitives/index.ts +29 -0
  282. package/packages/ui/src/style.css +7 -0
  283. package/packages/ui/src/style.js +1 -0
  284. package/packages/ui/src/themes/armour.css +147 -0
  285. package/packages/ui/src/themes/aurora.css +147 -0
  286. package/packages/ui/src/themes/citrine-ash.css +147 -0
  287. package/packages/ui/src/themes/concord.css +147 -0
  288. package/packages/ui/src/themes/garnet-honey.css +147 -0
  289. package/packages/ui/src/themes/harbor-rose.css +147 -0
  290. package/packages/ui/src/themes/ledger.css +147 -0
  291. package/packages/ui/src/themes/neon-noir.css +74 -0
  292. package/packages/ui/src/themes/obsidian-iris.css +147 -0
  293. package/packages/ui/src/themes/pixpax.css +147 -0
  294. package/packages/ui/src/themes/print.css +147 -0
  295. package/packages/ui/src/themes/prism.css +147 -0
  296. package/packages/ui/src/themes/proof.css +145 -0
  297. package/packages/ui/src/themes/semanticThemeContract.js +2256 -0
  298. package/packages/ui/src/themes/spruce-ink.css +147 -0
  299. package/packages/ui/src/themes/sunset.css +147 -0
  300. package/packages/ui/tailwind.config.js +64 -0
  301. package/packages/ui/vite.config.js +35 -0
  302. package/packages/ui/vite.config.js.timestamp-1780697224943-89fbc929987bc.mjs +38 -0
  303. package/packages/utils/CHANGELOG.md +111 -0
  304. package/packages/utils/README.md +3 -0
  305. package/packages/utils/package.json +46 -0
  306. package/packages/utils/src/index.test.js +39 -0
  307. package/packages/utils/src/index.ts +289 -0
  308. package/packages/utils/tsconfig.build.json +12 -0
  309. package/packages/utils/vite.config.js +28 -0
  310. package/pnpm-workspace.yaml +8 -0
  311. package/scripts/vite/package-lib-config.ts +59 -0
  312. package/tsconfig.json +24 -0
  313. package/tsconfig.node.json +9 -0
@@ -0,0 +1,29 @@
1
+ import type { PropType } from "vue";
2
+ import type { InputSize, InputType } from "./Input.types";
3
+
4
+ export const inputProps = {
5
+ modelValue: {
6
+ type: [String, Number],
7
+ default: "",
8
+ },
9
+ type: {
10
+ type: String as PropType<InputType>,
11
+ default: "text",
12
+ },
13
+ size: {
14
+ type: String as PropType<InputSize>,
15
+ default: "md",
16
+ },
17
+ disabled: {
18
+ type: Boolean,
19
+ default: false,
20
+ },
21
+ invalid: {
22
+ type: Boolean,
23
+ default: false,
24
+ },
25
+ readonly: {
26
+ type: Boolean,
27
+ default: false,
28
+ },
29
+ };
@@ -0,0 +1,79 @@
1
+ # Input
2
+
3
+ ## Purpose
4
+
5
+ Single-line text entry primitive for the v2 form system.
6
+
7
+ ## Category
8
+
9
+ Primitive
10
+
11
+ ## Anatomy
12
+
13
+ - input root
14
+ - optional `leading` adornment slot
15
+ - optional `trailing` adornment slot
16
+
17
+ ## Public API
18
+
19
+ Props:
20
+
21
+ - `modelValue`: string or number
22
+ - `type`: `text | email | password | search | url | tel | number`
23
+ - `size`: `sm | md | lg`
24
+ - `disabled`: boolean
25
+ - `invalid`: boolean
26
+ - `readonly`: boolean
27
+
28
+ Slots:
29
+
30
+ - `leading`
31
+ - `trailing`
32
+
33
+ Events:
34
+
35
+ - `update:modelValue`
36
+ - `focus`
37
+ - `blur`
38
+
39
+ ## States
40
+
41
+ - default
42
+ - hover
43
+ - focus-visible
44
+ - disabled
45
+ - invalid
46
+ - readonly
47
+
48
+ ## Accessibility
49
+
50
+ - uses native `<input>` semantics
51
+ - supports `aria-invalid` when invalid
52
+ - relies on external labels and descriptions through attrs such as `id` and `aria-describedby`
53
+
54
+ ## Token usage
55
+
56
+ - `--ui-surface`
57
+ - `--ui-fg`
58
+ - `--ui-fg-muted`
59
+ - `--ui-border`
60
+ - `--ui-primary`
61
+ - `--ui-critical`
62
+ - `--ui-ring`
63
+ - `--ui-radius-md`
64
+ - `--ui-duration-normal`
65
+ - `--ui-ease-out`
66
+
67
+ ## Examples
68
+
69
+ ```vue
70
+ <Input v-model="email" type="email" />
71
+ ```
72
+
73
+ ```vue
74
+ <Input v-model="query" invalid aria-describedby="search-message">
75
+ <template #leading>
76
+ <IconSearch />
77
+ </template>
78
+ </Input>
79
+ ```
@@ -0,0 +1,13 @@
1
+ export const inputSizeValues = ["sm", "md", "lg"] as const;
2
+ export const inputTypeValues = [
3
+ "text",
4
+ "email",
5
+ "password",
6
+ "search",
7
+ "url",
8
+ "tel",
9
+ "number",
10
+ ] as const;
11
+
12
+ export type InputSize = (typeof inputSizeValues)[number];
13
+ export type InputType = (typeof inputTypeValues)[number];
@@ -0,0 +1,54 @@
1
+ import type { InputSize } from "./Input.types";
2
+
3
+ export const inputWrapperClass = "relative w-full";
4
+
5
+ export const inputBaseClass =
6
+ "flex w-full appearance-none items-center border bg-[var(--ui-surface)] " +
7
+ "text-[var(--ui-fg)] placeholder:text-[var(--ui-fg-muted)] " +
8
+ "transition-[box-shadow,border-color,background-color,color] " +
9
+ "duration-[var(--ui-duration-normal)] ease-[var(--ui-ease-out)] " +
10
+ "rounded-[var(--ui-radius-md)] border-[var(--ui-border)] " +
11
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-ring)] focus-visible:border-[var(--ui-primary)] " +
12
+ "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 " +
13
+ "read-only:cursor-default read-only:bg-[var(--ui-tonal-tertiary)]";
14
+
15
+ export const inputStateClasses = {
16
+ default: "hover:border-[var(--ui-primary-muted)]",
17
+ invalid:
18
+ "border-[var(--ui-critical)] text-[var(--ui-fg)] " +
19
+ "focus-visible:border-[var(--ui-critical)] focus-visible:ring-[var(--ui-critical-muted)]",
20
+ } as const;
21
+
22
+ export const inputSizeClasses: Record<InputSize, string> = {
23
+ sm: "h-9 px-3 text-sm",
24
+ md: "h-10 px-4 text-sm",
25
+ lg: "h-11 px-4 text-base",
26
+ };
27
+
28
+ export const inputPaddingWithLeading: Record<InputSize, string> = {
29
+ sm: "pl-9",
30
+ md: "pl-10",
31
+ lg: "pl-11",
32
+ };
33
+
34
+ export const inputPaddingWithTrailing: Record<InputSize, string> = {
35
+ sm: "pr-9",
36
+ md: "pr-10",
37
+ lg: "pr-11",
38
+ };
39
+
40
+ export const inputAdornmentBaseClass =
41
+ "pointer-events-none absolute top-1/2 inline-flex -translate-y-1/2 items-center justify-center text-[var(--ui-fg-muted)]";
42
+
43
+ export const inputAdornmentPositionClasses = {
44
+ leading: {
45
+ sm: "left-3 size-4",
46
+ md: "left-3 size-4",
47
+ lg: "left-4 size-5",
48
+ },
49
+ trailing: {
50
+ sm: "right-3 size-4",
51
+ md: "right-3 size-4",
52
+ lg: "right-4 size-5",
53
+ },
54
+ } as const;
@@ -0,0 +1,99 @@
1
+ <script setup lang="ts">
2
+ import { computed, normalizeClass, useAttrs, useSlots } from "vue";
3
+ import { twMerge } from "tailwind-merge";
4
+ import { inputProps } from "./Input.props";
5
+ import {
6
+ inputAdornmentBaseClass,
7
+ inputAdornmentPositionClasses,
8
+ inputBaseClass,
9
+ inputPaddingWithLeading,
10
+ inputPaddingWithTrailing,
11
+ inputSizeClasses,
12
+ inputStateClasses,
13
+ inputWrapperClass,
14
+ } from "./Input.variants";
15
+
16
+ defineOptions({ inheritAttrs: false });
17
+
18
+ const emit = defineEmits<{
19
+ "update:modelValue": [value: string];
20
+ blur: [event: FocusEvent];
21
+ focus: [event: FocusEvent];
22
+ }>();
23
+
24
+ const attrs = useAttrs();
25
+ const props = defineProps(inputProps);
26
+ const slots = useSlots();
27
+
28
+ const hasLeading = computed(() => Boolean(slots.leading));
29
+ const hasTrailing = computed(() => Boolean(slots.trailing));
30
+
31
+ const classes = computed(() =>
32
+ twMerge(
33
+ inputBaseClass,
34
+ inputSizeClasses[props.size],
35
+ props.invalid ? inputStateClasses.invalid : inputStateClasses.default,
36
+ hasLeading.value ? inputPaddingWithLeading[props.size] : "",
37
+ hasTrailing.value ? inputPaddingWithTrailing[props.size] : "",
38
+ normalizeClass(attrs.class),
39
+ ),
40
+ );
41
+
42
+ const inputAttrs = computed(() => {
43
+ const {
44
+ class: _class,
45
+ value: _value,
46
+ modelValue: _modelValue,
47
+ type: _type,
48
+ disabled: _disabled,
49
+ readonly: _readonly,
50
+ ...rest
51
+ } = attrs;
52
+
53
+ return rest;
54
+ });
55
+
56
+ function handleInput(event: Event) {
57
+ emit("update:modelValue", (event.target as HTMLInputElement).value);
58
+ }
59
+
60
+ function handleFocus(event: FocusEvent) {
61
+ emit("focus", event);
62
+ }
63
+
64
+ function handleBlur(event: FocusEvent) {
65
+ emit("blur", event);
66
+ }
67
+ </script>
68
+
69
+ <template>
70
+ <div :class="inputWrapperClass">
71
+ <span
72
+ v-if="$slots.leading"
73
+ :class="[inputAdornmentBaseClass, inputAdornmentPositionClasses.leading[props.size]]"
74
+ aria-hidden="true"
75
+ >
76
+ <slot name="leading" />
77
+ </span>
78
+ <input
79
+ :value="props.modelValue"
80
+ :type="props.type"
81
+ :class="classes"
82
+ :disabled="props.disabled"
83
+ :readonly="props.readonly"
84
+ :aria-invalid="props.invalid ? 'true' : undefined"
85
+ :data-invalid="props.invalid ? 'true' : 'false'"
86
+ v-bind="inputAttrs"
87
+ @input="handleInput"
88
+ @focus="handleFocus"
89
+ @blur="handleBlur"
90
+ />
91
+ <span
92
+ v-if="$slots.trailing"
93
+ :class="[inputAdornmentBaseClass, inputAdornmentPositionClasses.trailing[props.size]]"
94
+ aria-hidden="true"
95
+ >
96
+ <slot name="trailing" />
97
+ </span>
98
+ </div>
99
+ </template>
@@ -0,0 +1,25 @@
1
+ import type { PropType } from "vue";
2
+ import type { LabelSize } from "./Label.types";
3
+
4
+ export const labelProps = {
5
+ for: {
6
+ type: String,
7
+ default: undefined,
8
+ },
9
+ size: {
10
+ type: String as PropType<LabelSize>,
11
+ default: "md",
12
+ },
13
+ required: {
14
+ type: Boolean,
15
+ default: false,
16
+ },
17
+ disabled: {
18
+ type: Boolean,
19
+ default: false,
20
+ },
21
+ invalid: {
22
+ type: Boolean,
23
+ default: false,
24
+ },
25
+ };
@@ -0,0 +1,31 @@
1
+ # Label
2
+
3
+ ## Purpose
4
+
5
+ Shared field label primitive for form controls and field patterns.
6
+
7
+ ## Category
8
+
9
+ Primitive
10
+
11
+ ## Public API
12
+
13
+ Props:
14
+
15
+ - `for`: string
16
+ - `size`: `sm | md | lg`
17
+ - `required`: boolean
18
+ - `disabled`: boolean
19
+ - `invalid`: boolean
20
+
21
+ ## Accessibility
22
+
23
+ - uses native `<label>` semantics
24
+ - supports `for` linkage to form controls
25
+ - required indicator is visual only; field semantics should still be applied to the control itself
26
+
27
+ ## Examples
28
+
29
+ ```vue
30
+ <Label for="email" required>Email address</Label>
31
+ ```
@@ -0,0 +1,3 @@
1
+ export const labelSizeValues = ["sm", "md", "lg"] as const;
2
+
3
+ export type LabelSize = (typeof labelSizeValues)[number];
@@ -0,0 +1,17 @@
1
+ import type { LabelSize } from "./Label.types";
2
+
3
+ export const labelBaseClass = "inline-flex items-center gap-1 font-medium text-[var(--ui-fg)]";
4
+
5
+ export const labelStateClasses = {
6
+ default: "",
7
+ disabled: "opacity-50",
8
+ invalid: "text-[var(--ui-critical)]",
9
+ } as const;
10
+
11
+ export const labelSizeClasses: Record<LabelSize, string> = {
12
+ sm: "text-xs",
13
+ md: "text-sm",
14
+ lg: "text-base",
15
+ };
16
+
17
+ export const labelRequiredClass = "text-[var(--ui-critical)]";
@@ -0,0 +1,38 @@
1
+ <script setup lang="ts">
2
+ import { computed, normalizeClass, useAttrs } from "vue";
3
+ import { twMerge } from "tailwind-merge";
4
+ import { labelProps } from "./Label.props";
5
+ import {
6
+ labelBaseClass,
7
+ labelRequiredClass,
8
+ labelSizeClasses,
9
+ labelStateClasses,
10
+ } from "./Label.variants";
11
+
12
+ defineOptions({ inheritAttrs: false });
13
+
14
+ const attrs = useAttrs();
15
+ const props = defineProps(labelProps);
16
+
17
+ const classes = computed(() =>
18
+ twMerge(
19
+ labelBaseClass,
20
+ labelSizeClasses[props.size],
21
+ props.disabled ? labelStateClasses.disabled : "",
22
+ props.invalid ? labelStateClasses.invalid : labelStateClasses.default,
23
+ normalizeClass(attrs.class),
24
+ ),
25
+ );
26
+
27
+ const labelAttrs = computed(() => {
28
+ const { class: _class, ...rest } = attrs;
29
+ return rest;
30
+ });
31
+ </script>
32
+
33
+ <template>
34
+ <label :for="props.for" :class="classes" v-bind="labelAttrs">
35
+ <slot />
36
+ <span v-if="props.required" :class="labelRequiredClass" aria-hidden="true">*</span>
37
+ </label>
38
+ </template>
@@ -0,0 +1,17 @@
1
+ import type { PropType } from "vue";
2
+ import type { MenuItem, MenuPlacement } from "./Menu.types";
3
+
4
+ export const menuProps = {
5
+ items: {
6
+ type: Array as PropType<MenuItem[]>,
7
+ default: () => [],
8
+ },
9
+ placement: {
10
+ type: String as PropType<MenuPlacement>,
11
+ default: "bottom",
12
+ },
13
+ showArrow: {
14
+ type: Boolean,
15
+ default: true,
16
+ },
17
+ };
@@ -0,0 +1,38 @@
1
+ # Menu
2
+
3
+ ## Purpose
4
+
5
+ Anchored action list primitive for command and option selection.
6
+
7
+ ## Category
8
+
9
+ Primitive
10
+
11
+ ## Public API
12
+
13
+ Props:
14
+
15
+ - `open` via `v-model:open`
16
+ - `items`: `{ value?, label?, disabled?, type?: 'item' | 'separator' }[]`
17
+ - `placement`: `top | bottom | left | right`
18
+ - `showArrow`
19
+
20
+ Slots:
21
+
22
+ - `trigger`
23
+ - `item`
24
+
25
+ Events:
26
+
27
+ - `select`
28
+
29
+ ## Accessibility
30
+
31
+ - built on Ark menu semantics
32
+ - keyboard navigation and dismiss behavior come from Ark
33
+
34
+ ## Keyboard behavior
35
+
36
+ - arrow keys move between items
37
+ - Enter/Space select the highlighted item
38
+ - Escape closes the menu
@@ -0,0 +1,10 @@
1
+ export const menuPlacementValues = ["top", "bottom", "left", "right"] as const;
2
+
3
+ export type MenuPlacement = (typeof menuPlacementValues)[number];
4
+
5
+ export type MenuItem = {
6
+ disabled?: boolean;
7
+ label?: string;
8
+ type?: "item" | "separator";
9
+ value?: string;
10
+ };
@@ -0,0 +1,10 @@
1
+ export const menuPositionerClass = "z-50 px-2";
2
+ export const menuContentClass =
3
+ "min-w-48 rounded-[var(--ui-radius-lg)] border border-[var(--ui-border)] bg-[var(--ui-surface)] p-1 text-[var(--ui-fg)] shadow-[var(--ui-shadow-md)]";
4
+ export const menuArrowClass = "fill-[var(--ui-surface)] stroke-[var(--ui-border)] stroke-1";
5
+ export const menuItemClass =
6
+ "flex w-full items-center rounded-[var(--ui-radius-sm)] px-3 py-2 text-sm text-[var(--ui-fg)] " +
7
+ "transition-[background-color,color] duration-[var(--ui-duration-normal)] ease-[var(--ui-ease-out)] " +
8
+ "hover:bg-[var(--ui-tonal-secondary)] focus-visible:outline-none data-[highlighted]:bg-[var(--ui-tonal-secondary)] data-[highlighted]:text-[var(--ui-fg)] " +
9
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
10
+ export const menuSeparatorClass = "my-1 h-px bg-[var(--ui-border)]";
@@ -0,0 +1,57 @@
1
+ <script setup lang="ts">
2
+ import { Menu as ArkMenu } from "@ark-ui/vue/menu";
3
+ import { menuProps } from "./Menu.props";
4
+ import {
5
+ menuArrowClass,
6
+ menuContentClass,
7
+ menuItemClass,
8
+ menuPositionerClass,
9
+ menuSeparatorClass,
10
+ } from "./Menu.variants";
11
+ import type { MenuItem } from "./Menu.types";
12
+
13
+ const emit = defineEmits<{
14
+ select: [item: MenuItem];
15
+ }>();
16
+
17
+ const open = defineModel<boolean>("open", { default: false });
18
+ const props = defineProps(menuProps);
19
+
20
+ function handleSelect(item: MenuItem) {
21
+ emit("select", item);
22
+ }
23
+ </script>
24
+
25
+ <template>
26
+ <ArkMenu.Root
27
+ v-model:open="open"
28
+ :positioning="{ placement: props.placement }"
29
+ lazy-mount
30
+ unmount-on-exit
31
+ >
32
+ <ArkMenu.Trigger v-if="$slots.trigger" as-child>
33
+ <slot name="trigger" />
34
+ </ArkMenu.Trigger>
35
+ <ArkMenu.Positioner :class="menuPositionerClass">
36
+ <ArkMenu.Content :class="menuContentClass">
37
+ <ArkMenu.Arrow v-if="props.showArrow" :class="menuArrowClass">
38
+ <ArkMenu.ArrowTip />
39
+ </ArkMenu.Arrow>
40
+ <template v-for="(item, index) in props.items" :key="item.value ?? `separator-${index}`">
41
+ <ArkMenu.Separator v-if="item.type === 'separator'" :class="menuSeparatorClass" />
42
+ <ArkMenu.Item
43
+ v-else
44
+ :value="item.value ?? item.label ?? `item-${index}`"
45
+ :disabled="item.disabled"
46
+ :class="menuItemClass"
47
+ @select="handleSelect(item)"
48
+ >
49
+ <slot name="item" :item="item">
50
+ {{ item.label }}
51
+ </slot>
52
+ </ArkMenu.Item>
53
+ </template>
54
+ </ArkMenu.Content>
55
+ </ArkMenu.Positioner>
56
+ </ArkMenu.Root>
57
+ </template>
@@ -0,0 +1,25 @@
1
+ import type { PropType } from "vue";
2
+ import type { PopoverPlacement } from "./Popover.types";
3
+
4
+ export const popoverProps = {
5
+ title: {
6
+ type: String,
7
+ default: undefined,
8
+ },
9
+ description: {
10
+ type: String,
11
+ default: undefined,
12
+ },
13
+ placement: {
14
+ type: String as PropType<PopoverPlacement>,
15
+ default: "bottom",
16
+ },
17
+ showArrow: {
18
+ type: Boolean,
19
+ default: true,
20
+ },
21
+ showClose: {
22
+ type: Boolean,
23
+ default: false,
24
+ },
25
+ };
@@ -0,0 +1,49 @@
1
+ # Popover
2
+
3
+ ## Purpose
4
+
5
+ Anchored overlay primitive for non-modal contextual content.
6
+
7
+ ## Category
8
+
9
+ Primitive
10
+
11
+ ## Public API
12
+
13
+ Props:
14
+
15
+ - `open` via `v-model:open`
16
+ - `title`
17
+ - `description`
18
+ - `placement`: `top | bottom | left | right`
19
+ - `showArrow`
20
+ - `showClose`
21
+
22
+ Slots:
23
+
24
+ - `trigger`
25
+ - `header`
26
+ - default content
27
+ - `footer`
28
+
29
+ ## Accessibility
30
+
31
+ - built on Ark popover semantics
32
+ - supports anchored positioning and dismiss behavior
33
+ - title and description are wired when provided
34
+
35
+ ## Keyboard behavior
36
+
37
+ - trigger remains the anchor point
38
+ - Escape closes the popover
39
+
40
+ ## Example
41
+
42
+ ```vue
43
+ <Popover title="Shortcuts">
44
+ <template #trigger>
45
+ <Button variant="plain-secondary">Help</Button>
46
+ </template>
47
+ Press <kbd>?</kbd> to open the command menu.
48
+ </Popover>
49
+ ```
@@ -0,0 +1,3 @@
1
+ export const popoverPlacementValues = ["top", "bottom", "left", "right"] as const;
2
+
3
+ export type PopoverPlacement = (typeof popoverPlacementValues)[number];
@@ -0,0 +1,18 @@
1
+ export const popoverPositionerClass = "z-50 px-2";
2
+ export const popoverContentClass =
3
+ "w-full min-w-56 max-w-sm rounded-[var(--ui-radius-lg)] border border-[var(--ui-border)] " +
4
+ "bg-[var(--ui-surface)] text-[var(--ui-fg)] shadow-[var(--ui-shadow-md)] " +
5
+ "focus-visible:outline-none";
6
+ export const popoverHeaderClass =
7
+ "flex items-start justify-between gap-3 border-b border-[var(--ui-border)] px-4 py-3";
8
+ export const popoverTitleClass = "text-sm font-semibold text-[var(--ui-fg)]";
9
+ export const popoverDescriptionClass = "mt-1 text-sm text-[var(--ui-fg-muted)]";
10
+ export const popoverBodyClass = "px-4 py-3";
11
+ export const popoverFooterClass =
12
+ "flex items-center justify-end gap-3 border-t border-[var(--ui-border)] px-4 py-3";
13
+ export const popoverCloseClass =
14
+ "inline-flex size-8 items-center justify-center rounded-[var(--ui-radius-sm)] border border-[var(--ui-border)] " +
15
+ "text-[var(--ui-fg-muted)] transition-[border-color,background-color,color] duration-[var(--ui-duration-normal)] ease-[var(--ui-ease-out)] " +
16
+ "hover:border-[var(--ui-primary-muted)] hover:bg-[var(--ui-tonal-secondary)] hover:text-[var(--ui-fg)] " +
17
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-ring)]";
18
+ export const popoverArrowClass = "fill-[var(--ui-surface)] stroke-[var(--ui-border)] stroke-1";