@askrjs/themes 0.0.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 (423) hide show
  1. package/LICENSE +201 -0
  2. package/THEMING.md +930 -0
  3. package/dist/_internal/box-layout.js +115 -0
  4. package/dist/_internal/box-layout.js.map +1 -0
  5. package/dist/_internal/classes.js +8 -0
  6. package/dist/_internal/classes.js.map +1 -0
  7. package/dist/_internal/jsx.js +12 -0
  8. package/dist/_internal/jsx.js.map +1 -0
  9. package/dist/_internal/layout.d.ts +9 -0
  10. package/dist/_internal/layout.js +156 -0
  11. package/dist/_internal/layout.js.map +1 -0
  12. package/dist/_internal/merge-props.js +50 -0
  13. package/dist/_internal/merge-props.js.map +1 -0
  14. package/dist/accessible-icon/accessible-icon.d.ts +7 -0
  15. package/dist/accessible-icon/accessible-icon.js +20 -0
  16. package/dist/accessible-icon/accessible-icon.js.map +1 -0
  17. package/dist/accessible-icon/accessible-icon.types.d.ts +9 -0
  18. package/dist/askr/dist/common/jsx.d.ts +16 -0
  19. package/dist/askr/dist/common/props.d.ts +22 -0
  20. package/dist/askr-themes/src/themes/default/index.css +3736 -0
  21. package/dist/aspect-ratio/aspect-ratio.d.ts +8 -0
  22. package/dist/aspect-ratio/aspect-ratio.js +36 -0
  23. package/dist/aspect-ratio/aspect-ratio.js.map +1 -0
  24. package/dist/aspect-ratio/aspect-ratio.types.d.ts +20 -0
  25. package/dist/aspect-ratio/index.d.ts +2 -0
  26. package/dist/badge/badge.d.ts +8 -0
  27. package/dist/badge/badge.js +26 -0
  28. package/dist/badge/badge.js.map +1 -0
  29. package/dist/badge/badge.types.d.ts +20 -0
  30. package/dist/badge/index.d.ts +2 -0
  31. package/dist/box/box.d.ts +9 -0
  32. package/dist/box/box.js +35 -0
  33. package/dist/box/box.js.map +1 -0
  34. package/dist/box/box.types.d.ts +71 -0
  35. package/dist/box/index.d.ts +2 -0
  36. package/dist/breadcrumb/breadcrumb.d.ts +18 -0
  37. package/dist/breadcrumb/breadcrumb.js +113 -0
  38. package/dist/breadcrumb/breadcrumb.js.map +1 -0
  39. package/dist/breadcrumb/breadcrumb.types.d.ts +64 -0
  40. package/dist/breadcrumb/index.d.ts +2 -0
  41. package/dist/card/card.d.ts +12 -0
  42. package/dist/card/card.js +68 -0
  43. package/dist/card/card.js.map +1 -0
  44. package/dist/card/card.types.d.ts +37 -0
  45. package/dist/card/index.d.ts +2 -0
  46. package/dist/components/_internal/box-layout.d.ts +7 -0
  47. package/dist/components/_internal/classes.d.ts +1 -0
  48. package/dist/components/_internal/jsx.d.ts +8 -0
  49. package/dist/components/_internal/layout.d.ts +31 -0
  50. package/dist/components/_internal/merge-props.d.ts +1 -0
  51. package/dist/components/_internal/style.d.ts +1 -0
  52. package/dist/components/accessible-icon/accessible-icon.d.ts +2 -0
  53. package/dist/components/accessible-icon/accessible-icon.types.d.ts +5 -0
  54. package/dist/components/accessible-icon/index.d.ts +2 -0
  55. package/dist/components/aspect-ratio/aspect-ratio.d.ts +3 -0
  56. package/dist/components/aspect-ratio/aspect-ratio.types.d.ts +15 -0
  57. package/dist/components/aspect-ratio/index.d.ts +2 -0
  58. package/dist/components/badge/badge.a11y.d.ts +13 -0
  59. package/dist/components/badge/badge.d.ts +3 -0
  60. package/dist/components/badge/badge.types.d.ts +15 -0
  61. package/dist/components/badge/index.d.ts +3 -0
  62. package/dist/components/box/box.a11y.d.ts +10 -0
  63. package/dist/components/box/box.d.ts +4 -0
  64. package/dist/components/box/box.types.d.ts +66 -0
  65. package/dist/components/box/index.d.ts +3 -0
  66. package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +13 -0
  67. package/dist/components/breadcrumb/breadcrumb.d.ts +13 -0
  68. package/dist/components/breadcrumb/breadcrumb.types.d.ts +59 -0
  69. package/dist/components/breadcrumb/index.d.ts +3 -0
  70. package/dist/components/card/card.d.ts +7 -0
  71. package/dist/components/card/card.types.d.ts +33 -0
  72. package/dist/components/card/index.d.ts +2 -0
  73. package/dist/components/container/container.a11y.d.ts +16 -0
  74. package/dist/components/container/container.d.ts +3 -0
  75. package/dist/components/container/container.types.d.ts +29 -0
  76. package/dist/components/container/index.d.ts +3 -0
  77. package/dist/components/empty-state/empty-state.d.ts +2 -0
  78. package/dist/components/empty-state/empty-state.types.d.ts +9 -0
  79. package/dist/components/empty-state/index.d.ts +2 -0
  80. package/dist/components/flex/flex.a11y.d.ts +18 -0
  81. package/dist/components/flex/flex.d.ts +4 -0
  82. package/dist/components/flex/flex.types.d.ts +41 -0
  83. package/dist/components/flex/index.d.ts +3 -0
  84. package/dist/components/grid/grid.a11y.d.ts +21 -0
  85. package/dist/components/grid/grid.d.ts +4 -0
  86. package/dist/components/grid/grid.types.d.ts +37 -0
  87. package/dist/components/grid/index.d.ts +3 -0
  88. package/dist/components/header/header.a11y.d.ts +10 -0
  89. package/dist/components/header/header.d.ts +2 -0
  90. package/dist/components/header/header.types.d.ts +5 -0
  91. package/dist/components/header/index.d.ts +3 -0
  92. package/dist/components/index.d.ts +49 -0
  93. package/dist/components/index.js +28 -0
  94. package/dist/components/inline/index.d.ts +6 -0
  95. package/dist/components/logos/create-logo.d.ts +5 -0
  96. package/dist/components/logos/github-logo.d.ts +4 -0
  97. package/dist/components/logos/google-logo.d.ts +4 -0
  98. package/dist/components/logos/index.d.ts +5 -0
  99. package/dist/components/logos/microsoft-logo.d.ts +4 -0
  100. package/dist/components/logos/types.d.ts +14 -0
  101. package/dist/components/navbar/index.d.ts +2 -0
  102. package/dist/components/navbar/navbar.d.ts +6 -0
  103. package/dist/components/navbar/navbar.types.d.ts +24 -0
  104. package/dist/components/section/index.d.ts +3 -0
  105. package/dist/components/section/section.a11y.d.ts +11 -0
  106. package/dist/components/section/section.d.ts +3 -0
  107. package/dist/components/section/section.types.d.ts +17 -0
  108. package/dist/components/separator/index.d.ts +3 -0
  109. package/dist/components/separator/separator.a11y.d.ts +13 -0
  110. package/dist/components/separator/separator.d.ts +3 -0
  111. package/dist/components/separator/separator.types.d.ts +16 -0
  112. package/dist/components/sidebar-layout/index.d.ts +3 -0
  113. package/dist/components/sidebar-layout/sidebar-layout.a11y.d.ts +15 -0
  114. package/dist/components/sidebar-layout/sidebar-layout.d.ts +2 -0
  115. package/dist/components/sidebar-layout/sidebar-layout.types.d.ts +20 -0
  116. package/dist/components/skeleton/index.d.ts +3 -0
  117. package/dist/components/skeleton/skeleton.a11y.d.ts +12 -0
  118. package/dist/components/skeleton/skeleton.d.ts +3 -0
  119. package/dist/components/skeleton/skeleton.types.d.ts +13 -0
  120. package/dist/components/spacer/index.d.ts +3 -0
  121. package/dist/components/spacer/spacer.a11y.d.ts +13 -0
  122. package/dist/components/spacer/spacer.d.ts +3 -0
  123. package/dist/components/spacer/spacer.types.d.ts +24 -0
  124. package/dist/components/spinner/index.d.ts +2 -0
  125. package/dist/components/spinner/spinner.d.ts +2 -0
  126. package/dist/components/spinner/spinner.types.d.ts +5 -0
  127. package/dist/components/stack/index.d.ts +3 -0
  128. package/dist/components/stack/stack.a11y.d.ts +14 -0
  129. package/dist/components/stack/stack.d.ts +3 -0
  130. package/dist/components/stack/stack.types.d.ts +16 -0
  131. package/dist/components/theme/index.d.ts +2 -0
  132. package/dist/components/theme/theme.d.ts +40 -0
  133. package/dist/components/topbar-layout/index.d.ts +3 -0
  134. package/dist/components/topbar-layout/topbar-layout.a11y.d.ts +13 -0
  135. package/dist/components/topbar-layout/topbar-layout.d.ts +2 -0
  136. package/dist/components/topbar-layout/topbar-layout.types.d.ts +12 -0
  137. package/dist/container/container.d.ts +8 -0
  138. package/dist/container/container.js +82 -0
  139. package/dist/container/container.js.map +1 -0
  140. package/dist/container/container.types.d.ts +28 -0
  141. package/dist/container/index.d.ts +2 -0
  142. package/dist/empty-state/empty-state.d.ts +7 -0
  143. package/dist/empty-state/empty-state.js +39 -0
  144. package/dist/empty-state/empty-state.js.map +1 -0
  145. package/dist/empty-state/empty-state.types.d.ts +13 -0
  146. package/dist/flex/flex.d.ts +9 -0
  147. package/dist/flex/flex.js +114 -0
  148. package/dist/flex/flex.js.map +1 -0
  149. package/dist/flex/flex.types.d.ts +41 -0
  150. package/dist/flex/index.d.ts +2 -0
  151. package/dist/grid/grid.d.ts +9 -0
  152. package/dist/grid/grid.js +115 -0
  153. package/dist/grid/grid.js.map +1 -0
  154. package/dist/grid/grid.types.d.ts +40 -0
  155. package/dist/grid/index.d.ts +2 -0
  156. package/dist/header/header.d.ts +7 -0
  157. package/dist/header/header.js +18 -0
  158. package/dist/header/header.js.map +1 -0
  159. package/dist/header/header.types.d.ts +9 -0
  160. package/dist/inline/index.d.ts +7 -0
  161. package/dist/inline/index.js +13 -0
  162. package/dist/inline/index.js.map +1 -0
  163. package/dist/logos/create-logo.js +75 -0
  164. package/dist/logos/create-logo.js.map +1 -0
  165. package/dist/logos/github-logo.d.ts +18 -0
  166. package/dist/logos/github-logo.js +9 -0
  167. package/dist/logos/github-logo.js.map +1 -0
  168. package/dist/logos/google-logo.d.ts +18 -0
  169. package/dist/logos/google-logo.js +23 -0
  170. package/dist/logos/google-logo.js.map +1 -0
  171. package/dist/logos/microsoft-logo.d.ts +18 -0
  172. package/dist/logos/microsoft-logo.js +35 -0
  173. package/dist/logos/microsoft-logo.js.map +1 -0
  174. package/dist/logos/types.d.ts +16 -0
  175. package/dist/navbar/index.d.ts +2 -0
  176. package/dist/navbar/navbar.d.ts +11 -0
  177. package/dist/navbar/navbar.js +57 -0
  178. package/dist/navbar/navbar.js.map +1 -0
  179. package/dist/navbar/navbar.types.d.ts +29 -0
  180. package/dist/section/index.d.ts +2 -0
  181. package/dist/section/section.d.ts +8 -0
  182. package/dist/section/section.js +40 -0
  183. package/dist/section/section.js.map +1 -0
  184. package/dist/section/section.types.d.ts +22 -0
  185. package/dist/separator/index.d.ts +2 -0
  186. package/dist/separator/separator.d.ts +8 -0
  187. package/dist/separator/separator.js +27 -0
  188. package/dist/separator/separator.js.map +1 -0
  189. package/dist/separator/separator.types.d.ts +21 -0
  190. package/dist/sidebar-layout/index.d.ts +2 -0
  191. package/dist/sidebar-layout/sidebar-layout.d.ts +7 -0
  192. package/dist/sidebar-layout/sidebar-layout.js +51 -0
  193. package/dist/sidebar-layout/sidebar-layout.js.map +1 -0
  194. package/dist/sidebar-layout/sidebar-layout.types.d.ts +20 -0
  195. package/dist/skeleton/index.d.ts +2 -0
  196. package/dist/skeleton/skeleton.d.ts +8 -0
  197. package/dist/skeleton/skeleton.js +26 -0
  198. package/dist/skeleton/skeleton.js.map +1 -0
  199. package/dist/skeleton/skeleton.types.d.ts +18 -0
  200. package/dist/spacer/index.d.ts +2 -0
  201. package/dist/spacer/spacer.d.ts +8 -0
  202. package/dist/spacer/spacer.js +47 -0
  203. package/dist/spacer/spacer.js.map +1 -0
  204. package/dist/spacer/spacer.types.d.ts +25 -0
  205. package/dist/spinner/index.d.ts +2 -0
  206. package/dist/spinner/spinner.d.ts +7 -0
  207. package/dist/spinner/spinner.js +16 -0
  208. package/dist/spinner/spinner.js.map +1 -0
  209. package/dist/spinner/spinner.types.d.ts +10 -0
  210. package/dist/stack/index.d.ts +2 -0
  211. package/dist/stack/stack.d.ts +8 -0
  212. package/dist/stack/stack.js +16 -0
  213. package/dist/stack/stack.js.map +1 -0
  214. package/dist/stack/stack.types.d.ts +21 -0
  215. package/dist/theme/index.d.ts +1 -0
  216. package/dist/theme/theme.d.ts +44 -0
  217. package/dist/theme/theme.js +159 -0
  218. package/dist/theme/theme.js.map +1 -0
  219. package/dist/topbar-layout/index.d.ts +2 -0
  220. package/dist/topbar-layout/topbar-layout.d.ts +7 -0
  221. package/dist/topbar-layout/topbar-layout.js +37 -0
  222. package/dist/topbar-layout/topbar-layout.js.map +1 -0
  223. package/dist/topbar-layout/topbar-layout.types.d.ts +13 -0
  224. package/package.json +122 -0
  225. package/scripts/new-theme.js +87 -0
  226. package/src/askr-compat.d.ts +110 -0
  227. package/src/components/_internal/box-layout.ts +156 -0
  228. package/src/components/_internal/classes.ts +5 -0
  229. package/src/components/_internal/jsx.ts +141 -0
  230. package/src/components/_internal/layout.ts +223 -0
  231. package/src/components/_internal/merge-props.ts +89 -0
  232. package/src/components/_internal/style.ts +18 -0
  233. package/src/components/accessible-icon/accessible-icon.tsx +18 -0
  234. package/src/components/accessible-icon/accessible-icon.types.ts +5 -0
  235. package/src/components/accessible-icon/index.ts +2 -0
  236. package/src/components/aspect-ratio/aspect-ratio.tsx +48 -0
  237. package/src/components/aspect-ratio/aspect-ratio.types.ts +19 -0
  238. package/src/components/aspect-ratio/index.ts +2 -0
  239. package/src/components/badge/badge.a11y.ts +15 -0
  240. package/src/components/badge/badge.tsx +21 -0
  241. package/src/components/badge/badge.types.ts +27 -0
  242. package/src/components/badge/index.ts +3 -0
  243. package/src/components/box/box.a11y.ts +11 -0
  244. package/src/components/box/box.tsx +37 -0
  245. package/src/components/box/box.types.ts +75 -0
  246. package/src/components/box/index.ts +11 -0
  247. package/src/components/breadcrumb/breadcrumb.a11y.ts +15 -0
  248. package/src/components/breadcrumb/breadcrumb.tsx +123 -0
  249. package/src/components/breadcrumb/breadcrumb.types.ts +73 -0
  250. package/src/components/breadcrumb/index.ts +24 -0
  251. package/src/components/card/card.tsx +79 -0
  252. package/src/components/card/card.types.ts +40 -0
  253. package/src/components/card/index.ts +12 -0
  254. package/src/components/container/container.a11y.ts +17 -0
  255. package/src/components/container/container.tsx +139 -0
  256. package/src/components/container/container.types.ts +35 -0
  257. package/src/components/container/index.ts +9 -0
  258. package/src/components/empty-state/empty-state.tsx +42 -0
  259. package/src/components/empty-state/empty-state.types.ts +10 -0
  260. package/src/components/empty-state/index.ts +2 -0
  261. package/src/components/flex/flex.a11y.ts +19 -0
  262. package/src/components/flex/flex.tsx +160 -0
  263. package/src/components/flex/flex.types.ts +50 -0
  264. package/src/components/flex/index.ts +16 -0
  265. package/src/components/grid/grid.a11y.ts +22 -0
  266. package/src/components/grid/grid.tsx +172 -0
  267. package/src/components/grid/grid.types.ts +45 -0
  268. package/src/components/grid/index.ts +10 -0
  269. package/src/components/header/header.a11y.ts +11 -0
  270. package/src/components/header/header.tsx +18 -0
  271. package/src/components/header/header.types.ts +6 -0
  272. package/src/components/header/index.ts +3 -0
  273. package/src/components/index.ts +107 -0
  274. package/src/components/inline/index.tsx +28 -0
  275. package/src/components/logos/create-logo.tsx +103 -0
  276. package/src/components/logos/github-logo.tsx +13 -0
  277. package/src/components/logos/google-logo.tsx +34 -0
  278. package/src/components/logos/index.ts +5 -0
  279. package/src/components/logos/microsoft-logo.tsx +10 -0
  280. package/src/components/logos/types.ts +24 -0
  281. package/src/components/navbar/index.ts +9 -0
  282. package/src/components/navbar/navbar.tsx +59 -0
  283. package/src/components/navbar/navbar.types.ts +33 -0
  284. package/src/components/section/index.ts +8 -0
  285. package/src/components/section/section.a11y.ts +12 -0
  286. package/src/components/section/section.tsx +37 -0
  287. package/src/components/section/section.types.ts +22 -0
  288. package/src/components/separator/index.ts +12 -0
  289. package/src/components/separator/separator.a11y.ts +15 -0
  290. package/src/components/separator/separator.tsx +23 -0
  291. package/src/components/separator/separator.types.ts +21 -0
  292. package/src/components/sidebar-layout/index.ts +6 -0
  293. package/src/components/sidebar-layout/sidebar-layout.a11y.ts +16 -0
  294. package/src/components/sidebar-layout/sidebar-layout.tsx +59 -0
  295. package/src/components/sidebar-layout/sidebar-layout.types.ts +22 -0
  296. package/src/components/skeleton/index.ts +3 -0
  297. package/src/components/skeleton/skeleton.a11y.ts +14 -0
  298. package/src/components/skeleton/skeleton.tsx +21 -0
  299. package/src/components/skeleton/skeleton.types.ts +17 -0
  300. package/src/components/spacer/index.ts +9 -0
  301. package/src/components/spacer/spacer.a11y.ts +14 -0
  302. package/src/components/spacer/spacer.tsx +58 -0
  303. package/src/components/spacer/spacer.types.ts +30 -0
  304. package/src/components/spinner/index.ts +2 -0
  305. package/src/components/spinner/spinner.tsx +21 -0
  306. package/src/components/spinner/spinner.types.ts +7 -0
  307. package/src/components/stack/index.ts +3 -0
  308. package/src/components/stack/stack.a11y.ts +15 -0
  309. package/src/components/stack/stack.tsx +13 -0
  310. package/src/components/stack/stack.types.ts +21 -0
  311. package/src/components/theme/index.ts +10 -0
  312. package/src/components/theme/theme.tsx +260 -0
  313. package/src/components/topbar-layout/index.ts +3 -0
  314. package/src/components/topbar-layout/topbar-layout.a11y.ts +14 -0
  315. package/src/components/topbar-layout/topbar-layout.tsx +39 -0
  316. package/src/components/topbar-layout/topbar-layout.types.ts +13 -0
  317. package/src/css.d.ts +1 -0
  318. package/src/index.css +1 -0
  319. package/src/jsx.d.ts +23 -0
  320. package/src/themes/default/index.css +48 -0
  321. package/src/themes/default/styles/actions/button.css +196 -0
  322. package/src/themes/default/styles/actions/toggle-group.css +52 -0
  323. package/src/themes/default/styles/actions/toggle.css +44 -0
  324. package/src/themes/default/styles/base/icon.css +10 -0
  325. package/src/themes/default/styles/base/typography.css +208 -0
  326. package/src/themes/default/styles/base/utilities.css +223 -0
  327. package/src/themes/default/styles/disclosure/accordion.css +62 -0
  328. package/src/themes/default/styles/disclosure/collapsible.css +47 -0
  329. package/src/themes/default/styles/display/avatar.css +25 -0
  330. package/src/themes/default/styles/display/badge.css +51 -0
  331. package/src/themes/default/styles/display/card.css +53 -0
  332. package/src/themes/default/styles/display/coverage.css +248 -0
  333. package/src/themes/default/styles/display/progress-circle.css +18 -0
  334. package/src/themes/default/styles/display/progress.css +18 -0
  335. package/src/themes/default/styles/display/scroll-area.css +34 -0
  336. package/src/themes/default/styles/display/separator.css +15 -0
  337. package/src/themes/default/styles/display/skeleton.css +6 -0
  338. package/src/themes/default/styles/display/spinner.css +9 -0
  339. package/src/themes/default/styles/display/table.css +63 -0
  340. package/src/themes/default/styles/forms/checkbox.css +64 -0
  341. package/src/themes/default/styles/forms/form.css +5 -0
  342. package/src/themes/default/styles/forms/input.css +49 -0
  343. package/src/themes/default/styles/forms/label.css +6 -0
  344. package/src/themes/default/styles/forms/radio-group.css +53 -0
  345. package/src/themes/default/styles/forms/select.css +143 -0
  346. package/src/themes/default/styles/forms/slider.css +75 -0
  347. package/src/themes/default/styles/forms/switch.css +70 -0
  348. package/src/themes/default/styles/forms/textarea.css +37 -0
  349. package/src/themes/default/styles/layout/aspect-ratio.css +5 -0
  350. package/src/themes/default/styles/layout/dashboard-layout.css +15 -0
  351. package/src/themes/default/styles/layout/docs-layout.css +10 -0
  352. package/src/themes/default/styles/layout/layout.css +946 -0
  353. package/src/themes/default/styles/layout/patterns.css +43 -0
  354. package/src/themes/default/styles/layout/responsive-layout.css +209 -0
  355. package/src/themes/default/styles/layout/sidebar.css +10 -0
  356. package/src/themes/default/styles/navigation/breadcrumb.css +39 -0
  357. package/src/themes/default/styles/navigation/menu.css +60 -0
  358. package/src/themes/default/styles/navigation/menubar.css +89 -0
  359. package/src/themes/default/styles/navigation/navigation-menu.css +90 -0
  360. package/src/themes/default/styles/navigation/tabs.css +61 -0
  361. package/src/themes/default/styles/overlays/alert-dialog.css +9 -0
  362. package/src/themes/default/styles/overlays/dialog.css +116 -0
  363. package/src/themes/default/styles/overlays/dropdown-menu.css +109 -0
  364. package/src/themes/default/styles/overlays/hover-card.css +46 -0
  365. package/src/themes/default/styles/overlays/popover.css +72 -0
  366. package/src/themes/default/styles/overlays/toast.css +123 -0
  367. package/src/themes/default/styles/overlays/tooltip.css +83 -0
  368. package/src/themes/default/styles/shell/header.css +36 -0
  369. package/src/themes/default/styles/shell/navbar.css +158 -0
  370. package/src/themes/default/styles/shell/theme.css +35 -0
  371. package/src/themes/default/tokens.css +316 -0
  372. package/templates/theme/index.css +48 -0
  373. package/templates/theme/styles/actions/button.css +196 -0
  374. package/templates/theme/styles/actions/toggle-group.css +52 -0
  375. package/templates/theme/styles/actions/toggle.css +44 -0
  376. package/templates/theme/styles/base/icon.css +10 -0
  377. package/templates/theme/styles/base/typography.css +208 -0
  378. package/templates/theme/styles/base/utilities.css +19 -0
  379. package/templates/theme/styles/disclosure/accordion.css +62 -0
  380. package/templates/theme/styles/disclosure/collapsible.css +47 -0
  381. package/templates/theme/styles/display/avatar.css +25 -0
  382. package/templates/theme/styles/display/badge.css +51 -0
  383. package/templates/theme/styles/display/card.css +53 -0
  384. package/templates/theme/styles/display/coverage.css +146 -0
  385. package/templates/theme/styles/display/progress-circle.css +18 -0
  386. package/templates/theme/styles/display/progress.css +18 -0
  387. package/templates/theme/styles/display/scroll-area.css +34 -0
  388. package/templates/theme/styles/display/separator.css +15 -0
  389. package/templates/theme/styles/display/skeleton.css +6 -0
  390. package/templates/theme/styles/display/spinner.css +9 -0
  391. package/templates/theme/styles/display/table.css +63 -0
  392. package/templates/theme/styles/forms/checkbox.css +64 -0
  393. package/templates/theme/styles/forms/form.css +5 -0
  394. package/templates/theme/styles/forms/input.css +49 -0
  395. package/templates/theme/styles/forms/label.css +6 -0
  396. package/templates/theme/styles/forms/radio-group.css +53 -0
  397. package/templates/theme/styles/forms/select.css +143 -0
  398. package/templates/theme/styles/forms/slider.css +75 -0
  399. package/templates/theme/styles/forms/switch.css +70 -0
  400. package/templates/theme/styles/forms/textarea.css +37 -0
  401. package/templates/theme/styles/layout/aspect-ratio.css +5 -0
  402. package/templates/theme/styles/layout/dashboard-layout.css +16 -0
  403. package/templates/theme/styles/layout/docs-layout.css +11 -0
  404. package/templates/theme/styles/layout/layout.css +1 -0
  405. package/templates/theme/styles/layout/patterns.css +43 -0
  406. package/templates/theme/styles/layout/responsive-layout.css +209 -0
  407. package/templates/theme/styles/layout/sidebar.css +11 -0
  408. package/templates/theme/styles/navigation/breadcrumb.css +31 -0
  409. package/templates/theme/styles/navigation/menu.css +60 -0
  410. package/templates/theme/styles/navigation/menubar.css +89 -0
  411. package/templates/theme/styles/navigation/navigation-menu.css +90 -0
  412. package/templates/theme/styles/navigation/tabs.css +61 -0
  413. package/templates/theme/styles/overlays/alert-dialog.css +9 -0
  414. package/templates/theme/styles/overlays/dialog.css +116 -0
  415. package/templates/theme/styles/overlays/dropdown-menu.css +109 -0
  416. package/templates/theme/styles/overlays/hover-card.css +46 -0
  417. package/templates/theme/styles/overlays/popover.css +72 -0
  418. package/templates/theme/styles/overlays/toast.css +123 -0
  419. package/templates/theme/styles/overlays/tooltip.css +83 -0
  420. package/templates/theme/styles/shell/header.css +36 -0
  421. package/templates/theme/styles/shell/navbar.css +158 -0
  422. package/templates/theme/styles/shell/theme.css +35 -0
  423. package/templates/theme/tokens.css +316 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.js","names":[],"sources":["../../src/components/container/container.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutStyle,\n} from \"../_internal/box-layout\";\nimport {\n isResponsiveValue,\n resolveContainerSizeValue,\n resolveInlineAlignValue,\n resolveSpaceValue,\n serializeResponsiveValueIf,\n setResponsiveStyleVar,\n} from \"../_internal/layout\";\nimport type { ContainerAsChildProps, ContainerNativeProps } from \"./container.types\";\n\nconst CONTAINER_WIDTH_TOKENS = new Set([\"1\", \"2\", \"3\", \"4\", \"sm\", \"md\", \"lg\", \"xl\"]);\n\nfunction isContainerWidthToken(value: unknown): value is string {\n return typeof value === \"string\" && CONTAINER_WIDTH_TOKENS.has(value.trim());\n}\n\nfunction isContainerAlignToken(value: unknown): value is \"left\" | \"center\" | \"right\" {\n return typeof value === \"string\" && [\"left\", \"center\", \"right\"].includes(value.trim());\n}\n\nfunction hasStyleValue(value: unknown): boolean {\n if (typeof value === \"string\") return value.trim().length > 0;\n if (value && typeof value === \"object\") {\n return Object.keys(value as Record<string, unknown>).length > 0;\n }\n\n return false;\n}\n\nfunction isStaticValue(value: unknown): boolean {\n return !isResponsiveValue(value as Record<string, unknown> | undefined);\n}\n\nexport function Container(props: ContainerNativeProps): JSX.Element;\nexport function Container(props: ContainerAsChildProps): JSX.Element;\nexport function Container(props: ContainerNativeProps | ContainerAsChildProps) {\n const {\n asChild,\n children,\n variant,\n fluid = false,\n maxWidth,\n padding,\n size,\n align = \"center\",\n ref,\n style: userStyle,\n ...rest\n } = props;\n\n const responsiveVariant =\n fluid || (size === undefined && maxWidth === undefined)\n ? fluid\n ? \"fluid\"\n : (variant ?? \"default\")\n : undefined;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const layoutStyle: Record<string, string | number> = {\n boxSizing: \"border-box\",\n width: \"100%\",\n };\n applyBoxLayoutStyles(layoutStyle, boxProps);\n\n const widthValue = fluid ? undefined : (maxWidth ?? size);\n const usesInlineMaxWidth =\n boxProps.maxWidth === undefined &&\n widthValue !== undefined &&\n (isResponsiveValue(widthValue) || !isContainerWidthToken(widthValue));\n\n if (usesInlineMaxWidth) {\n setResponsiveStyleVar(layoutStyle, \"max-width\", widthValue, (value) =>\n typeof value === \"string\" && isContainerWidthToken(value)\n ? resolveContainerSizeValue(value)\n : value,\n );\n }\n\n if (\n padding !== undefined &&\n boxProps.px === undefined &&\n boxProps.pl === undefined &&\n boxProps.pr === undefined\n ) {\n setResponsiveStyleVar(layoutStyle, \"px\", padding, resolveSpaceValue);\n }\n\n const applyAlign = (side: \"marginLeft\" | \"marginRight\", value: typeof align) => {\n setResponsiveStyleVar(layoutStyle, side === \"marginLeft\" ? \"ml\" : \"mr\", value, (input) => {\n const margins = resolveInlineAlignValue(input);\n return side === \"marginLeft\" ? margins.marginLeft : margins.marginRight;\n });\n };\n\n if (boxProps.ml === undefined && boxProps.mr === undefined && isResponsiveValue(align)) {\n applyAlign(\"marginLeft\", align);\n applyAlign(\"marginRight\", align);\n }\n\n const mergedStyle =\n Object.keys(layoutStyle).length > 2 || hasStyleValue(userStyle)\n ? withBoxLayoutStyle(layoutStyle, userStyle)\n : undefined;\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": \"container\",\n \"data-ak-layout\": \"true\",\n \"data-variant\": responsiveVariant,\n \"data-fluid\": fluid ? \"true\" : undefined,\n \"data-size\": fluid\n ? undefined\n : isStaticValue(size)\n ? serializeResponsiveValueIf(size, isContainerWidthToken)\n : undefined,\n \"data-align\": isStaticValue(align)\n ? serializeResponsiveValueIf(align, isContainerAlignToken)\n : undefined,\n \"data-max-width\": fluid\n ? undefined\n : isStaticValue(maxWidth)\n ? serializeResponsiveValueIf(maxWidth, isContainerWidthToken)\n : undefined,\n style: mergedStyle,\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;;AAiBA,MAAM,yBAAyB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAM;CAAM;CAAM;CAAK,CAAC;AAEpF,SAAS,sBAAsB,OAAiC;AAC9D,QAAO,OAAO,UAAU,YAAY,uBAAuB,IAAI,MAAM,MAAM,CAAC;;AAG9E,SAAS,sBAAsB,OAAsD;AACnF,QAAO,OAAO,UAAU,YAAY;EAAC;EAAQ;EAAU;EAAQ,CAAC,SAAS,MAAM,MAAM,CAAC;;AAGxF,SAAS,cAAc,OAAyB;AAC9C,KAAI,OAAO,UAAU,SAAU,QAAO,MAAM,MAAM,CAAC,SAAS;AAC5D,KAAI,SAAS,OAAO,UAAU,SAC5B,QAAO,OAAO,KAAK,MAAiC,CAAC,SAAS;AAGhE,QAAO;;AAGT,SAAS,cAAc,OAAyB;AAC9C,QAAO,CAAC,kBAAkB,MAA6C;;AAKzE,SAAgB,UAAU,OAAqD;CAC7E,MAAM,EACJ,SACA,UACA,SACA,QAAQ,OACR,UACA,SACA,MACA,QAAQ,UACR,KACA,OAAO,WACP,GAAG,SACD;CAEJ,MAAM,oBACJ,SAAU,SAAS,KAAA,KAAa,aAAa,KAAA,IACzC,QACE,UACC,WAAW,YACd,KAAA;CAEN,MAAM,EAAE,UAAU,MAAM,qBAAqB,oBAAoB,KAAK;CACtE,MAAM,cAA+C;EACnD,WAAW;EACX,OAAO;EACR;AACD,sBAAqB,aAAa,SAAS;CAE3C,MAAM,aAAa,QAAQ,KAAA,IAAa,YAAY;AAMpD,KAJE,SAAS,aAAa,KAAA,KACtB,eAAe,KAAA,MACd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BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types.js";
2
+ import { JSXElement, Ref } from "@askrjs/askr/foundations";
3
+
4
+ //#region src/components/container/container.types.d.ts
5
+ type ContainerVariant = "default" | "sm" | "md" | "lg" | "xl" | "xxl" | "fluid";
6
+ type ContainerOwnProps = BoxLayoutOwnProps & {
7
+ /** Bootstrap-like responsive container variant. */variant?: ContainerVariant; /** Makes the container span the full available width while preserving gutters. */
8
+ fluid?: boolean; /** Radix-style container size token. */
9
+ size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl">; /** Horizontal alignment of the constrained container. */
10
+ align?: LayoutResponsive<"left" | "center" | "right">; /** Compatibility max-width override. */
11
+ maxWidth?: LayoutResponsive<string>; /** Compatibility horizontal padding override. */
12
+ padding?: LayoutResponsive<string | number>;
13
+ children?: unknown;
14
+ };
15
+ type ContainerNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & ContainerOwnProps & {
16
+ asChild?: false;
17
+ ref?: Ref<HTMLDivElement>;
18
+ };
19
+ type ContainerAsChildProps = ContainerOwnProps & {
20
+ asChild: true;
21
+ children: JSXElement;
22
+ ref?: Ref<unknown>;
23
+ style?: JSX.IntrinsicElements["div"]["style"];
24
+ };
25
+ type ContainerProps = ContainerNativeProps | ContainerAsChildProps;
26
+ //#endregion
27
+ export { ContainerAsChildProps, ContainerNativeProps, ContainerOwnProps, ContainerProps, ContainerVariant };
28
+ //# sourceMappingURL=container.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { ContainerAsChildProps, ContainerNativeProps, ContainerOwnProps, ContainerProps, ContainerVariant } from "./container.types.js";
2
+ import { Container } from "./container.js";
@@ -0,0 +1,7 @@
1
+ import { EmptyStateProps } from "./empty-state.types.js";
2
+
3
+ //#region src/components/empty-state/empty-state.d.ts
4
+ declare function EmptyState(props: EmptyStateProps): JSX.Element;
5
+ //#endregion
6
+ export { EmptyState };
7
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { classes } from "../_internal/classes.js";
2
+ import { jsx, jsxs } from "@askrjs/askr/jsx-runtime";
3
+ //#region src/components/empty-state/empty-state.tsx
4
+ function EmptyState(props) {
5
+ const { icon, title, titleAs: TitleTag = "h2", description, actions, children, ref, class: className, ...rest } = props;
6
+ return /* @__PURE__ */ jsxs("div", {
7
+ ...rest,
8
+ ref,
9
+ class: classes("empty-state", className),
10
+ "data-slot": "empty-state",
11
+ children: [
12
+ icon !== void 0 ? /* @__PURE__ */ jsx("div", {
13
+ class: "empty-state-icon",
14
+ "data-slot": "empty-state-icon",
15
+ children: icon
16
+ }) : null,
17
+ title !== void 0 ? /* @__PURE__ */ jsx(TitleTag, {
18
+ class: "empty-state-title",
19
+ "data-slot": "empty-state-title",
20
+ children: title
21
+ }) : null,
22
+ description !== void 0 ? /* @__PURE__ */ jsx("p", {
23
+ class: "empty-state-description",
24
+ "data-slot": "empty-state-description",
25
+ children: description
26
+ }) : null,
27
+ children,
28
+ actions !== void 0 ? /* @__PURE__ */ jsx("div", {
29
+ class: "empty-state-actions",
30
+ "data-slot": "empty-state-actions",
31
+ children: actions
32
+ }) : null
33
+ ]
34
+ });
35
+ }
36
+ //#endregion
37
+ export { EmptyState };
38
+
39
+ //# sourceMappingURL=empty-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.js","names":[],"sources":["../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import { classes } from \"../_internal/classes\";\nimport type { EmptyStateProps } from \"./empty-state.types\";\n\nexport function EmptyState(props: EmptyStateProps): JSX.Element {\n const {\n icon,\n title,\n titleAs: TitleTag = \"h2\",\n description,\n actions,\n children,\n ref,\n class: className,\n ...rest\n } = props;\n\n return (\n <div {...rest} ref={ref} class={classes(\"empty-state\", className)} data-slot=\"empty-state\">\n {icon !== undefined ? (\n <div class=\"empty-state-icon\" data-slot=\"empty-state-icon\">\n {icon}\n </div>\n ) : null}\n {title !== undefined ? (\n <TitleTag class=\"empty-state-title\" data-slot=\"empty-state-title\">\n {title}\n </TitleTag>\n ) : null}\n {description !== undefined ? (\n <p class=\"empty-state-description\" data-slot=\"empty-state-description\">\n {description}\n </p>\n ) : null}\n {children}\n {actions !== undefined ? (\n <div class=\"empty-state-actions\" data-slot=\"empty-state-actions\">\n {actions}\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;AAGA,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EACJ,MACA,OACA,SAAS,WAAW,MACpB,aACA,SACA,UACA,KACA,OAAO,WACP,GAAG,SACD;AAEJ,QACE,qBAAC,OAAD;EAAK,GAAI;EAAW;EAAK,OAAO,QAAQ,eAAe,UAAU;EAAE,aAAU;YAA7E;GACG,SAAS,KAAA,IACR,oBAAC,OAAD;IAAK,OAAM;IAAmB,aAAU;cACrC;IACG,CAAA,GACJ;GACH,UAAU,KAAA,IACT,oBAAC,UAAD;IAAU,OAAM;IAAoB,aAAU;cAC3C;IACQ,CAAA,GACT;GACH,gBAAgB,KAAA,IACf,oBAAC,KAAD;IAAG,OAAM;IAA0B,aAAU;cAC1C;IACC,CAAA,GACF;GACH;GACA,YAAY,KAAA,IACX,oBAAC,OAAD;IAAK,OAAM;IAAsB,aAAU;cACxC;IACG,CAAA,GACJ;GACA"}
@@ -0,0 +1,13 @@
1
+ //#region src/components/empty-state/empty-state.types.d.ts
2
+ type EmptyStateHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
3
+ type EmptyStateProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
4
+ icon?: unknown;
5
+ title?: unknown;
6
+ titleAs?: EmptyStateHeadingTag;
7
+ description?: unknown;
8
+ actions?: unknown;
9
+ children?: unknown;
10
+ };
11
+ //#endregion
12
+ export { EmptyStateHeadingTag, EmptyStateProps };
13
+ //# sourceMappingURL=empty-state.types.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { FlexAsChildProps, FlexDivProps, FlexSpanProps } from "./flex.types.js";
2
+
3
+ //#region src/components/flex/flex.d.ts
4
+ declare function Flex(props: FlexDivProps): JSX.Element;
5
+ declare function Flex(props: FlexSpanProps): JSX.Element;
6
+ declare function Flex(props: FlexAsChildProps): JSX.Element;
7
+ //#endregion
8
+ export { Flex };
9
+ //# sourceMappingURL=flex.d.ts.map
@@ -0,0 +1,114 @@
1
+ import { mergeProps } from "../_internal/merge-props.js";
2
+ import { isResponsiveValue, resolveAlignValue, resolveJustifyValue, resolveSpaceValue, serializeResponsiveValueIf, setResponsiveStyleVar } from "../_internal/layout.js";
3
+ import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutStyle } from "../_internal/box-layout.js";
4
+ import { jsx } from "@askrjs/askr/jsx-runtime";
5
+ import { Slot } from "@askrjs/askr/foundations";
6
+ //#region src/components/flex/flex.tsx
7
+ const SPACE_TOKENS = new Set([
8
+ "1",
9
+ "2",
10
+ "3",
11
+ "4",
12
+ "5",
13
+ "6",
14
+ "7",
15
+ "8",
16
+ "9",
17
+ "xs",
18
+ "sm",
19
+ "md",
20
+ "lg",
21
+ "xl",
22
+ "2xl",
23
+ "3xl"
24
+ ]);
25
+ function isResponsiveObject(value) {
26
+ return value !== null && typeof value === "object" && !Array.isArray(value);
27
+ }
28
+ function isCssCoveredSpaceValue(value) {
29
+ return typeof value === "string" && SPACE_TOKENS.has(value.trim());
30
+ }
31
+ function isCssCoveredDirectionValue(value) {
32
+ return typeof value === "string" && [
33
+ "row",
34
+ "column",
35
+ "row-reverse",
36
+ "column-reverse"
37
+ ].includes(value.trim());
38
+ }
39
+ function isCssCoveredAlignValue(value) {
40
+ return typeof value === "string" && [
41
+ "start",
42
+ "end",
43
+ "center",
44
+ "stretch",
45
+ "baseline"
46
+ ].includes(value.trim());
47
+ }
48
+ function isCssCoveredJustifyValue(value) {
49
+ return typeof value === "string" && [
50
+ "start",
51
+ "end",
52
+ "center",
53
+ "between"
54
+ ].includes(value.trim());
55
+ }
56
+ function isCssCoveredWrapValue(value) {
57
+ return typeof value === "string" && [
58
+ "wrap",
59
+ "nowrap",
60
+ "wrap-reverse"
61
+ ].includes(value.trim());
62
+ }
63
+ function serializeStaticThemeValue(value, predicate) {
64
+ if (isResponsiveValue(value)) return void 0;
65
+ return serializeResponsiveValueIf(value, predicate);
66
+ }
67
+ const SLOTS = { root: "flex" };
68
+ function Flex(props) {
69
+ const as = "as" in props ? props.as : "div";
70
+ const { asChild, children, direction = "row", gap, gapX, gapY, align, justify, wrap, collapseBelow, ref, style: userStyle, ...rest } = props;
71
+ const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
72
+ const rootSlot = typeof passthroughProps["data-slot"] === "string" ? String(passthroughProps["data-slot"]) : SLOTS.root;
73
+ const layoutStyle = {};
74
+ applyBoxLayoutStyles(layoutStyle, boxProps);
75
+ if (boxProps.display !== void 0) setResponsiveStyleVar(layoutStyle, "display", boxProps.display, (value) => value);
76
+ if (direction !== "row" && (!isCssCoveredDirectionValue(direction) || isResponsiveObject(direction))) setResponsiveStyleVar(layoutStyle, "flex-direction", direction, (value) => value);
77
+ if (!isCssCoveredSpaceValue(gap) || isResponsiveObject(gap)) setResponsiveStyleVar(layoutStyle, "gap", gap, resolveSpaceValue);
78
+ if (!isCssCoveredSpaceValue(gapX) || isResponsiveObject(gapX)) setResponsiveStyleVar(layoutStyle, "column-gap", gapX, resolveSpaceValue);
79
+ if (!isCssCoveredSpaceValue(gapY) || isResponsiveObject(gapY)) setResponsiveStyleVar(layoutStyle, "row-gap", gapY, resolveSpaceValue);
80
+ if (!isCssCoveredAlignValue(align) || isResponsiveObject(align)) setResponsiveStyleVar(layoutStyle, "align-items", align, resolveAlignValue);
81
+ if (!isCssCoveredJustifyValue(justify) || isResponsiveObject(justify)) setResponsiveStyleVar(layoutStyle, "justify-content", justify, resolveJustifyValue);
82
+ if (!isCssCoveredWrapValue(wrap) || isResponsiveObject(wrap)) setResponsiveStyleVar(layoutStyle, "flex-wrap", wrap, (value) => value);
83
+ const finalProps = mergeProps(passthroughProps, {
84
+ ref,
85
+ "data-slot": rootSlot,
86
+ "data-ak-layout": "true",
87
+ "data-direction": serializeStaticThemeValue(direction, isCssCoveredDirectionValue),
88
+ "data-gap": serializeStaticThemeValue(gap, isCssCoveredSpaceValue),
89
+ "data-gap-x": serializeStaticThemeValue(gapX, isCssCoveredSpaceValue),
90
+ "data-gap-y": serializeStaticThemeValue(gapY, isCssCoveredSpaceValue),
91
+ "data-align": serializeStaticThemeValue(align, isCssCoveredAlignValue),
92
+ "data-justify": serializeStaticThemeValue(justify, isCssCoveredJustifyValue),
93
+ "data-wrap": serializeStaticThemeValue(wrap, isCssCoveredWrapValue),
94
+ "data-collapse-below": collapseBelow,
95
+ style: withBoxLayoutStyle(layoutStyle, userStyle)
96
+ });
97
+ if (asChild) return /* @__PURE__ */ jsx(Slot, {
98
+ asChild: true,
99
+ ...finalProps,
100
+ children
101
+ });
102
+ if (as === "span") return /* @__PURE__ */ jsx("span", {
103
+ ...finalProps,
104
+ children
105
+ });
106
+ return /* @__PURE__ */ jsx("div", {
107
+ ...finalProps,
108
+ children
109
+ });
110
+ }
111
+ //#endregion
112
+ export { Flex };
113
+
114
+ //# sourceMappingURL=flex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.js","names":[],"sources":["../../src/components/flex/flex.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutStyle,\n} from \"../_internal/box-layout\";\nimport {\n isResponsiveValue,\n resolveAlignValue,\n resolveJustifyValue,\n resolveSpaceValue,\n serializeResponsiveValueIf,\n setResponsiveStyleVar,\n} from \"../_internal/layout\";\nimport type { FlexAsChildProps, FlexDivProps, FlexSpanProps } from \"./flex.types\";\n\nconst SPACE_TOKENS = new Set([\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"2xl\",\n \"3xl\",\n]);\n\nfunction isResponsiveObject(value: unknown): boolean {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction isCssCoveredSpaceValue(value: unknown): value is string {\n return typeof value === \"string\" && SPACE_TOKENS.has(value.trim());\n}\n\nfunction isCssCoveredDirectionValue(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n [\"row\", \"column\", \"row-reverse\", \"column-reverse\"].includes(value.trim())\n );\n}\n\nfunction isCssCoveredAlignValue(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n [\"start\", \"end\", \"center\", \"stretch\", \"baseline\"].includes(value.trim())\n );\n}\n\nfunction isCssCoveredJustifyValue(value: unknown): value is string {\n return typeof value === \"string\" && [\"start\", \"end\", \"center\", \"between\"].includes(value.trim());\n}\n\nfunction isCssCoveredWrapValue(value: unknown): value is string {\n return typeof value === \"string\" && [\"wrap\", \"nowrap\", \"wrap-reverse\"].includes(value.trim());\n}\n\nfunction serializeStaticThemeValue<T>(\n value: T | Partial<Record<\"initial\" | \"sm\" | \"md\" | \"lg\" | \"xl\", T>> | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n if (isResponsiveValue(value)) return undefined;\n return serializeResponsiveValueIf(value, predicate);\n}\n\nconst SLOTS = {\n root: \"flex\",\n} as const;\n\nexport function Flex(props: FlexDivProps): JSX.Element;\nexport function Flex(props: FlexSpanProps): JSX.Element;\nexport function Flex(props: FlexAsChildProps): JSX.Element;\nexport function Flex(props: FlexDivProps | FlexSpanProps | FlexAsChildProps) {\n const as = \"as\" in props ? props.as : \"div\";\n const {\n asChild,\n children,\n direction = \"row\",\n gap,\n gapX,\n gapY,\n align,\n justify,\n wrap,\n collapseBelow,\n ref,\n style: userStyle,\n ...rest\n } = props;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const rootSlot =\n typeof (passthroughProps as Record<string, unknown>)[\"data-slot\"] === \"string\"\n ? String((passthroughProps as Record<string, unknown>)[\"data-slot\"])\n : SLOTS.root;\n const layoutStyle: Record<string, string | number> = {};\n applyBoxLayoutStyles(layoutStyle, boxProps);\n\n if (boxProps.display !== undefined) {\n setResponsiveStyleVar(layoutStyle, \"display\", boxProps.display, (value) => value);\n }\n if (\n direction !== \"row\" &&\n (!isCssCoveredDirectionValue(direction) || isResponsiveObject(direction))\n ) {\n setResponsiveStyleVar(layoutStyle, \"flex-direction\", direction, (value) => value);\n }\n if (!isCssCoveredSpaceValue(gap) || isResponsiveObject(gap)) {\n setResponsiveStyleVar(layoutStyle, \"gap\", gap, resolveSpaceValue);\n }\n if (!isCssCoveredSpaceValue(gapX) || isResponsiveObject(gapX)) {\n setResponsiveStyleVar(layoutStyle, \"column-gap\", gapX, resolveSpaceValue);\n }\n if (!isCssCoveredSpaceValue(gapY) || isResponsiveObject(gapY)) {\n setResponsiveStyleVar(layoutStyle, \"row-gap\", gapY, resolveSpaceValue);\n }\n if (!isCssCoveredAlignValue(align) || isResponsiveObject(align)) {\n setResponsiveStyleVar(layoutStyle, \"align-items\", align, resolveAlignValue);\n }\n if (!isCssCoveredJustifyValue(justify) || isResponsiveObject(justify)) {\n setResponsiveStyleVar(layoutStyle, \"justify-content\", justify, resolveJustifyValue);\n }\n if (!isCssCoveredWrapValue(wrap) || isResponsiveObject(wrap)) {\n setResponsiveStyleVar(layoutStyle, \"flex-wrap\", wrap, (value) => value);\n }\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": rootSlot,\n \"data-ak-layout\": \"true\",\n \"data-direction\": serializeStaticThemeValue(direction, isCssCoveredDirectionValue),\n \"data-gap\": serializeStaticThemeValue(gap, isCssCoveredSpaceValue),\n \"data-gap-x\": serializeStaticThemeValue(gapX, isCssCoveredSpaceValue),\n \"data-gap-y\": serializeStaticThemeValue(gapY, isCssCoveredSpaceValue),\n \"data-align\": serializeStaticThemeValue(align, isCssCoveredAlignValue),\n \"data-justify\": serializeStaticThemeValue(justify, isCssCoveredJustifyValue),\n \"data-wrap\": serializeStaticThemeValue(wrap, isCssCoveredWrapValue),\n \"data-collapse-below\": collapseBelow,\n style: withBoxLayoutStyle(layoutStyle, userStyle),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n if (as === \"span\") {\n return <span {...finalProps}>{children}</span>;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;;AAiBA,MAAM,eAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,SAAS,mBAAmB,OAAyB;AACnD,QAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM;;AAG7E,SAAS,uBAAuB,OAAiC;AAC/D,QAAO,OAAO,UAAU,YAAY,aAAa,IAAI,MAAM,MAAM,CAAC;;AAGpE,SAAS,2BAA2B,OAAiC;AACnE,QACE,OAAO,UAAU,YACjB;EAAC;EAAO;EAAU;EAAe;EAAiB,CAAC,SAAS,MAAM,MAAM,CAAC;;AAI7E,SAAS,uBAAuB,OAAiC;AAC/D,QACE,OAAO,UAAU,YACjB;EAAC;EAAS;EAAO;EAAU;EAAW;EAAW,CAAC,SAAS,MAAM,MAAM,CAAC;;AAI5E,SAAS,yBAAyB,OAAiC;AACjE,QAAO,OAAO,UAAU,YAAY;EAAC;EAAS;EAAO;EAAU;EAAU,CAAC,SAAS,MAAM,MAAM,CAAC;;AAGlG,SAAS,sBAAsB,OAAiC;AAC9D,QAAO,OAAO,UAAU,YAAY;EAAC;EAAQ;EAAU;EAAe,CAAC,SAAS,MAAM,MAAM,CAAC;;AAG/F,SAAS,0BACP,OACA,WACoB;AACpB,KAAI,kBAAkB,MAAM,CAAE,QAAO,KAAA;AACrC,QAAO,2BAA2B,OAAO,UAAU;;AAGrD,MAAM,QAAQ,EACZ,MAAM,QACP;AAKD,SAAgB,KAAK,OAAwD;CAC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uBAAuB;EAClE,cAAc,0BAA0B,MAAM,uBAAuB;EACrE,cAAc,0BAA0B,MAAM,uBAAuB;EACrE,cAAc,0BAA0B,OAAO,uBAAuB;EACtE,gBAAgB,0BAA0B,SAAS,yBAAyB;EAC5E,aAAa,0BAA0B,MAAM,sBAAsB;EACnE,uBAAuB;EACvB,OAAO,mBAAmB,aAAa,UAAU;EAClD,CAAC;AAEF,KAAI,QACF,QAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAA2B,CAAA;AAG5E,KAAI,OAAO,OACT,QAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA;AAGhD,QAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types.js";
2
+ import { JSXElement, Ref } from "@askrjs/askr/foundations";
3
+
4
+ //#region src/components/flex/flex.types.d.ts
5
+ type FlexOwnProps = BoxLayoutOwnProps & {
6
+ direction?: LayoutResponsive<"row" | "column" | "row-reverse" | "column-reverse">;
7
+ gap?: LayoutResponsive<string | number>;
8
+ gapX?: LayoutResponsive<string | number>;
9
+ gapY?: LayoutResponsive<string | number>;
10
+ align?: LayoutResponsive<string>;
11
+ justify?: LayoutResponsive<string>;
12
+ wrap?: LayoutResponsive<"wrap" | "nowrap" | "wrap-reverse">;
13
+ /**
14
+ * Compatibility breakpoint helper. Prefer responsive `direction` instead.
15
+ */
16
+ collapseBelow?: string;
17
+ as?: "div" | "span";
18
+ children?: unknown;
19
+ };
20
+ type FlexNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & FlexOwnProps & {
21
+ as?: "div";
22
+ asChild?: false;
23
+ ref?: Ref<HTMLDivElement>;
24
+ };
25
+ type FlexSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & FlexOwnProps & {
26
+ as: "span";
27
+ asChild?: false;
28
+ ref?: Ref<HTMLSpanElement>;
29
+ };
30
+ type FlexAsChildProps = Omit<FlexOwnProps, "as"> & {
31
+ asChild: true;
32
+ children: JSXElement;
33
+ ref?: Ref<unknown>;
34
+ style?: JSX.IntrinsicElements["div"]["style"];
35
+ };
36
+ type FlexDivProps = FlexNativeProps;
37
+ type FlexProps = FlexDivProps | FlexSpanProps | FlexAsChildProps;
38
+ type InlineProps = FlexProps;
39
+ //#endregion
40
+ export { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps };
41
+ //# sourceMappingURL=flex.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps } from "./flex.types.js";
2
+ import { Flex } from "./flex.js";
@@ -0,0 +1,9 @@
1
+ import { GridAsChildProps, GridDivProps, GridSpanProps } from "./grid.types.js";
2
+
3
+ //#region src/components/grid/grid.d.ts
4
+ declare function Grid(props: GridDivProps): JSX.Element;
5
+ declare function Grid(props: GridSpanProps): JSX.Element;
6
+ declare function Grid(props: GridAsChildProps): JSX.Element;
7
+ //#endregion
8
+ export { Grid };
9
+ //# sourceMappingURL=grid.d.ts.map
@@ -0,0 +1,115 @@
1
+ import { mergeProps } from "../_internal/merge-props.js";
2
+ import { isResponsiveValue, resolveAlignValue, resolveGridTrackValue, resolveJustifyValue, resolveSpaceValue, serializeResponsiveValueIf, serializeValueIf, setResponsiveStyleVar } from "../_internal/layout.js";
3
+ import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutStyle } from "../_internal/box-layout.js";
4
+ import { isJsxElement, toChildArray } from "../_internal/jsx.js";
5
+ import { For } from "@askrjs/askr";
6
+ import { jsx } from "@askrjs/askr/jsx-runtime";
7
+ import { Slot } from "@askrjs/askr/foundations";
8
+ //#region src/components/grid/grid.tsx
9
+ const SPACE_TOKENS = new Set([
10
+ "1",
11
+ "2",
12
+ "3",
13
+ "4",
14
+ "5",
15
+ "6",
16
+ "7",
17
+ "8",
18
+ "9",
19
+ "xs",
20
+ "sm",
21
+ "md",
22
+ "lg",
23
+ "xl",
24
+ "2xl",
25
+ "3xl"
26
+ ]);
27
+ function isResponsiveObject(value) {
28
+ return value !== null && typeof value === "object" && !Array.isArray(value);
29
+ }
30
+ function isCssCoveredSpaceValue(value) {
31
+ return typeof value === "string" && SPACE_TOKENS.has(value.trim());
32
+ }
33
+ function isCssCoveredAlignValue(value) {
34
+ return typeof value === "string" && [
35
+ "start",
36
+ "end",
37
+ "center",
38
+ "stretch",
39
+ "baseline"
40
+ ].includes(value.trim());
41
+ }
42
+ function isCssCoveredJustifyValue(value) {
43
+ return typeof value === "string" && [
44
+ "start",
45
+ "end",
46
+ "center",
47
+ "between"
48
+ ].includes(value.trim());
49
+ }
50
+ function isCssCoveredGridColumnValue(value) {
51
+ return typeof value === "number" || typeof value === "string" && /^\d+$/.test(value.trim());
52
+ }
53
+ function isCssCoveredAutoFitValue(value) {
54
+ return typeof value === "boolean";
55
+ }
56
+ function serializeStaticThemeValue(value, predicate) {
57
+ if (isResponsiveValue(value)) return void 0;
58
+ return serializeResponsiveValueIf(value, predicate);
59
+ }
60
+ function resolveCompatibilityGridTemplate(minItemWidth, autoFit) {
61
+ if (!minItemWidth) return void 0;
62
+ return `repeat(${autoFit === false ? "auto-fill" : "auto-fit"}, minmax(${minItemWidth}, 1fr))`;
63
+ }
64
+ function Grid(props) {
65
+ const as = "as" in props ? props.as : "div";
66
+ const { asChild, children, areas, columns, rows, flow, gap, gapX, gapY, align, justify, minItemWidth, autoFit, ref, style: userStyle, ...rest } = props;
67
+ const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
68
+ const layoutStyle = {};
69
+ applyBoxLayoutStyles(layoutStyle, boxProps);
70
+ if (boxProps.display !== void 0) setResponsiveStyleVar(layoutStyle, "display", boxProps.display, (value) => value);
71
+ setResponsiveStyleVar(layoutStyle, "grid-template-areas", areas, (value) => value);
72
+ setResponsiveStyleVar(layoutStyle, "grid-template-columns", columns ?? resolveCompatibilityGridTemplate(minItemWidth, autoFit), resolveGridTrackValue);
73
+ setResponsiveStyleVar(layoutStyle, "grid-template-rows", rows, resolveGridTrackValue);
74
+ setResponsiveStyleVar(layoutStyle, "grid-auto-flow", flow, (value) => value);
75
+ if (!isCssCoveredSpaceValue(gap) || isResponsiveObject(gap)) setResponsiveStyleVar(layoutStyle, "gap", gap, resolveSpaceValue);
76
+ if (!isCssCoveredSpaceValue(gapX) || isResponsiveObject(gapX)) setResponsiveStyleVar(layoutStyle, "column-gap", gapX, resolveSpaceValue);
77
+ if (!isCssCoveredSpaceValue(gapY) || isResponsiveObject(gapY)) setResponsiveStyleVar(layoutStyle, "row-gap", gapY, resolveSpaceValue);
78
+ if (!isCssCoveredAlignValue(align) || isResponsiveObject(align)) setResponsiveStyleVar(layoutStyle, "align-items", align, resolveAlignValue);
79
+ if (!isCssCoveredJustifyValue(justify) || isResponsiveObject(justify)) setResponsiveStyleVar(layoutStyle, "justify-content", justify, resolveJustifyValue);
80
+ const finalProps = mergeProps(passthroughProps, {
81
+ ref,
82
+ "data-slot": "grid",
83
+ "data-ak-layout": "true",
84
+ "data-columns": serializeStaticThemeValue(columns, isCssCoveredGridColumnValue),
85
+ "data-gap": serializeStaticThemeValue(gap, isCssCoveredSpaceValue),
86
+ "data-gap-x": serializeStaticThemeValue(gapX, isCssCoveredSpaceValue),
87
+ "data-gap-y": serializeStaticThemeValue(gapY, isCssCoveredSpaceValue),
88
+ "data-align": serializeStaticThemeValue(align, isCssCoveredAlignValue),
89
+ "data-justify": serializeStaticThemeValue(justify, isCssCoveredJustifyValue),
90
+ "data-auto-fit": serializeValueIf(autoFit, isCssCoveredAutoFitValue),
91
+ style: withBoxLayoutStyle(layoutStyle, userStyle)
92
+ });
93
+ const keyedChildren = /* @__PURE__ */ jsx(For, {
94
+ each: () => toChildArray(children),
95
+ by: (child, index) => isJsxElement(child) && child.key != null ? child.key : index,
96
+ children: (child) => child
97
+ });
98
+ if (asChild) return /* @__PURE__ */ jsx(Slot, {
99
+ asChild: true,
100
+ ...finalProps,
101
+ children
102
+ });
103
+ if (as === "span") return /* @__PURE__ */ jsx("span", {
104
+ ...finalProps,
105
+ children: keyedChildren
106
+ });
107
+ return /* @__PURE__ */ jsx("div", {
108
+ ...finalProps,
109
+ children: keyedChildren
110
+ });
111
+ }
112
+ //#endregion
113
+ export { Grid };
114
+
115
+ //# sourceMappingURL=grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.js","names":[],"sources":["../../src/components/grid/grid.tsx"],"sourcesContent":["import { For } from \"@askrjs/askr\";\nimport { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutStyle,\n} from \"../_internal/box-layout\";\nimport { isJsxElement, toChildArray } from \"../_internal/jsx\";\nimport {\n isResponsiveValue,\n resolveAlignValue,\n resolveGridTrackValue,\n resolveJustifyValue,\n resolveSpaceValue,\n serializeResponsiveValueIf,\n serializeValueIf,\n setResponsiveStyleVar,\n} from \"../_internal/layout\";\nimport type { GridAsChildProps, GridDivProps, GridSpanProps } from \"./grid.types\";\n\nconst SPACE_TOKENS = new Set([\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"2xl\",\n \"3xl\",\n]);\n\nfunction isResponsiveObject(value: unknown): boolean {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction isCssCoveredSpaceValue(value: unknown): value is string {\n return typeof value === \"string\" && SPACE_TOKENS.has(value.trim());\n}\n\nfunction isCssCoveredAlignValue(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n [\"start\", \"end\", \"center\", \"stretch\", \"baseline\"].includes(value.trim())\n );\n}\n\nfunction isCssCoveredJustifyValue(value: unknown): value is string {\n return typeof value === \"string\" && [\"start\", \"end\", \"center\", \"between\"].includes(value.trim());\n}\n\nfunction isCssCoveredGridColumnValue(value: unknown): boolean {\n return typeof value === \"number\" || (typeof value === \"string\" && /^\\d+$/.test(value.trim()));\n}\n\nfunction isCssCoveredAutoFitValue(value: unknown): value is boolean {\n return typeof value === \"boolean\";\n}\n\nfunction serializeStaticThemeValue<T>(\n value: T | Partial<Record<\"initial\" | \"sm\" | \"md\" | \"lg\" | \"xl\", T>> | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n if (isResponsiveValue(value)) return undefined;\n return serializeResponsiveValueIf(value, predicate);\n}\n\nfunction resolveCompatibilityGridTemplate(\n minItemWidth: string | undefined,\n autoFit: boolean | undefined,\n): string | undefined {\n if (!minItemWidth) return undefined;\n const fitKeyword = autoFit === false ? \"auto-fill\" : \"auto-fit\";\n return `repeat(${fitKeyword}, minmax(${minItemWidth}, 1fr))`;\n}\n\nexport function Grid(props: GridDivProps): JSX.Element;\nexport function Grid(props: GridSpanProps): JSX.Element;\nexport function Grid(props: GridAsChildProps): JSX.Element;\nexport function Grid(props: GridDivProps | GridSpanProps | GridAsChildProps) {\n const as = \"as\" in props ? props.as : \"div\";\n const {\n asChild,\n children,\n areas,\n columns,\n rows,\n flow,\n gap,\n gapX,\n gapY,\n align,\n justify,\n minItemWidth,\n autoFit,\n ref,\n style: userStyle,\n ...rest\n } = props;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const layoutStyle: Record<string, string | number> = {};\n applyBoxLayoutStyles(layoutStyle, boxProps);\n\n if (boxProps.display !== undefined) {\n setResponsiveStyleVar(layoutStyle, \"display\", boxProps.display, (value) => value);\n }\n setResponsiveStyleVar(layoutStyle, \"grid-template-areas\", areas, (value) => value);\n setResponsiveStyleVar(\n layoutStyle,\n \"grid-template-columns\",\n columns ?? resolveCompatibilityGridTemplate(minItemWidth, autoFit),\n resolveGridTrackValue,\n );\n setResponsiveStyleVar(layoutStyle, \"grid-template-rows\", rows, resolveGridTrackValue);\n setResponsiveStyleVar(layoutStyle, \"grid-auto-flow\", flow, (value) => value);\n if (!isCssCoveredSpaceValue(gap) || isResponsiveObject(gap)) {\n setResponsiveStyleVar(layoutStyle, \"gap\", gap, resolveSpaceValue);\n }\n if (!isCssCoveredSpaceValue(gapX) || isResponsiveObject(gapX)) {\n setResponsiveStyleVar(layoutStyle, \"column-gap\", gapX, resolveSpaceValue);\n }\n if (!isCssCoveredSpaceValue(gapY) || isResponsiveObject(gapY)) {\n setResponsiveStyleVar(layoutStyle, \"row-gap\", gapY, resolveSpaceValue);\n }\n if (!isCssCoveredAlignValue(align) || isResponsiveObject(align)) {\n setResponsiveStyleVar(layoutStyle, \"align-items\", align, resolveAlignValue);\n }\n if (!isCssCoveredJustifyValue(justify) || isResponsiveObject(justify)) {\n setResponsiveStyleVar(layoutStyle, \"justify-content\", justify, resolveJustifyValue);\n }\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": \"grid\",\n \"data-ak-layout\": \"true\",\n \"data-columns\": serializeStaticThemeValue(columns, isCssCoveredGridColumnValue),\n \"data-gap\": serializeStaticThemeValue(gap, isCssCoveredSpaceValue),\n \"data-gap-x\": serializeStaticThemeValue(gapX, isCssCoveredSpaceValue),\n \"data-gap-y\": serializeStaticThemeValue(gapY, isCssCoveredSpaceValue),\n \"data-align\": serializeStaticThemeValue(align, isCssCoveredAlignValue),\n \"data-justify\": serializeStaticThemeValue(justify, isCssCoveredJustifyValue),\n \"data-auto-fit\": serializeValueIf(autoFit, isCssCoveredAutoFitValue),\n style: withBoxLayoutStyle(layoutStyle, userStyle),\n });\n const keyedChildren = (\n <For\n each={() => toChildArray(children)}\n by={(child, index) => (isJsxElement(child) && child.key != null ? child.key : index)}\n >\n {(child) => child as never}\n </For>\n );\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n if (as === \"span\") {\n return <span {...finalProps}>{keyedChildren}</span>;\n }\n\n return <div {...finalProps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AClC,KAAK,OAAO,UAAW,aAAa,MAAM,IAAI,MAAM,OAAO,OAAO,MAAM,MAAM;aAE5E,UAAU;EACR,CAAA;AAGR,KAAI,QACF,QAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAA2B,CAAA;AAG5E,KAAI,OAAO,OACT,QAAO,oBAAC,QAAD;EAAM,GAAI;YAAa;EAAqB,CAAA;AAGrD,QAAO,oBAAC,OAAD;EAAK,GAAI;YAAa;EAAoB,CAAA"}
@@ -0,0 +1,40 @@
1
+ import { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types.js";
2
+ import { JSXElement, Ref } from "@askrjs/askr/foundations";
3
+
4
+ //#region src/components/grid/grid.types.d.ts
5
+ type GridOwnProps = BoxLayoutOwnProps & {
6
+ areas?: LayoutResponsive<string>;
7
+ columns?: LayoutResponsive<number | string>;
8
+ rows?: LayoutResponsive<number | string>;
9
+ flow?: LayoutResponsive<string>;
10
+ gap?: LayoutResponsive<string | number>;
11
+ gapX?: LayoutResponsive<string | number>;
12
+ gapY?: LayoutResponsive<string | number>;
13
+ align?: LayoutResponsive<string>;
14
+ justify?: LayoutResponsive<string>; /** Compatibility helper for auto-fit grids. */
15
+ minItemWidth?: string; /** Compatibility helper for auto-fit grids. */
16
+ autoFit?: boolean;
17
+ as?: "div" | "span";
18
+ children?: unknown;
19
+ };
20
+ type GridNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & GridOwnProps & {
21
+ as?: "div";
22
+ asChild?: false;
23
+ ref?: Ref<HTMLDivElement>;
24
+ };
25
+ type GridSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & GridOwnProps & {
26
+ as: "span";
27
+ asChild?: false;
28
+ ref?: Ref<HTMLSpanElement>;
29
+ };
30
+ type GridAsChildProps = Omit<GridOwnProps, "as"> & {
31
+ asChild: true;
32
+ children: JSXElement;
33
+ ref?: Ref<unknown>;
34
+ style?: JSX.IntrinsicElements["div"]["style"];
35
+ };
36
+ type GridDivProps = GridNativeProps;
37
+ type GridProps = GridDivProps | GridSpanProps | GridAsChildProps;
38
+ //#endregion
39
+ export { GridAsChildProps, GridDivProps, GridNativeProps, GridOwnProps, GridProps, GridSpanProps };
40
+ //# sourceMappingURL=grid.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { GridAsChildProps, GridDivProps, GridNativeProps, GridOwnProps, GridProps, GridSpanProps } from "./grid.types.js";
2
+ import { Grid } from "./grid.js";
@@ -0,0 +1,7 @@
1
+ import { HeaderProps } from "./header.types.js";
2
+
3
+ //#region src/components/header/header.d.ts
4
+ declare function Header(props: HeaderProps): JSX.Element;
5
+ //#endregion
6
+ export { Header };
7
+ //# sourceMappingURL=header.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { classes } from "../_internal/classes.js";
2
+ import { jsx } from "@askrjs/askr/jsx-runtime";
3
+ //#region src/components/header/header.tsx
4
+ function Header(props) {
5
+ const { children, position = "static", ref, class: className, ...rest } = props;
6
+ return /* @__PURE__ */ jsx("header", {
7
+ ...rest,
8
+ ref,
9
+ class: classes("header", className),
10
+ "data-slot": "header",
11
+ "data-position": position,
12
+ children
13
+ });
14
+ }
15
+ //#endregion
16
+ export { Header };
17
+
18
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","names":[],"sources":["../../src/components/header/header.tsx"],"sourcesContent":["import { classes } from \"../_internal/classes\";\nimport type { HeaderProps } from \"./header.types\";\n\nexport function Header(props: HeaderProps): JSX.Element {\n const { children, position = \"static\", ref, class: className, ...rest } = props;\n\n return (\n <header\n {...rest}\n ref={ref}\n class={classes(\"header\", className)}\n data-slot=\"header\"\n data-position={position}\n >\n {children}\n </header>\n );\n}\n"],"mappings":";;;AAGA,SAAgB,OAAO,OAAiC;CACtD,MAAM,EAAE,UAAU,WAAW,UAAU,KAAK,OAAO,WAAW,GAAG,SAAS;AAE1E,QACE,oBAAC,UAAD;EACE,GAAI;EACC;EACL,OAAO,QAAQ,UAAU,UAAU;EACnC,aAAU;EACV,iBAAe;EAEd;EACM,CAAA"}
@@ -0,0 +1,9 @@
1
+ //#region src/components/header/header.types.d.ts
2
+ type HeaderPosition = "static" | "relative" | "sticky" | "absolute" | "fixed";
3
+ type HeaderProps = Omit<JSX.IntrinsicElements["header"], "children"> & {
4
+ position?: HeaderPosition;
5
+ children?: unknown;
6
+ };
7
+ //#endregion
8
+ export { HeaderPosition, HeaderProps };
9
+ //# sourceMappingURL=header.types.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps } from "../flex/flex.types.js";
2
+ import { Flex } from "../flex/flex.js";
3
+ //#region src/components/inline/index.d.ts
4
+ declare function Inline(props: InlineProps): JSX.Element;
5
+ //#endregion
6
+ export { Inline };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { Flex } from "../flex/flex.js";
2
+ import { jsx } from "@askrjs/askr/jsx-runtime";
3
+ //#region src/components/inline/index.tsx
4
+ function Inline(props) {
5
+ return /* @__PURE__ */ jsx(Flex, {
6
+ ...props,
7
+ "data-slot": "inline"
8
+ });
9
+ }
10
+ //#endregion
11
+ export { Inline };
12
+
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/components/inline/index.tsx"],"sourcesContent":["import { Flex } from \"../flex\";\nimport type { InlineProps } from \"../flex\";\n\nexport function Inline(props: InlineProps): JSX.Element {\n return <Flex {...(props as Record<string, unknown>)} data-slot=\"inline\" />;\n}\n\nexport { Flex };\nexport {\n FLEX_A11Y_CONTRACT,\n FLEX_A11Y_CONTRACT as INLINE_A11Y_CONTRACT,\n type FlexA11yContract,\n type FlexA11yContract as InlineA11yContract,\n} from \"../flex/flex.a11y\";\nexport type {\n FlexProps,\n FlexOwnProps,\n FlexNativeProps,\n FlexDivProps,\n FlexSpanProps,\n FlexAsChildProps,\n FlexProps as InlineProps,\n FlexOwnProps as InlineOwnProps,\n FlexNativeProps as InlineNativeProps,\n FlexDivProps as InlineDivProps,\n FlexSpanProps as InlineSpanProps,\n FlexAsChildProps as InlineAsChildProps,\n} from \"../flex/flex.types\";\n"],"mappings":";;;AAGA,SAAgB,OAAO,OAAiC;AACtD,QAAO,oBAAC,MAAD;EAAM,GAAK;EAAmC,aAAU;EAAW,CAAA"}