@sdxc/ui 2026.10.29 → 2026.11.1

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 (411) hide show
  1. package/README.md +187 -113
  2. package/dist/{behaviors → app/behaviors}/drag-session.js +1 -1
  3. package/dist/{behaviors → app/behaviors}/toaster.js +1 -1
  4. package/dist/{components → app}/chart.d.ts +1 -1
  5. package/dist/{components → app}/chart.js +18 -34
  6. package/dist/{components → app}/context-menu.d.ts +2 -2
  7. package/dist/{components → app}/context-menu.js +8 -7
  8. package/dist/{components → app}/drop-indicator.js +3 -3
  9. package/dist/{components → app}/drop-zone.js +3 -3
  10. package/dist/{components → app}/empty.d.ts +1 -1
  11. package/dist/{components → app}/empty.js +11 -21
  12. package/dist/{components → app}/file-trigger.js +2 -2
  13. package/dist/{components → app}/grid-list.d.ts +1 -1
  14. package/dist/{components → app}/grid-list.js +16 -18
  15. package/dist/app/index.d.ts +41 -0
  16. package/dist/app/index.js +41 -0
  17. package/dist/{components → app}/menubar.js +5 -7
  18. package/dist/{mixins → app/mixins}/drag-reorder.js +1 -1
  19. package/dist/{mixins → app/mixins}/drop-zone.js +1 -1
  20. package/dist/{mixins → app/mixins}/grid-list-keys.js +2 -2
  21. package/dist/{mixins → app/mixins}/menubar-keys.js +2 -2
  22. package/dist/{mixins → app/mixins}/resize-handle.js +3 -3
  23. package/dist/{mixins/treeKeys.js → app/mixins/tree-keys.js} +2 -2
  24. package/dist/{components → app}/resizable.js +7 -10
  25. package/dist/{components → app}/shortcut-list.js +4 -3
  26. package/dist/{components → app}/skeleton.js +3 -3
  27. package/dist/{styles → app/styles}/chart-palette.d.ts +1 -1
  28. package/dist/{styles → app/styles}/graphic-host.d.ts +1 -1
  29. package/dist/{styles → app/styles}/legend-toggle.d.ts +1 -1
  30. package/dist/{components → app}/table.js +12 -15
  31. package/dist/{components → app}/toast.js +18 -24
  32. package/dist/{components → app}/toolbar.js +3 -3
  33. package/dist/{components → app}/tree.d.ts +1 -1
  34. package/dist/{components → app}/tree.js +10 -14
  35. package/dist/{utils → app/utils}/chart-path.d.ts +1 -1
  36. package/dist/{utils → app/utils}/chart-path.js +2 -2
  37. package/dist/{utils → app/utils}/chart-scale.js +1 -1
  38. package/dist/behaviors/index.d.ts +0 -5
  39. package/dist/behaviors/index.js +0 -5
  40. package/dist/{components → chat}/attachment.d.ts +1 -1
  41. package/dist/{components → chat}/attachment.js +17 -23
  42. package/dist/{behaviors → chat/behaviors}/scroll-follow-model.js +1 -1
  43. package/dist/{components → chat}/bubble.js +14 -14
  44. package/dist/chat/index.d.ts +16 -0
  45. package/dist/chat/index.js +16 -0
  46. package/dist/{components → chat}/marker.js +6 -8
  47. package/dist/{components → chat}/message-scroller.d.ts +1 -1
  48. package/dist/{components → chat}/message-scroller.js +12 -18
  49. package/dist/{components → chat}/message.js +10 -12
  50. package/dist/{mixins → chat/mixins}/message-follow.js +2 -2
  51. package/dist/{components → color}/color-area.js +7 -10
  52. package/dist/{components → color}/color-field.js +7 -6
  53. package/dist/{components → color}/color-picker.d.ts +1 -1
  54. package/dist/{components → color}/color-picker.js +9 -12
  55. package/dist/{components → color}/color-slider.js +10 -13
  56. package/dist/{components → color}/color-swatch-picker.js +4 -5
  57. package/dist/{components → color}/color-swatch.js +3 -4
  58. package/dist/{components → color}/color-wheel.js +5 -6
  59. package/dist/color/index.d.ts +21 -0
  60. package/dist/color/index.js +21 -0
  61. package/dist/{mixins → color/mixins}/color-area-drag.d.ts +1 -1
  62. package/dist/{mixins → color/mixins}/color-area-drag.js +2 -2
  63. package/dist/{mixins → color/mixins}/color-preview.js +1 -1
  64. package/dist/{mixins → color/mixins}/color-wheel-drag.js +1 -1
  65. package/dist/{styles → color/styles}/rtl-aware-gradient-direction.d.ts +1 -1
  66. package/dist/components/accordion.d.ts +3 -3
  67. package/dist/components/accordion.js +19 -15
  68. package/dist/components/alert-dialog.js +5 -4
  69. package/dist/components/alert.js +10 -20
  70. package/dist/components/aspect-ratio.js +3 -4
  71. package/dist/components/avatar.d.ts +6 -6
  72. package/dist/components/avatar.js +56 -8
  73. package/dist/components/badge.js +11 -9
  74. package/dist/components/breadcrumbs.js +7 -9
  75. package/dist/components/button.d.ts +8 -6
  76. package/dist/components/button.js +22 -14
  77. package/dist/components/calendar.js +13 -24
  78. package/dist/components/card.js +9 -11
  79. package/dist/components/carousel.d.ts +1 -1
  80. package/dist/components/carousel.js +12 -20
  81. package/dist/components/checkbox-group.js +3 -3
  82. package/dist/components/checkbox.js +2 -2
  83. package/dist/components/combobox.js +6 -6
  84. package/dist/components/command.js +10 -14
  85. package/dist/components/cta-group.d.ts +30 -14
  86. package/dist/components/cta-group.js +29 -10
  87. package/dist/components/date-field.js +2 -1
  88. package/dist/components/date-picker.js +4 -5
  89. package/dist/components/date-range-picker.js +3 -2
  90. package/dist/components/description.js +2 -1
  91. package/dist/components/dialog-dismiss.d.ts +18 -0
  92. package/dist/components/dialog-dismiss.js +15 -0
  93. package/dist/components/dialog.js +11 -15
  94. package/dist/components/disclosure.js +10 -14
  95. package/dist/components/drawer.js +3 -4
  96. package/dist/components/field-error.js +3 -3
  97. package/dist/components/form.js +2 -1
  98. package/dist/components/group.js +3 -3
  99. package/dist/components/header.js +3 -3
  100. package/dist/components/heading-scope.js +2 -1
  101. package/dist/components/heading.d.ts +4 -4
  102. package/dist/components/heading.js +7 -7
  103. package/dist/components/highlight.js +17 -12
  104. package/dist/components/hover-card.js +6 -8
  105. package/dist/components/image-placeholder.js +13 -19
  106. package/dist/components/index.d.ts +6 -38
  107. package/dist/components/index.js +6 -38
  108. package/dist/components/input.js +3 -4
  109. package/dist/components/item.js +10 -19
  110. package/dist/components/keyboard.js +3 -3
  111. package/dist/components/label.js +2 -1
  112. package/dist/components/link-button.d.ts +7 -5
  113. package/dist/components/link-button.js +16 -11
  114. package/dist/components/link.js +3 -4
  115. package/dist/components/listbox.js +6 -11
  116. package/dist/components/menu.js +5 -6
  117. package/dist/components/meter.js +5 -6
  118. package/dist/components/modal.js +9 -11
  119. package/dist/components/nav-link.d.ts +1 -1
  120. package/dist/components/nav-link.js +3 -4
  121. package/dist/components/navigation-menu.js +17 -23
  122. package/dist/components/number-field.js +8 -10
  123. package/dist/components/otp-field.js +2 -1
  124. package/dist/components/overlay-arrow.js +3 -4
  125. package/dist/components/pagination.js +8 -10
  126. package/dist/components/popover.js +3 -4
  127. package/dist/components/progress-bar.js +5 -5
  128. package/dist/components/radio-group.js +5 -7
  129. package/dist/components/range-calendar.js +3 -3
  130. package/dist/components/scroll-area.js +4 -5
  131. package/dist/components/search-field.js +8 -11
  132. package/dist/components/section.js +2 -1
  133. package/dist/components/select.js +10 -22
  134. package/dist/components/selection-indicator.js +3 -3
  135. package/dist/components/sentinel-row.js +3 -3
  136. package/dist/components/separator.js +3 -3
  137. package/dist/components/shared-element.js +2 -1
  138. package/dist/components/sheet.js +6 -7
  139. package/dist/components/sidebar.js +48 -76
  140. package/dist/components/slider.js +8 -10
  141. package/dist/components/spinner.js +3 -3
  142. package/dist/components/switch.js +3 -3
  143. package/dist/components/tabs.js +9 -12
  144. package/dist/components/tag-group.js +7 -9
  145. package/dist/components/text-field.js +2 -1
  146. package/dist/components/text.js +2 -1
  147. package/dist/components/textarea.js +3 -4
  148. package/dist/components/time-field.js +2 -1
  149. package/dist/components/toggle-button.js +5 -7
  150. package/dist/components/tooltip.js +3 -3
  151. package/dist/components/typeset.js +128 -123
  152. package/dist/components/youtube-embed.js +2 -1
  153. package/dist/docs/anchor-heading.d.ts +41 -0
  154. package/dist/docs/anchor-heading.js +62 -0
  155. package/dist/docs/callout.d.ts +46 -0
  156. package/dist/docs/callout.js +61 -0
  157. package/dist/docs/code-block.d.ts +74 -0
  158. package/dist/docs/code-block.js +322 -0
  159. package/dist/docs/code-tabs-sync.d.ts +26 -0
  160. package/dist/docs/code-tabs-sync.js +12 -0
  161. package/dist/docs/code-tabs.d.ts +53 -0
  162. package/dist/docs/code-tabs.js +102 -0
  163. package/dist/docs/copy-button.d.ts +31 -0
  164. package/dist/docs/copy-button.js +49 -0
  165. package/dist/docs/docs-feedback.d.ts +55 -0
  166. package/dist/docs/docs-feedback.js +72 -0
  167. package/dist/docs/docs-footer.d.ts +40 -0
  168. package/dist/docs/docs-footer.js +45 -0
  169. package/dist/docs/docs-hub.d.ts +93 -0
  170. package/dist/docs/docs-hub.js +142 -0
  171. package/dist/docs/docs-layout.d.ts +90 -0
  172. package/dist/docs/docs-layout.js +166 -0
  173. package/dist/docs/docs-nav-tools.d.ts +25 -0
  174. package/dist/docs/docs-nav-tools.js +14 -0
  175. package/dist/docs/docs-nav.d.ts +53 -0
  176. package/dist/docs/docs-nav.js +76 -0
  177. package/dist/docs/docs-not-found.d.ts +68 -0
  178. package/dist/docs/docs-not-found.js +100 -0
  179. package/dist/docs/docs-page-header.d.ts +55 -0
  180. package/dist/docs/docs-page-header.js +54 -0
  181. package/dist/docs/docs-pager.d.ts +46 -0
  182. package/dist/docs/docs-pager.js +74 -0
  183. package/dist/docs/file-tree.d.ts +57 -0
  184. package/dist/docs/file-tree.js +142 -0
  185. package/dist/docs/index.d.ts +38 -0
  186. package/dist/docs/index.js +38 -0
  187. package/dist/docs/install-command.d.ts +54 -0
  188. package/dist/docs/install-command.js +33 -0
  189. package/dist/docs/mixins/code-tabs-sync.d.ts +47 -0
  190. package/dist/docs/mixins/code-tabs-sync.js +137 -0
  191. package/dist/docs/mixins/copy-feedback.d.ts +25 -0
  192. package/dist/docs/mixins/copy-feedback.js +49 -0
  193. package/dist/docs/mixins/copy-from-url.d.ts +27 -0
  194. package/dist/docs/mixins/copy-from-url.js +95 -0
  195. package/dist/docs/mixins/docs-nav-tools.d.ts +27 -0
  196. package/dist/docs/mixins/docs-nav-tools.js +97 -0
  197. package/dist/docs/mixins/toc-spy.d.ts +30 -0
  198. package/dist/docs/mixins/toc-spy.js +165 -0
  199. package/dist/docs/next-steps.d.ts +45 -0
  200. package/dist/docs/next-steps.js +79 -0
  201. package/dist/docs/page-actions.d.ts +77 -0
  202. package/dist/docs/page-actions.js +78 -0
  203. package/dist/docs/plan-notice.d.ts +28 -0
  204. package/dist/docs/plan-notice.js +33 -0
  205. package/dist/docs/props-table.d.ts +64 -0
  206. package/dist/docs/props-table.js +147 -0
  207. package/dist/docs/steps.d.ts +51 -0
  208. package/dist/docs/steps.js +112 -0
  209. package/dist/docs/table-of-contents.d.ts +49 -0
  210. package/dist/docs/table-of-contents.js +139 -0
  211. package/dist/docs/ui-label.d.ts +51 -0
  212. package/dist/docs/ui-label.js +64 -0
  213. package/dist/docs/utils/docs-tree.d.ts +81 -0
  214. package/dist/docs/utils/docs-tree.js +57 -0
  215. package/dist/docs/utils/reveal-in-scroller.d.ts +19 -0
  216. package/dist/docs/utils/reveal-in-scroller.js +43 -0
  217. package/dist/landing/accent-text.d.ts +47 -0
  218. package/dist/landing/accent-text.js +107 -0
  219. package/dist/landing/animations/entrance.d.ts +40 -0
  220. package/dist/landing/animations/entrance.js +52 -0
  221. package/dist/landing/announcement-chip.d.ts +45 -0
  222. package/dist/landing/announcement-chip.js +36 -0
  223. package/dist/landing/author-band.d.ts +78 -0
  224. package/dist/landing/author-band.js +190 -0
  225. package/dist/landing/bento.d.ts +99 -0
  226. package/dist/landing/bento.js +138 -0
  227. package/dist/landing/changelog-strip.d.ts +74 -0
  228. package/dist/landing/changelog-strip.js +201 -0
  229. package/dist/{patterns → landing}/check-row.js +5 -7
  230. package/dist/{patterns → landing}/closing-cta.d.ts +4 -4
  231. package/dist/{patterns → landing}/closing-cta.js +8 -8
  232. package/dist/landing/code-stage.d.ts +93 -0
  233. package/dist/landing/code-stage.js +434 -0
  234. package/dist/landing/crosshair.d.ts +44 -0
  235. package/dist/landing/crosshair.js +48 -0
  236. package/dist/landing/curriculum.d.ts +79 -0
  237. package/dist/landing/curriculum.js +194 -0
  238. package/dist/landing/drawn-chart.d.ts +74 -0
  239. package/dist/landing/drawn-chart.js +377 -0
  240. package/dist/landing/event-ticker.d.ts +71 -0
  241. package/dist/landing/event-ticker.js +331 -0
  242. package/dist/landing/fan-out-diagram.d.ts +70 -0
  243. package/dist/landing/fan-out-diagram.js +481 -0
  244. package/dist/{patterns → landing}/faq-band.d.ts +7 -5
  245. package/dist/{patterns → landing}/faq-band.js +11 -12
  246. package/dist/landing/feature-band.d.ts +108 -0
  247. package/dist/landing/feature-band.js +67 -0
  248. package/dist/landing/feature.d.ts +148 -0
  249. package/dist/landing/feature.js +219 -0
  250. package/dist/landing/flow-diagram.d.ts +62 -0
  251. package/dist/landing/flow-diagram.js +240 -0
  252. package/dist/{patterns → landing}/icon-well.d.ts +17 -7
  253. package/dist/landing/icon-well.js +31 -0
  254. package/dist/landing/index.d.ts +52 -0
  255. package/dist/landing/index.js +52 -0
  256. package/dist/{patterns → landing}/install-tabs.js +4 -5
  257. package/dist/landing/landing-header.d.ts +103 -0
  258. package/dist/landing/landing-header.js +110 -0
  259. package/dist/landing/landing-hero.d.ts +119 -0
  260. package/dist/landing/landing-hero.js +172 -0
  261. package/dist/landing/landing-section.d.ts +110 -0
  262. package/dist/landing/landing-section.js +183 -0
  263. package/dist/landing/logo-cloud.d.ts +56 -0
  264. package/dist/landing/logo-cloud.js +160 -0
  265. package/dist/landing/logo-sentence.d.ts +38 -0
  266. package/dist/landing/logo-sentence.js +51 -0
  267. package/dist/landing/marquee.d.ts +44 -0
  268. package/dist/landing/marquee.js +97 -0
  269. package/dist/landing/motion-loop.d.ts +43 -0
  270. package/dist/landing/motion-loop.js +42 -0
  271. package/dist/landing/pricing-band.d.ts +94 -0
  272. package/dist/landing/pricing-band.js +151 -0
  273. package/dist/landing/product-frame.d.ts +108 -0
  274. package/dist/landing/product-frame.js +202 -0
  275. package/dist/{patterns → landing}/proof-strip.d.ts +4 -4
  276. package/dist/{patterns → landing}/proof-strip.js +3 -3
  277. package/dist/landing/rails.d.ts +45 -0
  278. package/dist/landing/rails.js +69 -0
  279. package/dist/landing/rotating-text.d.ts +44 -0
  280. package/dist/landing/rotating-text.js +67 -0
  281. package/dist/landing/segmented-stage.d.ts +75 -0
  282. package/dist/landing/segmented-stage.js +141 -0
  283. package/dist/landing/sequence-diagram.d.ts +65 -0
  284. package/dist/landing/sequence-diagram.js +348 -0
  285. package/dist/landing/site-footer.d.ts +100 -0
  286. package/dist/landing/site-footer.js +274 -0
  287. package/dist/landing/site-header.d.ts +126 -0
  288. package/dist/landing/site-header.js +595 -0
  289. package/dist/{components → landing}/split.d.ts +14 -4
  290. package/dist/{components → landing}/split.js +30 -21
  291. package/dist/landing/sponsor-wall.d.ts +81 -0
  292. package/dist/landing/sponsor-wall.js +241 -0
  293. package/dist/{components → landing}/stat-strip.d.ts +31 -4
  294. package/dist/landing/stat-strip.js +105 -0
  295. package/dist/landing/step-list.d.ts +73 -0
  296. package/dist/landing/step-list.js +182 -0
  297. package/dist/landing/styles/card-grid.d.ts +115 -0
  298. package/dist/landing/styles/card-grid.js +295 -0
  299. package/dist/{patterns → landing}/tabbed-stage.d.ts +26 -8
  300. package/dist/landing/tabbed-stage.js +233 -0
  301. package/dist/landing/testimonial-band.d.ts +110 -0
  302. package/dist/landing/testimonial-band.js +164 -0
  303. package/dist/landing/typed-terminal.d.ts +62 -0
  304. package/dist/landing/typed-terminal.js +233 -0
  305. package/dist/landing/utils/pause-toggle.d.ts +37 -0
  306. package/dist/landing/utils/pause-toggle.js +71 -0
  307. package/dist/mixins/copy-to-clipboard.d.ts +6 -0
  308. package/dist/mixins/copy-to-clipboard.js +17 -1
  309. package/dist/mixins/dialog-dismiss.d.ts +21 -0
  310. package/dist/mixins/dialog-dismiss.js +62 -0
  311. package/dist/mixins/index.d.ts +2 -15
  312. package/dist/mixins/index.js +2 -15
  313. package/dist/styles/index.d.ts +2 -5
  314. package/dist/styles/index.js +2 -5
  315. package/dist/styles/landing.d.ts +200 -0
  316. package/dist/styles/landing.js +516 -0
  317. package/dist/styles/surface-control.d.ts +18 -0
  318. package/dist/styles/surface-control.js +31 -0
  319. package/dist/utils/eyebrow.d.ts +39 -0
  320. package/dist/utils/eyebrow.js +21 -0
  321. package/dist/utils/index.d.ts +1 -5
  322. package/dist/utils/index.js +1 -5
  323. package/package.json +14 -4
  324. package/src/theme.css +87 -22
  325. package/dist/components/feature.d.ts +0 -102
  326. package/dist/components/feature.js +0 -151
  327. package/dist/components/logo-cloud.d.ts +0 -42
  328. package/dist/components/logo-cloud.js +0 -41
  329. package/dist/components/marketing-header.d.ts +0 -71
  330. package/dist/components/marketing-header.js +0 -81
  331. package/dist/components/marketing-section.d.ts +0 -81
  332. package/dist/components/marketing-section.js +0 -103
  333. package/dist/components/stat-strip.js +0 -64
  334. package/dist/patterns/accent-text.d.ts +0 -30
  335. package/dist/patterns/accent-text.js +0 -17
  336. package/dist/patterns/announcement-chip.d.ts +0 -41
  337. package/dist/patterns/announcement-chip.js +0 -49
  338. package/dist/patterns/bento.d.ts +0 -67
  339. package/dist/patterns/bento.js +0 -95
  340. package/dist/patterns/code-stage.d.ts +0 -63
  341. package/dist/patterns/code-stage.js +0 -82
  342. package/dist/patterns/feature-band.d.ts +0 -85
  343. package/dist/patterns/feature-band.js +0 -50
  344. package/dist/patterns/icon-well.js +0 -38
  345. package/dist/patterns/index.d.ts +0 -23
  346. package/dist/patterns/index.js +0 -23
  347. package/dist/patterns/landing-hero.d.ts +0 -93
  348. package/dist/patterns/landing-hero.js +0 -126
  349. package/dist/patterns/product-frame.d.ts +0 -60
  350. package/dist/patterns/product-frame.js +0 -70
  351. package/dist/patterns/step-list.d.ts +0 -45
  352. package/dist/patterns/step-list.js +0 -84
  353. package/dist/patterns/tabbed-stage.js +0 -77
  354. package/dist/styles/marketing.d.ts +0 -120
  355. package/dist/styles/marketing.js +0 -225
  356. package/dist/utils/semantic-color-panel.d.ts +0 -35
  357. package/dist/utils/semantic-color-panel.js +0 -28
  358. /package/dist/{behaviors → app/behaviors}/drag-session.d.ts +0 -0
  359. /package/dist/{behaviors → app/behaviors}/resize-session.d.ts +0 -0
  360. /package/dist/{behaviors → app/behaviors}/resize-session.js +0 -0
  361. /package/dist/{behaviors → app/behaviors}/selection-model.d.ts +0 -0
  362. /package/dist/{behaviors → app/behaviors}/selection-model.js +0 -0
  363. /package/dist/{behaviors → app/behaviors}/toaster.d.ts +0 -0
  364. /package/dist/{components → app}/drop-indicator.d.ts +0 -0
  365. /package/dist/{components → app}/drop-zone.d.ts +0 -0
  366. /package/dist/{components → app}/file-trigger.d.ts +0 -0
  367. /package/dist/{components → app}/menubar.d.ts +0 -0
  368. /package/dist/{mixins → app/mixins}/chart-tooltip.d.ts +0 -0
  369. /package/dist/{mixins → app/mixins}/chart-tooltip.js +0 -0
  370. /package/dist/{mixins → app/mixins}/context-menu.d.ts +0 -0
  371. /package/dist/{mixins → app/mixins}/context-menu.js +0 -0
  372. /package/dist/{mixins → app/mixins}/drag-reorder.d.ts +0 -0
  373. /package/dist/{mixins → app/mixins}/drop-zone.d.ts +0 -0
  374. /package/dist/{mixins → app/mixins}/grid-list-keys.d.ts +0 -0
  375. /package/dist/{mixins → app/mixins}/menubar-keys.d.ts +0 -0
  376. /package/dist/{mixins → app/mixins}/resize-handle.d.ts +0 -0
  377. /package/dist/{mixins/treeKeys.d.ts → app/mixins/tree-keys.d.ts} +0 -0
  378. /package/dist/{components → app}/resizable.d.ts +0 -0
  379. /package/dist/{components → app}/shortcut-list.d.ts +0 -0
  380. /package/dist/{components → app}/skeleton.d.ts +0 -0
  381. /package/dist/{styles → app/styles}/chart-palette.js +0 -0
  382. /package/dist/{styles → app/styles}/graphic-host.js +0 -0
  383. /package/dist/{styles → app/styles}/legend-toggle.js +0 -0
  384. /package/dist/{components → app}/table.d.ts +0 -0
  385. /package/dist/{components → app}/toast.d.ts +0 -0
  386. /package/dist/{components → app}/toolbar.d.ts +0 -0
  387. /package/dist/{utils → app/utils}/chart-marker-indices.d.ts +0 -0
  388. /package/dist/{utils → app/utils}/chart-marker-indices.js +0 -0
  389. /package/dist/{utils → app/utils}/chart-scale.d.ts +0 -0
  390. /package/dist/{behaviors → chat/behaviors}/scroll-follow-model.d.ts +0 -0
  391. /package/dist/{components → chat}/bubble.d.ts +0 -0
  392. /package/dist/{components → chat}/marker.d.ts +0 -0
  393. /package/dist/{components → chat}/message.d.ts +0 -0
  394. /package/dist/{mixins → chat/mixins}/attachment-trigger.d.ts +0 -0
  395. /package/dist/{mixins → chat/mixins}/attachment-trigger.js +0 -0
  396. /package/dist/{mixins → chat/mixins}/message-follow.d.ts +0 -0
  397. /package/dist/{components → color}/color-area.d.ts +0 -0
  398. /package/dist/{components → color}/color-field.d.ts +0 -0
  399. /package/dist/{components → color}/color-slider.d.ts +0 -0
  400. /package/dist/{components → color}/color-swatch-picker.d.ts +0 -0
  401. /package/dist/{components → color}/color-swatch.d.ts +0 -0
  402. /package/dist/{components → color}/color-wheel.d.ts +0 -0
  403. /package/dist/{mixins → color/mixins}/color-channel-sync.d.ts +0 -0
  404. /package/dist/{mixins → color/mixins}/color-channel-sync.js +0 -0
  405. /package/dist/{mixins → color/mixins}/color-preview.d.ts +0 -0
  406. /package/dist/{mixins → color/mixins}/color-wheel-drag.d.ts +0 -0
  407. /package/dist/{styles → color/styles}/rtl-aware-gradient-direction.js +0 -0
  408. /package/dist/{utils → color/utils}/hue-spectrum.d.ts +0 -0
  409. /package/dist/{utils → color/utils}/hue-spectrum.js +0 -0
  410. /package/dist/{patterns → landing}/check-row.d.ts +0 -0
  411. /package/dist/{patterns → landing}/install-tabs.d.ts +0 -0
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Landing steps for a “how it works” band: numbered columns, or a timeline that walks
3
+ * one story down a rule with a timestamp and product media per step. Counters are
4
+ * CSS-driven so the list stays pure markup; titles and copy stay on the page.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
10
+ /**
11
+ * Prop types for {@link StepList} and its compound parts.
12
+ */
13
+ export declare namespace StepList {
14
+ /**
15
+ * `numbered` lays steps in counted columns; `timeline` runs them down a rule with a
16
+ * square marker each, an optional timestamp line and optional media.
17
+ */
18
+ type Variant = "numbered" | "timeline";
19
+ /**
20
+ * Value {@link StepList} provides so each item draws for the list's look.
21
+ */
22
+ interface Context {
23
+ /** Look every item in this list draws. */
24
+ variant: Variant;
25
+ }
26
+ /**
27
+ * Props accepted by {@link StepList}.
28
+ */
29
+ interface Props extends TagProps<"ol"> {
30
+ /** List look. Defaults to {@link DEFAULT_VARIANT}. */
31
+ variant?: Variant;
32
+ /** {@link StepList.Item} children, numbered by CSS counters. */
33
+ children: RemixNode;
34
+ }
35
+ /**
36
+ * Props accepted by {@link StepList.Item}.
37
+ */
38
+ interface ItemProps extends Omit<TagProps<"li">, "title"> {
39
+ /** Step title — rendered at the ambient heading depth. */
40
+ title: RemixNode;
41
+ /** Line above the title in a timeline, such as a timestamp. A numbered list leaves it out. */
42
+ meta?: RemixNode;
43
+ /**
44
+ * Rendered UI beside the copy from the `lg` container up and under it below, in a
45
+ * timeline. A numbered list leaves it out.
46
+ */
47
+ media?: RemixNode;
48
+ /** Supporting copy under the title; `<strong>` fragments draw in the heading ink. */
49
+ children: RemixNode;
50
+ }
51
+ }
52
+ /**
53
+ * Lays steps in a responsive track. A sizing wrapper is the named container; the `<ol>`
54
+ * holds the grid so the query can restyle a descendant. A numbered list sets every step in
55
+ * one row from `xl` (64rem) with connectors between them; a timeline stays one column.
56
+ *
57
+ * @param handle Runtime handle carrying the host `<ol>`'s props and providing {@link StepList.Context}.
58
+ * @returns The render function producing the list's markup.
59
+ * @example
60
+ * <StepList>
61
+ * <StepList.Item title={t("step.one")}>{t("step.one.body")}</StepList.Item>
62
+ * </StepList>
63
+ * @example
64
+ * <StepList variant="timeline">
65
+ * <StepList.Item meta="14:02 UTC" title={t("incident.detect")} media={probeCard}>
66
+ * {t("incident.detect.body")}
67
+ * </StepList.Item>
68
+ * </StepList>
69
+ */
70
+ export declare function StepList(handle: Handle<StepList.Props, StepList.Context>): () => import("remix/component").RemixElement;
71
+ export declare namespace StepList {
72
+ var Item: (handle: Handle<StepList.ItemProps>) => () => import("remix/component").RemixElement;
73
+ }
@@ -0,0 +1,182 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { fg } from "@sdxc/u/color";
3
+ import { rounded } from "@sdxc/u/effects";
4
+ import { combine, counterIncrement, counterReset, pseudoContent, raw, mergeMix, } from "@sdxc/u/general";
5
+ import { absolute, container, gap, grid, gridTemplate, inlineFlex, items, justify, relative, vstack, } from "@sdxc/u/layout";
6
+ import { at } from "@sdxc/u/responsive";
7
+ import { bs, is, m, mbe } from "@sdxc/u/size";
8
+ import { after, before, not } from "@sdxc/u/state";
9
+ import { balance, font, leading, pretty, text, textAlign, weight } from "@sdxc/u/typography";
10
+ import { HeadingScope, resolveHeadingLevel, TAG_BY_LEVEL } from "../components/heading-scope.js";
11
+ import { landingEmphasis } from "../styles/landing.js";
12
+ /** Look {@link StepList} draws when `variant` is omitted. */
13
+ const DEFAULT_VARIANT = "numbered";
14
+ /** Container the list's tracks and each timeline step's media column query. */
15
+ const LIST_CONTAINER = "ui-landing-step-list";
16
+ /** Translucent line connectors and the timeline rule draw with. */
17
+ const HAIRLINE = "var(--ui-landing-hairline, color-mix(in oklch, CanvasText 8%, transparent))";
18
+ /** Space between the timeline rule and a step's copy. */
19
+ const TIMELINE_INSET = "2rem";
20
+ /**
21
+ * Lays steps in a responsive track. A sizing wrapper is the named container; the `<ol>`
22
+ * holds the grid so the query can restyle a descendant. A numbered list sets every step in
23
+ * one row from `xl` (64rem) with connectors between them; a timeline stays one column.
24
+ *
25
+ * @param handle Runtime handle carrying the host `<ol>`'s props and providing {@link StepList.Context}.
26
+ * @returns The render function producing the list's markup.
27
+ * @example
28
+ * <StepList>
29
+ * <StepList.Item title={t("step.one")}>{t("step.one.body")}</StepList.Item>
30
+ * </StepList>
31
+ * @example
32
+ * <StepList variant="timeline">
33
+ * <StepList.Item meta="14:02 UTC" title={t("incident.detect")} media={probeCard}>
34
+ * {t("incident.detect.body")}
35
+ * </StepList.Item>
36
+ * </StepList>
37
+ */
38
+ export function StepList(handle) {
39
+ return () => {
40
+ let { children, mix, variant, ...rest } = handle.props;
41
+ let resolvedVariant = variant ?? DEFAULT_VARIANT;
42
+ handle.context.set({ variant: resolvedVariant });
43
+ return (_jsx("div", { mix: [container(LIST_CONTAINER)], children: _jsx(HeadingScope, { children: _jsx("ol", { ...rest, "data-slot": "step-list", "data-variant": resolvedVariant, mix: mergeMix([
44
+ counterReset("ui-landing-step"),
45
+ raw({ listStyle: "none", padding: "0", margin: "0" }),
46
+ grid(),
47
+ resolvedVariant === "timeline"
48
+ ? [gap(0), gridTemplate({ columns: "minmax(0, 1fr)" })]
49
+ : [
50
+ gap(8),
51
+ /**
52
+ * Every step shares one row from the `xl` container, whatever the count,
53
+ * so connectors run step to step and no row is left short.
54
+ */
55
+ combine([
56
+ gridTemplate({ columns: "minmax(0, 1fr)" }),
57
+ at("xl", LIST_CONTAINER, raw({
58
+ gridTemplateColumns: "none",
59
+ gridAutoFlow: "column",
60
+ gridAutoColumns: "minmax(0, 1fr)",
61
+ })),
62
+ ]),
63
+ ],
64
+ ], mix), children: children }) }) }));
65
+ };
66
+ }
67
+ /**
68
+ * Numbered step: a quiet ringed disc with the step number, then the title and copy. The
69
+ * connector to the next step runs between the two discs once the list lays out in columns.
70
+ */
71
+ function numberedStep() {
72
+ return [
73
+ relative(),
74
+ vstack({ align: "center", gap: 4 }),
75
+ textAlign("center"),
76
+ counterIncrement("ui-landing-step"),
77
+ before([
78
+ pseudoContent("counter(ui-landing-step)"),
79
+ inlineFlex(),
80
+ items("center"),
81
+ justify("center"),
82
+ is(10),
83
+ bs(10),
84
+ mbe(2),
85
+ rounded("full"),
86
+ raw({
87
+ backgroundColor: "transparent",
88
+ boxShadow: `inset 0 0 0 1px ${HAIRLINE}`,
89
+ color: "var(--ui-neutral-fg-emphasis)",
90
+ }),
91
+ text("base"),
92
+ weight("semibold"),
93
+ ]),
94
+ not(":last-child", after(combine([
95
+ pseudoContent('""'),
96
+ absolute(),
97
+ raw({
98
+ insetBlockStart: "1.25rem",
99
+ insetInlineStart: "calc(50% + 1.75rem)",
100
+ inlineSize: "calc(100% - 1.5rem)",
101
+ blockSize: "1px",
102
+ backgroundColor: HAIRLINE,
103
+ display: "none",
104
+ }),
105
+ at("xl", LIST_CONTAINER, raw({ display: "block" })),
106
+ ]))),
107
+ ];
108
+ }
109
+ /**
110
+ * Timeline step: a hairline rule down the inline-start edge with a square brand marker
111
+ * centred on the step's first line — the timestamp when there is one, else the title.
112
+ *
113
+ * @param hasMeta Whether the step opens with a timestamp line.
114
+ */
115
+ function timelineStep(hasMeta) {
116
+ return [
117
+ relative(),
118
+ raw({ paddingInlineStart: TIMELINE_INSET, paddingBlockEnd: "2.5rem" }),
119
+ textAlign("start"),
120
+ counterIncrement("ui-landing-step"),
121
+ before([
122
+ pseudoContent('""'),
123
+ absolute(),
124
+ raw({
125
+ insetBlock: "0",
126
+ insetInlineStart: "calc(0.25rem - 0.5px)",
127
+ inlineSize: "1px",
128
+ backgroundColor: HAIRLINE,
129
+ }),
130
+ ]),
131
+ after([
132
+ pseudoContent('""'),
133
+ absolute(),
134
+ raw({
135
+ insetInlineStart: "0",
136
+ insetBlockStart: hasMeta ? "0.25rem" : "0.5rem",
137
+ inlineSize: "0.5rem",
138
+ blockSize: "0.5rem",
139
+ backgroundColor: "var(--ui-brand-bg-solid)",
140
+ }),
141
+ ]),
142
+ ];
143
+ }
144
+ /**
145
+ * One step. In a numbered list: a ringed number disc, a title, and supporting copy. In a
146
+ * timeline: an optional timestamp, a title and copy, with optional media beside the copy
147
+ * from the `lg` container up (copy 5fr, media 7fr) and under it below.
148
+ *
149
+ * @param handle Runtime handle carrying the host `<li>`'s props.
150
+ * @returns The render function producing the step's markup.
151
+ */
152
+ StepList.Item = function StepListItem(handle) {
153
+ return () => {
154
+ let { children, media, meta, mix, title, ...rest } = handle.props;
155
+ let context = handle.context.get(StepList);
156
+ let resolved = resolveHeadingLevel(handle);
157
+ let Tag = TAG_BY_LEVEL[resolved];
158
+ if (context?.variant !== "timeline") {
159
+ return (_jsxs("li", { ...rest, "data-slot": "step-list-item", mix: mergeMix(numberedStep(), mix), children: [_jsx(Tag, { "data-slot": "step-list-title", "data-heading-level": resolved, mix: [m(0), text("xl"), balance(), weight("medium"), fg("neutral.emphasis")], children: title }), _jsx("div", { mix: [text("base"), leading("relaxed"), pretty(), fg("neutral")], children: children })] }));
160
+ }
161
+ let hasMeta = meta !== undefined && meta !== null;
162
+ let copy = (_jsxs("div", { "data-slot": "step-list-copy", mix: [vstack({ gap: 2, align: "stretch" })], children: [hasMeta ? (_jsx("p", { "data-slot": "step-list-meta", mix: [m(0), font("mono"), text("xs"), raw({ lineHeight: "1rem" }), fg("neutral.muted")], children: meta })) : null, _jsx(Tag, { "data-slot": "step-list-title", "data-heading-level": resolved, mix: [
163
+ m(0),
164
+ raw({ fontSize: "1rem", lineHeight: "1.5rem" }),
165
+ balance(),
166
+ weight("semibold"),
167
+ fg("neutral.emphasis"),
168
+ ], children: title }), _jsx("div", { mix: [
169
+ raw({ fontSize: "1rem", lineHeight: "1.5rem" }),
170
+ pretty(),
171
+ fg("neutral"),
172
+ landingEmphasis(),
173
+ ], children: children })] }));
174
+ return (_jsx("li", { ...rest, "data-slot": "step-list-item", "data-has-media": media ? "true" : undefined, mix: mergeMix(timelineStep(hasMeta), mix), children: media ? (_jsxs("div", { mix: [
175
+ combine([
176
+ grid(),
177
+ raw({ gap: "1rem", gridTemplateColumns: "minmax(0, 1fr)" }),
178
+ at("lg", LIST_CONTAINER, raw({ gridTemplateColumns: "minmax(0, 5fr) minmax(0, 7fr)", columnGap: "3rem" })),
179
+ ]),
180
+ ], children: [copy, _jsx("div", { "data-slot": "step-list-media", children: media })] })) : (copy) }));
181
+ };
182
+ };
@@ -0,0 +1,115 @@
1
+ /**
2
+ * The card-grid recipe {@link Feature.Grid} and {@link Bento} share: column steps,
3
+ * raised cells with concentric outer corners, orphan spans, cell padding the media
4
+ * slot reads back, and the quiet or brand glyph tile.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { UtilityInput, UtilityMixin } from "@sdxc/u";
10
+ /** Side of a claim's glyph tile on the spacing scale (2.5rem), shared by every claim icon. */
11
+ export declare const ICON_TILE_SIDE = 10;
12
+ /**
13
+ * Options accepted by {@link cardGrid}.
14
+ */
15
+ export interface CardGridOptions {
16
+ /** Columns at the `lg` container; the grid shows one track on a phone and two from `md`. */
17
+ columns: number;
18
+ /** Separate raised cards, one hairline-ruled mosaic box, or an un-carded `list`. */
19
+ variant: "cards" | "mosaic" | "list";
20
+ /** Named sizing container on the grid's host that the column steps query. */
21
+ containerName: string;
22
+ }
23
+ /**
24
+ * Lays a grid's direct children as cards or a mosaic in one class, so the
25
+ * cell fill, edge and per-corner radii never compete across cascade layers.
26
+ * A lone last cell spans the rest of its row at every step, unless the cells set
27
+ * their own `data-span` or the grid is a `list`. In `cards`, the
28
+ * corners on the grid's outer edge take `--ui-landing-card-radius-outer`;
29
+ * once any cell carries `data-corner`, the `lg` step rounds only the corners
30
+ * those cells list, so a page with custom spans names its own outer corners.
31
+ *
32
+ * @param options Column count, chrome and the container the steps query.
33
+ * @returns One mixin for the element whose children are the cells.
34
+ * @example
35
+ * <div mix={[cardGrid({ columns: 3, variant: "cards", containerName: "ui-landing-bento" })]}>{cells}</div>
36
+ */
37
+ export declare function cardGrid<Node extends Element = Element>({ columns, variant, containerName, }: CardGridOptions): UtilityMixin<Node>;
38
+ /**
39
+ * One container range of a {@link balancedGrid}: the query that selects it and the
40
+ * most items one row holds there.
41
+ */
42
+ export interface BalancedGridStep {
43
+ /** Container size query, such as `(36rem <= width < 48rem)`. */
44
+ query: string;
45
+ /** The most items one row holds in this range. */
46
+ columns: number;
47
+ /**
48
+ * Columns for a run of exactly `count` items in this range, where the even split
49
+ * would still leave a short row the layout should not show.
50
+ */
51
+ columnsFor?: (count: number) => number;
52
+ }
53
+ /**
54
+ * The column count that splits `count` items into the fewest rows of at most
55
+ * `columns` while keeping the rows as even as possible: 6 in at most 4 is 3 + 3,
56
+ * 5 in at most 4 is 3 + 2.
57
+ *
58
+ * @param count Items in the run.
59
+ * @param columns The most items one row may hold.
60
+ * @returns Columns between 1 and `columns`.
61
+ */
62
+ export declare function balancedColumns(count: number, columns: number): number;
63
+ /**
64
+ * Applies `build(count)` to an element whose direct children number exactly
65
+ * `count`, for every count up to {@link BALANCED_MAX_COUNT}; a longer run keeps the
66
+ * rules written outside it.
67
+ *
68
+ * @param build Styles for a run of that many children.
69
+ * @returns One quantity rule per count.
70
+ */
71
+ export declare function byChildCount<Node extends Element = Element>(build: (count: number) => UtilityInput<Node>): UtilityMixin<Node>[];
72
+ /**
73
+ * Lays direct children in rows that are full or centred: each step picks the even
74
+ * column count for the run ({@link balancedColumns}), and a shorter last row sits
75
+ * in the middle at one column per item. Tracks are doubled so a centred row can
76
+ * start half a column in; the element must leave `grid-template-columns` and the
77
+ * children's `grid-column` to this mixin.
78
+ *
79
+ * @param containerName Named sizing container the steps query.
80
+ * @param steps Container ranges, each with the most items a row holds there.
81
+ * @param rowStart Extra styles for the first item of a centred last row, such as the edge it now exposes.
82
+ * @returns One mixin for the element whose children are the items.
83
+ * @example
84
+ * <div mix={[grid(), balancedGrid("ui-logos", [{ query: "(width < 30rem)", columns: 2 }, { query: "(width >= 30rem)", columns: 4 }])]}>{marks}</div>
85
+ */
86
+ export declare function balancedGrid<Node extends Element = Element>(containerName: string, steps: ReadonlyArray<BalancedGridStep>, rowStart?: UtilityInput<Node>): UtilityMixin<Node>;
87
+ /**
88
+ * Pads a card cell through custom properties that {@link cardMedia} reads back,
89
+ * so the media slot bleeds to the cell's edges at every padding step.
90
+ *
91
+ * @param block Block padding below the `lg` step.
92
+ * @param inline Inline padding below the `lg` step.
93
+ * @param wide Padding on both axes from the `lg` container.
94
+ * @param containerName Named container the `lg` step queries; omitted queries the nearest one.
95
+ * @returns One mixin for the cell.
96
+ */
97
+ export declare function cardPadding<Node extends Element = Element>(block: string, inline: string, wide: string, containerName?: string): UtilityMixin<Node>;
98
+ /**
99
+ * Draws a cell's top media edge to edge, fading its lower half into the cell
100
+ * fill, and drops it below the `md` container where a phone has no room for
101
+ * the illustration.
102
+ *
103
+ * @returns One mixin for the media wrapper, placed first in the cell.
104
+ */
105
+ export declare function cardMedia<Node extends Element = Element>(): UtilityMixin<Node>;
106
+ /**
107
+ * Centers a glyph in a square tile so claim icons share one size language.
108
+ * `quiet` frames it with a hairline ring in the heading ink; `brand` paints
109
+ * the tinted, bordered badge.
110
+ *
111
+ * @param tone Tile chrome.
112
+ * @param side Side length on the spacing scale.
113
+ * @returns One mixin for the tile.
114
+ */
115
+ export declare function iconTile<Node extends Element = Element>(tone: "quiet" | "brand", side: number): UtilityMixin<Node>;
@@ -0,0 +1,295 @@
1
+ /**
2
+ * The card-grid recipe {@link Feature.Grid} and {@link Bento} share: column steps,
3
+ * raised cells with concentric outer corners, orphan spans, cell padding the media
4
+ * slot reads back, and the quiet or brand glyph tile.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import { bg, border, fg } from "@sdxc/u/color";
10
+ import { rounded } from "@sdxc/u/effects";
11
+ import { combine, raw } from "@sdxc/u/general";
12
+ import { center, gap, grid, inlineFlex } from "@sdxc/u/layout";
13
+ import { at } from "@sdxc/u/responsive";
14
+ import { bs, is } from "@sdxc/u/size";
15
+ import { when } from "@sdxc/u/state";
16
+ /** Translucent ink line shared by the mosaic rules and the quiet icon ring. */
17
+ const HAIRLINE = "var(--ui-landing-hairline, color-mix(in oklch, CanvasText 8%, transparent))";
18
+ /** Radius of a card corner that sits on the grid's outer edge. */
19
+ const OUTER_RADIUS = "var(--ui-landing-card-radius-outer, 1.5rem)";
20
+ /**
21
+ * Radius of a card corner that faces a neighbouring card; a page that wants every corner
22
+ * alike sets `--ui-landing-card-radius-inner` to the outer radius.
23
+ */
24
+ const INNER_RADIUS = "var(--ui-landing-card-radius-inner, 0.5rem)";
25
+ /** Custom property holding a card cell's block padding, read back by the media slot. */
26
+ const PADDING_BLOCK = "--ui-landing-cell-padding-block";
27
+ /** Custom property holding a card cell's inline padding, read back by the media slot. */
28
+ const PADDING_INLINE = "--ui-landing-cell-padding-inline";
29
+ /**
30
+ * The three column steps every card grid walks: one track on a phone, two from
31
+ * the `md` container (36rem), the requested count from `lg` (48rem). Ranges keep
32
+ * each step's spans and corners from leaking into the next.
33
+ */
34
+ const GRID_STEPS = [
35
+ { query: "(width < 36rem)", columns: () => 1 },
36
+ { query: "(36rem <= width < 48rem)", columns: (requested) => Math.min(2, requested) },
37
+ { query: "(width >= 48rem)", columns: (requested) => requested },
38
+ ];
39
+ /** Side of a claim's glyph tile on the spacing scale (2.5rem), shared by every claim icon. */
40
+ export const ICON_TILE_SIDE = 10;
41
+ /** Longest run of children the quantity rules tune; a longer one keeps each step's full count. */
42
+ const BALANCED_MAX_COUNT = 12;
43
+ /** Corner names a page lists in a cell's `data-corner`, and the radius each one sets. */
44
+ const CORNER_PROPERTIES = [
45
+ ["start-start", "borderStartStartRadius"],
46
+ ["start-end", "borderStartEndRadius"],
47
+ ["end-start", "borderEndStartRadius"],
48
+ ["end-end", "borderEndEndRadius"],
49
+ ];
50
+ /**
51
+ * Lays a grid's direct children as cards or a mosaic in one class, so the
52
+ * cell fill, edge and per-corner radii never compete across cascade layers.
53
+ * A lone last cell spans the rest of its row at every step, unless the cells set
54
+ * their own `data-span` or the grid is a `list`. In `cards`, the
55
+ * corners on the grid's outer edge take `--ui-landing-card-radius-outer`;
56
+ * once any cell carries `data-corner`, the `lg` step rounds only the corners
57
+ * those cells list, so a page with custom spans names its own outer corners.
58
+ *
59
+ * @param options Column count, chrome and the container the steps query.
60
+ * @returns One mixin for the element whose children are the cells.
61
+ * @example
62
+ * <div mix={[cardGrid({ columns: 3, variant: "cards", containerName: "ui-landing-bento" })]}>{cells}</div>
63
+ */
64
+ export function cardGrid({ columns, variant, containerName, }) {
65
+ let isCards = variant === "cards";
66
+ let steps = GRID_STEPS.map((step) => {
67
+ let count = step.columns(columns);
68
+ let widest = step === GRID_STEPS[GRID_STEPS.length - 1];
69
+ return when(`@container ${containerName} ${step.query}`, [
70
+ raw({ gridTemplateColumns: `repeat(${count}, minmax(0, 1fr))` }),
71
+ variant === "list" ? null : orphanSpans(count),
72
+ cellSpans(count),
73
+ isCards ? outerCorners(count, widest) : null,
74
+ ]);
75
+ });
76
+ return combine([grid(), raw({ textAlign: "start" }), cellChrome(variant), steps]);
77
+ }
78
+ /**
79
+ * The chrome a grid variant draws: raised cards on a 1rem gap, a mosaic box whose
80
+ * 1px gaps rule flush cells, or a `list` of bare cells on wide gaps.
81
+ *
82
+ * @param variant Grid chrome.
83
+ * @returns The rules for the grid and its cells.
84
+ */
85
+ function cellChrome(variant) {
86
+ if (variant === "list")
87
+ return raw({ columnGap: "2.5rem", rowGap: "3rem" });
88
+ if (variant === "cards") {
89
+ return [
90
+ gap(4),
91
+ when("& > *", raw({
92
+ backgroundColor: "var(--ui-surface-raised, Canvas)",
93
+ boxShadow: "var(--ui-shadow-surface, 0 0 0 1px rgb(0 0 0 / 0.06))",
94
+ borderRadius: INNER_RADIUS,
95
+ overflow: "hidden",
96
+ })),
97
+ ];
98
+ }
99
+ return [
100
+ gap("1px"),
101
+ rounded("xl"),
102
+ raw({
103
+ overflow: "hidden",
104
+ backgroundColor: HAIRLINE,
105
+ boxShadow: `0 0 0 1px ${HAIRLINE}`,
106
+ }),
107
+ when("& > *", raw({ backgroundColor: "var(--ui-surface-raised, Canvas)" })),
108
+ ];
109
+ }
110
+ /**
111
+ * Widens a cell carrying `data-span` across that many tracks, capped at the step's
112
+ * count, for a grid of mixed spans.
113
+ *
114
+ * @param count Tracks at this step.
115
+ * @returns The span rules for the step.
116
+ */
117
+ function cellSpans(count) {
118
+ if (count < 2)
119
+ return [];
120
+ return [2, 3].map((span) => when(`& > [data-span="${span}"]`, raw({ gridColumn: span >= count ? "1 / -1" : `span ${span}` })));
121
+ }
122
+ /**
123
+ * Spans a lone last cell across what its row leaves free, so a short last row
124
+ * never strands an empty track. A grid whose cells set their own spans is left as the
125
+ * page laid it out.
126
+ *
127
+ * @param count Tracks at this step.
128
+ * @returns One `grid-column` rule per possible short-row length.
129
+ */
130
+ function orphanSpans(count) {
131
+ let rules = [];
132
+ for (let filled = 1; filled < count; filled++) {
133
+ rules.push(when(`&:not(:has(> [data-span])) > :last-child:nth-child(${count}n + ${filled})`, raw({ gridColumn: filled === 1 ? "1 / -1" : `span ${count - filled + 1}` })));
134
+ }
135
+ return rules;
136
+ }
137
+ /**
138
+ * Rounds the corners that sit on the grid's outer edge for a plain grid of
139
+ * `count` tracks whose short last row ends in a spanning cell: the first cell's
140
+ * start-start, the cell closing the first row, the cell opening the last row
141
+ * and the last cell's end-end. At the widest step a `data-corner` cell hands
142
+ * that choice to the page.
143
+ *
144
+ * @param count Tracks at this step.
145
+ * @param explicit Whether `data-corner` takes over at this step.
146
+ * @returns The corner rules for the step.
147
+ */
148
+ function outerCorners(count, explicit) {
149
+ let auto = explicit ? "&:not(:has(> [data-corner])) >" : "& >";
150
+ let rules = [
151
+ when(`${auto} :first-child`, raw({ borderStartStartRadius: OUTER_RADIUS })),
152
+ when(`${auto} :is(:nth-child(${count}), :last-child:nth-child(-n + ${count}))`, raw({ borderStartEndRadius: OUTER_RADIUS })),
153
+ when(`${auto} :nth-child(${count}n + 1):nth-last-child(-n + ${count})`, raw({ borderEndStartRadius: OUTER_RADIUS })),
154
+ when(`${auto} :last-child`, raw({ borderEndEndRadius: OUTER_RADIUS })),
155
+ ];
156
+ if (!explicit)
157
+ return rules;
158
+ for (let [corner, property] of CORNER_PROPERTIES) {
159
+ rules.push(when(`& > [data-corner~="${corner}"]`, raw({ [property]: OUTER_RADIUS })));
160
+ }
161
+ return rules;
162
+ }
163
+ /**
164
+ * The column count that splits `count` items into the fewest rows of at most
165
+ * `columns` while keeping the rows as even as possible: 6 in at most 4 is 3 + 3,
166
+ * 5 in at most 4 is 3 + 2.
167
+ *
168
+ * @param count Items in the run.
169
+ * @param columns The most items one row may hold.
170
+ * @returns Columns between 1 and `columns`.
171
+ */
172
+ export function balancedColumns(count, columns) {
173
+ if (count <= columns)
174
+ return Math.max(1, count);
175
+ return Math.ceil(count / Math.ceil(count / columns));
176
+ }
177
+ /**
178
+ * Applies `build(count)` to an element whose direct children number exactly
179
+ * `count`, for every count up to {@link BALANCED_MAX_COUNT}; a longer run keeps the
180
+ * rules written outside it.
181
+ *
182
+ * @param build Styles for a run of that many children.
183
+ * @returns One quantity rule per count.
184
+ */
185
+ export function byChildCount(build) {
186
+ let rules = [];
187
+ for (let count = 1; count <= BALANCED_MAX_COUNT; count++) {
188
+ rules.push(when(`&:has(> :nth-child(${count}):last-child)`, build(count)));
189
+ }
190
+ return rules;
191
+ }
192
+ /**
193
+ * Lays direct children in rows that are full or centred: each step picks the even
194
+ * column count for the run ({@link balancedColumns}), and a shorter last row sits
195
+ * in the middle at one column per item. Tracks are doubled so a centred row can
196
+ * start half a column in; the element must leave `grid-template-columns` and the
197
+ * children's `grid-column` to this mixin.
198
+ *
199
+ * @param containerName Named sizing container the steps query.
200
+ * @param steps Container ranges, each with the most items a row holds there.
201
+ * @param rowStart Extra styles for the first item of a centred last row, such as the edge it now exposes.
202
+ * @returns One mixin for the element whose children are the items.
203
+ * @example
204
+ * <div mix={[grid(), balancedGrid("ui-logos", [{ query: "(width < 30rem)", columns: 2 }, { query: "(width >= 30rem)", columns: 4 }])]}>{marks}</div>
205
+ */
206
+ export function balancedGrid(containerName, steps, rowStart) {
207
+ return combine(steps.map((step) => when(`@container ${containerName} ${step.query}`, [
208
+ centredRows(step.columns, rowStart),
209
+ byChildCount((count) => centredRows(step.columnsFor?.(count) ?? balancedColumns(count, step.columns), rowStart)),
210
+ ])));
211
+ }
212
+ /**
213
+ * Doubled tracks for `columns` items a row, each item spanning two, with the first
214
+ * item of a short last row pushed in by the half-tracks the row leaves free.
215
+ *
216
+ * @param columns Items in a full row.
217
+ * @param rowStart Extra styles for the first item of a centred last row.
218
+ * @returns The rules for one column count.
219
+ */
220
+ function centredRows(columns, rowStart) {
221
+ let rules = [
222
+ raw({ gridTemplateColumns: `repeat(${columns * 2}, minmax(0, 1fr))` }),
223
+ when("& > *", raw({ gridColumn: "span 2" })),
224
+ ];
225
+ for (let short = 1; short < columns; short++) {
226
+ rules.push(when(`& > :nth-child(${columns}n + 1):nth-last-child(${short})`, [
227
+ raw({ gridColumn: `${columns - short + 1} / span 2` }),
228
+ rowStart ?? [],
229
+ ]));
230
+ }
231
+ return rules;
232
+ }
233
+ /**
234
+ * Pads a card cell through custom properties that {@link cardMedia} reads back,
235
+ * so the media slot bleeds to the cell's edges at every padding step.
236
+ *
237
+ * @param block Block padding below the `lg` step.
238
+ * @param inline Inline padding below the `lg` step.
239
+ * @param wide Padding on both axes from the `lg` container.
240
+ * @param containerName Named container the `lg` step queries; omitted queries the nearest one.
241
+ * @returns One mixin for the cell.
242
+ */
243
+ export function cardPadding(block, inline, wide, containerName) {
244
+ let wideVars = raw({ [PADDING_BLOCK]: wide, [PADDING_INLINE]: wide });
245
+ return combine([
246
+ raw({
247
+ [PADDING_BLOCK]: block,
248
+ [PADDING_INLINE]: inline,
249
+ paddingBlock: `var(${PADDING_BLOCK})`,
250
+ paddingInline: `var(${PADDING_INLINE})`,
251
+ }),
252
+ containerName ? at("lg", containerName, wideVars) : at("lg", wideVars),
253
+ ]);
254
+ }
255
+ /**
256
+ * Draws a cell's top media edge to edge, fading its lower half into the cell
257
+ * fill, and drops it below the `md` container where a phone has no room for
258
+ * the illustration.
259
+ *
260
+ * @returns One mixin for the media wrapper, placed first in the cell.
261
+ */
262
+ export function cardMedia() {
263
+ return combine([
264
+ raw({
265
+ display: "none",
266
+ marginBlockStart: `calc(-1 * var(${PADDING_BLOCK}, 0px))`,
267
+ marginInline: `calc(-1 * var(${PADDING_INLINE}, 0px))`,
268
+ overflow: "hidden",
269
+ maskImage: "linear-gradient(to bottom, black 50%, transparent)",
270
+ }),
271
+ when("& > :is(img, svg, video, picture)", raw({ display: "block", inlineSize: "100%", blockSize: "auto" })),
272
+ at("md", raw({ display: "block" })),
273
+ ]);
274
+ }
275
+ /**
276
+ * Centers a glyph in a square tile so claim icons share one size language.
277
+ * `quiet` frames it with a hairline ring in the heading ink; `brand` paints
278
+ * the tinted, bordered badge.
279
+ *
280
+ * @param tone Tile chrome.
281
+ * @param side Side length on the spacing scale.
282
+ * @returns One mixin for the tile.
283
+ */
284
+ export function iconTile(tone, side) {
285
+ return combine([
286
+ inlineFlex(),
287
+ center(),
288
+ is(side),
289
+ bs(side),
290
+ rounded("lg"),
291
+ tone === "brand"
292
+ ? [bg("brand.tint"), fg("brand"), border({ color: "brand", width: 1, style: "solid" })]
293
+ : [fg("neutral.emphasis"), raw({ boxShadow: `inset 0 0 0 1px ${HAIRLINE}` })],
294
+ ]);
295
+ }