sccba-ui 0.0.21 → 0.0.22
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/sccba-ui.cjs.js +1 -1
- package/dist/sccba-ui.css +1 -1
- package/dist/sccba-ui.es.js +89 -67
- package/dist/sccba-ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/sccba-ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var I=Object.create;var S=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var x=(t,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!C.call(t,o)&&o!==a&&S(t,o,{get:()=>e[o],enumerable:!(r=P(e,o))||r.enumerable});return t};var f=(t,e,a)=>(a=t!=null?I(k(t)):{},x(e||!t||!t.__esModule?S(a,"default",{value:t,enumerable:!0}):a,t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("vue-demi"),n=require("vue");let s=null;function p(){if(s!==null)return s;try{s=(require("vue").version||"").startsWith("2.")}catch{try{const e=typeof window<"u"?window.Vue:typeof global<"u"?global.Vue:null;e&&e.version?s=e.version.startsWith("2."):s=!1}catch{s=!1}}return s}async function E(){try{return p()?(await import("element-ui")).Button:(await import("element-plus")).ElButton}catch(t){const e=p();return console.error(e?"SccbaButton: Failed to load element-ui. Please install it with: npm install element-ui":"SccbaButton: Failed to load element-plus. Please install it with: npm install element-plus",t),null}}async function N(){try{return p()?(await import("element-ui")).Input:(await import("element-plus")).ElInput}catch(t){const e=p();return console.error(e?"SccbaInput: Failed to load element-ui. Please install it with: npm install element-ui":"SccbaInput: Failed to load element-plus. Please install it with: npm install element-plus",t),null}}const h=(t,e)=>{const a=t.__vccOpts||t;for(const[r,o]of e)a[r]=o;return a},R={name:"SccbaButton",inheritAttrs:!1},$=Object.assign(R,{props:{type:{type:String,default:"default"},size:{type:String,default:""},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},label:{type:String,default:""},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},block:{type:Boolean,default:!1},nativeType:{type:String,default:"button"},placeholder:{type:String,default:""}},setup(t,{expose:e}){const a=t,r=u.useAttrs(),o=u.shallowRef(null),c=u.computed(()=>({...a,...r}));u.onMounted(async()=>{o.value=await E()});const i=u.ref(null);return e({getButtonInstance:()=>i.value,buttonRef:i}),(l,m)=>n.unref(o)?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(o)),n.mergeProps({key:0},n.unref(c),{ref_key:"buttonInstance",ref:i}),n.createSlots({_:2},[n.renderList(l.$slots,(w,y)=>({name:y,fn:n.withCtx(d=>[n.renderSlot(l.$slots,y,n.normalizeProps(n.guardReactiveProps(d||{})),void 0,!0)])}))]),1040)):n.createCommentVNode("",!0)}}),v=h($,[["__scopeId","data-v-f4bfc0d9"]]),q={name:"SccbaInput"},z=Object.assign(q,{props:{type:{type:String,default:"text"},size:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxlength:{type:[String,Number],default:null},showWordLimit:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},name:{type:String,default:""},form:{type:String,default:""},required:{type:Boolean,default:!1},width:{type:[String,Number],default:""}},emits:["input","change","focus","blur","clear"],setup(t,{expose:e,emit:a}){const r=t,o=u.useAttrs(),c=u.shallowRef(null),i=u.computed(()=>({...r,...o}));u.onMounted(async()=>{c.value=await N()});const l=u.ref(null);return e({getInputInstance:()=>l.value,focus:()=>l.value&&l.value.focus(),blur:()=>l.value&&l.value.blur(),select:()=>l.value&&l.value.select(),clear:()=>l.value&&l.value.clear(),inputRef:l}),(m,w)=>n.unref(c)?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(c)),n.mergeProps({key:0},n.unref(i),{ref_key:"inputInstance",ref:l}),n.createSlots({_:2},[n.renderList(m.$slots,(y,d)=>({name:d,fn:n.withCtx(B=>[n.renderSlot(m.$slots,d,n.normalizeProps(n.guardReactiveProps(B||{})),void 0,!0)])}))]),1040)):n.createCommentVNode("",!0)}}),b=h(z,[["__scopeId","data-v-ab2fae08"]]),_=[v,b],g=function(t){_.forEach(e=>{t.component(e.name,e)})};_.forEach(t=>{t.install=function(e){e.component(t.name,t)}});typeof window<"u"&&window.Vue&&g(window.Vue);const F={install:g,SccbaButton:v,SccbaInput:b};exports.SccbaButton=v;exports.SccbaInput=b;exports.default=F;exports.install=g;
|
package/dist/sccba-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}[data-v-
|
|
1
|
+
:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}[data-v-f4bfc0d9] .el-button{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-f4bfc0d9] .el-button:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-1px)}[data-v-f4bfc0d9] .el-button:active{transform:translateY(0);box-shadow:0 2px 8px #00000026}[data-v-f4bfc0d9] .el-button{margin-right:10px}[data-v-f4bfc0d9] .el-button:last-child{margin-right:0}[data-v-ab2fae08] .el-input__inner{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-ab2fae08] .el-input__inner:focus{box-shadow:0 0 0 2px #3b82f633!important}
|
package/dist/sccba-ui.es.js
CHANGED
|
@@ -1,36 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createBlock as
|
|
3
|
-
|
|
1
|
+
import { useAttrs as m, shallowRef as y, computed as b, onMounted as v, ref as g } from "vue-demi";
|
|
2
|
+
import { createBlock as h, createCommentVNode as _, unref as o, openBlock as w, resolveDynamicComponent as S, mergeProps as B, createSlots as I, renderList as V, withCtx as P, renderSlot as k, normalizeProps as x, guardReactiveProps as E } from "vue";
|
|
3
|
+
let a = null;
|
|
4
|
+
function f() {
|
|
5
|
+
if (a !== null)
|
|
6
|
+
return a;
|
|
7
|
+
try {
|
|
8
|
+
a = (require("vue").version || "").startsWith("2.");
|
|
9
|
+
} catch {
|
|
10
|
+
try {
|
|
11
|
+
const e = typeof window < "u" ? window.Vue : typeof global < "u" ? global.Vue : null;
|
|
12
|
+
e && e.version ? a = e.version.startsWith("2.") : a = !1;
|
|
13
|
+
} catch {
|
|
14
|
+
a = !1;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
}
|
|
19
|
+
async function W() {
|
|
4
20
|
try {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
21
|
+
return f() ? (await import("element-ui")).Button : (await import("element-plus")).ElButton;
|
|
22
|
+
} catch (t) {
|
|
23
|
+
const e = f();
|
|
8
24
|
return console.error(
|
|
9
|
-
|
|
10
|
-
|
|
25
|
+
e ? "SccbaButton: Failed to load element-ui. Please install it with: npm install element-ui" : "SccbaButton: Failed to load element-plus. Please install it with: npm install element-plus",
|
|
26
|
+
t
|
|
11
27
|
), null;
|
|
12
28
|
}
|
|
13
29
|
}
|
|
14
|
-
async function
|
|
30
|
+
async function j() {
|
|
15
31
|
try {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
32
|
+
return f() ? (await import("element-ui")).Input : (await import("element-plus")).ElInput;
|
|
33
|
+
} catch (t) {
|
|
34
|
+
const e = f();
|
|
19
35
|
return console.error(
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
e ? "SccbaInput: Failed to load element-ui. Please install it with: npm install element-ui" : "SccbaInput: Failed to load element-plus. Please install it with: npm install element-plus",
|
|
37
|
+
t
|
|
22
38
|
), null;
|
|
23
39
|
}
|
|
24
40
|
}
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
for (const [
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
},
|
|
41
|
+
const $ = (t, e) => {
|
|
42
|
+
const u = t.__vccOpts || t;
|
|
43
|
+
for (const [r, l] of e)
|
|
44
|
+
u[r] = l;
|
|
45
|
+
return u;
|
|
46
|
+
}, q = {
|
|
31
47
|
name: "SccbaButton",
|
|
32
48
|
inheritAttrs: !1
|
|
33
|
-
},
|
|
49
|
+
}, A = /* @__PURE__ */ Object.assign(q, {
|
|
34
50
|
props: {
|
|
35
51
|
type: {
|
|
36
52
|
type: String,
|
|
@@ -89,27 +105,30 @@ const E = (e, t) => {
|
|
|
89
105
|
default: ""
|
|
90
106
|
}
|
|
91
107
|
},
|
|
92
|
-
setup(
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
const
|
|
98
|
-
return
|
|
99
|
-
getButtonInstance: () =>
|
|
100
|
-
buttonRef:
|
|
101
|
-
}), (n,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
setup(t, { expose: e }) {
|
|
109
|
+
const u = t, r = m(), l = y(null), s = b(() => ({ ...u, ...r }));
|
|
110
|
+
v(async () => {
|
|
111
|
+
l.value = await W();
|
|
112
|
+
});
|
|
113
|
+
const i = g(null);
|
|
114
|
+
return e({
|
|
115
|
+
getButtonInstance: () => i.value,
|
|
116
|
+
buttonRef: i
|
|
117
|
+
}), (n, d) => o(l) ? (w(), h(S(o(l)), B({ key: 0 }, o(s), {
|
|
118
|
+
ref_key: "buttonInstance",
|
|
119
|
+
ref: i
|
|
120
|
+
}), I({ _: 2 }, [
|
|
121
|
+
V(n.$slots, (z, p) => ({
|
|
122
|
+
name: p,
|
|
123
|
+
fn: P((c) => [
|
|
124
|
+
k(n.$slots, p, x(E(c || {})), void 0, !0)
|
|
106
125
|
])
|
|
107
126
|
}))
|
|
108
|
-
]), 1040)) :
|
|
127
|
+
]), 1040)) : _("", !0);
|
|
109
128
|
}
|
|
110
|
-
}),
|
|
129
|
+
}), C = /* @__PURE__ */ $(A, [["__scopeId", "data-v-f4bfc0d9"]]), L = {
|
|
111
130
|
name: "SccbaInput"
|
|
112
|
-
},
|
|
131
|
+
}, D = /* @__PURE__ */ Object.assign(L, {
|
|
113
132
|
props: {
|
|
114
133
|
type: {
|
|
115
134
|
type: String,
|
|
@@ -169,50 +188,53 @@ const E = (e, t) => {
|
|
|
169
188
|
}
|
|
170
189
|
},
|
|
171
190
|
emits: ["input", "change", "focus", "blur", "clear"],
|
|
172
|
-
setup(
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
})
|
|
177
|
-
const n =
|
|
178
|
-
return
|
|
191
|
+
setup(t, { expose: e, emit: u }) {
|
|
192
|
+
const r = t, l = m(), s = y(null), i = b(() => ({ ...r, ...l }));
|
|
193
|
+
v(async () => {
|
|
194
|
+
s.value = await j();
|
|
195
|
+
});
|
|
196
|
+
const n = g(null);
|
|
197
|
+
return e({
|
|
179
198
|
getInputInstance: () => n.value,
|
|
180
199
|
focus: () => n.value && n.value.focus(),
|
|
181
200
|
blur: () => n.value && n.value.blur(),
|
|
182
201
|
select: () => n.value && n.value.select(),
|
|
183
202
|
clear: () => n.value && n.value.clear(),
|
|
184
203
|
inputRef: n
|
|
185
|
-
}), (
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
204
|
+
}), (d, z) => o(s) ? (w(), h(S(o(s)), B({ key: 0 }, o(i), {
|
|
205
|
+
ref_key: "inputInstance",
|
|
206
|
+
ref: n
|
|
207
|
+
}), I({ _: 2 }, [
|
|
208
|
+
V(d.$slots, (p, c) => ({
|
|
209
|
+
name: c,
|
|
210
|
+
fn: P((O) => [
|
|
211
|
+
k(d.$slots, c, x(E(O || {})), void 0, !0)
|
|
190
212
|
])
|
|
191
213
|
}))
|
|
192
|
-
]), 1040)) :
|
|
214
|
+
]), 1040)) : _("", !0);
|
|
193
215
|
}
|
|
194
|
-
}),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
],
|
|
198
|
-
F.forEach((
|
|
199
|
-
|
|
216
|
+
}), N = /* @__PURE__ */ $(D, [["__scopeId", "data-v-ab2fae08"]]), F = [
|
|
217
|
+
C,
|
|
218
|
+
N
|
|
219
|
+
], R = function(t) {
|
|
220
|
+
F.forEach((e) => {
|
|
221
|
+
t.component(e.name, e);
|
|
200
222
|
});
|
|
201
223
|
};
|
|
202
|
-
F.forEach((
|
|
203
|
-
|
|
204
|
-
|
|
224
|
+
F.forEach((t) => {
|
|
225
|
+
t.install = function(e) {
|
|
226
|
+
e.component(t.name, t);
|
|
205
227
|
};
|
|
206
228
|
});
|
|
207
|
-
typeof window < "u" && window.Vue &&
|
|
229
|
+
typeof window < "u" && window.Vue && R(window.Vue);
|
|
208
230
|
const G = {
|
|
209
|
-
install:
|
|
210
|
-
SccbaButton:
|
|
211
|
-
SccbaInput:
|
|
231
|
+
install: R,
|
|
232
|
+
SccbaButton: C,
|
|
233
|
+
SccbaInput: N
|
|
212
234
|
};
|
|
213
235
|
export {
|
|
214
|
-
|
|
215
|
-
|
|
236
|
+
C as SccbaButton,
|
|
237
|
+
N as SccbaInput,
|
|
216
238
|
G as default,
|
|
217
|
-
|
|
239
|
+
R as install
|
|
218
240
|
};
|
package/dist/sccba-ui.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(a,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue-demi"),require("vue")):typeof define=="function"&&define.amd?define(["exports","vue-demi","vue"],l):(a=typeof globalThis<"u"?globalThis:a||self,l(a.SccbaUI={},a.VueDemi,a.Vue))})(this,(function(a,l,e){"use strict";let r=null;function f(){if(r!==null)return r;try{r=(require("vue").version||"").startsWith("2.")}catch{try{const t=typeof window<"u"?window.Vue:typeof global<"u"?global.Vue:null;t&&t.version?r=t.version.startsWith("2."):r=!1}catch{r=!1}}return r}async function w(){try{return f()?(await import("element-ui")).Button:(await import("element-plus")).ElButton}catch(n){const t=f();return console.error(t?"SccbaButton: Failed to load element-ui. Please install it with: npm install element-ui":"SccbaButton: Failed to load element-plus. Please install it with: npm install element-plus",n),null}}async function B(){try{return f()?(await import("element-ui")).Input:(await import("element-plus")).ElInput}catch(n){const t=f();return console.error(t?"SccbaInput: Failed to load element-ui. Please install it with: npm install element-ui":"SccbaInput: Failed to load element-plus. Please install it with: npm install element-plus",n),null}}const S=(n,t)=>{const u=n.__vccOpts||n;for(const[c,s]of t)u[c]=s;return u},m=S(Object.assign({name:"SccbaButton",inheritAttrs:!1},{props:{type:{type:String,default:"default"},size:{type:String,default:""},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},label:{type:String,default:""},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},block:{type:Boolean,default:!1},nativeType:{type:String,default:"button"},placeholder:{type:String,default:""}},setup(n,{expose:t}){const u=n,c=l.useAttrs(),s=l.shallowRef(null),i=l.computed(()=>({...u,...c}));l.onMounted(async()=>{s.value=await w()});const d=l.ref(null);return t({getButtonInstance:()=>d.value,buttonRef:d}),(o,b)=>e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s)),e.mergeProps({key:0},e.unref(i),{ref_key:"buttonInstance",ref:d}),e.createSlots({_:2},[e.renderList(o.$slots,(P,h)=>({name:h,fn:e.withCtx(p=>[e.renderSlot(o.$slots,h,e.normalizeProps(e.guardReactiveProps(p||{})),void 0,!0)])}))]),1040)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-f4bfc0d9"]]),y=S(Object.assign({name:"SccbaInput"},{props:{type:{type:String,default:"text"},size:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxlength:{type:[String,Number],default:null},showWordLimit:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},name:{type:String,default:""},form:{type:String,default:""},required:{type:Boolean,default:!1},width:{type:[String,Number],default:""}},emits:["input","change","focus","blur","clear"],setup(n,{expose:t,emit:u}){const c=n,s=l.useAttrs(),i=l.shallowRef(null),d=l.computed(()=>({...c,...s}));l.onMounted(async()=>{i.value=await B()});const o=l.ref(null);return t({getInputInstance:()=>o.value,focus:()=>o.value&&o.value.focus(),blur:()=>o.value&&o.value.blur(),select:()=>o.value&&o.value.select(),clear:()=>o.value&&o.value.clear(),inputRef:o}),(b,P)=>e.unref(i)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)),e.mergeProps({key:0},e.unref(d),{ref_key:"inputInstance",ref:o}),e.createSlots({_:2},[e.renderList(b.$slots,(h,p)=>({name:p,fn:e.withCtx(V=>[e.renderSlot(b.$slots,p,e.normalizeProps(e.guardReactiveProps(V||{})),void 0,!0)])}))]),1040)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-ab2fae08"]]),g=[m,y],_=function(n){g.forEach(t=>{n.component(t.name,t)})};g.forEach(n=>{n.install=function(t){t.component(n.name,n)}}),typeof window<"u"&&window.Vue&&_(window.Vue);const I={install:_,SccbaButton:m,SccbaInput:y};a.SccbaButton=m,a.SccbaInput=y,a.default=I,a.install=_,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|