compote-ui 0.28.0 → 0.29.0

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.
@@ -11,7 +11,7 @@ export declare const button: import("tailwind-variants").TVReturnType<{
11
11
  default: string;
12
12
  lg: string;
13
13
  icon: string;
14
- "icon-xs": string;
14
+ 'icon-xs': string;
15
15
  'icon-sm': string;
16
16
  'icon-lg': string;
17
17
  };
@@ -27,7 +27,7 @@ export declare const button: import("tailwind-variants").TVReturnType<{
27
27
  default: string;
28
28
  lg: string;
29
29
  icon: string;
30
- "icon-xs": string;
30
+ 'icon-xs': string;
31
31
  'icon-sm': string;
32
32
  'icon-lg': string;
33
33
  };
@@ -43,7 +43,7 @@ export declare const button: import("tailwind-variants").TVReturnType<{
43
43
  default: string;
44
44
  lg: string;
45
45
  icon: string;
46
- "icon-xs": string;
46
+ 'icon-xs': string;
47
47
  'icon-sm': string;
48
48
  'icon-lg': string;
49
49
  };
@@ -13,7 +13,7 @@ export const button = tv({
13
13
  default: 'h-9 gap-2 px-3',
14
14
  lg: 'h-10 gap-2.5 px-4',
15
15
  icon: 'size-9',
16
- "icon-xs": "size-6",
16
+ 'icon-xs': 'size-6',
17
17
  'icon-sm': 'size-8',
18
18
  'icon-lg': 'size-10'
19
19
  }
@@ -0,0 +1,24 @@
1
+ <script lang="ts">
2
+ import { Dialog } from '@ark-ui/svelte/dialog';
3
+ import type { DialogCloseTriggerBaseProps } from '@ark-ui/svelte/dialog';
4
+ import { PhX } from '../../icons';
5
+
6
+ interface Props extends DialogCloseTriggerBaseProps {
7
+ class?: string;
8
+ }
9
+
10
+ let { class: className, children, ...rest }: Props = $props();
11
+ </script>
12
+
13
+ <Dialog.CloseTrigger
14
+ {...rest}
15
+ class={className ??
16
+ 'absolute top-3 right-3 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none active:opacity-50'}
17
+ >
18
+ {#if children}
19
+ {@render children()}
20
+ {:else}
21
+ <PhX class="size-4" />
22
+ <span class="sr-only">Close</span>
23
+ {/if}
24
+ </Dialog.CloseTrigger>
@@ -0,0 +1,7 @@
1
+ import type { DialogCloseTriggerBaseProps } from '@ark-ui/svelte/dialog';
2
+ interface Props extends DialogCloseTriggerBaseProps {
3
+ class?: string;
4
+ }
5
+ declare const DialogCloseTrigger: import("svelte").Component<Props, {}, "">;
6
+ type DialogCloseTrigger = ReturnType<typeof DialogCloseTrigger>;
7
+ export default DialogCloseTrigger;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import { Dialog } from '@ark-ui/svelte/dialog';
3
+ import type { DialogDescriptionBaseProps } from '@ark-ui/svelte/dialog';
4
+
5
+ interface Props extends DialogDescriptionBaseProps {
6
+ class?: string;
7
+ }
8
+
9
+ let { class: className, children, ...rest }: Props = $props();
10
+ </script>
11
+
12
+ <Dialog.Description {...rest} class={className ?? 'mt-1 text-sm text-ink-dim'}>
13
+ {@render children?.()}
14
+ </Dialog.Description>
@@ -0,0 +1,7 @@
1
+ import type { DialogDescriptionBaseProps } from '@ark-ui/svelte/dialog';
2
+ interface Props extends DialogDescriptionBaseProps {
3
+ class?: string;
4
+ }
5
+ declare const DialogDescription: import("svelte").Component<Props, {}, "">;
6
+ type DialogDescription = ReturnType<typeof DialogDescription>;
7
+ export default DialogDescription;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ interface Props {
5
+ class?: string;
6
+ children: Snippet;
7
+ }
8
+
9
+ let { class: className, children }: Props = $props();
10
+ </script>
11
+
12
+ <div class={className ?? 'mt-4 flex justify-end gap-3'}>
13
+ {@render children()}
14
+ </div>
@@ -0,0 +1,8 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ class?: string;
4
+ children: Snippet;
5
+ }
6
+ declare const DialogFooter: import("svelte").Component<Props, {}, "">;
7
+ type DialogFooter = ReturnType<typeof DialogFooter>;
8
+ export default DialogFooter;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import { Dialog } from '@ark-ui/svelte/dialog';
3
+ import type { DialogTitleBaseProps } from '@ark-ui/svelte/dialog';
4
+
5
+ interface Props extends DialogTitleBaseProps {
6
+ class?: string;
7
+ }
8
+
9
+ let { class: className, children, ...rest }: Props = $props();
10
+ </script>
11
+
12
+ <Dialog.Title {...rest} class={className ?? 'text-lg font-semibold'}>
13
+ {@render children?.()}
14
+ </Dialog.Title>
@@ -0,0 +1,7 @@
1
+ import type { DialogTitleBaseProps } from '@ark-ui/svelte/dialog';
2
+ interface Props extends DialogTitleBaseProps {
3
+ class?: string;
4
+ }
5
+ declare const DialogTitle: import("svelte").Component<Props, {}, "">;
6
+ type DialogTitle = ReturnType<typeof DialogTitle>;
7
+ export default DialogTitle;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import { Dialog } from '@ark-ui/svelte/dialog';
3
+ import type { DialogTriggerBaseProps } from '@ark-ui/svelte/dialog';
4
+
5
+ interface Props extends DialogTriggerBaseProps {
6
+ class?: string;
7
+ }
8
+
9
+ let { class: className, children, ...rest }: Props = $props();
10
+ </script>
11
+
12
+ <Dialog.Trigger {...rest} class={className}>
13
+ {@render children?.()}
14
+ </Dialog.Trigger>
@@ -0,0 +1,7 @@
1
+ import type { DialogTriggerBaseProps } from '@ark-ui/svelte/dialog';
2
+ interface Props extends DialogTriggerBaseProps {
3
+ class?: string;
4
+ }
5
+ declare const DialogTrigger: import("svelte").Component<Props, {}, "">;
6
+ type DialogTrigger = ReturnType<typeof DialogTrigger>;
7
+ export default DialogTrigger;
@@ -2,15 +2,11 @@
2
2
  import { Dialog } from '@ark-ui/svelte/dialog';
3
3
  import { Portal } from '@ark-ui/svelte/portal';
4
4
  import { cn } from 'tailwind-variants';
5
- import { PhX } from '../../icons';
6
5
  import type { DialogProps } from './dialog.types';
7
6
 
8
7
  let {
9
8
  open = $bindable(),
10
- title,
11
- description,
12
9
  children,
13
- footer,
14
10
  contentClass,
15
11
  lazyMount = true,
16
12
  unmountOnExit = true,
@@ -30,29 +26,7 @@
30
26
  contentClass
31
27
  )}
32
28
  >
33
- <Dialog.Title class="text-lg font-semibold">{title}</Dialog.Title>
34
- {#if description}
35
- <Dialog.Description class="mt-1 text-sm text-ink-dim">
36
- {description}
37
- </Dialog.Description>
38
- {/if}
39
-
40
- <div class="mt-4">
41
- {@render children()}
42
- </div>
43
-
44
- {#if footer}
45
- <div class="mt-4 flex justify-end gap-3">
46
- {@render footer()}
47
- </div>
48
- {/if}
49
-
50
- <Dialog.CloseTrigger
51
- class="absolute top-3 right-3 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none active:opacity-50"
52
- >
53
- <PhX class="size-4" />
54
- <span class="sr-only">Close</span>
55
- </Dialog.CloseTrigger>
29
+ {@render children()}
56
30
  </Dialog.Content>
57
31
  </Dialog.Positioner>
58
32
  </Portal>
@@ -4,10 +4,7 @@ export type { DialogRootBaseProps };
4
4
  type DialogSharedProps = Pick<DialogRootBaseProps, 'closeOnEscape' | 'closeOnInteractOutside' | 'onOpenChange' | 'lazyMount' | 'unmountOnExit'>;
5
5
  export interface DialogProps extends DialogSharedProps {
6
6
  open: boolean;
7
- title: string;
8
- description?: string;
9
7
  children: Snippet;
10
- footer?: Snippet;
11
8
  contentClass?: string;
12
9
  initialFocusEl?: DialogRootBaseProps['initialFocusEl'];
13
10
  }
@@ -0,0 +1,7 @@
1
+ export { default as Root } from './dialog.svelte';
2
+ export { default as Title } from './dialog-title.svelte';
3
+ export { default as Description } from './dialog-description.svelte';
4
+ export { default as Trigger } from './dialog-trigger.svelte';
5
+ export { default as CloseTrigger } from './dialog-close-trigger.svelte';
6
+ export { default as Footer } from './dialog-footer.svelte';
7
+ export type { DialogProps, AlertDialogProps, DialogRootBaseProps } from './dialog.types';
@@ -0,0 +1,6 @@
1
+ export { default as Root } from './dialog.svelte';
2
+ export { default as Title } from './dialog-title.svelte';
3
+ export { default as Description } from './dialog-description.svelte';
4
+ export { default as Trigger } from './dialog-trigger.svelte';
5
+ export { default as CloseTrigger } from './dialog-close-trigger.svelte';
6
+ export { default as Footer } from './dialog-footer.svelte';
@@ -11,7 +11,7 @@
11
11
 
12
12
  <Drawer.CloseTrigger
13
13
  {...rest}
14
- onclick={()=>console.log("Click:")}
14
+ onclick={() => console.log('Click:')}
15
15
  class={className ??
16
16
  'absolute top-12 right-4 flex h-7 w-7 cursor-pointer items-center justify-center rounded border-none bg-transparent text-ink-dim hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-[-1px]'}
17
17
  >
package/dist/index.d.ts CHANGED
@@ -11,9 +11,9 @@ export * as Carousel from './components/carousel';
11
11
  export { default as Checkbox } from './components/checkbox/checkbox.svelte';
12
12
  export { default as CheckboxGroup } from './components/checkbox/checkbox-group.svelte';
13
13
  export { default as Combobox } from './components/combobox/combobox.svelte';
14
- export { default as Dialog } from './components/dialog/dialog.svelte';
14
+ export * as Dialog from './components/dialog';
15
15
  export { default as AlertDialog } from './components/dialog/alert-dialog.svelte';
16
- export type { DialogProps, AlertDialogProps } from './components/dialog/dialog.types';
16
+ export type { AlertDialogProps } from './components/dialog/dialog.types';
17
17
  export * as Drawer from './components/drawer';
18
18
  export { default as FileUploadDropzone } from './components/file-upload/file-upload-dropzone.svelte';
19
19
  export { default as FileUpload } from './components/file-upload/file-upload.svelte';
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ export * as Carousel from './components/carousel';
10
10
  export { default as Checkbox } from './components/checkbox/checkbox.svelte';
11
11
  export { default as CheckboxGroup } from './components/checkbox/checkbox-group.svelte';
12
12
  export { default as Combobox } from './components/combobox/combobox.svelte';
13
- export { default as Dialog } from './components/dialog/dialog.svelte';
13
+ export * as Dialog from './components/dialog';
14
14
  export { default as AlertDialog } from './components/dialog/alert-dialog.svelte';
15
15
  export * as Drawer from './components/drawer';
16
16
  export { default as FileUploadDropzone } from './components/file-upload/file-upload-dropzone.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -50,13 +50,13 @@
50
50
  "globals": "^17.5.0",
51
51
  "prettier": "^3.8.3",
52
52
  "prettier-plugin-svelte": "^3.4.1",
53
- "prettier-plugin-tailwindcss": "^0.7.2",
53
+ "prettier-plugin-tailwindcss": "^0.7.4",
54
54
  "publint": "^0.3.17",
55
55
  "svelte": "^5.55.4",
56
56
  "svelte-check": "^4.4.6",
57
57
  "tailwindcss": "^4.2.4",
58
58
  "typescript": "^6.0.3",
59
- "typescript-eslint": "^8.58.2",
59
+ "typescript-eslint": "^8.59.1",
60
60
  "unplugin-icons": "^23.0.1",
61
61
  "vite": "^8.0.10"
62
62
  },