@sdxc/ui 2026.11.27 → 2026.11.29

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 (417) hide show
  1. package/README.md +265 -162
  2. package/dist/app/app-shell.d.ts +85 -50
  3. package/dist/app/app-shell.js +419 -222
  4. package/dist/app/auto-refresh.d.ts +68 -51
  5. package/dist/app/auto-refresh.js +193 -61
  6. package/dist/app/board.d.ts +40 -17
  7. package/dist/app/board.js +173 -88
  8. package/dist/app/chart.d.ts +10 -63
  9. package/dist/app/chart.js +22 -29
  10. package/dist/app/code-view.d.ts +12 -11
  11. package/dist/app/code-view.js +83 -19
  12. package/dist/app/command-palette.d.ts +61 -33
  13. package/dist/app/command-palette.js +178 -32
  14. package/dist/app/contribution-graph.d.ts +30 -14
  15. package/dist/app/contribution-graph.js +87 -26
  16. package/dist/app/danger-zone.d.ts +40 -35
  17. package/dist/app/danger-zone.js +177 -34
  18. package/dist/app/detail-sheet.d.ts +42 -51
  19. package/dist/app/detail-sheet.js +156 -37
  20. package/dist/app/diff.d.ts +6 -5
  21. package/dist/app/diff.js +9 -6
  22. package/dist/app/drop-zone.d.ts +3 -13
  23. package/dist/app/drop-zone.js +2 -2
  24. package/dist/app/editor-layout.d.ts +69 -47
  25. package/dist/app/editor-layout.js +256 -115
  26. package/dist/app/empty.d.ts +16 -12
  27. package/dist/app/empty.js +45 -19
  28. package/dist/app/file-trigger.d.ts +5 -13
  29. package/dist/app/file-trigger.js +3 -4
  30. package/dist/app/filter-bar.d.ts +182 -120
  31. package/dist/app/filter-bar.js +509 -161
  32. package/dist/app/filter-menu.d.ts +51 -33
  33. package/dist/app/filter-menu.js +105 -40
  34. package/dist/app/gantt.d.ts +67 -27
  35. package/dist/app/gantt.js +320 -163
  36. package/dist/app/grid-list.d.ts +2 -15
  37. package/dist/app/grid-list.js +3 -3
  38. package/dist/app/merge-box.d.ts +58 -52
  39. package/dist/app/merge-box.js +107 -46
  40. package/dist/app/mixins/optimistic-toggle-sync.d.ts +2 -2
  41. package/dist/app/mixins/optimistic-toggle-sync.js +3 -2
  42. package/dist/app/mixins/range-picker-keys.d.ts +1 -1
  43. package/dist/app/mixins/range-picker-keys.js +1 -1
  44. package/dist/app/mixins/save-bar-sync.d.ts +1 -1
  45. package/dist/app/mixins/save-bar-sync.js +3 -2
  46. package/dist/app/mixins/split-view.d.ts +3 -1
  47. package/dist/app/mixins/split-view.js +16 -8
  48. package/dist/app/optimistic-toggle.d.ts +65 -37
  49. package/dist/app/optimistic-toggle.js +38 -15
  50. package/dist/app/page-header.d.ts +80 -58
  51. package/dist/app/page-header.js +329 -154
  52. package/dist/app/profile-picker.d.ts +31 -24
  53. package/dist/app/profile-picker.js +134 -58
  54. package/dist/app/range-picker.d.ts +62 -59
  55. package/dist/app/range-picker.js +124 -37
  56. package/dist/app/review-thread.d.ts +69 -66
  57. package/dist/app/review-thread.js +203 -53
  58. package/dist/app/save-bar.d.ts +56 -27
  59. package/dist/app/save-bar.js +66 -14
  60. package/dist/app/selection-bar.d.ts +64 -66
  61. package/dist/app/selection-bar.js +157 -56
  62. package/dist/app/settings-layout.d.ts +65 -52
  63. package/dist/app/settings-layout.js +198 -71
  64. package/dist/app/settings-section.d.ts +86 -93
  65. package/dist/app/settings-section.js +297 -120
  66. package/dist/app/shortcut-list.d.ts +19 -8
  67. package/dist/app/shortcut-list.js +50 -9
  68. package/dist/app/sparkline.d.ts +14 -16
  69. package/dist/app/sparkline.js +20 -7
  70. package/dist/app/split-view.d.ts +66 -42
  71. package/dist/app/split-view.js +235 -128
  72. package/dist/app/stat-card.d.ts +16 -4
  73. package/dist/app/stat-card.js +57 -21
  74. package/dist/app/status-strip.d.ts +24 -25
  75. package/dist/app/status-strip.js +82 -25
  76. package/dist/app/tab-bar.d.ts +15 -7
  77. package/dist/app/tab-bar.js +74 -37
  78. package/dist/app/table.d.ts +37 -38
  79. package/dist/app/table.js +101 -45
  80. package/dist/app/view-options.d.ts +100 -76
  81. package/dist/app/view-options.js +263 -129
  82. package/dist/audio/media-tile.d.ts +33 -21
  83. package/dist/audio/media-tile.js +139 -79
  84. package/dist/audio/player-bar.d.ts +24 -43
  85. package/dist/audio/player-bar.js +183 -118
  86. package/dist/audio/queue-list.d.ts +40 -36
  87. package/dist/audio/queue-list.js +172 -73
  88. package/dist/audio/track-list.d.ts +53 -54
  89. package/dist/audio/track-list.js +127 -35
  90. package/dist/blog/archive-list.d.ts +158 -0
  91. package/dist/blog/archive-list.js +353 -0
  92. package/dist/blog/article-layout.d.ts +81 -0
  93. package/dist/blog/article-layout.js +211 -0
  94. package/dist/blog/author-card.d.ts +99 -0
  95. package/dist/blog/author-card.js +184 -0
  96. package/dist/blog/blog-masthead.d.ts +55 -0
  97. package/dist/blog/blog-masthead.js +143 -0
  98. package/dist/blog/index.d.ts +21 -0
  99. package/dist/blog/index.js +21 -0
  100. package/dist/blog/link-host.d.ts +47 -0
  101. package/dist/blog/link-host.js +61 -0
  102. package/dist/blog/newsletter-form.d.ts +66 -0
  103. package/dist/blog/newsletter-form.js +100 -0
  104. package/dist/blog/post-byline.d.ts +96 -0
  105. package/dist/blog/post-byline.js +180 -0
  106. package/dist/blog/post-entry.d.ts +153 -0
  107. package/dist/blog/post-entry.js +402 -0
  108. package/dist/blog/post-stream.d.ts +92 -0
  109. package/dist/blog/post-stream.js +163 -0
  110. package/dist/blog/series-nav.d.ts +144 -0
  111. package/dist/blog/series-nav.js +275 -0
  112. package/dist/blog/tag-cloud.d.ts +103 -0
  113. package/dist/blog/tag-cloud.js +138 -0
  114. package/dist/blog/tag-list.d.ts +91 -0
  115. package/dist/blog/tag-list.js +92 -0
  116. package/dist/blog/widget.d.ts +68 -0
  117. package/dist/blog/widget.js +61 -0
  118. package/dist/chat/activity.d.ts +47 -15
  119. package/dist/chat/activity.js +124 -46
  120. package/dist/chat/mention-menu.d.ts +6 -7
  121. package/dist/chat/mention-menu.js +4 -4
  122. package/dist/chat/message-group.d.ts +17 -4
  123. package/dist/chat/message-group.js +29 -6
  124. package/dist/color/color-field.d.ts +41 -68
  125. package/dist/color/color-field.js +21 -38
  126. package/dist/color/color-picker.d.ts +10 -61
  127. package/dist/color/color-picker.js +7 -15
  128. package/dist/color/color-swatch-picker.d.ts +0 -11
  129. package/dist/color/color-swatch-picker.js +2 -3
  130. package/dist/color/color-wheel.d.ts +3 -13
  131. package/dist/color/color-wheel.js +1 -2
  132. package/dist/commerce/cart-drawer.d.ts +41 -24
  133. package/dist/commerce/cart-drawer.js +129 -58
  134. package/dist/commerce/cart-line.d.ts +34 -19
  135. package/dist/commerce/cart-line.js +94 -28
  136. package/dist/commerce/checkout-layout.d.ts +23 -19
  137. package/dist/commerce/checkout-layout.js +53 -24
  138. package/dist/commerce/facet-filters.d.ts +57 -59
  139. package/dist/commerce/facet-filters.js +219 -129
  140. package/dist/commerce/item-options-dialog.d.ts +69 -40
  141. package/dist/commerce/item-options-dialog.js +231 -104
  142. package/dist/commerce/menu-item-card.d.ts +36 -20
  143. package/dist/commerce/menu-item-card.js +114 -61
  144. package/dist/commerce/option-group.d.ts +46 -27
  145. package/dist/commerce/option-group.js +123 -52
  146. package/dist/commerce/order-summary.d.ts +41 -26
  147. package/dist/commerce/order-summary.js +103 -49
  148. package/dist/commerce/order-tracker.d.ts +32 -16
  149. package/dist/commerce/order-tracker.js +91 -66
  150. package/dist/commerce/price.d.ts +41 -25
  151. package/dist/commerce/price.js +131 -68
  152. package/dist/commerce/product-card.d.ts +66 -36
  153. package/dist/commerce/product-card.js +215 -100
  154. package/dist/commerce/product-gallery.d.ts +72 -38
  155. package/dist/commerce/product-gallery.js +187 -82
  156. package/dist/commerce/promo-code.d.ts +73 -37
  157. package/dist/commerce/promo-code.js +172 -77
  158. package/dist/commerce/question-list.d.ts +43 -35
  159. package/dist/commerce/question-list.js +146 -72
  160. package/dist/commerce/shipping-estimate.d.ts +68 -33
  161. package/dist/commerce/shipping-estimate.js +149 -25
  162. package/dist/commerce/sort-select.d.ts +33 -22
  163. package/dist/commerce/sort-select.js +55 -26
  164. package/dist/commerce/variant-picker.d.ts +25 -23
  165. package/dist/commerce/variant-picker.js +103 -29
  166. package/dist/{docs → components}/anchor-heading.d.ts +1 -1
  167. package/dist/{docs → components}/anchor-heading.js +1 -1
  168. package/dist/components/autocomplete.d.ts +19 -21
  169. package/dist/components/autocomplete.js +57 -21
  170. package/dist/components/banner.d.ts +48 -37
  171. package/dist/components/banner.js +69 -27
  172. package/dist/components/button.d.ts +2 -18
  173. package/dist/components/button.js +4 -3
  174. package/dist/components/callout.d.ts +52 -0
  175. package/dist/components/callout.js +77 -0
  176. package/dist/components/checkbox.d.ts +3 -12
  177. package/dist/components/checkbox.js +1 -2
  178. package/dist/components/code-block.d.ts +110 -0
  179. package/dist/{docs → components}/code-block.js +92 -23
  180. package/dist/components/confirm.d.ts +63 -130
  181. package/dist/components/confirm.js +133 -52
  182. package/dist/{docs → components}/copy-button.d.ts +1 -1
  183. package/dist/{docs → components}/copy-button.js +3 -3
  184. package/dist/components/date-field.d.ts +40 -60
  185. package/dist/components/date-field.js +23 -36
  186. package/dist/components/date-picker.d.ts +11 -67
  187. package/dist/components/date-picker.js +4 -15
  188. package/dist/components/date-range-picker.d.ts +20 -91
  189. package/dist/components/date-range-picker.js +13 -27
  190. package/dist/components/dialog-dismiss.d.ts +1 -1
  191. package/dist/components/dialog-dismiss.js +1 -1
  192. package/dist/components/field-parts.d.ts +158 -0
  193. package/dist/components/field-parts.js +237 -0
  194. package/dist/components/filter-links.d.ts +107 -0
  195. package/dist/components/filter-links.js +120 -0
  196. package/dist/components/form.d.ts +3 -1
  197. package/dist/components/form.js +3 -1
  198. package/dist/components/index.d.ts +14 -7
  199. package/dist/components/index.js +14 -7
  200. package/dist/components/listbox.d.ts +0 -9
  201. package/dist/components/listbox.js +2 -2
  202. package/dist/components/media-grid.d.ts +15 -16
  203. package/dist/components/media-grid.js +75 -34
  204. package/dist/components/pager.d.ts +103 -0
  205. package/dist/components/pager.js +187 -0
  206. package/dist/components/property-list.d.ts +38 -39
  207. package/dist/components/property-list.js +149 -96
  208. package/dist/components/radio-group.d.ts +0 -11
  209. package/dist/components/radio-group.js +5 -6
  210. package/dist/components/range-calendar.d.ts +2 -14
  211. package/dist/components/range-calendar.js +2 -2
  212. package/dist/components/range-months.d.ts +12 -2
  213. package/dist/components/range-months.js +32 -16
  214. package/dist/components/rating-input.d.ts +14 -6
  215. package/dist/components/rating-input.js +26 -12
  216. package/dist/components/rating.d.ts +13 -8
  217. package/dist/components/rating.js +19 -5
  218. package/dist/components/review-card.d.ts +51 -26
  219. package/dist/components/review-card.js +173 -40
  220. package/dist/components/search-field.js +18 -8
  221. package/dist/components/section-bar.d.ts +23 -15
  222. package/dist/components/section-bar.js +59 -37
  223. package/dist/components/sidebar.d.ts +27 -0
  224. package/dist/components/sidebar.js +49 -20
  225. package/dist/{docs → components}/table-of-contents.d.ts +1 -1
  226. package/dist/{docs → components}/table-of-contents.js +3 -3
  227. package/dist/components/text-field.d.ts +54 -81
  228. package/dist/components/text-field.js +30 -44
  229. package/dist/components/time-field.d.ts +45 -65
  230. package/dist/components/time-field.js +23 -35
  231. package/dist/components/timeline.d.ts +80 -86
  232. package/dist/components/timeline.js +383 -170
  233. package/dist/components/typeset.d.ts +5 -0
  234. package/dist/components/typeset.js +17 -2
  235. package/dist/docs/code-tabs.d.ts +50 -24
  236. package/dist/docs/code-tabs.js +91 -25
  237. package/dist/docs/docs-feedback.d.ts +70 -27
  238. package/dist/docs/docs-feedback.js +156 -27
  239. package/dist/docs/docs-footer.d.ts +36 -22
  240. package/dist/docs/docs-footer.js +76 -23
  241. package/dist/docs/docs-hub.d.ts +103 -73
  242. package/dist/docs/docs-hub.js +333 -83
  243. package/dist/docs/docs-layout.d.ts +111 -42
  244. package/dist/docs/docs-layout.js +371 -97
  245. package/dist/docs/docs-nav-tools.d.ts +11 -7
  246. package/dist/docs/docs-nav-tools.js +4 -3
  247. package/dist/docs/docs-nav.d.ts +53 -17
  248. package/dist/docs/docs-nav.js +125 -14
  249. package/dist/docs/docs-not-found.d.ts +61 -35
  250. package/dist/docs/docs-not-found.js +198 -52
  251. package/dist/docs/docs-page-header.d.ts +47 -30
  252. package/dist/docs/docs-page-header.js +114 -31
  253. package/dist/docs/docs-pager.d.ts +43 -27
  254. package/dist/docs/docs-pager.js +73 -23
  255. package/dist/docs/file-tree.d.ts +16 -6
  256. package/dist/docs/file-tree.js +19 -4
  257. package/dist/docs/index.d.ts +0 -7
  258. package/dist/docs/index.js +0 -7
  259. package/dist/docs/install-command.d.ts +7 -6
  260. package/dist/docs/install-command.js +8 -10
  261. package/dist/docs/mixins/docs-nav-tools.js +1 -1
  262. package/dist/docs/next-steps.d.ts +56 -23
  263. package/dist/docs/next-steps.js +121 -35
  264. package/dist/docs/page-actions.d.ts +68 -46
  265. package/dist/docs/page-actions.js +129 -21
  266. package/dist/docs/steps.d.ts +14 -11
  267. package/dist/docs/steps.js +36 -18
  268. package/dist/docs/ui-label.d.ts +7 -6
  269. package/dist/docs/ui-label.js +21 -8
  270. package/dist/finance/ledger.d.ts +33 -29
  271. package/dist/finance/ledger.js +190 -43
  272. package/dist/finance/payment-card.d.ts +43 -31
  273. package/dist/finance/payment-card.js +170 -67
  274. package/dist/landing/author-band.d.ts +57 -54
  275. package/dist/landing/author-band.js +218 -64
  276. package/dist/landing/case-study.d.ts +57 -57
  277. package/dist/landing/case-study.js +148 -17
  278. package/dist/landing/changelog-strip.d.ts +56 -36
  279. package/dist/landing/changelog-strip.js +176 -68
  280. package/dist/landing/closing-cta.d.ts +21 -41
  281. package/dist/landing/closing-cta.js +13 -19
  282. package/dist/landing/code-stage.d.ts +55 -47
  283. package/dist/landing/code-stage.js +198 -67
  284. package/dist/landing/contributor-wall.d.ts +4 -4
  285. package/dist/landing/contributor-wall.js +4 -4
  286. package/dist/landing/curriculum.d.ts +74 -45
  287. package/dist/landing/curriculum.js +220 -62
  288. package/dist/landing/drawn-chart.d.ts +18 -10
  289. package/dist/landing/drawn-chart.js +57 -26
  290. package/dist/landing/episode-player.d.ts +69 -43
  291. package/dist/landing/episode-player.js +213 -48
  292. package/dist/landing/event-ticker.d.ts +13 -7
  293. package/dist/landing/event-ticker.js +67 -32
  294. package/dist/landing/fan-out-diagram.d.ts +19 -8
  295. package/dist/landing/fan-out-diagram.js +60 -19
  296. package/dist/landing/faq-band.d.ts +30 -48
  297. package/dist/landing/faq-band.js +37 -30
  298. package/dist/landing/feature-band.d.ts +48 -76
  299. package/dist/landing/feature-band.js +71 -49
  300. package/dist/landing/flow-diagram.d.ts +16 -8
  301. package/dist/landing/flow-diagram.js +50 -18
  302. package/dist/landing/install-tabs.d.ts +16 -14
  303. package/dist/landing/install-tabs.js +87 -39
  304. package/dist/landing/landing-header.d.ts +75 -66
  305. package/dist/landing/landing-header.js +284 -57
  306. package/dist/landing/landing-hero.d.ts +59 -87
  307. package/dist/landing/landing-hero.js +157 -128
  308. package/dist/landing/landing-section.d.ts +0 -9
  309. package/dist/landing/landing-section.js +1 -2
  310. package/dist/landing/logo-cloud.d.ts +26 -9
  311. package/dist/landing/logo-cloud.js +62 -18
  312. package/dist/landing/phone-fan.d.ts +15 -7
  313. package/dist/landing/phone-fan.js +60 -17
  314. package/dist/landing/price-list.d.ts +29 -22
  315. package/dist/landing/price-list.js +175 -77
  316. package/dist/landing/pricing-band.d.ts +46 -53
  317. package/dist/landing/pricing-band.js +167 -51
  318. package/dist/landing/product-frame.d.ts +44 -42
  319. package/dist/landing/product-frame.js +182 -85
  320. package/dist/landing/proof-strip.d.ts +7 -2
  321. package/dist/landing/proof-strip.js +7 -2
  322. package/dist/landing/rails.d.ts +1 -1
  323. package/dist/landing/rails.js +1 -1
  324. package/dist/landing/segmented-stage.d.ts +19 -8
  325. package/dist/landing/segmented-stage.js +60 -16
  326. package/dist/landing/sequence-diagram.d.ts +18 -8
  327. package/dist/landing/sequence-diagram.js +49 -18
  328. package/dist/landing/site-footer.d.ts +89 -68
  329. package/dist/landing/site-footer.js +344 -111
  330. package/dist/landing/site-header.d.ts +118 -80
  331. package/dist/landing/site-header.js +482 -67
  332. package/dist/landing/sponsor-wall.d.ts +34 -15
  333. package/dist/landing/sponsor-wall.js +111 -34
  334. package/dist/landing/stat-strip.d.ts +7 -9
  335. package/dist/landing/stat-strip.js +57 -22
  336. package/dist/landing/step-list.d.ts +18 -21
  337. package/dist/landing/step-list.js +132 -38
  338. package/dist/landing/tabbed-stage.d.ts +23 -15
  339. package/dist/landing/tabbed-stage.js +103 -21
  340. package/dist/landing/testimonial-band.d.ts +58 -61
  341. package/dist/landing/testimonial-band.js +209 -71
  342. package/dist/landing/typed-terminal.d.ts +9 -6
  343. package/dist/landing/typed-terminal.js +16 -5
  344. package/dist/landing/usage-estimate.d.ts +83 -74
  345. package/dist/landing/usage-estimate.js +254 -113
  346. package/dist/landing/utils/has-parts.d.ts +17 -0
  347. package/dist/landing/utils/has-parts.js +24 -0
  348. package/dist/map/map-canvas.d.ts +15 -16
  349. package/dist/map/map-canvas.js +40 -24
  350. package/dist/map/map.d.ts +42 -33
  351. package/dist/map/map.js +149 -38
  352. package/dist/mixins/aria-checked.d.ts +1 -4
  353. package/dist/mixins/aria-checked.js +1 -4
  354. package/dist/mixins/clear-field.d.ts +2 -4
  355. package/dist/mixins/clear-field.js +2 -4
  356. package/dist/mixins/index.d.ts +2 -0
  357. package/dist/mixins/index.js +2 -0
  358. package/dist/schedule/agenda.d.ts +69 -41
  359. package/dist/schedule/agenda.js +273 -134
  360. package/dist/schedule/day-strip.d.ts +38 -26
  361. package/dist/schedule/day-strip.js +119 -88
  362. package/dist/test/map.d.ts +1 -1
  363. package/dist/test/map.js +1 -6
  364. package/dist/test/reels.js +1 -1
  365. package/dist/test/stories.js +2 -2
  366. package/dist/travel/boarding-pass.d.ts +94 -70
  367. package/dist/travel/boarding-pass.js +341 -144
  368. package/dist/travel/car-offer.d.ts +109 -49
  369. package/dist/travel/car-offer.js +424 -64
  370. package/dist/travel/fare-options.d.ts +58 -34
  371. package/dist/travel/fare-options.js +210 -69
  372. package/dist/travel/flight-itinerary.d.ts +62 -55
  373. package/dist/travel/flight-itinerary.js +230 -55
  374. package/dist/travel/flight-option.d.ts +65 -33
  375. package/dist/travel/flight-option.js +250 -69
  376. package/dist/travel/flight-segment.d.ts +121 -70
  377. package/dist/travel/flight-segment.js +358 -96
  378. package/dist/travel/package-savings.d.ts +79 -39
  379. package/dist/travel/package-savings.js +309 -65
  380. package/dist/travel/price-breakdown.d.ts +30 -22
  381. package/dist/travel/price-breakdown.js +72 -17
  382. package/dist/travel/rating-breakdown.d.ts +25 -18
  383. package/dist/travel/rating-breakdown.js +60 -23
  384. package/dist/travel/seat-map.d.ts +29 -22
  385. package/dist/travel/seat-map.js +140 -78
  386. package/dist/travel/trip-timeline.d.ts +77 -39
  387. package/dist/travel/trip-timeline.js +316 -107
  388. package/dist/utils/eyebrow.d.ts +2 -2
  389. package/dist/utils/eyebrow.js +3 -3
  390. package/dist/utils/index.d.ts +0 -1
  391. package/dist/utils/index.js +0 -1
  392. package/dist/video/episode-list.d.ts +22 -14
  393. package/dist/video/episode-list.js +89 -53
  394. package/dist/video/reel-feed.d.ts +21 -15
  395. package/dist/video/reel-feed.js +59 -24
  396. package/dist/video/story-viewer.d.ts +6 -5
  397. package/dist/video/story-viewer.js +84 -53
  398. package/dist/video/title-hero.d.ts +8 -8
  399. package/dist/video/title-hero.js +48 -34
  400. package/dist/video/video-card.d.ts +34 -20
  401. package/dist/video/video-card.js +119 -76
  402. package/dist/video/video-player.d.ts +17 -14
  403. package/dist/video/video-player.js +68 -30
  404. package/dist/video/video-shelf.d.ts +26 -14
  405. package/dist/video/video-shelf.js +88 -50
  406. package/package.json +4 -2
  407. package/dist/docs/callout.d.ts +0 -46
  408. package/dist/docs/callout.js +0 -61
  409. package/dist/docs/code-block.d.ts +0 -74
  410. package/dist/utils/field-parts.d.ts +0 -26
  411. package/dist/utils/field-parts.js +0 -12
  412. /package/dist/{docs/mixins → mixins}/copy-feedback.d.ts +0 -0
  413. /package/dist/{docs/mixins → mixins}/copy-feedback.js +0 -0
  414. /package/dist/{docs/mixins → mixins}/toc-spy.d.ts +0 -0
  415. /package/dist/{docs/mixins → mixins}/toc-spy.js +0 -0
  416. /package/dist/{docs/utils → utils}/reveal-in-scroller.d.ts +0 -0
  417. /package/dist/{docs/utils → utils}/reveal-in-scroller.js +0 -0
@@ -1,12 +1,13 @@
1
1
  /**
2
- * A course or book curriculum: parts with their totals, each a list of numbered lessons a
3
- * visitor can open to see the subtopics or a preview link, under an optional totals row,
2
+ * A course or book curriculum assembled from parts: parts with their totals, each a list of
3
+ * numbered lessons a visitor can open for subtopics or a preview link, under a totals row,
4
4
  * so "what's inside" reads at a glance and in depth without leaving the page.
5
5
  *
6
6
  * @author [Sergio Xalambrí](https://sergiodxa.com)
7
7
  * @copyright Sergio Xalambrí 2026
8
8
  */
9
- import type { Handle, Props as TagProps, RemixNode } from "remix/component";
9
+ import type { Handle, Props as TagProps } from "remix/component";
10
+ import { Badge } from "../components/badge.js";
10
11
  /**
11
12
  * Prop types for {@link Curriculum} and its compound parts.
12
13
  */
@@ -16,64 +17,92 @@ export declare namespace Curriculum {
16
17
  * other at every width (`stack`) for a course with many or long parts.
17
18
  */
18
19
  type Layout = "columns" | "stack";
19
- /**
20
- * Props accepted by {@link Curriculum}.
21
- */
20
+ /** Value {@link Curriculum} provides to its parts. */
21
+ interface Context {
22
+ /** How parts sit. */
23
+ layout: Layout;
24
+ }
25
+ /** Value {@link Curriculum.Lesson} provides to its row. */
26
+ interface LessonContext {
27
+ /** Whether the lesson opens, making its row a disclosure summary. */
28
+ expandable: boolean;
29
+ }
30
+ /** Every native `<div>` attribute of the curriculum, plus its arrangement. */
22
31
  interface Props extends TagProps<"div"> {
23
32
  /** Arrangement. Defaults to {@link DEFAULT_LAYOUT}. */
24
33
  layout?: Layout;
25
- /** Totals above the parts, such as a `StatStrip` of chapters, pages and hours. */
26
- summary?: RemixNode;
27
- /** {@link Curriculum.Part} children. */
28
- children: RemixNode;
29
34
  }
30
- /**
31
- * Props accepted by {@link Curriculum.Part}.
32
- */
33
- interface PartProps extends Omit<TagProps<"section">, "title"> {
34
- /** The part's title, rendered as a heading at the ambient depth. */
35
- title: RemixNode;
36
- /** The part's totals, such as "5 chapters · 112 pages". */
37
- meta?: RemixNode;
38
- /** {@link Curriculum.Lesson} children. */
39
- children: RemixNode;
35
+ /** Every native `<div>` attribute of the parts' grid. */
36
+ interface PartsProps extends TagProps<"div"> {
40
37
  }
41
- /**
42
- * Props accepted by {@link Curriculum.Lesson}.
43
- */
44
- interface LessonProps extends Omit<TagProps<"li">, "title"> {
45
- /** The lesson's number as shown, such as "01". */
46
- number: RemixNode;
47
- /** The lesson's title. */
48
- title: RemixNode;
49
- /** Length at the row's inline end, such as "18 pages" or "12 min". */
50
- meta?: RemixNode;
51
- /** A short flag after the title, such as "Free" or "Preview", drawn as a {@link Badge}. */
52
- badge?: RemixNode;
53
- /** Starts the lesson expanded. */
54
- open?: boolean;
38
+ /** Every native `<section>` attribute of one part. */
39
+ interface PartProps extends TagProps<"section"> {
40
+ }
41
+ /** Every native `<header>` attribute of a part's title block. */
42
+ interface PartHeaderProps extends TagProps<"header"> {
43
+ }
44
+ /** Every native heading attribute of a part's title. */
45
+ interface PartTitleProps extends TagProps<"h3"> {
46
+ }
47
+ /** Every native `<p>` attribute of a part's totals. */
48
+ interface PartMetaProps extends TagProps<"p"> {
49
+ }
50
+ /** Every native `<ol>` attribute of a part's lessons. */
51
+ interface LessonsProps extends TagProps<"ol"> {
52
+ }
53
+ /** Every native `<li>` attribute of one lesson, plus whether it opens. */
54
+ interface LessonProps extends TagProps<"li"> {
55
55
  /**
56
- * What opens under the row: subtopics, usually a `CheckList`, and a preview link.
57
- * Without children the row is static and draws no chevron.
56
+ * Makes the lesson a native disclosure: its {@link Curriculum.Row} becomes the summary
57
+ * with a chevron, and its {@link Curriculum.Body} opens under it.
58
58
  */
59
- children?: RemixNode;
59
+ expandable?: boolean;
60
+ /** Starts an expandable lesson open. */
61
+ open?: boolean;
62
+ }
63
+ /** Every native attribute of the lesson's row. */
64
+ interface RowProps extends TagProps<"summary"> {
65
+ }
66
+ /** Every native `<span>` attribute of a row cell. */
67
+ interface CellProps extends TagProps<"span"> {
68
+ }
69
+ /** Every {@link Badge} prop of the flag after a lesson's title. */
70
+ interface BadgeProps extends Badge.Props {
71
+ }
72
+ /** Every native `<div>` attribute of what opens under the row. */
73
+ interface BodyProps extends TagProps<"div"> {
60
74
  }
61
75
  }
62
76
  /**
63
- * Lays the optional summary over the parts, and opens a heading scope so part titles sit
64
- * one level under the band's title.
77
+ * Stacks its children 2.5rem apart: totals such as a `StatStrip`, then the
78
+ * {@link Curriculum.Parts}, which read `layout` through context.
65
79
  *
66
80
  * @param handle Runtime handle carrying the host `<div>`'s props.
67
81
  * @returns The render function producing the curriculum's markup.
68
82
  * @example
69
- * <Curriculum summary={<StatStrip>{totals}</StatStrip>}>
70
- * <Curriculum.Part title={t("part.one")} meta="5 chapters · 112 pages">
71
- * <Curriculum.Lesson number="01" title={t("ch.one")} meta="18 pages" badge="Free" />
72
- * </Curriculum.Part>
83
+ * <Curriculum>
84
+ * <StatStrip>{totals}</StatStrip>
85
+ * <Curriculum.Parts>
86
+ * <Curriculum.Part>
87
+ * <Curriculum.PartHeader><Curriculum.PartTitle>{t("part.one")}</Curriculum.PartTitle></Curriculum.PartHeader>
88
+ * <Curriculum.Lessons>{lessons}</Curriculum.Lessons>
89
+ * </Curriculum.Part>
90
+ * </Curriculum.Parts>
73
91
  * </Curriculum>
74
92
  */
75
- export declare function Curriculum(handle: Handle<Curriculum.Props>): () => import("remix/component").RemixElement;
93
+ export declare function Curriculum(handle: Handle<Curriculum.Props, Curriculum.Context>): () => import("remix/component").RemixElement;
76
94
  export declare namespace Curriculum {
95
+ var Parts: (handle: Handle<Curriculum.PartsProps>) => () => import("remix/component").RemixElement;
77
96
  var Part: (handle: Handle<Curriculum.PartProps>) => () => import("remix/component").RemixElement;
78
- var Lesson: (handle: Handle<Curriculum.LessonProps>) => () => import("remix/component").RemixElement;
97
+ var PartHeader: (handle: Handle<Curriculum.PartHeaderProps>) => () => import("remix/component").RemixElement;
98
+ var PartTitle: (handle: Handle<Curriculum.PartTitleProps>) => () => import("remix/component").RemixElement;
99
+ var PartMeta: (handle: Handle<Curriculum.PartMetaProps>) => () => import("remix/component").RemixElement;
100
+ var Lessons: (handle: Handle<Curriculum.LessonsProps>) => () => import("remix/component").RemixElement;
101
+ var Lesson: (handle: Handle<Curriculum.LessonProps, Curriculum.LessonContext>) => () => import("remix/component").RemixElement;
102
+ var Row: (handle: Handle<Curriculum.RowProps>) => () => import("remix/component").RemixElement;
103
+ var Number: (handle: Handle<Curriculum.CellProps>) => () => import("remix/component").RemixElement;
104
+ var Title: (handle: Handle<Curriculum.CellProps>) => () => import("remix/component").RemixElement;
105
+ var Badge: (handle: Handle<Curriculum.BadgeProps>) => () => import("remix/component").RemixElement;
106
+ var Meta: (handle: Handle<Curriculum.CellProps>) => () => import("remix/component").RemixElement;
107
+ var Body: (handle: Handle<Curriculum.BodyProps>) => () => import("remix/component").RemixElement;
79
108
  }
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
2
  import { ChevronRightIcon } from "@sdxc/icons";
3
3
  import { combine, raw, mergeMix } from "@sdxc/u/general";
4
4
  import { container, vstack } from "@sdxc/u/layout";
@@ -20,30 +20,50 @@ const NUMBER_TRACK = "2rem";
20
20
  const TRACK_GAP = "0.75rem";
21
21
  /** How far a lesson's body is indented, so it starts under the title. */
22
22
  const BODY_INDENT = `calc(${CHEVRON_TRACK} + ${NUMBER_TRACK} + 2 * ${TRACK_GAP})`;
23
+ /** The marker attribute a lesson row's layout selects its parts by. */
24
+ const PART = "data-curriculum-part";
23
25
  /**
24
- * Lays the optional summary over the parts, and opens a heading scope so part titles sit
25
- * one level under the band's title.
26
+ * Stacks its children 2.5rem apart: totals such as a `StatStrip`, then the
27
+ * {@link Curriculum.Parts}, which read `layout` through context.
26
28
  *
27
29
  * @param handle Runtime handle carrying the host `<div>`'s props.
28
30
  * @returns The render function producing the curriculum's markup.
29
31
  * @example
30
- * <Curriculum summary={<StatStrip>{totals}</StatStrip>}>
31
- * <Curriculum.Part title={t("part.one")} meta="5 chapters · 112 pages">
32
- * <Curriculum.Lesson number="01" title={t("ch.one")} meta="18 pages" badge="Free" />
33
- * </Curriculum.Part>
32
+ * <Curriculum>
33
+ * <StatStrip>{totals}</StatStrip>
34
+ * <Curriculum.Parts>
35
+ * <Curriculum.Part>
36
+ * <Curriculum.PartHeader><Curriculum.PartTitle>{t("part.one")}</Curriculum.PartTitle></Curriculum.PartHeader>
37
+ * <Curriculum.Lessons>{lessons}</Curriculum.Lessons>
38
+ * </Curriculum.Part>
39
+ * </Curriculum.Parts>
34
40
  * </Curriculum>
35
41
  */
36
42
  export function Curriculum(handle) {
37
43
  return () => {
38
- let { children, layout, mix, summary, ...rest } = handle.props;
44
+ let { layout, mix, ...rest } = handle.props;
39
45
  let resolvedLayout = layout ?? DEFAULT_LAYOUT;
40
- return (_jsxs("div", { ...rest, "data-slot": "curriculum", "data-layout": resolvedLayout, mix: mergeMix([
46
+ handle.context.set({ layout: resolvedLayout });
47
+ return (_jsx("div", { "data-slot": "curriculum", ...rest, "data-layout": resolvedLayout, mix: mergeMix([
41
48
  container(CONTAINER),
42
49
  vstack({ gap: 10, align: "stretch" }),
43
50
  raw({ inlineSize: "100%" }),
44
- ], mix), children: [summary ? _jsx("div", { "data-slot": "curriculum-summary", children: summary }) : null, _jsx(HeadingScope, { children: _jsx("div", { "data-slot": "curriculum-parts", mix: [parts(resolvedLayout)], children: children }) })] }));
51
+ ], mix) }));
45
52
  };
46
53
  }
54
+ /**
55
+ * The parts' grid, opening a heading scope so part titles sit one level under the band's title.
56
+ *
57
+ * @param handle Runtime handle carrying the grid's props.
58
+ * @returns The render function producing the grid.
59
+ */
60
+ Curriculum.Parts = function CurriculumParts(handle) {
61
+ return () => {
62
+ let { mix, ...rest } = handle.props;
63
+ let context = handle.context.get(Curriculum);
64
+ return (_jsx(HeadingScope, { children: _jsx("div", { "data-slot": "curriculum-parts", ...rest, mix: mergeMix([parts(context?.layout ?? DEFAULT_LAYOUT)], mix) }) }));
65
+ };
66
+ };
47
67
  /**
48
68
  * The parts' grid in one rule: one column, then, for `columns`, every part in one row of
49
69
  * equal tracks from the `lg` container whatever their count.
@@ -67,28 +87,74 @@ function parts(layout) {
67
87
  ]);
68
88
  }
69
89
  /**
70
- * One part: its title and totals over a ruled list of lessons.
90
+ * One part: a {@link Curriculum.PartHeader} over its {@link Curriculum.Lessons}, 1rem apart.
71
91
  *
72
92
  * @param handle Runtime handle carrying the host `<section>`'s props.
73
93
  * @returns The render function producing the part's markup.
74
- * @example
75
- * <Curriculum.Part title="Foundations" meta="4 chapters · 86 pages">{lessons}</Curriculum.Part>
76
94
  */
77
95
  Curriculum.Part = function CurriculumPart(handle) {
78
96
  return () => {
79
- let { children, meta, mix, title, ...rest } = handle.props;
97
+ let { mix, ...rest } = handle.props;
98
+ return (_jsx("section", { "data-slot": "curriculum-part", ...rest, mix: mergeMix([vstack({ gap: 4, align: "stretch" }), raw({ minInlineSize: "0" })], mix) }));
99
+ };
100
+ };
101
+ /**
102
+ * A part's {@link Curriculum.PartTitle} with its {@link Curriculum.PartMeta} close under it.
103
+ *
104
+ * @param handle Runtime handle carrying the header's props.
105
+ * @returns The render function producing the header.
106
+ */
107
+ Curriculum.PartHeader = function CurriculumPartHeader(handle) {
108
+ return () => {
109
+ let { mix, ...rest } = handle.props;
110
+ return (_jsx("header", { "data-slot": "curriculum-part-header", ...rest, mix: mergeMix([vstack({ gap: 1, align: "start" })], mix) }));
111
+ };
112
+ };
113
+ /**
114
+ * The part's title, a heading at the ambient depth.
115
+ *
116
+ * @param handle Runtime handle carrying the heading's props.
117
+ * @returns The render function producing the title.
118
+ */
119
+ Curriculum.PartTitle = function CurriculumPartTitle(handle) {
120
+ return () => {
121
+ let { mix, ...rest } = handle.props;
80
122
  let Tag = TAG_BY_LEVEL[resolveHeadingLevel(handle)];
81
- return (_jsxs("section", { ...rest, "data-slot": "curriculum-part", mix: mergeMix([vstack({ gap: 4, align: "stretch" }), raw({ minInlineSize: "0" })], mix), children: [_jsxs("header", { mix: [vstack({ gap: 1, align: "start" })], children: [_jsx(Tag, { "data-slot": "curriculum-part-title", mix: [
82
- raw({
83
- margin: "0",
84
- fontSize: "var(--ui-text-xl, 1.25rem)",
85
- lineHeight: "1.75rem",
86
- fontWeight: "600",
87
- letterSpacing: "-0.01em",
88
- color: "var(--ui-neutral-fg-emphasis)",
89
- textWrap: "balance",
90
- }),
91
- ], children: title }), meta ? (_jsx("p", { "data-slot": "curriculum-part-meta", mix: [monoMeta(), raw({ margin: "0" })], children: meta })) : null] }), _jsx("ol", { "data-slot": "curriculum-lessons", mix: [lessonList()], children: children })] }));
123
+ return (_jsx(Tag, { "data-slot": "curriculum-part-title", ...rest, mix: mergeMix([
124
+ raw({
125
+ margin: "0",
126
+ fontSize: "var(--ui-text-xl, 1.25rem)",
127
+ lineHeight: "1.75rem",
128
+ fontWeight: "600",
129
+ letterSpacing: "-0.01em",
130
+ color: "var(--ui-neutral-fg-emphasis)",
131
+ textWrap: "balance",
132
+ }),
133
+ ], mix) }));
134
+ };
135
+ };
136
+ /**
137
+ * The part's totals, such as "5 chapters · 112 pages", in muted mono.
138
+ *
139
+ * @param handle Runtime handle carrying the paragraph's props.
140
+ * @returns The render function producing the totals.
141
+ */
142
+ Curriculum.PartMeta = function CurriculumPartMeta(handle) {
143
+ return () => {
144
+ let { mix, ...rest } = handle.props;
145
+ return (_jsx("p", { "data-slot": "curriculum-part-meta", ...rest, mix: mergeMix([monoMeta(), raw({ margin: "0" })], mix) }));
146
+ };
147
+ };
148
+ /**
149
+ * The part's lessons, ruled above every row and under the last.
150
+ *
151
+ * @param handle Runtime handle carrying the list's props.
152
+ * @returns The render function producing the list.
153
+ */
154
+ Curriculum.Lessons = function CurriculumLessons(handle) {
155
+ return () => {
156
+ let { mix, ...rest } = handle.props;
157
+ return _jsx("ol", { "data-slot": "curriculum-lessons", ...rest, mix: mergeMix([lessonList()], mix) });
92
158
  };
93
159
  };
94
160
  /** Mono, muted, tabular small print shared by part totals, lesson numbers and lesson meta. */
@@ -110,11 +176,12 @@ function lessonList() {
110
176
  ]);
111
177
  }
112
178
  /**
113
- * The summary row in one rule: chevron, number, title (with its badge) and meta tracks on a
114
- * shared first baseline, at least 44px tall, so the meta stays at the inline end however
115
- * far the title wraps. Only an expandable row takes the pointer cursor and hover underline.
179
+ * The row in one rule: chevron, number, title (with its badge) and meta tracks on a shared
180
+ * first baseline, at least 44px tall, so the meta stays at the inline end however far the
181
+ * title wraps, whatever order the cells are written in. Only an expandable row takes the
182
+ * pointer cursor and hover underline.
116
183
  */
117
- function lessonSummary(expandable) {
184
+ function lessonRow(expandable) {
118
185
  return combine([
119
186
  raw({
120
187
  display: "grid",
@@ -130,7 +197,12 @@ function lessonSummary(expandable) {
130
197
  }),
131
198
  when("&::-webkit-details-marker", raw({ display: "none" })),
132
199
  when("&::marker", raw({ content: '""' })),
200
+ when(`& > [${PART}=number]`, raw({ gridRow: "1", gridColumn: "2" })),
201
+ when(`& > [${PART}=title]`, raw({ gridRow: "1", gridColumn: "3" })),
202
+ when(`& > [${PART}=meta]`, raw({ gridRow: "1", gridColumn: "4" })),
133
203
  when('& > [data-slot="curriculum-lesson-chevron"]', raw({
204
+ gridRow: "1",
205
+ gridColumn: "1",
134
206
  alignSelf: "start",
135
207
  display: "grid",
136
208
  placeItems: "center",
@@ -140,7 +212,7 @@ function lessonSummary(expandable) {
140
212
  when('& > [data-slot="curriculum-lesson-chevron"] > svg', raw({ inlineSize: "1rem", blockSize: "1rem" })),
141
213
  when('& > [data-slot="curriculum-lesson-chevron"] > svg', motionSafe(raw({ transition: "rotate 200ms" }))),
142
214
  expandable
143
- ? when('&:hover > [data-slot="curriculum-lesson-title"]', raw({
215
+ ? when(`&:hover > [${PART}=title]`, raw({
144
216
  textDecoration: "underline",
145
217
  textUnderlineOffset: "0.2em",
146
218
  textDecorationThickness: "1px",
@@ -149,46 +221,132 @@ function lessonSummary(expandable) {
149
221
  ]);
150
222
  }
151
223
  /**
152
- * One lesson as a native disclosure row: the summary shows the chevron, number, title,
153
- * badge and meta; the children open under the title and the chevron turns while open.
224
+ * One lesson. An `expandable` lesson is a native disclosure whose {@link Curriculum.Row} is
225
+ * the summary and whose {@link Curriculum.Body} opens under the title, the chevron turning
226
+ * while open; any other lesson is a static row with no chevron.
154
227
  *
155
228
  * @param handle Runtime handle carrying the host `<li>`'s props.
156
229
  * @returns The render function producing the lesson's list item.
157
230
  * @example
158
- * <Curriculum.Lesson number="03" title={t("ch.measure")} meta="22 pages" badge="Preview">
159
- * <CheckList>{subtopics}</CheckList>
231
+ * <Curriculum.Lesson expandable>
232
+ * <Curriculum.Row>
233
+ * <Curriculum.Number>03</Curriculum.Number>
234
+ * <Curriculum.Title>{t("ch.measure")}<Curriculum.Badge>Preview</Curriculum.Badge></Curriculum.Title>
235
+ * <Curriculum.Meta>22 pages</Curriculum.Meta>
236
+ * </Curriculum.Row>
237
+ * <Curriculum.Body><CheckList>{subtopics}</CheckList></Curriculum.Body>
160
238
  * </Curriculum.Lesson>
161
239
  */
162
240
  Curriculum.Lesson = function CurriculumLesson(handle) {
163
241
  return () => {
164
- let { badge, children, meta, mix, number, open, title, ...rest } = handle.props;
165
- let row = (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "curriculum-lesson-chevron", "aria-hidden": "true", children: children ? _jsx(ChevronRightIcon, {}) : null }), _jsx("span", { "data-slot": "curriculum-lesson-number", mix: [monoMeta()], children: number }), _jsxs("span", { "data-slot": "curriculum-lesson-title", mix: [
166
- raw({
167
- fontSize: "var(--ui-text-base, 1rem)",
168
- lineHeight: "1.5rem",
169
- fontWeight: "500",
170
- color: "var(--ui-neutral-fg-emphasis)",
171
- textWrap: "pretty",
172
- overflowWrap: "anywhere",
173
- }),
174
- ], children: [title, badge ? (_jsx(Badge, { variant: "secondary", color: "brand", "data-slot": "curriculum-lesson-badge", mix: [raw({ marginInlineStart: "0.5rem", verticalAlign: "0.0625rem" })], children: badge })) : null] }), _jsx("span", { "data-slot": "curriculum-lesson-meta", mix: [monoMeta(), raw({ textAlign: "end", whiteSpace: "nowrap" })], children: meta })] }));
175
- if (!children) {
176
- return (_jsx("li", { ...rest, "data-slot": "curriculum-lesson", mix: mix, children: _jsx("div", { "data-slot": "curriculum-lesson-row", mix: [lessonSummary(false)], children: row }) }));
177
- }
178
- return (_jsx("li", { ...rest, "data-slot": "curriculum-lesson", mix: mix, children: _jsxs("details", { open: open, mix: [
242
+ let { children, expandable, open, ...rest } = handle.props;
243
+ let isExpandable = expandable === true;
244
+ handle.context.set({ expandable: isExpandable });
245
+ return (_jsx("li", { "data-slot": "curriculum-lesson", ...rest, children: isExpandable ? (_jsx("details", { open: open, mix: [
179
246
  when('&[open] > summary > [data-slot="curriculum-lesson-chevron"] > svg', raw({ rotate: "90deg" })),
180
- ], children: [_jsx("summary", { "data-slot": "curriculum-lesson-row", mix: [lessonSummary(true)], children: row }), _jsx("div", { "data-slot": "curriculum-lesson-body", mix: [
181
- raw({
182
- display: "flex",
183
- flexDirection: "column",
184
- alignItems: "stretch",
185
- gap: "0.75rem",
186
- paddingInlineStart: BODY_INDENT,
187
- paddingBlockEnd: "1rem",
188
- fontSize: "var(--ui-text-sm, 0.875rem)",
189
- lineHeight: "1.5rem",
190
- color: "var(--ui-neutral-fg)",
191
- }),
192
- ], children: children })] }) }));
247
+ ], children: children })) : (children) }));
248
+ };
249
+ };
250
+ /**
251
+ * The lesson's row: the chevron track, then the {@link Curriculum.Number},
252
+ * {@link Curriculum.Title} and {@link Curriculum.Meta}. In an expandable lesson it is the
253
+ * disclosure's `<summary>` with a chevron.
254
+ *
255
+ * @param handle Runtime handle carrying the row's props.
256
+ * @returns The render function producing the row.
257
+ */
258
+ Curriculum.Row = function CurriculumRow(handle) {
259
+ return () => {
260
+ let { children, mix, ...rest } = handle.props;
261
+ let context = handle.context.get(Curriculum.Lesson);
262
+ let expandable = context?.expandable === true;
263
+ let chevron = (_jsx("span", { "data-slot": "curriculum-lesson-chevron", "aria-hidden": "true", children: expandable ? _jsx(ChevronRightIcon, {}) : null }));
264
+ let rowMix = mergeMix([lessonRow(expandable)], mix);
265
+ if (expandable) {
266
+ return (_jsxs("summary", { "data-slot": "curriculum-lesson-row", ...rest, mix: rowMix, children: [chevron, children] }));
267
+ }
268
+ return (_jsxs("div", { "data-slot": "curriculum-lesson-row", ...rest, mix: rowMix, children: [chevron, children] }));
269
+ };
270
+ };
271
+ /**
272
+ * The lesson's number as shown, such as "01", in muted mono.
273
+ *
274
+ * @param handle Runtime handle carrying the span's props.
275
+ * @returns The render function producing the number.
276
+ */
277
+ Curriculum.Number = function CurriculumNumber(handle) {
278
+ return () => {
279
+ let { mix, ...rest } = handle.props;
280
+ return (_jsx("span", { "data-slot": "curriculum-lesson-number", ...rest, "data-curriculum-part": "number", mix: mergeMix([monoMeta()], mix) }));
281
+ };
282
+ };
283
+ /**
284
+ * The lesson's title, wrapping anywhere before it pushes the meta out of the row.
285
+ *
286
+ * @param handle Runtime handle carrying the span's props.
287
+ * @returns The render function producing the title.
288
+ */
289
+ Curriculum.Title = function CurriculumTitle(handle) {
290
+ return () => {
291
+ let { mix, ...rest } = handle.props;
292
+ return (_jsx("span", { "data-slot": "curriculum-lesson-title", ...rest, "data-curriculum-part": "title", mix: mergeMix([
293
+ raw({
294
+ fontSize: "var(--ui-text-base, 1rem)",
295
+ lineHeight: "1.5rem",
296
+ fontWeight: "500",
297
+ color: "var(--ui-neutral-fg-emphasis)",
298
+ textWrap: "pretty",
299
+ overflowWrap: "anywhere",
300
+ }),
301
+ ], mix) }));
302
+ };
303
+ };
304
+ /**
305
+ * A short flag after the title, such as "Free" or "Preview", as a brand {@link Badge}.
306
+ *
307
+ * @param handle Runtime handle carrying the badge's props.
308
+ * @returns The render function producing the badge.
309
+ */
310
+ Curriculum.Badge = function CurriculumBadge(handle) {
311
+ return () => {
312
+ let { mix, ...rest } = handle.props;
313
+ return (_jsx(Badge, { variant: "secondary", color: "brand", "data-slot": "curriculum-lesson-badge", ...rest, mix: mergeMix([raw({ marginInlineStart: "0.5rem", verticalAlign: "0.0625rem" })], mix) }));
314
+ };
315
+ };
316
+ /**
317
+ * The lesson's length at the row's inline end, such as "18 pages" or "12 min".
318
+ *
319
+ * @param handle Runtime handle carrying the span's props.
320
+ * @returns The render function producing the meta.
321
+ */
322
+ Curriculum.Meta = function CurriculumMeta(handle) {
323
+ return () => {
324
+ let { mix, ...rest } = handle.props;
325
+ return (_jsx("span", { "data-slot": "curriculum-lesson-meta", ...rest, "data-curriculum-part": "meta", mix: mergeMix([monoMeta(), raw({ textAlign: "end", whiteSpace: "nowrap" })], mix) }));
326
+ };
327
+ };
328
+ /**
329
+ * What opens under an expandable lesson's row, starting under the title: subtopics, usually
330
+ * a `CheckList`, and a preview link.
331
+ *
332
+ * @param handle Runtime handle carrying the block's props.
333
+ * @returns The render function producing the body.
334
+ */
335
+ Curriculum.Body = function CurriculumBody(handle) {
336
+ return () => {
337
+ let { mix, ...rest } = handle.props;
338
+ return (_jsx("div", { "data-slot": "curriculum-lesson-body", ...rest, mix: mergeMix([
339
+ raw({
340
+ display: "flex",
341
+ flexDirection: "column",
342
+ alignItems: "stretch",
343
+ gap: "0.75rem",
344
+ paddingInlineStart: BODY_INDENT,
345
+ paddingBlockEnd: "1rem",
346
+ fontSize: "var(--ui-text-sm, 0.875rem)",
347
+ lineHeight: "1.5rem",
348
+ color: "var(--ui-neutral-fg)",
349
+ }),
350
+ ], mix) }));
193
351
  };
194
352
  };
@@ -13,16 +13,14 @@ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
13
13
  export declare namespace DrawnChart {
14
14
  /** How the chart draws its series. */
15
15
  type Variant = "bars" | "line";
16
- /** The headline number above the chart. */
17
- interface Metric {
16
+ /** The headline number a {@link DrawnChart.Metric} draws, and counts up to when it is an integer. */
17
+ interface MetricNumber {
18
18
  /** The measured value; an integer counts up from zero, any other number shows as is. */
19
19
  value: number;
20
20
  /** Number formatting, such as `{ maximumFractionDigits: 1 }`; also applied to every counted frame. */
21
21
  format?: Intl.NumberFormatOptions;
22
22
  /** Locale the number formats in. Defaults to `"en-US"`. */
23
23
  locale?: string;
24
- /** What the number measures, set under it. */
25
- label: RemixNode;
26
24
  /** Text drawn before the number, such as `"$"`. */
27
25
  prefix?: string;
28
26
  /** Text drawn after the number, such as `"%"` or `" ms"`. */
@@ -39,12 +37,11 @@ export declare namespace DrawnChart {
39
37
  /**
40
38
  * Props accepted by {@link DrawnChart}.
41
39
  */
42
- interface Props extends Omit<TagProps<"div">, "children"> {
40
+ interface Props extends TagProps<"div"> {
43
41
  /** Accessible name of the chart: the bars' list, or the line's image. Required. */
44
42
  "aria-label": string;
45
43
  /** Accessible name of the pause toggle. */
46
44
  pauseLabel?: string;
47
- metric?: Metric;
48
45
  /** Defaults to `"bars"`, drawn horizontally so labels read on a phone. */
49
46
  variant?: Variant;
50
47
  series: readonly Datum[];
@@ -52,8 +49,14 @@ export declare namespace DrawnChart {
52
49
  max?: number;
53
50
  /** Index of the one datum drawn in the brand colour. */
54
51
  highlight?: number;
55
- /** A note under the chart, such as the period or the source of the numbers. */
56
- footnote?: RemixNode;
52
+ /**
53
+ * {@link DrawnChart.Metric} and {@link DrawnChart.Footnote}; the metric always sits over
54
+ * the chart and the footnote under it, whatever order they are written in.
55
+ */
56
+ children?: RemixNode;
57
+ }
58
+ /** Every native `<div>` attribute, plus the number it draws; its children say what it measures. */
59
+ interface MetricProps extends TagProps<"div">, MetricNumber {
57
60
  }
58
61
  }
59
62
  /**
@@ -66,9 +69,14 @@ export declare namespace DrawnChart {
66
69
  * @example
67
70
  * <DrawnChart
68
71
  * aria-label="Median time between checks, by how often a feed posts"
69
- * metric={{ value: 15, suffix: " min", label: "Between checks of an hourly feed" }}
70
72
  * series={[{ label: "Hourly", value: 15, display: "15 min" }, { label: "Daily", value: 240, display: "4 h" }]}
71
73
  * highlight={0}
72
- * />
74
+ * >
75
+ * <DrawnChart.Metric value={15} suffix=" min">Between checks of an hourly feed</DrawnChart.Metric>
76
+ * </DrawnChart>
73
77
  */
74
78
  export declare function DrawnChart(handle: Handle<DrawnChart.Props>): () => import("remix/component").RemixElement;
79
+ export declare namespace DrawnChart {
80
+ var Metric: (handle: Handle<DrawnChart.MetricProps>) => () => import("remix/component").RemixElement;
81
+ var Footnote: (handle: Handle<TagProps<"p">>) => () => import("remix/component").RemixElement;
82
+ }