@lovince/ui-vue 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,84 @@
1
+ import * as vue from 'vue';
2
+
3
+ declare const MyButton: vue.DefineComponent<vue.ExtractPropTypes<{
4
+ variant: {
5
+ type: () => "primary" | "secondary";
6
+ default: string;
7
+ };
8
+ disabled: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ size: {
13
+ type: () => "sm" | "md" | "lg";
14
+ default: string;
15
+ };
16
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
17
+ [key: string]: any;
18
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "button-click"[], "button-click", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
19
+ variant: {
20
+ type: () => "primary" | "secondary";
21
+ default: string;
22
+ };
23
+ disabled: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ size: {
28
+ type: () => "sm" | "md" | "lg";
29
+ default: string;
30
+ };
31
+ }>> & Readonly<{
32
+ "onButton-click"?: (...args: any[]) => any;
33
+ }>, {
34
+ variant: "primary" | "secondary";
35
+ disabled: boolean;
36
+ size: "sm" | "md" | "lg";
37
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
38
+
39
+ declare const MyInput: vue.DefineComponent<vue.ExtractPropTypes<{
40
+ value: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ placeholder: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ disabled: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ type: {
53
+ type: () => "text" | "email" | "password";
54
+ default: string;
55
+ };
56
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
57
+ [key: string]: any;
58
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "input-change"[], "input-change", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
59
+ value: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ placeholder: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ disabled: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ type: {
72
+ type: () => "text" | "email" | "password";
73
+ default: string;
74
+ };
75
+ }>> & Readonly<{
76
+ "onInput-change"?: (...args: any[]) => any;
77
+ }>, {
78
+ type: "text" | "email" | "password";
79
+ disabled: boolean;
80
+ value: string;
81
+ placeholder: string;
82
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
83
+
84
+ export { MyButton, MyInput };
package/dist/index.js ADDED
@@ -0,0 +1,73 @@
1
+ // src/MyButton.ts
2
+ import { defineComponent, h } from "vue";
3
+ var MyButton = defineComponent({
4
+ name: "MyButton",
5
+ props: {
6
+ variant: {
7
+ type: String,
8
+ default: "primary"
9
+ },
10
+ disabled: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ size: {
15
+ type: String,
16
+ default: "md"
17
+ }
18
+ },
19
+ emits: ["button-click"],
20
+ setup(props, { emit, slots }) {
21
+ const handleButtonClick = (event) => {
22
+ emit("button-click", event.detail);
23
+ };
24
+ return () => h("my-button", {
25
+ variant: props.variant,
26
+ disabled: props.disabled,
27
+ size: props.size,
28
+ onButtonClick: handleButtonClick
29
+ }, slots.default?.());
30
+ }
31
+ });
32
+
33
+ // src/MyInput.ts
34
+ import { defineComponent as defineComponent2, h as h2 } from "vue";
35
+ var MyInput = defineComponent2({
36
+ name: "MyInput",
37
+ props: {
38
+ value: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ placeholder: {
43
+ type: String,
44
+ default: ""
45
+ },
46
+ disabled: {
47
+ type: Boolean,
48
+ default: false
49
+ },
50
+ type: {
51
+ type: String,
52
+ default: "text"
53
+ }
54
+ },
55
+ emits: ["input-change"],
56
+ setup(props, { emit }) {
57
+ const handleInputChange = (event) => {
58
+ emit("input-change", event.detail);
59
+ };
60
+ return () => h2("my-input", {
61
+ value: props.value,
62
+ placeholder: props.placeholder,
63
+ disabled: props.disabled,
64
+ type: props.type,
65
+ onInputChange: handleInputChange
66
+ });
67
+ }
68
+ });
69
+ export {
70
+ MyButton,
71
+ MyInput
72
+ };
73
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/MyButton.ts","../src/MyInput.ts"],"sourcesContent":["import { defineComponent, h } from 'vue';\nimport { MyButtonProps } from '@lovince/ui-shared';\n\nexport const MyButton = defineComponent({\n name: 'MyButton',\n props: {\n variant: {\n type: String as () => 'primary' | 'secondary',\n default: 'primary'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n size: {\n type: String as () => 'sm' | 'md' | 'lg',\n default: 'md'\n }\n },\n emits: ['button-click'],\n setup(props, { emit, slots }) {\n const handleButtonClick = (event: CustomEvent) => {\n emit('button-click', event.detail);\n };\n\n return () => h('my-button', {\n variant: props.variant,\n disabled: props.disabled,\n size: props.size,\n onButtonClick: handleButtonClick\n }, slots.default?.());\n }\n});\n","import { defineComponent, h } from 'vue';\nimport { MyInputProps } from '@lovince/ui-shared';\n\nexport const MyInput = defineComponent({\n name: 'MyInput',\n props: {\n value: {\n type: String,\n default: ''\n },\n placeholder: {\n type: String,\n default: ''\n },\n disabled: {\n type: Boolean,\n default: false\n },\n type: {\n type: String as () => 'text' | 'email' | 'password',\n default: 'text'\n }\n },\n emits: ['input-change'],\n setup(props, { emit }) {\n const handleInputChange = (event: CustomEvent) => {\n emit('input-change', event.detail);\n };\n\n return () => h('my-input', {\n value: props.value,\n placeholder: props.placeholder,\n disabled: props.disabled,\n type: props.type,\n onInputChange: handleInputChange\n });\n }\n});\n"],"mappings":";AAAA,SAAS,iBAAiB,SAAS;AAG5B,IAAM,WAAW,gBAAgB;AAAA,EACtC,MAAM;AAAA,EACN,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,UA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vue",
3
+ "version": "1.0.0",
4
+ "description": "Vue wrappers for UI components",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsup",
19
+ "dev": "tsup --watch"
20
+ },
21
+ "peerDependencies": {
22
+ "@lovince/ui-core": "^1.0.0",
23
+ "vue": "^3.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@lovince/ui-shared": "^1.0.0",
27
+ "@vitejs/plugin-vue": "^4.0.0",
28
+ "tsup": "^8.5.1",
29
+ "typescript": "^5.9.3",
30
+ "vue": "^3.0.0",
31
+ "vue-tsc": "^1.8.0"
32
+ }
33
+ }