@askrjs/themes 0.0.3 → 0.0.6

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 (607) hide show
  1. package/README.md +78 -0
  2. package/THEMING.md +50 -8
  3. package/dist/{_internal → components/_internal}/box-layout.js +4 -3
  4. package/dist/components/_internal/box-layout.js.map +1 -0
  5. package/dist/components/_internal/classes.js.map +1 -0
  6. package/dist/components/_internal/jsx.js.map +1 -0
  7. package/dist/components/_internal/layout.d.ts +6 -28
  8. package/dist/{_internal → components/_internal}/layout.js +7 -16
  9. package/dist/components/_internal/layout.js.map +1 -0
  10. package/dist/{_internal → components/_internal}/merge-props.js +5 -0
  11. package/dist/components/_internal/merge-props.js.map +1 -0
  12. package/dist/components/_internal/pathname.js +39 -0
  13. package/dist/components/_internal/pathname.js.map +1 -0
  14. package/dist/components/_internal/style.js +41 -0
  15. package/dist/components/_internal/style.js.map +1 -0
  16. package/dist/components/alert/alert.d.ts +7 -0
  17. package/dist/components/alert/alert.js +65 -0
  18. package/dist/components/alert/alert.js.map +1 -0
  19. package/dist/components/alert/alert.types.d.ts +22 -0
  20. package/dist/components/alert/index.d.ts +2 -0
  21. package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -3
  22. package/dist/components/aspect-ratio/aspect-ratio.js +33 -0
  23. package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -0
  24. package/dist/components/aspect-ratio/aspect-ratio.types.d.ts +18 -12
  25. package/dist/components/aspect-ratio/index.d.ts +2 -2
  26. package/dist/components/badge/badge.a11y.d.ts +13 -9
  27. package/dist/components/badge/badge.d.ts +8 -3
  28. package/dist/{badge → components/badge}/badge.js +5 -0
  29. package/dist/components/badge/badge.js.map +1 -0
  30. package/dist/components/badge/badge.types.d.ts +18 -12
  31. package/dist/components/badge/index.d.ts +3 -3
  32. package/dist/components/block/block.a11y.d.ts +20 -0
  33. package/dist/components/block/block.d.ts +9 -0
  34. package/dist/components/block/block.js +66 -0
  35. package/dist/components/block/block.js.map +1 -0
  36. package/dist/components/block/block.types.d.ts +38 -0
  37. package/dist/components/block/index.d.ts +3 -0
  38. package/dist/components/box/box.a11y.d.ts +13 -9
  39. package/dist/components/box/box.d.ts +9 -4
  40. package/dist/{box → components/box}/box.js +3 -2
  41. package/dist/components/box/box.js.map +1 -0
  42. package/dist/components/box/box.types.d.ts +67 -61
  43. package/dist/components/box/index.d.ts +3 -3
  44. package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +13 -9
  45. package/dist/components/breadcrumb/breadcrumb.a11y.js +15 -0
  46. package/dist/components/breadcrumb/breadcrumb.a11y.js.map +1 -0
  47. package/dist/components/breadcrumb/breadcrumb.d.ts +18 -13
  48. package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
  49. package/dist/components/breadcrumb/breadcrumb.types.d.ts +64 -58
  50. package/dist/components/breadcrumb/index.d.ts +3 -3
  51. package/dist/components/button-group/button-group.d.ts +7 -0
  52. package/dist/components/button-group/button-group.js +20 -0
  53. package/dist/components/button-group/button-group.js.map +1 -0
  54. package/dist/components/button-group/button-group.types.d.ts +14 -0
  55. package/dist/components/button-group/index.d.ts +2 -0
  56. package/dist/components/card/card.d.ts +13 -7
  57. package/dist/components/card/card.js +95 -0
  58. package/dist/components/card/card.js.map +1 -0
  59. package/dist/components/card/card.types.d.ts +32 -24
  60. package/dist/components/card/index.d.ts +2 -2
  61. package/dist/components/close/close.d.ts +7 -0
  62. package/dist/components/close/close.js +22 -0
  63. package/dist/components/close/close.js.map +1 -0
  64. package/dist/components/close/close.types.d.ts +10 -0
  65. package/dist/components/close/index.d.ts +2 -0
  66. package/dist/components/container/container.a11y.d.ts +18 -15
  67. package/dist/components/container/container.d.ts +8 -3
  68. package/dist/{container → components/container}/container.js +10 -10
  69. package/dist/components/container/container.js.map +1 -0
  70. package/dist/components/container/container.types.d.ts +25 -26
  71. package/dist/components/container/index.d.ts +3 -3
  72. package/dist/components/empty-state/empty-state.d.ts +7 -2
  73. package/dist/components/empty-state/empty-state.js.map +1 -0
  74. package/dist/components/empty-state/empty-state.types.d.ts +15 -8
  75. package/dist/components/empty-state/index.d.ts +2 -2
  76. package/dist/components/field/field.d.ts +9 -0
  77. package/dist/components/field/field.js +41 -0
  78. package/dist/components/field/field.js.map +1 -0
  79. package/dist/components/field/field.types.d.ts +20 -0
  80. package/dist/components/field/index.d.ts +2 -0
  81. package/dist/components/flex/flex.a11y.d.ts +21 -17
  82. package/dist/components/flex/flex.d.ts +9 -4
  83. package/dist/{flex → components/flex}/flex.js +3 -2
  84. package/dist/components/flex/flex.js.map +1 -0
  85. package/dist/components/flex/flex.types.d.ts +38 -37
  86. package/dist/components/flex/index.d.ts +3 -3
  87. package/dist/components/header/header.a11y.d.ts +13 -9
  88. package/dist/components/header/header.a11y.js +12 -0
  89. package/dist/components/header/header.a11y.js.map +1 -0
  90. package/dist/components/header/header.d.ts +7 -2
  91. package/dist/components/header/header.js.map +1 -0
  92. package/dist/components/header/header.types.d.ts +8 -4
  93. package/dist/components/inline/index.d.ts +8 -6
  94. package/dist/components/inline/index.js.map +1 -0
  95. package/dist/components/input-group/index.d.ts +2 -0
  96. package/dist/components/input-group/input-group.d.ts +9 -0
  97. package/dist/components/input-group/input-group.js +39 -0
  98. package/dist/components/input-group/input-group.js.map +1 -0
  99. package/dist/components/input-group/input-group.types.d.ts +26 -0
  100. package/dist/components/list-group/index.d.ts +2 -0
  101. package/dist/components/list-group/list-group.d.ts +9 -0
  102. package/dist/components/list-group/list-group.js +43 -0
  103. package/dist/components/list-group/list-group.js.map +1 -0
  104. package/dist/components/list-group/list-group.types.d.ts +32 -0
  105. package/dist/components/nav/index.d.ts +2 -0
  106. package/dist/components/nav/nav.d.ts +13 -0
  107. package/dist/components/nav/nav.js +113 -0
  108. package/dist/components/nav/nav.js.map +1 -0
  109. package/dist/components/nav/nav.types.d.ts +56 -0
  110. package/dist/components/navbar/index.d.ts +5 -2
  111. package/dist/components/navbar/navbar-panel.js +48 -0
  112. package/dist/components/navbar/navbar-panel.js.map +1 -0
  113. package/dist/components/navbar/navbar.context.js +13 -0
  114. package/dist/components/navbar/navbar.context.js.map +1 -0
  115. package/dist/components/navbar/navbar.d.ts +45 -7
  116. package/dist/components/navbar/navbar.js +221 -0
  117. package/dist/components/navbar/navbar.js.map +1 -0
  118. package/dist/components/navbar/navbar.render.js +26 -0
  119. package/dist/components/navbar/navbar.render.js.map +1 -0
  120. package/dist/components/navbar/navbar.shared.js +18 -0
  121. package/dist/components/navbar/navbar.shared.js.map +1 -0
  122. package/dist/components/navbar/navbar.types.d.ts +29 -22
  123. package/dist/components/overlays/dropdown-content.d.ts +8 -0
  124. package/dist/components/overlays/dropdown-content.js +18 -0
  125. package/dist/components/overlays/dropdown-content.js.map +1 -0
  126. package/dist/components/pagination/index.d.ts +2 -0
  127. package/dist/components/pagination/pagination.d.ts +11 -0
  128. package/dist/components/pagination/pagination.js +95 -0
  129. package/dist/components/pagination/pagination.js.map +1 -0
  130. package/dist/components/pagination/pagination.types.d.ts +40 -0
  131. package/dist/components/section/index.d.ts +3 -3
  132. package/dist/components/section/section.a11y.d.ts +14 -10
  133. package/dist/components/section/section.d.ts +8 -3
  134. package/dist/{section → components/section}/section.js +3 -2
  135. package/dist/components/section/section.js.map +1 -0
  136. package/dist/components/section/section.types.d.ts +20 -14
  137. package/dist/components/separator/index.d.ts +3 -3
  138. package/dist/components/separator/separator.a11y.d.ts +13 -9
  139. package/dist/components/separator/separator.a11y.js +15 -0
  140. package/dist/components/separator/separator.a11y.js.map +1 -0
  141. package/dist/components/separator/separator.d.ts +8 -3
  142. package/dist/components/separator/separator.js.map +1 -0
  143. package/dist/components/separator/separator.types.d.ts +19 -13
  144. package/dist/components/shell/index.d.ts +3 -0
  145. package/dist/components/shell/shell-nav.types.d.ts +7 -0
  146. package/dist/components/shell/shell-panel.js +54 -0
  147. package/dist/components/shell/shell-panel.js.map +1 -0
  148. package/dist/components/shell/shell-responsive.js +110 -0
  149. package/dist/components/shell/shell-responsive.js.map +1 -0
  150. package/dist/components/shell/shell.a11y.d.ts +23 -0
  151. package/dist/components/shell/shell.a11y.js +23 -0
  152. package/dist/components/shell/shell.a11y.js.map +1 -0
  153. package/dist/components/shell/shell.d.ts +13 -0
  154. package/dist/components/shell/shell.js +69 -0
  155. package/dist/components/shell/shell.js.map +1 -0
  156. package/dist/components/shell/shell.types.d.ts +58 -0
  157. package/dist/components/sidebar/sidebar-panel.d.ts +7 -0
  158. package/dist/components/sidebar/sidebar-panel.js +59 -0
  159. package/dist/components/sidebar/sidebar-panel.js.map +1 -0
  160. package/dist/components/sidebar/sidebar-toggle.d.ts +7 -0
  161. package/dist/components/sidebar/sidebar-toggle.js +8 -0
  162. package/dist/components/sidebar/sidebar-toggle.js.map +1 -0
  163. package/dist/components/sidebar/sidebar.context.js +21 -0
  164. package/dist/components/sidebar/sidebar.context.js.map +1 -0
  165. package/dist/components/sidebar/sidebar.d.ts +7 -0
  166. package/dist/components/sidebar/sidebar.js +228 -0
  167. package/dist/components/sidebar/sidebar.js.map +1 -0
  168. package/dist/components/sidebar/sidebar.shared.js +12 -0
  169. package/dist/components/sidebar/sidebar.shared.js.map +1 -0
  170. package/dist/components/sidebar/sidebar.types.d.ts +30 -0
  171. package/dist/components/skeleton/index.d.ts +3 -3
  172. package/dist/components/skeleton/skeleton.a11y.d.ts +12 -8
  173. package/dist/components/skeleton/skeleton.d.ts +8 -3
  174. package/dist/components/skeleton/skeleton.js.map +1 -0
  175. package/dist/components/skeleton/skeleton.types.d.ts +16 -10
  176. package/dist/components/spacer/index.d.ts +3 -3
  177. package/dist/components/spacer/spacer.a11y.d.ts +16 -12
  178. package/dist/components/spacer/spacer.d.ts +8 -3
  179. package/dist/{spacer → components/spacer}/spacer.js +3 -1
  180. package/dist/components/spacer/spacer.js.map +1 -0
  181. package/dist/components/spacer/spacer.types.d.ts +23 -21
  182. package/dist/components/spinner/index.d.ts +2 -2
  183. package/dist/components/spinner/spinner.d.ts +7 -2
  184. package/dist/components/spinner/spinner.js.map +1 -0
  185. package/dist/components/spinner/spinner.types.d.ts +9 -4
  186. package/dist/components/stack/index.d.ts +3 -3
  187. package/dist/components/stack/stack.a11y.d.ts +17 -13
  188. package/dist/components/stack/stack.d.ts +8 -3
  189. package/dist/components/stack/stack.js.map +1 -0
  190. package/dist/components/stack/stack.types.d.ts +19 -13
  191. package/dist/components/theme/index.d.ts +1 -2
  192. package/dist/components/theme/theme.d.ts +41 -34
  193. package/dist/{theme → components/theme}/theme.js +33 -4
  194. package/dist/components/theme/theme.js.map +1 -0
  195. package/dist/controls.d.ts +10 -0
  196. package/dist/controls.js +7 -0
  197. package/dist/feedback.d.ts +5 -0
  198. package/dist/feedback.js +4 -0
  199. package/dist/layouts.d.ts +25 -0
  200. package/dist/layouts.js +11 -0
  201. package/dist/navs.d.ts +15 -0
  202. package/dist/navs.js +9 -0
  203. package/dist/overlays.d.ts +3 -0
  204. package/dist/overlays.js +4 -0
  205. package/dist/shells.d.ts +16 -0
  206. package/dist/shells.js +11 -0
  207. package/dist/surfaces.d.ts +16 -0
  208. package/dist/surfaces.js +9 -0
  209. package/dist/theme.d.ts +2 -0
  210. package/dist/theme.js +3 -0
  211. package/dist/themes/default/index.css +3191 -812
  212. package/package.json +63 -24
  213. package/src/components/_internal/box-layout.ts +8 -0
  214. package/src/components/_internal/jsx.ts +91 -16
  215. package/src/components/_internal/layout.ts +5 -17
  216. package/src/components/_internal/merge-props.ts +9 -0
  217. package/src/components/_internal/pathname.ts +67 -0
  218. package/src/components/_internal/style.ts +51 -0
  219. package/src/components/alert/alert.tsx +84 -0
  220. package/src/components/alert/alert.types.ts +20 -0
  221. package/src/components/alert/index.ts +2 -0
  222. package/src/components/aspect-ratio/aspect-ratio.tsx +10 -24
  223. package/src/components/aspect-ratio/aspect-ratio.types.ts +2 -1
  224. package/src/components/badge/badge.tsx +6 -0
  225. package/src/components/badge/badge.types.ts +2 -1
  226. package/src/components/block/block.a11y.ts +17 -0
  227. package/src/components/block/block.tsx +71 -0
  228. package/src/components/block/block.types.ts +60 -0
  229. package/src/components/block/index.ts +11 -0
  230. package/src/components/box/box.tsx +3 -2
  231. package/src/components/box/box.types.ts +2 -1
  232. package/src/components/breadcrumb/breadcrumb.types.ts +2 -1
  233. package/src/components/button-group/button-group.tsx +32 -0
  234. package/src/components/button-group/button-group.types.ts +12 -0
  235. package/src/components/button-group/index.ts +2 -0
  236. package/src/components/card/card.tsx +72 -43
  237. package/src/components/card/card.types.ts +6 -1
  238. package/src/components/card/index.ts +10 -1
  239. package/src/components/close/close.tsx +19 -0
  240. package/src/components/close/close.types.ts +7 -0
  241. package/src/components/close/index.ts +2 -0
  242. package/src/components/container/container.a11y.ts +0 -1
  243. package/src/components/container/container.tsx +13 -23
  244. package/src/components/container/container.types.ts +3 -4
  245. package/src/components/empty-state/empty-state.types.ts +3 -0
  246. package/src/components/field/field.tsx +36 -0
  247. package/src/components/field/field.types.ts +19 -0
  248. package/src/components/field/index.ts +2 -0
  249. package/src/components/flex/flex.tsx +4 -2
  250. package/src/components/flex/flex.types.ts +2 -1
  251. package/src/components/input-group/index.ts +7 -0
  252. package/src/components/input-group/input-group.tsx +57 -0
  253. package/src/components/input-group/input-group.types.ts +26 -0
  254. package/src/components/list-group/index.ts +7 -0
  255. package/src/components/list-group/list-group.tsx +74 -0
  256. package/src/components/list-group/list-group.types.ts +32 -0
  257. package/src/components/nav/index.ts +14 -0
  258. package/src/components/nav/nav.tsx +203 -0
  259. package/src/components/nav/nav.types.ts +68 -0
  260. package/src/components/navbar/index.ts +9 -2
  261. package/src/components/navbar/navbar-panel.tsx +67 -0
  262. package/src/components/navbar/navbar.context.ts +22 -0
  263. package/src/components/navbar/navbar.render.tsx +32 -0
  264. package/src/components/navbar/navbar.shared.ts +21 -0
  265. package/src/components/navbar/navbar.tsx +252 -99
  266. package/src/components/navbar/navbar.types.ts +36 -22
  267. package/src/components/overlays/dropdown-content.tsx +28 -0
  268. package/src/components/pagination/index.ts +8 -0
  269. package/src/components/pagination/pagination.tsx +158 -0
  270. package/src/components/pagination/pagination.types.ts +41 -0
  271. package/src/components/section/section.tsx +3 -2
  272. package/src/components/section/section.types.ts +2 -1
  273. package/src/components/separator/separator.types.ts +2 -1
  274. package/src/components/shell/index.ts +16 -0
  275. package/src/components/shell/shell-nav.types.ts +3 -0
  276. package/src/components/shell/shell-panel.tsx +85 -0
  277. package/src/components/shell/shell-responsive.tsx +212 -0
  278. package/src/components/shell/shell.a11y.ts +20 -0
  279. package/src/components/shell/shell.tsx +74 -0
  280. package/src/components/shell/shell.types.ts +71 -0
  281. package/src/components/sidebar/index.ts +5 -0
  282. package/src/components/sidebar/sidebar-panel.tsx +76 -0
  283. package/src/components/sidebar/sidebar-toggle.tsx +5 -0
  284. package/src/components/sidebar/sidebar.context.ts +40 -0
  285. package/src/components/sidebar/sidebar.shared.ts +12 -0
  286. package/src/components/sidebar/sidebar.tsx +355 -0
  287. package/src/components/sidebar/sidebar.types.ts +35 -0
  288. package/src/components/skeleton/skeleton.types.ts +2 -1
  289. package/src/components/spacer/spacer.tsx +4 -1
  290. package/src/components/spacer/spacer.types.ts +3 -2
  291. package/src/components/stack/stack.types.ts +2 -1
  292. package/src/components/theme/index.ts +10 -1
  293. package/src/components/theme/theme.tsx +15 -4
  294. package/src/controls.ts +18 -0
  295. package/src/feedback.ts +6 -0
  296. package/src/layouts.ts +19 -0
  297. package/src/navs.ts +26 -0
  298. package/src/overlays.ts +90 -0
  299. package/src/shells.ts +13 -0
  300. package/src/surfaces.ts +23 -0
  301. package/src/theme.ts +21 -0
  302. package/src/themes/default/index.css +13 -3
  303. package/src/themes/default/styles/actions/button-group.css +74 -0
  304. package/src/themes/default/styles/actions/button.css +48 -8
  305. package/src/themes/default/styles/actions/toggle-group.css +19 -12
  306. package/src/themes/default/styles/actions/toggle.css +16 -10
  307. package/src/themes/default/styles/base/icon.css +2 -0
  308. package/src/themes/default/styles/base/reset.css +28 -0
  309. package/src/themes/default/styles/base/typography.css +37 -17
  310. package/src/themes/default/styles/base/utilities.css +56 -39
  311. package/src/themes/default/styles/disclosure/accordion.css +22 -14
  312. package/src/themes/default/styles/disclosure/collapsible.css +22 -11
  313. package/src/themes/default/styles/display/alert.css +109 -0
  314. package/src/themes/default/styles/display/avatar.css +9 -4
  315. package/src/themes/default/styles/display/badge.css +12 -3
  316. package/src/themes/default/styles/display/card.css +16 -4
  317. package/src/themes/default/styles/display/coverage.css +93 -15
  318. package/src/themes/default/styles/display/list-group.css +84 -0
  319. package/src/themes/default/styles/display/progress-circle.css +3 -2
  320. package/src/themes/default/styles/display/progress.css +8 -5
  321. package/src/themes/default/styles/display/scroll-area.css +15 -0
  322. package/src/themes/default/styles/display/separator.css +4 -4
  323. package/src/themes/default/styles/display/skeleton.css +25 -2
  324. package/src/themes/default/styles/display/spinner.css +1 -1
  325. package/src/themes/default/styles/display/table.css +7 -4
  326. package/src/themes/default/styles/display/virtual-list.css +29 -0
  327. package/src/themes/default/styles/display/virtual-table.css +68 -0
  328. package/src/themes/default/styles/forms/checkbox.css +2 -1
  329. package/src/themes/default/styles/forms/field.css +22 -0
  330. package/src/themes/default/styles/forms/form.css +1 -1
  331. package/src/themes/default/styles/forms/input-group.css +202 -0
  332. package/src/themes/default/styles/forms/input.css +22 -6
  333. package/src/themes/default/styles/forms/label.css +2 -0
  334. package/src/themes/default/styles/forms/radio-group.css +22 -13
  335. package/src/themes/default/styles/forms/select.css +71 -26
  336. package/src/themes/default/styles/forms/slider.css +32 -16
  337. package/src/themes/default/styles/forms/switch.css +2 -1
  338. package/src/themes/default/styles/forms/textarea.css +35 -6
  339. package/src/themes/default/styles/layout/aspect-ratio.css +3 -1
  340. package/src/themes/default/styles/layout/block.css +23 -0
  341. package/src/themes/default/styles/layout/layout.css +1 -1
  342. package/src/themes/default/styles/layout/patterns.css +155 -3
  343. package/src/themes/default/styles/layout/responsive-layout.css +142 -121
  344. package/src/themes/default/styles/navigation/breadcrumb.css +7 -1
  345. package/src/themes/default/styles/navigation/menu.css +150 -7
  346. package/src/themes/default/styles/navigation/menubar.css +194 -28
  347. package/src/themes/default/styles/navigation/nav.css +231 -0
  348. package/src/themes/default/styles/navigation/pagination.css +91 -0
  349. package/src/themes/default/styles/overlays/alert-dialog.css +1 -1
  350. package/src/themes/default/styles/overlays/dialog.css +42 -10
  351. package/src/themes/default/styles/overlays/dropdown.css +160 -0
  352. package/src/themes/default/styles/overlays/hover-card.css +28 -3
  353. package/src/themes/default/styles/overlays/popover.css +50 -6
  354. package/src/themes/default/styles/overlays/toast.css +66 -17
  355. package/src/themes/default/styles/overlays/tooltip.css +45 -18
  356. package/src/themes/default/styles/shell/header.css +18 -3
  357. package/src/themes/default/styles/shell/navbar.css +434 -73
  358. package/src/themes/default/styles/shell/sidebar.css +830 -0
  359. package/src/themes/default/styles/shell/theme.css +7 -5
  360. package/src/themes/default/tokens.css +186 -123
  361. package/src/themes/presets/calico.css +46 -0
  362. package/src/themes/presets/ginger.css +46 -0
  363. package/src/themes/presets/index.css +5 -0
  364. package/src/themes/presets/tabby.css +46 -0
  365. package/src/themes/presets/torty.css +49 -0
  366. package/src/themes/presets/tuxedo.css +49 -0
  367. package/templates/theme/index.css +14 -4
  368. package/templates/theme/styles/actions/button-group.css +74 -0
  369. package/templates/theme/styles/actions/button.css +48 -8
  370. package/templates/theme/styles/actions/toggle-group.css +19 -12
  371. package/templates/theme/styles/actions/toggle.css +16 -10
  372. package/templates/theme/styles/base/icon.css +2 -0
  373. package/templates/theme/styles/base/reset.css +28 -0
  374. package/templates/theme/styles/base/typography.css +37 -17
  375. package/templates/theme/styles/disclosure/accordion.css +22 -14
  376. package/templates/theme/styles/disclosure/collapsible.css +22 -11
  377. package/templates/theme/styles/display/alert.css +109 -0
  378. package/templates/theme/styles/display/avatar.css +9 -4
  379. package/templates/theme/styles/display/badge.css +12 -3
  380. package/templates/theme/styles/display/card.css +16 -4
  381. package/templates/theme/styles/display/coverage.css +194 -14
  382. package/templates/theme/styles/display/list-group.css +84 -0
  383. package/templates/theme/styles/display/progress-circle.css +3 -2
  384. package/templates/theme/styles/display/progress.css +8 -5
  385. package/templates/theme/styles/display/scroll-area.css +15 -0
  386. package/templates/theme/styles/display/separator.css +4 -4
  387. package/templates/theme/styles/display/skeleton.css +25 -2
  388. package/templates/theme/styles/display/spinner.css +1 -1
  389. package/templates/theme/styles/display/table.css +7 -4
  390. package/templates/theme/styles/display/virtual-list.css +29 -0
  391. package/templates/theme/styles/display/virtual-table.css +68 -0
  392. package/templates/theme/styles/forms/checkbox.css +2 -1
  393. package/templates/theme/styles/forms/field.css +22 -0
  394. package/templates/theme/styles/forms/form.css +1 -1
  395. package/templates/theme/styles/forms/input-group.css +202 -0
  396. package/templates/theme/styles/forms/input.css +22 -6
  397. package/templates/theme/styles/forms/label.css +2 -0
  398. package/templates/theme/styles/forms/radio-group.css +22 -13
  399. package/templates/theme/styles/forms/select.css +71 -26
  400. package/templates/theme/styles/forms/slider.css +32 -16
  401. package/templates/theme/styles/forms/switch.css +2 -1
  402. package/templates/theme/styles/forms/textarea.css +35 -6
  403. package/templates/theme/styles/layout/aspect-ratio.css +3 -1
  404. package/templates/theme/styles/layout/block.css +23 -0
  405. package/templates/theme/styles/layout/patterns.css +155 -3
  406. package/templates/theme/styles/layout/responsive-layout.css +142 -121
  407. package/templates/theme/styles/navigation/breadcrumb.css +22 -8
  408. package/templates/theme/styles/navigation/menu.css +150 -7
  409. package/templates/theme/styles/navigation/menubar.css +194 -28
  410. package/templates/theme/styles/navigation/nav.css +231 -0
  411. package/templates/theme/styles/navigation/pagination.css +91 -0
  412. package/templates/theme/styles/overlays/alert-dialog.css +1 -1
  413. package/templates/theme/styles/overlays/dialog.css +42 -10
  414. package/templates/theme/styles/overlays/dropdown.css +160 -0
  415. package/templates/theme/styles/overlays/hover-card.css +28 -3
  416. package/templates/theme/styles/overlays/popover.css +50 -6
  417. package/templates/theme/styles/overlays/toast.css +66 -17
  418. package/templates/theme/styles/overlays/tooltip.css +45 -18
  419. package/templates/theme/styles/shell/header.css +18 -3
  420. package/templates/theme/styles/shell/navbar.css +434 -73
  421. package/templates/theme/styles/shell/sidebar.css +809 -0
  422. package/templates/theme/styles/shell/theme.css +7 -5
  423. package/templates/theme/tokens.css +186 -123
  424. package/dist/_internal/box-layout.js.map +0 -1
  425. package/dist/_internal/classes.js.map +0 -1
  426. package/dist/_internal/jsx.js.map +0 -1
  427. package/dist/_internal/layout.d.ts +0 -9
  428. package/dist/_internal/layout.js.map +0 -1
  429. package/dist/_internal/merge-props.js.map +0 -1
  430. package/dist/accessible-icon/accessible-icon.d.ts +0 -7
  431. package/dist/accessible-icon/accessible-icon.js +0 -20
  432. package/dist/accessible-icon/accessible-icon.js.map +0 -1
  433. package/dist/accessible-icon/accessible-icon.types.d.ts +0 -9
  434. package/dist/aspect-ratio/aspect-ratio.d.ts +0 -8
  435. package/dist/aspect-ratio/aspect-ratio.js +0 -36
  436. package/dist/aspect-ratio/aspect-ratio.js.map +0 -1
  437. package/dist/aspect-ratio/aspect-ratio.types.d.ts +0 -20
  438. package/dist/aspect-ratio/index.d.ts +0 -2
  439. package/dist/badge/badge.d.ts +0 -8
  440. package/dist/badge/badge.js.map +0 -1
  441. package/dist/badge/badge.types.d.ts +0 -20
  442. package/dist/badge/index.d.ts +0 -2
  443. package/dist/box/box.d.ts +0 -9
  444. package/dist/box/box.js.map +0 -1
  445. package/dist/box/box.types.d.ts +0 -71
  446. package/dist/box/index.d.ts +0 -2
  447. package/dist/breadcrumb/breadcrumb.d.ts +0 -18
  448. package/dist/breadcrumb/breadcrumb.js.map +0 -1
  449. package/dist/breadcrumb/breadcrumb.types.d.ts +0 -64
  450. package/dist/breadcrumb/index.d.ts +0 -2
  451. package/dist/card/card.d.ts +0 -12
  452. package/dist/card/card.js +0 -68
  453. package/dist/card/card.js.map +0 -1
  454. package/dist/card/card.types.d.ts +0 -37
  455. package/dist/card/index.d.ts +0 -2
  456. package/dist/components/_internal/box-layout.d.ts +0 -7
  457. package/dist/components/_internal/classes.d.ts +0 -1
  458. package/dist/components/_internal/jsx.d.ts +0 -8
  459. package/dist/components/_internal/merge-props.d.ts +0 -1
  460. package/dist/components/_internal/style.d.ts +0 -1
  461. package/dist/components/accessible-icon/accessible-icon.d.ts +0 -2
  462. package/dist/components/accessible-icon/accessible-icon.types.d.ts +0 -5
  463. package/dist/components/accessible-icon/index.d.ts +0 -2
  464. package/dist/components/grid/grid.a11y.d.ts +0 -21
  465. package/dist/components/grid/grid.d.ts +0 -4
  466. package/dist/components/grid/grid.types.d.ts +0 -37
  467. package/dist/components/grid/index.d.ts +0 -3
  468. package/dist/components/header/index.d.ts +0 -3
  469. package/dist/components/index.d.ts +0 -49
  470. package/dist/components/index.js +0 -28
  471. package/dist/components/logos/create-logo.d.ts +0 -5
  472. package/dist/components/logos/github-logo.d.ts +0 -4
  473. package/dist/components/logos/google-logo.d.ts +0 -4
  474. package/dist/components/logos/index.d.ts +0 -5
  475. package/dist/components/logos/microsoft-logo.d.ts +0 -4
  476. package/dist/components/logos/types.d.ts +0 -14
  477. package/dist/components/sidebar-layout/index.d.ts +0 -3
  478. package/dist/components/sidebar-layout/sidebar-layout.a11y.d.ts +0 -15
  479. package/dist/components/sidebar-layout/sidebar-layout.d.ts +0 -2
  480. package/dist/components/sidebar-layout/sidebar-layout.types.d.ts +0 -20
  481. package/dist/components/topbar-layout/index.d.ts +0 -3
  482. package/dist/components/topbar-layout/topbar-layout.a11y.d.ts +0 -13
  483. package/dist/components/topbar-layout/topbar-layout.d.ts +0 -2
  484. package/dist/components/topbar-layout/topbar-layout.types.d.ts +0 -12
  485. package/dist/container/container.d.ts +0 -8
  486. package/dist/container/container.js.map +0 -1
  487. package/dist/container/container.types.d.ts +0 -28
  488. package/dist/container/index.d.ts +0 -2
  489. package/dist/empty-state/empty-state.d.ts +0 -7
  490. package/dist/empty-state/empty-state.js.map +0 -1
  491. package/dist/empty-state/empty-state.types.d.ts +0 -13
  492. package/dist/flex/flex.d.ts +0 -9
  493. package/dist/flex/flex.js.map +0 -1
  494. package/dist/flex/flex.types.d.ts +0 -41
  495. package/dist/flex/index.d.ts +0 -2
  496. package/dist/grid/grid.d.ts +0 -9
  497. package/dist/grid/grid.js +0 -115
  498. package/dist/grid/grid.js.map +0 -1
  499. package/dist/grid/grid.types.d.ts +0 -40
  500. package/dist/grid/index.d.ts +0 -2
  501. package/dist/header/header.d.ts +0 -7
  502. package/dist/header/header.js.map +0 -1
  503. package/dist/header/header.types.d.ts +0 -9
  504. package/dist/inline/index.d.ts +0 -7
  505. package/dist/inline/index.js.map +0 -1
  506. package/dist/logos/create-logo.d.ts +0 -1
  507. package/dist/logos/create-logo.js +0 -75
  508. package/dist/logos/create-logo.js.map +0 -1
  509. package/dist/logos/github-logo.d.ts +0 -18
  510. package/dist/logos/github-logo.js +0 -9
  511. package/dist/logos/github-logo.js.map +0 -1
  512. package/dist/logos/google-logo.d.ts +0 -18
  513. package/dist/logos/google-logo.js +0 -23
  514. package/dist/logos/google-logo.js.map +0 -1
  515. package/dist/logos/index.d.ts +0 -4
  516. package/dist/logos/microsoft-logo.d.ts +0 -18
  517. package/dist/logos/microsoft-logo.js +0 -35
  518. package/dist/logos/microsoft-logo.js.map +0 -1
  519. package/dist/logos/types.d.ts +0 -16
  520. package/dist/navbar/index.d.ts +0 -2
  521. package/dist/navbar/navbar.d.ts +0 -12
  522. package/dist/navbar/navbar.js +0 -103
  523. package/dist/navbar/navbar.js.map +0 -1
  524. package/dist/navbar/navbar.types.d.ts +0 -31
  525. package/dist/section/index.d.ts +0 -2
  526. package/dist/section/section.d.ts +0 -8
  527. package/dist/section/section.js.map +0 -1
  528. package/dist/section/section.types.d.ts +0 -22
  529. package/dist/separator/index.d.ts +0 -2
  530. package/dist/separator/separator.d.ts +0 -8
  531. package/dist/separator/separator.js.map +0 -1
  532. package/dist/separator/separator.types.d.ts +0 -21
  533. package/dist/sidebar-layout/index.d.ts +0 -2
  534. package/dist/sidebar-layout/sidebar-layout.d.ts +0 -7
  535. package/dist/sidebar-layout/sidebar-layout.js +0 -51
  536. package/dist/sidebar-layout/sidebar-layout.js.map +0 -1
  537. package/dist/sidebar-layout/sidebar-layout.types.d.ts +0 -20
  538. package/dist/skeleton/index.d.ts +0 -2
  539. package/dist/skeleton/skeleton.d.ts +0 -8
  540. package/dist/skeleton/skeleton.js.map +0 -1
  541. package/dist/skeleton/skeleton.types.d.ts +0 -18
  542. package/dist/spacer/index.d.ts +0 -2
  543. package/dist/spacer/spacer.d.ts +0 -8
  544. package/dist/spacer/spacer.js.map +0 -1
  545. package/dist/spacer/spacer.types.d.ts +0 -25
  546. package/dist/spinner/index.d.ts +0 -2
  547. package/dist/spinner/spinner.d.ts +0 -7
  548. package/dist/spinner/spinner.js.map +0 -1
  549. package/dist/spinner/spinner.types.d.ts +0 -10
  550. package/dist/stack/index.d.ts +0 -2
  551. package/dist/stack/stack.d.ts +0 -8
  552. package/dist/stack/stack.js.map +0 -1
  553. package/dist/stack/stack.types.d.ts +0 -21
  554. package/dist/theme/index.d.ts +0 -1
  555. package/dist/theme/theme.d.ts +0 -44
  556. package/dist/theme/theme.js.map +0 -1
  557. package/dist/topbar-layout/index.d.ts +0 -2
  558. package/dist/topbar-layout/topbar-layout.d.ts +0 -7
  559. package/dist/topbar-layout/topbar-layout.js +0 -37
  560. package/dist/topbar-layout/topbar-layout.js.map +0 -1
  561. package/dist/topbar-layout/topbar-layout.types.d.ts +0 -13
  562. package/src/askr-compat.d.ts +0 -110
  563. package/src/askr-router.d.ts +0 -16
  564. package/src/components/accessible-icon/accessible-icon.tsx +0 -18
  565. package/src/components/accessible-icon/accessible-icon.types.ts +0 -5
  566. package/src/components/accessible-icon/index.ts +0 -2
  567. package/src/components/grid/grid.a11y.ts +0 -22
  568. package/src/components/grid/grid.tsx +0 -172
  569. package/src/components/grid/grid.types.ts +0 -45
  570. package/src/components/grid/index.ts +0 -10
  571. package/src/components/index.ts +0 -108
  572. package/src/components/logos/create-logo.tsx +0 -103
  573. package/src/components/logos/github-logo.tsx +0 -13
  574. package/src/components/logos/google-logo.tsx +0 -34
  575. package/src/components/logos/index.ts +0 -5
  576. package/src/components/logos/microsoft-logo.tsx +0 -10
  577. package/src/components/logos/types.ts +0 -24
  578. package/src/components/sidebar-layout/index.ts +0 -6
  579. package/src/components/sidebar-layout/sidebar-layout.a11y.ts +0 -16
  580. package/src/components/sidebar-layout/sidebar-layout.tsx +0 -59
  581. package/src/components/sidebar-layout/sidebar-layout.types.ts +0 -22
  582. package/src/components/topbar-layout/index.ts +0 -3
  583. package/src/components/topbar-layout/topbar-layout.a11y.ts +0 -14
  584. package/src/components/topbar-layout/topbar-layout.tsx +0 -39
  585. package/src/components/topbar-layout/topbar-layout.types.ts +0 -13
  586. package/src/themes/default/styles/layout/dashboard-layout.css +0 -15
  587. package/src/themes/default/styles/layout/docs-layout.css +0 -10
  588. package/src/themes/default/styles/layout/sidebar.css +0 -10
  589. package/src/themes/default/styles/navigation/navigation-menu.css +0 -90
  590. package/src/themes/default/styles/navigation/tabs.css +0 -61
  591. package/src/themes/default/styles/overlays/dropdown-menu.css +0 -109
  592. package/templates/theme/styles/layout/dashboard-layout.css +0 -16
  593. package/templates/theme/styles/layout/docs-layout.css +0 -11
  594. package/templates/theme/styles/layout/sidebar.css +0 -11
  595. package/templates/theme/styles/navigation/navigation-menu.css +0 -90
  596. package/templates/theme/styles/navigation/tabs.css +0 -61
  597. package/templates/theme/styles/overlays/dropdown-menu.css +0 -109
  598. /package/dist/{_internal → components/_internal}/classes.js +0 -0
  599. /package/dist/{_internal → components/_internal}/jsx.js +0 -0
  600. /package/dist/{breadcrumb → components/breadcrumb}/breadcrumb.js +0 -0
  601. /package/dist/{empty-state → components/empty-state}/empty-state.js +0 -0
  602. /package/dist/{header → components/header}/header.js +0 -0
  603. /package/dist/{inline → components/inline}/index.js +0 -0
  604. /package/dist/{separator → components/separator}/separator.js +0 -0
  605. /package/dist/{skeleton → components/skeleton}/skeleton.js +0 -0
  606. /package/dist/{spinner → components/spinner}/spinner.js +0 -0
  607. /package/dist/{stack → components/stack}/stack.js +0 -0
@@ -1,20 +0,0 @@
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
- };
@@ -1,3 +0,0 @@
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";
@@ -1,13 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import type { TopbarLayoutProps } from "./topbar-layout.types";
2
- export declare function TopbarLayout(props: TopbarLayoutProps): JSX.Element;
@@ -1,12 +0,0 @@
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
- };
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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,kBAAkB,WAAW,IAAI,CAAC,sBAAsB,WAAW,EAGpE,uBAAsB,aAAa,aAAa,aAAa,UAC3D,OAAO,UAAU,YAAY,sBAAsB,MAAM,GACrD,0BAA0B,MAAM,GAChC,MACL;AAGH,KACE,YAAY,KAAA,KACZ,SAAS,OAAO,KAAA,KAChB,SAAS,OAAO,KAAA,KAChB,SAAS,OAAO,KAAA,EAEhB,uBAAsB,aAAa,MAAM,SAAS,kBAAkB;CAGtE,MAAM,cAAc,MAAoC,UAAwB;AAC9E,wBAAsB,aAAa,SAAS,eAAe,OAAO,MAAM,QAAQ,UAAU;GACxF,MAAM,UAAU,wBAAwB,MAAM;AAC9C,UAAO,SAAS,eAAe,QAAQ,aAAa,QAAQ;IAC5D;;AAGJ,KAAI,SAAS,OAAO,KAAA,KAAa,SAAS,OAAO,KAAA,KAAa,kBAAkB,MAAM,EAAE;AACtF,aAAW,cAAc,MAAM;AAC/B,aAAW,eAAe,MAAM;;CAGlC,MAAM,cACJ,OAAO,KAAK,YAAY,CAAC,SAAS,KAAK,cAAc,UAAU,GAC3D,mBAAmB,aAAa,UAAU,GAC1C,KAAA;CAEN,MAAM,aAAa,WAAW,kBAAkB;EAC9C;EACA,aAAa;EACb,kBAAkB;EAClB,gBAAgB;EAChB,cAAc,QAAQ,SAAS,KAAA;EAC/B,aAAa,QACT,KAAA,IACA,cAAc,KAAK,GACjB,2BAA2B,MAAM,sBAAsB,GACvD,KAAA;EACN,cAAc,cAAc,MAAM,GAC9B,2BAA2B,OAAO,sBAAsB,GACxD,KAAA;EACJ,kBAAkB,QACd,KAAA,IACA,cAAc,SAAS,GACrB,2BAA2B,UAAU,sBAAsB,GAC3D,KAAA;EACN,OAAO;EACR,CAAC;AAEF,KAAI,QACF,QAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;AAG7D,QAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
@@ -1,28 +0,0 @@
1
- import { 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
@@ -1,2 +0,0 @@
1
- import { ContainerAsChildProps, ContainerNativeProps, ContainerOwnProps, ContainerProps, ContainerVariant } from "./container.types.js";
2
- import { Container } from "./container.js";
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,13 +0,0 @@
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
@@ -1,9 +0,0 @@
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
@@ -1 +0,0 @@
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":"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"}
@@ -1,41 +0,0 @@
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
@@ -1,2 +0,0 @@
1
- import { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps } from "./flex.types.js";
2
- import { Flex } from "./flex.js";
@@ -1,9 +0,0 @@
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
package/dist/grid/grid.js DELETED
@@ -1,115 +0,0 @@
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
@@ -1 +0,0 @@
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}>{keyedChildren}</div>;\n}\n"],"mappings":"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"}
@@ -1,40 +0,0 @@
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
@@ -1,2 +0,0 @@
1
- import { GridAsChildProps, GridDivProps, GridNativeProps, GridOwnProps, GridProps, GridSpanProps } from "./grid.types.js";
2
- import { Grid } from "./grid.js";
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
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
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- export { };
@@ -1,75 +0,0 @@
1
- import { jsx, jsxs } from "@askrjs/askr/jsx-runtime";
2
- //#region src/components/logos/create-logo.tsx
3
- const ICON_SIZE_TOKENS = [
4
- "sm",
5
- "md",
6
- "lg",
7
- "xl"
8
- ];
9
- function isIconSizeToken(value) {
10
- return typeof value === "string" && ICON_SIZE_TOKENS.includes(value);
11
- }
12
- function normalizeIconSizeValue(size) {
13
- if (typeof size === "number") return `${size}px`;
14
- return size;
15
- }
16
- function resolveIconSizeVariable(size) {
17
- if (isIconSizeToken(size)) return `var(--ak-icon-size-${size}, var(--ak-icon-size-md, 1.25rem))`;
18
- return normalizeIconSizeValue(size);
19
- }
20
- function camelToKebab(key) {
21
- return key.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
22
- }
23
- function serializeLogoStyle(style) {
24
- if (!style) return "";
25
- if (typeof style === "string") return style.trim();
26
- return Object.entries(style).filter(([, value]) => value !== void 0 && value !== null).map(([key, value]) => `${camelToKebab(key)}:${String(value)}`).join(";");
27
- }
28
- function joinLogoStyle(...styles) {
29
- const merged = styles.map((style) => style?.trim()).filter(Boolean);
30
- return merged.length > 0 ? merged.join(";") : void 0;
31
- }
32
- function getLogoContractProps({ size = 20, title, style, iconName }) {
33
- const sizeToken = isIconSizeToken(size) ? size : void 0;
34
- const decorative = title ? void 0 : "true";
35
- const logoStyle = joinLogoStyle(`--ak-icon-size:${resolveIconSizeVariable(size)}`, "display:inline-block", "flex-shrink:0", "width:var(--ak-icon-size)", "height:var(--ak-icon-size)", serializeLogoStyle(style));
36
- return { attrs: {
37
- xmlns: "http://www.w3.org/2000/svg",
38
- width: "24",
39
- height: "24",
40
- role: "img",
41
- "aria-hidden": title ? void 0 : "true",
42
- style: logoStyle,
43
- "data-slot": "icon",
44
- "data-icon": iconName,
45
- "data-size": sizeToken,
46
- "data-decorative": decorative
47
- } };
48
- }
49
- function createLogo(displayName, viewBox, logoNode) {
50
- function Logo({ size = 20, title, class: className, style, ref, ...rest }) {
51
- const { attrs } = getLogoContractProps({
52
- size,
53
- title,
54
- style,
55
- iconName: displayName
56
- });
57
- const children = logoNode.map(([tag, nodeAttrs], index) => jsx(tag, nodeAttrs, index));
58
- return jsxs("svg", {
59
- ...rest,
60
- ...attrs,
61
- viewBox,
62
- fill: "none",
63
- stroke: "none",
64
- class: className,
65
- ref,
66
- children: title ? [jsx("title", { children: title }), ...children] : children
67
- });
68
- }
69
- Logo.displayName = displayName;
70
- return Logo;
71
- }
72
- //#endregion
73
- export { createLogo };
74
-
75
- //# sourceMappingURL=create-logo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-logo.js","names":["createSvgNode","createSvgNodes"],"sources":["../../src/components/logos/create-logo.tsx"],"sourcesContent":["import { jsx as createSvgNode, jsxs as createSvgNodes } from \"@askrjs/askr/jsx-runtime\";\nimport type { IconSizeToken, LogoNode, LogoProps, LogoStyleObject } from \"./types\";\n\nconst ICON_SIZE_TOKENS: readonly IconSizeToken[] = [\"sm\", \"md\", \"lg\", \"xl\"];\n\nfunction isIconSizeToken(value: unknown): value is IconSizeToken {\n return typeof value === \"string\" && ICON_SIZE_TOKENS.includes(value as IconSizeToken);\n}\n\nfunction normalizeIconSizeValue(size: number | string): string {\n if (typeof size === \"number\") return `${size}px`;\n return size;\n}\n\nfunction resolveIconSizeVariable(size: number | string): string {\n if (isIconSizeToken(size)) {\n return `var(--ak-icon-size-${size}, var(--ak-icon-size-md, 1.25rem))`;\n }\n\n return normalizeIconSizeValue(size);\n}\n\nfunction camelToKebab(key: string): string {\n return key.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nfunction serializeLogoStyle(style: string | LogoStyleObject | undefined): string {\n if (!style) return \"\";\n if (typeof style === \"string\") return style.trim();\n\n return Object.entries(style)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${camelToKebab(key)}:${String(value)}`)\n .join(\";\");\n}\n\nfunction joinLogoStyle(...styles: Array<string | undefined>): string | undefined {\n const merged = styles.map((style) => style?.trim()).filter(Boolean);\n return merged.length > 0 ? merged.join(\";\") : undefined;\n}\n\nfunction getLogoContractProps({\n size = 20,\n title,\n style,\n iconName,\n}: Pick<LogoProps, \"iconName\" | \"size\" | \"style\" | \"title\">) {\n const sizeToken = isIconSizeToken(size) ? size : undefined;\n const decorative = title ? undefined : \"true\";\n const resolvedSize = resolveIconSizeVariable(size);\n const logoStyle = joinLogoStyle(\n `--ak-icon-size:${resolvedSize}`,\n \"display:inline-block\",\n \"flex-shrink:0\",\n \"width:var(--ak-icon-size)\",\n \"height:var(--ak-icon-size)\",\n serializeLogoStyle(style),\n );\n\n return {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"24\",\n height: \"24\",\n role: \"img\",\n \"aria-hidden\": title ? undefined : \"true\",\n style: logoStyle,\n \"data-slot\": \"icon\",\n \"data-icon\": iconName,\n \"data-size\": sizeToken,\n \"data-decorative\": decorative,\n },\n };\n}\n\nexport function createLogo(displayName: string, viewBox: string, logoNode: LogoNode) {\n function Logo({ size = 20, title, class: className, style, ref, ...rest }: LogoProps) {\n const { attrs } = getLogoContractProps({\n size,\n title,\n style,\n iconName: displayName,\n });\n\n const children = logoNode.map(([tag, nodeAttrs], index) =>\n createSvgNode(tag, nodeAttrs as Record<string, unknown>, index),\n );\n\n return createSvgNodes(\"svg\", {\n ...rest,\n ...attrs,\n viewBox,\n fill: \"none\",\n stroke: \"none\",\n class: className,\n ref,\n children: title ? [createSvgNode(\"title\", { children: title }), ...children] : children,\n });\n }\n\n Logo.displayName = displayName;\n return Logo;\n}\n"],"mappings":";;AAGA,MAAM,mBAA6C;CAAC;CAAM;CAAM;CAAM;CAAK;AAE3E,SAAS,gBAAgB,OAAwC;AAC/D,QAAO,OAAO,UAAU,YAAY,iBAAiB,SAAS,MAAuB;;AAGvF,SAAS,uBAAuB,MAA+B;AAC7D,KAAI,OAAO,SAAS,SAAU,QAAO,GAAG,KAAK;AAC7C,QAAO;;AAGT,SAAS,wBAAwB,MAA+B;AAC9D,KAAI,gBAAgB,KAAK,CACvB,QAAO,sBAAsB,KAAK;AAGpC,QAAO,uBAAuB,KAAK;;AAGrC,SAAS,aAAa,KAAqB;AACzC,QAAO,IAAI,QAAQ,aAAa,UAAU,IAAI,MAAM,aAAa,GAAG;;AAGtE,SAAS,mBAAmB,OAAqD;AAC/E,KAAI,CAAC,MAAO,QAAO;AACnB,KAAI,OAAO,UAAU,SAAU,QAAO,MAAM,MAAM;AAElD,QAAO,OAAO,QAAQ,MAAM,CACzB,QAAQ,GAAG,WAAW,UAAU,KAAA,KAAa,UAAU,KAAK,CAC5D,KAAK,CAAC,KAAK,WAAW,GAAG,aAAa,IAAI,CAAC,GAAG,OAAO,MAAM,GAAG,CAC9D,KAAK,IAAI;;AAGd,SAAS,cAAc,GAAG,QAAuD;CAC/E,MAAM,SAAS,OAAO,KAAK,UAAU,OAAO,MAAM,CAAC,CAAC,OAAO,QAAQ;AACnE,QAAO,OAAO,SAAS,IAAI,OAAO,KAAK,IAAI,GAAG,KAAA;;AAGhD,SAAS,qBAAqB,EAC5B,OAAO,IACP,OACA,OACA,YAC2D;CAC3D,MAAM,YAAY,gBAAgB,KAAK,GAAG,OAAO,KAAA;CACjD,MAAM,aAAa,QAAQ,KAAA,IAAY;CAEvC,MAAM,YAAY,cAChB,kBAFmB,wBAAwB,KAEb,IAC9B,wBACA,iBACA,6BACA,8BACA,mBAAmB,MAAM,CAC1B;AAED,QAAO,EACL,OAAO;EACL,OAAO;EACP,OAAO;EACP,QAAQ;EACR,MAAM;EACN,eAAe,QAAQ,KAAA,IAAY;EACnC,OAAO;EACP,aAAa;EACb,aAAa;EACb,aAAa;EACb,mBAAmB;EACpB,EACF;;AAGH,SAAgB,WAAW,aAAqB,SAAiB,UAAoB;CACnF,SAAS,KAAK,EAAE,OAAO,IAAI,OAAO,OAAO,WAAW,OAAO,KAAK,GAAG,QAAmB;EACpF,MAAM,EAAE,UAAU,qBAAqB;GACrC;GACA;GACA;GACA,UAAU;GACX,CAAC;EAEF,MAAM,WAAW,SAAS,KAAK,CAAC,KAAK,YAAY,UAC/CA,IAAc,KAAK,WAAsC,MAAM,CAChE;AAED,SAAOC,KAAe,OAAO;GAC3B,GAAG;GACH,GAAG;GACH;GACA,MAAM;GACN,QAAQ;GACR,OAAO;GACP;GACA,UAAU,QAAQ,CAACD,IAAc,SAAS,EAAE,UAAU,OAAO,CAAC,EAAE,GAAG,SAAS,GAAG;GAChF,CAAC;;AAGJ,MAAK,cAAc;AACnB,QAAO"}
@@ -1,18 +0,0 @@
1
- import { LogoProps } from "./types.js";
2
- import * as _$_askrjs_askr_foundations0 from "@askrjs/askr/foundations";
3
-
4
- //#region src/components/logos/github-logo.d.ts
5
- declare const GitHubLogo: {
6
- ({
7
- size,
8
- title,
9
- class: className,
10
- style,
11
- ref,
12
- ...rest
13
- }: LogoProps): _$_askrjs_askr_foundations0.JSXElement;
14
- displayName: string;
15
- };
16
- //#endregion
17
- export { GitHubLogo };
18
- //# sourceMappingURL=github-logo.d.ts.map
@@ -1,9 +0,0 @@
1
- import { createLogo } from "./create-logo.js";
2
- const GitHubLogo = createLogo("GitHubLogo", "0 0 24 24", [["path", {
3
- fill: "#181717",
4
- d: "M12 1C5.923 1 1 5.924 1 12.002c0 4.862 3.151 8.987 7.521 10.443.55.102.751-.239.751-.53 0-.262-.01-.956-.015-1.876-3.059.665-3.706-1.475-3.706-1.475-.5-1.271-1.22-1.609-1.22-1.609-.998-.682.076-.668.076-.668 1.104.078 1.685 1.134 1.685 1.134.981 1.682 2.575 1.196 3.203.915.1-.711.384-1.196.698-1.471-2.442-.278-5.01-1.221-5.01-5.436 0-1.201.429-2.184 1.133-2.954-.114-.278-.491-1.397.107-2.913 0 0 .924-.296 3.026 1.128A10.52 10.52 0 0 1 12 6.32c.935.004 1.876.127 2.755.373 2.1-1.424 3.023-1.128 3.023-1.128.6 1.516.223 2.635.109 2.913.706.77 1.131 1.753 1.131 2.954 0 4.225-2.572 5.155-5.02 5.427.395.34.746 1.011.746 2.038 0 1.472-.013 2.659-.013 3.021 0 .294.198.637.757.529C19.851 20.985 23 16.862 23 12.002 23 5.924 18.075 1 12 1Z"
5
- }]]);
6
- //#endregion
7
- export { GitHubLogo };
8
-
9
- //# sourceMappingURL=github-logo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-logo.js","names":[],"sources":["../../src/components/logos/github-logo.tsx"],"sourcesContent":["import { createLogo } from \"./create-logo\";\n\nconst GITHUB_LOGO_NODE = [\n [\n \"path\",\n {\n fill: \"#181717\",\n d: \"M12 1C5.923 1 1 5.924 1 12.002c0 4.862 3.151 8.987 7.521 10.443.55.102.751-.239.751-.53 0-.262-.01-.956-.015-1.876-3.059.665-3.706-1.475-3.706-1.475-.5-1.271-1.22-1.609-1.22-1.609-.998-.682.076-.668.076-.668 1.104.078 1.685 1.134 1.685 1.134.981 1.682 2.575 1.196 3.203.915.1-.711.384-1.196.698-1.471-2.442-.278-5.01-1.221-5.01-5.436 0-1.201.429-2.184 1.133-2.954-.114-.278-.491-1.397.107-2.913 0 0 .924-.296 3.026 1.128A10.52 10.52 0 0 1 12 6.32c.935.004 1.876.127 2.755.373 2.1-1.424 3.023-1.128 3.023-1.128.6 1.516.223 2.635.109 2.913.706.77 1.131 1.753 1.131 2.954 0 4.225-2.572 5.155-5.02 5.427.395.34.746 1.011.746 2.038 0 1.472-.013 2.659-.013 3.021 0 .294.198.637.757.529C19.851 20.985 23 16.862 23 12.002 23 5.924 18.075 1 12 1Z\",\n },\n ],\n] as const;\n\nexport const GitHubLogo = createLogo(\"GitHubLogo\", \"0 0 24 24\", GITHUB_LOGO_NODE);\n"],"mappings":";AAYA,MAAa,aAAa,WAAW,cAAc,aAAa,CAT9D,CACE,QACA;CACE,MAAM;CACN,GAAG;CACJ,CACF,CAG6D,CAAiB"}
@@ -1,18 +0,0 @@
1
- import { LogoProps } from "./types.js";
2
- import * as _$_askrjs_askr_foundations0 from "@askrjs/askr/foundations";
3
-
4
- //#region src/components/logos/google-logo.d.ts
5
- declare const GoogleLogo: {
6
- ({
7
- size,
8
- title,
9
- class: className,
10
- style,
11
- ref,
12
- ...rest
13
- }: LogoProps): _$_askrjs_askr_foundations0.JSXElement;
14
- displayName: string;
15
- };
16
- //#endregion
17
- export { GoogleLogo };
18
- //# sourceMappingURL=google-logo.d.ts.map