yaxa-svelte 2.0.4 → 2.1.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.
Files changed (51) hide show
  1. package/README.md +4 -2
  2. package/dist/components/blocks/FAQ.svelte.d.ts +1 -1
  3. package/dist/components/blocks/FeatureGrid.svelte.d.ts +1 -1
  4. package/dist/components/blocks/Testimonials.svelte.d.ts +1 -1
  5. package/dist/components/elements/Avatar.svelte.d.ts +7 -25
  6. package/dist/components/elements/Badge.svelte.d.ts +15 -57
  7. package/dist/components/elements/Button.svelte.d.ts +19 -77
  8. package/dist/components/elements/Carousel.svelte.d.ts +2 -54
  9. package/dist/components/elements/CodeBlock.svelte +237 -8
  10. package/dist/components/elements/CodeBlock.test.js +227 -0
  11. package/dist/components/elements/CodeDiff.svelte +14 -0
  12. package/dist/components/elements/CodeDiff.test.js +16 -0
  13. package/dist/components/elements/EmptyState.svelte.d.ts +6 -26
  14. package/dist/components/elements/Icon.svelte.d.ts +6 -22
  15. package/dist/components/elements/Kbd.svelte.d.ts +5 -19
  16. package/dist/components/elements/Progress.svelte.d.ts +9 -35
  17. package/dist/components/elements/Skeleton.svelte.d.ts +8 -32
  18. package/dist/components/elements/Terminal.svelte.d.ts +1 -1
  19. package/dist/components/elements/Timeline.svelte.d.ts +4 -16
  20. package/dist/components/elements/Tree.svelte.d.ts +3 -13
  21. package/dist/components/elements/VirtualList.svelte.d.ts +3 -13
  22. package/dist/components/forms/Combobox.svelte.d.ts +7 -29
  23. package/dist/components/forms/Input.svelte.d.ts +9 -35
  24. package/dist/components/forms/MultiSelect.svelte.d.ts +7 -29
  25. package/dist/components/forms/NumberInput.svelte.d.ts +7 -29
  26. package/dist/components/forms/Select.svelte.d.ts +7 -29
  27. package/dist/components/forms/Switch.svelte.d.ts +8 -32
  28. package/dist/components/forms/Textarea.svelte.d.ts +11 -45
  29. package/dist/components/layout/Card.svelte.d.ts +10 -42
  30. package/dist/components/layout/Container.svelte.d.ts +7 -25
  31. package/dist/components/layout/DashboardShell.svelte.d.ts +1 -31
  32. package/dist/components/layout/ResizablePanels.svelte.d.ts +1 -35
  33. package/dist/components/navigation/CommandPalette.dom.test.d.ts +1 -0
  34. package/dist/components/navigation/CommandPalette.dom.test.js +76 -0
  35. package/dist/components/navigation/Stepper.svelte.d.ts +3 -13
  36. package/dist/components/overlays/Alert.svelte.d.ts +5 -19
  37. package/dist/components/overlays/Drawer.svelte.d.ts +3 -13
  38. package/dist/components/overlays/Modal.svelte.d.ts +6 -22
  39. package/dist/components/overlays/NotificationCenter.svelte.d.ts +1 -1
  40. package/dist/components/overlays/Slideover.svelte.d.ts +5 -19
  41. package/dist/components/overlays/Toast.svelte.d.ts +12 -44
  42. package/dist/components/saas/OrgSwitcher.svelte.d.ts +1 -1
  43. package/dist/components/saas/PasskeyUI.svelte.d.ts +1 -1
  44. package/dist/server/polar/index.d.ts +2 -1
  45. package/dist/server/polar/index.js +9 -8
  46. package/dist/server/polar/webhook.js +14 -11
  47. package/dist/server/polar/webhook.test.js +81 -0
  48. package/dist/testing/index.d.ts +2 -0
  49. package/dist/testing/index.js +12 -1
  50. package/dist/utils/cn.d.ts +2 -2
  51. package/package.json +11 -13
@@ -4,44 +4,18 @@ import type { HTMLInputAttributes } from 'svelte/elements';
4
4
  import type { IconSource } from '../elements/Icon.svelte';
5
5
  export declare const inputVariants: import("tailwind-variants").TVReturnType<{
6
6
  size: {
7
- xs: "text-xs py-1 px-2";
8
- sm: "text-sm py-1.5 px-3";
9
- md: "text-base py-2 px-3.5";
10
- lg: "text-base py-2.5 px-4";
11
- xl: "text-lg py-3 px-4.5";
7
+ xs: string;
8
+ sm: string;
9
+ md: string;
10
+ lg: string;
11
+ xl: string;
12
12
  };
13
13
  status: {
14
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500";
15
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus-visible:ring-rose-500/30";
16
- success: "border-emerald-500 focus:border-emerald-500 focus-visible:ring-emerald-500/30";
14
+ default: string;
15
+ error: string;
16
+ success: string;
17
17
  };
18
- }, undefined, "w-full rounded-lg border bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-400 dark:placeholder:text-neutral-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--yaxa-ring)] focus-visible:border-primary-500 transition-all duration-150 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-neutral-50 dark:disabled:bg-neutral-950 motion-reduce:transition-none", {
19
- size: {
20
- xs: "text-xs py-1 px-2";
21
- sm: "text-sm py-1.5 px-3";
22
- md: "text-base py-2 px-3.5";
23
- lg: "text-base py-2.5 px-4";
24
- xl: "text-lg py-3 px-4.5";
25
- };
26
- status: {
27
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500";
28
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus-visible:ring-rose-500/30";
29
- success: "border-emerald-500 focus:border-emerald-500 focus-visible:ring-emerald-500/30";
30
- };
31
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
32
- size: {
33
- xs: "text-xs py-1 px-2";
34
- sm: "text-sm py-1.5 px-3";
35
- md: "text-base py-2 px-3.5";
36
- lg: "text-base py-2.5 px-4";
37
- xl: "text-lg py-3 px-4.5";
38
- };
39
- status: {
40
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500";
41
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus-visible:ring-rose-500/30";
42
- success: "border-emerald-500 focus:border-emerald-500 focus-visible:ring-emerald-500/30";
43
- };
44
- }, undefined>>;
18
+ }, undefined, "w-full rounded-lg border bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-400 dark:placeholder:text-neutral-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--yaxa-ring)] focus-visible:border-primary-500 transition-all duration-150 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-neutral-50 dark:disabled:bg-neutral-950 motion-reduce:transition-none", undefined, undefined, undefined>;
45
19
  export interface InputSlots {
46
20
  root?: string;
47
21
  base?: string;
@@ -9,38 +9,16 @@ export interface MultiSelectOption {
9
9
  }
10
10
  export declare const multiSelectVariants: import("tailwind-variants").TVReturnType<{
11
11
  size: {
12
- sm: "min-h-[36px] text-xs p-1 gap-1";
13
- md: "min-h-[40px] text-sm p-1.5 gap-1.5";
14
- lg: "min-h-[48px] text-base p-2 gap-2";
12
+ sm: string;
13
+ md: string;
14
+ lg: string;
15
15
  };
16
16
  status: {
17
- default: "border-neutral-300 focus-within:border-primary-500 focus-within:ring-primary-500/20 dark:border-neutral-700";
18
- error: "border-rose-500 text-rose-900 focus-within:border-rose-500 focus-within:ring-rose-500/20 dark:text-rose-100";
19
- success: "border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20 dark:border-emerald-500";
17
+ default: string;
18
+ error: string;
19
+ success: string;
20
20
  };
21
- }, undefined, "flex min-h-[40px] w-full flex-wrap items-center gap-1.5 rounded-lg border bg-white p-1.5 text-neutral-900 transition-all duration-150 focus-within:ring-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-neutral-900 dark:text-neutral-100", {
22
- size: {
23
- sm: "min-h-[36px] text-xs p-1 gap-1";
24
- md: "min-h-[40px] text-sm p-1.5 gap-1.5";
25
- lg: "min-h-[48px] text-base p-2 gap-2";
26
- };
27
- status: {
28
- default: "border-neutral-300 focus-within:border-primary-500 focus-within:ring-primary-500/20 dark:border-neutral-700";
29
- error: "border-rose-500 text-rose-900 focus-within:border-rose-500 focus-within:ring-rose-500/20 dark:text-rose-100";
30
- success: "border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20 dark:border-emerald-500";
31
- };
32
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
33
- size: {
34
- sm: "min-h-[36px] text-xs p-1 gap-1";
35
- md: "min-h-[40px] text-sm p-1.5 gap-1.5";
36
- lg: "min-h-[48px] text-base p-2 gap-2";
37
- };
38
- status: {
39
- default: "border-neutral-300 focus-within:border-primary-500 focus-within:ring-primary-500/20 dark:border-neutral-700";
40
- error: "border-rose-500 text-rose-900 focus-within:border-rose-500 focus-within:ring-rose-500/20 dark:text-rose-100";
41
- success: "border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20 dark:border-emerald-500";
42
- };
43
- }, undefined>>;
21
+ }, undefined, "flex min-h-[40px] w-full flex-wrap items-center gap-1.5 rounded-lg border bg-white p-1.5 text-neutral-900 transition-all duration-150 focus-within:ring-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-neutral-900 dark:text-neutral-100", undefined, undefined, undefined>;
44
22
  export type MultiSelectProps = VariantProps<typeof multiSelectVariants> & {
45
23
  id?: string;
46
24
  values?: string[];
@@ -1,38 +1,16 @@
1
1
  import { type VariantProps } from '../../utils/cn.js';
2
2
  export declare const numberInputVariants: import("tailwind-variants").TVReturnType<{
3
3
  size: {
4
- sm: "h-9 text-xs";
5
- md: "h-10 text-sm";
6
- lg: "h-12 text-base";
4
+ sm: string;
5
+ md: string;
6
+ lg: string;
7
7
  };
8
8
  status: {
9
- default: "border-neutral-300 focus-within:border-primary-500 focus-within:ring-primary-500/20 dark:border-neutral-700";
10
- error: "border-rose-500 text-rose-900 focus-within:border-rose-500 focus-within:ring-rose-500/20 dark:text-rose-100";
11
- success: "border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20 dark:border-emerald-500";
9
+ default: string;
10
+ error: string;
11
+ success: string;
12
12
  };
13
- }, undefined, "flex items-center rounded-lg border bg-white text-neutral-900 transition-all duration-150 focus-within:ring-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-neutral-900 dark:text-neutral-100", {
14
- size: {
15
- sm: "h-9 text-xs";
16
- md: "h-10 text-sm";
17
- lg: "h-12 text-base";
18
- };
19
- status: {
20
- default: "border-neutral-300 focus-within:border-primary-500 focus-within:ring-primary-500/20 dark:border-neutral-700";
21
- error: "border-rose-500 text-rose-900 focus-within:border-rose-500 focus-within:ring-rose-500/20 dark:text-rose-100";
22
- success: "border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20 dark:border-emerald-500";
23
- };
24
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
25
- size: {
26
- sm: "h-9 text-xs";
27
- md: "h-10 text-sm";
28
- lg: "h-12 text-base";
29
- };
30
- status: {
31
- default: "border-neutral-300 focus-within:border-primary-500 focus-within:ring-primary-500/20 dark:border-neutral-700";
32
- error: "border-rose-500 text-rose-900 focus-within:border-rose-500 focus-within:ring-rose-500/20 dark:text-rose-100";
33
- success: "border-emerald-500 focus-within:border-emerald-500 focus-within:ring-emerald-500/20 dark:border-emerald-500";
34
- };
35
- }, undefined>>;
13
+ }, undefined, "flex items-center rounded-lg border bg-white text-neutral-900 transition-all duration-150 focus-within:ring-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-neutral-900 dark:text-neutral-100", undefined, undefined, undefined>;
36
14
  export type NumberInputProps = VariantProps<typeof numberInputVariants> & {
37
15
  id?: string;
38
16
  value?: number;
@@ -8,38 +8,16 @@ export interface SelectOption {
8
8
  }
9
9
  export declare const selectVariants: import("tailwind-variants").TVReturnType<{
10
10
  size: {
11
- sm: "text-sm py-1.5 pl-3 pr-8";
12
- md: "text-base py-2 pl-3.5 pr-10";
13
- lg: "text-base py-2.5 pl-4 pr-10";
11
+ sm: string;
12
+ md: string;
13
+ lg: string;
14
14
  };
15
15
  status: {
16
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500 focus:ring-primary-500/20";
17
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus:ring-rose-500/20";
18
- success: "border-emerald-500 focus:border-emerald-500 focus:ring-emerald-500/20";
16
+ default: string;
17
+ error: string;
18
+ success: string;
19
19
  };
20
- }, undefined, "w-full rounded-lg border bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 focus:outline-none focus:ring-2 transition-all duration-150 disabled:cursor-not-allowed disabled:opacity-50 appearance-none", {
21
- size: {
22
- sm: "text-sm py-1.5 pl-3 pr-8";
23
- md: "text-base py-2 pl-3.5 pr-10";
24
- lg: "text-base py-2.5 pl-4 pr-10";
25
- };
26
- status: {
27
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500 focus:ring-primary-500/20";
28
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus:ring-rose-500/20";
29
- success: "border-emerald-500 focus:border-emerald-500 focus:ring-emerald-500/20";
30
- };
31
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
32
- size: {
33
- sm: "text-sm py-1.5 pl-3 pr-8";
34
- md: "text-base py-2 pl-3.5 pr-10";
35
- lg: "text-base py-2.5 pl-4 pr-10";
36
- };
37
- status: {
38
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500 focus:ring-primary-500/20";
39
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus:ring-rose-500/20";
40
- success: "border-emerald-500 focus:border-emerald-500 focus:ring-emerald-500/20";
41
- };
42
- }, undefined>>;
20
+ }, undefined, "w-full rounded-lg border bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 focus:outline-none focus:ring-2 transition-all duration-150 disabled:cursor-not-allowed disabled:opacity-50 appearance-none", undefined, undefined, undefined>;
43
21
  export type SelectProps = VariantProps<typeof selectVariants> & {
44
22
  id?: string;
45
23
  value?: string;
@@ -2,42 +2,18 @@ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  export declare const switchVariants: import("tailwind-variants").TVReturnType<{
4
4
  size: {
5
- sm: "h-5 w-9";
6
- md: "h-6 w-11";
7
- lg: "h-7 w-14";
5
+ sm: string;
6
+ md: string;
7
+ lg: string;
8
8
  };
9
- }, undefined, "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--yaxa-ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--yaxa-bg)] disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none data-[state=checked]:bg-primary-600 data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700", {
10
- size: {
11
- sm: "h-5 w-9";
12
- md: "h-6 w-11";
13
- lg: "h-7 w-14";
14
- };
15
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
16
- size: {
17
- sm: "h-5 w-9";
18
- md: "h-6 w-11";
19
- lg: "h-7 w-14";
20
- };
21
- }, undefined>>;
9
+ }, undefined, "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--yaxa-ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--yaxa-bg)] disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none data-[state=checked]:bg-primary-600 data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700", undefined, undefined, undefined>;
22
10
  export declare const thumbVariants: import("tailwind-variants").TVReturnType<{
23
11
  size: {
24
- sm: "h-4 w-4 data-[state=checked]:translate-x-4";
25
- md: "h-5 w-5 data-[state=checked]:translate-x-5";
26
- lg: "h-6 w-6 data-[state=checked]:translate-x-7";
27
- };
28
- }, undefined, "pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 motion-reduce:transition-none data-[state=unchecked]:translate-x-0", {
29
- size: {
30
- sm: "h-4 w-4 data-[state=checked]:translate-x-4";
31
- md: "h-5 w-5 data-[state=checked]:translate-x-5";
32
- lg: "h-6 w-6 data-[state=checked]:translate-x-7";
33
- };
34
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
35
- size: {
36
- sm: "h-4 w-4 data-[state=checked]:translate-x-4";
37
- md: "h-5 w-5 data-[state=checked]:translate-x-5";
38
- lg: "h-6 w-6 data-[state=checked]:translate-x-7";
12
+ sm: string;
13
+ md: string;
14
+ lg: string;
39
15
  };
40
- }, undefined>>;
16
+ }, undefined, "pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 motion-reduce:transition-none data-[state=unchecked]:translate-x-0", undefined, undefined, undefined>;
41
17
  export interface SwitchSlots {
42
18
  root?: string;
43
19
  track?: string;
@@ -2,56 +2,22 @@ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { HTMLTextareaAttributes } from 'svelte/elements';
3
3
  export declare const textareaVariants: import("tailwind-variants").TVReturnType<{
4
4
  size: {
5
- sm: "text-sm p-2.5";
6
- md: "text-base p-3";
7
- lg: "text-base p-4";
5
+ sm: string;
6
+ md: string;
7
+ lg: string;
8
8
  };
9
9
  status: {
10
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500 focus:ring-primary-500/20";
11
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus:ring-rose-500/20";
12
- success: "border-emerald-500 focus:border-emerald-500 focus:ring-emerald-500/20";
10
+ default: string;
11
+ error: string;
12
+ success: string;
13
13
  };
14
14
  resize: {
15
- none: "resize-none";
16
- vertical: "resize-y";
17
- horizontal: "resize-x";
18
- both: "resize";
15
+ none: string;
16
+ vertical: string;
17
+ horizontal: string;
18
+ both: string;
19
19
  };
20
- }, undefined, "w-full rounded-lg border bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-400 dark:placeholder:text-neutral-500 focus:outline-none focus:ring-2 transition-all duration-150 disabled:cursor-not-allowed disabled:opacity-50", {
21
- size: {
22
- sm: "text-sm p-2.5";
23
- md: "text-base p-3";
24
- lg: "text-base p-4";
25
- };
26
- status: {
27
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500 focus:ring-primary-500/20";
28
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus:ring-rose-500/20";
29
- success: "border-emerald-500 focus:border-emerald-500 focus:ring-emerald-500/20";
30
- };
31
- resize: {
32
- none: "resize-none";
33
- vertical: "resize-y";
34
- horizontal: "resize-x";
35
- both: "resize";
36
- };
37
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
38
- size: {
39
- sm: "text-sm p-2.5";
40
- md: "text-base p-3";
41
- lg: "text-base p-4";
42
- };
43
- status: {
44
- default: "border-neutral-300 dark:border-neutral-700 focus:border-primary-500 focus:ring-primary-500/20";
45
- error: "border-rose-500 text-rose-900 dark:text-rose-100 focus:border-rose-500 focus:ring-rose-500/20";
46
- success: "border-emerald-500 focus:border-emerald-500 focus:ring-emerald-500/20";
47
- };
48
- resize: {
49
- none: "resize-none";
50
- vertical: "resize-y";
51
- horizontal: "resize-x";
52
- both: "resize";
53
- };
54
- }, undefined>>;
20
+ }, undefined, "w-full rounded-lg border bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-400 dark:placeholder:text-neutral-500 focus:outline-none focus:ring-2 transition-all duration-150 disabled:cursor-not-allowed disabled:opacity-50", undefined, undefined, undefined>;
55
21
  export type TextareaProps = Omit<HTMLTextareaAttributes, 'size'> & VariantProps<typeof textareaVariants> & {
56
22
  value?: string;
57
23
  rows?: number;
@@ -2,53 +2,21 @@ import { type VariantProps } from '../../utils/cn';
2
2
  import type { Snippet } from 'svelte';
3
3
  export declare const cardVariants: import("tailwind-variants").TVReturnType<{
4
4
  variant: {
5
- outline: "border border-neutral-200 bg-white/80 backdrop-blur-xs shadow-xs dark:border-neutral-800 dark:bg-neutral-900/80 yaxa-surface-elevated";
6
- solid: "bg-white shadow-md dark:bg-neutral-900 yaxa-surface-elevated";
7
- soft: "bg-neutral-50 dark:bg-neutral-900/50";
8
- subtle: "border border-neutral-200/60 bg-neutral-50/50 dark:border-neutral-800/60 dark:bg-neutral-900/40";
5
+ outline: string;
6
+ solid: string;
7
+ soft: string;
8
+ subtle: string;
9
9
  };
10
10
  hover: {
11
- true: "hover:shadow-md hover:border-neutral-300 dark:hover:border-neutral-700 hover:-translate-y-0.5 motion-reduce:transform-none";
11
+ true: string;
12
12
  };
13
13
  padding: {
14
- none: "";
15
- sm: "p-4";
16
- md: "p-6";
17
- lg: "p-8";
14
+ none: string;
15
+ sm: string;
16
+ md: string;
17
+ lg: string;
18
18
  };
19
- }, undefined, "rounded-xl transition-all duration-200 overflow-hidden", {
20
- variant: {
21
- outline: "border border-neutral-200 bg-white/80 backdrop-blur-xs shadow-xs dark:border-neutral-800 dark:bg-neutral-900/80 yaxa-surface-elevated";
22
- solid: "bg-white shadow-md dark:bg-neutral-900 yaxa-surface-elevated";
23
- soft: "bg-neutral-50 dark:bg-neutral-900/50";
24
- subtle: "border border-neutral-200/60 bg-neutral-50/50 dark:border-neutral-800/60 dark:bg-neutral-900/40";
25
- };
26
- hover: {
27
- true: "hover:shadow-md hover:border-neutral-300 dark:hover:border-neutral-700 hover:-translate-y-0.5 motion-reduce:transform-none";
28
- };
29
- padding: {
30
- none: "";
31
- sm: "p-4";
32
- md: "p-6";
33
- lg: "p-8";
34
- };
35
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
36
- variant: {
37
- outline: "border border-neutral-200 bg-white/80 backdrop-blur-xs shadow-xs dark:border-neutral-800 dark:bg-neutral-900/80 yaxa-surface-elevated";
38
- solid: "bg-white shadow-md dark:bg-neutral-900 yaxa-surface-elevated";
39
- soft: "bg-neutral-50 dark:bg-neutral-900/50";
40
- subtle: "border border-neutral-200/60 bg-neutral-50/50 dark:border-neutral-800/60 dark:bg-neutral-900/40";
41
- };
42
- hover: {
43
- true: "hover:shadow-md hover:border-neutral-300 dark:hover:border-neutral-700 hover:-translate-y-0.5 motion-reduce:transform-none";
44
- };
45
- padding: {
46
- none: "";
47
- sm: "p-4";
48
- md: "p-6";
49
- lg: "p-8";
50
- };
51
- }, undefined>>;
19
+ }, undefined, "rounded-xl transition-all duration-200 overflow-hidden", undefined, undefined, undefined>;
52
20
  export interface CardSlots {
53
21
  root?: string;
54
22
  header?: string;
@@ -2,32 +2,14 @@ import { type VariantProps } from '../../utils/cn.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  export declare const containerVariants: import("tailwind-variants").TVReturnType<{
4
4
  size: {
5
- sm: "max-w-3xl";
6
- md: "max-w-5xl";
7
- lg: "max-w-7xl";
8
- xl: "max-w-(--breakpoint-xl)";
9
- '2xl': "max-w-(--breakpoint-2xl)";
10
- full: "max-w-full";
5
+ sm: string;
6
+ md: string;
7
+ lg: string;
8
+ xl: string;
9
+ '2xl': string;
10
+ full: string;
11
11
  };
12
- }, undefined, "mx-auto px-4 sm:px-6 lg:px-8 w-full", {
13
- size: {
14
- sm: "max-w-3xl";
15
- md: "max-w-5xl";
16
- lg: "max-w-7xl";
17
- xl: "max-w-(--breakpoint-xl)";
18
- '2xl': "max-w-(--breakpoint-2xl)";
19
- full: "max-w-full";
20
- };
21
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
22
- size: {
23
- sm: "max-w-3xl";
24
- md: "max-w-5xl";
25
- lg: "max-w-7xl";
26
- xl: "max-w-(--breakpoint-xl)";
27
- '2xl': "max-w-(--breakpoint-2xl)";
28
- full: "max-w-full";
29
- };
30
- }, undefined>>;
12
+ }, undefined, "mx-auto px-4 sm:px-6 lg:px-8 w-full", undefined, undefined, undefined>;
31
13
  export type ContainerProps = VariantProps<typeof containerVariants> & {
32
14
  class?: string;
33
15
  children?: Snippet;
@@ -15,37 +15,7 @@ export declare const dashboardShellVariants: import("tailwind-variants").TVRetur
15
15
  topbar: string;
16
16
  main: string;
17
17
  content: string;
18
- }, undefined, {
19
- collapsed: {
20
- true: {
21
- sidebar: string;
22
- };
23
- false: {
24
- sidebar: string;
25
- };
26
- };
27
- }, {
28
- root: string;
29
- sidebar: string;
30
- topbar: string;
31
- main: string;
32
- content: string;
33
- }, import("tailwind-variants").TVReturnTypeLike<{
34
- collapsed: {
35
- true: {
36
- sidebar: string;
37
- };
38
- false: {
39
- sidebar: string;
40
- };
41
- };
42
- }, {
43
- root: string;
44
- sidebar: string;
45
- topbar: string;
46
- main: string;
47
- content: string;
48
- }>>;
18
+ }, undefined, undefined, undefined, undefined>;
49
19
  export type DashboardShellProps = VariantProps<typeof dashboardShellVariants> & {
50
20
  collapsed?: boolean;
51
21
  mobileOpen?: boolean;
@@ -17,41 +17,7 @@ export declare const resizablePanelsVariants: import("tailwind-variants").TVRetu
17
17
  root: string;
18
18
  handle: string;
19
19
  grip: string;
20
- }, undefined, {
21
- direction: {
22
- horizontal: {
23
- root: string;
24
- handle: string;
25
- grip: string;
26
- };
27
- vertical: {
28
- root: string;
29
- handle: string;
30
- grip: string;
31
- };
32
- };
33
- }, {
34
- root: string;
35
- handle: string;
36
- grip: string;
37
- }, import("tailwind-variants").TVReturnTypeLike<{
38
- direction: {
39
- horizontal: {
40
- root: string;
41
- handle: string;
42
- grip: string;
43
- };
44
- vertical: {
45
- root: string;
46
- handle: string;
47
- grip: string;
48
- };
49
- };
50
- }, {
51
- root: string;
52
- handle: string;
53
- grip: string;
54
- }>>;
20
+ }, undefined, undefined, undefined, undefined>;
55
21
  export type ResizablePanelsProps = VariantProps<typeof resizablePanelsVariants> & {
56
22
  direction?: 'horizontal' | 'vertical';
57
23
  defaultSize?: number;
@@ -0,0 +1,76 @@
1
+ import { describe, it, expect, vi } from 'vitest';
2
+ import { flushSync } from 'svelte';
3
+ import { renderComponent } from '../../testing/index.js';
4
+ import CommandPalette from './CommandPalette.svelte';
5
+ describe('CommandPalette Component (DOM & Interactions)', () => {
6
+ const testItems = [
7
+ { id: '1', label: 'Documentation Buttons', group: 'Navigation', shortcut: '⌘B' },
8
+ { id: '2', label: 'Billing Settings', group: 'Settings', shortcut: '⌘S' },
9
+ { id: '3', label: 'Dark Mode Switcher', group: 'Appearance' }
10
+ ];
11
+ it('renders dialog, search input, and command items when open is true', () => {
12
+ const { cleanup, target } = renderComponent(CommandPalette, {
13
+ open: true,
14
+ items: testItems
15
+ });
16
+ const input = target.querySelector('input') || document.querySelector('input[placeholder*="command"]');
17
+ expect(input).toBeDefined();
18
+ expect(document.body.textContent).toContain('Documentation Buttons');
19
+ expect(document.body.textContent).toContain('Billing Settings');
20
+ cleanup();
21
+ });
22
+ it('filters items dynamically when user types search query', async () => {
23
+ const { cleanup, target } = renderComponent(CommandPalette, {
24
+ open: true,
25
+ items: testItems
26
+ });
27
+ const input = (target.querySelector('input') ||
28
+ document.querySelector('input[type="text"]'));
29
+ expect(input).toBeDefined();
30
+ if (input) {
31
+ input.value = 'Buttons';
32
+ input.dispatchEvent(new Event('input', { bubbles: true }));
33
+ flushSync();
34
+ expect(document.body.textContent).toContain('Documentation Buttons');
35
+ expect(document.body.textContent).not.toContain('Billing Settings');
36
+ }
37
+ cleanup();
38
+ });
39
+ it('triggers item onSelect callback when clicked', async () => {
40
+ const onSelect = vi.fn();
41
+ const itemsWithAction = [{ id: 'action-1', label: 'Create Workspace', onSelect }];
42
+ const { cleanup } = renderComponent(CommandPalette, {
43
+ open: true,
44
+ items: itemsWithAction
45
+ });
46
+ const actionEl = Array.from(document.querySelectorAll('button, [role="button"]')).find((el) => el.textContent?.includes('Create Workspace'));
47
+ expect(actionEl).toBeDefined();
48
+ if (actionEl) {
49
+ actionEl.click();
50
+ flushSync();
51
+ expect(onSelect).toHaveBeenCalledOnce();
52
+ }
53
+ cleanup();
54
+ });
55
+ it('toggles open state via global Ctrl+K and closes on Escape', async () => {
56
+ const { cleanup } = renderComponent(CommandPalette, {
57
+ open: false,
58
+ items: testItems
59
+ });
60
+ // Trigger global Ctrl+K
61
+ window.dispatchEvent(new KeyboardEvent('keydown', {
62
+ key: 'k',
63
+ ctrlKey: true,
64
+ bubbles: true
65
+ }));
66
+ flushSync();
67
+ expect(document.body.textContent).toContain('Documentation Buttons');
68
+ // Trigger Escape
69
+ window.dispatchEvent(new KeyboardEvent('keydown', {
70
+ key: 'Escape',
71
+ bubbles: true
72
+ }));
73
+ flushSync();
74
+ cleanup();
75
+ });
76
+ });
@@ -11,20 +11,10 @@ export interface StepItem {
11
11
  }
12
12
  export declare const stepperVariants: import("tailwind-variants").TVReturnType<{
13
13
  orientation: {
14
- horizontal: "flex-row items-center justify-between";
15
- vertical: "flex-col space-y-6";
14
+ horizontal: string;
15
+ vertical: string;
16
16
  };
17
- }, undefined, "flex w-full", {
18
- orientation: {
19
- horizontal: "flex-row items-center justify-between";
20
- vertical: "flex-col space-y-6";
21
- };
22
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
23
- orientation: {
24
- horizontal: "flex-row items-center justify-between";
25
- vertical: "flex-col space-y-6";
26
- };
27
- }, undefined>>;
17
+ }, undefined, "flex w-full", undefined, undefined, undefined>;
28
18
  export type StepperProps = VariantProps<typeof stepperVariants> & {
29
19
  steps?: StepItem[];
30
20
  currentStep?: number;
@@ -3,26 +3,12 @@ import type { Snippet } from 'svelte';
3
3
  import type { IconSource } from '../elements/Icon.svelte';
4
4
  export declare const alertVariants: import("tailwind-variants").TVReturnType<{
5
5
  color: {
6
- info: "border-sky-200 bg-sky-50/70 text-sky-900 dark:border-sky-900/50 dark:bg-sky-950/30 dark:text-sky-200";
7
- success: "border-emerald-200 bg-emerald-50/70 text-emerald-900 dark:border-emerald-900/50 dark:bg-emerald-950/30 dark:text-emerald-200";
8
- warning: "border-amber-200 bg-amber-50/70 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200";
9
- error: "border-rose-200 bg-rose-50/70 text-rose-900 dark:border-rose-900/50 dark:bg-rose-950/30 dark:text-rose-200";
6
+ info: string;
7
+ success: string;
8
+ warning: string;
9
+ error: string;
10
10
  };
11
- }, undefined, "relative w-full rounded-xl border p-4 transition-all duration-150", {
12
- color: {
13
- info: "border-sky-200 bg-sky-50/70 text-sky-900 dark:border-sky-900/50 dark:bg-sky-950/30 dark:text-sky-200";
14
- success: "border-emerald-200 bg-emerald-50/70 text-emerald-900 dark:border-emerald-900/50 dark:bg-emerald-950/30 dark:text-emerald-200";
15
- warning: "border-amber-200 bg-amber-50/70 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200";
16
- error: "border-rose-200 bg-rose-50/70 text-rose-900 dark:border-rose-900/50 dark:bg-rose-950/30 dark:text-rose-200";
17
- };
18
- }, undefined, import("tailwind-variants").TVReturnTypeLike<{
19
- color: {
20
- info: "border-sky-200 bg-sky-50/70 text-sky-900 dark:border-sky-900/50 dark:bg-sky-950/30 dark:text-sky-200";
21
- success: "border-emerald-200 bg-emerald-50/70 text-emerald-900 dark:border-emerald-900/50 dark:bg-emerald-950/30 dark:text-emerald-200";
22
- warning: "border-amber-200 bg-amber-50/70 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200";
23
- error: "border-rose-200 bg-rose-50/70 text-rose-900 dark:border-rose-900/50 dark:bg-rose-950/30 dark:text-rose-200";
24
- };
25
- }, undefined>>;
11
+ }, undefined, "relative w-full rounded-xl border p-4 transition-all duration-150", undefined, undefined, undefined>;
26
12
  export interface AlertSlots {
27
13
  root?: string;
28
14
  icon?: string;