@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
@@ -0,0 +1,75 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-checkbox>
3
+ import { defineComponent, ref, h, onMounted } from 'vue';
4
+ export const Checkbox = defineComponent({
5
+ name: 'Checkbox',
6
+ props: {
7
+ id: { type: String },
8
+ label: { type: String },
9
+ shape: { type: String },
10
+ size: { type: String },
11
+ /** Three-state check. Accepts true/false as aliases for 'checked'/unchecked, and keeps 'indeterminate' for the third state. */
12
+ checked: { type: [Boolean, String, Array] },
13
+ disabled: { type: Boolean },
14
+ required: { type: Boolean },
15
+ helperText: { type: String },
16
+ error: { type: String },
17
+ unlabeled: { type: Boolean },
18
+ },
19
+ emits: {
20
+ 'cx-input': (event) => true,
21
+ 'cx-change': (event) => true,
22
+ 'cx-focus': (event) => true,
23
+ 'cx-blur': (event) => true,
24
+ 'cx-keydown': (event) => true,
25
+ 'cx-keyup': (event) => true,
26
+ },
27
+ setup(props, { emit, slots, expose }) {
28
+ const el = ref(null);
29
+ const listeners = [];
30
+ onMounted(() => {
31
+ if (!el.value)
32
+ return;
33
+ // Event listeners
34
+ el.value.addEventListener('cx-input', (ev) => emit('cx-input', ev));
35
+ el.value.addEventListener('cx-change', (ev) => emit('cx-change', ev));
36
+ el.value.addEventListener('cx-focus', (ev) => emit('cx-focus', ev));
37
+ el.value.addEventListener('cx-blur', (ev) => emit('cx-blur', ev));
38
+ el.value.addEventListener('cx-keydown', (ev) => emit('cx-keydown', ev));
39
+ el.value.addEventListener('cx-keyup', (ev) => emit('cx-keyup', ev));
40
+ });
41
+ expose({
42
+ /** Focuses the checkbox input. */
43
+ focus() { el.value?.focus(); },
44
+ /** The underlying Custom Element. */
45
+ el,
46
+ });
47
+ return () => {
48
+ const attrs = {};
49
+ if (props.id != null)
50
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
51
+ if (props.label != null)
52
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
53
+ if (props.shape != null)
54
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
55
+ if (props.size != null)
56
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
57
+ {
58
+ const value = props.checked === true ? 'checked' : props.checked === false ? undefined : props.checked;
59
+ if (value != null)
60
+ attrs['checked'] = value;
61
+ }
62
+ if (props.disabled)
63
+ attrs['disabled'] = '';
64
+ if (props.required)
65
+ attrs['required'] = '';
66
+ if (props.helperText != null)
67
+ attrs['helper-text'] = typeof props.helperText === 'object' ? JSON.stringify(props.helperText) : String(props.helperText);
68
+ if (props.error != null)
69
+ attrs['error'] = typeof props.error === 'object' ? JSON.stringify(props.error) : String(props.error);
70
+ if (props.unlabeled)
71
+ attrs['unlabeled'] = '';
72
+ return h('cx-checkbox', { ref: el, ...attrs });
73
+ };
74
+ },
75
+ });
@@ -0,0 +1,77 @@
1
+ import { type PropType } from 'vue';
2
+ export declare const CodeBlock: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ id: {
4
+ type: StringConstructor;
5
+ };
6
+ content: {
7
+ type: StringConstructor;
8
+ };
9
+ variant: {
10
+ type: StringConstructor;
11
+ };
12
+ shape: {
13
+ type: StringConstructor;
14
+ };
15
+ size: {
16
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
17
+ };
18
+ language: {
19
+ type: StringConstructor;
20
+ };
21
+ filename: {
22
+ type: StringConstructor;
23
+ };
24
+ lineNumbers: {
25
+ type: BooleanConstructor;
26
+ };
27
+ copyButton: {
28
+ type: BooleanConstructor;
29
+ };
30
+ trafficLights: {
31
+ type: BooleanConstructor;
32
+ };
33
+ slotted: {
34
+ type: BooleanConstructor;
35
+ };
36
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
37
+ [key: string]: any;
38
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
39
+ id: {
40
+ type: StringConstructor;
41
+ };
42
+ content: {
43
+ type: StringConstructor;
44
+ };
45
+ variant: {
46
+ type: StringConstructor;
47
+ };
48
+ shape: {
49
+ type: StringConstructor;
50
+ };
51
+ size: {
52
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
53
+ };
54
+ language: {
55
+ type: StringConstructor;
56
+ };
57
+ filename: {
58
+ type: StringConstructor;
59
+ };
60
+ lineNumbers: {
61
+ type: BooleanConstructor;
62
+ };
63
+ copyButton: {
64
+ type: BooleanConstructor;
65
+ };
66
+ trafficLights: {
67
+ type: BooleanConstructor;
68
+ };
69
+ slotted: {
70
+ type: BooleanConstructor;
71
+ };
72
+ }>> & Readonly<{}>, {
73
+ slotted: boolean;
74
+ lineNumbers: boolean;
75
+ copyButton: boolean;
76
+ trafficLights: boolean;
77
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,59 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-code-block>
3
+ import { defineComponent, ref, h, onMounted } from 'vue';
4
+ export const CodeBlock = defineComponent({
5
+ name: 'CodeBlock',
6
+ props: {
7
+ id: { type: String },
8
+ content: { type: String },
9
+ variant: { type: String },
10
+ shape: { type: String },
11
+ size: { type: String },
12
+ language: { type: String },
13
+ filename: { type: String },
14
+ lineNumbers: { type: Boolean },
15
+ copyButton: { type: Boolean },
16
+ trafficLights: { type: Boolean },
17
+ slotted: { type: Boolean },
18
+ },
19
+ emits: {},
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
+ });
28
+ expose({
29
+ /** The underlying Custom Element. */
30
+ el,
31
+ });
32
+ return () => {
33
+ const attrs = {};
34
+ if (props.id != null)
35
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
36
+ if (props.content != null)
37
+ attrs['content'] = typeof props.content === 'object' ? JSON.stringify(props.content) : String(props.content);
38
+ if (props.variant != null)
39
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
40
+ if (props.shape != null)
41
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
42
+ if (props.size != null)
43
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
44
+ if (props.language != null)
45
+ attrs['language'] = typeof props.language === 'object' ? JSON.stringify(props.language) : String(props.language);
46
+ if (props.filename != null)
47
+ attrs['filename'] = typeof props.filename === 'object' ? JSON.stringify(props.filename) : String(props.filename);
48
+ if (props.lineNumbers)
49
+ attrs['line-numbers'] = '';
50
+ if (props.copyButton)
51
+ attrs['copy-button'] = '';
52
+ if (props.trafficLights)
53
+ attrs['traffic-lights'] = '';
54
+ if (props.slotted)
55
+ attrs['slotted'] = '';
56
+ return h('cx-code-block', { ref: el, ...attrs });
57
+ };
58
+ },
59
+ });
@@ -0,0 +1,73 @@
1
+ import { type PropType } from 'vue';
2
+ import type { CollapsibleDetail } from './types.js';
3
+ export interface CollapsibleRef {
4
+ /** Expands the collapsible content. */
5
+ open(): void;
6
+ /** Collapses the content. */
7
+ close(): void;
8
+ /** Toggles the collapsible state. */
9
+ toggle(): void;
10
+ /** The underlying Custom Element. */
11
+ el: HTMLElement | null;
12
+ }
13
+ export declare const Collapsible: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
+ id: {
15
+ type: StringConstructor;
16
+ };
17
+ label: {
18
+ type: StringConstructor;
19
+ };
20
+ triggerHtml: {
21
+ type: StringConstructor;
22
+ };
23
+ open: {
24
+ type: BooleanConstructor;
25
+ };
26
+ icon: {
27
+ type: StringConstructor;
28
+ };
29
+ noIcon: {
30
+ type: BooleanConstructor;
31
+ };
32
+ size: {
33
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
34
+ };
35
+ disabled: {
36
+ type: BooleanConstructor;
37
+ };
38
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
39
+ [key: string]: any;
40
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
+ 'cx-change': (event: CustomEvent<CollapsibleDetail>) => true;
42
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
+ id: {
44
+ type: StringConstructor;
45
+ };
46
+ label: {
47
+ type: StringConstructor;
48
+ };
49
+ triggerHtml: {
50
+ type: StringConstructor;
51
+ };
52
+ open: {
53
+ type: BooleanConstructor;
54
+ };
55
+ icon: {
56
+ type: StringConstructor;
57
+ };
58
+ noIcon: {
59
+ type: BooleanConstructor;
60
+ };
61
+ size: {
62
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
63
+ };
64
+ disabled: {
65
+ type: BooleanConstructor;
66
+ };
67
+ }>> & Readonly<{
68
+ "onCx-change"?: ((event: CustomEvent<CollapsibleDetail>) => any) | undefined;
69
+ }>, {
70
+ disabled: boolean;
71
+ open: boolean;
72
+ noIcon: boolean;
73
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,62 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-collapsible>
3
+ import { defineComponent, ref, h, onMounted } from 'vue';
4
+ export const Collapsible = defineComponent({
5
+ name: 'Collapsible',
6
+ props: {
7
+ id: { type: String },
8
+ label: { type: String },
9
+ triggerHtml: { type: String },
10
+ open: { type: Boolean },
11
+ icon: { type: String },
12
+ noIcon: { type: Boolean },
13
+ size: { type: String },
14
+ disabled: { type: Boolean },
15
+ },
16
+ emits: {
17
+ 'cx-change': (event) => true,
18
+ },
19
+ setup(props, { emit, slots, expose }) {
20
+ const el = ref(null);
21
+ const listeners = [];
22
+ onMounted(() => {
23
+ if (!el.value)
24
+ return;
25
+ // Event listeners
26
+ el.value.addEventListener('cx-change', (ev) => emit('cx-change', ev));
27
+ });
28
+ expose({
29
+ /** Expands the collapsible content. */
30
+ open() { el.value?.open(); },
31
+ /** Collapses the content. */
32
+ close() { el.value?.close(); },
33
+ /** Toggles the collapsible state. */
34
+ toggle() { el.value?.toggle(); },
35
+ /** The underlying Custom Element. */
36
+ el,
37
+ });
38
+ return () => {
39
+ const attrs = {};
40
+ if (props.id != null)
41
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
42
+ if (props.label != null)
43
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
44
+ if (props.triggerHtml != null)
45
+ attrs['trigger-html'] = typeof props.triggerHtml === 'object' ? JSON.stringify(props.triggerHtml) : String(props.triggerHtml);
46
+ if (props.open)
47
+ attrs['open'] = '';
48
+ if (props.icon != null)
49
+ attrs['icon'] = typeof props.icon === 'object' ? JSON.stringify(props.icon) : String(props.icon);
50
+ if (props.noIcon)
51
+ attrs['no-icon'] = '';
52
+ if (props.size != null)
53
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
54
+ if (props.disabled)
55
+ attrs['disabled'] = '';
56
+ return h('cx-collapsible', { ref: el, ...attrs }, [
57
+ slots.trigger ? h('div', { slot: 'trigger', style: 'display:contents' }, slots.trigger()) : undefined,
58
+ slots.default?.()
59
+ ]);
60
+ };
61
+ },
62
+ });
@@ -0,0 +1,145 @@
1
+ import { type PropType } from 'vue';
2
+ import type { FocusDetail, InputDetail, KeyboardDetail } from './types.js';
3
+ export interface DatePickerRef {
4
+ /** Opens the calendar panel. */
5
+ open(): void;
6
+ /** Closes the calendar panel. */
7
+ close(): void;
8
+ /** Focuses the trigger button. */
9
+ focus(): void;
10
+ /** The underlying Custom Element. */
11
+ el: HTMLElement | null;
12
+ }
13
+ export declare const DatePicker: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
+ id: {
15
+ type: StringConstructor;
16
+ };
17
+ label: {
18
+ type: StringConstructor;
19
+ required: true;
20
+ };
21
+ variant: {
22
+ type: PropType<"outline" | "filled" | "ghost">;
23
+ };
24
+ shape: {
25
+ type: PropType<"sharp" | "rounded">;
26
+ };
27
+ size: {
28
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
29
+ };
30
+ selected: {
31
+ type: StringConstructor;
32
+ };
33
+ min: {
34
+ type: StringConstructor;
35
+ };
36
+ max: {
37
+ type: StringConstructor;
38
+ };
39
+ disabledDates: {
40
+ type: PropType<string[] | string>;
41
+ };
42
+ format: {
43
+ type: PropType<"iso" | "us-short" | "eu-short" | "eu-dot">;
44
+ };
45
+ firstDay: {
46
+ type: PropType<"monday" | "sunday">;
47
+ };
48
+ placeholder: {
49
+ type: StringConstructor;
50
+ };
51
+ helperText: {
52
+ type: StringConstructor;
53
+ };
54
+ error: {
55
+ type: StringConstructor;
56
+ };
57
+ disabled: {
58
+ type: BooleanConstructor;
59
+ };
60
+ required: {
61
+ type: BooleanConstructor;
62
+ };
63
+ readonly: {
64
+ type: BooleanConstructor;
65
+ };
66
+ name: {
67
+ type: StringConstructor;
68
+ };
69
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
70
+ [key: string]: any;
71
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
72
+ 'cx-input': (event: CustomEvent<InputDetail>) => true;
73
+ 'cx-change': (event: CustomEvent<InputDetail>) => true;
74
+ 'cx-focus': (event: CustomEvent<FocusDetail>) => true;
75
+ 'cx-blur': (event: CustomEvent<FocusDetail>) => true;
76
+ 'cx-keydown': (event: CustomEvent<KeyboardDetail>) => true;
77
+ 'cx-keyup': (event: CustomEvent<KeyboardDetail>) => true;
78
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
79
+ id: {
80
+ type: StringConstructor;
81
+ };
82
+ label: {
83
+ type: StringConstructor;
84
+ required: true;
85
+ };
86
+ variant: {
87
+ type: PropType<"outline" | "filled" | "ghost">;
88
+ };
89
+ shape: {
90
+ type: PropType<"sharp" | "rounded">;
91
+ };
92
+ size: {
93
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
94
+ };
95
+ selected: {
96
+ type: StringConstructor;
97
+ };
98
+ min: {
99
+ type: StringConstructor;
100
+ };
101
+ max: {
102
+ type: StringConstructor;
103
+ };
104
+ disabledDates: {
105
+ type: PropType<string[] | string>;
106
+ };
107
+ format: {
108
+ type: PropType<"iso" | "us-short" | "eu-short" | "eu-dot">;
109
+ };
110
+ firstDay: {
111
+ type: PropType<"monday" | "sunday">;
112
+ };
113
+ placeholder: {
114
+ type: StringConstructor;
115
+ };
116
+ helperText: {
117
+ type: StringConstructor;
118
+ };
119
+ error: {
120
+ type: StringConstructor;
121
+ };
122
+ disabled: {
123
+ type: BooleanConstructor;
124
+ };
125
+ required: {
126
+ type: BooleanConstructor;
127
+ };
128
+ readonly: {
129
+ type: BooleanConstructor;
130
+ };
131
+ name: {
132
+ type: StringConstructor;
133
+ };
134
+ }>> & Readonly<{
135
+ "onCx-change"?: ((event: CustomEvent<InputDetail>) => any) | undefined;
136
+ "onCx-input"?: ((event: CustomEvent<InputDetail>) => any) | undefined;
137
+ "onCx-focus"?: ((event: CustomEvent<FocusDetail>) => any) | undefined;
138
+ "onCx-blur"?: ((event: CustomEvent<FocusDetail>) => any) | undefined;
139
+ "onCx-keydown"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
140
+ "onCx-keyup"?: ((event: CustomEvent<KeyboardDetail>) => any) | undefined;
141
+ }>, {
142
+ disabled: boolean;
143
+ required: boolean;
144
+ readonly: boolean;
145
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,111 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-date-picker>
3
+ import { defineComponent, ref, h, onMounted, watch } from 'vue';
4
+ export const DatePicker = defineComponent({
5
+ name: 'DatePicker',
6
+ props: {
7
+ id: { type: String },
8
+ label: { type: String, required: true },
9
+ variant: { type: String },
10
+ shape: { type: String },
11
+ size: { type: String },
12
+ selected: { type: String },
13
+ min: { type: String },
14
+ max: { type: String },
15
+ disabledDates: { type: [Array, Object, String] },
16
+ format: { type: String },
17
+ firstDay: { type: String },
18
+ placeholder: { type: String },
19
+ helperText: { type: String },
20
+ error: { type: String },
21
+ disabled: { type: Boolean },
22
+ required: { type: Boolean },
23
+ readonly: { type: Boolean },
24
+ name: { type: String },
25
+ },
26
+ emits: {
27
+ 'cx-input': (event) => true,
28
+ 'cx-change': (event) => true,
29
+ 'cx-focus': (event) => true,
30
+ 'cx-blur': (event) => true,
31
+ 'cx-keydown': (event) => true,
32
+ 'cx-keyup': (event) => true,
33
+ },
34
+ setup(props, { emit, slots, expose }) {
35
+ const el = ref(null);
36
+ const listeners = [];
37
+ onMounted(() => {
38
+ if (!el.value)
39
+ return;
40
+ watch(() => props.name, (val) => {
41
+ if (!el.value)
42
+ return;
43
+ if (val != null)
44
+ el.value.setAttribute('name', String(val));
45
+ else
46
+ el.value.removeAttribute('name');
47
+ }, { immediate: true });
48
+ watch(() => props.disabledDates, (val) => {
49
+ if (!el.value)
50
+ return;
51
+ if (val != null)
52
+ el.value.setAttribute('disabled-dates', typeof val === 'object' ? JSON.stringify(val) : String(val));
53
+ else
54
+ el.value.removeAttribute('disabled-dates');
55
+ }, { immediate: true });
56
+ // Event listeners
57
+ el.value.addEventListener('cx-input', (ev) => emit('cx-input', ev));
58
+ el.value.addEventListener('cx-change', (ev) => emit('cx-change', ev));
59
+ el.value.addEventListener('cx-focus', (ev) => emit('cx-focus', ev));
60
+ el.value.addEventListener('cx-blur', (ev) => emit('cx-blur', ev));
61
+ el.value.addEventListener('cx-keydown', (ev) => emit('cx-keydown', ev));
62
+ el.value.addEventListener('cx-keyup', (ev) => emit('cx-keyup', ev));
63
+ });
64
+ expose({
65
+ /** Opens the calendar panel. */
66
+ open() { el.value?.open(); },
67
+ /** Closes the calendar panel. */
68
+ close() { el.value?.close(); },
69
+ /** Focuses the trigger button. */
70
+ focus() { el.value?.focus(); },
71
+ /** The underlying Custom Element. */
72
+ el,
73
+ });
74
+ return () => {
75
+ const attrs = {};
76
+ if (props.id != null)
77
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
78
+ if (props.label != null)
79
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
80
+ if (props.variant != null)
81
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
82
+ if (props.shape != null)
83
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
84
+ if (props.size != null)
85
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
86
+ if (props.selected != null)
87
+ attrs['selected'] = typeof props.selected === 'object' ? JSON.stringify(props.selected) : String(props.selected);
88
+ if (props.min != null)
89
+ attrs['min'] = typeof props.min === 'object' ? JSON.stringify(props.min) : String(props.min);
90
+ if (props.max != null)
91
+ attrs['max'] = typeof props.max === 'object' ? JSON.stringify(props.max) : String(props.max);
92
+ if (props.format != null)
93
+ attrs['format'] = typeof props.format === 'object' ? JSON.stringify(props.format) : String(props.format);
94
+ if (props.firstDay != null)
95
+ attrs['first-day'] = typeof props.firstDay === 'object' ? JSON.stringify(props.firstDay) : String(props.firstDay);
96
+ if (props.placeholder != null)
97
+ attrs['placeholder'] = typeof props.placeholder === 'object' ? JSON.stringify(props.placeholder) : String(props.placeholder);
98
+ if (props.helperText != null)
99
+ attrs['helper-text'] = typeof props.helperText === 'object' ? JSON.stringify(props.helperText) : String(props.helperText);
100
+ if (props.error != null)
101
+ attrs['error'] = typeof props.error === 'object' ? JSON.stringify(props.error) : String(props.error);
102
+ if (props.disabled)
103
+ attrs['disabled'] = '';
104
+ if (props.required)
105
+ attrs['required'] = '';
106
+ if (props.readonly)
107
+ attrs['readonly'] = '';
108
+ return h('cx-date-picker', { ref: el, ...attrs });
109
+ };
110
+ },
111
+ });
@@ -0,0 +1,61 @@
1
+ import { type PropType } from 'vue';
2
+ import type { CloseDetail } from './types.js';
3
+ export interface DialogRef {
4
+ /** Opens the dialog modal with entrance animation. */
5
+ open(): void;
6
+ /** Closes the dialog modal with exit animation. */
7
+ close(): void;
8
+ /** The underlying Custom Element. */
9
+ el: HTMLElement | null;
10
+ }
11
+ export declare const Dialog: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
+ id: {
13
+ type: StringConstructor;
14
+ };
15
+ title: {
16
+ type: StringConstructor;
17
+ };
18
+ variant: {
19
+ type: PropType<"standard" | "alert">;
20
+ };
21
+ description: {
22
+ type: StringConstructor;
23
+ };
24
+ size: {
25
+ type: PropType<"sm" | "md" | "lg" | "xl" | "full">;
26
+ };
27
+ closeButton: {
28
+ type: StringConstructor;
29
+ };
30
+ drawer: {
31
+ type: StringConstructor;
32
+ };
33
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
34
+ [key: string]: any;
35
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ 'cx-close': (event: CustomEvent<CloseDetail>) => true;
37
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
+ id: {
39
+ type: StringConstructor;
40
+ };
41
+ title: {
42
+ type: StringConstructor;
43
+ };
44
+ variant: {
45
+ type: PropType<"standard" | "alert">;
46
+ };
47
+ description: {
48
+ type: StringConstructor;
49
+ };
50
+ size: {
51
+ type: PropType<"sm" | "md" | "lg" | "xl" | "full">;
52
+ };
53
+ closeButton: {
54
+ type: StringConstructor;
55
+ };
56
+ drawer: {
57
+ type: StringConstructor;
58
+ };
59
+ }>> & Readonly<{
60
+ "onCx-close"?: ((event: CustomEvent<CloseDetail>) => any) | undefined;
61
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;