@askrjs/themes 0.0.2 → 0.0.4

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 (605) 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 +5 -15
  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 +19 -15
  67. package/dist/components/container/container.d.ts +8 -3
  68. package/dist/{container → components/container}/container.js +3 -3
  69. package/dist/components/container/container.js.map +1 -0
  70. package/dist/components/container/container.types.d.ts +26 -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 +3132 -832
  212. package/package.json +65 -25
  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 +4 -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.tsx +4 -4
  243. package/src/components/container/container.types.ts +2 -1
  244. package/src/components/empty-state/empty-state.types.ts +3 -0
  245. package/src/components/field/field.tsx +36 -0
  246. package/src/components/field/field.types.ts +19 -0
  247. package/src/components/field/index.ts +2 -0
  248. package/src/components/flex/flex.tsx +4 -2
  249. package/src/components/flex/flex.types.ts +2 -1
  250. package/src/components/input-group/index.ts +7 -0
  251. package/src/components/input-group/input-group.tsx +57 -0
  252. package/src/components/input-group/input-group.types.ts +26 -0
  253. package/src/components/list-group/index.ts +7 -0
  254. package/src/components/list-group/list-group.tsx +74 -0
  255. package/src/components/list-group/list-group.types.ts +32 -0
  256. package/src/components/nav/index.ts +14 -0
  257. package/src/components/nav/nav.tsx +203 -0
  258. package/src/components/nav/nav.types.ts +68 -0
  259. package/src/components/navbar/index.ts +9 -2
  260. package/src/components/navbar/navbar-panel.tsx +67 -0
  261. package/src/components/navbar/navbar.context.ts +22 -0
  262. package/src/components/navbar/navbar.render.tsx +32 -0
  263. package/src/components/navbar/navbar.shared.ts +21 -0
  264. package/src/components/navbar/navbar.tsx +262 -53
  265. package/src/components/navbar/navbar.types.ts +36 -22
  266. package/src/components/overlays/dropdown-content.tsx +28 -0
  267. package/src/components/pagination/index.ts +8 -0
  268. package/src/components/pagination/pagination.tsx +158 -0
  269. package/src/components/pagination/pagination.types.ts +41 -0
  270. package/src/components/section/section.tsx +3 -2
  271. package/src/components/section/section.types.ts +2 -1
  272. package/src/components/separator/separator.types.ts +2 -1
  273. package/src/components/shell/index.ts +16 -0
  274. package/src/components/shell/shell-nav.types.ts +3 -0
  275. package/src/components/shell/shell-panel.tsx +85 -0
  276. package/src/components/shell/shell-responsive.tsx +212 -0
  277. package/src/components/shell/shell.a11y.ts +20 -0
  278. package/src/components/shell/shell.tsx +74 -0
  279. package/src/components/shell/shell.types.ts +71 -0
  280. package/src/components/sidebar/index.ts +5 -0
  281. package/src/components/sidebar/sidebar-panel.tsx +76 -0
  282. package/src/components/sidebar/sidebar-toggle.tsx +5 -0
  283. package/src/components/sidebar/sidebar.context.ts +40 -0
  284. package/src/components/sidebar/sidebar.shared.ts +12 -0
  285. package/src/components/sidebar/sidebar.tsx +355 -0
  286. package/src/components/sidebar/sidebar.types.ts +35 -0
  287. package/src/components/skeleton/skeleton.types.ts +2 -1
  288. package/src/components/spacer/spacer.tsx +4 -1
  289. package/src/components/spacer/spacer.types.ts +3 -2
  290. package/src/components/stack/stack.types.ts +2 -1
  291. package/src/components/theme/index.ts +10 -1
  292. package/src/components/theme/theme.tsx +15 -4
  293. package/src/controls.ts +18 -0
  294. package/src/feedback.ts +6 -0
  295. package/src/layouts.ts +19 -0
  296. package/src/navs.ts +26 -0
  297. package/src/overlays.ts +90 -0
  298. package/src/shells.ts +13 -0
  299. package/src/surfaces.ts +23 -0
  300. package/src/theme.ts +21 -0
  301. package/src/themes/default/index.css +13 -3
  302. package/src/themes/default/styles/actions/button-group.css +74 -0
  303. package/src/themes/default/styles/actions/button.css +48 -8
  304. package/src/themes/default/styles/actions/toggle-group.css +19 -12
  305. package/src/themes/default/styles/actions/toggle.css +16 -10
  306. package/src/themes/default/styles/base/icon.css +2 -0
  307. package/src/themes/default/styles/base/reset.css +28 -0
  308. package/src/themes/default/styles/base/typography.css +37 -17
  309. package/src/themes/default/styles/base/utilities.css +56 -39
  310. package/src/themes/default/styles/disclosure/accordion.css +22 -14
  311. package/src/themes/default/styles/disclosure/collapsible.css +22 -11
  312. package/src/themes/default/styles/display/alert.css +109 -0
  313. package/src/themes/default/styles/display/avatar.css +9 -4
  314. package/src/themes/default/styles/display/badge.css +12 -3
  315. package/src/themes/default/styles/display/card.css +16 -4
  316. package/src/themes/default/styles/display/coverage.css +2 -14
  317. package/src/themes/default/styles/display/list-group.css +84 -0
  318. package/src/themes/default/styles/display/progress-circle.css +3 -2
  319. package/src/themes/default/styles/display/progress.css +8 -5
  320. package/src/themes/default/styles/display/scroll-area.css +15 -0
  321. package/src/themes/default/styles/display/separator.css +4 -4
  322. package/src/themes/default/styles/display/skeleton.css +25 -2
  323. package/src/themes/default/styles/display/spinner.css +1 -1
  324. package/src/themes/default/styles/display/table.css +7 -4
  325. package/src/themes/default/styles/display/virtual-list.css +29 -0
  326. package/src/themes/default/styles/display/virtual-table.css +68 -0
  327. package/src/themes/default/styles/forms/checkbox.css +2 -1
  328. package/src/themes/default/styles/forms/field.css +22 -0
  329. package/src/themes/default/styles/forms/form.css +1 -1
  330. package/src/themes/default/styles/forms/input-group.css +202 -0
  331. package/src/themes/default/styles/forms/input.css +22 -6
  332. package/src/themes/default/styles/forms/label.css +2 -0
  333. package/src/themes/default/styles/forms/radio-group.css +22 -13
  334. package/src/themes/default/styles/forms/select.css +71 -26
  335. package/src/themes/default/styles/forms/slider.css +32 -16
  336. package/src/themes/default/styles/forms/switch.css +2 -1
  337. package/src/themes/default/styles/forms/textarea.css +35 -6
  338. package/src/themes/default/styles/layout/aspect-ratio.css +3 -1
  339. package/src/themes/default/styles/layout/block.css +23 -0
  340. package/src/themes/default/styles/layout/patterns.css +155 -3
  341. package/src/themes/default/styles/layout/responsive-layout.css +140 -121
  342. package/src/themes/default/styles/navigation/breadcrumb.css +7 -1
  343. package/src/themes/default/styles/navigation/menu.css +150 -7
  344. package/src/themes/default/styles/navigation/menubar.css +194 -28
  345. package/src/themes/default/styles/navigation/nav.css +231 -0
  346. package/src/themes/default/styles/navigation/pagination.css +91 -0
  347. package/src/themes/default/styles/overlays/alert-dialog.css +1 -1
  348. package/src/themes/default/styles/overlays/dialog.css +42 -10
  349. package/src/themes/default/styles/overlays/dropdown.css +160 -0
  350. package/src/themes/default/styles/overlays/hover-card.css +28 -3
  351. package/src/themes/default/styles/overlays/popover.css +50 -6
  352. package/src/themes/default/styles/overlays/toast.css +66 -17
  353. package/src/themes/default/styles/overlays/tooltip.css +45 -18
  354. package/src/themes/default/styles/shell/header.css +18 -3
  355. package/src/themes/default/styles/shell/navbar.css +434 -73
  356. package/src/themes/default/styles/shell/sidebar.css +809 -0
  357. package/src/themes/default/styles/shell/theme.css +7 -5
  358. package/src/themes/default/tokens.css +186 -123
  359. package/src/themes/presets/calico.css +46 -0
  360. package/src/themes/presets/ginger.css +46 -0
  361. package/src/themes/presets/index.css +5 -0
  362. package/src/themes/presets/tabby.css +46 -0
  363. package/src/themes/presets/torty.css +49 -0
  364. package/src/themes/presets/tuxedo.css +49 -0
  365. package/templates/theme/index.css +14 -4
  366. package/templates/theme/styles/actions/button-group.css +74 -0
  367. package/templates/theme/styles/actions/button.css +48 -8
  368. package/templates/theme/styles/actions/toggle-group.css +19 -12
  369. package/templates/theme/styles/actions/toggle.css +16 -10
  370. package/templates/theme/styles/base/icon.css +2 -0
  371. package/templates/theme/styles/base/reset.css +28 -0
  372. package/templates/theme/styles/base/typography.css +37 -17
  373. package/templates/theme/styles/disclosure/accordion.css +22 -14
  374. package/templates/theme/styles/disclosure/collapsible.css +22 -11
  375. package/templates/theme/styles/display/alert.css +109 -0
  376. package/templates/theme/styles/display/avatar.css +9 -4
  377. package/templates/theme/styles/display/badge.css +12 -3
  378. package/templates/theme/styles/display/card.css +16 -4
  379. package/templates/theme/styles/display/coverage.css +105 -15
  380. package/templates/theme/styles/display/list-group.css +84 -0
  381. package/templates/theme/styles/display/progress-circle.css +3 -2
  382. package/templates/theme/styles/display/progress.css +8 -5
  383. package/templates/theme/styles/display/scroll-area.css +15 -0
  384. package/templates/theme/styles/display/separator.css +4 -4
  385. package/templates/theme/styles/display/skeleton.css +25 -2
  386. package/templates/theme/styles/display/spinner.css +1 -1
  387. package/templates/theme/styles/display/table.css +7 -4
  388. package/templates/theme/styles/display/virtual-list.css +29 -0
  389. package/templates/theme/styles/display/virtual-table.css +68 -0
  390. package/templates/theme/styles/forms/checkbox.css +2 -1
  391. package/templates/theme/styles/forms/field.css +22 -0
  392. package/templates/theme/styles/forms/form.css +1 -1
  393. package/templates/theme/styles/forms/input-group.css +202 -0
  394. package/templates/theme/styles/forms/input.css +22 -6
  395. package/templates/theme/styles/forms/label.css +2 -0
  396. package/templates/theme/styles/forms/radio-group.css +22 -13
  397. package/templates/theme/styles/forms/select.css +71 -26
  398. package/templates/theme/styles/forms/slider.css +32 -16
  399. package/templates/theme/styles/forms/switch.css +2 -1
  400. package/templates/theme/styles/forms/textarea.css +35 -6
  401. package/templates/theme/styles/layout/aspect-ratio.css +3 -1
  402. package/templates/theme/styles/layout/block.css +23 -0
  403. package/templates/theme/styles/layout/patterns.css +155 -3
  404. package/templates/theme/styles/layout/responsive-layout.css +140 -121
  405. package/templates/theme/styles/navigation/breadcrumb.css +22 -8
  406. package/templates/theme/styles/navigation/menu.css +150 -7
  407. package/templates/theme/styles/navigation/menubar.css +194 -28
  408. package/templates/theme/styles/navigation/nav.css +231 -0
  409. package/templates/theme/styles/navigation/pagination.css +91 -0
  410. package/templates/theme/styles/overlays/alert-dialog.css +1 -1
  411. package/templates/theme/styles/overlays/dialog.css +42 -10
  412. package/templates/theme/styles/overlays/dropdown.css +160 -0
  413. package/templates/theme/styles/overlays/hover-card.css +28 -3
  414. package/templates/theme/styles/overlays/popover.css +50 -6
  415. package/templates/theme/styles/overlays/toast.css +66 -17
  416. package/templates/theme/styles/overlays/tooltip.css +45 -18
  417. package/templates/theme/styles/shell/header.css +18 -3
  418. package/templates/theme/styles/shell/navbar.css +434 -73
  419. package/templates/theme/styles/shell/sidebar.css +809 -0
  420. package/templates/theme/styles/shell/theme.css +7 -5
  421. package/templates/theme/tokens.css +186 -123
  422. package/dist/_internal/box-layout.js.map +0 -1
  423. package/dist/_internal/classes.js.map +0 -1
  424. package/dist/_internal/jsx.js.map +0 -1
  425. package/dist/_internal/layout.d.ts +0 -9
  426. package/dist/_internal/layout.js.map +0 -1
  427. package/dist/_internal/merge-props.js.map +0 -1
  428. package/dist/accessible-icon/accessible-icon.d.ts +0 -7
  429. package/dist/accessible-icon/accessible-icon.js +0 -20
  430. package/dist/accessible-icon/accessible-icon.js.map +0 -1
  431. package/dist/accessible-icon/accessible-icon.types.d.ts +0 -9
  432. package/dist/aspect-ratio/aspect-ratio.d.ts +0 -8
  433. package/dist/aspect-ratio/aspect-ratio.js +0 -36
  434. package/dist/aspect-ratio/aspect-ratio.js.map +0 -1
  435. package/dist/aspect-ratio/aspect-ratio.types.d.ts +0 -20
  436. package/dist/aspect-ratio/index.d.ts +0 -2
  437. package/dist/badge/badge.d.ts +0 -8
  438. package/dist/badge/badge.js.map +0 -1
  439. package/dist/badge/badge.types.d.ts +0 -20
  440. package/dist/badge/index.d.ts +0 -2
  441. package/dist/box/box.d.ts +0 -9
  442. package/dist/box/box.js.map +0 -1
  443. package/dist/box/box.types.d.ts +0 -71
  444. package/dist/box/index.d.ts +0 -2
  445. package/dist/breadcrumb/breadcrumb.d.ts +0 -18
  446. package/dist/breadcrumb/breadcrumb.js.map +0 -1
  447. package/dist/breadcrumb/breadcrumb.types.d.ts +0 -64
  448. package/dist/breadcrumb/index.d.ts +0 -2
  449. package/dist/card/card.d.ts +0 -12
  450. package/dist/card/card.js +0 -68
  451. package/dist/card/card.js.map +0 -1
  452. package/dist/card/card.types.d.ts +0 -37
  453. package/dist/card/index.d.ts +0 -2
  454. package/dist/components/_internal/box-layout.d.ts +0 -7
  455. package/dist/components/_internal/classes.d.ts +0 -1
  456. package/dist/components/_internal/jsx.d.ts +0 -8
  457. package/dist/components/_internal/merge-props.d.ts +0 -1
  458. package/dist/components/_internal/style.d.ts +0 -1
  459. package/dist/components/accessible-icon/accessible-icon.d.ts +0 -2
  460. package/dist/components/accessible-icon/accessible-icon.types.d.ts +0 -5
  461. package/dist/components/accessible-icon/index.d.ts +0 -2
  462. package/dist/components/grid/grid.a11y.d.ts +0 -21
  463. package/dist/components/grid/grid.d.ts +0 -4
  464. package/dist/components/grid/grid.types.d.ts +0 -37
  465. package/dist/components/grid/index.d.ts +0 -3
  466. package/dist/components/header/index.d.ts +0 -3
  467. package/dist/components/index.d.ts +0 -49
  468. package/dist/components/index.js +0 -28
  469. package/dist/components/logos/create-logo.d.ts +0 -5
  470. package/dist/components/logos/github-logo.d.ts +0 -4
  471. package/dist/components/logos/google-logo.d.ts +0 -4
  472. package/dist/components/logos/index.d.ts +0 -5
  473. package/dist/components/logos/microsoft-logo.d.ts +0 -4
  474. package/dist/components/logos/types.d.ts +0 -14
  475. package/dist/components/sidebar-layout/index.d.ts +0 -3
  476. package/dist/components/sidebar-layout/sidebar-layout.a11y.d.ts +0 -15
  477. package/dist/components/sidebar-layout/sidebar-layout.d.ts +0 -2
  478. package/dist/components/sidebar-layout/sidebar-layout.types.d.ts +0 -20
  479. package/dist/components/topbar-layout/index.d.ts +0 -3
  480. package/dist/components/topbar-layout/topbar-layout.a11y.d.ts +0 -13
  481. package/dist/components/topbar-layout/topbar-layout.d.ts +0 -2
  482. package/dist/components/topbar-layout/topbar-layout.types.d.ts +0 -12
  483. package/dist/container/container.d.ts +0 -8
  484. package/dist/container/container.js.map +0 -1
  485. package/dist/container/container.types.d.ts +0 -28
  486. package/dist/container/index.d.ts +0 -2
  487. package/dist/empty-state/empty-state.d.ts +0 -7
  488. package/dist/empty-state/empty-state.js.map +0 -1
  489. package/dist/empty-state/empty-state.types.d.ts +0 -13
  490. package/dist/flex/flex.d.ts +0 -9
  491. package/dist/flex/flex.js.map +0 -1
  492. package/dist/flex/flex.types.d.ts +0 -41
  493. package/dist/flex/index.d.ts +0 -2
  494. package/dist/grid/grid.d.ts +0 -9
  495. package/dist/grid/grid.js +0 -115
  496. package/dist/grid/grid.js.map +0 -1
  497. package/dist/grid/grid.types.d.ts +0 -40
  498. package/dist/grid/index.d.ts +0 -2
  499. package/dist/header/header.d.ts +0 -7
  500. package/dist/header/header.js.map +0 -1
  501. package/dist/header/header.types.d.ts +0 -9
  502. package/dist/inline/index.d.ts +0 -7
  503. package/dist/inline/index.js.map +0 -1
  504. package/dist/logos/create-logo.d.ts +0 -1
  505. package/dist/logos/create-logo.js +0 -75
  506. package/dist/logos/create-logo.js.map +0 -1
  507. package/dist/logos/github-logo.d.ts +0 -18
  508. package/dist/logos/github-logo.js +0 -9
  509. package/dist/logos/github-logo.js.map +0 -1
  510. package/dist/logos/google-logo.d.ts +0 -18
  511. package/dist/logos/google-logo.js +0 -23
  512. package/dist/logos/google-logo.js.map +0 -1
  513. package/dist/logos/index.d.ts +0 -4
  514. package/dist/logos/microsoft-logo.d.ts +0 -18
  515. package/dist/logos/microsoft-logo.js +0 -35
  516. package/dist/logos/microsoft-logo.js.map +0 -1
  517. package/dist/logos/types.d.ts +0 -16
  518. package/dist/navbar/index.d.ts +0 -2
  519. package/dist/navbar/navbar.d.ts +0 -12
  520. package/dist/navbar/navbar.js +0 -73
  521. package/dist/navbar/navbar.js.map +0 -1
  522. package/dist/navbar/navbar.types.d.ts +0 -31
  523. package/dist/section/index.d.ts +0 -2
  524. package/dist/section/section.d.ts +0 -8
  525. package/dist/section/section.js.map +0 -1
  526. package/dist/section/section.types.d.ts +0 -22
  527. package/dist/separator/index.d.ts +0 -2
  528. package/dist/separator/separator.d.ts +0 -8
  529. package/dist/separator/separator.js.map +0 -1
  530. package/dist/separator/separator.types.d.ts +0 -21
  531. package/dist/sidebar-layout/index.d.ts +0 -2
  532. package/dist/sidebar-layout/sidebar-layout.d.ts +0 -7
  533. package/dist/sidebar-layout/sidebar-layout.js +0 -51
  534. package/dist/sidebar-layout/sidebar-layout.js.map +0 -1
  535. package/dist/sidebar-layout/sidebar-layout.types.d.ts +0 -20
  536. package/dist/skeleton/index.d.ts +0 -2
  537. package/dist/skeleton/skeleton.d.ts +0 -8
  538. package/dist/skeleton/skeleton.js.map +0 -1
  539. package/dist/skeleton/skeleton.types.d.ts +0 -18
  540. package/dist/spacer/index.d.ts +0 -2
  541. package/dist/spacer/spacer.d.ts +0 -8
  542. package/dist/spacer/spacer.js.map +0 -1
  543. package/dist/spacer/spacer.types.d.ts +0 -25
  544. package/dist/spinner/index.d.ts +0 -2
  545. package/dist/spinner/spinner.d.ts +0 -7
  546. package/dist/spinner/spinner.js.map +0 -1
  547. package/dist/spinner/spinner.types.d.ts +0 -10
  548. package/dist/stack/index.d.ts +0 -2
  549. package/dist/stack/stack.d.ts +0 -8
  550. package/dist/stack/stack.js.map +0 -1
  551. package/dist/stack/stack.types.d.ts +0 -21
  552. package/dist/theme/index.d.ts +0 -1
  553. package/dist/theme/theme.d.ts +0 -44
  554. package/dist/theme/theme.js.map +0 -1
  555. package/dist/topbar-layout/index.d.ts +0 -2
  556. package/dist/topbar-layout/topbar-layout.d.ts +0 -7
  557. package/dist/topbar-layout/topbar-layout.js +0 -37
  558. package/dist/topbar-layout/topbar-layout.js.map +0 -1
  559. package/dist/topbar-layout/topbar-layout.types.d.ts +0 -13
  560. package/src/askr-compat.d.ts +0 -110
  561. package/src/askr-router.d.ts +0 -16
  562. package/src/components/accessible-icon/accessible-icon.tsx +0 -18
  563. package/src/components/accessible-icon/accessible-icon.types.ts +0 -5
  564. package/src/components/accessible-icon/index.ts +0 -2
  565. package/src/components/grid/grid.a11y.ts +0 -22
  566. package/src/components/grid/grid.tsx +0 -172
  567. package/src/components/grid/grid.types.ts +0 -45
  568. package/src/components/grid/index.ts +0 -10
  569. package/src/components/index.ts +0 -108
  570. package/src/components/logos/create-logo.tsx +0 -103
  571. package/src/components/logos/github-logo.tsx +0 -13
  572. package/src/components/logos/google-logo.tsx +0 -34
  573. package/src/components/logos/index.ts +0 -5
  574. package/src/components/logos/microsoft-logo.tsx +0 -10
  575. package/src/components/logos/types.ts +0 -24
  576. package/src/components/sidebar-layout/index.ts +0 -6
  577. package/src/components/sidebar-layout/sidebar-layout.a11y.ts +0 -16
  578. package/src/components/sidebar-layout/sidebar-layout.tsx +0 -59
  579. package/src/components/sidebar-layout/sidebar-layout.types.ts +0 -22
  580. package/src/components/topbar-layout/index.ts +0 -3
  581. package/src/components/topbar-layout/topbar-layout.a11y.ts +0 -14
  582. package/src/components/topbar-layout/topbar-layout.tsx +0 -39
  583. package/src/components/topbar-layout/topbar-layout.types.ts +0 -13
  584. package/src/themes/default/styles/layout/dashboard-layout.css +0 -15
  585. package/src/themes/default/styles/layout/docs-layout.css +0 -10
  586. package/src/themes/default/styles/layout/sidebar.css +0 -10
  587. package/src/themes/default/styles/navigation/navigation-menu.css +0 -90
  588. package/src/themes/default/styles/navigation/tabs.css +0 -61
  589. package/src/themes/default/styles/overlays/dropdown-menu.css +0 -109
  590. package/templates/theme/styles/layout/dashboard-layout.css +0 -16
  591. package/templates/theme/styles/layout/docs-layout.css +0 -11
  592. package/templates/theme/styles/layout/sidebar.css +0 -11
  593. package/templates/theme/styles/navigation/navigation-menu.css +0 -90
  594. package/templates/theme/styles/navigation/tabs.css +0 -61
  595. package/templates/theme/styles/overlays/dropdown-menu.css +0 -109
  596. /package/dist/{_internal → components/_internal}/classes.js +0 -0
  597. /package/dist/{_internal → components/_internal}/jsx.js +0 -0
  598. /package/dist/{breadcrumb → components/breadcrumb}/breadcrumb.js +0 -0
  599. /package/dist/{empty-state → components/empty-state}/empty-state.js +0 -0
  600. /package/dist/{header → components/header}/header.js +0 -0
  601. /package/dist/{inline → components/inline}/index.js +0 -0
  602. /package/dist/{separator → components/separator}/separator.js +0 -0
  603. /package/dist/{skeleton → components/skeleton}/skeleton.js +0 -0
  604. /package/dist/{spinner → components/spinner}/spinner.js +0 -0
  605. /package/dist/{stack → components/stack}/stack.js +0 -0
@@ -1,29 +1,29 @@
1
- import type { JSXElement, Ref } from "@askrjs/askr/foundations";
2
- import type { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types";
3
- export type ContainerVariant = "default" | "sm" | "md" | "lg" | "xl" | "xxl" | "fluid";
4
- export type ContainerOwnProps = BoxLayoutOwnProps & {
5
- /** Bootstrap-like responsive container variant. */
6
- variant?: ContainerVariant;
7
- /** Makes the container span the full available width while preserving gutters. */
8
- fluid?: boolean;
9
- /** Radix-style container size token. */
10
- size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl">;
11
- /** Horizontal alignment of the constrained container. */
12
- align?: LayoutResponsive<"left" | "center" | "right">;
13
- /** Compatibility max-width override. */
14
- maxWidth?: LayoutResponsive<string>;
15
- /** Compatibility horizontal padding override. */
16
- padding?: LayoutResponsive<string | number>;
17
- children?: unknown;
1
+ import { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types.js";
2
+ import { JSXElement } from "@askrjs/askr/foundations";
3
+ import { Ref } from "@askrjs/askr/foundations/utilities";
4
+
5
+ //#region src/components/container/container.types.d.ts
6
+ type ContainerVariant = "default" | "sm" | "md" | "lg" | "xl" | "xxl" | "fluid";
7
+ type ContainerOwnProps = BoxLayoutOwnProps & {
8
+ /** Bootstrap-like responsive container variant. */variant?: ContainerVariant; /** Makes the container span the full available width while preserving gutters. */
9
+ fluid?: boolean; /** Radix-style container size token. */
10
+ size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl">; /** Horizontal alignment of the constrained container. */
11
+ align?: LayoutResponsive<"left" | "center" | "right">; /** Compatibility max-width override. */
12
+ maxWidth?: LayoutResponsive<string>; /** Compatibility horizontal padding override. */
13
+ padding?: LayoutResponsive<string | number>;
14
+ children?: unknown;
18
15
  };
19
- export type ContainerNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & ContainerOwnProps & {
20
- asChild?: false;
21
- ref?: Ref<HTMLDivElement>;
16
+ type ContainerNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & ContainerOwnProps & {
17
+ asChild?: false;
18
+ ref?: Ref<HTMLDivElement>;
22
19
  };
23
- export type ContainerAsChildProps = ContainerOwnProps & {
24
- asChild: true;
25
- children: JSXElement;
26
- ref?: Ref<unknown>;
27
- style?: JSX.IntrinsicElements["div"]["style"];
20
+ type ContainerAsChildProps = ContainerOwnProps & {
21
+ asChild: true;
22
+ children: JSXElement;
23
+ ref?: Ref<unknown>;
24
+ style?: JSX.IntrinsicElements["div"]["style"];
28
25
  };
29
- export type ContainerProps = ContainerNativeProps | ContainerAsChildProps;
26
+ type ContainerProps = ContainerNativeProps | ContainerAsChildProps;
27
+ //#endregion
28
+ export { ContainerAsChildProps, ContainerNativeProps, ContainerOwnProps, ContainerProps, ContainerVariant };
29
+ //# sourceMappingURL=container.types.d.ts.map
@@ -1,3 +1,3 @@
1
- export { Container } from "./container";
2
- export { CONTAINER_A11Y_CONTRACT, type ContainerA11yContract } from "./container.a11y";
3
- export type { ContainerProps, ContainerVariant, ContainerOwnProps, ContainerNativeProps, ContainerAsChildProps, } from "./container.types";
1
+ import { ContainerAsChildProps, ContainerNativeProps, ContainerOwnProps, ContainerProps, ContainerVariant } from "./container.types.js";
2
+ import { Container } from "./container.js";
3
+ import { CONTAINER_A11Y_CONTRACT, ContainerA11yContract } from "./container.a11y.js";
@@ -1,2 +1,7 @@
1
- import type { EmptyStateProps } from "./empty-state.types";
2
- export declare function EmptyState(props: EmptyStateProps): JSX.Element;
1
+ import { EmptyStateProps } from "./empty-state.types.js";
2
+
3
+ //#region src/components/empty-state/empty-state.d.ts
4
+ declare function EmptyState(props: EmptyStateProps): JSX.Element;
5
+ //#endregion
6
+ export { EmptyState };
7
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1 @@
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;CAEJ,OACE,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,9 +1,16 @@
1
- export type EmptyStateHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
2
- export type EmptyStateProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
3
- icon?: unknown;
4
- title?: unknown;
5
- titleAs?: EmptyStateHeadingTag;
6
- description?: unknown;
7
- actions?: unknown;
8
- children?: unknown;
1
+ import { Ref } from "@askrjs/askr/foundations/utilities";
2
+
3
+ //#region src/components/empty-state/empty-state.types.d.ts
4
+ type EmptyStateHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
5
+ type EmptyStateProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
6
+ icon?: unknown;
7
+ title?: unknown;
8
+ titleAs?: EmptyStateHeadingTag;
9
+ description?: unknown;
10
+ actions?: unknown;
11
+ children?: unknown;
12
+ ref?: Ref<HTMLDivElement>;
9
13
  };
14
+ //#endregion
15
+ export { EmptyStateHeadingTag, EmptyStateProps };
16
+ //# sourceMappingURL=empty-state.types.d.ts.map
@@ -1,2 +1,2 @@
1
- export { EmptyState } from "./empty-state";
2
- export type { EmptyStateHeadingTag, EmptyStateProps } from "./empty-state.types";
1
+ import { EmptyStateHeadingTag, EmptyStateProps } from "./empty-state.types.js";
2
+ import { EmptyState } from "./empty-state.js";
@@ -0,0 +1,9 @@
1
+ import { FieldErrorProps, FieldHintProps, FieldProps } from "./field.types.js";
2
+
3
+ //#region src/components/field/field.d.ts
4
+ declare function Field(props: FieldProps): JSX.Element;
5
+ declare function FieldHint(props: FieldHintProps): JSX.Element;
6
+ declare function FieldError(props: FieldErrorProps): JSX.Element;
7
+ //#endregion
8
+ export { Field, FieldError, FieldHint };
9
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1,41 @@
1
+ import { classes } from "../_internal/classes.js";
2
+ import { mergeProps } from "../_internal/merge-props.js";
3
+ import { jsx } from "@askrjs/askr/jsx-runtime";
4
+ //#region src/components/field/field.tsx
5
+ function Field(props) {
6
+ const { children, class: className, ref, ...rest } = props;
7
+ return /* @__PURE__ */ jsx("div", {
8
+ ...mergeProps(rest, {
9
+ class: classes("field", className),
10
+ ref,
11
+ "data-slot": "field"
12
+ }),
13
+ children
14
+ });
15
+ }
16
+ function FieldHint(props) {
17
+ const { children, class: className, ref, ...rest } = props;
18
+ return /* @__PURE__ */ jsx("p", {
19
+ ...mergeProps(rest, {
20
+ class: classes("field-hint", className),
21
+ ref,
22
+ "data-slot": "field-hint"
23
+ }),
24
+ children
25
+ });
26
+ }
27
+ function FieldError(props) {
28
+ const { children, class: className, ref, ...rest } = props;
29
+ return /* @__PURE__ */ jsx("p", {
30
+ ...mergeProps(rest, {
31
+ class: classes("field-error", className),
32
+ ref,
33
+ "data-slot": "field-error"
34
+ }),
35
+ children
36
+ });
37
+ }
38
+ //#endregion
39
+ export { Field, FieldError, FieldHint };
40
+
41
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.js","names":[],"sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import { classes } from \"../_internal/classes\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { FieldErrorProps, FieldHintProps, FieldProps } from \"./field.types\";\n\nexport function Field(props: FieldProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field\", className),\n ref,\n \"data-slot\": \"field\",\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\nexport function FieldHint(props: FieldHintProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field-hint\", className),\n ref,\n \"data-slot\": \"field-hint\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n\nexport function FieldError(props: FieldErrorProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field-error\", className),\n ref,\n \"data-slot\": \"field-error\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n"],"mappings":";;;;AAIA,SAAgB,MAAM,OAAgC;CACpD,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,OAAD;EAAK,GANO,WAAW,MAAM;GAClC,OAAO,QAAQ,SAAS,UAAU;GAClC;GACA,aAAa;GACd,CAEyB;EAAG;EAAe,CAAA;;AAG9C,SAAgB,UAAU,OAAoC;CAC5D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,KAAD;EAAG,GANS,WAAW,MAAM;GAClC,OAAO,QAAQ,cAAc,UAAU;GACvC;GACA,aAAa;GACd,CAEuB;EAAG;EAAa,CAAA;;AAG1C,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,KAAD;EAAG,GANS,WAAW,MAAM;GAClC,OAAO,QAAQ,eAAe,UAAU;GACxC;GACA,aAAa;GACd,CAEuB;EAAG;EAAa,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { Ref } from "@askrjs/askr/foundations/utilities";
2
+
3
+ //#region src/components/field/field.types.d.ts
4
+ type DivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref">;
5
+ type ParagraphProps = Omit<JSX.IntrinsicElements["p"], "children" | "ref">;
6
+ type FieldProps = DivProps & {
7
+ children?: unknown;
8
+ ref?: Ref<HTMLDivElement>;
9
+ };
10
+ type FieldHintProps = ParagraphProps & {
11
+ children?: unknown;
12
+ ref?: Ref<HTMLParagraphElement>;
13
+ };
14
+ type FieldErrorProps = ParagraphProps & {
15
+ children?: unknown;
16
+ ref?: Ref<HTMLParagraphElement>;
17
+ };
18
+ //#endregion
19
+ export { FieldErrorProps, FieldHintProps, FieldProps };
20
+ //# sourceMappingURL=field.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { FieldErrorProps, FieldHintProps, FieldProps } from "./field.types.js";
2
+ import { Field, FieldError, FieldHint } from "./field.js";
@@ -1,18 +1,22 @@
1
- export declare const FLEX_A11Y_CONTRACT: {
2
- readonly DATA_ATTRIBUTES: {
3
- readonly slot: "data-slot";
4
- readonly layout: "data-ak-layout";
5
- readonly direction: "data-direction";
6
- readonly gap: "data-gap";
7
- readonly gapX: "data-gap-x";
8
- readonly gapY: "data-gap-y";
9
- readonly align: "data-align";
10
- readonly justify: "data-justify";
11
- readonly wrap: "data-wrap";
12
- readonly collapseBelow: "data-collapse-below";
13
- };
14
- readonly SLOT_VALUES: {
15
- readonly root: "flex";
16
- };
1
+ //#region src/components/flex/flex.a11y.d.ts
2
+ declare const FLEX_A11Y_CONTRACT: {
3
+ readonly DATA_ATTRIBUTES: {
4
+ readonly slot: "data-slot";
5
+ readonly layout: "data-ak-layout";
6
+ readonly direction: "data-direction";
7
+ readonly gap: "data-gap";
8
+ readonly gapX: "data-gap-x";
9
+ readonly gapY: "data-gap-y";
10
+ readonly align: "data-align";
11
+ readonly justify: "data-justify";
12
+ readonly wrap: "data-wrap";
13
+ readonly collapseBelow: "data-collapse-below";
14
+ };
15
+ readonly SLOT_VALUES: {
16
+ readonly root: "flex";
17
+ };
17
18
  };
18
- export type FlexA11yContract = typeof FLEX_A11Y_CONTRACT;
19
+ type FlexA11yContract = typeof FLEX_A11Y_CONTRACT;
20
+ //#endregion
21
+ export { FLEX_A11Y_CONTRACT, FlexA11yContract };
22
+ //# sourceMappingURL=flex.a11y.d.ts.map
@@ -1,4 +1,9 @@
1
- import type { FlexAsChildProps, FlexDivProps, FlexSpanProps } from "./flex.types";
2
- export declare function Flex(props: FlexDivProps): JSX.Element;
3
- export declare function Flex(props: FlexSpanProps): JSX.Element;
4
- export declare function Flex(props: FlexAsChildProps): JSX.Element;
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,6 +1,6 @@
1
1
  import { mergeProps } from "../_internal/merge-props.js";
2
2
  import { isResponsiveValue, resolveAlignValue, resolveJustifyValue, resolveSpaceValue, serializeResponsiveValueIf, setResponsiveStyleVar } from "../_internal/layout.js";
3
- import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutStyle } from "../_internal/box-layout.js";
3
+ import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutClass } from "../_internal/box-layout.js";
4
4
  import { jsx } from "@askrjs/askr/jsx-runtime";
5
5
  import { Slot } from "@askrjs/askr/foundations";
6
6
  //#region src/components/flex/flex.tsx
@@ -80,6 +80,7 @@ function Flex(props) {
80
80
  if (!isCssCoveredAlignValue(align) || isResponsiveObject(align)) setResponsiveStyleVar(layoutStyle, "align-items", align, resolveAlignValue);
81
81
  if (!isCssCoveredJustifyValue(justify) || isResponsiveObject(justify)) setResponsiveStyleVar(layoutStyle, "justify-content", justify, resolveJustifyValue);
82
82
  if (!isCssCoveredWrapValue(wrap) || isResponsiveObject(wrap)) setResponsiveStyleVar(layoutStyle, "flex-wrap", wrap, (value) => value);
83
+ const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);
83
84
  const finalProps = mergeProps(passthroughProps, {
84
85
  ref,
85
86
  "data-slot": rootSlot,
@@ -92,7 +93,7 @@ function Flex(props) {
92
93
  "data-justify": serializeStaticThemeValue(justify, isCssCoveredJustifyValue),
93
94
  "data-wrap": serializeStaticThemeValue(wrap, isCssCoveredWrapValue),
94
95
  "data-collapse-below": collapseBelow,
95
- style: withBoxLayoutStyle(layoutStyle, userStyle)
96
+ ...layoutClass ? { class: layoutClass } : {}
96
97
  });
97
98
  if (asChild) return /* @__PURE__ */ jsx(Slot, {
98
99
  asChild: true,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.js","names":[],"sources":["../../../src/components/flex/flex.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutClass,\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 layoutClass = withBoxLayoutClass(layoutStyle, userStyle);\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 ...(layoutClass ? { class: layoutClass } : {}),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n if (as === \"span\") {\n return <span {...finalProps}>{children}</span>;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;;AAiBA,MAAM,eAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,SAAS,mBAAmB,OAAyB;CACnD,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM;;AAG7E,SAAS,uBAAuB,OAAiC;CAC/D,OAAO,OAAO,UAAU,YAAY,aAAa,IAAI,MAAM,MAAM,CAAC;;AAGpE,SAAS,2BAA2B,OAAiC;CACnE,OACE,OAAO,UAAU,YACjB;EAAC;EAAO;EAAU;EAAe;EAAiB,CAAC,SAAS,MAAM,MAAM,CAAC;;AAI7E,SAAS,uBAAuB,OAAiC;CAC/D,OACE,OAAO,UAAU,YACjB;EAAC;EAAS;EAAO;EAAU;EAAW;EAAW,CAAC,SAAS,MAAM,MAAM,CAAC;;AAI5E,SAAS,yBAAyB,OAAiC;CACjE,OAAO,OAAO,UAAU,YAAY;EAAC;EAAS;EAAO;EAAU;EAAU,CAAC,SAAS,MAAM,MAAM,CAAC;;AAGlG,SAAS,sBAAsB,OAAiC;CAC9D,OAAO,OAAO,UAAU,YAAY;EAAC;EAAQ;EAAU;EAAe,CAAC,SAAS,MAAM,MAAM,CAAC;;AAG/F,SAAS,0BACP,OACA,WACoB;CACpB,IAAI,kBAAkB,MAAM,EAAE,OAAO,KAAA;CACrC,OAAO,2BAA2B,OAAO,UAAU;;AAGrD,MAAM,QAAQ,EACZ,MAAM,QACP;AAKD,SAAgB,KAAK,OAAwD;CAC3E,MAAM,KAAK,QAAQ,QAAQ,MAAM,KAAK;CACtC,MAAM,EACJ,SACA,UACA,YAAY,OACZ,KACA,MACA,MACA,OACA,SACA,MACA,eACA,KACA,OAAO,WACP,GAAG,SACD;CAEJ,MAAM,EAAE,UAAU,MAAM,qBAAqB,oBAAoB,KAAK;CACtE,MAAM,WACJ,OAAQ,iBAA6C,iBAAiB,WAClE,OAAQ,iBAA6C,aAAa,GAClE,MAAM;CACZ,MAAM,cAA+C,EAAE;CACvD,qBAAqB,aAAa,SAAS;CAE3C,IAAI,SAAS,YAAY,KAAA,GACvB,sBAAsB,aAAa,WAAW,SAAS,UAAU,UAAU,MAAM;CAEnF,IACE,cAAc,UACb,CAAC,2BAA2B,UAAU,IAAI,mBAAmB,UAAU,GAExE,sBAAsB,aAAa,kBAAkB,YAAY,UAAU,MAAM;CAEnF,IAAI,CAAC,uBAAuB,IAAI,IAAI,mBAAmB,IAAI,EACzD,sBAAsB,aAAa,OAAO,KAAK,kBAAkB;CAEnE,IAAI,CAAC,uBAAuB,KAAK,IAAI,mBAAmB,KAAK,EAC3D,sBAAsB,aAAa,cAAc,MAAM,kBAAkB;CAE3E,IAAI,CAAC,uBAAuB,KAAK,IAAI,mBAAmB,KAAK,EAC3D,sBAAsB,aAAa,WAAW,MAAM,kBAAkB;CAExE,IAAI,CAAC,uBAAuB,MAAM,IAAI,mBAAmB,MAAM,EAC7D,sBAAsB,aAAa,eAAe,OAAO,kBAAkB;CAE7E,IAAI,CAAC,yBAAyB,QAAQ,IAAI,mBAAmB,QAAQ,EACnE,sBAAsB,aAAa,mBAAmB,SAAS,oBAAoB;CAErF,IAAI,CAAC,sBAAsB,KAAK,IAAI,mBAAmB,KAAK,EAC1D,sBAAsB,aAAa,aAAa,OAAO,UAAU,MAAM;CAGzE,MAAM,cAAc,mBAAmB,aAAa,UAAU;CAE9D,MAAM,aAAa,WAAW,kBAAkB;EAC9C;EACA,aAAa;EACb,kBAAkB;EAClB,kBAAkB,0BAA0B,WAAW,2BAA2B;EAClF,YAAY,0BAA0B,KAAK,uBAAuB;EAClE,cAAc,0BAA0B,MAAM,uBAAuB;EACrE,cAAc,0BAA0B,MAAM,uBAAuB;EACrE,cAAc,0BAA0B,OAAO,uBAAuB;EACtE,gBAAgB,0BAA0B,SAAS,yBAAyB;EAC5E,aAAa,0BAA0B,MAAM,sBAAsB;EACnE,uBAAuB;EACvB,GAAI,cAAc,EAAE,OAAO,aAAa,GAAG,EAAE;EAC9C,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAA2B,CAAA;CAG5E,IAAI,OAAO,QACT,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA;CAGhD,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
@@ -1,41 +1,42 @@
1
- import type { JSXElement, Ref } from "@askrjs/askr/foundations";
2
- import type { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types";
3
- export type FlexOwnProps = BoxLayoutOwnProps & {
4
- direction?: LayoutResponsive<"row" | "column" | "row-reverse" | "column-reverse">;
5
- gap?: LayoutResponsive<string | number>;
6
- gapX?: LayoutResponsive<string | number>;
7
- gapY?: LayoutResponsive<string | number>;
8
- align?: LayoutResponsive<string>;
9
- justify?: LayoutResponsive<string>;
10
- wrap?: LayoutResponsive<"wrap" | "nowrap" | "wrap-reverse">;
11
- /**
12
- * Compatibility breakpoint helper. Prefer responsive `direction` instead.
13
- */
14
- collapseBelow?: string;
15
- as?: "div" | "span";
16
- children?: unknown;
1
+ import { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types.js";
2
+ import { JSXElement } from "@askrjs/askr/foundations";
3
+ import { Ref } from "@askrjs/askr/foundations/utilities";
4
+
5
+ //#region src/components/flex/flex.types.d.ts
6
+ type FlexOwnProps = BoxLayoutOwnProps & {
7
+ direction?: LayoutResponsive<"row" | "column" | "row-reverse" | "column-reverse">;
8
+ gap?: LayoutResponsive<string | number>;
9
+ gapX?: LayoutResponsive<string | number>;
10
+ gapY?: LayoutResponsive<string | number>;
11
+ align?: LayoutResponsive<string>;
12
+ justify?: LayoutResponsive<string>;
13
+ wrap?: LayoutResponsive<"wrap" | "nowrap" | "wrap-reverse">;
14
+ /**
15
+ * Compatibility breakpoint helper. Prefer responsive `direction` instead.
16
+ */
17
+ collapseBelow?: string;
18
+ as?: "div" | "span";
19
+ children?: unknown;
17
20
  };
18
- export type FlexNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & FlexOwnProps & {
19
- as?: "div";
20
- asChild?: false;
21
- ref?: Ref<HTMLDivElement>;
21
+ type FlexNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & FlexOwnProps & {
22
+ as?: "div";
23
+ asChild?: false;
24
+ ref?: Ref<HTMLDivElement>;
22
25
  };
23
- export type FlexSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & FlexOwnProps & {
24
- as: "span";
25
- asChild?: false;
26
- ref?: Ref<HTMLSpanElement>;
26
+ type FlexSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & FlexOwnProps & {
27
+ as: "span";
28
+ asChild?: false;
29
+ ref?: Ref<HTMLSpanElement>;
27
30
  };
28
- export type FlexAsChildProps = Omit<FlexOwnProps, "as"> & {
29
- asChild: true;
30
- children: JSXElement;
31
- ref?: Ref<unknown>;
32
- style?: JSX.IntrinsicElements["div"]["style"];
31
+ type FlexAsChildProps = Omit<FlexOwnProps, "as"> & {
32
+ asChild: true;
33
+ children: JSXElement;
34
+ ref?: Ref<unknown>;
35
+ style?: JSX.IntrinsicElements["div"]["style"];
33
36
  };
34
- export type FlexDivProps = FlexNativeProps;
35
- export type FlexProps = FlexDivProps | FlexSpanProps | FlexAsChildProps;
36
- export type InlineOwnProps = FlexOwnProps;
37
- export type InlineNativeProps = FlexNativeProps;
38
- export type InlineDivProps = FlexDivProps;
39
- export type InlineSpanProps = FlexSpanProps;
40
- export type InlineAsChildProps = FlexAsChildProps;
41
- export type InlineProps = FlexProps;
37
+ type FlexDivProps = FlexNativeProps;
38
+ type FlexProps = FlexDivProps | FlexSpanProps | FlexAsChildProps;
39
+ type InlineProps = FlexProps;
40
+ //#endregion
41
+ export { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps };
42
+ //# sourceMappingURL=flex.types.d.ts.map
@@ -1,3 +1,3 @@
1
- export { Flex } from "./flex";
2
- export { FLEX_A11Y_CONTRACT, type FlexA11yContract } from "./flex.a11y";
3
- export type { FlexProps, FlexOwnProps, FlexNativeProps, FlexDivProps, FlexSpanProps, FlexAsChildProps, InlineProps, InlineOwnProps, InlineNativeProps, InlineDivProps, InlineSpanProps, InlineAsChildProps, } from "./flex.types";
1
+ import { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps } from "./flex.types.js";
2
+ import { Flex } from "./flex.js";
3
+ import { FLEX_A11Y_CONTRACT, FlexA11yContract } from "./flex.a11y.js";
@@ -1,10 +1,14 @@
1
- export declare const HEADER_A11Y_CONTRACT: {
2
- readonly DATA_ATTRIBUTES: {
3
- readonly slot: "data-slot";
4
- readonly position: "data-position";
5
- };
6
- readonly SLOT_VALUES: {
7
- readonly root: "header";
8
- };
1
+ //#region src/components/header/header.a11y.d.ts
2
+ declare const HEADER_A11Y_CONTRACT: {
3
+ readonly DATA_ATTRIBUTES: {
4
+ readonly slot: "data-slot";
5
+ readonly position: "data-position";
6
+ };
7
+ readonly SLOT_VALUES: {
8
+ readonly root: "header";
9
+ };
9
10
  };
10
- export type HeaderA11yContract = typeof HEADER_A11Y_CONTRACT;
11
+ type HeaderA11yContract = typeof HEADER_A11Y_CONTRACT;
12
+ //#endregion
13
+ export { HEADER_A11Y_CONTRACT, HeaderA11yContract };
14
+ //# sourceMappingURL=header.a11y.d.ts.map
@@ -0,0 +1,12 @@
1
+ //#region src/components/header/header.a11y.ts
2
+ const HEADER_A11Y_CONTRACT = {
3
+ DATA_ATTRIBUTES: {
4
+ slot: "data-slot",
5
+ position: "data-position"
6
+ },
7
+ SLOT_VALUES: { root: "header" }
8
+ };
9
+ //#endregion
10
+ export { HEADER_A11Y_CONTRACT };
11
+
12
+ //# sourceMappingURL=header.a11y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.a11y.js","names":[],"sources":["../../../src/components/header/header.a11y.ts"],"sourcesContent":["export const HEADER_A11Y_CONTRACT = {\n DATA_ATTRIBUTES: {\n slot: \"data-slot\" as const,\n position: \"data-position\" as const,\n },\n SLOT_VALUES: {\n root: \"header\" as const,\n },\n} as const;\n\nexport type HeaderA11yContract = typeof HEADER_A11Y_CONTRACT;\n"],"mappings":";AAAA,MAAa,uBAAuB;CAClC,iBAAiB;EACf,MAAM;EACN,UAAU;EACX;CACD,aAAa,EACX,MAAM,UACP;CACF"}
@@ -1,2 +1,7 @@
1
- import type { HeaderProps } from "./header.types";
2
- export declare function Header(props: HeaderProps): JSX.Element;
1
+ import { HeaderProps } from "./header.types.js";
2
+
3
+ //#region src/components/header/header.d.ts
4
+ declare function Header(props: HeaderProps): JSX.Element;
5
+ //#endregion
6
+ export { Header };
7
+ //# sourceMappingURL=header.d.ts.map
@@ -0,0 +1 @@
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;CAE1E,OACE,oBAAC,UAAD;EACE,GAAI;EACC;EACL,OAAO,QAAQ,UAAU,UAAU;EACnC,aAAU;EACV,iBAAe;EAEd;EACM,CAAA"}
@@ -1,5 +1,9 @@
1
- export type HeaderPosition = "static" | "relative" | "sticky" | "absolute" | "fixed";
2
- export type HeaderProps = Omit<JSX.IntrinsicElements["header"], "children"> & {
3
- position?: HeaderPosition;
4
- children?: unknown;
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;
5
6
  };
7
+ //#endregion
8
+ export { HeaderPosition, HeaderProps };
9
+ //# sourceMappingURL=header.types.d.ts.map
@@ -1,6 +1,8 @@
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";
1
+ import { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps } from "../flex/flex.types.js";
2
+ import { Flex } from "../flex/flex.js";
3
+ import { FLEX_A11Y_CONTRACT, FlexA11yContract } from "../flex/flex.a11y.js";
4
+ //#region src/components/inline/index.d.ts
5
+ declare function Inline(props: InlineProps): JSX.Element;
6
+ //#endregion
7
+ export { Inline };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/inline/index.tsx"],"sourcesContent":["import { Flex } from \"../flex\";\nimport type { InlineProps } from \"../flex\";\n\nexport function Inline(props: InlineProps): JSX.Element {\n return <Flex {...(props as Record<string, unknown>)} data-slot=\"inline\" />;\n}\n\nexport { Flex };\nexport {\n FLEX_A11Y_CONTRACT,\n FLEX_A11Y_CONTRACT as INLINE_A11Y_CONTRACT,\n type FlexA11yContract,\n type FlexA11yContract as InlineA11yContract,\n} from \"../flex/flex.a11y\";\nexport type {\n FlexProps,\n FlexOwnProps,\n FlexNativeProps,\n FlexDivProps,\n FlexSpanProps,\n FlexAsChildProps,\n FlexProps as InlineProps,\n FlexOwnProps as InlineOwnProps,\n FlexNativeProps as InlineNativeProps,\n FlexDivProps as InlineDivProps,\n FlexSpanProps as InlineSpanProps,\n FlexAsChildProps as InlineAsChildProps,\n} from \"../flex/flex.types\";\n"],"mappings":";;;AAGA,SAAgB,OAAO,OAAiC;CACtD,OAAO,oBAAC,MAAD;EAAM,GAAK;EAAmC,aAAU;EAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { InputGroupOrientation, InputGroupProps, InputGroupTextAsChildProps, InputGroupTextProps } from "./input-group.types.js";
2
+ import { InputGroup, InputGroupText } from "./input-group.js";
@@ -0,0 +1,9 @@
1
+ import { InputGroupProps, InputGroupTextAsChildProps, InputGroupTextProps } from "./input-group.types.js";
2
+
3
+ //#region src/components/input-group/input-group.d.ts
4
+ declare function InputGroup(props: InputGroupProps): JSX.Element;
5
+ declare function InputGroupText(props: InputGroupTextProps): JSX.Element;
6
+ declare function InputGroupText(props: InputGroupTextAsChildProps): JSX.Element;
7
+ //#endregion
8
+ export { InputGroup, InputGroupText };
9
+ //# sourceMappingURL=input-group.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { classes } from "../_internal/classes.js";
2
+ import { jsx } from "@askrjs/askr/jsx-runtime";
3
+ import { Slot } from "@askrjs/askr/foundations";
4
+ import { mergeProps } from "@askrjs/askr/foundations/utilities";
5
+ //#region src/components/input-group/input-group.tsx
6
+ function InputGroup(props) {
7
+ const { attached = true, children, class: className, orientation = "horizontal", ref, role, ...rest } = props;
8
+ return /* @__PURE__ */ jsx("div", {
9
+ ...rest,
10
+ ref,
11
+ class: classes("input-group", orientation === "vertical" ? "input-group-vertical" : void 0, className),
12
+ "data-attached": attached ? "true" : "false",
13
+ "data-orientation": orientation,
14
+ "data-slot": "input-group",
15
+ role: role ?? "group",
16
+ children
17
+ });
18
+ }
19
+ function InputGroupText(props) {
20
+ const { asChild, children, ref, class: className, ...rest } = props;
21
+ const finalProps = mergeProps(rest, {
22
+ class: classes("input-group-text", className),
23
+ ref,
24
+ "data-slot": "input-group-text"
25
+ });
26
+ if (asChild) return /* @__PURE__ */ jsx(Slot, {
27
+ asChild: true,
28
+ ...finalProps,
29
+ children
30
+ });
31
+ return /* @__PURE__ */ jsx("span", {
32
+ ...finalProps,
33
+ children
34
+ });
35
+ }
36
+ //#endregion
37
+ export { InputGroup, InputGroupText };
38
+
39
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.js","names":[],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"@askrjs/askr/foundations/utilities\";\nimport { classes } from \"../_internal/classes\";\nimport type {\n InputGroupProps,\n InputGroupTextAsChildProps,\n InputGroupTextProps,\n} from \"./input-group.types\";\n\nexport function InputGroup(props: InputGroupProps): JSX.Element {\n const {\n attached = true,\n children,\n class: className,\n orientation = \"horizontal\",\n ref,\n role,\n ...rest\n } = props;\n\n return (\n <div\n {...rest}\n ref={ref}\n class={classes(\n \"input-group\",\n orientation === \"vertical\" ? \"input-group-vertical\" : undefined,\n className,\n )}\n data-attached={attached ? \"true\" : \"false\"}\n data-orientation={orientation}\n data-slot=\"input-group\"\n role={role ?? \"group\"}\n >\n {children}\n </div>\n );\n}\n\nexport function InputGroupText(props: InputGroupTextProps): JSX.Element;\nexport function InputGroupText(props: InputGroupTextAsChildProps): JSX.Element;\nexport function InputGroupText(\n props: InputGroupTextProps | InputGroupTextAsChildProps,\n): JSX.Element {\n const { asChild, children, ref, class: className, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"input-group-text\", className),\n ref,\n \"data-slot\": \"input-group-text\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <span {...finalProps}>{children}</span>;\n}\n"],"mappings":";;;;;AASA,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EACJ,WAAW,MACX,UACA,OAAO,WACP,cAAc,cACd,KACA,MACA,GAAG,SACD;CAEJ,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,OAAO,QACL,eACA,gBAAgB,aAAa,yBAAyB,KAAA,GACtD,UACD;EACD,iBAAe,WAAW,SAAS;EACnC,oBAAkB;EAClB,aAAU;EACV,MAAM,QAAQ;EAEb;EACG,CAAA;;AAMV,SAAgB,eACd,OACa;CACb,MAAM,EAAE,SAAS,UAAU,KAAK,OAAO,WAAW,GAAG,SAAS;CAC9D,MAAM,aAAa,WAAW,MAAM;EAClC,OAAO,QAAQ,oBAAoB,UAAU;EAC7C;EACA,aAAa;EACd,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { JSXElement } from "@askrjs/askr/foundations";
2
+ import { Ref } from "@askrjs/askr/foundations/utilities";
3
+
4
+ //#region src/components/input-group/input-group.types.d.ts
5
+ type InputGroupOrientation = "horizontal" | "vertical";
6
+ type DivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref">;
7
+ type SpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref">;
8
+ type InputGroupProps = DivProps & {
9
+ children?: unknown;
10
+ attached?: boolean;
11
+ orientation?: InputGroupOrientation;
12
+ ref?: Ref<HTMLDivElement>;
13
+ };
14
+ type InputGroupTextProps = SpanProps & {
15
+ asChild?: false;
16
+ children?: unknown;
17
+ ref?: Ref<HTMLSpanElement>;
18
+ };
19
+ type InputGroupTextAsChildProps = SpanProps & {
20
+ asChild: true;
21
+ children: JSXElement;
22
+ ref?: Ref<unknown>;
23
+ };
24
+ //#endregion
25
+ export { InputGroupOrientation, InputGroupProps, InputGroupTextAsChildProps, InputGroupTextProps };
26
+ //# sourceMappingURL=input-group.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { ListGroupItemAsChildProps, ListGroupItemProps, ListGroupOrientation, ListGroupProps } from "./list-group.types.js";
2
+ import { ListGroup, ListGroupItem } from "./list-group.js";
@@ -0,0 +1,9 @@
1
+ import { ListGroupItemAsChildProps, ListGroupItemProps, ListGroupProps } from "./list-group.types.js";
2
+
3
+ //#region src/components/list-group/list-group.d.ts
4
+ declare function ListGroup(props: ListGroupProps): JSX.Element;
5
+ declare function ListGroupItem(props: ListGroupItemProps): JSX.Element;
6
+ declare function ListGroupItem(props: ListGroupItemAsChildProps): JSX.Element;
7
+ //#endregion
8
+ export { ListGroup, ListGroupItem };
9
+ //# sourceMappingURL=list-group.d.ts.map