@lovince/ui-vue 1.0.0 → 1.0.2
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.
- package/dist/index.d.ts +5 -4
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as vue from 'vue';
|
|
|
2
2
|
|
|
3
3
|
declare const MyButton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
4
4
|
variant: {
|
|
5
|
-
type: () => "primary" | "secondary";
|
|
5
|
+
type: () => "primary" | "secondary" | "danger" | "success" | "outline";
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
disabled: {
|
|
@@ -15,9 +15,9 @@ declare const MyButton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
15
15
|
};
|
|
16
16
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
17
17
|
[key: string]: any;
|
|
18
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "button-click"[], "button-click", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
18
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("button-click" | "click")[], "button-click" | "click", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
19
19
|
variant: {
|
|
20
|
-
type: () => "primary" | "secondary";
|
|
20
|
+
type: () => "primary" | "secondary" | "danger" | "success" | "outline";
|
|
21
21
|
default: string;
|
|
22
22
|
};
|
|
23
23
|
disabled: {
|
|
@@ -30,8 +30,9 @@ declare const MyButton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
30
30
|
};
|
|
31
31
|
}>> & Readonly<{
|
|
32
32
|
"onButton-click"?: (...args: any[]) => any;
|
|
33
|
+
onClick?: (...args: any[]) => any;
|
|
33
34
|
}>, {
|
|
34
|
-
variant: "primary" | "secondary";
|
|
35
|
+
variant: "primary" | "secondary" | "danger" | "success" | "outline";
|
|
35
36
|
disabled: boolean;
|
|
36
37
|
size: "sm" | "md" | "lg";
|
|
37
38
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
package/dist/index.js
CHANGED
|
@@ -16,16 +16,20 @@ var MyButton = defineComponent({
|
|
|
16
16
|
default: "md"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
emits: ["button-click"],
|
|
19
|
+
emits: ["button-click", "click"],
|
|
20
20
|
setup(props, { emit, slots }) {
|
|
21
21
|
const handleButtonClick = (event) => {
|
|
22
22
|
emit("button-click", event.detail);
|
|
23
23
|
};
|
|
24
|
+
const handleClick = (event) => {
|
|
25
|
+
emit("click", event);
|
|
26
|
+
};
|
|
24
27
|
return () => h("my-button", {
|
|
25
28
|
variant: props.variant,
|
|
26
29
|
disabled: props.disabled,
|
|
27
30
|
size: props.size,
|
|
28
|
-
onButtonClick: handleButtonClick
|
|
31
|
+
onButtonClick: handleButtonClick,
|
|
32
|
+
onClick: handleClick
|
|
29
33
|
}, slots.default?.());
|
|
30
34
|
}
|
|
31
35
|
});
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,OAAO,CAAC,
|
|
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' | 'danger' | 'success' | 'outline',\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', 'click'],\n setup(props, { emit, slots }) {\n const handleButtonClick = (event: CustomEvent) => {\n emit('button-click', event.detail);\n };\n\n const handleClick = (event: Event) => {\n emit('click', event);\n };\n\n return () => h('my-button', {\n variant: props.variant,\n disabled: props.disabled,\n size: props.size,\n onButtonClick: handleButtonClick,\n onClick: handleClick\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,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,OAAO,CAAC,gBAAgB,OAAO;AAAA,EAC/B,MAAM,OAAO,EAAE,MAAM,MAAM,GAAG;AAC5B,UAAM,oBAAoB,CAAC,UAAuB;AAChD,WAAK,gBAAgB,MAAM,MAAM;AAAA,IACnC;AAEA,UAAM,cAAc,CAAC,UAAiB;AACpC,WAAK,SAAS,KAAK;AAAA,IACrB;AAEA,WAAO,MAAM,EAAE,aAAa;AAAA,MAC1B,SAAS,MAAM;AAAA,MACf,UAAU,MAAM;AAAA,MAChB,MAAM,MAAM;AAAA,MACZ,eAAe;AAAA,MACf,SAAS;AAAA,IACX,GAAG,MAAM,UAAU,CAAC;AAAA,EACtB;AACF,CAAC;;;ACrCD,SAAS,mBAAAA,kBAAiB,KAAAC,UAAS;AAG5B,IAAM,UAAUD,iBAAgB;AAAA,EACrC,MAAM;AAAA,EACN,OAAO;AAAA,IACL,OAAO;AAAA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