@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,30 +1,26 @@
1
1
  /**
2
- * A receipt block as a `<dl>`: one line per charge with its working beneath, discounts in
3
- * green with a minus, and a bold total under a rule. Amounts arrive formatted and sit
4
- * end-aligned in tabular figures, and a named line wraps its amount in an `<output>`.
2
+ * A receipt block as composable parts: a `<dl>` of charges, each with its working beneath,
3
+ * discounts in green with a minus, a bold total under a rule, and a note under the list.
4
+ * Amounts arrive formatted and sit end-aligned in tabular figures; a named one is an `<output>`.
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
10
  /**
11
11
  * Prop types for {@link PriceBreakdown} and its compound parts.
12
12
  */
13
13
  export declare namespace PriceBreakdown {
14
14
  /** `"discount"` colours the line green and signs its amount with a minus. */
15
15
  type Tone = "default" | "discount";
16
- /** Every native `<div>` attribute, plus the lines and an optional note under them. */
16
+ /** Every native `<div>` attribute; holds the {@link PriceBreakdown.Lines} and a note. */
17
17
  interface Props extends TagProps<"div"> {
18
- /**
19
- * Small muted text under the total, such as "You won't be charged yet"; it sits
20
- * after the `<dl>`, since a description list holds only label/value groups.
21
- */
22
- note?: RemixNode;
23
18
  }
24
- /** What every amount-bearing line takes. */
25
- interface AmountProps extends Omit<TagProps<"div">, "children"> {
26
- /** What the charge is, such as "Cleaning fee". */
27
- label: RemixNode;
19
+ /** Every native `<dl>` attribute; holds the lines and the total. */
20
+ interface LinesProps extends TagProps<"dl"> {
21
+ }
22
+ /** What every amount-bearing line takes; its children are what the charge is. */
23
+ interface AmountProps extends TagProps<"div"> {
28
24
  /** The amount, formatted by the caller, such as "$728.00". */
29
25
  amount: string;
30
26
  /**
@@ -37,30 +33,42 @@ export declare namespace PriceBreakdown {
37
33
  }
38
34
  /** Props accepted by {@link PriceBreakdown.Line}. */
39
35
  interface LineProps extends AmountProps {
40
- /** How the amount was worked out, such as "$182 × 4 nights", in small type beneath. */
41
- detail?: RemixNode;
42
36
  /** @default "default" */
43
37
  tone?: Tone;
44
38
  }
45
39
  /** Props accepted by {@link PriceBreakdown.Total}. */
46
40
  interface TotalProps extends AmountProps {
47
41
  }
42
+ /** Every native `<span>` attribute; how a charge was worked out. */
43
+ interface DetailProps extends TagProps<"span"> {
44
+ }
45
+ /** Every native `<p>` attribute; small text under the receipt. */
46
+ interface NoteProps extends TagProps<"p"> {
47
+ }
48
48
  }
49
49
  /**
50
- * Renders the receipt: a `<dl>` whose lines each pair a `<dt>` label with a `<dd>` amount,
51
- * so the pairing survives in the accessibility tree, and the `note` centred beneath it.
50
+ * Renders the receipt as a column of the parts it is given, usually a
51
+ * {@link PriceBreakdown.Lines} list and a {@link PriceBreakdown.Note} under it.
52
52
  *
53
53
  * @param handle Runtime handle carrying the wrapper's props.
54
54
  * @returns The render function producing the receipt's markup.
55
55
  * @example
56
- * <PriceBreakdown note="You won't be charged yet">
57
- * <PriceBreakdown.Line label="4 nights" detail="$182 × 4 nights" amount="$728.00" name="nights" />
58
- * <PriceBreakdown.Line label="Weekly stay discount" amount="$72.80" tone="discount" />
59
- * <PriceBreakdown.Total label="Total" amount="$745.20" name="total" />
56
+ * <PriceBreakdown>
57
+ * <PriceBreakdown.Lines>
58
+ * <PriceBreakdown.Line amount="$728.00" name="nights">
59
+ * 4 nights<PriceBreakdown.Detail>$182 × 4 nights</PriceBreakdown.Detail>
60
+ * </PriceBreakdown.Line>
61
+ * <PriceBreakdown.Line amount="$72.80" tone="discount">Weekly stay discount</PriceBreakdown.Line>
62
+ * <PriceBreakdown.Total amount="$745.20" name="total">Total</PriceBreakdown.Total>
63
+ * </PriceBreakdown.Lines>
64
+ * <PriceBreakdown.Note>You won't be charged yet</PriceBreakdown.Note>
60
65
  * </PriceBreakdown>
61
66
  */
62
67
  export declare function PriceBreakdown(handle: Handle<PriceBreakdown.Props>): () => import("remix/component").RemixElement;
63
68
  export declare namespace PriceBreakdown {
69
+ var Lines: (handle: Handle<PriceBreakdown.LinesProps>) => () => import("remix/component").RemixElement;
64
70
  var Line: (handle: Handle<PriceBreakdown.LineProps>) => () => import("remix/component").RemixElement;
71
+ var Detail: (handle: Handle<PriceBreakdown.DetailProps>) => () => import("remix/component").RemixElement;
65
72
  var Total: (handle: Handle<PriceBreakdown.TotalProps>) => () => import("remix/component").RemixElement;
73
+ var Note: (handle: Handle<PriceBreakdown.NoteProps>) => () => import("remix/component").RemixElement;
66
74
  }
@@ -6,6 +6,8 @@ import { m, minIs, p } from "@sdxc/u/size";
6
6
  import { leading, tabularNums, text, weight } from "@sdxc/u/typography";
7
7
  /** The sign a discount's amount gains when the caller formatted it without one. */
8
8
  const MINUS = "−";
9
+ /** Tone a line takes when `tone` is left out. */
10
+ const DEFAULT_TONE = "default";
9
11
  /**
10
12
  * Signs a discount's amount with a minus unless it already carries one.
11
13
  *
@@ -33,24 +35,46 @@ function AmountValue(handle) {
33
35
  };
34
36
  }
35
37
  /**
36
- * Renders the receipt: a `<dl>` whose lines each pair a `<dt>` label with a `<dd>` amount,
37
- * so the pairing survives in the accessibility tree, and the `note` centred beneath it.
38
+ * Renders the receipt as a column of the parts it is given, usually a
39
+ * {@link PriceBreakdown.Lines} list and a {@link PriceBreakdown.Note} under it.
38
40
  *
39
41
  * @param handle Runtime handle carrying the wrapper's props.
40
42
  * @returns The render function producing the receipt's markup.
41
43
  * @example
42
- * <PriceBreakdown note="You won't be charged yet">
43
- * <PriceBreakdown.Line label="4 nights" detail="$182 × 4 nights" amount="$728.00" name="nights" />
44
- * <PriceBreakdown.Line label="Weekly stay discount" amount="$72.80" tone="discount" />
45
- * <PriceBreakdown.Total label="Total" amount="$745.20" name="total" />
44
+ * <PriceBreakdown>
45
+ * <PriceBreakdown.Lines>
46
+ * <PriceBreakdown.Line amount="$728.00" name="nights">
47
+ * 4 nights<PriceBreakdown.Detail>$182 × 4 nights</PriceBreakdown.Detail>
48
+ * </PriceBreakdown.Line>
49
+ * <PriceBreakdown.Line amount="$72.80" tone="discount">Weekly stay discount</PriceBreakdown.Line>
50
+ * <PriceBreakdown.Total amount="$745.20" name="total">Total</PriceBreakdown.Total>
51
+ * </PriceBreakdown.Lines>
52
+ * <PriceBreakdown.Note>You won't be charged yet</PriceBreakdown.Note>
46
53
  * </PriceBreakdown>
47
54
  */
48
55
  export function PriceBreakdown(handle) {
49
56
  return () => {
50
- let { note, children, mix, ...rest } = handle.props;
51
- return (_jsxs("div", { "data-slot": "price-breakdown", ...rest, mix: mergeMix([minIs(0), vstack({ gap: 4 }), text("sm")], mix), children: [_jsx("dl", { mix: [m(0), vstack({ gap: 3 })], children: children }), note === undefined ? null : (_jsx("p", { "data-slot": "price-breakdown-note", mix: [m(0), text("xs"), fg("neutral.muted"), raw({ textAlign: "center" })], children: note }))] }));
57
+ let { mix, ...rest } = handle.props;
58
+ return (_jsx("div", { "data-slot": "price-breakdown", ...rest, mix: mergeMix([minIs(0), vstack({ gap: 4 }), text("sm")], mix) }));
52
59
  };
53
60
  }
61
+ /**
62
+ * Renders the charges as a `<dl>`, so each line's label and amount stay paired in the
63
+ * accessibility tree.
64
+ *
65
+ * @param handle Runtime handle carrying the list's props.
66
+ * @returns The render function producing the list's markup.
67
+ * @example
68
+ * <PriceBreakdown.Lines>
69
+ * <PriceBreakdown.Line amount="$45.00">Cleaning fee</PriceBreakdown.Line>
70
+ * </PriceBreakdown.Lines>
71
+ */
72
+ PriceBreakdown.Lines = function PriceBreakdownLines(handle) {
73
+ return () => {
74
+ let { mix, ...rest } = handle.props;
75
+ return (_jsx("dl", { "data-slot": "price-breakdown-lines", ...rest, mix: mergeMix([m(0), vstack({ gap: 3 }), text("sm")], mix) }));
76
+ };
77
+ };
54
78
  /** Columns every line shares: the label takes what is left, the amount what it needs. */
55
79
  const LINE_COLUMNS = raw({
56
80
  display: "grid",
@@ -59,21 +83,36 @@ const LINE_COLUMNS = raw({
59
83
  alignItems: "baseline",
60
84
  });
61
85
  /**
62
- * Renders one charge: its label, the working under it in muted small type, and its amount
63
- * at the end. A discount is green and its amount is signed with a minus.
86
+ * Renders one charge: its children as the label, any {@link PriceBreakdown.Detail} under it in
87
+ * muted small type, and its amount at the end. A discount is green and signed with a minus.
64
88
  *
65
89
  * @param handle Runtime handle carrying the line's props.
66
90
  * @returns The render function producing the line's markup.
67
91
  * @example
68
- * <PriceBreakdown.Line label="Cleaning fee" amount="$45.00" />
92
+ * <PriceBreakdown.Line amount="$45.00">Cleaning fee</PriceBreakdown.Line>
69
93
  * @example
70
- * <PriceBreakdown.Line label="Early-bird discount" amount="$30.00" tone="discount" line="discount" />
94
+ * <PriceBreakdown.Line amount="$30.00" tone="discount" line="discount">Early-bird discount</PriceBreakdown.Line>
71
95
  */
72
96
  PriceBreakdown.Line = function PriceBreakdownLine(handle) {
73
97
  return () => {
74
- let { label, amount, name, line, detail, tone, mix, ...rest } = handle.props;
98
+ let { amount, name, line, tone = DEFAULT_TONE, children, mix, ...rest } = handle.props;
75
99
  let discount = tone === "discount";
76
- return (_jsxs("div", { "data-slot": "price-breakdown-line", "data-line": line, "data-tone": discount ? "discount" : undefined, ...rest, mix: mergeMix([LINE_COLUMNS, discount ? fg("success") : fg("neutral.emphasis")], mix), children: [_jsxs("dt", { mix: [m(0), minIs(0), leading("1.4")], children: [label, detail === undefined ? null : (_jsx("span", { "data-slot": "price-breakdown-detail", mix: [raw({ display: "block" }), text("xs"), fg("neutral.muted"), tabularNums()], children: detail }))] }), _jsx("dd", { mix: [m(0), tabularNums(), raw({ textAlign: "end", whiteSpace: "nowrap" })], children: _jsx(AmountValue, { amount: discount ? asDiscount(amount) : amount, name: name }) })] }));
100
+ return (_jsxs("div", { "data-slot": "price-breakdown-line", "data-line": line, "data-tone": discount ? "discount" : undefined, ...rest, mix: mergeMix([LINE_COLUMNS, discount ? fg("success") : fg("neutral.emphasis")], mix), children: [_jsx("dt", { mix: [m(0), minIs(0), leading("1.4")], children: children }), _jsx("dd", { mix: [m(0), tabularNums(), raw({ textAlign: "end", whiteSpace: "nowrap" })], children: _jsx(AmountValue, { amount: discount ? asDiscount(amount) : amount, name: name }) })] }));
101
+ };
102
+ };
103
+ /**
104
+ * Renders how a charge was worked out, such as "$182 × 4 nights", on its own line under the
105
+ * label in muted small type; write it inside a {@link PriceBreakdown.Line}.
106
+ *
107
+ * @param handle Runtime handle carrying the span's props.
108
+ * @returns The render function producing the detail's markup.
109
+ * @example
110
+ * <PriceBreakdown.Detail>$182 × 4 nights</PriceBreakdown.Detail>
111
+ */
112
+ PriceBreakdown.Detail = function PriceBreakdownDetail(handle) {
113
+ return () => {
114
+ let { mix, ...rest } = handle.props;
115
+ return (_jsx("span", { "data-slot": "price-breakdown-detail", ...rest, mix: mergeMix([raw({ display: "block" }), text("xs"), fg("neutral.muted"), tabularNums()], mix) }));
77
116
  };
78
117
  };
79
118
  /**
@@ -83,11 +122,11 @@ PriceBreakdown.Line = function PriceBreakdownLine(handle) {
83
122
  * @param handle Runtime handle carrying the total's props.
84
123
  * @returns The render function producing the total's markup.
85
124
  * @example
86
- * <PriceBreakdown.Total label="Total (USD)" amount="$745.20" name="total" />
125
+ * <PriceBreakdown.Total amount="$745.20" name="total">Total (USD)</PriceBreakdown.Total>
87
126
  */
88
127
  PriceBreakdown.Total = function PriceBreakdownTotal(handle) {
89
128
  return () => {
90
- let { label, amount, name, line, mix, ...rest } = handle.props;
129
+ let { amount, name, line, children, mix, ...rest } = handle.props;
91
130
  return (_jsxs("div", { "data-slot": "price-breakdown-total", "data-line": line, ...rest, mix: mergeMix([
92
131
  LINE_COLUMNS,
93
132
  border({ color: "neutral.border", width: 0 }),
@@ -97,6 +136,22 @@ PriceBreakdown.Total = function PriceBreakdownTotal(handle) {
97
136
  text("base"),
98
137
  weight("semibold"),
99
138
  fg("neutral.emphasis"),
100
- ], mix), children: [_jsx("dt", { mix: [m(0), minIs(0)], children: label }), _jsx("dd", { mix: [m(0), tabularNums(), raw({ textAlign: "end", whiteSpace: "nowrap" })], children: _jsx(AmountValue, { amount: amount, name: name }) })] }));
139
+ ], mix), children: [_jsx("dt", { mix: [m(0), minIs(0)], children: children }), _jsx("dd", { mix: [m(0), tabularNums(), raw({ textAlign: "end", whiteSpace: "nowrap" })], children: _jsx(AmountValue, { amount: amount, name: name }) })] }));
140
+ };
141
+ };
142
+ /**
143
+ * Renders small muted text centred under the receipt, such as "You won't be charged yet";
144
+ * write it after the {@link PriceBreakdown.Lines}, since a description list holds only
145
+ * label and value groups.
146
+ *
147
+ * @param handle Runtime handle carrying the paragraph's props.
148
+ * @returns The render function producing the note's markup.
149
+ * @example
150
+ * <PriceBreakdown.Note>You won't be charged yet</PriceBreakdown.Note>
151
+ */
152
+ PriceBreakdown.Note = function PriceBreakdownNote(handle) {
153
+ return () => {
154
+ let { mix, ...rest } = handle.props;
155
+ return (_jsx("p", { "data-slot": "price-breakdown-note", ...rest, mix: mergeMix([m(0), text("xs"), fg("neutral.muted"), raw({ textAlign: "center" })], mix) }));
101
156
  };
102
157
  };
@@ -1,12 +1,12 @@
1
1
  /**
2
- * A reviews summary: the average score set large beside a star and the review count, then
3
- * groups of bars, one per star level or per category. Each bar is an ARIA meter named by its
4
- * label, and a category group runs two to a row once its own container is wide enough.
2
+ * A reviews summary as composable parts: the average score set large beside a star and the
3
+ * review count, then groups of bars, one per star level or per category. Each bar is an ARIA
4
+ * meter named by its label, and a category group runs two to a row once the summary is wide.
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
10
  /**
11
11
  * Prop types for {@link RatingBreakdown} and its compound parts.
12
12
  */
@@ -21,8 +21,11 @@ export declare namespace RatingBreakdown {
21
21
  interface GroupContext {
22
22
  kind: Kind;
23
23
  }
24
- /** Every native `<section>` attribute, plus the headline score. */
24
+ /** Every native `<section>` attribute; holds the score and the groups of bars. */
25
25
  interface Props extends TagProps<"section"> {
26
+ }
27
+ /** Every native `<p>` attribute, plus the headline score; holds the review count. */
28
+ interface ScoreProps extends TagProps<"p"> {
26
29
  /** The average rating, such as `4.86`. */
27
30
  score: number;
28
31
  /** @default 5 */
@@ -33,8 +36,6 @@ export declare namespace RatingBreakdown {
33
36
  * @default score.toFixed(2)
34
37
  */
35
38
  display?: string;
36
- /** The review count as shown, such as "128 reviews". */
37
- count?: RemixNode;
38
39
  /**
39
40
  * What follows the score for a screen reader, completing "4.86 out of 5".
40
41
  *
@@ -42,16 +43,18 @@ export declare namespace RatingBreakdown {
42
43
  */
43
44
  outOf?: string;
44
45
  }
46
+ /** Every native `<span>` attribute; the review count, such as "128 reviews". */
47
+ interface CountProps extends TagProps<"span"> {
48
+ }
45
49
  /** Every native `<ul>` attribute, plus how its bars lay out. */
46
50
  interface GroupProps extends TagProps<"ul"> {
47
51
  kind: Kind;
48
52
  }
49
- /** Every native `<li>` attribute, plus what the bar measures. */
50
- interface BarProps extends Omit<TagProps<"li">, "children"> {
51
- /** What the bar measures, such as "5 stars" or "Cleanliness"; it names the meter. */
52
- label: string;
53
- /** Drawn before the label, such as a star or a category's icon. */
54
- icon?: RemixNode;
53
+ /**
54
+ * Every native `<li>` attribute, plus what the bar measures; its children, such as an icon
55
+ * and "Cleanliness", are the label that names the meter.
56
+ */
57
+ interface BarProps extends TagProps<"li"> {
55
58
  /** The measured amount: a share from 0 to `max`, or a category's score. */
56
59
  value: number;
57
60
  /** @default 1 for a "stars" group, 5 for a "categories" group */
@@ -61,21 +64,25 @@ export declare namespace RatingBreakdown {
61
64
  }
62
65
  }
63
66
  /**
64
- * Renders the summary: a `<section>` opening with the score, its star and the review count,
65
- * followed by its {@link RatingBreakdown.Group} children. A screen reader hears the score as
66
- * "4.86 out of 5".
67
+ * Renders the summary as a `<section>` that stacks the parts it is given, usually a
68
+ * {@link RatingBreakdown.Score} over one or more {@link RatingBreakdown.Group}s.
67
69
  *
68
70
  * @param handle Runtime handle carrying the section's props.
69
71
  * @returns The render function producing the summary's markup.
70
72
  * @example
71
- * <RatingBreakdown score={4.86} count="128 reviews">
73
+ * <RatingBreakdown>
74
+ * <RatingBreakdown.Score score={4.86}>
75
+ * <RatingBreakdown.Count>128 reviews</RatingBreakdown.Count>
76
+ * </RatingBreakdown.Score>
72
77
  * <RatingBreakdown.Group kind="stars" aria-label="Ratings by star">
73
- * <RatingBreakdown.Bar label="5 stars" value={0.92} display="92%" />
78
+ * <RatingBreakdown.Bar value={0.92} display="92%">5 stars</RatingBreakdown.Bar>
74
79
  * </RatingBreakdown.Group>
75
80
  * </RatingBreakdown>
76
81
  */
77
82
  export declare function RatingBreakdown(handle: Handle<RatingBreakdown.Props>): () => import("remix/component").RemixElement;
78
83
  export declare namespace RatingBreakdown {
84
+ var Score: (handle: Handle<RatingBreakdown.ScoreProps>) => () => import("remix/component").RemixElement;
85
+ var Count: (handle: Handle<RatingBreakdown.CountProps>) => () => import("remix/component").RemixElement;
79
86
  var Group: (handle: Handle<RatingBreakdown.GroupProps, RatingBreakdown.GroupContext>) => () => import("remix/component").RemixElement;
80
87
  var Bar: (handle: Handle<RatingBreakdown.BarProps>) => () => import("remix/component").RemixElement;
81
88
  }
@@ -15,34 +15,70 @@ const CONTAINER_NAME = "ui-rating-breakdown";
15
15
  const TWO_COLUMN_WIDTH = "30rem";
16
16
  /** Top of the scale when `max` is left out: a five-star rating. */
17
17
  const DEFAULT_MAX = 5;
18
+ /** How a bar lays out when it sits outside a {@link RatingBreakdown.Group}. */
19
+ const DEFAULT_KIND = "stars";
18
20
  /**
19
- * Renders the summary: a `<section>` opening with the score, its star and the review count,
20
- * followed by its {@link RatingBreakdown.Group} children. A screen reader hears the score as
21
- * "4.86 out of 5".
21
+ * Renders the summary as a `<section>` that stacks the parts it is given, usually a
22
+ * {@link RatingBreakdown.Score} over one or more {@link RatingBreakdown.Group}s.
22
23
  *
23
24
  * @param handle Runtime handle carrying the section's props.
24
25
  * @returns The render function producing the summary's markup.
25
26
  * @example
26
- * <RatingBreakdown score={4.86} count="128 reviews">
27
+ * <RatingBreakdown>
28
+ * <RatingBreakdown.Score score={4.86}>
29
+ * <RatingBreakdown.Count>128 reviews</RatingBreakdown.Count>
30
+ * </RatingBreakdown.Score>
27
31
  * <RatingBreakdown.Group kind="stars" aria-label="Ratings by star">
28
- * <RatingBreakdown.Bar label="5 stars" value={0.92} display="92%" />
32
+ * <RatingBreakdown.Bar value={0.92} display="92%">5 stars</RatingBreakdown.Bar>
29
33
  * </RatingBreakdown.Group>
30
34
  * </RatingBreakdown>
31
35
  */
32
36
  export function RatingBreakdown(handle) {
33
37
  return () => {
34
- let { score, max, display, count, outOf, children, mix, ...rest } = handle.props;
35
- let top = max ?? DEFAULT_MAX;
36
- return (_jsxs("section", { "data-slot": "rating-breakdown", ...rest, mix: mergeMix([container(CONTAINER_NAME, "inline-size"), vstack({ gap: 5 })], mix), children: [_jsxs("p", { "data-slot": "rating-breakdown-score", mix: [m(0), flex(), items("center"), gap(2), raw({ flexWrap: "wrap" })], children: [_jsx("span", { "aria-hidden": "true", mix: [flex(), raw({ color: "var(--ui-warning-fg)" })], children: _jsx(StarIcon, { size: 28, fill: "currentColor", "stroke-width": 0 }) }), _jsxs("span", { mix: [
37
- text("3xl"),
38
- weight("semibold"),
39
- tracking("tight"),
40
- leading(1),
41
- tabularNums(),
42
- fg("neutral.emphasis"),
43
- ], children: [display ?? score.toFixed(2), _jsx("span", { mix: [visuallyHidden()], children: ` ${outOf ?? `out of ${top}`}` })] }), count === undefined ? null : (_jsx("span", { "data-slot": "rating-breakdown-count", mix: [text("sm"), fg("neutral.muted")], children: count }))] }), children] }));
38
+ let { mix, ...rest } = handle.props;
39
+ return (_jsx("section", { "data-slot": "rating-breakdown", ...rest, mix: mergeMix([container(CONTAINER_NAME, "inline-size"), vstack({ gap: 5 })], mix) }));
44
40
  };
45
41
  }
42
+ /**
43
+ * Renders the headline: a star, the score set large and its children, usually a
44
+ * {@link RatingBreakdown.Count}. A screen reader hears the score as "4.86 out of 5".
45
+ *
46
+ * @param handle Runtime handle carrying the paragraph's props.
47
+ * @returns The render function producing the score's markup.
48
+ * @example
49
+ * <RatingBreakdown.Score score={4.86} outOf="out of 5">
50
+ * <RatingBreakdown.Count>128 reviews</RatingBreakdown.Count>
51
+ * </RatingBreakdown.Score>
52
+ */
53
+ RatingBreakdown.Score = function RatingBreakdownScore(handle) {
54
+ return () => {
55
+ let { score, max, display, outOf, children, mix, ...rest } = handle.props;
56
+ let top = max ?? DEFAULT_MAX;
57
+ return (_jsxs("p", { "data-slot": "rating-breakdown-score", ...rest, mix: mergeMix([m(0), flex(), items("center"), gap(2), raw({ flexWrap: "wrap" })], mix), children: [_jsx("span", { "aria-hidden": "true", mix: [flex(), raw({ color: "var(--ui-warning-fg)" })], children: _jsx(StarIcon, { size: 28, fill: "currentColor", "stroke-width": 0 }) }), _jsxs("span", { mix: [
58
+ text("3xl"),
59
+ weight("semibold"),
60
+ tracking("tight"),
61
+ leading(1),
62
+ tabularNums(),
63
+ fg("neutral.emphasis"),
64
+ ], children: [display ?? score.toFixed(2), _jsx("span", { mix: [visuallyHidden()], children: ` ${outOf ?? `out of ${top}`}` })] }), children] }));
65
+ };
66
+ };
67
+ /**
68
+ * Renders the review count in small muted type, beside the score when written inside a
69
+ * {@link RatingBreakdown.Score}.
70
+ *
71
+ * @param handle Runtime handle carrying the span's props.
72
+ * @returns The render function producing the count's markup.
73
+ * @example
74
+ * <RatingBreakdown.Count>128 reviews</RatingBreakdown.Count>
75
+ */
76
+ RatingBreakdown.Count = function RatingBreakdownCount(handle) {
77
+ return () => {
78
+ let { mix, ...rest } = handle.props;
79
+ return (_jsx("span", { "data-slot": "rating-breakdown-count", ...rest, mix: mergeMix([text("sm"), fg("neutral.muted")], mix) }));
80
+ };
81
+ };
46
82
  /**
47
83
  * Renders a list of bars of one kind: star levels one under another, or categories in a
48
84
  * grid that runs two to a row once the summary is 30rem wide. Name each group with
@@ -52,7 +88,7 @@ export function RatingBreakdown(handle) {
52
88
  * @returns The render function producing the list's markup.
53
89
  * @example
54
90
  * <RatingBreakdown.Group kind="categories" aria-label="Ratings by category">
55
- * <RatingBreakdown.Bar label="Cleanliness" icon={<SparklesIcon />} value={4.9} display="4.9" />
91
+ * <RatingBreakdown.Bar value={4.9} display="4.9"><SparklesIcon />Cleanliness</RatingBreakdown.Bar>
56
92
  * </RatingBreakdown.Group>
57
93
  */
58
94
  RatingBreakdown.Group = function RatingBreakdownGroup(handle) {
@@ -74,21 +110,22 @@ RatingBreakdown.Group = function RatingBreakdownGroup(handle) {
74
110
  };
75
111
  };
76
112
  /**
77
- * Renders one bar as an ARIA meter named by `label` and valued by `display`, filled to
113
+ * Renders one bar as an ARIA meter named by its children and valued by `display`, filled to
78
114
  * `value / max` of its track; the figure at its end is hidden from assistive technology,
79
115
  * which reads it as the meter's value. Values outside `0..max` are clamped.
80
116
  *
81
117
  * @param handle Runtime handle carrying the item's props.
82
118
  * @returns The render function producing the bar's markup.
83
119
  * @example
84
- * <RatingBreakdown.Bar label="4 stars" value={0.06} display="6%" />
120
+ * <RatingBreakdown.Bar value={0.06} display="6%">4 stars</RatingBreakdown.Bar>
85
121
  * @example
86
- * <RatingBreakdown.Bar label="Location" icon={<MapPinIcon />} value={4.7} display="4.7" />
122
+ * <RatingBreakdown.Bar value={4.7} display="4.7"><MapPinIcon />Location</RatingBreakdown.Bar>
87
123
  */
88
124
  RatingBreakdown.Bar = function RatingBreakdownBar(handle) {
89
125
  return () => {
90
- let { label, icon, value, max, display, mix, ...rest } = handle.props;
91
- let { kind } = handle.context.get(RatingBreakdown.Group);
126
+ let { value, max, display, children, mix, ...rest } = handle.props;
127
+ let group = handle.context.get(RatingBreakdown.Group);
128
+ let kind = group?.kind ?? DEFAULT_KIND;
92
129
  let top = max ?? (kind === "stars" ? 1 : DEFAULT_MAX);
93
130
  let share = top > 0 ? Math.max(0, Math.min(1, value / top)) : 0;
94
131
  let labelId = `${handle.id}-label`;
@@ -108,7 +145,7 @@ RatingBreakdown.Bar = function RatingBreakdownBar(handle) {
108
145
  columnGap: "0.75rem",
109
146
  rowGap: "0.375rem",
110
147
  }),
111
- ], mix), children: [_jsxs("span", { id: labelId, "data-slot": "rating-breakdown-label", mix: [
148
+ ], mix), children: [_jsx("span", { id: labelId, "data-slot": "rating-breakdown-label", mix: [
112
149
  flex(),
113
150
  items("center"),
114
151
  gap(1.5),
@@ -116,7 +153,7 @@ RatingBreakdown.Bar = function RatingBreakdownBar(handle) {
116
153
  fg(stars ? "neutral.muted" : "neutral.emphasis"),
117
154
  stars ? null : raw({ gridArea: "label" }),
118
155
  when("& > svg", raw({ inlineSize: "1rem", blockSize: "1rem", flexShrink: 0 })),
119
- ], children: [icon, label] }), _jsx("div", { role: "meter", "aria-labelledby": labelId, "aria-valuemin": 0, "aria-valuemax": top, "aria-valuenow": value, "aria-valuetext": display, "data-slot": "rating-breakdown-track", mix: [
156
+ ], children: children }), _jsx("div", { role: "meter", "aria-labelledby": labelId, "aria-valuemin": 0, "aria-valuemax": top, "aria-valuenow": value, "aria-valuetext": display, "data-slot": "rating-breakdown-track", mix: [
120
157
  bs("0.375rem"),
121
158
  rounded("full"),
122
159
  bg("neutral.border"),
@@ -1,13 +1,13 @@
1
1
  /**
2
- * An aircraft cabin seat picker: a fuselage with a rounded nose, column letters over a grid of
3
- * seats, row numbers down the aisle and exits marked on both walls. Every seat is a native radio
4
- * under one name, so a form posts the pick and arrow keys move between seats without script.
2
+ * An aircraft cabin seat picker: a fuselage with a rounded nose, an optional deck title and section
3
+ * titles, column letters over a grid of seats, row numbers down the aisle and exits on both walls.
4
+ * Every seat is a native radio under one name, so a form posts the pick with no script.
5
5
  *
6
6
  * @author [Sergio Xalambrí](https://sergiodxa.com)
7
7
  * @copyright Sergio Xalambrí 2026
8
8
  */
9
9
  import type { Handle, Props as TagProps, RemixNode } from "remix/component";
10
- /** Prop types for {@link SeatMap} and {@link SeatMap.Legend}. */
10
+ /** Prop types for {@link SeatMap} and its compound parts. */
11
11
  export declare namespace SeatMap {
12
12
  /** Whether a seat can be picked; `"taken"` and `"blocked"` seats render disabled. */
13
13
  type Status = "available" | "taken" | "blocked";
@@ -28,10 +28,9 @@ export declare namespace SeatMap {
28
28
  number: number;
29
29
  seats: Seat[];
30
30
  }
31
- /** A cabin section's title, drawn across the cabin above row `from`. */
32
- interface Section {
33
- from: number;
34
- title: RemixNode;
31
+ /** What {@link SeatMap} shares with its titles: the grid line each row's title takes. */
32
+ interface Context {
33
+ sectionLines: Record<number, number>;
35
34
  }
36
35
  /** Words appended to a seat's spoken name, in the page's language. */
37
36
  interface Labels {
@@ -48,8 +47,11 @@ export declare namespace SeatMap {
48
47
  /** Read after a seat of each tinted kind, e.g. `{ "extra-legroom": "extra legroom" }`. */
49
48
  kinds?: Partial<Record<Exclude<Kind, "standard">, string>>;
50
49
  }
51
- /** Every native `<fieldset>` attribute, plus the cabin to draw. */
52
- interface Props extends Omit<TagProps<"fieldset">, "children"> {
50
+ /**
51
+ * Every native `<fieldset>` attribute, plus the cabin to draw; its children are the
52
+ * {@link SeatMap.Deck} and {@link SeatMap.Section} titles drawn across the cabin.
53
+ */
54
+ interface Props extends TagProps<"fieldset"> {
53
55
  rows: Row[];
54
56
  /** Seat letters in cabin order, a space for each aisle, e.g. "ABC DEF". */
55
57
  layout: string;
@@ -60,27 +62,29 @@ export declare namespace SeatMap {
60
62
  /** Names the radio group for assistive technology, e.g. "Choose a seat". */
61
63
  label: string;
62
64
  labels: Labels;
63
- /** A visible header under the nose, such as "Main deck · Larkwing A321". */
64
- deck?: RemixNode;
65
65
  /** First and last rows the wing spans, drawn on both walls. */
66
66
  wings?: [number, number];
67
67
  /** Rows with an emergency exit, marked on both walls. */
68
68
  exitRows?: number[];
69
- /** Section titles, each drawn above the row it starts at. */
70
- sections?: Section[];
71
69
  /** Asks the browser to require a pick before the form submits. */
72
70
  required?: boolean;
73
71
  }
74
72
  /** What one legend entry explains. */
75
73
  type Swatch = "available" | "selected" | "taken" | "blocked" | Exclude<Kind, "standard">;
76
- /** One legend entry: the swatch drawn and its caption. */
77
- interface LegendItem {
78
- swatch: Swatch;
79
- label: RemixNode;
74
+ /** Every native `<p>` attribute; a header under the nose, such as "Main deck · A321". */
75
+ interface DeckProps extends TagProps<"p"> {
76
+ }
77
+ /** Every native `<p>` attribute, plus the row the section starts at. */
78
+ interface SectionProps extends TagProps<"p"> {
79
+ /** The number of the row the title sits above, such as `10` for "Economy". */
80
+ from: number;
81
+ }
82
+ /** Every native `<ul>` attribute; holds the {@link SeatMap.LegendItem}s. */
83
+ interface LegendProps extends TagProps<"ul"> {
80
84
  }
81
- /** Every native `<ul>` attribute, plus the entries to explain. */
82
- interface LegendProps extends Omit<TagProps<"ul">, "children"> {
83
- items: LegendItem[];
85
+ /** Every native `<li>` attribute, plus the swatch it draws; its children are the caption. */
86
+ interface LegendItemProps extends TagProps<"li"> {
87
+ swatch: Swatch;
84
88
  }
85
89
  }
86
90
  /**
@@ -102,7 +106,10 @@ export declare namespace SeatMap {
102
106
  * wings={[10, 18]}
103
107
  * />
104
108
  */
105
- export declare function SeatMap(handle: Handle<SeatMap.Props>): () => import("remix/component").RemixElement;
109
+ export declare function SeatMap(handle: Handle<SeatMap.Props, SeatMap.Context>): () => import("remix/component").RemixElement;
106
110
  export declare namespace SeatMap {
111
+ var Deck: (handle: Handle<SeatMap.DeckProps>) => () => import("remix/component").RemixElement;
112
+ var Section: (handle: Handle<SeatMap.SectionProps>) => () => import("remix/component").RemixElement | null;
107
113
  var Legend: (handle: Handle<SeatMap.LegendProps>) => () => import("remix/component").RemixElement;
114
+ var LegendItem: (handle: Handle<SeatMap.LegendItemProps>) => () => import("remix/component").RemixElement;
108
115
  }