keep-vue
Version:
Keep Vue is an open-source component library built on top of Vue3 and Tailwind CSS. It offers a collection of pre-designed UI components and styles that you can easily integrate into your web applications.
93 lines (92 loc) • 4.8 kB
JavaScript
/// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
import { SliderRange, SliderRoot, SliderThumb, SliderTrack, useForwardPropsEmits, } from "radix-vue";
import { computed } from "vue";
import { cn } from "../../utils/cn";
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
let __VLS_typeProps;
const props = defineProps();
const emits = defineEmits();
const restProps = computed(() => {
const { class: _, trackClass, rangeClass, thumbClass, ...rest } = props;
return rest;
});
const forwarded = useForwardPropsEmits(restProps, emits);
const __VLS_fnComponent = (await import('vue')).defineComponent({
__typeEmits: {},
});
;
let __VLS_functionalComponentProps;
function __VLS_template() {
const __VLS_ctx = {};
const __VLS_localComponents = {
...{},
...{},
...__VLS_ctx,
};
let __VLS_components;
const __VLS_localDirectives = {
...{},
...__VLS_ctx,
};
let __VLS_directives;
let __VLS_styleScopedClasses;
let __VLS_resolvedLocalAndGlobalComponents;
const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.SliderRoot;
/** @type { [typeof __VLS_components.SliderRoot, typeof __VLS_components.SliderRoot, ] } */
// @ts-ignore
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ...(__VLS_ctx.forwarded), ...{ class: ((__VLS_ctx.cn('relative flex w-full touch-none select-none items-center', props.class))) }, }));
const __VLS_2 = __VLS_1({ ...(__VLS_ctx.forwarded), ...{ class: ((__VLS_ctx.cn('relative flex w-full touch-none select-none items-center', props.class))) }, }, ...__VLS_functionalComponentArgsRest(__VLS_1));
const __VLS_6 = __VLS_resolvedLocalAndGlobalComponents.SliderTrack;
/** @type { [typeof __VLS_components.SliderTrack, typeof __VLS_components.SliderTrack, ] } */
// @ts-ignore
const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({ ...{ class: ((__VLS_ctx.cn('relative h-2 w-full grow overflow-hidden rounded-full bg-primary-25', props.trackClass))) }, }));
const __VLS_8 = __VLS_7({ ...{ class: ((__VLS_ctx.cn('relative h-2 w-full grow overflow-hidden rounded-full bg-primary-25', props.trackClass))) }, }, ...__VLS_functionalComponentArgsRest(__VLS_7));
const __VLS_12 = __VLS_resolvedLocalAndGlobalComponents.SliderRange;
/** @type { [typeof __VLS_components.SliderRange, ] } */
// @ts-ignore
const __VLS_13 = __VLS_asFunctionalComponent(__VLS_12, new __VLS_12({ ...{ class: ((__VLS_ctx.cn('absolute h-full bg-primary-500', props.rangeClass))) }, }));
const __VLS_14 = __VLS_13({ ...{ class: ((__VLS_ctx.cn('absolute h-full bg-primary-500', props.rangeClass))) }, }, ...__VLS_functionalComponentArgsRest(__VLS_13));
__VLS_nonNullable(__VLS_11.slots).default;
const __VLS_11 = __VLS_pickFunctionalComponentCtx(__VLS_6, __VLS_8);
for (const [_, key] of __VLS_getVForSourceType((__VLS_ctx.modelValue))) {
const __VLS_18 = __VLS_resolvedLocalAndGlobalComponents.SliderThumb;
/** @type { [typeof __VLS_components.SliderThumb, ] } */
// @ts-ignore
const __VLS_19 = __VLS_asFunctionalComponent(__VLS_18, new __VLS_18({ key: ((key)), ...{ class: ((__VLS_ctx.cn('block h-5 w-5 rounded-full border-2 border-primary-500 bg-primary-25 ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', props.thumbClass))) }, }));
const __VLS_20 = __VLS_19({ key: ((key)), ...{ class: ((__VLS_ctx.cn('block h-5 w-5 rounded-full border-2 border-primary-500 bg-primary-25 ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', props.thumbClass))) }, }, ...__VLS_functionalComponentArgsRest(__VLS_19));
}
__VLS_nonNullable(__VLS_5.slots).default;
const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
var __VLS_slots;
var __VLS_inheritedAttrs;
const __VLS_refs = {};
var $refs;
return {
slots: __VLS_slots,
refs: $refs,
attrs: {},
};
}
;
const __VLS_self = (await import('vue')).defineComponent({
setup() {
return {
SliderRange: SliderRange,
SliderRoot: SliderRoot,
SliderThumb: SliderThumb,
SliderTrack: SliderTrack,
cn: cn,
forwarded: forwarded,
};
},
__typeEmits: {},
__typeProps: {},
});
export default (await import('vue')).defineComponent({
setup() {
return {};
},
__typeEmits: {},
__typeProps: {},
});
;