@mostra/kit 0.0.0-placeholder → 0.19.0

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 (298) hide show
  1. package/README.md +42 -1
  2. package/css/kit.css +59 -0
  3. package/css/shadcn.css +638 -0
  4. package/dist/index.d.ts +16 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +18 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/layout.d.ts +60 -0
  9. package/dist/layout.d.ts.map +1 -0
  10. package/dist/layout.js +112 -0
  11. package/dist/layout.js.map +1 -0
  12. package/dist/questionnaire.d.ts +100 -0
  13. package/dist/questionnaire.d.ts.map +1 -0
  14. package/dist/questionnaire.js +632 -0
  15. package/dist/questionnaire.js.map +1 -0
  16. package/package.json +120 -4
  17. package/registry/LICENSE.md +21 -0
  18. package/registry/base/accordion.json +19 -0
  19. package/registry/base/alert-dialog.json +21 -0
  20. package/registry/base/alert.json +18 -0
  21. package/registry/base/aspect-ratio.json +17 -0
  22. package/registry/base/attachment.json +22 -0
  23. package/registry/base/avatar.json +18 -0
  24. package/registry/base/badge.json +19 -0
  25. package/registry/base/breadcrumb.json +19 -0
  26. package/registry/base/bubble.json +19 -0
  27. package/registry/base/button-group.json +22 -0
  28. package/registry/base/button.json +19 -0
  29. package/registry/base/calendar.json +22 -0
  30. package/registry/base/card.json +17 -0
  31. package/registry/base/carousel.json +22 -0
  32. package/registry/base/chart.json +21 -0
  33. package/registry/base/checkbox.json +19 -0
  34. package/registry/base/code-block.json +23 -0
  35. package/registry/base/collapsible.json +17 -0
  36. package/registry/base/combobox.json +23 -0
  37. package/registry/base/command.json +23 -0
  38. package/registry/base/components/mostra/layout.tsx +221 -0
  39. package/registry/base/components/mostra/questionnaire.tsx +1005 -0
  40. package/registry/base/components/ui/accordion.tsx +71 -0
  41. package/registry/base/components/ui/alert-dialog.tsx +187 -0
  42. package/registry/base/components/ui/alert.tsx +75 -0
  43. package/registry/base/components/ui/aspect-ratio.tsx +22 -0
  44. package/registry/base/components/ui/attachment.tsx +207 -0
  45. package/registry/base/components/ui/avatar.tsx +108 -0
  46. package/registry/base/components/ui/badge.tsx +54 -0
  47. package/registry/base/components/ui/breadcrumb.tsx +124 -0
  48. package/registry/base/components/ui/bubble.tsx +127 -0
  49. package/registry/base/components/ui/button-group.tsx +87 -0
  50. package/registry/base/components/ui/button.tsx +57 -0
  51. package/registry/base/components/ui/calendar.tsx +221 -0
  52. package/registry/base/components/ui/card.tsx +102 -0
  53. package/registry/base/components/ui/carousel.tsx +242 -0
  54. package/registry/base/components/ui/chart.tsx +372 -0
  55. package/registry/base/components/ui/checkbox.tsx +28 -0
  56. package/registry/base/components/ui/code-block.tsx +249 -0
  57. package/registry/base/components/ui/collapsible.tsx +21 -0
  58. package/registry/base/components/ui/combobox.tsx +297 -0
  59. package/registry/base/components/ui/command.tsx +196 -0
  60. package/registry/base/components/ui/context-menu.tsx +270 -0
  61. package/registry/base/components/ui/dialog.tsx +160 -0
  62. package/registry/base/components/ui/direction.tsx +6 -0
  63. package/registry/base/components/ui/drawer.tsx +227 -0
  64. package/registry/base/components/ui/dropdown-menu.tsx +267 -0
  65. package/registry/base/components/ui/empty.tsx +103 -0
  66. package/registry/base/components/ui/field.tsx +238 -0
  67. package/registry/base/components/ui/hover-card.tsx +50 -0
  68. package/registry/base/components/ui/input-group.tsx +158 -0
  69. package/registry/base/components/ui/input-otp.tsx +86 -0
  70. package/registry/base/components/ui/input.tsx +19 -0
  71. package/registry/base/components/ui/item.tsx +201 -0
  72. package/registry/base/components/ui/kbd.tsx +26 -0
  73. package/registry/base/components/ui/label.tsx +19 -0
  74. package/registry/base/components/ui/marker.tsx +70 -0
  75. package/registry/base/components/ui/menubar.tsx +280 -0
  76. package/registry/base/components/ui/message-scroller.tsx +131 -0
  77. package/registry/base/components/ui/message.tsx +91 -0
  78. package/registry/base/components/ui/native-select.tsx +60 -0
  79. package/registry/base/components/ui/navigation-menu.tsx +167 -0
  80. package/registry/base/components/ui/pagination.tsx +130 -0
  81. package/registry/base/components/ui/popover.tsx +89 -0
  82. package/registry/base/components/ui/progress.tsx +82 -0
  83. package/registry/base/components/ui/questionnaire.tsx +324 -0
  84. package/registry/base/components/ui/radio-group.tsx +37 -0
  85. package/registry/base/components/ui/resizable.tsx +49 -0
  86. package/registry/base/components/ui/scroll-area.tsx +53 -0
  87. package/registry/base/components/ui/select.tsx +200 -0
  88. package/registry/base/components/ui/separator.tsx +24 -0
  89. package/registry/base/components/ui/sheet.tsx +138 -0
  90. package/registry/base/components/ui/sidebar.tsx +723 -0
  91. package/registry/base/components/ui/skeleton.tsx +13 -0
  92. package/registry/base/components/ui/slider.tsx +51 -0
  93. package/registry/base/components/ui/sonner.tsx +65 -0
  94. package/registry/base/components/ui/spinner.tsx +10 -0
  95. package/registry/base/components/ui/switch.tsx +31 -0
  96. package/registry/base/components/ui/table.tsx +116 -0
  97. package/registry/base/components/ui/tabs.tsx +85 -0
  98. package/registry/base/components/ui/textarea.tsx +17 -0
  99. package/registry/base/components/ui/toast.tsx +234 -0
  100. package/registry/base/components/ui/toggle-group.tsx +89 -0
  101. package/registry/base/components/ui/toggle.tsx +44 -0
  102. package/registry/base/components/ui/tooltip.tsx +65 -0
  103. package/registry/base/components/ui/trace.tsx +162 -0
  104. package/registry/base/context-menu.json +19 -0
  105. package/registry/base/dialog.json +22 -0
  106. package/registry/base/direction.json +17 -0
  107. package/registry/base/drawer.json +18 -0
  108. package/registry/base/dropdown-menu.json +19 -0
  109. package/registry/base/empty.json +18 -0
  110. package/registry/base/field.json +22 -0
  111. package/registry/base/hooks/use-highlighted-code.ts +75 -0
  112. package/registry/base/hooks/use-mobile.ts +19 -0
  113. package/registry/base/hover-card.json +18 -0
  114. package/registry/base/input-group.json +23 -0
  115. package/registry/base/input-otp.json +19 -0
  116. package/registry/base/input.json +18 -0
  117. package/registry/base/item.json +22 -0
  118. package/registry/base/kbd.json +17 -0
  119. package/registry/base/label.json +17 -0
  120. package/registry/base/lib/highlighter.tsx +124 -0
  121. package/registry/base/lib/utils.ts +1 -0
  122. package/registry/base/marker.json +19 -0
  123. package/registry/base/menubar.json +22 -0
  124. package/registry/base/message-scroller.json +22 -0
  125. package/registry/base/message.json +17 -0
  126. package/registry/base/mostra-layout.json +20 -0
  127. package/registry/base/mostra-questionnaire.json +22 -0
  128. package/registry/base/native-select.json +18 -0
  129. package/registry/base/navigation-menu.json +20 -0
  130. package/registry/base/pagination.json +21 -0
  131. package/registry/base/popover.json +18 -0
  132. package/registry/base/progress.json +18 -0
  133. package/registry/base/questionnaire.json +22 -0
  134. package/registry/base/radio-group.json +18 -0
  135. package/registry/base/registry.json +287 -0
  136. package/registry/base/resizable.json +18 -0
  137. package/registry/base/scroll-area.json +18 -0
  138. package/registry/base/select.json +19 -0
  139. package/registry/base/separator.json +18 -0
  140. package/registry/base/sheet.json +22 -0
  141. package/registry/base/sidebar.json +29 -0
  142. package/registry/base/skeleton.json +17 -0
  143. package/registry/base/slider.json +18 -0
  144. package/registry/base/sonner.json +18 -0
  145. package/registry/base/spinner.json +18 -0
  146. package/registry/base/switch.json +18 -0
  147. package/registry/base/table.json +17 -0
  148. package/registry/base/tabs.json +19 -0
  149. package/registry/base/textarea.json +17 -0
  150. package/registry/base/toast.json +22 -0
  151. package/registry/base/toggle-group.json +22 -0
  152. package/registry/base/toggle.json +19 -0
  153. package/registry/base/tooltip.json +18 -0
  154. package/registry/base/trace.json +21 -0
  155. package/registry/base/use-highlighted-code.json +21 -0
  156. package/registry/base/use-mobile.json +14 -0
  157. package/registry/base/utils.json +17 -0
  158. package/registry/radix/accordion.json +19 -0
  159. package/registry/radix/alert-dialog.json +21 -0
  160. package/registry/radix/alert.json +18 -0
  161. package/registry/radix/aspect-ratio.json +17 -0
  162. package/registry/radix/attachment.json +22 -0
  163. package/registry/radix/avatar.json +18 -0
  164. package/registry/radix/badge.json +19 -0
  165. package/registry/radix/breadcrumb.json +19 -0
  166. package/registry/radix/bubble.json +19 -0
  167. package/registry/radix/button-group.json +22 -0
  168. package/registry/radix/button.json +19 -0
  169. package/registry/radix/calendar.json +22 -0
  170. package/registry/radix/card.json +17 -0
  171. package/registry/radix/carousel.json +22 -0
  172. package/registry/radix/chart.json +18 -0
  173. package/registry/radix/checkbox.json +19 -0
  174. package/registry/radix/code-block.json +23 -0
  175. package/registry/radix/collapsible.json +17 -0
  176. package/registry/radix/combobox.json +23 -0
  177. package/registry/radix/command.json +23 -0
  178. package/registry/radix/components/mostra/layout.tsx +221 -0
  179. package/registry/radix/components/mostra/questionnaire.tsx +1005 -0
  180. package/registry/radix/components/ui/accordion.tsx +80 -0
  181. package/registry/radix/components/ui/alert-dialog.tsx +199 -0
  182. package/registry/radix/components/ui/alert.tsx +75 -0
  183. package/registry/radix/components/ui/aspect-ratio.tsx +11 -0
  184. package/registry/radix/components/ui/attachment.tsx +204 -0
  185. package/registry/radix/components/ui/avatar.tsx +111 -0
  186. package/registry/radix/components/ui/badge.tsx +51 -0
  187. package/registry/radix/components/ui/breadcrumb.tsx +121 -0
  188. package/registry/radix/components/ui/bubble.tsx +124 -0
  189. package/registry/radix/components/ui/button-group.tsx +83 -0
  190. package/registry/radix/components/ui/button.tsx +66 -0
  191. package/registry/radix/components/ui/calendar.tsx +222 -0
  192. package/registry/radix/components/ui/card.tsx +102 -0
  193. package/registry/radix/components/ui/carousel.tsx +242 -0
  194. package/registry/radix/components/ui/chart.tsx +372 -0
  195. package/registry/radix/components/ui/checkbox.tsx +32 -0
  196. package/registry/radix/components/ui/code-block.tsx +249 -0
  197. package/registry/radix/components/ui/collapsible.tsx +33 -0
  198. package/registry/radix/components/ui/combobox.tsx +299 -0
  199. package/registry/radix/components/ui/command.tsx +195 -0
  200. package/registry/radix/components/ui/context-menu.tsx +262 -0
  201. package/registry/radix/components/ui/dialog.tsx +168 -0
  202. package/registry/radix/components/ui/direction.tsx +22 -0
  203. package/registry/radix/components/ui/drawer.tsx +133 -0
  204. package/registry/radix/components/ui/dropdown-menu.tsx +268 -0
  205. package/registry/radix/components/ui/empty.tsx +103 -0
  206. package/registry/radix/components/ui/field.tsx +238 -0
  207. package/registry/radix/components/ui/hover-card.tsx +43 -0
  208. package/registry/radix/components/ui/input-group.tsx +156 -0
  209. package/registry/radix/components/ui/input-otp.tsx +86 -0
  210. package/registry/radix/components/ui/input.tsx +18 -0
  211. package/registry/radix/components/ui/item.tsx +196 -0
  212. package/registry/radix/components/ui/kbd.tsx +26 -0
  213. package/registry/radix/components/ui/label.tsx +23 -0
  214. package/registry/radix/components/ui/marker.tsx +68 -0
  215. package/registry/radix/components/ui/menubar.tsx +279 -0
  216. package/registry/radix/components/ui/message-scroller.tsx +131 -0
  217. package/registry/radix/components/ui/message.tsx +91 -0
  218. package/registry/radix/components/ui/native-select.tsx +60 -0
  219. package/registry/radix/components/ui/navigation-menu.tsx +163 -0
  220. package/registry/radix/components/ui/pagination.tsx +129 -0
  221. package/registry/radix/components/ui/popover.tsx +88 -0
  222. package/registry/radix/components/ui/progress.tsx +30 -0
  223. package/registry/radix/components/ui/questionnaire.tsx +324 -0
  224. package/registry/radix/components/ui/radio-group.tsx +43 -0
  225. package/registry/radix/components/ui/resizable.tsx +49 -0
  226. package/registry/radix/components/ui/scroll-area.tsx +54 -0
  227. package/registry/radix/components/ui/select.tsx +191 -0
  228. package/registry/radix/components/ui/separator.tsx +27 -0
  229. package/registry/radix/components/ui/sheet.tsx +147 -0
  230. package/registry/radix/components/ui/sidebar.tsx +702 -0
  231. package/registry/radix/components/ui/skeleton.tsx +13 -0
  232. package/registry/radix/components/ui/slider.tsx +62 -0
  233. package/registry/radix/components/ui/sonner.tsx +65 -0
  234. package/registry/radix/components/ui/spinner.tsx +10 -0
  235. package/registry/radix/components/ui/switch.tsx +32 -0
  236. package/registry/radix/components/ui/table.tsx +116 -0
  237. package/registry/radix/components/ui/tabs.tsx +129 -0
  238. package/registry/radix/components/ui/textarea.tsx +17 -0
  239. package/registry/radix/components/ui/toggle-group.tsx +89 -0
  240. package/registry/radix/components/ui/toggle.tsx +46 -0
  241. package/registry/radix/components/ui/tooltip.tsx +56 -0
  242. package/registry/radix/components/ui/trace.tsx +162 -0
  243. package/registry/radix/context-menu.json +19 -0
  244. package/registry/radix/dialog.json +22 -0
  245. package/registry/radix/direction.json +17 -0
  246. package/registry/radix/drawer.json +18 -0
  247. package/registry/radix/dropdown-menu.json +19 -0
  248. package/registry/radix/empty.json +18 -0
  249. package/registry/radix/field.json +22 -0
  250. package/registry/radix/hooks/use-highlighted-code.ts +75 -0
  251. package/registry/radix/hooks/use-mobile.ts +19 -0
  252. package/registry/radix/hover-card.json +18 -0
  253. package/registry/radix/input-group.json +23 -0
  254. package/registry/radix/input-otp.json +19 -0
  255. package/registry/radix/input.json +17 -0
  256. package/registry/radix/item.json +22 -0
  257. package/registry/radix/kbd.json +17 -0
  258. package/registry/radix/label.json +18 -0
  259. package/registry/radix/lib/highlighter.tsx +124 -0
  260. package/registry/radix/lib/utils.ts +1 -0
  261. package/registry/radix/marker.json +19 -0
  262. package/registry/radix/menubar.json +19 -0
  263. package/registry/radix/message-scroller.json +22 -0
  264. package/registry/radix/message.json +17 -0
  265. package/registry/radix/mostra-layout.json +20 -0
  266. package/registry/radix/mostra-questionnaire.json +22 -0
  267. package/registry/radix/native-select.json +18 -0
  268. package/registry/radix/navigation-menu.json +20 -0
  269. package/registry/radix/pagination.json +21 -0
  270. package/registry/radix/popover.json +18 -0
  271. package/registry/radix/progress.json +18 -0
  272. package/registry/radix/questionnaire.json +22 -0
  273. package/registry/radix/radio-group.json +18 -0
  274. package/registry/radix/registry.json +283 -0
  275. package/registry/radix/resizable.json +18 -0
  276. package/registry/radix/scroll-area.json +18 -0
  277. package/registry/radix/select.json +19 -0
  278. package/registry/radix/separator.json +18 -0
  279. package/registry/radix/sheet.json +22 -0
  280. package/registry/radix/sidebar.json +29 -0
  281. package/registry/radix/skeleton.json +17 -0
  282. package/registry/radix/slider.json +18 -0
  283. package/registry/radix/sonner.json +18 -0
  284. package/registry/radix/spinner.json +18 -0
  285. package/registry/radix/switch.json +18 -0
  286. package/registry/radix/table.json +17 -0
  287. package/registry/radix/tabs.json +19 -0
  288. package/registry/radix/textarea.json +17 -0
  289. package/registry/radix/toggle-group.json +22 -0
  290. package/registry/radix/toggle.json +19 -0
  291. package/registry/radix/tooltip.json +18 -0
  292. package/registry/radix/trace.json +21 -0
  293. package/registry/radix/use-highlighted-code.json +21 -0
  294. package/registry/radix/use-mobile.json +14 -0
  295. package/registry/radix/utils.json +17 -0
  296. package/src/index.ts +15 -0
  297. package/src/layout.tsx +221 -0
  298. package/src/questionnaire.tsx +1005 -0
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "slider",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "cn",
7
+ "radix-ui"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "components/ui/slider.tsx",
12
+ "type": "registry:ui"
13
+ }
14
+ ],
15
+ "mostra": {
16
+ "base": "radix"
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "sonner",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "lucide-react",
7
+ "sonner"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "components/ui/sonner.tsx",
12
+ "type": "registry:ui"
13
+ }
14
+ ],
15
+ "mostra": {
16
+ "base": "radix"
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "spinner",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "cn",
7
+ "lucide-react"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "components/ui/spinner.tsx",
12
+ "type": "registry:ui"
13
+ }
14
+ ],
15
+ "mostra": {
16
+ "base": "radix"
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "switch",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "cn",
7
+ "radix-ui"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "components/ui/switch.tsx",
12
+ "type": "registry:ui"
13
+ }
14
+ ],
15
+ "mostra": {
16
+ "base": "radix"
17
+ }
18
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "table",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "cn"
7
+ ],
8
+ "files": [
9
+ {
10
+ "path": "components/ui/table.tsx",
11
+ "type": "registry:ui"
12
+ }
13
+ ],
14
+ "mostra": {
15
+ "base": "radix"
16
+ }
17
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "tabs",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "class-variance-authority",
7
+ "cn",
8
+ "radix-ui"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "components/ui/tabs.tsx",
13
+ "type": "registry:ui"
14
+ }
15
+ ],
16
+ "mostra": {
17
+ "base": "radix"
18
+ }
19
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "textarea",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "cn"
7
+ ],
8
+ "files": [
9
+ {
10
+ "path": "components/ui/textarea.tsx",
11
+ "type": "registry:ui"
12
+ }
13
+ ],
14
+ "mostra": {
15
+ "base": "radix"
16
+ }
17
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "toggle-group",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "class-variance-authority",
7
+ "cn",
8
+ "radix-ui"
9
+ ],
10
+ "registryDependencies": [
11
+ "toggle"
12
+ ],
13
+ "files": [
14
+ {
15
+ "path": "components/ui/toggle-group.tsx",
16
+ "type": "registry:ui"
17
+ }
18
+ ],
19
+ "mostra": {
20
+ "base": "radix"
21
+ }
22
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "toggle",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "class-variance-authority",
7
+ "cn",
8
+ "radix-ui"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "components/ui/toggle.tsx",
13
+ "type": "registry:ui"
14
+ }
15
+ ],
16
+ "mostra": {
17
+ "base": "radix"
18
+ }
19
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "tooltip",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "cn",
7
+ "radix-ui"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "components/ui/tooltip.tsx",
12
+ "type": "registry:ui"
13
+ }
14
+ ],
15
+ "mostra": {
16
+ "base": "radix"
17
+ }
18
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "trace",
4
+ "type": "registry:ui",
5
+ "dependencies": [
6
+ "cn",
7
+ "lucide-react"
8
+ ],
9
+ "registryDependencies": [
10
+ "collapsible"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/ui/trace.tsx",
15
+ "type": "registry:ui"
16
+ }
17
+ ],
18
+ "mostra": {
19
+ "base": "radix"
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "use-highlighted-code",
4
+ "type": "registry:hook",
5
+ "dependencies": [
6
+ "shiki"
7
+ ],
8
+ "files": [
9
+ {
10
+ "path": "hooks/use-highlighted-code.ts",
11
+ "type": "registry:hook"
12
+ },
13
+ {
14
+ "path": "lib/highlighter.tsx",
15
+ "type": "registry:lib"
16
+ }
17
+ ],
18
+ "mostra": {
19
+ "base": "radix"
20
+ }
21
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "use-mobile",
4
+ "type": "registry:hook",
5
+ "files": [
6
+ {
7
+ "path": "hooks/use-mobile.ts",
8
+ "type": "registry:hook"
9
+ }
10
+ ],
11
+ "mostra": {
12
+ "base": "radix"
13
+ }
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "utils",
4
+ "type": "registry:lib",
5
+ "dependencies": [
6
+ "cn"
7
+ ],
8
+ "files": [
9
+ {
10
+ "path": "lib/utils.ts",
11
+ "type": "registry:lib"
12
+ }
13
+ ],
14
+ "mostra": {
15
+ "base": "radix"
16
+ }
17
+ }
package/src/index.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `@mostra/kit`: Mostra's kit (D26, D27, D181). Its parts are files more than exports: the
3
+ * per-base registry (`registry/base/`, `registry/radix/`) that `@/components/ui/<name>` resolves
4
+ * into when the artifact has no copy of its own, and that `mostra add <name>` copies; Mostra's own
5
+ * modules, `@mostra/kit/questionnaire` and `@mostra/kit/layout`, the same in either base; and
6
+ * `kit.css`, the utilities every theme's stylesheet builds on. Themes are `@mostra/themes`.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+
11
+ /** The kit's own modules, each `@mostra/kit/<name>` and the registry item `mostra-<name>`. */
12
+ export const KIT_MODULES: readonly ["questionnaire", "layout"] = ["questionnaire", "layout"];
13
+
14
+ /** The shadcn bases the kit carries a registry for (D27); `base`, Base UI, is the default (D72). */
15
+ export const KIT_BASES: readonly ["base", "radix"] = ["base", "radix"];
package/src/layout.tsx ADDED
@@ -0,0 +1,221 @@
1
+ /**
2
+ * The page's frame (KT-10's "a beautiful result without design skill"): the page with its title,
3
+ * its sections and a row of figures, each drawn from the theme's tokens (`--page-width`,
4
+ * `--stack-gap`, `--section-*`, `--figure*`), so a page that composes these looks like its theme
5
+ * in every theme, and a theme's change reaches it. Ordinary React on plain elements, the same in
6
+ * either base; every part takes `className`, and `mostra add mostra-layout` copies it into the
7
+ * artifact for editing, where the copy then wins (D68).
8
+ */
9
+
10
+ import { cn } from "cn";
11
+ import type * as React from "react";
12
+
13
+ /* -------------------------------------------------------------------------------------------- */
14
+ /* The page */
15
+
16
+ /** How wide a page's column is. */
17
+ export type PageWidth = "form" | "wide" | "full";
18
+
19
+ /** {@link Page}'s props. */
20
+ export interface PageProps extends Omit<React.ComponentProps<"main">, "title"> {
21
+ /** The page's title: what it is ("Checkout: which layout ships?"). */
22
+ readonly title?: React.ReactNode;
23
+ /** One line under the title: what the page needs, and by when. */
24
+ readonly description?: React.ReactNode;
25
+ /** A small line above the title: who sent it, when it was updated. */
26
+ readonly meta?: React.ReactNode;
27
+ /**
28
+ * Its column: `form` (the theme's measure, for answering and deciding), `wide` (for a dashboard
29
+ * or a table) or `full`. Default `form`.
30
+ */
31
+ readonly width?: PageWidth;
32
+ }
33
+
34
+ const WIDTHS: Readonly<Record<PageWidth, string>> = {
35
+ form: "max-w-(--page-width)",
36
+ wide: "max-w-6xl",
37
+ full: "max-w-none",
38
+ };
39
+
40
+ /** The page: its title and description, then its blocks, spaced as the theme spaces them. */
41
+ export function Page({
42
+ title,
43
+ description,
44
+ meta,
45
+ width = "form",
46
+ className,
47
+ children,
48
+ ...props
49
+ }: PageProps): React.JSX.Element {
50
+ return (
51
+ <main
52
+ data-slot="page"
53
+ className={cn(
54
+ "mx-auto flex w-full flex-col gap-(--stack-gap) px-5 py-(--page-pad) sm:px-8",
55
+ WIDTHS[width],
56
+ className,
57
+ )}
58
+ {...props}
59
+ >
60
+ {(title !== undefined || description !== undefined || meta !== undefined) && (
61
+ <PageHeader title={title} description={description} meta={meta} />
62
+ )}
63
+ {children}
64
+ </main>
65
+ );
66
+ }
67
+
68
+ /** {@link PageHeader}'s props. */
69
+ export interface PageHeaderProps extends Omit<React.ComponentProps<"header">, "title"> {
70
+ readonly title?: React.ReactNode;
71
+ readonly description?: React.ReactNode;
72
+ readonly meta?: React.ReactNode;
73
+ }
74
+
75
+ /** A page's title block, for a page laid out without {@link Page}. */
76
+ export function PageHeader({
77
+ title,
78
+ description,
79
+ meta,
80
+ className,
81
+ children,
82
+ ...props
83
+ }: PageHeaderProps): React.JSX.Element {
84
+ return (
85
+ <header data-slot="page-header" className={cn("flex flex-col gap-3", className)} {...props}>
86
+ {meta !== undefined && <div className="text-sm text-muted-foreground">{meta}</div>}
87
+ {title !== undefined && <h1>{title}</h1>}
88
+ {description !== undefined && (
89
+ <p className="max-w-[60ch] text-[1.0625rem] text-pretty text-muted-foreground">
90
+ {description}
91
+ </p>
92
+ )}
93
+ {children}
94
+ </header>
95
+ );
96
+ }
97
+
98
+ /* -------------------------------------------------------------------------------------------- */
99
+ /* Sections */
100
+
101
+ /** {@link Section}'s props. */
102
+ export interface SectionProps extends Omit<React.ComponentProps<"section">, "title"> {
103
+ /** Its heading. */
104
+ readonly title: React.ReactNode;
105
+ /** A line under the heading. */
106
+ readonly description?: React.ReactNode;
107
+ /** Its number, for sections that are steps in order. */
108
+ readonly index?: number;
109
+ }
110
+
111
+ /** One block of a page under its heading, as the theme marks sections (a rule, a panel). */
112
+ export function Section({
113
+ title,
114
+ description,
115
+ index,
116
+ className,
117
+ children,
118
+ ...props
119
+ }: SectionProps): React.JSX.Element {
120
+ return (
121
+ <section
122
+ data-slot="section"
123
+ className={cn(
124
+ "flex flex-col gap-8 rounded-(--section-radius) bg-(--section-bg) p-(--section-pad) shadow-(--section-shadow) [border-top:var(--section-rule)]",
125
+ className,
126
+ )}
127
+ {...props}
128
+ >
129
+ <header className="flex flex-col gap-1.5">
130
+ <h2 className="flex items-center gap-[0.6em]">
131
+ {index !== undefined && (
132
+ <span
133
+ data-slot="section-index"
134
+ aria-hidden
135
+ className="grid size-(--section-index-size) shrink-0 place-items-center rounded-full bg-(--section-index-bg) text-[0.8em] text-(--section-index-color) tabular-nums"
136
+ >
137
+ {index}
138
+ </span>
139
+ )}
140
+ <span>{title}</span>
141
+ </h2>
142
+ {description !== undefined && (
143
+ <p className="max-w-prose text-pretty text-muted-foreground">{description}</p>
144
+ )}
145
+ </header>
146
+ {children}
147
+ </section>
148
+ );
149
+ }
150
+
151
+ /* -------------------------------------------------------------------------------------------- */
152
+ /* Figures */
153
+
154
+ /** {@link Figures}' props. */
155
+ export type FiguresProps = React.ComponentProps<"div">;
156
+
157
+ /** A row of figures: two to a row on a phone, all of them in one row from 40rem. */
158
+ export function Figures({ className, children, ...props }: FiguresProps): React.JSX.Element {
159
+ return (
160
+ <div
161
+ data-slot="figures"
162
+ className={cn(
163
+ "grid grid-cols-2 gap-(--figures-gap) divide-(--figures-divider) overflow-hidden rounded-card bg-(--figures-bg) shadow-(--figures-shadow) sm:auto-cols-fr sm:grid-flow-col sm:grid-cols-none sm:divide-x",
164
+ className,
165
+ )}
166
+ {...props}
167
+ >
168
+ {children}
169
+ </div>
170
+ );
171
+ }
172
+
173
+ /** How a figure's change reads: better, worse, or only different. */
174
+ export type FigureTone = "good" | "bad" | "neutral";
175
+
176
+ /** {@link Figure}'s props. */
177
+ export interface FigureProps extends React.ComponentProps<"div"> {
178
+ /** What it measures ("Signups"). */
179
+ readonly label: React.ReactNode;
180
+ /** The number, formatted ("642", "€84,210"). */
181
+ readonly value: React.ReactNode;
182
+ /** Its change against a named baseline ("+5.1% vs last week"). */
183
+ readonly change?: React.ReactNode;
184
+ /** Whether the change is good, bad or neither: said in colour beside the words. Default `neutral`. */
185
+ readonly tone?: FigureTone;
186
+ }
187
+
188
+ const TONES: Readonly<Record<FigureTone, string>> = {
189
+ good: "text-success",
190
+ bad: "text-destructive",
191
+ neutral: "text-muted-foreground",
192
+ };
193
+
194
+ /** One figure: its label above its value, and its change. */
195
+ export function Figure({
196
+ label,
197
+ value,
198
+ change,
199
+ tone = "neutral",
200
+ className,
201
+ ...props
202
+ }: FigureProps): React.JSX.Element {
203
+ return (
204
+ <div
205
+ data-slot="figure"
206
+ className={cn(
207
+ "flex flex-col gap-1.5 rounded-(--figure-radius) bg-(--figure-bg) p-(--figure-pad)",
208
+ className,
209
+ )}
210
+ {...props}
211
+ >
212
+ <span className="text-sm text-muted-foreground">{label}</span>
213
+ <span className="font-(family-name:--figure-font) text-[2rem] leading-none font-(--figure-weight) tracking-tight tabular-nums">
214
+ {value}
215
+ </span>
216
+ {change !== undefined && (
217
+ <span className={cn("text-sm tabular-nums", TONES[tone])}>{change}</span>
218
+ )}
219
+ </div>
220
+ );
221
+ }