reka-ui
Version:
Vue port for Radix UI Primitives.
1 lines • 1.33 kB
Source Map (JSON)
{"version":3,"file":"SliderThumb.cjs","sources":["../../src/Slider/SliderThumb.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SliderThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport SliderThumbImpl from './SliderThumbImpl.vue'\nimport { useCollection } from '@/Collection'\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<SliderThumbProps>(), {\n as: 'span',\n})\nconst { getItems } = useCollection()\n\nconst { forwardRef, currentElement: thumbElement } = useForwardExpose()\n\nconst index = computed(() => thumbElement.value ? getItems(true).findIndex(i => i.ref === thumbElement.value) : -1)\n</script>\n\n<template>\n <SliderThumbImpl\n :ref=\"forwardRef\"\n v-bind=\"props\"\n :index=\"index\"\n >\n <slot />\n </SliderThumbImpl>\n</template>\n"],"names":["useCollection","useForwardExpose","computed"],"mappings":";;;;;;;;;;;;;;AAYA,IAAA,MAAM,KAAQ,GAAA,OAAA;AAGd,IAAM,MAAA,EAAE,QAAS,EAAA,GAAIA,mCAAc,EAAA;AAEnC,IAAA,MAAM,EAAE,UAAA,EAAY,cAAgB,EAAA,YAAA,KAAiBC,wCAAiB,EAAA;AAEtE,IAAA,MAAM,KAAQ,GAAAC,YAAA,CAAS,MAAM,YAAA,CAAa,QAAQ,QAAS,CAAA,IAAI,CAAE,CAAA,SAAA,CAAU,OAAK,CAAE,CAAA,GAAA,KAAQ,YAAa,CAAA,KAAK,IAAI,EAAE,CAAA;;;;;;;;;;;;;;"}