@huntflow/ui 0.0.38 → 0.0.39

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.
@@ -14,22 +14,6 @@ export type BaseButtonProps = {
14
14
  bordered?: boolean;
15
15
  htmlType?: BaseButtonHTMLType;
16
16
  };
17
- export declare enum BaseButtonSize {
18
- XS = "xs",
19
- S = "s",
20
- M = "m",
21
- L = "l",
22
- XL = "xl"
23
- }
24
- export declare enum BaseButtonType {
25
- PRIMARY = "primary",
26
- DANGER = "danger",
27
- DEFAULT = "default",
28
- TEXT = "text",
29
- LINK = "link"
30
- }
31
- export declare enum BaseButtonHTMLType {
32
- SUBMIT = "submit",
33
- BUTTON = "button",
34
- RESET = "reset"
35
- }
17
+ export type BaseButtonSize = 'xs' | 's' | 'm' | 'l' | 'xl';
18
+ export type BaseButtonType = 'primary' | 'danger' | 'default';
19
+ export type BaseButtonHTMLType = 'button' | 'submit' | 'reset';
@@ -11,17 +11,5 @@ export type BaseInputProps = {
11
11
  size?: BaseInputSize;
12
12
  className?: string;
13
13
  };
14
- export declare enum BaseInputSize {
15
- XS = "xs",
16
- S = "s",
17
- M = "m",
18
- L = "l",
19
- XL = "xl"
20
- }
21
- export declare enum BaseInputType {
22
- TEXT = "text",
23
- PASSWORD = "password",
24
- EMAIL = "email",
25
- TEL = "tel",
26
- SEARCH = "search"
27
- }
14
+ export type BaseInputSize = 'xs' | 's' | 'm' | 'l' | 'xl';
15
+ export type BaseInputType = 'text' | 'password' | 'email' | 'tel' | 'search';
package/dist/ui.es.js CHANGED
@@ -1,30 +1,28 @@
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_den84_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_den84_1:focus{outline:none}._primary_den84_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_den84_19:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_den84_19:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_den84_19._bordered_den84_34{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_den84_40{color:var(--hf-button-danger-text-color);background-color:var(--hf-button-danger-background-color)}._danger_den84_40:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_den84_40:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_den84_40._bordered_den84_34{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_den84_59{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_den84_59:hover{background-color:var(--hf-button-default-hover-background-color)}._default_den84_59:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._text_den84_73{background-color:#fff;color:#000}._link_den84_78{background-color:#fff;color:#007bff;text-decoration:underline}._block_den84_84{width:100%}._disabled_den84_88{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._loading_den84_94{cursor:wait}._circle_den84_98{border-radius:100%;padding:0!important}._bordered_den84_34{border:1px solid currentColor}._icon_den84_107{display:flex;align-items:center}._iconLeft_den84_112{margin-right:8px}._iconRight_den84_116{margin-left:8px}._xs_den84_120{padding:4px 8px;font-size:12px}._s_den84_125{padding:6px 12px;font-size:14px;line-height:20px}._m_den84_131{padding:6px 12px;font-size:15px;line-height:24px}._l_den84_78{padding:16px 32px;font-size:18px}._xl_den84_142{padding:20px 40px;font-size:20px}._spinner_den84_147{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_den84_147 .6s linear infinite}@keyframes _spin_den84_147{to{transform:rotate(360deg)}}._wrapper_hww12_1{display:flex;flex-direction:column}._label_hww12_6{margin-bottom:4px;font-size:14px;color:#333}._container_hww12_12{position:relative;display:flex;align-items:center}._input_hww12_18{flex:1;padding:8px 12px;font-size:14px;border:1px solid #ced4da;border-radius:12px;outline:none;transition:border-color .3s}._xs_hww12_28{padding:4px 8px;font-size:12px}._s_hww12_33{padding:6px 10px;font-size:13px}._m_hww12_38{padding:8px 12px;font-size:14px}._l_hww12_6{padding:10px 14px;font-size:16px}._xl_hww12_48{padding:12px 16px;font-size:18px}input:focus{border-color:#007bff}._disabled_hww12_57{background-color:#e9ecef;cursor:not-allowed}._error_hww12_62{border-color:#dc3545}._error_hww12_62{margin-top:4px;font-size:12px;color:#dc3545}._prefix_hww12_72,._suffix_hww12_73{position:absolute;display:flex;align-items:center;color:#6c757d}._prefix_hww12_72{left:8px}._suffix_hww12_73{right:8px}._loading_hww12_88{cursor:wait}._spinner_hww12_92{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_hww12_92 .6s linear infinite}@keyframes _spin_hww12_92{to{transform:rotate(360deg)}}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as w, computed as h, openBlock as l, createElementBlock as t, normalizeClass as s, Fragment as S, renderSlot as f, createCommentVNode as r, toDisplayString as g, createElementVNode as m } from "vue";
3
- const E = "_button_den84_1", L = "_primary_den84_19", q = "_bordered_den84_34", C = "_danger_den84_40", I = "_text_den84_73", N = "_link_den84_78", R = "_block_den84_84", A = "_disabled_den84_88", M = "_loading_den84_94", X = "_circle_den84_98", D = "_icon_den84_107", O = "_iconLeft_den84_112", T = "_iconRight_den84_116", U = "_xs_den84_120", K = "_s_den84_125", F = "_m_den84_131", j = "_l_den84_78", P = "_xl_den84_142", V = "_spinner_den84_147", G = "_spin_den84_147", o = {
4
- button: E,
5
- primary: L,
6
- bordered: q,
7
- danger: C,
2
+ import { defineComponent as b, computed as g, openBlock as t, createElementBlock as l, normalizeClass as s, Fragment as w, renderSlot as p, createCommentVNode as a, toDisplayString as _, createElementVNode as y } from "vue";
3
+ const h = "_button_den84_1", $ = "_primary_den84_19", k = "_bordered_den84_34", v = "_danger_den84_40", B = "_text_den84_73", S = "_link_den84_78", I = "_block_den84_84", q = "_disabled_den84_88", C = "_loading_den84_94", L = "_circle_den84_98", N = "_icon_den84_107", z = "_iconLeft_den84_112", K = "_iconRight_den84_116", R = "_xs_den84_120", E = "_s_den84_125", O = "_m_den84_131", j = "_l_den84_78", T = "_xl_den84_142", V = "_spinner_den84_147", D = "_spin_den84_147", o = {
4
+ button: h,
5
+ primary: $,
6
+ bordered: k,
7
+ danger: v,
8
8
  default: "_default_den84_59",
9
- text: I,
10
- link: N,
11
- block: R,
12
- disabled: A,
13
- loading: M,
14
- circle: X,
15
- icon: D,
16
- iconLeft: O,
17
- iconRight: T,
18
- xs: U,
19
- s: K,
20
- m: F,
9
+ text: B,
10
+ link: S,
11
+ block: I,
12
+ disabled: q,
13
+ loading: C,
14
+ circle: L,
15
+ icon: N,
16
+ iconLeft: z,
17
+ iconRight: K,
18
+ xs: R,
19
+ s: E,
20
+ m: O,
21
21
  l: j,
22
- xl: P,
22
+ xl: T,
23
23
  spinner: V,
24
- spin: G
25
- };
26
- var p = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.M = "m", e.L = "l", e.XL = "xl", e))(p || {}), y = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.DANGER = "danger", e.DEFAULT = "default", e.TEXT = "text", e.LINK = "link", e))(y || {}), k = /* @__PURE__ */ ((e) => (e.SUBMIT = "submit", e.BUTTON = "button", e.RESET = "reset", e))(k || {});
27
- const W = w({
24
+ spin: D
25
+ }, F = b({
28
26
  name: "BaseButton",
29
27
  props: {
30
28
  name: {
@@ -34,7 +32,7 @@ const W = w({
34
32
  },
35
33
  size: {
36
34
  type: String,
37
- default: p.M
35
+ default: "m"
38
36
  },
39
37
  className: {
40
38
  type: String,
@@ -43,7 +41,7 @@ const W = w({
43
41
  },
44
42
  type: {
45
43
  type: String,
46
- default: y.DEFAULT
44
+ default: "default"
47
45
  },
48
46
  leftIcon: {
49
47
  type: Object,
@@ -81,16 +79,16 @@ const W = w({
81
79
  },
82
80
  htmlType: {
83
81
  type: String,
84
- default: k.BUTTON
82
+ default: "button"
85
83
  }
86
84
  },
87
85
  emits: ["click"],
88
86
  setup(e, { emit: n }) {
89
87
  return {
90
- classList: h(() => [
88
+ classList: g(() => [
91
89
  o.button,
92
- o[e.size || p.M],
93
- o[e.type || y.DEFAULT],
90
+ o[e.size || "m"],
91
+ o[e.type || "default"],
94
92
  {
95
93
  [o.block]: e.block,
96
94
  [o.disabled]: e.disabled || e.loading,
@@ -107,65 +105,63 @@ const W = w({
107
105
  styles: o
108
106
  };
109
107
  }
110
- }), $ = (e, n) => {
111
- const a = e.__vccOpts || e;
112
- for (const [i, c] of n)
113
- a[i] = c;
114
- return a;
115
- }, Y = ["name", "type", "disabled"];
116
- function J(e, n, a, i, c, _) {
117
- return l(), t("button", {
108
+ }), m = (e, n) => {
109
+ const i = e.__vccOpts || e;
110
+ for (const [d, u] of n)
111
+ i[d] = u;
112
+ return i;
113
+ }, A = ["name", "type", "disabled"];
114
+ function G(e, n, i, d, u, f) {
115
+ return t(), l("button", {
118
116
  name: e.name,
119
117
  class: s(e.classList),
120
118
  type: e.htmlType,
121
119
  disabled: e.disabled || e.loading,
122
- onClick: n[0] || (n[0] = (...u) => e.handleClick && e.handleClick(...u))
120
+ onClick: n[0] || (n[0] = (...c) => e.handleClick && e.handleClick(...c))
123
121
  }, [
124
- e.loading ? (l(), t("span", {
122
+ e.loading ? (t(), l("span", {
125
123
  key: 0,
126
124
  class: s(e.styles.spinner)
127
- }, null, 2)) : (l(), t(S, { key: 1 }, [
128
- e.leftIcon ? (l(), t("span", {
125
+ }, null, 2)) : (t(), l(w, { key: 1 }, [
126
+ e.leftIcon ? (t(), l("span", {
129
127
  key: 0,
130
128
  class: s([e.styles.icon, e.styles.iconLeft])
131
129
  }, [
132
- f(e.$slots, "leftIcon", { icon: e.leftIcon })
133
- ], 2)) : r("", !0),
134
- e.$slots.default ? (l(), t("span", {
130
+ p(e.$slots, "leftIcon", { icon: e.leftIcon })
131
+ ], 2)) : a("", !0),
132
+ e.$slots.default ? (t(), l("span", {
135
133
  key: 1,
136
134
  class: s(e.styles.content)
137
135
  }, [
138
- f(e.$slots, "default")
139
- ], 2)) : r("", !0),
140
- e.rightIcon ? (l(), t("span", {
136
+ p(e.$slots, "default")
137
+ ], 2)) : a("", !0),
138
+ e.rightIcon ? (t(), l("span", {
141
139
  key: 2,
142
140
  class: s([e.styles.icon, e.styles.iconRight])
143
141
  }, [
144
- f(e.$slots, "rightIcon", { icon: e.rightIcon })
145
- ], 2)) : r("", !0)
142
+ p(e.$slots, "rightIcon", { icon: e.rightIcon })
143
+ ], 2)) : a("", !0)
146
144
  ], 64))
147
- ], 10, Y);
145
+ ], 10, A);
148
146
  }
149
- const ye = /* @__PURE__ */ $(W, [["render", J]]), Q = "_wrapper_hww12_1", Z = "_label_hww12_6", H = "_container_hww12_12", z = "_input_hww12_18", B = "_xs_hww12_28", x = "_s_hww12_33", ee = "_m_hww12_38", ne = "_l_hww12_6", se = "_xl_hww12_48", le = "_disabled_hww12_57", te = "_error_hww12_62", oe = "_prefix_hww12_72", re = "_suffix_hww12_73", ae = "_loading_hww12_88", ie = "_spinner_hww12_92", de = "_spin_hww12_92", d = {
150
- wrapper: Q,
151
- label: Z,
152
- container: H,
153
- input: z,
154
- xs: B,
155
- s: x,
156
- m: ee,
157
- l: ne,
158
- xl: se,
159
- disabled: le,
160
- error: te,
161
- prefix: oe,
162
- suffix: re,
163
- loading: ae,
164
- spinner: ie,
165
- spin: de
166
- };
167
- var b = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.M = "m", e.L = "l", e.XL = "xl", e))(b || {}), v = /* @__PURE__ */ ((e) => (e.TEXT = "text", e.PASSWORD = "password", e.EMAIL = "email", e.TEL = "tel", e.SEARCH = "search", e))(v || {});
168
- const ce = w({
147
+ const ue = /* @__PURE__ */ m(F, [["render", G]]), H = "_wrapper_hww12_1", J = "_label_hww12_6", M = "_container_hww12_12", P = "_input_hww12_18", Q = "_xs_hww12_28", U = "_s_hww12_33", W = "_m_hww12_38", X = "_l_hww12_6", Y = "_xl_hww12_48", Z = "_disabled_hww12_57", x = "_error_hww12_62", ee = "_prefix_hww12_72", ne = "_suffix_hww12_73", se = "_loading_hww12_88", te = "_spinner_hww12_92", le = "_spin_hww12_92", r = {
148
+ wrapper: H,
149
+ label: J,
150
+ container: M,
151
+ input: P,
152
+ xs: Q,
153
+ s: U,
154
+ m: W,
155
+ l: X,
156
+ xl: Y,
157
+ disabled: Z,
158
+ error: x,
159
+ prefix: ee,
160
+ suffix: ne,
161
+ loading: se,
162
+ spinner: te,
163
+ spin: le
164
+ }, oe = b({
169
165
  name: "BaseInput",
170
166
  props: {
171
167
  value: {
@@ -174,7 +170,7 @@ const ce = w({
174
170
  },
175
171
  type: {
176
172
  type: String,
177
- default: v.TEXT
173
+ default: "text"
178
174
  },
179
175
  id: {
180
176
  type: String,
@@ -211,7 +207,7 @@ const ce = w({
211
207
  },
212
208
  size: {
213
209
  type: String,
214
- default: b.M
210
+ default: "m"
215
211
  },
216
212
  className: {
217
213
  type: String,
@@ -221,47 +217,47 @@ const ce = w({
221
217
  },
222
218
  emits: ["update:value", "enter"],
223
219
  setup(e, { emit: n }) {
224
- const a = () => {
220
+ const i = () => {
225
221
  n("update:value");
226
- }, i = (_) => {
227
- _.key === "Enter" && n("enter");
228
- }, c = h(() => [
229
- d.input,
230
- d[e.size || b.M],
222
+ }, d = (f) => {
223
+ f.key === "Enter" && n("enter");
224
+ }, u = g(() => [
225
+ r.input,
226
+ r[e.size || "m"],
231
227
  {
232
- [d.disabled]: e.disabled,
233
- [d.error]: e.error,
234
- [d.loading]: e.loading
228
+ [r.disabled]: e.disabled,
229
+ [r.error]: e.error,
230
+ [r.loading]: e.loading
235
231
  },
236
232
  e.className
237
233
  ]);
238
234
  return {
239
- styles: d,
240
- onInput: a,
241
- onKeydown: i,
242
- inputClass: c
235
+ styles: r,
236
+ onInput: i,
237
+ onKeydown: d,
238
+ inputClass: u
243
239
  };
244
240
  }
245
- }), ue = ["for"], fe = ["id", "value", "name", "type", "disabled", "placeholder"];
246
- function _e(e, n, a, i, c, _) {
247
- return l(), t("div", {
241
+ }), ae = ["for"], ie = ["id", "value", "name", "type", "disabled", "placeholder"];
242
+ function de(e, n, i, d, u, f) {
243
+ return t(), l("div", {
248
244
  class: s(e.styles.wrapper)
249
245
  }, [
250
- e.label ? (l(), t("label", {
246
+ e.label ? (t(), l("label", {
251
247
  key: 0,
252
248
  for: e.id,
253
249
  class: s(e.styles.label)
254
- }, g(e.label), 11, ue)) : r("", !0),
255
- m("div", {
250
+ }, _(e.label), 11, ae)) : a("", !0),
251
+ y("div", {
256
252
  class: s(e.styles.container)
257
253
  }, [
258
- e.$slots.prefix ? (l(), t("span", {
254
+ e.$slots.prefix ? (t(), l("span", {
259
255
  key: 0,
260
256
  class: s(e.styles.prefix)
261
257
  }, [
262
- f(e.$slots, "prefix")
263
- ], 2)) : r("", !0),
264
- m("input", {
258
+ p(e.$slots, "prefix")
259
+ ], 2)) : a("", !0),
260
+ y("input", {
265
261
  id: e.id,
266
262
  value: e.value,
267
263
  name: e.name,
@@ -269,28 +265,28 @@ function _e(e, n, a, i, c, _) {
269
265
  disabled: e.disabled || e.loading,
270
266
  placeholder: e.placeholder,
271
267
  class: s(e.inputClass),
272
- onInput: n[0] || (n[0] = (...u) => e.onInput && e.onInput(...u)),
273
- onKeydown: n[1] || (n[1] = (...u) => e.onKeydown && e.onKeydown(...u))
274
- }, null, 42, fe),
275
- e.$slots.suffix ? (l(), t("span", {
268
+ onInput: n[0] || (n[0] = (...c) => e.onInput && e.onInput(...c)),
269
+ onKeydown: n[1] || (n[1] = (...c) => e.onKeydown && e.onKeydown(...c))
270
+ }, null, 42, ie),
271
+ e.$slots.suffix ? (t(), l("span", {
276
272
  key: 1,
277
273
  class: s(e.styles.suffix)
278
274
  }, [
279
- f(e.$slots, "suffix")
280
- ], 2)) : r("", !0),
281
- e.loading ? (l(), t("span", {
275
+ p(e.$slots, "suffix")
276
+ ], 2)) : a("", !0),
277
+ e.loading ? (t(), l("span", {
282
278
  key: 2,
283
279
  class: s(e.styles.spinner)
284
- }, null, 2)) : r("", !0)
280
+ }, null, 2)) : a("", !0)
285
281
  ], 2),
286
- e.error ? (l(), t("p", {
282
+ e.error ? (t(), l("p", {
287
283
  key: 1,
288
284
  class: s(e.styles.error)
289
- }, g(e.error), 3)) : r("", !0)
285
+ }, _(e.error), 3)) : a("", !0)
290
286
  ], 2);
291
287
  }
292
- const be = /* @__PURE__ */ $(ce, [["render", _e]]);
288
+ const ce = /* @__PURE__ */ m(oe, [["render", de]]);
293
289
  export {
294
- ye as BaseButton,
295
- be as BaseInput
290
+ ue as BaseButton,
291
+ ce as BaseInput
296
292
  };
package/dist/ui.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t.ui={},t.Vue))})(this,function(t,o){"use strict";var b=document.createElement("style");b.textContent=`._button_den84_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_den84_1:focus{outline:none}._primary_den84_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_den84_19:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_den84_19:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_den84_19._bordered_den84_34{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_den84_40{color:var(--hf-button-danger-text-color);background-color:var(--hf-button-danger-background-color)}._danger_den84_40:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_den84_40:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_den84_40._bordered_den84_34{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_den84_59{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_den84_59:hover{background-color:var(--hf-button-default-hover-background-color)}._default_den84_59:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._text_den84_73{background-color:#fff;color:#000}._link_den84_78{background-color:#fff;color:#007bff;text-decoration:underline}._block_den84_84{width:100%}._disabled_den84_88{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._loading_den84_94{cursor:wait}._circle_den84_98{border-radius:100%;padding:0!important}._bordered_den84_34{border:1px solid currentColor}._icon_den84_107{display:flex;align-items:center}._iconLeft_den84_112{margin-right:8px}._iconRight_den84_116{margin-left:8px}._xs_den84_120{padding:4px 8px;font-size:12px}._s_den84_125{padding:6px 12px;font-size:14px;line-height:20px}._m_den84_131{padding:6px 12px;font-size:15px;line-height:24px}._l_den84_78{padding:16px 32px;font-size:18px}._xl_den84_142{padding:20px 40px;font-size:20px}._spinner_den84_147{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_den84_147 .6s linear infinite}@keyframes _spin_den84_147{to{transform:rotate(360deg)}}._wrapper_hww12_1{display:flex;flex-direction:column}._label_hww12_6{margin-bottom:4px;font-size:14px;color:#333}._container_hww12_12{position:relative;display:flex;align-items:center}._input_hww12_18{flex:1;padding:8px 12px;font-size:14px;border:1px solid #ced4da;border-radius:12px;outline:none;transition:border-color .3s}._xs_hww12_28{padding:4px 8px;font-size:12px}._s_hww12_33{padding:6px 10px;font-size:13px}._m_hww12_38{padding:8px 12px;font-size:14px}._l_hww12_6{padding:10px 14px;font-size:16px}._xl_hww12_48{padding:12px 16px;font-size:18px}input:focus{border-color:#007bff}._disabled_hww12_57{background-color:#e9ecef;cursor:not-allowed}._error_hww12_62{border-color:#dc3545}._error_hww12_62{margin-top:4px;font-size:12px;color:#dc3545}._prefix_hww12_72,._suffix_hww12_73{position:absolute;display:flex;align-items:center;color:#6c757d}._prefix_hww12_72{left:8px}._suffix_hww12_73{right:8px}._loading_hww12_88{cursor:wait}._spinner_hww12_92{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_hww12_92 .6s linear infinite}@keyframes _spin_hww12_92{to{transform:rotate(360deg)}}
2
- /*$vite$:1*/`,document.head.appendChild(b);const r={button:"_button_den84_1",primary:"_primary_den84_19",bordered:"_bordered_den84_34",danger:"_danger_den84_40",default:"_default_den84_59",text:"_text_den84_73",link:"_link_den84_78",block:"_block_den84_84",disabled:"_disabled_den84_88",loading:"_loading_den84_94",circle:"_circle_den84_98",icon:"_icon_den84_107",iconLeft:"_iconLeft_den84_112",iconRight:"_iconRight_den84_116",xs:"_xs_den84_120",s:"_s_den84_125",m:"_m_den84_131",l:"_l_den84_78",xl:"_xl_den84_142",spinner:"_spinner_den84_147",spin:"_spin_den84_147"};var c=(e=>(e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e))(c||{}),_=(e=>(e.PRIMARY="primary",e.DANGER="danger",e.DEFAULT="default",e.TEXT="text",e.LINK="link",e))(_||{}),u=(e=>(e.SUBMIT="submit",e.BUTTON="button",e.RESET="reset",e))(u||{});const h=o.defineComponent({name:"BaseButton",props:{name:{type:String,required:!1,default:void 0},size:{type:String,default:c.M},className:{type:String,required:!1,default:void 0},type:{type:String,default:_.DEFAULT},leftIcon:{type:Object,required:!1,default:void 0},rightIcon:{type:Object,required:!1,default:void 0},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},active:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},htmlType:{type:String,default:u.BUTTON}},emits:["click"],setup(e,{emit:n}){return{classList:o.computed(()=>[r.button,r[e.size||c.M],r[e.type||_.DEFAULT],{[r.block]:e.block,[r.disabled]:e.disabled||e.loading,[r.loading]:e.loading,[r.active]:e.active,[r.circle]:e.circle,[r.bordered]:e.bordered},e.className]),handleClick:()=>{n("click")},styles:r}}}),g=(e,n)=>{const l=e.__vccOpts||e;for(const[i,a]of n)l[i]=a;return l},w=["name","type","disabled"];function y(e,n,l,i,a,f){return o.openBlock(),o.createElementBlock("button",{name:e.name,class:o.normalizeClass(e.classList),type:e.htmlType,disabled:e.disabled||e.loading,onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[e.loading?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(e.styles.spinner)},null,2)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.leftIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass([e.styles.icon,e.styles.iconLeft])},[o.renderSlot(e.$slots,"leftIcon",{icon:e.leftIcon})],2)):o.createCommentVNode("",!0),e.$slots.default?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(e.styles.content)},[o.renderSlot(e.$slots,"default")],2)):o.createCommentVNode("",!0),e.rightIcon?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass([e.styles.icon,e.styles.iconRight])},[o.renderSlot(e.$slots,"rightIcon",{icon:e.rightIcon})],2)):o.createCommentVNode("",!0)],64))],10,w)}const k=g(h,[["render",y]]),d={wrapper:"_wrapper_hww12_1",label:"_label_hww12_6",container:"_container_hww12_12",input:"_input_hww12_18",xs:"_xs_hww12_28",s:"_s_hww12_33",m:"_m_hww12_38",l:"_l_hww12_6",xl:"_xl_hww12_48",disabled:"_disabled_hww12_57",error:"_error_hww12_62",prefix:"_prefix_hww12_72",suffix:"_suffix_hww12_73",loading:"_loading_hww12_88",spinner:"_spinner_hww12_92",spin:"_spin_hww12_92"};var p=(e=>(e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e))(p||{}),m=(e=>(e.TEXT="text",e.PASSWORD="password",e.EMAIL="email",e.TEL="tel",e.SEARCH="search",e))(m||{});const x=o.defineComponent({name:"BaseInput",props:{value:{type:String,required:!0},type:{type:String,default:m.TEXT},id:{type:String,required:!1,default:void 0},name:{type:String,required:!1,default:void 0},disabled:{type:Boolean,default:!1},label:{type:String,required:!1,default:void 0},placeholder:{type:String,required:!1,default:void 0},loading:{type:Boolean,default:!1},error:{type:String,required:!1,default:void 0},size:{type:String,default:p.M},className:{type:String,required:!1,default:void 0}},emits:["update:value","enter"],setup(e,{emit:n}){const l=()=>{n("update:value")},i=f=>{f.key==="Enter"&&n("enter")},a=o.computed(()=>[d.input,d[e.size||p.M],{[d.disabled]:e.disabled,[d.error]:e.error,[d.loading]:e.loading},e.className]);return{styles:d,onInput:l,onKeydown:i,inputClass:a}}}),$=["for"],C=["id","value","name","type","disabled","placeholder"];function E(e,n,l,i,a,f){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.styles.wrapper)},[e.label?(o.openBlock(),o.createElementBlock("label",{key:0,for:e.id,class:o.normalizeClass(e.styles.label)},o.toDisplayString(e.label),11,$)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.styles.container)},[e.$slots.prefix?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(e.styles.prefix)},[o.renderSlot(e.$slots,"prefix")],2)):o.createCommentVNode("",!0),o.createElementVNode("input",{id:e.id,value:e.value,name:e.name,type:e.type||"text",disabled:e.disabled||e.loading,placeholder:e.placeholder,class:o.normalizeClass(e.inputClass),onInput:n[0]||(n[0]=(...s)=>e.onInput&&e.onInput(...s)),onKeydown:n[1]||(n[1]=(...s)=>e.onKeydown&&e.onKeydown(...s))},null,42,C),e.$slots.suffix?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(e.styles.suffix)},[o.renderSlot(e.$slots,"suffix")],2)):o.createCommentVNode("",!0),e.loading?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(e.styles.spinner)},null,2)):o.createCommentVNode("",!0)],2),e.error?(o.openBlock(),o.createElementBlock("p",{key:1,class:o.normalizeClass(e.styles.error)},o.toDisplayString(e.error),3)):o.createCommentVNode("",!0)],2)}const S=g(x,[["render",E]]);t.BaseButton=k,t.BaseInput=S,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(t,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,o(t.ui={},t.Vue))})(this,function(t,o){"use strict";var _=document.createElement("style");_.textContent=`._button_den84_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_den84_1:focus{outline:none}._primary_den84_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_den84_19:hover{background-color:var(--hf-button-primary-hover-background-color)}._primary_den84_19:focus{box-shadow:0 0 0 3px var(--hf-button-primary-focus-color)}._primary_den84_19._bordered_den84_34{background-color:#fff;color:var(--hf-button-primary-background-color);border:1px solid var(--hf-button-primary-background-color)}._danger_den84_40{color:var(--hf-button-danger-text-color);background-color:var(--hf-button-danger-background-color)}._danger_den84_40:hover{background-color:var(--hf-button-danger-hover-background-color)}._danger_den84_40:focus{box-shadow:0 0 0 3px var(--hf-button-danger-focus-color)}._danger_den84_40._bordered_den84_34{background-color:#fff;color:var(--hf-button-danger-background-color);border:1px solid var(--hf-button-danger-background-color)}._default_den84_59{background-color:#fff;color:var(--hf-button-default-text-color);border:1px solid var(--hf-button-default-border-color)}._default_den84_59:hover{background-color:var(--hf-button-default-hover-background-color)}._default_den84_59:focus{box-shadow:0 0 0 3px var(--hf-button-default-focus-color)}._text_den84_73{background-color:#fff;color:#000}._link_den84_78{background-color:#fff;color:#007bff;text-decoration:underline}._block_den84_84{width:100%}._disabled_den84_88{background-color:#e9ecef;color:#6c757d;cursor:not-allowed}._loading_den84_94{cursor:wait}._circle_den84_98{border-radius:100%;padding:0!important}._bordered_den84_34{border:1px solid currentColor}._icon_den84_107{display:flex;align-items:center}._iconLeft_den84_112{margin-right:8px}._iconRight_den84_116{margin-left:8px}._xs_den84_120{padding:4px 8px;font-size:12px}._s_den84_125{padding:6px 12px;font-size:14px;line-height:20px}._m_den84_131{padding:6px 12px;font-size:15px;line-height:24px}._l_den84_78{padding:16px 32px;font-size:18px}._xl_den84_142{padding:20px 40px;font-size:20px}._spinner_den84_147{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;width:16px;height:16px;border:2px solid rgba(0,0,0,.2);border-top-color:#007bff;border-radius:50%;animation:_spin_den84_147 .6s linear infinite}@keyframes _spin_den84_147{to{transform:rotate(360deg)}}._wrapper_hww12_1{display:flex;flex-direction:column}._label_hww12_6{margin-bottom:4px;font-size:14px;color:#333}._container_hww12_12{position:relative;display:flex;align-items:center}._input_hww12_18{flex:1;padding:8px 12px;font-size:14px;border:1px solid #ced4da;border-radius:12px;outline:none;transition:border-color .3s}._xs_hww12_28{padding:4px 8px;font-size:12px}._s_hww12_33{padding:6px 10px;font-size:13px}._m_hww12_38{padding:8px 12px;font-size:14px}._l_hww12_6{padding:10px 14px;font-size:16px}._xl_hww12_48{padding:12px 16px;font-size:18px}input:focus{border-color:#007bff}._disabled_hww12_57{background-color:#e9ecef;cursor:not-allowed}._error_hww12_62{border-color:#dc3545}._error_hww12_62{margin-top:4px;font-size:12px;color:#dc3545}._prefix_hww12_72,._suffix_hww12_73{position:absolute;display:flex;align-items:center;color:#6c757d}._prefix_hww12_72{left:8px}._suffix_hww12_73{right:8px}._loading_hww12_88{cursor:wait}._spinner_hww12_92{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_hww12_92 .6s linear infinite}@keyframes _spin_hww12_92{to{transform:rotate(360deg)}}
2
+ /*$vite$:1*/`,document.head.appendChild(_);const r={button:"_button_den84_1",primary:"_primary_den84_19",bordered:"_bordered_den84_34",danger:"_danger_den84_40",default:"_default_den84_59",text:"_text_den84_73",link:"_link_den84_78",block:"_block_den84_84",disabled:"_disabled_den84_88",loading:"_loading_den84_94",circle:"_circle_den84_98",icon:"_icon_den84_107",iconLeft:"_iconLeft_den84_112",iconRight:"_iconRight_den84_116",xs:"_xs_den84_120",s:"_s_den84_125",m:"_m_den84_131",l:"_l_den84_78",xl:"_xl_den84_142",spinner:"_spinner_den84_147",spin:"_spin_den84_147"},f=o.defineComponent({name:"BaseButton",props:{name:{type:String,required:!1,default:void 0},size:{type:String,default:"m"},className:{type:String,required:!1,default:void 0},type:{type:String,default:"default"},leftIcon:{type:Object,required:!1,default:void 0},rightIcon:{type:Object,required:!1,default:void 0},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},active:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},bordered:{type:Boolean,default:!1},htmlType:{type:String,default:"button"}},emits:["click"],setup(e,{emit:n}){return{classList:o.computed(()=>[r.button,r[e.size||"m"],r[e.type||"default"],{[r.block]:e.block,[r.disabled]:e.disabled||e.loading,[r.loading]:e.loading,[r.active]:e.active,[r.circle]:e.circle,[r.bordered]:e.bordered},e.className]),handleClick:()=>{n("click")},styles:r}}}),p=(e,n)=>{const l=e.__vccOpts||e;for(const[i,d]of n)l[i]=d;return l},u=["name","type","disabled"];function b(e,n,l,i,d,c){return o.openBlock(),o.createElementBlock("button",{name:e.name,class:o.normalizeClass(e.classList),type:e.htmlType,disabled:e.disabled||e.loading,onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[e.loading?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(e.styles.spinner)},null,2)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.leftIcon?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass([e.styles.icon,e.styles.iconLeft])},[o.renderSlot(e.$slots,"leftIcon",{icon:e.leftIcon})],2)):o.createCommentVNode("",!0),e.$slots.default?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(e.styles.content)},[o.renderSlot(e.$slots,"default")],2)):o.createCommentVNode("",!0),e.rightIcon?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass([e.styles.icon,e.styles.iconRight])},[o.renderSlot(e.$slots,"rightIcon",{icon:e.rightIcon})],2)):o.createCommentVNode("",!0)],64))],10,u)}const g=p(f,[["render",b]]),a={wrapper:"_wrapper_hww12_1",label:"_label_hww12_6",container:"_container_hww12_12",input:"_input_hww12_18",xs:"_xs_hww12_28",s:"_s_hww12_33",m:"_m_hww12_38",l:"_l_hww12_6",xl:"_xl_hww12_48",disabled:"_disabled_hww12_57",error:"_error_hww12_62",prefix:"_prefix_hww12_72",suffix:"_suffix_hww12_73",loading:"_loading_hww12_88",spinner:"_spinner_hww12_92",spin:"_spin_hww12_92"},m=o.defineComponent({name:"BaseInput",props:{value:{type:String,required:!0},type:{type:String,default:"text"},id:{type:String,required:!1,default:void 0},name:{type:String,required:!1,default:void 0},disabled:{type:Boolean,default:!1},label:{type:String,required:!1,default:void 0},placeholder:{type:String,required:!1,default:void 0},loading:{type:Boolean,default:!1},error:{type:String,required:!1,default:void 0},size:{type:String,default:"m"},className:{type:String,required:!1,default:void 0}},emits:["update:value","enter"],setup(e,{emit:n}){const l=()=>{n("update:value")},i=c=>{c.key==="Enter"&&n("enter")},d=o.computed(()=>[a.input,a[e.size||"m"],{[a.disabled]:e.disabled,[a.error]:e.error,[a.loading]:e.loading},e.className]);return{styles:a,onInput:l,onKeydown:i,inputClass:d}}}),h=["for"],y=["id","value","name","type","disabled","placeholder"];function w(e,n,l,i,d,c){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e.styles.wrapper)},[e.label?(o.openBlock(),o.createElementBlock("label",{key:0,for:e.id,class:o.normalizeClass(e.styles.label)},o.toDisplayString(e.label),11,h)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.styles.container)},[e.$slots.prefix?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(e.styles.prefix)},[o.renderSlot(e.$slots,"prefix")],2)):o.createCommentVNode("",!0),o.createElementVNode("input",{id:e.id,value:e.value,name:e.name,type:e.type||"text",disabled:e.disabled||e.loading,placeholder:e.placeholder,class:o.normalizeClass(e.inputClass),onInput:n[0]||(n[0]=(...s)=>e.onInput&&e.onInput(...s)),onKeydown:n[1]||(n[1]=(...s)=>e.onKeydown&&e.onKeydown(...s))},null,42,y),e.$slots.suffix?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(e.styles.suffix)},[o.renderSlot(e.$slots,"suffix")],2)):o.createCommentVNode("",!0),e.loading?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(e.styles.spinner)},null,2)):o.createCommentVNode("",!0)],2),e.error?(o.openBlock(),o.createElementBlock("p",{key:1,class:o.normalizeClass(e.styles.error)},o.toDisplayString(e.error),3)):o.createCommentVNode("",!0)],2)}const k=p(m,[["render",w]]);t.BaseButton=g,t.BaseInput=k,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
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.38",
5
+ "version": "0.0.39",
6
6
  "author": {
7
7
  "name": "HuntFlow Developer",
8
8
  "nickname": "developer",