@nuxt/ui 3.0.0-alpha.6 → 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 (257) 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 +16 -6
  106. package/dist/module.d.ts +16 -6
  107. package/dist/module.json +1 -1
  108. package/dist/module.mjs +157 -2629
  109. package/dist/runtime/components/Accordion.vue +45 -6
  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 +39 -7
  116. package/dist/runtime/components/Button.vue +10 -3
  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 +13 -8
  120. package/dist/runtime/components/Checkbox.vue +7 -6
  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 +28 -17
  124. package/dist/runtime/components/Container.vue +3 -0
  125. package/dist/runtime/components/ContextMenu.vue +95 -10
  126. package/dist/runtime/components/ContextMenuContent.vue +41 -13
  127. package/dist/runtime/components/Drawer.vue +3 -0
  128. package/dist/runtime/components/DropdownMenu.vue +83 -10
  129. package/dist/runtime/components/DropdownMenuContent.vue +43 -13
  130. package/dist/runtime/components/Form.vue +6 -1
  131. package/dist/runtime/components/FormField.vue +3 -0
  132. package/dist/runtime/components/Input.vue +7 -4
  133. package/dist/runtime/components/InputMenu.vue +61 -34
  134. package/dist/runtime/components/Kbd.vue +2 -0
  135. package/dist/runtime/components/Link.vue +50 -1
  136. package/dist/runtime/components/LinkBase.vue +4 -2
  137. package/dist/runtime/components/Modal.vue +3 -0
  138. package/dist/runtime/components/NavigationMenu.vue +159 -75
  139. package/dist/runtime/components/Pagination.vue +5 -1
  140. package/dist/runtime/components/Popover.vue +3 -0
  141. package/dist/runtime/components/Progress.vue +1 -1
  142. package/dist/runtime/components/RadioGroup.vue +26 -4
  143. package/dist/runtime/components/Select.vue +44 -21
  144. package/dist/runtime/components/SelectMenu.vue +67 -43
  145. package/dist/runtime/components/Separator.vue +1 -1
  146. package/dist/runtime/components/Skeleton.vue +3 -0
  147. package/dist/runtime/components/Slideover.vue +3 -0
  148. package/dist/runtime/components/Slider.vue +1 -1
  149. package/dist/runtime/components/Switch.vue +5 -1
  150. package/dist/runtime/components/Table.vue +241 -0
  151. package/dist/runtime/components/Tabs.vue +35 -8
  152. package/dist/runtime/components/Toast.vue +4 -0
  153. package/dist/runtime/components/Toaster.vue +8 -1
  154. package/dist/runtime/components/Tooltip.vue +3 -0
  155. package/dist/runtime/composables/defineShortcuts.js +1 -7
  156. package/dist/runtime/composables/extendDevtoolsMeta.d.ts +7 -0
  157. package/dist/runtime/composables/extendDevtoolsMeta.js +2 -0
  158. package/dist/runtime/composables/useComponentIcons.d.ts +3 -0
  159. package/dist/runtime/composables/useKbd.d.ts +10 -3
  160. package/dist/runtime/composables/useKbd.js +14 -8
  161. package/dist/runtime/composables/useModal.d.ts +1 -1
  162. package/dist/runtime/composables/useSlideover.d.ts +1 -1
  163. package/dist/runtime/index.css +1 -1
  164. package/dist/runtime/keyframes.css +1 -0
  165. package/dist/runtime/types/form.d.ts +2 -1
  166. package/dist/runtime/types/index.d.ts +1 -0
  167. package/dist/runtime/types/index.js +1 -0
  168. package/dist/runtime/types/utils.d.ts +7 -0
  169. package/dist/runtime/utils/form.d.ts +3 -0
  170. package/dist/runtime/utils/form.js +14 -0
  171. package/dist/runtime/utils/index.d.ts +1 -0
  172. package/dist/runtime/utils/index.js +3 -0
  173. package/dist/runtime/utils/link.d.ts +1 -1
  174. package/dist/runtime/vue/components/Icon.vue +15 -0
  175. package/dist/runtime/vue/components/Link.vue +195 -0
  176. package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
  177. package/dist/runtime/vue/plugins/color-mode.js +6 -0
  178. package/dist/runtime/vue/plugins/head.d.ts +4 -0
  179. package/dist/runtime/vue/plugins/head.js +6 -0
  180. package/dist/runtime/vue/stubs.d.ts +15 -0
  181. package/dist/runtime/vue/stubs.js +27 -0
  182. package/dist/shared/ui.BU7wzH0D.cjs +2872 -0
  183. package/dist/shared/ui.BufKhDiD.mjs +2865 -0
  184. package/dist/unplugin.cjs +192 -0
  185. package/dist/unplugin.d.cts +47 -0
  186. package/dist/unplugin.d.mts +47 -0
  187. package/dist/unplugin.d.ts +47 -0
  188. package/dist/unplugin.mjs +181 -0
  189. package/dist/vite.cjs +22 -0
  190. package/dist/vite.d.cts +13 -0
  191. package/dist/vite.d.mts +13 -0
  192. package/dist/vite.d.ts +13 -0
  193. package/dist/vite.mjs +20 -0
  194. package/package.json +73 -32
  195. package/vue-plugin.d.ts +5 -0
  196. package/cli/node_modules/.ignored/citty/LICENSE +0 -36
  197. package/cli/node_modules/.ignored/citty/README.md +0 -134
  198. package/cli/node_modules/.ignored/citty/dist/index.cjs +0 -475
  199. package/cli/node_modules/.ignored/citty/dist/index.d.cts +0 -80
  200. package/cli/node_modules/.ignored/citty/dist/index.d.mts +0 -80
  201. package/cli/node_modules/.ignored/citty/dist/index.d.ts +0 -80
  202. package/cli/node_modules/.ignored/citty/dist/index.mjs +0 -463
  203. package/cli/node_modules/.ignored/citty/package.json +0 -49
  204. package/cli/node_modules/.ignored/consola/LICENSE +0 -47
  205. package/cli/node_modules/.ignored/consola/README.md +0 -318
  206. package/cli/node_modules/.ignored/consola/core.d.ts +0 -1
  207. package/cli/node_modules/.ignored/consola/dist/basic.cjs +0 -32
  208. package/cli/node_modules/.ignored/consola/dist/basic.d.ts +0 -9
  209. package/cli/node_modules/.ignored/consola/dist/basic.mjs +0 -24
  210. package/cli/node_modules/.ignored/consola/dist/browser.cjs +0 -80
  211. package/cli/node_modules/.ignored/consola/dist/browser.d.ts +0 -7
  212. package/cli/node_modules/.ignored/consola/dist/browser.mjs +0 -72
  213. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +0 -436
  214. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +0 -429
  215. package/cli/node_modules/.ignored/consola/dist/core.cjs +0 -415
  216. package/cli/node_modules/.ignored/consola/dist/core.d.ts +0 -124
  217. package/cli/node_modules/.ignored/consola/dist/core.mjs +0 -410
  218. package/cli/node_modules/.ignored/consola/dist/index.cjs +0 -21
  219. package/cli/node_modules/.ignored/consola/dist/index.d.ts +0 -9
  220. package/cli/node_modules/.ignored/consola/dist/index.mjs +0 -8
  221. package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +0 -62
  222. package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +0 -636
  223. package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +0 -645
  224. package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +0 -65
  225. package/cli/node_modules/.ignored/consola/dist/utils.cjs +0 -308
  226. package/cli/node_modules/.ignored/consola/dist/utils.d.ts +0 -169
  227. package/cli/node_modules/.ignored/consola/dist/utils.mjs +0 -284
  228. package/cli/node_modules/.ignored/consola/lib/index.cjs +0 -9
  229. package/cli/node_modules/.ignored/consola/package.json +0 -101
  230. package/cli/node_modules/.ignored/consola/utils.d.ts +0 -1
  231. package/cli/node_modules/.ignored/pathe/LICENSE +0 -44
  232. package/cli/node_modules/.ignored/pathe/README.md +0 -69
  233. package/cli/node_modules/.ignored/pathe/dist/index.cjs +0 -23
  234. package/cli/node_modules/.ignored/pathe/dist/index.d.cts +0 -36
  235. package/cli/node_modules/.ignored/pathe/dist/index.d.mts +0 -36
  236. package/cli/node_modules/.ignored/pathe/dist/index.d.ts +0 -36
  237. package/cli/node_modules/.ignored/pathe/dist/index.mjs +0 -1
  238. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +0 -238
  239. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +0 -221
  240. package/cli/node_modules/.ignored/pathe/dist/utils.cjs +0 -58
  241. package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +0 -5
  242. package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +0 -5
  243. package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +0 -5
  244. package/cli/node_modules/.ignored/pathe/dist/utils.mjs +0 -54
  245. package/cli/node_modules/.ignored/pathe/package.json +0 -48
  246. package/cli/node_modules/.ignored/pathe/utils.d.ts +0 -1
  247. package/cli/node_modules/.ignored/scule/LICENSE +0 -21
  248. package/cli/node_modules/.ignored/scule/README.md +0 -149
  249. package/cli/node_modules/.ignored/scule/dist/index.cjs +0 -92
  250. package/cli/node_modules/.ignored/scule/dist/index.d.cts +0 -57
  251. package/cli/node_modules/.ignored/scule/dist/index.d.mts +0 -57
  252. package/cli/node_modules/.ignored/scule/dist/index.d.ts +0 -57
  253. package/cli/node_modules/.ignored/scule/dist/index.mjs +0 -80
  254. package/cli/node_modules/.ignored/scule/package.json +0 -43
  255. package/cli/node_modules/.package-lock.json +0 -33
  256. package/dist/runtime/types/component.d.ts +0 -17
  257. package/dist/runtime/types/component.js +0 -0
@@ -1,17 +1,17 @@
1
- <!-- eslint-disable vue/block-tag-newline -->
2
1
  <script lang="ts">
3
2
  import { tv } from 'tailwind-variants'
4
- import type { AccordionRootProps, AccordionRootEmits, AccordionItemProps } from 'radix-vue'
3
+ import type { AccordionRootProps, AccordionRootEmits } 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/accordion'
7
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
8
8
  import type { DynamicSlots } from '../types/utils'
9
9
 
10
10
  const appConfig = _appConfig as AppConfig & { ui: { accordion: Partial<typeof theme> } }
11
11
 
12
12
  const accordion = tv({ extend: tv(theme), ...(appConfig.ui?.accordion || {}) })
13
13
 
14
- export interface AccordionItem extends Pick<AccordionItemProps, 'disabled'> {
14
+ export interface AccordionItem {
15
15
  label?: string
16
16
  icon?: string
17
17
  trailingIcon?: string
@@ -19,6 +19,7 @@ export interface AccordionItem extends Pick<AccordionItemProps, 'disabled'> {
19
19
  content?: string
20
20
  /** A unique value for the accordion item. Defaults to the index. */
21
21
  value?: string
22
+ disabled?: boolean
22
23
  }
23
24
 
24
25
  export interface AccordionProps<T> extends Pick<AccordionRootProps, 'collapsible' | 'defaultValue' | 'modelValue' | 'type' | 'disabled'> {
@@ -33,6 +34,11 @@ export interface AccordionProps<T> extends Pick<AccordionRootProps, 'collapsible
33
34
  * @defaultValue appConfig.ui.icons.chevronDown
34
35
  */
35
36
  trailingIcon?: string
37
+ /**
38
+ * The key used to get the label from the item.
39
+ * @defaultValue 'label'
40
+ */
41
+ labelKey?: string
36
42
  class?: any
37
43
  ui?: Partial<typeof accordion.slots>
38
44
  }
@@ -49,6 +55,36 @@ export type AccordionSlots<T extends { slot?: string }> = {
49
55
  body: SlotProps<T>
50
56
  } & DynamicSlots<T, SlotProps<T>>
51
57
 
58
+ extendDevtoolsMeta({
59
+ defaultProps: {
60
+ items: [{
61
+ label: 'Getting Started',
62
+ icon: 'i-lucide-info',
63
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.'
64
+ }, {
65
+ label: 'Installation',
66
+ icon: 'i-lucide-download',
67
+ disabled: true,
68
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.'
69
+ }, {
70
+ label: 'Theming',
71
+ icon: 'i-lucide-pipette',
72
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.'
73
+ }, {
74
+ label: 'Layouts',
75
+ icon: 'i-lucide-layout-dashboard',
76
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.'
77
+ }, {
78
+ label: 'Components',
79
+ icon: 'i-lucide-layers-3',
80
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.'
81
+ }, {
82
+ label: 'Utilities',
83
+ icon: 'i-lucide-wrench',
84
+ content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.'
85
+ }]
86
+ }
87
+ })
52
88
  </script>
53
89
 
54
90
  <script setup lang="ts" generic="T extends AccordionItem">
@@ -56,10 +92,13 @@ import { computed } from 'vue'
56
92
  import { AccordionRoot, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent, useForwardPropsEmits } from 'radix-vue'
57
93
  import { reactivePick } from '@vueuse/core'
58
94
  import { useAppConfig } from '#imports'
95
+ import { get } from '../utils'
96
+ import UIcon from './Icon.vue'
59
97
 
60
98
  const props = withDefaults(defineProps<AccordionProps<T>>(), {
61
99
  type: 'single',
62
- collapsible: true
100
+ collapsible: true,
101
+ labelKey: 'label'
63
102
  })
64
103
  const emits = defineEmits<AccordionEmits>()
65
104
  const slots = defineSlots<AccordionSlots<T>>()
@@ -88,8 +127,8 @@ const ui = computed(() => accordion({
88
127
  <UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
89
128
  </slot>
90
129
 
91
- <span v-if="item.label || !!slots.default" :class="ui.label({ class: props.ui?.label })">
92
- <slot :item="item" :index="index" :open="open">{{ item.label }}</slot>
130
+ <span v-if="get(item, props.labelKey as string) || !!slots.default" :class="ui.label({ class: props.ui?.label })">
131
+ <slot :item="item" :index="index" :open="open">{{ get(item, props.labelKey as string) }}</slot>
93
132
  </span>
94
133
 
95
134
  <slot name="trailing" :item="item" :index="index" :open="open">
@@ -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/alert'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
6
7
  import type { AvatarProps, ButtonProps } from '../types'
7
8
 
8
9
  const appConfig = _appConfig as AppConfig & { ui: { alert: Partial<typeof theme> } }
@@ -56,6 +57,8 @@ export interface AlertSlots {
56
57
  actions(props?: {}): any
57
58
  close(props: { ui: any }): any
58
59
  }
60
+
61
+ extendDevtoolsMeta<AlertProps>({ defaultProps: { title: 'Heads up!' } })
59
62
  </script>
60
63
 
61
64
  <script setup lang="ts">
@@ -64,6 +67,7 @@ import { Primitive } from 'radix-vue'
64
67
  import { useAppConfig } from '#imports'
65
68
  import UIcon from './Icon.vue'
66
69
  import UAvatar from './Avatar.vue'
70
+ import UButton from './Button.vue'
67
71
 
68
72
  const props = defineProps<AlertProps>()
69
73
  const emits = defineEmits<AlertEmits>()
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import type { ConfigProviderProps, TooltipProviderProps } from 'radix-vue'
3
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
3
4
  import type { ToasterProps } from '../types'
4
5
 
5
6
  export interface AppProps extends Omit<ConfigProviderProps, 'useId'> {
@@ -10,6 +11,12 @@ export interface AppProps extends Omit<ConfigProviderProps, 'useId'> {
10
11
  export interface AppSlots {
11
12
  default(props?: {}): any
12
13
  }
14
+
15
+ export default {
16
+ name: 'App'
17
+ }
18
+
19
+ extendDevtoolsMeta({ ignore: true })
13
20
  </script>
14
21
 
15
22
  <script setup lang="ts">
@@ -34,6 +41,7 @@ const toasterProps = toRef(() => props.toaster)
34
41
  <UToaster v-if="toaster !== null" v-bind="toasterProps">
35
42
  <slot />
36
43
  </UToaster>
44
+ <slot v-else />
37
45
  </TooltipProvider>
38
46
 
39
47
  <UModalProvider />
@@ -2,6 +2,7 @@
2
2
  import { tv, type VariantProps } from 'tailwind-variants'
3
3
  import type { AvatarFallbackProps } from 'radix-vue'
4
4
  import type { AppConfig } from '@nuxt/schema'
5
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
5
6
  import _appConfig from '#build/app.config'
6
7
  import theme from '#build/ui/avatar'
7
8
 
@@ -14,9 +15,9 @@ type AvatarVariants = VariantProps<typeof avatar>
14
15
  export interface AvatarProps extends Pick<AvatarFallbackProps, 'delayMs'> {
15
16
  /**
16
17
  * The element or component this component should render as.
17
- * @defaultValue 'img'
18
+ * @defaultValue 'span'
18
19
  */
19
- as?: string | object
20
+ as?: any
20
21
  src?: string
21
22
  alt?: string
22
23
  icon?: string
@@ -25,6 +26,8 @@ export interface AvatarProps extends Pick<AvatarFallbackProps, 'delayMs'> {
25
26
  class?: any
26
27
  ui?: Partial<typeof avatar.slots>
27
28
  }
29
+
30
+ extendDevtoolsMeta<AvatarProps>({ defaultProps: { src: 'https://avatars.githubusercontent.com/u/739984?v=4', alt: 'Benjamin Canac' } })
28
31
  </script>
29
32
 
30
33
  <script setup lang="ts">
@@ -33,10 +36,11 @@ import { AvatarRoot, AvatarImage, AvatarFallback, useForwardProps } from 'radix-
33
36
  import { reactivePick } from '@vueuse/core'
34
37
  import { useAvatarGroup } from '../composables/useAvatarGroup'
35
38
  import UIcon from './Icon.vue'
39
+ import ImageComponent from '#build/ui-image-component'
36
40
 
37
41
  defineOptions({ inheritAttrs: false })
38
42
 
39
- const props = defineProps<AvatarProps>()
43
+ const props = withDefaults(defineProps<AvatarProps>(), { as: 'span' })
40
44
 
41
45
  const fallbackProps = useForwardProps(reactivePick(props, 'delayMs'))
42
46
 
@@ -48,15 +52,29 @@ const { size } = useAvatarGroup(props)
48
52
  const ui = computed(() => avatar({
49
53
  size: size.value
50
54
  }))
55
+
56
+ const sizePx = computed(() => ({
57
+ '3xs': 16,
58
+ '2xs': 20,
59
+ 'xs': 24,
60
+ 'sm': 28,
61
+ 'md': 32,
62
+ 'lg': 36,
63
+ 'xl': 40,
64
+ '2xl': 44,
65
+ '3xl': 48
66
+ })[props.size || 'md'])
51
67
  </script>
52
68
 
53
69
  <template>
54
- <AvatarRoot :class="ui.root({ class: [props.class, props.ui?.root] })">
70
+ <AvatarRoot :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
55
71
  <AvatarImage
56
72
  v-if="src"
57
- :as="as"
73
+ :as="ImageComponent"
58
74
  :src="src"
59
75
  :alt="alt"
76
+ :width="sizePx"
77
+ :height="sizePx"
60
78
  v-bind="$attrs"
61
79
  :class="ui.image({ class: props.ui?.image })"
62
80
  />
@@ -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/avatar-group'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
6
7
 
7
8
  const appConfig = _appConfig as AppConfig & { ui: { avatarGroup: Partial<typeof theme> } }
8
9
 
@@ -28,6 +29,8 @@ export interface AvatarGroupProps {
28
29
  export interface AvatarGroupSlots {
29
30
  default(props?: {}): any
30
31
  }
32
+
33
+ extendDevtoolsMeta({ example: 'AvatarGroupExample' })
31
34
  </script>
32
35
 
33
36
  <script setup lang="ts">
@@ -3,6 +3,9 @@ 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/badge'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
7
+ import type { UseComponentIconsProps } from '../composables/useComponentIcons'
8
+ import type { AvatarProps } from '../types'
6
9
 
7
10
  const appConfig = _appConfig as AppConfig & { ui: { badge: Partial<typeof theme> } }
8
11
 
@@ -10,7 +13,7 @@ const badge = tv({ extend: tv(theme), ...(appConfig.ui?.badge || {}) })
10
13
 
11
14
  type BadgeVariants = VariantProps<typeof badge>
12
15
 
13
- export interface BadgeProps {
16
+ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'loadingIcon'> {
14
17
  /**
15
18
  * The element or component this component should render as.
16
19
  * @defaultValue 'span'
@@ -21,26 +24,53 @@ export interface BadgeProps {
21
24
  variant?: BadgeVariants['variant']
22
25
  size?: BadgeVariants['size']
23
26
  class?: any
27
+ ui?: Partial<typeof badge.slots>
24
28
  }
25
29
 
26
30
  export interface BadgeSlots {
31
+ leading(props?: {}): any
27
32
  default(props?: {}): any
33
+ trailing(props?: {}): any
28
34
  }
29
35
  </script>
30
36
 
31
37
  <script setup lang="ts">
38
+ import { computed } from 'vue'
32
39
  import { Primitive } from 'radix-vue'
40
+ import { useComponentIcons } from '../composables/useComponentIcons'
41
+ import UIcon from './Icon.vue'
33
42
 
34
43
  const props = withDefaults(defineProps<BadgeProps>(), {
35
44
  as: 'span'
36
45
  })
37
46
  defineSlots<BadgeSlots>()
47
+
48
+ const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props)
49
+
50
+ const ui = computed(() => badge({
51
+ color: props.color,
52
+ variant: props.variant,
53
+ size: props.size
54
+ }))
55
+
56
+ extendDevtoolsMeta({ defaultProps: { label: 'Badge' } })
38
57
  </script>
39
58
 
40
59
  <template>
41
- <Primitive :as="as" :class="badge({ color, variant, size, class: props.class })">
60
+ <Primitive :as="as" :class="ui.base({ class: [props.class, props.ui?.base] })">
61
+ <slot name="leading">
62
+ <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
63
+ <UAvatar v-else-if="!!avatar" :size="((props.ui?.leadingAvatarSize || ui.leadingAvatarSize()) as AvatarProps['size'])" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
64
+ </slot>
65
+
42
66
  <slot>
43
- {{ label }}
67
+ <span v-if="label" :class="ui.label({ class: props.ui?.label })">
68
+ {{ label }}
69
+ </span>
70
+ </slot>
71
+
72
+ <slot name="trailing">
73
+ <UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
44
74
  </slot>
45
75
  </Primitive>
46
76
  </template>
@@ -1,9 +1,9 @@
1
- <!-- eslint-disable vue/block-tag-newline -->
2
1
  <script lang="ts">
3
2
  import { tv } from 'tailwind-variants'
4
3
  import type { AppConfig } from '@nuxt/schema'
5
4
  import _appConfig from '#build/app.config'
6
5
  import theme from '#build/ui/breadcrumb'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
7
7
  import type { AvatarProps, LinkProps } from '../types'
8
8
  import type { DynamicSlots, PartialString } from '../types/utils'
9
9
 
@@ -30,6 +30,11 @@ export interface BreadcrumbProps<T> {
30
30
  * @defaultValue appConfig.ui.icons.chevronRight
31
31
  */
32
32
  separatorIcon?: string
33
+ /**
34
+ * The key used to get the label from the item.
35
+ * @defaultValue 'label'
36
+ */
37
+ labelKey?: string
33
38
  class?: any
34
39
  ui?: PartialString<typeof breadcrumb.slots>
35
40
  }
@@ -44,18 +49,45 @@ export type BreadcrumbSlots<T extends { slot?: string }> = {
44
49
  'separator'(props?: {}): any
45
50
  } & DynamicSlots<T, SlotProps<T>>
46
51
 
52
+ extendDevtoolsMeta({
53
+ defaultProps: {
54
+ items: [
55
+ { label: 'Home', to: '/' },
56
+ {
57
+ slot: 'dropdown',
58
+ icon: 'i-lucide-ellipsis',
59
+ children: [{
60
+ label: 'Documentation'
61
+ }, {
62
+ label: 'Themes'
63
+ }, {
64
+ label: 'GitHub'
65
+ }]
66
+ }, {
67
+ label: 'Components',
68
+ disabled: true
69
+ }, {
70
+ label: 'Breadcrumb',
71
+ to: '/components/breadcrumb'
72
+ }
73
+ ]
74
+ }
75
+ })
47
76
  </script>
48
77
 
49
78
  <script setup lang="ts" generic="T extends BreadcrumbItem">
50
79
  import { Primitive } from 'radix-vue'
51
80
  import { useAppConfig } from '#imports'
81
+ import { get } from '../utils'
82
+ import { pickLinkProps } from '../utils/link'
52
83
  import UIcon from './Icon.vue'
53
84
  import UAvatar from './Avatar.vue'
54
85
  import ULinkBase from './LinkBase.vue'
55
86
  import ULink from './Link.vue'
56
- import { pickLinkProps } from '../utils/link'
57
87
 
58
- const props = defineProps<BreadcrumbProps<T>>()
88
+ const props = withDefaults(defineProps<BreadcrumbProps<T>>(), {
89
+ labelKey: 'label'
90
+ })
59
91
  const slots = defineSlots<BreadcrumbSlots<T>>()
60
92
 
61
93
  const appConfig = useAppConfig()
@@ -73,13 +105,13 @@ const ui = breadcrumb()
73
105
  <ULinkBase v-bind="slotProps" as="span" :aria-current="active && (index === items!.length - 1) ? 'page' : undefined" :class="ui.link({ class: [props.ui?.link, item.class], active: index === items!.length - 1, disabled: !!item.disabled, to: !!item.to })">
74
106
  <slot :name="item.slot || 'item'" :item="item" :index="index">
75
107
  <slot :name="item.slot ? `${item.slot}-leading`: 'item-leading'" :item="item" :active="index === items!.length - 1" :index="index">
76
- <UAvatar v-if="item.avatar" :size="((props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: props.ui?.linkLeadingAvatar, active: index === items!.length - 1 })" />
77
- <UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon, active: index === items!.length - 1 })" />
108
+ <UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon, active: index === items!.length - 1 })" />
109
+ <UAvatar v-else-if="item.avatar" :size="((props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: props.ui?.linkLeadingAvatar, active: index === items!.length - 1 })" />
78
110
  </slot>
79
111
 
80
- <span v-if="item.label || !!slots[item.slot ? `${item.slot}-label`: 'item-label']" :class="ui.linkLabel({ class: props.ui?.linkLabel })">
112
+ <span v-if="get(item, props.labelKey as string) || !!slots[item.slot ? `${item.slot}-label`: 'item-label']" :class="ui.linkLabel({ class: props.ui?.linkLabel })">
81
113
  <slot :name="item.slot ? `${item.slot}-label`: 'item-label'" :item="item" :active="index === items!.length - 1" :index="index">
82
- {{ item.label }}
114
+ {{ get(item, props.labelKey as string) }}
83
115
  </slot>
84
116
  </span>
85
117
 
@@ -5,8 +5,9 @@ import _appConfig from '#build/app.config'
5
5
  import theme from '#build/ui/button'
6
6
  import type { LinkProps } from './Link.vue'
7
7
  import type { UseComponentIconsProps } from '../composables/useComponentIcons'
8
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
9
+ import type { AvatarProps } from '../types'
8
10
  import type { PartialString } from '../types/utils'
9
- import { formLoadingInjectionKey } from '../composables/useFormField'
10
11
 
11
12
  const appConfig = _appConfig as AppConfig & { ui: { button: Partial<typeof theme> } }
12
13
 
@@ -30,6 +31,9 @@ export interface ButtonProps extends UseComponentIconsProps, Omit<LinkProps, 'ra
30
31
  ui?: PartialString<typeof button.slots>
31
32
  }
32
33
 
34
+ // Injects props to use as default in the devtools playground.
35
+ extendDevtoolsMeta<ButtonProps>({ defaultProps: { label: 'Click me!' } })
36
+
33
37
  export interface ButtonSlots {
34
38
  leading(props?: {}): any
35
39
  default(props?: {}): any
@@ -42,10 +46,12 @@ import { type Ref, computed, ref, inject } from 'vue'
42
46
  import { useForwardProps } from 'radix-vue'
43
47
  import { useComponentIcons } from '../composables/useComponentIcons'
44
48
  import { useButtonGroup } from '../composables/useButtonGroup'
45
- import UIcon from './Icon.vue'
46
- import ULink from './Link.vue'
49
+ import { formLoadingInjectionKey } from '../composables/useFormField'
47
50
  import { omit } from '../utils'
48
51
  import { pickLinkProps } from '../utils/link'
52
+ import UIcon from './Icon.vue'
53
+ import UAvatar from './Avatar.vue'
54
+ import ULink from './Link.vue'
49
55
 
50
56
  const props = defineProps<ButtonProps>()
51
57
  const slots = defineSlots<ButtonSlots>()
@@ -99,6 +105,7 @@ const ui = computed(() => button({
99
105
  >
100
106
  <slot name="leading">
101
107
  <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
108
+ <UAvatar v-else-if="!!avatar" :size="((props.ui?.leadingAvatarSize || ui.leadingAvatarSize()) as AvatarProps['size'])" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
102
109
  </slot>
103
110
 
104
111
  <slot>
@@ -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/button-group'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
6
7
 
7
8
  const appConfig = _appConfig as AppConfig & { ui: { buttonGroup: Partial<typeof theme> } }
8
9
 
@@ -28,6 +29,8 @@ export interface ButtonGroupProps {
28
29
  export interface ButtonGroupSlots {
29
30
  default(props?: {}): any
30
31
  }
32
+
33
+ extendDevtoolsMeta({ example: 'ButtonGroupExample' })
31
34
  </script>
32
35
 
33
36
  <script setup lang="ts">
@@ -47,7 +50,7 @@ provide(buttonGroupInjectionKey, computed(() => ({
47
50
  </script>
48
51
 
49
52
  <template>
50
- <Primitive :as="as" :class="buttonGroup({ orientation })">
53
+ <Primitive :as="as" :class="buttonGroup({ orientation, class: props.class })">
51
54
  <slot />
52
55
  </Primitive>
53
56
  </template>
@@ -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/card'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
6
7
 
7
8
  const appConfig = _appConfig as AppConfig & { ui: { card: Partial<typeof theme> } }
8
9
 
@@ -23,6 +24,8 @@ export interface CardSlots {
23
24
  default(props?: {}): any
24
25
  footer(props?: {}): any
25
26
  }
27
+
28
+ extendDevtoolsMeta({ example: 'CardExample' })
26
29
  </script>
27
30
 
28
31
  <script setup lang="ts">
@@ -1,4 +1,3 @@
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 { AppConfig } from '@nuxt/schema'
@@ -11,6 +10,7 @@ import type { FadeOptionsType } from 'embla-carousel-fade'
11
10
  import type { WheelGesturesPluginOptions } from 'embla-carousel-wheel-gestures'
12
11
  import _appConfig from '#build/app.config'
13
12
  import theme from '#build/ui/carousel'
13
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
14
14
  import type { ButtonProps } from '../types'
15
15
  import type { AcceptableValue, PartialString } from '../types/utils'
16
16
 
@@ -55,32 +55,32 @@ export interface CarouselProps<T> extends Omit<EmblaOptionsType, 'axis' | 'conta
55
55
  items?: T[]
56
56
  /**
57
57
  * Enable Autoplay plugin
58
- * @see https://www.embla-carousel.com/plugins/autoplay/
58
+ * @link https://www.embla-carousel.com/plugins/autoplay/
59
59
  */
60
60
  autoplay?: boolean | AutoplayOptionsType
61
61
  /**
62
62
  * Enable Auto Scroll plugin
63
- * @see https://www.embla-carousel.com/plugins/auto-scroll/
63
+ * @link https://www.embla-carousel.com/plugins/auto-scroll/
64
64
  */
65
65
  autoScroll?: boolean | AutoScrollOptionsType
66
66
  /**
67
67
  * Enable Auto Height plugin
68
- * @see https://www.embla-carousel.com/plugins/auto-height/
68
+ * @link https://www.embla-carousel.com/plugins/auto-height/
69
69
  */
70
70
  autoHeight?: boolean | AutoHeightOptionsType
71
71
  /**
72
72
  * Enable Class Names plugin
73
- * @see https://www.embla-carousel.com/plugins/class-names/
73
+ * @link https://www.embla-carousel.com/plugins/class-names/
74
74
  */
75
75
  classNames?: boolean | ClassNamesOptionsType
76
76
  /**
77
77
  * Enable Fade plugin
78
- * @see https://www.embla-carousel.com/plugins/fade/
78
+ * @link https://www.embla-carousel.com/plugins/fade/
79
79
  */
80
80
  fade?: boolean | FadeOptionsType
81
81
  /**
82
82
  * Enable Wheel Gestures plugin
83
- * @see https://www.embla-carousel.com/plugins/wheel-gestures/
83
+ * @link https://www.embla-carousel.com/plugins/wheel-gestures/
84
84
  */
85
85
  wheelGestures?: boolean | WheelGesturesPluginOptions
86
86
  class?: any
@@ -91,6 +91,7 @@ export type CarouselSlots<T> = {
91
91
  default(props: { item: T, index: number }): any
92
92
  }
93
93
 
94
+ extendDevtoolsMeta({ example: 'CarouselExample' })
94
95
  </script>
95
96
 
96
97
  <script setup lang="ts" generic="T extends AcceptableValue">
@@ -298,7 +299,11 @@ defineExpose({
298
299
 
299
300
  <div v-if="dots" :class="ui.dots({ class: props.ui?.dots })">
300
301
  <template v-for="(_, index) in scrollSnaps" :key="index">
301
- <button :class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })" @click="scrollTo(index)" />
302
+ <button
303
+ :aria-label="`Go to slide ${index + 1}`"
304
+ :class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
305
+ @click="scrollTo(index)"
306
+ />
302
307
  </template>
303
308
  </div>
304
309
  </div>
@@ -1,10 +1,10 @@
1
1
  <script lang="ts">
2
- import type { InputHTMLAttributes } from 'vue'
3
2
  import { tv, type VariantProps } from 'tailwind-variants'
4
3
  import type { CheckboxRootProps } 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/checkbox'
7
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
8
8
 
9
9
  const appConfig = _appConfig as AppConfig & { ui: { checkbox: Partial<typeof theme> } }
10
10
 
@@ -22,7 +22,7 @@ export interface CheckboxProps extends Pick<CheckboxRootProps, 'disabled' | 'req
22
22
  * @defaultValue appConfig.ui.icons.check
23
23
  */
24
24
  icon?: string
25
- indeterminate?: InputHTMLAttributes['indeterminate']
25
+ indeterminate?: boolean
26
26
  /**
27
27
  * The icon displayed when the checkbox is indeterminate.
28
28
  * @defaultValue appConfig.ui.icons.minus
@@ -43,6 +43,8 @@ export interface CheckboxSlots {
43
43
  label(props: { label?: string }): any
44
44
  description(props: { description?: string }): any
45
45
  }
46
+
47
+ extendDevtoolsMeta({ defaultProps: { label: 'Check me!' } })
46
48
  </script>
47
49
 
48
50
  <script setup lang="ts">
@@ -51,6 +53,7 @@ import { CheckboxRoot, CheckboxIndicator, Label, useForwardProps } from 'radix-v
51
53
  import { reactivePick } from '@vueuse/core'
52
54
  import { useAppConfig } from '#imports'
53
55
  import { useFormField } from '../composables/useFormField'
56
+ import UIcon from './Icon.vue'
54
57
 
55
58
  const props = defineProps<CheckboxProps>()
56
59
  const slots = defineSlots<CheckboxSlots>()
@@ -64,11 +67,9 @@ const appConfig = useAppConfig()
64
67
  const { id: _id, emitFormChange, emitFormInput, size, color, name, disabled } = useFormField<CheckboxProps>(props)
65
68
  const id = _id.value ?? useId()
66
69
 
67
- const indeterminate = computed(() => (modelValue.value === undefined && props.indeterminate))
68
-
69
70
  const checked = computed({
70
71
  get() {
71
- return indeterminate.value ? 'indeterminate' : modelValue.value
72
+ return props.indeterminate ? 'indeterminate' : modelValue.value
72
73
  },
73
74
  set(value) {
74
75
  modelValue.value = value === 'indeterminate' ? undefined : value
@@ -80,7 +81,7 @@ const ui = computed(() => checkbox({
80
81
  color: color.value,
81
82
  required: props.required,
82
83
  disabled: disabled.value,
83
- checked: (modelValue.value ?? props.defaultValue) || indeterminate.value
84
+ checked: (modelValue.value ?? props.defaultValue) || props.indeterminate
84
85
  }))
85
86
 
86
87
  function onUpdate(value: any) {
@@ -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/chip'
6
+ import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
6
7
 
7
8
  const appConfig = _appConfig as AppConfig & { ui: { chip: Partial<typeof theme> } }
8
9
 
@@ -37,13 +38,17 @@ export interface ChipSlots {
37
38
  default(props?: {}): any
38
39
  content(props?: {}): any
39
40
  }
41
+
42
+ extendDevtoolsMeta({ example: 'ChipExample' })
40
43
  </script>
41
44
 
42
45
  <script setup lang="ts">
43
46
  import { computed } from 'vue'
44
- import { Primitive } from 'radix-vue'
47
+ import { Primitive, Slot } from 'radix-vue'
45
48
  import { useAvatarGroup } from '../composables/useAvatarGroup'
46
49
 
50
+ defineOptions({ inheritAttrs: false })
51
+
47
52
  const props = withDefaults(defineProps<ChipProps>(), {
48
53
  inset: false,
49
54
  standalone: false
@@ -65,7 +70,9 @@ const ui = computed(() => chip({
65
70
 
66
71
  <template>
67
72
  <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
68
- <slot />
73
+ <Slot v-bind="$attrs">
74
+ <slot />
75
+ </Slot>
69
76
 
70
77
  <span v-if="show" :class="ui.base({ class: props.ui?.base })">
71
78
  <slot name="content">