@huntflow/ui 0.0.47 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/assets/sprite.svg +1 -0
- package/dist/components/base-button/button.vue.d.ts +14 -7
- package/dist/components/base-button/types.d.ts +2 -3
- package/dist/components/base-checkbox/checkbox.vue.d.ts +11 -4
- package/dist/components/base-icon/icon.vue.d.ts +3 -0
- package/dist/components/base-icon/index.d.ts +4 -0
- package/dist/components/base-icon/types.d.ts +5 -0
- package/dist/components/base-input/input.vue.d.ts +12 -5
- package/dist/components/base-loader/index.d.ts +3 -0
- package/dist/components/base-loader/loader.vue.d.ts +6 -0
- package/dist/components/base-loader/types.d.ts +6 -0
- package/dist/components/base-select/select.vue.d.ts +22 -13
- package/dist/components/index.d.ts +5 -1
- package/dist/global.css +1 -1
- package/dist/sprite.svg +1 -0
- package/dist/ui.cjs.js +2 -2
- package/dist/ui.es.js +264 -142
- package/package.json +11 -3
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"),
|
|
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_1syl2_1{position:relative;display:inline-flex;align-items:center;justify-content:center;border:solid 1px;cursor:pointer;font-family:var(--hf-font-family-body);font-style:normal;min-width:-moz-max-content;min-width:max-content;text-decoration:none;color:inherit;gap:4px}._button_1syl2_1:active{background-color:#999}._button_1syl2_1:focus{outline:none}._button_1syl2_1:focus-visible{outline:solid 3px var(--hf-color-button-disable-default)}._button_1syl2_1:is(._disabled_1syl2_1),._button_1syl2_1:is(._disabled_1syl2_1):hover{background:var(--hf-color-button-disable-default);border-color:transparent;color:var(--hf-color-text-light);box-shadow:none;transform:none;cursor:default}._button_1syl2_1._loading_1syl2_1>*:not(._loader_1syl2_1){visibility:hidden}._content_1syl2_1{display:flex;line-height:inherit}._content_1syl2_1:first-child:last-child{width:100%;text-align:center}._loader_1syl2_1{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center}._s_1syl2_2{border-radius:var(--hf-radius-button-s);font-size:var(--hf-font-size-button-s);font-weight:var(--hf-font-weight-button-s);line-height:var(--hf-font-line-height-button-s);padding:var(--hf-padding-button-top-bottom-s) var(--hf-padding-button-left-right-s)}._xs_1syl2_1{font-size:var(--hf-font-size-button-xs);font-weight:var(--hf-font-weight-button-xs);line-height:var(--hf-font-line-height-button-xs);padding:var(--hf-padding-button-top-bottom-xs) var(--hf-padding-button-left-right-xs)}._xs_1syl2_1._square_1syl2_1{border-radius:var(--hf-radius-button-xs)}._xs_1syl2_1._circle_1syl2_1{border-radius:var(--hf-radius-button-circle)}._m_1syl2_1{border-radius:var(--hf-radius-button-m);font-size:var(--hf-font-size-button-m);font-weight:var(--hf-font-weight-button-m);line-height:var(--hf-font-line-height-button-m);padding:var(--hf-padding-button-top-bottom-m) var(--hf-padding-button-left-right-m)}._l_1syl2_1{border-radius:var(--hf-radius-button-l);font-size:var(--hf-font-size-button-l);font-weight:var(--hf-font-weight-button-l);line-height:var(--hf-font-line-height-button-l);padding:var(--hf-padding-button-top-bottom-l) var(--hf-padding-button-left-right-l)}._primary_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-primary-default);border-color:var(--hf-color-button-primary-default)}._primary_1syl2_1:hover{background-color:var(--hf-color-button-primary-hover);border-color:var(--hf-color-button-primary-hover)}._primary_1syl2_1:active{background-color:var(--hf-color-button-primary-active);border-color:var(--hf-color-button-primary-active)}._secondary_1syl2_1{color:var(--hf-color-text-main);background-color:var(--hf-color-button-secondary-fill-default);border-color:var(--hf-color-button-secondary-border-default);box-shadow:0 1px 4px #0505050a}._secondary_1syl2_1:hover{background-color:var(--hf-color-button-secondary-fill-hover);border-color:var(--hf-color-button-secondary-fill-hover)}._secondary_1syl2_1:active{background-color:var(--hf-color-button-secondary-fill-active);border-color:var(--hf-color-button-secondary-fill-active)}._accent_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-accent-default);border-color:var(--hf-color-button-accent-default)}._accent_1syl2_1:hover{background-color:var(--hf-color-button-accent-hover);border-color:var(--hf-color-button-accent-hover)}._accent_1syl2_1:active{background-color:var(--hf-color-button-accent-active);border-color:var(--hf-color-button-accent-active)}._danger_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-danger-default);border-color:var(--hf-color-button-danger-default)}._danger_1syl2_1:hover{background-color:var(--hf-color-button-danger-hover);border-color:var(--hf-color-button-danger-hover)}._danger_1syl2_1:active{background-color:var(--hf-color-button-danger-active);border-color:var(--hf-color-button-danger-active)}._jobsites_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-jobsite-default);border-color:var(--hf-color-button-jobsite-default)}._jobsites_1syl2_1:hover{background-color:var(--hf-color-button-jobsite-hover);border-color:var(--hf-color-button-jobsite-hover)}._jobsites_1syl2_1:active{background-color:var(--hf-color-button-jobsite-active);border-color:var(--hf-color-button-jobsite-active)}._ghost_1syl2_1{color:var(--hf-color-text-main);background-color:transparent;border-color:transparent}._ghost_1syl2_1:hover{background-color:var(--hf-color-button-secondary-fill-hover)}._ghost_1syl2_1:active{background-color:var(--hf-color-button-secondary-fill-active)}._ghost-danger_1syl2_1{color:var(--hf-color-text-main);background-color:transparent;border-color:transparent}._ghost-danger_1syl2_1:hover{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-danger-hover)}._ghost-danger_1syl2_1:active{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-danger-active)}@keyframes _loader-animation_t6bg6_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._loader_t6bg6_10{display:block;color:var(--hf-loader-color);flex:0 0 auto}._circle_t6bg6_15{animation-name:_loader-animation_t6bg6_1;animation-iteration-count:infinite;animation-duration:1s;animation-timing-function:linear}._white_t6bg6_22{--hf-loader-color: var(--hf-color-text-invert)}._black_t6bg6_26{--hf-loader-color: var(--hf-color-text-main)}._s_t6bg6_30{width:18px;height:18px}._m_t6bg6_35{width:28px;height:28px}._l_t6bg6_10{width:56px;height:56px}._spinner_t6bg6_45{display:inline-block;border:1px solid var(--hf-loader-color);border-top-color:transparent;border-left-color:transparent;border-radius:50%}._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)}}._label_jcdiv_1{display:flex;align-items:center;gap:8px;height:20px}._label_jcdiv_1._disabled_jcdiv_7{color:gray;cursor:not-allowed}._label_jcdiv_1 span{margin-top:-5px}._input_jcdiv_17[type=checkbox]{vertical-align:-2px;margin:0;border-radius:4px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;width:16px;height:16px;border:1px solid #25CFE8;transform:translateY(-.075em);display:grid;place-content:center}._input_jcdiv_17._error_jcdiv_30[type=checkbox]{border:1px solid #FF0000}._input_jcdiv_17[type=checkbox]:before{content:"";width:16px;height:16px;clip-path:polygon(0 0,50% 0,100% 0,100% 100%,50% 100%,0 100%);transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;background-color:#25cfe8;border-radius:4px}._input_jcdiv_17[type=checkbox]:checked:before{transform:scale(1)}._input_jcdiv_17[type=checkbox]:focus{outline:2px solid #C4EDFA}._input_jcdiv_17._error_jcdiv_30[type=checkbox]:focus{outline:2px solid #FFD6D6}._input_jcdiv_17[type=checkbox]:disabled{border-color:#00000029;opacity:30%;color:#000;cursor:not-allowed}._text_jcdiv_70{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:15px;line-height:20px}._errorText_jcdiv_76{color:red;font-size:12px}._icon_1p8iz_2{font-style:normal;display:inline-block;vertical-align:middle}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b="_button_1syl2_1",k="_disabled_1syl2_1",g="_loading_1syl2_1",h="_loader_1syl2_1",v="_content_1syl2_1",$="_s_1syl2_2",B="_xs_1syl2_1",C="_square_1syl2_1",E="_circle_1syl2_1",z="_m_1syl2_1",N="_l_1syl2_1",V="_primary_1syl2_1",w="_secondary_1syl2_1",S="_accent_1syl2_1",M="_danger_1syl2_1",j="_jobsites_1syl2_1",T="_ghost_1syl2_1",i={button:b,disabled:k,loading:g,loader:h,content:v,s:$,xs:B,square:C,circle:E,m:z,l:N,primary:V,secondary:w,accent:S,danger:M,jobsites:j,ghost:T,"ghost-danger":"_ghost-danger_1syl2_1"},x="_loader_t6bg6_10",I="_circle_t6bg6_15",D="_white_t6bg6_22",q="_black_t6bg6_26",L="_s_t6bg6_30",O="_m_t6bg6_35",A="_l_t6bg6_10",P="_spinner_t6bg6_45",_={loader:x,circle:I,"loader-animation":"_loader-animation_t6bg6_1",white:D,black:q,s:L,m:O,l:A,spinner:P},f=e.defineComponent({__name:"loader",props:{className:{},size:{default:"l"},color:{default:"black"}},setup(l){const o=l,t=e.computed(()=>[_.loader,_[o.size],_[o.color],_.circle]);return(a,s)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass([e.unref(_).spinner,t.value])},null,2))}}),R=["name","type","disabled"],U=e.defineComponent({name:"BaseButton",__name:"button",props:{size:{default:"m"},className:{},type:{default:"primary"},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(l){const o=l,t={primary:"white",secondary:"black",accent:"white",danger:"white",jobsites:"white",ghost:"black","ghost-danger":"black"},a=e.computed(()=>[i.button,i[o.size],i[o.type],o.circle?[i.circle]:[i.square],{[i.disabled]:o.disabled,[i.loading]:o.loading,[i.active]:o.active,[i.bordered]:o.bordered},o.className]),s=e.computed(()=>t[o.type]||"white");return(r,d)=>(e.openBlock(),e.createElementBlock("button",{name:r.name,class:e.normalizeClass(a.value),type:r.htmlType,disabled:r.disabled||r.loading,onClick:d[0]||(d[0]=p=>r.$emit("click"))},[r.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).loader)},[e.createVNode(e.unref(f),{size:"s",color:s.value},null,8,["color"])],2)):e.createCommentVNode("",!0),r.$slots.before?e.renderSlot(r.$slots,"before",{key:1}):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).content)},[e.renderSlot(r.$slots,"default")],2),r.$slots.after?e.renderSlot(r.$slots,"after",{key:2}):e.createCommentVNode("",!0)],10,R))}}),K="_wrapper_f5n0f_1",F="_label_f5n0f_6",G="_container_f5n0f_13",H="_input_f5n0f_19",J="_error_f5n0f_29",Q="_xs_f5n0f_41",W="_s_f5n0f_46",X="_m_f5n0f_51",Y="_l_f5n0f_6",Z="_xl_f5n0f_61",ee="_disabled_f5n0f_66",se="_errorText_f5n0f_71",oe="_prefix_f5n0f_78",te="_suffix_f5n0f_79",ne="_loading_f5n0f_94",le="_spinner_f5n0f_98",ae="_spin_f5n0f_98",c={wrapper:K,label:F,container:G,input:H,error:J,xs:Q,s:W,m:X,l:Y,xl:Z,disabled:ee,errorText:se,prefix:oe,suffix:te,loading:ne,spinner:le,spin:ae},re=["for"],ce=["id","name","type","disabled","placeholder"],ie=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(l,{emit:o}){const t=e.useModel(l,"value"),a=l,s=o,r=e.computed(()=>[c.input,c[a.size],{[c.disabled]:a.disabled,[c.error]:a.error,[c.loading]:a.loading},a.className]),d=n=>{s("update:value",n.target.value)},p=n=>{n.key==="Enter"&&s("enter")};return(n,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(c).wrapper)},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:n.id,class:e.normalizeClass(e.unref(c).label)},e.toDisplayString(n.label),11,re)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(c).container)},[n.$slots.prefix?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(c).prefix)},[e.renderSlot(n.$slots,"prefix")],2)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:n.id,"onUpdate:modelValue":m[0]||(m[0]=y=>t.value=y),name:n.name,type:n.type,disabled:n.disabled||n.loading,placeholder:n.placeholder,class:e.normalizeClass(r.value),onInput:d,onKeydown:p},null,42,ce),[[e.vModelDynamic,t.value]]),n.$slots.suffix?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(c).suffix)},[e.renderSlot(n.$slots,"suffix")],2)):e.createCommentVNode("",!0),n.loading?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(c).spinner)},null,2)):e.createCommentVNode("",!0)],2),n.error?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(c).errorText)},e.toDisplayString(n.error),3)):e.createCommentVNode("",!0)],2))}}),de="_label_jcdiv_1",ue="_disabled_jcdiv_7",_e="_input_jcdiv_17",pe="_error_jcdiv_30",me="_text_jcdiv_70",fe="_errorText_jcdiv_76",u={label:de,disabled:ue,input:_e,error:pe,text:me,errorText:fe},ye=["for"],be=["id","name","disabled"],ke=e.defineComponent({__name:"checkbox",props:e.mergeModels({id:{},name:{},disabled:{type:Boolean},label:{},error:{},className:{}},{checked:{type:Boolean},checkedModifiers:{}}),emits:["update:checked"],setup(l){const o=e.useModel(l,"checked"),t=l,a=e.computed(()=>[u.label,{[u.disabled]:t.disabled},t.className]);return(s,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",{for:s.id,class:e.normalizeClass(a.value)},[e.withDirectives(e.createElementVNode("input",{id:s.id,"onUpdate:modelValue":r[0]||(r[0]=d=>o.value=d),name:s.name,type:"checkbox",disabled:s.disabled,class:e.normalizeClass([e.unref(u).input,{[e.unref(u).error]:!!t.error}])},null,10,be),[[e.vModelCheckbox,o.value]]),s.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(u).text)},[e.renderSlot(s.$slots,"default")],2)):e.createCommentVNode("",!0)],10,ye),s.error?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(u).errorText)},e.toDisplayString(s.error),3)):e.createCommentVNode("",!0)]))}}),ge=["aria-label","width","height"],he=["xlink:href"],ve=e.defineComponent({__name:"icon",props:{type:{},color:{},block:{type:Boolean}},setup(l){const o=l,t=e.computed(()=>{const s=o.type.match(/(\d+)$/);return s?parseInt(s[1],10):16}),a=e.computed(()=>{const s={};return o.color&&(s.color=o.color),o.block&&(s.display="block"),s});return(s,r)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(s.$style.icon),"aria-label":s.type,style:e.normalizeStyle(a.value),role:"img",width:t.value,height:t.value},[e.createElementVNode("use",{"xlink:href":`../assets/sprite.svg#${s.type}`},null,8,he)],14,ge))}}),$e="_icon_1p8iz_2",Be={icon:$e},Ce=(l,o)=>{const t=l.__vccOpts||l;for(const[a,s]of o)t[a]=s;return t},Ee={$style:Be},ze=Ce(ve,[["__cssModules",Ee]]),Ne=()=>{const l="huntflow-uikit-icons-sprite",o="/src/assets/sprite.svg";if(!document.getElementById(l)){const t=document.createElement("svg");t.style.display="none",t.id=l;const a=document.createElement("defs"),s=document.createElement("use");s.setAttribute("href",`${o}`),a.appendChild(s),t.appendChild(a),document.body.appendChild(t)}};exports.BaseButton=U;exports.BaseCheckbox=ke;exports.BaseIcon=ze;exports.BaseInput=ie;exports.BaseLoader=f;exports.useIcons=Ne;
|
package/dist/ui.es.js
CHANGED
|
@@ -1,35 +1,54 @@
|
|
|
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
|
|
4
|
-
button:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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_1syl2_1{position:relative;display:inline-flex;align-items:center;justify-content:center;border:solid 1px;cursor:pointer;font-family:var(--hf-font-family-body);font-style:normal;min-width:-moz-max-content;min-width:max-content;text-decoration:none;color:inherit;gap:4px}._button_1syl2_1:active{background-color:#999}._button_1syl2_1:focus{outline:none}._button_1syl2_1:focus-visible{outline:solid 3px var(--hf-color-button-disable-default)}._button_1syl2_1:is(._disabled_1syl2_1),._button_1syl2_1:is(._disabled_1syl2_1):hover{background:var(--hf-color-button-disable-default);border-color:transparent;color:var(--hf-color-text-light);box-shadow:none;transform:none;cursor:default}._button_1syl2_1._loading_1syl2_1>*:not(._loader_1syl2_1){visibility:hidden}._content_1syl2_1{display:flex;line-height:inherit}._content_1syl2_1:first-child:last-child{width:100%;text-align:center}._loader_1syl2_1{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center}._s_1syl2_2{border-radius:var(--hf-radius-button-s);font-size:var(--hf-font-size-button-s);font-weight:var(--hf-font-weight-button-s);line-height:var(--hf-font-line-height-button-s);padding:var(--hf-padding-button-top-bottom-s) var(--hf-padding-button-left-right-s)}._xs_1syl2_1{font-size:var(--hf-font-size-button-xs);font-weight:var(--hf-font-weight-button-xs);line-height:var(--hf-font-line-height-button-xs);padding:var(--hf-padding-button-top-bottom-xs) var(--hf-padding-button-left-right-xs)}._xs_1syl2_1._square_1syl2_1{border-radius:var(--hf-radius-button-xs)}._xs_1syl2_1._circle_1syl2_1{border-radius:var(--hf-radius-button-circle)}._m_1syl2_1{border-radius:var(--hf-radius-button-m);font-size:var(--hf-font-size-button-m);font-weight:var(--hf-font-weight-button-m);line-height:var(--hf-font-line-height-button-m);padding:var(--hf-padding-button-top-bottom-m) var(--hf-padding-button-left-right-m)}._l_1syl2_1{border-radius:var(--hf-radius-button-l);font-size:var(--hf-font-size-button-l);font-weight:var(--hf-font-weight-button-l);line-height:var(--hf-font-line-height-button-l);padding:var(--hf-padding-button-top-bottom-l) var(--hf-padding-button-left-right-l)}._primary_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-primary-default);border-color:var(--hf-color-button-primary-default)}._primary_1syl2_1:hover{background-color:var(--hf-color-button-primary-hover);border-color:var(--hf-color-button-primary-hover)}._primary_1syl2_1:active{background-color:var(--hf-color-button-primary-active);border-color:var(--hf-color-button-primary-active)}._secondary_1syl2_1{color:var(--hf-color-text-main);background-color:var(--hf-color-button-secondary-fill-default);border-color:var(--hf-color-button-secondary-border-default);box-shadow:0 1px 4px #0505050a}._secondary_1syl2_1:hover{background-color:var(--hf-color-button-secondary-fill-hover);border-color:var(--hf-color-button-secondary-fill-hover)}._secondary_1syl2_1:active{background-color:var(--hf-color-button-secondary-fill-active);border-color:var(--hf-color-button-secondary-fill-active)}._accent_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-accent-default);border-color:var(--hf-color-button-accent-default)}._accent_1syl2_1:hover{background-color:var(--hf-color-button-accent-hover);border-color:var(--hf-color-button-accent-hover)}._accent_1syl2_1:active{background-color:var(--hf-color-button-accent-active);border-color:var(--hf-color-button-accent-active)}._danger_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-danger-default);border-color:var(--hf-color-button-danger-default)}._danger_1syl2_1:hover{background-color:var(--hf-color-button-danger-hover);border-color:var(--hf-color-button-danger-hover)}._danger_1syl2_1:active{background-color:var(--hf-color-button-danger-active);border-color:var(--hf-color-button-danger-active)}._jobsites_1syl2_1{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-jobsite-default);border-color:var(--hf-color-button-jobsite-default)}._jobsites_1syl2_1:hover{background-color:var(--hf-color-button-jobsite-hover);border-color:var(--hf-color-button-jobsite-hover)}._jobsites_1syl2_1:active{background-color:var(--hf-color-button-jobsite-active);border-color:var(--hf-color-button-jobsite-active)}._ghost_1syl2_1{color:var(--hf-color-text-main);background-color:transparent;border-color:transparent}._ghost_1syl2_1:hover{background-color:var(--hf-color-button-secondary-fill-hover)}._ghost_1syl2_1:active{background-color:var(--hf-color-button-secondary-fill-active)}._ghost-danger_1syl2_1{color:var(--hf-color-text-main);background-color:transparent;border-color:transparent}._ghost-danger_1syl2_1:hover{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-danger-hover)}._ghost-danger_1syl2_1:active{color:var(--hf-color-text-invert);background-color:var(--hf-color-button-danger-active)}@keyframes _loader-animation_t6bg6_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._loader_t6bg6_10{display:block;color:var(--hf-loader-color);flex:0 0 auto}._circle_t6bg6_15{animation-name:_loader-animation_t6bg6_1;animation-iteration-count:infinite;animation-duration:1s;animation-timing-function:linear}._white_t6bg6_22{--hf-loader-color: var(--hf-color-text-invert)}._black_t6bg6_26{--hf-loader-color: var(--hf-color-text-main)}._s_t6bg6_30{width:18px;height:18px}._m_t6bg6_35{width:28px;height:28px}._l_t6bg6_10{width:56px;height:56px}._spinner_t6bg6_45{display:inline-block;border:1px solid var(--hf-loader-color);border-top-color:transparent;border-left-color:transparent;border-radius:50%}._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)}}._label_jcdiv_1{display:flex;align-items:center;gap:8px;height:20px}._label_jcdiv_1._disabled_jcdiv_7{color:gray;cursor:not-allowed}._label_jcdiv_1 span{margin-top:-5px}._input_jcdiv_17[type=checkbox]{vertical-align:-2px;margin:0;border-radius:4px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;width:16px;height:16px;border:1px solid #25CFE8;transform:translateY(-.075em);display:grid;place-content:center}._input_jcdiv_17._error_jcdiv_30[type=checkbox]{border:1px solid #FF0000}._input_jcdiv_17[type=checkbox]:before{content:"";width:16px;height:16px;clip-path:polygon(0 0,50% 0,100% 0,100% 100%,50% 100%,0 100%);transform:scale(0);transform-origin:bottom left;transition:.12s transform ease-in-out;background-color:#25cfe8;border-radius:4px}._input_jcdiv_17[type=checkbox]:checked:before{transform:scale(1)}._input_jcdiv_17[type=checkbox]:focus{outline:2px solid #C4EDFA}._input_jcdiv_17._error_jcdiv_30[type=checkbox]:focus{outline:2px solid #FFD6D6}._input_jcdiv_17[type=checkbox]:disabled{border-color:#00000029;opacity:30%;color:#000;cursor:not-allowed}._text_jcdiv_70{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:15px;line-height:20px}._errorText_jcdiv_76{color:red;font-size:12px}._icon_1p8iz_2{font-style:normal;display:inline-block;vertical-align:middle}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { defineComponent as $, computed as f, openBlock as i, createElementBlock as d, normalizeClass as r, unref as c, createVNode as j, createCommentVNode as u, renderSlot as y, createElementVNode as h, mergeModels as v, useModel as C, toDisplayString as k, withDirectives as z, vModelDynamic as N, vModelCheckbox as T, normalizeStyle as x } from "vue";
|
|
3
|
+
const M = "_button_1syl2_1", I = "_disabled_1syl2_1", L = "_loading_1syl2_1", V = "_loader_1syl2_1", q = "_content_1syl2_1", D = "_s_1syl2_2", O = "_xs_1syl2_1", S = "_square_1syl2_1", A = "_circle_1syl2_1", R = "_m_1syl2_1", U = "_l_1syl2_1", K = "_primary_1syl2_1", P = "_secondary_1syl2_1", F = "_accent_1syl2_1", G = "_danger_1syl2_1", H = "_jobsites_1syl2_1", J = "_ghost_1syl2_1", p = {
|
|
4
|
+
button: M,
|
|
5
|
+
disabled: I,
|
|
6
|
+
loading: L,
|
|
7
|
+
loader: V,
|
|
8
|
+
content: q,
|
|
9
|
+
s: D,
|
|
10
|
+
xs: O,
|
|
11
|
+
square: S,
|
|
12
|
+
circle: A,
|
|
13
|
+
m: R,
|
|
14
|
+
l: U,
|
|
15
|
+
primary: K,
|
|
16
|
+
secondary: P,
|
|
17
|
+
accent: F,
|
|
18
|
+
danger: G,
|
|
19
|
+
jobsites: H,
|
|
20
|
+
ghost: J,
|
|
21
|
+
"ghost-danger": "_ghost-danger_1syl2_1"
|
|
22
|
+
}, Q = "_loader_t6bg6_10", W = "_circle_t6bg6_15", X = "_white_t6bg6_22", Y = "_black_t6bg6_26", Z = "_s_t6bg6_30", ee = "_m_t6bg6_35", se = "_l_t6bg6_10", te = "_spinner_t6bg6_45", g = {
|
|
23
|
+
loader: Q,
|
|
24
|
+
circle: W,
|
|
25
|
+
"loader-animation": "_loader-animation_t6bg6_1",
|
|
26
|
+
white: X,
|
|
27
|
+
black: Y,
|
|
28
|
+
s: Z,
|
|
29
|
+
m: ee,
|
|
30
|
+
l: se,
|
|
31
|
+
spinner: te
|
|
32
|
+
}, oe = /* @__PURE__ */ $({
|
|
33
|
+
__name: "loader",
|
|
34
|
+
props: {
|
|
35
|
+
className: {},
|
|
36
|
+
size: { default: "l" },
|
|
37
|
+
color: { default: "black" }
|
|
38
|
+
},
|
|
39
|
+
setup(n) {
|
|
40
|
+
const s = n, t = f(() => [g.loader, g[s.size], g[s.color], g.circle]);
|
|
41
|
+
return (l, e) => (i(), d("span", {
|
|
42
|
+
class: r([c(g).spinner, t.value])
|
|
43
|
+
}, null, 2));
|
|
44
|
+
}
|
|
45
|
+
}), ne = ["name", "type", "disabled"], Ae = /* @__PURE__ */ $({
|
|
46
|
+
name: "BaseButton",
|
|
27
47
|
__name: "button",
|
|
28
48
|
props: {
|
|
29
49
|
size: { default: "m" },
|
|
30
50
|
className: {},
|
|
31
|
-
type: { default: "
|
|
32
|
-
block: { type: Boolean },
|
|
51
|
+
type: { default: "primary" },
|
|
33
52
|
disabled: { type: Boolean, default: !1 },
|
|
34
53
|
loading: { type: Boolean, default: !1 },
|
|
35
54
|
active: { type: Boolean, default: !1 },
|
|
@@ -39,77 +58,74 @@ const T = "_button_d4llw_1", z = "_primary_d4llw_19", C = "_bordered_d4llw_34",
|
|
|
39
58
|
htmlType: {}
|
|
40
59
|
},
|
|
41
60
|
emits: ["click"],
|
|
42
|
-
setup(
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
setup(n) {
|
|
62
|
+
const s = n, t = {
|
|
63
|
+
primary: "white",
|
|
64
|
+
secondary: "black",
|
|
65
|
+
accent: "white",
|
|
66
|
+
danger: "white",
|
|
67
|
+
jobsites: "white",
|
|
68
|
+
ghost: "black",
|
|
69
|
+
"ghost-danger": "black"
|
|
70
|
+
}, l = f(() => [
|
|
71
|
+
p.button,
|
|
72
|
+
p[s.size],
|
|
73
|
+
p[s.type],
|
|
74
|
+
s.circle ? [p.circle] : [p.square],
|
|
47
75
|
{
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[l.circle]: a.circle,
|
|
53
|
-
[l.bordered]: a.bordered
|
|
76
|
+
[p.disabled]: s.disabled,
|
|
77
|
+
[p.loading]: s.loading,
|
|
78
|
+
[p.active]: s.active,
|
|
79
|
+
[p.bordered]: s.bordered
|
|
54
80
|
},
|
|
55
|
-
|
|
56
|
-
]);
|
|
57
|
-
return (
|
|
58
|
-
name:
|
|
59
|
-
class:
|
|
60
|
-
type:
|
|
61
|
-
disabled:
|
|
62
|
-
onClick:
|
|
81
|
+
s.className
|
|
82
|
+
]), e = f(() => t[s.type] || "white");
|
|
83
|
+
return (a, m) => (i(), d("button", {
|
|
84
|
+
name: a.name,
|
|
85
|
+
class: r(l.value),
|
|
86
|
+
type: a.htmlType,
|
|
87
|
+
disabled: a.disabled || a.loading,
|
|
88
|
+
onClick: m[0] || (m[0] = (B) => a.$emit("click"))
|
|
63
89
|
}, [
|
|
64
|
-
|
|
90
|
+
a.loading ? (i(), d("div", {
|
|
65
91
|
key: 0,
|
|
66
|
-
class:
|
|
92
|
+
class: r(c(p).loader)
|
|
67
93
|
}, [
|
|
68
|
-
c(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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])
|
|
86
|
-
}, [
|
|
87
|
-
p(n.$slots, "rightIcon")
|
|
88
|
-
], 2)) : d("", !0)
|
|
89
|
-
])
|
|
90
|
-
], 10, O));
|
|
94
|
+
j(c(oe), {
|
|
95
|
+
size: "s",
|
|
96
|
+
color: e.value
|
|
97
|
+
}, null, 8, ["color"])
|
|
98
|
+
], 2)) : u("", !0),
|
|
99
|
+
a.$slots.before ? y(a.$slots, "before", { key: 1 }) : u("", !0),
|
|
100
|
+
h("span", {
|
|
101
|
+
class: r(c(p).content)
|
|
102
|
+
}, [
|
|
103
|
+
y(a.$slots, "default")
|
|
104
|
+
], 2),
|
|
105
|
+
a.$slots.after ? y(a.$slots, "after", { key: 2 }) : u("", !0)
|
|
106
|
+
], 10, ne));
|
|
91
107
|
}
|
|
92
|
-
}),
|
|
93
|
-
wrapper:
|
|
94
|
-
label:
|
|
95
|
-
container:
|
|
96
|
-
input:
|
|
97
|
-
error:
|
|
98
|
-
xs:
|
|
99
|
-
s:
|
|
100
|
-
m:
|
|
101
|
-
l:
|
|
102
|
-
xl:
|
|
103
|
-
disabled:
|
|
104
|
-
errorText:
|
|
105
|
-
prefix:
|
|
106
|
-
suffix:
|
|
107
|
-
loading:
|
|
108
|
-
spinner:
|
|
109
|
-
spin:
|
|
110
|
-
},
|
|
108
|
+
}), le = "_wrapper_f5n0f_1", ae = "_label_f5n0f_6", re = "_container_f5n0f_13", ce = "_input_f5n0f_19", ie = "_error_f5n0f_29", de = "_xs_f5n0f_41", _e = "_s_f5n0f_46", pe = "_m_f5n0f_51", ue = "_l_f5n0f_6", fe = "_xl_f5n0f_61", me = "_disabled_f5n0f_66", be = "_errorText_f5n0f_71", ye = "_prefix_f5n0f_78", he = "_suffix_f5n0f_79", ge = "_loading_f5n0f_94", $e = "_spinner_f5n0f_98", ve = "_spin_f5n0f_98", _ = {
|
|
109
|
+
wrapper: le,
|
|
110
|
+
label: ae,
|
|
111
|
+
container: re,
|
|
112
|
+
input: ce,
|
|
113
|
+
error: ie,
|
|
114
|
+
xs: de,
|
|
115
|
+
s: _e,
|
|
116
|
+
m: pe,
|
|
117
|
+
l: ue,
|
|
118
|
+
xl: fe,
|
|
119
|
+
disabled: me,
|
|
120
|
+
errorText: be,
|
|
121
|
+
prefix: ye,
|
|
122
|
+
suffix: he,
|
|
123
|
+
loading: ge,
|
|
124
|
+
spinner: $e,
|
|
125
|
+
spin: ve
|
|
126
|
+
}, ke = ["for"], Be = ["id", "name", "type", "disabled", "placeholder"], Re = /* @__PURE__ */ $({
|
|
111
127
|
__name: "input",
|
|
112
|
-
props: /* @__PURE__ */
|
|
128
|
+
props: /* @__PURE__ */ v({
|
|
113
129
|
value: {},
|
|
114
130
|
type: { default: "text" },
|
|
115
131
|
id: {},
|
|
@@ -125,71 +141,177 @@ const T = "_button_d4llw_1", z = "_primary_d4llw_19", C = "_bordered_d4llw_34",
|
|
|
125
141
|
value: {},
|
|
126
142
|
valueModifiers: {}
|
|
127
143
|
}),
|
|
128
|
-
emits: /* @__PURE__ */
|
|
129
|
-
setup(
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
144
|
+
emits: /* @__PURE__ */ v(["update:value", "enter"], ["update:value"]),
|
|
145
|
+
setup(n, { emit: s }) {
|
|
146
|
+
const t = C(n, "value"), l = n, e = s, a = f(() => [
|
|
147
|
+
_.input,
|
|
148
|
+
_[l.size],
|
|
133
149
|
{
|
|
134
|
-
[
|
|
135
|
-
[
|
|
136
|
-
[
|
|
150
|
+
[_.disabled]: l.disabled,
|
|
151
|
+
[_.error]: l.error,
|
|
152
|
+
[_.loading]: l.loading
|
|
137
153
|
},
|
|
138
|
-
|
|
139
|
-
]),
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
154
|
+
l.className
|
|
155
|
+
]), m = (o) => {
|
|
156
|
+
e("update:value", o.target.value);
|
|
157
|
+
}, B = (o) => {
|
|
158
|
+
o.key === "Enter" && e("enter");
|
|
143
159
|
};
|
|
144
|
-
return (
|
|
145
|
-
class:
|
|
160
|
+
return (o, w) => (i(), d("div", {
|
|
161
|
+
class: r(c(_).wrapper)
|
|
146
162
|
}, [
|
|
147
|
-
|
|
163
|
+
o.label ? (i(), d("label", {
|
|
148
164
|
key: 0,
|
|
149
|
-
for:
|
|
150
|
-
class:
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
class:
|
|
165
|
+
for: o.id,
|
|
166
|
+
class: r(c(_).label)
|
|
167
|
+
}, k(o.label), 11, ke)) : u("", !0),
|
|
168
|
+
h("div", {
|
|
169
|
+
class: r(c(_).container)
|
|
154
170
|
}, [
|
|
155
|
-
|
|
171
|
+
o.$slots.prefix ? (i(), d("span", {
|
|
156
172
|
key: 0,
|
|
157
|
-
class:
|
|
173
|
+
class: r(c(_).prefix)
|
|
158
174
|
}, [
|
|
159
|
-
|
|
160
|
-
], 2)) :
|
|
161
|
-
|
|
162
|
-
id:
|
|
163
|
-
"onUpdate:modelValue":
|
|
164
|
-
name:
|
|
165
|
-
type:
|
|
166
|
-
disabled:
|
|
167
|
-
placeholder:
|
|
168
|
-
class:
|
|
169
|
-
onInput:
|
|
170
|
-
onKeydown:
|
|
171
|
-
}, null, 42,
|
|
172
|
-
[N,
|
|
175
|
+
y(o.$slots, "prefix")
|
|
176
|
+
], 2)) : u("", !0),
|
|
177
|
+
z(h("input", {
|
|
178
|
+
id: o.id,
|
|
179
|
+
"onUpdate:modelValue": w[0] || (w[0] = (E) => t.value = E),
|
|
180
|
+
name: o.name,
|
|
181
|
+
type: o.type,
|
|
182
|
+
disabled: o.disabled || o.loading,
|
|
183
|
+
placeholder: o.placeholder,
|
|
184
|
+
class: r(a.value),
|
|
185
|
+
onInput: m,
|
|
186
|
+
onKeydown: B
|
|
187
|
+
}, null, 42, Be), [
|
|
188
|
+
[N, t.value]
|
|
173
189
|
]),
|
|
174
|
-
|
|
190
|
+
o.$slots.suffix ? (i(), d("span", {
|
|
175
191
|
key: 1,
|
|
176
|
-
class:
|
|
192
|
+
class: r(c(_).suffix)
|
|
177
193
|
}, [
|
|
178
|
-
|
|
179
|
-
], 2)) :
|
|
180
|
-
|
|
194
|
+
y(o.$slots, "suffix")
|
|
195
|
+
], 2)) : u("", !0),
|
|
196
|
+
o.loading ? (i(), d("span", {
|
|
181
197
|
key: 2,
|
|
182
|
-
class:
|
|
183
|
-
}, null, 2)) :
|
|
198
|
+
class: r(c(_).spinner)
|
|
199
|
+
}, null, 2)) : u("", !0)
|
|
184
200
|
], 2),
|
|
185
|
-
|
|
201
|
+
o.error ? (i(), d("p", {
|
|
186
202
|
key: 1,
|
|
187
|
-
class:
|
|
188
|
-
},
|
|
203
|
+
class: r(c(_).errorText)
|
|
204
|
+
}, k(o.error), 3)) : u("", !0)
|
|
189
205
|
], 2));
|
|
190
206
|
}
|
|
191
|
-
})
|
|
207
|
+
}), we = "_label_jcdiv_1", Ce = "_disabled_jcdiv_7", ze = "_input_jcdiv_17", Ee = "_error_jcdiv_30", je = "_text_jcdiv_70", Ne = "_errorText_jcdiv_76", b = {
|
|
208
|
+
label: we,
|
|
209
|
+
disabled: Ce,
|
|
210
|
+
input: ze,
|
|
211
|
+
error: Ee,
|
|
212
|
+
text: je,
|
|
213
|
+
errorText: Ne
|
|
214
|
+
}, Te = ["for"], xe = ["id", "name", "disabled"], Ue = /* @__PURE__ */ $({
|
|
215
|
+
__name: "checkbox",
|
|
216
|
+
props: /* @__PURE__ */ v({
|
|
217
|
+
id: {},
|
|
218
|
+
name: {},
|
|
219
|
+
disabled: { type: Boolean },
|
|
220
|
+
label: {},
|
|
221
|
+
error: {},
|
|
222
|
+
className: {}
|
|
223
|
+
}, {
|
|
224
|
+
checked: { type: Boolean },
|
|
225
|
+
checkedModifiers: {}
|
|
226
|
+
}),
|
|
227
|
+
emits: ["update:checked"],
|
|
228
|
+
setup(n) {
|
|
229
|
+
const s = C(n, "checked"), t = n, l = f(() => [
|
|
230
|
+
b.label,
|
|
231
|
+
{
|
|
232
|
+
[b.disabled]: t.disabled
|
|
233
|
+
},
|
|
234
|
+
t.className
|
|
235
|
+
]);
|
|
236
|
+
return (e, a) => (i(), d("div", null, [
|
|
237
|
+
h("label", {
|
|
238
|
+
for: e.id,
|
|
239
|
+
class: r(l.value)
|
|
240
|
+
}, [
|
|
241
|
+
z(h("input", {
|
|
242
|
+
id: e.id,
|
|
243
|
+
"onUpdate:modelValue": a[0] || (a[0] = (m) => s.value = m),
|
|
244
|
+
name: e.name,
|
|
245
|
+
type: "checkbox",
|
|
246
|
+
disabled: e.disabled,
|
|
247
|
+
class: r([c(b).input, { [c(b).error]: !!t.error }])
|
|
248
|
+
}, null, 10, xe), [
|
|
249
|
+
[T, s.value]
|
|
250
|
+
]),
|
|
251
|
+
e.$slots.default ? (i(), d("span", {
|
|
252
|
+
key: 0,
|
|
253
|
+
class: r(c(b).text)
|
|
254
|
+
}, [
|
|
255
|
+
y(e.$slots, "default")
|
|
256
|
+
], 2)) : u("", !0)
|
|
257
|
+
], 10, Te),
|
|
258
|
+
e.error ? (i(), d("div", {
|
|
259
|
+
key: 0,
|
|
260
|
+
class: r(c(b).errorText)
|
|
261
|
+
}, k(e.error), 3)) : u("", !0)
|
|
262
|
+
]));
|
|
263
|
+
}
|
|
264
|
+
}), Me = ["aria-label", "width", "height"], Ie = ["xlink:href"], Le = /* @__PURE__ */ $({
|
|
265
|
+
__name: "icon",
|
|
266
|
+
props: {
|
|
267
|
+
type: {},
|
|
268
|
+
color: {},
|
|
269
|
+
block: { type: Boolean }
|
|
270
|
+
},
|
|
271
|
+
setup(n) {
|
|
272
|
+
const s = n, t = f(() => {
|
|
273
|
+
const e = s.type.match(/(\d+)$/);
|
|
274
|
+
return e ? parseInt(e[1], 10) : 16;
|
|
275
|
+
}), l = f(() => {
|
|
276
|
+
const e = {};
|
|
277
|
+
return s.color && (e.color = s.color), s.block && (e.display = "block"), e;
|
|
278
|
+
});
|
|
279
|
+
return (e, a) => (i(), d("svg", {
|
|
280
|
+
class: r(e.$style.icon),
|
|
281
|
+
"aria-label": e.type,
|
|
282
|
+
style: x(l.value),
|
|
283
|
+
role: "img",
|
|
284
|
+
width: t.value,
|
|
285
|
+
height: t.value
|
|
286
|
+
}, [
|
|
287
|
+
h("use", {
|
|
288
|
+
"xlink:href": `../assets/sprite.svg#${e.type}`
|
|
289
|
+
}, null, 8, Ie)
|
|
290
|
+
], 14, Me));
|
|
291
|
+
}
|
|
292
|
+
}), Ve = "_icon_1p8iz_2", qe = {
|
|
293
|
+
icon: Ve
|
|
294
|
+
}, De = (n, s) => {
|
|
295
|
+
const t = n.__vccOpts || n;
|
|
296
|
+
for (const [l, e] of s)
|
|
297
|
+
t[l] = e;
|
|
298
|
+
return t;
|
|
299
|
+
}, Oe = {
|
|
300
|
+
$style: qe
|
|
301
|
+
}, Ke = /* @__PURE__ */ De(Le, [["__cssModules", Oe]]), Pe = () => {
|
|
302
|
+
const n = "huntflow-uikit-icons-sprite", s = "/src/assets/sprite.svg";
|
|
303
|
+
if (!document.getElementById(n)) {
|
|
304
|
+
const t = document.createElement("svg");
|
|
305
|
+
t.style.display = "none", t.id = n;
|
|
306
|
+
const l = document.createElement("defs"), e = document.createElement("use");
|
|
307
|
+
e.setAttribute("href", `${s}`), l.appendChild(e), t.appendChild(l), document.body.appendChild(t);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
192
310
|
export {
|
|
193
|
-
|
|
194
|
-
|
|
311
|
+
Ae as BaseButton,
|
|
312
|
+
Ue as BaseCheckbox,
|
|
313
|
+
Ke as BaseIcon,
|
|
314
|
+
Re as BaseInput,
|
|
315
|
+
oe as BaseLoader,
|
|
316
|
+
Pe as useIcons
|
|
195
317
|
};
|
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.49",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "HuntFlow Developer",
|
|
8
8
|
"nickname": "developer",
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"preview": "vite preview",
|
|
23
23
|
"storybook": "storybook dev -p 6006",
|
|
24
24
|
"build-storybook": "storybook build",
|
|
25
|
-
"lint": "eslint './src/**/*.{js,vue,ts}' --quiet"
|
|
25
|
+
"lint": "eslint './src/**/*.{js,vue,ts}' --quiet",
|
|
26
|
+
"icons": "npx tsx utils/figma-icons.ts",
|
|
27
|
+
"variables": "npx tsx utils/figma-variables.ts"
|
|
26
28
|
},
|
|
27
29
|
"publishConfig": {
|
|
28
30
|
"access": "public"
|
|
@@ -61,7 +63,9 @@
|
|
|
61
63
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
62
64
|
"@vue/eslint-config-typescript": "^14.1.4",
|
|
63
65
|
"autoprefixer": "^10.4.20",
|
|
66
|
+
"axios": "^1.7.9",
|
|
64
67
|
"css-has-pseudo": "^7.0.2",
|
|
68
|
+
"dotenv": "^16.4.7",
|
|
65
69
|
"eslint": "^9.17.0",
|
|
66
70
|
"eslint-config-prettier": "^9.1.0",
|
|
67
71
|
"eslint-plugin-jest": "^28.9.0",
|
|
@@ -72,14 +76,18 @@
|
|
|
72
76
|
"postcss-nesting": "^13.0.1",
|
|
73
77
|
"prettier": "^3.4.2",
|
|
74
78
|
"storybook": "^8.4.7",
|
|
79
|
+
"storybook-addon-pseudo-states": "^4.0.2",
|
|
75
80
|
"stylelint": "^16.12.0",
|
|
76
81
|
"stylelint-config-recommended": "^14.0.1",
|
|
77
|
-
"
|
|
82
|
+
"tsx": "^4.19.2",
|
|
83
|
+
"typescript": "~5.6.2",
|
|
78
84
|
"typescript-eslint": "^8.18.1",
|
|
79
85
|
"vite": "^5.4.10",
|
|
80
86
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
81
87
|
"vite-plugin-dts": "^4.3.0",
|
|
82
88
|
"vite-plugin-eslint2": "^5.0.3",
|
|
89
|
+
"vite-plugin-static-copy": "^2.2.0",
|
|
90
|
+
"vite-svg-sprite-wrapper": "^1.4.1",
|
|
83
91
|
"vue-tsc": "^2.1.8"
|
|
84
92
|
}
|
|
85
93
|
}
|