@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
@@ -1,73 +1,95 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
1
+ import { jsx as _jsx } from "remix/component/jsx-runtime";
2
2
  import { raw } from "@sdxc/u/general";
3
3
  import { vstack } from "@sdxc/u/layout";
4
4
  import { HeadingScope } from "../components/heading-scope.js";
5
5
  import { Feature } from "./feature.js";
6
- import { LandingHeader } from "./landing-header.js";
7
6
  import { LandingSection } from "./landing-section.js";
8
7
  import { Split } from "./split.js";
9
8
  import { StepList } from "./step-list.js";
10
9
  import { TabbedStage } from "./tabbed-stage.js";
11
- /** Layout {@link FeatureBand} applies when `layout` is omitted. */
12
- const DEFAULT_LAYOUT = "split";
13
10
  /** Radio group name a `stage` band uses when it has neither `stageName` nor `id`. */
14
11
  const DEFAULT_STAGE_NAME = "feature-band-stage";
15
- /** Band fill {@link FeatureBand} applies when `tone` is omitted. */
16
- const DEFAULT_TONE = "plain";
17
12
  /**
18
- * Renders a feature band with a chapter header and a split, grid, steps, timeline,
19
- * or stage body. A split with media carries its header in the copy column, so copy and
20
- * media share one grid; cell and step titles sit one heading level under the band title.
13
+ * Renders the band and lays out its parts. In a `split` the `.Copy` and `.Media` columns
14
+ * share one grid, the first written on the start side; in any other layout the header
15
+ * stacks over the `.Body`, whose cell and step titles sit one heading level under the band title.
21
16
  *
22
17
  * @param handle Runtime handle carrying the band's props.
23
- * @returns The render function producing the band's markup.
18
+ * @returns The render function producing the band.
24
19
  * @example
25
- * <FeatureBand layout="split" title={t("f1.title")} description={t("f1.lead")} media={shot}>
26
- * <ul><li>{t("f1.claim")}</li></ul>
20
+ * <FeatureBand>
21
+ * <FeatureBand.Copy>
22
+ * <LandingHeader><LandingHeader.Title>{t("f1.title")}</LandingHeader.Title></LandingHeader>
23
+ * <ul><li>{t("f1.claim")}</li></ul>
24
+ * </FeatureBand.Copy>
25
+ * <FeatureBand.Media>{shot}</FeatureBand.Media>
27
26
  * </FeatureBand>
28
27
  * @example
29
- * <FeatureBand layout="split" mediaSide="start" title={t("f2.title")} media={shot}>{claims}</FeatureBand>
30
- * @example
31
- * <FeatureBand layout="stage" id="how" title={t("how.title")}>
32
- * <TabbedStage.Item value="detect" label={t("how.detect")} defaultChecked>{shot}</TabbedStage.Item>
33
- * </FeatureBand>
34
- * @example
35
- * <FeatureBand layout="timeline" title={t("incident.title")}>
36
- * <StepList.Item meta="14:02 UTC" title={t("incident.detect")}>{t("incident.body")}</StepList.Item>
28
+ * <FeatureBand layout="grid" columns={3}>
29
+ * <LandingHeader><LandingHeader.Title>{t("grid.title")}</LandingHeader.Title></LandingHeader>
30
+ * <FeatureBand.Body>{cells}</FeatureBand.Body>
37
31
  * </FeatureBand>
38
32
  */
39
33
  export function FeatureBand(handle) {
40
34
  return () => {
41
- let { children, columns, gridVariant, description, eyebrow, eyebrowHref, eyebrowIndex, eyebrowVariant, id, layout, lean, media, mediaSide, mix, parts, ruled, spacing, stageLabel, stageName, title, tone, ...rest } = handle.props;
42
- let resolvedLayout = layout ?? DEFAULT_LAYOUT;
43
- let resolvedTone = tone ?? DEFAULT_TONE;
44
- let resolvedSpacing = spacing ?? "normal";
45
- let mediaOnStart = mediaSide === "start";
46
- let resolvedLean = lean ?? (mediaOnStart ? "copy" : "media");
47
- let body = _jsx("div", { mix: [vstack({ gap: 4, align: "stretch" })], children: children });
48
- let isSplit = resolvedLayout === "split" && media !== undefined;
49
- let isSelfScoped = resolvedLayout === "grid" || resolvedLayout === "steps" || resolvedLayout === "timeline";
50
- if (resolvedLayout === "grid") {
51
- body = (_jsx(Feature.Grid, { columns: columns, variant: gridVariant, children: children }));
52
- }
53
- else if (resolvedLayout === "steps") {
54
- body = _jsx(StepList, { children: children });
55
- }
56
- else if (resolvedLayout === "timeline") {
57
- body = _jsx(StepList, { variant: "timeline", children: children });
35
+ let { children, columns, gridVariant, id, layout = "split", lean = "media", spacing = "normal", stageLabel = "", stageName, tone = "plain", ...rest } = handle.props;
36
+ handle.context.set({
37
+ layout,
38
+ columns,
39
+ gridVariant,
40
+ stageName: stageName ?? (id ? `${id}-stage` : DEFAULT_STAGE_NAME),
41
+ stageLabel,
42
+ });
43
+ return (_jsx(LandingSection, { "data-slot": "feature-band", ...rest, id: id, "data-layout": layout, tone: tone, spacing: spacing, children: layout === "split" ? (_jsx(Split, { lean: lean, children: children })) : (_jsx("div", { mix: [vstack({ gap: 0, align: "stretch" })], children: children })) }));
44
+ };
45
+ }
46
+ /**
47
+ * The prose column of a `split` band: its {@link LandingHeader} sits flush on the claims
48
+ * under it, and unordered lists read as claim rows with brand checks unless `checks` is off.
49
+ *
50
+ * @param handle Runtime handle carrying the column's props.
51
+ * @returns The render function producing the column.
52
+ */
53
+ FeatureBand.Copy = function FeatureBandCopy(handle) {
54
+ return () => {
55
+ let { checks = true, children, mix, ...rest } = handle.props;
56
+ return (_jsx(Split.Copy, { ...rest, checks: checks, "data-feature-band-part": "copy", mix: [raw({ "--ui-landing-header-end": "0" }), mix], children: children }));
57
+ };
58
+ };
59
+ /**
60
+ * The media column of a `split` band, sized to its track; headings inside sit one level
61
+ * under the band title.
62
+ *
63
+ * @param handle Runtime handle carrying the column's props.
64
+ * @returns The render function producing the column.
65
+ */
66
+ FeatureBand.Media = function FeatureBandMedia(handle) {
67
+ return () => {
68
+ let { children, ...rest } = handle.props;
69
+ return (_jsx(Split.Media, { ...rest, "data-feature-band-part": "media", children: _jsx(HeadingScope, { children: children }) }));
70
+ };
71
+ };
72
+ /**
73
+ * The band's body under its header, drawn by the band's layout: {@link Feature} cells in a
74
+ * grid, {@link StepList.Item} steps, {@link TabbedStage.Item} panels, or free content.
75
+ *
76
+ * @param handle Runtime handle carrying the body's props.
77
+ * @returns The render function producing the body.
78
+ */
79
+ FeatureBand.Body = function FeatureBandBody(handle) {
80
+ return () => {
81
+ let { children, mix, ...rest } = handle.props;
82
+ let context = handle.context.get(FeatureBand);
83
+ let layout = context?.layout ?? "split";
84
+ if (layout === "grid") {
85
+ return (_jsx(Feature.Grid, { ...rest, columns: context?.columns, variant: context?.gridVariant, mix: mix, children: children }));
58
86
  }
59
- else if (resolvedLayout === "stage") {
60
- body = (_jsx(TabbedStage, { name: stageName ?? (id ? `${id}-stage` : DEFAULT_STAGE_NAME), orientation: "vertical", "aria-label": stageLabel ?? (typeof title === "string" ? title : ""), children: children }));
87
+ if (layout === "steps" || layout === "timeline") {
88
+ return (_jsx(StepList, { ...rest, variant: layout === "timeline" ? "timeline" : undefined, mix: mix, children: children }));
61
89
  }
62
- let header = (_jsx(LandingHeader, { eyebrow: eyebrow, eyebrowHref: eyebrowHref, eyebrowIndex: eyebrowIndex, eyebrowVariant: eyebrowVariant, description: description, mix: isSplit ? [raw({ "--ui-landing-header-end": "0" })] : [], parts: {
63
- title: parts?.title,
64
- description: parts?.description,
65
- }, children: title }));
66
- if (isSplit) {
67
- let copy = (_jsxs(Split.Copy, { checks: Boolean(children), children: [header, _jsx(HeadingScope, { children: children })] }));
68
- let mediaColumn = (_jsx(Split.Media, { mix: [parts?.media], children: _jsx(HeadingScope, { children: media }) }));
69
- return (_jsx(LandingSection, { ...rest, id: id, tone: resolvedTone, spacing: resolvedSpacing, ruled: ruled, mix: mix, children: _jsx(Split, { lean: resolvedLean, "data-media-side": mediaOnStart ? "start" : "end", children: mediaOnStart ? (_jsxs(_Fragment, { children: [mediaColumn, copy] })) : (_jsxs(_Fragment, { children: [copy, mediaColumn] })) }) }));
90
+ if (layout === "stage") {
91
+ return (_jsx(HeadingScope, { children: _jsx(TabbedStage, { "aria-label": context?.stageLabel ?? "", ...rest, name: context?.stageName ?? DEFAULT_STAGE_NAME, orientation: "vertical", mix: mix, children: children }) }));
70
92
  }
71
- return (_jsx(LandingSection, { ...rest, id: id, tone: resolvedTone, spacing: resolvedSpacing, ruled: ruled, mix: mix, children: _jsxs("div", { mix: [vstack({ gap: 0, align: "stretch" })], children: [header, isSelfScoped ? body : _jsx(HeadingScope, { children: body })] }) }));
93
+ return (_jsx(HeadingScope, { children: _jsx("div", { "data-slot": "feature-band-body", ...rest, mix: [vstack({ gap: 4, align: "stretch" }), mix], children: children }) }));
72
94
  };
73
- }
95
+ };
@@ -30,7 +30,7 @@ export declare namespace FlowDiagram {
30
30
  /**
31
31
  * Props accepted by {@link FlowDiagram}.
32
32
  */
33
- interface Props extends Omit<TagProps<"div">, "children"> {
33
+ interface Props extends TagProps<"div"> {
34
34
  /** Accessible name of the run's list. Required — the library ships no copy. */
35
35
  "aria-label": string;
36
36
  /** Accessible name of the pause toggle. */
@@ -38,10 +38,12 @@ export declare namespace FlowDiagram {
38
38
  trigger: Trigger;
39
39
  /** The steps, in run order. */
40
40
  steps: readonly Step[];
41
- /** The result badge that appears once the last step passes, such as "Run passed". */
42
- outcome: RemixNode;
43
- /** A note across from the outcome, such as what happens on failure. */
44
- footnote?: RemixNode;
41
+ /** {@link FlowDiagram.Outcome} and {@link FlowDiagram.Footnote}, set on a ruled line under the run. */
42
+ children?: RemixNode;
43
+ }
44
+ /** What {@link FlowDiagram} resolves for its parts: when the run's last step passes. */
45
+ interface Context {
46
+ count: number;
45
47
  }
46
48
  }
47
49
  /**
@@ -56,7 +58,13 @@ export declare namespace FlowDiagram {
56
58
  * aria-label="Sign-in check"
57
59
  * trigger={{ icon: <ClockIcon size={14} />, title: "Every 5 minutes" }}
58
60
  * steps={[{ title: "Sign in", code: 'http.post "/api/sessions"' }]}
59
- * outcome="Run passed"
60
- * />
61
+ * >
62
+ * <FlowDiagram.Outcome>Run passed</FlowDiagram.Outcome>
63
+ * <FlowDiagram.Footnote>Alerts on failure</FlowDiagram.Footnote>
64
+ * </FlowDiagram>
61
65
  */
62
- export declare function FlowDiagram(handle: Handle<FlowDiagram.Props>): () => import("remix/component").RemixElement;
66
+ export declare function FlowDiagram(handle: Handle<FlowDiagram.Props, FlowDiagram.Context>): () => import("remix/component").RemixElement;
67
+ export declare namespace FlowDiagram {
68
+ var Outcome: (handle: Handle<TagProps<"span">>) => () => import("remix/component").RemixElement;
69
+ var Footnote: (handle: Handle<TagProps<"span">>) => () => import("remix/component").RemixElement;
70
+ }
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
2
  import { CheckIcon } from "@sdxc/icons";
3
3
  import { keyframes } from "@sdxc/u/animation";
4
- import { raw } from "@sdxc/u/general";
4
+ import { mergeMix, raw } from "@sdxc/u/general";
5
5
  import { motionSafe } from "@sdxc/u/responsive";
6
6
  import { landingSurface } from "../styles/landing.js";
7
7
  import { MotionLoop } from "./motion-loop.js";
8
+ import { hasParts } from "./utils/has-parts.js";
8
9
  /** Length of one loop: the run plays, holds on its outcome, then resets. */
9
10
  const CYCLE_SECONDS = 9;
10
11
  /** Share of the cycle, in percent, at which the first step passes. */
@@ -36,13 +37,16 @@ const ROW_GAP = "1.25rem";
36
37
  * aria-label="Sign-in check"
37
38
  * trigger={{ icon: <ClockIcon size={14} />, title: "Every 5 minutes" }}
38
39
  * steps={[{ title: "Sign in", code: 'http.post "/api/sessions"' }]}
39
- * outcome="Run passed"
40
- * />
40
+ * >
41
+ * <FlowDiagram.Outcome>Run passed</FlowDiagram.Outcome>
42
+ * <FlowDiagram.Footnote>Alerts on failure</FlowDiagram.Footnote>
43
+ * </FlowDiagram>
41
44
  */
42
45
  export function FlowDiagram(handle) {
43
46
  return () => {
44
- let { "aria-label": label, footnote, mix, outcome, pauseLabel, steps, trigger, ...rest } = handle.props;
47
+ let { "aria-label": label, children, mix, pauseLabel, steps, trigger, ...rest } = handle.props;
45
48
  let timing = timingFor(steps.length);
49
+ handle.context.set({ count: steps.length });
46
50
  return (_jsx(MotionLoop, { ...rest, pauseLabel: pauseLabel, placement: "start-end", mix: mix, children: _jsxs("div", { "data-slot": "flow-diagram", mix: [
47
51
  landingSurface(),
48
52
  raw({ display: "grid", gap: "1.5rem", padding: "clamp(1.25rem, 4cqi, 2rem)" }),
@@ -58,21 +62,49 @@ export function FlowDiagram(handle) {
58
62
  ], children: [_jsxs("li", { mix: [stepRow()], children: [_jsx("span", { mix: [
59
63
  dot(),
60
64
  raw({ color: "var(--ui-brand-fg)", borderColor: "var(--ui-brand-border)" }),
61
- ], children: trigger.icon }), steps.length > 0 ? _jsx(Connector, { timing: timing, index: -1 }) : null, _jsx(RowText, { title: trigger.title, detail: trigger.detail, clearance: true })] }), steps.map((step, index) => (_jsxs("li", { mix: [stepRow()], children: [_jsx("span", { mix: [dot(), stepDot(timing, index)], children: _jsx(CheckIcon, { size: 14, strokeWidth: 2.5, "aria-hidden": "true", mix: [stepCheck(timing, index)] }) }), index < steps.length - 1 ? _jsx(Connector, { timing: timing, index: index }) : null, _jsx(RowText, { title: step.title, detail: step.detail, code: step.code })] }, index)))] }), _jsxs("div", { "data-slot": "flow-diagram-footer", mix: [
62
- raw({
63
- display: "flex",
64
- flexWrap: "wrap",
65
- alignItems: "center",
66
- justifyContent: "space-between",
67
- gap: "0.75rem",
68
- paddingBlockStart: "1.25rem",
69
- borderBlockStart: "1px solid var(--ui-landing-hairline, var(--ui-neutral-border))",
70
- }),
71
- ], children: [_jsxs("span", { "data-slot": "flow-diagram-outcome", mix: [outcomeBadge(timing)], children: [_jsx(CheckIcon, { size: 14, strokeWidth: 2.5, "aria-hidden": "true" }), outcome] }), footnote ? (_jsx("span", { mix: [
72
- detail(),
73
- raw({ display: "inline-flex", alignItems: "center", gap: "0.375rem" }),
74
- ], children: footnote })) : null] })] }) }));
65
+ ], children: trigger.icon }), steps.length > 0 ? _jsx(Connector, { timing: timing, index: -1 }) : null, _jsx(RowText, { title: trigger.title, detail: trigger.detail, clearance: true })] }), steps.map((step, index) => (_jsxs("li", { mix: [stepRow()], children: [_jsx("span", { mix: [dot(), stepDot(timing, index)], children: _jsx(CheckIcon, { size: 14, strokeWidth: 2.5, "aria-hidden": "true", mix: [stepCheck(timing, index)] }) }), index < steps.length - 1 ? _jsx(Connector, { timing: timing, index: index }) : null, _jsx(RowText, { title: step.title, detail: step.detail, code: step.code })] }, index)))] }), hasParts(children) ? (_jsx("div", { "data-slot": "flow-diagram-footer", mix: [footerRow()], children: children })) : null] }) }));
66
+ };
67
+ }
68
+ /**
69
+ * The result badge that fades in once the run's last step passes, such as "Run passed", with
70
+ * a check mark before its text. Without motion it shows from the start.
71
+ *
72
+ * @param handle Runtime handle carrying the host `<span>`'s props.
73
+ * @returns The render function producing the badge.
74
+ * @example <FlowDiagram.Outcome>Run passed</FlowDiagram.Outcome>
75
+ */
76
+ FlowDiagram.Outcome = function FlowDiagramOutcome(handle) {
77
+ return () => {
78
+ let { children, mix, ...rest } = handle.props;
79
+ let context = handle.context.get(FlowDiagram);
80
+ return (_jsxs("span", { ...rest, "data-slot": "flow-diagram-outcome", mix: mergeMix([outcomeBadge(timingFor(context?.count ?? 0))], mix), children: [_jsx(CheckIcon, { size: 14, strokeWidth: 2.5, "aria-hidden": "true" }), children] }));
75
81
  };
82
+ };
83
+ /**
84
+ * A quiet note across the ruled line from the outcome, such as what happens on failure; an
85
+ * icon written before its text sits centred beside it.
86
+ *
87
+ * @param handle Runtime handle carrying the host `<span>`'s props.
88
+ * @returns The render function producing the note.
89
+ * @example <FlowDiagram.Footnote>Alerts on failure</FlowDiagram.Footnote>
90
+ */
91
+ FlowDiagram.Footnote = function FlowDiagramFootnote(handle) {
92
+ return () => {
93
+ let { mix, ...rest } = handle.props;
94
+ return (_jsx("span", { ...rest, "data-slot": "flow-diagram-footnote", mix: mergeMix([detail(), raw({ display: "inline-flex", alignItems: "center", gap: "0.375rem" })], mix) }));
95
+ };
96
+ };
97
+ /** The ruled line under the run that spreads the outcome and footnote to either end. */
98
+ function footerRow() {
99
+ return raw({
100
+ display: "flex",
101
+ flexWrap: "wrap",
102
+ alignItems: "center",
103
+ justifyContent: "space-between",
104
+ gap: "0.75rem",
105
+ paddingBlockStart: "1.25rem",
106
+ borderBlockStart: "1px solid var(--ui-landing-hairline, var(--ui-neutral-border))",
107
+ });
76
108
  }
77
109
  /** Spreads `count` steps over {@link STEPS_SPAN}, never further apart than {@link MAX_STEP_GAP}. */
78
110
  function timingFor(count) {
@@ -38,21 +38,19 @@ export declare namespace InstallTabs {
38
38
  interface OptionProps extends TagProps<"div"> {
39
39
  /** Radio value written for this dialect. */
40
40
  value: string;
41
- /** Visible tab label for the dialect. */
42
- label: RemixNode;
43
41
  /**
44
42
  * Marks this dialect as the initially selected one. Only one option in
45
43
  * a strip should pass `defaultChecked`.
46
44
  */
47
45
  defaultChecked?: boolean;
48
- /**
49
- * Optional trailing control beside the command — typically a copy
50
- * button the page supplies.
51
- */
52
- actions?: RemixNode;
53
- /** Command or snippet shown when this dialect is selected. */
46
+ /** The dialect's {@link InstallTabs.Label} and {@link InstallTabs.Panel}. */
54
47
  children: RemixNode;
55
48
  }
49
+ /** What {@link InstallTabs.Option} resolves for its parts. */
50
+ interface OptionContext {
51
+ /** Id of the option's radio, which its label points at. */
52
+ inputId: string;
53
+ }
56
54
  }
57
55
  /**
58
56
  * Renders a radio-driven dialect strip. Nest {@link InstallTabs.Option}
@@ -63,15 +61,19 @@ export declare namespace InstallTabs {
63
61
  * @returns The render function producing the strip's markup.
64
62
  * @example
65
63
  * <InstallTabs name="pkg" aria-label={t("install.label")}>
66
- * <InstallTabs.Option value="bun" label="bun" defaultChecked>
67
- * bun add @sdxc/ui
68
- * </InstallTabs.Option>
69
- * <InstallTabs.Option value="npm" label="npm">
70
- * npm add @sdxc/ui
64
+ * <InstallTabs.Option value="bun" defaultChecked>
65
+ * <InstallTabs.Label>bun</InstallTabs.Label>
66
+ * <InstallTabs.Panel>
67
+ * <InstallTabs.Command>bun add @sdxc/ui</InstallTabs.Command>
68
+ * {copyButton}
69
+ * </InstallTabs.Panel>
71
70
  * </InstallTabs.Option>
72
71
  * </InstallTabs>
73
72
  */
74
73
  export declare function InstallTabs(handle: Handle<InstallTabs.Props, InstallTabs.Context>): () => import("remix/component").RemixElement;
75
74
  export declare namespace InstallTabs {
76
- var Option: (handle: Handle<InstallTabs.OptionProps>) => () => import("remix/component").RemixElement;
75
+ var Option: (handle: Handle<InstallTabs.OptionProps, InstallTabs.OptionContext>) => () => import("remix/component").RemixElement;
76
+ var Label: (handle: Handle<TagProps<"label">>) => () => import("remix/component").RemixElement;
77
+ var Panel: (handle: Handle<TagProps<"div">>) => () => import("remix/component").RemixElement;
78
+ var Command: (handle: Handle<TagProps<"code">>) => () => import("remix/component").RemixElement;
77
79
  }
@@ -6,7 +6,7 @@ import { cursor, raw, mergeMix } from "@sdxc/u/general";
6
6
  import { basis, flex, flexWrap, gap, hidden, items, justify } from "@sdxc/u/layout";
7
7
  import { overflow, overflowX } from "@sdxc/u/overflow";
8
8
  import { minIs, p } from "@sdxc/u/size";
9
- import { precededBy, when } from "@sdxc/u/state";
9
+ import { precededBy } from "@sdxc/u/state";
10
10
  import { font, text, weight } from "@sdxc/u/typography";
11
11
  /**
12
12
  * Renders a radio-driven dialect strip. Nest {@link InstallTabs.Option}
@@ -17,11 +17,12 @@ import { font, text, weight } from "@sdxc/u/typography";
17
17
  * @returns The render function producing the strip's markup.
18
18
  * @example
19
19
  * <InstallTabs name="pkg" aria-label={t("install.label")}>
20
- * <InstallTabs.Option value="bun" label="bun" defaultChecked>
21
- * bun add @sdxc/ui
22
- * </InstallTabs.Option>
23
- * <InstallTabs.Option value="npm" label="npm">
24
- * npm add @sdxc/ui
20
+ * <InstallTabs.Option value="bun" defaultChecked>
21
+ * <InstallTabs.Label>bun</InstallTabs.Label>
22
+ * <InstallTabs.Panel>
23
+ * <InstallTabs.Command>bun add @sdxc/ui</InstallTabs.Command>
24
+ * {copyButton}
25
+ * </InstallTabs.Panel>
25
26
  * </InstallTabs.Option>
26
27
  * </InstallTabs>
27
28
  */
@@ -40,47 +41,94 @@ export function InstallTabs(handle) {
40
41
  };
41
42
  }
42
43
  /**
43
- * One dialect: a radio, its label, and a command row that shows when checked.
44
- * The command row keys off the adjacent `input:checked + label + &` chain so a
45
- * checked earlier dialect never reveals a later row.
44
+ * One dialect: a hidden radio, then its {@link InstallTabs.Label} and
45
+ * {@link InstallTabs.Panel}. Every option's label lines up in the tab row, and its panel shows
46
+ * under the row while the option's radio is checked.
46
47
  *
47
48
  * @param handle Runtime handle carrying the option's props.
48
49
  * @returns The render function producing the option's markup.
49
50
  */
50
51
  InstallTabs.Option = function InstallTabsOption(handle) {
51
52
  return () => {
52
- let { actions, children, defaultChecked, label, mix, value, ...rest } = handle.props;
53
+ let { children, defaultChecked, mix, value, ...rest } = handle.props;
53
54
  let context = handle.context.get(InstallTabs);
54
55
  let groupName = context?.name ?? "install-tabs";
55
56
  let inputId = `${groupName}-${value}`;
56
- let valueId = `${inputId}-value`;
57
- return (_jsxs("div", { ...rest, "data-slot": "install-tabs-option", "data-value": value, mix: mergeMix(raw({ display: "contents" }), mix), children: [_jsx("input", { type: "radio", name: groupName, id: inputId, value: value, defaultChecked: defaultChecked, mix: [visuallyHidden()] }), _jsx("label", { htmlFor: inputId, mix: [
58
- raw({ order: -1 }),
59
- p(2, 3),
60
- fg("neutral"),
61
- text("sm"),
62
- weight("medium"),
63
- cursor("pointer"),
64
- borderEdge("block-end", { color: "transparent", width: 2, style: "solid" }),
65
- transition("color, border-color"),
66
- precededBy("input:checked", [
67
- fg("brand"),
68
- borderEdge("block-end", { color: "brand", width: 2, style: "solid" }),
69
- ]),
70
- precededBy("input:focus-visible", outline({ color: "brand.ring", offset: -2 })),
71
- ], children: label }), _jsxs("div", { mix: [
72
- basis("100%"),
73
- hidden(),
74
- items("center"),
75
- justify("between"),
76
- gap(3),
77
- p(2, 2, 2, 3),
78
- borderEdge("block-start", {
79
- color: "neutral",
80
- width: 1,
81
- style: "solid",
82
- }),
83
- when(":is(input:checked) + label + &", raw({ display: "flex" })),
84
- ], children: [_jsx("code", { id: valueId, mix: [font("mono"), text("sm"), fg("neutral.emphasis"), minIs(0), overflowX("auto")], children: children }), actions] })] }));
57
+ handle.context.set({ inputId });
58
+ return (_jsxs("div", { ...rest, "data-slot": "install-tabs-option", "data-value": value, mix: mergeMix(raw({ display: "contents" }), mix), children: [_jsx("input", { type: "radio", name: groupName, id: inputId, value: value, defaultChecked: defaultChecked, mix: [visuallyHidden()] }), children] }));
59
+ };
60
+ };
61
+ /** The radio id of the option a part sits in, or a placeholder for a lone part. */
62
+ function optionInputId(handle) {
63
+ let context = handle.context.get(InstallTabs.Option);
64
+ return context?.inputId ?? "install-tabs-option";
65
+ }
66
+ /**
67
+ * The dialect's tab in the row across the strip's top, underlined in the brand while its
68
+ * option is selected.
69
+ *
70
+ * @param handle Runtime handle carrying the host `<label>`'s props.
71
+ * @returns The render function producing the tab.
72
+ * @example <InstallTabs.Label>bun</InstallTabs.Label>
73
+ */
74
+ InstallTabs.Label = function InstallTabsLabel(handle) {
75
+ return () => {
76
+ let { mix, ...rest } = handle.props;
77
+ return (_jsx("label", { ...rest, htmlFor: optionInputId(handle), "data-slot": "install-tabs-label", mix: mergeMix([
78
+ raw({ order: -1 }),
79
+ p(2, 3),
80
+ fg("neutral"),
81
+ text("sm"),
82
+ weight("medium"),
83
+ cursor("pointer"),
84
+ borderEdge("block-end", { color: "transparent", width: 2, style: "solid" }),
85
+ transition("color, border-color"),
86
+ precededBy("input:checked", [
87
+ fg("brand"),
88
+ borderEdge("block-end", { color: "brand", width: 2, style: "solid" }),
89
+ ]),
90
+ precededBy("input:focus-visible", outline({ color: "brand.ring", offset: -2 })),
91
+ ], mix) }));
92
+ };
93
+ };
94
+ /**
95
+ * The row under the tabs that shows while its option is selected: the
96
+ * {@link InstallTabs.Command} at the start and any control written after it, such as a copy
97
+ * button, at the end.
98
+ *
99
+ * @param handle Runtime handle carrying the host `<div>`'s props.
100
+ * @returns The render function producing the row.
101
+ * @example
102
+ * <InstallTabs.Panel>
103
+ * <InstallTabs.Command>bun add @sdxc/ui</InstallTabs.Command>
104
+ * </InstallTabs.Panel>
105
+ */
106
+ InstallTabs.Panel = function InstallTabsPanel(handle) {
107
+ return () => {
108
+ let { mix, ...rest } = handle.props;
109
+ return (_jsx("div", { ...rest, "data-slot": "install-tabs-panel", mix: mergeMix([
110
+ basis("100%"),
111
+ hidden(),
112
+ items("center"),
113
+ justify("between"),
114
+ gap(3),
115
+ p(2, 2, 2, 3),
116
+ borderEdge("block-start", { color: "neutral", width: 1, style: "solid" }),
117
+ precededBy("input:checked", raw({ display: "flex" })),
118
+ ], mix) }));
119
+ };
120
+ };
121
+ /**
122
+ * The command itself in mono, scrolling sideways inside the row when it outgrows it. Its id
123
+ * is the option's radio id plus `-value`, so a copy button can name it as its source.
124
+ *
125
+ * @param handle Runtime handle carrying the host `<code>`'s props.
126
+ * @returns The render function producing the command.
127
+ * @example <InstallTabs.Command>bun add @sdxc/ui</InstallTabs.Command>
128
+ */
129
+ InstallTabs.Command = function InstallTabsCommand(handle) {
130
+ return () => {
131
+ let { mix, ...rest } = handle.props;
132
+ return (_jsx("code", { id: `${optionInputId(handle)}-value`, ...rest, "data-slot": "install-tabs-command", mix: mergeMix([font("mono"), text("sm"), fg("neutral.emphasis"), minIs(0), overflowX("auto")], mix) }));
85
133
  };
86
134
  };