sinosoft-common-button 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,89 @@
1
+ import { defineComponent as u, openBlock as n, createElementBlock as a, normalizeClass as s, createCommentVNode as o, renderSlot as f } from "vue";
2
+ const y = ["disabled"], m = { key: 1 }, g = /* @__PURE__ */ u({
3
+ __name: "Button",
4
+ props: {
5
+ size: {
6
+ type: String,
7
+ default: ""
8
+ },
9
+ type: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ disabled: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ long: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ plain: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ round: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ icon: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ circle: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ link: {
38
+ type: Boolean,
39
+ default: !1
40
+ }
41
+ },
42
+ setup(e) {
43
+ return (t, l) => (n(), a("button", {
44
+ class: s([
45
+ "btn-style",
46
+ {
47
+ "is-small": e.size === "small",
48
+ "is-normal": e.size === "normal",
49
+ "is-large": e.size === "large",
50
+ "is-enlarge": e.size === "enlarge",
51
+ "is-maxlarge": e.size === "maxlarge",
52
+ "is-primary": e.type === "primary",
53
+ "is-success": e.type === "success",
54
+ "is-error": e.type === "error",
55
+ "is-warn": e.type === "warn",
56
+ "is-info": e.type === "info",
57
+ "is-disabled": e.disabled,
58
+ "is-long": e.long,
59
+ "is-plain": e.plain,
60
+ "is-round": e.round,
61
+ "is-circle": e.circle,
62
+ "is-link": e.link
63
+ }
64
+ ]),
65
+ disabled: e.disabled
66
+ }, [
67
+ e.icon ? (n(), a("i", {
68
+ key: 0,
69
+ class: s(`${e.icon}`)
70
+ }, null, 2)) : o("", !0),
71
+ t.$slots.default ? (n(), a("span", m, [
72
+ f(t.$slots, "default", {}, void 0, !0)
73
+ ])) : o("", !0)
74
+ ], 10, y));
75
+ }
76
+ });
77
+ const B = (e, t) => {
78
+ const l = e.__vccOpts || e;
79
+ for (const [c, r] of t)
80
+ l[c] = r;
81
+ return l;
82
+ }, d = /* @__PURE__ */ B(g, [["__scopeId", "data-v-a9eee476"]]);
83
+ function i(e, t = {}) {
84
+ i.installed || (i.installed = !0, e.component("common-button", d));
85
+ }
86
+ d.install = i;
87
+ export {
88
+ d as default
89
+ };
@@ -0,0 +1 @@
1
+ (function(t,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(t=typeof globalThis<"u"?globalThis:t||self,t.button=n(t.Vue))})(this,function(t){"use strict";const n=["disabled"],s={key:1},d=t.defineComponent({__name:"Button",props:{size:{type:String,default:""},type:{type:String,default:""},disabled:{type:Boolean,default:!1},long:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},icon:{type:String,default:""},circle:{type:Boolean,default:!1},link:{type:Boolean,default:!1}},setup(e){return(l,o)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["btn-style",{"is-small":e.size==="small","is-normal":e.size==="normal","is-large":e.size==="large","is-enlarge":e.size==="enlarge","is-maxlarge":e.size==="maxlarge","is-primary":e.type==="primary","is-success":e.type==="success","is-error":e.type==="error","is-warn":e.type==="warn","is-info":e.type==="info","is-disabled":e.disabled,"is-long":e.long,"is-plain":e.plain,"is-round":e.round,"is-circle":e.circle,"is-link":e.link}]),disabled:e.disabled},[e.icon?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(`${e.icon}`)},null,2)):t.createCommentVNode("",!0),l.$slots.default?(t.openBlock(),t.createElementBlock("span",s,[t.renderSlot(l.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0)],10,n))}}),f="",i=((e,l)=>{const o=e.__vccOpts||e;for(const[c,r]of l)o[c]=r;return o})(d,[["__scopeId","data-v-a9eee476"]]);function a(e,l={}){a.installed||(a.installed=!0,e.component("common-button",i))}return i.install=a,i});
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "sinosoft-common-button",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "common-button.es.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
package/style.css ADDED
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.btn-style[data-v-a9eee476]{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#ffffff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;box-sizing:border-box;outline:none;margin:0;transition:.1s;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px}.btn-style[data-v-a9eee476]:hover,.btn-style[data-v-a9eee476]:focus{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.btn-style.is-small[data-v-a9eee476]{padding:6px 14px}.btn-style.is-normal[data-v-a9eee476]{padding:8px 18px}.btn-style.is-large[data-v-a9eee476]{padding:10px 32px}.btn-style.is-enlarge[data-v-a9eee476]{padding:10px 50px}.btn-style.is-maxlarge[data-v-a9eee476]{padding:10px 82px}.btn-style.is-primary[data-v-a9eee476]{color:#fff;background-color:#409eff;border-color:#409eff}.btn-style.is-primary[data-v-a9eee476]:hover,.btn-style.is-primary[data-v-a9eee476]:focus{background:#66b1ff;background-color:#66b1ff;color:#fff}.btn-style.is-success[data-v-a9eee476]{color:#fff;background-color:#67c23a;border-color:#67c23a}.btn-style.is-success[data-v-a9eee476]:hover,.btn-style.is-success[data-v-a9eee476]:focus{background:#85ce61;background-color:#85ce61;color:#fff}.btn-style.is-error[data-v-a9eee476]{color:#fff;background-color:#f56c6c;border-color:#f56c6c}.btn-style.is-error[data-v-a9eee476]:hover,.btn-style.is-error[data-v-a9eee476]:focus{background:#f78989;background-color:#f78989;color:#fff}.btn-style.is-warn[data-v-a9eee476]{color:#fff;background-color:#e6a23c;border-color:#e6a23c}.btn-style.is-warn[data-v-a9eee476]:hover,.btn-style.is-warn[data-v-a9eee476]:focus{background:#ebb563;background-color:#ebb563;color:#fff}.btn-style.is-info[data-v-a9eee476]{color:#fff;background-color:#909399;border-color:#909399}.btn-style.is-info[data-v-a9eee476]:hover,.btn-style.is-info[data-v-a9eee476]:focus{background:#a6a9ad;background-color:#a6a9ad;color:#fff}.btn-style.is-link[data-v-a9eee476]{border:none!important}.btn-style.is-link[data-v-a9eee476]:hover,.btn-style.is-link[data-v-a9eee476]:focus{background:none}.btn-style.is-disabled[data-v-a9eee476]{opacity:.5;cursor:not-allowed}.btn-style.is-plain[data-v-a9eee476]:hover,.btn-style.is-plain[data-v-a9eee476]:focus{background:#fff;border-color:#489eff;color:#409eff}.btn-style.is-primary.is-plain[data-v-a9eee476]{color:#409eff;background:#ecf5ff}.btn-style.is-primary.is-plain[data-v-a9eee476]:hover,.btn-style.is-primary.is-plain[data-v-a9eee476]:focus{background:#409eff;border-color:#409eff;color:#fff}.btn-style.is-success.is-plain[data-v-a9eee476]{color:#67c23a;background:#c2e7b0}.btn-style.is-success.is-plain[data-v-a9eee476]:hover,.btn-style.is-success.is-plain[data-v-a9eee476]:focus{background:#67c23a;border-color:#67c23a;color:#fff}.btn-style.is-info.is-plain[data-v-a9eee476]{color:#909399;background:#d3d4d6}.btn-style.is-info.is-plain[data-v-a9eee476]:hover,.btn-style.is-info.is-plain[data-v-a9eee476]:focus{background:#909399;border-color:#909399;color:#fff}.btn-style.is-warn.is-plain[data-v-a9eee476]{color:#e6a23c;background:#f5dab1}.btn-style.is-warn.is-plain[data-v-a9eee476]:hover,.btn-style.is-warn.is-plain[data-v-a9eee476]:focus{background:#e6a23c;border-color:#e6a23c;color:#fff}.btn-style.is-error.is-plain[data-v-a9eee476]{color:#f56c6c;background:#fbc4c4}.btn-style.is-error.is-plain[data-v-a9eee476]:hover,.btn-style.is-error.is-plain[data-v-a9eee476]:focus{background:#f56c6c;border-color:#f56c6c;color:#fff}.btn-style.is-round[data-v-a9eee476]{border-radius:20px;padding:12px 23px}.btn-style.is-circle[data-v-a9eee476]{box-sizing:border-box;border-radius:50%;padding:12px 14px 12px 12px}.btn-style [class*=icon][data-v-a9eee476]{margin-left:5px}