@senvenli/react 0.0.0-stage → 0.2.0

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 (636) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -2
  3. package/dist/action/button-group.d.ts +26 -0
  4. package/dist/action/button-group.js +12 -0
  5. package/dist/action/button-group.js.map +1 -0
  6. package/dist/action/button.d.ts +42 -0
  7. package/dist/action/button.js +58 -0
  8. package/dist/action/button.js.map +1 -0
  9. package/dist/action/close-button.d.ts +12 -0
  10. package/dist/action/close-button.js +13 -0
  11. package/dist/action/close-button.js.map +1 -0
  12. package/dist/action/copy-button.d.ts +21 -0
  13. package/dist/action/copy-button.js +38 -0
  14. package/dist/action/copy-button.js.map +1 -0
  15. package/dist/action/fab.d.ts +29 -0
  16. package/dist/action/fab.js +57 -0
  17. package/dist/action/fab.js.map +1 -0
  18. package/dist/action/files.d.ts +70 -0
  19. package/dist/action/files.js +156 -0
  20. package/dist/action/files.js.map +1 -0
  21. package/dist/action/index.d.ts +23 -0
  22. package/dist/action/index.js +16 -0
  23. package/dist/action/index.js.map +1 -0
  24. package/dist/action/language-names.d.ts +19 -0
  25. package/dist/action/language-names.js +79 -0
  26. package/dist/action/language-names.js.map +1 -0
  27. package/dist/action/language-switcher.d.ts +57 -0
  28. package/dist/action/language-switcher.js +53 -0
  29. package/dist/action/language-switcher.js.map +1 -0
  30. package/dist/action/link-button.d.ts +57 -0
  31. package/dist/action/link-button.js +48 -0
  32. package/dist/action/link-button.js.map +1 -0
  33. package/dist/action/link.d.ts +24 -0
  34. package/dist/action/link.js +18 -0
  35. package/dist/action/link.js.map +1 -0
  36. package/dist/action/pressable.d.ts +40 -0
  37. package/dist/action/pressable.js +65 -0
  38. package/dist/action/pressable.js.map +1 -0
  39. package/dist/action/styles.d.ts +60 -0
  40. package/dist/action/styles.js +109 -0
  41. package/dist/action/styles.js.map +1 -0
  42. package/dist/action/theme-script.d.ts +12 -0
  43. package/dist/action/theme-script.js +23 -0
  44. package/dist/action/theme-script.js.map +1 -0
  45. package/dist/action/theme-switcher.d.ts +43 -0
  46. package/dist/action/theme-switcher.js +260 -0
  47. package/dist/action/theme-switcher.js.map +1 -0
  48. package/dist/action/theme-toggle.d.ts +43 -0
  49. package/dist/action/theme-toggle.js +259 -0
  50. package/dist/action/theme-toggle.js.map +1 -0
  51. package/dist/action/toggle.d.ts +44 -0
  52. package/dist/action/toggle.js +28 -0
  53. package/dist/action/toggle.js.map +1 -0
  54. package/dist/action/touch-target.d.ts +9 -0
  55. package/dist/action/touch-target.js +14 -0
  56. package/dist/action/touch-target.js.map +1 -0
  57. package/dist/charts/axis-width.d.ts +186 -0
  58. package/dist/charts/axis-width.js +1262 -0
  59. package/dist/charts/axis-width.js.map +1 -0
  60. package/dist/charts/bar-public.d.ts +16 -0
  61. package/dist/charts/bar-public.js +16 -0
  62. package/dist/charts/bar-public.js.map +1 -0
  63. package/dist/charts/chart-parts.d.ts +136 -0
  64. package/dist/charts/chart-parts.js +160 -0
  65. package/dist/charts/chart-parts.js.map +1 -0
  66. package/dist/charts/core-charts.d.ts +157 -0
  67. package/dist/charts/core-charts.js +505 -0
  68. package/dist/charts/core-charts.js.map +1 -0
  69. package/dist/charts/index.d.ts +12 -0
  70. package/dist/charts/index.js +8 -0
  71. package/dist/charts/index.js.map +1 -0
  72. package/dist/charts/list-charts.d.ts +124 -0
  73. package/dist/charts/list-charts.js +308 -0
  74. package/dist/charts/list-charts.js.map +1 -0
  75. package/dist/charts/more-charts.d.ts +138 -0
  76. package/dist/charts/more-charts.js +284 -0
  77. package/dist/charts/more-charts.js.map +1 -0
  78. package/dist/charts/report-charts.d.ts +138 -0
  79. package/dist/charts/report-charts.js +370 -0
  80. package/dist/charts/report-charts.js.map +1 -0
  81. package/dist/charts/value-tick.d.ts +178 -0
  82. package/dist/charts/value-tick.js +240 -0
  83. package/dist/charts/value-tick.js.map +1 -0
  84. package/dist/collection/data-table-url-hook.d.ts +34 -0
  85. package/dist/collection/data-table-url-hook.js +70 -0
  86. package/dist/collection/data-table-url-hook.js.map +1 -0
  87. package/dist/collection/data-table-url.d.ts +30 -0
  88. package/dist/collection/data-table-url.js +48 -0
  89. package/dist/collection/data-table-url.js.map +1 -0
  90. package/dist/collection/data-table.d.ts +112 -0
  91. package/dist/collection/data-table.js +188 -0
  92. package/dist/collection/data-table.js.map +1 -0
  93. package/dist/collection/grid-list-public.d.ts +18 -0
  94. package/dist/collection/grid-list-public.js +19 -0
  95. package/dist/collection/grid-list-public.js.map +1 -0
  96. package/dist/collection/grid-list.d.ts +73 -0
  97. package/dist/collection/grid-list.js +46 -0
  98. package/dist/collection/grid-list.js.map +1 -0
  99. package/dist/collection/index.d.ts +14 -0
  100. package/dist/collection/index.js +8 -0
  101. package/dist/collection/index.js.map +1 -0
  102. package/dist/collection/list.d.ts +61 -0
  103. package/dist/collection/list.js +38 -0
  104. package/dist/collection/list.js.map +1 -0
  105. package/dist/collection/selection-checkbox.d.ts +5 -0
  106. package/dist/collection/selection-checkbox.js +13 -0
  107. package/dist/collection/selection-checkbox.js.map +1 -0
  108. package/dist/collection/table.d.ts +91 -0
  109. package/dist/collection/table.js +183 -0
  110. package/dist/collection/table.js.map +1 -0
  111. package/dist/collection/tree.d.ts +31 -0
  112. package/dist/collection/tree.js +22 -0
  113. package/dist/collection/tree.js.map +1 -0
  114. package/dist/color/color.d.ts +87 -0
  115. package/dist/color/color.js +200 -0
  116. package/dist/color/color.js.map +1 -0
  117. package/dist/color/contrast.d.ts +34 -0
  118. package/dist/color/contrast.js +44 -0
  119. package/dist/color/contrast.js.map +1 -0
  120. package/dist/color/index.d.ts +4 -0
  121. package/dist/color/index.js +5 -0
  122. package/dist/color/index.js.map +1 -0
  123. package/dist/date/calendar.d.ts +71 -0
  124. package/dist/date/calendar.js +291 -0
  125. package/dist/date/calendar.js.map +1 -0
  126. package/dist/date/fields.d.ts +174 -0
  127. package/dist/date/fields.js +250 -0
  128. package/dist/date/fields.js.map +1 -0
  129. package/dist/date/index.d.ts +7 -0
  130. package/dist/date/index.js +6 -0
  131. package/dist/date/index.js.map +1 -0
  132. package/dist/date/month-grid.d.ts +31 -0
  133. package/dist/date/month-grid.js +115 -0
  134. package/dist/date/month-grid.js.map +1 -0
  135. package/dist/date/pickers.d.ts +118 -0
  136. package/dist/date/pickers.js +176 -0
  137. package/dist/date/pickers.js.map +1 -0
  138. package/dist/date/public.d.ts +25 -0
  139. package/dist/date/public.js +24 -0
  140. package/dist/date/public.js.map +1 -0
  141. package/dist/date/segments.d.ts +153 -0
  142. package/dist/date/segments.js +433 -0
  143. package/dist/date/segments.js.map +1 -0
  144. package/dist/defaults.d.ts +74 -0
  145. package/dist/defaults.js +100 -0
  146. package/dist/defaults.js.map +1 -0
  147. package/dist/density.d.ts +2 -0
  148. package/dist/density.js +2 -0
  149. package/dist/density.js.map +1 -0
  150. package/dist/display/avatar.d.ts +29 -0
  151. package/dist/display/avatar.js +71 -0
  152. package/dist/display/avatar.js.map +1 -0
  153. package/dist/display/badge.d.ts +65 -0
  154. package/dist/display/badge.js +99 -0
  155. package/dist/display/badge.js.map +1 -0
  156. package/dist/display/card.d.ts +72 -0
  157. package/dist/display/card.js +91 -0
  158. package/dist/display/card.js.map +1 -0
  159. package/dist/display/carousel.d.ts +47 -0
  160. package/dist/display/carousel.js +214 -0
  161. package/dist/display/carousel.js.map +1 -0
  162. package/dist/display/description-list.d.ts +25 -0
  163. package/dist/display/description-list.js +36 -0
  164. package/dist/display/description-list.js.map +1 -0
  165. package/dist/display/icon-aliases.d.ts +1 -0
  166. package/dist/display/icon-aliases.js +259 -0
  167. package/dist/display/icon-aliases.js.map +1 -0
  168. package/dist/display/icon-names.d.ts +4 -0
  169. package/dist/display/icon-names.js +2 -0
  170. package/dist/display/icon-names.js.map +1 -0
  171. package/dist/display/icon.d.ts +51 -0
  172. package/dist/display/icon.js +96 -0
  173. package/dist/display/icon.js.map +1 -0
  174. package/dist/display/image-crop.d.ts +106 -0
  175. package/dist/display/image-crop.js +117 -0
  176. package/dist/display/image-crop.js.map +1 -0
  177. package/dist/display/image-cropper.d.ts +68 -0
  178. package/dist/display/image-cropper.js +284 -0
  179. package/dist/display/image-cropper.js.map +1 -0
  180. package/dist/display/image-viewer.d.ts +54 -0
  181. package/dist/display/image-viewer.js +84 -0
  182. package/dist/display/image-viewer.js.map +1 -0
  183. package/dist/display/image.d.ts +26 -0
  184. package/dist/display/image.js +17 -0
  185. package/dist/display/image.js.map +1 -0
  186. package/dist/display/index.d.ts +29 -0
  187. package/dist/display/index.js +16 -0
  188. package/dist/display/index.js.map +1 -0
  189. package/dist/display/iso-chip.d.ts +19 -0
  190. package/dist/display/iso-chip.js +21 -0
  191. package/dist/display/iso-chip.js.map +1 -0
  192. package/dist/display/kbd.d.ts +11 -0
  193. package/dist/display/kbd.js +33 -0
  194. package/dist/display/kbd.js.map +1 -0
  195. package/dist/display/lozenge.d.ts +30 -0
  196. package/dist/display/lozenge.js +55 -0
  197. package/dist/display/lozenge.js.map +1 -0
  198. package/dist/display/scroll-area.d.ts +29 -0
  199. package/dist/display/scroll-area.js +95 -0
  200. package/dist/display/scroll-area.js.map +1 -0
  201. package/dist/display/separator.d.ts +13 -0
  202. package/dist/display/separator.js +24 -0
  203. package/dist/display/separator.js.map +1 -0
  204. package/dist/display/stat.d.ts +35 -0
  205. package/dist/display/stat.js +41 -0
  206. package/dist/display/stat.js.map +1 -0
  207. package/dist/display/timeline.d.ts +44 -0
  208. package/dist/display/timeline.js +111 -0
  209. package/dist/display/timeline.js.map +1 -0
  210. package/dist/display/typography.d.ts +37 -0
  211. package/dist/display/typography.js +53 -0
  212. package/dist/display/typography.js.map +1 -0
  213. package/dist/display/visually-hidden.d.ts +14 -0
  214. package/dist/display/visually-hidden.js +10 -0
  215. package/dist/display/visually-hidden.js.map +1 -0
  216. package/dist/feedback/banner.d.ts +46 -0
  217. package/dist/feedback/banner.js +157 -0
  218. package/dist/feedback/banner.js.map +1 -0
  219. package/dist/feedback/cooldown.d.ts +17 -0
  220. package/dist/feedback/cooldown.js +59 -0
  221. package/dist/feedback/cooldown.js.map +1 -0
  222. package/dist/feedback/empty-state.d.ts +35 -0
  223. package/dist/feedback/empty-state.js +39 -0
  224. package/dist/feedback/empty-state.js.map +1 -0
  225. package/dist/feedback/index.d.ts +12 -0
  226. package/dist/feedback/index.js +11 -0
  227. package/dist/feedback/index.js.map +1 -0
  228. package/dist/feedback/meter.d.ts +33 -0
  229. package/dist/feedback/meter.js +42 -0
  230. package/dist/feedback/meter.js.map +1 -0
  231. package/dist/feedback/motion.d.ts +9 -0
  232. package/dist/feedback/motion.js +57 -0
  233. package/dist/feedback/motion.js.map +1 -0
  234. package/dist/feedback/progress.d.ts +39 -0
  235. package/dist/feedback/progress.js +68 -0
  236. package/dist/feedback/progress.js.map +1 -0
  237. package/dist/feedback/skeleton.d.ts +48 -0
  238. package/dist/feedback/skeleton.js +61 -0
  239. package/dist/feedback/skeleton.js.map +1 -0
  240. package/dist/feedback/spinner.d.ts +19 -0
  241. package/dist/feedback/spinner.js +29 -0
  242. package/dist/feedback/spinner.js.map +1 -0
  243. package/dist/feedback/status-dot.d.ts +23 -0
  244. package/dist/feedback/status-dot.js +37 -0
  245. package/dist/feedback/status-dot.js.map +1 -0
  246. package/dist/form/countries.d.ts +34 -0
  247. package/dist/form/countries.js +273 -0
  248. package/dist/form/countries.js.map +1 -0
  249. package/dist/form/data-attributes.d.ts +11 -0
  250. package/dist/form/data-attributes.js +22 -0
  251. package/dist/form/data-attributes.js.map +1 -0
  252. package/dist/form/field-parts.d.ts +113 -0
  253. package/dist/form/field-parts.js +178 -0
  254. package/dist/form/field-parts.js.map +1 -0
  255. package/dist/form/field.d.ts +36 -0
  256. package/dist/form/field.js +65 -0
  257. package/dist/form/field.js.map +1 -0
  258. package/dist/form/files.d.ts +70 -0
  259. package/dist/form/files.js +156 -0
  260. package/dist/form/files.js.map +1 -0
  261. package/dist/form/form.d.ts +40 -0
  262. package/dist/form/form.js +74 -0
  263. package/dist/form/form.js.map +1 -0
  264. package/dist/form/image-crop.d.ts +106 -0
  265. package/dist/form/image-crop.js +117 -0
  266. package/dist/form/image-crop.js.map +1 -0
  267. package/dist/form/image-cropper.d.ts +68 -0
  268. package/dist/form/image-cropper.js +284 -0
  269. package/dist/form/image-cropper.js.map +1 -0
  270. package/dist/form/index.d.ts +24 -0
  271. package/dist/form/index.js +15 -0
  272. package/dist/form/index.js.map +1 -0
  273. package/dist/form/input-group.d.ts +63 -0
  274. package/dist/form/input-group.js +63 -0
  275. package/dist/form/input-group.js.map +1 -0
  276. package/dist/form/input-otp.d.ts +35 -0
  277. package/dist/form/input-otp.js +83 -0
  278. package/dist/form/input-otp.js.map +1 -0
  279. package/dist/form/input.d.ts +36 -0
  280. package/dist/form/input.js +41 -0
  281. package/dist/form/input.js.map +1 -0
  282. package/dist/form/number-field.d.ts +84 -0
  283. package/dist/form/number-field.js +81 -0
  284. package/dist/form/number-field.js.map +1 -0
  285. package/dist/form/otp-field.d.ts +37 -0
  286. package/dist/form/otp-field.js +116 -0
  287. package/dist/form/otp-field.js.map +1 -0
  288. package/dist/form/password-field.d.ts +61 -0
  289. package/dist/form/password-field.js +61 -0
  290. package/dist/form/password-field.js.map +1 -0
  291. package/dist/form/phone-field.d.ts +104 -0
  292. package/dist/form/phone-field.js +275 -0
  293. package/dist/form/phone-field.js.map +1 -0
  294. package/dist/form/phone-paste.d.ts +24 -0
  295. package/dist/form/phone-paste.js +40 -0
  296. package/dist/form/phone-paste.js.map +1 -0
  297. package/dist/form/phone.d.ts +159 -0
  298. package/dist/form/phone.js +309 -0
  299. package/dist/form/phone.js.map +1 -0
  300. package/dist/form/search-field.d.ts +29 -0
  301. package/dist/form/search-field.js +23 -0
  302. package/dist/form/search-field.js.map +1 -0
  303. package/dist/form/styles.d.ts +31 -0
  304. package/dist/form/styles.js +43 -0
  305. package/dist/form/styles.js.map +1 -0
  306. package/dist/form/text-area.d.ts +70 -0
  307. package/dist/form/text-area.js +93 -0
  308. package/dist/form/text-area.js.map +1 -0
  309. package/dist/form/text-field.d.ts +131 -0
  310. package/dist/form/text-field.js +59 -0
  311. package/dist/form/text-field.js.map +1 -0
  312. package/dist/form/validation.d.ts +145 -0
  313. package/dist/form/validation.js +136 -0
  314. package/dist/form/validation.js.map +1 -0
  315. package/dist/i18n.d.ts +438 -0
  316. package/dist/i18n.js +948 -0
  317. package/dist/i18n.js.map +1 -0
  318. package/dist/index.d.ts +9 -0
  319. package/dist/index.js +7 -0
  320. package/dist/index.js.map +1 -0
  321. package/dist/intl-locale.d.ts +30 -0
  322. package/dist/intl-locale.js +83 -0
  323. package/dist/intl-locale.js.map +1 -0
  324. package/dist/layers.d.ts +32 -0
  325. package/dist/layers.js +33 -0
  326. package/dist/layers.js.map +1 -0
  327. package/dist/layout/auth-form-layout.d.ts +71 -0
  328. package/dist/layout/auth-form-layout.js +61 -0
  329. package/dist/layout/auth-form-layout.js.map +1 -0
  330. package/dist/layout/auth-layout.d.ts +59 -0
  331. package/dist/layout/auth-layout.js +26 -0
  332. package/dist/layout/auth-layout.js.map +1 -0
  333. package/dist/layout/box.d.ts +26 -0
  334. package/dist/layout/box.js +16 -0
  335. package/dist/layout/box.js.map +1 -0
  336. package/dist/layout/grid.d.ts +27 -0
  337. package/dist/layout/grid.js +26 -0
  338. package/dist/layout/grid.js.map +1 -0
  339. package/dist/layout/index.d.ts +16 -0
  340. package/dist/layout/index.js +12 -0
  341. package/dist/layout/index.js.map +1 -0
  342. package/dist/layout/pressable.d.ts +40 -0
  343. package/dist/layout/pressable.js +65 -0
  344. package/dist/layout/pressable.js.map +1 -0
  345. package/dist/layout/reset-sent-card.d.ts +39 -0
  346. package/dist/layout/reset-sent-card.js +22 -0
  347. package/dist/layout/reset-sent-card.js.map +1 -0
  348. package/dist/layout/scroll-area.d.ts +29 -0
  349. package/dist/layout/scroll-area.js +95 -0
  350. package/dist/layout/scroll-area.js.map +1 -0
  351. package/dist/layout/section.d.ts +41 -0
  352. package/dist/layout/section.js +22 -0
  353. package/dist/layout/section.js.map +1 -0
  354. package/dist/layout/split.d.ts +50 -0
  355. package/dist/layout/split.js +35 -0
  356. package/dist/layout/split.js.map +1 -0
  357. package/dist/layout/stack.d.ts +44 -0
  358. package/dist/layout/stack.js +36 -0
  359. package/dist/layout/stack.js.map +1 -0
  360. package/dist/layout/tokens.d.ts +33 -0
  361. package/dist/layout/tokens.js +85 -0
  362. package/dist/layout/tokens.js.map +1 -0
  363. package/dist/layout/toolbar.d.ts +37 -0
  364. package/dist/layout/toolbar.js +334 -0
  365. package/dist/layout/toolbar.js.map +1 -0
  366. package/dist/navigate-context.d.ts +12 -0
  367. package/dist/navigate-context.js +13 -0
  368. package/dist/navigate-context.js.map +1 -0
  369. package/dist/navigation/accordion.d.ts +40 -0
  370. package/dist/navigation/accordion.js +33 -0
  371. package/dist/navigation/accordion.js.map +1 -0
  372. package/dist/navigation/bottom-nav.d.ts +29 -0
  373. package/dist/navigation/bottom-nav.js +48 -0
  374. package/dist/navigation/bottom-nav.js.map +1 -0
  375. package/dist/navigation/brand-link-context.d.ts +8 -0
  376. package/dist/navigation/brand-link-context.js +9 -0
  377. package/dist/navigation/brand-link-context.js.map +1 -0
  378. package/dist/navigation/breadcrumbs.d.ts +36 -0
  379. package/dist/navigation/breadcrumbs.js +51 -0
  380. package/dist/navigation/breadcrumbs.js.map +1 -0
  381. package/dist/navigation/dock.d.ts +27 -0
  382. package/dist/navigation/dock.js +47 -0
  383. package/dist/navigation/dock.js.map +1 -0
  384. package/dist/navigation/footer.d.ts +43 -0
  385. package/dist/navigation/footer.js +43 -0
  386. package/dist/navigation/footer.js.map +1 -0
  387. package/dist/navigation/index.d.ts +22 -0
  388. package/dist/navigation/index.js +17 -0
  389. package/dist/navigation/index.js.map +1 -0
  390. package/dist/navigation/language-names.d.ts +19 -0
  391. package/dist/navigation/language-names.js +79 -0
  392. package/dist/navigation/language-names.js.map +1 -0
  393. package/dist/navigation/language-switcher.d.ts +55 -0
  394. package/dist/navigation/language-switcher.js +53 -0
  395. package/dist/navigation/language-switcher.js.map +1 -0
  396. package/dist/navigation/nav-panel.d.ts +18 -0
  397. package/dist/navigation/nav-panel.js +51 -0
  398. package/dist/navigation/nav-panel.js.map +1 -0
  399. package/dist/navigation/navbar.d.ts +73 -0
  400. package/dist/navigation/navbar.js +64 -0
  401. package/dist/navigation/navbar.js.map +1 -0
  402. package/dist/navigation/page-header.d.ts +37 -0
  403. package/dist/navigation/page-header.js +50 -0
  404. package/dist/navigation/page-header.js.map +1 -0
  405. package/dist/navigation/pagination.d.ts +25 -0
  406. package/dist/navigation/pagination.js +51 -0
  407. package/dist/navigation/pagination.js.map +1 -0
  408. package/dist/navigation/panel-header.d.ts +37 -0
  409. package/dist/navigation/panel-header.js +50 -0
  410. package/dist/navigation/panel-header.js.map +1 -0
  411. package/dist/navigation/sidebar-script.d.ts +12 -0
  412. package/dist/navigation/sidebar-script.js +20 -0
  413. package/dist/navigation/sidebar-script.js.map +1 -0
  414. package/dist/navigation/sidebar.d.ts +149 -0
  415. package/dist/navigation/sidebar.js +332 -0
  416. package/dist/navigation/sidebar.js.map +1 -0
  417. package/dist/navigation/skip-link.d.ts +12 -0
  418. package/dist/navigation/skip-link.js +30 -0
  419. package/dist/navigation/skip-link.js.map +1 -0
  420. package/dist/navigation/stepper.d.ts +50 -0
  421. package/dist/navigation/stepper.js +96 -0
  422. package/dist/navigation/stepper.js.map +1 -0
  423. package/dist/navigation/tabs.d.ts +84 -0
  424. package/dist/navigation/tabs.js +118 -0
  425. package/dist/navigation/tabs.js.map +1 -0
  426. package/dist/navigation/toolbar.d.ts +37 -0
  427. package/dist/navigation/toolbar.js +334 -0
  428. package/dist/navigation/toolbar.js.map +1 -0
  429. package/dist/overlay/alert-dialog.d.ts +63 -0
  430. package/dist/overlay/alert-dialog.js +76 -0
  431. package/dist/overlay/alert-dialog.js.map +1 -0
  432. package/dist/overlay/command-palette.d.ts +53 -0
  433. package/dist/overlay/command-palette.js +130 -0
  434. package/dist/overlay/command-palette.js.map +1 -0
  435. package/dist/overlay/command.d.ts +53 -0
  436. package/dist/overlay/command.js +129 -0
  437. package/dist/overlay/command.js.map +1 -0
  438. package/dist/overlay/context-menu.d.ts +29 -0
  439. package/dist/overlay/context-menu.js +58 -0
  440. package/dist/overlay/context-menu.js.map +1 -0
  441. package/dist/overlay/dialog.d.ts +162 -0
  442. package/dist/overlay/dialog.js +174 -0
  443. package/dist/overlay/dialog.js.map +1 -0
  444. package/dist/overlay/drawer.d.ts +41 -0
  445. package/dist/overlay/drawer.js +114 -0
  446. package/dist/overlay/drawer.js.map +1 -0
  447. package/dist/overlay/floating.d.ts +142 -0
  448. package/dist/overlay/floating.js +226 -0
  449. package/dist/overlay/floating.js.map +1 -0
  450. package/dist/overlay/hover-card.d.ts +19 -0
  451. package/dist/overlay/hover-card.js +31 -0
  452. package/dist/overlay/hover-card.js.map +1 -0
  453. package/dist/overlay/index.d.ts +18 -0
  454. package/dist/overlay/index.js +12 -0
  455. package/dist/overlay/index.js.map +1 -0
  456. package/dist/overlay/overlay-base.d.ts +105 -0
  457. package/dist/overlay/overlay-base.js +250 -0
  458. package/dist/overlay/overlay-base.js.map +1 -0
  459. package/dist/overlay/overlay.d.ts +299 -0
  460. package/dist/overlay/overlay.js +558 -0
  461. package/dist/overlay/overlay.js.map +1 -0
  462. package/dist/overlay/toast.d.ts +58 -0
  463. package/dist/overlay/toast.js +145 -0
  464. package/dist/overlay/toast.js.map +1 -0
  465. package/dist/provider.d.ts +26 -0
  466. package/dist/provider.js +30 -0
  467. package/dist/provider.js.map +1 -0
  468. package/dist/selection/autocomplete.d.ts +54 -0
  469. package/dist/selection/autocomplete.js +122 -0
  470. package/dist/selection/autocomplete.js.map +1 -0
  471. package/dist/selection/checkbox.d.ts +56 -0
  472. package/dist/selection/checkbox.js +49 -0
  473. package/dist/selection/checkbox.js.map +1 -0
  474. package/dist/selection/choice-size.d.ts +26 -0
  475. package/dist/selection/choice-size.js +50 -0
  476. package/dist/selection/choice-size.js.map +1 -0
  477. package/dist/selection/choice-text.d.ts +21 -0
  478. package/dist/selection/choice-text.js +33 -0
  479. package/dist/selection/choice-text.js.map +1 -0
  480. package/dist/selection/combobox.d.ts +173 -0
  481. package/dist/selection/combobox.js +410 -0
  482. package/dist/selection/combobox.js.map +1 -0
  483. package/dist/selection/index.d.ts +20 -0
  484. package/dist/selection/index.js +13 -0
  485. package/dist/selection/index.js.map +1 -0
  486. package/dist/selection/list-box.d.ts +30 -0
  487. package/dist/selection/list-box.js +16 -0
  488. package/dist/selection/list-box.js.map +1 -0
  489. package/dist/selection/listbox.d.ts +44 -0
  490. package/dist/selection/listbox.js +49 -0
  491. package/dist/selection/listbox.js.map +1 -0
  492. package/dist/selection/match.d.ts +20 -0
  493. package/dist/selection/match.js +57 -0
  494. package/dist/selection/match.js.map +1 -0
  495. package/dist/selection/multi-select.d.ts +72 -0
  496. package/dist/selection/multi-select.js +138 -0
  497. package/dist/selection/multi-select.js.map +1 -0
  498. package/dist/selection/radio-card.d.ts +31 -0
  499. package/dist/selection/radio-card.js +29 -0
  500. package/dist/selection/radio-card.js.map +1 -0
  501. package/dist/selection/radio.d.ts +72 -0
  502. package/dist/selection/radio.js +64 -0
  503. package/dist/selection/radio.js.map +1 -0
  504. package/dist/selection/select-public.d.ts +19 -0
  505. package/dist/selection/select-public.js +24 -0
  506. package/dist/selection/select-public.js.map +1 -0
  507. package/dist/selection/select.d.ts +72 -0
  508. package/dist/selection/select.js +69 -0
  509. package/dist/selection/select.js.map +1 -0
  510. package/dist/selection/slider.d.ts +16 -0
  511. package/dist/selection/slider.js +44 -0
  512. package/dist/selection/slider.js.map +1 -0
  513. package/dist/selection/styles.d.ts +26 -0
  514. package/dist/selection/styles.js +78 -0
  515. package/dist/selection/styles.js.map +1 -0
  516. package/dist/selection/switch.d.ts +24 -0
  517. package/dist/selection/switch.js +27 -0
  518. package/dist/selection/switch.js.map +1 -0
  519. package/dist/selection/tag-group.d.ts +38 -0
  520. package/dist/selection/tag-group.js +45 -0
  521. package/dist/selection/tag-group.js.map +1 -0
  522. package/dist/tone.d.ts +6 -0
  523. package/dist/tone.js +2 -0
  524. package/dist/tone.js.map +1 -0
  525. package/dist/utils.d.ts +9 -0
  526. package/dist/utils.js +42 -0
  527. package/dist/utils.js.map +1 -0
  528. package/manifest/component.full.schema.json +391 -0
  529. package/manifest/component.schema.json +279 -0
  530. package/manifests/accordion.json +299 -0
  531. package/manifests/alert-dialog.json +261 -0
  532. package/manifests/area-chart.json +338 -0
  533. package/manifests/autocomplete.json +299 -0
  534. package/manifests/avatar.json +253 -0
  535. package/manifests/badge.json +288 -0
  536. package/manifests/banner.json +185 -0
  537. package/manifests/bar-chart.json +454 -0
  538. package/manifests/bar-list.json +262 -0
  539. package/manifests/bottom-nav.json +139 -0
  540. package/manifests/box.json +3450 -0
  541. package/manifests/breadcrumbs.json +199 -0
  542. package/manifests/button-group.json +2294 -0
  543. package/manifests/button.json +1211 -0
  544. package/manifests/calendar-heatmap.json +218 -0
  545. package/manifests/calendar.json +299 -0
  546. package/manifests/card.json +308 -0
  547. package/manifests/carousel.json +263 -0
  548. package/manifests/chart-parts.json +309 -0
  549. package/manifests/checkbox.json +998 -0
  550. package/manifests/close-button.json +1000 -0
  551. package/manifests/color-field.json +276 -0
  552. package/manifests/color-picker.json +161 -0
  553. package/manifests/color-swatch-picker.json +220 -0
  554. package/manifests/color-swatch.json +140 -0
  555. package/manifests/combobox.json +581 -0
  556. package/manifests/command.json +275 -0
  557. package/manifests/composed-chart.json +287 -0
  558. package/manifests/context-menu.json +148 -0
  559. package/manifests/copy-button.json +192 -0
  560. package/manifests/data-table.json +334 -0
  561. package/manifests/date-field.json +302 -0
  562. package/manifests/date-picker.json +472 -0
  563. package/manifests/description-list.json +201 -0
  564. package/manifests/dialog.json +322 -0
  565. package/manifests/donut-chart.json +264 -0
  566. package/manifests/drawer.json +211 -0
  567. package/manifests/empty-state.json +185 -0
  568. package/manifests/fab.json +172 -0
  569. package/manifests/field.json +209 -0
  570. package/manifests/file-upload.json +791 -0
  571. package/manifests/form.json +829 -0
  572. package/manifests/funnel-chart.json +223 -0
  573. package/manifests/gauge-chart.json +252 -0
  574. package/manifests/grid-list.json +335 -0
  575. package/manifests/grid.json +3482 -0
  576. package/manifests/heading.json +183 -0
  577. package/manifests/heatmap.json +265 -0
  578. package/manifests/hover-card.json +172 -0
  579. package/manifests/icon.json +201 -0
  580. package/manifests/image-cropper.json +295 -0
  581. package/manifests/image-viewer.json +198 -0
  582. package/manifests/image.json +193 -0
  583. package/manifests/index.json +2035 -0
  584. package/manifests/input-group.json +3571 -0
  585. package/manifests/input.json +1557 -0
  586. package/manifests/kbd.json +98 -0
  587. package/manifests/language-switcher.json +274 -0
  588. package/manifests/line-chart.json +342 -0
  589. package/manifests/link.json +867 -0
  590. package/manifests/list-box.json +213 -0
  591. package/manifests/menu.json +453 -0
  592. package/manifests/meter.json +145 -0
  593. package/manifests/navbar.json +281 -0
  594. package/manifests/otp-field.json +1029 -0
  595. package/manifests/page-header.json +164 -0
  596. package/manifests/pagination.json +181 -0
  597. package/manifests/popover.json +205 -0
  598. package/manifests/pressable.json +367 -0
  599. package/manifests/progress.json +282 -0
  600. package/manifests/radar-chart.json +229 -0
  601. package/manifests/radial-chart.json +195 -0
  602. package/manifests/radio.json +975 -0
  603. package/manifests/scatter-chart.json +277 -0
  604. package/manifests/scroll-area.json +127 -0
  605. package/manifests/section.json +169 -0
  606. package/manifests/select.json +474 -0
  607. package/manifests/separator.json +119 -0
  608. package/manifests/sidebar.json +584 -0
  609. package/manifests/skeleton.json +235 -0
  610. package/manifests/skip-link.json +89 -0
  611. package/manifests/slider.json +706 -0
  612. package/manifests/sparkline.json +208 -0
  613. package/manifests/spinner.json +105 -0
  614. package/manifests/split.json +6618 -0
  615. package/manifests/stack.json +3541 -0
  616. package/manifests/stat.json +192 -0
  617. package/manifests/stepper.json +279 -0
  618. package/manifests/switch.json +205 -0
  619. package/manifests/table.json +375 -0
  620. package/manifests/tabs.json +438 -0
  621. package/manifests/tag-group.json +264 -0
  622. package/manifests/text-area.json +1136 -0
  623. package/manifests/text.json +244 -0
  624. package/manifests/theme-switcher.json +152 -0
  625. package/manifests/time-field.json +284 -0
  626. package/manifests/timeline.json +196 -0
  627. package/manifests/toast.json +87 -0
  628. package/manifests/toggle-button.json +1489 -0
  629. package/manifests/toolbar.json +145 -0
  630. package/manifests/tooltip.json +181 -0
  631. package/manifests/tracker.json +192 -0
  632. package/manifests/tree.json +245 -0
  633. package/manifests/visually-hidden.json +114 -0
  634. package/package.json +117 -3
  635. package/styles/base.css +56 -0
  636. package/styles/theme.css +154 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-area.js","sourceRoot":"","sources":["../../src/layout/scroll-area.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAkB9B,MAAM,QAAQ,GACZ,0LAA0L,CAAC;AAE7L,yDAAyD;AACzD,SAAS,WAAW,CAAC,IAAiB;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;AAC9G,CAAC;AAID;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,GAAG,KAAK,EAAE,WAAW,GAAG,UAAU,EAAmB;IAClI,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,E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sEAAsE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,WAAW,CAAC,GAAI,EAC/L,iDAA4B,kBAAkB,eAAW,KAAK,EAAC,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,wEAAwE,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,WAAW,CAAC,GAAI,IAC5L,CACJ,EAED,iDAA4B,mBAAmB,EAAC,SAAS,EAAC,4HAA4H,GAAG,IACrL,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"../utils\";\n\nexport type ScrollAreaProps = {\n children: React.ReactNode;\n /** Names the region; screen readers announce it when focus enters. */\n \"aria-label\": string;\n /** The region's height limit (\"320px\", 320, \"60vh\"); for horizontal areas, set the width on the parent. */\n maxHeight?: number | string;\n /**\n * Fills the parent's height and scrolls inside it, for a pane in a flex column or a grid\n * row that is given its height: a conversation's messages between its header and the reply box, a list\n * beside it. The parent must give the area a definite height (`min-h-0` on a flex or grid child).\n * Leave `maxHeight` out when filling.\n */\n fill?: boolean;\n orientation?: \"vertical\" | \"horizontal\" | \"both\";\n};\n\nconst TABBABLE =\n 'a[href], button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]';\n\n/** A tabbable descendant that is not hidden or inert. */\nfunction hasTabbable(root: HTMLElement) {\n return Array.from(root.querySelectorAll(TABBABLE)).some((element) => !element.closest(\"[hidden], [inert]\"));\n}\n\ntype Edges = { start: boolean; end: boolean };\n\n/**\n * A fixed-size region with its own native scroll (never hijacked) and the\n * scrollbar contract (thin, a ds-border-bold thumb), plus an overflow\n * shadow on each edge where content continues. When it holds nothing\n * focusable it becomes a focusable region itself, so keyboard users can\n * scroll it with the arrow keys.\n *\n * Known deviation: the design's 6px thumb is drawn by the platform's thin\n * scrollbar (about 8–11px); standard CSS cannot size it further without\n * replacing native scrolling. With `orientation=\"both\"` the edge shadows\n * follow the vertical axis.\n */\nexport function ScrollArea({ children, \"aria-label\": ariaLabel, maxHeight, fill = false, orientation = \"vertical\" }: ScrollAreaProps) {\n const viewport = React.useRef<HTMLDivElement>(null);\n const [edges, setEdges] = React.useState<Edges>({ start: false, end: false });\n const [needsFocus, setNeedsFocus] = React.useState(false);\n // The thumb shows while scrolling and fades shortly after.\n const [scrolling, setScrolling] = React.useState(false);\n const scrollTimer = React.useRef<number | undefined>(undefined);\n React.useEffect(() => () => window.clearTimeout(scrollTimer.current), []);\n // Every scroll event restarts the fade-out, so a long scroll keeps the thumb steady.\n const onScrolling = () => {\n window.clearTimeout(scrollTimer.current);\n setScrolling(true);\n scrollTimer.current = window.setTimeout(() => setScrolling(false), 800);\n };\n const horizontal = orientation === \"horizontal\";\n\n const room = () => {\n const frame = viewport.current;\n return frame ? (horizontal ? frame.scrollWidth - frame.clientWidth : frame.scrollHeight - frame.clientHeight) : 0;\n };\n\n /** Which edges hide content; cheap enough for every scroll event. */\n const measureEdges = React.useCallback(() => {\n const frame = viewport.current;\n if (!frame) return;\n // Horizontal scroll positions are negative in RTL; magnitudes work for both directions.\n const position = Math.abs(horizontal ? frame.scrollLeft : frame.scrollTop);\n const space = horizontal ? frame.scrollWidth - frame.clientWidth : frame.scrollHeight - frame.clientHeight;\n const next = { start: position > 1, end: space - position > 1 };\n setEdges((current) => (current.start === next.start && current.end === next.end ? current : next));\n }, [horizontal]);\n\n /** Whether the region must take focus itself: it scrolls and holds nothing focusable. Runs on size and content changes. */\n const measureFocus = React.useCallback(() => {\n const frame = viewport.current;\n if (!frame) return;\n const next = room() > 1 && !hasTabbable(frame);\n // Never pull focus out from under the keyboard: keep the tab stop while the region itself has focus.\n setNeedsFocus((current) => (current && !next && document.activeElement === frame ? current : next));\n }, [horizontal]);\n\n React.useLayoutEffect(() => {\n measureEdges();\n measureFocus();\n const frame = viewport.current;\n if (!frame) return;\n const sized = () => {\n measureEdges();\n measureFocus();\n };\n const resize = typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(sized);\n resize?.observe(frame);\n if (frame.firstElementChild) resize?.observe(frame.firstElementChild);\n // Children that appear, disappear or change focusability without changing size.\n const mutation = typeof MutationObserver === \"undefined\" ? undefined : new MutationObserver(sized);\n mutation?.observe(frame, { childList: true, subtree: true, attributes: true, attributeFilter: [\"disabled\", \"tabindex\", \"hidden\", \"inert\", \"href\", \"contenteditable\"] });\n return () => {\n resize?.disconnect();\n mutation?.disconnect();\n };\n }, [measureEdges, measureFocus]);\n\n const shadow = \"pointer-events-none absolute z-[1] shadow-ds-overflow transition-opacity duration-(--ds-duration-instant)\";\n return (\n // Clipped: the edge-shadow casters sit just outside the box and only their inward shadow may show,\n // so the area never makes its column (or the page) scroll sideways.\n <div\n data-slot=\"scroll-area\"\n data-orientation={orientation}\n data-fill={fill || undefined}\n className={cn(\"relative min-h-0 min-w-0 overflow-clip\", fill && \"h-full\")}\n >\n <div\n ref={viewport}\n data-slot=\"scroll-area-viewport\"\n role={needsFocus ? \"region\" : undefined}\n aria-label={needsFocus ? ariaLabel : undefined}\n tabIndex={needsFocus ? 0 : undefined}\n onScroll={() => {\n measureEdges();\n onScrolling();\n }}\n onBlur={measureFocus}\n data-scrolling={scrolling || undefined}\n style={{ maxHeight }}\n className={cn(\n \"peer outline-hidden\",\n fill && \"h-full\",\n // The scrollbar: thin, a ds-border-bold thumb at 70% on no track, shown on hover, keyboard\n // focus and while scrolling. Native underneath, so wheel, touch and keyboard scroll as usual.\n \"[scrollbar-width:thin] [scrollbar-color:transparent_transparent]\",\n \"hover:[scrollbar-color:color-mix(in_oklab,var(--ds-border-bold)_70%,transparent)_transparent]\",\n \"focus-visible:[scrollbar-color:color-mix(in_oklab,var(--ds-border-bold)_70%,transparent)_transparent]\",\n \"data-[scrolling]:[scrollbar-color:color-mix(in_oklab,var(--ds-border-bold)_70%,transparent)_transparent]\",\n orientation === \"vertical\" && \"overflow-y-auto overflow-x-hidden\",\n orientation === \"horizontal\" && \"overflow-x-auto overflow-y-hidden\",\n orientation === \"both\" && \"overflow-auto\",\n )}\n >\n <div data-slot=\"scroll-area-content\">{children}</div>\n </div>\n {/* Edge shadows where content continues, clipped to fall inward only. */}\n {horizontal ? (\n <>\n <span aria-hidden data-slot=\"scroll-area-edge\" data-edge=\"start\" className={cn(shadow, \"inset-y-0 start-0 w-3 [clip-path:inset(0_-12px_0_0)] rtl:[clip-path:inset(0_0_0_-12px)] -translate-x-full rtl:translate-x-full\", !edges.start && \"opacity-0\")} />\n <span aria-hidden data-slot=\"scroll-area-edge\" data-edge=\"end\" className={cn(shadow, \"inset-y-0 end-0 w-3 [clip-path:inset(0_0_0_-12px)] rtl:[clip-path:inset(0_-12px_0_0)] translate-x-full rtl:-translate-x-full\", !edges.end && \"opacity-0\")} />\n </>\n ) : (\n <>\n <span aria-hidden data-slot=\"scroll-area-edge\" data-edge=\"start\" className={cn(shadow, \"inset-x-0 top-0 h-3 -translate-y-full [clip-path:inset(0_0_-12px_0)]\", !edges.start && \"opacity-0\")} />\n <span aria-hidden data-slot=\"scroll-area-edge\" data-edge=\"end\" className={cn(shadow, \"inset-x-0 bottom-0 h-3 translate-y-full [clip-path:inset(-12px_0_0_0)]\", !edges.end && \"opacity-0\")} />\n </>\n )}\n {/* The keyboard focus border sits above the content, which would cover an inset ring on the viewport. */}\n <span aria-hidden data-slot=\"scroll-area-focus\" className=\"pointer-events-none absolute inset-0 z-[2] peer-focus-visible:inset-ring-2 peer-focus-visible:inset-ring-ds-border-focused\" />\n </div>\n );\n}\n"]}
@@ -0,0 +1,41 @@
1
+ import type { Density } from "../density.js";
2
+ import * as React from "react";
3
+ export type SectionProps = {
4
+ children: React.ReactNode;
5
+ /** `default` on ds-surface; `sunken` for an alternate or CTA band. Never two sunken bands in a row. */
6
+ tone?: "default" | "sunken";
7
+ /** Vertical padding: ds-space-1000 from 768px and ds-space-600 below; `compact` keeps ds-space-600 throughout. */
8
+ density?: Density;
9
+ /** Anchor target for the Navbar; scrolling to it leaves room for the 56px sticky Navbar. */
10
+ id?: string;
11
+ /** The id of the heading that names the band (a landmark needs a name to be listed). */
12
+ "aria-labelledby"?: string;
13
+ /**
14
+ * Skip painting until the band is near the viewport (`content-visibility: auto` with a 720px
15
+ * intrinsic size): the content stays in the server HTML (find-in-page and anchors still work),
16
+ * nothing animates, and the reserved size keeps the layout from shifting.
17
+ *
18
+ * It also contains the band (layout, paint and style containment): overflowing children are
19
+ * clipped at its edge, and fixed or floating children position against it instead of the
20
+ * viewport. So a progressive band holds no fixed, floating or bleeding content (portal overlays
21
+ * and floating banners to <body>), and the first, above-the-fold band is never progressive. The
22
+ * 720px is a desktop-tuned estimate; once painted, the browser remembers the real height.
23
+ */
24
+ isProgressive?: boolean;
25
+ };
26
+ /**
27
+ * A full-width band of a marketing or content page: a background and vertical rhythm around
28
+ * a Container. Spacing is padding and gap from ds-space tokens, never
29
+ * margins between sibling sections; logical properties only.
30
+ */
31
+ export declare function Section({ children, tone, density, id, "aria-labelledby": labelledBy, isProgressive: progressive }: SectionProps): React.JSX.Element;
32
+ export type ContainerProps = {
33
+ children: React.ReactNode;
34
+ /** 1200px (default) or 800px (`narrow`) at most, centred. */
35
+ width?: "default" | "narrow";
36
+ };
37
+ /**
38
+ * The centred, width-capped column inside a Section; children stacked with a ds-space-400 gap. The
39
+ * cap is the outer width (border-box, gutters included), as in the design.
40
+ */
41
+ export declare function Container({ children, width }: ContainerProps): React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../utils.js";
5
+ /**
6
+ * A full-width band of a marketing or content page: a background and vertical rhythm around
7
+ * a Container. Spacing is padding and gap from ds-space tokens, never
8
+ * margins between sibling sections; logical properties only.
9
+ */
10
+ export function Section({ children, tone = "default", density = "comfortable", id, "aria-labelledby": labelledBy, isProgressive: progressive }) {
11
+ return (_jsx("section", { id: id, "aria-labelledby": labelledBy, "data-slot": "section", "data-tone": tone, "data-density": density, "data-progressive": progressive || undefined, className: cn("w-full text-ds-text", tone === "sunken" ? "bg-ds-surface-sunken" : "bg-ds-surface", density === "compact" ? "py-ds-600" : "py-ds-600 min-[768px]:py-ds-1000",
12
+ // The sticky Navbar is 56px tall: ds-space-600 + ds-space-100.
13
+ "scroll-mt-[calc(var(--ds-space-600)+var(--ds-space-100))]", progressive && "[content-visibility:auto] [contain-intrinsic-size:auto_720px]"), children: children }));
14
+ }
15
+ /**
16
+ * The centred, width-capped column inside a Section; children stacked with a ds-space-400 gap. The
17
+ * cap is the outer width (border-box, gutters included), as in the design.
18
+ */
19
+ export function Container({ children, width = "default" }) {
20
+ return (_jsx("div", { "data-slot": "container", "data-width": width, className: cn("mx-auto flex w-full flex-col gap-ds-400 px-ds-200 min-[768px]:px-ds-300", width === "narrow" ? "max-w-[800px]" : "max-w-[1200px]"), children: children }));
21
+ }
22
+ //# sourceMappingURL=section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/layout/section.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AA0B9B;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,GAAG,SAAS,EAAE,OAAO,GAAG,aAAa,EAAE,EAAE,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAgB;IAC1J,OAAO,CACL,kBACE,EAAE,EAAE,EAAE,qBACW,UAAU,eACjB,SAAS,eACR,IAAI,kBACD,OAAO,sBACH,WAAW,IAAI,SAAS,EAC1C,SAAS,EAAE,EAAE,CACX,qBAAqB,EACrB,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,EAC5D,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,kCAAkC;QACxE,+DAA+D;QAC/D,2DAA2D,EAC3D,WAAW,IAAI,+DAA+D,CAC/E,YAEA,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAQD;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAkB;IACvE,OAAO,CACL,2BACY,WAAW,gBACT,KAAK,EACjB,SAAS,EAAE,EAAE,CACX,yEAAyE,EACzE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,CACxD,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { Density } from \"../density\";\nimport * as React from \"react\";\n\nimport { cn } from \"../utils\";\n\nexport type SectionProps = {\n children: React.ReactNode;\n /** `default` on ds-surface; `sunken` for an alternate or CTA band. Never two sunken bands in a row. */\n tone?: \"default\" | \"sunken\";\n /** Vertical padding: ds-space-1000 from 768px and ds-space-600 below; `compact` keeps ds-space-600 throughout. */\n density?: Density;\n /** Anchor target for the Navbar; scrolling to it leaves room for the 56px sticky Navbar. */\n id?: string;\n /** The id of the heading that names the band (a landmark needs a name to be listed). */\n \"aria-labelledby\"?: string;\n /**\n * Skip painting until the band is near the viewport (`content-visibility: auto` with a 720px\n * intrinsic size): the content stays in the server HTML (find-in-page and anchors still work),\n * nothing animates, and the reserved size keeps the layout from shifting.\n *\n * It also contains the band (layout, paint and style containment): overflowing children are\n * clipped at its edge, and fixed or floating children position against it instead of the\n * viewport. So a progressive band holds no fixed, floating or bleeding content (portal overlays\n * and floating banners to <body>), and the first, above-the-fold band is never progressive. The\n * 720px is a desktop-tuned estimate; once painted, the browser remembers the real height.\n */\n isProgressive?: boolean;\n};\n\n/**\n * A full-width band of a marketing or content page: a background and vertical rhythm around\n * a Container. Spacing is padding and gap from ds-space tokens, never\n * margins between sibling sections; logical properties only.\n */\nexport function Section({ children, tone = \"default\", density = \"comfortable\", id, \"aria-labelledby\": labelledBy, isProgressive: progressive }: SectionProps) {\n return (\n <section\n id={id}\n aria-labelledby={labelledBy}\n data-slot=\"section\"\n data-tone={tone}\n data-density={density}\n data-progressive={progressive || undefined}\n className={cn(\n \"w-full text-ds-text\",\n tone === \"sunken\" ? \"bg-ds-surface-sunken\" : \"bg-ds-surface\",\n density === \"compact\" ? \"py-ds-600\" : \"py-ds-600 min-[768px]:py-ds-1000\",\n // The sticky Navbar is 56px tall: ds-space-600 + ds-space-100.\n \"scroll-mt-[calc(var(--ds-space-600)+var(--ds-space-100))]\",\n progressive && \"[content-visibility:auto] [contain-intrinsic-size:auto_720px]\",\n )}\n >\n {children}\n </section>\n );\n}\n\nexport type ContainerProps = {\n children: React.ReactNode;\n /** 1200px (default) or 800px (`narrow`) at most, centred. */\n width?: \"default\" | \"narrow\";\n};\n\n/**\n * The centred, width-capped column inside a Section; children stacked with a ds-space-400 gap. The\n * cap is the outer width (border-box, gutters included), as in the design.\n */\nexport function Container({ children, width = \"default\" }: ContainerProps) {\n return (\n <div\n data-slot=\"container\"\n data-width={width}\n className={cn(\n \"mx-auto flex w-full flex-col gap-ds-400 px-ds-200 min-[768px]:px-ds-300\",\n width === \"narrow\" ? \"max-w-[800px]\" : \"max-w-[1200px]\",\n )}\n >\n {children}\n </div>\n );\n}\n"]}
@@ -0,0 +1,50 @@
1
+ import * as React from "react";
2
+ import { type BoxProps, type LayoutHTMLProps } from "./box.js";
3
+ import { type Space } from "./tokens.js";
4
+ /** The layout's own width below which the panes stack (a container query, so it holds inside a dialog or a shell). */
5
+ export type SplitCollapse = "48rem" | "64rem" | "80rem";
6
+ export type SplitProps = LayoutHTMLProps & {
7
+ as?: BoxProps["as"];
8
+ /** The columns side by side, as a CSS grid template: `"1fr 1fr"` (default), `"1.05fr 1fr"`, `"20rem 1fr"`. */
9
+ ratio?: string;
10
+ /** Below this width of the layout itself the panes stack in one column. Default `"48rem"`. */
11
+ collapseBelow?: SplitCollapse;
12
+ /** The pane that is left out when stacked (a brand or picture pane that adds nothing on a phone). Default: none. */
13
+ hideOnNarrow?: "start" | "end";
14
+ /** The gap between the panes. Default none: panes meet edge to edge, each with its own ground. */
15
+ space?: Space;
16
+ /** At least as tall as the viewport: a screen of its own, like a sign-in page. */
17
+ fullHeight?: boolean;
18
+ children?: React.ReactNode;
19
+ };
20
+ export type SplitPaneProps = BoxProps & {
21
+ /** `stretch` (default): content fills the pane. `center`: content sits in the middle, both ways. */
22
+ align?: "stretch" | "center";
23
+ };
24
+ /** One side of a Split: a Box that is a flex column, so its content can fill it or sit centered. */
25
+ export declare const SplitPane: React.ForwardRefExoticComponent<import("./box.js").BoxStyleProps & LayoutHTMLProps & {
26
+ as?: "div" | "article" | "aside" | "fieldset" | "footer" | "form" | "header" | "li" | "main" | "nav" | "ol" | "section" | "span" | "ul";
27
+ children?: React.ReactNode;
28
+ } & {
29
+ /** `stretch` (default): content fills the pane. `center`: content sits in the middle, both ways. */
30
+ align?: "stretch" | "center";
31
+ } & React.RefAttributes<HTMLElement>>;
32
+ /**
33
+ * Two or more panes side by side that stack below a width, measured on the layout itself, not the viewport. The
34
+ * pattern under split screens (sign-in beside a brand pane), list and detail, media and text. Every pane is a
35
+ * `SplitPane`; what goes in it, and how it looks, is the app's.
36
+ */
37
+ export declare const Split: React.ForwardRefExoticComponent<LayoutHTMLProps & {
38
+ as?: BoxProps["as"];
39
+ /** The columns side by side, as a CSS grid template: `"1fr 1fr"` (default), `"1.05fr 1fr"`, `"20rem 1fr"`. */
40
+ ratio?: string;
41
+ /** Below this width of the layout itself the panes stack in one column. Default `"48rem"`. */
42
+ collapseBelow?: SplitCollapse;
43
+ /** The pane that is left out when stacked (a brand or picture pane that adds nothing on a phone). Default: none. */
44
+ hideOnNarrow?: "start" | "end";
45
+ /** The gap between the panes. Default none: panes meet edge to edge, each with its own ground. */
46
+ space?: Space;
47
+ /** At least as tall as the viewport: a screen of its own, like a sign-in page. */
48
+ fullHeight?: boolean;
49
+ children?: React.ReactNode;
50
+ } & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../utils.js";
4
+ import { boxClasses } from "./box.js";
5
+ import { GAP } from "./tokens.js";
6
+ // Static class names per width: Tailwind only generates what it can read.
7
+ const COLUMNS = {
8
+ "48rem": "@3xl:grid-cols-(--ds-split-columns)",
9
+ "64rem": "@5xl:grid-cols-(--ds-split-columns)",
10
+ "80rem": "@7xl:grid-cols-(--ds-split-columns)",
11
+ };
12
+ const HIDE = {
13
+ "48rem": { start: "@max-3xl:[&>[data-slot=split-pane]:first-child]:hidden", end: "@max-3xl:[&>[data-slot=split-pane]:last-child]:hidden" },
14
+ "64rem": { start: "@max-5xl:[&>[data-slot=split-pane]:first-child]:hidden", end: "@max-5xl:[&>[data-slot=split-pane]:last-child]:hidden" },
15
+ "80rem": { start: "@max-7xl:[&>[data-slot=split-pane]:first-child]:hidden", end: "@max-7xl:[&>[data-slot=split-pane]:last-child]:hidden" },
16
+ };
17
+ /** One side of a Split: a Box that is a flex column, so its content can fill it or sit centered. */
18
+ export const SplitPane = React.forwardRef(function SplitPane({ as = "div", align = "stretch", padding, paddingInline, paddingBlock, background, radius, shadow, border, children, ...rest }, ref) {
19
+ return React.createElement(as, {
20
+ ...rest,
21
+ ref,
22
+ "data-slot": "split-pane",
23
+ className: cn("relative flex min-w-0 flex-col", align === "center" && "items-center justify-center", boxClasses({ padding, paddingInline, paddingBlock, background, radius, shadow, border })),
24
+ }, children);
25
+ });
26
+ /**
27
+ * Two or more panes side by side that stack below a width, measured on the layout itself, not the viewport. The
28
+ * pattern under split screens (sign-in beside a brand pane), list and detail, media and text. Every pane is a
29
+ * `SplitPane`; what goes in it, and how it looks, is the app's.
30
+ */
31
+ export const Split = React.forwardRef(function Split({ as = "div", ratio = "1fr 1fr", collapseBelow = "48rem", hideOnNarrow, space, fullHeight = false, children, ...rest }, ref) {
32
+ // The container is the outer box: an element cannot query its own width, so the grid is one level in.
33
+ return React.createElement(as, { ...rest, ref, "data-slot": "split", className: cn("@container", fullHeight && "min-h-svh") }, _jsx("div", { "data-slot": "split-grid", className: cn("grid", fullHeight && "min-h-svh", COLUMNS[collapseBelow], hideOnNarrow && HIDE[collapseBelow][hideOnNarrow], space && GAP[space]), style: { "--ds-split-columns": ratio }, children: children }));
34
+ });
35
+ //# sourceMappingURL=split.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split.js","sourceRoot":"","sources":["../../src/layout/split.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAuC,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,GAAG,EAAc,MAAM,UAAU,CAAC;AAK3C,0EAA0E;AAC1E,MAAM,OAAO,GAAkC;IAC7C,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AACF,MAAM,IAAI,GAA2D;IACnE,OAAO,EAAE,EAAE,KAAK,EAAE,wDAAwD,EAAE,GAAG,EAAE,uDAAuD,EAAE;IAC1I,OAAO,EAAE,EAAE,KAAK,EAAE,wDAAwD,EAAE,GAAG,EAAE,uDAAuD,EAAE;IAC1I,OAAO,EAAE,EAAE,KAAK,EAAE,wDAAwD,EAAE,GAAG,EAAE,uDAAuD,EAAE;CAC3I,CAAC;AAsBF,oGAAoG;AACpG,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAA8B,SAAS,SAAS,CACvF,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,GAAG,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAC9H,GAAG;IAEH,OAAO,KAAK,CAAC,aAAa,CACxB,EAAE,EACF;QACE,GAAG,IAAI;QACP,GAAG;QACH,WAAW,EAAE,YAAY;QACzB,SAAS,EAAE,EAAE,CACX,gCAAgC,EAChC,KAAK,KAAK,QAAQ,IAAI,6BAA6B,EACnD,UAAU,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CACzF;KACF,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAA0B,SAAS,KAAK,CAC3E,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,GAAG,SAAS,EAAE,aAAa,GAAG,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EACtH,GAAG;IAEH,sGAAsG;IACtG,OAAO,KAAK,CAAC,aAAa,CACxB,EAAE,EACF,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,UAAU,IAAI,WAAW,CAAC,EAAE,EAC9F,2BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,UAAU,IAAI,WAAW,EAAE,OAAO,CAAC,aAAa,CAAC,EAAE,YAAY,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAChJ,KAAK,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAyB,YAE5D,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { boxClasses, type BoxProps, type LayoutHTMLProps } from \"./box\";\nimport { GAP, type Space } from \"./tokens\";\n\n/** The layout's own width below which the panes stack (a container query, so it holds inside a dialog or a shell). */\nexport type SplitCollapse = \"48rem\" | \"64rem\" | \"80rem\";\n\n// Static class names per width: Tailwind only generates what it can read.\nconst COLUMNS: Record<SplitCollapse, string> = {\n \"48rem\": \"@3xl:grid-cols-(--ds-split-columns)\",\n \"64rem\": \"@5xl:grid-cols-(--ds-split-columns)\",\n \"80rem\": \"@7xl:grid-cols-(--ds-split-columns)\",\n};\nconst HIDE: Record<SplitCollapse, Record<\"start\" | \"end\", string>> = {\n \"48rem\": { start: \"@max-3xl:[&>[data-slot=split-pane]:first-child]:hidden\", end: \"@max-3xl:[&>[data-slot=split-pane]:last-child]:hidden\" },\n \"64rem\": { start: \"@max-5xl:[&>[data-slot=split-pane]:first-child]:hidden\", end: \"@max-5xl:[&>[data-slot=split-pane]:last-child]:hidden\" },\n \"80rem\": { start: \"@max-7xl:[&>[data-slot=split-pane]:first-child]:hidden\", end: \"@max-7xl:[&>[data-slot=split-pane]:last-child]:hidden\" },\n};\n\nexport type SplitProps = LayoutHTMLProps & {\n as?: BoxProps[\"as\"];\n /** The columns side by side, as a CSS grid template: `\"1fr 1fr\"` (default), `\"1.05fr 1fr\"`, `\"20rem 1fr\"`. */\n ratio?: string;\n /** Below this width of the layout itself the panes stack in one column. Default `\"48rem\"`. */\n collapseBelow?: SplitCollapse;\n /** The pane that is left out when stacked (a brand or picture pane that adds nothing on a phone). Default: none. */\n hideOnNarrow?: \"start\" | \"end\";\n /** The gap between the panes. Default none: panes meet edge to edge, each with its own ground. */\n space?: Space;\n /** At least as tall as the viewport: a screen of its own, like a sign-in page. */\n fullHeight?: boolean;\n children?: React.ReactNode;\n};\n\nexport type SplitPaneProps = BoxProps & {\n /** `stretch` (default): content fills the pane. `center`: content sits in the middle, both ways. */\n align?: \"stretch\" | \"center\";\n};\n\n/** One side of a Split: a Box that is a flex column, so its content can fill it or sit centered. */\nexport const SplitPane = React.forwardRef<HTMLElement, SplitPaneProps>(function SplitPane(\n { as = \"div\", align = \"stretch\", padding, paddingInline, paddingBlock, background, radius, shadow, border, children, ...rest },\n ref,\n) {\n return React.createElement(\n as,\n {\n ...rest,\n ref,\n \"data-slot\": \"split-pane\",\n className: cn(\n \"relative flex min-w-0 flex-col\",\n align === \"center\" && \"items-center justify-center\",\n boxClasses({ padding, paddingInline, paddingBlock, background, radius, shadow, border }),\n ),\n },\n children,\n );\n});\n\n/**\n * Two or more panes side by side that stack below a width, measured on the layout itself, not the viewport. The\n * pattern under split screens (sign-in beside a brand pane), list and detail, media and text. Every pane is a\n * `SplitPane`; what goes in it, and how it looks, is the app's.\n */\nexport const Split = React.forwardRef<HTMLElement, SplitProps>(function Split(\n { as = \"div\", ratio = \"1fr 1fr\", collapseBelow = \"48rem\", hideOnNarrow, space, fullHeight = false, children, ...rest },\n ref,\n) {\n // The container is the outer box: an element cannot query its own width, so the grid is one level in.\n return React.createElement(\n as,\n { ...rest, ref, \"data-slot\": \"split\", className: cn(\"@container\", fullHeight && \"min-h-svh\") },\n <div\n data-slot=\"split-grid\"\n className={cn(\"grid\", fullHeight && \"min-h-svh\", COLUMNS[collapseBelow], hideOnNarrow && HIDE[collapseBelow][hideOnNarrow], space && GAP[space])}\n style={{ \"--ds-split-columns\": ratio } as React.CSSProperties}\n >\n {children}\n </div>,\n );\n});\n\n"]}
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ import { type BoxProps } from "./box.js";
3
+ import { type Align, type Justify, type Space } from "./tokens.js";
4
+ export type StackVerticalProps = BoxProps & {
5
+ /** `vertical` (default): children stacked on the block axis. */
6
+ direction?: "vertical";
7
+ /** Gap between children (`gap`, never margins). */
8
+ space?: Space;
9
+ /** Cross-axis alignment (inline axis). */
10
+ align?: Exclude<Align, "baseline">;
11
+ };
12
+ /** The horizontal flow's props (Stack with `direction="horizontal"`). */
13
+ export type InlineProps = BoxProps & {
14
+ space?: Space;
15
+ /** Block-axis alignment of the items. */
16
+ align?: Align;
17
+ /** Distribution along the inline axis; `start` is the reading start, so RTL flips with it. */
18
+ justify?: Justify;
19
+ /** Wrap onto new lines when space runs out. Default `true`. */
20
+ wrap?: boolean;
21
+ };
22
+ /** Horizontal flow on the inline axis, wrapping by default. */
23
+ export declare const Inline: React.ForwardRefExoticComponent<import("./box.js").BoxStyleProps & import("./box.js").LayoutHTMLProps & {
24
+ as?: "div" | "article" | "aside" | "fieldset" | "footer" | "form" | "header" | "li" | "main" | "nav" | "ol" | "section" | "span" | "ul";
25
+ children?: React.ReactNode;
26
+ } & {
27
+ space?: Space;
28
+ /** Block-axis alignment of the items. */
29
+ align?: Align;
30
+ /** Distribution along the inline axis; `start` is the reading start, so RTL flips with it. */
31
+ justify?: Justify;
32
+ /** Wrap onto new lines when space runs out. Default `true`. */
33
+ wrap?: boolean;
34
+ } & React.RefAttributes<HTMLElement>>;
35
+ export type StackHorizontalProps = InlineProps & {
36
+ /** `horizontal`: children in a row on the inline axis, wrapping by default (`wrap`), with `justify`. */
37
+ direction: "horizontal";
38
+ };
39
+ export type StackProps = StackVerticalProps | StackHorizontalProps;
40
+ /**
41
+ * Children in a line with a token gap (`gap`, never margins): `direction="vertical"` (default) stacks them on the
42
+ * block axis; `horizontal` puts them in a row on the inline axis, wrapping by default, with `justify` and `align`.
43
+ */
44
+ export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../utils.js";
4
+ import { boxClasses } from "./box.js";
5
+ import { ALIGN_ITEMS, GAP, JUSTIFY } from "./tokens.js";
6
+ /** Vertical flow: children stacked on the block axis with a token gap. */
7
+ const VerticalStack = React.forwardRef(function VerticalStack({ as = "div", space, align, padding, paddingInline, paddingBlock, background, radius, shadow, border, children, ...rest }, ref) {
8
+ return React.createElement(as, {
9
+ ...rest,
10
+ ref,
11
+ "data-slot": "stack",
12
+ className: cn("flex flex-col", space && GAP[space], align && ALIGN_ITEMS[align], boxClasses({ padding, paddingInline, paddingBlock, background, radius, shadow, border })),
13
+ }, children);
14
+ });
15
+ /** Horizontal flow on the inline axis, wrapping by default. */
16
+ export const Inline = React.forwardRef(function Inline({ as = "div", space, align = "center", justify, wrap = true, padding, paddingInline, paddingBlock, background, radius, shadow, border, children, ...rest }, ref) {
17
+ return React.createElement(as, {
18
+ ...rest,
19
+ ref,
20
+ "data-slot": "inline",
21
+ className: cn("flex flex-row", wrap ? "flex-wrap" : "flex-nowrap", space && GAP[space], ALIGN_ITEMS[align], justify && JUSTIFY[justify], boxClasses({ padding, paddingInline, paddingBlock, background, radius, shadow, border })),
22
+ }, children);
23
+ });
24
+ /**
25
+ * Children in a line with a token gap (`gap`, never margins): `direction="vertical"` (default) stacks them on the
26
+ * block axis; `horizontal` puts them in a row on the inline axis, wrapping by default, with `justify` and `align`.
27
+ */
28
+ export const Stack = React.forwardRef(function Stack(props, ref) {
29
+ if (props.direction === "horizontal") {
30
+ const { direction: _direction, ...rest } = props;
31
+ return _jsx(Inline, { ...rest, ref: ref });
32
+ }
33
+ const { direction: _direction, ...rest } = props;
34
+ return _jsx(VerticalStack, { ...rest, ref: ref });
35
+ });
36
+ //# sourceMappingURL=stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.js","sourceRoot":"","sources":["../../src/layout/stack.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAwC,MAAM,UAAU,CAAC;AAW3F,0EAA0E;AAC1E,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAqD,SAAS,aAAa,CAC/G,EAAE,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,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AAE,CAAC,CACzF;KACF,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AASH;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAA0B,SAAS,KAAK,CAAC,KAAK,EAAE,GAAG;IACtF,IAAI,KAAK,CAAC,SAAS,KAAK,YAAY,EAAE,CAAC;QACrC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QACjD,OAAO,KAAC,MAAM,OAAK,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;IACxC,CAAC;IACD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACjD,OAAO,KAAC,aAAa,OAAK,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC/C,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { boxClasses, type BoxProps } from \"./box\";\nimport { ALIGN_ITEMS, GAP, JUSTIFY, type Align, type Justify, type Space } from \"./tokens\";\n\nexport type StackVerticalProps = BoxProps & {\n /** `vertical` (default): children stacked on the block axis. */\n direction?: \"vertical\";\n /** Gap between children (`gap`, never margins). */\n space?: Space;\n /** Cross-axis alignment (inline axis). */\n align?: Exclude<Align, \"baseline\">;\n};\n\n/** Vertical flow: children stacked on the block axis with a token gap. */\nconst VerticalStack = React.forwardRef<HTMLElement, Omit<StackVerticalProps, \"direction\">>(function VerticalStack(\n { as = \"div\", space, align, padding, paddingInline, paddingBlock, background, radius, shadow, border, children, ...rest },\n ref,\n) {\n return React.createElement(\n as,\n {\n ...rest,\n ref,\n \"data-slot\": \"stack\",\n className: cn(\n \"flex flex-col\",\n space && GAP[space],\n align && ALIGN_ITEMS[align],\n boxClasses({ padding, paddingInline, paddingBlock, background, radius, shadow, border }),\n ),\n },\n children,\n );\n});\n\n/** The horizontal flow's props (Stack with `direction=\"horizontal\"`). */\nexport type InlineProps = BoxProps & {\n space?: Space;\n /** Block-axis alignment of the items. */\n align?: Align;\n /** Distribution along the inline axis; `start` is the reading start, so RTL flips with it. */\n justify?: Justify;\n /** Wrap onto new lines when space runs out. Default `true`. */\n wrap?: boolean;\n};\n\n/** Horizontal flow on the inline axis, wrapping by default. */\nexport const Inline = React.forwardRef<HTMLElement, InlineProps>(function Inline(\n { as = \"div\", space, align = \"center\", justify, wrap = true, padding, paddingInline, paddingBlock, background, radius, shadow, border, children, ...rest },\n ref,\n) {\n return React.createElement(\n as,\n {\n ...rest,\n ref,\n \"data-slot\": \"inline\",\n className: cn(\n \"flex flex-row\",\n wrap ? \"flex-wrap\" : \"flex-nowrap\",\n space && GAP[space],\n ALIGN_ITEMS[align],\n justify && JUSTIFY[justify],\n boxClasses({ padding, paddingInline, paddingBlock, background, radius, shadow, border }),\n ),\n },\n children,\n );\n});\n\nexport type StackHorizontalProps = InlineProps & {\n /** `horizontal`: children in a row on the inline axis, wrapping by default (`wrap`), with `justify`. */\n direction: \"horizontal\";\n};\n\nexport type StackProps = StackVerticalProps | StackHorizontalProps;\n\n/**\n * Children in a line with a token gap (`gap`, never margins): `direction=\"vertical\"` (default) stacks them on the\n * block axis; `horizontal` puts them in a row on the inline axis, wrapping by default, with `justify` and `align`.\n */\nexport const Stack = React.forwardRef<HTMLElement, StackProps>(function Stack(props, ref) {\n if (props.direction === \"horizontal\") {\n const { direction: _direction, ...rest } = props;\n return <Inline {...rest} ref={ref} />;\n }\n const { direction: _direction, ...rest } = props;\n return <VerticalStack {...rest} ref={ref} />;\n});\n"]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Token-to-class maps for the layout primitives.
3
+ *
4
+ * Every value a layout prop accepts is a design-system token name, and every
5
+ * class here is written out in full so Tailwind finds it when it scans the
6
+ * package (`@source "…/@senvenli/react/dist"`). The utilities come from
7
+ * `@senvenli/react/theme.css` and the generated theme.
8
+ */
9
+ export declare const SPACE_TOKENS: readonly ["space-0", "space-025", "space-050", "space-075", "space-100", "space-150", "space-200", "space-250", "space-300", "space-400", "space-500", "space-600", "space-800", "space-1000"];
10
+ export type Space = (typeof SPACE_TOKENS)[number];
11
+ export declare const GAP: Record<Space, string>;
12
+ export declare const PADDING: Record<Space, string>;
13
+ /** Inline-axis padding: `padding-inline`, so it is the same in RTL. */
14
+ export declare const PADDING_INLINE: Record<Space, string>;
15
+ export declare const PADDING_BLOCK: Record<Space, string>;
16
+ export type Background = "surface" | "surface-raised" | "surface-sunken" | "surface-overlay" | "neutral" | "selected" | "brand-subtle" | "information" | "success" | "warning" | "danger";
17
+ export declare const BACKGROUND: Record<Background, string>;
18
+ /** The same scale as every component's `radius` (none, small, medium, large, full). */
19
+ export type Radius = "none" | "small" | "medium" | "large" | "full";
20
+ export declare const RADIUS: Record<Radius, string>;
21
+ export type Shadow = "raised" | "overflow" | "overlay";
22
+ export declare const SHADOW: Record<Shadow, string>;
23
+ /** `true` divides (`ds-border`); `"bold"` is for edges the user must see to operate. */
24
+ export type Border = boolean | "bold";
25
+ export declare const BORDER: {
26
+ readonly default: "border border-ds-border";
27
+ readonly bold: "border border-ds-border-bold";
28
+ };
29
+ export type Align = "start" | "center" | "end" | "stretch" | "baseline";
30
+ export declare const ALIGN_ITEMS: Record<Align, string>;
31
+ export type Justify = "start" | "center" | "end" | "between";
32
+ export declare const JUSTIFY: Record<Justify, string>;
33
+ export declare function borderClass(border: Border | undefined): string | undefined;
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Token-to-class maps for the layout primitives.
3
+ *
4
+ * Every value a layout prop accepts is a design-system token name, and every
5
+ * class here is written out in full so Tailwind finds it when it scans the
6
+ * package (`@source "…/@senvenli/react/dist"`). The utilities come from
7
+ * `@senvenli/react/theme.css` and the generated theme.
8
+ */
9
+ export const SPACE_TOKENS = [
10
+ "space-0", "space-025", "space-050", "space-075", "space-100", "space-150", "space-200",
11
+ "space-250", "space-300", "space-400", "space-500", "space-600", "space-800", "space-1000",
12
+ ];
13
+ export const GAP = {
14
+ "space-0": "gap-ds-0", "space-025": "gap-ds-025", "space-050": "gap-ds-050", "space-075": "gap-ds-075",
15
+ "space-100": "gap-ds-100", "space-150": "gap-ds-150", "space-200": "gap-ds-200", "space-250": "gap-ds-250",
16
+ "space-300": "gap-ds-300", "space-400": "gap-ds-400", "space-500": "gap-ds-500", "space-600": "gap-ds-600",
17
+ "space-800": "gap-ds-800", "space-1000": "gap-ds-1000",
18
+ };
19
+ export const PADDING = {
20
+ "space-0": "p-ds-0", "space-025": "p-ds-025", "space-050": "p-ds-050", "space-075": "p-ds-075",
21
+ "space-100": "p-ds-100", "space-150": "p-ds-150", "space-200": "p-ds-200", "space-250": "p-ds-250",
22
+ "space-300": "p-ds-300", "space-400": "p-ds-400", "space-500": "p-ds-500", "space-600": "p-ds-600",
23
+ "space-800": "p-ds-800", "space-1000": "p-ds-1000",
24
+ };
25
+ /** Inline-axis padding: `padding-inline`, so it is the same in RTL. */
26
+ export const PADDING_INLINE = {
27
+ "space-0": "px-ds-0", "space-025": "px-ds-025", "space-050": "px-ds-050", "space-075": "px-ds-075",
28
+ "space-100": "px-ds-100", "space-150": "px-ds-150", "space-200": "px-ds-200", "space-250": "px-ds-250",
29
+ "space-300": "px-ds-300", "space-400": "px-ds-400", "space-500": "px-ds-500", "space-600": "px-ds-600",
30
+ "space-800": "px-ds-800", "space-1000": "px-ds-1000",
31
+ };
32
+ export const PADDING_BLOCK = {
33
+ "space-0": "py-ds-0", "space-025": "py-ds-025", "space-050": "py-ds-050", "space-075": "py-ds-075",
34
+ "space-100": "py-ds-100", "space-150": "py-ds-150", "space-200": "py-ds-200", "space-250": "py-ds-250",
35
+ "space-300": "py-ds-300", "space-400": "py-ds-400", "space-500": "py-ds-500", "space-600": "py-ds-600",
36
+ "space-800": "py-ds-800", "space-1000": "py-ds-1000",
37
+ };
38
+ export const BACKGROUND = {
39
+ surface: "bg-ds-surface",
40
+ "surface-raised": "bg-ds-surface-raised",
41
+ "surface-sunken": "bg-ds-surface-sunken",
42
+ "surface-overlay": "bg-ds-surface-overlay",
43
+ neutral: "bg-ds-background-neutral",
44
+ selected: "bg-ds-background-selected",
45
+ "brand-subtle": "bg-ds-background-brand-subtle",
46
+ information: "bg-ds-background-information",
47
+ success: "bg-ds-background-success",
48
+ warning: "bg-ds-background-warning",
49
+ danger: "bg-ds-background-danger",
50
+ };
51
+ export const RADIUS = {
52
+ none: "rounded-none",
53
+ small: "rounded-ds-small",
54
+ medium: "rounded-ds-medium",
55
+ large: "rounded-ds-large",
56
+ full: "rounded-ds-full",
57
+ };
58
+ export const SHADOW = {
59
+ raised: "shadow-ds-raised",
60
+ overflow: "shadow-ds-overflow",
61
+ overlay: "shadow-ds-overlay",
62
+ };
63
+ export const BORDER = {
64
+ default: "border border-ds-border",
65
+ bold: "border border-ds-border-bold",
66
+ };
67
+ export const ALIGN_ITEMS = {
68
+ start: "items-start",
69
+ center: "items-center",
70
+ end: "items-end",
71
+ stretch: "items-stretch",
72
+ baseline: "items-baseline",
73
+ };
74
+ export const JUSTIFY = {
75
+ start: "justify-start",
76
+ center: "justify-center",
77
+ end: "justify-end",
78
+ between: "justify-between",
79
+ };
80
+ export function borderClass(border) {
81
+ if (!border)
82
+ return undefined;
83
+ return border === "bold" ? BORDER.bold : BORDER.default;
84
+ }
85
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/layout/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW;IACvF,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY;CAClF,CAAC;AAGX,MAAM,CAAC,MAAM,GAAG,GAA0B;IACxC,SAAS,EAAE,UAAU,EAAE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M,OAAO,GAA4B;IAC9C,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,GAAG,EAAE,aAAa;IAClB,OAAO,EAAE,iBAAiB;CAC3B,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,MAA0B;IACpD,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,OAAO,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AAC1D,CAAC","sourcesContent":["/**\n * Token-to-class maps for the layout primitives.\n *\n * Every value a layout prop accepts is a design-system token name, and every\n * class here is written out in full so Tailwind finds it when it scans the\n * package (`@source \"…/@senvenli/react/dist\"`). The utilities come from\n * `@senvenli/react/theme.css` and the generated theme.\n */\n\nexport const SPACE_TOKENS = [\n \"space-0\", \"space-025\", \"space-050\", \"space-075\", \"space-100\", \"space-150\", \"space-200\",\n \"space-250\", \"space-300\", \"space-400\", \"space-500\", \"space-600\", \"space-800\", \"space-1000\",\n] as const;\nexport type Space = (typeof SPACE_TOKENS)[number];\n\nexport const GAP: Record<Space, string> = {\n \"space-0\": \"gap-ds-0\", \"space-025\": \"gap-ds-025\", \"space-050\": \"gap-ds-050\", \"space-075\": \"gap-ds-075\",\n \"space-100\": \"gap-ds-100\", \"space-150\": \"gap-ds-150\", \"space-200\": \"gap-ds-200\", \"space-250\": \"gap-ds-250\",\n \"space-300\": \"gap-ds-300\", \"space-400\": \"gap-ds-400\", \"space-500\": \"gap-ds-500\", \"space-600\": \"gap-ds-600\",\n \"space-800\": \"gap-ds-800\", \"space-1000\": \"gap-ds-1000\",\n};\n\nexport const PADDING: Record<Space, string> = {\n \"space-0\": \"p-ds-0\", \"space-025\": \"p-ds-025\", \"space-050\": \"p-ds-050\", \"space-075\": \"p-ds-075\",\n \"space-100\": \"p-ds-100\", \"space-150\": \"p-ds-150\", \"space-200\": \"p-ds-200\", \"space-250\": \"p-ds-250\",\n \"space-300\": \"p-ds-300\", \"space-400\": \"p-ds-400\", \"space-500\": \"p-ds-500\", \"space-600\": \"p-ds-600\",\n \"space-800\": \"p-ds-800\", \"space-1000\": \"p-ds-1000\",\n};\n\n/** Inline-axis padding: `padding-inline`, so it is the same in RTL. */\nexport const PADDING_INLINE: Record<Space, string> = {\n \"space-0\": \"px-ds-0\", \"space-025\": \"px-ds-025\", \"space-050\": \"px-ds-050\", \"space-075\": \"px-ds-075\",\n \"space-100\": \"px-ds-100\", \"space-150\": \"px-ds-150\", \"space-200\": \"px-ds-200\", \"space-250\": \"px-ds-250\",\n \"space-300\": \"px-ds-300\", \"space-400\": \"px-ds-400\", \"space-500\": \"px-ds-500\", \"space-600\": \"px-ds-600\",\n \"space-800\": \"px-ds-800\", \"space-1000\": \"px-ds-1000\",\n};\n\nexport const PADDING_BLOCK: Record<Space, string> = {\n \"space-0\": \"py-ds-0\", \"space-025\": \"py-ds-025\", \"space-050\": \"py-ds-050\", \"space-075\": \"py-ds-075\",\n \"space-100\": \"py-ds-100\", \"space-150\": \"py-ds-150\", \"space-200\": \"py-ds-200\", \"space-250\": \"py-ds-250\",\n \"space-300\": \"py-ds-300\", \"space-400\": \"py-ds-400\", \"space-500\": \"py-ds-500\", \"space-600\": \"py-ds-600\",\n \"space-800\": \"py-ds-800\", \"space-1000\": \"py-ds-1000\",\n};\n\nexport type Background =\n | \"surface\" | \"surface-raised\" | \"surface-sunken\" | \"surface-overlay\"\n | \"neutral\" | \"selected\" | \"brand-subtle\"\n | \"information\" | \"success\" | \"warning\" | \"danger\";\n\nexport const BACKGROUND: Record<Background, string> = {\n surface: \"bg-ds-surface\",\n \"surface-raised\": \"bg-ds-surface-raised\",\n \"surface-sunken\": \"bg-ds-surface-sunken\",\n \"surface-overlay\": \"bg-ds-surface-overlay\",\n neutral: \"bg-ds-background-neutral\",\n selected: \"bg-ds-background-selected\",\n \"brand-subtle\": \"bg-ds-background-brand-subtle\",\n information: \"bg-ds-background-information\",\n success: \"bg-ds-background-success\",\n warning: \"bg-ds-background-warning\",\n danger: \"bg-ds-background-danger\",\n};\n\n/** The same scale as every component's `radius` (none, small, medium, large, full). */\nexport type Radius = \"none\" | \"small\" | \"medium\" | \"large\" | \"full\";\nexport const RADIUS: Record<Radius, string> = {\n none: \"rounded-none\",\n small: \"rounded-ds-small\",\n medium: \"rounded-ds-medium\",\n large: \"rounded-ds-large\",\n full: \"rounded-ds-full\",\n};\n\nexport type Shadow = \"raised\" | \"overflow\" | \"overlay\";\nexport const SHADOW: Record<Shadow, string> = {\n raised: \"shadow-ds-raised\",\n overflow: \"shadow-ds-overflow\",\n overlay: \"shadow-ds-overlay\",\n};\n\n/** `true` divides (`ds-border`); `\"bold\"` is for edges the user must see to operate. */\nexport type Border = boolean | \"bold\";\nexport const BORDER = {\n default: \"border border-ds-border\",\n bold: \"border border-ds-border-bold\",\n} as const;\n\nexport type Align = \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\nexport const ALIGN_ITEMS: Record<Align, string> = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\",\n};\n\nexport type Justify = \"start\" | \"center\" | \"end\" | \"between\";\nexport const JUSTIFY: Record<Justify, string> = {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n};\n\nexport function borderClass(border: Border | undefined): string | undefined {\n if (!border) return undefined;\n return border === \"bold\" ? BORDER.bold : BORDER.default;\n}\n"]}
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ export type ToolbarProps = {
3
+ /** Compact (32px) controls acting on the view below: search, filters, date range, view switch, export. */
4
+ children: React.ReactNode;
5
+ /** Names the toolbar ("Order tools"). */
6
+ "aria-label": string;
7
+ };
8
+ /**
9
+ * Controls that act on the view below it. One Tab stop: arrow keys move between the controls (mirrored
10
+ * in RTL). Put a `ToolbarSpacer` before the view and export controls to push them to the end.
11
+ * A text-editing control inside (a SearchField's input, a DateField's segments) keeps ←/→ for its caret
12
+ * and segments; at its edge (the caret at the start or end, the first or last segment) the arrow moves on
13
+ * to the next control, so every control stays reachable by the arrows. Arrowing into a date or time field
14
+ * lands on the segment nearest the way in: in RTL the visually nearest one, whatever the DOM order of its
15
+ * segments. A raw `type="number"` or
16
+ * `type="email"` input with a value has no readable caret and keeps ←/→ (Tab leaves it); prefer NumberField,
17
+ * or TextField with `inputMode`, inside a toolbar.
18
+ */
19
+ export declare function Toolbar({ children, "aria-label": label }: ToolbarProps): React.JSX.Element;
20
+ /** Pushes the controls after it to the toolbar's end. */
21
+ export declare function ToolbarSpacer(): React.JSX.Element;
22
+ export type BulkBarProps = {
23
+ /** How many rows are selected; announced as it changes. */
24
+ selectedCount: number;
25
+ /** The bulk actions (compact Buttons): "Send reminder", "Export". */
26
+ actions: React.ReactNode;
27
+ /** Clears the selection; the bar goes with it. */
28
+ onClear: () => void;
29
+ /** Names the bar ("Selected orders"). */
30
+ "aria-label": string;
31
+ };
32
+ /**
33
+ * Replaces the toolbar while rows are selected: the count, the bulk actions and a clear button, on
34
+ * `ds-background-neutral-bold`. One Tab stop with arrow keys inside, like the toolbar. Buttons in the bar
35
+ * are drawn transparent with inverse text whatever their variant: pass default (not primary) actions.
36
+ */
37
+ export declare function BulkBar({ selectedCount, actions, onClear, "aria-label": label }: BulkBarProps): React.JSX.Element;