@askrjs/themes 0.0.9 → 0.0.11

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 (472) 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/alert/alert.js +2 -2
  7. package/dist/components/alert/alert.js.map +1 -1
  8. package/dist/components/alert/alert.types.d.ts +0 -1
  9. package/dist/components/aside/aside.d.ts +7 -0
  10. package/dist/components/aside/aside.js +16 -0
  11. package/dist/components/aside/aside.js.map +1 -0
  12. package/dist/components/aside/aside.types.d.ts +6 -0
  13. package/dist/components/aside/index.d.ts +2 -0
  14. package/dist/components/aspect-ratio/aspect-ratio.js +1 -1
  15. package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -1
  16. package/dist/components/badge/index.d.ts +1 -2
  17. package/dist/components/block/block.d.ts +2 -3
  18. package/dist/components/block/block.js +16 -46
  19. package/dist/components/block/block.js.map +1 -1
  20. package/dist/components/block/block.types.d.ts +13 -23
  21. package/dist/components/block/index.d.ts +3 -3
  22. package/dist/components/brand/brand.d.ts +9 -0
  23. package/dist/components/brand/brand.js +49 -0
  24. package/dist/components/brand/brand.js.map +1 -0
  25. package/dist/components/brand/brand.types.d.ts +31 -0
  26. package/dist/components/brand/index.d.ts +2 -0
  27. package/dist/components/card/card.d.ts +3 -3
  28. package/dist/components/card/card.js +6 -11
  29. package/dist/components/card/card.js.map +1 -1
  30. package/dist/components/card/card.types.d.ts +10 -12
  31. package/dist/components/card/index.d.ts +2 -2
  32. package/dist/components/catalog.d.ts +156 -0
  33. package/dist/components/catalog.js +723 -0
  34. package/dist/components/catalog.js.map +1 -0
  35. package/dist/components/container/container.d.ts +2 -3
  36. package/dist/components/container/container.js +8 -71
  37. package/dist/components/container/container.js.map +1 -1
  38. package/dist/components/container/container.types.d.ts +5 -24
  39. package/dist/components/container/index.d.ts +2 -3
  40. package/dist/components/empty-state/empty-state.js +34 -28
  41. package/dist/components/empty-state/empty-state.js.map +1 -1
  42. package/dist/components/empty-state/empty-state.types.d.ts +3 -6
  43. package/dist/components/field/field.js +4 -2
  44. package/dist/components/field/field.js.map +1 -1
  45. package/dist/components/field/field.types.d.ts +1 -0
  46. package/dist/components/footer/footer.d.ts +13 -0
  47. package/dist/components/footer/footer.js +86 -0
  48. package/dist/components/footer/footer.js.map +1 -0
  49. package/dist/components/footer/footer.types.d.ts +37 -0
  50. package/dist/components/footer/index.d.ts +2 -0
  51. package/dist/components/grid/grid.d.ts +7 -0
  52. package/dist/components/grid/grid.js +76 -0
  53. package/dist/components/grid/grid.js.map +1 -0
  54. package/dist/components/grid/grid.types.d.ts +19 -0
  55. package/dist/components/grid/index.d.ts +2 -0
  56. package/dist/components/header/header.js +9 -6
  57. package/dist/components/header/header.js.map +1 -1
  58. package/dist/components/header/header.types.d.ts +5 -5
  59. package/dist/components/header/index.d.ts +2 -0
  60. package/dist/components/main/index.d.ts +2 -0
  61. package/dist/components/main/main.d.ts +7 -0
  62. package/dist/components/main/main.js +17 -0
  63. package/dist/components/main/main.js.map +1 -0
  64. package/dist/components/main/main.types.d.ts +6 -0
  65. package/dist/components/nav/index.d.ts +2 -2
  66. package/dist/components/nav/nav.d.ts +8 -6
  67. package/dist/components/nav/nav.js +93 -58
  68. package/dist/components/nav/nav.js.map +1 -1
  69. package/dist/components/nav/nav.types.d.ts +16 -20
  70. package/dist/components/navbar/index.d.ts +4 -5
  71. package/dist/components/navbar/navbar.d.ts +3 -38
  72. package/dist/components/navbar/navbar.js +103 -210
  73. package/dist/components/navbar/navbar.js.map +1 -1
  74. package/dist/components/navbar/navbar.types.d.ts +14 -24
  75. package/dist/components/page/index.d.ts +2 -0
  76. package/dist/components/page/page.d.ts +7 -0
  77. package/dist/components/page/page.js +22 -0
  78. package/dist/components/page/page.js.map +1 -0
  79. package/dist/components/page/page.types.d.ts +6 -0
  80. package/dist/components/page-header/index.d.ts +2 -0
  81. package/dist/components/page-header/page-header.d.ts +7 -0
  82. package/dist/components/page-header/page-header.js +37 -0
  83. package/dist/components/page-header/page-header.js.map +1 -0
  84. package/dist/components/page-header/page-header.types.d.ts +10 -0
  85. package/dist/components/section/index.d.ts +2 -3
  86. package/dist/components/section/section.d.ts +2 -3
  87. package/dist/components/section/section.js +7 -30
  88. package/dist/components/section/section.js.map +1 -1
  89. package/dist/components/section/section.types.d.ts +3 -20
  90. package/dist/components/separator/index.d.ts +1 -2
  91. package/dist/components/sidebar/index.d.ts +2 -0
  92. package/dist/components/sidebar/sidebar.d.ts +17 -2
  93. package/dist/components/sidebar/sidebar.js +115 -225
  94. package/dist/components/sidebar/sidebar.js.map +1 -1
  95. package/dist/components/sidebar/sidebar.types.d.ts +21 -23
  96. package/dist/components/skeleton/index.d.ts +1 -2
  97. package/dist/components/skeleton/skeleton.js +12 -1
  98. package/dist/components/skeleton/skeleton.js.map +1 -1
  99. package/dist/components/skeleton/skeleton.types.d.ts +2 -0
  100. package/dist/components/spinner/index.d.ts +1 -1
  101. package/dist/components/spinner/spinner.js +6 -3
  102. package/dist/components/spinner/spinner.js.map +1 -1
  103. package/dist/components/spinner/spinner.types.d.ts +3 -1
  104. package/dist/components/stat/index.d.ts +2 -0
  105. package/dist/components/stat/stat.d.ts +10 -0
  106. package/dist/components/stat/stat.js +52 -0
  107. package/dist/components/stat/stat.js.map +1 -0
  108. package/dist/components/stat/stat.types.d.ts +24 -0
  109. package/dist/components/text/index.d.ts +2 -0
  110. package/dist/components/text/text.d.ts +7 -0
  111. package/dist/components/text/text.js +28 -0
  112. package/dist/components/text/text.js.map +1 -0
  113. package/dist/components/text/text.types.d.ts +26 -0
  114. package/dist/components/theme/theme.js +50 -8
  115. package/dist/components/theme/theme.js.map +1 -1
  116. package/dist/components/toolbar/index.d.ts +2 -0
  117. package/dist/components/toolbar/toolbar.d.ts +7 -0
  118. package/dist/components/toolbar/toolbar.js +30 -0
  119. package/dist/components/toolbar/toolbar.js.map +1 -0
  120. package/dist/components/toolbar/toolbar.types.d.ts +9 -0
  121. package/dist/components.d.ts +60 -0
  122. package/dist/components.js +35 -0
  123. package/dist/controls.d.ts +2 -2
  124. package/dist/controls.js +3 -3
  125. package/dist/core.d.ts +36 -0
  126. package/dist/core.js +19 -0
  127. package/dist/navs.d.ts +3 -15
  128. package/dist/navs.js +2 -8
  129. package/dist/overlays.d.ts +2 -2
  130. package/dist/overlays.js +2 -2
  131. package/dist/surfaces.d.ts +10 -8
  132. package/dist/surfaces.js +6 -4
  133. package/dist/themes/default/index.css +3661 -3945
  134. package/package.json +235 -69
  135. package/src/components/_internal/block-layout.ts +354 -0
  136. package/src/components/alert/alert.tsx +1 -2
  137. package/src/components/alert/alert.types.ts +0 -1
  138. package/src/components/aside/aside.tsx +12 -0
  139. package/src/components/aside/aside.types.ts +3 -0
  140. package/src/components/aside/index.ts +2 -0
  141. package/src/components/aspect-ratio/aspect-ratio.tsx +1 -1
  142. package/src/components/badge/index.ts +0 -1
  143. package/src/components/block/block.a11y.ts +0 -6
  144. package/src/components/block/block.tsx +40 -56
  145. package/src/components/block/block.types.ts +59 -41
  146. package/src/components/block/index.ts +1 -10
  147. package/src/components/brand/brand.tsx +61 -0
  148. package/src/components/brand/brand.types.ts +39 -0
  149. package/src/components/brand/index.ts +2 -0
  150. package/src/components/card/card.tsx +6 -18
  151. package/src/components/card/card.types.ts +9 -11
  152. package/src/components/card/index.ts +2 -3
  153. package/src/components/catalog.tsx +713 -0
  154. package/src/components/container/container.a11y.ts +0 -5
  155. package/src/components/container/container.tsx +18 -128
  156. package/src/components/container/container.types.ts +3 -32
  157. package/src/components/container/index.ts +1 -8
  158. package/src/components/empty-state/empty-state.tsx +17 -35
  159. package/src/components/empty-state/empty-state.types.ts +3 -5
  160. package/src/components/field/field.tsx +3 -1
  161. package/src/components/field/field.types.ts +1 -0
  162. package/src/components/footer/footer.tsx +88 -0
  163. package/src/components/footer/footer.types.ts +40 -0
  164. package/src/components/footer/index.ts +10 -0
  165. package/src/components/grid/grid.tsx +113 -0
  166. package/src/components/grid/grid.types.ts +20 -0
  167. package/src/components/grid/index.ts +2 -0
  168. package/src/components/header/header.tsx +10 -7
  169. package/src/components/header/header.types.ts +4 -4
  170. package/src/components/header/index.ts +1 -2
  171. package/src/components/main/index.ts +2 -0
  172. package/src/components/main/main.tsx +12 -0
  173. package/src/components/main/main.types.ts +3 -0
  174. package/src/components/nav/index.ts +7 -9
  175. package/src/components/nav/nav.tsx +153 -110
  176. package/src/components/nav/nav.types.ts +26 -27
  177. package/src/components/navbar/index.ts +4 -11
  178. package/src/components/navbar/navbar.tsx +103 -265
  179. package/src/components/navbar/navbar.types.ts +16 -42
  180. package/src/components/page/index.ts +2 -0
  181. package/src/components/page/page.tsx +17 -0
  182. package/src/components/page/page.types.ts +3 -0
  183. package/src/components/page-header/index.ts +2 -0
  184. package/src/components/page-header/page-header.tsx +29 -0
  185. package/src/components/page-header/page-header.types.ts +7 -0
  186. package/src/components/section/index.ts +1 -7
  187. package/src/components/section/section.a11y.ts +0 -1
  188. package/src/components/section/section.tsx +9 -35
  189. package/src/components/section/section.types.ts +2 -22
  190. package/src/components/separator/index.ts +4 -9
  191. package/src/components/sidebar/index.ts +27 -5
  192. package/src/components/sidebar/sidebar.tsx +146 -336
  193. package/src/components/sidebar/sidebar.types.ts +21 -28
  194. package/src/components/skeleton/index.ts +1 -2
  195. package/src/components/skeleton/skeleton.tsx +33 -1
  196. package/src/components/skeleton/skeleton.types.ts +2 -0
  197. package/src/components/spinner/index.ts +1 -1
  198. package/src/components/spinner/spinner.tsx +7 -2
  199. package/src/components/spinner/spinner.types.ts +3 -0
  200. package/src/components/stat/index.ts +2 -0
  201. package/src/components/stat/stat.tsx +47 -0
  202. package/src/components/stat/stat.types.ts +24 -0
  203. package/src/components/text/index.ts +2 -0
  204. package/src/components/text/text.tsx +39 -0
  205. package/src/components/text/text.types.ts +35 -0
  206. package/src/components/theme/theme.tsx +83 -9
  207. package/src/components/toolbar/index.ts +2 -0
  208. package/src/components/toolbar/toolbar.tsx +24 -0
  209. package/src/components/toolbar/toolbar.types.ts +6 -0
  210. package/src/components.ts +289 -0
  211. package/src/controls.ts +69 -2
  212. package/src/core.ts +42 -0
  213. package/src/navs.ts +9 -24
  214. package/src/overlays.ts +101 -59
  215. package/src/parity.ts +125 -0
  216. package/src/surfaces.ts +60 -13
  217. package/src/themes/default/index.css +11 -14
  218. package/src/themes/default/styles/actions/button-group.css +6 -6
  219. package/src/themes/default/styles/actions/button.css +98 -60
  220. package/src/themes/default/styles/actions/toggle-group.css +61 -25
  221. package/src/themes/default/styles/base/text.css +87 -0
  222. package/src/themes/default/styles/base/typography.css +24 -117
  223. package/src/themes/default/styles/base/utilities.css +0 -250
  224. package/src/themes/default/styles/disclosure/accordion.css +35 -28
  225. package/src/themes/default/styles/display/alert.css +7 -7
  226. package/src/themes/default/styles/display/badge.css +8 -9
  227. package/src/themes/default/styles/display/card.css +10 -47
  228. package/src/themes/default/styles/display/catalog.css +753 -0
  229. package/src/themes/default/styles/display/coverage.css +30 -305
  230. package/src/themes/default/styles/display/progress-circle.css +2 -0
  231. package/src/themes/default/styles/display/scroll-area.css +29 -24
  232. package/src/themes/default/styles/display/spinner.css +38 -1
  233. package/src/themes/default/styles/display/stat.css +21 -0
  234. package/src/themes/default/styles/display/table.css +37 -12
  235. package/src/themes/default/styles/display/virtual-list.css +24 -13
  236. package/src/themes/default/styles/display/virtual-table.css +58 -36
  237. package/src/themes/default/styles/forms/checkbox.css +12 -21
  238. package/src/themes/default/styles/forms/input-group.css +2 -1
  239. package/src/themes/default/styles/forms/input.css +11 -12
  240. package/src/themes/default/styles/forms/radio-group.css +44 -27
  241. package/src/themes/default/styles/forms/select.css +27 -35
  242. package/src/themes/default/styles/forms/slider.css +61 -47
  243. package/src/themes/default/styles/forms/switch.css +18 -23
  244. package/src/themes/default/styles/forms/textarea.css +12 -12
  245. package/src/themes/default/styles/layout/block.css +96 -12
  246. package/src/themes/default/styles/layout/grid.css +78 -0
  247. package/src/themes/default/styles/layout/layout.css +502 -772
  248. package/src/themes/default/styles/layout/patterns.css +0 -155
  249. package/src/themes/default/styles/navigation/nav.css +104 -154
  250. package/src/themes/default/styles/overlays/alert-dialog.css +2 -2
  251. package/src/themes/default/styles/overlays/dialog.css +76 -22
  252. package/src/themes/default/styles/overlays/dropdown.css +108 -31
  253. package/src/themes/default/styles/overlays/hover-card.css +39 -17
  254. package/src/themes/default/styles/overlays/menubar.css +223 -0
  255. package/src/themes/default/styles/overlays/popover.css +69 -23
  256. package/src/themes/default/styles/overlays/toast.css +91 -33
  257. package/src/themes/default/styles/overlays/tooltip.css +88 -14
  258. package/src/themes/default/styles/shell/brand.css +48 -0
  259. package/src/themes/default/styles/shell/footer.css +72 -0
  260. package/src/themes/default/styles/shell/header.css +7 -50
  261. package/src/themes/default/styles/shell/navbar.css +226 -454
  262. package/src/themes/default/styles/shell/sidebar.css +243 -829
  263. package/src/themes/default/tokens.css +145 -98
  264. package/templates/theme/index.css +11 -14
  265. package/templates/theme/styles/actions/button-group.css +6 -6
  266. package/templates/theme/styles/actions/button.css +98 -60
  267. package/templates/theme/styles/actions/toggle-group.css +61 -25
  268. package/templates/theme/styles/base/text.css +87 -0
  269. package/templates/theme/styles/base/typography.css +24 -117
  270. package/templates/theme/styles/disclosure/accordion.css +35 -28
  271. package/templates/theme/styles/display/alert.css +7 -7
  272. package/templates/theme/styles/display/badge.css +8 -9
  273. package/templates/theme/styles/display/card.css +10 -47
  274. package/templates/theme/styles/display/catalog.css +753 -0
  275. package/templates/theme/styles/display/coverage.css +30 -305
  276. package/templates/theme/styles/display/scroll-area.css +29 -24
  277. package/templates/theme/styles/display/spinner.css +38 -1
  278. package/templates/theme/styles/display/stat.css +21 -0
  279. package/templates/theme/styles/display/table.css +37 -12
  280. package/templates/theme/styles/display/virtual-list.css +24 -13
  281. package/templates/theme/styles/display/virtual-table.css +58 -36
  282. package/templates/theme/styles/forms/checkbox.css +12 -21
  283. package/templates/theme/styles/forms/input.css +11 -12
  284. package/templates/theme/styles/forms/radio-group.css +44 -27
  285. package/templates/theme/styles/forms/select.css +27 -35
  286. package/templates/theme/styles/forms/slider.css +61 -47
  287. package/templates/theme/styles/forms/switch.css +18 -23
  288. package/templates/theme/styles/forms/textarea.css +12 -12
  289. package/templates/theme/styles/layout/block.css +96 -12
  290. package/templates/theme/styles/layout/grid.css +78 -0
  291. package/templates/theme/styles/layout/layout.css +676 -1
  292. package/templates/theme/styles/layout/patterns.css +0 -155
  293. package/templates/theme/styles/navigation/nav.css +104 -154
  294. package/templates/theme/styles/overlays/alert-dialog.css +2 -2
  295. package/templates/theme/styles/overlays/dialog.css +76 -22
  296. package/templates/theme/styles/overlays/dropdown.css +108 -31
  297. package/templates/theme/styles/overlays/hover-card.css +39 -17
  298. package/templates/theme/styles/overlays/menubar.css +223 -0
  299. package/templates/theme/styles/overlays/popover.css +69 -23
  300. package/templates/theme/styles/overlays/toast.css +80 -33
  301. package/templates/theme/styles/overlays/tooltip.css +88 -14
  302. package/templates/theme/styles/shell/brand.css +48 -0
  303. package/templates/theme/styles/shell/footer.css +72 -0
  304. package/templates/theme/styles/shell/header.css +7 -50
  305. package/templates/theme/styles/shell/navbar.css +226 -454
  306. package/templates/theme/styles/shell/sidebar.css +197 -779
  307. package/templates/theme/tokens.css +145 -98
  308. package/dist/components/_internal/box-layout.js +0 -116
  309. package/dist/components/_internal/box-layout.js.map +0 -1
  310. package/dist/components/_internal/layout.d.ts +0 -9
  311. package/dist/components/_internal/layout.js +0 -142
  312. package/dist/components/_internal/layout.js.map +0 -1
  313. package/dist/components/badge/badge.a11y.d.ts +0 -17
  314. package/dist/components/block/block.a11y.d.ts +0 -20
  315. package/dist/components/box/box.a11y.d.ts +0 -14
  316. package/dist/components/box/box.d.ts +0 -9
  317. package/dist/components/box/box.js +0 -36
  318. package/dist/components/box/box.js.map +0 -1
  319. package/dist/components/box/box.types.d.ts +0 -72
  320. package/dist/components/box/index.d.ts +0 -3
  321. package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +0 -17
  322. package/dist/components/breadcrumb/breadcrumb.a11y.js +0 -15
  323. package/dist/components/breadcrumb/breadcrumb.a11y.js.map +0 -1
  324. package/dist/components/breadcrumb/breadcrumb.d.ts +0 -18
  325. package/dist/components/breadcrumb/breadcrumb.js +0 -113
  326. package/dist/components/breadcrumb/breadcrumb.js.map +0 -1
  327. package/dist/components/breadcrumb/breadcrumb.types.d.ts +0 -65
  328. package/dist/components/breadcrumb/index.d.ts +0 -3
  329. package/dist/components/container/container.a11y.d.ts +0 -19
  330. package/dist/components/flex/flex.a11y.d.ts +0 -22
  331. package/dist/components/flex/flex.d.ts +0 -9
  332. package/dist/components/flex/flex.js +0 -115
  333. package/dist/components/flex/flex.js.map +0 -1
  334. package/dist/components/flex/flex.types.d.ts +0 -42
  335. package/dist/components/flex/index.d.ts +0 -3
  336. package/dist/components/header/header.a11y.d.ts +0 -14
  337. package/dist/components/header/header.a11y.js +0 -12
  338. package/dist/components/header/header.a11y.js.map +0 -1
  339. package/dist/components/inline/index.d.ts +0 -8
  340. package/dist/components/inline/index.js +0 -13
  341. package/dist/components/inline/index.js.map +0 -1
  342. package/dist/components/list-group/index.d.ts +0 -2
  343. package/dist/components/list-group/list-group.d.ts +0 -9
  344. package/dist/components/list-group/list-group.js +0 -43
  345. package/dist/components/list-group/list-group.js.map +0 -1
  346. package/dist/components/list-group/list-group.types.d.ts +0 -32
  347. package/dist/components/navbar/navbar-panel.js +0 -42
  348. package/dist/components/navbar/navbar-panel.js.map +0 -1
  349. package/dist/components/navbar/navbar.context.js +0 -13
  350. package/dist/components/navbar/navbar.context.js.map +0 -1
  351. package/dist/components/navbar/navbar.render.js +0 -26
  352. package/dist/components/navbar/navbar.render.js.map +0 -1
  353. package/dist/components/navbar/navbar.shared.js +0 -18
  354. package/dist/components/navbar/navbar.shared.js.map +0 -1
  355. package/dist/components/pagination/index.d.ts +0 -2
  356. package/dist/components/pagination/pagination.d.ts +0 -11
  357. package/dist/components/pagination/pagination.js +0 -95
  358. package/dist/components/pagination/pagination.js.map +0 -1
  359. package/dist/components/pagination/pagination.types.d.ts +0 -40
  360. package/dist/components/section/section.a11y.d.ts +0 -15
  361. package/dist/components/separator/separator.a11y.d.ts +0 -17
  362. package/dist/components/separator/separator.a11y.js +0 -15
  363. package/dist/components/separator/separator.a11y.js.map +0 -1
  364. package/dist/components/shell/index.d.ts +0 -3
  365. package/dist/components/shell/shell-nav.types.d.ts +0 -7
  366. package/dist/components/shell/shell-panel.js +0 -54
  367. package/dist/components/shell/shell-panel.js.map +0 -1
  368. package/dist/components/shell/shell-responsive.js +0 -141
  369. package/dist/components/shell/shell-responsive.js.map +0 -1
  370. package/dist/components/shell/shell.a11y.d.ts +0 -23
  371. package/dist/components/shell/shell.a11y.js +0 -23
  372. package/dist/components/shell/shell.a11y.js.map +0 -1
  373. package/dist/components/shell/shell.d.ts +0 -13
  374. package/dist/components/shell/shell.js +0 -69
  375. package/dist/components/shell/shell.js.map +0 -1
  376. package/dist/components/shell/shell.types.d.ts +0 -58
  377. package/dist/components/sidebar/sidebar-panel.d.ts +0 -7
  378. package/dist/components/sidebar/sidebar-panel.js +0 -49
  379. package/dist/components/sidebar/sidebar-panel.js.map +0 -1
  380. package/dist/components/sidebar/sidebar-toggle.d.ts +0 -7
  381. package/dist/components/sidebar/sidebar-toggle.js +0 -8
  382. package/dist/components/sidebar/sidebar-toggle.js.map +0 -1
  383. package/dist/components/sidebar/sidebar.context.js +0 -21
  384. package/dist/components/sidebar/sidebar.context.js.map +0 -1
  385. package/dist/components/sidebar/sidebar.shared.js +0 -12
  386. package/dist/components/sidebar/sidebar.shared.js.map +0 -1
  387. package/dist/components/skeleton/skeleton.a11y.d.ts +0 -16
  388. package/dist/components/spacer/index.d.ts +0 -3
  389. package/dist/components/spacer/spacer.a11y.d.ts +0 -17
  390. package/dist/components/spacer/spacer.d.ts +0 -8
  391. package/dist/components/spacer/spacer.js +0 -49
  392. package/dist/components/spacer/spacer.js.map +0 -1
  393. package/dist/components/spacer/spacer.types.d.ts +0 -26
  394. package/dist/components/stack/index.d.ts +0 -3
  395. package/dist/components/stack/stack.a11y.d.ts +0 -18
  396. package/dist/components/stack/stack.d.ts +0 -8
  397. package/dist/components/stack/stack.js +0 -16
  398. package/dist/components/stack/stack.js.map +0 -1
  399. package/dist/components/stack/stack.types.d.ts +0 -22
  400. package/dist/feedback.d.ts +0 -5
  401. package/dist/feedback.js +0 -4
  402. package/dist/layouts.d.ts +0 -25
  403. package/dist/layouts.js +0 -11
  404. package/dist/shells.d.ts +0 -16
  405. package/dist/shells.js +0 -11
  406. package/src/components/_internal/box-layout.ts +0 -164
  407. package/src/components/_internal/layout.ts +0 -202
  408. package/src/components/box/box.a11y.ts +0 -11
  409. package/src/components/box/box.tsx +0 -38
  410. package/src/components/box/box.types.ts +0 -76
  411. package/src/components/box/index.ts +0 -11
  412. package/src/components/breadcrumb/breadcrumb.a11y.ts +0 -15
  413. package/src/components/breadcrumb/breadcrumb.tsx +0 -123
  414. package/src/components/breadcrumb/breadcrumb.types.ts +0 -74
  415. package/src/components/breadcrumb/index.ts +0 -24
  416. package/src/components/flex/flex.a11y.ts +0 -19
  417. package/src/components/flex/flex.tsx +0 -162
  418. package/src/components/flex/flex.types.ts +0 -51
  419. package/src/components/flex/index.ts +0 -16
  420. package/src/components/inline/index.tsx +0 -28
  421. package/src/components/list-group/index.ts +0 -7
  422. package/src/components/list-group/list-group.tsx +0 -74
  423. package/src/components/list-group/list-group.types.ts +0 -32
  424. package/src/components/navbar/navbar-panel.tsx +0 -62
  425. package/src/components/navbar/navbar.context.ts +0 -22
  426. package/src/components/navbar/navbar.render.tsx +0 -32
  427. package/src/components/navbar/navbar.shared.ts +0 -21
  428. package/src/components/pagination/index.ts +0 -8
  429. package/src/components/pagination/pagination.tsx +0 -158
  430. package/src/components/pagination/pagination.types.ts +0 -41
  431. package/src/components/shell/index.ts +0 -16
  432. package/src/components/shell/shell-nav.types.ts +0 -3
  433. package/src/components/shell/shell-panel.tsx +0 -85
  434. package/src/components/shell/shell-responsive.tsx +0 -262
  435. package/src/components/shell/shell.a11y.ts +0 -20
  436. package/src/components/shell/shell.tsx +0 -74
  437. package/src/components/shell/shell.types.ts +0 -71
  438. package/src/components/sidebar/sidebar-panel.tsx +0 -67
  439. package/src/components/sidebar/sidebar-toggle.tsx +0 -5
  440. package/src/components/sidebar/sidebar.context.ts +0 -40
  441. package/src/components/sidebar/sidebar.shared.ts +0 -12
  442. package/src/components/spacer/index.ts +0 -9
  443. package/src/components/spacer/spacer.a11y.ts +0 -14
  444. package/src/components/spacer/spacer.tsx +0 -61
  445. package/src/components/spacer/spacer.types.ts +0 -31
  446. package/src/components/stack/index.ts +0 -3
  447. package/src/components/stack/stack.a11y.ts +0 -15
  448. package/src/components/stack/stack.tsx +0 -13
  449. package/src/components/stack/stack.types.ts +0 -22
  450. package/src/feedback.ts +0 -6
  451. package/src/layouts.ts +0 -19
  452. package/src/shells.ts +0 -13
  453. package/src/themes/default/styles/actions/toggle.css +0 -50
  454. package/src/themes/default/styles/disclosure/collapsible.css +0 -58
  455. package/src/themes/default/styles/display/list-group.css +0 -84
  456. package/src/themes/default/styles/forms/form.css +0 -5
  457. package/src/themes/default/styles/layout/responsive-layout.css +0 -230
  458. package/src/themes/default/styles/navigation/breadcrumb.css +0 -45
  459. package/src/themes/default/styles/navigation/menu.css +0 -203
  460. package/src/themes/default/styles/navigation/menubar.css +0 -255
  461. package/src/themes/default/styles/navigation/pagination.css +0 -91
  462. package/src/themes/default/styles/shell/theme.css +0 -37
  463. package/templates/theme/styles/actions/toggle.css +0 -50
  464. package/templates/theme/styles/disclosure/collapsible.css +0 -58
  465. package/templates/theme/styles/display/list-group.css +0 -84
  466. package/templates/theme/styles/forms/form.css +0 -5
  467. package/templates/theme/styles/layout/responsive-layout.css +0 -230
  468. package/templates/theme/styles/navigation/breadcrumb.css +0 -45
  469. package/templates/theme/styles/navigation/menu.css +0 -203
  470. package/templates/theme/styles/navigation/menubar.css +0 -255
  471. package/templates/theme/styles/navigation/pagination.css +0 -91
  472. package/templates/theme/styles/shell/theme.css +0 -37
@@ -1,10 +1,12 @@
1
1
  import { ProgressCircleProps } from "@askrjs/ui";
2
2
 
3
3
  //#region src/components/spinner/spinner.types.d.ts
4
+ type SpinnerSize = "sm" | "md" | "lg";
4
5
  type SpinnerOwnProps = Omit<ProgressCircleProps, "value" | "getValueLabel"> & {
5
6
  label?: string;
7
+ size?: SpinnerSize;
6
8
  };
7
9
  type SpinnerProps = SpinnerOwnProps;
8
10
  //#endregion
9
- export { SpinnerOwnProps, SpinnerProps };
11
+ export { SpinnerOwnProps, SpinnerProps, SpinnerSize };
10
12
  //# sourceMappingURL=spinner.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { StatDescriptionProps, StatLabelProps, StatProps, StatValueProps } from "./stat.types.js";
2
+ import { Stat, StatDescription, StatLabel, StatValue } from "./stat.js";
@@ -0,0 +1,10 @@
1
+ import { StatDescriptionProps, StatLabelProps, StatProps, StatValueProps } from "./stat.types.js";
2
+
3
+ //#region src/components/stat/stat.d.ts
4
+ declare function Stat(props: StatProps): JSX.Element;
5
+ declare function StatLabel(props: StatLabelProps): JSX.Element;
6
+ declare function StatValue(props: StatValueProps): JSX.Element;
7
+ declare function StatDescription(props: StatDescriptionProps): JSX.Element;
8
+ //#endregion
9
+ export { Stat, StatDescription, StatLabel, StatValue };
10
+ //# sourceMappingURL=stat.d.ts.map
@@ -0,0 +1,52 @@
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/stat/stat.tsx
5
+ function Stat(props) {
6
+ const { children, class: className, ref, ...rest } = props;
7
+ return /* @__PURE__ */ jsx("div", {
8
+ ...mergeProps(rest, {
9
+ ref,
10
+ class: classes("stat", className),
11
+ "data-slot": "stat"
12
+ }),
13
+ children
14
+ });
15
+ }
16
+ function StatLabel(props) {
17
+ const { children, class: className, ref, ...rest } = props;
18
+ return /* @__PURE__ */ jsx("p", {
19
+ ...mergeProps(rest, {
20
+ ref,
21
+ class: classes("stat-label", className),
22
+ "data-slot": "stat-label"
23
+ }),
24
+ children
25
+ });
26
+ }
27
+ function StatValue(props) {
28
+ const { children, class: className, ref, ...rest } = props;
29
+ return /* @__PURE__ */ jsx("p", {
30
+ ...mergeProps(rest, {
31
+ ref,
32
+ class: classes("stat-value", className),
33
+ "data-slot": "stat-value"
34
+ }),
35
+ children
36
+ });
37
+ }
38
+ function StatDescription(props) {
39
+ const { children, class: className, ref, ...rest } = props;
40
+ return /* @__PURE__ */ jsx("p", {
41
+ ...mergeProps(rest, {
42
+ ref,
43
+ class: classes("stat-description", className),
44
+ "data-slot": "stat-description"
45
+ }),
46
+ children
47
+ });
48
+ }
49
+ //#endregion
50
+ export { Stat, StatDescription, StatLabel, StatValue };
51
+
52
+ //# sourceMappingURL=stat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat.js","names":[],"sources":["../../../src/components/stat/stat.tsx"],"sourcesContent":["import { classes } from \"../_internal/classes\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { StatDescriptionProps, StatLabelProps, StatProps, StatValueProps } from \"./stat.types\";\n\nexport function Stat(props: StatProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"stat\", className),\n \"data-slot\": \"stat\",\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\nexport function StatLabel(props: StatLabelProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"stat-label\", className),\n \"data-slot\": \"stat-label\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n\nexport function StatValue(props: StatValueProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"stat-value\", className),\n \"data-slot\": \"stat-value\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n\nexport function StatDescription(props: StatDescriptionProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"stat-description\", className),\n \"data-slot\": \"stat-description\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n"],"mappings":";;;;AAIA,SAAgB,KAAK,OAA+B;CAClD,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,OAAD;EAAK,GANO,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,QAAQ,SAAS;GAChC,aAAa;EACf,CAEyB;EAAI;CAAc,CAAA;AAC7C;AAEA,SAAgB,UAAU,OAAoC;CAC5D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,KAAD;EAAG,GANS,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,cAAc,SAAS;GACtC,aAAa;EACf,CAEuB;EAAI;CAAY,CAAA;AACzC;AAEA,SAAgB,UAAU,OAAoC;CAC5D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,KAAD;EAAG,GANS,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,cAAc,SAAS;GACtC,aAAa;EACf,CAEuB;EAAI;CAAY,CAAA;AACzC;AAEA,SAAgB,gBAAgB,OAA0C;CACxE,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,KAAD;EAAG,GANS,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,oBAAoB,SAAS;GAC5C,aAAa;EACf,CAEuB;EAAI;CAAY,CAAA;AACzC"}
@@ -0,0 +1,24 @@
1
+ import { Ref } from "@askrjs/askr/foundations/utilities";
2
+
3
+ //#region src/components/stat/stat.types.d.ts
4
+ type DivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref">;
5
+ type ParagraphProps = Omit<JSX.IntrinsicElements["p"], "children" | "ref">;
6
+ type StatProps = DivProps & {
7
+ children?: unknown;
8
+ ref?: Ref<HTMLDivElement>;
9
+ };
10
+ type StatLabelProps = ParagraphProps & {
11
+ children?: unknown;
12
+ ref?: Ref<HTMLParagraphElement>;
13
+ };
14
+ type StatValueProps = ParagraphProps & {
15
+ children?: unknown;
16
+ ref?: Ref<HTMLParagraphElement>;
17
+ };
18
+ type StatDescriptionProps = ParagraphProps & {
19
+ children?: unknown;
20
+ ref?: Ref<HTMLParagraphElement>;
21
+ };
22
+ //#endregion
23
+ export { StatDescriptionProps, StatLabelProps, StatProps, StatValueProps };
24
+ //# sourceMappingURL=stat.types.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { TextElement, TextFont, TextNumeric, TextProps, TextSize, TextTone, TextWeight, TextWrap } from "./text.types.js";
2
+ import { Text } from "./text.js";
@@ -0,0 +1,7 @@
1
+ import { TextElement, TextProps } from "./text.types.js";
2
+
3
+ //#region src/components/text/text.d.ts
4
+ declare function Text<TElement extends TextElement = "p">(props: TextProps<TElement>): JSX.Element;
5
+ //#endregion
6
+ export { Text };
7
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1,28 @@
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/text/text.tsx
5
+ const DEFAULT_ELEMENT = "p";
6
+ function Text(props) {
7
+ const { as, size = "md", tone = "default", weight, font, numeric, wrap, truncate, children, class: classProp, className, ref, ...rest } = props;
8
+ const finalProps = mergeProps(rest, {
9
+ ref,
10
+ class: classes("text", classProp, className),
11
+ "data-slot": "text",
12
+ "data-size": size,
13
+ "data-tone": tone,
14
+ "data-weight": weight,
15
+ "data-font": font && font !== "body" ? font : void 0,
16
+ "data-numeric": numeric && numeric !== "normal" ? numeric : void 0,
17
+ "data-wrap": wrap,
18
+ "data-truncate": truncate ? "true" : void 0
19
+ });
20
+ return /* @__PURE__ */ jsx(as ?? DEFAULT_ELEMENT, {
21
+ ...finalProps,
22
+ children
23
+ });
24
+ }
25
+ //#endregion
26
+ export { Text };
27
+
28
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","names":[],"sources":["../../../src/components/text/text.tsx"],"sourcesContent":["import { classes } from \"../_internal/classes\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { TextElement, TextProps } from \"./text.types\";\n\nconst DEFAULT_ELEMENT = \"p\";\n\nexport function Text<TElement extends TextElement = \"p\">(props: TextProps<TElement>): JSX.Element {\n const {\n as,\n size = \"md\",\n tone = \"default\",\n weight,\n font,\n numeric,\n wrap,\n truncate,\n children,\n class: classProp,\n className,\n ref,\n ...rest\n } = props as TextProps<TextElement> & { class?: unknown; className?: unknown };\n\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"text\", classProp, className),\n \"data-slot\": \"text\",\n \"data-size\": size,\n \"data-tone\": tone,\n \"data-weight\": weight,\n \"data-font\": font && font !== \"body\" ? font : undefined,\n \"data-numeric\": numeric && numeric !== \"normal\" ? numeric : undefined,\n \"data-wrap\": wrap,\n \"data-truncate\": truncate ? \"true\" : undefined,\n });\n\n const Element = (as ?? DEFAULT_ELEMENT) as keyof JSX.IntrinsicElements;\n return <Element {...finalProps}>{children}</Element>;\n}\n"],"mappings":";;;;AAIA,MAAM,kBAAkB;AAExB,SAAgB,KAAyC,OAAyC;CAChG,MAAM,EACJ,IACA,OAAO,MACP,OAAO,WACP,QACA,MACA,SACA,MACA,UACA,UACA,OAAO,WACP,WACA,KACA,GAAG,SACD;CAEJ,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,OAAO,QAAQ,QAAQ,WAAW,SAAS;EAC3C,aAAa;EACb,aAAa;EACb,aAAa;EACb,eAAe;EACf,aAAa,QAAQ,SAAS,SAAS,OAAO,KAAA;EAC9C,gBAAgB,WAAW,YAAY,WAAW,UAAU,KAAA;EAC5D,aAAa;EACb,iBAAiB,WAAW,SAAS,KAAA;CACvC,CAAC;CAGD,OAAO,oBADU,MAAM,iBAChB;EAAS,GAAI;EAAa;CAAkB,CAAA;AACrD"}
@@ -0,0 +1,26 @@
1
+ import { Ref } from "@askrjs/askr/foundations/utilities";
2
+
3
+ //#region src/components/text/text.types.d.ts
4
+ type TextElement = "p" | "span" | "div" | "strong";
5
+ type TextSize = "sm" | "md" | "lg";
6
+ type TextTone = "default" | "muted" | "subtle" | "inverse" | "success" | "warning" | "danger" | "info";
7
+ type TextWeight = "normal" | "medium" | "semibold" | "bold";
8
+ type TextFont = "body" | "mono";
9
+ type TextNumeric = "normal" | "tabular";
10
+ type TextWrap = "normal" | "nowrap" | "anywhere";
11
+ type TextIntrinsicProps<TElement extends TextElement> = Omit<JSX.IntrinsicElements[TElement], "children" | "ref">;
12
+ type TextProps<TElement extends TextElement = "p"> = TextIntrinsicProps<TElement> & {
13
+ as?: TElement;
14
+ size?: TextSize;
15
+ tone?: TextTone;
16
+ weight?: TextWeight;
17
+ font?: TextFont;
18
+ numeric?: TextNumeric;
19
+ wrap?: TextWrap;
20
+ truncate?: boolean;
21
+ children?: unknown;
22
+ ref?: Ref<HTMLElement>;
23
+ };
24
+ //#endregion
25
+ export { TextElement, TextFont, TextNumeric, TextProps, TextSize, TextTone, TextWeight, TextWrap };
26
+ //# sourceMappingURL=text.types.d.ts.map
@@ -47,6 +47,8 @@ const CAT_THEME_OPTIONS = [
47
47
  }
48
48
  ];
49
49
  const DEFAULT_STORAGE_KEY = "askr-theme";
50
+ const STATIC_CHILDREN = Symbol.for("askr.static-children");
51
+ const STATIC_CHILD_SLOTS_CACHE = Symbol.for("__askrStaticChildSlots");
50
52
  let rootThemeRevision = 0;
51
53
  let explicitRootThemeOwner;
52
54
  const registeredProviderSignals = /* @__PURE__ */ new WeakSet();
@@ -152,7 +154,7 @@ function ThemeToggle(props) {
152
154
  const theme = useTheme();
153
155
  const { children, lightIcon, darkIcon, systemIcon, themes = ["light", "dark"], onPress, ...rest } = props;
154
156
  const currentTheme = theme.theme();
155
- const nextTheme = getNextTheme(currentTheme, themes);
157
+ const nextTheme = getNextTheme(currentTheme, themes, getResolvedSystemTheme());
156
158
  const renderContext = {
157
159
  theme: currentTheme,
158
160
  nextTheme
@@ -162,8 +164,13 @@ function ThemeToggle(props) {
162
164
  lightIcon,
163
165
  darkIcon,
164
166
  systemIcon
165
- }));
166
- const content = typeof children === "function" ? children(renderContext) : children ?? renderedIcon;
167
+ }), currentTheme);
168
+ const renderedIconSlots = renderThemeToggleIconSlots(currentTheme, {
169
+ lightIcon,
170
+ darkIcon,
171
+ systemIcon
172
+ }) ?? renderedIcon;
173
+ const content = typeof children === "function" ? children(renderContext) : children ?? renderedIconSlots;
167
174
  return /* @__PURE__ */ jsx(Button, {
168
175
  ...rest,
169
176
  "aria-label": typeof ariaLabel === "string" ? ariaLabel : `Switch to ${nextTheme} theme`,
@@ -180,11 +187,18 @@ function ThemeToggle(props) {
180
187
  })
181
188
  });
182
189
  }
183
- function getNextTheme(currentTheme, themes) {
190
+ function getNextTheme(currentTheme, themes, resolvedSystemTheme = "light") {
184
191
  if (themes.length === 0) return currentTheme;
185
192
  const index = themes.indexOf(currentTheme);
193
+ if (index < 0 && currentTheme === "system") {
194
+ if (themes.includes("light") && themes.includes("dark")) return resolvedSystemTheme === "dark" ? "light" : "dark";
195
+ }
186
196
  return themes[index >= 0 && index < themes.length - 1 ? index + 1 : 0];
187
197
  }
198
+ function getResolvedSystemTheme() {
199
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return "light";
200
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
201
+ }
188
202
  function getThemeIcon(theme, icons) {
189
203
  if (theme === "light") return icons.lightIcon;
190
204
  if (theme === "dark") return icons.darkIcon;
@@ -193,17 +207,45 @@ function getThemeIcon(theme, icons) {
193
207
  function resolveThemeToggleIcon(theme, nextTheme, icons) {
194
208
  return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);
195
209
  }
210
+ function renderThemeToggleIconSlots(theme, icons) {
211
+ if (getThemeIcon(theme, icons) === void 0) return;
212
+ const availableSlots = [
213
+ ["light", icons.lightIcon],
214
+ ["dark", icons.darkIcon],
215
+ ["system", icons.systemIcon]
216
+ ].filter(([, icon]) => icon !== void 0 && icon !== null);
217
+ if (availableSlots.length <= 1) return;
218
+ return availableSlots.map(([slotTheme, icon]) => /* @__PURE__ */ jsx("span", {
219
+ "data-slot": "theme-toggle-icon",
220
+ "data-theme-toggle-icon": slotTheme,
221
+ hidden: slotTheme === theme ? void 0 : true,
222
+ children: cloneThemeToggleIcon(icon, slotTheme)
223
+ }, slotTheme));
224
+ }
196
225
  function isJSXElement(value) {
197
226
  return typeof value === "object" && value !== null && "$$typeof" in value && "type" in value && "props" in value;
198
227
  }
199
- function cloneThemeToggleIcon(icon) {
228
+ function cloneThemeToggleIcon(icon, key) {
229
+ if (Array.isArray(icon)) {
230
+ const clonedChildren = icon.map((child) => cloneThemeToggleIcon(child));
231
+ if (icon[STATIC_CHILDREN] === true) Object.defineProperty(clonedChildren, STATIC_CHILDREN, {
232
+ value: true,
233
+ configurable: true
234
+ });
235
+ return clonedChildren;
236
+ }
200
237
  if (!isJSXElement(icon)) return icon;
201
238
  const props = icon.props;
202
- if (!props || Object.keys(props).length === 0) return icon;
203
- return {
239
+ const clonedProps = props ? { ...props } : {};
240
+ if ("children" in clonedProps) clonedProps.children = cloneThemeToggleIcon(clonedProps.children);
241
+ const iconKey = icon.key ?? key ?? null;
242
+ const clonedIcon = {
204
243
  ...icon,
205
- props: { ...props }
244
+ key: iconKey,
245
+ props: clonedProps
206
246
  };
247
+ delete clonedIcon[STATIC_CHILD_SLOTS_CACHE];
248
+ return clonedIcon;
207
249
  }
208
250
  function syncThemeRoot(themeChoice, options) {
209
251
  if (typeof document === "undefined") return;
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","names":[],"sources":["../../../src/components/theme/theme.tsx"],"sourcesContent":["import { defineContext, getSignal, readContext, state } from \"@askrjs/askr\";\nimport type { JSXElement } from \"@askrjs/askr/foundations/structures\";\nimport { resource } from \"@askrjs/askr/resources\";\nimport { Button } from \"@askrjs/ui\";\nimport type { ButtonNativeProps, PressEvent } from \"@askrjs/ui\";\n\nexport const CAT_THEME_NAMES = [\"tabby\", \"ginger\", \"tuxedo\", \"calico\", \"torty\"] as const;\n\nexport type CatThemeName = (typeof CAT_THEME_NAMES)[number];\nexport type ThemeName = \"light\" | \"dark\" | \"system\" | CatThemeName | (string & {});\n\nexport type ThemeOption = {\n value: ThemeName;\n label: string;\n};\n\nexport type ThemeContextValue = {\n theme: () => ThemeName;\n setTheme: (theme: ThemeName) => void;\n themes: readonly ThemeOption[];\n storageKey: string;\n};\n\nexport type ThemeProviderProps = {\n children?: unknown;\n defaultTheme?: ThemeName;\n themes?: readonly ThemeOption[];\n storageKey?: string;\n};\n\nexport type ThemePickerProps = Omit<\n JSX.IntrinsicElements[\"select\"],\n \"children\" | \"value\" | \"defaultValue\" | \"onChange\"\n> & {\n themes?: readonly ThemeOption[];\n label?: string;\n};\n\nexport type ThemeToggleRenderContext = {\n theme: ThemeName;\n nextTheme: ThemeName;\n};\n\nexport type ThemeToggleProps = Omit<ButtonNativeProps, \"children\" | \"onPress\"> & {\n children?: unknown | ((context: ThemeToggleRenderContext) => unknown);\n lightIcon?: unknown;\n darkIcon?: unknown;\n systemIcon?: unknown;\n themes?: readonly ThemeName[];\n onPress?: (event: PressEvent) => void;\n};\n\nexport const DEFAULT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"system\", label: \"System\" },\n { value: \"light\", label: \"Light\" },\n { value: \"dark\", label: \"Dark\" },\n];\n\nexport const CAT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"tabby\", label: \"Tabby\" },\n { value: \"ginger\", label: \"Ginger\" },\n { value: \"tuxedo\", label: \"Tuxedo\" },\n { value: \"calico\", label: \"Calico\" },\n { value: \"torty\", label: \"Torty\" },\n];\n\nconst DEFAULT_STORAGE_KEY = \"askr-theme\";\n// Passive mount sync should not overwrite a newer user/provider-initiated change.\nlet rootThemeRevision = 0;\nlet explicitRootThemeOwner: symbol | undefined;\nconst registeredProviderSignals = new WeakSet<AbortSignal>();\n\nconst ThemeContext = defineContext<ThemeContextValue>({\n theme: () => \"system\",\n setTheme: () => undefined,\n themes: DEFAULT_THEME_OPTIONS,\n storageKey: DEFAULT_STORAGE_KEY,\n});\n\nexport function useTheme(): ThemeContextValue {\n return readContext(ThemeContext);\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): JSX.Element {\n const {\n children,\n defaultTheme = \"system\",\n themes = DEFAULT_THEME_OPTIONS,\n storageKey = DEFAULT_STORAGE_KEY,\n } = props;\n\n const providerId = state<symbol>(Symbol(\"ThemeProvider\"))();\n const providerSignal = getSignal();\n const themeState = state<ThemeName>(readStoredTheme(storageKey) ?? defaultTheme);\n const currentTheme = themeState();\n\n if (!registeredProviderSignals.has(providerSignal)) {\n registeredProviderSignals.add(providerSignal);\n providerSignal.addEventListener(\n \"abort\",\n () => {\n if (explicitRootThemeOwner === providerId) {\n explicitRootThemeOwner = undefined;\n }\n },\n { once: true },\n );\n }\n\n const setTheme = (nextTheme: ThemeName) => {\n themeState.set(nextTheme);\n writeStoredTheme(storageKey, nextTheme);\n explicitRootThemeOwner = providerId;\n rootThemeRevision += 1;\n syncThemeRoot(nextTheme);\n };\n\n const value: ThemeContextValue = {\n theme: themeState,\n setTheme,\n themes,\n storageKey,\n };\n\n return (\n <ThemeContext.Scope value={value}>\n <ThemeRootSync providerId={providerId} theme={currentTheme} />\n <div data-slot=\"theme-provider\">{children}</div>\n </ThemeContext.Scope>\n );\n}\n\nfunction ThemeRootSync(props: { providerId: symbol; theme: ThemeName }): JSX.Element | null {\n const { providerId, theme } = props;\n const expectedRootThemeRevision = rootThemeRevision;\n\n resource(\n ({ signal }: { signal: AbortSignal }) => {\n if (typeof window === \"undefined\") {\n syncThemeRoot(theme);\n return null;\n }\n\n const timeoutId = window.setTimeout(() => {\n if (!signal.aborted) {\n syncThemeRoot(theme, {\n expectedRevision: expectedRootThemeRevision,\n passive: true,\n providerId,\n });\n }\n }, 0);\n\n signal.addEventListener(\n \"abort\",\n () => {\n window.clearTimeout(timeoutId);\n },\n { once: true },\n );\n\n return null;\n },\n [theme],\n );\n\n return null;\n}\n\nexport function ThemePicker(props: ThemePickerProps): JSX.Element {\n const theme = useTheme();\n const { themes = theme.themes, label = \"Theme\", ...rest } = props;\n const currentTheme = theme.theme();\n\n return (\n <select\n {...rest}\n aria-label={rest[\"aria-label\"] ?? label}\n data-slot=\"theme-picker\"\n value={currentTheme}\n onChange={(event: Event) => {\n const target = getThemePickerTarget(event);\n if (target) {\n theme.setTheme(target.value as ThemeName);\n }\n }}\n >\n {themes.map((option) => (\n <option key={option.value} value={option.value} selected={option.value === currentTheme}>\n {option.label}\n </option>\n ))}\n </select>\n );\n}\n\nfunction getThemePickerTarget(event: Event): HTMLSelectElement | null {\n if (typeof HTMLSelectElement === \"undefined\") {\n return null;\n }\n\n const path = typeof event.composedPath === \"function\" ? event.composedPath() : [];\n const candidates = [event.target, event.currentTarget, ...path];\n\n for (const candidate of candidates) {\n if (candidate instanceof HTMLSelectElement) {\n return candidate;\n }\n }\n\n return null;\n}\n\nexport function ThemeToggle(props: ThemeToggleProps): JSX.Element {\n const theme = useTheme();\n const {\n children,\n lightIcon,\n darkIcon,\n systemIcon,\n themes = [\"light\", \"dark\"],\n onPress,\n ...rest\n } = props;\n\n const currentTheme = theme.theme();\n const nextTheme = getNextTheme(currentTheme, themes);\n const renderContext = { theme: currentTheme, nextTheme };\n const ariaLabel = (rest as Record<string, unknown>)[\"aria-label\"];\n const themedIcon = resolveThemeToggleIcon(currentTheme, nextTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n });\n const renderedIcon = cloneThemeToggleIcon(themedIcon);\n const content =\n typeof children === \"function\" ? children(renderContext) : (children ?? renderedIcon);\n\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n aria-label={typeof ariaLabel === \"string\" ? ariaLabel : `Switch to ${nextTheme} theme`}\n data-theme-control=\"toggle\"\n data-theme-choice={currentTheme}\n data-next-theme={nextTheme}\n onPress={(event) => {\n onPress?.(event);\n if (!event.defaultPrevented && !Object.is(nextTheme, currentTheme)) {\n theme.setTheme(nextTheme);\n }\n }}\n >\n <span data-slot=\"theme-toggle-content\">{content}</span>\n </Button>\n );\n}\n\nfunction getNextTheme(currentTheme: ThemeName, themes: readonly ThemeName[]): ThemeName {\n if (themes.length === 0) return currentTheme;\n const index = themes.indexOf(currentTheme);\n return themes[index >= 0 && index < themes.length - 1 ? index + 1 : 0]!;\n}\n\nfunction getThemeIcon(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (theme === \"light\") return icons.lightIcon;\n if (theme === \"dark\") return icons.darkIcon;\n if (theme === \"system\") return icons.systemIcon;\n return undefined;\n}\n\nexport function resolveThemeToggleIcon(\n theme: ThemeName,\n nextTheme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);\n}\n\nfunction isJSXElement(value: unknown): value is JSXElement {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$$typeof\" in value &&\n \"type\" in value &&\n \"props\" in value\n );\n}\n\nfunction cloneThemeToggleIcon(icon: unknown): unknown {\n if (!isJSXElement(icon)) return icon;\n\n const props = icon.props as Record<string, unknown> | undefined;\n if (!props || Object.keys(props).length === 0) {\n return icon;\n }\n\n return {\n ...icon,\n props: { ...props },\n };\n}\n\nfunction syncThemeRoot(\n themeChoice: ThemeName | null | undefined,\n options?: { expectedRevision?: number; passive?: boolean; providerId?: symbol },\n): void {\n if (typeof document === \"undefined\") {\n return;\n }\n\n const html = document.documentElement;\n\n if (\n options?.passive &&\n options.expectedRevision !== undefined &&\n options.expectedRevision !== rootThemeRevision\n ) {\n return;\n }\n\n if (\n options?.passive &&\n explicitRootThemeOwner !== undefined &&\n explicitRootThemeOwner !== options.providerId\n ) {\n return;\n }\n\n if (themeChoice == null) {\n html.removeAttribute(\"data-theme\");\n html.removeAttribute(\"data-theme-choice\");\n return;\n }\n\n html.setAttribute(\"data-theme-choice\", themeChoice);\n\n if (themeChoice === \"system\") {\n html.removeAttribute(\"data-theme\");\n } else {\n html.setAttribute(\"data-theme\", themeChoice);\n }\n}\n\nfunction readStoredTheme(storageKey: string): ThemeName | undefined {\n if (typeof window === \"undefined\") return undefined;\n try {\n const storedTheme = window.localStorage.getItem(storageKey);\n return storedTheme ? (storedTheme as ThemeName) : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredTheme(storageKey: string, theme: ThemeName): void {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // Storage can be unavailable in private or locked-down browser contexts.\n }\n}\n"],"mappings":";;;;;AAMA,MAAa,kBAAkB;CAAC;CAAS;CAAU;CAAU;CAAU;AAAO;AA8C9E,MAAa,wBAAgD;CAC3D;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAS,OAAO;CAAQ;CACjC;EAAE,OAAO;EAAQ,OAAO;CAAO;AACjC;AAEA,MAAa,oBAA4C;CACvD;EAAE,OAAO;EAAS,OAAO;CAAQ;CACjC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAS,OAAO;CAAQ;AACnC;AAEA,MAAM,sBAAsB;AAE5B,IAAI,oBAAoB;AACxB,IAAI;AACJ,MAAM,4CAA4B,IAAI,QAAqB;AAE3D,MAAM,eAAe,cAAiC;CACpD,aAAa;CACb,gBAAgB,KAAA;CAChB,QAAQ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KAC3B,2BAA2B,QAAQ,YAEnC;CAGF,IAAI,eAAe,MAAM;EACvB,KAAK,gBAAgB,YAAY;EACjC,KAAK,gBAAgB,mBAAmB;EACxC;CACF;CAEA,KAAK,aAAa,qBAAqB,WAAW;CAElD,IAAI,gBAAgB,UAClB,KAAK,gBAAgB,YAAY;MAEjC,KAAK,aAAa,cAAc,WAAW;AAE/C;AAEA,SAAS,gBAAgB,YAA2C;CAClE,IAAI,OAAO,WAAW,aAAa,OAAO,KAAA;CAC1C,IAAI;EACF,MAAM,cAAc,OAAO,aAAa,QAAQ,UAAU;EAC1D,OAAO,cAAe,cAA4B,KAAA;CACpD,QAAQ;EACN;CACF;AACF;AAEA,SAAS,iBAAiB,YAAoB,OAAwB;CACpE,IAAI,OAAO,WAAW,aAAa;CACnC,IAAI;EACF,OAAO,aAAa,QAAQ,YAAY,KAAK;CAC/C,QAAQ,CAER;AACF"}
1
+ {"version":3,"file":"theme.js","names":[],"sources":["../../../src/components/theme/theme.tsx"],"sourcesContent":["import { defineContext, getSignal, readContext, state } from \"@askrjs/askr\";\nimport type { JSXElement } from \"@askrjs/askr/foundations/structures\";\nimport { resource } from \"@askrjs/askr/resources\";\nimport { Button } from \"@askrjs/ui\";\nimport type { ButtonNativeProps, PressEvent } from \"@askrjs/ui\";\n\nexport const CAT_THEME_NAMES = [\"tabby\", \"ginger\", \"tuxedo\", \"calico\", \"torty\"] as const;\n\nexport type CatThemeName = (typeof CAT_THEME_NAMES)[number];\nexport type ThemeName = \"light\" | \"dark\" | \"system\" | CatThemeName | (string & {});\n\nexport type ThemeOption = {\n value: ThemeName;\n label: string;\n};\n\nexport type ThemeContextValue = {\n theme: () => ThemeName;\n setTheme: (theme: ThemeName) => void;\n themes: readonly ThemeOption[];\n storageKey: string;\n};\n\nexport type ThemeProviderProps = {\n children?: unknown;\n defaultTheme?: ThemeName;\n themes?: readonly ThemeOption[];\n storageKey?: string;\n};\n\nexport type ThemePickerProps = Omit<\n JSX.IntrinsicElements[\"select\"],\n \"children\" | \"value\" | \"defaultValue\" | \"onChange\"\n> & {\n themes?: readonly ThemeOption[];\n label?: string;\n};\n\nexport type ThemeToggleRenderContext = {\n theme: ThemeName;\n nextTheme: ThemeName;\n};\n\nexport type ThemeToggleProps = Omit<ButtonNativeProps, \"children\" | \"onPress\"> & {\n children?: unknown | ((context: ThemeToggleRenderContext) => unknown);\n lightIcon?: unknown;\n darkIcon?: unknown;\n systemIcon?: unknown;\n themes?: readonly ThemeName[];\n onPress?: (event: PressEvent) => void;\n};\n\nexport const DEFAULT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"system\", label: \"System\" },\n { value: \"light\", label: \"Light\" },\n { value: \"dark\", label: \"Dark\" },\n];\n\nexport const CAT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"tabby\", label: \"Tabby\" },\n { value: \"ginger\", label: \"Ginger\" },\n { value: \"tuxedo\", label: \"Tuxedo\" },\n { value: \"calico\", label: \"Calico\" },\n { value: \"torty\", label: \"Torty\" },\n];\n\nconst DEFAULT_STORAGE_KEY = \"askr-theme\";\nconst STATIC_CHILDREN = Symbol.for(\"askr.static-children\");\nconst STATIC_CHILD_SLOTS_CACHE = Symbol.for(\"__askrStaticChildSlots\");\n// Passive mount sync should not overwrite a newer user/provider-initiated change.\nlet rootThemeRevision = 0;\nlet explicitRootThemeOwner: symbol | undefined;\nconst registeredProviderSignals = new WeakSet<AbortSignal>();\n\nconst ThemeContext = defineContext<ThemeContextValue>({\n theme: () => \"system\",\n setTheme: () => undefined,\n themes: DEFAULT_THEME_OPTIONS,\n storageKey: DEFAULT_STORAGE_KEY,\n});\n\nexport function useTheme(): ThemeContextValue {\n return readContext(ThemeContext);\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): JSX.Element {\n const {\n children,\n defaultTheme = \"system\",\n themes = DEFAULT_THEME_OPTIONS,\n storageKey = DEFAULT_STORAGE_KEY,\n } = props;\n\n const providerId = state<symbol>(Symbol(\"ThemeProvider\"))();\n const providerSignal = getSignal();\n const themeState = state<ThemeName>(readStoredTheme(storageKey) ?? defaultTheme);\n const currentTheme = themeState();\n\n if (!registeredProviderSignals.has(providerSignal)) {\n registeredProviderSignals.add(providerSignal);\n providerSignal.addEventListener(\n \"abort\",\n () => {\n if (explicitRootThemeOwner === providerId) {\n explicitRootThemeOwner = undefined;\n }\n },\n { once: true },\n );\n }\n\n const setTheme = (nextTheme: ThemeName) => {\n themeState.set(nextTheme);\n writeStoredTheme(storageKey, nextTheme);\n explicitRootThemeOwner = providerId;\n rootThemeRevision += 1;\n syncThemeRoot(nextTheme);\n };\n\n const value: ThemeContextValue = {\n theme: themeState,\n setTheme,\n themes,\n storageKey,\n };\n\n return (\n <ThemeContext.Scope value={value}>\n <ThemeRootSync providerId={providerId} theme={currentTheme} />\n <div data-slot=\"theme-provider\">{children}</div>\n </ThemeContext.Scope>\n );\n}\n\nfunction ThemeRootSync(props: { providerId: symbol; theme: ThemeName }): JSX.Element | null {\n const { providerId, theme } = props;\n const expectedRootThemeRevision = rootThemeRevision;\n\n resource(\n ({ signal }: { signal: AbortSignal }) => {\n if (typeof window === \"undefined\") {\n syncThemeRoot(theme);\n return null;\n }\n\n const timeoutId = window.setTimeout(() => {\n if (!signal.aborted) {\n syncThemeRoot(theme, {\n expectedRevision: expectedRootThemeRevision,\n passive: true,\n providerId,\n });\n }\n }, 0);\n\n signal.addEventListener(\n \"abort\",\n () => {\n window.clearTimeout(timeoutId);\n },\n { once: true },\n );\n\n return null;\n },\n [theme],\n );\n\n return null;\n}\n\nexport function ThemePicker(props: ThemePickerProps): JSX.Element {\n const theme = useTheme();\n const { themes = theme.themes, label = \"Theme\", ...rest } = props;\n const currentTheme = theme.theme();\n\n return (\n <select\n {...rest}\n aria-label={rest[\"aria-label\"] ?? label}\n data-slot=\"theme-picker\"\n value={currentTheme}\n onChange={(event: Event) => {\n const target = getThemePickerTarget(event);\n if (target) {\n theme.setTheme(target.value as ThemeName);\n }\n }}\n >\n {themes.map((option) => (\n <option key={option.value} value={option.value} selected={option.value === currentTheme}>\n {option.label}\n </option>\n ))}\n </select>\n );\n}\n\nfunction getThemePickerTarget(event: Event): HTMLSelectElement | null {\n if (typeof HTMLSelectElement === \"undefined\") {\n return null;\n }\n\n const path = typeof event.composedPath === \"function\" ? event.composedPath() : [];\n const candidates = [event.target, event.currentTarget, ...path];\n\n for (const candidate of candidates) {\n if (candidate instanceof HTMLSelectElement) {\n return candidate;\n }\n }\n\n return null;\n}\n\nexport function ThemeToggle(props: ThemeToggleProps): JSX.Element {\n const theme = useTheme();\n const {\n children,\n lightIcon,\n darkIcon,\n systemIcon,\n themes = [\"light\", \"dark\"],\n onPress,\n ...rest\n } = props;\n\n const currentTheme = theme.theme();\n const nextTheme = getNextTheme(currentTheme, themes, getResolvedSystemTheme());\n const renderContext = { theme: currentTheme, nextTheme };\n const ariaLabel = (rest as Record<string, unknown>)[\"aria-label\"];\n const themedIcon = resolveThemeToggleIcon(currentTheme, nextTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n });\n const renderedIcon = cloneThemeToggleIcon(themedIcon, currentTheme);\n const renderedIconSlots =\n renderThemeToggleIconSlots(currentTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n }) ?? renderedIcon;\n const content =\n typeof children === \"function\" ? children(renderContext) : (children ?? renderedIconSlots);\n\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n aria-label={typeof ariaLabel === \"string\" ? ariaLabel : `Switch to ${nextTheme} theme`}\n data-theme-control=\"toggle\"\n data-theme-choice={currentTheme}\n data-next-theme={nextTheme}\n onPress={(event) => {\n onPress?.(event);\n if (!event.defaultPrevented && !Object.is(nextTheme, currentTheme)) {\n theme.setTheme(nextTheme);\n }\n }}\n >\n <span data-slot=\"theme-toggle-content\">{content}</span>\n </Button>\n );\n}\n\nfunction getNextTheme(\n currentTheme: ThemeName,\n themes: readonly ThemeName[],\n resolvedSystemTheme: \"light\" | \"dark\" = \"light\",\n): ThemeName {\n if (themes.length === 0) return currentTheme;\n const index = themes.indexOf(currentTheme);\n if (index < 0 && currentTheme === \"system\") {\n if (themes.includes(\"light\") && themes.includes(\"dark\")) {\n return resolvedSystemTheme === \"dark\" ? \"light\" : \"dark\";\n }\n }\n return themes[index >= 0 && index < themes.length - 1 ? index + 1 : 0]!;\n}\n\nfunction getResolvedSystemTheme(): \"light\" | \"dark\" {\n if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") {\n return \"light\";\n }\n\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n}\n\nfunction getThemeIcon(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (theme === \"light\") return icons.lightIcon;\n if (theme === \"dark\") return icons.darkIcon;\n if (theme === \"system\") return icons.systemIcon;\n return undefined;\n}\n\nexport function resolveThemeToggleIcon(\n theme: ThemeName,\n nextTheme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);\n}\n\nfunction renderThemeToggleIconSlots(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (getThemeIcon(theme, icons) === undefined) {\n return undefined;\n }\n\n const slots = [\n [\"light\", icons.lightIcon],\n [\"dark\", icons.darkIcon],\n [\"system\", icons.systemIcon],\n ] as const;\n const availableSlots = slots.filter(([, icon]) => icon !== undefined && icon !== null);\n\n if (availableSlots.length <= 1) {\n return undefined;\n }\n\n return availableSlots.map(([slotTheme, icon]) => (\n <span\n key={slotTheme}\n data-slot=\"theme-toggle-icon\"\n data-theme-toggle-icon={slotTheme}\n hidden={slotTheme === theme ? undefined : true}\n >\n {cloneThemeToggleIcon(icon, slotTheme)}\n </span>\n ));\n}\n\nfunction isJSXElement(value: unknown): value is JSXElement {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$$typeof\" in value &&\n \"type\" in value &&\n \"props\" in value\n );\n}\n\nfunction cloneThemeToggleIcon(icon: unknown, key?: string): unknown {\n if (Array.isArray(icon)) {\n const clonedChildren = icon.map((child) => cloneThemeToggleIcon(child));\n if ((icon as Record<symbol, unknown>)[STATIC_CHILDREN] === true) {\n Object.defineProperty(clonedChildren, STATIC_CHILDREN, {\n value: true,\n configurable: true,\n });\n }\n return clonedChildren;\n }\n\n if (!isJSXElement(icon)) return icon;\n\n const props = icon.props as Record<string, unknown> | undefined;\n const clonedProps = props ? { ...props } : {};\n\n if (\"children\" in clonedProps) {\n clonedProps.children = cloneThemeToggleIcon(clonedProps.children);\n }\n\n const iconKey = (icon.key ?? key ?? null) as string | number | null;\n const clonedIcon = {\n ...icon,\n key: iconKey,\n props: clonedProps,\n };\n\n delete (clonedIcon as Record<symbol, unknown>)[STATIC_CHILD_SLOTS_CACHE];\n return clonedIcon;\n}\n\nfunction syncThemeRoot(\n themeChoice: ThemeName | null | undefined,\n options?: { expectedRevision?: number; passive?: boolean; providerId?: symbol },\n): void {\n if (typeof document === \"undefined\") {\n return;\n }\n\n const html = document.documentElement;\n\n if (\n options?.passive &&\n options.expectedRevision !== undefined &&\n options.expectedRevision !== rootThemeRevision\n ) {\n return;\n }\n\n if (\n options?.passive &&\n explicitRootThemeOwner !== undefined &&\n explicitRootThemeOwner !== options.providerId\n ) {\n return;\n }\n\n if (themeChoice == null) {\n html.removeAttribute(\"data-theme\");\n html.removeAttribute(\"data-theme-choice\");\n return;\n }\n\n html.setAttribute(\"data-theme-choice\", themeChoice);\n\n if (themeChoice === \"system\") {\n html.removeAttribute(\"data-theme\");\n } else {\n html.setAttribute(\"data-theme\", themeChoice);\n }\n}\n\nfunction readStoredTheme(storageKey: string): ThemeName | undefined {\n if (typeof window === \"undefined\") return undefined;\n try {\n const storedTheme = window.localStorage.getItem(storageKey);\n return storedTheme ? (storedTheme as ThemeName) : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredTheme(storageKey: string, theme: ThemeName): void {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // Storage can be unavailable in private or locked-down browser contexts.\n }\n}\n"],"mappings":";;;;;AAMA,MAAa,kBAAkB;CAAC;CAAS;CAAU;CAAU;CAAU;AAAO;AA8C9E,MAAa,wBAAgD;CAC3D;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAS,OAAO;CAAQ;CACjC;EAAE,OAAO;EAAQ,OAAO;CAAO;AACjC;AAEA,MAAa,oBAA4C;CACvD;EAAE,OAAO;EAAS,OAAO;CAAQ;CACjC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAS,OAAO;CAAQ;AACnC;AAEA,MAAM,sBAAsB;AAC5B,MAAM,kBAAkB,OAAO,IAAI,sBAAsB;AACzD,MAAM,2BAA2B,OAAO,IAAI,wBAAwB;AAEpE,IAAI,oBAAoB;AACxB,IAAI;AACJ,MAAM,4CAA4B,IAAI,QAAqB;AAE3D,MAAM,eAAe,cAAiC;CACpD,aAAa;CACb,gBAAgB,KAAA;CAChB,QAAQ;CACR,YAAY;AACd,CAAC;AAED,SAAgB,WAA8B;CAC5C,OAAO,YAAY,YAAY;AACjC;AAEA,SAAgB,cAAc,OAAwC;CACpE,MAAM,EACJ,UACA,eAAe,UACf,SAAS,uBACT,aAAa,wBACX;CAEJ,MAAM,aAAa,MAAc,OAAO,eAAe,CAAC,CAAC,CAAC;CAC1D,MAAM,iBAAiB,UAAU;CACjC,MAAM,aAAa,MAAiB,gBAAgB,UAAU,KAAK,YAAY;CAC/E,MAAM,eAAe,WAAW;CAEhC,IAAI,CAAC,0BAA0B,IAAI,cAAc,GAAG;EAClD,0BAA0B,IAAI,cAAc;EAC5C,eAAe,iBACb,eACM;GACJ,IAAI,2BAA2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Aa,QAAQ,YAAY,KAAK;CAC/C,QAAQ,CAER;AACF"}
@@ -0,0 +1,2 @@
1
+ import { ToolbarProps } from "./toolbar.types.js";
2
+ import { Toolbar } from "./toolbar.js";
@@ -0,0 +1,7 @@
1
+ import { ToolbarProps } from "./toolbar.types.js";
2
+
3
+ //#region src/components/toolbar/toolbar.d.ts
4
+ declare function Toolbar(props: ToolbarProps): JSX.Element;
5
+ //#endregion
6
+ export { Toolbar };
7
+ //# sourceMappingURL=toolbar.d.ts.map
@@ -0,0 +1,30 @@
1
+ import { Block } from "../block/block.js";
2
+ import { jsx, jsxs } from "@askrjs/askr/jsx-runtime";
3
+ //#region src/components/toolbar/toolbar.tsx
4
+ function Toolbar(props) {
5
+ const { title, actions, ...rest } = props;
6
+ return /* @__PURE__ */ jsxs(Block, {
7
+ rowFrom: "md",
8
+ align: {
9
+ base: "start",
10
+ md: "center"
11
+ },
12
+ justify: "between",
13
+ gap: "md",
14
+ ...rest,
15
+ "data-slot": "toolbar",
16
+ children: [/* @__PURE__ */ jsx("h2", {
17
+ "data-slot": "toolbar-title",
18
+ children: title
19
+ }), actions !== void 0 ? /* @__PURE__ */ jsx(Block, {
20
+ direction: "row",
21
+ gap: "sm",
22
+ "data-slot": "toolbar-actions",
23
+ children: actions
24
+ }) : null]
25
+ });
26
+ }
27
+ //#endregion
28
+ export { Toolbar };
29
+
30
+ //# sourceMappingURL=toolbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbar.js","names":[],"sources":["../../../src/components/toolbar/toolbar.tsx"],"sourcesContent":["import { Block } from \"../block\";\nimport type { ToolbarProps } from \"./toolbar.types\";\n\nexport function Toolbar(props: ToolbarProps): JSX.Element {\n const { title, actions, ...rest } = props;\n\n return (\n <Block\n rowFrom=\"md\"\n align={{ base: \"start\", md: \"center\" }}\n justify=\"between\"\n gap=\"md\"\n {...rest}\n data-slot=\"toolbar\"\n >\n <h2 data-slot=\"toolbar-title\">{title}</h2>\n {actions !== undefined ? (\n <Block direction=\"row\" gap=\"sm\" data-slot=\"toolbar-actions\">\n {actions}\n </Block>\n ) : null}\n </Block>\n );\n}\n"],"mappings":";;;AAGA,SAAgB,QAAQ,OAAkC;CACxD,MAAM,EAAE,OAAO,SAAS,GAAG,SAAS;CAEpC,OACE,qBAAC,OAAD;EACE,SAAQ;EACR,OAAO;GAAE,MAAM;GAAS,IAAI;EAAS;EACrC,SAAQ;EACR,KAAI;EACJ,GAAI;EACJ,aAAU;YANZ,CAQE,oBAAC,MAAD;GAAI,aAAU;aAAiB;EAAU,CAAA,GACxC,YAAY,KAAA,IACX,oBAAC,OAAD;GAAO,WAAU;GAAM,KAAI;GAAK,aAAU;aACvC;EACI,CAAA,IACL,IACC;;AAEX"}
@@ -0,0 +1,9 @@
1
+ import { BlockDivProps } from "../block/block.types.js";
2
+ //#region src/components/toolbar/toolbar.types.d.ts
3
+ type ToolbarProps = BlockDivProps & {
4
+ title: unknown;
5
+ actions?: unknown;
6
+ };
7
+ //#endregion
8
+ export { ToolbarProps };
9
+ //# sourceMappingURL=toolbar.types.d.ts.map
@@ -0,0 +1,60 @@
1
+ import { AlertHeadingTag, AlertProps, AlertVariant } from "./components/alert/alert.types.js";
2
+ import { Alert } from "./components/alert/alert.js";
3
+ import { AspectRatioAsChildProps, AspectRatioProps } from "./components/aspect-ratio/aspect-ratio.types.js";
4
+ import { AspectRatio } from "./components/aspect-ratio/aspect-ratio.js";
5
+ import { BadgeAsChildProps, BadgeOwnProps, BadgeProps } from "./components/badge/badge.types.js";
6
+ import { Badge } from "./components/badge/badge.js";
7
+ import { BlockAlign, BlockBackground, BlockDirection, BlockJustify, BlockMargin, BlockRadius, BlockRowFrom, BlockShadow, BlockSize, BlockSpace, BlockZIndex, ResponsiveValue } from "./components/_internal/block-layout.js";
8
+ import { BlockAsChildProps, BlockDivProps, BlockElement, BlockElementProps, BlockNativeProps, BlockOwnProps, BlockProps, BlockSpanProps } from "./components/block/block.types.js";
9
+ import { Block } from "./components/block/block.js";
10
+ import { Brand, BrandLabel, BrandMark } from "./components/brand/brand.js";
11
+ import { ButtonGroupOrientation, ButtonGroupProps } from "./components/button-group/button-group.types.js";
12
+ import { ButtonGroup } from "./components/button-group/button-group.js";
13
+ import { CardActionProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps, CardVariant } from "./components/card/card.types.js";
14
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/card/card.js";
15
+ import { CloseNativeProps, CloseOwnProps } from "./components/close/close.types.js";
16
+ import { Close } from "./components/close/close.js";
17
+ import { ContainerProps } from "./components/container/container.types.js";
18
+ import { Container } from "./components/container/container.js";
19
+ import { EmptyStateHeadingTag, EmptyStateProps } from "./components/empty-state/empty-state.types.js";
20
+ import { EmptyState } from "./components/empty-state/empty-state.js";
21
+ import { FieldErrorProps, FieldHintProps, FieldProps } from "./components/field/field.types.js";
22
+ import { Field, FieldError, FieldHint } from "./components/field/field.js";
23
+ import { FooterContentProps, FooterDescriptionProps, FooterLinkProps, FooterLinksProps, FooterProps, FooterSectionProps, FooterTitleProps } from "./components/footer/footer.types.js";
24
+ import { Footer, FooterContent, FooterDescription, FooterLink, FooterLinks, FooterSection, FooterTitle } from "./components/footer/footer.js";
25
+ import { Grid } from "./components/grid/grid.js";
26
+ import { HeaderProps } from "./components/header/header.types.js";
27
+ import { Header } from "./components/header/header.js";
28
+ import { InputGroupOrientation, InputGroupProps, InputGroupTextAsChildProps, InputGroupTextProps } from "./components/input-group/input-group.types.js";
29
+ import { InputGroup, InputGroupText } from "./components/input-group/input-group.js";
30
+ import { MainProps } from "./components/main/main.types.js";
31
+ import { Main } from "./components/main/main.js";
32
+ import { AsideProps } from "./components/aside/aside.types.js";
33
+ import { Aside } from "./components/aside/aside.js";
34
+ import { DropdownContent } from "./components/overlays/dropdown-content.js";
35
+ import { NavBrandProps, NavDropdownProps, NavGroupProps, NavbarCollapseBreakpoint, NavbarProps } from "./components/navbar/navbar.types.js";
36
+ import { NavBrand, NavDropdown, NavGroup, Navbar } from "./components/navbar/navbar.js";
37
+ import { NavItemAsChildProps, NavItemProps, NavLinkProps, PillProps, PillsAsChildProps, PillsProps, TabProps, TabsAsChildProps, TabsProps } from "./components/nav/nav.types.js";
38
+ import { NavItem, NavLink, Pill, Pills, Tab, Tabs } from "./components/nav/nav.js";
39
+ import { PageProps } from "./components/page/page.types.js";
40
+ import { Page } from "./components/page/page.js";
41
+ import { PageHeaderProps } from "./components/page-header/page-header.types.js";
42
+ import { PageHeader } from "./components/page-header/page-header.js";
43
+ import { SectionProps } from "./components/section/section.types.js";
44
+ import { Section } from "./components/section/section.js";
45
+ import { SeparatorAsChildProps, SeparatorNativeProps, SeparatorOwnProps, SeparatorProps } from "./components/separator/separator.types.js";
46
+ import { Separator } from "./components/separator/separator.js";
47
+ import { SidebarButtonProps, SidebarCollapsible, SidebarPartProps, SidebarProps, SidebarSide, SidebarTooltipSide, SidebarVariant } from "./components/sidebar/sidebar.types.js";
48
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarRail, SidebarTrigger } from "./components/sidebar/sidebar.js";
49
+ import { SkeletonAsChildProps, SkeletonOwnProps, SkeletonProps } from "./components/skeleton/skeleton.types.js";
50
+ import { Skeleton } from "./components/skeleton/skeleton.js";
51
+ import { SpinnerOwnProps, SpinnerProps, SpinnerSize } from "./components/spinner/spinner.types.js";
52
+ import { Spinner } from "./components/spinner/spinner.js";
53
+ import { Stat, StatDescription, StatLabel, StatValue } from "./components/stat/stat.js";
54
+ import { Text } from "./components/text/text.js";
55
+ import { ToolbarProps } from "./components/toolbar/toolbar.types.js";
56
+ import { Toolbar } from "./components/toolbar/toolbar.js";
57
+ import { CAT_THEME_NAMES, CAT_THEME_OPTIONS, CatThemeName, DEFAULT_THEME_OPTIONS, ThemeContextValue, ThemeName, ThemeOption, ThemePicker, ThemePickerProps, ThemeProvider, ThemeProviderProps, ThemeToggle, ThemeToggleProps, ThemeToggleRenderContext, useTheme } from "./components/theme/theme.js";
58
+ import { AlertDescription, AlertTitle, Box, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CatalogComponentProps, Combobox, ComboboxInput, ComboboxList, ComboboxOption, Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DataTable, DatePicker, DatePickerInput, Direction, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FieldContent, FieldDescription, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Inline, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle, Kbd, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ResizableHandle, ResizablePanel, ResizablePanelGroup, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Shell, ShellMain, ShellNav, Sonner, Stack, TabsContent, TabsList, TabsTrigger, Toaster, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyLead, TypographyList, TypographyMuted, TypographyP } from "./components/catalog.js";
59
+ import { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Button, ButtonAsChildElement, ButtonAsChildProps, ButtonNativeProps, ButtonProps, ButtonSize, ButtonVariant, ButtonWidth, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, DebouncedInput, Dialog, Dialog as Drawer, Dialog as Sheet, DialogClose, DialogClose as DrawerClose, DialogClose as SheetClose, DialogContent, DialogContent as DrawerContent, DialogDescription, DialogDescription as DrawerDescription, DialogOverlay, DialogOverlay as DrawerOverlay, DialogOverlay as SheetOverlay, DialogPortal, DialogPortal as DrawerPortal, DialogPortal as SheetPortal, DialogTitle, DialogTitle as DrawerTitle, DialogTrigger, DialogTrigger as DrawerTrigger, DialogTrigger as SheetTrigger, Dropdown, Dropdown as ContextMenu, Dropdown as DropdownMenu, DropdownGroup, DropdownGroup as ContextMenuGroup, DropdownGroup as DropdownMenuGroup, DropdownItem, DropdownItem as ContextMenuItem, DropdownItem as DropdownMenuItem, DropdownItemVariant, DropdownLabel, DropdownLabel as ContextMenuLabel, DropdownLabel as DropdownMenuLabel, DropdownPortal, DropdownPortal as ContextMenuPortal, DropdownPortal as DropdownMenuPortal, DropdownSeparator, DropdownSeparator as ContextMenuSeparator, DropdownSeparator as DropdownMenuSeparator, DropdownTrigger, DropdownTrigger as ContextMenuTrigger, DropdownTrigger as DropdownMenuTrigger, DropdownTriggerSize, DropdownTriggerVariant, Form, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, Input, Label, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Popover, PopoverClose, PopoverContent, PopoverContentWidth, PopoverPortal, PopoverTrigger, Progress, ProgressCircle, ProgressCircleIndicator, ProgressIndicator, RadioGroup, RadioGroupItem, ScrollArea, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectItemText, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectTriggerSize, SelectValue, Slider, SliderRange, SliderThumb, SliderTrack, Switch, Table, TableBody, TableCaption, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipPortal, TooltipTrigger, VirtualList, VirtualListApi, VirtualListAsChildProps, VirtualListProps, VirtualListRowComponent, VirtualListRowComponentProps, VirtualListRowElement, VirtualListState, VirtualListViewport, VirtualTable, VirtualTableApi, VirtualTableAsChildProps, VirtualTableCellComponent, VirtualTableCellComponentProps, VirtualTableCellElement, VirtualTableColumn, VirtualTableProps, VirtualTableState, VirtualTableViewport, VirtualTableWidth, VisuallyHidden } from "@askrjs/ui";
60
+ export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertHeadingTag, type AlertProps, AlertTitle, type AlertVariant, Aside, type AsideProps, AspectRatio, type AspectRatioAsChildProps, type AspectRatioProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeAsChildProps, type BadgeOwnProps, type BadgeProps, Block, type BlockAlign, type BlockAsChildProps, type BlockBackground, type BlockDirection, type BlockDivProps, type BlockElement, type BlockElementProps, type BlockJustify, type BlockMargin, type BlockNativeProps, type BlockOwnProps, type BlockProps, type BlockRadius, type ResponsiveValue as BlockResponsiveValue, type BlockRowFrom, type BlockShadow, type BlockSize, type BlockSpace, type BlockSpanProps, type BlockZIndex, Box, Brand, BrandLabel, BrandMark, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonAsChildElement, type ButtonAsChildProps, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonNativeProps, type ButtonProps, type ButtonSize, type ButtonVariant, type ButtonWidth, CAT_THEME_NAMES, CAT_THEME_OPTIONS, Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type CardVariant, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CatThemeName, CatalogComponentProps, Checkbox, Close, type CloseNativeProps, type CloseOwnProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxInput, ComboboxList, ComboboxOption, Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Container, type ContainerProps, ContextMenu, DropdownContent as ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DEFAULT_THEME_OPTIONS, DataTable, DatePicker, DatePickerInput, DebouncedInput, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Direction, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, DropdownContent, DropdownGroup, DropdownItem, type DropdownItemVariant, DropdownLabel, DropdownMenu, DropdownContent as DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, DropdownPortal, DropdownSeparator, DropdownTrigger, type DropdownTriggerSize, type DropdownTriggerVariant, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateHeadingTag, type EmptyStateProps, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, type FieldErrorProps, FieldGroup, FieldHint, type FieldHintProps, FieldLabel, FieldLegend, type FieldProps, FieldSeparator, FieldSet, FieldTitle, Footer, FooterContent, type FooterContentProps, FooterDescription, type FooterDescriptionProps, FooterLink, type FooterLinkProps, FooterLinks, type FooterLinksProps, type FooterProps, FooterSection, type FooterSectionProps, FooterTitle, type FooterTitleProps, Form, Grid, Header, type HeaderProps, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, Inline, Input, InputGroup, type InputGroupOrientation, type InputGroupProps, InputGroupText, type InputGroupTextAsChildProps, type InputGroupTextProps, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle, Kbd, Label, Main, type MainProps, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, Navbar as Nav, NavBrand, type NavBrandProps, NavDropdown, type NavDropdownProps, NavGroup, type NavGroupProps, NavItem, type NavItemAsChildProps, type NavItemProps, NavLink, type NavLinkProps, Navbar, type NavbarCollapseBreakpoint, type NavbarProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Page, PageHeader, type PageHeaderProps, type PageProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Pill, type PillProps, Pills, type PillsAsChildProps, type PillsProps, Popover, PopoverClose, PopoverContent, type PopoverContentWidth, PopoverPortal, PopoverTrigger, Progress, ProgressCircle, ProgressCircleIndicator, ProgressIndicator, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, Section, type SectionProps, Select, SelectContent, SelectGroup, SelectItem, SelectItemText, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, type SelectTriggerSize, SelectValue, Separator, type SeparatorAsChildProps, type SeparatorNativeProps, type SeparatorOwnProps, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shell, ShellMain, ShellNav, Sidebar, type SidebarButtonProps, type SidebarCollapsible, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, type SidebarPartProps, type SidebarProps, SidebarProvider, SidebarRail, type SidebarSide, type SidebarTooltipSide, SidebarTrigger, type SidebarVariant, Skeleton, type SkeletonAsChildProps, type SkeletonOwnProps, type SkeletonProps, Slider, SliderRange, SliderThumb, SliderTrack, Sonner, Spinner, type SpinnerOwnProps, type SpinnerProps, type SpinnerSize, Stack, Stat, StatDescription, StatLabel, StatValue, Switch, Tab, type TabProps, Table, TableBody, TableCaption, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, type TabsAsChildProps, TabsContent, TabsList, type TabsProps, TabsTrigger, Text, Textarea, type ThemeContextValue, type ThemeName, type ThemeOption, ThemePicker, type ThemePickerProps, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, type ThemeToggleRenderContext, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipPortal, TooltipTrigger, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyLead, TypographyList, TypographyMuted, TypographyP, VirtualList, type VirtualListApi, type VirtualListAsChildProps, type VirtualListProps, type VirtualListRowComponent, type VirtualListRowComponentProps, type VirtualListRowElement, type VirtualListState, type VirtualListViewport, VirtualTable, type VirtualTableApi, type VirtualTableAsChildProps, type VirtualTableCellComponent, type VirtualTableCellComponentProps, type VirtualTableCellElement, type VirtualTableColumn, type VirtualTableProps, type VirtualTableState, type VirtualTableViewport, type VirtualTableWidth, VisuallyHidden, useTheme };
@@ -0,0 +1,35 @@
1
+ /* empty css */
2
+ import { Close } from "./components/close/close.js";
3
+ import { Alert } from "./components/alert/alert.js";
4
+ import { AspectRatio } from "./components/aspect-ratio/aspect-ratio.js";
5
+ import { Badge } from "./components/badge/badge.js";
6
+ import { Block } from "./components/block/block.js";
7
+ import { Brand, BrandLabel, BrandMark } from "./components/brand/brand.js";
8
+ import { ButtonGroup } from "./components/button-group/button-group.js";
9
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/card/card.js";
10
+ import { Container } from "./components/container/container.js";
11
+ import { EmptyState } from "./components/empty-state/empty-state.js";
12
+ import { Field, FieldError, FieldHint } from "./components/field/field.js";
13
+ import { Footer, FooterContent, FooterDescription, FooterLink, FooterLinks, FooterSection, FooterTitle } from "./components/footer/footer.js";
14
+ import { Grid } from "./components/grid/grid.js";
15
+ import { Header } from "./components/header/header.js";
16
+ import { InputGroup, InputGroupText } from "./components/input-group/input-group.js";
17
+ import { Main } from "./components/main/main.js";
18
+ import { Aside } from "./components/aside/aside.js";
19
+ import { DropdownContent } from "./components/overlays/dropdown-content.js";
20
+ import { NavBrand, NavDropdown, NavGroup, Navbar } from "./components/navbar/navbar.js";
21
+ import { NavItem, NavLink, Pill, Pills, Tab, Tabs } from "./components/nav/nav.js";
22
+ import { Page } from "./components/page/page.js";
23
+ import { PageHeader } from "./components/page-header/page-header.js";
24
+ import { Section } from "./components/section/section.js";
25
+ import { Separator } from "./components/separator/separator.js";
26
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarRail, SidebarTrigger } from "./components/sidebar/sidebar.js";
27
+ import { Skeleton } from "./components/skeleton/skeleton.js";
28
+ import { Spinner } from "./components/spinner/spinner.js";
29
+ import { Stat, StatDescription, StatLabel, StatValue } from "./components/stat/stat.js";
30
+ import { Text } from "./components/text/text.js";
31
+ import { Toolbar } from "./components/toolbar/toolbar.js";
32
+ import { CAT_THEME_NAMES, CAT_THEME_OPTIONS, DEFAULT_THEME_OPTIONS, ThemePicker, ThemeProvider, ThemeToggle, useTheme } from "./components/theme/theme.js";
33
+ import { AlertDescription, AlertTitle, Box, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Combobox, ComboboxInput, ComboboxList, ComboboxOption, Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DataTable, DatePicker, DatePickerInput, Direction, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FieldContent, FieldDescription, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Inline, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle, Kbd, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ResizableHandle, ResizablePanel, ResizablePanelGroup, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Shell, ShellMain, ShellNav, Sonner, Stack, TabsContent, TabsList, TabsTrigger, Toaster, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyLead, TypographyList, TypographyMuted, TypographyP } from "./components/catalog.js";
34
+ import { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, DebouncedInput, Dialog, Dialog as Drawer, Dialog as Sheet, DialogClose, DialogClose as DrawerClose, DialogClose as SheetClose, DialogContent, DialogContent as DrawerContent, DialogDescription, DialogDescription as DrawerDescription, DialogOverlay, DialogOverlay as DrawerOverlay, DialogOverlay as SheetOverlay, DialogPortal, DialogPortal as DrawerPortal, DialogPortal as SheetPortal, DialogTitle, DialogTitle as DrawerTitle, DialogTrigger, DialogTrigger as DrawerTrigger, DialogTrigger as SheetTrigger, Dropdown, Dropdown as ContextMenu, Dropdown as DropdownMenu, DropdownGroup, DropdownGroup as ContextMenuGroup, DropdownGroup as DropdownMenuGroup, DropdownItem, DropdownItem as ContextMenuItem, DropdownItem as DropdownMenuItem, DropdownLabel, DropdownLabel as ContextMenuLabel, DropdownLabel as DropdownMenuLabel, DropdownPortal, DropdownPortal as ContextMenuPortal, DropdownPortal as DropdownMenuPortal, DropdownSeparator, DropdownSeparator as ContextMenuSeparator, DropdownSeparator as DropdownMenuSeparator, DropdownTrigger, DropdownTrigger as ContextMenuTrigger, DropdownTrigger as DropdownMenuTrigger, Form, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, Input, Label, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Popover, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Progress, ProgressCircle, ProgressCircleIndicator, ProgressIndicator, RadioGroup, RadioGroupItem, ScrollArea, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectItemText, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Slider, SliderRange, SliderThumb, SliderTrack, Switch, Table, TableBody, TableCaption, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipPortal, TooltipTrigger, VirtualList, VirtualTable, VisuallyHidden } from "@askrjs/ui";
35
+ export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Aside, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Block, Box, Brand, BrandLabel, BrandMark, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, CAT_THEME_NAMES, CAT_THEME_OPTIONS, Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Close, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxInput, ComboboxList, ComboboxOption, Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Container, ContextMenu, DropdownContent as ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, DEFAULT_THEME_OPTIONS, DataTable, DatePicker, DatePickerInput, DebouncedInput, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Direction, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, DropdownContent, DropdownGroup, DropdownItem, DropdownLabel, DropdownMenu, DropdownContent as DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, DropdownPortal, DropdownSeparator, DropdownTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldHint, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Footer, FooterContent, FooterDescription, FooterLink, FooterLinks, FooterSection, FooterTitle, Form, Grid, Header, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, Inline, Input, InputGroup, InputGroupText, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle, Kbd, Label, Main, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, Navbar as Nav, NavBrand, NavDropdown, NavGroup, NavItem, NavLink, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Page, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Pill, Pills, Popover, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Progress, ProgressCircle, ProgressCircleIndicator, ProgressIndicator, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, Section, Select, SelectContent, SelectGroup, SelectItem, SelectItemText, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shell, ShellMain, ShellNav, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarRail, SidebarTrigger, Skeleton, Slider, SliderRange, SliderThumb, SliderTrack, Sonner, Spinner, Stack, Stat, StatDescription, StatLabel, StatValue, Switch, Tab, Table, TableBody, TableCaption, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Textarea, ThemePicker, ThemeProvider, ThemeToggle, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipPortal, TooltipTrigger, Typography, TypographyBlockquote, TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyLead, TypographyList, TypographyMuted, TypographyP, VirtualList, VirtualTable, VisuallyHidden, useTheme };
@@ -6,5 +6,5 @@ import { FieldErrorProps, FieldHintProps, FieldProps } from "./components/field/
6
6
  import { Field, FieldError, FieldHint } from "./components/field/field.js";
7
7
  import { InputGroupOrientation, InputGroupProps, InputGroupTextAsChildProps, InputGroupTextProps } from "./components/input-group/input-group.types.js";
8
8
  import { InputGroup, InputGroupText } from "./components/input-group/input-group.js";
9
- import { Button, ButtonAsChildProps, ButtonNativeProps, ButtonOwnProps, ButtonProps } from "@askrjs/ui";
10
- export { Button, type ButtonAsChildProps, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonNativeProps, type ButtonOwnProps, type ButtonProps, Close, type CloseNativeProps, type CloseOwnProps, Field, FieldError, type FieldErrorProps, FieldHint, type FieldHintProps, type FieldProps, InputGroup, type InputGroupOrientation, type InputGroupProps, InputGroupText, type InputGroupTextAsChildProps, type InputGroupTextProps };
9
+ import { Button, ButtonAsChildProps, ButtonNativeProps, ButtonOwnProps, ButtonProps, Checkbox, CheckboxAsChildProps, CheckboxInputProps, CheckboxOwnProps, CheckboxProps, Input, InputAsChildProps, InputEvent, InputInputProps, InputOwnProps, InputProps, Label, LabelAsChildProps, LabelLabelProps, LabelOwnProps, LabelProps, PressEvent, RadioGroup, RadioGroupItem, RadioGroupItemAsChildProps, RadioGroupItemOwnProps, RadioGroupItemProps, RadioGroupOwnProps, RadioGroupProps, Select, SelectContent, SelectContentAsChildProps, SelectContentOwnProps, SelectContentProps, SelectGroup, SelectGroupAsChildProps, SelectGroupProps, SelectItem, SelectItemAsChildProps, SelectItemOwnProps, SelectItemProps, SelectItemText, SelectItemTextAsChildProps, SelectItemTextProps, SelectLabel, SelectLabelAsChildProps, SelectLabelProps, SelectOwnProps, SelectPortal, SelectPortalProps, SelectProps, SelectSeparator, SelectSeparatorAsChildProps, SelectSeparatorProps, SelectTrigger, SelectTriggerAsChildProps, SelectTriggerProps, SelectValue, SelectValueAsChildProps, SelectValueOwnProps, SelectValueProps, Switch, SwitchAsChildProps, SwitchButtonProps, SwitchOwnProps, SwitchProps, Textarea, TextareaAsChildProps, TextareaElementProps, TextareaOwnProps, TextareaProps } from "@askrjs/ui";
10
+ export { Button, type ButtonAsChildProps, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, type ButtonNativeProps, type ButtonOwnProps, type ButtonProps, Checkbox, type CheckboxAsChildProps, type CheckboxInputProps, type CheckboxOwnProps, type CheckboxProps, Close, type CloseNativeProps, type CloseOwnProps, Field, FieldError, type FieldErrorProps, FieldHint, type FieldHintProps, type FieldProps, Input, type InputAsChildProps, type InputEvent, InputGroup, type InputGroupOrientation, type InputGroupProps, InputGroupText, type InputGroupTextAsChildProps, type InputGroupTextProps, type InputInputProps, type InputOwnProps, type InputProps, Label, type LabelAsChildProps, type LabelLabelProps, type LabelOwnProps, type LabelProps, type PressEvent, RadioGroup, RadioGroupItem, type RadioGroupItemAsChildProps, type RadioGroupItemOwnProps, type RadioGroupItemProps, type RadioGroupOwnProps, type RadioGroupProps, Select, SelectContent, type SelectContentAsChildProps, type SelectContentOwnProps, type SelectContentProps, SelectGroup, type SelectGroupAsChildProps, type SelectGroupProps, SelectItem, type SelectItemAsChildProps, type SelectItemOwnProps, type SelectItemProps, SelectItemText, type SelectItemTextAsChildProps, type SelectItemTextProps, SelectLabel, type SelectLabelAsChildProps, type SelectLabelProps, type SelectOwnProps, SelectPortal, type SelectPortalProps, type SelectProps, SelectSeparator, type SelectSeparatorAsChildProps, type SelectSeparatorProps, SelectTrigger, type SelectTriggerAsChildProps, type SelectTriggerProps, SelectValue, type SelectValueAsChildProps, type SelectValueOwnProps, type SelectValueProps, Switch, type SwitchAsChildProps, type SwitchButtonProps, type SwitchOwnProps, type SwitchProps, Textarea, type TextareaAsChildProps, type TextareaElementProps, type TextareaOwnProps, type TextareaProps };
package/dist/controls.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* empty css */
2
- import { ButtonGroup } from "./components/button-group/button-group.js";
3
2
  import { Close } from "./components/close/close.js";
3
+ import { ButtonGroup } from "./components/button-group/button-group.js";
4
4
  import { Field, FieldError, FieldHint } from "./components/field/field.js";
5
5
  import { InputGroup, InputGroupText } from "./components/input-group/input-group.js";
6
- import { Button } from "@askrjs/ui";
7
- export { Button, ButtonGroup, Close, Field, FieldError, FieldHint, InputGroup, InputGroupText };
6
+ import { Button, Checkbox, Input, Label, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectItemText, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Switch, Textarea } from "@askrjs/ui";
7
+ export { Button, ButtonGroup, Checkbox, Close, Field, FieldError, FieldHint, Input, InputGroup, InputGroupText, Label, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectItemText, SelectLabel, SelectPortal, SelectSeparator, SelectTrigger, SelectValue, Switch, Textarea };