@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,189 @@
1
+ ---
2
+ # >>> DERIVED - regenerated by `npm run knowledge:sync`. Do not edit. <<<
3
+ derived:
4
+ schemaVersion: 1
5
+ id: heading
6
+ sourceFile: packages/design-system/src/components/heading.tsx
7
+ client: false
8
+ category: web-app-core-primitives
9
+ categoryFromBarrel: web-app-core-primitives
10
+ barrelExported: true
11
+ importPath: "@adres/mgda-ui"
12
+ exports:
13
+ - name: Heading
14
+ kind: component
15
+ typeText: "ForwardRefExoticComponent<HeadingProps & RefAttributes<HTMLHeadingElement>>"
16
+ - name: HeadingAlign
17
+ kind: type
18
+ - name: HeadingAs
19
+ kind: type
20
+ - name: HeadingColor
21
+ kind: type
22
+ - name: HeadingProps
23
+ kind: type
24
+ - name: HeadingSize
25
+ kind: type
26
+ - name: headingVariants
27
+ kind: variants
28
+ typeText: "TVReturnType<{ size: { \"display-2xl\": \"ax:t-display-2xl\"; \"display-xl\": \"ax:t-display-xl\"; \"display-lg\": \"ax:t-display-lg\"; \"display-md\": \"ax:t-display-md\"; \"display-sm\": \"ax:t-display-sm\"; h1: \"ax:t-h1\"; ... 4 more ...;...[truncated]"
29
+ - name: HeadingWrap
30
+ kind: type
31
+ primaryExport: Heading
32
+ subcomponents: []
33
+ props:
34
+ Heading:
35
+ - name: align
36
+ type: "\"center\" | \"left\" | \"right\""
37
+ required: false
38
+ declaredIn: self
39
+ variantKey: true
40
+ - name: as
41
+ type: HeadingAs
42
+ required: false
43
+ declaredIn: self
44
+ doc: "The heading level, chosen for document outline. Defaults to `h2`."
45
+ - name: color
46
+ type: "\"default\" | \"muted\" | \"primary\" | \"strong\""
47
+ required: false
48
+ declaredIn: self
49
+ variantKey: true
50
+ - name: size
51
+ type: "\"display-2xl\" | \"display-lg\" | \"display-md\" | \"display-sm\" | \"display-xl\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\""
52
+ required: false
53
+ declaredIn: self
54
+ variantKey: true
55
+ - name: truncate
56
+ type: boolean
57
+ required: false
58
+ declaredIn: self
59
+ - name: wrap
60
+ type: "\"balance\" | \"pretty\" | \"wrap\""
61
+ required: false
62
+ declaredIn: self
63
+ variantKey: true
64
+ extendsProps:
65
+ - "Omit<React.HTMLAttributes<HTMLHeadingElement>, \"color\">"
66
+ - "VariantProps<typeof headingVariants>"
67
+ variants:
68
+ size:
69
+ kind: enum
70
+ options:
71
+ - display-2xl
72
+ - display-xl
73
+ - display-lg
74
+ - display-md
75
+ - display-sm
76
+ - h1
77
+ - h2
78
+ - h3
79
+ - h4
80
+ - h5
81
+ - h6
82
+ default: null
83
+ on: Heading
84
+ color:
85
+ kind: enum
86
+ options:
87
+ - default
88
+ - strong
89
+ - muted
90
+ - primary
91
+ default: default
92
+ on: Heading
93
+ align:
94
+ kind: enum
95
+ options:
96
+ - left
97
+ - center
98
+ - right
99
+ default: null
100
+ on: Heading
101
+ wrap:
102
+ kind: enum
103
+ options:
104
+ - wrap
105
+ - balance
106
+ - pretty
107
+ default: null
108
+ on: Heading
109
+ variantSource: tv
110
+ compoundVariants: []
111
+ sizeMaps: []
112
+ dataSlots: []
113
+ dependsOn:
114
+ internal: []
115
+ lib:
116
+ - cn
117
+ hooks: []
118
+ external:
119
+ - react
120
+ - tailwind-variants
121
+ contexts: []
122
+ stories:
123
+ - exportName: Default
124
+ id: components-heading--default
125
+ - exportName: LevelDiffersFromSize
126
+ id: components-heading--level-differs-from-size
127
+ - exportName: Scale
128
+ id: components-heading--scale
129
+ storybookTitle: Components/Heading
130
+ docsId: components-heading--documentation
131
+ argTypeOptions:
132
+ as:
133
+ - h1
134
+ - h2
135
+ - h3
136
+ - h4
137
+ - h5
138
+ - h6
139
+ color:
140
+ - default
141
+ - strong
142
+ - muted
143
+ - primary
144
+ resolvedCleanly: true
145
+ contractHash: "00b98cc74dc9"
146
+ factsHash: e6283d313819
147
+ # >>> AUTHORED - humans own everything below this line. <<<
148
+ status: stable
149
+ summary: "Semantic h1-h6 heading whose level and visual size are set independently, on the canonical t-* heading and display scale."
150
+ useWhen:
151
+ - "any heading in a screen, card, dialog or section that is not the page's top header row"
152
+ - "the document outline needs one level but the design calls for another size, e.g. an h1 that reads at h3 size"
153
+ useInstead:
154
+ - id: page-header
155
+ when: "it is the top-of-page title row with a subtitle and actions"
156
+ - id: text
157
+ when: "the text is not a heading"
158
+ related:
159
+ - text
160
+ - page-header
161
+ - empty-state
162
+ a11y:
163
+ notes:
164
+ - "as sets the real heading level and therefore the document outline. Choose it by structure (one h1 per page, no skipped levels) and use size for the look."
165
+ - "size defaults to the level, so a bare <Heading as=\"h3\"> renders at h3 size; only pass size when the look must differ from the level."
166
+ radixHandles: false
167
+ pitfalls:
168
+ - "as defaults to h2, not h1. Pages that need an h1 must say so."
169
+ - "size uses the t-* names (h1-h6, display-sm to display-2xl), not Text's numeric 1-9 scale."
170
+ canonicalSnippet: |
171
+ import { Heading } from "@adres/mgda-ui"
172
+
173
+ <Heading as="h1" size="h3">
174
+ Welcome back
175
+ </Heading>
176
+ reviewedAt: 2026-10-05
177
+ reviewedAgainstContractHash: "00b98cc74dc9"
178
+ ---
179
+
180
+ ## Usage
181
+
182
+ `Heading` fills the gap `Text` leaves: `Text` renders inline and block text
183
+ tags but never `h1`-`h6`. Use `as` for the outline level and `size` for the
184
+ look. Sizes map straight onto the `t-*` heading and display utilities in
185
+ `typography.css`, so brand typography overrides apply.
186
+
187
+ When `size` is omitted it follows the level, which covers most headings. Pass
188
+ `size` only when structure and design disagree, such as a sign-in screen whose
189
+ single `h1` should read at `h3` size.
@@ -0,0 +1,361 @@
1
+ ---
2
+ # >>> DERIVED - regenerated by `npm run knowledge:sync`. Do not edit. <<<
3
+ derived:
4
+ schemaVersion: 1
5
+ id: hero
6
+ sourceFile: packages/design-system/src/components/hero.tsx
7
+ client: true
8
+ category: marketing
9
+ categoryFromBarrel: marketing
10
+ barrelExported: true
11
+ importPath: "@adres/mgda-ui"
12
+ exports:
13
+ - name: Hero
14
+ kind: component
15
+ typeText: "ForwardRefExoticComponent<HeroProps & RefAttributes<HTMLDivElement>>"
16
+ - name: HeroLayout
17
+ kind: type
18
+ - name: HeroProps
19
+ kind: type
20
+ - name: HeroStat
21
+ kind: type
22
+ primaryExport: Hero
23
+ subcomponents: []
24
+ props:
25
+ Hero:
26
+ - name: actions
27
+ type: ReactNode
28
+ required: false
29
+ declaredIn: self
30
+ doc: "CTA action slots - typically primary + secondary buttons."
31
+ - name: badge
32
+ type: ReactNode
33
+ required: false
34
+ declaredIn: self
35
+ doc: "Pill / live-indicator badge. split: above headline. cinematic: top-right."
36
+ - name: badges
37
+ type: "string[]"
38
+ required: false
39
+ declaredIn: self
40
+ doc: "Trust-point strings shown below the search widget. A checkmark is prepended to each."
41
+ - name: borderless
42
+ type: boolean
43
+ required: false
44
+ declaredIn: card
45
+ doc: "When true, removes the border and shadow from the card."
46
+ - name: brand
47
+ type: ReactNode
48
+ required: false
49
+ declaredIn: self
50
+ doc: "Brand identity element - cinematic top-left logo."
51
+ - name: brands
52
+ type: "ReactNode[]"
53
+ required: false
54
+ declaredIn: self
55
+ doc: "Brand name list for the magazine footer strip."
56
+ - name: description
57
+ type: ReactNode
58
+ required: false
59
+ declaredIn: self
60
+ doc: "Optional supporting paragraph."
61
+ - name: elevation
62
+ type: CardElevation
63
+ required: false
64
+ declaredIn: card
65
+ doc: "Surface elevation - bundles a background fill with a shadow into one level, overriding the variant's own background and shadow (the variant's border, if any, is kept). Reads the brand-themeable --elevation-* tokens. level0 - transparent, flat level1 - translucent surface (50%), flat level2 - solid surface + subtle shadow level3 - solid surface + stronger shadow Left unset, the card keeps its variant's default (brand-themeable) chrome."
66
+ - name: eyebrow
67
+ type: ReactNode
68
+ required: false
69
+ declaredIn: self
70
+ doc: "Optional pre-headline label / eyebrow. In magazine layout, appears in the footer-left strip."
71
+ - name: gap
72
+ type: CardGap
73
+ required: false
74
+ declaredIn: card
75
+ doc: "When set, makes the card a vertical flex column with the given gap between children. sm=12px md=16px lg=20px xl=24px"
76
+ - name: headline
77
+ type: ReactNode
78
+ required: true
79
+ declaredIn: self
80
+ doc: "Required: the marketing headline. Accepts JSX for styled spans."
81
+ - name: hoverEffect
82
+ type: "\"lift\" | \"scale\""
83
+ required: false
84
+ declaredIn: card
85
+ doc: "Hover animation style when `interactive` is true. \"scale\" (default) - a light zoom (1.03×) that raises the shadow one level · \"lift\" - translates up 4px"
86
+ - name: interactive
87
+ type: boolean
88
+ required: false
89
+ declaredIn: card
90
+ doc: "When true, the card zooms subtly on hover. Disabled by reduced-motion preference."
91
+ - name: layout
92
+ type: HeroLayout
93
+ required: false
94
+ declaredIn: self
95
+ doc: "Visual template. Defaults to \"split\" when media is set, \"centered\" otherwise."
96
+ - name: media
97
+ type: ReactNode
98
+ required: false
99
+ declaredIn: self
100
+ doc: "Main image / media slot."
101
+ - name: overlay
102
+ type: ReactNode
103
+ required: false
104
+ declaredIn: self
105
+ doc: "Content overlaid on the media column - split floating cards, badges, etc."
106
+ - name: padding
107
+ type: CardPadding
108
+ required: false
109
+ declaredIn: card
110
+ doc: "Padding inside the card. All responsive variants scale from their mobile floor up to the named size at XL (1280px+), one step per breakpoint. Fixed: none · sm(12px) · md(16px) Responsive: lg(→20px) · xl(→24px) · 2xl(→32px) · 3xl(→40px) · 4xl(→48px)"
111
+ - name: search
112
+ type: ReactNode
113
+ required: false
114
+ declaredIn: self
115
+ doc: "Search widget slot - rendered below description in the \"search\" layout."
116
+ - name: secondaryMedia
117
+ type: ReactNode
118
+ required: false
119
+ declaredIn: self
120
+ doc: "Secondary image slot - magazine right column."
121
+ - name: sectioned
122
+ type: boolean
123
+ required: false
124
+ declaredIn: card
125
+ doc: "Split the card into a muted header band with a content section beneath it. The card's own padding is dropped and each sub-component (CardHeader / CardContent / CardFooter) supplies its own padding instead; the header runs full-bleed with `bg-muted` + a bottom divider, its top corners rounded by the card's own radius."
126
+ - name: stats
127
+ type: "HeroStat[]"
128
+ required: false
129
+ declaredIn: self
130
+ doc: "Metric pairs rendered below content (capsule/split) or in a bottom grid (cinematic)."
131
+ - name: theme
132
+ type: "\"dark\" | \"light\""
133
+ required: false
134
+ declaredIn: self
135
+ doc: "\"dark\" applies a deep neutral background - intended for the cinematic layout."
136
+ - name: variant
137
+ type: CardVariant
138
+ required: false
139
+ declaredIn: card
140
+ doc: "Visual treatment of the card surface."
141
+ extendsProps:
142
+ - CardProps
143
+ variants:
144
+ layout:
145
+ kind: enum
146
+ options:
147
+ - search
148
+ - split
149
+ - centered
150
+ - capsule
151
+ - magazine
152
+ - cinematic
153
+ - editorial
154
+ - mosaic
155
+ default: null
156
+ on: Hero
157
+ theme:
158
+ kind: enum
159
+ options:
160
+ - light
161
+ - dark
162
+ default: null
163
+ on: Hero
164
+ variant:
165
+ kind: enum
166
+ options:
167
+ - default
168
+ - ghost
169
+ - surface
170
+ default: null
171
+ on: Hero
172
+ padding:
173
+ kind: enum
174
+ options:
175
+ - none
176
+ - sm
177
+ - md
178
+ - lg
179
+ - xl
180
+ - "2xl"
181
+ - "3xl"
182
+ - "4xl"
183
+ default: none
184
+ on: Hero
185
+ gap:
186
+ kind: enum
187
+ options:
188
+ - sm
189
+ - md
190
+ - lg
191
+ - xl
192
+ default: null
193
+ on: Hero
194
+ elevation:
195
+ kind: enum
196
+ options:
197
+ - none
198
+ - sm
199
+ - xs
200
+ - level0
201
+ - level1
202
+ - level2
203
+ - level3
204
+ default: null
205
+ on: Hero
206
+ hoverEffect:
207
+ kind: enum
208
+ options:
209
+ - lift
210
+ - scale
211
+ default: null
212
+ on: Hero
213
+ variantSource: prop-union
214
+ compoundVariants: []
215
+ sizeMaps: []
216
+ dataSlots: []
217
+ dependsOn:
218
+ internal:
219
+ - card
220
+ lib:
221
+ - cn
222
+ - motion
223
+ hooks:
224
+ - use-reduced-motion
225
+ external:
226
+ - lucide-react
227
+ - motion/react
228
+ - react
229
+ contexts: []
230
+ stories:
231
+ - exportName: Default
232
+ id: components-hero--default
233
+ - exportName: Split
234
+ id: components-hero--split
235
+ storybookTitle: Components/Hero
236
+ docsId: components-hero--documentation
237
+ argTypeOptions: {}
238
+ resolvedCleanly: true
239
+ contractHash: "97741dc45938"
240
+ factsHash: "4c36572d7592"
241
+ # >>> AUTHORED - humans own everything below this line. <<<
242
+ status: stable
243
+ summary: "The top-of-page marketing block, in eight layout templates over one prop set."
244
+ useWhen:
245
+ - "opening a marketing or landing page with a headline and a call to action"
246
+ - "you want a named editorial layout rather than assembling one from primitives"
247
+ - "the page opens with a search box as its main action (search layout)"
248
+ useInstead:
249
+ - id: page-header
250
+ when: "this is an app screen, not marketing: a title row above content"
251
+ - id: cta
252
+ when: "it is a closing call to action rather than the page opening"
253
+ - id: feature-grid
254
+ when: "you are listing capabilities rather than leading with one headline"
255
+ related:
256
+ - page-header
257
+ - cta
258
+ - feature-grid
259
+ - card
260
+ - stats
261
+ composesWith:
262
+ - button
263
+ - badge
264
+ - search
265
+ tokens:
266
+ - "--foreground"
267
+ - "--muted-foreground"
268
+ - "--primary"
269
+ - "--accent"
270
+ - "--border"
271
+ - "--muted"
272
+ - "--background"
273
+ - "--neutral-950"
274
+ - "--neutral-900"
275
+ - "--neutral-800"
276
+ - "--neutral-500"
277
+ - "--neutral-400"
278
+ - "--neutral-50"
279
+ a11y:
280
+ notes:
281
+ - "Every layout renders the headline as an h1, so a page must contain at most one Hero or the heading outline breaks."
282
+ - "Entry animation is skipped entirely when prefers-reduced-motion is set, via useReducedMotion rather than a CSS-only guard."
283
+ - "headline accepts JSX for styled spans. Keep the emphasis visual: do not build the sentence out of nested elements that read oddly when linearised."
284
+ - "The cinematic glow layers are decorative and pointer-events-none, so they never intercept clicks or reach the accessibility tree."
285
+ - "theme: dark applies its own dark surface independently of the app's dark class, so verify contrast for actions placed on it rather than assuming brand tokens adapt."
286
+ requiredProps:
287
+ - "headline"
288
+ keyboard:
289
+ - "No interactive behaviour of its own. Anything focusable arrives through the actions, search or overlay slots and keeps its own semantics."
290
+ radixHandles: false
291
+ pitfalls:
292
+ - "layout has no static default. It resolves to split when media is set and centered when it is not, so adding a media prop silently changes the entire template."
293
+ - "Each layout consumes a different subset of props and ignores the rest without warning. search and badges only render in the search layout; secondaryMedia and brands only in magazine; brand and the dark treatment only in cinematic; overlay only in split. Passing them elsewhere does nothing at all."
294
+ - "stats means something different per layout. capsule features stats[0] and rows the remainder; magazine uses only stats[0] and stats[1] and silently drops the rest; cinematic renders all of them in a grid whose column count equals stats.length, so a long list gets very narrow columns."
295
+ - "capsule and magazine hide description below the md breakpoint (hidden md:block). Copy that only exists in description is invisible on mobile."
296
+ - "Hero extends CardProps but overrides padding to none, because each layout owns its own interior spacing. Passing a padding value fights the layout."
297
+ - "The cinematic layout forces the Card variant to ghost so its own background is not covered by bg-card. Passing variant explicitly overrides that and can reintroduce the conflict."
298
+ - "theme: dark writes an inline background from --neutral-950 and switches the cinematic text colours to inline neutral values. It is one of the few places in the system that sets colour outside a semantic token, so it does not follow a brand's dark palette."
299
+ rtl: "Mostly safe: layouts are flex and grid with logical spacing. The cinematic decorative glows are positioned with physical left and right offsets and will not mirror, though being blurred background shapes this reads as acceptable."
300
+ brandNotes: "Everything outside cinematic traces to semantic tokens and re-skins cleanly. cinematic plus theme: dark is the exception: it hardcodes the neutral ramp, so a brand with a distinctive dark surface will not see it applied there."
301
+ canonicalSnippet: |
302
+ import { Hero, Button } from "@adres/mgda-ui"
303
+
304
+ <Hero
305
+ layout="split"
306
+ eyebrow="New release"
307
+ headline="Find your next home"
308
+ description="Search verified listings across the city."
309
+ media={<img src="/hero.jpg" alt="" />}
310
+ stats={[{ value: "12k", label: "Listings" }]}
311
+ actions={
312
+ <>
313
+ <Button variant="primary">Start searching</Button>
314
+ <Button variant="outline">Book a viewing</Button>
315
+ </>
316
+ }
317
+ />
318
+ reviewedAt: 2026-08-24
319
+ reviewedAgainstContractHash: 97741dc45938
320
+ ---
321
+
322
+ ## Usage
323
+
324
+ Hero is eight editorial templates sharing one prop set. Pick the template first, then
325
+ fill only the props that template actually reads, because anything else is ignored in
326
+ silence.
327
+
328
+ It builds on `Card` (so `variant`, `elevation` and the rest come through) but forces
329
+ `padding` to `none`: every layout owns its interior spacing, and overriding padding
330
+ fights it.
331
+
332
+ The headline is the only required prop, and it renders as an `h1` in all eight
333
+ layouts, so a page gets one Hero.
334
+
335
+ ### Layouts, and what each one actually uses
336
+
337
+ `layout` has no fixed default: it resolves to `split` when `media` is present and
338
+ `centered` when it is not.
339
+
340
+ | Layout | Reads | Notably ignores |
341
+ | --- | --- | --- |
342
+ | `centered` | eyebrow, headline, description, actions | media, stats, badge |
343
+ | `split` | badge, headline, description, actions, stats, media, overlay | eyebrow |
344
+ | `capsule` | headline, description, media, stats, actions | eyebrow, badge |
345
+ | `magazine` | headline, description, media, secondaryMedia, stats[0..1], eyebrow, brands | actions, badge |
346
+ | `editorial` | eyebrow, badge, headline, description, stats, actions | media |
347
+ | `mosaic` | eyebrow, headline, description, actions, media | stats, badge |
348
+ | `search` | eyebrow, headline, description, search, badges | media, stats, actions |
349
+ | `cinematic` | brand, badge, eyebrow, headline, description, actions, stats, theme | media, overlay |
350
+
351
+ Two consequences worth internalising. `magazine` reads only the first two `stats` and
352
+ drops the rest without complaint. `capsule` and `magazine` hide `description` below the
353
+ `md` breakpoint, so anything essential must not live only there.
354
+
355
+ ### The dark treatment
356
+
357
+ `theme="dark"` is not the app's dark mode. It paints an inline background from the
358
+ neutral ramp and switches the cinematic text colours to inline neutral values, which
359
+ is the one place this component steps outside semantic tokens. Use it with
360
+ `cinematic`, which it was designed for, and check the contrast of any actions you put
361
+ on it.