@eslamdevui/ui 3.2.0-beta.1 → 3.2.0-beta.2

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 (302) hide show
  1. package/.nuxt/ui/alert.ts +5 -0
  2. package/.nuxt/ui/badge.ts +5 -0
  3. package/.nuxt/ui/button-group.ts +13 -0
  4. package/.nuxt/ui/button.ts +5 -0
  5. package/.nuxt/ui/carousel.ts +5 -0
  6. package/.nuxt/ui/content/content-navigation.ts +339 -0
  7. package/.nuxt/ui/content/content-search-button.ts +6 -0
  8. package/.nuxt/ui/content/content-search.ts +6 -0
  9. package/.nuxt/ui/content/content-surround.ts +39 -0
  10. package/.nuxt/ui/content/content-toc.ts +150 -0
  11. package/.nuxt/ui/content/index.ts +5 -0
  12. package/.nuxt/ui/content-surround.ts +5 -0
  13. package/.nuxt/ui/content-toc.ts +6 -6
  14. package/.nuxt/ui/dashboard-navbar.ts +5 -0
  15. package/.nuxt/ui/dashboard-sidebar-collapse.ts +5 -0
  16. package/.nuxt/ui/dashboard-sidebar-toggle.ts +5 -0
  17. package/.nuxt/ui/dashboard-sidebar.ts +10 -0
  18. package/.nuxt/ui/error.ts +9 -0
  19. package/.nuxt/ui/index.ts +48 -1
  20. package/.nuxt/ui/input-menu.ts +9 -0
  21. package/.nuxt/ui/input-number.ts +5 -0
  22. package/.nuxt/ui/input-tags.ts +9 -0
  23. package/.nuxt/ui/input.ts +9 -0
  24. package/.nuxt/ui/prose/a.ts +6 -0
  25. package/.nuxt/ui/prose/accordion-item.ts +3 -0
  26. package/.nuxt/ui/prose/accordion.ts +6 -0
  27. package/.nuxt/ui/prose/badge.ts +3 -0
  28. package/.nuxt/ui/prose/blockquote.ts +3 -0
  29. package/.nuxt/ui/prose/callout.ts +129 -0
  30. package/.nuxt/ui/prose/card-group.ts +3 -0
  31. package/.nuxt/ui/prose/card.ts +119 -0
  32. package/.nuxt/ui/prose/code-collapse.ts +19 -0
  33. package/.nuxt/ui/prose/code-group.ts +13 -0
  34. package/.nuxt/ui/prose/code-icon.ts +66 -0
  35. package/.nuxt/ui/prose/code-preview.ts +14 -0
  36. package/.nuxt/ui/prose/code-tree.ts +28 -0
  37. package/.nuxt/ui/prose/code.ts +27 -0
  38. package/.nuxt/ui/prose/collapsible.ts +12 -0
  39. package/.nuxt/ui/prose/em.ts +3 -0
  40. package/.nuxt/ui/prose/field-group.ts +3 -0
  41. package/.nuxt/ui/prose/field.ts +11 -0
  42. package/.nuxt/ui/prose/h1.ts +6 -0
  43. package/.nuxt/ui/prose/h2.ts +14 -0
  44. package/.nuxt/ui/prose/h3.ts +14 -0
  45. package/.nuxt/ui/prose/h4.ts +6 -0
  46. package/.nuxt/ui/prose/hr.ts +3 -0
  47. package/.nuxt/ui/prose/icon.ts +3 -0
  48. package/.nuxt/ui/prose/img.ts +3 -0
  49. package/.nuxt/ui/prose/index.ts +41 -0
  50. package/.nuxt/ui/prose/kbd.ts +3 -0
  51. package/.nuxt/ui/prose/li.ts +3 -0
  52. package/.nuxt/ui/prose/ol.ts +3 -0
  53. package/.nuxt/ui/prose/p.ts +3 -0
  54. package/.nuxt/ui/prose/pre.ts +17 -0
  55. package/.nuxt/ui/prose/steps.ts +19 -0
  56. package/.nuxt/ui/prose/strong.ts +3 -0
  57. package/.nuxt/ui/prose/table.ts +6 -0
  58. package/.nuxt/ui/prose/tabs-item.ts +3 -0
  59. package/.nuxt/ui/prose/tabs.ts +5 -0
  60. package/.nuxt/ui/prose/tbody.ts +3 -0
  61. package/.nuxt/ui/prose/td.ts +3 -0
  62. package/.nuxt/ui/prose/th.ts +3 -0
  63. package/.nuxt/ui/prose/thead.ts +3 -0
  64. package/.nuxt/ui/prose/tr.ts +3 -0
  65. package/.nuxt/ui/prose/ul.ts +3 -0
  66. package/.nuxt/ui/select-menu.ts +9 -0
  67. package/.nuxt/ui/select.ts +9 -0
  68. package/.nuxt/ui/textarea.ts +9 -0
  69. package/.nuxt/ui/toast.ts +5 -0
  70. package/LICENSE.md +9 -9
  71. package/README.md +147 -147
  72. package/cli/commands/make/component.mjs +95 -95
  73. package/cli/commands/make/index.mjs +14 -14
  74. package/cli/commands/make/locale.mjs +64 -64
  75. package/cli/index.mjs +15 -15
  76. package/cli/package.json +13 -13
  77. package/cli/templates.mjs +236 -228
  78. package/cli/utils.mjs +31 -31
  79. package/dist/module.json +1 -1
  80. package/dist/module.mjs +18 -13
  81. package/dist/runtime/components/Accordion.vue +36 -36
  82. package/dist/runtime/components/Alert.vue +46 -46
  83. package/dist/runtime/components/App.vue +10 -10
  84. package/dist/runtime/components/Avatar.vue +27 -27
  85. package/dist/runtime/components/AvatarGroup.vue +4 -4
  86. package/dist/runtime/components/Badge.vue +16 -16
  87. package/dist/runtime/components/Breadcrumb.vue +32 -32
  88. package/dist/runtime/components/Button.vue +28 -28
  89. package/dist/runtime/components/ButtonGroup.vue +3 -3
  90. package/dist/runtime/components/Calendar.vue +74 -74
  91. package/dist/runtime/components/Card.vue +13 -13
  92. package/dist/runtime/components/Carousel.vue +58 -58
  93. package/dist/runtime/components/ChatMessage.vue +35 -35
  94. package/dist/runtime/components/ChatMessages.vue +71 -71
  95. package/dist/runtime/components/ChatMessages.vue.d.ts +1 -2
  96. package/dist/runtime/components/ChatPrompt.vue +30 -31
  97. package/dist/runtime/components/ChatPrompt.vue.d.ts +4 -4
  98. package/dist/runtime/components/ChatPromptSubmit.vue +10 -10
  99. package/dist/runtime/components/Checkbox.vue +33 -33
  100. package/dist/runtime/components/CheckboxGroup.vue +32 -32
  101. package/dist/runtime/components/Chip.vue +11 -11
  102. package/dist/runtime/components/Collapsible.vue +9 -9
  103. package/dist/runtime/components/ColorPicker.vue +30 -30
  104. package/dist/runtime/components/CommandPalette.vue +117 -117
  105. package/dist/runtime/components/Container.vue +3 -3
  106. package/dist/runtime/components/ContextMenu.vue +22 -22
  107. package/dist/runtime/components/ContextMenuContent.vue +105 -105
  108. package/dist/runtime/components/DashboardGroup.vue +3 -3
  109. package/dist/runtime/components/DashboardNavbar.vue +41 -41
  110. package/dist/runtime/components/DashboardNavbar.vue.d.ts +1 -1
  111. package/dist/runtime/components/DashboardPanel.vue +29 -29
  112. package/dist/runtime/components/DashboardPanel.vue.d.ts +1 -1
  113. package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
  114. package/dist/runtime/components/DashboardSearch.vue +24 -25
  115. package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -3
  116. package/dist/runtime/components/DashboardSearchButton.vue +63 -41
  117. package/dist/runtime/components/DashboardSearchButton.vue.d.ts +7 -1
  118. package/dist/runtime/components/DashboardSidebar.vue +77 -77
  119. package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
  120. package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +1 -1
  121. package/dist/runtime/components/DashboardSidebarToggle.vue +14 -17
  122. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +4 -6
  123. package/dist/runtime/components/Drawer.vue +55 -55
  124. package/dist/runtime/components/DropdownMenu.vue +24 -24
  125. package/dist/runtime/components/DropdownMenuContent.vue +107 -107
  126. package/dist/runtime/components/Error.vue +57 -0
  127. package/dist/runtime/components/Error.vue.d.ts +52 -0
  128. package/dist/runtime/components/Form.vue +8 -8
  129. package/dist/runtime/components/Form.vue.d.ts +1 -1
  130. package/dist/runtime/components/FormField.vue +37 -37
  131. package/dist/runtime/components/Icon.vue +1 -1
  132. package/dist/runtime/components/Input.vue +34 -34
  133. package/dist/runtime/components/InputMenu.vue +163 -163
  134. package/dist/runtime/components/InputNumber.vue +49 -49
  135. package/dist/runtime/components/InputTags.vue +55 -55
  136. package/dist/runtime/components/Kbd.vue +5 -5
  137. package/dist/runtime/components/Link.vue +14 -14
  138. package/dist/runtime/components/LinkBase.vue +8 -8
  139. package/dist/runtime/components/Modal.vue +69 -69
  140. package/dist/runtime/components/NavigationMenu.vue +166 -166
  141. package/dist/runtime/components/OverlayProvider.vue +9 -9
  142. package/dist/runtime/components/Pagination.vue +47 -47
  143. package/dist/runtime/components/PinInput.vue +20 -20
  144. package/dist/runtime/components/Popover.vue +17 -17
  145. package/dist/runtime/components/Progress.vue +19 -19
  146. package/dist/runtime/components/RadioGroup.vue +43 -43
  147. package/dist/runtime/components/Select.vue +96 -96
  148. package/dist/runtime/components/SelectMenu.vue +130 -130
  149. package/dist/runtime/components/Separator.vue +15 -15
  150. package/dist/runtime/components/Skeleton.vue +10 -10
  151. package/dist/runtime/components/Slideover.vue +76 -76
  152. package/dist/runtime/components/Slider.vue +27 -27
  153. package/dist/runtime/components/Stepper.vue +51 -51
  154. package/dist/runtime/components/Switch.vue +33 -33
  155. package/dist/runtime/components/Table.vue +77 -77
  156. package/dist/runtime/components/Tabs.vue +37 -37
  157. package/dist/runtime/components/Textarea.vue +33 -33
  158. package/dist/runtime/components/Timeline.vue +38 -38
  159. package/dist/runtime/components/Toast.vue +69 -69
  160. package/dist/runtime/components/Toaster.vue +28 -28
  161. package/dist/runtime/components/Tooltip.vue +19 -19
  162. package/dist/runtime/components/Tree.vue +60 -60
  163. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +2 -2
  164. package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +2 -2
  165. package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
  166. package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +3 -3
  167. package/dist/runtime/components/color-mode/ColorModeImage.vue +2 -2
  168. package/dist/runtime/components/color-mode/ColorModeSelect.vue +19 -19
  169. package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +1 -1
  170. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +19 -19
  171. package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
  172. package/dist/runtime/components/content/ContentNavigation.vue +175 -0
  173. package/dist/runtime/components/content/ContentNavigation.vue.d.ts +53 -0
  174. package/dist/runtime/components/content/ContentSearch.vue +184 -0
  175. package/dist/runtime/components/content/ContentSearch.vue.d.ts +111 -0
  176. package/dist/runtime/components/content/ContentSearchButton.vue +95 -0
  177. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +12 -0
  178. package/dist/runtime/components/content/ContentSurround.vue +61 -0
  179. package/dist/runtime/components/content/ContentSurround.vue.d.ts +59 -0
  180. package/dist/runtime/components/content/ContentToc.vue +146 -0
  181. package/dist/runtime/components/content/ContentToc.vue.d.ts +88 -0
  182. package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
  183. package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
  184. package/dist/runtime/components/prose/A.vue +24 -0
  185. package/dist/runtime/components/prose/A.vue.d.ts +15 -0
  186. package/dist/runtime/components/prose/Accordion.vue +43 -0
  187. package/dist/runtime/components/prose/Accordion.vue.d.ts +16 -0
  188. package/dist/runtime/components/prose/AccordionItem.vue +25 -0
  189. package/dist/runtime/components/prose/AccordionItem.vue.d.ts +15 -0
  190. package/dist/runtime/components/prose/Badge.vue +21 -0
  191. package/dist/runtime/components/prose/Badge.vue.d.ts +13 -0
  192. package/dist/runtime/components/prose/Blockquote.vue +21 -0
  193. package/dist/runtime/components/prose/Blockquote.vue.d.ts +13 -0
  194. package/dist/runtime/components/prose/Callout.vue +60 -0
  195. package/dist/runtime/components/prose/Callout.vue.d.ts +26 -0
  196. package/dist/runtime/components/prose/Card.vue +83 -0
  197. package/dist/runtime/components/prose/Card.vue.d.ts +30 -0
  198. package/dist/runtime/components/prose/CardGroup.vue +21 -0
  199. package/dist/runtime/components/prose/CardGroup.vue.d.ts +13 -0
  200. package/dist/runtime/components/prose/Code.vue +23 -0
  201. package/dist/runtime/components/prose/Code.vue.d.ts +22 -0
  202. package/dist/runtime/components/prose/CodeCollapse.vue +44 -0
  203. package/dist/runtime/components/prose/CodeCollapse.vue.d.ts +46 -0
  204. package/dist/runtime/components/prose/CodeGroup.vue +70 -0
  205. package/dist/runtime/components/prose/CodeGroup.vue.d.ts +37 -0
  206. package/dist/runtime/components/prose/CodeIcon.vue +28 -0
  207. package/dist/runtime/components/prose/CodeIcon.vue.d.ts +24 -0
  208. package/dist/runtime/components/prose/CodePreview.vue +28 -0
  209. package/dist/runtime/components/prose/CodePreview.vue.d.ts +19 -0
  210. package/dist/runtime/components/prose/CodeTree.vue +160 -0
  211. package/dist/runtime/components/prose/CodeTree.vue.d.ts +30 -0
  212. package/dist/runtime/components/prose/Collapsible.vue +41 -0
  213. package/dist/runtime/components/prose/Collapsible.vue.d.ts +38 -0
  214. package/dist/runtime/components/prose/Em.vue +19 -0
  215. package/dist/runtime/components/prose/Em.vue.d.ts +13 -0
  216. package/dist/runtime/components/prose/Field.vue +48 -0
  217. package/dist/runtime/components/prose/Field.vue.d.ts +39 -0
  218. package/dist/runtime/components/prose/FieldGroup.vue +23 -0
  219. package/dist/runtime/components/prose/FieldGroup.vue.d.ts +18 -0
  220. package/dist/runtime/components/prose/H1.vue +28 -0
  221. package/dist/runtime/components/prose/H1.vue.d.ts +19 -0
  222. package/dist/runtime/components/prose/H2.vue +32 -0
  223. package/dist/runtime/components/prose/H2.vue.d.ts +19 -0
  224. package/dist/runtime/components/prose/H3.vue +32 -0
  225. package/dist/runtime/components/prose/H3.vue.d.ts +19 -0
  226. package/dist/runtime/components/prose/H4.vue +28 -0
  227. package/dist/runtime/components/prose/H4.vue.d.ts +19 -0
  228. package/dist/runtime/components/prose/Hr.vue +18 -0
  229. package/dist/runtime/components/prose/Hr.vue.d.ts +5 -0
  230. package/dist/runtime/components/prose/Icon.vue +19 -0
  231. package/dist/runtime/components/prose/Icon.vue.d.ts +6 -0
  232. package/dist/runtime/components/prose/Img.vue +40 -0
  233. package/dist/runtime/components/prose/Img.vue.d.ts +9 -0
  234. package/dist/runtime/components/prose/Kbd.vue +19 -0
  235. package/dist/runtime/components/prose/Kbd.vue.d.ts +6 -0
  236. package/dist/runtime/components/prose/Li.vue +21 -0
  237. package/dist/runtime/components/prose/Li.vue.d.ts +13 -0
  238. package/dist/runtime/components/prose/Ol.vue +21 -0
  239. package/dist/runtime/components/prose/Ol.vue.d.ts +13 -0
  240. package/dist/runtime/components/prose/P.vue +21 -0
  241. package/dist/runtime/components/prose/P.vue.d.ts +13 -0
  242. package/dist/runtime/components/prose/Pre.vue +63 -0
  243. package/dist/runtime/components/prose/Pre.vue.d.ts +25 -0
  244. package/dist/runtime/components/prose/Script.vue +12 -0
  245. package/dist/runtime/components/prose/Script.vue.d.ts +12 -0
  246. package/dist/runtime/components/prose/Steps.vue +22 -0
  247. package/dist/runtime/components/prose/Steps.vue.d.ts +22 -0
  248. package/dist/runtime/components/prose/Strong.vue +21 -0
  249. package/dist/runtime/components/prose/Strong.vue.d.ts +13 -0
  250. package/dist/runtime/components/prose/Table.vue +24 -0
  251. package/dist/runtime/components/prose/Table.vue.d.ts +18 -0
  252. package/dist/runtime/components/prose/Tabs.vue +78 -0
  253. package/dist/runtime/components/prose/Tabs.vue.d.ts +36 -0
  254. package/dist/runtime/components/prose/TabsItem.vue +25 -0
  255. package/dist/runtime/components/prose/TabsItem.vue.d.ts +15 -0
  256. package/dist/runtime/components/prose/Tbody.vue +21 -0
  257. package/dist/runtime/components/prose/Tbody.vue.d.ts +13 -0
  258. package/dist/runtime/components/prose/Td.vue +21 -0
  259. package/dist/runtime/components/prose/Td.vue.d.ts +13 -0
  260. package/dist/runtime/components/prose/Th.vue +21 -0
  261. package/dist/runtime/components/prose/Th.vue.d.ts +13 -0
  262. package/dist/runtime/components/prose/Thead.vue +21 -0
  263. package/dist/runtime/components/prose/Thead.vue.d.ts +13 -0
  264. package/dist/runtime/components/prose/Tr.vue +21 -0
  265. package/dist/runtime/components/prose/Tr.vue.d.ts +13 -0
  266. package/dist/runtime/components/prose/Ul.vue +21 -0
  267. package/dist/runtime/components/prose/Ul.vue.d.ts +13 -0
  268. package/dist/runtime/components/prose/callout/Caution.vue +11 -0
  269. package/dist/runtime/components/prose/callout/Caution.vue.d.ts +14 -0
  270. package/dist/runtime/components/prose/callout/Note.vue +11 -0
  271. package/dist/runtime/components/prose/callout/Note.vue.d.ts +14 -0
  272. package/dist/runtime/components/prose/callout/Tip.vue +11 -0
  273. package/dist/runtime/components/prose/callout/Tip.vue.d.ts +14 -0
  274. package/dist/runtime/components/prose/callout/Warning.vue +11 -0
  275. package/dist/runtime/components/prose/callout/Warning.vue.d.ts +14 -0
  276. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  277. package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
  278. package/dist/runtime/composables/useFormField.d.ts +2 -2
  279. package/dist/runtime/composables/usePortal.d.ts +1 -1
  280. package/dist/runtime/composables/useResizable.d.ts +1 -1
  281. package/dist/runtime/inertia/components/Link.vue +12 -12
  282. package/dist/runtime/inertia/components/LinkBase.vue +15 -15
  283. package/dist/runtime/types/app.config.d.ts +6 -6
  284. package/dist/runtime/types/content.d.ts +4 -1
  285. package/dist/runtime/types/content.js +4 -0
  286. package/dist/runtime/types/index.d.ts +1 -0
  287. package/dist/runtime/types/index.js +1 -0
  288. package/dist/runtime/types/prose.d.ts +42 -1
  289. package/dist/runtime/types/prose.js +42 -0
  290. package/dist/runtime/types/tv.d.ts +2 -2
  291. package/dist/runtime/utils/index.d.ts +1 -1
  292. package/dist/runtime/utils/index.js +13 -4
  293. package/dist/runtime/vue/components/Icon.vue +1 -1
  294. package/dist/runtime/vue/components/Link.vue +31 -31
  295. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +7 -7
  296. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +7 -7
  297. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +7 -7
  298. package/dist/shared/{ui.BcVNrqyb.mjs → ui.DQZ75GCP.mjs} +183 -180
  299. package/dist/unplugin.mjs +9 -9
  300. package/dist/vite.mjs +1 -1
  301. package/package.json +8 -9
  302. package/vue-plugin.d.ts +5 -5
@@ -0,0 +1,60 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/callout";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { useAppConfig } from "#imports";
8
+ import { tv } from "../../utils/tv";
9
+ import ULink from "../Link.vue";
10
+ import UIcon from "../Icon.vue";
11
+ defineOptions({ inheritAttrs: false });
12
+ const props = defineProps({
13
+ to: { type: null, required: false },
14
+ target: { type: [String, Object, null], required: false },
15
+ icon: { type: String, required: false },
16
+ color: { type: null, required: false },
17
+ class: { type: null, required: false },
18
+ ui: { type: null, required: false }
19
+ });
20
+ defineSlots();
21
+ const appConfig = useAppConfig();
22
+ const ui = computed(() => tv({
23
+ extend: tv(theme),
24
+ ...appConfig.ui?.prose?.callout || {}
25
+ })({
26
+ color: props.color,
27
+ to: !!props.to
28
+ }));
29
+ const target = computed(() => props.target || (!!props.to && typeof props.to === "string" && props.to.startsWith("http") ? "_blank" : void 0));
30
+ </script>
31
+
32
+ <template>
33
+ <div :class="ui.base({ class: props.class })">
34
+ <ULink
35
+ v-if="to"
36
+ v-bind="{ to, target, ...$attrs }"
37
+ class="focus:outline-none"
38
+ tabindex="-1"
39
+ raw
40
+ >
41
+ <span
42
+ class="absolute inset-0"
43
+ aria-hidden="true"
44
+ />
45
+ </ULink>
46
+
47
+ <UIcon
48
+ v-if="icon"
49
+ :name="icon"
50
+ :class="ui.icon({ class: props.ui?.icon })"
51
+ />
52
+ <UIcon
53
+ v-if="!!to && target === '_blank'"
54
+ :name="appConfig.ui.icons.external"
55
+ :class="ui.externalIcon({ class: props.ui?.externalIcon })"
56
+ />
57
+
58
+ <slot mdc-unwrap="p" />
59
+ </div>
60
+ </template>
@@ -0,0 +1,26 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import type { LinkProps } from '../Link.vue';
3
+ import theme from '#build/ui/prose/callout';
4
+ import type { ComponentConfig } from '../../types/utils';
5
+ type Callout = ComponentConfig<typeof theme, AppConfig, 'callout', 'ui.prose'>;
6
+ export interface CalloutProps {
7
+ to?: LinkProps['to'];
8
+ target?: LinkProps['target'];
9
+ icon?: string;
10
+ /**
11
+ * @defaultValue 'neutral'
12
+ */
13
+ color?: Callout['variants']['color'];
14
+ class?: any;
15
+ ui?: Callout['slots'];
16
+ }
17
+ export interface CalloutSlots {
18
+ default(props?: {}): any;
19
+ }
20
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CalloutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalloutProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CalloutSlots>;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,83 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/card";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { useAppConfig } from "#imports";
8
+ import { tv } from "../../utils/tv";
9
+ import ULink from "../Link.vue";
10
+ import UIcon from "../Icon.vue";
11
+ defineOptions({ inheritAttrs: false });
12
+ const props = defineProps({
13
+ to: { type: null, required: false },
14
+ target: { type: [String, Object, null], required: false },
15
+ icon: { type: String, required: false },
16
+ title: { type: String, required: false },
17
+ description: { type: String, required: false },
18
+ color: { type: null, required: false, default: "primary" },
19
+ class: { type: null, required: false },
20
+ ui: { type: null, required: false }
21
+ });
22
+ defineSlots();
23
+ const appConfig = useAppConfig();
24
+ const isExternal = computed(() => typeof props.to === "string" && props.to.startsWith("http"));
25
+ const target = computed(() => props.target || (props.to && isExternal.value ? "_blank" : void 0));
26
+ const ariaLabel = computed(() => (props.title || "Card link").trim());
27
+ const ui = computed(
28
+ () => tv({
29
+ extend: tv(theme),
30
+ ...appConfig.ui?.prose?.card || {}
31
+ })({
32
+ color: props.color,
33
+ to: !!props.to,
34
+ title: !!props.title
35
+ })
36
+ );
37
+ </script>
38
+
39
+ <template>
40
+ <div :class="ui.base({ class: props.class })">
41
+ <!-- Clickable Overlay -->
42
+ <ULink
43
+ v-if="to"
44
+ :to="to"
45
+ :target="target"
46
+ :aria-label="ariaLabel"
47
+ class="focus:outline-none"
48
+ tabindex="-1"
49
+ raw
50
+ v-bind="$attrs"
51
+ >
52
+ <span class="absolute inset-0" aria-hidden="true" />
53
+ </ULink>
54
+
55
+ <!-- Icon -->
56
+ <UIcon
57
+ v-if="icon"
58
+ :name="icon"
59
+ :class="ui.icon({ class: props.ui?.icon })"
60
+ />
61
+
62
+ <!-- External Link Icon -->
63
+ <UIcon
64
+ v-if="to && target === '_blank'"
65
+ :name="appConfig.ui.icons.external"
66
+ :class="ui.externalIcon({ class: props.ui?.externalIcon })"
67
+ />
68
+
69
+ <!-- Title -->
70
+ <p v-if="title || $slots.title" :class="ui.title({ class: props.ui?.title })">
71
+ <slot name="title">
72
+ {{ title }}
73
+ </slot>
74
+ </p>
75
+
76
+ <!-- Description / Default Slot -->
77
+ <div v-if="$slots.default || description" :class="ui.description({ class: props.ui?.description })">
78
+ <slot>
79
+ {{ description }}
80
+ </slot>
81
+ </div>
82
+ </div>
83
+ </template>
@@ -0,0 +1,30 @@
1
+ import theme from '#build/ui/prose/card';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ComponentConfig, LinkProps } from '../../types';
4
+ type ProseCard = ComponentConfig<typeof theme, AppConfig, 'card', 'ui.prose'>;
5
+ export interface ProseCardProps {
6
+ to?: LinkProps['to'];
7
+ target?: LinkProps['target'];
8
+ icon?: string;
9
+ title?: string;
10
+ description?: string;
11
+ /**
12
+ * @defaultValue 'primary'
13
+ */
14
+ color?: ProseCard['variants']['color'];
15
+ class?: any;
16
+ ui?: ProseCard['slots'];
17
+ }
18
+ export interface ProseCardSlots {
19
+ default(): any;
20
+ title(): any;
21
+ }
22
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProseCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseCardProps> & Readonly<{}>, {
23
+ color: ProseCard["variants"]["color"];
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseCardSlots>;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,21 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/card-group";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { useAppConfig } from "#imports";
8
+ import { tv } from "../../utils/tv";
9
+ const props = defineProps({
10
+ class: { type: null, required: false }
11
+ });
12
+ defineSlots();
13
+ const appConfig = useAppConfig();
14
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.cardGroup || {} }));
15
+ </script>
16
+
17
+ <template>
18
+ <div :class="ui({ class: props.class })">
19
+ <slot />
20
+ </div>
21
+ </template>
@@ -0,0 +1,13 @@
1
+ export interface ProseCardGroupProps {
2
+ class?: any;
3
+ }
4
+ export interface ProseCardGroupSlots {
5
+ default(props?: {}): any;
6
+ }
7
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProseCardGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseCardGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseCardGroupSlots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,23 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/code";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { useAppConfig } from "#imports";
8
+ import { tv } from "../../utils/tv";
9
+ const props = defineProps({
10
+ lang: { type: String, required: false },
11
+ color: { type: null, required: false },
12
+ class: { type: null, required: false }
13
+ });
14
+ defineSlots();
15
+ const appConfig = useAppConfig();
16
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.code || {} }));
17
+ </script>
18
+
19
+ <template>
20
+ <code :class="ui({ class: (props.class || '').split(',').join(' '), color: props.color })">
21
+ <slot />
22
+ </code>
23
+ </template>
@@ -0,0 +1,22 @@
1
+ import theme from '#build/ui/prose/code';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ComponentConfig } from '../../types';
4
+ type ProseCode = ComponentConfig<typeof theme, AppConfig, 'code', 'ui.prose'>;
5
+ export interface ProseCodeProps {
6
+ lang?: string;
7
+ /**
8
+ * @defaultValue 'neutral'
9
+ */
10
+ color?: ProseCode['variants']['color'];
11
+ class?: any;
12
+ }
13
+ export interface ProseCodeSlots {
14
+ default(props?: {}): any;
15
+ }
16
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProseCodeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseCodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseCodeSlots>;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,44 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/code-collapse";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { useAppConfig } from "#imports";
8
+ import { useLocalePro } from "../../composables/useLocalePro";
9
+ import { tv } from "../../utils/tv";
10
+ const props = defineProps({
11
+ icon: { type: String, required: false },
12
+ name: { type: String, required: false },
13
+ openText: { type: String, required: false },
14
+ closeText: { type: String, required: false },
15
+ class: { type: null, required: false },
16
+ ui: { type: null, required: false }
17
+ });
18
+ defineSlots();
19
+ const open = defineModel("open", { type: Boolean, ...{ default: false } });
20
+ const { t } = useLocalePro();
21
+ const appConfig = useAppConfig();
22
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codeCollapse || {} })({
23
+ open: open.value
24
+ }));
25
+ </script>
26
+
27
+ <template>
28
+ <div :class="ui.root({ class: [props.ui?.root, props.class] })">
29
+ <slot />
30
+
31
+ <div :class="ui.footer({ class: props.ui?.footer })">
32
+ <UButton
33
+ :icon="icon || appConfig.ui.icons.chevronDown"
34
+ color="neutral"
35
+ variant="outline"
36
+ :data-state="open ? 'open' : 'closed'"
37
+ :label="`${open ? props.closeText || t('prose.codeCollapse.closeText') : props.openText || t('prose.codeCollapse.openText')} ${props.name || t('prose.codeCollapse.name')}`"
38
+ :class="ui.trigger({ class: props.ui?.trigger })"
39
+ :ui="{ leadingIcon: ui.triggerIcon({ class: props.ui?.triggerIcon }) }"
40
+ @click="open = !open"
41
+ />
42
+ </div>
43
+ </div>
44
+ </template>
@@ -0,0 +1,46 @@
1
+ import theme from '#build/ui/prose/code-collapse';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ComponentConfig } from '../../types';
4
+ type ProseCodeCollapse = ComponentConfig<typeof theme, AppConfig, 'codeCollapse', 'ui.prose'>;
5
+ export interface ProseCodeCollapseProps {
6
+ /**
7
+ * The icon displayed to toggle the code.
8
+ * @defaultValue appConfig.ui.icons.chevronDown
9
+ */
10
+ icon?: string;
11
+ /**
12
+ * The name displayed in the trigger label.
13
+ * @defaultValue t('prose.codeCollapse.name')
14
+ */
15
+ name?: string;
16
+ /**
17
+ * The text displayed when the code is collapsed.
18
+ * @defaultValue t('prose.codeCollapse.openText')
19
+ */
20
+ openText?: string;
21
+ /**
22
+ * The text displayed when the code is expanded.
23
+ * @defaultValue t('prose.codeCollapse.closeText')
24
+ */
25
+ closeText?: string;
26
+ class?: any;
27
+ ui?: ProseCodeCollapse['slots'];
28
+ }
29
+ export interface ProseCodeCollapseSlots {
30
+ default(props?: {}): any;
31
+ }
32
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProseCodeCollapseProps & {
33
+ open?: boolean;
34
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35
+ "update:open": (value: boolean | undefined) => any;
36
+ }, string, import("vue").PublicProps, Readonly<ProseCodeCollapseProps & {
37
+ open?: boolean;
38
+ }> & Readonly<{
39
+ "onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
40
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseCodeCollapseSlots>;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,70 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/code-group";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed, watch, onMounted, ref, onBeforeUpdate } from "vue";
7
+ import { TabsRoot, TabsList, TabsIndicator, TabsTrigger, TabsContent } from "reka-ui";
8
+ import { useState, useAppConfig } from "#imports";
9
+ import { tv } from "../../utils/tv";
10
+ import CodeIcon from "./CodeIcon.vue";
11
+ const props = defineProps({
12
+ defaultValue: { type: String, required: false, default: "0" },
13
+ sync: { type: String, required: false },
14
+ class: { type: null, required: false },
15
+ ui: { type: null, required: false }
16
+ });
17
+ const slots = defineSlots();
18
+ const model = defineModel({ type: String });
19
+ const appConfig = useAppConfig();
20
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codeGroup || {} })());
21
+ const rerenderCount = ref(1);
22
+ const items = computed(() => {
23
+ const _ = rerenderCount.value;
24
+ return slots.default?.()?.flatMap(transformSlot).filter(Boolean) || [];
25
+ });
26
+ function transformSlot(slot, index) {
27
+ if (typeof slot.type === "symbol") {
28
+ return slot.children?.map(transformSlot);
29
+ }
30
+ return {
31
+ label: slot.props?.filename || slot.props?.label || `${index}`,
32
+ icon: slot.props?.icon,
33
+ component: slot
34
+ };
35
+ }
36
+ onMounted(() => {
37
+ if (props.sync) {
38
+ const syncKey = `code-group-${props.sync}`;
39
+ const syncValue = useState(syncKey, () => localStorage.getItem(syncKey));
40
+ watch(syncValue, () => {
41
+ if (!syncValue.value) return;
42
+ model.value = syncValue.value;
43
+ }, { immediate: true });
44
+ watch(model, () => {
45
+ if (!model.value) return;
46
+ syncValue.value = model.value;
47
+ localStorage.setItem(syncKey, model.value);
48
+ });
49
+ }
50
+ });
51
+ onBeforeUpdate(() => rerenderCount.value++);
52
+ </script>
53
+
54
+ <template>
55
+ <TabsRoot v-model="model" :default-value="defaultValue" :unmount-on-hide="false" :class="ui.root({ class: [props.ui?.root, props.class] })">
56
+ <TabsList :class="ui.list({ class: props.ui?.list })">
57
+ <TabsIndicator :class="ui.indicator({ class: props.ui?.indicator })" />
58
+
59
+ <TabsTrigger v-for="(item, index) of items" :key="index" :value="String(index)" :class="ui.trigger({ class: props.ui?.trigger })">
60
+ <CodeIcon :icon="item.icon" :filename="item.label" :class="ui.triggerIcon({ class: props.ui?.triggerIcon })" />
61
+
62
+ <span :class="ui.triggerLabel({ class: props.ui?.triggerLabel })">{{ item.label }}</span>
63
+ </TabsTrigger>
64
+ </TabsList>
65
+
66
+ <TabsContent v-for="(item, index) of items" :key="index" :value="String(index)" as-child>
67
+ <component :is="item.component" hide-header tabindex="-1" />
68
+ </TabsContent>
69
+ </TabsRoot>
70
+ </template>
@@ -0,0 +1,37 @@
1
+ import theme from '#build/ui/prose/code-group';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ComponentConfig } from '../../types';
4
+ type ProseCodeGroup = ComponentConfig<typeof theme, AppConfig, 'codeGroup', 'ui.prose'>;
5
+ export interface ProseCodeGroupProps {
6
+ /**
7
+ * The default tab to select.
8
+ * @example '1'
9
+ */
10
+ defaultValue?: string;
11
+ /**
12
+ * Sync the selected tab with a local storage key.
13
+ */
14
+ sync?: string;
15
+ class?: any;
16
+ ui?: ProseCodeGroup['slots'];
17
+ }
18
+ export interface ProseCodeGroupSlots {
19
+ default(props?: {}): any;
20
+ }
21
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProseCodeGroupProps & {
22
+ modelValue?: string | undefined;
23
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "update:modelValue": (value: string | undefined) => any;
25
+ }, string, import("vue").PublicProps, Readonly<ProseCodeGroupProps & {
26
+ modelValue?: string | undefined;
27
+ }> & Readonly<{
28
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
29
+ }>, {
30
+ defaultValue: string;
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseCodeGroupSlots>;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,28 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/code-icon";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { defu } from "defu";
8
+ import { useAppConfig } from "#imports";
9
+ const props = defineProps({
10
+ icon: { type: String, required: false },
11
+ filename: { type: String, required: false }
12
+ });
13
+ const appConfig = useAppConfig();
14
+ const icons = computed(() => defu(appConfig.ui?.prose?.codeIcon || {}, theme));
15
+ const iconMap = computed(() => icons.value);
16
+ const icon = computed(() => {
17
+ if (props.icon) return props.icon;
18
+ if (!props.filename) return;
19
+ const cleanFilename = props.filename.replace(/\s*\(.*\)\s*$/, "");
20
+ const extension = cleanFilename.includes(".") ? cleanFilename.split(".").pop() : void 0;
21
+ const name = cleanFilename.split("/").pop()?.toLowerCase();
22
+ return (name && iconMap.value[name]) ?? (extension && (iconMap.value[extension] ?? `i-vscode-icons-file-type-${extension}`));
23
+ });
24
+ </script>
25
+
26
+ <template>
27
+ <UIcon v-if="icon" :name="icon" />
28
+ </template>
@@ -0,0 +1,24 @@
1
+ export interface ProseCodeIconProps {
2
+ icon?: string;
3
+ filename?: string;
4
+ }
5
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ icon: {
7
+ type: StringConstructor;
8
+ required: false;
9
+ };
10
+ filename: {
11
+ type: StringConstructor;
12
+ required: false;
13
+ };
14
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ icon: {
16
+ type: StringConstructor;
17
+ required: false;
18
+ };
19
+ filename: {
20
+ type: StringConstructor;
21
+ required: false;
22
+ };
23
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
24
+ export default _default;
@@ -0,0 +1,28 @@
1
+ <script>
2
+ import theme from "#build/ui/prose/code-preview";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { useAppConfig } from "#imports";
8
+ import { tv } from "../../utils/tv";
9
+ const props = defineProps({
10
+ class: { type: null, required: false },
11
+ ui: { type: null, required: false }
12
+ });
13
+ const slots = defineSlots();
14
+ const appConfig = useAppConfig();
15
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codePreview || {} })({ code: !!slots.code }));
16
+ </script>
17
+
18
+ <template>
19
+ <div :class="ui.root({ class: [props.ui?.root, props.class] })">
20
+ <div :class="ui.preview({ class: [props.ui?.preview] })">
21
+ <slot />
22
+ </div>
23
+
24
+ <div v-if="!!slots.code" :class="ui.code({ class: [props.ui?.code] })">
25
+ <slot name="code" />
26
+ </div>
27
+ </div>
28
+ </template>
@@ -0,0 +1,19 @@
1
+ import theme from '#build/ui/prose/code-preview';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ComponentConfig } from '../../types';
4
+ type ProseCodePreview = ComponentConfig<typeof theme, AppConfig, 'codePreview', 'ui.prose'>;
5
+ export interface ProseCodePreviewProps {
6
+ class?: any;
7
+ ui?: ProseCodePreview['slots'];
8
+ }
9
+ export interface ProseCodePreviewSlots {
10
+ default(props?: {}): any;
11
+ code(props?: {}): any;
12
+ }
13
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProseCodePreviewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseCodePreviewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseCodePreviewSlots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };