@eslamdevui/ui 3.2.0-beta.1

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 (442) hide show
  1. package/.nuxt/ui/accordion.ts +20 -0
  2. package/.nuxt/ui/alert.ts +264 -0
  3. package/.nuxt/ui/avatar-group.ts +52 -0
  4. package/.nuxt/ui/avatar.ts +54 -0
  5. package/.nuxt/ui/badge.ts +263 -0
  6. package/.nuxt/ui/breadcrumb.ts +45 -0
  7. package/.nuxt/ui/button-group.ts +16 -0
  8. package/.nuxt/ui/button.ts +378 -0
  9. package/.nuxt/ui/calendar.ts +103 -0
  10. package/.nuxt/ui/card.ts +34 -0
  11. package/.nuxt/ui/carousel.ts +38 -0
  12. package/.nuxt/ui/chat-message.ts +129 -0
  13. package/.nuxt/ui/chat-messages.ts +14 -0
  14. package/.nuxt/ui/chat-prompt-submit.ts +5 -0
  15. package/.nuxt/ui/chat-prompt.ts +35 -0
  16. package/.nuxt/ui/checkbox-group.ts +204 -0
  17. package/.nuxt/ui/checkbox.ts +236 -0
  18. package/.nuxt/ui/chip.ts +96 -0
  19. package/.nuxt/ui/collapsible.ts +6 -0
  20. package/.nuxt/ui/color-picker.ts +47 -0
  21. package/.nuxt/ui/command-palette.ts +51 -0
  22. package/.nuxt/ui/container.ts +3 -0
  23. package/.nuxt/ui/content-navigation.ts +339 -0
  24. package/.nuxt/ui/content-search-button.ts +6 -0
  25. package/.nuxt/ui/content-search.ts +6 -0
  26. package/.nuxt/ui/content-surround.ts +34 -0
  27. package/.nuxt/ui/content-toc.ts +150 -0
  28. package/.nuxt/ui/context-menu.ts +217 -0
  29. package/.nuxt/ui/dashboard-group.ts +3 -0
  30. package/.nuxt/ui/dashboard-navbar.ts +21 -0
  31. package/.nuxt/ui/dashboard-panel.ts +17 -0
  32. package/.nuxt/ui/dashboard-resize-handle.ts +3 -0
  33. package/.nuxt/ui/dashboard-search-button.ts +6 -0
  34. package/.nuxt/ui/dashboard-search.ts +6 -0
  35. package/.nuxt/ui/dashboard-sidebar-collapse.ts +9 -0
  36. package/.nuxt/ui/dashboard-sidebar-toggle.ts +9 -0
  37. package/.nuxt/ui/dashboard-sidebar.ts +37 -0
  38. package/.nuxt/ui/drawer.ts +126 -0
  39. package/.nuxt/ui/dropdown-menu.ts +218 -0
  40. package/.nuxt/ui/form-field.ts +48 -0
  41. package/.nuxt/ui/form.ts +3 -0
  42. package/.nuxt/ui/index.ts +71 -0
  43. package/.nuxt/ui/input-menu.ts +450 -0
  44. package/.nuxt/ui/input-number.ts +245 -0
  45. package/.nuxt/ui/input-tags.ts +310 -0
  46. package/.nuxt/ui/input.ts +289 -0
  47. package/.nuxt/ui/kbd.ts +31 -0
  48. package/.nuxt/ui/link.ts +22 -0
  49. package/.nuxt/ui/modal.ts +29 -0
  50. package/.nuxt/ui/navigation-menu.ts +510 -0
  51. package/.nuxt/ui/pagination.ts +13 -0
  52. package/.nuxt/ui/pin-input.ts +171 -0
  53. package/.nuxt/ui/popover.ts +6 -0
  54. package/.nuxt/ui/progress.ts +297 -0
  55. package/.nuxt/ui/prose.ts +321 -0
  56. package/.nuxt/ui/radio-group.ts +350 -0
  57. package/.nuxt/ui/select-menu.ts +351 -0
  58. package/.nuxt/ui/select.ts +346 -0
  59. package/.nuxt/ui/separator.ts +172 -0
  60. package/.nuxt/ui/skeleton.ts +3 -0
  61. package/.nuxt/ui/slideover.ts +71 -0
  62. package/.nuxt/ui/slider.ts +171 -0
  63. package/.nuxt/ui/stepper.ts +202 -0
  64. package/.nuxt/ui/switch.ts +131 -0
  65. package/.nuxt/ui/table.ts +148 -0
  66. package/.nuxt/ui/tabs.ts +256 -0
  67. package/.nuxt/ui/textarea.ts +294 -0
  68. package/.nuxt/ui/timeline.ts +321 -0
  69. package/.nuxt/ui/toast.ts +81 -0
  70. package/.nuxt/ui/toaster.ts +91 -0
  71. package/.nuxt/ui/tooltip.ts +9 -0
  72. package/.nuxt/ui/tree.ts +154 -0
  73. package/.nuxt/ui.css +146 -0
  74. package/LICENSE.md +9 -0
  75. package/README.md +147 -0
  76. package/cli/commands/make/component.mjs +95 -0
  77. package/cli/commands/make/index.mjs +14 -0
  78. package/cli/commands/make/locale.mjs +64 -0
  79. package/cli/index.mjs +15 -0
  80. package/cli/package.json +13 -0
  81. package/cli/templates.mjs +228 -0
  82. package/cli/utils.mjs +31 -0
  83. package/dist/module.d.mts +63 -0
  84. package/dist/module.json +13 -0
  85. package/dist/module.mjs +135 -0
  86. package/dist/runtime/components/Accordion.vue +73 -0
  87. package/dist/runtime/components/Accordion.vue.d.ts +77 -0
  88. package/dist/runtime/components/Alert.vue +88 -0
  89. package/dist/runtime/components/Alert.vue.d.ts +81 -0
  90. package/dist/runtime/components/App.vue +44 -0
  91. package/dist/runtime/components/App.vue.d.ts +24 -0
  92. package/dist/runtime/components/Avatar.vue +83 -0
  93. package/dist/runtime/components/Avatar.vue.d.ts +41 -0
  94. package/dist/runtime/components/AvatarGroup.vue +65 -0
  95. package/dist/runtime/components/AvatarGroup.vue.d.ts +31 -0
  96. package/dist/runtime/components/Badge.vue +60 -0
  97. package/dist/runtime/components/Badge.vue.d.ts +43 -0
  98. package/dist/runtime/components/Breadcrumb.vue +65 -0
  99. package/dist/runtime/components/Breadcrumb.vue.d.ts +66 -0
  100. package/dist/runtime/components/Button.vue +147 -0
  101. package/dist/runtime/components/Button.vue.d.ts +48 -0
  102. package/dist/runtime/components/ButtonGroup.vue +31 -0
  103. package/dist/runtime/components/ButtonGroup.vue.d.ts +34 -0
  104. package/dist/runtime/components/Calendar.vue +154 -0
  105. package/dist/runtime/components/Calendar.vue.d.ts +111 -0
  106. package/dist/runtime/components/Card.vue +37 -0
  107. package/dist/runtime/components/Card.vue.d.ts +29 -0
  108. package/dist/runtime/components/Carousel.vue +210 -0
  109. package/dist/runtime/components/Carousel.vue.d.ts +127 -0
  110. package/dist/runtime/components/ChatMessage.vue +87 -0
  111. package/dist/runtime/components/ChatMessage.vue.d.ts +130 -0
  112. package/dist/runtime/components/ChatMessages.vue +225 -0
  113. package/dist/runtime/components/ChatMessages.vue.d.ts +83 -0
  114. package/dist/runtime/components/ChatPrompt.vue +77 -0
  115. package/dist/runtime/components/ChatPrompt.vue.d.ts +60 -0
  116. package/dist/runtime/components/ChatPromptSubmit.vue +74 -0
  117. package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +99 -0
  118. package/dist/runtime/components/Checkbox.vue +90 -0
  119. package/dist/runtime/components/Checkbox.vue.d.ts +73 -0
  120. package/dist/runtime/components/CheckboxGroup.vue +124 -0
  121. package/dist/runtime/components/CheckboxGroup.vue.d.ts +84 -0
  122. package/dist/runtime/components/Chip.vue +48 -0
  123. package/dist/runtime/components/Chip.vue.d.ts +57 -0
  124. package/dist/runtime/components/Collapsible.vue +37 -0
  125. package/dist/runtime/components/Collapsible.vue.d.ts +35 -0
  126. package/dist/runtime/components/ColorPicker.vue +216 -0
  127. package/dist/runtime/components/ColorPicker.vue.d.ts +48 -0
  128. package/dist/runtime/components/CommandPalette.vue +275 -0
  129. package/dist/runtime/components/CommandPalette.vue.d.ts +187 -0
  130. package/dist/runtime/components/Container.vue +23 -0
  131. package/dist/runtime/components/Container.vue.d.ts +18 -0
  132. package/dist/runtime/components/ContextMenu.vue +61 -0
  133. package/dist/runtime/components/ContextMenu.vue.d.ts +109 -0
  134. package/dist/runtime/components/ContextMenuContent.vue +164 -0
  135. package/dist/runtime/components/ContextMenuContent.vue.d.ts +49 -0
  136. package/dist/runtime/components/DashboardGroup.vue +46 -0
  137. package/dist/runtime/components/DashboardGroup.vue.d.ts +27 -0
  138. package/dist/runtime/components/DashboardNavbar.vue +74 -0
  139. package/dist/runtime/components/DashboardNavbar.vue.d.ts +53 -0
  140. package/dist/runtime/components/DashboardPanel.vue +56 -0
  141. package/dist/runtime/components/DashboardPanel.vue.d.ts +28 -0
  142. package/dist/runtime/components/DashboardResizeHandle.vue +32 -0
  143. package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +22 -0
  144. package/dist/runtime/components/DashboardSearch.vue +124 -0
  145. package/dist/runtime/components/DashboardSearch.vue.d.ts +48 -0
  146. package/dist/runtime/components/DashboardSearchButton.vue +72 -0
  147. package/dist/runtime/components/DashboardSearchButton.vue.d.ts +52 -0
  148. package/dist/runtime/components/DashboardSidebar.vue +170 -0
  149. package/dist/runtime/components/DashboardSidebar.vue.d.ts +72 -0
  150. package/dist/runtime/components/DashboardSidebarCollapse.vue +46 -0
  151. package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +15 -0
  152. package/dist/runtime/components/DashboardSidebarToggle.vue +43 -0
  153. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +19 -0
  154. package/dist/runtime/components/Drawer.vue +112 -0
  155. package/dist/runtime/components/Drawer.vue.d.ts +78 -0
  156. package/dist/runtime/components/DropdownMenu.vue +68 -0
  157. package/dist/runtime/components/DropdownMenu.vue.d.ts +119 -0
  158. package/dist/runtime/components/DropdownMenuContent.vue +171 -0
  159. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +52 -0
  160. package/dist/runtime/components/Form.vue +210 -0
  161. package/dist/runtime/components/Form.vue.d.ts +70 -0
  162. package/dist/runtime/components/FormField.vue +90 -0
  163. package/dist/runtime/components/FormField.vue.d.ts +61 -0
  164. package/dist/runtime/components/Icon.vue +19 -0
  165. package/dist/runtime/components/Icon.vue.d.ts +8 -0
  166. package/dist/runtime/components/Input.vue +147 -0
  167. package/dist/runtime/components/Input.vue.d.ts +77 -0
  168. package/dist/runtime/components/InputMenu.vue +373 -0
  169. package/dist/runtime/components/InputMenu.vue.d.ts +534 -0
  170. package/dist/runtime/components/InputNumber.vue +144 -0
  171. package/dist/runtime/components/InputNumber.vue.d.ts +260 -0
  172. package/dist/runtime/components/InputTags.vue +159 -0
  173. package/dist/runtime/components/InputTags.vue.d.ts +183 -0
  174. package/dist/runtime/components/Kbd.vue +30 -0
  175. package/dist/runtime/components/Kbd.vue.d.ts +34 -0
  176. package/dist/runtime/components/Link.vue +127 -0
  177. package/dist/runtime/components/Link.vue.d.ts +93 -0
  178. package/dist/runtime/components/LinkBase.vue +57 -0
  179. package/dist/runtime/components/LinkBase.vue.d.ts +25 -0
  180. package/dist/runtime/components/Modal.vue +130 -0
  181. package/dist/runtime/components/Modal.vue.d.ts +106 -0
  182. package/dist/runtime/components/NavigationMenu.vue +275 -0
  183. package/dist/runtime/components/NavigationMenu.vue.d.ts +170 -0
  184. package/dist/runtime/components/OverlayProvider.vue +25 -0
  185. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  186. package/dist/runtime/components/Pagination.vue +97 -0
  187. package/dist/runtime/components/Pagination.vue.d.ts +118 -0
  188. package/dist/runtime/components/PinInput.vue +94 -0
  189. package/dist/runtime/components/PinInput.vue.d.ts +60 -0
  190. package/dist/runtime/components/Popover.vue +73 -0
  191. package/dist/runtime/components/Popover.vue.d.ts +64 -0
  192. package/dist/runtime/components/Progress.vue +132 -0
  193. package/dist/runtime/components/Progress.vue.d.ts +66 -0
  194. package/dist/runtime/components/RadioGroup.vue +133 -0
  195. package/dist/runtime/components/RadioGroup.vue.d.ts +93 -0
  196. package/dist/runtime/components/Select.vue +225 -0
  197. package/dist/runtime/components/Select.vue.d.ts +253 -0
  198. package/dist/runtime/components/SelectMenu.vue +328 -0
  199. package/dist/runtime/components/SelectMenu.vue.d.ts +302 -0
  200. package/dist/runtime/components/Separator.vue +53 -0
  201. package/dist/runtime/components/Separator.vue.d.ts +54 -0
  202. package/dist/runtime/components/Skeleton.vue +29 -0
  203. package/dist/runtime/components/Skeleton.vue.d.ts +17 -0
  204. package/dist/runtime/components/Slideover.vue +137 -0
  205. package/dist/runtime/components/Slideover.vue.d.ts +107 -0
  206. package/dist/runtime/components/Slider.vue +94 -0
  207. package/dist/runtime/components/Slider.vue.d.ts +58 -0
  208. package/dist/runtime/components/Stepper.vue +116 -0
  209. package/dist/runtime/components/Stepper.vue.d.ts +85 -0
  210. package/dist/runtime/components/Switch.vue +89 -0
  211. package/dist/runtime/components/Switch.vue.d.ts +70 -0
  212. package/dist/runtime/components/Table.vue +286 -0
  213. package/dist/runtime/components/Table.vue.d.ts +185 -0
  214. package/dist/runtime/components/Tabs.vue +84 -0
  215. package/dist/runtime/components/Tabs.vue.d.ts +93 -0
  216. package/dist/runtime/components/Textarea.vue +169 -0
  217. package/dist/runtime/components/Textarea.vue.d.ts +78 -0
  218. package/dist/runtime/components/Timeline.vue +92 -0
  219. package/dist/runtime/components/Timeline.vue.d.ts +70 -0
  220. package/dist/runtime/components/Toast.vue +129 -0
  221. package/dist/runtime/components/Toast.vue.d.ts +163 -0
  222. package/dist/runtime/components/Toaster.vue +111 -0
  223. package/dist/runtime/components/Toaster.vue.d.ts +44 -0
  224. package/dist/runtime/components/Tooltip.vue +62 -0
  225. package/dist/runtime/components/Tooltip.vue.d.ts +50 -0
  226. package/dist/runtime/components/Tree.vue +121 -0
  227. package/dist/runtime/components/Tree.vue.d.ts +113 -0
  228. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +16 -0
  229. package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +7 -0
  230. package/dist/runtime/components/color-mode/ColorModeButton.vue +45 -0
  231. package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +24 -0
  232. package/dist/runtime/components/color-mode/ColorModeImage.vue +17 -0
  233. package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +6 -0
  234. package/dist/runtime/components/color-mode/ColorModeSelect.vue +49 -0
  235. package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +7 -0
  236. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +44 -0
  237. package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +7 -0
  238. package/dist/runtime/components/locale/LocaleSelect.vue +61 -0
  239. package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +16 -0
  240. package/dist/runtime/composables/color-mode/useColorMode.d.ts +3 -0
  241. package/dist/runtime/composables/color-mode/useColorMode.js +5 -0
  242. package/dist/runtime/composables/defineLocale.d.ts +11 -0
  243. package/dist/runtime/composables/defineLocale.js +9 -0
  244. package/dist/runtime/composables/defineShortcuts.d.ts +15 -0
  245. package/dist/runtime/composables/defineShortcuts.js +141 -0
  246. package/dist/runtime/composables/useAvatarGroup.d.ts +10 -0
  247. package/dist/runtime/composables/useAvatarGroup.js +10 -0
  248. package/dist/runtime/composables/useButtonGroup.d.ts +15 -0
  249. package/dist/runtime/composables/useButtonGroup.js +9 -0
  250. package/dist/runtime/composables/useComponentIcons.d.ts +39 -0
  251. package/dist/runtime/composables/useComponentIcons.js +26 -0
  252. package/dist/runtime/composables/useContentSearch.d.ts +6 -0
  253. package/dist/runtime/composables/useContentSearch.js +9 -0
  254. package/dist/runtime/composables/useFormField.d.ts +42 -0
  255. package/dist/runtime/composables/useFormField.js +66 -0
  256. package/dist/runtime/composables/useKbd.d.ts +36 -0
  257. package/dist/runtime/composables/useKbd.js +53 -0
  258. package/dist/runtime/composables/useLocale.d.ts +4 -0
  259. package/dist/runtime/composables/useLocale.js +10 -0
  260. package/dist/runtime/composables/useLocalePro.d.ts +3 -0
  261. package/dist/runtime/composables/useLocalePro.js +11 -0
  262. package/dist/runtime/composables/useOverlay.d.ts +38 -0
  263. package/dist/runtime/composables/useOverlay.js +85 -0
  264. package/dist/runtime/composables/usePortal.d.ts +6 -0
  265. package/dist/runtime/composables/usePortal.js +17 -0
  266. package/dist/runtime/composables/useResizable.d.ts +27 -0
  267. package/dist/runtime/composables/useResizable.js +173 -0
  268. package/dist/runtime/composables/useScrollspy.d.ts +6 -0
  269. package/dist/runtime/composables/useScrollspy.js +38 -0
  270. package/dist/runtime/composables/useToast.d.ts +13 -0
  271. package/dist/runtime/composables/useToast.js +62 -0
  272. package/dist/runtime/index.css +1 -0
  273. package/dist/runtime/inertia/components/Link.vue +132 -0
  274. package/dist/runtime/inertia/components/Link.vue.d.ts +63 -0
  275. package/dist/runtime/inertia/components/LinkBase.vue +68 -0
  276. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
  277. package/dist/runtime/inertia/stubs.d.ts +43 -0
  278. package/dist/runtime/inertia/stubs.js +82 -0
  279. package/dist/runtime/keyframes.css +1 -0
  280. package/dist/runtime/locale/ar.d.ts +3 -0
  281. package/dist/runtime/locale/ar.js +56 -0
  282. package/dist/runtime/locale/az.d.ts +3 -0
  283. package/dist/runtime/locale/az.js +55 -0
  284. package/dist/runtime/locale/bg.d.ts +3 -0
  285. package/dist/runtime/locale/bg.js +55 -0
  286. package/dist/runtime/locale/bn.d.ts +3 -0
  287. package/dist/runtime/locale/bn.js +55 -0
  288. package/dist/runtime/locale/ca.d.ts +3 -0
  289. package/dist/runtime/locale/ca.js +55 -0
  290. package/dist/runtime/locale/ckb.d.ts +3 -0
  291. package/dist/runtime/locale/ckb.js +56 -0
  292. package/dist/runtime/locale/cs.d.ts +3 -0
  293. package/dist/runtime/locale/cs.js +55 -0
  294. package/dist/runtime/locale/da.d.ts +3 -0
  295. package/dist/runtime/locale/da.js +55 -0
  296. package/dist/runtime/locale/de.d.ts +3 -0
  297. package/dist/runtime/locale/de.js +55 -0
  298. package/dist/runtime/locale/el.d.ts +3 -0
  299. package/dist/runtime/locale/el.js +55 -0
  300. package/dist/runtime/locale/en.d.ts +3 -0
  301. package/dist/runtime/locale/en.js +125 -0
  302. package/dist/runtime/locale/es.d.ts +3 -0
  303. package/dist/runtime/locale/es.js +55 -0
  304. package/dist/runtime/locale/et.d.ts +3 -0
  305. package/dist/runtime/locale/et.js +55 -0
  306. package/dist/runtime/locale/fa_ir.d.ts +3 -0
  307. package/dist/runtime/locale/fa_ir.js +56 -0
  308. package/dist/runtime/locale/fi.d.ts +3 -0
  309. package/dist/runtime/locale/fi.js +55 -0
  310. package/dist/runtime/locale/fr.d.ts +3 -0
  311. package/dist/runtime/locale/fr.js +55 -0
  312. package/dist/runtime/locale/he.d.ts +3 -0
  313. package/dist/runtime/locale/he.js +54 -0
  314. package/dist/runtime/locale/hi.d.ts +3 -0
  315. package/dist/runtime/locale/hi.js +55 -0
  316. package/dist/runtime/locale/hu.d.ts +3 -0
  317. package/dist/runtime/locale/hu.js +55 -0
  318. package/dist/runtime/locale/hy.d.ts +3 -0
  319. package/dist/runtime/locale/hy.js +55 -0
  320. package/dist/runtime/locale/id.d.ts +3 -0
  321. package/dist/runtime/locale/id.js +55 -0
  322. package/dist/runtime/locale/index.d.ts +51 -0
  323. package/dist/runtime/locale/index.js +51 -0
  324. package/dist/runtime/locale/it.d.ts +3 -0
  325. package/dist/runtime/locale/it.js +55 -0
  326. package/dist/runtime/locale/ja.d.ts +3 -0
  327. package/dist/runtime/locale/ja.js +55 -0
  328. package/dist/runtime/locale/kk.d.ts +3 -0
  329. package/dist/runtime/locale/kk.js +55 -0
  330. package/dist/runtime/locale/km.d.ts +3 -0
  331. package/dist/runtime/locale/km.js +55 -0
  332. package/dist/runtime/locale/ko.d.ts +3 -0
  333. package/dist/runtime/locale/ko.js +55 -0
  334. package/dist/runtime/locale/ky.d.ts +3 -0
  335. package/dist/runtime/locale/ky.js +55 -0
  336. package/dist/runtime/locale/lb.d.ts +3 -0
  337. package/dist/runtime/locale/lb.js +55 -0
  338. package/dist/runtime/locale/lt.d.ts +3 -0
  339. package/dist/runtime/locale/lt.js +55 -0
  340. package/dist/runtime/locale/mn.d.ts +3 -0
  341. package/dist/runtime/locale/mn.js +55 -0
  342. package/dist/runtime/locale/ms.d.ts +3 -0
  343. package/dist/runtime/locale/ms.js +55 -0
  344. package/dist/runtime/locale/nb_no.d.ts +3 -0
  345. package/dist/runtime/locale/nb_no.js +55 -0
  346. package/dist/runtime/locale/nl.d.ts +3 -0
  347. package/dist/runtime/locale/nl.js +55 -0
  348. package/dist/runtime/locale/pl.d.ts +3 -0
  349. package/dist/runtime/locale/pl.js +55 -0
  350. package/dist/runtime/locale/pt.d.ts +3 -0
  351. package/dist/runtime/locale/pt.js +55 -0
  352. package/dist/runtime/locale/pt_br.d.ts +3 -0
  353. package/dist/runtime/locale/pt_br.js +55 -0
  354. package/dist/runtime/locale/ro.d.ts +3 -0
  355. package/dist/runtime/locale/ro.js +55 -0
  356. package/dist/runtime/locale/ru.d.ts +3 -0
  357. package/dist/runtime/locale/ru.js +55 -0
  358. package/dist/runtime/locale/sk.d.ts +3 -0
  359. package/dist/runtime/locale/sk.js +55 -0
  360. package/dist/runtime/locale/sl.d.ts +3 -0
  361. package/dist/runtime/locale/sl.js +55 -0
  362. package/dist/runtime/locale/sv.d.ts +3 -0
  363. package/dist/runtime/locale/sv.js +55 -0
  364. package/dist/runtime/locale/th.d.ts +3 -0
  365. package/dist/runtime/locale/th.js +55 -0
  366. package/dist/runtime/locale/tj.d.ts +3 -0
  367. package/dist/runtime/locale/tj.js +55 -0
  368. package/dist/runtime/locale/tr.d.ts +3 -0
  369. package/dist/runtime/locale/tr.js +55 -0
  370. package/dist/runtime/locale/ug_cn.d.ts +3 -0
  371. package/dist/runtime/locale/ug_cn.js +56 -0
  372. package/dist/runtime/locale/uk.d.ts +3 -0
  373. package/dist/runtime/locale/uk.js +55 -0
  374. package/dist/runtime/locale/ur.d.ts +3 -0
  375. package/dist/runtime/locale/ur.js +56 -0
  376. package/dist/runtime/locale/uz.d.ts +3 -0
  377. package/dist/runtime/locale/uz.js +55 -0
  378. package/dist/runtime/locale/vi.d.ts +3 -0
  379. package/dist/runtime/locale/vi.js +55 -0
  380. package/dist/runtime/locale/zh_cn.d.ts +3 -0
  381. package/dist/runtime/locale/zh_cn.js +55 -0
  382. package/dist/runtime/locale/zh_tw.d.ts +3 -0
  383. package/dist/runtime/locale/zh_tw.js +55 -0
  384. package/dist/runtime/plugins/colors.d.ts +2 -0
  385. package/dist/runtime/plugins/colors.js +51 -0
  386. package/dist/runtime/types/app.config.d.ts +6 -0
  387. package/dist/runtime/types/content.d.ts +1 -0
  388. package/dist/runtime/types/content.js +0 -0
  389. package/dist/runtime/types/form.d.ts +87 -0
  390. package/dist/runtime/types/form.js +12 -0
  391. package/dist/runtime/types/index.d.ts +76 -0
  392. package/dist/runtime/types/index.js +76 -0
  393. package/dist/runtime/types/locale.d.ts +127 -0
  394. package/dist/runtime/types/locale.js +0 -0
  395. package/dist/runtime/types/prose.d.ts +1 -0
  396. package/dist/runtime/types/prose.js +0 -0
  397. package/dist/runtime/types/tv.d.ts +53 -0
  398. package/dist/runtime/types/tv.js +0 -0
  399. package/dist/runtime/types/utils.d.ts +41 -0
  400. package/dist/runtime/types/utils.js +1 -0
  401. package/dist/runtime/utils/content.d.ts +13 -0
  402. package/dist/runtime/utils/content.js +51 -0
  403. package/dist/runtime/utils/dashboard.d.ts +10 -0
  404. package/dist/runtime/utils/dashboard.js +5 -0
  405. package/dist/runtime/utils/form.d.ts +13 -0
  406. package/dist/runtime/utils/form.js +108 -0
  407. package/dist/runtime/utils/fuse.d.ts +4 -0
  408. package/dist/runtime/utils/fuse.js +63 -0
  409. package/dist/runtime/utils/index.d.ts +12 -0
  410. package/dist/runtime/utils/index.js +89 -0
  411. package/dist/runtime/utils/link.d.ts +7 -0
  412. package/dist/runtime/utils/link.js +47 -0
  413. package/dist/runtime/utils/locale.d.ts +15 -0
  414. package/dist/runtime/utils/locale.js +25 -0
  415. package/dist/runtime/utils/tv.d.ts +1 -0
  416. package/dist/runtime/utils/tv.js +4 -0
  417. package/dist/runtime/vue/components/Icon.vue +14 -0
  418. package/dist/runtime/vue/components/Icon.vue.d.ts +5 -0
  419. package/dist/runtime/vue/components/Link.vue +169 -0
  420. package/dist/runtime/vue/components/Link.vue.d.ts +93 -0
  421. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +34 -0
  422. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +38 -0
  423. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +37 -0
  424. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +5 -0
  425. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +32 -0
  426. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +5 -0
  427. package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
  428. package/dist/runtime/vue/composables/useAppConfig.js +4 -0
  429. package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
  430. package/dist/runtime/vue/plugins/color-mode.js +6 -0
  431. package/dist/runtime/vue/plugins/head.d.ts +4 -0
  432. package/dist/runtime/vue/plugins/head.js +10 -0
  433. package/dist/runtime/vue/stubs.d.ts +40 -0
  434. package/dist/runtime/vue/stubs.js +74 -0
  435. package/dist/shared/ui.BcVNrqyb.mjs +5374 -0
  436. package/dist/types.d.mts +5 -0
  437. package/dist/unplugin.d.mts +88 -0
  438. package/dist/unplugin.mjs +242 -0
  439. package/dist/vite.d.mts +15 -0
  440. package/dist/vite.mjs +21 -0
  441. package/package.json +255 -0
  442. package/vue-plugin.d.ts +5 -0
package/.nuxt/ui.css ADDED
@@ -0,0 +1,146 @@
1
+ @source "./ui";
2
+
3
+ @theme static {
4
+ --color-old-neutral-50: oklch(98.5% 0 0);
5
+ --color-old-neutral-100: oklch(97% 0 0);
6
+ --color-old-neutral-200: oklch(92.2% 0 0);
7
+ --color-old-neutral-300: oklch(87% 0 0);
8
+ --color-old-neutral-400: oklch(70.8% 0 0);
9
+ --color-old-neutral-500: oklch(55.6% 0 0);
10
+ --color-old-neutral-600: oklch(43.9% 0 0);
11
+ --color-old-neutral-700: oklch(37.1% 0 0);
12
+ --color-old-neutral-800: oklch(26.9% 0 0);
13
+ --color-old-neutral-900: oklch(20.5% 0 0);
14
+ --color-old-neutral-950: oklch(14.5% 0 0);
15
+ }
16
+
17
+ @theme default inline {
18
+ --color-primary-50: var(--ui-color-primary-50);
19
+ --color-primary-100: var(--ui-color-primary-100);
20
+ --color-primary-200: var(--ui-color-primary-200);
21
+ --color-primary-300: var(--ui-color-primary-300);
22
+ --color-primary-400: var(--ui-color-primary-400);
23
+ --color-primary-500: var(--ui-color-primary-500);
24
+ --color-primary-600: var(--ui-color-primary-600);
25
+ --color-primary-700: var(--ui-color-primary-700);
26
+ --color-primary-800: var(--ui-color-primary-800);
27
+ --color-primary-900: var(--ui-color-primary-900);
28
+ --color-primary-950: var(--ui-color-primary-950);
29
+ --color-secondary-50: var(--ui-color-secondary-50);
30
+ --color-secondary-100: var(--ui-color-secondary-100);
31
+ --color-secondary-200: var(--ui-color-secondary-200);
32
+ --color-secondary-300: var(--ui-color-secondary-300);
33
+ --color-secondary-400: var(--ui-color-secondary-400);
34
+ --color-secondary-500: var(--ui-color-secondary-500);
35
+ --color-secondary-600: var(--ui-color-secondary-600);
36
+ --color-secondary-700: var(--ui-color-secondary-700);
37
+ --color-secondary-800: var(--ui-color-secondary-800);
38
+ --color-secondary-900: var(--ui-color-secondary-900);
39
+ --color-secondary-950: var(--ui-color-secondary-950);
40
+ --color-success-50: var(--ui-color-success-50);
41
+ --color-success-100: var(--ui-color-success-100);
42
+ --color-success-200: var(--ui-color-success-200);
43
+ --color-success-300: var(--ui-color-success-300);
44
+ --color-success-400: var(--ui-color-success-400);
45
+ --color-success-500: var(--ui-color-success-500);
46
+ --color-success-600: var(--ui-color-success-600);
47
+ --color-success-700: var(--ui-color-success-700);
48
+ --color-success-800: var(--ui-color-success-800);
49
+ --color-success-900: var(--ui-color-success-900);
50
+ --color-success-950: var(--ui-color-success-950);
51
+ --color-info-50: var(--ui-color-info-50);
52
+ --color-info-100: var(--ui-color-info-100);
53
+ --color-info-200: var(--ui-color-info-200);
54
+ --color-info-300: var(--ui-color-info-300);
55
+ --color-info-400: var(--ui-color-info-400);
56
+ --color-info-500: var(--ui-color-info-500);
57
+ --color-info-600: var(--ui-color-info-600);
58
+ --color-info-700: var(--ui-color-info-700);
59
+ --color-info-800: var(--ui-color-info-800);
60
+ --color-info-900: var(--ui-color-info-900);
61
+ --color-info-950: var(--ui-color-info-950);
62
+ --color-warning-50: var(--ui-color-warning-50);
63
+ --color-warning-100: var(--ui-color-warning-100);
64
+ --color-warning-200: var(--ui-color-warning-200);
65
+ --color-warning-300: var(--ui-color-warning-300);
66
+ --color-warning-400: var(--ui-color-warning-400);
67
+ --color-warning-500: var(--ui-color-warning-500);
68
+ --color-warning-600: var(--ui-color-warning-600);
69
+ --color-warning-700: var(--ui-color-warning-700);
70
+ --color-warning-800: var(--ui-color-warning-800);
71
+ --color-warning-900: var(--ui-color-warning-900);
72
+ --color-warning-950: var(--ui-color-warning-950);
73
+ --color-error-50: var(--ui-color-error-50);
74
+ --color-error-100: var(--ui-color-error-100);
75
+ --color-error-200: var(--ui-color-error-200);
76
+ --color-error-300: var(--ui-color-error-300);
77
+ --color-error-400: var(--ui-color-error-400);
78
+ --color-error-500: var(--ui-color-error-500);
79
+ --color-error-600: var(--ui-color-error-600);
80
+ --color-error-700: var(--ui-color-error-700);
81
+ --color-error-800: var(--ui-color-error-800);
82
+ --color-error-900: var(--ui-color-error-900);
83
+ --color-error-950: var(--ui-color-error-950);
84
+ --color-neutral-50: var(--ui-color-neutral-50);
85
+ --color-neutral-100: var(--ui-color-neutral-100);
86
+ --color-neutral-200: var(--ui-color-neutral-200);
87
+ --color-neutral-300: var(--ui-color-neutral-300);
88
+ --color-neutral-400: var(--ui-color-neutral-400);
89
+ --color-neutral-500: var(--ui-color-neutral-500);
90
+ --color-neutral-600: var(--ui-color-neutral-600);
91
+ --color-neutral-700: var(--ui-color-neutral-700);
92
+ --color-neutral-800: var(--ui-color-neutral-800);
93
+ --color-neutral-900: var(--ui-color-neutral-900);
94
+ --color-neutral-950: var(--ui-color-neutral-950);
95
+ --color-primary: var(--ui-primary);
96
+ --color-secondary: var(--ui-secondary);
97
+ --color-success: var(--ui-success);
98
+ --color-info: var(--ui-info);
99
+ --color-warning: var(--ui-warning);
100
+ --color-error: var(--ui-error);
101
+ --radius-xs: calc(var(--ui-radius) * 0.5);
102
+ --radius-sm: var(--ui-radius);
103
+ --radius-md: calc(var(--ui-radius) * 1.5);
104
+ --radius-lg: calc(var(--ui-radius) * 2);
105
+ --radius-xl: calc(var(--ui-radius) * 3);
106
+ --radius-2xl: calc(var(--ui-radius) * 4);
107
+ --radius-3xl: calc(var(--ui-radius) * 6);
108
+ --text-color-dimmed: var(--ui-text-dimmed);
109
+ --text-color-muted: var(--ui-text-muted);
110
+ --text-color-toned: var(--ui-text-toned);
111
+ --text-color-default: var(--ui-text);
112
+ --text-color-highlighted: var(--ui-text-highlighted);
113
+ --text-color-inverted: var(--ui-text-inverted);
114
+ --background-color-default: var(--ui-bg);
115
+ --background-color-muted: var(--ui-bg-muted);
116
+ --background-color-elevated: var(--ui-bg-elevated);
117
+ --background-color-accented: var(--ui-bg-accented);
118
+ --background-color-inverted: var(--ui-bg-inverted);
119
+ --background-color-border: var(--ui-border);
120
+ --border-color-default: var(--ui-border);
121
+ --border-color-muted: var(--ui-border-muted);
122
+ --border-color-accented: var(--ui-border-accented);
123
+ --border-color-inverted: var(--ui-border-inverted);
124
+ --border-color-bg: var(--ui-bg);
125
+ --ring-color-default: var(--ui-border);
126
+ --ring-color-muted: var(--ui-border-muted);
127
+ --ring-color-accented: var(--ui-border-accented);
128
+ --ring-color-inverted: var(--ui-border-inverted);
129
+ --ring-color-bg: var(--ui-bg);
130
+ --ring-offset-color-default: var(--ui-border);
131
+ --ring-offset-color-muted: var(--ui-border-muted);
132
+ --ring-offset-color-accented: var(--ui-border-accented);
133
+ --ring-offset-color-inverted: var(--ui-border-inverted);
134
+ --ring-offset-color-bg: var(--ui-bg);
135
+ --divide-color-default: var(--ui-border);
136
+ --divide-color-muted: var(--ui-border-muted);
137
+ --divide-color-accented: var(--ui-border-accented);
138
+ --divide-color-inverted: var(--ui-border-inverted);
139
+ --divide-color-bg: var(--ui-bg);
140
+ --outline-color-default: var(--ui-border);
141
+ --outline-color-inverted: var(--ui-border-inverted);
142
+ --stroke-default: var(--ui-border);
143
+ --stroke-inverted: var(--ui-border-inverted);
144
+ --fill-default: var(--ui-border);
145
+ --fill-inverted: var(--ui-border-inverted);
146
+ }
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 NuxtLabs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,147 @@
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/91ceab67-89ce-4ef4-8678-4402a92baca5">
3
+ <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/51526d6d-e5ec-41b4-aa37-242dec1cdb27">
4
+ <img alt="Nuxt UI" src="https://github.com/user-attachments/assets/51526d6d-e5ec-41b4-aa37-242dec1cdb27">
5
+ </picture>
6
+
7
+ # Nuxt UI
8
+
9
+ [![npm version][npm-version-src]][npm-version-href]
10
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
11
+ [![License][license-src]][license-href]
12
+ [![Nuxt][nuxt-src]][nuxt-href]
13
+
14
+ Nuxt UI harnesses the combined strengths of [Reka UI](https://reka-ui.com/), [Tailwind CSS](https://tailwindcss.com/), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
15
+
16
+ > [!NOTE]
17
+ > You are on the `v3` development branch, check out the [v2 branch](https://github.com/nuxt/ui/tree/v2) for Nuxt UI v2.
18
+
19
+ > [!TIP]
20
+ > **Looking for more components ?**
21
+ > Check out [Nuxt UI Pro](https://ui.nuxt.com/pro), a collection of premium Vue components, composables, and utilities built on top of Nuxt UI for faster and more powerful app development.
22
+
23
+ ## Documentation
24
+
25
+ Visit https://ui.nuxt.com to explore the documentation.
26
+
27
+ ## Installation
28
+
29
+ ```bash [pnpm]
30
+ pnpm add @eslamdevui/ui
31
+ ```
32
+
33
+ ```bash [yarn]
34
+ yarn add @eslamdevui/ui
35
+ ```
36
+
37
+ ```bash [npm]
38
+ npm install @eslamdevui/ui
39
+ ```
40
+
41
+ ```bash [bun]
42
+ bun add @eslamdevui/ui
43
+ ```
44
+
45
+ ### Nuxt
46
+
47
+ 1. Add the Nuxt UI module in your `nuxt.config.ts`:
48
+
49
+ ```ts [nuxt.config.ts]
50
+ export default defineNuxtConfig({
51
+ modules: ['@eslamdevui/ui']
52
+ })
53
+ ```
54
+
55
+ 2. Import Tailwind CSS and Nuxt UI in your CSS:
56
+
57
+ ```css [assets/css/main.css]
58
+ @import "tailwindcss";
59
+ @import "@eslamdevui/ui";
60
+ ```
61
+
62
+ Learn more in the [installation guide](https://ui.nuxt.com/getting-started/installation/nuxt).
63
+
64
+ ### Vue
65
+
66
+ 1. Add the Nuxt UI Vite plugin in your `vite.config.ts`:
67
+
68
+ ```ts [vite.config.ts]
69
+ import { defineConfig } from 'vite'
70
+ import vue from '@vitejs/plugin-vue'
71
+ import ui from '@eslamdevui/ui/vite'
72
+
73
+ export default defineConfig({
74
+ plugins: [
75
+ vue(),
76
+ ui()
77
+ ]
78
+ })
79
+ ```
80
+
81
+ 2. Use the Nuxt UI Vue plugin in your `main.ts`:
82
+
83
+ ```ts [main.ts]
84
+ import { createApp } from 'vue'
85
+ import { createRouter, createWebHistory } from 'vue-router'
86
+ import ui from '@eslamdevui/ui/vue-plugin'
87
+ import App from './App.vue'
88
+
89
+ const app = createApp(App)
90
+
91
+ const router = createRouter({
92
+ routes: [],
93
+ history: createWebHistory()
94
+ })
95
+
96
+ app.use(router)
97
+ app.use(ui)
98
+
99
+ app.mount('#app')
100
+ ```
101
+
102
+ 3. Import Tailwind CSS and Nuxt UI in your CSS:
103
+
104
+ ```css [assets/main.css]
105
+ @import "tailwindcss";
106
+ @import "@eslamdevui/ui";
107
+ ```
108
+
109
+ Learn more in the [installation guide](https://ui.nuxt.com/getting-started/installation/vue).
110
+
111
+ ## Contribution
112
+
113
+ Thank you for considering contributing to Nuxt UI. Here are a few ways you can get involved:
114
+
115
+ - Reporting Bugs: If you come across any bugs or issues, please check out the reporting bugs guide to learn how to submit a bug report.
116
+ - Suggestions: Have any thoughts to enhance Nuxt UI? We'd love to hear them! Check out the [contribution guide](https://ui.nuxt.com/getting-started/contribution) to share your suggestions.
117
+
118
+ ## Local Development
119
+
120
+ Follow the docs to [set up your local development environment](https://ui.nuxt.com/getting-started/contribution#local-development) and contribute.
121
+
122
+ ## Credits
123
+
124
+ - [nuxt/nuxt](https://github.com/nuxt/nuxt)
125
+ - [nuxt/icon](https://github.com/nuxt/icon)
126
+ - [nuxt/fonts](https://github.com/nuxt/fonts)
127
+ - [nuxt-modules/color-mode](https://github.com/nuxt-modules/color-mode)
128
+ - [unovue/reka-ui](https://github.com/unovue/reka-ui)
129
+ - [tailwindlabs/tailwindcss](https://github.com/tailwindlabs/tailwindcss)
130
+ - [vueuse/vueuse](https://github.com/vueuse/vueuse)
131
+
132
+ ## License
133
+
134
+ Licensed under the [MIT license](https://github.com/nuxt/ui/blob/v3/LICENSE.md).
135
+
136
+ <!-- Badges -->
137
+ [npm-version-src]: https://img.shields.io/npm/v/@eslamdevui/ui/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
138
+ [npm-version-href]: https://npmjs.com/package/@eslamdevui/ui
139
+
140
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@eslamdevui/ui.svg?style=flat&colorA=18181B&colorB=28CF8D
141
+ [npm-downloads-href]: https://npm.chart.dev/@eslamdevui/ui
142
+
143
+ [license-src]: https://img.shields.io/github/license/nuxt/ui.svg?style=flat&colorA=18181B&colorB=28CF8D
144
+ [license-href]: https://github.com/nuxt/ui/blob/v3/LICENSE.md
145
+
146
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
147
+ [nuxt-href]: https://nuxt.com
@@ -0,0 +1,95 @@
1
+ import { existsSync, promises as fsp } from 'node:fs'
2
+ import { resolve } from 'pathe'
3
+ import { defineCommand } from 'citty'
4
+ import { consola } from 'consola'
5
+ import { splitByCase, upperFirst, camelCase, kebabCase } from 'scule'
6
+ import { appendFile, sortFile } from '../../utils.mjs'
7
+ import templates from '../../templates.mjs'
8
+
9
+ export default defineCommand({
10
+ meta: {
11
+ name: 'component',
12
+ description: 'Make a new component.'
13
+ },
14
+ args: {
15
+ name: {
16
+ type: 'positional',
17
+ required: true,
18
+ description: 'Name of the component.'
19
+ },
20
+ primitive: {
21
+ type: 'boolean',
22
+ description: 'Create a primitive component.'
23
+ },
24
+ pro: {
25
+ type: 'boolean',
26
+ description: 'Create a pro component.'
27
+ },
28
+ prose: {
29
+ type: 'boolean',
30
+ description: 'Create a prose component (with --pro).'
31
+ },
32
+ content: {
33
+ type: 'boolean',
34
+ description: 'Create a content component (with --pro).'
35
+ },
36
+ template: {
37
+ type: 'string',
38
+ description: 'Only generate template.'
39
+ }
40
+ },
41
+ async setup({ args }) {
42
+ const name = args.name
43
+ if (!name) {
44
+ consola.error('`name` argument is missing!')
45
+ process.exit(1)
46
+ }
47
+
48
+ if (args.prose && !args.pro) {
49
+ consola.error('`--prose` flag can only be used with `--pro` flag!')
50
+ process.exit(1)
51
+ }
52
+ if (args.content && !args.pro) {
53
+ consola.error('`--content` flag can only be used with `--pro` flag!')
54
+ process.exit(1)
55
+ }
56
+
57
+ const path = resolve('.')
58
+
59
+ for (const template of Object.keys(templates)) {
60
+ if (args.template && template !== args.template) {
61
+ continue
62
+ }
63
+
64
+ const { filename, contents } = templates[template](args)
65
+ if (!contents) {
66
+ continue
67
+ }
68
+
69
+ const filePath = resolve(path, filename)
70
+
71
+ if (existsSync(filePath)) {
72
+ consola.error(`🚨 ${filePath} already exists!`)
73
+ continue
74
+ }
75
+
76
+ await fsp.writeFile(filePath, contents.trim() + '\n')
77
+
78
+ consola.success(`🪄 Generated ${filePath}!`)
79
+ }
80
+
81
+ if (args.template) {
82
+ return
83
+ }
84
+
85
+ const themePath = resolve(path, `src/theme/${args.prose ? 'prose/' : ''}${args.content ? 'content/' : ''}index.ts`)
86
+ await appendFile(themePath, `export { default as ${camelCase(name)} } from './${kebabCase(name)}'`)
87
+ await sortFile(themePath)
88
+
89
+ if (!args.prose) {
90
+ const typesPath = resolve(path, 'src/runtime/types/index.ts')
91
+ await appendFile(typesPath, `export * from '../components/${args.content ? 'content/' : ''}${splitByCase(name).map(p => upperFirst(p)).join('')}.vue'`)
92
+ await sortFile(typesPath)
93
+ }
94
+ }
95
+ })
@@ -0,0 +1,14 @@
1
+ import { defineCommand } from 'citty'
2
+ import component from './component.mjs'
3
+ import locale from './locale.mjs'
4
+
5
+ export default defineCommand({
6
+ meta: {
7
+ name: 'make',
8
+ description: 'Commands to create new Nuxt UI entities.'
9
+ },
10
+ subCommands: {
11
+ component,
12
+ locale
13
+ }
14
+ })
@@ -0,0 +1,64 @@
1
+ import { existsSync, promises as fsp } from 'node:fs'
2
+ import { resolve } from 'pathe'
3
+ import { consola } from 'consola'
4
+ import { appendFile, sortFile, normalizeLocale } from '../../utils.mjs'
5
+ import { defineCommand } from 'citty'
6
+
7
+ export default defineCommand({
8
+ meta: {
9
+ name: 'locale',
10
+ description: 'Make a new locale.'
11
+ },
12
+ args: {
13
+ code: {
14
+ description: 'Locale code to create. For example: en.',
15
+ required: true
16
+ },
17
+ name: {
18
+ description: 'Locale name to create. For example: English.',
19
+ required: true
20
+ },
21
+ dir: {
22
+ description: 'Locale direction. For example: rtl.',
23
+ default: 'ltr'
24
+ }
25
+ },
26
+ async setup({ args }) {
27
+ const path = resolve('.')
28
+ const localePath = resolve(path, `src/runtime/locale`)
29
+
30
+ const originLocaleFilePath = resolve(localePath, 'en.ts')
31
+ const newLocaleFilePath = resolve(localePath, `${args.code}.ts`)
32
+
33
+ // Validate locale code
34
+ if (existsSync(newLocaleFilePath)) {
35
+ consola.error(`🚨 ${args.code} already exists!`)
36
+ process.exit(1)
37
+ }
38
+
39
+ if (!['ltr', 'rtl'].includes(args.dir)) {
40
+ consola.error(`🚨 Direction ${args.dir} not supported!`)
41
+ process.exit(1)
42
+ }
43
+
44
+ if (!args.code.match(/^[a-z]{2}(?:_[a-z]{2,4})?$/)) {
45
+ consola.error(`🚨 ${args.code} is not a valid locale code!\nExample: en or en_us`)
46
+ process.exit(1)
47
+ }
48
+
49
+ // Create new locale export
50
+ const localeExportFile = resolve(localePath, `index.ts`)
51
+ await appendFile(localeExportFile, `export { default as ${args.code} } from './${args.code}'`)
52
+ await sortFile(localeExportFile)
53
+
54
+ // Create new locale file
55
+ await fsp.copyFile(originLocaleFilePath, newLocaleFilePath)
56
+ const localeFile = await fsp.readFile(newLocaleFilePath, 'utf-8')
57
+ const rewrittenLocaleFile = localeFile
58
+ .replace(/name: '(.*)',/, `name: '${args.name}',`)
59
+ .replace(/code: '(.*)',/, `code: '${normalizeLocale(args.code)}',${(args.dir && args.dir !== 'ltr') ? `\n dir: '${args.dir}',` : ''}`)
60
+ await fsp.writeFile(newLocaleFilePath, rewrittenLocaleFile)
61
+
62
+ consola.success(`🪄 Generated ${newLocaleFilePath}`)
63
+ }
64
+ })
package/cli/index.mjs ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { defineCommand, runMain } from 'citty'
3
+ import make from './commands/make/index.mjs'
4
+
5
+ const main = defineCommand({
6
+ meta: {
7
+ name: 'nuxt-ui',
8
+ description: 'Nuxt UI CLI'
9
+ },
10
+ subCommands: {
11
+ make
12
+ }
13
+ })
14
+
15
+ runMain(main)
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@eslamdevui/ui-cli",
3
+ "type": "module",
4
+ "exports": {
5
+ ".": "./index.mjs"
6
+ },
7
+ "dependencies": {
8
+ "citty": "^0.1.6",
9
+ "consola": "^3.4.2",
10
+ "pathe": "^2.0.3",
11
+ "scule": "^1.3.0"
12
+ }
13
+ }