UNPKG

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.

105 lines (104 loc) 6.53 kB
/// <reference types=".vue-global-types/vue_3.5_false.d.ts" /> import { CheckboxIndicator, CheckboxRoot, 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 = withDefaults(defineProps(), { class: "", iconClass: "", variant: "default", }); const emits = defineEmits(); const restProps = computed(() => { const { class: _, iconClass, variant, ...rest } = props; return rest; }); const forwarded = useForwardPropsEmits(restProps, emits); const __VLS_withDefaultsArg = (function (t) { return t; })({ class: "", iconClass: "", variant: "default", }); 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.CheckboxRoot; /** @type { [typeof __VLS_components.CheckboxRoot, typeof __VLS_components.CheckboxRoot, ] } */ // @ts-ignore const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ...(__VLS_ctx.forwarded), ...{ class: ((__VLS_ctx.cn('peer relative h-4 w-4 shrink-0 border border-metal-200 ring-offset-primary-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-100 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary-500 data-[state=checked]:text-primary-500 dark:border-metal-100 dark:ring-offset-primary-500 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:text-primary-500', props.variant !== 'default' && 'data-[state=checked]:before:absolute data-[state=checked]:before:left-1/2 data-[state=checked]:before:top-1/2 data-[state=checked]:before:h-2.5 data-[state=checked]:before:w-2.5 data-[state=checked]:before:-translate-x-1/2 data-[state=checked]:before:-translate-y-1/2 data-[state=checked]:before:bg-primary-500 data-[state=checked]:before:content-[\'\'] dark:data-[state=checked]:before:bg-primary-500', props.variant === 'default' && 'data-[state=checked]:bg-primary-500 dark:data-[state=checked]:bg-primary-500', props.variant === 'circle' && 'rounded-full data-[state=checked]:before:rounded-full', props.variant !== 'circle' && 'rounded data-[state=checked]:before:rounded-sm', props.class))) }, })); const __VLS_2 = __VLS_1({ ...(__VLS_ctx.forwarded), ...{ class: ((__VLS_ctx.cn('peer relative h-4 w-4 shrink-0 border border-metal-200 ring-offset-primary-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-100 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary-500 data-[state=checked]:text-primary-500 dark:border-metal-100 dark:ring-offset-primary-500 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:text-primary-500', props.variant !== 'default' && 'data-[state=checked]:before:absolute data-[state=checked]:before:left-1/2 data-[state=checked]:before:top-1/2 data-[state=checked]:before:h-2.5 data-[state=checked]:before:w-2.5 data-[state=checked]:before:-translate-x-1/2 data-[state=checked]:before:-translate-y-1/2 data-[state=checked]:before:bg-primary-500 data-[state=checked]:before:content-[\'\'] dark:data-[state=checked]:before:bg-primary-500', props.variant === 'default' && 'data-[state=checked]:bg-primary-500 dark:data-[state=checked]:bg-primary-500', props.variant === 'circle' && 'rounded-full data-[state=checked]:before:rounded-full', props.variant !== 'circle' && 'rounded data-[state=checked]:before:rounded-sm', props.class))) }, }, ...__VLS_functionalComponentArgsRest(__VLS_1)); if (props.variant === 'default') { const __VLS_6 = __VLS_resolvedLocalAndGlobalComponents.CheckboxIndicator; /** @type { [typeof __VLS_components.CheckboxIndicator, typeof __VLS_components.CheckboxIndicator, ] } */ // @ts-ignore const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({ ...{ class: ((__VLS_ctx.cn('flex items-center justify-center text-white', props.iconClass))) }, })); const __VLS_8 = __VLS_7({ ...{ class: ((__VLS_ctx.cn('flex items-center justify-center text-white', props.iconClass))) }, }, ...__VLS_functionalComponentArgsRest(__VLS_7)); var __VLS_12 = {}; __VLS_elementAsFunction(__VLS_intrinsicElements.svg, __VLS_intrinsicElements.svg)({ xmlns: ("http://www.w3.org/2000/svg"), width: ("9"), height: ("6"), viewBox: ("0 0 9 6"), fill: ("none"), }); __VLS_elementAsFunction(__VLS_intrinsicElements.path)({ "fill-rule": ("evenodd"), "clip-rule": ("evenodd"), d: ("M7.97842 0.271671C8.27717 0.570422 8.27717 1.05479 7.97842 1.35354L3.60342 5.72854C3.30467 6.0273 2.8203 6.0273 2.52155 5.72854L0.334049 3.54104C0.0352976 3.24229 0.0352976 2.75792 0.334049 2.45917C0.6328 2.16042 1.11717 2.16042 1.41592 2.45917L3.06249 4.10573L6.89655 0.271671C7.1953 -0.0270804 7.67967 -0.0270804 7.97842 0.271671Z"), fill: ("white"), }); __VLS_nonNullable(__VLS_11.slots).default; __VLS_nonNullable(__VLS_11.slots).default; const __VLS_11 = __VLS_pickFunctionalComponentCtx(__VLS_6, __VLS_8); } __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 { CheckboxIndicator: CheckboxIndicator, CheckboxRoot: CheckboxRoot, cn: cn, forwarded: forwarded, }; }, __typeEmits: {}, __typeProps: {}, props: {}, }); const __VLS_component = (await import('vue')).defineComponent({ setup() { return {}; }, __typeEmits: {}, __typeProps: {}, props: {}, }); export default {}; ;