@sdxc/ui 2026.11.26 → 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 (418) 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/lightbox.js +12 -6
  201. package/dist/components/listbox.d.ts +0 -9
  202. package/dist/components/listbox.js +2 -2
  203. package/dist/components/media-grid.d.ts +15 -16
  204. package/dist/components/media-grid.js +75 -34
  205. package/dist/components/pager.d.ts +103 -0
  206. package/dist/components/pager.js +187 -0
  207. package/dist/components/property-list.d.ts +38 -39
  208. package/dist/components/property-list.js +149 -96
  209. package/dist/components/radio-group.d.ts +0 -11
  210. package/dist/components/radio-group.js +5 -6
  211. package/dist/components/range-calendar.d.ts +2 -14
  212. package/dist/components/range-calendar.js +2 -2
  213. package/dist/components/range-months.d.ts +12 -2
  214. package/dist/components/range-months.js +32 -16
  215. package/dist/components/rating-input.d.ts +14 -6
  216. package/dist/components/rating-input.js +26 -12
  217. package/dist/components/rating.d.ts +13 -8
  218. package/dist/components/rating.js +19 -5
  219. package/dist/components/review-card.d.ts +51 -26
  220. package/dist/components/review-card.js +173 -40
  221. package/dist/components/search-field.js +18 -8
  222. package/dist/components/section-bar.d.ts +23 -15
  223. package/dist/components/section-bar.js +59 -37
  224. package/dist/components/sidebar.d.ts +27 -0
  225. package/dist/components/sidebar.js +49 -20
  226. package/dist/{docs → components}/table-of-contents.d.ts +1 -1
  227. package/dist/{docs → components}/table-of-contents.js +3 -3
  228. package/dist/components/text-field.d.ts +54 -81
  229. package/dist/components/text-field.js +30 -44
  230. package/dist/components/time-field.d.ts +45 -65
  231. package/dist/components/time-field.js +23 -35
  232. package/dist/components/timeline.d.ts +80 -86
  233. package/dist/components/timeline.js +383 -170
  234. package/dist/components/typeset.d.ts +5 -0
  235. package/dist/components/typeset.js +17 -2
  236. package/dist/docs/code-tabs.d.ts +50 -24
  237. package/dist/docs/code-tabs.js +91 -25
  238. package/dist/docs/docs-feedback.d.ts +70 -27
  239. package/dist/docs/docs-feedback.js +156 -27
  240. package/dist/docs/docs-footer.d.ts +36 -22
  241. package/dist/docs/docs-footer.js +76 -23
  242. package/dist/docs/docs-hub.d.ts +103 -73
  243. package/dist/docs/docs-hub.js +333 -83
  244. package/dist/docs/docs-layout.d.ts +111 -42
  245. package/dist/docs/docs-layout.js +371 -97
  246. package/dist/docs/docs-nav-tools.d.ts +11 -7
  247. package/dist/docs/docs-nav-tools.js +4 -3
  248. package/dist/docs/docs-nav.d.ts +53 -17
  249. package/dist/docs/docs-nav.js +125 -14
  250. package/dist/docs/docs-not-found.d.ts +61 -35
  251. package/dist/docs/docs-not-found.js +198 -52
  252. package/dist/docs/docs-page-header.d.ts +47 -30
  253. package/dist/docs/docs-page-header.js +114 -31
  254. package/dist/docs/docs-pager.d.ts +43 -27
  255. package/dist/docs/docs-pager.js +73 -23
  256. package/dist/docs/file-tree.d.ts +16 -6
  257. package/dist/docs/file-tree.js +19 -4
  258. package/dist/docs/index.d.ts +0 -7
  259. package/dist/docs/index.js +0 -7
  260. package/dist/docs/install-command.d.ts +7 -6
  261. package/dist/docs/install-command.js +8 -10
  262. package/dist/docs/mixins/docs-nav-tools.js +1 -1
  263. package/dist/docs/next-steps.d.ts +56 -23
  264. package/dist/docs/next-steps.js +121 -35
  265. package/dist/docs/page-actions.d.ts +68 -46
  266. package/dist/docs/page-actions.js +129 -21
  267. package/dist/docs/steps.d.ts +14 -11
  268. package/dist/docs/steps.js +36 -18
  269. package/dist/docs/ui-label.d.ts +7 -6
  270. package/dist/docs/ui-label.js +21 -8
  271. package/dist/finance/ledger.d.ts +33 -29
  272. package/dist/finance/ledger.js +190 -43
  273. package/dist/finance/payment-card.d.ts +43 -31
  274. package/dist/finance/payment-card.js +170 -67
  275. package/dist/landing/author-band.d.ts +57 -54
  276. package/dist/landing/author-band.js +218 -64
  277. package/dist/landing/case-study.d.ts +57 -57
  278. package/dist/landing/case-study.js +148 -17
  279. package/dist/landing/changelog-strip.d.ts +56 -36
  280. package/dist/landing/changelog-strip.js +176 -68
  281. package/dist/landing/closing-cta.d.ts +21 -41
  282. package/dist/landing/closing-cta.js +13 -19
  283. package/dist/landing/code-stage.d.ts +55 -47
  284. package/dist/landing/code-stage.js +198 -67
  285. package/dist/landing/contributor-wall.d.ts +4 -4
  286. package/dist/landing/contributor-wall.js +4 -4
  287. package/dist/landing/curriculum.d.ts +74 -45
  288. package/dist/landing/curriculum.js +220 -62
  289. package/dist/landing/drawn-chart.d.ts +18 -10
  290. package/dist/landing/drawn-chart.js +57 -26
  291. package/dist/landing/episode-player.d.ts +69 -43
  292. package/dist/landing/episode-player.js +213 -48
  293. package/dist/landing/event-ticker.d.ts +13 -7
  294. package/dist/landing/event-ticker.js +67 -32
  295. package/dist/landing/fan-out-diagram.d.ts +19 -8
  296. package/dist/landing/fan-out-diagram.js +60 -19
  297. package/dist/landing/faq-band.d.ts +30 -48
  298. package/dist/landing/faq-band.js +37 -30
  299. package/dist/landing/feature-band.d.ts +48 -76
  300. package/dist/landing/feature-band.js +71 -49
  301. package/dist/landing/flow-diagram.d.ts +16 -8
  302. package/dist/landing/flow-diagram.js +50 -18
  303. package/dist/landing/install-tabs.d.ts +16 -14
  304. package/dist/landing/install-tabs.js +87 -39
  305. package/dist/landing/landing-header.d.ts +75 -66
  306. package/dist/landing/landing-header.js +284 -57
  307. package/dist/landing/landing-hero.d.ts +59 -87
  308. package/dist/landing/landing-hero.js +157 -128
  309. package/dist/landing/landing-section.d.ts +0 -9
  310. package/dist/landing/landing-section.js +1 -2
  311. package/dist/landing/logo-cloud.d.ts +26 -9
  312. package/dist/landing/logo-cloud.js +62 -18
  313. package/dist/landing/phone-fan.d.ts +15 -7
  314. package/dist/landing/phone-fan.js +60 -17
  315. package/dist/landing/price-list.d.ts +29 -22
  316. package/dist/landing/price-list.js +175 -77
  317. package/dist/landing/pricing-band.d.ts +46 -53
  318. package/dist/landing/pricing-band.js +167 -51
  319. package/dist/landing/product-frame.d.ts +44 -42
  320. package/dist/landing/product-frame.js +182 -85
  321. package/dist/landing/proof-strip.d.ts +7 -2
  322. package/dist/landing/proof-strip.js +7 -2
  323. package/dist/landing/rails.d.ts +1 -1
  324. package/dist/landing/rails.js +1 -1
  325. package/dist/landing/segmented-stage.d.ts +19 -8
  326. package/dist/landing/segmented-stage.js +60 -16
  327. package/dist/landing/sequence-diagram.d.ts +18 -8
  328. package/dist/landing/sequence-diagram.js +49 -18
  329. package/dist/landing/site-footer.d.ts +89 -68
  330. package/dist/landing/site-footer.js +344 -111
  331. package/dist/landing/site-header.d.ts +118 -80
  332. package/dist/landing/site-header.js +482 -67
  333. package/dist/landing/sponsor-wall.d.ts +34 -15
  334. package/dist/landing/sponsor-wall.js +111 -34
  335. package/dist/landing/stat-strip.d.ts +7 -9
  336. package/dist/landing/stat-strip.js +57 -22
  337. package/dist/landing/step-list.d.ts +18 -21
  338. package/dist/landing/step-list.js +132 -38
  339. package/dist/landing/tabbed-stage.d.ts +23 -15
  340. package/dist/landing/tabbed-stage.js +103 -21
  341. package/dist/landing/testimonial-band.d.ts +58 -61
  342. package/dist/landing/testimonial-band.js +209 -71
  343. package/dist/landing/typed-terminal.d.ts +9 -6
  344. package/dist/landing/typed-terminal.js +16 -5
  345. package/dist/landing/usage-estimate.d.ts +83 -74
  346. package/dist/landing/usage-estimate.js +254 -113
  347. package/dist/landing/utils/has-parts.d.ts +17 -0
  348. package/dist/landing/utils/has-parts.js +24 -0
  349. package/dist/map/map-canvas.d.ts +15 -16
  350. package/dist/map/map-canvas.js +40 -24
  351. package/dist/map/map.d.ts +42 -33
  352. package/dist/map/map.js +149 -38
  353. package/dist/mixins/aria-checked.d.ts +1 -4
  354. package/dist/mixins/aria-checked.js +1 -4
  355. package/dist/mixins/clear-field.d.ts +2 -4
  356. package/dist/mixins/clear-field.js +2 -4
  357. package/dist/mixins/index.d.ts +2 -0
  358. package/dist/mixins/index.js +2 -0
  359. package/dist/schedule/agenda.d.ts +69 -41
  360. package/dist/schedule/agenda.js +273 -134
  361. package/dist/schedule/day-strip.d.ts +38 -26
  362. package/dist/schedule/day-strip.js +119 -88
  363. package/dist/test/map.d.ts +1 -1
  364. package/dist/test/map.js +1 -6
  365. package/dist/test/reels.js +1 -1
  366. package/dist/test/stories.js +2 -2
  367. package/dist/travel/boarding-pass.d.ts +94 -70
  368. package/dist/travel/boarding-pass.js +341 -144
  369. package/dist/travel/car-offer.d.ts +109 -49
  370. package/dist/travel/car-offer.js +424 -64
  371. package/dist/travel/fare-options.d.ts +58 -34
  372. package/dist/travel/fare-options.js +210 -69
  373. package/dist/travel/flight-itinerary.d.ts +62 -55
  374. package/dist/travel/flight-itinerary.js +230 -55
  375. package/dist/travel/flight-option.d.ts +65 -33
  376. package/dist/travel/flight-option.js +250 -69
  377. package/dist/travel/flight-segment.d.ts +121 -70
  378. package/dist/travel/flight-segment.js +358 -96
  379. package/dist/travel/package-savings.d.ts +79 -39
  380. package/dist/travel/package-savings.js +309 -65
  381. package/dist/travel/price-breakdown.d.ts +30 -22
  382. package/dist/travel/price-breakdown.js +72 -17
  383. package/dist/travel/rating-breakdown.d.ts +25 -18
  384. package/dist/travel/rating-breakdown.js +60 -23
  385. package/dist/travel/seat-map.d.ts +29 -22
  386. package/dist/travel/seat-map.js +140 -78
  387. package/dist/travel/trip-timeline.d.ts +77 -39
  388. package/dist/travel/trip-timeline.js +316 -107
  389. package/dist/utils/eyebrow.d.ts +2 -2
  390. package/dist/utils/eyebrow.js +3 -3
  391. package/dist/utils/index.d.ts +0 -1
  392. package/dist/utils/index.js +0 -1
  393. package/dist/video/episode-list.d.ts +22 -14
  394. package/dist/video/episode-list.js +89 -53
  395. package/dist/video/reel-feed.d.ts +21 -15
  396. package/dist/video/reel-feed.js +59 -24
  397. package/dist/video/story-viewer.d.ts +6 -5
  398. package/dist/video/story-viewer.js +84 -53
  399. package/dist/video/title-hero.d.ts +8 -8
  400. package/dist/video/title-hero.js +48 -34
  401. package/dist/video/video-card.d.ts +34 -20
  402. package/dist/video/video-card.js +119 -76
  403. package/dist/video/video-player.d.ts +17 -14
  404. package/dist/video/video-player.js +68 -30
  405. package/dist/video/video-shelf.d.ts +26 -14
  406. package/dist/video/video-shelf.js +88 -50
  407. package/package.json +4 -2
  408. package/dist/docs/callout.d.ts +0 -46
  409. package/dist/docs/callout.js +0 -61
  410. package/dist/docs/code-block.d.ts +0 -74
  411. package/dist/utils/field-parts.d.ts +0 -26
  412. package/dist/utils/field-parts.js +0 -12
  413. /package/dist/{docs/mixins → mixins}/copy-feedback.d.ts +0 -0
  414. /package/dist/{docs/mixins → mixins}/copy-feedback.js +0 -0
  415. /package/dist/{docs/mixins → mixins}/toc-spy.d.ts +0 -0
  416. /package/dist/{docs/mixins → mixins}/toc-spy.js +0 -0
  417. /package/dist/{docs/utils → utils}/reveal-in-scroller.d.ts +0 -0
  418. /package/dist/{docs/utils → utils}/reveal-in-scroller.js +0 -0
@@ -3,17 +3,28 @@ import { CircleCheckIcon } from "@sdxc/icons";
3
3
  import { mergeMix, raw } from "@sdxc/u/general";
4
4
  import { Rating } from "./rating.js";
5
5
  /**
6
- * Renders the review as an `<article>`: small stars and the title on top, the body in reading
7
- * size, photos beneath, and a wrapping footer row of author, date, verified mark and purchase
8
- * with the helpful slot pushed to the end.
6
+ * Renders the review as an `<article>` stacking whichever parts it holds, closed by a hairline.
9
7
  *
8
+ * @param handle Runtime handle carrying the host `<article>`'s props.
9
+ * @returns The render function producing the card.
10
10
  * @example
11
- * <ReviewCard author="Maya R." rating={5} title="Better in person" body="The paper is heavy and the colours are rich." date="2 weeks ago" verified="Verified buyer" meta="50×70 · Oak frame" />
11
+ * <ReviewCard>
12
+ * <ReviewCard.Header>
13
+ * <ReviewCard.Rating value={5} />
14
+ * <ReviewCard.Title>Better in person</ReviewCard.Title>
15
+ * </ReviewCard.Header>
16
+ * <ReviewCard.Body><p>The paper is heavy and the colours are rich.</p></ReviewCard.Body>
17
+ * <ReviewCard.Footer>
18
+ * <ReviewCard.Author>Maya R.</ReviewCard.Author>
19
+ * <ReviewCard.Date>2 weeks ago</ReviewCard.Date>
20
+ * <ReviewCard.Verified>Verified buyer</ReviewCard.Verified>
21
+ * </ReviewCard.Footer>
22
+ * </ReviewCard>
12
23
  */
13
24
  export function ReviewCard(handle) {
14
25
  return () => {
15
- let { author, body, date, helpful, media, meta, mix, rating, title, verified, ...rest } = handle.props;
16
- return (_jsxs("article", { ...rest, "data-slot": "review-card", mix: mergeMix([
26
+ let { mix, ...rest } = handle.props;
27
+ return (_jsx("article", { ...rest, "data-slot": "review-card", mix: mergeMix([
17
28
  raw({
18
29
  display: "grid",
19
30
  gap: "0.625rem",
@@ -21,39 +32,161 @@ export function ReviewCard(handle) {
21
32
  borderBlockEnd: "1px solid var(--ui-neutral-border)",
22
33
  color: "var(--ui-neutral-fg)",
23
34
  }),
24
- ], mix), children: [_jsxs("div", { mix: [raw({ display: "grid", gap: "0.375rem" })], children: [_jsx(Rating, { value: rating, size: "sm" }), title === undefined ? null : (_jsx("p", { "data-slot": "review-card-title", mix: [
25
- raw({
26
- margin: "0",
27
- fontSize: "1rem",
28
- fontWeight: "650",
29
- lineHeight: "1.35",
30
- color: "var(--ui-neutral-fg-emphasis)",
31
- }),
32
- ], children: title }))] }), _jsx("div", { "data-slot": "review-card-body", mix: [
33
- raw({
34
- fontSize: "0.9375rem",
35
- lineHeight: "1.6",
36
- "& > p": { margin: "0" },
37
- "& > p + p": { marginBlockStart: "0.75em" },
38
- }),
39
- ], children: body }), media === undefined ? null : _jsx("div", { "data-slot": "review-card-media", children: media }), _jsxs("footer", { "data-slot": "review-card-footer", mix: [
40
- raw({
41
- display: "flex",
42
- flexWrap: "wrap",
43
- alignItems: "center",
44
- columnGap: "0.75rem",
45
- rowGap: "0.375rem",
46
- fontSize: "0.8125rem",
47
- color: "var(--ui-neutral-fg-muted)",
48
- }),
49
- ], children: [_jsx("span", { mix: [raw({ fontWeight: "600", color: "var(--ui-neutral-fg-emphasis)" })], children: author }), _jsx("span", { children: date }), verified === undefined ? null : (_jsxs("span", { "data-slot": "review-card-verified", mix: [
50
- raw({
51
- display: "inline-flex",
52
- alignItems: "center",
53
- gap: "0.25rem",
54
- color: "var(--ui-success-fg)",
55
- "& > svg": { inlineSize: "0.875rem", blockSize: "0.875rem" },
56
- }),
57
- ], children: [_jsx(CircleCheckIcon, { "aria-hidden": "true" }), verified] })), meta === undefined ? null : _jsx("span", { "data-slot": "review-card-meta", children: meta }), helpful === undefined ? null : (_jsx("span", { "data-slot": "review-card-helpful", mix: [raw({ marginInlineStart: "auto" })], children: helpful }))] })] }));
35
+ ], mix) }));
58
36
  };
59
37
  }
38
+ /**
39
+ * The stars and the title, set close together above the words.
40
+ *
41
+ * @param handle Runtime handle carrying the host `<div>`'s props.
42
+ * @returns The render function producing the header.
43
+ */
44
+ ReviewCard.Header = function ReviewCardHeader(handle) {
45
+ return () => {
46
+ let { mix, ...rest } = handle.props;
47
+ return (_jsx("div", { "data-slot": "review-card-header", ...rest, mix: mergeMix([raw({ display: "grid", gap: "0.375rem" })], mix) }));
48
+ };
49
+ };
50
+ /**
51
+ * The stars the reviewer gave, drawn small.
52
+ *
53
+ * @param handle Runtime handle carrying the rating's props.
54
+ * @returns The render function producing the stars.
55
+ * @example <ReviewCard.Rating value={4} />
56
+ */
57
+ ReviewCard.Rating = function ReviewCardRating(handle) {
58
+ return () => _jsx(Rating, { ...handle.props, size: "sm" });
59
+ };
60
+ /**
61
+ * The review's own headline.
62
+ *
63
+ * @param handle Runtime handle carrying the host `<p>`'s props.
64
+ * @returns The render function producing the title.
65
+ */
66
+ ReviewCard.Title = function ReviewCardTitle(handle) {
67
+ return () => {
68
+ let { mix, ...rest } = handle.props;
69
+ return (_jsx("p", { "data-slot": "review-card-title", ...rest, mix: mergeMix([
70
+ raw({
71
+ margin: "0",
72
+ fontSize: "1rem",
73
+ fontWeight: "650",
74
+ lineHeight: "1.35",
75
+ color: "var(--ui-neutral-fg-emphasis)",
76
+ }),
77
+ ], mix) }));
78
+ };
79
+ };
80
+ /**
81
+ * The words, in reading size; paragraphs inside are spaced apart.
82
+ *
83
+ * @param handle Runtime handle carrying the host `<div>`'s props.
84
+ * @returns The render function producing the body.
85
+ */
86
+ ReviewCard.Body = function ReviewCardBody(handle) {
87
+ return () => {
88
+ let { mix, ...rest } = handle.props;
89
+ return (_jsx("div", { "data-slot": "review-card-body", ...rest, mix: mergeMix([
90
+ raw({
91
+ fontSize: "0.9375rem",
92
+ lineHeight: "1.6",
93
+ "& > p": { margin: "0" },
94
+ "& > p + p": { marginBlockStart: "0.75em" },
95
+ }),
96
+ ], mix) }));
97
+ };
98
+ };
99
+ /**
100
+ * Photos the reviewer added, laid out by the caller.
101
+ *
102
+ * @param handle Runtime handle carrying the host `<div>`'s props.
103
+ * @returns The render function producing the media box.
104
+ */
105
+ ReviewCard.Media = function ReviewCardMedia(handle) {
106
+ return () => _jsx("div", { "data-slot": "review-card-media", ...handle.props });
107
+ };
108
+ /**
109
+ * The small muted row closing the card, wrapping its parts; a {@link ReviewCard.Helpful} is
110
+ * pushed to its end.
111
+ *
112
+ * @param handle Runtime handle carrying the host `<footer>`'s props.
113
+ * @returns The render function producing the footer.
114
+ */
115
+ ReviewCard.Footer = function ReviewCardFooter(handle) {
116
+ return () => {
117
+ let { mix, ...rest } = handle.props;
118
+ return (_jsx("footer", { "data-slot": "review-card-footer", ...rest, mix: mergeMix([
119
+ raw({
120
+ display: "flex",
121
+ flexWrap: "wrap",
122
+ alignItems: "center",
123
+ columnGap: "0.75rem",
124
+ rowGap: "0.375rem",
125
+ fontSize: "0.8125rem",
126
+ color: "var(--ui-neutral-fg-muted)",
127
+ }),
128
+ ], mix) }));
129
+ };
130
+ };
131
+ /**
132
+ * Who wrote it, set in the emphasis colour.
133
+ *
134
+ * @param handle Runtime handle carrying the host `<span>`'s props.
135
+ * @returns The render function producing the name.
136
+ */
137
+ ReviewCard.Author = function ReviewCardAuthor(handle) {
138
+ return () => {
139
+ let { mix, ...rest } = handle.props;
140
+ return (_jsx("span", { "data-slot": "review-card-author", ...rest, mix: mergeMix([raw({ fontWeight: "600", color: "var(--ui-neutral-fg-emphasis)" })], mix) }));
141
+ };
142
+ };
143
+ /**
144
+ * When it was written, such as a `<time>` or a relative date.
145
+ *
146
+ * @param handle Runtime handle carrying the host `<span>`'s props.
147
+ * @returns The render function producing the date.
148
+ */
149
+ ReviewCard.Date = function ReviewCardDate(handle) {
150
+ return () => _jsx("span", { "data-slot": "review-card-date", ...handle.props });
151
+ };
152
+ /**
153
+ * The mark of a confirmed purchase, such as "Verified buyer", after a check in the success colour.
154
+ *
155
+ * @param handle Runtime handle carrying the host `<span>`'s props.
156
+ * @returns The render function producing the mark.
157
+ */
158
+ ReviewCard.Verified = function ReviewCardVerified(handle) {
159
+ return () => {
160
+ let { children, mix, ...rest } = handle.props;
161
+ return (_jsxs("span", { "data-slot": "review-card-verified", ...rest, mix: mergeMix([
162
+ raw({
163
+ display: "inline-flex",
164
+ alignItems: "center",
165
+ gap: "0.25rem",
166
+ color: "var(--ui-success-fg)",
167
+ "& > svg": { inlineSize: "0.875rem", blockSize: "0.875rem" },
168
+ }),
169
+ ], mix), children: [_jsx(CircleCheckIcon, { "aria-hidden": "true" }), children] }));
170
+ };
171
+ };
172
+ /**
173
+ * What the reviewer bought, such as "Size: 50×70 · Oak frame".
174
+ *
175
+ * @param handle Runtime handle carrying the host `<span>`'s props.
176
+ * @returns The render function producing the line.
177
+ */
178
+ ReviewCard.Meta = function ReviewCardMeta(handle) {
179
+ return () => _jsx("span", { "data-slot": "review-card-meta", ...handle.props });
180
+ };
181
+ /**
182
+ * Room at the footer's end, such as a POST form voting the review helpful.
183
+ *
184
+ * @param handle Runtime handle carrying the host `<span>`'s props.
185
+ * @returns The render function producing the box.
186
+ */
187
+ ReviewCard.Helpful = function ReviewCardHelpful(handle) {
188
+ return () => {
189
+ let { mix, ...rest } = handle.props;
190
+ return (_jsx("span", { "data-slot": "review-card-helpful", ...rest, mix: mergeMix([raw({ marginInlineStart: "auto" })], mix) }));
191
+ };
192
+ };
@@ -11,6 +11,11 @@ import { clearField, SEARCH_FIELD_CLEAR_COMMAND } from "../mixins/clear-field.js
11
11
  import { fieldStackLayout } from "../styles/field-stack-layout.js";
12
12
  import { Button } from "./button.js";
13
13
  import { Input } from "./input.js";
14
+ /**
15
+ * Matches an input inside a {@link SearchField.Control} whose clear button is still `hidden`:
16
+ * before script reveals it, or whenever the field is empty.
17
+ */
18
+ const AWAITING_CLEAR_SCRIPT = ':where([data-slot="control"]:has(> [data-slot="clear"][hidden]) *)';
14
19
  /**
15
20
  * Renders a `<search>` landmark — the platform's own role for a search
16
21
  * region, needing no explicit `role` attribute — stacking a caption,
@@ -39,9 +44,9 @@ export function SearchField(handle) {
39
44
  * muted, decorative {@link SearchIcon} with a native `<input type="search">`
40
45
  * built on {@link Input}, inheriting its box, color, and state styling.
41
46
  *
42
- * The user agent's own cancel affordance is suppressed, so clearing the field is
43
- * {@link SearchField.Clear}'s job — one glyph the field styles and places, sitting
44
- * alone in the trailing corner.
47
+ * Clearing the field is {@link SearchField.Clear}'s job — one glyph sitting alone in the
48
+ * trailing corner. While that button stays `hidden`, as it does until script runs, the user
49
+ * agent's own cancel button clears the field instead.
45
50
  *
46
51
  * @param handle Runtime handle carrying the host `<input>`'s props.
47
52
  * @returns The render function producing the control's markup.
@@ -57,9 +62,14 @@ SearchField.Input = function SearchFieldInput(handle) {
57
62
  pis("2.25rem"),
58
63
  /**
59
64
  * {@link SearchField.Clear} draws the clear affordance, so the one the user agent draws
60
- * inside a search input holding a value is hidden to keep the two from stacking.
65
+ * inside a search input holding a value is hidden to keep the two from stacking. In a
66
+ * control whose clear button is still `hidden`, the native one stays as the way to
67
+ * clear the field with script off.
61
68
  */
62
- when("&::-webkit-search-cancel-button", [appearance("none"), hidden()]),
69
+ when(`&:not(${AWAITING_CLEAR_SCRIPT})::-webkit-search-cancel-button`, [
70
+ appearance("none"),
71
+ hidden(),
72
+ ]),
63
73
  when("&::-webkit-search-decoration", [appearance("none"), hidden()]),
64
74
  ], mix) })] }));
65
75
  };
@@ -92,9 +102,9 @@ SearchField.Control = function SearchFieldControl(handle) {
92
102
  };
93
103
  };
94
104
  /**
95
- * Renders {@link SearchField}'s clear button: a round, icon-sized ghost
96
- * {@link Button} centred on the input's trailing edge, carrying `clearField()`
97
- * so it empties the `commandfor` input it names and shows while that input holds text.
105
+ * Renders {@link SearchField}'s clear button: a round ghost {@link Button} on the input's
106
+ * trailing edge whose `clearField()` empties the `commandfor` input and shows it while that
107
+ * input holds text. With script off it stays hidden and the input's own cancel button clears.
98
108
  *
99
109
  * @param handle Runtime handle carrying the host `<button>`'s props.
100
110
  * @returns The render function producing the clear button's markup.
@@ -7,23 +7,25 @@
7
7
  * @copyright Sergio Xalambrí 2026
8
8
  */
9
9
  import type { EntryComponent, Handle, Props as TagProps } from "remix/component";
10
- /** Prop types for {@link SectionBar}. */
10
+ /** Prop types for {@link SectionBar} and its parts. */
11
11
  export declare namespace SectionBar {
12
- /** One section the bar links to. */
13
- interface Item {
12
+ /** Every native `<a>` attribute but `href` and `role`, plus the section it links to, which sets `href`. */
13
+ type LinkProps = Omit<TagProps<"a">, "href" | "role"> & {
14
14
  /** The section element's `id`, which the chip links to as `#id`. */
15
- id: string;
16
- label: string;
17
- /** A count after the label, such as how many dishes the category holds. */
18
- count?: number;
15
+ section: string;
16
+ /** Marks the chip current before the island reads the scroll; set it on the first chip. */
17
+ current?: boolean;
18
+ };
19
+ /** Every native `<span>` attribute. */
20
+ interface CountProps extends TagProps<"span"> {
19
21
  }
20
- /** Props accepted by {@link SectionBar}; the host is a `<nav>`. */
21
- interface Props extends Omit<TagProps<"nav">, "children"> {
22
+ /**
23
+ * Every native `<nav>` attribute; name the landmark with `aria-label`, such as "Menu
24
+ * categories". The {@link SectionBar.Link}s go inside.
25
+ */
26
+ interface Props extends TagProps<"nav"> {
22
27
  /** The bar's `id`, unique on the page; its island finds the bar by it. */
23
28
  id: string;
24
- /** The landmark's name, such as "Menu categories". */
25
- label: string;
26
- items: Item[];
27
29
  /**
28
30
  * Where the bar sticks, as a CSS length from the top of the viewport, such as the
29
31
  * height of a sticky top bar above it. Each section gives itself a `scroll-margin-top`
@@ -42,13 +44,19 @@ export declare namespace SectionBar {
42
44
  /** The bar's own height, which a section's `scroll-margin-top` adds to the sticky offset. */
43
45
  export declare const SECTION_BAR_BLOCK_SIZE = "3.25rem";
44
46
  /**
45
- * Renders the bar: a `<nav>` holding a sideways-scrolling row of chip links, the first one
46
- * marked current until the island reads the scroll.
47
+ * Renders the bar: a `<nav>` holding a sideways-scrolling row of {@link SectionBar.Link} chips,
48
+ * the one written `current` marked until the island reads the scroll.
47
49
  *
48
50
  * @example
49
- * <SectionBar id="menu-bar" label="Menu categories" top="4rem" items={[{ id: "tacos", label: "Tacos", count: 3 }]} />
51
+ * <SectionBar id="menu-bar" aria-label="Menu categories" top="4rem">
52
+ * <SectionBar.Link section="tacos" current>Tacos <SectionBar.Count>3</SectionBar.Count></SectionBar.Link>
53
+ * </SectionBar>
50
54
  */
51
55
  export declare function SectionBar(handle: Handle<SectionBar.Props>): () => import("remix/component").RemixElement;
56
+ export declare namespace SectionBar {
57
+ var Link: (handle: Handle<SectionBar.LinkProps>) => () => import("remix/component").RemixElement;
58
+ var Count: (handle: Handle<SectionBar.CountProps>) => () => import("remix/component").RemixElement;
59
+ }
52
60
  /**
53
61
  * The island that follows the scroll: on each frame the page scrolls, the current section is
54
62
  * the last one whose top has passed under the bar, and its chip is marked and scrolled into
@@ -6,16 +6,18 @@ import { clientEntry } from "remix/component";
6
6
  /** The bar's own height, which a section's `scroll-margin-top` adds to the sticky offset. */
7
7
  export const SECTION_BAR_BLOCK_SIZE = "3.25rem";
8
8
  /**
9
- * Renders the bar: a `<nav>` holding a sideways-scrolling row of chip links, the first one
10
- * marked current until the island reads the scroll.
9
+ * Renders the bar: a `<nav>` holding a sideways-scrolling row of {@link SectionBar.Link} chips,
10
+ * the one written `current` marked until the island reads the scroll.
11
11
  *
12
12
  * @example
13
- * <SectionBar id="menu-bar" label="Menu categories" top="4rem" items={[{ id: "tacos", label: "Tacos", count: 3 }]} />
13
+ * <SectionBar id="menu-bar" aria-label="Menu categories" top="4rem">
14
+ * <SectionBar.Link section="tacos" current>Tacos <SectionBar.Count>3</SectionBar.Count></SectionBar.Link>
15
+ * </SectionBar>
14
16
  */
15
17
  export function SectionBar(handle) {
16
18
  return () => {
17
- let { id, label, items, top = "0px", mix, ...rest } = handle.props;
18
- return (_jsxs("nav", { ...rest, id: id, "aria-label": label, "data-slot": "section-bar", mix: mergeMix([
19
+ let { id, children, top = "0px", mix, ...rest } = handle.props;
20
+ return (_jsxs("nav", { ...rest, id: id, "data-slot": "section-bar", mix: mergeMix([
19
21
  raw({
20
22
  position: "sticky",
21
23
  insetBlockStart: top,
@@ -43,40 +45,60 @@ export function SectionBar(handle) {
43
45
  scrollPaddingInline: "var(--ui-section-bar-inset, 1rem)",
44
46
  "&::-webkit-scrollbar": { display: "none" },
45
47
  }),
46
- ], children: items.map((item, index) => (_jsx("li", { mix: [raw({ flexShrink: "0" })], children: _jsxs("a", { href: `#${item.id}`, "data-section": item.id, "aria-current": index === 0 ? "true" : undefined, mix: [
47
- raw({
48
- display: "inline-flex",
49
- alignItems: "center",
50
- gap: "0.375rem",
51
- blockSize: "2.25rem",
52
- paddingInline: "0.875rem",
53
- borderRadius: "999px",
54
- fontSize: "0.875rem",
55
- fontWeight: "550",
56
- whiteSpace: "nowrap",
57
- color: "var(--ui-neutral-fg)",
58
- textDecoration: "none",
59
- transition: "background-color 160ms ease, color 160ms ease",
60
- }),
61
- when("&:hover", raw({
62
- color: "var(--ui-neutral-fg-emphasis)",
63
- backgroundColor: "var(--ui-neutral-bg-tint)",
64
- })),
65
- when("&[aria-current='true']", raw({
66
- color: "var(--ui-neutral-fg-on-solid)",
67
- backgroundColor: "var(--ui-neutral-bg-solid)",
68
- })),
69
- when("&:focus-visible", raw({ outline: "2px solid var(--ui-brand-ring)", outlineOffset: "2px" })),
70
- motionReduce(raw({ transition: "none" })),
71
- ], children: [item.label, item.count === undefined ? null : (_jsx("span", { "data-slot": "section-bar-count", mix: [
72
- raw({
73
- fontVariantNumeric: "tabular-nums",
74
- fontWeight: "500",
75
- opacity: "0.65",
76
- }),
77
- ], children: item.count }))] }) }))) }), _jsx(SectionBarSpy, { bar: id })] }));
48
+ ], children: children }), _jsx(SectionBarSpy, { bar: id })] }));
78
49
  };
79
50
  }
51
+ /**
52
+ * One chip linking to a section as a plain anchor; the island marks it current while its
53
+ * section is being read.
54
+ *
55
+ * @param handle Runtime handle carrying the link's props.
56
+ * @returns The render function producing the list item and its chip.
57
+ * @example <SectionBar.Link section="tacos">Tacos</SectionBar.Link>
58
+ */
59
+ SectionBar.Link = function SectionBarLink(handle) {
60
+ return () => {
61
+ let { section, current, mix, ...rest } = handle.props;
62
+ return (_jsx("li", { mix: [raw({ flexShrink: "0" })], children: _jsx("a", { "data-slot": "section-bar-link", ...rest, "aria-current": current ? "true" : undefined, href: `#${section}`, "data-section": section, mix: mergeMix([
63
+ raw({
64
+ display: "inline-flex",
65
+ alignItems: "center",
66
+ gap: "0.375rem",
67
+ blockSize: "2.25rem",
68
+ paddingInline: "0.875rem",
69
+ borderRadius: "999px",
70
+ fontSize: "0.875rem",
71
+ fontWeight: "550",
72
+ whiteSpace: "nowrap",
73
+ color: "var(--ui-neutral-fg)",
74
+ textDecoration: "none",
75
+ transition: "background-color 160ms ease, color 160ms ease",
76
+ }),
77
+ when("&:hover", raw({
78
+ color: "var(--ui-neutral-fg-emphasis)",
79
+ backgroundColor: "var(--ui-neutral-bg-tint)",
80
+ })),
81
+ when("&[aria-current='true']", raw({
82
+ color: "var(--ui-neutral-fg-on-solid)",
83
+ backgroundColor: "var(--ui-neutral-bg-solid)",
84
+ })),
85
+ when("&:focus-visible", raw({ outline: "2px solid var(--ui-brand-ring)", outlineOffset: "2px" })),
86
+ motionReduce(raw({ transition: "none" })),
87
+ ], mix) }) }));
88
+ };
89
+ };
90
+ /**
91
+ * A count after a chip's label, such as how many dishes the category holds.
92
+ *
93
+ * @param handle Runtime handle carrying the host `<span>`'s props.
94
+ * @returns The render function producing the count.
95
+ */
96
+ SectionBar.Count = function SectionBarCount(handle) {
97
+ return () => {
98
+ let { mix, ...rest } = handle.props;
99
+ return (_jsx("span", { "data-slot": "section-bar-count", ...rest, mix: mergeMix([raw({ fontVariantNumeric: "tabular-nums", fontWeight: "500", opacity: "0.65" })], mix) }));
100
+ };
101
+ };
80
102
  /**
81
103
  * The island that follows the scroll: on each frame the page scrolls, the current section is
82
104
  * the last one whose top has passed under the bar, and its chip is marked and scrolled into
@@ -187,6 +187,33 @@ export declare namespace Sidebar {
187
187
  */
188
188
  interface MenuBadgeProps extends TagProps<"span"> {
189
189
  }
190
+ /**
191
+ * The custom properties menu rows and their badges read, set through `mix` or `style` on
192
+ * any ancestor (the {@link Sidebar}, a {@link Sidebar.Menu}) or on one row. Each falls back
193
+ * to the default look; the `link` ones style {@link Sidebar.MenuButton} rows too.
194
+ */
195
+ interface CustomProperties {
196
+ /** The current row's background. */
197
+ "--ui-sidebar-link-current-bg"?: string;
198
+ /** The current row's text and icon colour. */
199
+ "--ui-sidebar-link-current-fg"?: string;
200
+ /** A row's background under the pointer. */
201
+ "--ui-sidebar-link-hover-bg"?: string;
202
+ /** A row's minimum height at every `size`, in place of each size's own. */
203
+ "--ui-sidebar-link-block-size"?: string;
204
+ /** A row's corner radius. */
205
+ "--ui-sidebar-link-radius"?: string;
206
+ /** A row's font size at every `size`, in place of each size's own. */
207
+ "--ui-sidebar-link-font-size"?: string;
208
+ /** A badge's background. */
209
+ "--ui-sidebar-badge-bg"?: string;
210
+ /** A badge's text colour. */
211
+ "--ui-sidebar-badge-fg"?: string;
212
+ /** A badge's background in the current row; its resting background by default. */
213
+ "--ui-sidebar-badge-current-bg"?: string;
214
+ /** A badge's text colour in the current row; its resting colour by default. */
215
+ "--ui-sidebar-badge-current-fg"?: string;
216
+ }
190
217
  /**
191
218
  * Props accepted by {@link Sidebar.MenuSkeleton}.
192
219
  */
@@ -3,7 +3,7 @@ import { PanelLeftIcon } from "@sdxc/icons";
3
3
  import { visuallyHidden } from "@sdxc/u/a11y";
4
4
  import { bg, border, borderEdge, colorMix, fg, outline, outlineStyle } from "@sdxc/u/color";
5
5
  import { backdropBlur, backdropSaturate, opacity, rounded, shadow, transition, transitionBehavior, transitionDuration, transitionProperty, } from "@sdxc/u/effects";
6
- import { cursor, pseudoContent, userSelect, willChange, mergeMix } from "@sdxc/u/general";
6
+ import { cursor, pseudoContent, raw, userSelect, willChange, mergeMix } from "@sdxc/u/general";
7
7
  import { var as varUtility } from "@sdxc/u/general/var";
8
8
  import { absolute, container, fixed, flex, flexCol, gap, grow, hidden, inlineFlex, insBe, insBs, insIe, insIs, insLeft, insRight, items, justify, relative, shrink, vstack, } from "@sdxc/u/layout";
9
9
  import { overflow } from "@sdxc/u/overflow";
@@ -34,6 +34,14 @@ const DEFAULT_SIDE = "left";
34
34
  const DEFAULT_ITEM_COLOR = "neutral";
35
35
  /** Size variant {@link Sidebar.MenuButton} and {@link Sidebar.MenuLink} fall back to when `size` is omitted. */
36
36
  const DEFAULT_MENU_BUTTON_SIZE = "md";
37
+ /** The current menu row's text and icon colour. */
38
+ const CURRENT_ROW_FG = "var(--ui-sidebar-link-current-fg, var(--ui-neutral-fg-emphasis))";
39
+ /** The font size each menu row size falls back to when the theme sets no `--ui-text-*` step. */
40
+ const ROW_FONT_FALLBACKS = { xs: "0.75rem", sm: "0.875rem", base: "1rem" };
41
+ /** A menu badge's resting background. */
42
+ const BADGE_BG = "var(--ui-sidebar-badge-bg, var(--ui-neutral-bg-tint-hover))";
43
+ /** A menu badge's resting text colour. */
44
+ const BADGE_FG = "var(--ui-sidebar-badge-fg, var(--ui-neutral-fg))";
37
45
  /** Whether {@link Sidebar.MenuAction} stays hidden until its row is hovered or focused, when `showOnHover` is omitted. */
38
46
  const DEFAULT_SHOW_ON_HOVER = true;
39
47
  /** Whether {@link Sidebar.MenuSkeleton} renders a leading icon placeholder, when `showIcon` is omitted. */
@@ -648,9 +656,9 @@ Sidebar.MenuButton = function SidebarMenuButton(handle) {
648
656
  };
649
657
  };
650
658
  /**
651
- * Renders a native `<a>` row for navigation inside {@link Sidebar.Menu},
652
- * visually identical to {@link Sidebar.MenuButton} and followed by its `<link
653
- * rel="prefetch">` when `prefetch="render"`. `active` sets `aria-current="page"` when unset.
659
+ * Renders a native `<a>` row for navigation inside {@link Sidebar.Menu}, visually identical to
660
+ * {@link Sidebar.MenuButton}, followed by its `<link rel="prefetch">` when `prefetch="render"`.
661
+ * `active` sets `aria-current="page"`; restyle rows through {@link Sidebar.CustomProperties}.
654
662
  *
655
663
  * @param handle Runtime handle carrying the host `<a>`'s props.
656
664
  * @returns The render function producing the row's markup.
@@ -692,7 +700,7 @@ function menuRowMixins() {
692
700
  textAlign("start"),
693
701
  weight(500),
694
702
  textDecoration("none"),
695
- fontSize("sm"),
703
+ raw({ fontSize: rowFontSize("sm") }),
696
704
  outlineStyle("none"),
697
705
  when("& > svg:first-child, & > [data-slot='icon']:first-child", [
698
706
  is("1rem"),
@@ -701,19 +709,19 @@ function menuRowMixins() {
701
709
  ]),
702
710
  when("& > span", truncate()),
703
711
  data("size", "sm", [
704
- minBs("1.75rem"),
712
+ raw({ minBlockSize: rowBlockSize("1.75rem") }),
705
713
  pb("0.375rem"),
706
- fontSize("xs"),
714
+ raw({ fontSize: rowFontSize("xs") }),
707
715
  when("& > svg:first-child, & > [data-slot='icon']:first-child", [
708
716
  is("0.875rem"),
709
717
  bs("0.875rem"),
710
718
  ]),
711
719
  ]),
712
- data("size", "md", minBs("2.25rem")),
720
+ data("size", "md", raw({ minBlockSize: rowBlockSize("2.25rem") })),
713
721
  data("size", "lg", [
714
- minBs("2.75rem"),
722
+ raw({ minBlockSize: rowBlockSize("2.75rem") }),
715
723
  pb("0.625rem"),
716
- fontSize("base"),
724
+ raw({ fontSize: rowFontSize("base") }),
717
725
  when("& > svg:first-child, & > [data-slot='icon']:first-child", [
718
726
  is("1.25rem"),
719
727
  bs("1.25rem"),
@@ -723,21 +731,36 @@ function menuRowMixins() {
723
731
  when("&:disabled", [cursor("not-allowed"), opacity(50)]),
724
732
  when('&[aria-disabled="true"]', [cursor("not-allowed"), opacity(50)]),
725
733
  gap("0.75rem"),
726
- rounded("lg"),
734
+ raw({ borderRadius: "var(--ui-sidebar-link-radius, var(--ui-radius-lg, 0.5rem))" }),
727
735
  pi("0.5rem"),
728
736
  pb("0.5rem"),
729
737
  fg("neutral"),
730
738
  transition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
731
- hover([bg("neutral.bg-tint-hover"), fg("neutral.emphasis")]),
739
+ hover([
740
+ raw({
741
+ backgroundColor: "var(--ui-sidebar-link-hover-bg, var(--ui-neutral-bg-tint-hover))",
742
+ }),
743
+ fg("neutral.emphasis"),
744
+ ]),
732
745
  when("& > svg:first-child, & > [data-slot='icon']:first-child", fg("neutral.muted")),
733
746
  when('&[data-active], &[aria-current]:not([aria-current="false"])', [
734
- bg("neutral.bg-tint-hover"),
735
- fg("neutral.emphasis"),
736
- when("& > svg:first-child, & > [data-slot='icon']:first-child", fg("neutral.emphasis")),
747
+ raw({
748
+ backgroundColor: "var(--ui-sidebar-link-current-bg, var(--ui-neutral-bg-tint-hover))",
749
+ color: CURRENT_ROW_FG,
750
+ }),
751
+ when("& > svg:first-child, & > [data-slot='icon']:first-child", raw({ color: CURRENT_ROW_FG })),
737
752
  ]),
738
753
  when("&:active", bg("neutral.bg-tint-pressed")),
739
754
  ];
740
755
  }
756
+ /** A row's font size: the caller's `--ui-sidebar-link-font-size`, else the size's own step. */
757
+ function rowFontSize(step) {
758
+ return `var(--ui-sidebar-link-font-size, var(--ui-text-${step}, ${ROW_FONT_FALLBACKS[step]}))`;
759
+ }
760
+ /** A row's minimum height: the caller's `--ui-sidebar-link-block-size`, else the size's own. */
761
+ function rowBlockSize(fallback) {
762
+ return `var(--ui-sidebar-link-block-size, ${fallback})`;
763
+ }
741
764
  /**
742
765
  * Renders a small icon-only action anchored to {@link Sidebar.MenuItem}'s trailing
743
766
  * edge, revealed by `showOnHover`, with its pointer target grown to `--ui-target-size`.
@@ -783,9 +806,9 @@ Sidebar.MenuAction = function SidebarMenuAction(handle) {
783
806
  };
784
807
  };
785
808
  /**
786
- * Renders a small count or status pill pinned to the trailing edge of a
787
- * {@link Sidebar.MenuButton} or {@link Sidebar.MenuLink} row, hidden once
788
- * the ancestor {@link Sidebar} collapses to its icon-only rail.
809
+ * Renders a small count or status pill pinned to the trailing edge of a menu row, hidden once
810
+ * the ancestor {@link Sidebar} collapses to its icon-only rail; its colours, current row's
811
+ * included, read the `--ui-sidebar-badge-*` {@link Sidebar.CustomProperties}.
789
812
  *
790
813
  * @param handle Runtime handle carrying the host `<span>`'s props.
791
814
  * @returns The render function producing the pill's markup.
@@ -807,8 +830,14 @@ Sidebar.MenuBadge = function SidebarMenuBadge(handle) {
807
830
  rounded("md"),
808
831
  pi("0.375rem"),
809
832
  pb("0.125rem"),
810
- bg("neutral.bg-tint-hover"),
811
- fg("neutral"),
833
+ raw({
834
+ backgroundColor: BADGE_BG,
835
+ color: BADGE_FG,
836
+ }),
837
+ when(':is([data-slot="menu-link"], [data-slot="menu-button"]):is([data-active], [aria-current]:not([aria-current="false"])) > &', raw({
838
+ backgroundColor: `var(--ui-sidebar-badge-current-bg, ${BADGE_BG})`,
839
+ color: `var(--ui-sidebar-badge-current-fg, ${BADGE_FG})`,
840
+ })),
812
841
  ], mix) }));
813
842
  };
814
843
  };
@@ -36,7 +36,7 @@ export declare namespace TableOfContents {
36
36
  }
37
37
  /**
38
38
  * Renders the in-page navigation, or nothing when the page has fewer than `minItems`
39
- * headings. Load `@sdxc/ui/docs/table-of-contents` in the browser entry. Headings that the
39
+ * headings. Load `@sdxc/ui/table-of-contents` in the browser entry. Headings that the
40
40
  * page's layout gives a `scroll-margin-top` set the line a section is read from.
41
41
  *
42
42
  * @example