You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
777 B
27 lines
777 B
<script lang="ts">
|
|
import './rating-group.css';
|
|
import { ActiveEidos } from '$uix/eidos';
|
|
/**
|
|
* Eidos `<RatingGroup>` — visual wrapper over Soma's rating primitive.
|
|
* Soma owns slider semantics, pointer preview and item state; Eidos adds `size`.
|
|
*/
|
|
import * as RatingGroup from '$soma/components/rating-group';
|
|
import type { RatingGroupProps } from './types';
|
|
|
|
let {
|
|
size = 'md',
|
|
value = $bindable(0),
|
|
children: bodyContent,
|
|
...rest
|
|
}: RatingGroupProps = $props();
|
|
|
|
const eidos = ActiveEidos.require();
|
|
const resolvedSize = $derived(eidos.resolve(size, 'md'));
|
|
</script>
|
|
|
|
<RatingGroup.Provider {...rest} bind:value data-size={resolvedSize}>
|
|
{#snippet children(snippetProps)}
|
|
{@render bodyContent?.(snippetProps)}
|
|
{/snippet}
|
|
</RatingGroup.Provider>
|