@adres/mgda-ui 0.0.0-stage → 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 (325) hide show
  1. package/brand-knowledge.json +451 -0
  2. package/knowledge/accordion.md +135 -0
  3. package/knowledge/activity-rings.md +123 -0
  4. package/knowledge/alert.md +184 -0
  5. package/knowledge/answer-actions.md +217 -0
  6. package/knowledge/aspect-ratio.md +82 -0
  7. package/knowledge/avatar.md +158 -0
  8. package/knowledge/badge.md +172 -0
  9. package/knowledge/bar-graph.md +167 -0
  10. package/knowledge/bento-grid.md +115 -0
  11. package/knowledge/blockquote.md +153 -0
  12. package/knowledge/box-list.md +177 -0
  13. package/knowledge/bullet-list.md +128 -0
  14. package/knowledge/button-group.md +179 -0
  15. package/knowledge/button.md +231 -0
  16. package/knowledge/calendar.md +168 -0
  17. package/knowledge/card.md +321 -0
  18. package/knowledge/cards-nav.md +170 -0
  19. package/knowledge/chain-of-thought.md +164 -0
  20. package/knowledge/chat-container.md +135 -0
  21. package/knowledge/chat-message.md +224 -0
  22. package/knowledge/checkbox-card.md +172 -0
  23. package/knowledge/checkbox.md +111 -0
  24. package/knowledge/citations.md +241 -0
  25. package/knowledge/combobox.md +265 -0
  26. package/knowledge/countdown-pill.md +153 -0
  27. package/knowledge/cta.md +118 -0
  28. package/knowledge/data-list.md +173 -0
  29. package/knowledge/data-table.md +220 -0
  30. package/knowledge/dialog.md +249 -0
  31. package/knowledge/drawer.md +236 -0
  32. package/knowledge/dropdown-menu.md +238 -0
  33. package/knowledge/dropzone.md +153 -0
  34. package/knowledge/email-chips-input.md +161 -0
  35. package/knowledge/empty-state.md +106 -0
  36. package/knowledge/entity-header.md +166 -0
  37. package/knowledge/feature-grid.md +120 -0
  38. package/knowledge/feedback-bar.md +127 -0
  39. package/knowledge/footer.md +116 -0
  40. package/knowledge/heading.md +189 -0
  41. package/knowledge/hero.md +361 -0
  42. package/knowledge/input-button.md +187 -0
  43. package/knowledge/input-group.md +185 -0
  44. package/knowledge/input.md +256 -0
  45. package/knowledge/inset.md +177 -0
  46. package/knowledge/kpi-card.md +206 -0
  47. package/knowledge/list-nav.md +181 -0
  48. package/knowledge/logo-cloud.md +102 -0
  49. package/knowledge/media-gallery.md +158 -0
  50. package/knowledge/message-actions.md +175 -0
  51. package/knowledge/nav-sidebar.md +225 -0
  52. package/knowledge/number-stepper.md +159 -0
  53. package/knowledge/page-header.md +109 -0
  54. package/knowledge/pagination.md +225 -0
  55. package/knowledge/popover.md +159 -0
  56. package/knowledge/pricing.md +132 -0
  57. package/knowledge/progress.md +156 -0
  58. package/knowledge/prompt-input.md +337 -0
  59. package/knowledge/prompt-suggestions.md +168 -0
  60. package/knowledge/quota-bar.md +160 -0
  61. package/knowledge/quote.md +116 -0
  62. package/knowledge/radio-card.md +172 -0
  63. package/knowledge/radio-group.md +135 -0
  64. package/knowledge/reasoning.md +142 -0
  65. package/knowledge/search.md +131 -0
  66. package/knowledge/section-nav.md +162 -0
  67. package/knowledge/segmented-control.md +181 -0
  68. package/knowledge/select-button.md +205 -0
  69. package/knowledge/select.md +210 -0
  70. package/knowledge/separator.md +75 -0
  71. package/knowledge/shimmer-text.md +140 -0
  72. package/knowledge/sidebar.md +227 -0
  73. package/knowledge/skeleton.md +142 -0
  74. package/knowledge/slider.md +133 -0
  75. package/knowledge/slideshow.md +159 -0
  76. package/knowledge/source.md +156 -0
  77. package/knowledge/spinner.md +120 -0
  78. package/knowledge/stat-strip.md +128 -0
  79. package/knowledge/stats.md +117 -0
  80. package/knowledge/step-indicator.md +157 -0
  81. package/knowledge/switch.md +88 -0
  82. package/knowledge/table.md +190 -0
  83. package/knowledge/tabs.md +169 -0
  84. package/knowledge/testimonials.md +115 -0
  85. package/knowledge/text-link.md +192 -0
  86. package/knowledge/text.md +194 -0
  87. package/knowledge/thinking-bar.md +115 -0
  88. package/knowledge/thinking-steps.md +140 -0
  89. package/knowledge/toaster.md +127 -0
  90. package/knowledge/toggle.md +113 -0
  91. package/knowledge/tool-call-card.md +241 -0
  92. package/knowledge/tooltip.md +120 -0
  93. package/knowledge/top-nav.md +138 -0
  94. package/knowledge.json +19854 -0
  95. package/package.json +94 -4
  96. package/src/components/accordion.stories.tsx +46 -0
  97. package/src/components/accordion.tsx +74 -0
  98. package/src/components/activity-rings.stories.tsx +73 -0
  99. package/src/components/activity-rings.tsx +121 -0
  100. package/src/components/alert.stories.tsx +43 -0
  101. package/src/components/alert.tsx +132 -0
  102. package/src/components/answer-actions.stories.tsx +54 -0
  103. package/src/components/answer-actions.test.tsx +37 -0
  104. package/src/components/answer-actions.tsx +313 -0
  105. package/src/components/aspect-ratio.stories.tsx +32 -0
  106. package/src/components/aspect-ratio.tsx +5 -0
  107. package/src/components/avatar.stories.tsx +40 -0
  108. package/src/components/avatar.tsx +154 -0
  109. package/src/components/badge.stories.tsx +27 -0
  110. package/src/components/badge.tsx +63 -0
  111. package/src/components/bar-graph.stories.tsx +28 -0
  112. package/src/components/bar-graph.tsx +204 -0
  113. package/src/components/bento-grid.stories.tsx +23 -0
  114. package/src/components/bento-grid.tsx +67 -0
  115. package/src/components/blockquote.stories.tsx +28 -0
  116. package/src/components/blockquote.tsx +88 -0
  117. package/src/components/box-list.stories.tsx +25 -0
  118. package/src/components/box-list.tsx +108 -0
  119. package/src/components/bullet-list.stories.tsx +22 -0
  120. package/src/components/bullet-list.tsx +101 -0
  121. package/src/components/button-group.stories.tsx +31 -0
  122. package/src/components/button-group.tsx +156 -0
  123. package/src/components/button.stories.tsx +66 -0
  124. package/src/components/button.test.ts +17 -0
  125. package/src/components/button.tsx +139 -0
  126. package/src/components/calendar.stories.tsx +25 -0
  127. package/src/components/calendar.tsx +367 -0
  128. package/src/components/card.stories.tsx +44 -0
  129. package/src/components/card.tsx +392 -0
  130. package/src/components/cards-nav.stories.tsx +35 -0
  131. package/src/components/cards-nav.tsx +115 -0
  132. package/src/components/chain-of-thought.stories.tsx +67 -0
  133. package/src/components/chain-of-thought.test.tsx +50 -0
  134. package/src/components/chain-of-thought.tsx +170 -0
  135. package/src/components/chat-container.stories.tsx +47 -0
  136. package/src/components/chat-container.test.tsx +49 -0
  137. package/src/components/chat-container.tsx +222 -0
  138. package/src/components/chat-message.stories.tsx +52 -0
  139. package/src/components/chat-message.test.tsx +36 -0
  140. package/src/components/chat-message.tsx +163 -0
  141. package/src/components/checkbox-card.stories.tsx +27 -0
  142. package/src/components/checkbox-card.tsx +200 -0
  143. package/src/components/checkbox.stories.tsx +26 -0
  144. package/src/components/checkbox.tsx +61 -0
  145. package/src/components/citations.stories.tsx +64 -0
  146. package/src/components/citations.test.tsx +61 -0
  147. package/src/components/citations.tsx +220 -0
  148. package/src/components/combobox.stories.tsx +184 -0
  149. package/src/components/combobox.test.tsx +82 -0
  150. package/src/components/combobox.tsx +407 -0
  151. package/src/components/countdown-pill.stories.tsx +24 -0
  152. package/src/components/countdown-pill.tsx +129 -0
  153. package/src/components/cta.stories.tsx +29 -0
  154. package/src/components/cta.tsx +52 -0
  155. package/src/components/data-list.stories.tsx +50 -0
  156. package/src/components/data-list.test.tsx +35 -0
  157. package/src/components/data-list.tsx +181 -0
  158. package/src/components/data-table.stories.tsx +29 -0
  159. package/src/components/data-table.tsx +200 -0
  160. package/src/components/dialog.stories.tsx +42 -0
  161. package/src/components/dialog.tsx +200 -0
  162. package/src/components/drawer.stories.tsx +48 -0
  163. package/src/components/drawer.tsx +385 -0
  164. package/src/components/dropdown-menu.stories.tsx +41 -0
  165. package/src/components/dropdown-menu.tsx +252 -0
  166. package/src/components/dropzone.stories.tsx +19 -0
  167. package/src/components/dropzone.tsx +250 -0
  168. package/src/components/email-chips-input.stories.tsx +135 -0
  169. package/src/components/email-chips-input.tsx +210 -0
  170. package/src/components/empty-state.stories.tsx +22 -0
  171. package/src/components/empty-state.tsx +35 -0
  172. package/src/components/entity-header.stories.tsx +43 -0
  173. package/src/components/entity-header.test.tsx +35 -0
  174. package/src/components/entity-header.tsx +92 -0
  175. package/src/components/feature-grid.stories.tsx +25 -0
  176. package/src/components/feature-grid.tsx +87 -0
  177. package/src/components/feedback-bar.stories.tsx +25 -0
  178. package/src/components/feedback-bar.test.tsx +24 -0
  179. package/src/components/feedback-bar.tsx +62 -0
  180. package/src/components/footer.stories.tsx +23 -0
  181. package/src/components/footer.tsx +78 -0
  182. package/src/components/heading.stories.tsx +45 -0
  183. package/src/components/heading.test.tsx +22 -0
  184. package/src/components/heading.tsx +77 -0
  185. package/src/components/hero.stories.tsx +38 -0
  186. package/src/components/hero.tsx +498 -0
  187. package/src/components/input-button.stories.tsx +19 -0
  188. package/src/components/input-button.tsx +112 -0
  189. package/src/components/input-group.stories.tsx +38 -0
  190. package/src/components/input-group.tsx +157 -0
  191. package/src/components/input.stories.tsx +31 -0
  192. package/src/components/input.tsx +284 -0
  193. package/src/components/inset.stories.tsx +29 -0
  194. package/src/components/inset.tsx +70 -0
  195. package/src/components/kpi-card.stories.tsx +29 -0
  196. package/src/components/kpi-card.tsx +284 -0
  197. package/src/components/list-nav.stories.tsx +22 -0
  198. package/src/components/list-nav.tsx +145 -0
  199. package/src/components/logo-cloud.stories.tsx +23 -0
  200. package/src/components/logo-cloud.tsx +42 -0
  201. package/src/components/media-gallery.stories.tsx +25 -0
  202. package/src/components/media-gallery.tsx +347 -0
  203. package/src/components/message-actions.stories.tsx +45 -0
  204. package/src/components/message-actions.test.tsx +32 -0
  205. package/src/components/message-actions.tsx +119 -0
  206. package/src/components/nav-sidebar.stories.tsx +58 -0
  207. package/src/components/nav-sidebar.test.tsx +54 -0
  208. package/src/components/nav-sidebar.tsx +462 -0
  209. package/src/components/number-stepper.stories.tsx +19 -0
  210. package/src/components/number-stepper.tsx +158 -0
  211. package/src/components/page-header.stories.tsx +25 -0
  212. package/src/components/page-header.tsx +64 -0
  213. package/src/components/pagination.stories.tsx +110 -0
  214. package/src/components/pagination.test.tsx +46 -0
  215. package/src/components/pagination.tsx +144 -0
  216. package/src/components/popover.stories.tsx +26 -0
  217. package/src/components/popover.tsx +62 -0
  218. package/src/components/pricing.stories.tsx +42 -0
  219. package/src/components/pricing.tsx +130 -0
  220. package/src/components/progress.stories.tsx +22 -0
  221. package/src/components/progress.tsx +189 -0
  222. package/src/components/prompt-input.stories.tsx +62 -0
  223. package/src/components/prompt-input.test.tsx +106 -0
  224. package/src/components/prompt-input.tsx +343 -0
  225. package/src/components/prompt-suggestions.stories.tsx +53 -0
  226. package/src/components/prompt-suggestions.test.tsx +37 -0
  227. package/src/components/prompt-suggestions.tsx +122 -0
  228. package/src/components/quota-bar.stories.tsx +19 -0
  229. package/src/components/quota-bar.tsx +191 -0
  230. package/src/components/quote.stories.tsx +18 -0
  231. package/src/components/quote.tsx +43 -0
  232. package/src/components/radio-card.stories.tsx +27 -0
  233. package/src/components/radio-card.tsx +225 -0
  234. package/src/components/radio-group.stories.tsx +32 -0
  235. package/src/components/radio-group.tsx +68 -0
  236. package/src/components/reasoning.stories.tsx +50 -0
  237. package/src/components/reasoning.test.tsx +48 -0
  238. package/src/components/reasoning.tsx +143 -0
  239. package/src/components/search.stories.tsx +18 -0
  240. package/src/components/search.tsx +133 -0
  241. package/src/components/section-nav.stories.tsx +59 -0
  242. package/src/components/section-nav.test.tsx +36 -0
  243. package/src/components/section-nav.tsx +146 -0
  244. package/src/components/segmented-control.stories.tsx +22 -0
  245. package/src/components/segmented-control.tsx +301 -0
  246. package/src/components/select-button.stories.tsx +27 -0
  247. package/src/components/select-button.tsx +174 -0
  248. package/src/components/select.stories.tsx +27 -0
  249. package/src/components/select.tsx +198 -0
  250. package/src/components/separator.stories.tsx +22 -0
  251. package/src/components/separator.tsx +23 -0
  252. package/src/components/shimmer-text.stories.tsx +23 -0
  253. package/src/components/shimmer-text.test.tsx +35 -0
  254. package/src/components/shimmer-text.tsx +43 -0
  255. package/src/components/sidebar.stories.tsx +25 -0
  256. package/src/components/sidebar.tsx +234 -0
  257. package/src/components/skeleton.stories.tsx +22 -0
  258. package/src/components/skeleton.tsx +96 -0
  259. package/src/components/slider.stories.tsx +20 -0
  260. package/src/components/slider.tsx +176 -0
  261. package/src/components/slideshow.stories.tsx +30 -0
  262. package/src/components/slideshow.tsx +291 -0
  263. package/src/components/source.stories.tsx +32 -0
  264. package/src/components/source.test.tsx +40 -0
  265. package/src/components/source.tsx +161 -0
  266. package/src/components/spinner.stories.tsx +19 -0
  267. package/src/components/spinner.tsx +76 -0
  268. package/src/components/stat-strip.stories.tsx +36 -0
  269. package/src/components/stat-strip.test.tsx +25 -0
  270. package/src/components/stat-strip.tsx +85 -0
  271. package/src/components/stats.stories.tsx +24 -0
  272. package/src/components/stats.tsx +83 -0
  273. package/src/components/step-indicator.stories.tsx +18 -0
  274. package/src/components/step-indicator.test.tsx +18 -0
  275. package/src/components/step-indicator.tsx +286 -0
  276. package/src/components/switch.stories.tsx +26 -0
  277. package/src/components/switch.tsx +32 -0
  278. package/src/components/table.stories.tsx +38 -0
  279. package/src/components/table.tsx +220 -0
  280. package/src/components/tabs.stories.tsx +25 -0
  281. package/src/components/tabs.tsx +276 -0
  282. package/src/components/testimonials.stories.tsx +22 -0
  283. package/src/components/testimonials.tsx +109 -0
  284. package/src/components/text-link.stories.tsx +47 -0
  285. package/src/components/text-link.test.tsx +18 -0
  286. package/src/components/text-link.tsx +88 -0
  287. package/src/components/text.stories.tsx +49 -0
  288. package/src/components/text.tsx +105 -0
  289. package/src/components/thinking-bar.stories.tsx +19 -0
  290. package/src/components/thinking-bar.test.tsx +27 -0
  291. package/src/components/thinking-bar.tsx +64 -0
  292. package/src/components/thinking-steps.stories.tsx +44 -0
  293. package/src/components/thinking-steps.test.tsx +42 -0
  294. package/src/components/thinking-steps.tsx +92 -0
  295. package/src/components/toaster.stories.tsx +80 -0
  296. package/src/components/toaster.tsx +36 -0
  297. package/src/components/toggle.stories.tsx +21 -0
  298. package/src/components/toggle.tsx +103 -0
  299. package/src/components/tool-call-card.stories.tsx +97 -0
  300. package/src/components/tool-call-card.test.tsx +88 -0
  301. package/src/components/tool-call-card.tsx +231 -0
  302. package/src/components/tooltip.stories.tsx +25 -0
  303. package/src/components/tooltip.tsx +43 -0
  304. package/src/components/top-nav.stories.tsx +20 -0
  305. package/src/components/top-nav.tsx +76 -0
  306. package/src/docs/Colors.stories.tsx +192 -0
  307. package/src/docs/GettingStarted.mdx +72 -0
  308. package/src/docs/Mcp.mdx +52 -0
  309. package/src/docs/Typography.stories.tsx +114 -0
  310. package/src/hooks/use-in-view.ts +32 -0
  311. package/src/hooks/use-reduced-motion.ts +26 -0
  312. package/src/index.ts +343 -0
  313. package/src/lib/cn.test.ts +67 -0
  314. package/src/lib/cn.ts +81 -0
  315. package/src/lib/motion.ts +109 -0
  316. package/src/lib/prefix-utilities.test.ts +56 -0
  317. package/src/lib/prefix-utilities.ts +50 -0
  318. package/src/styles/base.css +489 -0
  319. package/src/styles/motion.css +69 -0
  320. package/src/styles/overrides.css +44 -0
  321. package/src/styles/typography.css +173 -0
  322. package/src/theme/theme.css +391 -0
  323. package/src/theme/tokens.ts +29 -0
  324. package/src/theme/types.ts +26 -0
  325. package/README.md +0 -3
@@ -0,0 +1,187 @@
1
+ ---
2
+ # >>> DERIVED - regenerated by `npm run knowledge:sync`. Do not edit. <<<
3
+ derived:
4
+ schemaVersion: 1
5
+ id: input-button
6
+ sourceFile: packages/design-system/src/components/input-button.tsx
7
+ client: true
8
+ category: web-app-form-controls
9
+ categoryFromBarrel: web-app-form-controls
10
+ barrelExported: true
11
+ importPath: "@adres/mgda-ui"
12
+ exports:
13
+ - name: InputButton
14
+ kind: component
15
+ typeText: "ForwardRefExoticComponent<InputButtonProps & RefAttributes<HTMLInputElement>>"
16
+ - name: InputButtonProps
17
+ kind: type
18
+ - name: InputButtonSize
19
+ kind: type
20
+ - name: InputButtonVariant
21
+ kind: type
22
+ primaryExport: InputButton
23
+ subcomponents: []
24
+ props:
25
+ InputButton:
26
+ - name: buttonClassName
27
+ type: string
28
+ required: false
29
+ declaredIn: self
30
+ doc: "Extra className appended to the inner Button."
31
+ - name: buttonDisabled
32
+ type: boolean
33
+ required: false
34
+ declaredIn: self
35
+ - name: buttonLabel
36
+ type: ReactNode
37
+ required: true
38
+ declaredIn: self
39
+ - name: buttonType
40
+ type: "\"button\" | \"reset\" | \"submit\""
41
+ required: false
42
+ declaredIn: self
43
+ - name: className
44
+ type: string
45
+ required: false
46
+ declaredIn: self
47
+ doc: "className for the wrapping group (the input fills the remaining width)."
48
+ - name: inputClassName
49
+ type: string
50
+ required: false
51
+ declaredIn: self
52
+ doc: "Extra className appended to the inner Input."
53
+ - name: invalid
54
+ type: boolean
55
+ required: false
56
+ declaredIn: input
57
+ - name: onButtonClick
58
+ type: "MouseEventHandler<HTMLButtonElement>"
59
+ required: false
60
+ declaredIn: self
61
+ - name: size
62
+ type: InputSize
63
+ required: false
64
+ declaredIn: self
65
+ doc: "Shared height/typography ladder - matches Button, Input, Select."
66
+ - name: variant
67
+ type: InputButtonVariant
68
+ required: false
69
+ declaredIn: self
70
+ doc: "Visual treatment of the right-hand action button."
71
+ extendsProps:
72
+ - "Omit<InputProps, \"size\">"
73
+ variants:
74
+ size:
75
+ kind: enum
76
+ options:
77
+ - sm
78
+ - md
79
+ - lg
80
+ default: md
81
+ on: InputButton
82
+ variant:
83
+ kind: enum
84
+ options:
85
+ - primary
86
+ - secondary
87
+ - outline
88
+ default: primary
89
+ on: InputButton
90
+ buttonType:
91
+ kind: enum
92
+ options:
93
+ - button
94
+ - submit
95
+ - reset
96
+ default: button
97
+ on: InputButton
98
+ variantSource: prop-union
99
+ compoundVariants: []
100
+ sizeMaps: []
101
+ dataSlots:
102
+ - input-button
103
+ dependsOn:
104
+ internal:
105
+ - button
106
+ - input
107
+ lib:
108
+ - cn
109
+ hooks: []
110
+ external:
111
+ - react
112
+ contexts: []
113
+ stories:
114
+ - exportName: Default
115
+ id: components-inputbutton--default
116
+ storybookTitle: Components/InputButton
117
+ docsId: components-inputbutton--documentation
118
+ argTypeOptions: {}
119
+ resolvedCleanly: true
120
+ contractHash: f53f637fadd9
121
+ factsHash: "894c989301af"
122
+ # >>> AUTHORED - humans own everything below this line. <<<
123
+ status: stable
124
+ summary: "A free-text Input and a commit-action Button joined into one inline composite control, sharing a single height."
125
+ useWhen:
126
+ - "a text field needs an adjacent commit action - a search box with a Search button, or free-text entry plus Apply/Submit"
127
+ useInstead:
128
+ - id: select-button
129
+ when: "the left half should be a fixed list of options rather than free text"
130
+ - id: search
131
+ when: "there is no separate commit button - Search already includes its own icon and clear affordance inline"
132
+ related:
133
+ - select-button
134
+ - search
135
+ a11y:
136
+ notes:
137
+ - "disabled disables both halves at once; use buttonDisabled to disable only the action button while the input stays editable."
138
+ - "All standard input attributes (value, onChange, placeholder, name, aria-*, and so on) forward straight to the inner Input, so the field keeps normal form semantics despite the composite wrapper."
139
+ keyboard:
140
+ - "Tab moves between the input and the button independently, since they are two separate focusable controls in the DOM despite the joined visual pill."
141
+ radixHandles: false
142
+ pitfalls:
143
+ - "variant excludes ghost, accent, destructive, and link, mirroring SelectButton - only primary/secondary/outline fit the joined-pill visual."
144
+ - "disabled and buttonDisabled are independent - disabled turns off the whole control (input and button), while buttonDisabled leaves the input editable and only disables the button."
145
+ - "value, onChange, and placeholder are all real, forwarded Input props, but the extractor recorded this file's extends clause as Omit<InputProps, \"size\">, a local type alias rather than a raw HTML attributes type - it does not match the pattern the validator uses to recognize inherited DOM props. The machine-checked canonicalSnippet below omits them for that reason; see the fuller example in ## Usage."
146
+ canonicalSnippet: |
147
+ import { InputButton } from "@adres/mgda-ui"
148
+
149
+ <InputButton
150
+ size="md"
151
+ buttonType="submit"
152
+ buttonLabel="Search"
153
+ onButtonClick={handleSearch}
154
+ onChange={(e) => setValue(e.target.value)}
155
+ />
156
+ reviewedAt: 2026-08-31
157
+ reviewedAgainstContractHash: f53f637fadd9
158
+ ---
159
+
160
+ ## Usage
161
+
162
+ `InputButton` joins a free-text `Input` and a commit-action `Button` into one
163
+ visual pill - the sibling of `SelectButton`, but for text entry instead of a
164
+ fixed list. Reach for `SelectButton` when the left half should be a list of
165
+ options, and plain `Search` when there is no separate commit button (it
166
+ already includes its own icon and clear affordance inline).
167
+
168
+ `size` scales both halves together and matches `Button`/`Input`/`Select`'s
169
+ own height ladder. `variant` only applies to the right-hand button and is
170
+ restricted to `primary`/`secondary`/`outline`, the same restriction
171
+ `SelectButton` uses.
172
+
173
+ All standard input attributes forward straight to the inner `Input`,
174
+ including `value`, `onChange`, and `placeholder` - they just cannot appear in
175
+ this file's machine-checked `canonicalSnippet` above (see the pitfall on
176
+ why). The real, recommended usage:
177
+
178
+ ```tsx
179
+ <InputButton
180
+ size="md"
181
+ placeholder="e.g. AUH-100482"
182
+ value={value}
183
+ onChange={(e) => setValue(e.target.value)}
184
+ buttonType="submit"
185
+ buttonLabel="Search"
186
+ />
187
+ ```
@@ -0,0 +1,185 @@
1
+ ---
2
+ # >>> DERIVED - regenerated by `npm run knowledge:sync`. Do not edit. <<<
3
+ derived:
4
+ schemaVersion: 1
5
+ id: input-group
6
+ sourceFile: packages/design-system/src/components/input-group.tsx
7
+ client: true
8
+ category: uncategorized
9
+ categoryFromBarrel: null
10
+ barrelExported: false
11
+ importPath: "@adres/mgda-ui/components/input-group"
12
+ exports:
13
+ - name: InputGroup
14
+ kind: component
15
+ typeText: "ForwardRefExoticComponent<InputGroupProps & RefAttributes<HTMLInputElement>>"
16
+ - name: InputGroupProps
17
+ kind: type
18
+ - name: InputGroupSize
19
+ kind: type
20
+ primaryExport: InputGroup
21
+ subcomponents: []
22
+ props:
23
+ InputGroup:
24
+ - name: children
25
+ type: ReactNode
26
+ required: true
27
+ declaredIn: self
28
+ doc: "SelectItem (and SelectLabel/SelectSeparator) children for the popover."
29
+ - name: className
30
+ type: string
31
+ required: false
32
+ declaredIn: self
33
+ doc: "className for the wrapping group (the input fills the remaining width)."
34
+ - name: inputClassName
35
+ type: string
36
+ required: false
37
+ declaredIn: self
38
+ doc: "Extra className appended to the inner Input."
39
+ - name: invalid
40
+ type: boolean
41
+ required: false
42
+ declaredIn: input
43
+ - name: onSelectValueChange
44
+ type: "((value: string) => void)"
45
+ required: false
46
+ declaredIn: self
47
+ - name: selectClassName
48
+ type: string
49
+ required: false
50
+ declaredIn: self
51
+ doc: "Extra className appended to the select trigger."
52
+ - name: selectDefaultValue
53
+ type: string
54
+ required: false
55
+ declaredIn: self
56
+ - name: selectDisabled
57
+ type: boolean
58
+ required: false
59
+ declaredIn: self
60
+ doc: "Disables only the select half. `disabled` (inherited from InputProps) disables both."
61
+ - name: selectName
62
+ type: string
63
+ required: false
64
+ declaredIn: self
65
+ - name: selectPlaceholder
66
+ type: string
67
+ required: false
68
+ declaredIn: self
69
+ - name: selectValue
70
+ type: string
71
+ required: false
72
+ declaredIn: self
73
+ - name: size
74
+ type: InputGroupSize
75
+ required: false
76
+ declaredIn: self
77
+ doc: "Shared height/typography ladder - matches Button, Input, Select, InputButton, SelectButton."
78
+ variantKey: true
79
+ extendsProps:
80
+ - "Omit<InputProps, \"size\">"
81
+ variants:
82
+ size:
83
+ kind: enum
84
+ options:
85
+ - sm
86
+ - md
87
+ - lg
88
+ default: md
89
+ on: InputGroup
90
+ variantSource: tv
91
+ compoundVariants: []
92
+ sizeMaps: []
93
+ dataSlots:
94
+ - input-group
95
+ dependsOn:
96
+ internal:
97
+ - input
98
+ - select
99
+ lib:
100
+ - cn
101
+ hooks: []
102
+ external:
103
+ - "@radix-ui/react-select"
104
+ - lucide-react
105
+ - react
106
+ - tailwind-variants
107
+ contexts: []
108
+ stories:
109
+ - exportName: Default
110
+ id: components-inputgroup--default
111
+ - exportName: Sizes
112
+ id: components-inputgroup--sizes
113
+ storybookTitle: Components/InputGroup
114
+ docsId: components-inputgroup--documentation
115
+ argTypeOptions: {}
116
+ resolvedCleanly: true
117
+ contractHash: "4e29e3ec5a4b"
118
+ factsHash: "04c0e03ce79c"
119
+ # >>> AUTHORED - humans own everything below this line. <<<
120
+ status: stable
121
+ summary: "A Select + Input joined into a single inline field, e.g. a title-select paired with a name field or a country-code paired with a phone number."
122
+ useWhen:
123
+ - "two related fields (a short select and a free-text input) should read and submit as one visual control"
124
+ - "a title/prefix select (Mr./Ms./Dr.) needs to sit directly against a name or free-text field"
125
+ - "a country-code select needs to sit directly against a phone-number input"
126
+ useInstead:
127
+ - id: input-button
128
+ when: "the joined control pairs an Input with an action Button, not a Select"
129
+ - id: select-button
130
+ when: "the joined control pairs a Select with an action Button, not an Input"
131
+ - id: select
132
+ when: "only the select half is needed, with no adjoining input"
133
+ related:
134
+ - input-button
135
+ - select-button
136
+ - select
137
+ composesWith:
138
+ - select
139
+ a11y:
140
+ notes:
141
+ - "The select half has no visible label by itself - pair the whole group with a `<label>` describing the combined field (e.g. \"Name\"), and rely on selectPlaceholder for the select's own accessible hint."
142
+ - "disabled disables both halves; use selectDisabled to disable only the select while keeping the input editable."
143
+ radixHandles: true
144
+ pitfalls:
145
+ - "disabled (inherited from InputProps) disables BOTH the select and the input - use selectDisabled if you only want to lock the select half."
146
+ - "size on InputGroup only accepts sm/md/lg and is separate from Input's own size prop - InputGroup already forwards the resolved size to the inner Input, so don't also pass size to children."
147
+ - "children must be SelectItem (and SelectLabel/SelectSeparator) elements for the popover, not arbitrary content - the input half has no children slot of its own."
148
+ canonicalSnippet: |
149
+ import { InputGroup } from "@adres/mgda-ui/components/input-group"
150
+ import { SelectItem } from "@adres/mgda-ui"
151
+
152
+ <InputGroup
153
+ size="md"
154
+ selectPlaceholder="Title"
155
+ selectDefaultValue="mr"
156
+ onSelectValueChange={setTitle}
157
+ onChange={(e) => setName(e.target.value)}
158
+ >
159
+ <SelectItem value="mr">Mr.</SelectItem>
160
+ <SelectItem value="ms">Ms.</SelectItem>
161
+ </InputGroup>
162
+ reviewedAt: 2026-09-01
163
+ reviewedAgainstContractHash: "4e29e3ec5a4b"
164
+ ---
165
+
166
+ ## Usage
167
+
168
+ `InputGroup` joins a `Select` trigger and an `Input` into one visually
169
+ continuous pill, the same joined-composite family as `InputButton` (Input +
170
+ Button) and `SelectButton` (Select + Button). Reach for it when two related
171
+ fields - most often a short prefix select and a free-text field, like a
172
+ title/name pair or a country-code/phone-number pair - should read as a single
173
+ control instead of two separate ones.
174
+
175
+ Select-half props are prefixed (`selectValue`, `selectDefaultValue`,
176
+ `onSelectValueChange`, `selectPlaceholder`, `selectName`, `selectDisabled`,
177
+ `selectClassName`) so they don't collide with the native input attributes
178
+ (`value`, `placeholder`, `onChange`, `disabled`, ...) inherited from
179
+ `InputProps`. `disabled` disables both halves; use `selectDisabled` to disable
180
+ only the select side.
181
+
182
+ `size` (`sm` | `md` | `lg`) is shared across both halves and matches the
183
+ height/typography ladder used by `Button`, `Input`, `Select`, `InputButton`
184
+ and `SelectButton`, so an `InputGroup` lines up with any of those siblings at
185
+ the same size.
@@ -0,0 +1,256 @@
1
+ ---
2
+ # >>> DERIVED - regenerated by `npm run knowledge:sync`. Do not edit. <<<
3
+ derived:
4
+ schemaVersion: 1
5
+ id: input
6
+ sourceFile: packages/design-system/src/components/input.tsx
7
+ client: true
8
+ category: web-app-core-primitives
9
+ categoryFromBarrel: web-app-core-primitives
10
+ barrelExported: true
11
+ importPath: "@adres/mgda-ui"
12
+ exports:
13
+ - name: Field
14
+ kind: component
15
+ typeText: "ForwardRefExoticComponent<FieldProps & RefAttributes<HTMLDivElement>>"
16
+ - name: FieldProps
17
+ kind: type
18
+ - name: Input
19
+ kind: component
20
+ typeText: "ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>"
21
+ - name: InputProps
22
+ kind: type
23
+ - name: InputSize
24
+ kind: type
25
+ - name: Label
26
+ kind: component
27
+ typeText: "ForwardRefExoticComponent<LabelProps & RefAttributes<HTMLLabelElement>>"
28
+ - name: LabelProps
29
+ kind: type
30
+ - name: LabelSize
31
+ kind: type
32
+ - name: Textarea
33
+ kind: component
34
+ typeText: "ForwardRefExoticComponent<TextareaProps & RefAttributes<HTMLTextAreaElement>>"
35
+ - name: TextareaProps
36
+ kind: type
37
+ - name: TextareaResize
38
+ kind: type
39
+ - name: TextareaSize
40
+ kind: type
41
+ - name: TextFieldRoot
42
+ kind: component
43
+ typeText: "ForwardRefExoticComponent<TextFieldRootProps & RefAttributes<HTMLDivElement>>"
44
+ - name: TextFieldRootProps
45
+ kind: type
46
+ - name: TextFieldSlot
47
+ kind: component
48
+ typeText: "ForwardRefExoticComponent<TextFieldSlotProps & RefAttributes<HTMLDivElement>>"
49
+ - name: TextFieldSlotProps
50
+ kind: type
51
+ primaryExport: Input
52
+ subcomponents:
53
+ - Field
54
+ - Label
55
+ - Textarea
56
+ - TextFieldRoot
57
+ - TextFieldSlot
58
+ props:
59
+ Field:
60
+ - name: error
61
+ type: ReactNode
62
+ required: false
63
+ declaredIn: self
64
+ - name: help
65
+ type: ReactNode
66
+ required: false
67
+ declaredIn: self
68
+ - name: size
69
+ type: InputSize
70
+ required: false
71
+ declaredIn: self
72
+ doc: "Sizes the Label and any Input/Textarea/TextFieldRoot inside, unless one overrides it directly."
73
+ Input:
74
+ - name: invalid
75
+ type: boolean
76
+ required: false
77
+ declaredIn: self
78
+ - name: size
79
+ type: InputSize
80
+ required: false
81
+ declaredIn: self
82
+ Label:
83
+ - name: size
84
+ type: LabelSize
85
+ required: false
86
+ declaredIn: self
87
+ Textarea:
88
+ - name: invalid
89
+ type: boolean
90
+ required: false
91
+ declaredIn: self
92
+ - name: resize
93
+ type: TextareaResize
94
+ required: false
95
+ declaredIn: self
96
+ - name: size
97
+ type: TextareaSize
98
+ required: false
99
+ declaredIn: self
100
+ TextFieldRoot:
101
+ - name: invalid
102
+ type: boolean
103
+ required: false
104
+ declaredIn: self
105
+ - name: size
106
+ type: InputSize
107
+ required: false
108
+ declaredIn: self
109
+ extendsProps:
110
+ - "Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\">"
111
+ variants:
112
+ size:
113
+ kind: enum
114
+ options:
115
+ - sm
116
+ - md
117
+ - lg
118
+ default: md
119
+ on: Input
120
+ resize:
121
+ kind: enum
122
+ options:
123
+ - none
124
+ - horizontal
125
+ - vertical
126
+ - both
127
+ default: vertical
128
+ on: Textarea
129
+ variantSource: prop-union
130
+ compoundVariants: []
131
+ sizeMaps:
132
+ - HEIGHT
133
+ - LABEL_TEXT_SIZE
134
+ - PADDING_X
135
+ - RESIZE_CLASS
136
+ - TEXTAREA_SIZE
137
+ - TEXT_SIZE
138
+ dataSlots:
139
+ - input
140
+ - textarea
141
+ dependsOn:
142
+ internal: []
143
+ lib:
144
+ - cn
145
+ hooks: []
146
+ external:
147
+ - react
148
+ contexts:
149
+ - name: TextFieldContext
150
+ type: TextFieldContextValue
151
+ default: null
152
+ stories:
153
+ - exportName: Default
154
+ id: components-input--default
155
+ - exportName: TextareaStory
156
+ id: components-input--textarea-story
157
+ storybookTitle: Components/Input
158
+ docsId: components-input--documentation
159
+ argTypeOptions: {}
160
+ resolvedCleanly: true
161
+ contractHash: "351b79aa1dfa"
162
+ factsHash: "97acd1cb8a1c"
163
+ # >>> AUTHORED - humans own everything below this line. <<<
164
+ status: stable
165
+ summary: "A text field, standalone or slotted with icons/buttons via TextFieldRoot, plus its Label/Field/Textarea companions."
166
+ useWhen:
167
+ - "collecting a single line of free text - name, email, any plain form field"
168
+ - "collecting multi-line text (reach for Textarea)"
169
+ - "an icon, unit, or button needs to sit inside the field's border (TextFieldRoot + TextFieldSlot)"
170
+ useInstead:
171
+ - id: search
172
+ when: "the field is specifically a search box - Search already assembles TextFieldRoot + icon + clear button, don't reassemble it"
173
+ related:
174
+ - search
175
+ tokens:
176
+ - "--input-radius"
177
+ - "--input"
178
+ - "--card"
179
+ - "--foreground"
180
+ - "--muted-foreground"
181
+ - "--destructive"
182
+ - "--destructive-foreground"
183
+ - "--ring"
184
+ - "--muted"
185
+ a11y:
186
+ notes:
187
+ - "Field auto-wires aria-describedby to its help/error text, but only across its direct children - don't wrap the control in another element or the cloning that links them never reaches it."
188
+ - "invalid maps straight to aria-invalid on Input/Textarea, but TextFieldRoot's own invalid prop only changes the container's border/ring - set invalid on the inner Input too, or a screen reader won't hear the invalid state."
189
+ requiredProps:
190
+ - "Label needs an explicit htmlFor (or let Field assign matching ids by giving the control no id of its own) - association isn't inferred from DOM nesting."
191
+ keyboard:
192
+ - "Native input/textarea semantics only - no custom key handling."
193
+ radixHandles: false
194
+ pitfalls:
195
+ - "Field clones every direct child, not just the control - a Label sitting next to the input also receives the generated id/aria-describedby/aria-invalid attributes. Harmless on the DOM, but means Field only really suits a Label+control pair, not a larger group."
196
+ - "TextFieldRoot's invalid prop only styles the container; it doesn't set aria-invalid on the nested Input, so pair it with invalid (or aria-invalid) on the Input itself for the state to be announced."
197
+ - "Input defers to TextFieldRoot's context size only when its own size prop is unset - passing a different size to each produces mismatched height/padding between the root and the field."
198
+ - "Set size once on Field rather than on each child - Field's size reaches Label, Input, Textarea and TextFieldRoot through context, and a size on any child overrides it for that child only."
199
+ - "Label's default type is t-label-xs for sm and md; only size lg steps up to t-label-sm. A Label outside any Field or TextFieldRoot uses md."
200
+ canonicalSnippet: |
201
+ import { Field, Input, Label } from "@adres/mgda-ui"
202
+
203
+ const emailHelp = "We do not share your email."
204
+
205
+ <Field className="ax:max-w-sm" help={emailHelp}>
206
+ <Label htmlFor="email">Email</Label>
207
+ <Input id="email" type="email" placeholder="you@example.com" />
208
+ </Field>
209
+ reviewedAt: 2026-10-26
210
+ reviewedAgainstContractHash: "351b79aa1dfa"
211
+ ---
212
+
213
+ ## Usage
214
+
215
+ `Input` covers both a standalone text field and a slotted one. Use it standalone
216
+ for a plain label+field pair, the common case. Use `TextFieldRoot` +
217
+ `TextFieldSlot` + `Input` together when an icon, unit, or button needs to sit
218
+ inside the field's border - `Search` is the shipped example of this pattern and
219
+ should be reached for directly when the field is specifically a search box,
220
+ rather than reassembling the three primitives.
221
+
222
+ Reach for `Textarea` for multi-line input; it shares `Input`'s size ramp and
223
+ type scale so the two read consistently side by side in the same form.
224
+
225
+ `Field` is the wrapper that wires a `Label` to its control: it generates an id,
226
+ links `aria-describedby` to the help/error text, and sets `aria-invalid` when
227
+ `error` is passed. Wrap exactly one control (plus its `Label`) per `Field` - the
228
+ wiring assumes a single field, not a fieldset of several.
229
+
230
+ ### Sizes
231
+
232
+ `sm`/`md` (default)/`lg` follow the same type-and-touch ladder as `Button`, so a
233
+ `Button` and an `Input` at the same size share height and horizontal padding -
234
+ useful when they sit in the same row, like a `Search` next to a filter button.
235
+
236
+ Pass `size` to `Field` to size the whole field at once: its `Label`, and any
237
+ `Input`, `Textarea` or `TextFieldRoot` inside, read it from context unless they
238
+ set their own `size`.
239
+
240
+ ## Anatomy
241
+
242
+ `Input` is a family of primitives that compose, not one compound component with
243
+ a fixed structure.
244
+
245
+ | Part | Role |
246
+ | --- | --- |
247
+ | `Input` | The text field. Renders borderless and full-bleed when read inside `TextFieldRoot`'s context, bordered and self-sized standalone otherwise. |
248
+ | `TextFieldRoot` | Optional wrapper that owns the border, ring, height and horizontal padding when an `Input` needs to share space with icons or buttons. |
249
+ | `TextFieldSlot` | A leading or trailing icon/button holder inside `TextFieldRoot`. Pointer events are disabled by default, re-enabled automatically for a nested `button` or `a`. |
250
+ | `Textarea` | Multi-line sibling. Independent of `TextFieldRoot` - always standalone. |
251
+ | `Label` | Paired via `Field`, or manually via `htmlFor`. |
252
+ | `Field` | Groups one `Label` and one control, wiring `id`/`aria-describedby`/`aria-invalid` between them. |
253
+
254
+ `TextFieldContext` is what tells an `Input` whether it is inside a
255
+ `TextFieldRoot` - that context switch is why `Input`'s className branches
256
+ entirely on `inRoot` rather than on a prop.