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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue-demi"),e=require("vue");async function h(){try{const t=n.isVue2?"element-ui":"element-plus",l=n.isVue2?"Button":"ElButton";return(await import(t))[l]}catch(t){return console.error(n.isVue2?"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 v(){try{const t=n.isVue2?"element-ui":"element-plus",l=n.isVue2?"Input":"ElInput";return(await import(t))[l]}catch(t){return console.error(n.isVue2?"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 g=(t,l)=>{const o=t.__vccOpts||t;for(const[r,u]of l)o[r]=u;return o},B={name:"SccbaButton",inheritAttrs:!1},w=Object.assign(B,{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:l}){const o=t,r=n.useAttrs(),u=n.shallowRef(null),s=n.computed(()=>({...o,...r}));n.onMounted(async()=>{u.value=await h()}),n.getCurrentInstance();const c=n.ref(null);return l({getButtonInstance:()=>c.value,buttonRef:c}),(a,p)=>e.unref(u)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),e.mergeProps({key:0},e.unref(s),{ref:"changeRef"}),e.createSlots({_:2},[e.renderList(a.$slots,(b,d)=>({name:d,fn:e.withCtx(i=>[e.renderSlot(a.$slots,d,e.normalizeProps(e.guardReactiveProps(i)),void 0,!0)])}))]),1040)):e.createCommentVNode("",!0)}}),f=g(w,[["__scopeId","data-v-5e929c4c"]]),I={name:"SccbaInput"},P=Object.assign(I,{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:l,emit:o}){const r=t,u=n.useAttrs(),s=n.shallowRef(null),c=n.computed(()=>({...r,...u}));n.onMounted(async()=>{s.value=await v()}),n.getCurrentInstance();const a=n.ref(null);return l({getInputInstance:()=>a.value,focus:()=>a.value&&a.value.focus(),blur:()=>a.value&&a.value.blur(),select:()=>a.value&&a.value.select(),clear:()=>a.value&&a.value.clear(),inputRef:a}),(p,b)=>e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s)),e.mergeProps({key:0},e.unref(c),{ref:"changeRef"}),e.createSlots({_:2},[e.renderList(p.$slots,(d,i)=>({name:i,fn:e.withCtx(_=>[e.renderSlot(p.$slots,i,e.normalizeProps(e.guardReactiveProps(_)),void 0,!0)])}))]),1040)):e.createCommentVNode("",!0)}}),m=g(P,[["__scopeId","data-v-c667f396"]]),S=[f,m],y=function(t){S.forEach(l=>{t.component(l.name,l)})};S.forEach(t=>{t.install=function(l){l.component(t.name,t)}});typeof window<"u"&&window.Vue&&y(window.Vue);const k={install:y,SccbaButton:f,SccbaInput:m};exports.SccbaButton=f;exports.SccbaInput=m;exports.default=k;exports.install=y;
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-5e929c4c] .el-button{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-5e929c4c] .el-button:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-1px)}[data-v-5e929c4c] .el-button:active{transform:translateY(0);box-shadow:0 2px 8px #00000026}[data-v-5e929c4c] .el-button{margin-right:10px}[data-v-5e929c4c] .el-button:last-child{margin-right:0}[data-v-c667f396] .el-input__inner{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-c667f396] .el-input__inner:focus{box-shadow:0 0 0 2px #3b82f633!important}
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}
@@ -1,36 +1,52 @@
1
- import { isVue2 as o, useAttrs as f, shallowRef as m, computed as y, onMounted as g, getCurrentInstance as b, ref as S } from "vue-demi";
2
- import { createBlock as _, createCommentVNode as h, unref as u, openBlock as B, resolveDynamicComponent as w, mergeProps as v, createSlots as I, renderList as P, withCtx as N, renderSlot as k, normalizeProps as x, guardReactiveProps as C } from "vue";
3
- async function j() {
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
- const e = o ? "element-ui" : "element-plus", t = o ? "Button" : "ElButton";
6
- return (await import(e))[t];
7
- } catch (e) {
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
- o ? "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",
10
- e
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 A() {
30
+ async function j() {
15
31
  try {
16
- const e = o ? "element-ui" : "element-plus", t = o ? "Input" : "ElInput";
17
- return (await import(e))[t];
18
- } catch (e) {
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
- o ? "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",
21
- e
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 E = (e, t) => {
26
- const l = e.__vccOpts || e;
27
- for (const [s, a] of t)
28
- l[s] = a;
29
- return l;
30
- }, L = {
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
- }, q = /* @__PURE__ */ Object.assign(L, {
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(e, { expose: t }) {
93
- const l = e, s = f(), a = m(null), r = y(() => ({ ...l, ...s }));
94
- g(async () => {
95
- a.value = await j();
96
- }), b();
97
- const c = S(null);
98
- return t({
99
- getButtonInstance: () => c.value,
100
- buttonRef: c
101
- }), (n, p) => u(a) ? (B(), _(w(u(a)), v({ key: 0 }, u(r), { ref: "changeRef" }), I({ _: 2 }, [
102
- P(n.$slots, (z, d) => ({
103
- name: d,
104
- fn: N((i) => [
105
- k(n.$slots, d, x(C(i)), void 0, !0)
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)) : h("", !0);
127
+ ]), 1040)) : _("", !0);
109
128
  }
110
- }), R = /* @__PURE__ */ E(q, [["__scopeId", "data-v-5e929c4c"]]), D = {
129
+ }), C = /* @__PURE__ */ $(A, [["__scopeId", "data-v-f4bfc0d9"]]), L = {
111
130
  name: "SccbaInput"
112
- }, M = /* @__PURE__ */ Object.assign(D, {
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(e, { expose: t, emit: l }) {
173
- const s = e, a = f(), r = m(null), c = y(() => ({ ...s, ...a }));
174
- g(async () => {
175
- r.value = await A();
176
- }), b();
177
- const n = S(null);
178
- return t({
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
- }), (p, z) => u(r) ? (B(), _(w(u(r)), v({ key: 0 }, u(c), { ref: "changeRef" }), I({ _: 2 }, [
186
- P(p.$slots, (d, i) => ({
187
- name: i,
188
- fn: N((O) => [
189
- k(p.$slots, i, x(C(O)), void 0, !0)
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)) : h("", !0);
214
+ ]), 1040)) : _("", !0);
193
215
  }
194
- }), $ = /* @__PURE__ */ E(M, [["__scopeId", "data-v-c667f396"]]), F = [
195
- R,
196
- $
197
- ], V = function(e) {
198
- F.forEach((t) => {
199
- e.component(t.name, t);
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((e) => {
203
- e.install = function(t) {
204
- t.component(e.name, e);
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 && V(window.Vue);
229
+ typeof window < "u" && window.Vue && R(window.Vue);
208
230
  const G = {
209
- install: V,
210
- SccbaButton: R,
211
- SccbaInput: $
231
+ install: R,
232
+ SccbaButton: C,
233
+ SccbaInput: N
212
234
  };
213
235
  export {
214
- R as SccbaButton,
215
- $ as SccbaInput,
236
+ C as SccbaButton,
237
+ N as SccbaInput,
216
238
  G as default,
217
- V as install
239
+ R as install
218
240
  };
@@ -1 +1 @@
1
- (function(o,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue-demi"),require("vue")):typeof define=="function"&&define.amd?define(["exports","vue-demi","vue"],t):(o=typeof globalThis<"u"?globalThis:o||self,t(o.SccbaUI={},o.VueDemi,o.Vue))})(this,(function(o,t,e){"use strict";async function b(){try{const n=t.isVue2?"element-ui":"element-plus",l=t.isVue2?"Button":"ElButton";return(await import(n))[l]}catch(n){return console.error(t.isVue2?"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 h(){try{const n=t.isVue2?"element-ui":"element-plus",l=t.isVue2?"Input":"ElInput";return(await import(n))[l]}catch(n){return console.error(t.isVue2?"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 g=(n,l)=>{const s=n.__vccOpts||n;for(const[u,r]of l)s[u]=r;return s},f=g(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:l}){const s=n,u=t.useAttrs(),r=t.shallowRef(null),c=t.computed(()=>({...s,...u}));t.onMounted(async()=>{r.value=await b()}),t.getCurrentInstance();const i=t.ref(null);return l({getButtonInstance:()=>i.value,buttonRef:i}),(a,y)=>e.unref(r)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),e.mergeProps({key:0},e.unref(c),{ref:"changeRef"}),e.createSlots({_:2},[e.renderList(a.$slots,(w,_)=>({name:_,fn:e.withCtx(d=>[e.renderSlot(a.$slots,_,e.normalizeProps(e.guardReactiveProps(d)),void 0,!0)])}))]),1040)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-5e929c4c"]]),p=g(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:l,emit:s}){const u=n,r=t.useAttrs(),c=t.shallowRef(null),i=t.computed(()=>({...u,...r}));t.onMounted(async()=>{c.value=await h()}),t.getCurrentInstance();const a=t.ref(null);return l({getInputInstance:()=>a.value,focus:()=>a.value&&a.value.focus(),blur:()=>a.value&&a.value.blur(),select:()=>a.value&&a.value.select(),clear:()=>a.value&&a.value.clear(),inputRef:a}),(y,w)=>e.unref(c)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c)),e.mergeProps({key:0},e.unref(i),{ref:"changeRef"}),e.createSlots({_:2},[e.renderList(y.$slots,(_,d)=>({name:d,fn:e.withCtx(I=>[e.renderSlot(y.$slots,d,e.normalizeProps(e.guardReactiveProps(I)),void 0,!0)])}))]),1040)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-c667f396"]]),S=[f,p],m=function(n){S.forEach(l=>{n.component(l.name,l)})};S.forEach(n=>{n.install=function(l){l.component(n.name,n)}}),typeof window<"u"&&window.Vue&&m(window.Vue);const B={install:m,SccbaButton:f,SccbaInput:p};o.SccbaButton=f,o.SccbaInput=p,o.default=B,o.install=m,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
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"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccba-ui",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "一个基于 Vue 2/3 的 UI 组件库,使用 vue-demi 实现跨版本兼容",
5
5
  "keywords": [
6
6
  "vue",