unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
5.33k stars 318 forks source link

[Bug]: progress component is imported wrong #704

Closed pablodz closed 3 months ago

pablodz commented 3 months ago

Reproduction

bunx shadcn-vue@latest add progress

Describe the bug

When adding progress, the code exported to vue on ui folder is wrong

components/ui/progress/Progress.vue

...
<template>
  <ProgressRoot
    v-bind="delegatedProps"
    :class="
cn(
  'relative h-4 w-full overflow-hidden rounded-full bg-secondary',
  props.class
)]"
  >
    <ProgressIndicator
      class="h-full w-full flex-1 bg-primary transition-all"
      :style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
    />
  </ProgressRoot>
</template>

notice the wrong part )]" that should be )"

System Info

System:
    OS: Linux 6.6 Manjaro Linux
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i9-13900H
    Memory: 3.88 GB / 15.26 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.5.1 - /usr/bin/node
    bun: 1.1.21 - ~/.bun/bin/bun
  npmPackages:
    @vueuse/core: ^10.11.0 => 10.11.0 
    radix-vue: ^1.9.3 => 1.9.3 
    vue: ^3.4.36 => 3.4.36

Contributes

sadeghbarati commented 3 months ago

Hi, If you are using shadcn-vue inside a JavaScript project you need to wait until detypes supports ts --- transform --> js correctly

This is also duplicated

https://github.com/radix-vue/shadcn-vue/issues/647 https://github.com/radix-vue/shadcn-vue/issues/378

pablodz commented 3 months ago

Thanks! manually fixing works btw