@huntflow/ui 0.0.46 → 0.0.47
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-button/button.vue.d.ts +16 -23
- package/dist/components/base-button/types.d.ts +0 -3
- package/dist/components/base-checkbox/checkbox.vue.d.ts +11 -17
- package/dist/components/base-input/input.vue.d.ts +19 -17
- package/dist/components/base-select/select.vue.d.ts +19 -27
- package/dist/components/base-select/types.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +129 -130
- package/package.json +2 -2
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
import { BaseButtonProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
leftIcon?(_: {
|
|
5
|
-
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}>;
|
|
8
|
-
}): any;
|
|
9
|
-
default?(_: {}): any;
|
|
10
|
-
rightIcon?(_: {
|
|
11
|
-
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
}>;
|
|
14
|
-
}): any;
|
|
15
|
-
};
|
|
16
|
-
refs: {};
|
|
17
|
-
attrs: Partial<{}>;
|
|
18
|
-
};
|
|
19
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
-
declare const __VLS_component: import('vue').DefineComponent<BaseButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
-
click: (...args: any[]) => void;
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<BaseButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
click: () => any;
|
|
22
4
|
}, string, import('vue').PublicProps, Readonly<BaseButtonProps> & Readonly<{
|
|
23
|
-
onClick?: ((
|
|
24
|
-
}>, {
|
|
25
|
-
|
|
5
|
+
onClick?: (() => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
size: import('./types').BaseButtonSize;
|
|
8
|
+
type: import('./types').BaseButtonType;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
active: boolean;
|
|
12
|
+
circle: boolean;
|
|
13
|
+
bordered: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
15
|
+
leftIcon?(_: {}): any;
|
|
16
|
+
default?(_: {}): any;
|
|
17
|
+
rightIcon?(_: {}): any;
|
|
18
|
+
}>;
|
|
26
19
|
export default _default;
|
|
27
20
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
21
|
new (): {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
-
checked: boolean;
|
|
3
2
|
id?: string;
|
|
4
3
|
name?: string;
|
|
5
4
|
disabled?: boolean;
|
|
@@ -7,22 +6,17 @@ type Props = {
|
|
|
7
6
|
error?: string | null | void;
|
|
8
7
|
className?: string;
|
|
9
8
|
};
|
|
10
|
-
declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
22
|
-
"onUpdate:checked"?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
24
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
9
|
+
declare let __VLS_typeProps: Props;
|
|
10
|
+
type __VLS_PublicProps = {
|
|
11
|
+
'checked'?: boolean;
|
|
12
|
+
} & typeof __VLS_typeProps;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:checked": (checked: boolean) => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:checked"?: ((checked: boolean) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
}>;
|
|
26
20
|
export default _default;
|
|
27
21
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
22
|
new (): {
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { BaseInputProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
2
|
+
declare let __VLS_typeProps: BaseInputProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'value'?: string;
|
|
5
|
+
} & typeof __VLS_typeProps;
|
|
6
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:value": (value: string) => any;
|
|
8
|
+
} & {
|
|
9
|
+
"update:value": (value: string) => any;
|
|
10
|
+
enter: () => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
13
|
+
onEnter?: (() => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
size: import('./types').BaseInputSize;
|
|
16
|
+
type: import('./types').BaseInputType;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
18
|
+
prefix?(_: {}): any;
|
|
19
|
+
suffix?(_: {}): any;
|
|
20
|
+
}>;
|
|
19
21
|
export default _default;
|
|
20
22
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
23
|
new (): {
|
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
import { BaseSelectProps } from './types.ts';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
icon?(_: {
|
|
5
|
-
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}>;
|
|
8
|
-
}): any;
|
|
9
|
-
icon?(_: {
|
|
10
|
-
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}>;
|
|
13
|
-
}): any;
|
|
14
|
-
};
|
|
15
|
-
refs: {
|
|
16
|
-
"base-select": HTMLDivElement;
|
|
17
|
-
};
|
|
18
|
-
attrs: Partial<{}>;
|
|
19
|
-
};
|
|
20
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
-
declare const __VLS_component: import('vue').DefineComponent<BaseSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
-
"update:value": (...args: any[]) => void;
|
|
23
|
-
change: (...args: any[]) => void;
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<BaseSelectProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
"update:value": (value: string | number) => any;
|
|
24
4
|
}, string, import('vue').PublicProps, Readonly<BaseSelectProps> & Readonly<{
|
|
25
|
-
"onUpdate:value"?: ((
|
|
26
|
-
|
|
27
|
-
|
|
5
|
+
"onUpdate:value"?: ((value: string | number) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
size: import('./types.ts').BaseSelectSize;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
28
10
|
"base-select": HTMLDivElement;
|
|
29
|
-
}, any
|
|
30
|
-
|
|
11
|
+
}, any>, {
|
|
12
|
+
icon?(_: {
|
|
13
|
+
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>;
|
|
16
|
+
}): any;
|
|
17
|
+
icon?(_: {
|
|
18
|
+
icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>;
|
|
21
|
+
}): any;
|
|
22
|
+
}>;
|
|
31
23
|
export default _default;
|
|
32
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
25
|
new (): {
|
package/dist/ui.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u="_button_d4llw_1",m="_primary_d4llw_19",b="_bordered_d4llw_34",k="_danger_d4llw_40",y="_link_d4llw_73",g="_block_d4llw_79",B="_disabled_d4llw_83",w="_loading_d4llw_93",v="_content_d4llw_96",C="_circle_d4llw_101",$="_icon_d4llw_110",z="_iconLeft_d4llw_115",N="_iconRight_d4llw_119",E="_xs_d4llw_123",h="_s_d4llw_128",V="_m_d4llw_134",S="_l_d4llw_73",T="_xl_d4llw_145",x="_loadingWrapper_d4llw_150",M="_spinner_d4llw_161",I="_spin_d4llw_161",n={button:u,primary:m,bordered:b,danger:k,default:"_default_d4llw_59",link:y,block:g,disabled:B,loading:w,content:v,circle:C,icon:$,iconLeft:z,iconRight:N,xs:E,s:h,m:V,l:S,xl:T,loadingWrapper:x,spinner:M,spin:I},L=["name","type","disabled"],D=e.defineComponent({__name:"button",props:{size:{default:"m"},className:{},type:{default:"default"},block:{type:Boolean},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},active:{type:Boolean,default:!1},name:{},circle:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},htmlType:{}},emits:["click"],setup(r){const t=r,i=e.computed(()=>[n.button,n[t.size],n[t.type],{[n.block]:t.block,[n.disabled]:t.disabled,[n.loading]:t.loading,[n.active]:t.active,[n.circle]:t.circle,[n.bordered]:t.bordered},t.className]);return(o,a)=>(e.openBlock(),e.createElementBlock("button",{name:o.name,class:e.normalizeClass(i.value),type:o.htmlType,disabled:o.disabled,onClick:a[0]||(a[0]=d=>o.$emit("click"))},[o.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).loadingWrapper)},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).spinner)},null,2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("span",{class:e.normalizeClass([e.unref(n).icon,e.unref(n).iconLeft])},[e.renderSlot(o.$slots,"leftIcon")],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).content)},[e.renderSlot(o.$slots,"default")],2),o.$slots.rightIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(n).icon,e.unref(n).iconRight])},[e.renderSlot(o.$slots,"rightIcon")],2)):e.createCommentVNode("",!0)])],10,L))}}),R="_wrapper_f5n0f_1",W="_label_f5n0f_6",j="_container_f5n0f_13",q="_input_f5n0f_19",K="_error_f5n0f_29",O="_xs_f5n0f_41",P="_s_f5n0f_46",U="_m_f5n0f_51",A="_l_f5n0f_6",F="_xl_f5n0f_61",G="_disabled_f5n0f_66",H="_errorText_f5n0f_71",J="_prefix_f5n0f_78",Q="_suffix_f5n0f_79",X="_loading_f5n0f_94",Y="_spinner_f5n0f_98",Z="_spin_f5n0f_98",s={wrapper:R,label:W,container:j,input:q,error:K,xs:O,s:P,m:U,l:A,xl:F,disabled:G,errorText:H,prefix:J,suffix:Q,loading:X,spinner:Y,spin:Z},ee=["for"],le=["id","name","type","disabled","placeholder"],ne=e.defineComponent({__name:"input",props:e.mergeModels({value:{},type:{default:"text"},id:{},name:{},disabled:{type:Boolean},label:{},placeholder:{},loading:{type:Boolean},error:{},size:{default:"m"},className:{}},{value:{},valueModifiers:{}}),emits:e.mergeModels(["update:value","enter"],["update:value"]),setup(r,{emit:t}){const i=e.useModel(r,"value"),o=r,a=t,d=e.computed(()=>[s.input,s[o.size],{[s.disabled]:o.disabled,[s.error]:o.error,[s.loading]:o.loading},o.className]),p=l=>{a("update:value",l.target.value)},_=l=>{l.key==="Enter"&&a("enter")};return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(s).wrapper)},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:l.id,class:e.normalizeClass(e.unref(s).label)},e.toDisplayString(l.label),11,ee)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).container)},[l.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(s).prefix)},[e.renderSlot(l.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:l.id,"onUpdate:modelValue":c[0]||(c[0]=f=>i.value=f),name:l.name,type:l.type,disabled:l.disabled||l.loading,placeholder:l.placeholder,class:e.normalizeClass(d.value),onInput:p,onKeydown:_},null,42,le),[[e.vModelDynamic,i.value]]),l.$slots.suffix?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(s).suffix)},[e.renderSlot(l.$slots,"suffix")],2)):e.createCommentVNode("",!0),l.loading?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(s).spinner)},null,2)):e.createCommentVNode("",!0)],2),l.error?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(s).errorText)},e.toDisplayString(l.error),3)):e.createCommentVNode("",!0)],2))}});exports.BaseButton=D;exports.BaseInput=ne;
|
package/dist/ui.es.js
CHANGED
|
@@ -1,123 +1,117 @@
|
|
|
1
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
|
|
3
|
-
const
|
|
4
|
-
button:
|
|
5
|
-
primary:
|
|
6
|
-
bordered:
|
|
7
|
-
danger:
|
|
2
|
+
import { defineComponent as w, computed as v, openBlock as i, createElementBlock as r, normalizeClass as s, unref as o, createElementVNode as c, createCommentVNode as d, renderSlot as p, mergeModels as y, useModel as B, toDisplayString as g, withDirectives as x, vModelDynamic as N } from "vue";
|
|
3
|
+
const T = "_button_d4llw_1", z = "_primary_d4llw_19", C = "_bordered_d4llw_34", I = "_danger_d4llw_40", L = "_link_d4llw_73", M = "_block_d4llw_79", R = "_disabled_d4llw_83", W = "_loading_d4llw_93", D = "_content_d4llw_96", E = "_circle_d4llw_101", V = "_icon_d4llw_110", S = "_iconLeft_d4llw_115", K = "_iconRight_d4llw_119", U = "_xs_d4llw_123", j = "_s_d4llw_128", q = "_m_d4llw_134", A = "_l_d4llw_73", F = "_xl_d4llw_145", G = "_loadingWrapper_d4llw_150", H = "_spinner_d4llw_161", J = "_spin_d4llw_161", l = {
|
|
4
|
+
button: T,
|
|
5
|
+
primary: z,
|
|
6
|
+
bordered: C,
|
|
7
|
+
danger: I,
|
|
8
8
|
default: "_default_d4llw_59",
|
|
9
|
-
link:
|
|
10
|
-
block:
|
|
11
|
-
disabled:
|
|
12
|
-
loading:
|
|
13
|
-
content:
|
|
14
|
-
circle:
|
|
15
|
-
icon:
|
|
16
|
-
iconLeft:
|
|
17
|
-
iconRight:
|
|
18
|
-
xs:
|
|
19
|
-
s:
|
|
20
|
-
m:
|
|
21
|
-
l:
|
|
22
|
-
xl:
|
|
23
|
-
loadingWrapper:
|
|
24
|
-
spinner:
|
|
25
|
-
spin:
|
|
26
|
-
},
|
|
9
|
+
link: L,
|
|
10
|
+
block: M,
|
|
11
|
+
disabled: R,
|
|
12
|
+
loading: W,
|
|
13
|
+
content: D,
|
|
14
|
+
circle: E,
|
|
15
|
+
icon: V,
|
|
16
|
+
iconLeft: S,
|
|
17
|
+
iconRight: K,
|
|
18
|
+
xs: U,
|
|
19
|
+
s: j,
|
|
20
|
+
m: q,
|
|
21
|
+
l: A,
|
|
22
|
+
xl: F,
|
|
23
|
+
loadingWrapper: G,
|
|
24
|
+
spinner: H,
|
|
25
|
+
spin: J
|
|
26
|
+
}, O = ["name", "type", "disabled"], me = /* @__PURE__ */ w({
|
|
27
27
|
__name: "button",
|
|
28
28
|
props: {
|
|
29
|
-
size: {},
|
|
29
|
+
size: { default: "m" },
|
|
30
30
|
className: {},
|
|
31
|
-
type: {},
|
|
32
|
-
leftIcon: {},
|
|
33
|
-
rightIcon: {},
|
|
31
|
+
type: { default: "default" },
|
|
34
32
|
block: { type: Boolean },
|
|
35
|
-
disabled: { type: Boolean },
|
|
36
|
-
loading: { type: Boolean },
|
|
37
|
-
active: { type: Boolean },
|
|
33
|
+
disabled: { type: Boolean, default: !1 },
|
|
34
|
+
loading: { type: Boolean, default: !1 },
|
|
35
|
+
active: { type: Boolean, default: !1 },
|
|
38
36
|
name: {},
|
|
39
|
-
circle: { type: Boolean },
|
|
40
|
-
bordered: { type: Boolean },
|
|
37
|
+
circle: { type: Boolean, default: !1 },
|
|
38
|
+
bordered: { type: Boolean, default: !1 },
|
|
41
39
|
htmlType: {}
|
|
42
40
|
},
|
|
43
41
|
emits: ["click"],
|
|
44
|
-
setup(f
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
setup(f) {
|
|
43
|
+
const a = f, u = v(() => [
|
|
44
|
+
l.button,
|
|
45
|
+
l[a.size],
|
|
46
|
+
l[a.type],
|
|
49
47
|
{
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
48
|
+
[l.block]: a.block,
|
|
49
|
+
[l.disabled]: a.disabled,
|
|
50
|
+
[l.loading]: a.loading,
|
|
51
|
+
[l.active]: a.active,
|
|
52
|
+
[l.circle]: a.circle,
|
|
53
|
+
[l.bordered]: a.bordered
|
|
56
54
|
},
|
|
57
|
-
|
|
58
|
-
])
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
disabled: s.disabled || s.loading,
|
|
66
|
-
onClick: m
|
|
55
|
+
a.className
|
|
56
|
+
]);
|
|
57
|
+
return (n, _) => (i(), r("button", {
|
|
58
|
+
name: n.name,
|
|
59
|
+
class: s(u.value),
|
|
60
|
+
type: n.htmlType,
|
|
61
|
+
disabled: n.disabled,
|
|
62
|
+
onClick: _[0] || (_[0] = (m) => n.$emit("click"))
|
|
67
63
|
}, [
|
|
68
|
-
|
|
64
|
+
n.loading ? (i(), r("div", {
|
|
69
65
|
key: 0,
|
|
70
|
-
class: o(
|
|
66
|
+
class: s(o(l).loadingWrapper)
|
|
71
67
|
}, [
|
|
72
|
-
|
|
73
|
-
class: o(
|
|
68
|
+
c("span", {
|
|
69
|
+
class: s(o(l).spinner)
|
|
74
70
|
}, null, 2)
|
|
75
71
|
], 2)) : d("", !0),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
class: o([t(n).icon, t(n).iconLeft])
|
|
72
|
+
c("div", null, [
|
|
73
|
+
c("span", {
|
|
74
|
+
class: s([o(l).icon, o(l).iconLeft])
|
|
80
75
|
}, [
|
|
81
|
-
|
|
82
|
-
], 2)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class: o(t(n).content)
|
|
76
|
+
p(n.$slots, "leftIcon")
|
|
77
|
+
], 2),
|
|
78
|
+
c("span", {
|
|
79
|
+
class: s(o(l).content)
|
|
86
80
|
}, [
|
|
87
|
-
|
|
88
|
-
], 2)
|
|
89
|
-
|
|
90
|
-
key:
|
|
91
|
-
class:
|
|
81
|
+
p(n.$slots, "default")
|
|
82
|
+
], 2),
|
|
83
|
+
n.$slots.rightIcon ? (i(), r("span", {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: s([o(l).icon, o(l).iconRight])
|
|
92
86
|
}, [
|
|
93
|
-
|
|
87
|
+
p(n.$slots, "rightIcon")
|
|
94
88
|
], 2)) : d("", !0)
|
|
95
89
|
])
|
|
96
|
-
], 10,
|
|
90
|
+
], 10, O));
|
|
97
91
|
}
|
|
98
|
-
}),
|
|
99
|
-
wrapper:
|
|
100
|
-
label:
|
|
101
|
-
container:
|
|
102
|
-
input:
|
|
103
|
-
error:
|
|
104
|
-
xs:
|
|
105
|
-
s:
|
|
106
|
-
m:
|
|
107
|
-
l:
|
|
108
|
-
xl:
|
|
109
|
-
disabled:
|
|
110
|
-
errorText:
|
|
111
|
-
prefix:
|
|
112
|
-
suffix:
|
|
113
|
-
loading:
|
|
114
|
-
spinner:
|
|
115
|
-
spin:
|
|
116
|
-
},
|
|
92
|
+
}), P = "_wrapper_f5n0f_1", Q = "_label_f5n0f_6", X = "_container_f5n0f_13", Y = "_input_f5n0f_19", Z = "_error_f5n0f_29", ee = "_xs_f5n0f_41", le = "_s_f5n0f_46", ne = "_m_f5n0f_51", se = "_l_f5n0f_6", oe = "_xl_f5n0f_61", te = "_disabled_f5n0f_66", ae = "_errorText_f5n0f_71", ie = "_prefix_f5n0f_78", re = "_suffix_f5n0f_79", de = "_loading_f5n0f_94", ce = "_spinner_f5n0f_98", _e = "_spin_f5n0f_98", t = {
|
|
93
|
+
wrapper: P,
|
|
94
|
+
label: Q,
|
|
95
|
+
container: X,
|
|
96
|
+
input: Y,
|
|
97
|
+
error: Z,
|
|
98
|
+
xs: ee,
|
|
99
|
+
s: le,
|
|
100
|
+
m: ne,
|
|
101
|
+
l: se,
|
|
102
|
+
xl: oe,
|
|
103
|
+
disabled: te,
|
|
104
|
+
errorText: ae,
|
|
105
|
+
prefix: ie,
|
|
106
|
+
suffix: re,
|
|
107
|
+
loading: de,
|
|
108
|
+
spinner: ce,
|
|
109
|
+
spin: _e
|
|
110
|
+
}, pe = ["for"], fe = ["id", "name", "type", "disabled", "placeholder"], be = /* @__PURE__ */ w({
|
|
117
111
|
__name: "input",
|
|
118
|
-
props: {
|
|
112
|
+
props: /* @__PURE__ */ y({
|
|
119
113
|
value: {},
|
|
120
|
-
type: {},
|
|
114
|
+
type: { default: "text" },
|
|
121
115
|
id: {},
|
|
122
116
|
name: {},
|
|
123
117
|
disabled: { type: Boolean },
|
|
@@ -125,72 +119,77 @@ const k = "_button_d4llw_1", h = "_primary_d4llw_19", $ = "_bordered_d4llw_34",
|
|
|
125
119
|
placeholder: {},
|
|
126
120
|
loading: { type: Boolean },
|
|
127
121
|
error: {},
|
|
128
|
-
size: {},
|
|
122
|
+
size: { default: "m" },
|
|
129
123
|
className: {}
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
124
|
+
}, {
|
|
125
|
+
value: {},
|
|
126
|
+
valueModifiers: {}
|
|
127
|
+
}),
|
|
128
|
+
emits: /* @__PURE__ */ y(["update:value", "enter"], ["update:value"]),
|
|
129
|
+
setup(f, { emit: a }) {
|
|
130
|
+
const u = B(f, "value"), n = f, _ = a, m = v(() => [
|
|
131
|
+
t.input,
|
|
132
|
+
t[n.size],
|
|
136
133
|
{
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
134
|
+
[t.disabled]: n.disabled,
|
|
135
|
+
[t.error]: n.error,
|
|
136
|
+
[t.loading]: n.loading
|
|
140
137
|
},
|
|
141
|
-
|
|
142
|
-
]),
|
|
138
|
+
n.className
|
|
139
|
+
]), k = (e) => {
|
|
143
140
|
_("update:value", e.target.value);
|
|
144
|
-
},
|
|
141
|
+
}, $ = (e) => {
|
|
145
142
|
e.key === "Enter" && _("enter");
|
|
146
143
|
};
|
|
147
|
-
return (e,
|
|
148
|
-
class: o(t
|
|
144
|
+
return (e, b) => (i(), r("div", {
|
|
145
|
+
class: s(o(t).wrapper)
|
|
149
146
|
}, [
|
|
150
147
|
e.label ? (i(), r("label", {
|
|
151
148
|
key: 0,
|
|
152
149
|
for: e.id,
|
|
153
|
-
class: o(t
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
class: o(t
|
|
150
|
+
class: s(o(t).label)
|
|
151
|
+
}, g(e.label), 11, pe)) : d("", !0),
|
|
152
|
+
c("div", {
|
|
153
|
+
class: s(o(t).container)
|
|
157
154
|
}, [
|
|
158
155
|
e.$slots.prefix ? (i(), r("span", {
|
|
159
156
|
key: 0,
|
|
160
|
-
class: o(t
|
|
157
|
+
class: s(o(t).prefix)
|
|
161
158
|
}, [
|
|
162
|
-
|
|
159
|
+
p(e.$slots, "prefix")
|
|
163
160
|
], 2)) : d("", !0),
|
|
164
|
-
|
|
161
|
+
x(c("input", {
|
|
165
162
|
id: e.id,
|
|
166
|
-
|
|
163
|
+
"onUpdate:modelValue": b[0] || (b[0] = (h) => u.value = h),
|
|
167
164
|
name: e.name,
|
|
168
|
-
type: e.type
|
|
165
|
+
type: e.type,
|
|
169
166
|
disabled: e.disabled || e.loading,
|
|
170
167
|
placeholder: e.placeholder,
|
|
171
|
-
class:
|
|
172
|
-
onInput:
|
|
173
|
-
onKeydown:
|
|
174
|
-
}, null, 42,
|
|
168
|
+
class: s(m.value),
|
|
169
|
+
onInput: k,
|
|
170
|
+
onKeydown: $
|
|
171
|
+
}, null, 42, fe), [
|
|
172
|
+
[N, u.value]
|
|
173
|
+
]),
|
|
175
174
|
e.$slots.suffix ? (i(), r("span", {
|
|
176
175
|
key: 1,
|
|
177
|
-
class: o(t
|
|
176
|
+
class: s(o(t).suffix)
|
|
178
177
|
}, [
|
|
179
|
-
|
|
178
|
+
p(e.$slots, "suffix")
|
|
180
179
|
], 2)) : d("", !0),
|
|
181
180
|
e.loading ? (i(), r("span", {
|
|
182
181
|
key: 2,
|
|
183
|
-
class: o(t
|
|
182
|
+
class: s(o(t).spinner)
|
|
184
183
|
}, null, 2)) : d("", !0)
|
|
185
184
|
], 2),
|
|
186
185
|
e.error ? (i(), r("p", {
|
|
187
186
|
key: 1,
|
|
188
|
-
class: o(t
|
|
189
|
-
},
|
|
187
|
+
class: s(o(t).errorText)
|
|
188
|
+
}, g(e.error), 3)) : d("", !0)
|
|
190
189
|
], 2));
|
|
191
190
|
}
|
|
192
191
|
});
|
|
193
192
|
export {
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
me as BaseButton,
|
|
194
|
+
be as BaseInput
|
|
196
195
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.47",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "HuntFlow Developer",
|
|
8
8
|
"nickname": "developer",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"storybook": "^8.4.7",
|
|
75
75
|
"stylelint": "^16.12.0",
|
|
76
76
|
"stylelint-config-recommended": "^14.0.1",
|
|
77
|
-
"typescript": "~5.
|
|
77
|
+
"typescript": "~5.4.5",
|
|
78
78
|
"typescript-eslint": "^8.18.1",
|
|
79
79
|
"vite": "^5.4.10",
|
|
80
80
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|