tutor-pro-ui-vue 1.0.23-beta → 1.0.26-beta
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.d.ts +8 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +192 -0
- package/dist/index.umd.cjs +5 -0
- package/dist/types.d.ts +1 -0
- package/dist/typescript.d.ts +6 -0
- package/dist/vite.svg +1 -0
- package/dist/withInstall.d.ts +4 -0
- package/package.json +4 -4
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { unref as O, warn as x, defineComponent as g, openBlock as S, createElementBlock as j, createElementVNode as T, createVNode as C, resolveComponent as N } from "vue";
|
|
2
|
+
function d(e) {
|
|
3
|
+
return typeof e == "function" ? e() : O(e);
|
|
4
|
+
}
|
|
5
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
6
|
+
const f = () => {
|
|
7
|
+
};
|
|
8
|
+
function V(e, t) {
|
|
9
|
+
function o(...n) {
|
|
10
|
+
return new Promise((a, r) => {
|
|
11
|
+
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(a).catch(r);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return o;
|
|
15
|
+
}
|
|
16
|
+
function k(e, t = {}) {
|
|
17
|
+
let o, n, a = f;
|
|
18
|
+
const r = (c) => {
|
|
19
|
+
clearTimeout(c), a(), a = f;
|
|
20
|
+
};
|
|
21
|
+
return (c) => {
|
|
22
|
+
const s = d(e), i = d(t.maxWait);
|
|
23
|
+
return o && r(o), s <= 0 || i !== void 0 && i <= 0 ? (n && (r(n), n = null), Promise.resolve(c())) : new Promise((l, u) => {
|
|
24
|
+
a = t.rejectOnCancel ? u : l, i && !n && (n = setTimeout(() => {
|
|
25
|
+
o && r(o), n = null, l(c());
|
|
26
|
+
}, i)), o = setTimeout(() => {
|
|
27
|
+
n && r(n), n = null, l(c());
|
|
28
|
+
}, s);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function z(e, t = 200, o = {}) {
|
|
33
|
+
return V(
|
|
34
|
+
k(t, o),
|
|
35
|
+
e
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @vue/shared v3.5.13
|
|
40
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
41
|
+
* @license MIT
|
|
42
|
+
**/
|
|
43
|
+
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
44
|
+
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
45
|
+
const E = Object.prototype.hasOwnProperty, m = (e, t) => E.call(e, t), v = (e) => e !== null && typeof e == "object";
|
|
46
|
+
function L(e) {
|
|
47
|
+
for (var t = -1, o = e == null ? 0 : e.length, n = {}; ++t < o; ) {
|
|
48
|
+
var a = e[t];
|
|
49
|
+
n[a[0]] = a[1];
|
|
50
|
+
}
|
|
51
|
+
return n;
|
|
52
|
+
}
|
|
53
|
+
const h = "__epPropKey", _ = (e) => e, F = (e) => v(e) && !!e[h], w = (e, t) => {
|
|
54
|
+
if (!v(e) || F(e))
|
|
55
|
+
return e;
|
|
56
|
+
const { values: o, required: n, default: a, type: r, validator: p } = e, s = {
|
|
57
|
+
type: r,
|
|
58
|
+
required: !!n,
|
|
59
|
+
validator: o || p ? (i) => {
|
|
60
|
+
let l = !1, u = [];
|
|
61
|
+
if (o && (u = Array.from(o), m(e, "default") && u.push(a), l || (l = u.includes(i))), p && (l || (l = p(i))), !l && u.length > 0) {
|
|
62
|
+
const B = [...new Set(u)].map((P) => JSON.stringify(P)).join(", ");
|
|
63
|
+
x(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${B}], got value ${JSON.stringify(i)}.`);
|
|
64
|
+
}
|
|
65
|
+
return l;
|
|
66
|
+
} : void 0,
|
|
67
|
+
[h]: !0
|
|
68
|
+
};
|
|
69
|
+
return m(e, "default") && (s.default = a), s;
|
|
70
|
+
}, $ = (e) => L(Object.entries(e).map(([t, o]) => [
|
|
71
|
+
t,
|
|
72
|
+
w(o, t)
|
|
73
|
+
])), D = ["", "default", "small", "large"], I = w({
|
|
74
|
+
type: String,
|
|
75
|
+
values: D,
|
|
76
|
+
required: !1
|
|
77
|
+
});
|
|
78
|
+
/*! Element Plus Icons Vue v2.3.1 */
|
|
79
|
+
var W = /* @__PURE__ */ g({
|
|
80
|
+
name: "Loading",
|
|
81
|
+
__name: "loading",
|
|
82
|
+
setup(e) {
|
|
83
|
+
return (t, o) => (S(), j("svg", {
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
viewBox: "0 0 1024 1024"
|
|
86
|
+
}, [
|
|
87
|
+
T("path", {
|
|
88
|
+
fill: "currentColor",
|
|
89
|
+
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
|
|
90
|
+
})
|
|
91
|
+
]));
|
|
92
|
+
}
|
|
93
|
+
}), q = W;
|
|
94
|
+
const b = _([
|
|
95
|
+
String,
|
|
96
|
+
Object,
|
|
97
|
+
Function
|
|
98
|
+
]), M = [
|
|
99
|
+
"default",
|
|
100
|
+
"primary",
|
|
101
|
+
"success",
|
|
102
|
+
"warning",
|
|
103
|
+
"info",
|
|
104
|
+
"danger",
|
|
105
|
+
"text",
|
|
106
|
+
""
|
|
107
|
+
], A = ["button", "submit", "reset"], G = $({
|
|
108
|
+
size: I,
|
|
109
|
+
disabled: Boolean,
|
|
110
|
+
type: {
|
|
111
|
+
type: String,
|
|
112
|
+
values: M,
|
|
113
|
+
default: ""
|
|
114
|
+
},
|
|
115
|
+
icon: {
|
|
116
|
+
type: b
|
|
117
|
+
},
|
|
118
|
+
nativeType: {
|
|
119
|
+
type: String,
|
|
120
|
+
values: A,
|
|
121
|
+
default: "button"
|
|
122
|
+
},
|
|
123
|
+
loading: Boolean,
|
|
124
|
+
loadingIcon: {
|
|
125
|
+
type: b,
|
|
126
|
+
default: () => q
|
|
127
|
+
},
|
|
128
|
+
plain: Boolean,
|
|
129
|
+
text: Boolean,
|
|
130
|
+
link: Boolean,
|
|
131
|
+
bg: Boolean,
|
|
132
|
+
autofocus: Boolean,
|
|
133
|
+
round: Boolean,
|
|
134
|
+
circle: Boolean,
|
|
135
|
+
color: String,
|
|
136
|
+
dark: Boolean,
|
|
137
|
+
autoInsertSpace: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: void 0
|
|
140
|
+
},
|
|
141
|
+
tag: {
|
|
142
|
+
type: _([String, Object]),
|
|
143
|
+
default: "button"
|
|
144
|
+
}
|
|
145
|
+
}), H = /* @__PURE__ */ g({
|
|
146
|
+
name: "CommonButton",
|
|
147
|
+
props: {
|
|
148
|
+
debounce: {
|
|
149
|
+
type: Number,
|
|
150
|
+
default: 300
|
|
151
|
+
},
|
|
152
|
+
label: {
|
|
153
|
+
type: Function,
|
|
154
|
+
default: () => ""
|
|
155
|
+
},
|
|
156
|
+
...G
|
|
157
|
+
},
|
|
158
|
+
emits: ["click"],
|
|
159
|
+
setup(e, {
|
|
160
|
+
emit: t
|
|
161
|
+
}) {
|
|
162
|
+
return {
|
|
163
|
+
debounceClick: z(() => {
|
|
164
|
+
t == null || t("click");
|
|
165
|
+
}, Number(e.debounce))
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
|
+
render() {
|
|
169
|
+
return C(N("el-button"), {
|
|
170
|
+
onClick: this.debounceClick
|
|
171
|
+
}, {
|
|
172
|
+
default: () => {
|
|
173
|
+
var e, t, o;
|
|
174
|
+
return ((e = this.label) == null ? void 0 : e.call(this)) || ((o = (t = this.$slots).default) == null ? void 0 : o.call(t));
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}), J = (e, t) => (e.install = (o) => {
|
|
179
|
+
for (const n of [e, ...Object.values({})])
|
|
180
|
+
o.component(n.name, n);
|
|
181
|
+
}, e), K = J(H), y = {
|
|
182
|
+
CommonButton: K
|
|
183
|
+
}, R = (e) => {
|
|
184
|
+
for (const t in y)
|
|
185
|
+
e.component(t, y[t]);
|
|
186
|
+
}, Q = (e) => {
|
|
187
|
+
R(e);
|
|
188
|
+
}, X = { install: Q };
|
|
189
|
+
export {
|
|
190
|
+
K as CommonButton,
|
|
191
|
+
X as default
|
|
192
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
(function(i,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(i=typeof globalThis<"u"?globalThis:i||self,a(i["tutor-pro-ui-vue"]={},i.Vue))})(this,function(i,a){"use strict";function m(e){return typeof e=="function"?e():a.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const b=()=>{};function O(e,t){function n(...o){return new Promise((l,u)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(l).catch(u)})}return n}function S(e,t={}){let n,o,l=b;const u=d=>{clearTimeout(d),l(),l=b};return d=>{const p=m(e),s=m(t.maxWait);return n&&u(n),p<=0||s!==void 0&&s<=0?(o&&(u(o),o=null),Promise.resolve(d())):new Promise((r,c)=>{l=t.rejectOnCancel?c:r,s&&!o&&(o=setTimeout(()=>{n&&u(n),o=null,r(d())},s)),n=setTimeout(()=>{o&&u(o),o=null,r(d())},p)})}}function T(e,t=200,n={}){return O(S(t,n),e)}/**
|
|
2
|
+
* @vue/shared v3.5.13
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const j=Object.prototype.hasOwnProperty,y=(e,t)=>j.call(e,t),g=e=>e!==null&&typeof e=="object";function x(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var l=e[t];o[l[0]]=l[1]}return o}const h="__epPropKey",v=e=>e,C=e=>g(e)&&!!e[h],_=(e,t)=>{if(!g(e)||C(e))return e;const{values:n,required:o,default:l,type:u,validator:f}=e,p={type:u,required:!!o,validator:n||f?s=>{let r=!1,c=[];if(n&&(c=Array.from(n),y(e,"default")&&c.push(l),r||(r=c.includes(s))),f&&(r||(r=f(s))),!r&&c.length>0){const M=[...new Set(c)].map($=>JSON.stringify($)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${M}], got value ${JSON.stringify(s)}.`)}return r}:void 0,[h]:!0};return y(e,"default")&&(p.default=l),p},N=e=>x(Object.entries(e).map(([t,n])=>[t,_(n,t)])),V=_({type:String,values:["","default","small","large"],required:!1});/*! Element Plus Icons Vue v2.3.1 */var k=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,n)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),z=k;const w=v([String,Object,Function]),E=N({size:V,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:w},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:w,default:()=>z},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:v([String,Object]),default:"button"}}),L=a.defineComponent({name:"CommonButton",props:{debounce:{type:Number,default:300},label:{type:Function,default:()=>""},...E},emits:["click"],setup(e,{emit:t}){return{debounceClick:T(()=>{t==null||t("click")},Number(e.debounce))}},render(){return a.createVNode(a.resolveComponent("el-button"),{onClick:this.debounceClick},{default:()=>{var e,t,n;return((e=this.label)==null?void 0:e.call(this))||((n=(t=this.$slots).default)==null?void 0:n.call(t))}})}}),B=((e,t)=>(e.install=n=>{for(const o of[e,...Object.values({})])n.component(o.name,o)},e))(L),P={CommonButton:B},F=e=>{for(const t in P)e.component(t,P[t])},I={install:e=>{F(e)}};i.CommonButton=B,i.default=I,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CommonButton';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AppContext, EmitsOptions, Plugin, SetupContext } from 'vue';
|
|
2
|
+
export type SFCWithInstall<T> = T & Plugin;
|
|
3
|
+
export type SFCInstallWithContext<T> = SFCWithInstall<T> & {
|
|
4
|
+
_context: AppContext | null;
|
|
5
|
+
};
|
|
6
|
+
export type EmitFn<E extends EmitsOptions> = SetupContext<E>['emit'];
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tutor-pro-ui-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.26-beta",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/
|
|
7
|
-
"module": "dist/
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"import": "./dist/
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|