Files
tools/vue/primitives/src/selection/select/SelectLabel.vue
T
robonen eefd7abf83 feat(primitives): media-editor components, category reorg, perf + type cleanup
Reorganize components into category folders (forms/canvas/overlays/etc.); add the
media-editor headless family (timeline, curve-editor, waveform, crop, color
picker, etc.); apply perf fixes (O(1) collection lookups, plain-object drag
state, gesture-leak teardown, shallowRef color state, rect caching) and replace
source `any` with proper types.
2026-06-15 16:54:29 +07:00

32 lines
809 B
Vue

<script lang="ts">
import type { PrimitiveProps } from '../../internal/primitive';
/**
* A non-selectable heading for a `SelectGroup`. Renders the text that labels the
* group and wires its id to the group's `aria-labelledby`; must be used inside a
* `SelectGroup`.
*/
export interface SelectLabelProps extends PrimitiveProps {}
</script>
<script setup lang="ts">
import { useForwardExpose } from '@robonen/vue';
import { Primitive } from '../../internal/primitive';
import { useSelectGroupContext } from './context';
const { as = 'div' } = defineProps<SelectLabelProps>();
const { forwardRef } = useForwardExpose();
const groupCtx = useSelectGroupContext();
</script>
<template>
<Primitive
:ref="forwardRef"
:as="as"
:id="groupCtx.id.value"
>
<slot />
</Primitive>
</template>