@can2421/ui-components 1.0.39 → 1.0.40
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/components/index.d.ts +6 -0
- package/dist/components/src/index.d.ts +0 -5
- package/dist/components/src/types/baseProps.d.ts +6 -0
- package/dist/components/src/types/index.d.ts +2 -0
- package/dist/components/vite.config.d.ts +2 -0
- package/dist/index.es.d.ts +5 -0
- package/dist/ui-components.mjs +60 -65
- package/dist/ui-components.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
package/dist/ui-components.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".c-button[data-v-2fe69762]{display:inline-block;padding:5px 15px;border-radius:4px;background:#fff;outline:none;color:#606266;font-size:14px;border:1px solid #dcdfe6;cursor:pointer;-webkit-user-select:none;user-select:none}.c-button~.c-button[data-v-2fe69762]{margin-left:8px}.c-button[data-v-2fe69762]:not(.c-button--primary,.c-button--danger,.c-button--warning,.c-button--info,.c-button--success,.c-button--plain,.c-button--disabled):hover{border-color:#57abff;background:#ecf5ff;color:#409eff}.c-button--primary[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--danger[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--warning[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--info[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--success[data-v-2fe69762]:not(.c-button--disabled):hover{opacity:.8}.c-button[data-v-2fe69762]:active:not(.c-button--disabled){transform:scale(.95)}.c-button--disabled[data-v-2fe69762]{opacity:.5;cursor:not-allowed}.c-button--round[data-v-2fe69762]{border-radius:20px}.c-button--plain[data-v-2fe69762]{background:#fff;border:1px solid #dcdfe6;color:#606266}.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{border-color:#409eff;color:#409eff}.c-button--primary[data-v-2fe69762]{background:#409eff;border-color:#409eff;color:#fff}.c-button--primary.c-button--plain[data-v-2fe69762]{background:#ecf5ff;border:1px solid #409eff;color:#409eff}.c-button--primary.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#409eff;border-color:#409eff;color:#fff}.c-button--success[data-v-2fe69762]{background:#70c646;border-color:#70c646;color:#fff}.c-button--success.c-button--plain[data-v-2fe69762]{background:#f0f9eb;border:1px solid #70c646;color:#70c646}.c-button--success.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#70c646;border-color:#70c646;color:#fff}.c-button--warning[data-v-2fe69762]{background:#e6a23c;border-color:#e6a23c;color:#fff}.c-button--warning.c-button--plain[data-v-2fe69762]{background:#fdf6ec;border:1px solid #e6a23c;color:#e6a23c}.c-button--warning.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#e6a23c;border-color:#e6a23c;color:#fff}.c-button--info[data-v-2fe69762]{background:#909399;border-color:#909399;color:#fff}.c-button--info.c-button--plain[data-v-2fe69762]{background:#f4f4f5;border:1px solid #909399;color:#909399}.c-button--info.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#909399;border-color:#909399;color:#fff}.c-button--danger[data-v-2fe69762]{background:#f56c6c;border-color:#f56c6c;color:#fff}.c-button--danger.c-button--plain[data-v-2fe69762]{background:#fef0f0;border:1px solid #f56c6c;color:#f56c6c}.c-button--danger.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#f56c6c;border-color:#f56c6c;color:#fff}.c-button--small[data-v-2fe69762]{padding:2px 7px;font-size:12px}.c-button--large[data-v-2fe69762]{padding:8px 19px;font-size:14px}")),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { ref as l, getCurrentInstance as u, computed as
|
|
3
|
-
function m(
|
|
4
|
-
return
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
},
|
|
2
|
+
import { ref as l, getCurrentInstance as u, computed as p, unref as s, provide as C, inject as v, defineComponent as d, createElementBlock as y, openBlock as B, normalizeClass as S, renderSlot as f, watch as h } from "vue";
|
|
3
|
+
function m(e) {
|
|
4
|
+
return e.install = (n) => {
|
|
5
|
+
const t = e.name || "UnknownComponent";
|
|
6
|
+
n.component(t, e);
|
|
7
|
+
}, e;
|
|
8
8
|
}
|
|
9
|
-
const b = Symbol("c"),
|
|
9
|
+
const b = Symbol("c"), r = "c", i = l({
|
|
10
10
|
namespace: "c"
|
|
11
11
|
});
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
var
|
|
16
|
-
return ((
|
|
12
|
+
function k(e, n = void 0) {
|
|
13
|
+
const t = u() ? v(b, i) : i;
|
|
14
|
+
return p(() => {
|
|
15
|
+
var o;
|
|
16
|
+
return ((o = t.value) == null ? void 0 : o[e]) ?? n;
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
19
|
+
function $(e, n) {
|
|
20
|
+
const o = !!u() ? C : void 0;
|
|
21
|
+
if (!o) {
|
|
22
22
|
console.warn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
const c =
|
|
26
|
-
return
|
|
25
|
+
const c = p(() => s(e));
|
|
26
|
+
return o(b, c), c;
|
|
27
27
|
}
|
|
28
|
-
function a(
|
|
29
|
-
return `${
|
|
28
|
+
function a(e) {
|
|
29
|
+
return `${k("namespace", r).value}-${e}`;
|
|
30
30
|
}
|
|
31
31
|
const g = {
|
|
32
32
|
type: {
|
|
@@ -37,76 +37,71 @@ const g = {
|
|
|
37
37
|
disabled: Boolean,
|
|
38
38
|
plain: Boolean,
|
|
39
39
|
round: Boolean
|
|
40
|
-
},
|
|
40
|
+
}, x = ["disabled"], z = /* @__PURE__ */ d({
|
|
41
41
|
name: "CButton",
|
|
42
42
|
__name: "button",
|
|
43
43
|
props: g,
|
|
44
|
-
setup(
|
|
45
|
-
const
|
|
46
|
-
function
|
|
44
|
+
setup(e) {
|
|
45
|
+
const n = e;
|
|
46
|
+
function t() {
|
|
47
47
|
console.log("click");
|
|
48
48
|
}
|
|
49
|
-
return (
|
|
50
|
-
class:
|
|
49
|
+
return (o, c) => (B(), y("button", {
|
|
50
|
+
class: S([
|
|
51
51
|
s(a)("button"),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
n.type && s(a)(`button--${n.type}`),
|
|
53
|
+
n.size && s(a)(`button--${n.size}`),
|
|
54
|
+
n.disabled && s(a)("button--disabled"),
|
|
55
|
+
n.plain && s(a)("button--plain"),
|
|
56
|
+
n.round && s(a)("button--round")
|
|
57
57
|
]),
|
|
58
|
-
disabled:
|
|
59
|
-
onClick:
|
|
58
|
+
disabled: n.disabled,
|
|
59
|
+
onClick: t
|
|
60
60
|
}, [
|
|
61
|
-
f(
|
|
62
|
-
], 10,
|
|
61
|
+
f(o.$slots, "default", {}, void 0, !0)
|
|
62
|
+
], 10, x));
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
65
|
-
const
|
|
66
|
-
for (const [
|
|
67
|
-
o
|
|
68
|
-
return
|
|
69
|
-
},
|
|
64
|
+
}), P = (e, n) => {
|
|
65
|
+
const t = e.__vccOpts || e;
|
|
66
|
+
for (const [o, c] of n)
|
|
67
|
+
t[o] = c;
|
|
68
|
+
return t;
|
|
69
|
+
}, j = /* @__PURE__ */ P(z, [["__scopeId", "data-v-2fe69762"]]), w = m(j), G = /* @__PURE__ */ d({
|
|
70
70
|
name: "CConfigProvider",
|
|
71
71
|
__name: "index",
|
|
72
72
|
props: {
|
|
73
|
-
namespace: { default:
|
|
73
|
+
namespace: { default: r }
|
|
74
74
|
},
|
|
75
|
-
setup(
|
|
76
|
-
const
|
|
77
|
-
namespace:
|
|
78
|
-
}),
|
|
79
|
-
return
|
|
80
|
-
() =>
|
|
75
|
+
setup(e) {
|
|
76
|
+
const n = e, t = l({
|
|
77
|
+
namespace: r
|
|
78
|
+
}), o = $(t);
|
|
79
|
+
return h(
|
|
80
|
+
() => n,
|
|
81
81
|
(c) => {
|
|
82
|
-
|
|
82
|
+
t.value.namespace = c == null ? void 0 : c.namespace;
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
immediate: !0,
|
|
86
86
|
deep: !0
|
|
87
87
|
}
|
|
88
|
-
), (c,
|
|
88
|
+
), (c, _) => f(c.$slots, "default", { config: s(o) });
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
91
|
-
install(n) {
|
|
92
|
-
n.component("CButton", C), n.component("CConfigProvider", _);
|
|
93
|
-
}
|
|
94
|
-
}, E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
90
|
+
}), O = m(G), I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
95
91
|
__proto__: null,
|
|
96
|
-
CButton:
|
|
97
|
-
CConfigProvider:
|
|
98
|
-
buttonProps: g
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
n.component(e, o);
|
|
92
|
+
CButton: w,
|
|
93
|
+
CConfigProvider: O,
|
|
94
|
+
buttonProps: g
|
|
95
|
+
}, Symbol.toStringTag, { value: "Module" })), N = {
|
|
96
|
+
install(e) {
|
|
97
|
+
Object.entries(I).forEach(([n, t]) => {
|
|
98
|
+
e.component(n, t);
|
|
104
99
|
});
|
|
105
100
|
}
|
|
106
101
|
};
|
|
107
102
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
w as CButton,
|
|
104
|
+
O as CConfigProvider,
|
|
110
105
|
g as buttonProps,
|
|
111
|
-
|
|
106
|
+
N as default
|
|
112
107
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".c-button[data-v-2fe69762]{display:inline-block;padding:5px 15px;border-radius:4px;background:#fff;outline:none;color:#606266;font-size:14px;border:1px solid #dcdfe6;cursor:pointer;-webkit-user-select:none;user-select:none}.c-button~.c-button[data-v-2fe69762]{margin-left:8px}.c-button[data-v-2fe69762]:not(.c-button--primary,.c-button--danger,.c-button--warning,.c-button--info,.c-button--success,.c-button--plain,.c-button--disabled):hover{border-color:#57abff;background:#ecf5ff;color:#409eff}.c-button--primary[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--danger[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--warning[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--info[data-v-2fe69762]:not(.c-button--disabled):hover,.c-button--success[data-v-2fe69762]:not(.c-button--disabled):hover{opacity:.8}.c-button[data-v-2fe69762]:active:not(.c-button--disabled){transform:scale(.95)}.c-button--disabled[data-v-2fe69762]{opacity:.5;cursor:not-allowed}.c-button--round[data-v-2fe69762]{border-radius:20px}.c-button--plain[data-v-2fe69762]{background:#fff;border:1px solid #dcdfe6;color:#606266}.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{border-color:#409eff;color:#409eff}.c-button--primary[data-v-2fe69762]{background:#409eff;border-color:#409eff;color:#fff}.c-button--primary.c-button--plain[data-v-2fe69762]{background:#ecf5ff;border:1px solid #409eff;color:#409eff}.c-button--primary.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#409eff;border-color:#409eff;color:#fff}.c-button--success[data-v-2fe69762]{background:#70c646;border-color:#70c646;color:#fff}.c-button--success.c-button--plain[data-v-2fe69762]{background:#f0f9eb;border:1px solid #70c646;color:#70c646}.c-button--success.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#70c646;border-color:#70c646;color:#fff}.c-button--warning[data-v-2fe69762]{background:#e6a23c;border-color:#e6a23c;color:#fff}.c-button--warning.c-button--plain[data-v-2fe69762]{background:#fdf6ec;border:1px solid #e6a23c;color:#e6a23c}.c-button--warning.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#e6a23c;border-color:#e6a23c;color:#fff}.c-button--info[data-v-2fe69762]{background:#909399;border-color:#909399;color:#fff}.c-button--info.c-button--plain[data-v-2fe69762]{background:#f4f4f5;border:1px solid #909399;color:#909399}.c-button--info.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#909399;border-color:#909399;color:#fff}.c-button--danger[data-v-2fe69762]{background:#f56c6c;border-color:#f56c6c;color:#fff}.c-button--danger.c-button--plain[data-v-2fe69762]{background:#fef0f0;border:1px solid #f56c6c;color:#f56c6c}.c-button--danger.c-button--plain[data-v-2fe69762]:not(.c-button--disabled):hover{background:#f56c6c;border-color:#f56c6c;color:#fff}.c-button--small[data-v-2fe69762]{padding:2px 7px;font-size:12px}.c-button--large[data-v-2fe69762]{padding:8px 19px;font-size:14px}")),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
(function(
|
|
2
|
+
(function(i,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(i=typeof globalThis<"u"?globalThis:i||self,n(i["@can2421/ui-components"]={},i.Vue))})(this,(function(i,n){"use strict";function f(t){return t.install=e=>{const o=t.name||"UnknownComponent";e.component(o,t)},t}const l=Symbol("c"),a="c",u=n.ref({namespace:"c"});function _(t,e=void 0){const o=n.getCurrentInstance()?n.inject(l,u):u;return n.computed(()=>{var s;return((s=o.value)==null?void 0:s[t])??e})}function b(t,e){const s=!!n.getCurrentInstance()?n.provide:void 0;if(!s){console.warn("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const c=n.computed(()=>n.unref(t));return s(l,c),c}function r(t){return`${_("namespace",a).value}-${t}`}const d={type:{type:String,default:""},size:String,disabled:Boolean,plain:Boolean,round:Boolean},g=["disabled"],p=f(((t,e)=>{const o=t.__vccOpts||t;for(const[s,c]of e)o[s]=c;return o})(n.defineComponent({name:"CButton",__name:"button",props:d,setup(t){const e=t;function o(){console.log("click")}return(s,c)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass([n.unref(r)("button"),e.type&&n.unref(r)(`button--${e.type}`),e.size&&n.unref(r)(`button--${e.size}`),e.disabled&&n.unref(r)("button--disabled"),e.plain&&n.unref(r)("button--plain"),e.round&&n.unref(r)("button--round")]),disabled:e.disabled,onClick:o},[n.renderSlot(s.$slots,"default",{},void 0,!0)],10,g))}}),[["__scopeId","data-v-2fe69762"]])),m=f(n.defineComponent({name:"CConfigProvider",__name:"index",props:{namespace:{default:a}},setup(t){const e=t,o=n.ref({namespace:a}),s=b(o);return n.watch(()=>e,c=>{o.value.namespace=c==null?void 0:c.namespace},{immediate:!0,deep:!0}),(c,S)=>n.renderSlot(c.$slots,"default",{config:n.unref(s)})}})),C=Object.freeze(Object.defineProperty({__proto__:null,CButton:p,CConfigProvider:m,buttonProps:d},Symbol.toStringTag,{value:"Module"})),y={install(t){Object.entries(C).forEach(([e,o])=>{t.component(e,o)})}};i.CButton=p,i.CConfigProvider=m,i.buttonProps=d,i.default=y,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|