@huntflow/ui 0.0.48 → 0.0.51

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/ui.es.js CHANGED
@@ -1,36 +1,53 @@
1
- (function(){"use strict";var e;try{if(typeof document<"u"){var o=document.createElement("style");o.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,o.appendChild(document.createTextNode('._button_1ey6t_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_1ey6t_1 ._contentWrapper_1ey6t_13{display:flex;align-items:center}._button_1ey6t_1:focus{outline:none}._primary_1ey6t_23{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_1ey6t_23:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_1ey6t_23:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_1ey6t_23._bordered_1ey6t_38{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_1ey6t_44{color:var(--hf-button-danger-text-color);border:1px solid var(--hf-button-danger-background-color);background-color:var(--hf-button-danger-background-color)}._danger_1ey6t_44:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_1ey6t_44:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_1ey6t_44._bordered_1ey6t_38{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_1ey6t_64{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_1ey6t_64:hover{background-color:var(--hf-button-default-hover-background-color)}._default_1ey6t_64:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._link_1ey6t_78{background-color:#fff;color:#007bff;text-decoration:underline}._block_1ey6t_84{width:100%}._disabled_1ey6t_88{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._disabled_1ey6t_88:hover{background-color:inherit}._loading_1ey6t_98{cursor:wait}._loading_1ey6t_98 ._content_1ey6t_13{visibility:hidden}._circle_1ey6t_106{border-radius:100%;padding:0!important}._bordered_1ey6t_38{border:1px solid currentColor}._icon_1ey6t_115{display:flex;align-items:center}._iconLeft_1ey6t_120{margin-right:8px}._iconRight_1ey6t_124{margin-left:8px}._xs_1ey6t_128{padding:4px 8px;font-size:12px}._s_1ey6t_133{padding:6px 12px;font-size:14px;line-height:20px}._m_1ey6t_139{padding:6px 12px;font-size:15px;line-height:24px}._l_1ey6t_78{padding:16px 32px;font-size:18px}._xl_1ey6t_150{padding:20px 40px;font-size:20px}._loadingWrapper_1ey6t_155{width:100%;height:100%;position:absolute;left:0;right:0;display:flex;align-items:center;justify-content:center}._loadingWrapper_1ey6t_155 ._spinner_1ey6t_166{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_1ey6t_166 .6s linear infinite}@keyframes _spin_1ey6t_166{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)}}._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(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { defineComponent as v, computed as b, openBlock as c, createElementBlock as d, normalizeClass as o, unref as a, createElementVNode as u, createCommentVNode as _, renderSlot as m, mergeModels as h, useModel as B, toDisplayString as g, withDirectives as x, vModelDynamic as E, vModelCheckbox as T, normalizeStyle as w } from "vue";
3
- const z = "_button_1ey6t_1", M = "_contentWrapper_1ey6t_13", N = "_primary_1ey6t_23", W = "_bordered_1ey6t_38", j = "_danger_1ey6t_44", L = "_link_1ey6t_78", R = "_block_1ey6t_84", S = "_disabled_1ey6t_88", V = "_loading_1ey6t_98", D = "_content_1ey6t_13", U = "_circle_1ey6t_106", A = "_icon_1ey6t_115", K = "_iconLeft_1ey6t_120", O = "_iconRight_1ey6t_124", P = "_xs_1ey6t_128", q = "_s_1ey6t_133", F = "_m_1ey6t_139", G = "_l_1ey6t_78", H = "_xl_1ey6t_150", J = "_loadingWrapper_1ey6t_155", Q = "_spinner_1ey6t_166", X = "_spin_1ey6t_166", r = {
4
- button: z,
5
- contentWrapper: M,
6
- primary: N,
7
- bordered: W,
8
- danger: j,
9
- default: "_default_1ey6t_64",
10
- link: L,
11
- block: R,
12
- disabled: S,
13
- loading: V,
14
- content: D,
15
- circle: U,
16
- icon: A,
17
- iconLeft: K,
18
- iconRight: O,
19
- xs: P,
20
- s: q,
21
- m: F,
22
- l: G,
23
- xl: H,
24
- loadingWrapper: J,
25
- spinner: Q,
26
- spin: X
27
- }, Y = ["name", "type", "disabled"], je = /* @__PURE__ */ v({
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:var(--hf-gap-xs)}._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_6qo53_1{margin-bottom:var(--hf-gap-xs)}._input_6qo53_5{border-radius:var(--hf-radius-input-default);border:var(--hf-border-xs) solid var(--hf-color-field-border-default);background:var(--hf-color-field-background-default);padding:var(--hf-padding-input-top-bottom-default) var(--hf-padding-input-left-right-default);width:100%;box-sizing:border-box;color:var(--hf-color-field-text-default);font-size:var(--hf-font-size-field-text);font-weight:var(--hf-font-weight-field-text);line-height:var(--hf-font-line-height-field-text)}._input_6qo53_5:active{border-color:var(--hf-color-field-border-focus)}._input_6qo53_5:focus{border-color:var(--hf-color-field-border-focus);outline:solid 3px var(--hf-color-field-border-focus-visible)}._input_6qo53_5:disabled{outline:none;border-color:var(--hf-color-field-text-disable);background:var(--hf-color-field-background-disable);color:var(--hf-color-field-text-disable)}._error_6qo53_35,._error_6qo53_35:active{border-color:var(--hf-color-field-border-error)}._error_6qo53_35:focus{border-color:var(--hf-color-field-border-error);outline:solid 3px var(--hf-color-field-border-error-focus-visible)}._description_6qo53_47{margin-top:var(--hf-gap-xs);font-size:var(--hf-font-size-field-error);font-weight:var(--hf-font-weight-field-description);line-height:var(--hf-font-line-height-field-description)}._description_6qo53_47 a{text-decoration:underline}._descriptionText_6qo53_58{color:var(--hf-color-field-text-description)}._errorText_6qo53_62{color:var(--hf-color-text-danger)}._label_12dq3_1{display:flex;flex-direction:row;gap:var(--hf-gap-xs);font-style:normal;flex:1;margin-bottom:var(--hf-gap-xs)}._header_12dq3_10{display:block;color:var(--hf-color-text-main);font-size:var(--hf-font-size-text-h4);font-weight:var(--hf-font-weight-text-h4);line-height:var(--hf-font-line-height-text-h4)}._headerWrapper_12dq3_18{flex-grow:1;gap:var(--hf-gap-xs);display:flex;flex-direction:column}._title_12dq3_25{display:block;color:var(--hf-color-text-main);font-size:var(--hf-font-size-label-title);font-weight:var(--hf-font-weight-label-title);line-height:var(--hf-font-line-height-label-title)}._subTitleRow_12dq3_33{display:flex;justify-content:space-between;font-size:var(--hf-font-size-label-subtitle);color:var(--hf-color-text-semilight);font-weight:var(--hf-font-weight-label-subtitle)}._subTitle_12dq3_33{line-height:var(--hf-font-line-height-label-subtitle)}._link_12dq3_45{overflow:hidden;text-overflow:ellipsis;font-size:var(--hf-font-size-label-title);line-height:var(--hf-font-line-height-label-subtitle);color:var(--hf-color-text-semilight);font-weight:var(--hf-font-weight-label-subtitle);margin-left:auto;align-self:flex-end;height:20px}._link_12dq3_45 a{text-decoration:none;color:var(--hf-color-text-semilight)}._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 v, computed as p, openBlock as r, createElementBlock as i, normalizeClass as l, unref as o, createVNode as V, createCommentVNode as _, renderSlot as y, createElementVNode as $, mergeModels as B, useModel as C, createBlock as R, withCtx as T, createTextVNode as w, toDisplayString as g, withDirectives as L, vModelDynamic as D, vModelCheckbox as E, normalizeStyle as H } from "vue";
3
+ const I = "_button_1syl2_1", O = "_disabled_1syl2_1", W = "_loading_1syl2_1", A = "_loader_1syl2_1", U = "_content_1syl2_1", F = "_s_1syl2_2", G = "_xs_1syl2_1", K = "_square_1syl2_1", J = "_circle_1syl2_1", P = "_m_1syl2_1", Q = "_l_1syl2_1", X = "_primary_1syl2_1", Y = "_secondary_1syl2_1", Z = "_accent_1syl2_1", x = "_danger_1syl2_1", ee = "_jobsites_1syl2_1", se = "_ghost_1syl2_1", u = {
4
+ button: I,
5
+ disabled: O,
6
+ loading: W,
7
+ loader: A,
8
+ content: U,
9
+ s: F,
10
+ xs: G,
11
+ square: K,
12
+ circle: J,
13
+ m: P,
14
+ l: Q,
15
+ primary: X,
16
+ secondary: Y,
17
+ accent: Z,
18
+ danger: x,
19
+ jobsites: ee,
20
+ ghost: se,
21
+ "ghost-danger": "_ghost-danger_1syl2_1"
22
+ }, te = "_loader_t6bg6_10", le = "_circle_t6bg6_15", oe = "_white_t6bg6_22", ne = "_black_t6bg6_26", re = "_s_t6bg6_30", ae = "_m_t6bg6_35", ie = "_l_t6bg6_10", ce = "_spinner_t6bg6_45", f = {
23
+ loader: te,
24
+ circle: le,
25
+ "loader-animation": "_loader-animation_t6bg6_1",
26
+ white: oe,
27
+ black: ne,
28
+ s: re,
29
+ m: ae,
30
+ l: ie,
31
+ spinner: ce
32
+ }, de = /* @__PURE__ */ v({
33
+ __name: "loader",
34
+ props: {
35
+ className: {},
36
+ size: { default: "l" },
37
+ color: { default: "black" }
38
+ },
39
+ setup(a) {
40
+ const e = a, n = p(() => [f.loader, f[e.size], f[e.color], f.circle]);
41
+ return (t, s) => (r(), i("span", {
42
+ class: l([o(f).spinner, n.value])
43
+ }, null, 2));
44
+ }
45
+ }), _e = ["name", "type", "disabled"], Ge = /* @__PURE__ */ v({
28
46
  __name: "button",
29
47
  props: {
30
48
  size: { default: "m" },
31
49
  className: {},
32
- type: { default: "default" },
33
- block: { type: Boolean },
50
+ type: { default: "primary" },
34
51
  disabled: { type: Boolean, default: !1 },
35
52
  loading: { type: Boolean, default: !1 },
36
53
  active: { type: Boolean, default: !1 },
@@ -40,168 +57,212 @@ const z = "_button_1ey6t_1", M = "_contentWrapper_1ey6t_13", N = "_primary_1ey6t
40
57
  htmlType: {}
41
58
  },
42
59
  emits: ["click"],
43
- setup(i) {
44
- const t = i, l = b(() => [
45
- r.button,
46
- r[t.size],
47
- r[t.type],
60
+ setup(a) {
61
+ const e = a, n = {
62
+ primary: "white",
63
+ secondary: "black",
64
+ accent: "white",
65
+ danger: "white",
66
+ jobsites: "white",
67
+ ghost: "black",
68
+ "ghost-danger": "black"
69
+ }, t = p(() => [
70
+ u.button,
71
+ u[e.size],
72
+ u[e.type],
73
+ e.circle ? [u.circle] : [u.square],
48
74
  {
49
- [r.block]: t.block,
50
- [r.disabled]: t.disabled,
51
- [r.loading]: t.loading,
52
- [r.active]: t.active,
53
- [r.circle]: t.circle,
54
- [r.bordered]: t.bordered
75
+ [u.disabled]: e.disabled,
76
+ [u.loading]: e.loading,
77
+ [u.active]: e.active,
78
+ [u.bordered]: e.bordered
55
79
  },
56
- t.className
57
- ]);
58
- return (s, e) => (c(), d("button", {
59
- name: s.name,
60
- class: o(l.value),
61
- type: s.htmlType,
62
- disabled: s.disabled,
63
- onClick: e[0] || (e[0] = (f) => s.$emit("click"))
80
+ e.className
81
+ ]), s = p(() => n[e.type] || "white");
82
+ return (c, h) => (r(), i("button", {
83
+ name: c.name,
84
+ class: l(t.value),
85
+ type: c.htmlType,
86
+ disabled: c.disabled || c.loading,
87
+ onClick: h[0] || (h[0] = (q) => c.$emit("click"))
64
88
  }, [
65
- s.loading ? (c(), d("div", {
89
+ c.loading ? (r(), i("div", {
66
90
  key: 0,
67
- class: o(a(r).loadingWrapper)
91
+ class: l(o(u).loader)
68
92
  }, [
69
- u("span", {
70
- class: o(a(r).spinner)
71
- }, null, 2)
93
+ V(o(de), {
94
+ size: "s",
95
+ color: s.value
96
+ }, null, 8, ["color"])
72
97
  ], 2)) : _("", !0),
73
- u("div", {
74
- class: o(a(r).contentWrapper)
98
+ c.$slots.before ? y(c.$slots, "before", { key: 1 }) : _("", !0),
99
+ $("span", {
100
+ class: l(o(u).content)
75
101
  }, [
76
- s.$slots.leftIcon ? (c(), d("span", {
102
+ y(c.$slots, "default")
103
+ ], 2),
104
+ c.$slots.after ? y(c.$slots, "after", { key: 2 }) : _("", !0)
105
+ ], 10, _e));
106
+ }
107
+ }), ue = "_wrapper_6qo53_1", pe = "_input_6qo53_5", be = "_error_6qo53_35", ye = "_description_6qo53_47", me = "_descriptionText_6qo53_58", he = "_errorText_6qo53_62", b = {
108
+ wrapper: ue,
109
+ input: pe,
110
+ error: be,
111
+ description: ye,
112
+ descriptionText: me,
113
+ errorText: he
114
+ }, ke = "_label_12dq3_1", ve = "_header_12dq3_10", fe = "_headerWrapper_12dq3_18", ge = "_title_12dq3_25", $e = "_subTitleRow_12dq3_33", Te = "_subTitle_12dq3_33", we = "_link_12dq3_45", m = {
115
+ label: ke,
116
+ header: ve,
117
+ headerWrapper: fe,
118
+ title: ge,
119
+ subTitleRow: $e,
120
+ subTitle: Te,
121
+ link: we
122
+ }, Be = /* @__PURE__ */ v({
123
+ __name: "label",
124
+ emits: ["click"],
125
+ setup(a) {
126
+ return (e, n) => (r(), i("label", {
127
+ class: l(o(m).label)
128
+ }, [
129
+ e.$slots.header || e.$slots.title ? (r(), i("span", {
130
+ key: 0,
131
+ class: l(o(m).headerWrapper)
132
+ }, [
133
+ e.$slots.header ? (r(), i("span", {
77
134
  key: 0,
78
- class: o([a(r).icon, a(r).iconLeft])
135
+ class: l(o(m).header)
79
136
  }, [
80
- m(s.$slots, "leftIcon")
137
+ y(e.$slots, "header")
81
138
  ], 2)) : _("", !0),
82
- u("span", {
83
- class: o(a(r).content)
84
- }, [
85
- m(s.$slots, "default")
86
- ], 2),
87
- s.$slots.rightIcon ? (c(), d("span", {
139
+ e.$slots.default ? (r(), i("span", {
88
140
  key: 1,
89
- class: o([a(r).icon, a(r).iconRight])
141
+ class: l(o(m).title)
90
142
  }, [
91
- m(s.$slots, "rightIcon")
143
+ y(e.$slots, "default")
144
+ ], 2)) : _("", !0),
145
+ e.$slots.subTitle || e.$slots.link ? (r(), i("span", {
146
+ key: 2,
147
+ class: l(o(m).subTitleRow)
148
+ }, [
149
+ e.$slots.subTitle ? (r(), i("span", {
150
+ key: 0,
151
+ class: l(o(m).subTitle)
152
+ }, [
153
+ y(e.$slots, "subTitle")
154
+ ], 2)) : _("", !0)
92
155
  ], 2)) : _("", !0)
93
- ], 2)
94
- ], 10, Y));
156
+ ], 2)) : _("", !0),
157
+ e.$slots.link ? (r(), i("span", {
158
+ key: 1,
159
+ class: l(o(m).link),
160
+ onClick: n[0] || (n[0] = (t) => e.$emit("click"))
161
+ }, [
162
+ y(e.$slots, "link")
163
+ ], 2)) : _("", !0)
164
+ ], 2));
95
165
  }
96
- }), Z = "_wrapper_f5n0f_1", ee = "_label_f5n0f_6", se = "_container_f5n0f_13", te = "_input_f5n0f_19", ne = "_error_f5n0f_29", oe = "_xs_f5n0f_41", le = "_s_f5n0f_46", ae = "_m_f5n0f_51", re = "_l_f5n0f_6", ie = "_xl_f5n0f_61", ce = "_disabled_f5n0f_66", de = "_errorText_f5n0f_71", pe = "_prefix_f5n0f_78", _e = "_suffix_f5n0f_79", ue = "_loading_f5n0f_94", fe = "_spinner_f5n0f_98", ye = "_spin_f5n0f_98", p = {
97
- wrapper: Z,
98
- label: ee,
99
- container: se,
100
- input: te,
101
- error: ne,
102
- xs: oe,
103
- s: le,
104
- m: ae,
105
- l: re,
106
- xl: ie,
107
- disabled: ce,
108
- errorText: de,
109
- prefix: pe,
110
- suffix: _e,
111
- loading: ue,
112
- spinner: fe,
113
- spin: ye
114
- }, me = ["for"], be = ["id", "name", "type", "disabled", "placeholder"], Le = /* @__PURE__ */ v({
166
+ }), qe = ["id", "name", "type", "disabled", "placeholder"], Me = ["innerHTML"], Ce = ["innerHTML"], Ke = /* @__PURE__ */ v({
115
167
  __name: "input",
116
- props: /* @__PURE__ */ h({
168
+ props: /* @__PURE__ */ B({
117
169
  value: {},
118
170
  type: { default: "text" },
119
171
  id: {},
120
172
  name: {},
121
173
  disabled: { type: Boolean },
122
174
  label: {},
175
+ header: {},
176
+ subTitle: {},
177
+ link: {},
123
178
  placeholder: {},
124
179
  loading: { type: Boolean },
125
180
  error: {},
126
- size: { default: "m" },
181
+ description: {},
127
182
  className: {}
128
183
  }, {
129
184
  value: {},
130
185
  valueModifiers: {}
131
186
  }),
132
- emits: /* @__PURE__ */ h(["update:value", "enter"], ["update:value"]),
133
- setup(i, { emit: t }) {
134
- const l = B(i, "value"), s = i, e = t, f = b(() => [
135
- p.input,
136
- p[s.size],
187
+ emits: /* @__PURE__ */ B(["update:value", "enter", "click-link"], ["update:value"]),
188
+ setup(a, { emit: e }) {
189
+ const n = C(a, "value"), t = a, s = e, c = p(() => [
190
+ b.input,
137
191
  {
138
- [p.disabled]: s.disabled,
139
- [p.error]: s.error,
140
- [p.loading]: s.loading
192
+ [b.disabled]: t.disabled,
193
+ [b.error]: t.error,
194
+ [b.loading]: t.loading
141
195
  },
142
- s.className
143
- ]), $ = (n) => {
144
- e("update:value", n.target.value);
145
- }, C = (n) => {
146
- n.key === "Enter" && e("enter");
196
+ t.className
197
+ ]), h = p(() => t.header || t.label || t.subTitle || t.link), q = p(() => t.description || t.error), j = (d) => {
198
+ s("update:value", d.target.value);
199
+ }, N = (d) => {
200
+ d.key === "Enter" && s("enter");
201
+ }, z = () => {
202
+ s("click-link");
147
203
  };
148
- return (n, k) => (c(), d("div", {
149
- class: o(a(p).wrapper)
204
+ return (d, M) => (r(), i("div", {
205
+ class: l(o(b).wrapper)
150
206
  }, [
151
- n.label ? (c(), d("label", {
207
+ h.value ? (r(), R(o(Be), {
152
208
  key: 0,
153
- for: n.id,
154
- class: o(a(p).label)
155
- }, g(n.label), 11, me)) : _("", !0),
156
- u("div", {
157
- class: o(a(p).container)
209
+ for: d.id,
210
+ onClick: z
211
+ }, {
212
+ header: T(() => [
213
+ w(g(t.header), 1)
214
+ ]),
215
+ subTitle: T(() => [
216
+ w(g(t.subTitle), 1)
217
+ ]),
218
+ link: T(() => [
219
+ w(g(t.link), 1)
220
+ ]),
221
+ default: T(() => [
222
+ w(" " + g(t.label) + " ", 1)
223
+ ]),
224
+ _: 1
225
+ }, 8, ["for"])) : _("", !0),
226
+ L($("input", {
227
+ id: d.id,
228
+ "onUpdate:modelValue": M[0] || (M[0] = (S) => n.value = S),
229
+ name: d.name,
230
+ type: d.type,
231
+ disabled: d.disabled || d.loading,
232
+ placeholder: d.placeholder,
233
+ class: l(c.value),
234
+ onInput: j,
235
+ onKeydown: N
236
+ }, null, 42, qe), [
237
+ [D, n.value]
238
+ ]),
239
+ q.value ? (r(), i("div", {
240
+ key: 1,
241
+ class: l(o(b).description)
158
242
  }, [
159
- n.$slots.prefix ? (c(), d("span", {
243
+ d.error ? (r(), i("div", {
160
244
  key: 0,
161
- class: o(a(p).prefix)
162
- }, [
163
- m(n.$slots, "prefix")
164
- ], 2)) : _("", !0),
165
- x(u("input", {
166
- id: n.id,
167
- "onUpdate:modelValue": k[0] || (k[0] = (I) => l.value = I),
168
- name: n.name,
169
- type: n.type,
170
- disabled: n.disabled || n.loading,
171
- placeholder: n.placeholder,
172
- class: o(f.value),
173
- onInput: $,
174
- onKeydown: C
175
- }, null, 42, be), [
176
- [E, l.value]
177
- ]),
178
- n.$slots.suffix ? (c(), d("span", {
245
+ class: l(o(b).errorText),
246
+ innerHTML: d.error
247
+ }, null, 10, Me)) : _("", !0),
248
+ d.description ? (r(), i("div", {
179
249
  key: 1,
180
- class: o(a(p).suffix)
181
- }, [
182
- m(n.$slots, "suffix")
183
- ], 2)) : _("", !0),
184
- n.loading ? (c(), d("span", {
185
- key: 2,
186
- class: o(a(p).spinner)
187
- }, null, 2)) : _("", !0)
188
- ], 2),
189
- n.error ? (c(), d("p", {
190
- key: 1,
191
- class: o(a(p).errorText)
192
- }, g(n.error), 3)) : _("", !0)
250
+ class: l(o(b).descriptionText),
251
+ innerHTML: d.description
252
+ }, null, 10, Ce)) : _("", !0)
253
+ ], 2)) : _("", !0)
193
254
  ], 2));
194
255
  }
195
- }), ve = "_label_jcdiv_1", $e = "_disabled_jcdiv_7", he = "_input_jcdiv_17", ge = "_error_jcdiv_30", ke = "_text_jcdiv_70", Be = "_errorText_jcdiv_76", y = {
196
- label: ve,
197
- disabled: $e,
198
- input: he,
199
- error: ge,
200
- text: ke,
201
- errorText: Be
202
- }, xe = ["for"], Ce = ["id", "name", "disabled"], Re = /* @__PURE__ */ v({
256
+ }), Le = "_label_jcdiv_1", je = "_disabled_jcdiv_7", Ne = "_input_jcdiv_17", ze = "_error_jcdiv_30", Se = "_text_jcdiv_70", Ve = "_errorText_jcdiv_76", k = {
257
+ label: Le,
258
+ disabled: je,
259
+ input: Ne,
260
+ error: ze,
261
+ text: Se,
262
+ errorText: Ve
263
+ }, Re = ["for"], De = ["id", "name", "disabled"], Je = /* @__PURE__ */ v({
203
264
  __name: "checkbox",
204
- props: /* @__PURE__ */ h({
265
+ props: /* @__PURE__ */ B({
205
266
  id: {},
206
267
  name: {},
207
268
  disabled: { type: Boolean },
@@ -213,92 +274,98 @@ const z = "_button_1ey6t_1", M = "_contentWrapper_1ey6t_13", N = "_primary_1ey6t
213
274
  checkedModifiers: {}
214
275
  }),
215
276
  emits: ["update:checked"],
216
- setup(i) {
217
- const t = B(i, "checked"), l = i, s = b(() => [
218
- y.label,
277
+ setup(a) {
278
+ const e = C(a, "checked"), n = a, t = p(() => [
279
+ k.label,
219
280
  {
220
- [y.disabled]: l.disabled
281
+ [k.disabled]: n.disabled
221
282
  },
222
- l.className
283
+ n.className
223
284
  ]);
224
- return (e, f) => (c(), d("div", null, [
225
- u("label", {
226
- for: e.id,
227
- class: o(s.value)
285
+ return (s, c) => (r(), i("div", null, [
286
+ $("label", {
287
+ for: s.id,
288
+ class: l(t.value)
228
289
  }, [
229
- x(u("input", {
230
- id: e.id,
231
- "onUpdate:modelValue": f[0] || (f[0] = ($) => t.value = $),
232
- name: e.name,
290
+ L($("input", {
291
+ id: s.id,
292
+ "onUpdate:modelValue": c[0] || (c[0] = (h) => e.value = h),
293
+ name: s.name,
233
294
  type: "checkbox",
234
- disabled: e.disabled,
235
- class: o([a(y).input, { [a(y).error]: !!l.error }])
236
- }, null, 10, Ce), [
237
- [T, t.value]
295
+ disabled: s.disabled,
296
+ class: l([o(k).input, { [o(k).error]: !!n.error }])
297
+ }, null, 10, De), [
298
+ [E, e.value]
238
299
  ]),
239
- e.$slots.default ? (c(), d("span", {
300
+ s.$slots.default ? (r(), i("span", {
240
301
  key: 0,
241
- class: o(a(y).text)
302
+ class: l(o(k).text)
242
303
  }, [
243
- m(e.$slots, "default")
304
+ y(s.$slots, "default")
244
305
  ], 2)) : _("", !0)
245
- ], 10, xe),
246
- e.error ? (c(), d("div", {
306
+ ], 10, Re),
307
+ s.error ? (r(), i("div", {
247
308
  key: 0,
248
- class: o(a(y).errorText)
249
- }, g(e.error), 3)) : _("", !0)
309
+ class: l(o(k).errorText)
310
+ }, g(s.error), 3)) : _("", !0)
250
311
  ]));
251
312
  }
252
- }), Ie = ["aria-label", "width", "height"], Ee = ["xlink:href"], Te = /* @__PURE__ */ v({
313
+ }), Ee = ["aria-label", "width", "height"], He = ["xlink:href"], Ie = /* @__PURE__ */ v({
253
314
  __name: "icon",
254
315
  props: {
255
316
  type: {},
256
317
  color: {},
257
318
  block: { type: Boolean }
258
319
  },
259
- setup(i) {
260
- const t = i, l = b(() => {
261
- const e = t.type.match(/(\d+)$/);
262
- return e ? parseInt(e[1], 10) : 16;
263
- }), s = b(() => {
264
- const e = {};
265
- return t.color && (e.color = t.color), t.block && (e.display = "block"), e;
320
+ setup(a) {
321
+ const e = a, n = p(() => {
322
+ const s = e.type.match(/(\d+)$/);
323
+ return s ? parseInt(s[1], 10) : 16;
324
+ }), t = p(() => {
325
+ const s = {};
326
+ return e.color && (s.color = e.color), e.block && (s.display = "block"), s;
266
327
  });
267
- return (e, f) => (c(), d("svg", {
268
- class: o(e.$style.icon),
269
- "aria-label": e.type,
270
- style: w(s.value),
328
+ return (s, c) => (r(), i("svg", {
329
+ class: l(s.$style.icon),
330
+ "aria-label": s.type,
331
+ style: H(t.value),
271
332
  role: "img",
272
- width: l.value,
273
- height: l.value
333
+ width: n.value,
334
+ height: n.value
274
335
  }, [
275
- u("use", {
276
- "xlink:href": `../assets/sprite.svg#${e.type}`
277
- }, null, 8, Ee)
278
- ], 14, Ie));
279
- }
280
- }), we = "_icon_1p8iz_2", ze = {
281
- icon: we
282
- }, Me = (i, t) => {
283
- const l = i.__vccOpts || i;
284
- for (const [s, e] of t)
285
- l[s] = e;
286
- return l;
287
- }, Ne = {
288
- $style: ze
289
- }, Se = /* @__PURE__ */ Me(Te, [["__cssModules", Ne]]), Ve = () => {
290
- const i = "huntflow-uikit-icons-sprite", t = "/src/assets/sprite.svg";
291
- if (!document.getElementById(i)) {
292
- const l = document.createElement("svg");
293
- l.style.display = "none", l.id = i;
294
- const s = document.createElement("defs"), e = document.createElement("use");
295
- e.setAttribute("href", `${t}`), s.appendChild(e), l.appendChild(s), document.body.appendChild(l);
336
+ $("use", {
337
+ "xlink:href": `../assets/sprite.svg#${s.type}`
338
+ }, null, 8, He)
339
+ ], 14, Ee));
296
340
  }
341
+ }), Oe = "_icon_1p8iz_2", We = {
342
+ icon: Oe
343
+ }, Ae = (a, e) => {
344
+ const n = a.__vccOpts || a;
345
+ for (const [t, s] of e)
346
+ n[t] = s;
347
+ return n;
348
+ }, Ue = {
349
+ $style: We
350
+ }, Pe = /* @__PURE__ */ Ae(Ie, [["__cssModules", Ue]]), Qe = async () => {
351
+ if (!(typeof document > "u") && !document.getElementById("__svg-sprite__"))
352
+ try {
353
+ const e = `
354
+ <svg id="__svg-sprite__" xmlns="http://www.w3.org/2000/svg" style="display: none;">
355
+ ${(await import("./sprite-CP6qWMMh.js")).default}
356
+ </svg>
357
+ `;
358
+ document.body.insertAdjacentHTML("afterbegin", e);
359
+ } catch (a) {
360
+ console.error("Failed to load SVG sprite:", a);
361
+ }
297
362
  };
298
363
  export {
299
- je as BaseButton,
300
- Re as BaseCheckbox,
301
- Se as BaseIcon,
302
- Le as BaseInput,
303
- Ve as useIcons
364
+ Ge as BaseButton,
365
+ Je as BaseCheckbox,
366
+ Pe as BaseIcon,
367
+ Ke as BaseInput,
368
+ Be as BaseLabel,
369
+ de as BaseLoader,
370
+ Qe as injectSvgSprite
304
371
  };