shadcn-vue/apps/www/src/public/registry/styles/default/slider.json
Sadegh Barati 010e377669
fix: avoid failing resolve types by adding radix-vue to project deps in shadcn-vue init before the add command (#216)
* fix: avoid failing resolve types by adding `radix-vue` to project deps in `init` command

* chore: add `shell-emulator` and remove `cross-env`

fix some registry example import path

* chore: remove additional `radix-vue`  dependency from components registry

* chore: update `tsx` and `vue-tsc`

* fix: normalize `components:example` path to process `crawlExample` function correctly

* chore: build registry

---------

Co-authored-by: zernonia <zernonia@gmail.com>
2023-12-21 09:06:14 +08:00

18 lines
1.3 KiB
JSON

{
"name": "slider",
"dependencies": [],
"registryDependencies": [
"utils"
],
"files": [
{
"name": "Slider.vue",
"content": "<script setup lang=\"ts\">\nimport type { SliderRootEmits, SliderRootProps } from 'radix-vue'\nimport { SliderRange, SliderRoot, SliderThumb, SliderTrack, useEmitAsProps } from 'radix-vue'\nimport { cn } from '@/lib/utils'\n\nconst props = defineProps<SliderRootProps>()\nconst emits = defineEmits<SliderRootEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\n</script>\n\n<template>\n <SliderRoot\n :class=\"cn(\n 'relative flex w-full touch-none select-none items-center',\n $attrs.class ?? '',\n )\"\n v-bind=\"{ ...props, ...emitsAsProps }\"\n >\n <SliderTrack class=\"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary\">\n <SliderRange class=\"absolute h-full bg-primary\" />\n </SliderTrack>\n <SliderThumb class=\"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\" />\n </SliderRoot>\n</template>\n"
},
{
"name": "index.ts",
"content": "export { default as Slider } from './Slider.vue'\n"
}
],
"type": "components:ui"
}