@celar-ui/svelte 0.0.3 → 0.0.4

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.
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { fade, fly } from 'svelte/transition';
3
- import { Dialog, type DialogRootProps } from 'bits-ui';
3
+ import { Dialog as BitDialog, type DialogRootProps } from 'bits-ui';
4
4
  import type { Snippet } from 'svelte';
5
5
  import IconButton from '../buttons/IconButton.svelte';
6
6
 
@@ -30,33 +30,33 @@
30
30
  let duration = 200;
31
31
  </script>
32
32
 
33
- <Dialog.Root {...rest} bind:open>
34
- <Dialog.Trigger>
33
+ <BitDialog.Root {...rest} bind:open>
34
+ <BitDialog.Trigger>
35
35
  {#snippet child({ props })}
36
36
  {@render trigger?.({ props })}
37
37
  {/snippet}
38
- </Dialog.Trigger>
39
- <Dialog.Portal>
40
- <Dialog.Overlay forceMount>
38
+ </BitDialog.Trigger>
39
+ <BitDialog.Portal>
40
+ <BitDialog.Overlay forceMount>
41
41
  {#snippet child({ props, open })}
42
42
  {#if open}
43
43
  <div {...props} transition:fade={{ duration }}></div>
44
44
  {/if}
45
45
  {/snippet}
46
- </Dialog.Overlay>
47
- <Dialog.Content forceMount data-xs={xs} data-sm={sm} data-md={md} data-fluid={fluid}>
46
+ </BitDialog.Overlay>
47
+ <BitDialog.Content forceMount data-xs={xs} data-sm={sm} data-md={md} data-fluid={fluid}>
48
48
  {#snippet child({ props, open })}
49
49
  {#if open}
50
50
  <div {...props} transition:fly={{ duration, y: 50 }}>
51
51
  <div data-dialog-header>
52
- <Dialog.Title children={title} />
53
- <Dialog.Close>
52
+ <BitDialog.Title children={title} />
53
+ <BitDialog.Close>
54
54
  {#snippet child({ props })}
55
55
  <IconButton {...props}>
56
56
  {@render close?.()}
57
57
  </IconButton>
58
58
  {/snippet}
59
- </Dialog.Close>
59
+ </BitDialog.Close>
60
60
  </div>
61
61
 
62
62
  <div data-dialog-body>
@@ -65,9 +65,9 @@
65
65
  </div>
66
66
  {/if}
67
67
  {/snippet}
68
- </Dialog.Content>
69
- </Dialog.Portal>
70
- </Dialog.Root>
68
+ </BitDialog.Content>
69
+ </BitDialog.Portal>
70
+ </BitDialog.Root>
71
71
 
72
72
  <style>:global([data-dialog-overlay]) {
73
73
  position: fixed;
@@ -1,4 +1,4 @@
1
- import { Dialog, type DialogRootProps } from 'bits-ui';
1
+ import { type DialogRootProps } from 'bits-ui';
2
2
  import type { Snippet } from 'svelte';
3
3
  type DialogProps = DialogRootProps & {
4
4
  trigger?: Snippet<[{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celar-ui/svelte",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "cuikho210",