@celar-ui/svelte 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/containment/Avatar.svelte +6 -6
- package/dist/containment/Avatar.svelte.d.ts +1 -1
- package/dist/inputs/Checkbox.svelte +3 -3
- package/dist/inputs/Checkbox.svelte.d.ts +1 -1
- package/dist/inputs/RadioGroup.svelte +7 -3
- package/dist/inputs/RadioGroup.svelte.d.ts +1 -1
- package/dist/inputs/Switch.svelte +4 -4
- package/dist/inputs/Switch.svelte.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Avatar, type AvatarRootProps } from 'bits-ui';
|
|
2
|
+
import { Avatar as BitAvatar, type AvatarRootProps } from 'bits-ui';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
|
|
5
5
|
export type AvatarProps = AvatarRootProps & {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
let { size = '64px', src, alt, fallback, ...rest }: AvatarProps = $props();
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
<
|
|
15
|
+
<BitAvatar.Root {...rest} style="--size: {size}">
|
|
16
|
+
<BitAvatar.Image {src} {alt} />
|
|
17
|
+
<BitAvatar.Fallback>
|
|
18
18
|
{#if fallback}
|
|
19
19
|
{@render fallback()}
|
|
20
20
|
{/if}
|
|
21
|
-
</
|
|
22
|
-
</
|
|
21
|
+
</BitAvatar.Fallback>
|
|
22
|
+
</BitAvatar.Root>
|
|
23
23
|
|
|
24
24
|
<style>:global([data-avatar-root]) {
|
|
25
25
|
display: block;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Checkbox, type CheckboxRootProps, type WithoutChildren } from 'bits-ui';
|
|
2
|
+
import { Checkbox as BitCheckbox, type CheckboxRootProps, type WithoutChildren } from 'bits-ui';
|
|
3
3
|
import IconTick from '~icons/hugeicons/tick-01';
|
|
4
4
|
import IconMinus from '~icons/hugeicons/minus-sign';
|
|
5
5
|
import type { Snippet } from 'svelte';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
<label data-checkbox>
|
|
15
15
|
<div data-checkbox-icon>
|
|
16
|
-
<
|
|
16
|
+
<BitCheckbox.Root {...rest}>
|
|
17
17
|
{#snippet children({ checked, indeterminate })}
|
|
18
18
|
{#if checked}
|
|
19
19
|
<IconTick font-size="20px" />
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<IconMinus />
|
|
23
23
|
{/if}
|
|
24
24
|
{/snippet}
|
|
25
|
-
</
|
|
25
|
+
</BitCheckbox.Root>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
{@render children?.()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type CheckboxRootProps, type WithoutChildren } from 'bits-ui';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
type CheckboxProps = WithoutChildren<CheckboxRootProps> & {
|
|
4
4
|
children?: Snippet;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
RadioGroup as BitRadioGroup,
|
|
4
|
+
type RadioGroupRootProps,
|
|
5
|
+
type WithoutChildren
|
|
6
|
+
} from 'bits-ui';
|
|
3
7
|
import type { Snippet } from 'svelte';
|
|
4
8
|
|
|
5
9
|
export type RadioGroupProps = WithoutChildren<RadioGroupRootProps> & {
|
|
@@ -8,9 +12,9 @@
|
|
|
8
12
|
let { value = $bindable(''), children, ...rest }: RadioGroupProps = $props();
|
|
9
13
|
</script>
|
|
10
14
|
|
|
11
|
-
<
|
|
15
|
+
<BitRadioGroup.Root {...rest} bind:value>
|
|
12
16
|
{@render children?.()}
|
|
13
|
-
</
|
|
17
|
+
</BitRadioGroup.Root>
|
|
14
18
|
|
|
15
19
|
<style>:global([data-radio-group-root]) {
|
|
16
20
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type RadioGroupRootProps, type WithoutChildren } from 'bits-ui';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
export type RadioGroupProps = WithoutChildren<RadioGroupRootProps> & {
|
|
4
4
|
children?: Snippet;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Switch, type SwitchRootProps, type WithoutChildren } from 'bits-ui';
|
|
2
|
+
import { Switch as BitSwitch, type SwitchRootProps, type WithoutChildren } from 'bits-ui';
|
|
3
3
|
import type { Snippet } from 'svelte';
|
|
4
4
|
|
|
5
5
|
export type SwitchProps = WithoutChildren<SwitchRootProps> & {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<label data-switch>
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
</
|
|
13
|
+
<BitSwitch.Root {...rest} bind:checked>
|
|
14
|
+
<BitSwitch.Thumb />
|
|
15
|
+
</BitSwitch.Root>
|
|
16
16
|
|
|
17
17
|
{@render children?.()}
|
|
18
18
|
</label>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type SwitchRootProps, type WithoutChildren } from 'bits-ui';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
export type SwitchProps = WithoutChildren<SwitchRootProps> & {
|
|
4
4
|
children?: Snippet;
|