@eslamdevui/ui 3.2.0 → 3.2.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 (186) hide show
  1. package/.nuxt/ui/alert.ts +5 -0
  2. package/.nuxt/ui/auth-form.ts +20 -0
  3. package/.nuxt/ui/badge.ts +5 -0
  4. package/.nuxt/ui/banner.ts +105 -0
  5. package/.nuxt/ui/blog-post.ts +140 -0
  6. package/.nuxt/ui/blog-posts.ts +14 -0
  7. package/.nuxt/ui/button-group.ts +13 -0
  8. package/.nuxt/ui/button.ts +5 -0
  9. package/.nuxt/ui/carousel.ts +5 -0
  10. package/.nuxt/ui/changelog-version.ts +41 -0
  11. package/.nuxt/ui/changelog-versions.ts +8 -0
  12. package/.nuxt/ui/chat-palette.ts +8 -0
  13. package/.nuxt/ui/content/content-navigation.ts +341 -0
  14. package/.nuxt/ui/content/content-search-button.ts +6 -0
  15. package/.nuxt/ui/content/content-search.ts +6 -0
  16. package/.nuxt/ui/content/content-surround.ts +39 -0
  17. package/.nuxt/ui/content/content-toc.ts +150 -0
  18. package/.nuxt/ui/content/index.ts +5 -0
  19. package/.nuxt/ui/content-navigation.ts +6 -4
  20. package/.nuxt/ui/content-surround.ts +5 -0
  21. package/.nuxt/ui/dashboard-navbar.ts +5 -0
  22. package/.nuxt/ui/dashboard-sidebar-collapse.ts +5 -0
  23. package/.nuxt/ui/dashboard-sidebar-toggle.ts +5 -0
  24. package/.nuxt/ui/dashboard-sidebar.ts +10 -0
  25. package/.nuxt/ui/error.ts +9 -0
  26. package/.nuxt/ui/footer-columns.ts +28 -0
  27. package/.nuxt/ui/footer.ts +11 -0
  28. package/.nuxt/ui/header.ts +30 -0
  29. package/.nuxt/ui/index.ts +80 -2
  30. package/.nuxt/ui/input-menu.ts +9 -0
  31. package/.nuxt/ui/input-number.ts +5 -0
  32. package/.nuxt/ui/input-tags.ts +9 -0
  33. package/.nuxt/ui/input.ts +9 -0
  34. package/.nuxt/ui/main.ts +3 -0
  35. package/.nuxt/ui/page-accordion.ts +7 -0
  36. package/.nuxt/ui/page-anchors.ts +30 -0
  37. package/.nuxt/ui/page-aside.ts +10 -0
  38. package/.nuxt/ui/page-body.ts +3 -0
  39. package/.nuxt/ui/page-card.ts +276 -0
  40. package/.nuxt/ui/page-columns.ts +3 -0
  41. package/.nuxt/ui/page-cta.ts +72 -0
  42. package/.nuxt/ui/page-feature.ts +31 -0
  43. package/.nuxt/ui/page-grid.ts +3 -0
  44. package/.nuxt/ui/page-header.ts +18 -0
  45. package/.nuxt/ui/page-hero.ts +46 -0
  46. package/.nuxt/ui/page-links.ts +25 -0
  47. package/.nuxt/ui/page-list.ts +8 -0
  48. package/.nuxt/ui/page-logos.ts +15 -0
  49. package/.nuxt/ui/page-marquee.ts +66 -0
  50. package/.nuxt/ui/page-section.ts +88 -0
  51. package/.nuxt/ui/page.ts +32 -0
  52. package/.nuxt/ui/pricing-plan.ts +101 -0
  53. package/.nuxt/ui/pricing-plans.ts +27 -0
  54. package/.nuxt/ui/pricing-table.ts +51 -0
  55. package/.nuxt/ui/prose/a.ts +6 -0
  56. package/.nuxt/ui/prose/accordion-item.ts +3 -0
  57. package/.nuxt/ui/prose/accordion.ts +6 -0
  58. package/.nuxt/ui/prose/badge.ts +3 -0
  59. package/.nuxt/ui/prose/blockquote.ts +3 -0
  60. package/.nuxt/ui/prose/callout.ts +129 -0
  61. package/.nuxt/ui/prose/card-group.ts +3 -0
  62. package/.nuxt/ui/prose/card.ts +119 -0
  63. package/.nuxt/ui/prose/code-collapse.ts +19 -0
  64. package/.nuxt/ui/prose/code-group.ts +13 -0
  65. package/.nuxt/ui/prose/code-icon.ts +66 -0
  66. package/.nuxt/ui/prose/code-preview.ts +14 -0
  67. package/.nuxt/ui/prose/code-tree.ts +28 -0
  68. package/.nuxt/ui/prose/code.ts +27 -0
  69. package/.nuxt/ui/prose/collapsible.ts +12 -0
  70. package/.nuxt/ui/prose/em.ts +3 -0
  71. package/.nuxt/ui/prose/field-group.ts +3 -0
  72. package/.nuxt/ui/prose/field.ts +11 -0
  73. package/.nuxt/ui/prose/h1.ts +6 -0
  74. package/.nuxt/ui/prose/h2.ts +14 -0
  75. package/.nuxt/ui/prose/h3.ts +14 -0
  76. package/.nuxt/ui/prose/h4.ts +6 -0
  77. package/.nuxt/ui/prose/hr.ts +3 -0
  78. package/.nuxt/ui/prose/icon.ts +3 -0
  79. package/.nuxt/ui/prose/img.ts +3 -0
  80. package/.nuxt/ui/prose/index.ts +41 -0
  81. package/.nuxt/ui/prose/kbd.ts +3 -0
  82. package/.nuxt/ui/prose/li.ts +3 -0
  83. package/.nuxt/ui/prose/ol.ts +3 -0
  84. package/.nuxt/ui/prose/p.ts +3 -0
  85. package/.nuxt/ui/prose/pre.ts +17 -0
  86. package/.nuxt/ui/prose/steps.ts +19 -0
  87. package/.nuxt/ui/prose/strong.ts +3 -0
  88. package/.nuxt/ui/prose/table.ts +6 -0
  89. package/.nuxt/ui/prose/tabs-item.ts +3 -0
  90. package/.nuxt/ui/prose/tabs.ts +5 -0
  91. package/.nuxt/ui/prose/tbody.ts +3 -0
  92. package/.nuxt/ui/prose/td.ts +3 -0
  93. package/.nuxt/ui/prose/th.ts +3 -0
  94. package/.nuxt/ui/prose/thead.ts +3 -0
  95. package/.nuxt/ui/prose/tr.ts +3 -0
  96. package/.nuxt/ui/prose/ul.ts +3 -0
  97. package/.nuxt/ui/select-menu.ts +9 -0
  98. package/.nuxt/ui/select.ts +9 -0
  99. package/.nuxt/ui/textarea.ts +9 -0
  100. package/.nuxt/ui/toast.ts +5 -0
  101. package/.nuxt/ui/user.ts +106 -0
  102. package/dist/module.json +1 -1
  103. package/dist/module.mjs +2 -2
  104. package/dist/runtime/components/AuthForm.vue +195 -0
  105. package/dist/runtime/components/AuthForm.vue.d.ts +85 -0
  106. package/dist/runtime/components/Banner.vue +113 -0
  107. package/dist/runtime/components/Banner.vue.d.ts +68 -0
  108. package/dist/runtime/components/BlogPost.vue +141 -0
  109. package/dist/runtime/components/BlogPost.vue.d.ts +59 -0
  110. package/dist/runtime/components/BlogPosts.vue +33 -0
  111. package/dist/runtime/components/BlogPosts.vue.d.ts +30 -0
  112. package/dist/runtime/components/ChangelogVersion.vue +165 -0
  113. package/dist/runtime/components/ChangelogVersion.vue.d.ts +58 -0
  114. package/dist/runtime/components/ChangelogVersions.vue +54 -0
  115. package/dist/runtime/components/ChangelogVersions.vue.d.ts +74 -0
  116. package/dist/runtime/components/ChatPalette.vue +32 -0
  117. package/dist/runtime/components/ChatPalette.vue.d.ts +24 -0
  118. package/dist/runtime/components/ChatPrompt.vue.d.ts +1 -1
  119. package/dist/runtime/components/CommandPalette.vue.d.ts +3 -3
  120. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -1
  121. package/dist/runtime/components/Error.vue.d.ts +1 -1
  122. package/dist/runtime/components/Footer.vue +44 -0
  123. package/dist/runtime/components/Footer.vue.d.ts +29 -0
  124. package/dist/runtime/components/FooterColumns.vue +68 -0
  125. package/dist/runtime/components/FooterColumns.vue.d.ts +52 -0
  126. package/dist/runtime/components/Header.vue +137 -0
  127. package/dist/runtime/components/Header.vue.d.ts +72 -0
  128. package/dist/runtime/components/InputMenu.vue.d.ts +3 -3
  129. package/dist/runtime/components/Main.vue +23 -0
  130. package/dist/runtime/components/Main.vue.d.ts +20 -0
  131. package/dist/runtime/components/Page.vue +37 -0
  132. package/dist/runtime/components/Page.vue.d.ts +25 -0
  133. package/dist/runtime/components/PageAccordion.vue +26 -0
  134. package/dist/runtime/components/PageAccordion.vue.d.ts +21 -0
  135. package/dist/runtime/components/PageAnchors.vue +50 -0
  136. package/dist/runtime/components/PageAnchors.vue.d.ts +42 -0
  137. package/dist/runtime/components/PageAside.vue +36 -0
  138. package/dist/runtime/components/PageAside.vue.d.ts +27 -0
  139. package/dist/runtime/components/PageBody.vue +23 -0
  140. package/dist/runtime/components/PageBody.vue.d.ts +18 -0
  141. package/dist/runtime/components/PageCTA.vue +58 -0
  142. package/dist/runtime/components/PageCTA.vue.d.ts +49 -0
  143. package/dist/runtime/components/PageCard.vue +121 -0
  144. package/dist/runtime/components/PageCard.vue.d.ts +71 -0
  145. package/dist/runtime/components/PageColumns.vue +23 -0
  146. package/dist/runtime/components/PageColumns.vue.d.ts +18 -0
  147. package/dist/runtime/components/PageFeature.vue +71 -0
  148. package/dist/runtime/components/PageFeature.vue.d.ts +43 -0
  149. package/dist/runtime/components/PageGrid.vue +23 -0
  150. package/dist/runtime/components/PageGrid.vue.d.ts +18 -0
  151. package/dist/runtime/components/PageHeader.vue +58 -0
  152. package/dist/runtime/components/PageHeader.vue.d.ts +35 -0
  153. package/dist/runtime/components/PageHero.vue +67 -0
  154. package/dist/runtime/components/PageHero.vue.d.ts +49 -0
  155. package/dist/runtime/components/PageLinks.vue +55 -0
  156. package/dist/runtime/components/PageLinks.vue.d.ts +44 -0
  157. package/dist/runtime/components/PageList.vue +24 -0
  158. package/dist/runtime/components/PageList.vue.d.ts +21 -0
  159. package/dist/runtime/components/PageLogos.vue +64 -0
  160. package/dist/runtime/components/PageLogos.vue.d.ts +32 -0
  161. package/dist/runtime/components/PageMarquee.vue +40 -0
  162. package/dist/runtime/components/PageMarquee.vue.d.ts +30 -0
  163. package/dist/runtime/components/PageSection.vue +88 -0
  164. package/dist/runtime/components/PageSection.vue.d.ts +64 -0
  165. package/dist/runtime/components/PricingPlan.vue +129 -0
  166. package/dist/runtime/components/PricingPlan.vue.d.ts +109 -0
  167. package/dist/runtime/components/PricingPlans.vue +45 -0
  168. package/dist/runtime/components/PricingPlans.vue.d.ts +41 -0
  169. package/dist/runtime/components/PricingTable.vue +235 -0
  170. package/dist/runtime/components/PricingTable.vue.d.ts +98 -0
  171. package/dist/runtime/components/SelectMenu.vue.d.ts +3 -3
  172. package/dist/runtime/components/Tabs.vue +1 -0
  173. package/dist/runtime/components/User.vue +69 -0
  174. package/dist/runtime/components/User.vue.d.ts +46 -0
  175. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +57 -11
  176. package/dist/runtime/components/content/ContentSurround.vue +2 -2
  177. package/dist/runtime/components/content/ContentSurround.vue.d.ts +45 -52
  178. package/dist/runtime/components/content/ContentToc.vue +27 -15
  179. package/dist/runtime/components/content/ContentToc.vue.d.ts +79 -81
  180. package/dist/runtime/types/index.d.ts +33 -0
  181. package/dist/runtime/types/index.js +33 -0
  182. package/dist/shared/{ui.DQZ75GCP.mjs → ui.DErCA3YU.mjs} +1247 -50
  183. package/dist/unplugin.mjs +1 -1
  184. package/dist/vite.mjs +1 -1
  185. package/package.json +1 -1
  186. package/.nuxt/ui/prose.ts +0 -321
@@ -0,0 +1,98 @@
1
+ import theme from '#build/ui/pricing-table';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ComponentConfig, PricingPlanProps } from '../types';
4
+ type PricingTable = ComponentConfig<typeof theme, AppConfig, 'pricingTable'>;
5
+ type DynamicSlots<T extends {
6
+ id: string;
7
+ }, S extends string | undefined = undefined> = {
8
+ [K in T['id'] as K extends string ? S extends string ? (K | `${K}-${S}`) : K : never]?: (props: {
9
+ tier: Extract<T, {
10
+ id: K extends `${infer Base}-${S}` ? Base : K;
11
+ }>;
12
+ }) => any;
13
+ };
14
+ type FeatureDynamicSlots<T extends PricingTableSectionFeature, S extends string | undefined = undefined> = {
15
+ [K in (T['id'] extends string ? T['id'] : string) as K extends string ? S extends string ? (`feature-${K}` | `feature-${K}-${S}`) : `feature-${K}` : never]?: (props: {
16
+ feature: T;
17
+ tier: PricingTableTier;
18
+ section: PricingTableSection;
19
+ }) => any;
20
+ };
21
+ type SectionDynamicSlots<T extends PricingTableSection, S extends string | undefined = undefined> = {
22
+ [K in (T['id'] extends string ? T['id'] : string) as K extends string ? S extends string ? (`section-${K}` | `section-${K}-${S}`) : `section-${K}` : never]?: (props: {
23
+ section: T;
24
+ }) => any;
25
+ };
26
+ export type PricingTableTier = Pick<PricingPlanProps, 'title' | 'description' | 'badge' | 'billingCycle' | 'billingPeriod' | 'price' | 'discount' | 'button' | 'highlight'> & {
27
+ id: string;
28
+ [key: string]: any;
29
+ };
30
+ export type PricingTableSectionFeature<T extends PricingTableTier = PricingTableTier> = {
31
+ id?: string;
32
+ title: string;
33
+ tiers?: {
34
+ [K in Extract<T['id'], string>]: boolean | number | string;
35
+ } & Record<string, boolean | number | string>;
36
+ };
37
+ export interface PricingTableSection<T extends PricingTableTier = PricingTableTier> {
38
+ id?: string;
39
+ title: string;
40
+ features: PricingTableSectionFeature<T>[];
41
+ }
42
+ export interface PricingTableProps<T extends PricingTableTier = PricingTableTier> {
43
+ /**
44
+ * The element or component this component should render as.
45
+ * @defaultValue 'div'
46
+ */
47
+ as?: any;
48
+ /**
49
+ * The caption to display above the table.
50
+ * @defeaultValue t('pricingTable.caption')
51
+ */
52
+ caption?: string;
53
+ /**
54
+ * The pricing tiers to display in the table.
55
+ * Each tier represents a pricing plan with its own title, description, price, and features.
56
+ */
57
+ tiers: T[];
58
+ /**
59
+ * The sections of features to display in the table.
60
+ * Each section contains a title and a list of features with their availability in each tier.
61
+ */
62
+ sections: PricingTableSection<T>[];
63
+ class?: any;
64
+ ui?: PricingTable['slots'];
65
+ }
66
+ type SlotProps<T extends PricingTableTier> = (props: {
67
+ tier: T;
68
+ }) => any;
69
+ export type PricingTableSlots<T extends PricingTableTier = PricingTableTier> = {
70
+ 'caption': (props?: {}) => any;
71
+ 'tier': SlotProps<T>;
72
+ 'tier-title': SlotProps<T>;
73
+ 'tier-description': SlotProps<T>;
74
+ 'tier-badge': SlotProps<T>;
75
+ 'tier-button': SlotProps<T>;
76
+ 'tier-billing': SlotProps<T>;
77
+ 'tier-discount': SlotProps<T>;
78
+ 'tier-price': SlotProps<T>;
79
+ 'section-title': (props: {
80
+ section: PricingTableSection<T>;
81
+ }) => any;
82
+ 'feature-title': (props: {
83
+ feature: PricingTableSectionFeature<T>;
84
+ section: PricingTableSection<T>;
85
+ }) => any;
86
+ 'feature-value': (props: {
87
+ feature: PricingTableSectionFeature<T>;
88
+ tier: T;
89
+ section: PricingTableSection<T>;
90
+ }) => any;
91
+ } & DynamicSlots<T, 'title' | 'description' | 'badge' | 'button' | 'billing' | 'discount' | 'price'> & FeatureDynamicSlots<PricingTableSectionFeature<T>, 'title' | 'value'> & SectionDynamicSlots<PricingTableSection<T>, 'title'>;
92
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PricingTableProps<PricingTableTier>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PricingTableProps<PricingTableTier>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PricingTableSlots<PricingTableTier>>;
93
+ export default _default;
94
+ type __VLS_WithSlots<T, S> = T & {
95
+ new (): {
96
+ $slots: S;
97
+ };
98
+ };
@@ -175,11 +175,11 @@ declare const _default: <T extends ArrayOrNested<SelectMenuItem>, VK extends Get
175
175
  readonly onFocus?: ((payload: FocusEvent) => any) | undefined;
176
176
  readonly onCreate?: ((item: string) => any) | undefined;
177
177
  readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
178
- readonly "onUpdate:modelValue"?: ((payload: GetModelValue<T, VK, M>) => any) | undefined;
179
178
  readonly onHighlight?: ((payload: {
180
179
  ref: HTMLElement;
181
180
  value: GetModelValue<T, VK, M>;
182
181
  } | undefined) => any) | undefined;
182
+ readonly "onUpdate:modelValue"?: ((payload: GetModelValue<T, VK, M>) => any) | undefined;
183
183
  readonly "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
184
184
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue" | "onHighlight" | "onUpdate:searchTerm" | "onCreate"> & (SelectMenuProps<T, VK, M> & {
185
185
  searchTerm?: string;
@@ -289,10 +289,10 @@ declare const _default: <T extends ArrayOrNested<SelectMenuItem>, VK extends Get
289
289
  }>): void;
290
290
  attrs: any;
291
291
  slots: SelectMenuSlots<T, VK, M, NestedItem<T>>;
292
- emit: (((evt: "blur", payload: FocusEvent) => void) & ((evt: "change", payload: Event) => void) & ((evt: "focus", payload: FocusEvent) => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void) & ((evt: "highlight", payload: {
292
+ emit: (((evt: "blur", payload: FocusEvent) => void) & ((evt: "change", payload: Event) => void) & ((evt: "focus", payload: FocusEvent) => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "highlight", payload: {
293
293
  ref: HTMLElement;
294
294
  value: GetModelValue<T, VK, M>;
295
- } | undefined) => void)) & ((evt: "update:searchTerm", value: string) => void);
295
+ } | undefined) => void) & ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void)) & ((evt: "update:searchTerm", value: string) => void);
296
296
  }>) => import("vue").VNode & {
297
297
  __ctx?: Awaited<typeof __VLS_setup>;
298
298
  };
@@ -54,6 +54,7 @@ defineExpose({
54
54
  v-for="(item, index) of items"
55
55
  :key="index"
56
56
  :ref="(el) => triggersRef[index] = el"
57
+ `
57
58
  :value="item.value || String(index)"
58
59
  :disabled="item.disabled"
59
60
  :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })"
@@ -0,0 +1,69 @@
1
+ <script>
2
+ import theme from "#build/ui/user";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { Primitive } from "reka-ui";
8
+ import { useAppConfig } from "#imports";
9
+ import { tv } from "../utils/tv";
10
+ defineOptions({ inheritAttrs: false });
11
+ const props = defineProps({
12
+ as: { type: null, required: false },
13
+ name: { type: String, required: false },
14
+ description: { type: String, required: false },
15
+ avatar: { type: Object, required: false },
16
+ chip: { type: [Boolean, Object], required: false },
17
+ size: { type: null, required: false },
18
+ orientation: { type: null, required: false, default: "horizontal" },
19
+ to: { type: null, required: false },
20
+ target: { type: [String, Object, null], required: false },
21
+ onClick: { type: Function, required: false },
22
+ class: { type: null, required: false },
23
+ ui: { type: null, required: false }
24
+ });
25
+ const slots = defineSlots();
26
+ const appConfig = useAppConfig();
27
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.user || {} })({
28
+ size: props.size,
29
+ orientation: props.orientation,
30
+ to: !!props.to || !!props.onClick
31
+ }));
32
+ </script>
33
+
34
+ <template>
35
+ <Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="onClick">
36
+ <slot name="avatar">
37
+ <UChip v-if="chip && avatar" inset v-bind="typeof chip === 'object' ? chip : {}" :size="size">
38
+ <UAvatar :alt="name" v-bind="avatar" :size="size" :class="ui.avatar({ class: props.ui?.avatar })" />
39
+ </UChip>
40
+ <UAvatar v-else-if="avatar" :alt="name" v-bind="avatar" :size="size" :class="ui.avatar({ class: props.ui?.avatar })" />
41
+ </slot>
42
+
43
+ <div :class="ui.wrapper({ class: props.ui?.wrapper })">
44
+ <ULink
45
+ v-if="to"
46
+ :aria-label="name"
47
+ v-bind="{ to, target, ...$attrs }"
48
+ class="focus:outline-none peer"
49
+ tabindex="-1"
50
+ raw
51
+ >
52
+ <span class="absolute inset-0" aria-hidden="true" />
53
+ </ULink>
54
+
55
+ <slot>
56
+ <p v-if="name || !!slots.name" :class="ui.name({ class: props.ui?.name })">
57
+ <slot name="name">
58
+ {{ name }}
59
+ </slot>
60
+ </p>
61
+ <p v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
62
+ <slot name="description">
63
+ {{ description }}
64
+ </slot>
65
+ </p>
66
+ </slot>
67
+ </div>
68
+ </Primitive>
69
+ </template>
@@ -0,0 +1,46 @@
1
+ import theme from '#build/ui/user';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { AvatarProps, ChipProps, LinkProps, ComponentConfig } from '../types';
4
+ type User = ComponentConfig<typeof theme, AppConfig, 'user'>;
5
+ export interface UserProps {
6
+ /**
7
+ * The element or component this component should render as.
8
+ * @defaultValue 'div'
9
+ */
10
+ as?: any;
11
+ name?: string;
12
+ description?: string;
13
+ avatar?: Omit<AvatarProps, 'size'> & {
14
+ [key: string]: any;
15
+ };
16
+ chip?: boolean | Omit<ChipProps, 'size' | 'inset'>;
17
+ /**
18
+ * @defaultValue 'md'
19
+ */
20
+ size?: User['variants']['size'];
21
+ /**
22
+ * The orientation of the user.
23
+ * @defaultValue 'horizontal'
24
+ */
25
+ orientation?: User['variants']['orientation'];
26
+ to?: LinkProps['to'];
27
+ target?: LinkProps['target'];
28
+ onClick?: (event: MouseEvent) => void | Promise<void>;
29
+ class?: any;
30
+ ui?: User['slots'];
31
+ }
32
+ export interface UserSlots {
33
+ avatar(props?: {}): any;
34
+ name(props?: {}): any;
35
+ description(props?: {}): any;
36
+ default(props?: {}): any;
37
+ }
38
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<UserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UserProps> & Readonly<{}>, {
39
+ orientation: User["variants"]["orientation"];
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, UserSlots>;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -1,12 +1,58 @@
1
- declare const _default: __VLS_WithSlots<import('vue').DefineComponent<ContentSearchButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContentSearchButtonProps> & Readonly<{}>, {
2
- color: 'error' | 'info' | 'primary' | 'secondary' | 'success' | 'warning' | 'neutral'
3
- collapsed: boolean
4
- tooltip: boolean | TooltipProps
5
- kbds: KbdProps['value'][] | KbdProps[]
6
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, ButtonSlots>
7
- export default _default
8
- type __VLS_WithSlots<T, S> = T & {
9
- new (): {
10
- $slots: S
11
- }
1
+ import theme from '#build/ui/content/content-search-button';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ButtonProps, ButtonSlots, KbdProps, ComponentConfig, TooltipProps } from '../../types';
4
+ type ContentSearchButton = ComponentConfig<typeof theme, AppConfig, 'contentSearchButton'>;
5
+ export interface ContentSearchButtonProps {
6
+ /**
7
+ * The icon displayed in the button.
8
+ * @defaultValue appConfig.ui.icons.search
9
+ * @IconifyIcon
10
+ */
11
+ icon?: string;
12
+ /**
13
+ * The label displayed in the button.
14
+ * @defaultValue t('contentSearchButton.label')
15
+ */
16
+ label?: string;
17
+ /**
18
+ * The color of the button.
19
+ * @defaultValue 'neutral'
20
+ */
21
+ color?: ButtonProps['color'];
22
+ /**
23
+ * The variant of the button.
24
+ * Defaults to 'outline' when not collapsed, 'ghost' when collapsed.
25
+ */
26
+ variant?: ButtonProps['variant'];
27
+ size?: ButtonProps['size'];
28
+ /**
29
+ * Whether the button is collapsed.
30
+ * @defaultValue true
31
+ */
32
+ collapsed?: boolean;
33
+ /**
34
+ * Display a tooltip on the button when is collapsed with the button label.
35
+ * This has priority over the global `tooltip` prop.
36
+ */
37
+ tooltip?: boolean | TooltipProps;
38
+ /**
39
+ * The keyboard keys to display in the button.
40
+ * `{ variant: 'subtle' }`{lang="ts-type"}
41
+ * @defaultValue ['meta', 'k']
42
+ */
43
+ kbds?: KbdProps['value'][] | KbdProps[];
44
+ ui?: ContentSearchButton['slots'] & ButtonProps['ui'];
45
+ class?: any;
12
46
  }
47
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ContentSearchButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContentSearchButtonProps> & Readonly<{}>, {
48
+ color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
49
+ tooltip: boolean | TooltipProps;
50
+ kbds: KbdProps["value"][] | KbdProps[];
51
+ collapsed: boolean;
52
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
53
+ export default _default;
54
+ type __VLS_WithSlots<T, S> = T & {
55
+ new (): {
56
+ $slots: S;
57
+ };
58
+ };
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import theme from "#build/ui-pro/content/content-surround";
2
+ import theme from "#build/ui/content/content-surround";
3
3
  </script>
4
4
 
5
5
  <script setup>
@@ -25,7 +25,7 @@ const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate({
25
25
  direction: String
26
26
  }
27
27
  });
28
- const ui = computed(() => tv({ extend: tv(theme), ...appConfig.uiPro?.contentSurround || {} })());
28
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.contentSurround || {} })());
29
29
  </script>
30
30
 
31
31
  <template>
@@ -1,59 +1,52 @@
1
- import type { ContentNavigationItem } from '@nuxt/content'
2
- import type { AppConfig } from '@nuxt/schema'
3
- import type { ComponentConfig } from '@nuxt/ui'
4
- import type theme from '#build/ui-pro/content/content-surround'
5
-
6
- type ContentSurround = ComponentConfig<typeof theme, AppConfig, 'contentSurround', 'uiPro'>
1
+ import theme from '#build/ui/content/content-surround';
2
+ import type { ContentNavigationItem } from '@nuxt/content';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ import type { ComponentConfig } from '../../types';
5
+ type ContentSurround = ComponentConfig<typeof theme, AppConfig, 'contentSurround'>;
7
6
  export interface ContentSurroundLink extends ContentNavigationItem {
8
- description?: string
9
- /**
10
- * @IconifyIcon
11
- */
12
- icon?: string
13
- class?: any
14
- ui?: Pick<ContentSurround['slots'], 'link' | 'linkLeading' | 'linkLeadingIcon' | 'linkTitle' | 'linkDescription'>
7
+ description?: string;
8
+ /**
9
+ * @IconifyIcon
10
+ */
11
+ icon?: string;
12
+ class?: any;
13
+ ui?: Pick<ContentSurround['slots'], 'link' | 'linkLeading' | 'linkLeadingIcon' | 'linkTitle' | 'linkDescription'>;
15
14
  }
16
15
  export interface ContentSurroundProps<T extends ContentSurroundLink = ContentSurroundLink> {
17
- /**
18
- * The element or component this component should render as.
19
- * @defaultValue 'div'
20
- */
21
- as?: any
22
- /**
23
- * The icon displayed in the prev link.
24
- * @defaultValue appConfig.ui.icons.arrowLeft
25
- * @IconifyIcon
26
- */
27
- prevIcon?: string
28
- /**
29
- * The icon displayed in the next link.
30
- * @defaultValue appConfig.ui.icons.arrowRight
31
- * @IconifyIcon
32
- */
33
- nextIcon?: string
34
- surround?: T[]
35
- class?: any
36
- ui?: ContentSurround['slots']
16
+ /**
17
+ * The element or component this component should render as.
18
+ * @defaultValue 'div'
19
+ */
20
+ as?: any;
21
+ /**
22
+ * The icon displayed in the prev link.
23
+ * @defaultValue appConfig.ui.icons.arrowLeft
24
+ * @IconifyIcon
25
+ */
26
+ prevIcon?: string;
27
+ /**
28
+ * The icon displayed in the next link.
29
+ * @defaultValue appConfig.ui.icons.arrowRight
30
+ * @IconifyIcon
31
+ */
32
+ nextIcon?: string;
33
+ surround?: T[];
34
+ class?: any;
35
+ ui?: ContentSurround['slots'];
37
36
  }
38
37
  type SlotProps<T> = (props: {
39
- link: T
40
- }) => any
38
+ link: T;
39
+ }) => any;
41
40
  export interface ContentSurroundSlots<T extends ContentSurroundLink = ContentSurroundLink> {
42
- 'link': SlotProps<T>
43
- 'link-leading': SlotProps<T>
44
- 'link-title': SlotProps<T>
45
- 'link-description': SlotProps<T>
41
+ 'link': SlotProps<T>;
42
+ 'link-leading': SlotProps<T>;
43
+ 'link-title': SlotProps<T>;
44
+ 'link-description': SlotProps<T>;
46
45
  }
47
- declare const _default: <T extends ContentSurroundLink>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, 'attrs' | 'emit' | 'slots'>>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
48
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & ContentSurroundProps<T> & Partial<{}>> & import('vue').PublicProps
49
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void
50
- attrs: any
51
- slots: ContentSurroundSlots<T>
52
- emit: {}
53
- }>) => import('vue').VNode & {
54
- __ctx?: Awaited<typeof __VLS_setup>
55
- }
56
- export default _default
57
- type __VLS_PrettifyLocal<T> = {
58
- [K in keyof T]: T[K];
59
- } & {}
46
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ContentSurroundProps<ContentSurroundLink>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ContentSurroundProps<ContentSurroundLink>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ContentSurroundSlots<ContentSurroundLink>>;
47
+ export default _default;
48
+ type __VLS_WithSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import theme from "#build/ui-pro/content/content-toc";
2
+ import theme from "#build/ui/content/content-toc";
3
3
  </script>
4
4
 
5
5
  <script setup>
@@ -30,14 +30,9 @@ const { t } = useLocalePro();
30
30
  const router = useRouter();
31
31
  const appConfig = useAppConfig();
32
32
  const { activeHeadings, updateHeadings } = useScrollspy();
33
- const [DefineListTemplate, ReuseListTemplate] = createReusableTemplate({
34
- props: {
35
- links: Array,
36
- level: Number
37
- }
38
- });
33
+ const [DefineListTemplate, ReuseListTemplate] = createReusableTemplate();
39
34
  const [DefineTriggerTemplate, ReuseTriggerTemplate] = createReusableTemplate();
40
- const ui = computed(() => tv({ extend: tv(theme), ...appConfig.uiPro?.contentToc || {} })({
35
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.contentToc || {} })({
41
36
  color: props.color,
42
37
  highlight: props.highlight,
43
38
  highlightColor: props.highlightColor || props.color
@@ -75,11 +70,20 @@ nuxtApp.hooks.hook("page:transition:finish", () => {
75
70
  </script>
76
71
 
77
72
  <template>
78
- <!-- eslint-disable-next-line vue/no-template-shadow -->
79
73
  <DefineListTemplate v-slot="{ links, level }">
80
- <ul :class="level > 0 ? ui.listWithChildren({ class: props.ui?.listWithChildren }) : ui.list({ class: props.ui?.list })">
81
- <li v-for="(link, index) in links" :key="index" :class="link.children && link.children.length > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, link.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, link.ui?.item] })">
82
- <a :href="`#${link.id}`" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active: activeHeadings.includes(link.id) })" @click.prevent="scrollToHeading(link.id)">
74
+ <ul
75
+ :class="level > 0 ? ui.listWithChildren({ class: props.ui?.listWithChildren }) : ui.list({ class: props.ui?.list })"
76
+ >
77
+ <li
78
+ v-for="(link, index) in links"
79
+ :key="index"
80
+ :class="link.children && link.children.length > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, link.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, link.ui?.item] })"
81
+ >
82
+ <a
83
+ :href="`#${link.id}`"
84
+ :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active: activeHeadings.includes(link.id) })"
85
+ @click.prevent="scrollToHeading(link.id)"
86
+ >
83
87
  <slot name="link" :link="link">
84
88
  <span :class="ui.linkText({ class: [props.ui?.linkText, link.ui?.linkText] })">
85
89
  {{ link.text }}
@@ -101,12 +105,20 @@ nuxtApp.hooks.hook("page:transition:finish", () => {
101
105
 
102
106
  <span :class="ui.trailing({ class: props.ui?.trailing })">
103
107
  <slot name="trailing" :open="open">
104
- <UIcon :name="trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
108
+ <UIcon
109
+ :name="trailingIcon || appConfig.ui.icons.chevronDown"
110
+ :class="ui.trailingIcon({ class: props.ui?.trailingIcon })"
111
+ />
105
112
  </slot>
106
113
  </span>
107
114
  </DefineTriggerTemplate>
108
115
 
109
- <CollapsibleRoot v-slot="{ open }" v-bind="rootProps" :default-open="defaultOpen" :class="ui.root({ class: [props.ui?.root, props.class] })">
116
+ <CollapsibleRoot
117
+ v-slot="{ open }"
118
+ v-bind="rootProps"
119
+ :default-open="defaultOpen"
120
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
121
+ >
110
122
  <div :class="ui.container({ class: props.ui?.container })">
111
123
  <div v-if="!!slots.top" :class="ui.top({ class: props.ui?.top })">
112
124
  <slot name="top" :links="links" />
@@ -138,7 +150,7 @@ nuxtApp.hooks.hook("page:transition:finish", () => {
138
150
  </div>
139
151
  </template>
140
152
 
141
- <div v-if="!!slots.bottom" :class="ui.bottom({ class: props.ui?.bottom, body: !!slots.top || !!links?.length })">
153
+ <div v-if="!!slots.bottom" :class="ui.bottom({ class: props.ui?.bottom })">
142
154
  <slot name="bottom" :links="links" />
143
155
  </div>
144
156
  </div>