scq-vue 1.0.1 → 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/README.md +30 -2
- package/dist/scq-vue.es.js +53 -51
- package/dist/scq-vue.umd.js +1 -1
- package/dist/types/index.d.ts +199 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,17 +23,45 @@ import 'scq-vue/style.css'
|
|
|
23
23
|
createApp(App).use(ScqVue).mount('#app')
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
After global install, you can use component tags directly in templates:
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<template>
|
|
30
|
+
<scq-button type="primary">Primary</scq-button>
|
|
31
|
+
<scq-input v-model="value" placeholder="Please input" />
|
|
32
|
+
</template>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Notes:
|
|
36
|
+
- Use prefixed tag names only: `scq-button`, `scq-input`
|
|
37
|
+
|
|
26
38
|
### On-demand import
|
|
27
39
|
|
|
28
40
|
```ts
|
|
29
|
-
import {
|
|
41
|
+
import { createApp } from 'vue'
|
|
42
|
+
import App from './App.vue'
|
|
43
|
+
import { ScqButton, ScqInput } from 'scq-vue'
|
|
30
44
|
import 'scq-vue/style.css'
|
|
45
|
+
|
|
46
|
+
const app = createApp(App)
|
|
47
|
+
app.use(ScqButton)
|
|
48
|
+
app.use(ScqInput)
|
|
49
|
+
app.mount('#app')
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then use in templates:
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<template>
|
|
56
|
+
<scq-button>Default</scq-button>
|
|
57
|
+
<scq-input v-model="value" />
|
|
58
|
+
</template>
|
|
31
59
|
```
|
|
32
60
|
|
|
33
61
|
### On-demand style import
|
|
34
62
|
|
|
35
63
|
```ts
|
|
36
|
-
import {
|
|
64
|
+
import { ScqButton, ScqInput } from 'scq-vue'
|
|
37
65
|
import 'scq-vue/styles/button.css'
|
|
38
66
|
import 'scq-vue/styles/input.css'
|
|
39
67
|
```
|
package/dist/scq-vue.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { computed as g, openBlock as s, createElementBlock as i, normalizeClass as f, createElementVNode as y, createCommentVNode as r, renderSlot as v, defineComponent as
|
|
1
|
+
import { computed as g, openBlock as s, createElementBlock as i, normalizeClass as f, createElementVNode as y, createCommentVNode as r, renderSlot as v, defineComponent as F, ref as h, normalizeStyle as q, withModifiers as I, toDisplayString as K } from "vue";
|
|
2
2
|
const S = (e, d) => {
|
|
3
3
|
const o = e.__vccOpts || e;
|
|
4
4
|
for (const [n, u] of d)
|
|
5
5
|
o[n] = u;
|
|
6
6
|
return o;
|
|
7
|
-
},
|
|
7
|
+
}, A = ["disabled", "type", "autofocus"], E = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "my-btn__loading",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
11
|
+
}, L = /* @__PURE__ */ Object.assign({
|
|
12
12
|
name: "Button"
|
|
13
13
|
}, {
|
|
14
14
|
__name: "Button",
|
|
@@ -91,7 +91,7 @@ const S = (e, d) => {
|
|
|
91
91
|
autofocus: e.autofocus,
|
|
92
92
|
onClick: m
|
|
93
93
|
}, [
|
|
94
|
-
e.loading ? (s(), i("span",
|
|
94
|
+
e.loading ? (s(), i("span", E, [...p[0] || (p[0] = [
|
|
95
95
|
y("svg", {
|
|
96
96
|
viewBox: "0 0 50 50",
|
|
97
97
|
class: "my-btn__loading-svg"
|
|
@@ -110,25 +110,25 @@ const S = (e, d) => {
|
|
|
110
110
|
}, [
|
|
111
111
|
v(c.$slots, "default", {}, void 0, !0)
|
|
112
112
|
], 2)
|
|
113
|
-
], 10,
|
|
113
|
+
], 10, A));
|
|
114
114
|
}
|
|
115
|
-
}), b = /* @__PURE__ */ S(
|
|
115
|
+
}), b = /* @__PURE__ */ S(L, [["__scopeId", "data-v-a92927da"]]), M = (e) => `scq-${e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
116
116
|
b.install = (e) => {
|
|
117
|
-
e.component(b.name, b);
|
|
117
|
+
e.component(M(b.name), b);
|
|
118
118
|
};
|
|
119
|
-
const
|
|
119
|
+
const R = {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "scq-input__group-prepend"
|
|
122
|
-
},
|
|
122
|
+
}, T = { class: "scq-input__wrapper" }, Z = {
|
|
123
123
|
key: 0,
|
|
124
124
|
class: "scq-input__prefix"
|
|
125
|
-
},
|
|
125
|
+
}, D = ["value", "placeholder", "disabled", "readonly", "maxlength", "minlength", "name", "id"], O = ["type", "value", "placeholder", "disabled", "readonly", "maxlength", "minlength", "autocomplete", "name", "id"], j = {
|
|
126
126
|
key: 5,
|
|
127
127
|
class: "scq-input__suffix"
|
|
128
|
-
},
|
|
128
|
+
}, G = {
|
|
129
129
|
key: 1,
|
|
130
130
|
class: "scq-input__group-append"
|
|
131
|
-
},
|
|
131
|
+
}, H = /* @__PURE__ */ F({
|
|
132
132
|
name: "Input",
|
|
133
133
|
__name: "Input",
|
|
134
134
|
props: {
|
|
@@ -152,24 +152,24 @@ const T = {
|
|
|
152
152
|
},
|
|
153
153
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "keydown", "keyup", "compositionstart", "compositionupdate", "compositionend"],
|
|
154
154
|
setup(e, { emit: d }) {
|
|
155
|
-
const o = e, n = d, u =
|
|
156
|
-
() => o.clearable && !o.disabled && !o.readonly && m.value &&
|
|
155
|
+
const o = e, n = d, u = h(), m = h(!1), c = h(!1), p = g(() => o.type === "textarea"), x = g(() => String(o.modelValue ?? "")), V = g(
|
|
156
|
+
() => o.clearable && !o.disabled && !o.readonly && m.value && x.value.length > 0
|
|
157
157
|
), z = g(
|
|
158
158
|
() => o.showPassword && !p.value && !o.disabled && !o.readonly
|
|
159
|
-
),
|
|
159
|
+
), $ = (l) => {
|
|
160
160
|
const t = l.target.value;
|
|
161
161
|
n("update:modelValue", t), n("input", t);
|
|
162
162
|
}, w = (l) => {
|
|
163
163
|
const t = l.target.value;
|
|
164
164
|
n("change", t);
|
|
165
|
-
},
|
|
165
|
+
}, B = (l) => {
|
|
166
166
|
m.value = !0, n("focus", l);
|
|
167
|
-
},
|
|
167
|
+
}, C = (l) => {
|
|
168
168
|
m.value = !1, n("blur", l);
|
|
169
|
-
},
|
|
169
|
+
}, P = () => {
|
|
170
170
|
var l;
|
|
171
171
|
n("update:modelValue", ""), n("input", ""), n("change", ""), n("clear"), (l = u.value) == null || l.focus();
|
|
172
|
-
},
|
|
172
|
+
}, N = () => {
|
|
173
173
|
var l;
|
|
174
174
|
c.value = !c.value, (l = u.value) == null || l.focus();
|
|
175
175
|
};
|
|
@@ -183,11 +183,11 @@ const T = {
|
|
|
183
183
|
}
|
|
184
184
|
]])
|
|
185
185
|
}, [
|
|
186
|
-
l.$slots.prepend ? (s(), i("div",
|
|
186
|
+
l.$slots.prepend ? (s(), i("div", R, [
|
|
187
187
|
v(l.$slots, "prepend", {}, void 0, !0)
|
|
188
188
|
])) : r("", !0),
|
|
189
|
-
y("div",
|
|
190
|
-
l.$slots.prefix || e.prefixIcon ? (s(), i("span",
|
|
189
|
+
y("div", T, [
|
|
190
|
+
l.$slots.prefix || e.prefixIcon ? (s(), i("span", Z, [
|
|
191
191
|
v(l.$slots, "prefix", {}, () => [
|
|
192
192
|
y("i", {
|
|
193
193
|
class: f(e.prefixIcon)
|
|
@@ -199,8 +199,8 @@ const T = {
|
|
|
199
199
|
ref_key: "inputRef",
|
|
200
200
|
ref: u,
|
|
201
201
|
class: f(["scq-input__inner scq-textarea__inner", e.inputClass]),
|
|
202
|
-
style:
|
|
203
|
-
value:
|
|
202
|
+
style: q(e.inputStyle),
|
|
203
|
+
value: x.value,
|
|
204
204
|
placeholder: e.placeholder,
|
|
205
205
|
disabled: e.disabled,
|
|
206
206
|
readonly: e.readonly,
|
|
@@ -208,23 +208,23 @@ const T = {
|
|
|
208
208
|
minlength: e.minlength,
|
|
209
209
|
name: e.name,
|
|
210
210
|
id: e.id,
|
|
211
|
-
onInput:
|
|
211
|
+
onInput: $,
|
|
212
212
|
onChange: w,
|
|
213
|
-
onFocus:
|
|
214
|
-
onBlur:
|
|
213
|
+
onFocus: B,
|
|
214
|
+
onBlur: C,
|
|
215
215
|
onKeydown: t[0] || (t[0] = (a) => n("keydown", a)),
|
|
216
216
|
onKeyup: t[1] || (t[1] = (a) => n("keyup", a)),
|
|
217
217
|
onCompositionstart: t[2] || (t[2] = (a) => n("compositionstart", a)),
|
|
218
218
|
onCompositionupdate: t[3] || (t[3] = (a) => n("compositionupdate", a)),
|
|
219
219
|
onCompositionend: t[4] || (t[4] = (a) => n("compositionend", a))
|
|
220
|
-
}, null, 46,
|
|
220
|
+
}, null, 46, D)) : (s(), i("input", {
|
|
221
221
|
key: 2,
|
|
222
222
|
ref_key: "inputRef",
|
|
223
223
|
ref: u,
|
|
224
224
|
class: f(["scq-input__inner", e.inputClass]),
|
|
225
|
-
style:
|
|
225
|
+
style: q(e.inputStyle),
|
|
226
226
|
type: c.value ? "text" : e.type,
|
|
227
|
-
value:
|
|
227
|
+
value: x.value,
|
|
228
228
|
placeholder: e.placeholder,
|
|
229
229
|
disabled: e.disabled,
|
|
230
230
|
readonly: e.readonly,
|
|
@@ -233,31 +233,31 @@ const T = {
|
|
|
233
233
|
autocomplete: e.autocomplete,
|
|
234
234
|
name: e.name,
|
|
235
235
|
id: e.id,
|
|
236
|
-
onInput:
|
|
236
|
+
onInput: $,
|
|
237
237
|
onChange: w,
|
|
238
|
-
onFocus:
|
|
239
|
-
onBlur:
|
|
238
|
+
onFocus: B,
|
|
239
|
+
onBlur: C,
|
|
240
240
|
onKeydown: t[5] || (t[5] = (a) => n("keydown", a)),
|
|
241
241
|
onKeyup: t[6] || (t[6] = (a) => n("keyup", a)),
|
|
242
242
|
onCompositionstart: t[7] || (t[7] = (a) => n("compositionstart", a)),
|
|
243
243
|
onCompositionupdate: t[8] || (t[8] = (a) => n("compositionupdate", a)),
|
|
244
244
|
onCompositionend: t[9] || (t[9] = (a) => n("compositionend", a))
|
|
245
|
-
}, null, 46,
|
|
245
|
+
}, null, 46, O)),
|
|
246
246
|
V.value ? (s(), i("span", {
|
|
247
247
|
key: 3,
|
|
248
248
|
class: "scq-input__clear",
|
|
249
|
-
onMousedown: t[10] || (t[10] =
|
|
249
|
+
onMousedown: t[10] || (t[10] = I(() => {
|
|
250
250
|
}, ["prevent"])),
|
|
251
|
-
onClick:
|
|
251
|
+
onClick: P
|
|
252
252
|
}, "×", 32)) : r("", !0),
|
|
253
253
|
z.value ? (s(), i("span", {
|
|
254
254
|
key: 4,
|
|
255
255
|
class: "scq-input__password",
|
|
256
|
-
onMousedown: t[11] || (t[11] =
|
|
256
|
+
onMousedown: t[11] || (t[11] = I(() => {
|
|
257
257
|
}, ["prevent"])),
|
|
258
|
-
onClick:
|
|
259
|
-
},
|
|
260
|
-
l.$slots.suffix || e.suffixIcon ? (s(), i("span",
|
|
258
|
+
onClick: N
|
|
259
|
+
}, K(c.value ? "🙈" : "👁"), 33)) : r("", !0),
|
|
260
|
+
l.$slots.suffix || e.suffixIcon ? (s(), i("span", j, [
|
|
261
261
|
v(l.$slots, "suffix", {}, () => [
|
|
262
262
|
y("i", {
|
|
263
263
|
class: f(e.suffixIcon)
|
|
@@ -265,26 +265,28 @@ const T = {
|
|
|
265
265
|
], !0)
|
|
266
266
|
])) : r("", !0)
|
|
267
267
|
]),
|
|
268
|
-
l.$slots.append ? (s(), i("div",
|
|
268
|
+
l.$slots.append ? (s(), i("div", G, [
|
|
269
269
|
v(l.$slots, "append", {}, void 0, !0)
|
|
270
270
|
])) : r("", !0)
|
|
271
271
|
], 2));
|
|
272
272
|
}
|
|
273
|
-
}), k = /* @__PURE__ */ S(
|
|
273
|
+
}), k = /* @__PURE__ */ S(H, [["__scopeId", "data-v-e3e12673"]]), J = (e) => `scq-${e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
274
274
|
k.install = (e) => {
|
|
275
|
-
e.component(k.name, k);
|
|
275
|
+
e.component(J(k.name), k);
|
|
276
276
|
};
|
|
277
|
-
const
|
|
278
|
-
|
|
277
|
+
const Q = [b, k], U = (e) => `scq-${e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`, W = (e) => {
|
|
278
|
+
Q.forEach((d) => {
|
|
279
279
|
const o = d.name;
|
|
280
|
-
o && e.component(o, d);
|
|
280
|
+
o && e.component(U(o), d);
|
|
281
281
|
});
|
|
282
|
-
},
|
|
283
|
-
install:
|
|
284
|
-
};
|
|
282
|
+
}, Y = {
|
|
283
|
+
install: W
|
|
284
|
+
}, _ = b, ee = k;
|
|
285
285
|
export {
|
|
286
286
|
b as Button,
|
|
287
287
|
k as Input,
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
_ as ScqButton,
|
|
289
|
+
ee as ScqInput,
|
|
290
|
+
Y as default,
|
|
291
|
+
W as install
|
|
290
292
|
};
|
package/dist/scq-vue.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.ScqVue={},i.Vue))})(this,function(i,e){"use strict";const g=(t,c)=>{const s=t.__vccOpts||t;for(const[l,d]of c)s[l]=d;return s}
|
|
1
|
+
(function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.ScqVue={},i.Vue))})(this,function(i,e){"use strict";const g=(t,c)=>{const s=t.__vccOpts||t;for(const[l,d]of c)s[l]=d;return s},$=["disabled","type","autofocus"],w={key:0,class:"my-btn__loading","aria-hidden":"true"},r=g(Object.assign({name:"Button"},{__name:"Button",props:{type:{type:String,default:"default",validator:t=>["default","primary","success","warning","info","danger"].includes(t)},size:{type:String,default:"default",validator:t=>["large","default","small"].includes(t)},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},text:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},link:{type:Boolean,default:!1},nativeType:{type:String,default:"button",validator:t=>["button","submit","reset"].includes(t)},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:c}){const s=t,l=c,d=e.computed(()=>s.disabled||s.loading),f=u=>{d.value||l("click",u)};return(u,p)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["my-btn",`my-btn--${t.type}`,`my-btn--${t.size}`,{"is-disabled":d.value,"is-loading":t.loading,"is-plain":t.plain,"is-round":t.round,"is-circle":t.circle,"is-text":t.text,"is-link":t.link,"is-bg":t.bg}]),disabled:d.value,type:t.nativeType,autofocus:t.autofocus,onClick:f},[t.loading?(e.openBlock(),e.createElementBlock("span",w,[...p[0]||(p[0]=[e.createElementVNode("svg",{viewBox:"0 0 50 50",class:"my-btn__loading-svg"},[e.createElementVNode("circle",{class:"my-btn__loading-path",cx:"25",cy:"25",r:"20",fill:"none"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["my-btn__content",{"is-hidden":t.loading&&t.circle}])},[e.renderSlot(u.$slots,"default",{},void 0,!0)],2)],10,$))}}),[["__scopeId","data-v-a92927da"]]),x=t=>`scq-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;r.install=t=>{t.component(x(r.name),r)};const V={key:0,class:"scq-input__group-prepend"},S={class:"scq-input__wrapper"},q={key:0,class:"scq-input__prefix"},E=["value","placeholder","disabled","readonly","maxlength","minlength","name","id"],I=["type","value","placeholder","disabled","readonly","maxlength","minlength","autocomplete","name","id"],N={key:5,class:"scq-input__suffix"},z={key:1,class:"scq-input__group-append"},m=g(e.defineComponent({name:"Input",__name:"Input",props:{modelValue:{default:""},type:{default:"text"},size:{default:"default"},placeholder:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},prefixIcon:{default:""},suffixIcon:{default:""},maxlength:{},minlength:{},autocomplete:{default:"off"},name:{default:""},id:{default:""},inputStyle:{default:""},inputClass:{default:""}},emits:["update:modelValue","input","change","focus","blur","clear","keydown","keyup","compositionstart","compositionupdate","compositionend"],setup(t,{emit:c}){const s=t,l=c,d=e.ref(),f=e.ref(!1),u=e.ref(!1),p=e.computed(()=>s.type==="textarea"),y=e.computed(()=>String(s.modelValue??"")),A=e.computed(()=>s.clearable&&!s.disabled&&!s.readonly&&f.value&&y.value.length>0),L=e.computed(()=>s.showPassword&&!p.value&&!s.disabled&&!s.readonly),B=o=>{const n=o.target.value;l("update:modelValue",n),l("input",n)},b=o=>{const n=o.target.value;l("change",n)},C=o=>{f.value=!0,l("focus",o)},h=o=>{f.value=!1,l("blur",o)},O=()=>{var o;l("update:modelValue",""),l("input",""),l("change",""),l("clear"),(o=d.value)==null||o.focus()},R=()=>{var o;u.value=!u.value,(o=d.value)==null||o.focus()};return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["scq-input",[`scq-input--${t.size}`,{"is-disabled":t.disabled,"is-focus":f.value,"is-textarea":p.value}]])},[o.$slots.prepend?(e.openBlock(),e.createElementBlock("div",V,[e.renderSlot(o.$slots,"prepend",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",S,[o.$slots.prefix||t.prefixIcon?(e.openBlock(),e.createElementBlock("span",q,[e.renderSlot(o.$slots,"prefix",{},()=>[e.createElementVNode("i",{class:e.normalizeClass(t.prefixIcon)},null,2)],!0)])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("textarea",{key:1,ref_key:"inputRef",ref:d,class:e.normalizeClass(["scq-input__inner scq-textarea__inner",t.inputClass]),style:e.normalizeStyle(t.inputStyle),value:y.value,placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,minlength:t.minlength,name:t.name,id:t.id,onInput:B,onChange:b,onFocus:C,onBlur:h,onKeydown:n[0]||(n[0]=a=>l("keydown",a)),onKeyup:n[1]||(n[1]=a=>l("keyup",a)),onCompositionstart:n[2]||(n[2]=a=>l("compositionstart",a)),onCompositionupdate:n[3]||(n[3]=a=>l("compositionupdate",a)),onCompositionend:n[4]||(n[4]=a=>l("compositionend",a))},null,46,E)):(e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"inputRef",ref:d,class:e.normalizeClass(["scq-input__inner",t.inputClass]),style:e.normalizeStyle(t.inputStyle),type:u.value?"text":t.type,value:y.value,placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,minlength:t.minlength,autocomplete:t.autocomplete,name:t.name,id:t.id,onInput:B,onChange:b,onFocus:C,onBlur:h,onKeydown:n[5]||(n[5]=a=>l("keydown",a)),onKeyup:n[6]||(n[6]=a=>l("keyup",a)),onCompositionstart:n[7]||(n[7]=a=>l("compositionstart",a)),onCompositionupdate:n[8]||(n[8]=a=>l("compositionupdate",a)),onCompositionend:n[9]||(n[9]=a=>l("compositionend",a))},null,46,I)),A.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:"scq-input__clear",onMousedown:n[10]||(n[10]=e.withModifiers(()=>{},["prevent"])),onClick:O},"×",32)):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("span",{key:4,class:"scq-input__password",onMousedown:n[11]||(n[11]=e.withModifiers(()=>{},["prevent"])),onClick:R},e.toDisplayString(u.value?"🙈":"👁"),33)):e.createCommentVNode("",!0),o.$slots.suffix||t.suffixIcon?(e.openBlock(),e.createElementBlock("span",N,[e.renderSlot(o.$slots,"suffix",{},()=>[e.createElementVNode("i",{class:e.normalizeClass(t.suffixIcon)},null,2)],!0)])):e.createCommentVNode("",!0)]),o.$slots.append?(e.openBlock(),e.createElementBlock("div",z,[e.renderSlot(o.$slots,"append",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-e3e12673"]]),P=t=>`scq-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;m.install=t=>{t.component(P(m.name),m)};const M=[r,m],T=t=>`scq-${t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,k=t=>{M.forEach(c=>{const s=c.name;s&&t.component(T(s),c)})},F={install:k},K=r,j=m;i.Button=r,i.Input=m,i.ScqButton=K,i.ScqInput=j,i.default=F,i.install=k,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,5 +3,203 @@ import Button from './components/Button';
|
|
|
3
3
|
import Input from './components/Input';
|
|
4
4
|
declare const install: (app: App) => void;
|
|
5
5
|
declare const ScqVue: Plugin;
|
|
6
|
+
declare const ScqButton: {
|
|
7
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<Record<string, unknown>>, Record<string, unknown>, unknown, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
8
|
+
P: {};
|
|
9
|
+
B: {};
|
|
10
|
+
D: {};
|
|
11
|
+
C: {};
|
|
12
|
+
M: {};
|
|
13
|
+
Defaults: {};
|
|
14
|
+
}, Readonly<Record<string, unknown>>, Record<string, unknown>, {}, import("vue").ComputedOptions, import("vue").MethodOptions, {}>;
|
|
15
|
+
__isFragment?: never;
|
|
16
|
+
__isTeleport?: never;
|
|
17
|
+
__isSuspense?: never;
|
|
18
|
+
} & import("vue").ComponentOptionsBase<Readonly<Record<string, unknown>>, Record<string, unknown>, unknown, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Plugin;
|
|
19
|
+
declare const ScqInput: {
|
|
20
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
21
|
+
modelValue?: string | number;
|
|
22
|
+
type?: "number" | "text" | "password" | "textarea" | "email" | "tel" | "url" | "search";
|
|
23
|
+
size?: "large" | "default" | "small";
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
readonly?: boolean;
|
|
27
|
+
clearable?: boolean;
|
|
28
|
+
showPassword?: boolean;
|
|
29
|
+
prefixIcon?: string;
|
|
30
|
+
suffixIcon?: string;
|
|
31
|
+
maxlength?: number;
|
|
32
|
+
minlength?: number;
|
|
33
|
+
autocomplete?: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
id?: string;
|
|
36
|
+
inputStyle?: string | Record<string, string>;
|
|
37
|
+
inputClass?: string;
|
|
38
|
+
}> & Readonly<{
|
|
39
|
+
onClear?: (() => any) | undefined;
|
|
40
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
41
|
+
onInput?: ((value: string) => any) | undefined;
|
|
42
|
+
onChange?: ((value: string) => any) | undefined;
|
|
43
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
44
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
45
|
+
onKeydown?: ((evt: KeyboardEvent) => any) | undefined;
|
|
46
|
+
onKeyup?: ((evt: KeyboardEvent) => any) | undefined;
|
|
47
|
+
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
48
|
+
onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
|
|
49
|
+
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
50
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
51
|
+
clear: () => any;
|
|
52
|
+
"update:modelValue": (value: string) => any;
|
|
53
|
+
input: (value: string) => any;
|
|
54
|
+
change: (value: string) => any;
|
|
55
|
+
focus: (evt: FocusEvent) => any;
|
|
56
|
+
blur: (evt: FocusEvent) => any;
|
|
57
|
+
keydown: (evt: KeyboardEvent) => any;
|
|
58
|
+
keyup: (evt: KeyboardEvent) => any;
|
|
59
|
+
compositionstart: (evt: CompositionEvent) => any;
|
|
60
|
+
compositionupdate: (evt: CompositionEvent) => any;
|
|
61
|
+
compositionend: (evt: CompositionEvent) => any;
|
|
62
|
+
}, import("vue").PublicProps, {
|
|
63
|
+
size: "large" | "default" | "small";
|
|
64
|
+
name: string;
|
|
65
|
+
modelValue: string | number;
|
|
66
|
+
type: "number" | "text" | "password" | "textarea" | "email" | "tel" | "url" | "search";
|
|
67
|
+
placeholder: string;
|
|
68
|
+
disabled: boolean;
|
|
69
|
+
readonly: boolean;
|
|
70
|
+
clearable: boolean;
|
|
71
|
+
showPassword: boolean;
|
|
72
|
+
prefixIcon: string;
|
|
73
|
+
suffixIcon: string;
|
|
74
|
+
autocomplete: string;
|
|
75
|
+
id: string;
|
|
76
|
+
inputStyle: string | Record<string, string>;
|
|
77
|
+
inputClass: string;
|
|
78
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
79
|
+
P: {};
|
|
80
|
+
B: {};
|
|
81
|
+
D: {};
|
|
82
|
+
C: {};
|
|
83
|
+
M: {};
|
|
84
|
+
Defaults: {};
|
|
85
|
+
}, Readonly<{
|
|
86
|
+
modelValue?: string | number;
|
|
87
|
+
type?: "number" | "text" | "password" | "textarea" | "email" | "tel" | "url" | "search";
|
|
88
|
+
size?: "large" | "default" | "small";
|
|
89
|
+
placeholder?: string;
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
readonly?: boolean;
|
|
92
|
+
clearable?: boolean;
|
|
93
|
+
showPassword?: boolean;
|
|
94
|
+
prefixIcon?: string;
|
|
95
|
+
suffixIcon?: string;
|
|
96
|
+
maxlength?: number;
|
|
97
|
+
minlength?: number;
|
|
98
|
+
autocomplete?: string;
|
|
99
|
+
name?: string;
|
|
100
|
+
id?: string;
|
|
101
|
+
inputStyle?: string | Record<string, string>;
|
|
102
|
+
inputClass?: string;
|
|
103
|
+
}> & Readonly<{
|
|
104
|
+
onClear?: (() => any) | undefined;
|
|
105
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
106
|
+
onInput?: ((value: string) => any) | undefined;
|
|
107
|
+
onChange?: ((value: string) => any) | undefined;
|
|
108
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
109
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
110
|
+
onKeydown?: ((evt: KeyboardEvent) => any) | undefined;
|
|
111
|
+
onKeyup?: ((evt: KeyboardEvent) => any) | undefined;
|
|
112
|
+
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
113
|
+
onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
|
|
114
|
+
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
115
|
+
}>, {}, {}, {}, {}, {
|
|
116
|
+
size: "large" | "default" | "small";
|
|
117
|
+
name: string;
|
|
118
|
+
modelValue: string | number;
|
|
119
|
+
type: "number" | "text" | "password" | "textarea" | "email" | "tel" | "url" | "search";
|
|
120
|
+
placeholder: string;
|
|
121
|
+
disabled: boolean;
|
|
122
|
+
readonly: boolean;
|
|
123
|
+
clearable: boolean;
|
|
124
|
+
showPassword: boolean;
|
|
125
|
+
prefixIcon: string;
|
|
126
|
+
suffixIcon: string;
|
|
127
|
+
autocomplete: string;
|
|
128
|
+
id: string;
|
|
129
|
+
inputStyle: string | Record<string, string>;
|
|
130
|
+
inputClass: string;
|
|
131
|
+
}>;
|
|
132
|
+
__isFragment?: never;
|
|
133
|
+
__isTeleport?: never;
|
|
134
|
+
__isSuspense?: never;
|
|
135
|
+
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
136
|
+
modelValue?: string | number;
|
|
137
|
+
type?: "number" | "text" | "password" | "textarea" | "email" | "tel" | "url" | "search";
|
|
138
|
+
size?: "large" | "default" | "small";
|
|
139
|
+
placeholder?: string;
|
|
140
|
+
disabled?: boolean;
|
|
141
|
+
readonly?: boolean;
|
|
142
|
+
clearable?: boolean;
|
|
143
|
+
showPassword?: boolean;
|
|
144
|
+
prefixIcon?: string;
|
|
145
|
+
suffixIcon?: string;
|
|
146
|
+
maxlength?: number;
|
|
147
|
+
minlength?: number;
|
|
148
|
+
autocomplete?: string;
|
|
149
|
+
name?: string;
|
|
150
|
+
id?: string;
|
|
151
|
+
inputStyle?: string | Record<string, string>;
|
|
152
|
+
inputClass?: string;
|
|
153
|
+
}> & Readonly<{
|
|
154
|
+
onClear?: (() => any) | undefined;
|
|
155
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
156
|
+
onInput?: ((value: string) => any) | undefined;
|
|
157
|
+
onChange?: ((value: string) => any) | undefined;
|
|
158
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
159
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
160
|
+
onKeydown?: ((evt: KeyboardEvent) => any) | undefined;
|
|
161
|
+
onKeyup?: ((evt: KeyboardEvent) => any) | undefined;
|
|
162
|
+
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
163
|
+
onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
|
|
164
|
+
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
165
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
166
|
+
clear: () => any;
|
|
167
|
+
"update:modelValue": (value: string) => any;
|
|
168
|
+
input: (value: string) => any;
|
|
169
|
+
change: (value: string) => any;
|
|
170
|
+
focus: (evt: FocusEvent) => any;
|
|
171
|
+
blur: (evt: FocusEvent) => any;
|
|
172
|
+
keydown: (evt: KeyboardEvent) => any;
|
|
173
|
+
keyup: (evt: KeyboardEvent) => any;
|
|
174
|
+
compositionstart: (evt: CompositionEvent) => any;
|
|
175
|
+
compositionupdate: (evt: CompositionEvent) => any;
|
|
176
|
+
compositionend: (evt: CompositionEvent) => any;
|
|
177
|
+
}, string, {
|
|
178
|
+
size: "large" | "default" | "small";
|
|
179
|
+
name: string;
|
|
180
|
+
modelValue: string | number;
|
|
181
|
+
type: "number" | "text" | "password" | "textarea" | "email" | "tel" | "url" | "search";
|
|
182
|
+
placeholder: string;
|
|
183
|
+
disabled: boolean;
|
|
184
|
+
readonly: boolean;
|
|
185
|
+
clearable: boolean;
|
|
186
|
+
showPassword: boolean;
|
|
187
|
+
prefixIcon: string;
|
|
188
|
+
suffixIcon: string;
|
|
189
|
+
autocomplete: string;
|
|
190
|
+
id: string;
|
|
191
|
+
inputStyle: string | Record<string, string>;
|
|
192
|
+
inputClass: string;
|
|
193
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
194
|
+
$slots: {
|
|
195
|
+
prepend?: (props: {}) => any;
|
|
196
|
+
} & {
|
|
197
|
+
prefix?: (props: {}) => any;
|
|
198
|
+
} & {
|
|
199
|
+
suffix?: (props: {}) => any;
|
|
200
|
+
} & {
|
|
201
|
+
append?: (props: {}) => any;
|
|
202
|
+
};
|
|
203
|
+
}) & Plugin;
|
|
6
204
|
export default ScqVue;
|
|
7
|
-
export { install, Button, Input };
|
|
205
|
+
export { install, Button, Input, ScqButton, ScqInput };
|