@eslamdevui/ui 3.2.0-beta.2 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/.nuxt/ui/alert.ts +0 -5
  2. package/.nuxt/ui/badge.ts +0 -5
  3. package/.nuxt/ui/button-group.ts +0 -13
  4. package/.nuxt/ui/button.ts +0 -5
  5. package/.nuxt/ui/carousel.ts +0 -5
  6. package/.nuxt/ui/content-surround.ts +0 -5
  7. package/.nuxt/ui/dashboard-navbar.ts +0 -5
  8. package/.nuxt/ui/dashboard-sidebar-collapse.ts +0 -5
  9. package/.nuxt/ui/dashboard-sidebar-toggle.ts +0 -5
  10. package/.nuxt/ui/dashboard-sidebar.ts +0 -10
  11. package/.nuxt/ui/index.ts +1 -48
  12. package/.nuxt/ui/input-menu.ts +0 -9
  13. package/.nuxt/ui/input-number.ts +0 -5
  14. package/.nuxt/ui/input-tags.ts +0 -9
  15. package/.nuxt/ui/input.ts +0 -9
  16. package/.nuxt/ui/select-menu.ts +0 -9
  17. package/.nuxt/ui/select.ts +0 -9
  18. package/.nuxt/ui/textarea.ts +0 -9
  19. package/.nuxt/ui/toast.ts +0 -5
  20. package/LICENSE.md +9 -9
  21. package/README.md +147 -147
  22. package/cli/commands/make/component.mjs +95 -95
  23. package/cli/commands/make/index.mjs +14 -14
  24. package/cli/commands/make/locale.mjs +64 -64
  25. package/cli/index.mjs +15 -15
  26. package/cli/package.json +13 -13
  27. package/cli/templates.mjs +236 -236
  28. package/cli/utils.mjs +31 -31
  29. package/dist/module.json +1 -1
  30. package/dist/module.mjs +1 -1
  31. package/dist/runtime/components/Accordion.vue +36 -36
  32. package/dist/runtime/components/Alert.vue +46 -46
  33. package/dist/runtime/components/App.vue +10 -10
  34. package/dist/runtime/components/Avatar.vue +27 -27
  35. package/dist/runtime/components/AvatarGroup.vue +4 -4
  36. package/dist/runtime/components/Badge.vue +16 -16
  37. package/dist/runtime/components/Breadcrumb.vue +32 -32
  38. package/dist/runtime/components/Button.vue +28 -28
  39. package/dist/runtime/components/ButtonGroup.vue +3 -3
  40. package/dist/runtime/components/Calendar.vue +74 -74
  41. package/dist/runtime/components/Card.vue +13 -13
  42. package/dist/runtime/components/Carousel.vue +58 -58
  43. package/dist/runtime/components/ChatMessage.vue +35 -35
  44. package/dist/runtime/components/ChatMessages.vue +55 -55
  45. package/dist/runtime/components/ChatPrompt.vue +26 -26
  46. package/dist/runtime/components/ChatPromptSubmit.vue +10 -10
  47. package/dist/runtime/components/Checkbox.vue +33 -33
  48. package/dist/runtime/components/CheckboxGroup.vue +32 -32
  49. package/dist/runtime/components/Chip.vue +11 -11
  50. package/dist/runtime/components/Collapsible.vue +9 -9
  51. package/dist/runtime/components/ColorPicker.vue +30 -30
  52. package/dist/runtime/components/CommandPalette.vue +117 -117
  53. package/dist/runtime/components/Container.vue +3 -3
  54. package/dist/runtime/components/ContextMenu.vue +22 -22
  55. package/dist/runtime/components/ContextMenuContent.vue +105 -105
  56. package/dist/runtime/components/DashboardGroup.vue +3 -3
  57. package/dist/runtime/components/DashboardNavbar.vue +40 -40
  58. package/dist/runtime/components/DashboardPanel.vue +27 -27
  59. package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
  60. package/dist/runtime/components/DashboardSearch.vue +20 -20
  61. package/dist/runtime/components/DashboardSearchButton.vue +43 -43
  62. package/dist/runtime/components/DashboardSidebar.vue +74 -74
  63. package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
  64. package/dist/runtime/components/DashboardSidebarToggle.vue +7 -7
  65. package/dist/runtime/components/Drawer.vue +55 -55
  66. package/dist/runtime/components/DropdownMenu.vue +24 -24
  67. package/dist/runtime/components/DropdownMenuContent.vue +107 -107
  68. package/dist/runtime/components/Error.vue +22 -22
  69. package/dist/runtime/components/Form.vue +8 -8
  70. package/dist/runtime/components/FormField.vue +37 -37
  71. package/dist/runtime/components/Icon.vue +1 -1
  72. package/dist/runtime/components/Input.vue +34 -34
  73. package/dist/runtime/components/InputMenu.vue +163 -163
  74. package/dist/runtime/components/InputNumber.vue +49 -49
  75. package/dist/runtime/components/InputTags.vue +55 -55
  76. package/dist/runtime/components/Kbd.vue +5 -5
  77. package/dist/runtime/components/Link.vue +14 -14
  78. package/dist/runtime/components/LinkBase.vue +8 -8
  79. package/dist/runtime/components/Modal.vue +69 -69
  80. package/dist/runtime/components/NavigationMenu.vue +166 -166
  81. package/dist/runtime/components/OverlayProvider.vue +9 -9
  82. package/dist/runtime/components/Pagination.vue +47 -47
  83. package/dist/runtime/components/PinInput.vue +20 -20
  84. package/dist/runtime/components/Popover.vue +17 -17
  85. package/dist/runtime/components/Progress.vue +19 -19
  86. package/dist/runtime/components/RadioGroup.vue +43 -43
  87. package/dist/runtime/components/Select.vue +96 -96
  88. package/dist/runtime/components/SelectMenu.vue +130 -130
  89. package/dist/runtime/components/Separator.vue +15 -15
  90. package/dist/runtime/components/Skeleton.vue +10 -10
  91. package/dist/runtime/components/Slideover.vue +76 -76
  92. package/dist/runtime/components/Slider.vue +27 -27
  93. package/dist/runtime/components/Stepper.vue +51 -51
  94. package/dist/runtime/components/Switch.vue +33 -33
  95. package/dist/runtime/components/Table.vue +77 -77
  96. package/dist/runtime/components/Tabs.vue +37 -37
  97. package/dist/runtime/components/Textarea.vue +33 -33
  98. package/dist/runtime/components/Timeline.vue +38 -38
  99. package/dist/runtime/components/Toast.vue +69 -69
  100. package/dist/runtime/components/Toaster.vue +28 -28
  101. package/dist/runtime/components/Tooltip.vue +19 -19
  102. package/dist/runtime/components/Tree.vue +60 -60
  103. package/dist/runtime/components/color-mode/ColorModeAvatar.vue +2 -2
  104. package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
  105. package/dist/runtime/components/color-mode/ColorModeImage.vue +2 -2
  106. package/dist/runtime/components/color-mode/ColorModeSelect.vue +19 -19
  107. package/dist/runtime/components/color-mode/ColorModeSwitch.vue +19 -19
  108. package/dist/runtime/components/content/ContentNavigation.vue +109 -109
  109. package/dist/runtime/components/content/ContentSearch.vue +25 -25
  110. package/dist/runtime/components/content/ContentSearchButton.vue +38 -38
  111. package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +12 -12
  112. package/dist/runtime/components/content/ContentSurround.vue +29 -29
  113. package/dist/runtime/components/content/ContentSurround.vue.d.ts +59 -59
  114. package/dist/runtime/components/content/ContentToc.vue +68 -68
  115. package/dist/runtime/components/content/ContentToc.vue.d.ts +88 -88
  116. package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
  117. package/dist/runtime/components/prose/A.vue +3 -3
  118. package/dist/runtime/components/prose/Accordion.vue +5 -5
  119. package/dist/runtime/components/prose/AccordionItem.vue +5 -5
  120. package/dist/runtime/components/prose/Badge.vue +3 -3
  121. package/dist/runtime/components/prose/Blockquote.vue +3 -3
  122. package/dist/runtime/components/prose/Callout.vue +27 -27
  123. package/dist/runtime/components/prose/Card.vue +43 -43
  124. package/dist/runtime/components/prose/CardGroup.vue +3 -3
  125. package/dist/runtime/components/prose/Code.vue +3 -3
  126. package/dist/runtime/components/prose/CodeCollapse.vue +16 -16
  127. package/dist/runtime/components/prose/CodeGroup.vue +15 -15
  128. package/dist/runtime/components/prose/CodeIcon.vue +1 -1
  129. package/dist/runtime/components/prose/CodePreview.vue +9 -9
  130. package/dist/runtime/components/prose/CodeTree.vue +61 -61
  131. package/dist/runtime/components/prose/Collapsible.vue +15 -15
  132. package/dist/runtime/components/prose/Em.vue +1 -1
  133. package/dist/runtime/components/prose/Field.vue +23 -23
  134. package/dist/runtime/components/prose/FieldGroup.vue +3 -3
  135. package/dist/runtime/components/prose/H1.vue +6 -6
  136. package/dist/runtime/components/prose/H2.vue +10 -10
  137. package/dist/runtime/components/prose/H3.vue +10 -10
  138. package/dist/runtime/components/prose/H4.vue +6 -6
  139. package/dist/runtime/components/prose/Hr.vue +1 -1
  140. package/dist/runtime/components/prose/Icon.vue +1 -1
  141. package/dist/runtime/components/prose/Img.vue +8 -8
  142. package/dist/runtime/components/prose/Kbd.vue +1 -1
  143. package/dist/runtime/components/prose/Li.vue +3 -3
  144. package/dist/runtime/components/prose/Ol.vue +3 -3
  145. package/dist/runtime/components/prose/P.vue +3 -3
  146. package/dist/runtime/components/prose/Pre.vue +20 -20
  147. package/dist/runtime/components/prose/Script.vue +3 -3
  148. package/dist/runtime/components/prose/Steps.vue +3 -3
  149. package/dist/runtime/components/prose/Strong.vue +3 -3
  150. package/dist/runtime/components/prose/Table.vue +5 -5
  151. package/dist/runtime/components/prose/Tabs.vue +14 -14
  152. package/dist/runtime/components/prose/TabsItem.vue +5 -5
  153. package/dist/runtime/components/prose/Tbody.vue +3 -3
  154. package/dist/runtime/components/prose/Td.vue +3 -3
  155. package/dist/runtime/components/prose/Th.vue +3 -3
  156. package/dist/runtime/components/prose/Thead.vue +3 -3
  157. package/dist/runtime/components/prose/Tr.vue +3 -3
  158. package/dist/runtime/components/prose/Ul.vue +3 -3
  159. package/dist/runtime/components/prose/callout/Caution.vue +3 -3
  160. package/dist/runtime/components/prose/callout/Note.vue +3 -3
  161. package/dist/runtime/components/prose/callout/Tip.vue +3 -3
  162. package/dist/runtime/components/prose/callout/Warning.vue +3 -3
  163. package/dist/runtime/inertia/components/Link.vue +12 -12
  164. package/dist/runtime/inertia/components/LinkBase.vue +15 -15
  165. package/dist/runtime/types/app.config.d.ts +6 -6
  166. package/dist/runtime/vue/components/Icon.vue +1 -1
  167. package/dist/runtime/vue/components/Link.vue +31 -31
  168. package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +7 -7
  169. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +7 -7
  170. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +7 -7
  171. package/package.json +1 -1
  172. package/vue-plugin.d.ts +5 -5
  173. package/.nuxt/ui/content/content-navigation.ts +0 -339
  174. package/.nuxt/ui/content/content-search-button.ts +0 -6
  175. package/.nuxt/ui/content/content-search.ts +0 -6
  176. package/.nuxt/ui/content/content-surround.ts +0 -39
  177. package/.nuxt/ui/content/content-toc.ts +0 -150
  178. package/.nuxt/ui/content/index.ts +0 -5
  179. package/.nuxt/ui/error.ts +0 -9
  180. package/.nuxt/ui/prose/a.ts +0 -6
  181. package/.nuxt/ui/prose/accordion-item.ts +0 -3
  182. package/.nuxt/ui/prose/accordion.ts +0 -6
  183. package/.nuxt/ui/prose/badge.ts +0 -3
  184. package/.nuxt/ui/prose/blockquote.ts +0 -3
  185. package/.nuxt/ui/prose/callout.ts +0 -129
  186. package/.nuxt/ui/prose/card-group.ts +0 -3
  187. package/.nuxt/ui/prose/card.ts +0 -119
  188. package/.nuxt/ui/prose/code-collapse.ts +0 -19
  189. package/.nuxt/ui/prose/code-group.ts +0 -13
  190. package/.nuxt/ui/prose/code-icon.ts +0 -66
  191. package/.nuxt/ui/prose/code-preview.ts +0 -14
  192. package/.nuxt/ui/prose/code-tree.ts +0 -28
  193. package/.nuxt/ui/prose/code.ts +0 -27
  194. package/.nuxt/ui/prose/collapsible.ts +0 -12
  195. package/.nuxt/ui/prose/em.ts +0 -3
  196. package/.nuxt/ui/prose/field-group.ts +0 -3
  197. package/.nuxt/ui/prose/field.ts +0 -11
  198. package/.nuxt/ui/prose/h1.ts +0 -6
  199. package/.nuxt/ui/prose/h2.ts +0 -14
  200. package/.nuxt/ui/prose/h3.ts +0 -14
  201. package/.nuxt/ui/prose/h4.ts +0 -6
  202. package/.nuxt/ui/prose/hr.ts +0 -3
  203. package/.nuxt/ui/prose/icon.ts +0 -3
  204. package/.nuxt/ui/prose/img.ts +0 -3
  205. package/.nuxt/ui/prose/index.ts +0 -41
  206. package/.nuxt/ui/prose/kbd.ts +0 -3
  207. package/.nuxt/ui/prose/li.ts +0 -3
  208. package/.nuxt/ui/prose/ol.ts +0 -3
  209. package/.nuxt/ui/prose/p.ts +0 -3
  210. package/.nuxt/ui/prose/pre.ts +0 -17
  211. package/.nuxt/ui/prose/steps.ts +0 -19
  212. package/.nuxt/ui/prose/strong.ts +0 -3
  213. package/.nuxt/ui/prose/table.ts +0 -6
  214. package/.nuxt/ui/prose/tabs-item.ts +0 -3
  215. package/.nuxt/ui/prose/tabs.ts +0 -5
  216. package/.nuxt/ui/prose/tbody.ts +0 -3
  217. package/.nuxt/ui/prose/td.ts +0 -3
  218. package/.nuxt/ui/prose/th.ts +0 -3
  219. package/.nuxt/ui/prose/thead.ts +0 -3
  220. package/.nuxt/ui/prose/tr.ts +0 -3
  221. package/.nuxt/ui/prose/ul.ts +0 -3
@@ -60,116 +60,116 @@ const defaultValue = computed(() => {
60
60
  </script>
61
61
 
62
62
  <template>
63
- <DefineLinkTemplate v-slot="{ link, active }">
64
- <slot name="link" :link="link" :active="active">
65
- <slot name="link-leading" :link="link" :active="active">
66
- <UIcon
67
- v-if="link.icon"
68
- :name="link.icon"
69
- :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], active })"
70
- />
71
- </slot>
72
-
73
- <span
74
- v-if="link.title || !!slots['link-title']"
75
- :class="ui.linkTitle({ class: [props.ui?.linkTitle, link.ui?.linkTitle], active })"
76
- >
77
- <slot name="link-title" :link="link" :active="active">
78
- {{ link.title }}
79
- </slot>
80
-
81
- <UIcon
82
- v-if="link.target === '_blank'"
83
- :name="appConfig.ui.icons.external"
84
- :class="ui.linkTitleExternalIcon({ class: [props.ui?.linkTitleExternalIcon, link.ui?.linkTitleExternalIcon], active })"
85
- />
86
- </span>
87
-
88
- <span
89
- v-if="link.badge || link.children?.length && !props.disabled || link.trailingIcon || !!slots['link-trailing']"
90
- :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, link.ui?.linkTrailing] })"
91
- >
92
- <slot name="link-trailing" :link="link" :active="active">
93
- <UBadge
94
- v-if="link.badge"
95
- color="neutral"
96
- variant="outline"
97
- :size="props.ui?.linkTrailingBadgeSize || ui.linkTrailingBadgeSize()"
98
- v-bind="typeof link.badge === 'string' || typeof link.badge === 'number' ? { label: link.badge } : link.badge"
99
- :class="ui.linkTrailingBadge({ class: props.ui?.linkTrailingBadge })"
100
- />
101
-
102
- <UIcon
103
- v-if="link.children?.length && !props.disabled"
104
- :name="link.trailingIcon || props.trailingIcon || appConfig.ui.icons.chevronDown"
105
- :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, link.ui?.linkTrailingIcon] })"
106
- />
107
-
108
- <UIcon
109
- v-else-if="link.trailingIcon"
110
- :name="link.trailingIcon"
111
- :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, link.ui?.linkTrailingIcon] })"
112
- />
113
- </slot>
114
- </span>
115
- </slot>
116
- </DefineLinkTemplate>
117
-
118
- <Primitive :as="props.as" :as-child="props.level > 0" :class="ui.root({ class: [props.ui?.root, props.class] })">
119
- <AccordionRoot
120
- as="ul"
121
- v-bind="rootProps"
122
- :default-value="defaultValue"
123
- :class="props.level > 0 ? ui.listWithChildren({ class: props.ui?.listWithChildren }) : ui.list({ class: props.ui?.list })"
124
- >
125
- <template v-for="(link, index) in props.navigation" :key="index">
126
- <AccordionItem
127
- v-if="link.children?.length"
128
- as="li"
129
- :value="String(index)"
130
- :class="ui.itemWithChildren({ class: [props.ui?.itemWithChildren, link.ui?.itemWithChildren], level: props.level > 0 })"
131
- >
132
- <AccordionTrigger
133
- as="button"
63
+ <DefineLinkTemplate v-slot="{ link, active }">
64
+ <slot name="link" :link="link" :active="active">
65
+ <slot name="link-leading" :link="link" :active="active">
66
+ <UIcon
67
+ v-if="link.icon"
68
+ :name="link.icon"
69
+ :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], active })"
70
+ />
71
+ </slot>
72
+
73
+ <span
74
+ v-if="link.title || !!slots['link-title']"
75
+ :class="ui.linkTitle({ class: [props.ui?.linkTitle, link.ui?.linkTitle], active })"
76
+ >
77
+ <slot name="link-title" :link="link" :active="active">
78
+ {{ link.title }}
79
+ </slot>
80
+
81
+ <UIcon
82
+ v-if="link.target === '_blank'"
83
+ :name="appConfig.ui.icons.external"
84
+ :class="ui.linkTitleExternalIcon({ class: [props.ui?.linkTitleExternalIcon, link.ui?.linkTitleExternalIcon], active })"
85
+ />
86
+ </span>
87
+
88
+ <span
89
+ v-if="link.badge || link.children?.length && !props.disabled || link.trailingIcon || !!slots['link-trailing']"
90
+ :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, link.ui?.linkTrailing] })"
91
+ >
92
+ <slot name="link-trailing" :link="link" :active="active">
93
+ <UBadge
94
+ v-if="link.badge"
95
+ color="neutral"
96
+ variant="outline"
97
+ :size="props.ui?.linkTrailingBadgeSize || ui.linkTrailingBadgeSize()"
98
+ v-bind="typeof link.badge === 'string' || typeof link.badge === 'number' ? { label: link.badge } : link.badge"
99
+ :class="ui.linkTrailingBadge({ class: props.ui?.linkTrailingBadge })"
100
+ />
101
+
102
+ <UIcon
103
+ v-if="link.children?.length && !props.disabled"
104
+ :name="link.trailingIcon || props.trailingIcon || appConfig.ui.icons.chevronDown"
105
+ :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, link.ui?.linkTrailingIcon] })"
106
+ />
107
+
108
+ <UIcon
109
+ v-else-if="link.trailingIcon"
110
+ :name="link.trailingIcon"
111
+ :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, link.ui?.linkTrailingIcon] })"
112
+ />
113
+ </slot>
114
+ </span>
115
+ </slot>
116
+ </DefineLinkTemplate>
117
+
118
+ <Primitive :as="props.as" :as-child="props.level > 0" :class="ui.root({ class: [props.ui?.root, props.class] })">
119
+ <AccordionRoot
120
+ as="ul"
121
+ v-bind="rootProps"
122
+ :default-value="defaultValue"
123
+ :class="props.level > 0 ? ui.listWithChildren({ class: props.ui?.listWithChildren }) : ui.list({ class: props.ui?.list })"
124
+ >
125
+ <template v-for="(link, index) in props.navigation" :key="index">
126
+ <AccordionItem
127
+ v-if="link.children?.length"
128
+ as="li"
129
+ :value="String(index)"
130
+ :class="ui.itemWithChildren({ class: [props.ui?.itemWithChildren, link.ui?.itemWithChildren], level: props.level > 0 })"
131
+ >
132
+ <AccordionTrigger
133
+ as="button"
134
134
  :class="[
135
135
  ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active: link.active, disabled: !!link.disabled }),
136
136
  ui.trigger({ class: [props.ui?.trigger, link.ui?.trigger] })
137
- ]"
138
- >
139
- <ReuseLinkTemplate :link="link" :active="link.active" />
140
- </AccordionTrigger>
141
-
142
- <AccordionContent :class="ui.content({ class: [props.ui?.content, link.ui?.content] })">
143
- <UContentNavigation
144
- v-bind="rootProps"
145
- :navigation="link.children"
146
- :default-open="props.defaultOpen"
147
- :level="props.level + 1"
148
- :trailing-icon="props.trailingIcon"
149
- :color="props.color"
150
- :variant="props.variant"
151
- :highlight="props.highlight"
152
- :highlight-color="props.highlightColor"
153
- :ui="props.ui"
154
- >
155
- <template v-for="(_, name) in slots" #[name]="slotData">
156
- <slot :name="name" :link="slotData.link" :active="slotData.active" />
157
- </template>
158
- </UContentNavigation>
159
- </AccordionContent>
160
- </AccordionItem>
161
-
162
- <li v-else :class="ui.item({ class: [props.ui?.item, link.ui?.item], level: props.level > 0 })">
163
- <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(mapContentNavigationItem(link))" custom>
164
- <ULinkBase
165
- v-bind="slotProps"
166
- :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active, disabled: !!link.disabled, level: props.level > 0 })"
167
- >
168
- <ReuseLinkTemplate :link="link" :active="active" />
169
- </ULinkBase>
170
- </ULink>
171
- </li>
172
- </template>
173
- </AccordionRoot>
174
- </Primitive>
137
+ ]"
138
+ >
139
+ <ReuseLinkTemplate :link="link" :active="link.active" />
140
+ </AccordionTrigger>
141
+
142
+ <AccordionContent :class="ui.content({ class: [props.ui?.content, link.ui?.content] })">
143
+ <UContentNavigation
144
+ v-bind="rootProps"
145
+ :navigation="link.children"
146
+ :default-open="props.defaultOpen"
147
+ :level="props.level + 1"
148
+ :trailing-icon="props.trailingIcon"
149
+ :color="props.color"
150
+ :variant="props.variant"
151
+ :highlight="props.highlight"
152
+ :highlight-color="props.highlightColor"
153
+ :ui="props.ui"
154
+ >
155
+ <template v-for="(_, name) in slots" #[name]="slotData">
156
+ <slot :name="name" :link="slotData.link" :active="slotData.active" />
157
+ </template>
158
+ </UContentNavigation>
159
+ </AccordionContent>
160
+ </AccordionItem>
161
+
162
+ <li v-else :class="ui.item({ class: [props.ui?.item, link.ui?.item], level: props.level > 0 })">
163
+ <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(mapContentNavigationItem(link))" custom>
164
+ <ULinkBase
165
+ v-bind="slotProps"
166
+ :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active, disabled: !!link.disabled, level: props.level > 0 })"
167
+ >
168
+ <ReuseLinkTemplate :link="link" :active="active" />
169
+ </ULinkBase>
170
+ </ULink>
171
+ </li>
172
+ </template>
173
+ </AccordionRoot>
174
+ </Primitive>
175
175
  </template>
@@ -156,29 +156,29 @@ defineExpose({ commandPaletteRef });
156
156
  </script>
157
157
 
158
158
  <template>
159
- <UModal
160
- v-model:open="open"
161
- :title="t('contentSearch.title')"
162
- :description="t('contentSearch.description')"
163
- :class="ui.modal({ class: props.class })"
164
- >
165
- <template #content>
166
- <slot name="content">
167
- <UCommandPalette
168
- ref="commandPaletteRef"
169
- v-model:search-term="searchTerm"
170
- v-bind="commandPaletteProps"
171
- :groups="groups"
172
- :fuse="fuse"
173
- :ui="transformUI(omit(ui, ['modal']), props.ui)"
174
- @update:model-value="onSelect"
175
- @update:open="open = $event"
176
- >
177
- <template v-for="(_, name) in proxySlots" #[name]="slotData">
178
- <slot :name="name" v-bind="slotData" />
179
- </template>
180
- </UCommandPalette>
181
- </slot>
182
- </template>
183
- </UModal>
159
+ <UModal
160
+ v-model:open="open"
161
+ :title="t('contentSearch.title')"
162
+ :description="t('contentSearch.description')"
163
+ :class="ui.modal({ class: props.class })"
164
+ >
165
+ <template #content>
166
+ <slot name="content">
167
+ <UCommandPalette
168
+ ref="commandPaletteRef"
169
+ v-model:search-term="searchTerm"
170
+ v-bind="commandPaletteProps"
171
+ :groups="groups"
172
+ :fuse="fuse"
173
+ :ui="transformUI(omit(ui, ['modal']), props.ui)"
174
+ @update:model-value="onSelect"
175
+ @update:open="open = $event"
176
+ >
177
+ <template v-for="(_, name) in proxySlots" #[name]="slotData">
178
+ <slot :name="name" v-bind="slotData" />
179
+ </template>
180
+ </UCommandPalette>
181
+ </slot>
182
+ </template>
183
+ </UModal>
184
184
  </template>
@@ -47,11 +47,11 @@ const tooltipProps = computed(
47
47
  </script>
48
48
 
49
49
  <template>
50
- <DefineButtonTemplate>
51
- <UButton
52
- :icon="icon || appConfig.ui.icons.search"
53
- :label="label || t('contentSearchButton.label')"
54
- :variant="variant || (collapsed ? 'ghost' : 'outline')"
50
+ <DefineButtonTemplate>
51
+ <UButton
52
+ :icon="icon || appConfig.ui.icons.search"
53
+ :label="label || t('contentSearchButton.label')"
54
+ :variant="variant || (collapsed ? 'ghost' : 'outline')"
55
55
  v-bind="{
56
56
  ...rootProps,
57
57
  ...collapsed ? {
@@ -59,37 +59,37 @@ const tooltipProps = computed(
59
59
  'label': void 0,
60
60
  'aria-label': label || t('contentSearchButton.label')
61
61
  } : {}
62
- }"
63
- :class="ui.base({ class: [props.ui?.base, props.class] })"
64
- :ui="transformUI(ui, props.ui)"
65
- @click="open = true"
66
- >
67
- <template v-for="(_, name) in proxySlots" #[name]="slotData">
68
- <slot :name="name" v-bind="slotData" />
69
- </template>
70
-
71
- <template v-if="!props.collapsed" #trailing>
72
- <div :class="ui.trailing({ class: props.ui?.trailing })">
73
- <slot name="trailing">
74
- <UKbd
75
- v-for="(kbd, index) in props.kbds"
76
- :key="index"
77
- variant="subtle"
78
- v-bind="typeof kbd === 'string' ? { value: kbd } : kbd"
79
- />
80
- </slot>
81
- </div>
82
- </template>
83
- </UButton>
84
- </DefineButtonTemplate>
85
-
86
- <UTooltip
87
- v-if="props.collapsed && props.tooltip"
88
- :text="props.label || t('contentSearchButton.label')"
89
- v-bind="tooltipProps"
90
- >
91
- <ReuseButtonTemplate />
92
- </UTooltip>
93
-
94
- <ReuseButtonTemplate v-else />
62
+ }"
63
+ :class="ui.base({ class: [props.ui?.base, props.class] })"
64
+ :ui="transformUI(ui, props.ui)"
65
+ @click="open = true"
66
+ >
67
+ <template v-for="(_, name) in proxySlots" #[name]="slotData">
68
+ <slot :name="name" v-bind="slotData" />
69
+ </template>
70
+
71
+ <template v-if="!props.collapsed" #trailing>
72
+ <div :class="ui.trailing({ class: props.ui?.trailing })">
73
+ <slot name="trailing">
74
+ <UKbd
75
+ v-for="(kbd, index) in props.kbds"
76
+ :key="index"
77
+ variant="subtle"
78
+ v-bind="typeof kbd === 'string' ? { value: kbd } : kbd"
79
+ />
80
+ </slot>
81
+ </div>
82
+ </template>
83
+ </UButton>
84
+ </DefineButtonTemplate>
85
+
86
+ <UTooltip
87
+ v-if="props.collapsed && props.tooltip"
88
+ :text="props.label || t('contentSearchButton.label')"
89
+ v-bind="tooltipProps"
90
+ >
91
+ <ReuseButtonTemplate />
92
+ </UTooltip>
93
+
94
+ <ReuseButtonTemplate v-else />
95
95
  </template>
@@ -1,12 +1,12 @@
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
- }
12
- }
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
+ }
12
+ }
@@ -29,33 +29,33 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.uiPro?.contentSur
29
29
  </script>
30
30
 
31
31
  <template>
32
- <DefineLinkTemplate v-slot="{ link, icon, direction }">
33
- <ULink v-if="link" :to="link.path" raw :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], direction })">
34
- <slot name="link" :link="link">
35
- <div :class="ui.linkLeading({ class: [props.ui?.linkLeading, link.ui?.linkLeading] })">
36
- <slot name="link-leading" :link="link">
37
- <UIcon :name="link.icon || icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], direction })" />
38
- </slot>
39
- </div>
40
-
41
- <p :class="ui.linkTitle({ class: [props.ui?.linkTitle, link.ui?.linkTitle] })">
42
- <slot name="link-title" :link="link">
43
- {{ link.title }}
44
- </slot>
45
- </p>
46
-
47
- <p :class="ui.linkDescription({ class: [props.ui?.linkDescription, link.ui?.linkDescription] })">
48
- <slot name="link-description" :link="link">
49
- {{ link.description }}
50
- </slot>
51
- </p>
52
- </slot>
53
- </ULink>
54
- <span v-else class="hidden lg:block">&nbsp;</span>
55
- </DefineLinkTemplate>
56
-
57
- <Primitive v-if="surround" :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
58
- <ReuseLinkTemplate :link="surround[0]" :icon="prevIcon || appConfig.ui.icons.arrowLeft" direction="left" />
59
- <ReuseLinkTemplate :link="surround[1]" :icon="nextIcon || appConfig.ui.icons.arrowRight" direction="right" />
60
- </Primitive>
32
+ <DefineLinkTemplate v-slot="{ link, icon, direction }">
33
+ <ULink v-if="link" :to="link.path" raw :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], direction })">
34
+ <slot name="link" :link="link">
35
+ <div :class="ui.linkLeading({ class: [props.ui?.linkLeading, link.ui?.linkLeading] })">
36
+ <slot name="link-leading" :link="link">
37
+ <UIcon :name="link.icon || icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], direction })" />
38
+ </slot>
39
+ </div>
40
+
41
+ <p :class="ui.linkTitle({ class: [props.ui?.linkTitle, link.ui?.linkTitle] })">
42
+ <slot name="link-title" :link="link">
43
+ {{ link.title }}
44
+ </slot>
45
+ </p>
46
+
47
+ <p :class="ui.linkDescription({ class: [props.ui?.linkDescription, link.ui?.linkDescription] })">
48
+ <slot name="link-description" :link="link">
49
+ {{ link.description }}
50
+ </slot>
51
+ </p>
52
+ </slot>
53
+ </ULink>
54
+ <span v-else class="hidden lg:block">&nbsp;</span>
55
+ </DefineLinkTemplate>
56
+
57
+ <Primitive v-if="surround" :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
58
+ <ReuseLinkTemplate :link="surround[0]" :icon="prevIcon || appConfig.ui.icons.arrowLeft" direction="left" />
59
+ <ReuseLinkTemplate :link="surround[1]" :icon="nextIcon || appConfig.ui.icons.arrowRight" direction="right" />
60
+ </Primitive>
61
61
  </template>
@@ -1,59 +1,59 @@
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'>
7
- 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'>
15
- }
16
- 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']
37
- }
38
- type SlotProps<T> = (props: {
39
- link: T
40
- }) => any
41
- 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>
46
- }
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
- } & {}
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'>
7
+ 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'>
15
+ }
16
+ 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']
37
+ }
38
+ type SlotProps<T> = (props: {
39
+ link: T
40
+ }) => any
41
+ 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>
46
+ }
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
+ } & {}