@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,49 @@
1
+ import "../themes/default/index.css";
2
+ export { Button } from "@askrjs/ui";
3
+ export type { ButtonAsChildProps, ButtonNativeProps, ButtonOwnProps, ButtonProps, } from "@askrjs/ui";
4
+ export { DEFAULT_THEME_OPTIONS, ThemePicker, ThemeProvider, ThemeToggle, useTheme } from "./theme";
5
+ export type { ThemeContextValue, ThemeName, ThemeOption, ThemePickerProps, ThemeProviderProps, ThemeToggleProps, ThemeToggleRenderContext, } from "./theme";
6
+ export { Badge } from "./badge";
7
+ export type { BadgeProps } from "./badge";
8
+ export { AccessibleIcon } from "./accessible-icon";
9
+ export type { AccessibleIconProps } from "./accessible-icon";
10
+ export { AspectRatio } from "./aspect-ratio";
11
+ export type { AspectRatioAsChildProps, AspectRatioProps } from "./aspect-ratio";
12
+ export { Box } from "./box";
13
+ export type { BoxProps } from "./box";
14
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card";
15
+ export type { CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps, } from "./card";
16
+ export { Container } from "./container";
17
+ export type { ContainerProps, ContainerVariant } from "./container";
18
+ export { Flex } from "./flex";
19
+ export type { FlexProps } from "./flex";
20
+ export { Grid } from "./grid";
21
+ export type { GridProps } from "./grid";
22
+ export { Inline } from "./inline";
23
+ export type { InlineProps } from "./inline";
24
+ export { GitHubLogo, GoogleLogo, MicrosoftLogo } from "./logos";
25
+ export type { LogoProps } from "./logos";
26
+ export { Section } from "./section";
27
+ export type { SectionProps } from "./section";
28
+ export { Divider, Separator } from "./separator";
29
+ export type { DividerProps, SeparatorProps } from "./separator";
30
+ export { Skeleton } from "./skeleton";
31
+ export type { SkeletonProps } from "./skeleton";
32
+ export { Spacer } from "./spacer";
33
+ export type { SpacerProps } from "./spacer";
34
+ export { Stack } from "./stack";
35
+ export type { StackProps } from "./stack";
36
+ export { Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, } from "./breadcrumb";
37
+ export type { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbOwnProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps, } from "./breadcrumb";
38
+ export { Spinner } from "./spinner";
39
+ export type { SpinnerOwnProps, SpinnerProps } from "./spinner";
40
+ export { EmptyState } from "./empty-state";
41
+ export type { EmptyStateHeadingTag, EmptyStateProps } from "./empty-state";
42
+ export { Header } from "./header";
43
+ export type { HeaderPosition, HeaderProps } from "./header";
44
+ export { NavBrand, Navbar, NavGroup, NavItem } from "./navbar";
45
+ export type { NavBrandProps, NavbarProps, NavGroupProps, NavItemAsChildProps, NavItemProps, NavItemVariant, } from "./navbar";
46
+ export { SidebarLayout } from "./sidebar-layout";
47
+ export type { SidebarLayoutProps, SidebarPosition } from "./sidebar-layout";
48
+ export { TopbarLayout } from "./topbar-layout";
49
+ export type { TopbarLayoutProps } from "./topbar-layout";
@@ -0,0 +1,28 @@
1
+ /* empty css */
2
+ import { DEFAULT_THEME_OPTIONS, ThemePicker, ThemeProvider, ThemeToggle, useTheme } from "../theme/theme.js";
3
+ import { Badge } from "../badge/badge.js";
4
+ import { AccessibleIcon } from "../accessible-icon/accessible-icon.js";
5
+ import { AspectRatio } from "../aspect-ratio/aspect-ratio.js";
6
+ import { Box } from "../box/box.js";
7
+ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../card/card.js";
8
+ import { Container } from "../container/container.js";
9
+ import { Flex } from "../flex/flex.js";
10
+ import { Grid } from "../grid/grid.js";
11
+ import { Inline } from "../inline/index.js";
12
+ import { GitHubLogo } from "../logos/github-logo.js";
13
+ import { GoogleLogo } from "../logos/google-logo.js";
14
+ import { MicrosoftLogo } from "../logos/microsoft-logo.js";
15
+ import { Section } from "../section/section.js";
16
+ import { Separator } from "../separator/separator.js";
17
+ import { Skeleton } from "../skeleton/skeleton.js";
18
+ import { Spacer } from "../spacer/spacer.js";
19
+ import { Stack } from "../stack/stack.js";
20
+ import { Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator } from "../breadcrumb/breadcrumb.js";
21
+ import { Spinner } from "../spinner/spinner.js";
22
+ import { EmptyState } from "../empty-state/empty-state.js";
23
+ import { Header } from "../header/header.js";
24
+ import { NavBrand, NavGroup, NavItem, Navbar } from "../navbar/navbar.js";
25
+ import { SidebarLayout } from "../sidebar-layout/sidebar-layout.js";
26
+ import { TopbarLayout } from "../topbar-layout/topbar-layout.js";
27
+ import { Button } from "@askrjs/ui";
28
+ export { AccessibleIcon, AspectRatio, Badge, Box, Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Container, DEFAULT_THEME_OPTIONS, Separator as Divider, EmptyState, Flex, GitHubLogo, GoogleLogo, Grid, Header, Inline, MicrosoftLogo, NavBrand, NavGroup, NavItem, Navbar, Section, Separator, SidebarLayout, Skeleton, Spacer, Spinner, Stack, ThemePicker, ThemeProvider, ThemeToggle, TopbarLayout, useTheme };
@@ -0,0 +1,6 @@
1
+ import { Flex } from "../flex";
2
+ import type { InlineProps } from "../flex";
3
+ export declare function Inline(props: InlineProps): JSX.Element;
4
+ export { Flex };
5
+ export { FLEX_A11Y_CONTRACT, FLEX_A11Y_CONTRACT as INLINE_A11Y_CONTRACT, type FlexA11yContract, type FlexA11yContract as InlineA11yContract, } from "../flex/flex.a11y";
6
+ export type { FlexProps, FlexOwnProps, FlexNativeProps, FlexDivProps, FlexSpanProps, FlexAsChildProps, FlexProps as InlineProps, FlexOwnProps as InlineOwnProps, FlexNativeProps as InlineNativeProps, FlexDivProps as InlineDivProps, FlexSpanProps as InlineSpanProps, FlexAsChildProps as InlineAsChildProps, } from "../flex/flex.types";
@@ -0,0 +1,5 @@
1
+ import type { LogoNode, LogoProps } from "./types";
2
+ export declare function createLogo(displayName: string, viewBox: string, logoNode: LogoNode): {
3
+ ({ size, title, class: className, style, ref, ...rest }: LogoProps): import("@askrjs/askr/foundations").JSXElement;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,4 @@
1
+ export declare const GitHubLogo: {
2
+ ({ size, title, class: className, style, ref, ...rest }: import("./types").LogoProps): import("@askrjs/askr/foundations").JSXElement;
3
+ displayName: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export declare const GoogleLogo: {
2
+ ({ size, title, class: className, style, ref, ...rest }: import("./types").LogoProps): import("@askrjs/askr/foundations").JSXElement;
3
+ displayName: string;
4
+ };
@@ -0,0 +1,5 @@
1
+ export { createLogo } from "./create-logo";
2
+ export type { IconSizeToken, LogoNode, LogoProps } from "./types";
3
+ export { GitHubLogo } from "./github-logo";
4
+ export { GoogleLogo } from "./google-logo";
5
+ export { MicrosoftLogo } from "./microsoft-logo";
@@ -0,0 +1,4 @@
1
+ export declare const MicrosoftLogo: {
2
+ ({ size, title, class: className, style, ref, ...rest }: import("./types").LogoProps): import("@askrjs/askr/foundations").JSXElement;
3
+ displayName: string;
4
+ };
@@ -0,0 +1,14 @@
1
+ export type IconSizeToken = "sm" | "md" | "lg" | "xl";
2
+ export type LogoStyleObject = Record<string, unknown>;
3
+ export type LogoOwnProps = {
4
+ size?: number | string;
5
+ title?: string;
6
+ class?: string;
7
+ style?: string | LogoStyleObject;
8
+ iconName?: string;
9
+ };
10
+ export type LogoProps = Omit<JSX.IntrinsicElements["svg"], "children" | "class" | "height" | "ref" | "role" | "stroke" | "style" | "title" | "width"> & LogoOwnProps & {
11
+ children?: unknown;
12
+ ref?: unknown;
13
+ };
14
+ export type LogoNode = ReadonlyArray<readonly [tag: string, attrs: Readonly<Record<string, string>>]>;
@@ -0,0 +1,2 @@
1
+ export { NavBrand, Navbar, NavGroup, NavItem } from "./navbar";
2
+ export type { NavBrandProps, NavbarProps, NavGroupProps, NavItemAsChildProps, NavItemProps, NavItemVariant, } from "./navbar.types";
@@ -0,0 +1,6 @@
1
+ import type { NavBrandProps, NavGroupProps, NavItemAsChildProps, NavItemProps, NavbarProps } from "./navbar.types";
2
+ export declare function Navbar(props: NavbarProps): JSX.Element;
3
+ export declare function NavBrand(props: NavBrandProps): JSX.Element;
4
+ export declare function NavGroup(props: NavGroupProps): JSX.Element;
5
+ export declare function NavItem(props: NavItemProps): JSX.Element;
6
+ export declare function NavItem(props: NavItemAsChildProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ export type NavbarProps = Omit<JSX.IntrinsicElements["nav"], "children"> & {
2
+ children?: unknown;
3
+ };
4
+ export type NavBrandProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
5
+ children?: unknown;
6
+ };
7
+ export type NavGroupProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
8
+ children?: unknown;
9
+ };
10
+ import type { JSXElement, Ref } from "@askrjs/askr/foundations";
11
+ export type NavItemVariant = "default" | "icon";
12
+ export type NavItemOwnProps = {
13
+ children?: unknown;
14
+ variant?: NavItemVariant;
15
+ };
16
+ export type NavItemProps = Omit<JSX.IntrinsicElements["a"], "children" | "ref"> & NavItemOwnProps & {
17
+ asChild?: false;
18
+ ref?: Ref<HTMLAnchorElement>;
19
+ };
20
+ export type NavItemAsChildProps = Omit<JSX.IntrinsicElements["a"], "children" | "ref"> & NavItemOwnProps & {
21
+ asChild: true;
22
+ children: JSXElement;
23
+ ref?: Ref<unknown>;
24
+ };
@@ -0,0 +1,3 @@
1
+ export { Section } from "./section";
2
+ export { SECTION_A11Y_CONTRACT, type SectionA11yContract } from "./section.a11y";
3
+ export type { SectionProps, SectionOwnProps, SectionElementProps, SectionAsChildProps, } from "./section.types";
@@ -0,0 +1,11 @@
1
+ export declare const SECTION_A11Y_CONTRACT: {
2
+ readonly DATA_ATTRIBUTES: {
3
+ readonly slot: "data-slot";
4
+ readonly layout: "data-ak-layout";
5
+ readonly size: "data-size";
6
+ };
7
+ readonly SLOT_VALUES: {
8
+ readonly root: "section";
9
+ };
10
+ };
11
+ export type SectionA11yContract = typeof SECTION_A11Y_CONTRACT;
@@ -0,0 +1,3 @@
1
+ import type { SectionAsChildProps, SectionElementProps } from "./section.types";
2
+ export declare function Section(props: SectionElementProps): JSX.Element;
3
+ export declare function Section(props: SectionAsChildProps): JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { JSXElement, Ref } from "@askrjs/askr/foundations";
2
+ import type { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types";
3
+ export type SectionOwnProps = BoxLayoutOwnProps & {
4
+ size?: LayoutResponsive<"1" | "2" | "3" | "4">;
5
+ children?: unknown;
6
+ };
7
+ export type SectionElementProps = Omit<JSX.IntrinsicElements["section"], "children" | "ref"> & SectionOwnProps & {
8
+ asChild?: false;
9
+ ref?: Ref<HTMLElement>;
10
+ };
11
+ export type SectionAsChildProps = SectionOwnProps & {
12
+ asChild: true;
13
+ children: JSXElement;
14
+ ref?: Ref<unknown>;
15
+ style?: JSX.IntrinsicElements["section"]["style"];
16
+ };
17
+ export type SectionProps = SectionElementProps | SectionAsChildProps;
@@ -0,0 +1,3 @@
1
+ export { Separator, Separator as Divider } from "./separator";
2
+ export { SEPARATOR_A11Y_CONTRACT, type SeparatorA11yContract } from "./separator.a11y";
3
+ export type { SeparatorProps, SeparatorProps as DividerProps, SeparatorOwnProps, SeparatorOwnProps as DividerOwnProps, SeparatorNativeProps, SeparatorNativeProps as DividerNativeProps, SeparatorAsChildProps, SeparatorAsChildProps as DividerAsChildProps, } from "./separator.types";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * WAI-ARIA Separator Pattern.
3
+ */
4
+ export declare const SEPARATOR_A11Y_CONTRACT: {
5
+ readonly ROLE: "separator";
6
+ readonly DECORATIVE_ROLE: "presentation";
7
+ readonly ORIENTATION_ATTRIBUTE: "aria-orientation";
8
+ readonly DATA_ATTRIBUTES: {
9
+ readonly orientation: "data-orientation";
10
+ };
11
+ readonly DEFAULT_ORIENTATION: "horizontal";
12
+ };
13
+ export type SeparatorA11yContract = typeof SEPARATOR_A11Y_CONTRACT;
@@ -0,0 +1,3 @@
1
+ import type { SeparatorAsChildProps, SeparatorNativeProps } from "./separator.types";
2
+ export declare function Separator(props: SeparatorNativeProps): JSX.Element;
3
+ export declare function Separator(props: SeparatorAsChildProps): JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { JSXElement, Ref } from "@askrjs/askr/foundations";
2
+ export type SeparatorOwnProps = {
3
+ decorative?: boolean;
4
+ orientation?: "horizontal" | "vertical";
5
+ children?: unknown;
6
+ };
7
+ export type SeparatorNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & SeparatorOwnProps & {
8
+ asChild?: false;
9
+ ref?: Ref<HTMLDivElement>;
10
+ };
11
+ export type SeparatorAsChildProps = SeparatorOwnProps & {
12
+ asChild: true;
13
+ children: JSXElement;
14
+ ref?: Ref<unknown>;
15
+ };
16
+ export type SeparatorProps = SeparatorNativeProps | SeparatorAsChildProps;
@@ -0,0 +1,3 @@
1
+ export { SidebarLayout } from "./sidebar-layout";
2
+ export { SIDEBAR_LAYOUT_A11Y_CONTRACT, type SidebarLayoutA11yContract, } from "./sidebar-layout.a11y";
3
+ export type { SidebarLayoutProps, SidebarPosition } from "./sidebar-layout.types";
@@ -0,0 +1,15 @@
1
+ export declare const SIDEBAR_LAYOUT_A11Y_CONTRACT: {
2
+ readonly DATA_ATTRIBUTES: {
3
+ readonly slot: "data-slot";
4
+ readonly sidebarPosition: "data-sidebar-position";
5
+ readonly sidebarWidth: "data-sidebar-width";
6
+ readonly gap: "data-gap";
7
+ readonly collapseBelow: "data-collapse-below";
8
+ };
9
+ readonly SLOT_VALUES: {
10
+ readonly root: "sidebar-layout";
11
+ readonly sidebar: "sidebar";
12
+ readonly main: "main";
13
+ };
14
+ };
15
+ export type SidebarLayoutA11yContract = typeof SIDEBAR_LAYOUT_A11Y_CONTRACT;
@@ -0,0 +1,2 @@
1
+ import type { SidebarLayoutProps } from "./sidebar-layout.types";
2
+ export declare function SidebarLayout(props: SidebarLayoutProps): JSX.Element;
@@ -0,0 +1,20 @@
1
+ import type { Ref } from "@askrjs/askr/foundations";
2
+ export type SidebarPosition = "start" | "end";
3
+ export type SidebarLayoutProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & {
4
+ /** Content rendered into the sidebar slot (aside). */
5
+ sidebar?: unknown;
6
+ /** Content rendered into the main slot. */
7
+ children?: unknown;
8
+ /** Which side the sidebar appears on. Defaults to 'start'. */
9
+ sidebarPosition?: SidebarPosition;
10
+ /** CSS width for the sidebar. Applied as inline style only when it is a real CSS length. */
11
+ sidebarWidth?: string;
12
+ /** CSS gap between sidebar and main. Applied as inline style only when it is a real CSS length. */
13
+ gap?: string;
14
+ /**
15
+ * Named breakpoint below which the layout collapses to a single column.
16
+ * Official themes recognize `sm`, `md`, `lg`, and `xl`.
17
+ */
18
+ collapseBelow?: string;
19
+ ref?: Ref<HTMLDivElement>;
20
+ };
@@ -0,0 +1,3 @@
1
+ export { Skeleton } from "./skeleton";
2
+ export { SKELETON_A11Y_CONTRACT, type SkeletonA11yContract } from "./skeleton.a11y";
3
+ export type { SkeletonOwnProps, SkeletonProps, SkeletonAsChildProps } from "./skeleton.types";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Accessibility contract for Skeleton.
3
+ */
4
+ export declare const SKELETON_A11Y_CONTRACT: {
5
+ readonly DATA_ATTRIBUTES: {
6
+ readonly slot: "data-slot";
7
+ };
8
+ readonly MARKER: "data-skeleton";
9
+ readonly DECORATIVE_ATTRIBUTE: "aria-hidden";
10
+ readonly DECORATIVE_VALUE: "true";
11
+ };
12
+ export type SkeletonA11yContract = typeof SKELETON_A11Y_CONTRACT;
@@ -0,0 +1,3 @@
1
+ import type { SkeletonAsChildProps, SkeletonProps } from "./skeleton.types";
2
+ export declare function Skeleton(props: SkeletonProps): JSX.Element;
3
+ export declare function Skeleton(props: SkeletonAsChildProps): JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { JSXElement, Ref } from "@askrjs/askr/foundations";
2
+ export type SkeletonOwnProps = {
3
+ children?: unknown;
4
+ };
5
+ export type SkeletonProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & SkeletonOwnProps & {
6
+ asChild?: false;
7
+ ref?: Ref<HTMLDivElement>;
8
+ };
9
+ export type SkeletonAsChildProps = SkeletonOwnProps & {
10
+ asChild: true;
11
+ children: JSXElement;
12
+ ref?: Ref<unknown>;
13
+ };
@@ -0,0 +1,3 @@
1
+ export { Spacer } from "./spacer";
2
+ export { SPACER_A11Y_CONTRACT, type SpacerA11yContract } from "./spacer.a11y";
3
+ export type { SpacerProps, SpacerOwnProps, SpacerAxis, SpacerNativeProps, SpacerAsChildProps, } from "./spacer.types";
@@ -0,0 +1,13 @@
1
+ export declare const SPACER_A11Y_CONTRACT: {
2
+ readonly DATA_ATTRIBUTES: {
3
+ readonly slot: "data-slot";
4
+ readonly axis: "data-axis";
5
+ readonly grow: "data-grow";
6
+ readonly shrink: "data-shrink";
7
+ readonly basis: "data-basis";
8
+ };
9
+ readonly SLOT_VALUES: {
10
+ readonly root: "spacer";
11
+ };
12
+ };
13
+ export type SpacerA11yContract = typeof SPACER_A11Y_CONTRACT;
@@ -0,0 +1,3 @@
1
+ import type { SpacerAsChildProps, SpacerNativeProps } from "./spacer.types";
2
+ export declare function Spacer(props: SpacerNativeProps): JSX.Element;
3
+ export declare function Spacer(props: SpacerAsChildProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import type { JSXElement, Ref } from "@askrjs/askr/foundations";
2
+ export type SpacerAxis = "inline" | "block";
3
+ export type SpacerOwnProps = {
4
+ /** flex-grow factor (default 1 when no axis is set). */
5
+ grow?: number;
6
+ /** flex-shrink factor (default 1 when no axis is set, 0 when axis is set). */
7
+ shrink?: number;
8
+ /** CSS flex-basis / width (axis=inline) / height (axis=block) value. Applied as inline style only when it is a real CSS length. */
9
+ basis?: string;
10
+ /** When set, renders a fixed space along the given axis instead of a flex-grow spacer. */
11
+ axis?: SpacerAxis;
12
+ children?: unknown;
13
+ };
14
+ export type SpacerNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & SpacerOwnProps & {
15
+ asChild?: false;
16
+ ref?: Ref<HTMLDivElement>;
17
+ };
18
+ export type SpacerAsChildProps = SpacerOwnProps & {
19
+ asChild: true;
20
+ children: JSXElement;
21
+ ref?: Ref<unknown>;
22
+ style?: JSX.IntrinsicElements["div"]["style"];
23
+ };
24
+ export type SpacerProps = SpacerNativeProps | SpacerAsChildProps;
@@ -0,0 +1,2 @@
1
+ export { Spinner } from "./spinner";
2
+ export type { SpinnerOwnProps, SpinnerProps } from "./spinner.types";
@@ -0,0 +1,2 @@
1
+ import type { SpinnerProps } from "./spinner.types";
2
+ export declare function Spinner(props: SpinnerProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ProgressCircleProps } from "@askrjs/ui";
2
+ export type SpinnerOwnProps = Omit<ProgressCircleProps, "value" | "getValueLabel"> & {
3
+ label?: string;
4
+ };
5
+ export type SpinnerProps = SpinnerOwnProps;
@@ -0,0 +1,3 @@
1
+ export { Stack } from "./stack";
2
+ export { STACK_A11Y_CONTRACT, type StackA11yContract } from "./stack.a11y";
3
+ export type { StackProps, StackOwnProps, StackDivProps, StackAsChildProps } from "./stack.types";
@@ -0,0 +1,14 @@
1
+ export declare const STACK_A11Y_CONTRACT: {
2
+ readonly DATA_ATTRIBUTES: {
3
+ readonly slot: "data-slot";
4
+ readonly layout: "data-ak-layout";
5
+ readonly gap: "data-gap";
6
+ readonly align: "data-align";
7
+ readonly justify: "data-justify";
8
+ readonly wrap: "data-wrap";
9
+ };
10
+ readonly SLOT_VALUES: {
11
+ readonly root: "stack";
12
+ };
13
+ };
14
+ export type StackA11yContract = typeof STACK_A11Y_CONTRACT;
@@ -0,0 +1,3 @@
1
+ import type { StackAsChildProps, StackDivProps } from "./stack.types";
2
+ export declare function Stack(props: StackDivProps): JSX.Element;
3
+ export declare function Stack(props: StackAsChildProps): JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { JSXElement, Ref } from "@askrjs/askr/foundations";
2
+ import type { FlexOwnProps } from "../flex/flex.types";
3
+ export type StackOwnProps = Omit<FlexOwnProps, "direction" | "as"> & {
4
+ children?: unknown;
5
+ };
6
+ export type StackDivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & StackOwnProps & {
7
+ asChild?: false;
8
+ ref?: Ref<HTMLDivElement>;
9
+ };
10
+ export type StackAsChildProps = StackOwnProps & {
11
+ asChild: true;
12
+ children: JSXElement;
13
+ ref?: Ref<unknown>;
14
+ style?: JSX.IntrinsicElements["div"]["style"];
15
+ };
16
+ export type StackProps = StackDivProps | StackAsChildProps;
@@ -0,0 +1,2 @@
1
+ export { DEFAULT_THEME_OPTIONS, ThemePicker, ThemeProvider, ThemeToggle, useTheme } from "./theme";
2
+ export type { ThemeContextValue, ThemeName, ThemeOption, ThemePickerProps, ThemeProviderProps, ThemeToggleProps, ThemeToggleRenderContext, } from "./theme";
@@ -0,0 +1,40 @@
1
+ import type { ButtonNativeProps, PressEvent } from "@askrjs/ui";
2
+ export type ThemeName = "light" | "dark" | "system" | (string & {});
3
+ export type ThemeOption = {
4
+ value: ThemeName;
5
+ label: string;
6
+ };
7
+ export type ThemeContextValue = {
8
+ theme: () => ThemeName;
9
+ setTheme: (theme: ThemeName) => void;
10
+ themes: readonly ThemeOption[];
11
+ storageKey: string;
12
+ };
13
+ export type ThemeProviderProps = {
14
+ children?: unknown;
15
+ defaultTheme?: ThemeName;
16
+ themes?: readonly ThemeOption[];
17
+ storageKey?: string;
18
+ };
19
+ export type ThemePickerProps = Omit<JSX.IntrinsicElements["select"], "children" | "value" | "defaultValue" | "onChange"> & {
20
+ themes?: readonly ThemeOption[];
21
+ label?: string;
22
+ };
23
+ export type ThemeToggleRenderContext = {
24
+ theme: ThemeName;
25
+ nextTheme: ThemeName;
26
+ };
27
+ export type ThemeToggleProps = Omit<ButtonNativeProps, "children" | "onPress"> & {
28
+ children?: unknown | ((context: ThemeToggleRenderContext) => unknown);
29
+ lightIcon?: unknown;
30
+ darkIcon?: unknown;
31
+ systemIcon?: unknown;
32
+ toggleThemes?: readonly ThemeName[];
33
+ onPress?: (event: PressEvent) => void;
34
+ };
35
+ export declare const DEFAULT_THEME_OPTIONS: readonly ThemeOption[];
36
+ export declare function useTheme(): ThemeContextValue;
37
+ export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element;
38
+ export declare function ThemePicker(props: ThemePickerProps): JSX.Element;
39
+ export declare function ThemeToggle(props: ThemeToggleProps): JSX.Element;
40
+ export declare function resolveThemeToggleIcon(theme: ThemeName, nextTheme: ThemeName, icons: Pick<ThemeToggleProps, "lightIcon" | "darkIcon" | "systemIcon">): unknown;
@@ -0,0 +1,3 @@
1
+ export { TopbarLayout } from "./topbar-layout";
2
+ export { TOPBAR_LAYOUT_A11Y_CONTRACT, type TopbarLayoutA11yContract } from "./topbar-layout.a11y";
3
+ export type { TopbarLayoutProps } from "./topbar-layout.types";
@@ -0,0 +1,13 @@
1
+ export declare const TOPBAR_LAYOUT_A11Y_CONTRACT: {
2
+ readonly DATA_ATTRIBUTES: {
3
+ readonly slot: "data-slot";
4
+ readonly topbarHeight: "data-topbar-height";
5
+ readonly gap: "data-gap";
6
+ };
7
+ readonly SLOT_VALUES: {
8
+ readonly root: "topbar-layout";
9
+ readonly navbar: "navbar";
10
+ readonly main: "main";
11
+ };
12
+ };
13
+ export type TopbarLayoutA11yContract = typeof TOPBAR_LAYOUT_A11Y_CONTRACT;
@@ -0,0 +1,2 @@
1
+ import type { TopbarLayoutProps } from "./topbar-layout.types";
2
+ export declare function TopbarLayout(props: TopbarLayoutProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { Ref } from "@askrjs/askr/foundations";
2
+ export type TopbarLayoutProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & {
3
+ /** Content rendered into the topbar/navbar slot (header). */
4
+ topbar?: unknown;
5
+ /** Content rendered into the main slot. */
6
+ children?: unknown;
7
+ /** CSS height for the topbar. Applied as inline style only when it is a real CSS length. */
8
+ topbarHeight?: string;
9
+ /** CSS gap between topbar and main. Applied as inline style only when it is a real CSS length. */
10
+ gap?: string;
11
+ ref?: Ref<HTMLDivElement>;
12
+ };
@@ -0,0 +1,8 @@
1
+ import { ContainerAsChildProps, ContainerNativeProps } from "./container.types.js";
2
+
3
+ //#region src/components/container/container.d.ts
4
+ declare function Container(props: ContainerNativeProps): JSX.Element;
5
+ declare function Container(props: ContainerAsChildProps): JSX.Element;
6
+ //#endregion
7
+ export { Container };
8
+ //# sourceMappingURL=container.d.ts.map
@@ -0,0 +1,82 @@
1
+ import { mergeProps } from "../_internal/merge-props.js";
2
+ import { isResponsiveValue, resolveContainerSizeValue, resolveInlineAlignValue, 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/container/container.tsx
7
+ const CONTAINER_WIDTH_TOKENS = new Set([
8
+ "1",
9
+ "2",
10
+ "3",
11
+ "4",
12
+ "sm",
13
+ "md",
14
+ "lg",
15
+ "xl"
16
+ ]);
17
+ function isContainerWidthToken(value) {
18
+ return typeof value === "string" && CONTAINER_WIDTH_TOKENS.has(value.trim());
19
+ }
20
+ function isContainerAlignToken(value) {
21
+ return typeof value === "string" && [
22
+ "left",
23
+ "center",
24
+ "right"
25
+ ].includes(value.trim());
26
+ }
27
+ function hasStyleValue(value) {
28
+ if (typeof value === "string") return value.trim().length > 0;
29
+ if (value && typeof value === "object") return Object.keys(value).length > 0;
30
+ return false;
31
+ }
32
+ function isStaticValue(value) {
33
+ return !isResponsiveValue(value);
34
+ }
35
+ function Container(props) {
36
+ const { asChild, children, variant, fluid = false, maxWidth, padding, size, align = "center", ref, style: userStyle, ...rest } = props;
37
+ const responsiveVariant = fluid || size === void 0 && maxWidth === void 0 ? fluid ? "fluid" : variant ?? "default" : void 0;
38
+ const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
39
+ const layoutStyle = {
40
+ boxSizing: "border-box",
41
+ width: "100%"
42
+ };
43
+ applyBoxLayoutStyles(layoutStyle, boxProps);
44
+ const widthValue = fluid ? void 0 : maxWidth ?? size;
45
+ if (boxProps.maxWidth === void 0 && widthValue !== void 0 && (isResponsiveValue(widthValue) || !isContainerWidthToken(widthValue))) setResponsiveStyleVar(layoutStyle, "max-width", widthValue, (value) => typeof value === "string" && isContainerWidthToken(value) ? resolveContainerSizeValue(value) : value);
46
+ if (padding !== void 0 && boxProps.px === void 0 && boxProps.pl === void 0 && boxProps.pr === void 0) setResponsiveStyleVar(layoutStyle, "px", padding, resolveSpaceValue);
47
+ const applyAlign = (side, value) => {
48
+ setResponsiveStyleVar(layoutStyle, side === "marginLeft" ? "ml" : "mr", value, (input) => {
49
+ const margins = resolveInlineAlignValue(input);
50
+ return side === "marginLeft" ? margins.marginLeft : margins.marginRight;
51
+ });
52
+ };
53
+ if (boxProps.ml === void 0 && boxProps.mr === void 0 && isResponsiveValue(align)) {
54
+ applyAlign("marginLeft", align);
55
+ applyAlign("marginRight", align);
56
+ }
57
+ const mergedStyle = Object.keys(layoutStyle).length > 2 || hasStyleValue(userStyle) ? withBoxLayoutStyle(layoutStyle, userStyle) : void 0;
58
+ const finalProps = mergeProps(passthroughProps, {
59
+ ref,
60
+ "data-slot": "container",
61
+ "data-ak-layout": "true",
62
+ "data-variant": responsiveVariant,
63
+ "data-fluid": fluid ? "true" : void 0,
64
+ "data-size": fluid ? void 0 : isStaticValue(size) ? serializeResponsiveValueIf(size, isContainerWidthToken) : void 0,
65
+ "data-align": isStaticValue(align) ? serializeResponsiveValueIf(align, isContainerAlignToken) : void 0,
66
+ "data-max-width": fluid ? void 0 : isStaticValue(maxWidth) ? serializeResponsiveValueIf(maxWidth, isContainerWidthToken) : void 0,
67
+ style: mergedStyle
68
+ });
69
+ if (asChild) return /* @__PURE__ */ jsx(Slot, {
70
+ asChild: true,
71
+ ...finalProps,
72
+ children
73
+ });
74
+ return /* @__PURE__ */ jsx("div", {
75
+ ...finalProps,
76
+ children
77
+ });
78
+ }
79
+ //#endregion
80
+ export { Container };
81
+
82
+ //# sourceMappingURL=container.js.map