@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,103 @@
1
+ import { type PropType } from 'vue';
2
+ import type { CollapsibleDetail, MenuActionDetail, SpeedDialAction } from './types.js';
3
+ export interface SpeedDialRef {
4
+ /** Opens the speed dial action menu. */
5
+ open(): void;
6
+ /** Closes the speed dial action menu. */
7
+ close(): void;
8
+ /** Toggles the speed dial action menu. */
9
+ toggle(): void;
10
+ /** The underlying Custom Element. */
11
+ el: HTMLElement | null;
12
+ }
13
+ export declare const SpeedDial: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
+ id: {
15
+ type: StringConstructor;
16
+ required: true;
17
+ };
18
+ icon: {
19
+ type: StringConstructor;
20
+ required: true;
21
+ };
22
+ ariaLabel: {
23
+ type: StringConstructor;
24
+ };
25
+ closeIcon: {
26
+ type: StringConstructor;
27
+ };
28
+ actions: {
29
+ type: PropType<SpeedDialAction[] | string>;
30
+ };
31
+ variant: {
32
+ type: PropType<"filled" | "outline" | "ghost">;
33
+ };
34
+ shape: {
35
+ type: PropType<"rounded" | "pill">;
36
+ };
37
+ size: {
38
+ type: PropType<"sm" | "md" | "lg">;
39
+ };
40
+ direction: {
41
+ type: PropType<"up" | "down" | "left" | "right">;
42
+ };
43
+ backdrop: {
44
+ type: BooleanConstructor;
45
+ };
46
+ tooltips: {
47
+ type: BooleanConstructor;
48
+ };
49
+ disabled: {
50
+ type: BooleanConstructor;
51
+ };
52
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
53
+ [key: string]: any;
54
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
55
+ 'cx-action': (event: CustomEvent<MenuActionDetail>) => true;
56
+ 'cx-change': (event: CustomEvent<CollapsibleDetail>) => true;
57
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
58
+ id: {
59
+ type: StringConstructor;
60
+ required: true;
61
+ };
62
+ icon: {
63
+ type: StringConstructor;
64
+ required: true;
65
+ };
66
+ ariaLabel: {
67
+ type: StringConstructor;
68
+ };
69
+ closeIcon: {
70
+ type: StringConstructor;
71
+ };
72
+ actions: {
73
+ type: PropType<SpeedDialAction[] | string>;
74
+ };
75
+ variant: {
76
+ type: PropType<"filled" | "outline" | "ghost">;
77
+ };
78
+ shape: {
79
+ type: PropType<"rounded" | "pill">;
80
+ };
81
+ size: {
82
+ type: PropType<"sm" | "md" | "lg">;
83
+ };
84
+ direction: {
85
+ type: PropType<"up" | "down" | "left" | "right">;
86
+ };
87
+ backdrop: {
88
+ type: BooleanConstructor;
89
+ };
90
+ tooltips: {
91
+ type: BooleanConstructor;
92
+ };
93
+ disabled: {
94
+ type: BooleanConstructor;
95
+ };
96
+ }>> & Readonly<{
97
+ "onCx-change"?: ((event: CustomEvent<CollapsibleDetail>) => any) | undefined;
98
+ "onCx-action"?: ((event: CustomEvent<MenuActionDetail>) => any) | undefined;
99
+ }>, {
100
+ backdrop: boolean;
101
+ disabled: boolean;
102
+ tooltips: boolean;
103
+ }, {}, {}, {}, 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-speed-dial>
3
+ import { defineComponent, ref, h, onMounted, watch } from 'vue';
4
+ export const SpeedDial = defineComponent({
5
+ name: 'SpeedDial',
6
+ props: {
7
+ id: { type: String, required: true },
8
+ icon: { type: String, required: true },
9
+ ariaLabel: { type: String },
10
+ closeIcon: { type: String },
11
+ actions: { type: [Array, Object, String] },
12
+ variant: { type: String },
13
+ shape: { type: String },
14
+ size: { type: String },
15
+ direction: { type: String },
16
+ backdrop: { type: Boolean },
17
+ tooltips: { type: Boolean },
18
+ disabled: { type: Boolean },
19
+ },
20
+ emits: {
21
+ 'cx-action': (event) => true,
22
+ 'cx-change': (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
+ watch(() => props.actions, (val) => {
31
+ if (!el.value)
32
+ return;
33
+ if (val != null)
34
+ el.value.setAttribute('actions', typeof val === 'object' ? JSON.stringify(val) : String(val));
35
+ else
36
+ el.value.removeAttribute('actions');
37
+ }, { immediate: true });
38
+ // Event listeners
39
+ el.value.addEventListener('cx-action', (ev) => emit('cx-action', ev));
40
+ el.value.addEventListener('cx-change', (ev) => emit('cx-change', ev));
41
+ });
42
+ expose({
43
+ /** Opens the speed dial action menu. */
44
+ open() { el.value?.open(); },
45
+ /** Closes the speed dial action menu. */
46
+ close() { el.value?.close(); },
47
+ /** Toggles the speed dial action menu. */
48
+ toggle() { el.value?.toggle(); },
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.icon != null)
57
+ attrs['icon'] = typeof props.icon === 'object' ? JSON.stringify(props.icon) : String(props.icon);
58
+ if (props.ariaLabel != null)
59
+ attrs['aria-label'] = typeof props.ariaLabel === 'object' ? JSON.stringify(props.ariaLabel) : String(props.ariaLabel);
60
+ if (props.closeIcon != null)
61
+ attrs['close-icon'] = typeof props.closeIcon === 'object' ? JSON.stringify(props.closeIcon) : String(props.closeIcon);
62
+ if (props.variant != null)
63
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
64
+ if (props.shape != null)
65
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
66
+ if (props.size != null)
67
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
68
+ if (props.direction != null)
69
+ attrs['direction'] = typeof props.direction === 'object' ? JSON.stringify(props.direction) : String(props.direction);
70
+ if (props.backdrop)
71
+ attrs['backdrop'] = '';
72
+ if (props.tooltips)
73
+ attrs['tooltips'] = '';
74
+ if (props.disabled)
75
+ attrs['disabled'] = '';
76
+ return h('cx-speed-dial', { ref: el, ...attrs });
77
+ };
78
+ },
79
+ });
@@ -0,0 +1,30 @@
1
+ import { type PropType } from 'vue';
2
+ export declare const Spinner: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ id: {
4
+ type: StringConstructor;
5
+ };
6
+ variant: {
7
+ type: PropType<"circle" | "square">;
8
+ };
9
+ label: {
10
+ type: StringConstructor;
11
+ };
12
+ size: {
13
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
14
+ };
15
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
+ [key: string]: any;
17
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
+ id: {
19
+ type: StringConstructor;
20
+ };
21
+ variant: {
22
+ type: PropType<"circle" | "square">;
23
+ };
24
+ label: {
25
+ type: StringConstructor;
26
+ };
27
+ size: {
28
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
29
+ };
30
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,38 @@
1
+ // Auto-generated by scripts/generate-vue.mjs — DO NOT EDIT
2
+ // Vue 3 wrapper for <cx-spinner>
3
+ import { defineComponent, ref, h, onMounted } from 'vue';
4
+ export const Spinner = defineComponent({
5
+ name: 'Spinner',
6
+ props: {
7
+ id: { type: String },
8
+ variant: { type: String },
9
+ label: { type: String },
10
+ size: { type: String },
11
+ },
12
+ emits: {},
13
+ setup(props, { emit, slots, expose }) {
14
+ const el = ref(null);
15
+ const listeners = [];
16
+ onMounted(() => {
17
+ if (!el.value)
18
+ return;
19
+ // Event listeners
20
+ });
21
+ expose({
22
+ /** The underlying Custom Element. */
23
+ el,
24
+ });
25
+ return () => {
26
+ const attrs = {};
27
+ if (props.id != null)
28
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
29
+ if (props.variant != null)
30
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
31
+ if (props.label != null)
32
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
33
+ if (props.size != null)
34
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
35
+ return h('cx-spinner', { ref: el, ...attrs });
36
+ };
37
+ },
38
+ });
@@ -0,0 +1,101 @@
1
+ import { type PropType } from 'vue';
2
+ import type { ClickDetail, MenuActionDetail, SplitMenuEntry } from './types.js';
3
+ export interface SplitButtonRef {
4
+ /** Opens the dropdown menu. */
5
+ open(): void;
6
+ /** Closes the dropdown menu. */
7
+ close(): void;
8
+ /** The underlying Custom Element. */
9
+ el: HTMLElement | null;
10
+ }
11
+ export declare const SplitButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
+ id: {
13
+ type: StringConstructor;
14
+ required: true;
15
+ };
16
+ label: {
17
+ type: StringConstructor;
18
+ required: true;
19
+ };
20
+ entries: {
21
+ type: PropType<SplitMenuEntry[] | string>;
22
+ };
23
+ variant: {
24
+ type: PropType<"filled" | "outline" | "ghost">;
25
+ };
26
+ intent: {
27
+ type: PropType<"neutral" | "primary" | "info" | "success" | "warning" | "danger">;
28
+ };
29
+ shape: {
30
+ type: PropType<"sharp" | "rounded" | "pill">;
31
+ };
32
+ size: {
33
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
34
+ };
35
+ iconLeading: {
36
+ type: StringConstructor;
37
+ };
38
+ disabled: {
39
+ type: BooleanConstructor;
40
+ };
41
+ primaryDisabled: {
42
+ type: BooleanConstructor;
43
+ };
44
+ triggerDisabled: {
45
+ type: BooleanConstructor;
46
+ };
47
+ triggerLabel: {
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-click': (event: CustomEvent<ClickDetail>) => true;
54
+ 'cx-action': (event: CustomEvent<MenuActionDetail>) => true;
55
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
56
+ id: {
57
+ type: StringConstructor;
58
+ required: true;
59
+ };
60
+ label: {
61
+ type: StringConstructor;
62
+ required: true;
63
+ };
64
+ entries: {
65
+ type: PropType<SplitMenuEntry[] | string>;
66
+ };
67
+ variant: {
68
+ type: PropType<"filled" | "outline" | "ghost">;
69
+ };
70
+ intent: {
71
+ type: PropType<"neutral" | "primary" | "info" | "success" | "warning" | "danger">;
72
+ };
73
+ shape: {
74
+ type: PropType<"sharp" | "rounded" | "pill">;
75
+ };
76
+ size: {
77
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
78
+ };
79
+ iconLeading: {
80
+ type: StringConstructor;
81
+ };
82
+ disabled: {
83
+ type: BooleanConstructor;
84
+ };
85
+ primaryDisabled: {
86
+ type: BooleanConstructor;
87
+ };
88
+ triggerDisabled: {
89
+ type: BooleanConstructor;
90
+ };
91
+ triggerLabel: {
92
+ type: StringConstructor;
93
+ };
94
+ }>> & Readonly<{
95
+ "onCx-click"?: ((event: CustomEvent<ClickDetail>) => any) | undefined;
96
+ "onCx-action"?: ((event: CustomEvent<MenuActionDetail>) => any) | undefined;
97
+ }>, {
98
+ disabled: boolean;
99
+ primaryDisabled: boolean;
100
+ triggerDisabled: boolean;
101
+ }, {}, {}, {}, 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-split-button>
3
+ import { defineComponent, ref, h, onMounted, watch } from 'vue';
4
+ export const SplitButton = defineComponent({
5
+ name: 'SplitButton',
6
+ props: {
7
+ id: { type: String, required: true },
8
+ label: { type: String, required: true },
9
+ entries: { type: [Array, Object, String] },
10
+ variant: { type: String },
11
+ intent: { type: String },
12
+ shape: { type: String },
13
+ size: { type: String },
14
+ iconLeading: { type: String },
15
+ disabled: { type: Boolean },
16
+ primaryDisabled: { type: Boolean },
17
+ triggerDisabled: { type: Boolean },
18
+ triggerLabel: { type: String },
19
+ },
20
+ emits: {
21
+ 'cx-click': (event) => true,
22
+ 'cx-action': (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
+ watch(() => props.entries, (val) => {
31
+ if (!el.value)
32
+ return;
33
+ if (val != null)
34
+ el.value.setAttribute('entries', typeof val === 'object' ? JSON.stringify(val) : String(val));
35
+ else
36
+ el.value.removeAttribute('entries');
37
+ }, { immediate: true });
38
+ // Event listeners
39
+ el.value.addEventListener('cx-click', (ev) => emit('cx-click', ev));
40
+ el.value.addEventListener('cx-action', (ev) => emit('cx-action', ev));
41
+ });
42
+ expose({
43
+ /** Opens the dropdown menu. */
44
+ open() { el.value?.open(); },
45
+ /** Closes the dropdown menu. */
46
+ close() { el.value?.close(); },
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.intent != null)
59
+ attrs['intent'] = typeof props.intent === 'object' ? JSON.stringify(props.intent) : String(props.intent);
60
+ if (props.shape != null)
61
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
62
+ if (props.size != null)
63
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
64
+ if (props.iconLeading != null)
65
+ attrs['icon-leading'] = typeof props.iconLeading === 'object' ? JSON.stringify(props.iconLeading) : String(props.iconLeading);
66
+ if (props.disabled)
67
+ attrs['disabled'] = '';
68
+ if (props.primaryDisabled)
69
+ attrs['primary-disabled'] = '';
70
+ if (props.triggerDisabled)
71
+ attrs['trigger-disabled'] = '';
72
+ if (props.triggerLabel != null)
73
+ attrs['trigger-label'] = typeof props.triggerLabel === 'object' ? JSON.stringify(props.triggerLabel) : String(props.triggerLabel);
74
+ return h('cx-split-button', { ref: el, ...attrs });
75
+ };
76
+ },
77
+ });
@@ -0,0 +1,67 @@
1
+ import { type PropType } from 'vue';
2
+ import type { SelectDetail, StepperStep } from './types.js';
3
+ export declare const Stepper: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ id: {
5
+ type: StringConstructor;
6
+ };
7
+ label: {
8
+ type: StringConstructor;
9
+ };
10
+ steps: {
11
+ type: PropType<StepperStep[] | string>;
12
+ };
13
+ current: {
14
+ type: NumberConstructor;
15
+ };
16
+ variant: {
17
+ type: PropType<"outline" | "filled" | "ghost">;
18
+ };
19
+ shape: {
20
+ type: PropType<"sharp" | "rounded">;
21
+ };
22
+ orientation: {
23
+ type: PropType<"horizontal" | "vertical">;
24
+ };
25
+ size: {
26
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
27
+ };
28
+ linear: {
29
+ type: BooleanConstructor;
30
+ };
31
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
32
+ [key: string]: any;
33
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
+ 'cx-change': (event: CustomEvent<SelectDetail>) => true;
35
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
36
+ id: {
37
+ type: StringConstructor;
38
+ };
39
+ label: {
40
+ type: StringConstructor;
41
+ };
42
+ steps: {
43
+ type: PropType<StepperStep[] | string>;
44
+ };
45
+ current: {
46
+ type: NumberConstructor;
47
+ };
48
+ variant: {
49
+ type: PropType<"outline" | "filled" | "ghost">;
50
+ };
51
+ shape: {
52
+ type: PropType<"sharp" | "rounded">;
53
+ };
54
+ orientation: {
55
+ type: PropType<"horizontal" | "vertical">;
56
+ };
57
+ size: {
58
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
59
+ };
60
+ linear: {
61
+ type: BooleanConstructor;
62
+ };
63
+ }>> & Readonly<{
64
+ "onCx-change"?: ((event: CustomEvent<SelectDetail>) => any) | undefined;
65
+ }>, {
66
+ linear: boolean;
67
+ }, {}, {}, {}, 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-stepper>
3
+ import { defineComponent, ref, h, onMounted, watch } from 'vue';
4
+ export const Stepper = defineComponent({
5
+ name: 'Stepper',
6
+ props: {
7
+ id: { type: String },
8
+ label: { type: String },
9
+ steps: { type: [Array, Object, String] },
10
+ current: { type: Number },
11
+ variant: { type: String },
12
+ shape: { type: String },
13
+ orientation: { type: String },
14
+ size: { type: String },
15
+ linear: { type: Boolean },
16
+ },
17
+ emits: {
18
+ 'cx-change': (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
+ watch(() => props.steps, (val) => {
27
+ if (!el.value)
28
+ return;
29
+ if (val != null)
30
+ el.value.setAttribute('steps', typeof val === 'object' ? JSON.stringify(val) : String(val));
31
+ else
32
+ el.value.removeAttribute('steps');
33
+ }, { immediate: true });
34
+ // Event listeners
35
+ el.value.addEventListener('cx-change', (ev) => emit('cx-change', ev));
36
+ });
37
+ expose({
38
+ /** The underlying Custom Element. */
39
+ el,
40
+ });
41
+ return () => {
42
+ const attrs = {};
43
+ if (props.id != null)
44
+ attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
45
+ if (props.label != null)
46
+ attrs['label'] = typeof props.label === 'object' ? JSON.stringify(props.label) : String(props.label);
47
+ if (props.current != null)
48
+ attrs['current'] = typeof props.current === 'object' ? JSON.stringify(props.current) : String(props.current);
49
+ if (props.variant != null)
50
+ attrs['variant'] = typeof props.variant === 'object' ? JSON.stringify(props.variant) : String(props.variant);
51
+ if (props.shape != null)
52
+ attrs['shape'] = typeof props.shape === 'object' ? JSON.stringify(props.shape) : String(props.shape);
53
+ if (props.orientation != null)
54
+ attrs['orientation'] = typeof props.orientation === 'object' ? JSON.stringify(props.orientation) : String(props.orientation);
55
+ if (props.size != null)
56
+ attrs['size'] = typeof props.size === 'object' ? JSON.stringify(props.size) : String(props.size);
57
+ if (props.linear)
58
+ attrs['linear'] = '';
59
+ return h('cx-stepper', { ref: el, ...attrs });
60
+ };
61
+ },
62
+ });
@@ -0,0 +1,100 @@
1
+ import { type PropType } from 'vue';
2
+ import type { CheckedDetail, FocusDetail, KeyboardDetail } from './types.js';
3
+ export interface SwitchRef {
4
+ /** Focuses the switch input. */
5
+ focus(): void;
6
+ /** The underlying Custom Element. */
7
+ el: HTMLElement | null;
8
+ }
9
+ export declare const Switch: 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" | "pill">;
18
+ };
19
+ size: {
20
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
21
+ };
22
+ /** Boolean checked state (unlike Checkbox, which uses a string). */
23
+ checked: {
24
+ type: BooleanConstructor;
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
+ description: {
39
+ type: StringConstructor;
40
+ };
41
+ unlabeled: {
42
+ type: BooleanConstructor;
43
+ };
44
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
45
+ [key: string]: any;
46
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
47
+ 'cx-input': (event: CustomEvent<CheckedDetail>) => true;
48
+ 'cx-change': (event: CustomEvent<CheckedDetail>) => true;
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
+ label: {
58
+ type: StringConstructor;
59
+ };
60
+ shape: {
61
+ type: PropType<"sharp" | "rounded" | "pill">;
62
+ };
63
+ size: {
64
+ type: PropType<"xs" | "sm" | "md" | "lg" | "xl">;
65
+ };
66
+ /** Boolean checked state (unlike Checkbox, which uses a string). */
67
+ checked: {
68
+ type: BooleanConstructor;
69
+ };
70
+ disabled: {
71
+ type: BooleanConstructor;
72
+ };
73
+ required: {
74
+ type: BooleanConstructor;
75
+ };
76
+ helperText: {
77
+ type: StringConstructor;
78
+ };
79
+ error: {
80
+ type: StringConstructor;
81
+ };
82
+ description: {
83
+ type: StringConstructor;
84
+ };
85
+ unlabeled: {
86
+ type: BooleanConstructor;
87
+ };
88
+ }>> & Readonly<{
89
+ "onCx-change"?: ((event: CustomEvent<CheckedDetail>) => any) | undefined;
90
+ "onCx-input"?: ((event: CustomEvent<CheckedDetail>) => any) | undefined;
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
+ required: boolean;
98
+ checked: boolean;
99
+ unlabeled: boolean;
100
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;