@colletdev/svelte 0.1.3

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 (107) hide show
  1. package/README.md +58 -0
  2. package/package.json +33 -0
  3. package/src/accordion.svelte +52 -0
  4. package/src/accordion.svelte.d.ts +19 -0
  5. package/src/activity-group.svelte +34 -0
  6. package/src/activity-group.svelte.d.ts +16 -0
  7. package/src/alert.svelte +61 -0
  8. package/src/alert.svelte.d.ts +24 -0
  9. package/src/autocomplete.svelte +126 -0
  10. package/src/autocomplete.svelte.d.ts +47 -0
  11. package/src/avatar.svelte +32 -0
  12. package/src/avatar.svelte.d.ts +15 -0
  13. package/src/backdrop.svelte +24 -0
  14. package/src/backdrop.svelte.d.ts +11 -0
  15. package/src/badge.svelte +45 -0
  16. package/src/badge.svelte.d.ts +19 -0
  17. package/src/breadcrumb.svelte +42 -0
  18. package/src/breadcrumb.svelte.d.ts +16 -0
  19. package/src/button.svelte +52 -0
  20. package/src/button.svelte.d.ts +23 -0
  21. package/src/card.svelte +67 -0
  22. package/src/card.svelte.d.ts +22 -0
  23. package/src/carousel.svelte +59 -0
  24. package/src/carousel.svelte.d.ts +29 -0
  25. package/src/chat-input.svelte +76 -0
  26. package/src/chat-input.svelte.d.ts +28 -0
  27. package/src/checkbox.svelte +83 -0
  28. package/src/checkbox.svelte.d.ts +29 -0
  29. package/src/code-block.svelte +40 -0
  30. package/src/code-block.svelte.d.ts +19 -0
  31. package/src/collapsible.svelte +56 -0
  32. package/src/collapsible.svelte.d.ts +27 -0
  33. package/src/date-picker.svelte +110 -0
  34. package/src/date-picker.svelte.d.ts +40 -0
  35. package/src/dialog.svelte +56 -0
  36. package/src/dialog.svelte.d.ts +24 -0
  37. package/src/drawer.svelte +56 -0
  38. package/src/drawer.svelte.d.ts +24 -0
  39. package/src/elements.d.ts +715 -0
  40. package/src/fab.svelte +48 -0
  41. package/src/fab.svelte.d.ts +21 -0
  42. package/src/file-upload.svelte +55 -0
  43. package/src/file-upload.svelte.d.ts +24 -0
  44. package/src/index.ts +85 -0
  45. package/src/label.svelte +29 -0
  46. package/src/label.svelte.d.ts +20 -0
  47. package/src/listbox.svelte +75 -0
  48. package/src/listbox.svelte.d.ts +21 -0
  49. package/src/menu.svelte +76 -0
  50. package/src/menu.svelte.d.ts +27 -0
  51. package/src/message-bubble.svelte +49 -0
  52. package/src/message-bubble.svelte.d.ts +20 -0
  53. package/src/message-group.svelte +41 -0
  54. package/src/message-group.svelte.d.ts +16 -0
  55. package/src/message-part.svelte +20 -0
  56. package/src/message-part.svelte.d.ts +9 -0
  57. package/src/pagination.svelte +40 -0
  58. package/src/pagination.svelte.d.ts +19 -0
  59. package/src/popover.svelte +66 -0
  60. package/src/popover.svelte.d.ts +28 -0
  61. package/src/profile-menu.svelte +55 -0
  62. package/src/profile-menu.svelte.d.ts +24 -0
  63. package/src/progress.svelte +33 -0
  64. package/src/progress.svelte.d.ts +16 -0
  65. package/src/radio-group.svelte +91 -0
  66. package/src/radio-group.svelte.d.ts +26 -0
  67. package/src/scrollbar.svelte +41 -0
  68. package/src/scrollbar.svelte.d.ts +16 -0
  69. package/src/search-bar.svelte +94 -0
  70. package/src/search-bar.svelte.d.ts +34 -0
  71. package/src/select.svelte +112 -0
  72. package/src/select.svelte.d.ts +37 -0
  73. package/src/separator.svelte +25 -0
  74. package/src/separator.svelte.d.ts +18 -0
  75. package/src/sidebar.svelte +65 -0
  76. package/src/sidebar.svelte.d.ts +26 -0
  77. package/src/skeleton.svelte +30 -0
  78. package/src/skeleton.svelte.d.ts +14 -0
  79. package/src/slider.svelte +100 -0
  80. package/src/slider.svelte.d.ts +35 -0
  81. package/src/speed-dial.svelte +66 -0
  82. package/src/speed-dial.svelte.d.ts +30 -0
  83. package/src/spinner.svelte +26 -0
  84. package/src/spinner.svelte.d.ts +12 -0
  85. package/src/split-button.svelte +64 -0
  86. package/src/split-button.svelte.d.ts +28 -0
  87. package/src/stepper.svelte +48 -0
  88. package/src/stepper.svelte.d.ts +19 -0
  89. package/src/switch.svelte +85 -0
  90. package/src/switch.svelte.d.ts +30 -0
  91. package/src/table.svelte +133 -0
  92. package/src/table.svelte.d.ts +33 -0
  93. package/src/tabs.svelte +51 -0
  94. package/src/tabs.svelte.d.ts +21 -0
  95. package/src/text-input.svelte +126 -0
  96. package/src/text-input.svelte.d.ts +49 -0
  97. package/src/text.svelte +63 -0
  98. package/src/text.svelte.d.ts +23 -0
  99. package/src/thinking.svelte +30 -0
  100. package/src/thinking.svelte.d.ts +14 -0
  101. package/src/toast.svelte +58 -0
  102. package/src/toast.svelte.d.ts +25 -0
  103. package/src/toggle-group.svelte +64 -0
  104. package/src/toggle-group.svelte.d.ts +23 -0
  105. package/src/tooltip.svelte +38 -0
  106. package/src/tooltip.svelte.d.ts +17 -0
  107. package/src/types.ts +334 -0
@@ -0,0 +1,40 @@
1
+ <!-- Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT -->
2
+ <!-- Svelte 5 wrapper for <cx-pagination> -->
3
+ <script lang="ts">
4
+
5
+ interface Props {
6
+ id?: string;
7
+ currentPage: number;
8
+ pageSize: number;
9
+ totalItems: number;
10
+ label?: string;
11
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+ showInfo?: boolean;
13
+ showPrevNext?: boolean;
14
+ prevLabel?: string;
15
+ nextLabel?: string;
16
+ pageSizeOptions?: string;
17
+ }
18
+
19
+ let { id, currentPage, pageSize, totalItems, label, size, showInfo, showPrevNext, prevLabel, nextLabel, pageSizeOptions }: Props = $props();
20
+
21
+ let el: HTMLElement;
22
+
23
+
24
+
25
+ </script>
26
+
27
+ <cx-pagination
28
+ bind:this={el}
29
+ id={typeof id === 'object' && id != null ? JSON.stringify(id) : id}
30
+ current-page={typeof currentPage === 'object' && currentPage != null ? JSON.stringify(currentPage) : currentPage}
31
+ page-size={typeof pageSize === 'object' && pageSize != null ? JSON.stringify(pageSize) : pageSize}
32
+ total-items={typeof totalItems === 'object' && totalItems != null ? JSON.stringify(totalItems) : totalItems}
33
+ label={typeof label === 'object' && label != null ? JSON.stringify(label) : label}
34
+ size={typeof size === 'object' && size != null ? JSON.stringify(size) : size}
35
+ show-info={showInfo || undefined}
36
+ show-prev-next={showPrevNext || undefined}
37
+ prev-label={typeof prevLabel === 'object' && prevLabel != null ? JSON.stringify(prevLabel) : prevLabel}
38
+ next-label={typeof nextLabel === 'object' && nextLabel != null ? JSON.stringify(nextLabel) : nextLabel}
39
+ page-size-options={typeof pageSizeOptions === 'object' && pageSizeOptions != null ? JSON.stringify(pageSizeOptions) : pageSizeOptions}
40
+ />
@@ -0,0 +1,19 @@
1
+ // Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT
2
+ import type { Component } from 'svelte';
3
+
4
+ interface PaginationProps {
5
+ id?: string;
6
+ currentPage: number;
7
+ pageSize: number;
8
+ totalItems: number;
9
+ label?: string;
10
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
+ showInfo?: boolean;
12
+ showPrevNext?: boolean;
13
+ prevLabel?: string;
14
+ nextLabel?: string;
15
+ pageSizeOptions?: string;
16
+ }
17
+
18
+ declare const Pagination: Component<PaginationProps, {}>;
19
+ export default Pagination;
@@ -0,0 +1,66 @@
1
+ <!-- Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT -->
2
+ <!-- Svelte 5 wrapper for <cx-popover> -->
3
+ <script lang="ts">
4
+
5
+ interface Props {
6
+ id?: string;
7
+ triggerLabel: string;
8
+ title?: string;
9
+ description?: string;
10
+ width?: 'sm' | 'md' | 'lg' | 'xl' | 'auto';
11
+ placement?: 'top' | 'bottom';
12
+ align?: 'start' | 'center' | 'end';
13
+ arrow?: boolean;
14
+ closeButton?: boolean;
15
+ variant?: 'outline' | 'filled' | 'ghost';
16
+ shape?: 'sharp' | 'rounded' | 'pill';
17
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
18
+ icon?: string;
19
+ disabled?: boolean;
20
+ children?: import('svelte').Snippet;
21
+ }
22
+
23
+ let { id, triggerLabel, title, description, width, placement, align, arrow, closeButton, variant, shape, size, icon, disabled, children }: Props = $props();
24
+
25
+ let el: HTMLElement;
26
+
27
+
28
+ $effect(() => {
29
+ if (!el) return;
30
+ if (title != null) el.setAttribute('title', String(title));
31
+ else el.removeAttribute('title');
32
+ });
33
+ $effect(() => {
34
+ if (!el) return;
35
+ if (width != null) el.setAttribute('width', String(width));
36
+ else el.removeAttribute('width');
37
+ });
38
+ $effect(() => {
39
+ if (!el) return;
40
+ if (align != null) el.setAttribute('align', String(align));
41
+ else el.removeAttribute('align');
42
+ });
43
+ /** Opens the popover panel. */
44
+ export function open() { (el as any)?.open(); }
45
+ /** Closes the popover panel. */
46
+ export function close() { (el as any)?.close(); }
47
+ </script>
48
+
49
+ <cx-popover
50
+ bind:this={el}
51
+ id={typeof id === 'object' && id != null ? JSON.stringify(id) : id}
52
+ trigger-label={typeof triggerLabel === 'object' && triggerLabel != null ? JSON.stringify(triggerLabel) : triggerLabel}
53
+ description={typeof description === 'object' && description != null ? JSON.stringify(description) : description}
54
+ placement={typeof placement === 'object' && placement != null ? JSON.stringify(placement) : placement}
55
+ arrow={arrow || undefined}
56
+ close-button={closeButton || undefined}
57
+ variant={typeof variant === 'object' && variant != null ? JSON.stringify(variant) : variant}
58
+ shape={typeof shape === 'object' && shape != null ? JSON.stringify(shape) : shape}
59
+ size={typeof size === 'object' && size != null ? JSON.stringify(size) : size}
60
+ icon={typeof icon === 'object' && icon != null ? JSON.stringify(icon) : icon}
61
+ disabled={disabled || undefined}
62
+ >
63
+ {#if children}
64
+ {@render children()}
65
+ {/if}
66
+ </cx-popover>
@@ -0,0 +1,28 @@
1
+ // Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT
2
+ import type { Component } from 'svelte';
3
+
4
+ interface PopoverProps {
5
+ id?: string;
6
+ triggerLabel: string;
7
+ title?: string;
8
+ description?: string;
9
+ width?: 'sm' | 'md' | 'lg' | 'xl' | 'auto';
10
+ placement?: 'top' | 'bottom';
11
+ align?: 'start' | 'center' | 'end';
12
+ arrow?: boolean;
13
+ closeButton?: boolean;
14
+ variant?: 'outline' | 'filled' | 'ghost';
15
+ shape?: 'sharp' | 'rounded' | 'pill';
16
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17
+ icon?: string;
18
+ disabled?: boolean;
19
+ children?: import('svelte').Snippet;
20
+ }
21
+
22
+ declare const Popover: Component<PopoverProps, {
23
+ /** Opens the popover panel. */
24
+ open(): void;
25
+ /** Closes the popover panel. */
26
+ close(): void;
27
+ }>;
28
+ export default Popover;
@@ -0,0 +1,55 @@
1
+ <!-- Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT -->
2
+ <!-- Svelte 5 wrapper for <cx-profile-menu> -->
3
+ <script lang="ts">
4
+ import type { MenuActionDetail, MenuEntry } from './types.js';
5
+
6
+ interface Props {
7
+ id?: string;
8
+ label: string;
9
+ image?: string;
10
+ initials?: string;
11
+ shape?: 'circle' | 'rounded';
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ width?: 'auto' | 'sm' | 'md' | 'lg';
14
+ entries?: MenuEntry[] | string;
15
+ disabled?: boolean;
16
+ onAction?: (event: CustomEvent<MenuActionDetail>) => void;
17
+ }
18
+
19
+ let { id, label, image, initials, shape, size, width, entries, disabled, onAction }: Props = $props();
20
+
21
+ let el: HTMLElement;
22
+
23
+
24
+ $effect(() => {
25
+ if (!el) return;
26
+ if (width != null) el.setAttribute('width', String(width));
27
+ else el.removeAttribute('width');
28
+ });
29
+ $effect(() => {
30
+ if (!el) return;
31
+ if (entries != null) el.setAttribute('entries', typeof entries === 'object' ? JSON.stringify(entries) : String(entries));
32
+ else el.removeAttribute('entries');
33
+ });
34
+ $effect(() => {
35
+ if (!el) return;
36
+ const handler = (e: Event) => onAction?.(e as CustomEvent);
37
+ el.addEventListener('cx-action', handler);
38
+ return () => el.removeEventListener('cx-action', handler);
39
+ });
40
+ /** Opens the profile menu dropdown. */
41
+ export function open() { (el as any)?.open(); }
42
+ /** Closes the profile menu dropdown. */
43
+ export function close() { (el as any)?.close(); }
44
+ </script>
45
+
46
+ <cx-profile-menu
47
+ bind:this={el}
48
+ id={typeof id === 'object' && id != null ? JSON.stringify(id) : id}
49
+ label={typeof label === 'object' && label != null ? JSON.stringify(label) : label}
50
+ image={typeof image === 'object' && image != null ? JSON.stringify(image) : image}
51
+ initials={typeof initials === 'object' && initials != null ? JSON.stringify(initials) : initials}
52
+ shape={typeof shape === 'object' && shape != null ? JSON.stringify(shape) : shape}
53
+ size={typeof size === 'object' && size != null ? JSON.stringify(size) : size}
54
+ disabled={disabled || undefined}
55
+ />
@@ -0,0 +1,24 @@
1
+ // Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT
2
+ import type { Component } from 'svelte';
3
+ import type { MenuActionDetail, MenuEntry } from './types.js';
4
+
5
+ interface ProfileMenuProps {
6
+ id?: string;
7
+ label: string;
8
+ image?: string;
9
+ initials?: string;
10
+ shape?: 'circle' | 'rounded';
11
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+ width?: 'auto' | 'sm' | 'md' | 'lg';
13
+ entries?: MenuEntry[] | string;
14
+ disabled?: boolean;
15
+ onAction?: (event: CustomEvent<MenuActionDetail>) => void;
16
+ }
17
+
18
+ declare const ProfileMenu: Component<ProfileMenuProps, {
19
+ /** Opens the profile menu dropdown. */
20
+ open(): void;
21
+ /** Closes the profile menu dropdown. */
22
+ close(): void;
23
+ }>;
24
+ export default ProfileMenu;
@@ -0,0 +1,33 @@
1
+ <!-- Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT -->
2
+ <!-- Svelte 5 wrapper for <cx-progress> -->
3
+ <script lang="ts">
4
+
5
+ interface Props {
6
+ id?: string;
7
+ label?: string;
8
+ /** Percentage 0–100. No max prop — the component assumes max=100. */
9
+ value?: number;
10
+ valueText?: string;
11
+ intent?: 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
12
+ shape?: 'rounded' | 'sharp' | 'pill';
13
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
14
+ }
15
+
16
+ let { id, label, value, valueText, intent, shape, size }: Props = $props();
17
+
18
+ let el: HTMLElement;
19
+
20
+
21
+
22
+ </script>
23
+
24
+ <cx-progress
25
+ bind:this={el}
26
+ id={typeof id === 'object' && id != null ? JSON.stringify(id) : id}
27
+ label={typeof label === 'object' && label != null ? JSON.stringify(label) : label}
28
+ value={typeof value === 'object' && value != null ? JSON.stringify(value) : value}
29
+ value-text={typeof valueText === 'object' && valueText != null ? JSON.stringify(valueText) : valueText}
30
+ intent={typeof intent === 'object' && intent != null ? JSON.stringify(intent) : intent}
31
+ shape={typeof shape === 'object' && shape != null ? JSON.stringify(shape) : shape}
32
+ size={typeof size === 'object' && size != null ? JSON.stringify(size) : size}
33
+ />
@@ -0,0 +1,16 @@
1
+ // Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT
2
+ import type { Component } from 'svelte';
3
+
4
+ interface ProgressProps {
5
+ id?: string;
6
+ label?: string;
7
+ /** Percentage 0–100. No max prop — the component assumes max=100. */
8
+ value?: number;
9
+ valueText?: string;
10
+ intent?: 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
11
+ shape?: 'rounded' | 'sharp' | 'pill';
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ }
14
+
15
+ declare const Progress: Component<ProgressProps, {}>;
16
+ export default Progress;
@@ -0,0 +1,91 @@
1
+ <!-- Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT -->
2
+ <!-- Svelte 5 wrapper for <cx-radio-group> -->
3
+ <script lang="ts">
4
+ import type { FocusDetail, KeyboardDetail, RadioOption, SelectDetail } from './types.js';
5
+
6
+ interface Props {
7
+ name?: string;
8
+ legend: string;
9
+ options?: RadioOption[] | string;
10
+ shape?: 'round' | 'rounded';
11
+ orientation?: 'vertical' | 'horizontal';
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ selected?: string;
14
+ disabled?: boolean;
15
+ required?: boolean;
16
+ helperText?: string;
17
+ error?: string;
18
+ onInput?: (event: CustomEvent) => void;
19
+ onChange?: (event: CustomEvent<SelectDetail>) => void;
20
+ onFocus?: (event: CustomEvent<FocusDetail>) => void;
21
+ onBlur?: (event: CustomEvent<FocusDetail>) => void;
22
+ onKeydown?: (event: CustomEvent<KeyboardDetail>) => void;
23
+ onKeyup?: (event: CustomEvent<KeyboardDetail>) => void;
24
+ }
25
+
26
+ let { name, legend, options, shape, orientation, size, selected, disabled, required, helperText, error, onInput, onChange, onFocus, onBlur, onKeydown, onKeyup }: Props = $props();
27
+
28
+ let el: HTMLElement;
29
+
30
+
31
+ $effect(() => {
32
+ if (!el) return;
33
+ if (name != null) el.setAttribute('name', String(name));
34
+ else el.removeAttribute('name');
35
+ });
36
+ $effect(() => {
37
+ if (!el) return;
38
+ if (options != null) el.setAttribute('options', typeof options === 'object' ? JSON.stringify(options) : String(options));
39
+ else el.removeAttribute('options');
40
+ });
41
+ $effect(() => {
42
+ if (!el) return;
43
+ const handler = (e: Event) => onInput?.(e as CustomEvent);
44
+ el.addEventListener('cx-input', handler);
45
+ return () => el.removeEventListener('cx-input', handler);
46
+ });
47
+ $effect(() => {
48
+ if (!el) return;
49
+ const handler = (e: Event) => onChange?.(e as CustomEvent);
50
+ el.addEventListener('cx-change', handler);
51
+ return () => el.removeEventListener('cx-change', handler);
52
+ });
53
+ $effect(() => {
54
+ if (!el) return;
55
+ const handler = (e: Event) => onFocus?.(e as CustomEvent);
56
+ el.addEventListener('cx-focus', handler);
57
+ return () => el.removeEventListener('cx-focus', handler);
58
+ });
59
+ $effect(() => {
60
+ if (!el) return;
61
+ const handler = (e: Event) => onBlur?.(e as CustomEvent);
62
+ el.addEventListener('cx-blur', handler);
63
+ return () => el.removeEventListener('cx-blur', handler);
64
+ });
65
+ $effect(() => {
66
+ if (!el) return;
67
+ const handler = (e: Event) => onKeydown?.(e as CustomEvent);
68
+ el.addEventListener('cx-keydown', handler);
69
+ return () => el.removeEventListener('cx-keydown', handler);
70
+ });
71
+ $effect(() => {
72
+ if (!el) return;
73
+ const handler = (e: Event) => onKeyup?.(e as CustomEvent);
74
+ el.addEventListener('cx-keyup', handler);
75
+ return () => el.removeEventListener('cx-keyup', handler);
76
+ });
77
+
78
+ </script>
79
+
80
+ <cx-radio-group
81
+ bind:this={el}
82
+ legend={typeof legend === 'object' && legend != null ? JSON.stringify(legend) : legend}
83
+ shape={typeof shape === 'object' && shape != null ? JSON.stringify(shape) : shape}
84
+ orientation={typeof orientation === 'object' && orientation != null ? JSON.stringify(orientation) : orientation}
85
+ size={typeof size === 'object' && size != null ? JSON.stringify(size) : size}
86
+ selected={typeof selected === 'object' && selected != null ? JSON.stringify(selected) : selected}
87
+ disabled={disabled || undefined}
88
+ required={required || undefined}
89
+ helper-text={typeof helperText === 'object' && helperText != null ? JSON.stringify(helperText) : helperText}
90
+ error={typeof error === 'object' && error != null ? JSON.stringify(error) : error}
91
+ />
@@ -0,0 +1,26 @@
1
+ // Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT
2
+ import type { Component } from 'svelte';
3
+ import type { FocusDetail, KeyboardDetail, RadioOption, SelectDetail } from './types.js';
4
+
5
+ interface RadioGroupProps {
6
+ name?: string;
7
+ legend: string;
8
+ options?: RadioOption[] | string;
9
+ shape?: 'round' | 'rounded';
10
+ orientation?: 'vertical' | 'horizontal';
11
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+ selected?: string;
13
+ disabled?: boolean;
14
+ required?: boolean;
15
+ helperText?: string;
16
+ error?: string;
17
+ onInput?: (event: CustomEvent) => void;
18
+ onChange?: (event: CustomEvent<SelectDetail>) => void;
19
+ onFocus?: (event: CustomEvent<FocusDetail>) => void;
20
+ onBlur?: (event: CustomEvent<FocusDetail>) => void;
21
+ onKeydown?: (event: CustomEvent<KeyboardDetail>) => void;
22
+ onKeyup?: (event: CustomEvent<KeyboardDetail>) => void;
23
+ }
24
+
25
+ declare const RadioGroup: Component<RadioGroupProps, {}>;
26
+ export default RadioGroup;
@@ -0,0 +1,41 @@
1
+ <!-- Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT -->
2
+ <!-- Svelte 5 wrapper for <cx-scrollbar> -->
3
+ <script lang="ts">
4
+
5
+ interface Props {
6
+ id?: string;
7
+ shape?: 'sharp' | 'rounded' | 'pill';
8
+ track?: 'with-track' | 'floating';
9
+ axis?: 'vertical' | 'horizontal' | 'both';
10
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
+ height?: string;
12
+ label?: string;
13
+ children?: import('svelte').Snippet;
14
+ }
15
+
16
+ let { id, shape, track, axis, size, height, label, children }: Props = $props();
17
+
18
+ let el: HTMLElement;
19
+
20
+
21
+ $effect(() => {
22
+ if (!el) return;
23
+ if (height != null) el.setAttribute('height', String(height));
24
+ else el.removeAttribute('height');
25
+ });
26
+
27
+ </script>
28
+
29
+ <cx-scrollbar
30
+ bind:this={el}
31
+ id={typeof id === 'object' && id != null ? JSON.stringify(id) : id}
32
+ shape={typeof shape === 'object' && shape != null ? JSON.stringify(shape) : shape}
33
+ track={typeof track === 'object' && track != null ? JSON.stringify(track) : track}
34
+ axis={typeof axis === 'object' && axis != null ? JSON.stringify(axis) : axis}
35
+ size={typeof size === 'object' && size != null ? JSON.stringify(size) : size}
36
+ label={typeof label === 'object' && label != null ? JSON.stringify(label) : label}
37
+ >
38
+ {#if children}
39
+ {@render children()}
40
+ {/if}
41
+ </cx-scrollbar>
@@ -0,0 +1,16 @@
1
+ // Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT
2
+ import type { Component } from 'svelte';
3
+
4
+ interface ScrollbarProps {
5
+ id?: string;
6
+ shape?: 'sharp' | 'rounded' | 'pill';
7
+ track?: 'with-track' | 'floating';
8
+ axis?: 'vertical' | 'horizontal' | 'both';
9
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
10
+ height?: string;
11
+ label?: string;
12
+ children?: import('svelte').Snippet;
13
+ }
14
+
15
+ declare const Scrollbar: Component<ScrollbarProps, {}>;
16
+ export default Scrollbar;
@@ -0,0 +1,94 @@
1
+ <!-- Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT -->
2
+ <!-- Svelte 5 wrapper for <cx-search-bar> -->
3
+ <script lang="ts">
4
+ import type { FocusDetail, KeyboardDetail } from './types.js';
5
+
6
+ interface Props {
7
+ id?: string;
8
+ placeholder?: string;
9
+ label?: string;
10
+ variant?: 'outline' | 'filled' | 'ghost';
11
+ shape?: 'sharp' | 'rounded' | 'pill';
12
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+ name?: string;
14
+ value?: string;
15
+ debounceMs?: number;
16
+ loading?: boolean;
17
+ shortcut?: string;
18
+ expandable?: boolean;
19
+ disabled?: boolean;
20
+ readonly?: boolean;
21
+ controls?: string;
22
+ shimmer?: boolean;
23
+ onFocus?: (event: CustomEvent<FocusDetail>) => void;
24
+ onBlur?: (event: CustomEvent<FocusDetail>) => void;
25
+ onKeydown?: (event: CustomEvent<KeyboardDetail>) => void;
26
+ onKeyup?: (event: CustomEvent<KeyboardDetail>) => void;
27
+ }
28
+
29
+ let { id, placeholder, label, variant, shape, size, name, value, debounceMs, loading, shortcut, expandable, disabled, readonly, controls, shimmer, onFocus, onBlur, onKeydown, onKeyup }: Props = $props();
30
+
31
+ let el: HTMLElement;
32
+
33
+
34
+ $effect(() => {
35
+ if (!el) return;
36
+ if (name != null) el.setAttribute('name', String(name));
37
+ else el.removeAttribute('name');
38
+ });
39
+ $effect(() => {
40
+ if (!el) return;
41
+ if (value != null) el.setAttribute('value', String(value));
42
+ else el.removeAttribute('value');
43
+ });
44
+ $effect(() => {
45
+ if (!el) return;
46
+ if (loading != null) el.setAttribute('loading', String(loading));
47
+ else el.removeAttribute('loading');
48
+ });
49
+ $effect(() => {
50
+ if (!el) return;
51
+ const handler = (e: Event) => onFocus?.(e as CustomEvent);
52
+ el.addEventListener('cx-focus', handler);
53
+ return () => el.removeEventListener('cx-focus', handler);
54
+ });
55
+ $effect(() => {
56
+ if (!el) return;
57
+ const handler = (e: Event) => onBlur?.(e as CustomEvent);
58
+ el.addEventListener('cx-blur', handler);
59
+ return () => el.removeEventListener('cx-blur', handler);
60
+ });
61
+ $effect(() => {
62
+ if (!el) return;
63
+ const handler = (e: Event) => onKeydown?.(e as CustomEvent);
64
+ el.addEventListener('cx-keydown', handler);
65
+ return () => el.removeEventListener('cx-keydown', handler);
66
+ });
67
+ $effect(() => {
68
+ if (!el) return;
69
+ const handler = (e: Event) => onKeyup?.(e as CustomEvent);
70
+ el.addEventListener('cx-keyup', handler);
71
+ return () => el.removeEventListener('cx-keyup', handler);
72
+ });
73
+ /** Focuses the search input. */
74
+ export function focus() { (el as any)?.focus(); }
75
+ /** Clears the search input value. */
76
+ export function clear() { (el as any)?.clear(); }
77
+ </script>
78
+
79
+ <cx-search-bar
80
+ bind:this={el}
81
+ id={typeof id === 'object' && id != null ? JSON.stringify(id) : id}
82
+ placeholder={typeof placeholder === 'object' && placeholder != null ? JSON.stringify(placeholder) : placeholder}
83
+ label={typeof label === 'object' && label != null ? JSON.stringify(label) : label}
84
+ variant={typeof variant === 'object' && variant != null ? JSON.stringify(variant) : variant}
85
+ shape={typeof shape === 'object' && shape != null ? JSON.stringify(shape) : shape}
86
+ size={typeof size === 'object' && size != null ? JSON.stringify(size) : size}
87
+ debounce-ms={typeof debounceMs === 'object' && debounceMs != null ? JSON.stringify(debounceMs) : debounceMs}
88
+ shortcut={typeof shortcut === 'object' && shortcut != null ? JSON.stringify(shortcut) : shortcut}
89
+ expandable={expandable || undefined}
90
+ disabled={disabled || undefined}
91
+ readonly={readonly || undefined}
92
+ controls={typeof controls === 'object' && controls != null ? JSON.stringify(controls) : controls}
93
+ shimmer={shimmer || undefined}
94
+ />
@@ -0,0 +1,34 @@
1
+ // Auto-generated by scripts/generate-svelte.mjs — DO NOT EDIT
2
+ import type { Component } from 'svelte';
3
+ import type { FocusDetail, KeyboardDetail } from './types.js';
4
+
5
+ interface SearchBarProps {
6
+ id?: string;
7
+ placeholder?: string;
8
+ label?: string;
9
+ variant?: 'outline' | 'filled' | 'ghost';
10
+ shape?: 'sharp' | 'rounded' | 'pill';
11
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
12
+ name?: string;
13
+ value?: string;
14
+ debounceMs?: number;
15
+ loading?: boolean;
16
+ shortcut?: string;
17
+ expandable?: boolean;
18
+ disabled?: boolean;
19
+ readonly?: boolean;
20
+ controls?: string;
21
+ shimmer?: boolean;
22
+ onFocus?: (event: CustomEvent<FocusDetail>) => void;
23
+ onBlur?: (event: CustomEvent<FocusDetail>) => void;
24
+ onKeydown?: (event: CustomEvent<KeyboardDetail>) => void;
25
+ onKeyup?: (event: CustomEvent<KeyboardDetail>) => void;
26
+ }
27
+
28
+ declare const SearchBar: Component<SearchBarProps, {
29
+ /** Focuses the search input. */
30
+ focus(): void;
31
+ /** Clears the search input value. */
32
+ clear(): void;
33
+ }>;
34
+ export default SearchBar;