@nanisoft/prism-ui 0.10.2 → 0.13.0

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 (334) hide show
  1. package/LICENSE +21 -21
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/blocks/app-shell-01/app-shell.js +4 -4
  4. package/dist/blocks/app-shell-01/index.d.ts +2 -2
  5. package/dist/blocks/app-shell-01/index.js +1 -1
  6. package/dist/blocks/auth-form-01/auth-form.d.ts +11 -1
  7. package/dist/blocks/auth-form-01/auth-form.d.ts.map +1 -1
  8. package/dist/blocks/auth-form-01/auth-form.js +11 -8
  9. package/dist/blocks/auth-form-01/index.d.ts +2 -2
  10. package/dist/blocks/auth-form-01/index.js +1 -1
  11. package/dist/blocks/cta-01/cta.d.ts +26 -21
  12. package/dist/blocks/cta-01/cta.d.ts.map +1 -1
  13. package/dist/blocks/cta-01/cta.js +2 -2
  14. package/dist/blocks/cta-01/index.d.ts +2 -2
  15. package/dist/blocks/cta-01/index.js +1 -1
  16. package/dist/blocks/data-table-01/data-table.js +7 -7
  17. package/dist/blocks/data-table-01/index.d.ts +2 -2
  18. package/dist/blocks/data-table-01/index.js +1 -1
  19. package/dist/blocks/empty-state-01/empty-state.d.ts +143 -0
  20. package/dist/blocks/empty-state-01/empty-state.d.ts.map +1 -0
  21. package/dist/blocks/empty-state-01/empty-state.js +104 -0
  22. package/dist/blocks/empty-state-01/index.d.ts +3 -0
  23. package/dist/blocks/empty-state-01/index.d.ts.map +1 -0
  24. package/dist/blocks/empty-state-01/index.js +1 -0
  25. package/dist/blocks/feature-grid-01/feature-grid.d.ts +28 -1
  26. package/dist/blocks/feature-grid-01/feature-grid.d.ts.map +1 -1
  27. package/dist/blocks/feature-grid-01/feature-grid.js +34 -3
  28. package/dist/blocks/feature-grid-01/index.d.ts +2 -2
  29. package/dist/blocks/feature-grid-01/index.js +1 -1
  30. package/dist/blocks/hero-01/hero.d.ts +35 -15
  31. package/dist/blocks/hero-01/hero.d.ts.map +1 -1
  32. package/dist/blocks/hero-01/hero.js +14 -9
  33. package/dist/blocks/hero-01/index.d.ts +2 -1
  34. package/dist/blocks/hero-01/index.d.ts.map +1 -1
  35. package/dist/blocks/hero-01/index.js +1 -1
  36. package/dist/blocks/index.d.ts +20 -20
  37. package/dist/blocks/index.js +19 -19
  38. package/dist/blocks/instrument-panel-01/index.d.ts +2 -2
  39. package/dist/blocks/instrument-panel-01/index.js +1 -1
  40. package/dist/blocks/instrument-panel-01/instrument-panel.js +1 -1
  41. package/dist/blocks/logo-strip-01/index.d.ts +2 -2
  42. package/dist/blocks/logo-strip-01/index.js +1 -1
  43. package/dist/blocks/logo-strip-01/logo-strip.d.ts +1 -1
  44. package/dist/blocks/logo-strip-01/logo-strip.js +2 -2
  45. package/dist/blocks/note-grid-01/index.d.ts +2 -2
  46. package/dist/blocks/note-grid-01/index.js +1 -1
  47. package/dist/blocks/note-grid-01/note-grid.d.ts +1 -1
  48. package/dist/blocks/note-grid-01/note-grid.js +1 -1
  49. package/dist/blocks/page-header-01/index.d.ts +2 -2
  50. package/dist/blocks/page-header-01/index.js +1 -1
  51. package/dist/blocks/page-header-01/page-header.d.ts +1 -1
  52. package/dist/blocks/page-header-01/page-header.js +4 -4
  53. package/dist/blocks/pricing-01/index.d.ts +1 -1
  54. package/dist/blocks/pricing-01/index.js +1 -1
  55. package/dist/blocks/pricing-01/pricing.d.ts +8 -1
  56. package/dist/blocks/pricing-01/pricing.d.ts.map +1 -1
  57. package/dist/blocks/pricing-01/pricing.js +15 -5
  58. package/dist/blocks/process-flow-01/index.d.ts +3 -0
  59. package/dist/blocks/process-flow-01/index.d.ts.map +1 -0
  60. package/dist/blocks/process-flow-01/index.js +1 -0
  61. package/dist/blocks/process-flow-01/process-flow.d.ts +118 -0
  62. package/dist/blocks/process-flow-01/process-flow.d.ts.map +1 -0
  63. package/dist/blocks/process-flow-01/process-flow.js +71 -0
  64. package/dist/blocks/process-rail-01/index.d.ts +2 -2
  65. package/dist/blocks/process-rail-01/index.js +1 -1
  66. package/dist/blocks/process-rail-01/process-rail.d.ts +1 -1
  67. package/dist/blocks/process-rail-01/process-rail.js +2 -2
  68. package/dist/blocks/product-grid-01/index.d.ts +2 -2
  69. package/dist/blocks/product-grid-01/index.js +1 -1
  70. package/dist/blocks/product-grid-01/product-grid.d.ts +37 -5
  71. package/dist/blocks/product-grid-01/product-grid.d.ts.map +1 -1
  72. package/dist/blocks/product-grid-01/product-grid.js +20 -6
  73. package/dist/blocks/run-console-01/index.d.ts +3 -0
  74. package/dist/blocks/run-console-01/index.d.ts.map +1 -0
  75. package/dist/blocks/run-console-01/index.js +1 -0
  76. package/dist/blocks/run-console-01/run-console.d.ts +111 -0
  77. package/dist/blocks/run-console-01/run-console.d.ts.map +1 -0
  78. package/dist/blocks/run-console-01/run-console.js +48 -0
  79. package/dist/blocks/settings-panel-01/index.d.ts +2 -2
  80. package/dist/blocks/settings-panel-01/index.js +1 -1
  81. package/dist/blocks/settings-panel-01/settings-panel.d.ts +11 -1
  82. package/dist/blocks/settings-panel-01/settings-panel.d.ts.map +1 -1
  83. package/dist/blocks/settings-panel-01/settings-panel.js +15 -10
  84. package/dist/blocks/site-footer/index.d.ts +2 -2
  85. package/dist/blocks/site-footer/index.js +1 -1
  86. package/dist/blocks/site-footer/site-footer.d.ts +1 -1
  87. package/dist/blocks/site-footer/site-footer.js +2 -2
  88. package/dist/blocks/site-header/index.d.ts +2 -2
  89. package/dist/blocks/site-header/index.js +1 -1
  90. package/dist/blocks/site-header/site-header.d.ts +2 -2
  91. package/dist/blocks/site-header/site-header.js +3 -3
  92. package/dist/blocks/site-navbar/index.d.ts +3 -0
  93. package/dist/blocks/site-navbar/index.d.ts.map +1 -0
  94. package/dist/blocks/site-navbar/index.js +1 -0
  95. package/dist/blocks/site-navbar/mobile-nav.d.ts +48 -0
  96. package/dist/blocks/site-navbar/mobile-nav.d.ts.map +1 -0
  97. package/dist/blocks/site-navbar/mobile-nav.js +35 -0
  98. package/dist/blocks/site-navbar/mode-toggle.d.ts +39 -0
  99. package/dist/blocks/site-navbar/mode-toggle.d.ts.map +1 -0
  100. package/dist/blocks/site-navbar/mode-toggle.js +39 -0
  101. package/dist/blocks/site-navbar/navbar-controls.d.ts +79 -0
  102. package/dist/blocks/site-navbar/navbar-controls.d.ts.map +1 -0
  103. package/dist/blocks/site-navbar/navbar-controls.js +40 -0
  104. package/dist/blocks/site-navbar/search-entry.d.ts +29 -0
  105. package/dist/blocks/site-navbar/search-entry.d.ts.map +1 -0
  106. package/dist/blocks/site-navbar/search-entry.js +52 -0
  107. package/dist/blocks/site-navbar/site-navbar.d.ts +212 -0
  108. package/dist/blocks/site-navbar/site-navbar.d.ts.map +1 -0
  109. package/dist/blocks/site-navbar/site-navbar.js +61 -0
  110. package/dist/blocks/site-navbar/sites-menu.d.ts +40 -0
  111. package/dist/blocks/site-navbar/sites-menu.d.ts.map +1 -0
  112. package/dist/blocks/site-navbar/sites-menu.js +48 -0
  113. package/dist/blocks/site-navbar/theme-menu.d.ts +47 -0
  114. package/dist/blocks/site-navbar/theme-menu.d.ts.map +1 -0
  115. package/dist/blocks/site-navbar/theme-menu.js +55 -0
  116. package/dist/blocks/stack-grid-01/index.d.ts +2 -2
  117. package/dist/blocks/stack-grid-01/index.js +1 -1
  118. package/dist/blocks/stack-grid-01/stack-grid.d.ts +42 -11
  119. package/dist/blocks/stack-grid-01/stack-grid.d.ts.map +1 -1
  120. package/dist/blocks/stack-grid-01/stack-grid.js +15 -7
  121. package/dist/blocks/stats-01/index.d.ts +9 -1
  122. package/dist/blocks/stats-01/index.d.ts.map +1 -1
  123. package/dist/blocks/stats-01/index.js +8 -1
  124. package/dist/blocks/stats-01/stats.d.ts +1 -1
  125. package/dist/blocks/stats-01/stats.js +2 -2
  126. package/dist/blocks/status-ledger-01/index.d.ts +2 -2
  127. package/dist/blocks/status-ledger-01/index.js +1 -1
  128. package/dist/blocks/status-ledger-01/status-ledger.d.ts +1 -1
  129. package/dist/blocks/status-ledger-01/status-ledger.js +2 -2
  130. package/dist/catalog.d.ts +1 -1
  131. package/dist/catalog.d.ts.map +1 -1
  132. package/dist/catalog.js +473 -1
  133. package/dist/components/index.d.ts +104 -66
  134. package/dist/components/index.d.ts.map +1 -1
  135. package/dist/components/index.js +74 -40
  136. package/dist/components/ui/accordion.js +1 -1
  137. package/dist/components/ui/alert-dialog.d.ts +119 -0
  138. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  139. package/dist/components/ui/alert-dialog.js +82 -0
  140. package/dist/components/ui/alert.js +1 -1
  141. package/dist/components/ui/aspect-ratio.d.ts +60 -0
  142. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  143. package/dist/components/ui/aspect-ratio.js +61 -0
  144. package/dist/components/ui/avatar.js +1 -1
  145. package/dist/components/ui/badge.js +1 -1
  146. package/dist/components/ui/breadcrumb.js +1 -1
  147. package/dist/components/ui/button-group.d.ts +68 -0
  148. package/dist/components/ui/button-group.d.ts.map +1 -0
  149. package/dist/components/ui/button-group.js +54 -0
  150. package/dist/components/ui/button.js +1 -1
  151. package/dist/components/ui/calendar.d.ts +158 -0
  152. package/dist/components/ui/calendar.d.ts.map +1 -0
  153. package/dist/components/ui/calendar.js +216 -0
  154. package/dist/components/ui/card.d.ts +18 -6
  155. package/dist/components/ui/card.d.ts.map +1 -1
  156. package/dist/components/ui/card.js +23 -8
  157. package/dist/components/ui/carousel.d.ts +118 -0
  158. package/dist/components/ui/carousel.d.ts.map +1 -0
  159. package/dist/components/ui/carousel.js +152 -0
  160. package/dist/components/ui/chart-frame.d.ts +216 -0
  161. package/dist/components/ui/chart-frame.d.ts.map +1 -0
  162. package/dist/components/ui/chart-frame.js +286 -0
  163. package/dist/components/ui/checkbox.js +1 -1
  164. package/dist/components/ui/collapsible.d.ts +97 -0
  165. package/dist/components/ui/collapsible.d.ts.map +1 -0
  166. package/dist/components/ui/collapsible.js +54 -0
  167. package/dist/components/ui/combobox.d.ts +141 -0
  168. package/dist/components/ui/combobox.d.ts.map +1 -0
  169. package/dist/components/ui/combobox.js +243 -0
  170. package/dist/components/ui/command-palette.d.ts +106 -0
  171. package/dist/components/ui/command-palette.d.ts.map +1 -0
  172. package/dist/components/ui/command-palette.js +176 -0
  173. package/dist/components/ui/command.d.ts +82 -0
  174. package/dist/components/ui/command.d.ts.map +1 -0
  175. package/dist/components/ui/command.js +37 -0
  176. package/dist/components/ui/context-menu.d.ts +151 -0
  177. package/dist/components/ui/context-menu.d.ts.map +1 -0
  178. package/dist/components/ui/context-menu.js +97 -0
  179. package/dist/components/ui/cta-link.js +1 -1
  180. package/dist/components/ui/date-picker.d.ts +111 -0
  181. package/dist/components/ui/date-picker.d.ts.map +1 -0
  182. package/dist/components/ui/date-picker.js +74 -0
  183. package/dist/components/ui/diagram.d.ts +84 -15
  184. package/dist/components/ui/diagram.d.ts.map +1 -1
  185. package/dist/components/ui/diagram.js +77 -7
  186. package/dist/components/ui/dialog.js +1 -1
  187. package/dist/components/ui/diff.d.ts +105 -0
  188. package/dist/components/ui/diff.d.ts.map +1 -0
  189. package/dist/components/ui/diff.js +113 -0
  190. package/dist/components/ui/dropdown-menu.d.ts +18 -0
  191. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  192. package/dist/components/ui/dropdown-menu.js +1 -1
  193. package/dist/components/ui/fact-list.js +1 -1
  194. package/dist/components/ui/field.js +1 -1
  195. package/dist/components/ui/form.d.ts +151 -0
  196. package/dist/components/ui/form.d.ts.map +1 -0
  197. package/dist/components/ui/form.js +73 -0
  198. package/dist/components/ui/hover-card.d.ts +105 -0
  199. package/dist/components/ui/hover-card.d.ts.map +1 -0
  200. package/dist/components/ui/hover-card.js +49 -0
  201. package/dist/components/ui/input-group.d.ts +99 -0
  202. package/dist/components/ui/input-group.d.ts.map +1 -0
  203. package/dist/components/ui/input-group.js +83 -0
  204. package/dist/components/ui/input.js +1 -1
  205. package/dist/components/ui/item.d.ts +113 -0
  206. package/dist/components/ui/item.d.ts.map +1 -0
  207. package/dist/components/ui/item.js +61 -0
  208. package/dist/components/ui/kbd.js +1 -1
  209. package/dist/components/ui/label.d.ts +58 -0
  210. package/dist/components/ui/label.d.ts.map +1 -0
  211. package/dist/components/ui/label.js +29 -0
  212. package/dist/components/ui/live-region.d.ts +9 -0
  213. package/dist/components/ui/live-region.d.ts.map +1 -1
  214. package/dist/components/ui/live-region.js +10 -2
  215. package/dist/components/ui/mark.js +1 -1
  216. package/dist/components/ui/menubar.d.ts +197 -0
  217. package/dist/components/ui/menubar.d.ts.map +1 -0
  218. package/dist/components/ui/menubar.js +109 -0
  219. package/dist/components/ui/meter.d.ts +121 -0
  220. package/dist/components/ui/meter.d.ts.map +1 -0
  221. package/dist/components/ui/meter.js +82 -0
  222. package/dist/components/ui/native-select.d.ts +72 -0
  223. package/dist/components/ui/native-select.d.ts.map +1 -0
  224. package/dist/components/ui/native-select.js +55 -0
  225. package/dist/components/ui/navigation-menu.d.ts +186 -0
  226. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  227. package/dist/components/ui/navigation-menu.js +94 -0
  228. package/dist/components/ui/number-field.d.ts +111 -0
  229. package/dist/components/ui/number-field.d.ts.map +1 -0
  230. package/dist/components/ui/number-field.js +84 -0
  231. package/dist/components/ui/one-time-code.d.ts +127 -0
  232. package/dist/components/ui/one-time-code.d.ts.map +1 -0
  233. package/dist/components/ui/one-time-code.js +57 -0
  234. package/dist/components/ui/pagination.js +1 -1
  235. package/dist/components/ui/popover.js +1 -1
  236. package/dist/components/ui/product-mark.d.ts +1 -1
  237. package/dist/components/ui/product-mark.js +1 -1
  238. package/dist/components/ui/product-switcher.d.ts +1 -1
  239. package/dist/components/ui/product-switcher.js +2 -2
  240. package/dist/components/ui/progress.js +1 -1
  241. package/dist/components/ui/prose.js +1 -1
  242. package/dist/components/ui/pulse-graph.js +1 -1
  243. package/dist/components/ui/pulse-series.js +1 -1
  244. package/dist/components/ui/radio-group.js +1 -1
  245. package/dist/components/ui/resizable.d.ts +129 -0
  246. package/dist/components/ui/resizable.d.ts.map +1 -0
  247. package/dist/components/ui/resizable.js +205 -0
  248. package/dist/components/ui/scroll-area.d.ts +97 -0
  249. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  250. package/dist/components/ui/scroll-area.js +68 -0
  251. package/dist/components/ui/search-dialog.d.ts +139 -0
  252. package/dist/components/ui/search-dialog.d.ts.map +1 -0
  253. package/dist/components/ui/search-dialog.js +178 -0
  254. package/dist/components/ui/section.d.ts +26 -0
  255. package/dist/components/ui/section.d.ts.map +1 -1
  256. package/dist/components/ui/section.js +32 -1
  257. package/dist/components/ui/select.js +1 -1
  258. package/dist/components/ui/separator.js +1 -1
  259. package/dist/components/ui/sheet.d.ts +103 -0
  260. package/dist/components/ui/sheet.d.ts.map +1 -0
  261. package/dist/components/ui/sheet.js +58 -0
  262. package/dist/components/ui/sidebar.d.ts +228 -0
  263. package/dist/components/ui/sidebar.d.ts.map +1 -0
  264. package/dist/components/ui/sidebar.js +172 -0
  265. package/dist/components/ui/signal-field.js +1 -1
  266. package/dist/components/ui/skeleton.js +1 -1
  267. package/dist/components/ui/slider.js +1 -1
  268. package/dist/components/ui/spinner.d.ts +79 -0
  269. package/dist/components/ui/spinner.d.ts.map +1 -0
  270. package/dist/components/ui/spinner.js +79 -0
  271. package/dist/components/ui/switch.js +1 -1
  272. package/dist/components/ui/table-sort.d.ts +97 -0
  273. package/dist/components/ui/table-sort.d.ts.map +1 -0
  274. package/dist/components/ui/table-sort.js +102 -0
  275. package/dist/components/ui/table.js +1 -1
  276. package/dist/components/ui/tabs.js +1 -1
  277. package/dist/components/ui/textarea.js +1 -1
  278. package/dist/components/ui/timeline.d.ts +106 -0
  279. package/dist/components/ui/timeline.d.ts.map +1 -0
  280. package/dist/components/ui/timeline.js +111 -0
  281. package/dist/components/ui/toast.d.ts +219 -0
  282. package/dist/components/ui/toast.d.ts.map +1 -0
  283. package/dist/components/ui/toast.js +270 -0
  284. package/dist/components/ui/toggle-group.d.ts +118 -0
  285. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  286. package/dist/components/ui/toggle-group.js +194 -0
  287. package/dist/components/ui/toggle.d.ts +73 -0
  288. package/dist/components/ui/toggle.d.ts.map +1 -0
  289. package/dist/components/ui/toggle.js +44 -0
  290. package/dist/components/ui/tooltip.js +1 -1
  291. package/dist/components/ui/tree.js +1 -1
  292. package/dist/components/ui/typography.js +1 -1
  293. package/dist/fonts/Inter-OFL.txt +93 -93
  294. package/dist/index.d.ts +72 -70
  295. package/dist/index.d.ts.map +1 -1
  296. package/dist/index.js +61 -60
  297. package/dist/lib/rank.d.ts +69 -0
  298. package/dist/lib/rank.d.ts.map +1 -0
  299. package/dist/lib/rank.js +77 -0
  300. package/dist/live/index.d.ts +22 -0
  301. package/dist/live/index.d.ts.map +1 -0
  302. package/dist/live/index.js +20 -0
  303. package/dist/live/run-stream-01/index.d.ts +3 -0
  304. package/dist/live/run-stream-01/index.d.ts.map +1 -0
  305. package/dist/live/run-stream-01/index.js +1 -0
  306. package/dist/live/run-stream-01/run-stream.d.ts +125 -0
  307. package/dist/live/run-stream-01/run-stream.d.ts.map +1 -0
  308. package/dist/live/run-stream-01/run-stream.js +111 -0
  309. package/dist/pages/auth-page/index.d.ts +15 -2
  310. package/dist/pages/auth-page/index.d.ts.map +1 -1
  311. package/dist/pages/auth-page/index.js +8 -4
  312. package/dist/pages/blog-post-page/index.js +5 -5
  313. package/dist/pages/dashboard-page/index.d.ts +4 -4
  314. package/dist/pages/dashboard-page/index.js +4 -4
  315. package/dist/pages/docs-shell/docs-shell.d.ts +37 -4
  316. package/dist/pages/docs-shell/docs-shell.d.ts.map +1 -1
  317. package/dist/pages/docs-shell/docs-shell.js +107 -16
  318. package/dist/pages/docs-shell/index.d.ts +2 -2
  319. package/dist/pages/docs-shell/index.js +1 -1
  320. package/dist/pages/index.d.ts +14 -14
  321. package/dist/pages/index.js +7 -7
  322. package/dist/pages/marketing-page/index.d.ts +6 -6
  323. package/dist/pages/marketing-page/index.js +5 -5
  324. package/dist/pages/not-found-page/index.js +4 -4
  325. package/dist/pages/settings-page/index.d.ts +3 -3
  326. package/dist/pages/settings-page/index.js +4 -4
  327. package/dist/provider/index.d.ts +4 -4
  328. package/dist/provider/index.js +2 -2
  329. package/dist/provider/provider.d.ts +1 -1
  330. package/dist/provider/provider.js +1 -1
  331. package/dist/provider/theme-script.d.ts +1 -1
  332. package/dist/provider/theme-script.js +1 -1
  333. package/dist/styles.css +689 -0
  334. package/package.json +9 -1
@@ -2,10 +2,10 @@
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Menu } from 'lucide-react';
4
4
  import { Fragment, useState } from 'react';
5
- import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from '../../components/ui/breadcrumb';
6
- import { Button } from '../../components/ui/button';
7
- import { Dialog, DialogContent, DialogTitle } from '../../components/ui/dialog';
8
- import { Separator } from '../../components/ui/separator';
5
+ import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from '../../components/ui/breadcrumb.js';
6
+ import { Button } from '../../components/ui/button.js';
7
+ import { Dialog, DialogContent, DialogTitle } from '../../components/ui/dialog.js';
8
+ import { Separator } from '../../components/ui/separator.js';
9
9
  /**
10
10
  * An application shell.
11
11
  *
@@ -1,3 +1,3 @@
1
- export { AppShell01, default } from './app-shell';
2
- export type { AppShell01Props, AppShellCrumb } from './app-shell';
1
+ export { AppShell01, default } from './app-shell.js';
2
+ export type { AppShell01Props, AppShellCrumb } from './app-shell.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- export { AppShell01, default } from './app-shell';
1
+ export { AppShell01, default } from './app-shell.js';
@@ -1,4 +1,5 @@
1
1
  import type { FormEvent, ReactNode } from 'react';
2
+ import type { HeadingLevel } from '../../components/ui/section.js';
2
3
  export type AuthFormField = {
3
4
  id: string;
4
5
  label: string;
@@ -22,6 +23,15 @@ export type AuthFormRemember = {
22
23
  };
23
24
  export type AuthForm01Props = {
24
25
  title: string;
26
+ /**
27
+ * Heading level for the card's title. See `HeadingLevel`.
28
+ *
29
+ * This Block draws no Section heading of its own, so the card title is the one
30
+ * heading it renders and takes the level directly rather than a step below one.
31
+ * It is a prop for the same reason every Block's is: the surrounding document
32
+ * decides where this lands in the outline, not the Block.
33
+ */
34
+ headingLevel?: HeadingLevel;
25
35
  description?: string;
26
36
  /** The credential fields, in order. */
27
37
  fields: AuthFormField[];
@@ -47,6 +57,6 @@ export type AuthForm01Props = {
47
57
  * the submit handler come from the consumer, and the error line is a prop so
48
58
  * the consumer's validation decides when it appears. Every string is a prop.
49
59
  */
50
- export declare function AuthForm01({ title, description, fields, error, remember, submitLabel, pendingLabel, pending, onSubmit, footer, }: AuthForm01Props): import("react").JSX.Element;
60
+ export declare function AuthForm01({ title, description, fields, error, remember, submitLabel, pendingLabel, pending, onSubmit, footer, headingLevel, }: AuthForm01Props): import("react").JSX.Element;
51
61
  export default AuthForm01;
52
62
  //# sourceMappingURL=auth-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-form.d.ts","sourceRoot":"","sources":["../../../src/blocks/auth-form-01/auth-form.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAqBjD,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;IACpC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CA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C/B,WAAW,EAAE,MAAM,CAAA;IACnB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAA;IACtD,oEAAoE;IACpE,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,OAAe,EACf,QAAQ,EACR,MAAM,EACN,YAAmB,GACpB,EAAE,eAAe,+BAwEjB;AAED,eAAe,UAAU,CAAA"}
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { CircleAlert } from 'lucide-react';
4
- import { Alert, AlertDescription } from '../../components/ui/alert';
5
- import { Button } from '../../components/ui/button';
6
- import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from '../../components/ui/card';
7
- import { Checkbox } from '../../components/ui/checkbox';
8
- import { Field, FieldDescription, FieldGroup, FieldLabel, } from '../../components/ui/field';
9
- import { Input } from '../../components/ui/input';
4
+ import { Alert, AlertDescription } from '../../components/ui/alert.js';
5
+ import { Button } from '../../components/ui/button.js';
6
+ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from '../../components/ui/card.js';
7
+ import { Checkbox } from '../../components/ui/checkbox.js';
8
+ import { Field, FieldDescription, FieldGroup, FieldLabel, } from '../../components/ui/field.js';
9
+ import { Input } from '../../components/ui/input.js';
10
10
  /**
11
11
  * A sign-in card.
12
12
  *
@@ -15,8 +15,11 @@ import { Input } from '../../components/ui/input';
15
15
  * the submit handler come from the consumer, and the error line is a prop so
16
16
  * the consumer's validation decides when it appears. Every string is a prop.
17
17
  */
18
- export function AuthForm01({ title, description, fields, error, remember, submitLabel, pendingLabel, pending = false, onSubmit, footer, }) {
19
- return (_jsx("form", { onSubmit: onSubmit, className: "w-full", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: title }), description ? _jsx(CardDescription, { children: description }) : null] }), _jsxs(CardContent, { className: "flex flex-col gap-4", children: [error ? (_jsxs(Alert, { variant: "destructive", children: [_jsx(CircleAlert, {}), _jsx(AlertDescription, { children: error })] })) : null, _jsx(FieldGroup, { children: fields.map((field) => (_jsxs(Field, { children: [_jsx(FieldLabel, { htmlFor: field.id, children: field.label }), _jsx(Input, { id: field.id, type: field.type ?? 'text', placeholder: field.placeholder, autoComplete: field.autoComplete, value: field.value, defaultValue: field.defaultValue, onChange: field.onChange
18
+ export function AuthForm01({ title, description, fields, error, remember, submitLabel, pendingLabel, pending = false, onSubmit, footer, headingLevel = 'h2', }) {
19
+ // This Block draws no section heading, so the card title is the one heading it
20
+ // renders and takes the level directly rather than a step below one.
21
+ const Title = headingLevel;
22
+ return (_jsx("form", { onSubmit: onSubmit, className: "w-full", children: _jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: _jsx(Title, { children: title }) }), description ? _jsx(CardDescription, { children: description }) : null] }), _jsxs(CardContent, { className: "flex flex-col gap-4", children: [error ? (_jsxs(Alert, { variant: "destructive", children: [_jsx(CircleAlert, {}), _jsx(AlertDescription, { children: error })] })) : null, _jsx(FieldGroup, { children: fields.map((field) => (_jsxs(Field, { children: [_jsx(FieldLabel, { htmlFor: field.id, children: field.label }), _jsx(Input, { id: field.id, type: field.type ?? 'text', placeholder: field.placeholder, autoComplete: field.autoComplete, value: field.value, defaultValue: field.defaultValue, onChange: field.onChange
20
23
  ? (event) => field.onChange?.(event.target.value)
21
24
  : undefined, required: field.required, disabled: field.disabled, "aria-invalid": error ? true : undefined }), field.description ? (_jsx(FieldDescription, { children: field.description })) : null] }, field.id))) }), remember ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Checkbox, { id: remember.id, checked: remember.checked, defaultChecked: remember.defaultChecked, onCheckedChange: remember.onCheckedChange, disabled: remember.disabled }), _jsx(FieldLabel, { htmlFor: remember.id, children: remember.label })] })) : null] }), _jsxs(CardFooter, { className: "flex-col gap-3", children: [_jsx(Button, { type: "submit", className: "w-full", disabled: pending, children: pending ? (pendingLabel ?? submitLabel) : submitLabel }), footer] })] }) }));
22
25
  }
@@ -1,3 +1,3 @@
1
- export { AuthForm01, default } from './auth-form';
2
- export type { AuthForm01Props, AuthFormField, AuthFormRemember } from './auth-form';
1
+ export { AuthForm01, default } from './auth-form.js';
2
+ export type { AuthForm01Props, AuthFormField, AuthFormRemember } from './auth-form.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- export { AuthForm01, default } from './auth-form';
1
+ export { AuthForm01, default } from './auth-form.js';
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import { type HeadingLevel } from '../../components/ui/section';
2
+ import { type HeadingLevel } from '../../components/ui/section.js';
3
3
  /**
4
4
  * One closing action.
5
5
  *
@@ -24,23 +24,28 @@ export type Cta01Action = {
24
24
  /**
25
25
  * Which weight this action draws at, when the caller does not say.
26
26
  *
27
- * **A panel wants `default` or `secondary`, never `outline`.** This Block draws
28
- * its band as a filled `bg-primary` surface and sets the band's ink to
29
- * `--primary-foreground`, so every ink inside it is inherited from that panel
30
- * rather than from the page. An `outline` action sets its own fill
31
- * (`bg-background`) and, before this was settled, left its ink inherited, which
32
- * put `--background` behind `--primary-foreground`. In the lavender pack's dark
33
- * mode that is `#19171b` behind `#210c33`, or 1.01:1: a focusable, announced,
34
- * unreadable button.
27
+ * **A filled panel wants `secondary` or `outline`, and never `default`.** The
28
+ * property that decides it is not the ink but the fill: this Block draws its
29
+ * band as a filled `bg-primary` surface, and `default` fills with `--primary`,
30
+ * so a `default` action on this band is the band's own colour against the
31
+ * band's own colour. Its label is legible, because `primary-foreground` on
32
+ * `primary` is a gated pair, and the control has no edge, which is a different
33
+ * defect and the reason this sentence is about the fill rather than the text.
35
34
  *
36
- * Both defaults below are self-contained, which is the property that matters:
37
- * `default` pairs `--primary` with `--primary-foreground` and `secondary`
38
- * pairs `--secondary` with `--secondary-foreground`, and a pair the Block
39
- * chooses cannot be changed by whatever surface the Block is placed on. The
40
- * `outline` variant is fixed too, in `cta-link.tsx`, because a variant that
41
- * sets a fill should set the matching ink rather than inherit whatever it lands
42
- * on. It is kept in the type because a caller may want it once the ink is
43
- * explicit, and dropping it would be a smaller answer than the defect.
35
+ * `secondary` and `outline` are the two that answer, and what makes them
36
+ * answer is that each states its own ink rather than inheriting one. That is
37
+ * the part that was broken and is now settled: `outline` carried `bg-background`
38
+ * with no `text-` of its own, so inside this band it was `--background` behind
39
+ * the inherited `--primary-foreground`, which in lavender's dark mode measured
40
+ * 1.01:1 and in the base pack's light mode 1.00:1, a focusable, announced,
41
+ * unreadable button. The variant is fixed in `cta-link.tsx`, where a variant
42
+ * that sets a fill now states the matching ink, and
43
+ * `packages/ui/scripts/check-variant-ink.mjs` is the gate that holds it there.
44
+ *
45
+ * So a panel may take all three, and the settled defaults are the two that
46
+ * carry a fill distinct from the band. Which of the two a given action wants is
47
+ * the caller's: `secondary` for the one ask, `outline` for the alternative
48
+ * beside it.
44
49
  */
45
50
  variant?: 'default' | 'secondary' | 'outline';
46
51
  };
@@ -73,10 +78,10 @@ export type Cta01Props = {
73
78
  *
74
79
  * Its default weight is `outline`, which is the settled answer for the pair:
75
80
  * the primary action is filled and this one is not, so the two read as one
76
- * decision and one alternative rather than as two competing asks. What `outline`
77
- * may not do is inherit its ink from the filled band behind it, and that is
78
- * now a property of the variant rather than of where a caller puts it. See
79
- * `Cta01Action`'s `variant` for the measurement.
81
+ * decision and one alternative rather than as two competing asks. It is safe on
82
+ * the filled band because the variant carries its own ink rather than
83
+ * inheriting the band's, which is a property of the variant and no longer of
84
+ * where a caller puts it. See `Cta01Action`'s `variant` for the measurement.
80
85
  */
81
86
  secondaryAction?: Cta01Action;
82
87
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cta.d.ts","sourceRoot":"","sources":["../../../src/blocks/cta-01/cta.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAExE;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,CAAC,EAAE,WAAW,CAAA;IAC7B;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,IAAI,EACJ,YAAmB,GACpB,EAAE,UAAU,+BAyDZ;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"cta.d.ts","sourceRoot":"","sources":["../../../src/blocks/cta-01/cta.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAExE;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,CAAC,EAAE,WAAW,CAAA;IAC7B;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,IAAI,EACJ,YAAmB,GACpB,EAAE,UAAU,+BAyDZ;AAED,eAAe,KAAK,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ArrowRight } from 'lucide-react';
3
- import { CtaLink } from '../../components/ui/cta-link';
4
- import { Section } from '../../components/ui/section';
3
+ import { CtaLink } from '../../components/ui/cta-link.js';
4
+ import { Section } from '../../components/ui/section.js';
5
5
  /**
6
6
  * A closing call to action on a filled primary surface.
7
7
  *
@@ -1,3 +1,3 @@
1
- export { Cta01, default } from './cta';
2
- export type { Cta01Action, Cta01Props } from './cta';
1
+ export { Cta01, default } from './cta.js';
2
+ export type { Cta01Action, Cta01Props } from './cta.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- export { Cta01, default } from './cta';
1
+ export { Cta01, default } from './cta.js';
@@ -2,13 +2,13 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { ChevronDown, ListFilter, MoreHorizontal, Search } from 'lucide-react';
4
4
  import { useState } from 'react';
5
- import { Button } from '../../components/ui/button';
6
- import { Checkbox } from '../../components/ui/checkbox';
7
- import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from '../../components/ui/dropdown-menu';
8
- import { Input } from '../../components/ui/input';
9
- import { Pagination, PaginationContent, PaginationItem } from '../../components/ui/pagination';
10
- import { Popover, PopoverContent, PopoverTrigger } from '../../components/ui/popover';
11
- import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, } from '../../components/ui/table';
5
+ import { Button } from '../../components/ui/button.js';
6
+ import { Checkbox } from '../../components/ui/checkbox.js';
7
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from '../../components/ui/dropdown-menu.js';
8
+ import { Input } from '../../components/ui/input.js';
9
+ import { Pagination, PaginationContent, PaginationItem } from '../../components/ui/pagination.js';
10
+ import { Popover, PopoverContent, PopoverTrigger } from '../../components/ui/popover.js';
11
+ import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, } from '../../components/ui/table.js';
12
12
  /** The page numbers to show, with `ellipsis` where a run is held back. */
13
13
  function pageWindow(page, pageCount) {
14
14
  if (pageCount <= 7) {
@@ -1,3 +1,3 @@
1
- export { DataTable01, default } from './data-table';
2
- export type { DataTable01Props, DataTable01Labels, DataTableColumn, DataTableFilter, DataTableFilterOption, DataTableRow, DataTableRowAction, } from './data-table';
1
+ export { DataTable01, default } from './data-table.js';
2
+ export type { DataTable01Props, DataTable01Labels, DataTableColumn, DataTableFilter, DataTableFilterOption, DataTableRow, DataTableRowAction, } from './data-table.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- export { DataTable01, default } from './data-table';
1
+ export { DataTable01, default } from './data-table.js';
@@ -0,0 +1,143 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * The three reasons a region has nothing in it.
4
+ *
5
+ * **Three, and the set is closed because the three want different words and
6
+ * different actions, so a consumer who cannot say which one they have writes
7
+ * "No data".** That is the whole failure this Block exists to prevent, and it is
8
+ * a failure rather than a style preference because the three are answers to three
9
+ * different questions and the reader acts on each one differently:
10
+ *
11
+ * - `first-run` - nothing has ever existed here. The reader is not blocked, they
12
+ * are at the beginning, and the action is to *make the first one*. A sentence
13
+ * that says nothing is available and an action that creates is the whole state.
14
+ * - `no-match` - things exist and the reader's own filter removed all of them.
15
+ * The reader is not at the beginning and nothing is missing; the action is to
16
+ * *widen or clear the filter*, and offering to create something here invents
17
+ * work the reader does not need.
18
+ * - `not-permitted` - things exist and this reader may not see them. The action
19
+ * is to *ask for access or change context*, and a create action here is a lie
20
+ * about what the reader can do, which is worse than no action at all.
21
+ *
22
+ * A fourth such as `error` or `loading` is deliberately absent: those are states
23
+ * the surrounding surface already owns, and a region that is erroring has an
24
+ * `Alert` and a region that is loading has a `Spinner`. A Block that drew them
25
+ * would give a consumer two places to put the same fact.
26
+ *
27
+ * @see EMPTY_REASONS
28
+ */
29
+ export declare const EMPTY_REASONS: readonly ["first-run", "no-match", "not-permitted"];
30
+ /**
31
+ * One of the three reasons a region has nothing in it.
32
+ *
33
+ * The reason is a machine value and never reader-facing text. The words are the
34
+ * consumer's: two products call the same state "Nothing here yet" and "Your
35
+ * account is new", and neither sentence is Prism's to publish.
36
+ */
37
+ export type EmptyReason = (typeof EMPTY_REASONS)[number];
38
+ /**
39
+ * The props an EmptyState01 takes.
40
+ *
41
+ * Every string is a prop and the Block ships none: no headline, no sentence, no
42
+ * action label and no reason word. A Block that rendered "No data" would put a
43
+ * sentence about a product that is not its own into four consumer sites, and the
44
+ * corpus publishes it as the design system's own voice.
45
+ */
46
+ export type EmptyState01Props = {
47
+ /**
48
+ * Which of the three situations this is. Required rather than defaulted,
49
+ * because the default would be the one that hides the bug: a Block that
50
+ * defaulted to `first-run` would render a create action beside a permission
51
+ * boundary, and a Block that defaulted to `no-match` would tell every reader
52
+ * their own filter removed something on their first visit. Making the caller
53
+ * name the reason is what stops either from happening quietly.
54
+ */
55
+ reason: EmptyReason;
56
+ /**
57
+ * The headline: what is not here, in the reader's own words. Required, because
58
+ * the Block's only job is to carry a sentence and a reason together, and a
59
+ * region with a frame and no words is a box a reader has to interpret.
60
+ */
61
+ title: string;
62
+ /**
63
+ * The sentence under the headline, for the part the headline cannot fit: what
64
+ * to do about it, or what the reader should know before they act. Omit it when
65
+ * the headline is the whole message.
66
+ */
67
+ body?: string;
68
+ /**
69
+ * The label of the one action, in the product's own words.
70
+ *
71
+ * Optional, and its absence is a legitimate state rather than a gap: a region
72
+ * a reader cannot act on - a permission boundary, an archived-only view, a
73
+ * feature that is switched off for their plan - has no next step, and inventing
74
+ * one is how an empty state ends up offering a reader a button that cannot
75
+ * help them. `reason` does not require it either, because the same rule applies
76
+ * across the three: the action exists when the reader has something to do.
77
+ */
78
+ actionLabel?: string;
79
+ /**
80
+ * The handler for `actionLabel`. Required whenever `actionLabel` is passed, and
81
+ * the Block throws without it rather than rendering a button that does nothing:
82
+ * a disabled-looking control with no `disabled` is a control that lies.
83
+ */
84
+ onAction?: () => void;
85
+ /**
86
+ * The mark above the words, as a slot.
87
+ *
88
+ * A slot and not an icon the Block picks, because the mark that means "nothing
89
+ * here yet" and the mark that means "you cannot see this" are different marks,
90
+ * and a Block that chose one would give four products an icon that is wrong for
91
+ * one of the three reasons. It is `aria-hidden` wherever a consumer puts it: the
92
+ * reason is carried by the words, and an icon a screen reader reads is a second
93
+ * announcement of the same sentence.
94
+ */
95
+ icon?: ReactNode;
96
+ /**
97
+ * Layout only, exactly as on every Component and Block. Changing a Prism-owned
98
+ * visual property from here is prohibited.
99
+ */
100
+ className?: string;
101
+ };
102
+ /**
103
+ * The state a region shows when it has nothing in it: a framed mark, a headline,
104
+ * a sentence and at most one action.
105
+ *
106
+ * **The design decision is the `reason` prop, and it is the reason this is a Block
107
+ * rather than a Component.** An empty state looks like one thing, which is why it
108
+ * has been written by hand in every product that has one, and it is actually three
109
+ * things that need different words and different actions. A component with a
110
+ * `title` and a `body` and an `action` cannot express the difference, so every
111
+ * consumer re-decides it in their own words and at least one of them gets it
112
+ * wrong: a permission boundary that offers "Create your first project", or a
113
+ * first-run state that says "No results found". Naming the reason forces the
114
+ * decision into the open and gives the Block something to enforce.
115
+ *
116
+ * **A Block and not a Component because it is a composition of five decisions
117
+ * rather than one control.** A mark, a headline, a sentence, an action and a
118
+ * region-sized frame: each of those has been re-decided by hand in every product
119
+ * that has an empty state, and `DESIGN.md` records the resolution of the retired
120
+ * `empty` Component as exactly this shape. It ships no copy, takes no data and
121
+ * fetches nothing.
122
+ *
123
+ * **The region keeps its size.** The frame is a `min-h-*` and a dashed border
124
+ * rather than a fixed height, and it is drawn with `size-*` on the mark, because
125
+ * an empty state is what a region looks like *before* its content arrives. A
126
+ * region that is one line tall while it is empty and forty lines tall once it is
127
+ * full moves everything below it twice, and the reader's eye has to find the
128
+ * thing twice. This is the same layout shift the `Spinner` records as its own
129
+ * honest cost, and the reason a `first-run` frame wants a floor under it.
130
+ *
131
+ * **The action is one, and it is not required.** An empty state offering three
132
+ * actions is a form, and a form in a region that has nothing in it is a form with
133
+ * nothing to submit. One action is the next step; the rest belong in the
134
+ * surrounding surface, where the reader can see them without this region
135
+ * competing.
136
+ *
137
+ * It is a server Component. It holds no state and imports no client code, so a
138
+ * consumer that passes a client action inside it pays for the action and not for
139
+ * the frame.
140
+ */
141
+ export declare function EmptyState01({ reason, title, body, actionLabel, onAction, icon, className, }: EmptyState01Props): import("react").JSX.Element;
142
+ export default EmptyState01;
143
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../src/blocks/empty-state-01/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,aAAa,qDAAsD,CAAA;AAEhF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAuBxD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;OAOG;IACH,MAAM,EAAE,WAAW,CAAA;IACnB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,EAAE,iBAAiB,+BAoEnB;AAED,eAAe,YAAY,CAAA"}
@@ -0,0 +1,104 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from '../../components/ui/button.js';
3
+ import { cn } from '../../lib/utils.js';
4
+ /**
5
+ * The three reasons a region has nothing in it.
6
+ *
7
+ * **Three, and the set is closed because the three want different words and
8
+ * different actions, so a consumer who cannot say which one they have writes
9
+ * "No data".** That is the whole failure this Block exists to prevent, and it is
10
+ * a failure rather than a style preference because the three are answers to three
11
+ * different questions and the reader acts on each one differently:
12
+ *
13
+ * - `first-run` - nothing has ever existed here. The reader is not blocked, they
14
+ * are at the beginning, and the action is to *make the first one*. A sentence
15
+ * that says nothing is available and an action that creates is the whole state.
16
+ * - `no-match` - things exist and the reader's own filter removed all of them.
17
+ * The reader is not at the beginning and nothing is missing; the action is to
18
+ * *widen or clear the filter*, and offering to create something here invents
19
+ * work the reader does not need.
20
+ * - `not-permitted` - things exist and this reader may not see them. The action
21
+ * is to *ask for access or change context*, and a create action here is a lie
22
+ * about what the reader can do, which is worse than no action at all.
23
+ *
24
+ * A fourth such as `error` or `loading` is deliberately absent: those are states
25
+ * the surrounding surface already owns, and a region that is erroring has an
26
+ * `Alert` and a region that is loading has a `Spinner`. A Block that drew them
27
+ * would give a consumer two places to put the same fact.
28
+ *
29
+ * @see EMPTY_REASONS
30
+ */
31
+ export const EMPTY_REASONS = ['first-run', 'no-match', 'not-permitted'];
32
+ /**
33
+ * The one thing that differs between the three frames.
34
+ *
35
+ * **The frame is shared and the difference is an ink, and that is a decision
36
+ * about honesty rather than about looks.** All three get the same dashed edge and
37
+ * the same floor under them, because all three mean *there is nothing here to
38
+ * read*. What they must not share is a claim about why, and a tint or a border
39
+ * hue would be one: a region drawn in a warning colour tells the reader their
40
+ * filter, or their permissions, is a problem, and in the second case it is not.
41
+ *
42
+ * So only `not-permitted` carries an ink, and it is `muted-foreground` rather
43
+ * than a destructive tone. A permission boundary is not a failure, and painting
44
+ * it red teaches a reader to ignore red for the things that are urgent. The
45
+ * distinction the reader actually needs is *you cannot see this* against *this is
46
+ * broken*, and the words carry it; the frame says only that the region is empty,
47
+ * which is true of all three.
48
+ */
49
+ const REASON_INK = {
50
+ 'not-permitted': 'text-muted-foreground',
51
+ };
52
+ /**
53
+ * The state a region shows when it has nothing in it: a framed mark, a headline,
54
+ * a sentence and at most one action.
55
+ *
56
+ * **The design decision is the `reason` prop, and it is the reason this is a Block
57
+ * rather than a Component.** An empty state looks like one thing, which is why it
58
+ * has been written by hand in every product that has one, and it is actually three
59
+ * things that need different words and different actions. A component with a
60
+ * `title` and a `body` and an `action` cannot express the difference, so every
61
+ * consumer re-decides it in their own words and at least one of them gets it
62
+ * wrong: a permission boundary that offers "Create your first project", or a
63
+ * first-run state that says "No results found". Naming the reason forces the
64
+ * decision into the open and gives the Block something to enforce.
65
+ *
66
+ * **A Block and not a Component because it is a composition of five decisions
67
+ * rather than one control.** A mark, a headline, a sentence, an action and a
68
+ * region-sized frame: each of those has been re-decided by hand in every product
69
+ * that has an empty state, and `DESIGN.md` records the resolution of the retired
70
+ * `empty` Component as exactly this shape. It ships no copy, takes no data and
71
+ * fetches nothing.
72
+ *
73
+ * **The region keeps its size.** The frame is a `min-h-*` and a dashed border
74
+ * rather than a fixed height, and it is drawn with `size-*` on the mark, because
75
+ * an empty state is what a region looks like *before* its content arrives. A
76
+ * region that is one line tall while it is empty and forty lines tall once it is
77
+ * full moves everything below it twice, and the reader's eye has to find the
78
+ * thing twice. This is the same layout shift the `Spinner` records as its own
79
+ * honest cost, and the reason a `first-run` frame wants a floor under it.
80
+ *
81
+ * **The action is one, and it is not required.** An empty state offering three
82
+ * actions is a form, and a form in a region that has nothing in it is a form with
83
+ * nothing to submit. One action is the next step; the rest belong in the
84
+ * surrounding surface, where the reader can see them without this region
85
+ * competing.
86
+ *
87
+ * It is a server Component. It holds no state and imports no client code, so a
88
+ * consumer that passes a client action inside it pays for the action and not for
89
+ * the frame.
90
+ */
91
+ export function EmptyState01({ reason, title, body, actionLabel, onAction, icon, className, }) {
92
+ if (actionLabel !== undefined && onAction === undefined) {
93
+ throw new Error(`EmptyState01: an actionLabel of '${actionLabel}' was passed with no onAction, so the button ` +
94
+ 'would read as available and do nothing. Pass the handler, or drop the label and leave the ' +
95
+ 'region without a next step.');
96
+ }
97
+ return (_jsxs("div", { "data-slot": "empty-state", "data-reason": reason, className: cn(
98
+ // Centred and given a floor under it, because this is the whole of the
99
+ // region rather than a note beside content. `min-h-64` is roughly six
100
+ // lines, which is what a full page of rows costs; a shorter empty state
101
+ // makes the region jump when its content arrives.
102
+ 'border-border bg-card flex min-h-64 flex-col items-center justify-center gap-3 rounded-xl border border-dashed p-8 text-center', REASON_INK[reason], className), children: [icon === undefined ? null : (_jsx("div", { "data-slot": "empty-state-icon", "aria-hidden": true, className: "text-muted-foreground flex-none", children: icon })), _jsx("p", { "data-slot": "empty-state-title", className: "text-base font-semibold text-balance", children: title }), body === undefined ? null : (_jsx("p", { "data-slot": "empty-state-body", className: "text-muted-foreground max-w-measure-narrow text-pretty text-sm", children: body })), actionLabel === undefined ? null : (_jsx(Button, { "data-slot": "empty-state-action", type: "button", className: "mt-2", onClick: onAction, children: actionLabel }))] }));
103
+ }
104
+ export default EmptyState01;
@@ -0,0 +1,3 @@
1
+ export { EmptyState01, EMPTY_REASONS, default } from './empty-state.js';
2
+ export type { EmptyState01Props, EmptyReason } from './empty-state.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/blocks/empty-state-01/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACpE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1 @@
1
+ export { EmptyState01, EMPTY_REASONS, default } from './empty-state.js';
@@ -1,5 +1,5 @@
1
1
  import type { LucideIcon } from 'lucide-react';
2
- import { type HeadingLevel } from '../../components/ui/section';
2
+ import { type HeadingLevel } from '../../components/ui/section.js';
3
3
  /**
4
4
  * One feature in an icon-bearing grid.
5
5
  *
@@ -72,6 +72,33 @@ export type FeatureGrid01Props = FeatureGrid01CommonProps & ({
72
72
  * The `icon` variant renders a tile per feature and requires an icon per feature.
73
73
  * The `bare` variant renders no tile and requires no icon, and the type says so
74
74
  * rather than the renderer finding out.
75
+ *
76
+ * **The section heading is aligned left, and that is this Block joining the other
77
+ * eight rather than inventing an answer.** `SectionHeading` states its own rule:
78
+ * `center` is right for a band that is only a heading, and `left` is right for a
79
+ * section with content under it, because a centred title above a left-aligned
80
+ * grid reads as two unrelated pieces. A grid of cards is content under its
81
+ * heading, so the rule says left. `NoteGrid01`, `StackGrid01`, `StatusLedger01`,
82
+ * `ProductGrid01`, `LogoStrip01`, `Stats01`, `ProcessRail01` and `ProcessFlow01`
83
+ * all pass `align="left"` for that reason, and this one did not, so it was one of
84
+ * only two Blocks in the package that centred a heading over content.
85
+ *
86
+ * The cost was not visible in this repository, which previews one Block at a time
87
+ * and so never put a centred title next to a left-aligned one. It was visible in
88
+ * the consumer: the Nexus landing is composed from seven of these Blocks and put
89
+ * two centred section titles among five left ones, and the page's own rhythm read
90
+ * as an accident rather than as a decision. A page's composition is the consumer's,
91
+ * but a Block that is the only one of its kind answering a shared question is not a
92
+ * composition the consumer can correct without restyling a catalogue item, which
93
+ * the no-override-path rule does not allow.
94
+ *
95
+ * `Hero01` is the deliberate exception and keeps its own `align`, and `Cta01` draws
96
+ * no section heading at all: a centred hero is a band that is only a heading, the
97
+ * two-column form puts its figure beside the copy rather than under it, and the
98
+ * closing band is a title and two actions on a filled panel with nothing underneath.
99
+ * `test/section-heading-align.test.tsx` holds the whole list, which is the
100
+ * assertion, so a Block that opens with a heading and content under it cannot be
101
+ * added answering this question a second way.
75
102
  */
76
103
  export declare function FeatureGrid01(props: FeatureGrid01Props): import("react").JSX.Element;
77
104
  export default FeatureGrid01;
@@ -1 +1 @@
1
- {"version":3,"file":"feature-grid.d.ts","sourceRoot":"","sources":["../../../src/blocks/feature-grid-01/feature-grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;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