@nuxt/ui 3.0.0-alpha.7 → 3.0.0-alpha.8

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 (243) hide show
  1. package/.nuxt/ui/accordion.ts +20 -0
  2. package/.nuxt/ui/alert.ts +242 -0
  3. package/.nuxt/ui/avatar-group.ts +40 -0
  4. package/.nuxt/ui/avatar.ts +42 -0
  5. package/.nuxt/ui/badge.ts +194 -0
  6. package/.nuxt/ui/breadcrumb.ts +45 -0
  7. package/.nuxt/ui/button-group.ts +16 -0
  8. package/.nuxt/ui/button.ts +344 -0
  9. package/.nuxt/ui/card.ts +8 -0
  10. package/.nuxt/ui/carousel.ts +41 -0
  11. package/.nuxt/ui/checkbox.ts +105 -0
  12. package/.nuxt/ui/chip.ts +67 -0
  13. package/.nuxt/ui/collapsible.ts +6 -0
  14. package/.nuxt/ui/command-palette.ts +40 -0
  15. package/.nuxt/ui/container.ts +3 -0
  16. package/.nuxt/ui/context-menu.ts +198 -0
  17. package/.nuxt/ui/drawer.ts +55 -0
  18. package/.nuxt/ui/dropdown-menu.ts +199 -0
  19. package/.nuxt/ui/form-field.ts +40 -0
  20. package/.nuxt/ui/form.ts +3 -0
  21. package/.nuxt/ui/index.ts +43 -0
  22. package/.nuxt/ui/input-menu.ts +411 -0
  23. package/.nuxt/ui/input.ts +263 -0
  24. package/.nuxt/ui/kbd.ts +19 -0
  25. package/.nuxt/ui/link.ts +15 -0
  26. package/.nuxt/ui/modal.ts +28 -0
  27. package/.nuxt/ui/navigation-menu.ts +390 -0
  28. package/.nuxt/ui/pagination.ts +8 -0
  29. package/.nuxt/ui/popover.ts +6 -0
  30. package/.nuxt/ui/progress.ts +258 -0
  31. package/.nuxt/ui/radio-group.ts +112 -0
  32. package/.nuxt/ui/select-menu.ts +321 -0
  33. package/.nuxt/ui/select.ts +314 -0
  34. package/.nuxt/ui/separator.ts +143 -0
  35. package/.nuxt/ui/skeleton.ts +3 -0
  36. package/.nuxt/ui/slideover.ts +63 -0
  37. package/.nuxt/ui/slider.ts +148 -0
  38. package/.nuxt/ui/switch.ts +113 -0
  39. package/.nuxt/ui/table.ts +128 -0
  40. package/.nuxt/ui/tabs.ts +227 -0
  41. package/.nuxt/ui/textarea.ts +263 -0
  42. package/.nuxt/ui/toast.ts +66 -0
  43. package/.nuxt/ui/toaster.ts +75 -0
  44. package/.nuxt/ui/tooltip.ts +9 -0
  45. package/cli/templates.mjs +1 -1
  46. package/dist/chunks/component-meta.cjs +73264 -0
  47. package/dist/chunks/component-meta.mjs +73262 -0
  48. package/dist/client/devtools/200.html +1 -0
  49. package/dist/client/devtools/404.html +1 -0
  50. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
  51. package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
  52. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
  53. package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
  54. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
  55. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
  56. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
  57. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
  58. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
  59. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
  60. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
  61. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
  62. package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
  63. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
  64. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
  65. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
  66. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
  67. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
  68. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
  69. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
  70. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
  71. package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
  72. package/dist/client/devtools/_nuxt/Bj9hdafK.js +1 -0
  73. package/dist/client/devtools/_nuxt/DM3_wAgz.js +62 -0
  74. package/dist/client/devtools/_nuxt/builds/latest.json +1 -0
  75. package/dist/client/devtools/_nuxt/builds/meta/e6b425f7-b919-4014-915b-0ea07c316790.json +1 -0
  76. package/dist/client/devtools/_nuxt/entry.DaJP-ZMB.css +24 -0
  77. package/dist/client/devtools/_nuxt/error-404.B0Nmv3fV.css +1 -0
  78. package/dist/client/devtools/_nuxt/error-500.C8fgTxVz.css +1 -0
  79. package/dist/client/devtools/_nuxt/hKiujHsR.js +1 -0
  80. package/dist/client/devtools/favicon.svg +1 -0
  81. package/dist/client/devtools/index.html +1 -0
  82. package/dist/devtools/runtime/DevtoolsRenderer.vue +53 -0
  83. package/dist/devtools/runtime/examples/AvatarGroupExample.vue +7 -0
  84. package/dist/devtools/runtime/examples/ButtonGroupExample.vue +8 -0
  85. package/dist/devtools/runtime/examples/CardExample.vue +13 -0
  86. package/dist/devtools/runtime/examples/CarouselExample.vue +13 -0
  87. package/dist/devtools/runtime/examples/ChipExample.vue +5 -0
  88. package/dist/devtools/runtime/examples/CollapsibleExample.vue +8 -0
  89. package/dist/devtools/runtime/examples/CommandPaletteExample.vue +29 -0
  90. package/dist/devtools/runtime/examples/ContainerExample.vue +5 -0
  91. package/dist/devtools/runtime/examples/ContextMenuExample.vue +5 -0
  92. package/dist/devtools/runtime/examples/DrawerExample.vue +8 -0
  93. package/dist/devtools/runtime/examples/DropdownMenuExample.vue +5 -0
  94. package/dist/devtools/runtime/examples/FormExample.vue +30 -0
  95. package/dist/devtools/runtime/examples/FormFieldExample.vue +5 -0
  96. package/dist/devtools/runtime/examples/LinkExample.vue +5 -0
  97. package/dist/devtools/runtime/examples/ModalExample.vue +8 -0
  98. package/dist/devtools/runtime/examples/PopoverExample.vue +8 -0
  99. package/dist/devtools/runtime/examples/SkeletonExample.vue +3 -0
  100. package/dist/devtools/runtime/examples/SlideoverExample.vue +8 -0
  101. package/dist/devtools/runtime/examples/ToasterExample.vue +11 -0
  102. package/dist/devtools/runtime/examples/TooltipExample.vue +5 -0
  103. package/dist/module.cjs +222 -4
  104. package/dist/module.d.cts +54 -0
  105. package/dist/module.d.mts +10 -0
  106. package/dist/module.d.ts +10 -0
  107. package/dist/module.json +1 -1
  108. package/dist/module.mjs +157 -2763
  109. package/dist/runtime/components/Accordion.vue +32 -1
  110. package/dist/runtime/components/Alert.vue +4 -0
  111. package/dist/runtime/components/App.vue +8 -0
  112. package/dist/runtime/components/Avatar.vue +23 -5
  113. package/dist/runtime/components/AvatarGroup.vue +3 -0
  114. package/dist/runtime/components/Badge.vue +33 -3
  115. package/dist/runtime/components/Breadcrumb.vue +25 -1
  116. package/dist/runtime/components/Button.vue +6 -1
  117. package/dist/runtime/components/ButtonGroup.vue +4 -1
  118. package/dist/runtime/components/Card.vue +3 -0
  119. package/dist/runtime/components/Carousel.vue +7 -2
  120. package/dist/runtime/components/Checkbox.vue +4 -0
  121. package/dist/runtime/components/Chip.vue +9 -2
  122. package/dist/runtime/components/Collapsible.vue +3 -0
  123. package/dist/runtime/components/CommandPalette.vue +3 -1
  124. package/dist/runtime/components/Container.vue +3 -0
  125. package/dist/runtime/components/ContextMenu.vue +64 -3
  126. package/dist/runtime/components/ContextMenuContent.vue +8 -8
  127. package/dist/runtime/components/Drawer.vue +3 -0
  128. package/dist/runtime/components/DropdownMenu.vue +52 -3
  129. package/dist/runtime/components/DropdownMenuContent.vue +8 -8
  130. package/dist/runtime/components/Form.vue +3 -0
  131. package/dist/runtime/components/FormField.vue +3 -0
  132. package/dist/runtime/components/Input.vue +1 -0
  133. package/dist/runtime/components/InputMenu.vue +23 -12
  134. package/dist/runtime/components/Kbd.vue +2 -0
  135. package/dist/runtime/components/Link.vue +50 -1
  136. package/dist/runtime/components/Modal.vue +3 -0
  137. package/dist/runtime/components/NavigationMenu.vue +91 -44
  138. package/dist/runtime/components/Pagination.vue +5 -1
  139. package/dist/runtime/components/Popover.vue +3 -0
  140. package/dist/runtime/components/Progress.vue +1 -1
  141. package/dist/runtime/components/RadioGroup.vue +4 -1
  142. package/dist/runtime/components/Select.vue +24 -13
  143. package/dist/runtime/components/SelectMenu.vue +29 -17
  144. package/dist/runtime/components/Separator.vue +1 -1
  145. package/dist/runtime/components/Skeleton.vue +3 -0
  146. package/dist/runtime/components/Slideover.vue +3 -0
  147. package/dist/runtime/components/Slider.vue +1 -1
  148. package/dist/runtime/components/Switch.vue +5 -1
  149. package/dist/runtime/components/Table.vue +16 -7
  150. package/dist/runtime/components/Tabs.vue +20 -1
  151. package/dist/runtime/components/Toast.vue +4 -0
  152. package/dist/runtime/components/Toaster.vue +7 -0
  153. package/dist/runtime/components/Tooltip.vue +3 -0
  154. package/dist/runtime/composables/defineShortcuts.js +0 -6
  155. package/dist/runtime/composables/extendDevtoolsMeta.d.ts +7 -0
  156. package/dist/runtime/composables/extendDevtoolsMeta.js +2 -0
  157. package/dist/runtime/composables/useKbd.d.ts +10 -3
  158. package/dist/runtime/composables/useKbd.js +14 -8
  159. package/dist/runtime/types/utils.d.ts +7 -0
  160. package/dist/runtime/utils/index.js +1 -1
  161. package/dist/runtime/utils/link.d.ts +1 -1
  162. package/dist/runtime/vue/components/Icon.vue +15 -0
  163. package/dist/runtime/vue/components/Link.vue +195 -0
  164. package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
  165. package/dist/runtime/vue/plugins/color-mode.js +6 -0
  166. package/dist/runtime/vue/plugins/head.d.ts +4 -0
  167. package/dist/runtime/vue/plugins/head.js +6 -0
  168. package/dist/runtime/vue/stubs.d.ts +15 -0
  169. package/dist/runtime/vue/stubs.js +27 -0
  170. package/dist/shared/ui.BU7wzH0D.cjs +2872 -0
  171. package/dist/shared/ui.BufKhDiD.mjs +2865 -0
  172. package/dist/unplugin.cjs +192 -0
  173. package/dist/unplugin.d.cts +47 -0
  174. package/dist/unplugin.d.mts +47 -0
  175. package/dist/unplugin.d.ts +47 -0
  176. package/dist/unplugin.mjs +181 -0
  177. package/dist/vite.cjs +22 -0
  178. package/dist/vite.d.cts +13 -0
  179. package/dist/vite.d.mts +13 -0
  180. package/dist/vite.d.ts +13 -0
  181. package/dist/vite.mjs +20 -0
  182. package/package.json +68 -30
  183. package/vue-plugin.d.ts +5 -0
  184. package/cli/node_modules/.ignored/citty/LICENSE +0 -36
  185. package/cli/node_modules/.ignored/citty/README.md +0 -134
  186. package/cli/node_modules/.ignored/citty/dist/index.cjs +0 -475
  187. package/cli/node_modules/.ignored/citty/dist/index.d.cts +0 -80
  188. package/cli/node_modules/.ignored/citty/dist/index.d.mts +0 -80
  189. package/cli/node_modules/.ignored/citty/dist/index.d.ts +0 -80
  190. package/cli/node_modules/.ignored/citty/dist/index.mjs +0 -463
  191. package/cli/node_modules/.ignored/citty/package.json +0 -49
  192. package/cli/node_modules/.ignored/consola/LICENSE +0 -47
  193. package/cli/node_modules/.ignored/consola/README.md +0 -318
  194. package/cli/node_modules/.ignored/consola/core.d.ts +0 -1
  195. package/cli/node_modules/.ignored/consola/dist/basic.cjs +0 -32
  196. package/cli/node_modules/.ignored/consola/dist/basic.d.ts +0 -9
  197. package/cli/node_modules/.ignored/consola/dist/basic.mjs +0 -24
  198. package/cli/node_modules/.ignored/consola/dist/browser.cjs +0 -80
  199. package/cli/node_modules/.ignored/consola/dist/browser.d.ts +0 -7
  200. package/cli/node_modules/.ignored/consola/dist/browser.mjs +0 -72
  201. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +0 -436
  202. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +0 -429
  203. package/cli/node_modules/.ignored/consola/dist/core.cjs +0 -415
  204. package/cli/node_modules/.ignored/consola/dist/core.d.ts +0 -124
  205. package/cli/node_modules/.ignored/consola/dist/core.mjs +0 -410
  206. package/cli/node_modules/.ignored/consola/dist/index.cjs +0 -21
  207. package/cli/node_modules/.ignored/consola/dist/index.d.ts +0 -9
  208. package/cli/node_modules/.ignored/consola/dist/index.mjs +0 -8
  209. package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +0 -62
  210. package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +0 -636
  211. package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +0 -645
  212. package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +0 -65
  213. package/cli/node_modules/.ignored/consola/dist/utils.cjs +0 -308
  214. package/cli/node_modules/.ignored/consola/dist/utils.d.ts +0 -169
  215. package/cli/node_modules/.ignored/consola/dist/utils.mjs +0 -284
  216. package/cli/node_modules/.ignored/consola/lib/index.cjs +0 -9
  217. package/cli/node_modules/.ignored/consola/package.json +0 -101
  218. package/cli/node_modules/.ignored/consola/utils.d.ts +0 -1
  219. package/cli/node_modules/.ignored/pathe/LICENSE +0 -44
  220. package/cli/node_modules/.ignored/pathe/README.md +0 -69
  221. package/cli/node_modules/.ignored/pathe/dist/index.cjs +0 -23
  222. package/cli/node_modules/.ignored/pathe/dist/index.d.cts +0 -36
  223. package/cli/node_modules/.ignored/pathe/dist/index.d.mts +0 -36
  224. package/cli/node_modules/.ignored/pathe/dist/index.d.ts +0 -36
  225. package/cli/node_modules/.ignored/pathe/dist/index.mjs +0 -1
  226. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +0 -238
  227. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +0 -221
  228. package/cli/node_modules/.ignored/pathe/dist/utils.cjs +0 -58
  229. package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +0 -5
  230. package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +0 -5
  231. package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +0 -5
  232. package/cli/node_modules/.ignored/pathe/dist/utils.mjs +0 -54
  233. package/cli/node_modules/.ignored/pathe/package.json +0 -48
  234. package/cli/node_modules/.ignored/pathe/utils.d.ts +0 -1
  235. package/cli/node_modules/.ignored/scule/LICENSE +0 -21
  236. package/cli/node_modules/.ignored/scule/README.md +0 -149
  237. package/cli/node_modules/.ignored/scule/dist/index.cjs +0 -92
  238. package/cli/node_modules/.ignored/scule/dist/index.d.cts +0 -57
  239. package/cli/node_modules/.ignored/scule/dist/index.d.mts +0 -57
  240. package/cli/node_modules/.ignored/scule/dist/index.d.ts +0 -57
  241. package/cli/node_modules/.ignored/scule/dist/index.mjs +0 -80
  242. package/cli/node_modules/.ignored/scule/package.json +0 -43
  243. package/cli/node_modules/.package-lock.json +0 -33
@@ -52,8 +52,8 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
52
52
  <DefineItemTemplate v-slot="{ item, active, index }">
53
53
  <slot :name="item.slot || 'item'" :item="(item as T)" :index="index">
54
54
  <slot :name="item.slot ? `${item.slot}-leading`: 'item-leading'" :item="(item as T)" :active="active" :index="index">
55
- <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, loading: true })" />
56
- <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, active })" />
55
+ <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, loading: true })" />
56
+ <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, active })" />
57
57
  <UAvatar v-else-if="item.avatar" :size="((props.uiOverride?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: uiOverride?.itemLeadingAvatar, active })" />
58
58
  </slot>
59
59
 
@@ -62,19 +62,19 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
62
62
  {{ get(item, props.labelKey as string) }}
63
63
  </slot>
64
64
 
65
- <UIcon v-if="item.target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: uiOverride?.itemLabelExternalIcon, active })" />
65
+ <UIcon v-if="item.target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: uiOverride?.itemLabelExternalIcon, color: item?.color, active })" />
66
66
  </span>
67
67
 
68
68
  <span :class="ui.itemTrailing({ class: uiOverride?.itemTrailing })">
69
69
  <slot :name="item.slot ? `${item.slot}-trailing`: 'item-trailing'" :item="(item as T)" :active="active" :index="index">
70
- <UIcon v-if="item.children?.length" :name="appConfig.ui.icons.chevronRight" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, active })" />
70
+ <UIcon v-if="item.children?.length" :name="appConfig.ui.icons.chevronRight" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color, active })" />
71
71
  <span v-else-if="item.kbds?.length" :class="ui.itemTrailingKbds({ class: uiOverride?.itemTrailingKbds })">
72
72
  <UKbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="((props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()) as KbdProps['size'])" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
73
73
  </span>
74
74
  </slot>
75
75
 
76
76
  <ContextMenu.ItemIndicator as-child>
77
- <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon })" />
77
+ <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color })" />
78
78
  </ContextMenu.ItemIndicator>
79
79
  </span>
80
80
  </slot>
@@ -94,7 +94,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
94
94
  type="button"
95
95
  :disabled="item.disabled"
96
96
  :text-value="get(item, props.labelKey as string)"
97
- :class="ui.item({ class: uiOverride?.item })"
97
+ :class="ui.item({ class: uiOverride?.item, color: item?.color })"
98
98
  >
99
99
  <ReuseItemTemplate :item="item" :index="index" />
100
100
  </ContextMenu.SubTrigger>
@@ -122,7 +122,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
122
122
  :checked="item.checked"
123
123
  :disabled="item.disabled"
124
124
  :text-value="get(item, props.labelKey as string)"
125
- :class="ui.item({ class: [uiOverride?.item, item.class] })"
125
+ :class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color })"
126
126
  @update:checked="item.onUpdateChecked"
127
127
  @select="item.onSelect"
128
128
  >
@@ -136,7 +136,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
136
136
  @select="item.onSelect"
137
137
  >
138
138
  <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item as Omit<ContextMenuItem, 'type'>)" custom>
139
- <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.class], active })">
139
+ <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.class], active, color: item?.color })">
140
140
  <ReuseItemTemplate :item="item" :active="active" :index="index" />
141
141
  </ULinkBase>
142
142
  </ULink>
@@ -5,6 +5,7 @@ import type { DialogContentProps } from 'radix-vue'
5
5
  import type { AppConfig } from '@nuxt/schema'
6
6
  import _appConfig from '#build/app.config'
7
7
  import theme from '#build/ui/drawer'
8
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
8
9
 
9
10
  const appConfig = _appConfig as AppConfig & { ui: { drawer: Partial<typeof theme> } }
10
11
 
@@ -51,6 +52,8 @@ export interface DrawerSlots {
51
52
  body(props?: {}): any
52
53
  footer(props?: {}): any
53
54
  }
55
+
56
+ extendDevtoolsMeta({ example: 'DrawerExample' })
54
57
  </script>
55
58
 
56
59
  <script setup lang="ts">
@@ -1,10 +1,10 @@
1
- <!-- eslint-disable vue/block-tag-newline -->
2
1
  <script lang="ts">
3
2
  import { tv, type VariantProps } from 'tailwind-variants'
4
3
  import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuArrowProps } from 'radix-vue'
5
4
  import type { AppConfig } from '@nuxt/schema'
6
5
  import _appConfig from '#build/app.config'
7
6
  import theme from '#build/ui/dropdown-menu'
7
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
8
8
  import type { AvatarProps, KbdProps, LinkProps } from '../types'
9
9
  import type { DynamicSlots, PartialString } from '../types/utils'
10
10
 
@@ -12,9 +12,12 @@ const appConfig = _appConfig as AppConfig & { ui: { dropdownMenu: Partial<typeof
12
12
 
13
13
  const dropdownMenu = tv({ extend: tv(theme), ...(appConfig.ui?.dropdownMenu || {}) })
14
14
 
15
+ type DropdownMenuVariants = VariantProps<typeof dropdownMenu>
16
+
15
17
  export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
16
18
  label?: string
17
19
  icon?: string
20
+ color?: DropdownMenuVariants['color']
18
21
  avatar?: AvatarProps
19
22
  content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'>
20
23
  kbds?: KbdProps['value'][] | KbdProps[]
@@ -34,8 +37,6 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cust
34
37
  onUpdateChecked?(checked: boolean): void
35
38
  }
36
39
 
37
- type DropdownMenuVariants = VariantProps<typeof dropdownMenu>
38
-
39
40
  export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'> {
40
41
  size?: DropdownMenuVariants['size']
41
42
  items?: T[] | T[][]
@@ -86,6 +87,54 @@ export type DropdownMenuSlots<T extends { slot?: string }> = {
86
87
  'item-trailing': SlotProps<T>
87
88
  } & DynamicSlots<T, SlotProps<T>>
88
89
 
90
+ extendDevtoolsMeta({
91
+ example: 'DropdownMenuExample',
92
+ ignoreProps: ['items'],
93
+ defaultProps: {
94
+ items: [
95
+ [{
96
+ label: 'My account',
97
+ avatar: {
98
+ src: 'https://avatars.githubusercontent.com/u/739984?v=4'
99
+ },
100
+ type: 'label'
101
+ }], [{
102
+ label: 'Profile',
103
+ icon: 'i-lucide-user',
104
+ slot: 'custom'
105
+ }, {
106
+ label: 'Billing',
107
+ icon: 'i-lucide-credit-card',
108
+ kbds: ['meta', 'b']
109
+ }, {
110
+ label: 'Settings',
111
+ icon: 'i-lucide-cog',
112
+ kbds: ['?']
113
+ }], [{
114
+ label: 'Invite users',
115
+ icon: 'i-lucide-user-plus',
116
+ children: [[{
117
+ label: 'Invite by email',
118
+ icon: 'i-lucide-send-horizontal'
119
+ }, {
120
+ label: 'Invite by link',
121
+ icon: 'i-lucide-link',
122
+ kbds: ['meta', 'i']
123
+ }]]
124
+ }],
125
+ [{
126
+ label: 'GitHub',
127
+ icon: 'i-simple-icons-github',
128
+ to: 'https://github.com/nuxt/ui',
129
+ target: '_blank'
130
+ }, {
131
+ label: 'Support',
132
+ icon: 'i-lucide-life-buoy',
133
+ to: '/components/dropdown-menu'
134
+ }]
135
+ ]
136
+ }
137
+ })
89
138
  </script>
90
139
 
91
140
  <script setup lang="ts" generic="T extends DropdownMenuItem">
@@ -58,8 +58,8 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
58
58
  <DefineItemTemplate v-slot="{ item, active, index }">
59
59
  <slot :name="item.slot || 'item'" :item="(item as T)" :index="index">
60
60
  <slot :name="item.slot ? `${item.slot}-leading`: 'item-leading'" :item="(item as T)" :active="active" :index="index">
61
- <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, loading: true })" />
62
- <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, active })" />
61
+ <UIcon v-if="item.loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, loading: true })" />
62
+ <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: uiOverride?.itemLeadingIcon, color: item?.color, active })" />
63
63
  <UAvatar v-else-if="item.avatar" :size="((props.uiOverride?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: uiOverride?.itemLeadingAvatar, active })" />
64
64
  </slot>
65
65
 
@@ -68,19 +68,19 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
68
68
  {{ get(item, props.labelKey as string) }}
69
69
  </slot>
70
70
 
71
- <UIcon v-if="item.target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: uiOverride?.itemLabelExternalIcon, active })" />
71
+ <UIcon v-if="item.target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.itemLabelExternalIcon({ class: uiOverride?.itemLabelExternalIcon, color: item?.color, active })" />
72
72
  </span>
73
73
 
74
74
  <span :class="ui.itemTrailing({ class: uiOverride?.itemTrailing })">
75
75
  <slot :name="item.slot ? `${item.slot}-trailing`: 'item-trailing'" :item="(item as T)" :active="active" :index="index">
76
- <UIcon v-if="item.children?.length" :name="appConfig.ui.icons.chevronRight" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, active })" />
76
+ <UIcon v-if="item.children?.length" :name="appConfig.ui.icons.chevronRight" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color, active })" />
77
77
  <span v-else-if="item.kbds?.length" :class="ui.itemTrailingKbds({ class: uiOverride?.itemTrailingKbds })">
78
78
  <UKbd v-for="(kbd, kbdIndex) in item.kbds" :key="kbdIndex" :size="((props.uiOverride?.itemTrailingKbdsSize || ui.itemTrailingKbdsSize()) as KbdProps['size'])" v-bind="typeof kbd === 'string' ? { value: kbd } : kbd" />
79
79
  </span>
80
80
  </slot>
81
81
 
82
82
  <DropdownMenu.ItemIndicator as-child>
83
- <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon })" />
83
+ <UIcon :name="checkedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: uiOverride?.itemTrailingIcon, color: item?.color })" />
84
84
  </DropdownMenu.ItemIndicator>
85
85
  </span>
86
86
  </slot>
@@ -100,7 +100,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
100
100
  type="button"
101
101
  :disabled="item.disabled"
102
102
  :text-value="get(item, props.labelKey as string)"
103
- :class="ui.item({ class: uiOverride?.item })"
103
+ :class="ui.item({ class: uiOverride?.item, color: item?.color })"
104
104
  >
105
105
  <ReuseItemTemplate :item="item" :index="index" />
106
106
  </DropdownMenu.SubTrigger>
@@ -131,7 +131,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
131
131
  :checked="item.checked"
132
132
  :disabled="item.disabled"
133
133
  :text-value="get(item, props.labelKey as string)"
134
- :class="ui.item({ class: [uiOverride?.item, item.class] })"
134
+ :class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color })"
135
135
  @update:checked="item.onUpdateChecked"
136
136
  @select="item.onSelect"
137
137
  >
@@ -145,7 +145,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
145
145
  @select="item.onSelect"
146
146
  >
147
147
  <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item as Omit<DropdownMenuItem, 'type'>)" custom>
148
- <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.class], active })">
148
+ <ULinkBase v-bind="slotProps" :class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color, active })">
149
149
  <ReuseItemTemplate :item="item" :active="active" :index="index" />
150
150
  </ULinkBase>
151
151
  </ULink>
@@ -3,6 +3,7 @@ import { tv } from 'tailwind-variants'
3
3
  import type { AppConfig } from '@nuxt/schema'
4
4
  import _appConfig from '#build/app.config'
5
5
  import theme from '#build/ui/form'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
6
7
  import type { FormSchema, FormError, FormInputEvents, FormErrorEvent, FormSubmitEvent, FormEvent, Form, FormErrorWithId } from '../types/form'
7
8
 
8
9
  const appConfig = _appConfig as AppConfig & { ui: { form: Partial<typeof theme> } }
@@ -29,6 +30,8 @@ export interface FormEmits<T extends object> {
29
30
  export interface FormSlots {
30
31
  default(props?: {}): any
31
32
  }
33
+
34
+ extendDevtoolsMeta({ example: 'FormExample' })
32
35
  </script>
33
36
 
34
37
  <script lang="ts" setup generic="T extends object">
@@ -3,6 +3,7 @@ import { tv, type VariantProps } from 'tailwind-variants'
3
3
  import type { AppConfig } from '@nuxt/schema'
4
4
  import _appConfig from '#build/app.config'
5
5
  import theme from '#build/ui/form-field'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
6
7
 
7
8
  const appConfig = _appConfig as AppConfig & { ui: { formField: Partial<typeof theme> } }
8
9
 
@@ -33,6 +34,8 @@ export interface FormFieldSlots {
33
34
  error(props: { error?: string | boolean }): any
34
35
  default(props: { error?: string | boolean }): any
35
36
  }
37
+
38
+ extendDevtoolsMeta({ example: 'FormFieldExample', defaultProps: { label: 'Label' } })
36
39
  </script>
37
40
 
38
41
  <script setup lang="ts">
@@ -54,6 +54,7 @@ import { useComponentIcons } from '../composables/useComponentIcons'
54
54
  import { useFormField } from '../composables/useFormField'
55
55
  import { looseToNumber } from '../utils'
56
56
  import UIcon from './Icon.vue'
57
+ import UAvatar from './Avatar.vue'
57
58
 
58
59
  defineOptions({ inheritAttrs: false })
59
60
 
@@ -6,8 +6,9 @@ import type { AppConfig } from '@nuxt/schema'
6
6
  import _appConfig from '#build/app.config'
7
7
  import theme from '#build/ui/input-menu'
8
8
  import type { UseComponentIconsProps } from '../composables/useComponentIcons'
9
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
9
10
  import type { AvatarProps, ChipProps, InputProps } from '../types'
10
- import type { AcceptableValue, ArrayOrWrapped, PartialString } from '../types/utils'
11
+ import type { AcceptableValue, ArrayOrWrapped, PartialString, MaybeArrayOfArray, MaybeArrayOfArrayItem, SelectModelValue, SelectModelValueEmits, SelectItemKey } from '../types/utils'
11
12
 
12
13
  const appConfig = _appConfig as AppConfig & { ui: { inputMenu: Partial<typeof theme> } }
13
14
 
@@ -29,7 +30,7 @@ export interface InputMenuItem {
29
30
 
30
31
  type InputMenuVariants = VariantProps<typeof inputMenu>
31
32
 
32
- export interface InputMenuProps<T> extends Pick<ComboboxRootProps<T>, 'modelValue' | 'defaultValue' | 'selectedValue' | 'open' | 'defaultOpen' | 'searchTerm' | 'multiple' | 'disabled' | 'name' | 'resetSearchTermOnBlur'>, UseComponentIconsProps {
33
+ export interface InputMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends MaybeArrayOfArray<InputMenuItem | AcceptableValue> = MaybeArrayOfArray<InputMenuItem | AcceptableValue>, V extends SelectItemKey<T> | undefined = undefined, M extends boolean = false> extends Pick<ComboboxRootProps<T>, 'defaultValue' | 'selectedValue' | 'open' | 'defaultOpen' | 'searchTerm' | 'disabled' | 'name' | 'resetSearchTermOnBlur'>, UseComponentIconsProps {
33
34
  /**
34
35
  * The element or component this component should render as.
35
36
  * @defaultValue 'div'
@@ -86,24 +87,28 @@ export interface InputMenuProps<T> extends Pick<ComboboxRootProps<T>, 'modelValu
86
87
  * When `items` is an array of objects, select the field to use as the value instead of the object itself.
87
88
  * @defaultValue undefined
88
89
  */
89
- valueKey?: keyof T
90
+ valueKey?: V
90
91
  /**
91
92
  * When `items` is an array of objects, select the field to use as the label.
92
93
  * @defaultValue 'label'
93
94
  */
94
95
  labelKey?: keyof T
95
- items?: T[] | T[][]
96
+ items?: I
96
97
  /** Highlight the ring color like a focus state. */
97
98
  highlight?: boolean
98
99
  class?: any
99
100
  ui?: PartialString<typeof inputMenu.slots>
101
+ /** The controlled value of the Combobox. Can be binded-with with `v-model`. */
102
+ modelValue?: SelectModelValue<T, V, M>
103
+ /** Whether multiple options can be selected or not. */
104
+ multiple?: M
100
105
  }
101
106
 
102
- export type InputMenuEmits<T> = ComboboxRootEmits<T> & {
107
+ export type InputMenuEmits<T, V, M extends boolean> = Omit<ComboboxRootEmits<T>, 'update:modelValue'> & {
103
108
  change: [payload: Event]
104
109
  blur: [payload: FocusEvent]
105
110
  focus: [payload: FocusEvent]
106
- }
111
+ } & SelectModelValueEmits<T, V, M>
107
112
 
108
113
  type SlotProps<T> = (props: { item: T, index: number }) => any
109
114
 
@@ -118,13 +123,15 @@ export interface InputMenuSlots<T> {
118
123
  'tags-item-text': SlotProps<T>
119
124
  'tags-item-delete': SlotProps<T>
120
125
  }
126
+
127
+ extendDevtoolsMeta({ defaultProps: { items: ['Option 1', 'Option 2', 'Option 3'] } })
121
128
  </script>
122
129
 
123
- <script setup lang="ts" generic="T extends InputMenuItem | AcceptableValue">
130
+ <script setup lang="ts" generic="T extends MaybeArrayOfArrayItem<I>, I extends MaybeArrayOfArray<InputMenuItem | AcceptableValue> = MaybeArrayOfArray<InputMenuItem | AcceptableValue>, V extends SelectItemKey<T> | undefined = undefined, M extends boolean = false">
124
131
  import { computed, ref, toRef, onMounted } from 'vue'
125
- import { ComboboxRoot, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxPortal, ComboboxContent, ComboboxViewport, ComboboxEmpty, ComboboxGroup, ComboboxLabel, ComboboxSeparator, ComboboxItem, ComboboxItemIndicator, TagsInputRoot, TagsInputItem, TagsInputItemText, TagsInputItemDelete, TagsInputInput, useForwardPropsEmits } from 'radix-vue'
132
+ import { ComboboxRoot, ComboboxArrow, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxPortal, ComboboxContent, ComboboxViewport, ComboboxEmpty, ComboboxGroup, ComboboxLabel, ComboboxSeparator, ComboboxItem, ComboboxItemIndicator, TagsInputRoot, TagsInputItem, TagsInputItemText, TagsInputItemDelete, TagsInputInput, useForwardPropsEmits } from 'radix-vue'
126
133
  import { defu } from 'defu'
127
- import isEqual from 'fast-deep-equal'
134
+ import * as isEqual from 'fast-deep-equal'
128
135
  import { reactivePick } from '@vueuse/core'
129
136
  import { useAppConfig } from '#imports'
130
137
  import { useButtonGroup } from '../composables/useButtonGroup'
@@ -137,14 +144,14 @@ import UChip from './Chip.vue'
137
144
 
138
145
  defineOptions({ inheritAttrs: false })
139
146
 
140
- const props = withDefaults(defineProps<InputMenuProps<T>>(), {
147
+ const props = withDefaults(defineProps<InputMenuProps<T, I, V, M>>(), {
141
148
  type: 'text',
142
149
  autofocusDelay: 0,
143
150
  portal: true,
144
151
  filter: () => ['label'],
145
152
  labelKey: 'label' as keyof T
146
153
  })
147
- const emits = defineEmits<InputMenuEmits<T>>()
154
+ const emits = defineEmits<InputMenuEmits<T, V, M>>()
148
155
  const slots = defineSlots<InputMenuSlots<T>>()
149
156
 
150
157
  const searchTerm = defineModel<string>('searchTerm', { default: '' })
@@ -152,6 +159,8 @@ const searchTerm = defineModel<string>('searchTerm', { default: '' })
152
159
  const appConfig = useAppConfig()
153
160
  const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'selectedValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur'), emits)
154
161
  const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, position: 'popper' }) as ComboboxContentProps)
162
+ const arrowProps = toRef(() => props.arrow as ComboboxArrowProps)
163
+
155
164
  const { emitFormBlur, emitFormChange, emitFormInput, size: formGroupSize, color, id, name, highlight, disabled } = useFormField<InputProps>(props)
156
165
  const { orientation, size: buttonGroupSize } = useButtonGroup<InputProps>(props)
157
166
  const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(toRef(() => defu(props, { trailingIcon: appConfig.ui.icons.chevronDown })))
@@ -171,7 +180,7 @@ const ui = computed(() => inputMenu({
171
180
  }))
172
181
 
173
182
  function displayValue(value: AcceptableValue): string {
174
- const item = items.value.find(item => props.valueKey ? isEqual(get(item as Record<string, any>, props.valueKey as string), value) : isEqual(item, value))
183
+ const item = items.value.find(item => props.valueKey ? isEqual.default(get(item as Record<string, any>, props.valueKey as string), value) : isEqual.default(item, value))
175
184
 
176
185
  return item && (typeof item === 'object' ? get(item, props.labelKey as string) : item)
177
186
  }
@@ -383,6 +392,8 @@ defineExpose({
383
392
  </template>
384
393
  </ComboboxGroup>
385
394
  </ComboboxViewport>
395
+
396
+ <ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
386
397
  </ComboboxContent>
387
398
  </ComboboxPortal>
388
399
  </ComboboxRoot>
@@ -4,6 +4,7 @@ import type { AppConfig } from '@nuxt/schema'
4
4
  import _appConfig from '#build/app.config'
5
5
  import theme from '#build/ui/kbd'
6
6
  import type { KbdKey } from '../composables/useKbd'
7
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
7
8
 
8
9
  const appConfig = _appConfig as AppConfig & { ui: { kbd: Partial<typeof theme> } }
9
10
 
@@ -26,6 +27,7 @@ export interface KbdProps {
26
27
  export interface KbdSlots {
27
28
  default(props?: {}): any
28
29
  }
30
+ extendDevtoolsMeta({ defaultProps: { value: 'K' } })
29
31
  </script>
30
32
 
31
33
  <script setup lang="ts">
@@ -3,8 +3,55 @@ import type { ButtonHTMLAttributes } from 'vue'
3
3
  import { tv } from 'tailwind-variants'
4
4
  import type { AppConfig } from '@nuxt/schema'
5
5
  import _appConfig from '#build/app.config'
6
+ import type { RouterLinkProps, RouteLocationRaw } from 'vue-router'
6
7
  import theme from '#build/ui/link'
7
- import type { NuxtLinkProps } from '#app'
8
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
9
+
10
+ interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
11
+ /**
12
+ * Route Location the link should navigate to when clicked on.
13
+ */
14
+ to?: RouteLocationRaw // need to manually type to avoid breaking typedPages
15
+ /**
16
+ * An alias for `to`. If used with `to`, `href` will be ignored
17
+ */
18
+ href?: NuxtLinkProps['to']
19
+ /**
20
+ * Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
21
+ */
22
+ external?: boolean
23
+ /**
24
+ * Where to display the linked URL, as the name for a browsing context.
25
+ */
26
+ target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null
27
+ /**
28
+ * A rel attribute value to apply on the link. Defaults to "noopener noreferrer" for external links.
29
+ */
30
+ rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {}) | null
31
+ /**
32
+ * If set to true, no rel attribute will be added to the link
33
+ */
34
+ noRel?: boolean
35
+ /**
36
+ * A class to apply to links that have been prefetched.
37
+ */
38
+ prefetchedClass?: string
39
+ /**
40
+ * When enabled will prefetch middleware, layouts and payloads of links in the viewport.
41
+ */
42
+ prefetch?: boolean
43
+ /**
44
+ * Allows controlling when to prefetch links. By default, prefetch is triggered only on visibility.
45
+ */
46
+ prefetchOn?: 'visibility' | 'interaction' | Partial<{
47
+ visibility: boolean
48
+ interaction: boolean
49
+ }>
50
+ /**
51
+ * Escape hatch to disable `prefetch` attribute.
52
+ */
53
+ noPrefetch?: boolean
54
+ }
8
55
 
9
56
  const appConfig = _appConfig as AppConfig & { ui: { link: Partial<typeof theme> } }
10
57
 
@@ -41,6 +88,8 @@ export interface LinkProps extends NuxtLinkProps {
41
88
  export interface LinkSlots {
42
89
  default(props: { active: boolean }): any
43
90
  }
91
+
92
+ extendDevtoolsMeta({ example: 'LinkExample' })
44
93
  </script>
45
94
 
46
95
  <script setup lang="ts">
@@ -4,6 +4,7 @@ import type { DialogRootProps, DialogRootEmits, DialogContentProps } from 'radix
4
4
  import type { AppConfig } from '@nuxt/schema'
5
5
  import _appConfig from '#build/app.config'
6
6
  import theme from '#build/ui/modal'
7
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
7
8
  import type { ButtonProps } from '../types'
8
9
 
9
10
  const appConfig = _appConfig as AppConfig & { ui: { modal: Partial<typeof theme> } }
@@ -67,6 +68,8 @@ export interface ModalSlots {
67
68
  body(props?: {}): any
68
69
  footer(props?: {}): any
69
70
  }
71
+
72
+ extendDevtoolsMeta({ example: 'ModalExample' })
70
73
  </script>
71
74
 
72
75
  <script setup lang="ts">