@colletdev/vue 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 (108) hide show
  1. package/README.md +64 -0
  2. package/dist/accordion.d.ts +68 -0
  3. package/dist/accordion.js +68 -0
  4. package/dist/activity-group.d.ts +56 -0
  5. package/dist/activity-group.js +50 -0
  6. package/dist/alert.d.ts +94 -0
  7. package/dist/alert.js +76 -0
  8. package/dist/autocomplete.d.ts +161 -0
  9. package/dist/autocomplete.js +132 -0
  10. package/dist/avatar.d.ts +50 -0
  11. package/dist/avatar.js +47 -0
  12. package/dist/backdrop.d.ts +25 -0
  13. package/dist/backdrop.js +35 -0
  14. package/dist/badge.d.ts +74 -0
  15. package/dist/badge.js +59 -0
  16. package/dist/breadcrumb.d.ts +49 -0
  17. package/dist/breadcrumb.js +53 -0
  18. package/dist/button.d.ts +92 -0
  19. package/dist/button.js +68 -0
  20. package/dist/card.d.ts +60 -0
  21. package/dist/card.js +58 -0
  22. package/dist/carousel.d.ts +97 -0
  23. package/dist/carousel.js +77 -0
  24. package/dist/chat-input.d.ts +99 -0
  25. package/dist/chat-input.js +79 -0
  26. package/dist/checkbox.d.ts +93 -0
  27. package/dist/checkbox.js +75 -0
  28. package/dist/code-block.d.ts +77 -0
  29. package/dist/code-block.js +59 -0
  30. package/dist/collapsible.d.ts +73 -0
  31. package/dist/collapsible.js +62 -0
  32. package/dist/date-picker.d.ts +145 -0
  33. package/dist/date-picker.js +111 -0
  34. package/dist/dialog.d.ts +61 -0
  35. package/dist/dialog.js +63 -0
  36. package/dist/drawer.d.ts +61 -0
  37. package/dist/drawer.js +63 -0
  38. package/dist/fab.d.ts +81 -0
  39. package/dist/fab.js +62 -0
  40. package/dist/file-upload.d.ts +104 -0
  41. package/dist/file-upload.js +74 -0
  42. package/dist/index.d.ts +54 -0
  43. package/dist/index.js +54 -0
  44. package/dist/label.d.ts +66 -0
  45. package/dist/label.js +48 -0
  46. package/dist/listbox.d.ts +65 -0
  47. package/dist/listbox.js +77 -0
  48. package/dist/menu.d.ts +83 -0
  49. package/dist/menu.js +78 -0
  50. package/dist/message-bubble.d.ts +74 -0
  51. package/dist/message-bubble.js +67 -0
  52. package/dist/message-group.d.ts +51 -0
  53. package/dist/message-group.js +59 -0
  54. package/dist/message-part.d.ts +3 -0
  55. package/dist/message-part.js +25 -0
  56. package/dist/pagination.d.ts +81 -0
  57. package/dist/pagination.js +59 -0
  58. package/dist/popover.d.ts +104 -0
  59. package/dist/popover.js +92 -0
  60. package/dist/profile-menu.d.ts +77 -0
  61. package/dist/profile-menu.js +72 -0
  62. package/dist/progress.d.ts +50 -0
  63. package/dist/progress.js +48 -0
  64. package/dist/radio-group.d.ts +92 -0
  65. package/dist/radio-group.js +84 -0
  66. package/dist/scrollbar.d.ts +48 -0
  67. package/dist/scrollbar.js +55 -0
  68. package/dist/search-bar.d.ts +127 -0
  69. package/dist/search-bar.js +105 -0
  70. package/dist/select.d.ts +124 -0
  71. package/dist/select.js +114 -0
  72. package/dist/separator.d.ts +51 -0
  73. package/dist/separator.js +42 -0
  74. package/dist/sidebar.d.ts +69 -0
  75. package/dist/sidebar.js +68 -0
  76. package/dist/skeleton.d.ts +42 -0
  77. package/dist/skeleton.js +44 -0
  78. package/dist/slider.d.ts +133 -0
  79. package/dist/slider.js +98 -0
  80. package/dist/speed-dial.d.ts +103 -0
  81. package/dist/speed-dial.js +79 -0
  82. package/dist/spinner.d.ts +30 -0
  83. package/dist/spinner.js +38 -0
  84. package/dist/split-button.d.ts +101 -0
  85. package/dist/split-button.js +77 -0
  86. package/dist/stepper.d.ts +67 -0
  87. package/dist/stepper.js +62 -0
  88. package/dist/switch.d.ts +100 -0
  89. package/dist/switch.js +75 -0
  90. package/dist/table.d.ts +135 -0
  91. package/dist/table.js +147 -0
  92. package/dist/tabs.d.ts +65 -0
  93. package/dist/tabs.js +67 -0
  94. package/dist/text-input.d.ts +193 -0
  95. package/dist/text-input.js +134 -0
  96. package/dist/text.d.ts +99 -0
  97. package/dist/text.js +88 -0
  98. package/dist/thinking.d.ts +42 -0
  99. package/dist/thinking.js +44 -0
  100. package/dist/toast.d.ts +86 -0
  101. package/dist/toast.js +72 -0
  102. package/dist/toggle-group.d.ts +83 -0
  103. package/dist/toggle-group.js +77 -0
  104. package/dist/tooltip.d.ts +52 -0
  105. package/dist/tooltip.js +50 -0
  106. package/dist/types.d.ts +256 -0
  107. package/dist/types.js +4 -0
  108. package/package.json +44 -0
package/dist/button.js ADDED
@@ -0,0 +1,68 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-button>
3
+ import { defineComponent, ref, h, onMounted } from 'vue';
4
+ export const Button = defineComponent({
5
+ name: 'Button',
6
+ props: {
7
+ label: { type: String },
8
+ variant: { type: String },
9
+ intent: { type: String },
10
+ shape: { type: String },
11
+ size: { type: String },
12
+ disabled: { type: Boolean },
13
+ iconLeading: { type: String },
14
+ iconTrailing: { type: String },
15
+ iconOnly: { type: String },
16
+ ariaLabel: { type: String },
17
+ kind: { type: String },
18
+ pressed: { type: Boolean },
19
+ href: { type: String },
20
+ },
21
+ emits: {
22
+ 'cx-click': (event) => true,
23
+ },
24
+ setup(props, { emit, slots, expose }) {
25
+ const el = ref(null);
26
+ const listeners = [];
27
+ onMounted(() => {
28
+ if (!el.value)
29
+ return;
30
+ // Event listeners
31
+ el.value.addEventListener('cx-click', (ev) => emit('cx-click', ev));
32
+ });
33
+ expose({
34
+ /** The underlying Custom Element. */
35
+ el,
36
+ });
37
+ return () => {
38
+ const attrs = {};
39
+ if (props.label != null)
40
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
41
+ if (props.variant != null)
42
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
43
+ if (props.intent != null)
44
+ attrs['intent'] = typeof props.intent === 'object' ? JSON.stringify(props.intent) : String(props.intent);
45
+ if (props.shape != null)
46
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
47
+ if (props.size != null)
48
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
49
+ if (props.disabled)
50
+ attrs['disabled'] = '';
51
+ if (props.iconLeading != null)
52
+ attrs['icon-leading'] = typeof props.iconLeading === 'object' ? JSON.stringify(props.iconLeading) : String(props.iconLeading);
53
+ if (props.iconTrailing != null)
54
+ attrs['icon-trailing'] = typeof props.iconTrailing === 'object' ? JSON.stringify(props.iconTrailing) : String(props.iconTrailing);
55
+ if (props.iconOnly != null)
56
+ attrs['icon-only'] = typeof props.iconOnly === 'object' ? JSON.stringify(props.iconOnly) : String(props.iconOnly);
57
+ if (props.ariaLabel != null)
58
+ attrs['aria-label'] = typeof props.ariaLabel === 'object' ? JSON.stringify(props.ariaLabel) : String(props.ariaLabel);
59
+ if (props.kind != null)
60
+ attrs['kind'] = typeof props.kind === 'object' ? JSON.stringify(props.kind) : String(props.kind);
61
+ if (props.pressed)
62
+ attrs['pressed'] = '';
63
+ if (props.href != null)
64
+ attrs['href'] = typeof props.href === 'object' ? JSON.stringify(props.href) : String(props.href);
65
+ return h('cx-button', { ref: el, ...attrs });
66
+ };
67
+ },
68
+ });
package/dist/card.d.ts ADDED
@@ -0,0 +1,60 @@
1
+ import { type PropType } from 'vue';
2
+ import type { ClickDetail, KeyboardDetail } from './types.js';
3
+ export declare const Card: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ id: {
5
+ type: StringConstructor;
6
+ };
7
+ label: {
8
+ type: StringConstructor;
9
+ };
10
+ variant: {
11
+ type: PropType<"elevated" | "outlined" | "filled">;
12
+ };
13
+ shape: {
14
+ type: PropType<"rounded" | "sharp" | "soft">;
15
+ };
16
+ size: {
17
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
18
+ };
19
+ clickable: {
20
+ type: BooleanConstructor;
21
+ };
22
+ texture: {
23
+ type: BooleanConstructor;
24
+ };
25
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
+ [key: string]: any;
27
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ 'cx-click': (event: CustomEvent<ClickDetail>) => true;
29
+ 'cx-keydown': (event: CustomEvent<KeyboardDetail>) => true;
30
+ 'cx-keyup': (event: CustomEvent<KeyboardDetail>) => true;
31
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
+ id: {
33
+ type: StringConstructor;
34
+ };
35
+ label: {
36
+ type: StringConstructor;
37
+ };
38
+ variant: {
39
+ type: PropType<"elevated" | "outlined" | "filled">;
40
+ };
41
+ shape: {
42
+ type: PropType<"rounded" | "sharp" | "soft">;
43
+ };
44
+ size: {
45
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
46
+ };
47
+ clickable: {
48
+ type: BooleanConstructor;
49
+ };
50
+ texture: {
51
+ type: BooleanConstructor;
52
+ };
53
+ }>> & Readonly<{
54
+ "onCx-keydown"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
55
+ "onCx-keyup"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
56
+ "onCx-click"?: ((event: CustomEvent<ClickDetail>) => any) | undefined;
57
+ }>, {
58
+ clickable: boolean;
59
+ texture: boolean;
60
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/dist/card.js ADDED
@@ -0,0 +1,58 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-card>
3
+ import { defineComponent, ref, h, onMounted } from 'vue';
4
+ export const Card = defineComponent({
5
+ name: 'Card',
6
+ props: {
7
+ id: { type: String },
8
+ label: { type: String },
9
+ variant: { type: String },
10
+ shape: { type: String },
11
+ size: { type: String },
12
+ clickable: { type: Boolean },
13
+ texture: { type: Boolean },
14
+ },
15
+ emits: {
16
+ 'cx-click': (event) => true,
17
+ 'cx-keydown': (event) => true,
18
+ 'cx-keyup': (event) => true,
19
+ },
20
+ setup(props, { emit, slots, expose }) {
21
+ const el = ref(null);
22
+ const listeners = [];
23
+ onMounted(() => {
24
+ if (!el.value)
25
+ return;
26
+ // Event listeners
27
+ el.value.addEventListener('cx-click', (ev) => emit('cx-click', ev));
28
+ el.value.addEventListener('cx-keydown', (ev) => emit('cx-keydown', ev));
29
+ el.value.addEventListener('cx-keyup', (ev) => emit('cx-keyup', ev));
30
+ });
31
+ expose({
32
+ /** The underlying Custom Element. */
33
+ el,
34
+ });
35
+ return () => {
36
+ const attrs = {};
37
+ if (props.id != null)
38
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
39
+ if (props.label != null)
40
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
41
+ if (props.variant != null)
42
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
43
+ if (props.shape != null)
44
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
45
+ if (props.size != null)
46
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
47
+ if (props.clickable)
48
+ attrs['clickable'] = '';
49
+ if (props.texture)
50
+ attrs['texture'] = '';
51
+ return h('cx-card', { ref: el, ...attrs }, [
52
+ slots.header ? h('div', { slot: 'header', style: 'display:contents' }, slots.header()) : undefined,
53
+ slots.footer ? h('div', { slot: 'footer', style: 'display:contents' }, slots.footer()) : undefined,
54
+ slots.default?.()
55
+ ]);
56
+ };
57
+ },
58
+ });
@@ -0,0 +1,97 @@
1
+ import { type PropType } from 'vue';
2
+ import type { CarouselDetail, CarouselSlide } from './types.js';
3
+ export interface CarouselRef {
4
+ /** Advances to the next slide. */
5
+ next(): void;
6
+ /** Returns to the previous slide. */
7
+ prev(): void;
8
+ /** Navigates to the slide at the given index. */
9
+ goTo(index: number): void;
10
+ /** The underlying Custom Element. */
11
+ el: HTMLElement | null;
12
+ }
13
+ export declare const Carousel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
+ id: {
15
+ type: StringConstructor;
16
+ };
17
+ label: {
18
+ type: StringConstructor;
19
+ };
20
+ variant: {
21
+ type: PropType<"editorial" | "card">;
22
+ };
23
+ shape: {
24
+ type: PropType<"sharp" | "rounded">;
25
+ };
26
+ size: {
27
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
28
+ };
29
+ slides: {
30
+ type: PropType<CarouselSlide[] | string>;
31
+ };
32
+ autoplay: {
33
+ type: PropType<"off" | "on">;
34
+ };
35
+ autoplayInterval: {
36
+ type: NumberConstructor;
37
+ };
38
+ loopMode: {
39
+ type: BooleanConstructor;
40
+ };
41
+ motionBlur: {
42
+ type: BooleanConstructor;
43
+ };
44
+ customCursor: {
45
+ type: BooleanConstructor;
46
+ };
47
+ indicator: {
48
+ type: StringConstructor;
49
+ };
50
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
51
+ [key: string]: any;
52
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
+ 'cx-change': (event: CustomEvent<CarouselDetail>) => true;
54
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
55
+ id: {
56
+ type: StringConstructor;
57
+ };
58
+ label: {
59
+ type: StringConstructor;
60
+ };
61
+ variant: {
62
+ type: PropType<"editorial" | "card">;
63
+ };
64
+ shape: {
65
+ type: PropType<"sharp" | "rounded">;
66
+ };
67
+ size: {
68
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
69
+ };
70
+ slides: {
71
+ type: PropType<CarouselSlide[] | string>;
72
+ };
73
+ autoplay: {
74
+ type: PropType<"off" | "on">;
75
+ };
76
+ autoplayInterval: {
77
+ type: NumberConstructor;
78
+ };
79
+ loopMode: {
80
+ type: BooleanConstructor;
81
+ };
82
+ motionBlur: {
83
+ type: BooleanConstructor;
84
+ };
85
+ customCursor: {
86
+ type: BooleanConstructor;
87
+ };
88
+ indicator: {
89
+ type: StringConstructor;
90
+ };
91
+ }>> & Readonly<{
92
+ "onCx-change"?: ((event: CustomEvent<CarouselDetail>) => any) | undefined;
93
+ }>, {
94
+ loopMode: boolean;
95
+ motionBlur: boolean;
96
+ customCursor: boolean;
97
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,77 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-carousel>
3
+ import { defineComponent, ref, h, onMounted, watch } from 'vue';
4
+ export const Carousel = defineComponent({
5
+ name: 'Carousel',
6
+ props: {
7
+ id: { type: String },
8
+ label: { type: String },
9
+ variant: { type: String },
10
+ shape: { type: String },
11
+ size: { type: String },
12
+ slides: { type: [Array, Object, String] },
13
+ autoplay: { type: String },
14
+ autoplayInterval: { type: Number },
15
+ loopMode: { type: Boolean },
16
+ motionBlur: { type: Boolean },
17
+ customCursor: { type: Boolean },
18
+ indicator: { type: String },
19
+ },
20
+ emits: {
21
+ 'cx-change': (event) => true,
22
+ },
23
+ setup(props, { emit, slots, expose }) {
24
+ const el = ref(null);
25
+ const listeners = [];
26
+ onMounted(() => {
27
+ if (!el.value)
28
+ return;
29
+ watch(() => props.slides, (val) => {
30
+ if (!el.value)
31
+ return;
32
+ if (val != null)
33
+ el.value.setAttribute('slides', typeof val === 'object' ? JSON.stringify(val) : String(val));
34
+ else
35
+ el.value.removeAttribute('slides');
36
+ }, { immediate: true });
37
+ // Event listeners
38
+ el.value.addEventListener('cx-change', (ev) => emit('cx-change', ev));
39
+ });
40
+ expose({
41
+ /** Advances to the next slide. */
42
+ next() { el.value?.next(); },
43
+ /** Returns to the previous slide. */
44
+ prev() { el.value?.prev(); },
45
+ /** Navigates to the slide at the given index. */
46
+ goTo(index) { el.value?.goTo(index); },
47
+ /** The underlying Custom Element. */
48
+ el,
49
+ });
50
+ return () => {
51
+ const attrs = {};
52
+ if (props.id != null)
53
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
54
+ if (props.label != null)
55
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
56
+ if (props.variant != null)
57
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
58
+ if (props.shape != null)
59
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
60
+ if (props.size != null)
61
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
62
+ if (props.autoplay != null)
63
+ attrs['autoplay'] = typeof props.autoplay === 'object' ? JSON.stringify(props.autoplay) : String(props.autoplay);
64
+ if (props.autoplayInterval != null)
65
+ attrs['autoplay-interval'] = typeof props.autoplayInterval === 'object' ? JSON.stringify(props.autoplayInterval) : String(props.autoplayInterval);
66
+ if (props.loopMode)
67
+ attrs['loop-mode'] = '';
68
+ if (props.motionBlur)
69
+ attrs['motion-blur'] = '';
70
+ if (props.customCursor)
71
+ attrs['custom-cursor'] = '';
72
+ if (props.indicator != null)
73
+ attrs['indicator'] = typeof props.indicator === 'object' ? JSON.stringify(props.indicator) : String(props.indicator);
74
+ return h('cx-carousel', { ref: el, ...attrs });
75
+ };
76
+ },
77
+ });
@@ -0,0 +1,99 @@
1
+ import { type PropType } from 'vue';
2
+ import type { FocusDetail, KeyboardDetail } from './types.js';
3
+ export interface ChatInputRef {
4
+ /** Focuses the textarea. */
5
+ focus(): void;
6
+ /** The underlying Custom Element. */
7
+ el: HTMLElement | null;
8
+ }
9
+ export declare const ChatInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
+ id: {
11
+ type: StringConstructor;
12
+ };
13
+ shape: {
14
+ type: PropType<"sharp" | "rounded" | "pill">;
15
+ };
16
+ size: {
17
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
18
+ };
19
+ placeholder: {
20
+ type: StringConstructor;
21
+ };
22
+ value: {
23
+ type: StringConstructor;
24
+ };
25
+ disabled: {
26
+ type: BooleanConstructor;
27
+ };
28
+ maxRows: {
29
+ type: NumberConstructor;
30
+ };
31
+ showActionButton: {
32
+ type: BooleanConstructor;
33
+ };
34
+ actionLabel: {
35
+ type: StringConstructor;
36
+ };
37
+ submitLabel: {
38
+ type: StringConstructor;
39
+ };
40
+ label: {
41
+ type: StringConstructor;
42
+ };
43
+ slotted: {
44
+ type: BooleanConstructor;
45
+ };
46
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
47
+ [key: string]: any;
48
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
49
+ 'cx-focus': (event: CustomEvent<FocusDetail>) => true;
50
+ 'cx-blur': (event: CustomEvent<FocusDetail>) => true;
51
+ 'cx-keydown': (event: CustomEvent<KeyboardDetail>) => true;
52
+ 'cx-keyup': (event: CustomEvent<KeyboardDetail>) => true;
53
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
54
+ id: {
55
+ type: StringConstructor;
56
+ };
57
+ shape: {
58
+ type: PropType<"sharp" | "rounded" | "pill">;
59
+ };
60
+ size: {
61
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
62
+ };
63
+ placeholder: {
64
+ type: StringConstructor;
65
+ };
66
+ value: {
67
+ type: StringConstructor;
68
+ };
69
+ disabled: {
70
+ type: BooleanConstructor;
71
+ };
72
+ maxRows: {
73
+ type: NumberConstructor;
74
+ };
75
+ showActionButton: {
76
+ type: BooleanConstructor;
77
+ };
78
+ actionLabel: {
79
+ type: StringConstructor;
80
+ };
81
+ submitLabel: {
82
+ type: StringConstructor;
83
+ };
84
+ label: {
85
+ type: StringConstructor;
86
+ };
87
+ slotted: {
88
+ type: BooleanConstructor;
89
+ };
90
+ }>> & Readonly<{
91
+ "onCx-focus"?: ((event: CustomEvent<FocusDetail>) => any) | undefined;
92
+ "onCx-blur"?: ((event: CustomEvent<FocusDetail>) => any) | undefined;
93
+ "onCx-keydown"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
94
+ "onCx-keyup"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
95
+ }>, {
96
+ disabled: boolean;
97
+ showActionButton: boolean;
98
+ slotted: boolean;
99
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,79 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-chat-input>
3
+ import { defineComponent, ref, h, onMounted, watch } from 'vue';
4
+ export const ChatInput = defineComponent({
5
+ name: 'ChatInput',
6
+ props: {
7
+ id: { type: String },
8
+ shape: { type: String },
9
+ size: { type: String },
10
+ placeholder: { type: String },
11
+ value: { type: String },
12
+ disabled: { type: Boolean },
13
+ maxRows: { type: Number },
14
+ showActionButton: { type: Boolean },
15
+ actionLabel: { type: String },
16
+ submitLabel: { type: String },
17
+ label: { type: String },
18
+ slotted: { type: Boolean },
19
+ },
20
+ emits: {
21
+ 'cx-focus': (event) => true,
22
+ 'cx-blur': (event) => true,
23
+ 'cx-keydown': (event) => true,
24
+ 'cx-keyup': (event) => true,
25
+ },
26
+ setup(props, { emit, slots, expose }) {
27
+ const el = ref(null);
28
+ const listeners = [];
29
+ onMounted(() => {
30
+ if (!el.value)
31
+ return;
32
+ watch(() => props.value, (val) => {
33
+ if (!el.value)
34
+ return;
35
+ if (val != null)
36
+ el.value.setAttribute('value', String(val));
37
+ else
38
+ el.value.removeAttribute('value');
39
+ }, { immediate: true });
40
+ // Event listeners
41
+ el.value.addEventListener('cx-focus', (ev) => emit('cx-focus', ev));
42
+ el.value.addEventListener('cx-blur', (ev) => emit('cx-blur', ev));
43
+ el.value.addEventListener('cx-keydown', (ev) => emit('cx-keydown', ev));
44
+ el.value.addEventListener('cx-keyup', (ev) => emit('cx-keyup', ev));
45
+ });
46
+ expose({
47
+ /** Focuses the textarea. */
48
+ focus() { el.value?.focus(); },
49
+ /** The underlying Custom Element. */
50
+ el,
51
+ });
52
+ return () => {
53
+ const attrs = {};
54
+ if (props.id != null)
55
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
56
+ if (props.shape != null)
57
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
58
+ if (props.size != null)
59
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
60
+ if (props.placeholder != null)
61
+ attrs['placeholder'] = typeof props.placeholder === 'object' ? JSON.stringify(props.placeholder) : String(props.placeholder);
62
+ if (props.disabled)
63
+ attrs['disabled'] = '';
64
+ if (props.maxRows != null)
65
+ attrs['max-rows'] = typeof props.maxRows === 'object' ? JSON.stringify(props.maxRows) : String(props.maxRows);
66
+ if (props.showActionButton)
67
+ attrs['show-action-button'] = '';
68
+ if (props.actionLabel != null)
69
+ attrs['action-label'] = typeof props.actionLabel === 'object' ? JSON.stringify(props.actionLabel) : String(props.actionLabel);
70
+ if (props.submitLabel != null)
71
+ attrs['submit-label'] = typeof props.submitLabel === 'object' ? JSON.stringify(props.submitLabel) : String(props.submitLabel);
72
+ if (props.label != null)
73
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
74
+ if (props.slotted)
75
+ attrs['slotted'] = '';
76
+ return h('cx-chat-input', { ref: el, ...attrs });
77
+ };
78
+ },
79
+ });
@@ -0,0 +1,93 @@
1
+ import { type PropType } from 'vue';
2
+ import type { CheckedDetail, FocusDetail, KeyboardDetail } from './types.js';
3
+ export interface CheckboxRef {
4
+ /** Focuses the checkbox input. */
5
+ focus(): void;
6
+ /** The underlying Custom Element. */
7
+ el: HTMLElement | null;
8
+ }
9
+ export declare const Checkbox: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
+ id: {
11
+ type: StringConstructor;
12
+ };
13
+ label: {
14
+ type: StringConstructor;
15
+ };
16
+ shape: {
17
+ type: PropType<"sharp" | "rounded">;
18
+ };
19
+ size: {
20
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
21
+ };
22
+ /** Three-state check. Accepts true/false as aliases for 'checked'/unchecked, and keeps 'indeterminate' for the third state. */
23
+ checked: {
24
+ type: PropType<boolean | "" | "checked" | "indeterminate">;
25
+ };
26
+ disabled: {
27
+ type: BooleanConstructor;
28
+ };
29
+ required: {
30
+ type: BooleanConstructor;
31
+ };
32
+ helperText: {
33
+ type: StringConstructor;
34
+ };
35
+ error: {
36
+ type: StringConstructor;
37
+ };
38
+ unlabeled: {
39
+ type: BooleanConstructor;
40
+ };
41
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
42
+ [key: string]: any;
43
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
+ 'cx-input': (event: CustomEvent<CheckedDetail>) => true;
45
+ 'cx-change': (event: CustomEvent<CheckedDetail>) => true;
46
+ 'cx-focus': (event: CustomEvent<FocusDetail>) => true;
47
+ 'cx-blur': (event: CustomEvent<FocusDetail>) => true;
48
+ 'cx-keydown': (event: CustomEvent<KeyboardDetail>) => true;
49
+ 'cx-keyup': (event: CustomEvent<KeyboardDetail>) => true;
50
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
51
+ id: {
52
+ type: StringConstructor;
53
+ };
54
+ label: {
55
+ type: StringConstructor;
56
+ };
57
+ shape: {
58
+ type: PropType<"sharp" | "rounded">;
59
+ };
60
+ size: {
61
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
62
+ };
63
+ /** Three-state check. Accepts true/false as aliases for 'checked'/unchecked, and keeps 'indeterminate' for the third state. */
64
+ checked: {
65
+ type: PropType<boolean | "" | "checked" | "indeterminate">;
66
+ };
67
+ disabled: {
68
+ type: BooleanConstructor;
69
+ };
70
+ required: {
71
+ type: BooleanConstructor;
72
+ };
73
+ helperText: {
74
+ type: StringConstructor;
75
+ };
76
+ error: {
77
+ type: StringConstructor;
78
+ };
79
+ unlabeled: {
80
+ type: BooleanConstructor;
81
+ };
82
+ }>> & Readonly<{
83
+ "onCx-change"?: ((event: CustomEvent<CheckedDetail>) => any) | undefined;
84
+ "onCx-input"?: ((event: CustomEvent<CheckedDetail>) => any) | undefined;
85
+ "onCx-focus"?: ((event: CustomEvent<FocusDetail>) => any) | undefined;
86
+ "onCx-blur"?: ((event: CustomEvent<FocusDetail>) => any) | undefined;
87
+ "onCx-keydown"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
88
+ "onCx-keyup"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
89
+ }>, {
90
+ disabled: boolean;
91
+ required: boolean;
92
+ unlabeled: boolean;
93
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;