@askrjs/themes 0.0.8 → 0.0.10

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 (479) hide show
  1. package/README.md +19 -13
  2. package/THEMING.md +24 -18
  3. package/dist/components/_internal/block-layout.d.ts +49 -0
  4. package/dist/components/_internal/block-layout.js +210 -0
  5. package/dist/components/_internal/block-layout.js.map +1 -0
  6. package/dist/components/_internal/jsx.js.map +1 -1
  7. package/dist/components/_internal/style.js +25 -1
  8. package/dist/components/_internal/style.js.map +1 -1
  9. package/dist/components/alert/alert.js +2 -2
  10. package/dist/components/alert/alert.js.map +1 -1
  11. package/dist/components/alert/alert.types.d.ts +0 -1
  12. package/dist/components/aside/aside.d.ts +7 -0
  13. package/dist/components/aside/aside.js +16 -0
  14. package/dist/components/aside/aside.js.map +1 -0
  15. package/dist/components/aside/aside.types.d.ts +6 -0
  16. package/dist/components/aside/index.d.ts +2 -0
  17. package/dist/components/aspect-ratio/aspect-ratio.js +1 -1
  18. package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -1
  19. package/dist/components/badge/index.d.ts +1 -2
  20. package/dist/components/block/block.d.ts +2 -3
  21. package/dist/components/block/block.js +16 -46
  22. package/dist/components/block/block.js.map +1 -1
  23. package/dist/components/block/block.types.d.ts +13 -23
  24. package/dist/components/block/index.d.ts +3 -3
  25. package/dist/components/brand/brand.d.ts +9 -0
  26. package/dist/components/brand/brand.js +49 -0
  27. package/dist/components/brand/brand.js.map +1 -0
  28. package/dist/components/brand/brand.types.d.ts +31 -0
  29. package/dist/components/brand/index.d.ts +2 -0
  30. package/dist/components/card/card.d.ts +3 -3
  31. package/dist/components/card/card.js +6 -11
  32. package/dist/components/card/card.js.map +1 -1
  33. package/dist/components/card/card.types.d.ts +10 -12
  34. package/dist/components/card/index.d.ts +2 -2
  35. package/dist/components/catalog.d.ts +156 -0
  36. package/dist/components/catalog.js +723 -0
  37. package/dist/components/catalog.js.map +1 -0
  38. package/dist/components/container/container.d.ts +2 -3
  39. package/dist/components/container/container.js +8 -71
  40. package/dist/components/container/container.js.map +1 -1
  41. package/dist/components/container/container.types.d.ts +5 -24
  42. package/dist/components/container/index.d.ts +2 -3
  43. package/dist/components/empty-state/empty-state.js +34 -28
  44. package/dist/components/empty-state/empty-state.js.map +1 -1
  45. package/dist/components/empty-state/empty-state.types.d.ts +3 -6
  46. package/dist/components/field/field.js +4 -2
  47. package/dist/components/field/field.js.map +1 -1
  48. package/dist/components/field/field.types.d.ts +1 -0
  49. package/dist/components/footer/footer.d.ts +13 -0
  50. package/dist/components/footer/footer.js +86 -0
  51. package/dist/components/footer/footer.js.map +1 -0
  52. package/dist/components/footer/footer.types.d.ts +37 -0
  53. package/dist/components/footer/index.d.ts +2 -0
  54. package/dist/components/grid/grid.d.ts +7 -0
  55. package/dist/components/grid/grid.js +76 -0
  56. package/dist/components/grid/grid.js.map +1 -0
  57. package/dist/components/grid/grid.types.d.ts +19 -0
  58. package/dist/components/grid/index.d.ts +2 -0
  59. package/dist/components/header/header.js +9 -6
  60. package/dist/components/header/header.js.map +1 -1
  61. package/dist/components/header/header.types.d.ts +5 -5
  62. package/dist/components/header/index.d.ts +2 -0
  63. package/dist/components/main/index.d.ts +2 -0
  64. package/dist/components/main/main.d.ts +7 -0
  65. package/dist/components/main/main.js +17 -0
  66. package/dist/components/main/main.js.map +1 -0
  67. package/dist/components/main/main.types.d.ts +6 -0
  68. package/dist/components/nav/index.d.ts +2 -2
  69. package/dist/components/nav/nav.d.ts +8 -6
  70. package/dist/components/nav/nav.js +93 -58
  71. package/dist/components/nav/nav.js.map +1 -1
  72. package/dist/components/nav/nav.types.d.ts +16 -20
  73. package/dist/components/navbar/index.d.ts +4 -5
  74. package/dist/components/navbar/navbar.d.ts +3 -38
  75. package/dist/components/navbar/navbar.js +102 -198
  76. package/dist/components/navbar/navbar.js.map +1 -1
  77. package/dist/components/navbar/navbar.types.d.ts +14 -24
  78. package/dist/components/page/index.d.ts +2 -0
  79. package/dist/components/page/page.d.ts +7 -0
  80. package/dist/components/page/page.js +22 -0
  81. package/dist/components/page/page.js.map +1 -0
  82. package/dist/components/page/page.types.d.ts +6 -0
  83. package/dist/components/page-header/index.d.ts +2 -0
  84. package/dist/components/page-header/page-header.d.ts +7 -0
  85. package/dist/components/page-header/page-header.js +37 -0
  86. package/dist/components/page-header/page-header.js.map +1 -0
  87. package/dist/components/page-header/page-header.types.d.ts +10 -0
  88. package/dist/components/section/index.d.ts +2 -3
  89. package/dist/components/section/section.d.ts +2 -3
  90. package/dist/components/section/section.js +7 -30
  91. package/dist/components/section/section.js.map +1 -1
  92. package/dist/components/section/section.types.d.ts +3 -20
  93. package/dist/components/separator/index.d.ts +1 -2
  94. package/dist/components/sidebar/index.d.ts +2 -0
  95. package/dist/components/sidebar/sidebar.d.ts +17 -2
  96. package/dist/components/sidebar/sidebar.js +115 -211
  97. package/dist/components/sidebar/sidebar.js.map +1 -1
  98. package/dist/components/sidebar/sidebar.types.d.ts +21 -23
  99. package/dist/components/skeleton/index.d.ts +1 -2
  100. package/dist/components/skeleton/skeleton.js +12 -1
  101. package/dist/components/skeleton/skeleton.js.map +1 -1
  102. package/dist/components/skeleton/skeleton.types.d.ts +2 -0
  103. package/dist/components/spinner/index.d.ts +1 -1
  104. package/dist/components/spinner/spinner.js +6 -3
  105. package/dist/components/spinner/spinner.js.map +1 -1
  106. package/dist/components/spinner/spinner.types.d.ts +3 -1
  107. package/dist/components/stat/index.d.ts +2 -0
  108. package/dist/components/stat/stat.d.ts +10 -0
  109. package/dist/components/stat/stat.js +52 -0
  110. package/dist/components/stat/stat.js.map +1 -0
  111. package/dist/components/stat/stat.types.d.ts +24 -0
  112. package/dist/components/text/index.d.ts +2 -0
  113. package/dist/components/text/text.d.ts +7 -0
  114. package/dist/components/text/text.js +28 -0
  115. package/dist/components/text/text.js.map +1 -0
  116. package/dist/components/text/text.types.d.ts +26 -0
  117. package/dist/components/theme/theme.js +97 -18
  118. package/dist/components/theme/theme.js.map +1 -1
  119. package/dist/components/toolbar/index.d.ts +2 -0
  120. package/dist/components/toolbar/toolbar.d.ts +7 -0
  121. package/dist/components/toolbar/toolbar.js +30 -0
  122. package/dist/components/toolbar/toolbar.js.map +1 -0
  123. package/dist/components/toolbar/toolbar.types.d.ts +9 -0
  124. package/dist/components.d.ts +60 -0
  125. package/dist/components.js +35 -0
  126. package/dist/controls.d.ts +2 -2
  127. package/dist/controls.js +3 -3
  128. package/dist/core.d.ts +36 -0
  129. package/dist/core.js +19 -0
  130. package/dist/navs.d.ts +3 -15
  131. package/dist/navs.js +2 -8
  132. package/dist/overlays.d.ts +2 -2
  133. package/dist/overlays.js +2 -2
  134. package/dist/surfaces.d.ts +10 -8
  135. package/dist/surfaces.js +6 -4
  136. package/dist/themes/default/index.css +3691 -3959
  137. package/package.json +239 -73
  138. package/src/components/_internal/block-layout.ts +354 -0
  139. package/src/components/_internal/jsx.ts +18 -6
  140. package/src/components/_internal/style.ts +42 -4
  141. package/src/components/alert/alert.tsx +1 -2
  142. package/src/components/alert/alert.types.ts +0 -1
  143. package/src/components/aside/aside.tsx +12 -0
  144. package/src/components/aside/aside.types.ts +3 -0
  145. package/src/components/aside/index.ts +2 -0
  146. package/src/components/aspect-ratio/aspect-ratio.tsx +1 -1
  147. package/src/components/badge/index.ts +0 -1
  148. package/src/components/block/block.a11y.ts +0 -6
  149. package/src/components/block/block.tsx +40 -56
  150. package/src/components/block/block.types.ts +59 -41
  151. package/src/components/block/index.ts +1 -10
  152. package/src/components/brand/brand.tsx +61 -0
  153. package/src/components/brand/brand.types.ts +39 -0
  154. package/src/components/brand/index.ts +2 -0
  155. package/src/components/card/card.tsx +6 -18
  156. package/src/components/card/card.types.ts +9 -11
  157. package/src/components/card/index.ts +2 -3
  158. package/src/components/catalog.tsx +713 -0
  159. package/src/components/container/container.a11y.ts +0 -5
  160. package/src/components/container/container.tsx +18 -128
  161. package/src/components/container/container.types.ts +3 -32
  162. package/src/components/container/index.ts +1 -8
  163. package/src/components/empty-state/empty-state.tsx +17 -35
  164. package/src/components/empty-state/empty-state.types.ts +3 -5
  165. package/src/components/field/field.tsx +3 -1
  166. package/src/components/field/field.types.ts +1 -0
  167. package/src/components/footer/footer.tsx +88 -0
  168. package/src/components/footer/footer.types.ts +40 -0
  169. package/src/components/footer/index.ts +10 -0
  170. package/src/components/grid/grid.tsx +113 -0
  171. package/src/components/grid/grid.types.ts +20 -0
  172. package/src/components/grid/index.ts +2 -0
  173. package/src/components/header/header.tsx +10 -7
  174. package/src/components/header/header.types.ts +4 -4
  175. package/src/components/header/index.ts +1 -2
  176. package/src/components/main/index.ts +2 -0
  177. package/src/components/main/main.tsx +12 -0
  178. package/src/components/main/main.types.ts +3 -0
  179. package/src/components/nav/index.ts +7 -9
  180. package/src/components/nav/nav.tsx +153 -110
  181. package/src/components/nav/nav.types.ts +26 -27
  182. package/src/components/navbar/index.ts +4 -11
  183. package/src/components/navbar/navbar.tsx +104 -251
  184. package/src/components/navbar/navbar.types.ts +16 -42
  185. package/src/components/page/index.ts +2 -0
  186. package/src/components/page/page.tsx +17 -0
  187. package/src/components/page/page.types.ts +3 -0
  188. package/src/components/page-header/index.ts +2 -0
  189. package/src/components/page-header/page-header.tsx +29 -0
  190. package/src/components/page-header/page-header.types.ts +7 -0
  191. package/src/components/section/index.ts +1 -7
  192. package/src/components/section/section.a11y.ts +0 -1
  193. package/src/components/section/section.tsx +9 -35
  194. package/src/components/section/section.types.ts +2 -22
  195. package/src/components/separator/index.ts +4 -9
  196. package/src/components/sidebar/index.ts +27 -5
  197. package/src/components/sidebar/sidebar.tsx +145 -317
  198. package/src/components/sidebar/sidebar.types.ts +21 -28
  199. package/src/components/skeleton/index.ts +1 -2
  200. package/src/components/skeleton/skeleton.tsx +33 -1
  201. package/src/components/skeleton/skeleton.types.ts +2 -0
  202. package/src/components/spinner/index.ts +1 -1
  203. package/src/components/spinner/spinner.tsx +7 -2
  204. package/src/components/spinner/spinner.types.ts +3 -0
  205. package/src/components/stat/index.ts +2 -0
  206. package/src/components/stat/stat.tsx +47 -0
  207. package/src/components/stat/stat.types.ts +24 -0
  208. package/src/components/text/index.ts +2 -0
  209. package/src/components/text/text.tsx +39 -0
  210. package/src/components/text/text.types.ts +35 -0
  211. package/src/components/theme/theme.tsx +163 -21
  212. package/src/components/toolbar/index.ts +2 -0
  213. package/src/components/toolbar/toolbar.tsx +24 -0
  214. package/src/components/toolbar/toolbar.types.ts +6 -0
  215. package/src/components.ts +289 -0
  216. package/src/controls.ts +69 -2
  217. package/src/core.ts +42 -0
  218. package/src/navs.ts +9 -24
  219. package/src/overlays.ts +101 -59
  220. package/src/parity.ts +125 -0
  221. package/src/surfaces.ts +60 -13
  222. package/src/themes/default/index.css +11 -14
  223. package/src/themes/default/styles/actions/button-group.css +6 -6
  224. package/src/themes/default/styles/actions/button.css +98 -60
  225. package/src/themes/default/styles/actions/toggle-group.css +61 -25
  226. package/src/themes/default/styles/base/text.css +87 -0
  227. package/src/themes/default/styles/base/typography.css +24 -117
  228. package/src/themes/default/styles/base/utilities.css +0 -250
  229. package/src/themes/default/styles/disclosure/accordion.css +35 -28
  230. package/src/themes/default/styles/display/alert.css +7 -7
  231. package/src/themes/default/styles/display/avatar.css +7 -1
  232. package/src/themes/default/styles/display/badge.css +10 -10
  233. package/src/themes/default/styles/display/card.css +10 -47
  234. package/src/themes/default/styles/display/catalog.css +753 -0
  235. package/src/themes/default/styles/display/coverage.css +30 -305
  236. package/src/themes/default/styles/display/progress-circle.css +2 -0
  237. package/src/themes/default/styles/display/scroll-area.css +29 -24
  238. package/src/themes/default/styles/display/spinner.css +38 -1
  239. package/src/themes/default/styles/display/stat.css +21 -0
  240. package/src/themes/default/styles/display/table.css +39 -12
  241. package/src/themes/default/styles/display/virtual-list.css +24 -13
  242. package/src/themes/default/styles/display/virtual-table.css +58 -36
  243. package/src/themes/default/styles/forms/checkbox.css +12 -21
  244. package/src/themes/default/styles/forms/input-group.css +2 -1
  245. package/src/themes/default/styles/forms/input.css +11 -12
  246. package/src/themes/default/styles/forms/radio-group.css +44 -27
  247. package/src/themes/default/styles/forms/select.css +33 -35
  248. package/src/themes/default/styles/forms/slider.css +61 -47
  249. package/src/themes/default/styles/forms/switch.css +18 -23
  250. package/src/themes/default/styles/forms/textarea.css +12 -12
  251. package/src/themes/default/styles/layout/block.css +96 -12
  252. package/src/themes/default/styles/layout/grid.css +78 -0
  253. package/src/themes/default/styles/layout/layout.css +502 -772
  254. package/src/themes/default/styles/layout/patterns.css +0 -155
  255. package/src/themes/default/styles/navigation/nav.css +104 -154
  256. package/src/themes/default/styles/overlays/alert-dialog.css +2 -2
  257. package/src/themes/default/styles/overlays/dialog.css +76 -22
  258. package/src/themes/default/styles/overlays/dropdown.css +108 -31
  259. package/src/themes/default/styles/overlays/hover-card.css +39 -17
  260. package/src/themes/default/styles/overlays/menubar.css +223 -0
  261. package/src/themes/default/styles/overlays/popover.css +69 -23
  262. package/src/themes/default/styles/overlays/toast.css +91 -33
  263. package/src/themes/default/styles/overlays/tooltip.css +88 -14
  264. package/src/themes/default/styles/shell/brand.css +48 -0
  265. package/src/themes/default/styles/shell/footer.css +72 -0
  266. package/src/themes/default/styles/shell/header.css +7 -50
  267. package/src/themes/default/styles/shell/navbar.css +226 -453
  268. package/src/themes/default/styles/shell/sidebar.css +243 -829
  269. package/src/themes/default/tokens.css +145 -98
  270. package/templates/theme/index.css +11 -14
  271. package/templates/theme/styles/actions/button-group.css +6 -6
  272. package/templates/theme/styles/actions/button.css +98 -60
  273. package/templates/theme/styles/actions/toggle-group.css +61 -25
  274. package/templates/theme/styles/base/text.css +87 -0
  275. package/templates/theme/styles/base/typography.css +24 -117
  276. package/templates/theme/styles/disclosure/accordion.css +35 -28
  277. package/templates/theme/styles/display/alert.css +7 -7
  278. package/templates/theme/styles/display/avatar.css +7 -1
  279. package/templates/theme/styles/display/badge.css +10 -10
  280. package/templates/theme/styles/display/card.css +10 -47
  281. package/templates/theme/styles/display/catalog.css +753 -0
  282. package/templates/theme/styles/display/coverage.css +30 -305
  283. package/templates/theme/styles/display/scroll-area.css +29 -24
  284. package/templates/theme/styles/display/spinner.css +38 -1
  285. package/templates/theme/styles/display/stat.css +21 -0
  286. package/templates/theme/styles/display/table.css +39 -12
  287. package/templates/theme/styles/display/virtual-list.css +24 -13
  288. package/templates/theme/styles/display/virtual-table.css +58 -36
  289. package/templates/theme/styles/forms/checkbox.css +12 -21
  290. package/templates/theme/styles/forms/input.css +11 -12
  291. package/templates/theme/styles/forms/radio-group.css +44 -27
  292. package/templates/theme/styles/forms/select.css +33 -35
  293. package/templates/theme/styles/forms/slider.css +61 -47
  294. package/templates/theme/styles/forms/switch.css +18 -23
  295. package/templates/theme/styles/forms/textarea.css +12 -12
  296. package/templates/theme/styles/layout/block.css +96 -12
  297. package/templates/theme/styles/layout/grid.css +78 -0
  298. package/templates/theme/styles/layout/layout.css +676 -1
  299. package/templates/theme/styles/layout/patterns.css +0 -155
  300. package/templates/theme/styles/navigation/nav.css +104 -154
  301. package/templates/theme/styles/overlays/alert-dialog.css +2 -2
  302. package/templates/theme/styles/overlays/dialog.css +76 -22
  303. package/templates/theme/styles/overlays/dropdown.css +108 -31
  304. package/templates/theme/styles/overlays/hover-card.css +39 -17
  305. package/templates/theme/styles/overlays/menubar.css +223 -0
  306. package/templates/theme/styles/overlays/popover.css +69 -23
  307. package/templates/theme/styles/overlays/toast.css +80 -33
  308. package/templates/theme/styles/overlays/tooltip.css +88 -14
  309. package/templates/theme/styles/shell/brand.css +48 -0
  310. package/templates/theme/styles/shell/footer.css +72 -0
  311. package/templates/theme/styles/shell/header.css +7 -50
  312. package/templates/theme/styles/shell/navbar.css +226 -453
  313. package/templates/theme/styles/shell/sidebar.css +197 -779
  314. package/templates/theme/tokens.css +145 -98
  315. package/dist/components/_internal/box-layout.js +0 -116
  316. package/dist/components/_internal/box-layout.js.map +0 -1
  317. package/dist/components/_internal/layout.d.ts +0 -9
  318. package/dist/components/_internal/layout.js +0 -147
  319. package/dist/components/_internal/layout.js.map +0 -1
  320. package/dist/components/badge/badge.a11y.d.ts +0 -17
  321. package/dist/components/block/block.a11y.d.ts +0 -20
  322. package/dist/components/box/box.a11y.d.ts +0 -14
  323. package/dist/components/box/box.d.ts +0 -9
  324. package/dist/components/box/box.js +0 -36
  325. package/dist/components/box/box.js.map +0 -1
  326. package/dist/components/box/box.types.d.ts +0 -72
  327. package/dist/components/box/index.d.ts +0 -3
  328. package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +0 -17
  329. package/dist/components/breadcrumb/breadcrumb.a11y.js +0 -15
  330. package/dist/components/breadcrumb/breadcrumb.a11y.js.map +0 -1
  331. package/dist/components/breadcrumb/breadcrumb.d.ts +0 -18
  332. package/dist/components/breadcrumb/breadcrumb.js +0 -113
  333. package/dist/components/breadcrumb/breadcrumb.js.map +0 -1
  334. package/dist/components/breadcrumb/breadcrumb.types.d.ts +0 -65
  335. package/dist/components/breadcrumb/index.d.ts +0 -3
  336. package/dist/components/container/container.a11y.d.ts +0 -19
  337. package/dist/components/flex/flex.a11y.d.ts +0 -22
  338. package/dist/components/flex/flex.d.ts +0 -9
  339. package/dist/components/flex/flex.js +0 -115
  340. package/dist/components/flex/flex.js.map +0 -1
  341. package/dist/components/flex/flex.types.d.ts +0 -42
  342. package/dist/components/flex/index.d.ts +0 -3
  343. package/dist/components/header/header.a11y.d.ts +0 -14
  344. package/dist/components/header/header.a11y.js +0 -12
  345. package/dist/components/header/header.a11y.js.map +0 -1
  346. package/dist/components/inline/index.d.ts +0 -8
  347. package/dist/components/inline/index.js +0 -13
  348. package/dist/components/inline/index.js.map +0 -1
  349. package/dist/components/list-group/index.d.ts +0 -2
  350. package/dist/components/list-group/list-group.d.ts +0 -9
  351. package/dist/components/list-group/list-group.js +0 -43
  352. package/dist/components/list-group/list-group.js.map +0 -1
  353. package/dist/components/list-group/list-group.types.d.ts +0 -32
  354. package/dist/components/navbar/navbar-panel.js +0 -42
  355. package/dist/components/navbar/navbar-panel.js.map +0 -1
  356. package/dist/components/navbar/navbar.context.js +0 -13
  357. package/dist/components/navbar/navbar.context.js.map +0 -1
  358. package/dist/components/navbar/navbar.render.js +0 -26
  359. package/dist/components/navbar/navbar.render.js.map +0 -1
  360. package/dist/components/navbar/navbar.shared.js +0 -18
  361. package/dist/components/navbar/navbar.shared.js.map +0 -1
  362. package/dist/components/pagination/index.d.ts +0 -2
  363. package/dist/components/pagination/pagination.d.ts +0 -11
  364. package/dist/components/pagination/pagination.js +0 -95
  365. package/dist/components/pagination/pagination.js.map +0 -1
  366. package/dist/components/pagination/pagination.types.d.ts +0 -40
  367. package/dist/components/section/section.a11y.d.ts +0 -15
  368. package/dist/components/separator/separator.a11y.d.ts +0 -17
  369. package/dist/components/separator/separator.a11y.js +0 -15
  370. package/dist/components/separator/separator.a11y.js.map +0 -1
  371. package/dist/components/shell/index.d.ts +0 -3
  372. package/dist/components/shell/shell-nav.types.d.ts +0 -7
  373. package/dist/components/shell/shell-panel.js +0 -54
  374. package/dist/components/shell/shell-panel.js.map +0 -1
  375. package/dist/components/shell/shell-responsive.js +0 -118
  376. package/dist/components/shell/shell-responsive.js.map +0 -1
  377. package/dist/components/shell/shell.a11y.d.ts +0 -23
  378. package/dist/components/shell/shell.a11y.js +0 -23
  379. package/dist/components/shell/shell.a11y.js.map +0 -1
  380. package/dist/components/shell/shell.d.ts +0 -13
  381. package/dist/components/shell/shell.js +0 -69
  382. package/dist/components/shell/shell.js.map +0 -1
  383. package/dist/components/shell/shell.types.d.ts +0 -58
  384. package/dist/components/sidebar/sidebar-panel.d.ts +0 -7
  385. package/dist/components/sidebar/sidebar-panel.js +0 -49
  386. package/dist/components/sidebar/sidebar-panel.js.map +0 -1
  387. package/dist/components/sidebar/sidebar-toggle.d.ts +0 -7
  388. package/dist/components/sidebar/sidebar-toggle.js +0 -8
  389. package/dist/components/sidebar/sidebar-toggle.js.map +0 -1
  390. package/dist/components/sidebar/sidebar.context.js +0 -21
  391. package/dist/components/sidebar/sidebar.context.js.map +0 -1
  392. package/dist/components/sidebar/sidebar.shared.js +0 -12
  393. package/dist/components/sidebar/sidebar.shared.js.map +0 -1
  394. package/dist/components/skeleton/skeleton.a11y.d.ts +0 -16
  395. package/dist/components/spacer/index.d.ts +0 -3
  396. package/dist/components/spacer/spacer.a11y.d.ts +0 -17
  397. package/dist/components/spacer/spacer.d.ts +0 -8
  398. package/dist/components/spacer/spacer.js +0 -49
  399. package/dist/components/spacer/spacer.js.map +0 -1
  400. package/dist/components/spacer/spacer.types.d.ts +0 -26
  401. package/dist/components/stack/index.d.ts +0 -3
  402. package/dist/components/stack/stack.a11y.d.ts +0 -18
  403. package/dist/components/stack/stack.d.ts +0 -8
  404. package/dist/components/stack/stack.js +0 -16
  405. package/dist/components/stack/stack.js.map +0 -1
  406. package/dist/components/stack/stack.types.d.ts +0 -22
  407. package/dist/feedback.d.ts +0 -5
  408. package/dist/feedback.js +0 -4
  409. package/dist/layouts.d.ts +0 -25
  410. package/dist/layouts.js +0 -11
  411. package/dist/shells.d.ts +0 -16
  412. package/dist/shells.js +0 -11
  413. package/src/components/_internal/box-layout.ts +0 -164
  414. package/src/components/_internal/layout.ts +0 -211
  415. package/src/components/box/box.a11y.ts +0 -11
  416. package/src/components/box/box.tsx +0 -38
  417. package/src/components/box/box.types.ts +0 -76
  418. package/src/components/box/index.ts +0 -11
  419. package/src/components/breadcrumb/breadcrumb.a11y.ts +0 -15
  420. package/src/components/breadcrumb/breadcrumb.tsx +0 -123
  421. package/src/components/breadcrumb/breadcrumb.types.ts +0 -74
  422. package/src/components/breadcrumb/index.ts +0 -24
  423. package/src/components/flex/flex.a11y.ts +0 -19
  424. package/src/components/flex/flex.tsx +0 -162
  425. package/src/components/flex/flex.types.ts +0 -51
  426. package/src/components/flex/index.ts +0 -16
  427. package/src/components/inline/index.tsx +0 -28
  428. package/src/components/list-group/index.ts +0 -7
  429. package/src/components/list-group/list-group.tsx +0 -74
  430. package/src/components/list-group/list-group.types.ts +0 -32
  431. package/src/components/navbar/navbar-panel.tsx +0 -62
  432. package/src/components/navbar/navbar.context.ts +0 -22
  433. package/src/components/navbar/navbar.render.tsx +0 -32
  434. package/src/components/navbar/navbar.shared.ts +0 -21
  435. package/src/components/pagination/index.ts +0 -8
  436. package/src/components/pagination/pagination.tsx +0 -158
  437. package/src/components/pagination/pagination.types.ts +0 -41
  438. package/src/components/shell/index.ts +0 -16
  439. package/src/components/shell/shell-nav.types.ts +0 -3
  440. package/src/components/shell/shell-panel.tsx +0 -85
  441. package/src/components/shell/shell-responsive.tsx +0 -246
  442. package/src/components/shell/shell.a11y.ts +0 -20
  443. package/src/components/shell/shell.tsx +0 -74
  444. package/src/components/shell/shell.types.ts +0 -71
  445. package/src/components/sidebar/sidebar-panel.tsx +0 -67
  446. package/src/components/sidebar/sidebar-toggle.tsx +0 -5
  447. package/src/components/sidebar/sidebar.context.ts +0 -40
  448. package/src/components/sidebar/sidebar.shared.ts +0 -12
  449. package/src/components/spacer/index.ts +0 -9
  450. package/src/components/spacer/spacer.a11y.ts +0 -14
  451. package/src/components/spacer/spacer.tsx +0 -61
  452. package/src/components/spacer/spacer.types.ts +0 -31
  453. package/src/components/stack/index.ts +0 -3
  454. package/src/components/stack/stack.a11y.ts +0 -15
  455. package/src/components/stack/stack.tsx +0 -13
  456. package/src/components/stack/stack.types.ts +0 -22
  457. package/src/feedback.ts +0 -6
  458. package/src/layouts.ts +0 -19
  459. package/src/shells.ts +0 -13
  460. package/src/themes/default/styles/actions/toggle.css +0 -50
  461. package/src/themes/default/styles/disclosure/collapsible.css +0 -58
  462. package/src/themes/default/styles/display/list-group.css +0 -84
  463. package/src/themes/default/styles/forms/form.css +0 -5
  464. package/src/themes/default/styles/layout/responsive-layout.css +0 -230
  465. package/src/themes/default/styles/navigation/breadcrumb.css +0 -45
  466. package/src/themes/default/styles/navigation/menu.css +0 -203
  467. package/src/themes/default/styles/navigation/menubar.css +0 -255
  468. package/src/themes/default/styles/navigation/pagination.css +0 -91
  469. package/src/themes/default/styles/shell/theme.css +0 -37
  470. package/templates/theme/styles/actions/toggle.css +0 -50
  471. package/templates/theme/styles/disclosure/collapsible.css +0 -58
  472. package/templates/theme/styles/display/list-group.css +0 -84
  473. package/templates/theme/styles/forms/form.css +0 -5
  474. package/templates/theme/styles/layout/responsive-layout.css +0 -230
  475. package/templates/theme/styles/navigation/breadcrumb.css +0 -45
  476. package/templates/theme/styles/navigation/menu.css +0 -203
  477. package/templates/theme/styles/navigation/menubar.css +0 -255
  478. package/templates/theme/styles/navigation/pagination.css +0 -91
  479. package/templates/theme/styles/shell/theme.css +0 -37
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout.js","names":[],"sources":["../../../src/components/_internal/layout.ts"],"sourcesContent":["/**\n * Layout helpers shared by headless layout primitives.\n */\n\nexport type LayoutBreakpoint = \"initial\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ResponsiveValue<T> = T | Partial<Record<LayoutBreakpoint, T>>;\n\nconst BREAKPOINTS: readonly LayoutBreakpoint[] = [\"initial\", \"sm\", \"md\", \"lg\", \"xl\"];\n\n/** Units and patterns that identify a concrete CSS length value. */\nconst CSS_UNIT_RE =\n /^-?[\\d.]+(%|px|em|rem|ex|ch|ic|lh|rlh|vw|vh|vmin|vmax|svw|svh|dvw|dvh|cqw|cqh|cqi|cqb|fr|cm|mm|in|pt|pc|Q)$/;\n\nconst SPACE_TOKEN_MAP: Record<string, string> = {\n \"1\": \"var(--ak-space-1)\",\n \"2\": \"var(--ak-space-2)\",\n \"3\": \"var(--ak-space-3)\",\n \"4\": \"var(--ak-space-4)\",\n \"5\": \"var(--ak-space-5)\",\n \"6\": \"var(--ak-space-6)\",\n \"7\": \"var(--ak-space-7)\",\n \"8\": \"var(--ak-space-8)\",\n \"9\": \"var(--ak-space-9)\",\n xs: \"var(--ak-space-xs)\",\n sm: \"var(--ak-space-sm)\",\n md: \"var(--ak-space-md)\",\n lg: \"var(--ak-space-lg)\",\n xl: \"var(--ak-space-xl)\",\n \"2xl\": \"var(--ak-space-2xl)\",\n \"3xl\": \"var(--ak-space-3xl)\",\n};\n\nconst CONTAINER_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-container-1)\",\n \"2\": \"var(--ak-container-2)\",\n \"3\": \"var(--ak-container-3)\",\n \"4\": \"var(--ak-container-4)\",\n sm: \"var(--ak-container-1)\",\n md: \"var(--ak-container-2)\",\n lg: \"var(--ak-container-3)\",\n xl: \"var(--ak-container-4)\",\n fluid: \"100%\",\n};\n\nconst SECTION_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-section-1)\",\n \"2\": \"var(--ak-section-2)\",\n \"3\": \"var(--ak-section-3)\",\n \"4\": \"var(--ak-section-4)\",\n};\n\n/**\n * Returns true when `value` is a concrete CSS length/size that can be serialized\n * into a CSS declaration without token translation.\n */\nexport function isCssLength(value: unknown): value is string {\n if (typeof value !== \"string\") return false;\n const v = value.trim();\n if (v === \"0\") return true;\n if (CSS_UNIT_RE.test(v)) return true;\n // CSS functions: calc(), min(), max(), clamp(), fit-content(), env(), var()\n if (/^[a-z][a-z-]*\\(/.test(v)) return true;\n return false;\n}\n\nexport function isResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): value is Partial<Record<LayoutBreakpoint, T>> {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n return BREAKPOINTS.some((breakpoint) => breakpoint in value);\n}\n\nexport function normalizeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): Partial<Record<LayoutBreakpoint, T>> | undefined {\n if (value === undefined) return undefined;\n if (isResponsiveValue(value)) return value;\n return { initial: value };\n}\n\nexport function serializeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n return BREAKPOINTS.map((breakpoint) => {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) return \"\";\n return `${breakpoint}:${String(breakpointValue)}`;\n })\n .filter(Boolean)\n .join(\"|\");\n}\n\nexport function serializeResponsiveValueIf<T>(\n value: ResponsiveValue<T> | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n if (!predicate(breakpointValue)) return undefined;\n }\n\n return serializeResponsiveValue(value);\n}\n\nexport function serializeValueIf<T>(\n value: T | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n if (value === undefined || !predicate(value)) return undefined;\n return String(value);\n}\n\nexport function setResponsiveStyleVar<T>(\n styles: Record<string, string | number>,\n variable: string,\n value: ResponsiveValue<T> | undefined,\n resolve: (value: T) => string | number | undefined = (input) =>\n input as string | number | undefined,\n) {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n const resolved = resolve(breakpointValue);\n if (resolved === undefined || resolved === null || resolved === \"\") continue;\n styles[`--ak-${variable}-${breakpoint}`] = resolved;\n }\n}\n\nexport function resolveSpaceValue(value: string | number): string | number {\n if (typeof value === \"number\") return String(value);\n const trimmed = value.trim();\n return SPACE_TOKEN_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveContainerSizeValue(value: string): string {\n const trimmed = value.trim();\n return CONTAINER_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveSectionSizeValue(value: string): string {\n const trimmed = value.trim();\n return SECTION_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveJustifyValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"between\") return \"space-between\";\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveAlignValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveInlineAlignValue(value: \"left\" | \"center\" | \"right\"): {\n marginLeft?: string;\n marginRight?: string;\n} {\n if (value === \"left\") return { marginLeft: \"0\", marginRight: \"auto\" };\n if (value === \"right\") return { marginLeft: \"auto\", marginRight: \"0\" };\n return { marginLeft: \"auto\", marginRight: \"auto\" };\n}\n\n/**\n * Merges a record of computed layout declarations with a user-supplied style\n * value. The user's declarations take precedence for conflicting keys.\n */\nexport function mergeLayoutStyles(\n layout: Record<string, string | number>,\n user: unknown,\n): string | undefined {\n const merged: Record<string, unknown> = { ...layout };\n\n if (user !== null && user !== undefined && typeof user === \"object\") {\n Object.assign(merged, user as Record<string, unknown>);\n }\n\n const mergedString = objectToCssString(merged);\n\n if (typeof user === \"string\" && user.trim()) {\n return mergedString ? `${mergedString};${user.trim()}` : user.trim();\n }\n\n return mergedString || undefined;\n}\n\nfunction camelToKebab(s: string): string {\n return s.replace(/([A-Z])/g, (c) => `-${c.toLowerCase()}`);\n}\n\nfunction objectToCssString(styles: Record<string, unknown>): string {\n return Object.entries(styles)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${camelToKebab(key)}:${String(value)}`)\n .join(\";\");\n}\n"],"mappings":"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"}
@@ -1,17 +0,0 @@
1
- //#region src/components/badge/badge.a11y.d.ts
2
- /**
3
- * Accessibility contract for Badge.
4
- */
5
- declare const BADGE_A11Y_CONTRACT: {
6
- readonly DATA_ATTRIBUTES: {
7
- readonly slot: "data-slot";
8
- };
9
- readonly MARKER: "data-badge";
10
- readonly CONTENT: {
11
- readonly textAllowed: true;
12
- };
13
- };
14
- type BadgeA11yContract = typeof BADGE_A11Y_CONTRACT;
15
- //#endregion
16
- export { BADGE_A11Y_CONTRACT, BadgeA11yContract };
17
- //# sourceMappingURL=badge.a11y.d.ts.map
@@ -1,20 +0,0 @@
1
- //#region src/components/block/block.a11y.d.ts
2
- declare const BLOCK_A11Y_CONTRACT: {
3
- readonly DATA_ATTRIBUTES: {
4
- readonly slot: "data-slot";
5
- readonly layout: "data-ak-layout";
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 size: "data-size";
12
- };
13
- readonly SLOT_VALUES: {
14
- readonly root: "block";
15
- };
16
- };
17
- type BlockA11yContract = typeof BLOCK_A11Y_CONTRACT;
18
- //#endregion
19
- export { BLOCK_A11Y_CONTRACT, BlockA11yContract };
20
- //# sourceMappingURL=block.a11y.d.ts.map
@@ -1,14 +0,0 @@
1
- //#region src/components/box/box.a11y.d.ts
2
- declare const BOX_A11Y_CONTRACT: {
3
- readonly DATA_ATTRIBUTES: {
4
- readonly slot: "data-slot";
5
- readonly layout: "data-ak-layout";
6
- };
7
- readonly SLOT_VALUES: {
8
- readonly root: "box";
9
- };
10
- };
11
- type BoxA11yContract = typeof BOX_A11Y_CONTRACT;
12
- //#endregion
13
- export { BOX_A11Y_CONTRACT, BoxA11yContract };
14
- //# sourceMappingURL=box.a11y.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BoxAsChildProps, BoxDivProps, BoxSpanProps } from "./box.types.js";
2
-
3
- //#region src/components/box/box.d.ts
4
- declare function Box(props: BoxDivProps): JSX.Element;
5
- declare function Box(props: BoxSpanProps): JSX.Element;
6
- declare function Box(props: BoxAsChildProps): JSX.Element;
7
- //#endregion
8
- export { Box };
9
- //# sourceMappingURL=box.d.ts.map
@@ -1,36 +0,0 @@
1
- import { mergeProps } from "../_internal/merge-props.js";
2
- import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutClass } from "../_internal/box-layout.js";
3
- import { jsx } from "@askrjs/askr/jsx-runtime";
4
- import { Slot } from "@askrjs/askr/foundations";
5
- //#region src/components/box/box.tsx
6
- function Box(props) {
7
- const as = "as" in props ? props.as : "div";
8
- const { asChild, children, ref, style: userStyle, ...rest } = props;
9
- const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
10
- const layoutStyle = {};
11
- applyBoxLayoutStyles(layoutStyle, boxProps);
12
- const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);
13
- const finalProps = mergeProps(passthroughProps, {
14
- ref,
15
- "data-slot": "box",
16
- "data-ak-layout": "true",
17
- ...layoutClass ? { class: layoutClass } : {}
18
- });
19
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
20
- asChild: true,
21
- ...finalProps,
22
- children
23
- });
24
- if (as === "span") return /* @__PURE__ */ jsx("span", {
25
- ...finalProps,
26
- children
27
- });
28
- return /* @__PURE__ */ jsx("div", {
29
- ...finalProps,
30
- children
31
- });
32
- }
33
- //#endregion
34
- export { Box };
35
-
36
- //# sourceMappingURL=box.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"box.js","names":[],"sources":["../../../src/components/box/box.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 type { BoxAsChildProps, BoxDivProps, BoxSpanProps } from \"./box.types\";\n\nexport function Box(props: BoxDivProps): JSX.Element;\nexport function Box(props: BoxSpanProps): JSX.Element;\nexport function Box(props: BoxAsChildProps): JSX.Element;\nexport function Box(props: BoxDivProps | BoxSpanProps | BoxAsChildProps) {\n const as = \"as\" in props ? props.as : \"div\";\n const { asChild, children, ref, style: userStyle, ...rest } = props;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const layoutStyle: Record<string, string | number> = {};\n applyBoxLayoutStyles(layoutStyle, boxProps);\n const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": \"box\",\n \"data-ak-layout\": \"true\",\n ...(layoutClass ? { class: layoutClass } : {}),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n if (as === \"span\") {\n return <span {...finalProps}>{children}</span>;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;AAYA,SAAgB,IAAI,OAAqD;CACvE,MAAM,KAAK,QAAQ,QAAQ,MAAM,KAAK;CACtC,MAAM,EAAE,SAAS,UAAU,KAAK,OAAO,WAAW,GAAG,SAAS;CAE9D,MAAM,EAAE,UAAU,MAAM,qBAAqB,oBAAoB,IAAI;CACrE,MAAM,cAA+C,CAAC;CACtD,qBAAqB,aAAa,QAAQ;CAC1C,MAAM,cAAc,mBAAmB,aAAa,SAAS;CAE7D,MAAM,aAAa,WAAW,kBAAkB;EAC9C;EACA,aAAa;EACb,kBAAkB;EAClB,GAAI,cAAc,EAAE,OAAO,YAAY,IAAI,CAAC;CAC9C,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,IAAI,OAAO,QACT,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;CAAe,CAAA;CAG/C,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;CAAc,CAAA;AAC7C"}
@@ -1,72 +0,0 @@
1
- import { ResponsiveValue } from "../_internal/layout.js";
2
- import { JSXElement } from "@askrjs/askr/foundations";
3
- import { Ref } from "@askrjs/askr/foundations/utilities";
4
-
5
- //#region src/components/box/box.types.d.ts
6
- type LayoutResponsive<T> = ResponsiveValue<T>;
7
- type BoxLayoutOwnProps = {
8
- display?: ResponsiveValue<string>;
9
- m?: ResponsiveValue<string | number>;
10
- mx?: ResponsiveValue<string | number>;
11
- my?: ResponsiveValue<string | number>;
12
- mt?: ResponsiveValue<string | number>;
13
- mr?: ResponsiveValue<string | number>;
14
- mb?: ResponsiveValue<string | number>;
15
- ml?: ResponsiveValue<string | number>;
16
- p?: ResponsiveValue<string | number>;
17
- px?: ResponsiveValue<string | number>;
18
- py?: ResponsiveValue<string | number>;
19
- pt?: ResponsiveValue<string | number>;
20
- pr?: ResponsiveValue<string | number>;
21
- pb?: ResponsiveValue<string | number>;
22
- pl?: ResponsiveValue<string | number>;
23
- width?: ResponsiveValue<string>;
24
- minWidth?: ResponsiveValue<string>;
25
- maxWidth?: ResponsiveValue<string>;
26
- height?: ResponsiveValue<string>;
27
- minHeight?: ResponsiveValue<string>;
28
- maxHeight?: ResponsiveValue<string>;
29
- position?: ResponsiveValue<string>;
30
- inset?: ResponsiveValue<string | number>;
31
- top?: ResponsiveValue<string | number>;
32
- right?: ResponsiveValue<string | number>;
33
- bottom?: ResponsiveValue<string | number>;
34
- left?: ResponsiveValue<string | number>;
35
- overflow?: ResponsiveValue<string>;
36
- overflowX?: ResponsiveValue<string>;
37
- overflowY?: ResponsiveValue<string>;
38
- flexBasis?: ResponsiveValue<string>;
39
- flexGrow?: ResponsiveValue<string | number>;
40
- flexShrink?: ResponsiveValue<string | number>;
41
- gridArea?: ResponsiveValue<string>;
42
- gridColumn?: ResponsiveValue<string>;
43
- gridColumnStart?: ResponsiveValue<string>;
44
- gridColumnEnd?: ResponsiveValue<string>;
45
- gridRow?: ResponsiveValue<string>;
46
- gridRowStart?: ResponsiveValue<string>;
47
- gridRowEnd?: ResponsiveValue<string>;
48
- children?: unknown;
49
- };
50
- type BoxOwnProps = BoxLayoutOwnProps & {
51
- as?: "div" | "span";
52
- };
53
- type BoxDivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & BoxOwnProps & {
54
- as?: "div";
55
- asChild?: false;
56
- ref?: Ref<HTMLDivElement>;
57
- };
58
- type BoxSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & BoxOwnProps & {
59
- as: "span";
60
- asChild?: false;
61
- ref?: Ref<HTMLSpanElement>;
62
- };
63
- type BoxAsChildProps = Omit<BoxOwnProps, "as"> & {
64
- asChild: true;
65
- children: JSXElement;
66
- ref?: Ref<unknown>;
67
- style?: JSX.IntrinsicElements["div"]["style"];
68
- };
69
- type BoxProps = BoxDivProps | BoxSpanProps | BoxAsChildProps;
70
- //#endregion
71
- export { BoxAsChildProps, BoxDivProps, BoxLayoutOwnProps, BoxOwnProps, BoxProps, BoxSpanProps, LayoutResponsive };
72
- //# sourceMappingURL=box.types.d.ts.map
@@ -1,3 +0,0 @@
1
- import { BoxAsChildProps, BoxDivProps, BoxLayoutOwnProps, BoxOwnProps, BoxProps, BoxSpanProps, LayoutResponsive } from "./box.types.js";
2
- import { Box } from "./box.js";
3
- import { BOX_A11Y_CONTRACT, BoxA11yContract } from "./box.a11y.js";
@@ -1,17 +0,0 @@
1
- //#region src/components/breadcrumb/breadcrumb.a11y.d.ts
2
- /**
3
- * Breadcrumb accessibility contract.
4
- */
5
- declare const BREADCRUMB_A11Y_CONTRACT: {
6
- readonly DATA_ATTRIBUTES: {
7
- readonly slot: "data-slot";
8
- };
9
- readonly NAV_ROLE: "navigation";
10
- readonly CURRENT_PAGE_ATTRIBUTE: "aria-current";
11
- readonly CURRENT_PAGE_VALUE: "page";
12
- readonly SEPARATOR_MARKER: "data-breadcrumb-separator";
13
- };
14
- type BreadcrumbA11yContract = typeof BREADCRUMB_A11Y_CONTRACT;
15
- //#endregion
16
- export { BREADCRUMB_A11Y_CONTRACT, BreadcrumbA11yContract };
17
- //# sourceMappingURL=breadcrumb.a11y.d.ts.map
@@ -1,15 +0,0 @@
1
- //#region src/components/breadcrumb/breadcrumb.a11y.ts
2
- /**
3
- * Breadcrumb accessibility contract.
4
- */
5
- const BREADCRUMB_A11Y_CONTRACT = {
6
- DATA_ATTRIBUTES: { slot: "data-slot" },
7
- NAV_ROLE: "navigation",
8
- CURRENT_PAGE_ATTRIBUTE: "aria-current",
9
- CURRENT_PAGE_VALUE: "page",
10
- SEPARATOR_MARKER: "data-breadcrumb-separator"
11
- };
12
- //#endregion
13
- export { BREADCRUMB_A11Y_CONTRACT };
14
-
15
- //# sourceMappingURL=breadcrumb.a11y.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"breadcrumb.a11y.js","names":[],"sources":["../../../src/components/breadcrumb/breadcrumb.a11y.ts"],"sourcesContent":["/**\n * Breadcrumb accessibility contract.\n */\n\nexport const BREADCRUMB_A11Y_CONTRACT = {\n DATA_ATTRIBUTES: {\n slot: \"data-slot\" as const,\n },\n NAV_ROLE: \"navigation\" as const,\n CURRENT_PAGE_ATTRIBUTE: \"aria-current\" as const,\n CURRENT_PAGE_VALUE: \"page\" as const,\n SEPARATOR_MARKER: \"data-breadcrumb-separator\" as const,\n} as const;\n\nexport type BreadcrumbA11yContract = typeof BREADCRUMB_A11Y_CONTRACT;\n"],"mappings":";;;;AAIA,MAAa,2BAA2B;CACtC,iBAAiB,EACf,MAAM,YACR;CACA,UAAU;CACV,wBAAwB;CACxB,oBAAoB;CACpB,kBAAkB;AACpB"}
@@ -1,18 +0,0 @@
1
- import { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps } from "./breadcrumb.types.js";
2
-
3
- //#region src/components/breadcrumb/breadcrumb.d.ts
4
- declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
5
- declare function Breadcrumb(props: BreadcrumbAsChildProps): JSX.Element;
6
- declare function BreadcrumbList(props: BreadcrumbListProps): JSX.Element;
7
- declare function BreadcrumbList(props: BreadcrumbListAsChildProps): JSX.Element;
8
- declare function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element;
9
- declare function BreadcrumbItem(props: BreadcrumbItemAsChildProps): JSX.Element;
10
- declare function BreadcrumbLink(props: BreadcrumbLinkProps): JSX.Element;
11
- declare function BreadcrumbLink(props: BreadcrumbLinkAsChildProps): JSX.Element;
12
- declare function BreadcrumbCurrent(props: BreadcrumbCurrentProps): JSX.Element;
13
- declare function BreadcrumbCurrent(props: BreadcrumbCurrentAsChildProps): JSX.Element;
14
- declare function BreadcrumbSeparator(props: BreadcrumbSeparatorProps): JSX.Element;
15
- declare function BreadcrumbSeparator(props: BreadcrumbSeparatorAsChildProps): JSX.Element;
16
- //#endregion
17
- export { Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator };
18
- //# sourceMappingURL=breadcrumb.d.ts.map
@@ -1,113 +0,0 @@
1
- import { mergeProps } from "../_internal/merge-props.js";
2
- import { jsx } from "@askrjs/askr/jsx-runtime";
3
- import { Slot } from "@askrjs/askr/foundations";
4
- //#region src/components/breadcrumb/breadcrumb.tsx
5
- function Breadcrumb(props) {
6
- const { asChild, children, ref, "aria-label": ariaLabel, ...rest } = props;
7
- const finalProps = mergeProps(rest, {
8
- ref,
9
- "aria-label": ariaLabel ?? "Breadcrumb",
10
- "data-slot": "breadcrumb",
11
- "data-breadcrumb": "true"
12
- });
13
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
14
- asChild: true,
15
- ...finalProps,
16
- children
17
- });
18
- return /* @__PURE__ */ jsx("nav", {
19
- ...finalProps,
20
- children
21
- });
22
- }
23
- function BreadcrumbList(props) {
24
- const { asChild, children, ref, ...rest } = props;
25
- const finalProps = mergeProps(rest, {
26
- ref,
27
- "data-slot": "breadcrumb-list",
28
- "data-breadcrumb-list": "true"
29
- });
30
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
31
- asChild: true,
32
- ...finalProps,
33
- children
34
- });
35
- return /* @__PURE__ */ jsx("ol", {
36
- ...finalProps,
37
- children
38
- });
39
- }
40
- function BreadcrumbItem(props) {
41
- const { asChild, children, ref, ...rest } = props;
42
- const finalProps = mergeProps(rest, {
43
- ref,
44
- "data-slot": "breadcrumb-item",
45
- "data-breadcrumb-item": "true"
46
- });
47
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
48
- asChild: true,
49
- ...finalProps,
50
- children
51
- });
52
- return /* @__PURE__ */ jsx("li", {
53
- ...finalProps,
54
- children
55
- });
56
- }
57
- function BreadcrumbLink(props) {
58
- const { asChild, children, ref, ...rest } = props;
59
- const finalProps = mergeProps(rest, {
60
- ref,
61
- "data-slot": "breadcrumb-link",
62
- "data-breadcrumb-link": "true"
63
- });
64
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
65
- asChild: true,
66
- ...finalProps,
67
- children
68
- });
69
- return /* @__PURE__ */ jsx("a", {
70
- ...finalProps,
71
- children
72
- });
73
- }
74
- function BreadcrumbCurrent(props) {
75
- const { asChild, children, ref, ...rest } = props;
76
- const finalProps = mergeProps(rest, {
77
- ref,
78
- "aria-current": "page",
79
- "data-slot": "breadcrumb-current",
80
- "data-breadcrumb-current": "true"
81
- });
82
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
83
- asChild: true,
84
- ...finalProps,
85
- children
86
- });
87
- return /* @__PURE__ */ jsx("span", {
88
- ...finalProps,
89
- children
90
- });
91
- }
92
- function BreadcrumbSeparator(props) {
93
- const { asChild, children, ref, ...rest } = props;
94
- const finalProps = mergeProps(rest, {
95
- ref,
96
- "aria-hidden": "true",
97
- "data-slot": "breadcrumb-separator",
98
- "data-breadcrumb-separator": "true"
99
- });
100
- if (asChild) return /* @__PURE__ */ jsx(Slot, {
101
- asChild: true,
102
- ...finalProps,
103
- children: children ?? "/"
104
- });
105
- return /* @__PURE__ */ jsx("span", {
106
- ...finalProps,
107
- children: children ?? "/"
108
- });
109
- }
110
- //#endregion
111
- export { Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator };
112
-
113
- //# sourceMappingURL=breadcrumb.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"breadcrumb.js","names":[],"sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type {\n BreadcrumbAsChildProps,\n BreadcrumbCurrentAsChildProps,\n BreadcrumbCurrentProps,\n BreadcrumbItemAsChildProps,\n BreadcrumbItemProps,\n BreadcrumbLinkAsChildProps,\n BreadcrumbLinkProps,\n BreadcrumbListAsChildProps,\n BreadcrumbListProps,\n BreadcrumbProps,\n BreadcrumbSeparatorAsChildProps,\n BreadcrumbSeparatorProps,\n} from \"./breadcrumb.types\";\n\nexport function Breadcrumb(props: BreadcrumbProps): JSX.Element;\nexport function Breadcrumb(props: BreadcrumbAsChildProps): JSX.Element;\nexport function Breadcrumb(props: BreadcrumbProps | BreadcrumbAsChildProps) {\n const { asChild, children, ref, \"aria-label\": ariaLabel, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"aria-label\": ariaLabel ?? \"Breadcrumb\",\n \"data-slot\": \"breadcrumb\",\n \"data-breadcrumb\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <nav {...finalProps}>{children}</nav>;\n}\n\nexport function BreadcrumbList(props: BreadcrumbListProps): JSX.Element;\nexport function BreadcrumbList(props: BreadcrumbListAsChildProps): JSX.Element;\nexport function BreadcrumbList(props: BreadcrumbListProps | BreadcrumbListAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"breadcrumb-list\",\n \"data-breadcrumb-list\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <ol {...finalProps}>{children}</ol>;\n}\n\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element;\nexport function BreadcrumbItem(props: BreadcrumbItemAsChildProps): JSX.Element;\nexport function BreadcrumbItem(props: BreadcrumbItemProps | BreadcrumbItemAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"breadcrumb-item\",\n \"data-breadcrumb-item\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <li {...finalProps}>{children}</li>;\n}\n\nexport function BreadcrumbLink(props: BreadcrumbLinkProps): JSX.Element;\nexport function BreadcrumbLink(props: BreadcrumbLinkAsChildProps): JSX.Element;\nexport function BreadcrumbLink(props: BreadcrumbLinkProps | BreadcrumbLinkAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"breadcrumb-link\",\n \"data-breadcrumb-link\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <a {...finalProps}>{children}</a>;\n}\n\nexport function BreadcrumbCurrent(props: BreadcrumbCurrentProps): JSX.Element;\nexport function BreadcrumbCurrent(props: BreadcrumbCurrentAsChildProps): JSX.Element;\nexport function BreadcrumbCurrent(props: BreadcrumbCurrentProps | BreadcrumbCurrentAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"aria-current\": \"page\",\n \"data-slot\": \"breadcrumb-current\",\n \"data-breadcrumb-current\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <span {...finalProps}>{children}</span>;\n}\n\nexport function BreadcrumbSeparator(props: BreadcrumbSeparatorProps): JSX.Element;\nexport function BreadcrumbSeparator(props: BreadcrumbSeparatorAsChildProps): JSX.Element;\nexport function BreadcrumbSeparator(\n props: BreadcrumbSeparatorProps | BreadcrumbSeparatorAsChildProps,\n) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"aria-hidden\": \"true\",\n \"data-slot\": \"breadcrumb-separator\",\n \"data-breadcrumb-separator\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children ?? \"/\"} />;\n }\n\n return <span {...finalProps}>{children ?? \"/\"}</span>;\n}\n"],"mappings":";;;;AAmBA,SAAgB,WAAW,OAAiD;CAC1E,MAAM,EAAE,SAAS,UAAU,KAAK,cAAc,WAAW,GAAG,SAAS;CACrE,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,cAAc,aAAa;EAC3B,aAAa;EACb,mBAAmB;CACrB,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;CAAc,CAAA;AAC7C;AAIA,SAAgB,eAAe,OAAyD;CACtF,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,wBAAwB;CAC1B,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,OAAO,oBAAC,MAAD;EAAI,GAAI;EAAa;CAAa,CAAA;AAC3C;AAIA,SAAgB,eAAe,OAAyD;CACtF,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,wBAAwB;CAC1B,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,OAAO,oBAAC,MAAD;EAAI,GAAI;EAAa;CAAa,CAAA;AAC3C;AAIA,SAAgB,eAAe,OAAyD;CACtF,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,wBAAwB;CAC1B,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,OAAO,oBAAC,KAAD;EAAG,GAAI;EAAa;CAAY,CAAA;AACzC;AAIA,SAAgB,kBAAkB,OAA+D;CAC/F,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,gBAAgB;EAChB,aAAa;EACb,2BAA2B;CAC7B,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;CAAe,CAAA;AAC/C;AAIA,SAAgB,oBACd,OACA;CACA,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,eAAe;EACf,aAAa;EACb,6BAA6B;CAC/B,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAY,UAAU,YAAY;CAAM,CAAA;CAGnE,OAAO,oBAAC,QAAD;EAAM,GAAI;YAAa,YAAY;CAAU,CAAA;AACtD"}
@@ -1,65 +0,0 @@
1
- import { JSXElement } from "@askrjs/askr/foundations";
2
- import { Ref } from "@askrjs/askr/foundations/utilities";
3
-
4
- //#region src/components/breadcrumb/breadcrumb.types.d.ts
5
- type BreadcrumbOwnProps = {
6
- children?: unknown;
7
- "aria-label"?: string;
8
- };
9
- type BreadcrumbProps = Omit<JSX.IntrinsicElements["nav"], "children" | "ref"> & BreadcrumbOwnProps & {
10
- asChild?: false;
11
- ref?: Ref<HTMLElement>;
12
- };
13
- type BreadcrumbAsChildProps = BreadcrumbOwnProps & {
14
- asChild: true;
15
- children: JSXElement;
16
- ref?: Ref<unknown>;
17
- };
18
- type BreadcrumbListProps = Omit<JSX.IntrinsicElements["ol"], "children" | "ref"> & {
19
- asChild?: false;
20
- ref?: Ref<HTMLOListElement>;
21
- };
22
- type BreadcrumbListAsChildProps = {
23
- asChild: true;
24
- children: JSXElement;
25
- ref?: Ref<unknown>;
26
- };
27
- type BreadcrumbItemProps = Omit<JSX.IntrinsicElements["li"], "children" | "ref"> & {
28
- asChild?: false;
29
- ref?: Ref<HTMLLIElement>;
30
- };
31
- type BreadcrumbItemAsChildProps = {
32
- asChild: true;
33
- children: JSXElement;
34
- ref?: Ref<unknown>;
35
- };
36
- type BreadcrumbLinkProps = Omit<JSX.IntrinsicElements["a"], "children" | "ref"> & {
37
- asChild?: false;
38
- ref?: Ref<HTMLAnchorElement>;
39
- };
40
- type BreadcrumbLinkAsChildProps = {
41
- asChild: true;
42
- children: JSXElement;
43
- ref?: Ref<unknown>;
44
- };
45
- type BreadcrumbCurrentProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & {
46
- asChild?: false;
47
- ref?: Ref<HTMLSpanElement>;
48
- };
49
- type BreadcrumbCurrentAsChildProps = {
50
- asChild: true;
51
- children: JSXElement;
52
- ref?: Ref<unknown>;
53
- };
54
- type BreadcrumbSeparatorProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & {
55
- asChild?: false;
56
- ref?: Ref<HTMLSpanElement>;
57
- };
58
- type BreadcrumbSeparatorAsChildProps = {
59
- asChild: true;
60
- children: JSXElement;
61
- ref?: Ref<unknown>;
62
- };
63
- //#endregion
64
- export { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbOwnProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps };
65
- //# sourceMappingURL=breadcrumb.types.d.ts.map
@@ -1,3 +0,0 @@
1
- import { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbOwnProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps } from "./breadcrumb.types.js";
2
- import { Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator } from "./breadcrumb.js";
3
- import { BREADCRUMB_A11Y_CONTRACT, BreadcrumbA11yContract } from "./breadcrumb.a11y.js";
@@ -1,19 +0,0 @@
1
- //#region src/components/container/container.a11y.d.ts
2
- declare const CONTAINER_A11Y_CONTRACT: {
3
- readonly DATA_ATTRIBUTES: {
4
- readonly slot: "data-slot";
5
- readonly layout: "data-ak-layout";
6
- readonly variant: "data-variant";
7
- readonly maxWidth: "data-max-width";
8
- readonly padding: "data-padding";
9
- readonly size: "data-size";
10
- readonly align: "data-align";
11
- };
12
- readonly SLOT_VALUES: {
13
- readonly root: "container";
14
- };
15
- };
16
- type ContainerA11yContract = typeof CONTAINER_A11Y_CONTRACT;
17
- //#endregion
18
- export { CONTAINER_A11Y_CONTRACT, ContainerA11yContract };
19
- //# sourceMappingURL=container.a11y.d.ts.map
@@ -1,22 +0,0 @@
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
- };
18
- };
19
- type FlexA11yContract = typeof FLEX_A11Y_CONTRACT;
20
- //#endregion
21
- export { FLEX_A11Y_CONTRACT, FlexA11yContract };
22
- //# sourceMappingURL=flex.a11y.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,115 +0,0 @@
1
- import { mergeProps } from "../_internal/merge-props.js";
2
- import { isResponsiveValue, resolveAlignValue, resolveJustifyValue, resolveSpaceValue, serializeResponsiveValueIf, setResponsiveStyleVar } from "../_internal/layout.js";
3
- import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutClass } from "../_internal/box-layout.js";
4
- import { jsx } from "@askrjs/askr/jsx-runtime";
5
- import { Slot } from "@askrjs/askr/foundations";
6
- //#region src/components/flex/flex.tsx
7
- const SPACE_TOKENS = new Set([
8
- "1",
9
- "2",
10
- "3",
11
- "4",
12
- "5",
13
- "6",
14
- "7",
15
- "8",
16
- "9",
17
- "xs",
18
- "sm",
19
- "md",
20
- "lg",
21
- "xl",
22
- "2xl",
23
- "3xl"
24
- ]);
25
- function isResponsiveObject(value) {
26
- return value !== null && typeof value === "object" && !Array.isArray(value);
27
- }
28
- function isCssCoveredSpaceValue(value) {
29
- return typeof value === "string" && SPACE_TOKENS.has(value.trim());
30
- }
31
- function isCssCoveredDirectionValue(value) {
32
- return typeof value === "string" && [
33
- "row",
34
- "column",
35
- "row-reverse",
36
- "column-reverse"
37
- ].includes(value.trim());
38
- }
39
- function isCssCoveredAlignValue(value) {
40
- return typeof value === "string" && [
41
- "start",
42
- "end",
43
- "center",
44
- "stretch",
45
- "baseline"
46
- ].includes(value.trim());
47
- }
48
- function isCssCoveredJustifyValue(value) {
49
- return typeof value === "string" && [
50
- "start",
51
- "end",
52
- "center",
53
- "between"
54
- ].includes(value.trim());
55
- }
56
- function isCssCoveredWrapValue(value) {
57
- return typeof value === "string" && [
58
- "wrap",
59
- "nowrap",
60
- "wrap-reverse"
61
- ].includes(value.trim());
62
- }
63
- function serializeStaticThemeValue(value, predicate) {
64
- if (isResponsiveValue(value)) return void 0;
65
- return serializeResponsiveValueIf(value, predicate);
66
- }
67
- const SLOTS = { root: "flex" };
68
- function Flex(props) {
69
- const as = "as" in props ? props.as : "div";
70
- const { asChild, children, direction = "row", gap, gapX, gapY, align, justify, wrap, collapseBelow, ref, style: userStyle, ...rest } = props;
71
- const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
72
- const rootSlot = typeof passthroughProps["data-slot"] === "string" ? String(passthroughProps["data-slot"]) : SLOTS.root;
73
- const layoutStyle = {};
74
- applyBoxLayoutStyles(layoutStyle, boxProps);
75
- if (boxProps.display !== void 0) setResponsiveStyleVar(layoutStyle, "display", boxProps.display, (value) => value);
76
- if (direction !== "row" && (!isCssCoveredDirectionValue(direction) || isResponsiveObject(direction))) setResponsiveStyleVar(layoutStyle, "flex-direction", direction, (value) => value);
77
- if (!isCssCoveredSpaceValue(gap) || isResponsiveObject(gap)) setResponsiveStyleVar(layoutStyle, "gap", gap, resolveSpaceValue);
78
- if (!isCssCoveredSpaceValue(gapX) || isResponsiveObject(gapX)) setResponsiveStyleVar(layoutStyle, "column-gap", gapX, resolveSpaceValue);
79
- if (!isCssCoveredSpaceValue(gapY) || isResponsiveObject(gapY)) setResponsiveStyleVar(layoutStyle, "row-gap", gapY, resolveSpaceValue);
80
- if (!isCssCoveredAlignValue(align) || isResponsiveObject(align)) setResponsiveStyleVar(layoutStyle, "align-items", align, resolveAlignValue);
81
- if (!isCssCoveredJustifyValue(justify) || isResponsiveObject(justify)) setResponsiveStyleVar(layoutStyle, "justify-content", justify, resolveJustifyValue);
82
- if (!isCssCoveredWrapValue(wrap) || isResponsiveObject(wrap)) setResponsiveStyleVar(layoutStyle, "flex-wrap", wrap, (value) => value);
83
- const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);
84
- const finalProps = mergeProps(passthroughProps, {
85
- ref,
86
- "data-slot": rootSlot,
87
- "data-ak-layout": "true",
88
- "data-direction": serializeStaticThemeValue(direction, isCssCoveredDirectionValue),
89
- "data-gap": serializeStaticThemeValue(gap, isCssCoveredSpaceValue),
90
- "data-gap-x": serializeStaticThemeValue(gapX, isCssCoveredSpaceValue),
91
- "data-gap-y": serializeStaticThemeValue(gapY, isCssCoveredSpaceValue),
92
- "data-align": serializeStaticThemeValue(align, isCssCoveredAlignValue),
93
- "data-justify": serializeStaticThemeValue(justify, isCssCoveredJustifyValue),
94
- "data-wrap": serializeStaticThemeValue(wrap, isCssCoveredWrapValue),
95
- "data-collapse-below": collapseBelow,
96
- ...layoutClass ? { class: layoutClass } : {}
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
106
- });
107
- return /* @__PURE__ */ jsx("div", {
108
- ...finalProps,
109
- children
110
- });
111
- }
112
- //#endregion
113
- export { Flex };
114
-
115
- //# sourceMappingURL=flex.js.map