@huntflow/ui 0.0.43 → 0.0.45
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/base-checkbox/checkbox.vue.d.ts +31 -0
- package/dist/components/base-checkbox/index.d.ts +3 -0
- package/dist/components/base-checkbox/types.d.ts +10 -0
- package/dist/components/base-select/index.d.ts +3 -0
- package/dist/components/base-select/select.vue.d.ts +36 -0
- package/dist/components/base-select/types.d.ts +19 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/global.css +1 -1
- package/dist/ui.cjs.js +2 -2
- package/dist/ui.es.js +87 -80
- package/package.json +3 -15
package/dist/ui.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";var r;try{if(typeof document<"u"){var o=document.createElement("style");o.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.content,o.appendChild(document.createTextNode(".
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p="
|
|
1
|
+
(function(){"use strict";var r;try{if(typeof document<"u"){var o=document.createElement("style");o.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.content,o.appendChild(document.createTextNode("._button_d4llw_1{position:relative;display:inline-flex;align-items:center;font-weight:500;justify-content:center;border:none;border-radius:var(--hf-button-border-radius);cursor:pointer;transition:background-color .3s,box-shadow .3s}._button_d4llw_1:focus{outline:none}._primary_d4llw_19{color:var(--hf-button-primary-text-color);border:1px solid var(--hf-button-primary-background-color);background-color:var(--hf-button-primary-background-color)}._primary_d4llw_19:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_d4llw_19:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_d4llw_19._bordered_d4llw_34{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_d4llw_40{color:var(--hf-button-danger-text-color);background-color:var(--hf-button-danger-background-color)}._danger_d4llw_40:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_d4llw_40:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_d4llw_40._bordered_d4llw_34{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_d4llw_59{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_d4llw_59:hover{background-color:var(--hf-button-default-hover-background-color)}._default_d4llw_59:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._link_d4llw_73{background-color:#fff;color:#007bff;text-decoration:underline}._block_d4llw_79{width:100%}._disabled_d4llw_83{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._disabled_d4llw_83:hover{background-color:inherit}._loading_d4llw_93{cursor:wait}._loading_d4llw_93 ._content_d4llw_96{visibility:hidden}._circle_d4llw_101{border-radius:100%;padding:0!important}._bordered_d4llw_34{border:1px solid currentColor}._icon_d4llw_110{display:flex;align-items:center}._iconLeft_d4llw_115{margin-right:8px}._iconRight_d4llw_119{margin-left:8px}._xs_d4llw_123{padding:4px 8px;font-size:12px}._s_d4llw_128{padding:6px 12px;font-size:14px;line-height:20px}._m_d4llw_134{padding:6px 12px;font-size:15px;line-height:24px}._l_d4llw_73{padding:16px 32px;font-size:18px}._xl_d4llw_145{padding:20px 40px;font-size:20px}._loadingWrapper_d4llw_150{width:100%;height:100%;position:absolute;left:0;right:0;display:flex;align-items:center;justify-content:center}._loadingWrapper_d4llw_150 ._spinner_d4llw_161{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;width:16px;height:16px;border:2px solid rgba(0,0,0,.05);border-top-color:#fff;border-radius:50%;animation:_spin_d4llw_161 .6s linear infinite}@keyframes _spin_d4llw_161{to{transform:rotate(360deg)}}._wrapper_f5n0f_1{display:flex;flex-direction:column}._label_f5n0f_6{margin-bottom:4px;font-size:15px;font-weight:500;line-height:20px}._container_f5n0f_13{position:relative;display:flex;align-items:center}._input_f5n0f_19{flex:1;padding:8px 12px;font-size:15px;line-height:24px;border:1px solid #00000029;border-radius:12px;outline:none;transition:border-color .3s}._input_f5n0f_19._error_f5n0f_29{border:1px solid #FF0000}._input_f5n0f_19._error_f5n0f_29:focus{outline:3px solid #FFD6D6}._input_f5n0f_19:focus{outline:3px solid #C4EDFA}._xs_f5n0f_41{padding:4px 8px;font-size:12px}._s_f5n0f_46{padding:6px 10px;font-size:13px}._m_f5n0f_51{padding:8px 12px;font-size:14px}._l_f5n0f_6{padding:10px 14px;font-size:16px}._xl_f5n0f_61{padding:12px 16px;font-size:18px}._disabled_f5n0f_66{background-color:#e9ecef;cursor:not-allowed}._errorText_f5n0f_71{margin-top:4px;font-size:14px;line-height:20px;color:red}._prefix_f5n0f_78,._suffix_f5n0f_79{position:absolute;display:flex;align-items:center;color:#6c757d}._prefix_f5n0f_78{left:8px}._suffix_f5n0f_79{right:8px}._loading_f5n0f_94{cursor:wait}._spinner_f5n0f_98{position:absolute;right:8px;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_f5n0f_98 .6s linear infinite}@keyframes _spin_f5n0f_98{to{transform:rotate(360deg)}}")),document.head.appendChild(o)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p="_button_d4llw_1",_="_primary_d4llw_19",f="_bordered_d4llw_34",m="_danger_d4llw_40",u="_link_d4llw_73",b="_block_d4llw_79",k="_disabled_d4llw_83",y="_loading_d4llw_93",g="_content_d4llw_96",B="_circle_d4llw_101",C="_icon_d4llw_110",w="_iconLeft_d4llw_115",h="_iconRight_d4llw_119",$="_xs_d4llw_123",v="_s_d4llw_128",z="_m_d4llw_134",N="_l_d4llw_73",E="_xl_d4llw_145",V="_loadingWrapper_d4llw_150",I="_spinner_d4llw_161",S="_spin_d4llw_161",l={button:p,primary:_,bordered:f,danger:m,default:"_default_d4llw_59",link:u,block:b,disabled:k,loading:y,content:g,circle:B,icon:C,iconLeft:w,iconRight:h,xs:$,s:v,m:z,l:N,xl:E,loadingWrapper:V,spinner:I,spin:S},T=["name","type","disabled"],L=e.defineComponent({__name:"button",props:{size:{},className:{},type:{},leftIcon:{},rightIcon:{},block:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},active:{type:Boolean},name:{},circle:{type:Boolean},bordered:{type:Boolean},htmlType:{}},emits:["click"],setup(a,{emit:i}){const o=a,r=i,c=e.computed(()=>[l.button,l[o.size||"m"],l[o.type||"default"],{[l.block]:o.block,[l.disabled]:o.disabled,[l.loading]:o.loading,[l.active]:o.active,[l.circle]:o.circle,[l.bordered]:o.bordered},o.className]),d=()=>{r("click")};return(s,n)=>(e.openBlock(),e.createElementBlock("button",{name:s.name,class:e.normalizeClass(c.value),type:s.htmlType,disabled:s.disabled||s.loading,onClick:d},[s.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).loadingWrapper)},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).spinner)},null,2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[s.leftIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(l).icon,e.unref(l).iconLeft])},[e.renderSlot(s.$slots,"leftIcon",{icon:s.leftIcon})],2)):e.createCommentVNode("",!0),s.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).content)},[e.renderSlot(s.$slots,"default")],2)):e.createCommentVNode("",!0),s.rightIcon?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass([e.unref(l).icon,e.unref(l).iconRight])},[e.renderSlot(s.$slots,"rightIcon",{icon:s.rightIcon})],2)):e.createCommentVNode("",!0)])],10,T))}}),R="_wrapper_f5n0f_1",W="_label_f5n0f_6",D="_container_f5n0f_13",j="_input_f5n0f_19",q="_error_f5n0f_29",x="_xs_f5n0f_41",K="_s_f5n0f_46",M="_m_f5n0f_51",O="_l_f5n0f_6",P="_xl_f5n0f_61",A="_disabled_f5n0f_66",F="_errorText_f5n0f_71",G="_prefix_f5n0f_78",H="_suffix_f5n0f_79",J="_loading_f5n0f_94",Q="_spinner_f5n0f_98",U="_spin_f5n0f_98",t={wrapper:R,label:W,container:D,input:j,error:q,xs:x,s:K,m:M,l:O,xl:P,disabled:A,errorText:F,prefix:G,suffix:H,loading:J,spinner:Q,spin:U},X=["for"],Y=["id","value","name","type","disabled","placeholder"],Z=e.defineComponent({__name:"input",props:{value:{},type:{},id:{},name:{},disabled:{type:Boolean},label:{},placeholder:{},loading:{type:Boolean},error:{},size:{},className:{}},emits:["update:value","enter"],setup(a,{emit:i}){const o=a,r=i,c=e.computed(()=>[t.input,t[o.size||"m"],{[t.disabled]:o.disabled,[t.error]:o.error,[t.loading]:o.loading},o.className]),d=n=>{r("update:value",n.target.value)},s=n=>{n.key==="Enter"&&r("enter")};return(n,ee)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(t).wrapper)},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:n.id,class:e.normalizeClass(e.unref(t).label)},e.toDisplayString(n.label),11,X)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).container)},[n.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).prefix)},[e.renderSlot(n.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:n.id,value:n.value,name:n.name,type:n.type||"text",disabled:n.disabled||n.loading,placeholder:n.placeholder,class:e.normalizeClass(c.value),onInput:d,onKeydown:s},null,42,Y),n.$slots.suffix?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t).suffix)},[e.renderSlot(n.$slots,"suffix")],2)):e.createCommentVNode("",!0),n.loading?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(t).spinner)},null,2)):e.createCommentVNode("",!0)],2),n.error?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(t).errorText)},e.toDisplayString(n.error),3)):e.createCommentVNode("",!0)],2))}});exports.BaseButton=L;exports.BaseInput=Z;
|
package/dist/ui.es.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
(function(){"use strict";var r;try{if(typeof document<"u"){var o=document.createElement("style");o.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.content,o.appendChild(document.createTextNode(".
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const k = "
|
|
1
|
+
(function(){"use strict";var r;try{if(typeof document<"u"){var o=document.createElement("style");o.nonce=(r=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:r.content,o.appendChild(document.createTextNode("._button_d4llw_1{position:relative;display:inline-flex;align-items:center;font-weight:500;justify-content:center;border:none;border-radius:var(--hf-button-border-radius);cursor:pointer;transition:background-color .3s,box-shadow .3s}._button_d4llw_1:focus{outline:none}._primary_d4llw_19{color:var(--hf-button-primary-text-color);border:1px solid var(--hf-button-primary-background-color);background-color:var(--hf-button-primary-background-color)}._primary_d4llw_19:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_d4llw_19:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_d4llw_19._bordered_d4llw_34{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_d4llw_40{color:var(--hf-button-danger-text-color);background-color:var(--hf-button-danger-background-color)}._danger_d4llw_40:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_d4llw_40:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_d4llw_40._bordered_d4llw_34{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_d4llw_59{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_d4llw_59:hover{background-color:var(--hf-button-default-hover-background-color)}._default_d4llw_59:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._link_d4llw_73{background-color:#fff;color:#007bff;text-decoration:underline}._block_d4llw_79{width:100%}._disabled_d4llw_83{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._disabled_d4llw_83:hover{background-color:inherit}._loading_d4llw_93{cursor:wait}._loading_d4llw_93 ._content_d4llw_96{visibility:hidden}._circle_d4llw_101{border-radius:100%;padding:0!important}._bordered_d4llw_34{border:1px solid currentColor}._icon_d4llw_110{display:flex;align-items:center}._iconLeft_d4llw_115{margin-right:8px}._iconRight_d4llw_119{margin-left:8px}._xs_d4llw_123{padding:4px 8px;font-size:12px}._s_d4llw_128{padding:6px 12px;font-size:14px;line-height:20px}._m_d4llw_134{padding:6px 12px;font-size:15px;line-height:24px}._l_d4llw_73{padding:16px 32px;font-size:18px}._xl_d4llw_145{padding:20px 40px;font-size:20px}._loadingWrapper_d4llw_150{width:100%;height:100%;position:absolute;left:0;right:0;display:flex;align-items:center;justify-content:center}._loadingWrapper_d4llw_150 ._spinner_d4llw_161{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;width:16px;height:16px;border:2px solid rgba(0,0,0,.05);border-top-color:#fff;border-radius:50%;animation:_spin_d4llw_161 .6s linear infinite}@keyframes _spin_d4llw_161{to{transform:rotate(360deg)}}._wrapper_f5n0f_1{display:flex;flex-direction:column}._label_f5n0f_6{margin-bottom:4px;font-size:15px;font-weight:500;line-height:20px}._container_f5n0f_13{position:relative;display:flex;align-items:center}._input_f5n0f_19{flex:1;padding:8px 12px;font-size:15px;line-height:24px;border:1px solid #00000029;border-radius:12px;outline:none;transition:border-color .3s}._input_f5n0f_19._error_f5n0f_29{border:1px solid #FF0000}._input_f5n0f_19._error_f5n0f_29:focus{outline:3px solid #FFD6D6}._input_f5n0f_19:focus{outline:3px solid #C4EDFA}._xs_f5n0f_41{padding:4px 8px;font-size:12px}._s_f5n0f_46{padding:6px 10px;font-size:13px}._m_f5n0f_51{padding:8px 12px;font-size:14px}._l_f5n0f_6{padding:10px 14px;font-size:16px}._xl_f5n0f_61{padding:12px 16px;font-size:18px}._disabled_f5n0f_66{background-color:#e9ecef;cursor:not-allowed}._errorText_f5n0f_71{margin-top:4px;font-size:14px;line-height:20px;color:red}._prefix_f5n0f_78,._suffix_f5n0f_79{position:absolute;display:flex;align-items:center;color:#6c757d}._prefix_f5n0f_78{left:8px}._suffix_f5n0f_79{right:8px}._loading_f5n0f_94{cursor:wait}._spinner_f5n0f_98{position:absolute;right:8px;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_f5n0f_98 .6s linear infinite}@keyframes _spin_f5n0f_98{to{transform:rotate(360deg)}}")),document.head.appendChild(o)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
|
|
2
|
+
import { defineComponent as g, computed as w, openBlock as i, createElementBlock as r, normalizeClass as o, unref as t, createElementVNode as p, createCommentVNode as d, renderSlot as c, toDisplayString as y } from "vue";
|
|
3
|
+
const k = "_button_d4llw_1", h = "_primary_d4llw_19", $ = "_bordered_d4llw_34", v = "_danger_d4llw_40", B = "_link_d4llw_73", I = "_block_d4llw_79", C = "_disabled_d4llw_83", N = "_loading_d4llw_93", T = "_content_d4llw_96", z = "_circle_d4llw_101", L = "_icon_d4llw_110", R = "_iconLeft_d4llw_115", W = "_iconRight_d4llw_119", E = "_xs_d4llw_123", x = "_s_d4llw_128", S = "_m_d4llw_134", V = "_l_d4llw_73", D = "_xl_d4llw_145", K = "_loadingWrapper_d4llw_150", j = "_spinner_d4llw_161", q = "_spin_d4llw_161", n = {
|
|
4
4
|
button: k,
|
|
5
|
-
primary:
|
|
6
|
-
bordered:
|
|
7
|
-
danger:
|
|
8
|
-
default: "
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
circle:
|
|
15
|
-
icon:
|
|
16
|
-
iconLeft:
|
|
17
|
-
iconRight:
|
|
18
|
-
xs:
|
|
5
|
+
primary: h,
|
|
6
|
+
bordered: $,
|
|
7
|
+
danger: v,
|
|
8
|
+
default: "_default_d4llw_59",
|
|
9
|
+
link: B,
|
|
10
|
+
block: I,
|
|
11
|
+
disabled: C,
|
|
12
|
+
loading: N,
|
|
13
|
+
content: T,
|
|
14
|
+
circle: z,
|
|
15
|
+
icon: L,
|
|
16
|
+
iconLeft: R,
|
|
17
|
+
iconRight: W,
|
|
18
|
+
xs: E,
|
|
19
19
|
s: x,
|
|
20
|
-
m:
|
|
21
|
-
l:
|
|
22
|
-
xl:
|
|
20
|
+
m: S,
|
|
21
|
+
l: V,
|
|
22
|
+
xl: D,
|
|
23
|
+
loadingWrapper: K,
|
|
23
24
|
spinner: j,
|
|
24
25
|
spin: q
|
|
25
|
-
}, A = ["name", "type", "disabled"],
|
|
26
|
+
}, A = ["name", "type", "disabled"], de = /* @__PURE__ */ g({
|
|
26
27
|
__name: "button",
|
|
27
28
|
props: {
|
|
28
29
|
size: {},
|
|
@@ -40,73 +41,79 @@ const k = "_button_den84_1", $ = "_primary_den84_19", v = "_bordered_den84_34",
|
|
|
40
41
|
htmlType: {}
|
|
41
42
|
},
|
|
42
43
|
emits: ["click"],
|
|
43
|
-
setup(
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
setup(f, { emit: u }) {
|
|
45
|
+
const l = f, _ = u, b = w(() => [
|
|
46
|
+
n.button,
|
|
47
|
+
n[l.size || "m"],
|
|
48
|
+
n[l.type || "default"],
|
|
48
49
|
{
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
50
|
+
[n.block]: l.block,
|
|
51
|
+
[n.disabled]: l.disabled,
|
|
52
|
+
[n.loading]: l.loading,
|
|
53
|
+
[n.active]: l.active,
|
|
54
|
+
[n.circle]: l.circle,
|
|
55
|
+
[n.bordered]: l.bordered
|
|
55
56
|
},
|
|
56
|
-
|
|
57
|
-
]),
|
|
57
|
+
l.className
|
|
58
|
+
]), m = () => {
|
|
58
59
|
_("click");
|
|
59
60
|
};
|
|
60
61
|
return (s, e) => (i(), r("button", {
|
|
61
62
|
name: s.name,
|
|
62
|
-
class:
|
|
63
|
+
class: o(b.value),
|
|
63
64
|
type: s.htmlType,
|
|
64
65
|
disabled: s.disabled || s.loading,
|
|
65
|
-
onClick:
|
|
66
|
+
onClick: m
|
|
66
67
|
}, [
|
|
67
|
-
s.loading ? (i(), r("
|
|
68
|
+
s.loading ? (i(), r("div", {
|
|
68
69
|
key: 0,
|
|
69
|
-
class:
|
|
70
|
-
},
|
|
70
|
+
class: o(t(n).loadingWrapper)
|
|
71
|
+
}, [
|
|
72
|
+
p("span", {
|
|
73
|
+
class: o(t(n).spinner)
|
|
74
|
+
}, null, 2)
|
|
75
|
+
], 2)) : d("", !0),
|
|
76
|
+
p("div", null, [
|
|
71
77
|
s.leftIcon ? (i(), r("span", {
|
|
72
78
|
key: 0,
|
|
73
|
-
class:
|
|
79
|
+
class: o([t(n).icon, t(n).iconLeft])
|
|
74
80
|
}, [
|
|
75
81
|
c(s.$slots, "leftIcon", { icon: s.leftIcon })
|
|
76
82
|
], 2)) : d("", !0),
|
|
77
83
|
s.$slots.default ? (i(), r("span", {
|
|
78
84
|
key: 1,
|
|
79
|
-
class:
|
|
85
|
+
class: o(t(n).content)
|
|
80
86
|
}, [
|
|
81
87
|
c(s.$slots, "default")
|
|
82
88
|
], 2)) : d("", !0),
|
|
83
89
|
s.rightIcon ? (i(), r("span", {
|
|
84
90
|
key: 2,
|
|
85
|
-
class:
|
|
91
|
+
class: o([t(n).icon, t(n).iconRight])
|
|
86
92
|
}, [
|
|
87
93
|
c(s.$slots, "rightIcon", { icon: s.rightIcon })
|
|
88
94
|
], 2)) : d("", !0)
|
|
89
|
-
]
|
|
95
|
+
])
|
|
90
96
|
], 10, A));
|
|
91
97
|
}
|
|
92
|
-
}), G = "
|
|
93
|
-
wrapper:
|
|
94
|
-
label:
|
|
95
|
-
container:
|
|
96
|
-
input:
|
|
98
|
+
}), F = "_wrapper_f5n0f_1", G = "_label_f5n0f_6", H = "_container_f5n0f_13", J = "_input_f5n0f_19", M = "_error_f5n0f_29", O = "_xs_f5n0f_41", P = "_s_f5n0f_46", Q = "_m_f5n0f_51", U = "_l_f5n0f_6", X = "_xl_f5n0f_61", Y = "_disabled_f5n0f_66", Z = "_errorText_f5n0f_71", ee = "_prefix_f5n0f_78", ne = "_suffix_f5n0f_79", le = "_loading_f5n0f_94", se = "_spinner_f5n0f_98", oe = "_spin_f5n0f_98", a = {
|
|
99
|
+
wrapper: F,
|
|
100
|
+
label: G,
|
|
101
|
+
container: H,
|
|
102
|
+
input: J,
|
|
103
|
+
error: M,
|
|
97
104
|
xs: O,
|
|
98
105
|
s: P,
|
|
99
106
|
m: Q,
|
|
100
107
|
l: U,
|
|
101
|
-
xl:
|
|
102
|
-
disabled:
|
|
103
|
-
|
|
104
|
-
prefix:
|
|
105
|
-
suffix:
|
|
106
|
-
loading:
|
|
108
|
+
xl: X,
|
|
109
|
+
disabled: Y,
|
|
110
|
+
errorText: Z,
|
|
111
|
+
prefix: ee,
|
|
112
|
+
suffix: ne,
|
|
113
|
+
loading: le,
|
|
107
114
|
spinner: se,
|
|
108
115
|
spin: oe
|
|
109
|
-
},
|
|
116
|
+
}, te = ["for"], ae = ["id", "value", "name", "type", "disabled", "placeholder"], ce = /* @__PURE__ */ g({
|
|
110
117
|
__name: "input",
|
|
111
118
|
props: {
|
|
112
119
|
value: {},
|
|
@@ -122,68 +129,68 @@ const k = "_button_den84_1", $ = "_primary_den84_19", v = "_bordered_den84_34",
|
|
|
122
129
|
className: {}
|
|
123
130
|
},
|
|
124
131
|
emits: ["update:value", "enter"],
|
|
125
|
-
setup(
|
|
126
|
-
const
|
|
132
|
+
setup(f, { emit: u }) {
|
|
133
|
+
const l = f, _ = u, b = w(() => [
|
|
127
134
|
a.input,
|
|
128
|
-
a[
|
|
135
|
+
a[l.size || "m"],
|
|
129
136
|
{
|
|
130
|
-
[a.disabled]:
|
|
131
|
-
[a.error]:
|
|
132
|
-
[a.loading]:
|
|
137
|
+
[a.disabled]: l.disabled,
|
|
138
|
+
[a.error]: l.error,
|
|
139
|
+
[a.loading]: l.loading
|
|
133
140
|
},
|
|
134
|
-
|
|
135
|
-
]),
|
|
141
|
+
l.className
|
|
142
|
+
]), m = (e) => {
|
|
136
143
|
_("update:value", e.target.value);
|
|
137
144
|
}, s = (e) => {
|
|
138
145
|
e.key === "Enter" && _("enter");
|
|
139
146
|
};
|
|
140
|
-
return (e,
|
|
141
|
-
class:
|
|
147
|
+
return (e, ie) => (i(), r("div", {
|
|
148
|
+
class: o(t(a).wrapper)
|
|
142
149
|
}, [
|
|
143
150
|
e.label ? (i(), r("label", {
|
|
144
151
|
key: 0,
|
|
145
152
|
for: e.id,
|
|
146
|
-
class:
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
class:
|
|
153
|
+
class: o(t(a).label)
|
|
154
|
+
}, y(e.label), 11, te)) : d("", !0),
|
|
155
|
+
p("div", {
|
|
156
|
+
class: o(t(a).container)
|
|
150
157
|
}, [
|
|
151
158
|
e.$slots.prefix ? (i(), r("span", {
|
|
152
159
|
key: 0,
|
|
153
|
-
class:
|
|
160
|
+
class: o(t(a).prefix)
|
|
154
161
|
}, [
|
|
155
162
|
c(e.$slots, "prefix")
|
|
156
163
|
], 2)) : d("", !0),
|
|
157
|
-
|
|
164
|
+
p("input", {
|
|
158
165
|
id: e.id,
|
|
159
166
|
value: e.value,
|
|
160
167
|
name: e.name,
|
|
161
168
|
type: e.type || "text",
|
|
162
169
|
disabled: e.disabled || e.loading,
|
|
163
170
|
placeholder: e.placeholder,
|
|
164
|
-
class:
|
|
165
|
-
onInput:
|
|
171
|
+
class: o(b.value),
|
|
172
|
+
onInput: m,
|
|
166
173
|
onKeydown: s
|
|
167
|
-
}, null, 42,
|
|
174
|
+
}, null, 42, ae),
|
|
168
175
|
e.$slots.suffix ? (i(), r("span", {
|
|
169
176
|
key: 1,
|
|
170
|
-
class:
|
|
177
|
+
class: o(t(a).suffix)
|
|
171
178
|
}, [
|
|
172
179
|
c(e.$slots, "suffix")
|
|
173
180
|
], 2)) : d("", !0),
|
|
174
181
|
e.loading ? (i(), r("span", {
|
|
175
182
|
key: 2,
|
|
176
|
-
class:
|
|
183
|
+
class: o(t(a).spinner)
|
|
177
184
|
}, null, 2)) : d("", !0)
|
|
178
185
|
], 2),
|
|
179
186
|
e.error ? (i(), r("p", {
|
|
180
187
|
key: 1,
|
|
181
|
-
class:
|
|
182
|
-
},
|
|
188
|
+
class: o(t(a).errorText)
|
|
189
|
+
}, y(e.error), 3)) : d("", !0)
|
|
183
190
|
], 2));
|
|
184
191
|
}
|
|
185
192
|
});
|
|
186
193
|
export {
|
|
187
|
-
|
|
188
|
-
|
|
194
|
+
de as BaseButton,
|
|
195
|
+
ce as BaseInput
|
|
189
196
|
};
|
package/package.json
CHANGED
|
@@ -2,30 +2,18 @@
|
|
|
2
2
|
"name": "@huntflow/ui",
|
|
3
3
|
"description": "HuntFlow UiKit, icons, utils library",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.45",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "HuntFlow Developer",
|
|
8
8
|
"nickname": "developer",
|
|
9
9
|
"email": "developer@huntflow.ru",
|
|
10
10
|
"github": "https://github.com/huntflow/uikit"
|
|
11
11
|
},
|
|
12
|
-
"main": "./dist/ui.
|
|
13
|
-
"module": "./dist/ui.es.js",
|
|
14
|
-
"typings": "./dist/index.d.ts",
|
|
15
|
-
|
|
12
|
+
"main": "./dist/ui.es.js",
|
|
16
13
|
"types": "./dist/index.d.ts",
|
|
17
|
-
"exports": {
|
|
18
|
-
".": {
|
|
19
|
-
"import": "./dist/ui.es.js",
|
|
20
|
-
"require": "./dist/ui.umd.js",
|
|
21
|
-
"types": "./dist/index.d.ts"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
|
|
25
14
|
"styles": "./dist/style.css",
|
|
26
15
|
"files": [
|
|
27
|
-
"dist"
|
|
28
|
-
"dist/index.d.ts"
|
|
16
|
+
"dist"
|
|
29
17
|
],
|
|
30
18
|
"scripts": {
|
|
31
19
|
"dev": "vite",
|