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.
30 lines
645 B
30 lines
645 B
|
5 months ago
|
<script lang="ts">
|
||
|
|
import { ActiveEidos } from '$uix/eidos';
|
||
|
|
import * as TimeField from '$soma/components/time-field';
|
||
|
|
import type { TimeFieldProps } from './types';
|
||
|
|
|
||
|
|
let {
|
||
|
|
size = 'md',
|
||
|
|
variant = 'surface',
|
||
|
|
color = 'primary',
|
||
|
|
value = $bindable(),
|
||
|
|
placeholder = $bindable(),
|
||
|
|
children: bodyContent,
|
||
|
|
...rest
|
||
|
|
}: TimeFieldProps = $props();
|
||
|
|
|
||
|
|
const eidos = ActiveEidos.require();
|
||
|
|
const resolvedSize = $derived(eidos.resolve(size, 'md'));
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<TimeField.Provider
|
||
|
|
{...rest}
|
||
|
|
bind:value
|
||
|
|
bind:placeholder
|
||
|
|
data-size={resolvedSize}
|
||
|
|
data-variant={variant}
|
||
|
|
data-color={color}
|
||
|
|
>
|
||
|
|
{@render bodyContent?.()}
|
||
|
|
</TimeField.Provider>
|