vlite3 1.2.9 → 1.2.10

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.
@@ -1,4 +1,7 @@
1
1
  import { ButtonVariant, ButtonSize, ButtonRounded, ButtonProps } from '../types';
2
+ export interface LocalButtonProps extends ButtonProps {
3
+ description?: string;
4
+ }
2
5
  declare function __VLS_template(): {
3
6
  attrs: Partial<{}>;
4
7
  slots: {
@@ -9,7 +12,7 @@ declare function __VLS_template(): {
9
12
  rootEl: HTMLButtonElement;
10
13
  };
11
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
15
+ declare const __VLS_component: import('vue').DefineComponent<LocalButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LocalButtonProps> & Readonly<{}>, {
13
16
  type: "button" | "submit" | "reset";
14
17
  class: any;
15
18
  variant: ButtonVariant;
@@ -17,6 +20,7 @@ declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}
17
20
  rounded: ButtonRounded;
18
21
  loading: boolean;
19
22
  disabled: boolean;
23
+ layout: "horizontal" | "vertical" | "tile";
20
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
21
25
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
26
  export default _default;
@@ -1,10 +1,20 @@
1
- import { defineComponent as k, computed as l, useSlots as z, withDirectives as $, openBlock as o, createElementBlock as u, normalizeClass as s, createBlock as d, createCommentVNode as h, renderSlot as m, createTextVNode as b, toDisplayString as f, unref as B } from "vue";
2
- import g from "./Icon.vue.js";
3
- import { vRipple as I } from "../directives/vRipple.js";
4
- import { $t as R } from "../utils/i18n.js";
5
- const S = ["type", "disabled", "data-testid"], T = /* @__PURE__ */ k({
1
+ import { defineComponent as N, useAttrs as T, computed as s, useSlots as A, withDirectives as G, openBlock as i, createElementBlock as l, normalizeClass as a, Fragment as C, createElementVNode as k, createBlock as f, createCommentVNode as c, renderSlot as S, createTextVNode as $, toDisplayString as v, unref as F } from "vue";
2
+ import p from "./Icon.vue.js";
3
+ import { vRipple as H } from "../directives/vRipple.js";
4
+ import { $t as M } from "../utils/i18n.js";
5
+ const O = ["type", "disabled", "data-testid"], Z = {
6
+ key: 0,
7
+ class: "text-xs font-medium leading-tight truncate max-w-full"
8
+ }, q = {
9
+ key: 1,
10
+ class: "text-[10px] font-normal opacity-70 mt-0.5 leading-tight truncate max-w-full"
11
+ }, J = {
12
+ key: 0,
13
+ class: "text-[0.75em] font-normal opacity-70 mt-0.5 leading-tight"
14
+ }, X = /* @__PURE__ */ N({
6
15
  __name: "Button",
7
16
  props: {
17
+ description: {},
8
18
  variant: { default: "primary" },
9
19
  size: { default: "md" },
10
20
  class: { default: "" },
@@ -19,18 +29,51 @@ const S = ["type", "disabled", "data-testid"], T = /* @__PURE__ */ k({
19
29
  textClass: {},
20
30
  iconClass: {},
21
31
  iconRightClass: {},
22
- asIcon: { type: Boolean }
32
+ asIcon: { type: Boolean },
33
+ layout: { default: "horizontal" }
23
34
  },
24
- setup(e) {
25
- const t = e, r = l(() => t.textI18n ? R(t.textI18n) : t.text), x = z(), i = l(
26
- () => t?.asIcon || t.icon && !r.value && !x.default
27
- ), v = l(() => {
28
- const n = `inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer gap-2 ${i.value ? "icon-only shrink-0" : ""}`, a = {
35
+ setup(t) {
36
+ const z = {
37
+ primary: "bg-primary text-primary-foreground",
38
+ "primary-light": "bg-primary-light text-primary-fg-light",
39
+ secondary: "bg-secondary text-secondary-foreground",
40
+ danger: "bg-danger text-danger-fg",
41
+ "danger-light": "bg-danger-light text-destructive",
42
+ warning: "bg-warning text-warning-fg",
43
+ "warning-light": "bg-warning-light text-warning-fg-light",
44
+ info: "bg-info text-info-fg",
45
+ "info-light": "bg-info-light text-info-fg-light",
46
+ success: "bg-success text-success-fg",
47
+ "success-light": "bg-success-light text-success-fg-light",
48
+ outline: "bg-muted text-foreground",
49
+ "outline-floating": "bg-muted text-foreground",
50
+ "outline-primary": "bg-primary/10 text-primary",
51
+ "outline-danger": "bg-destructive/10 text-destructive",
52
+ "outline-warning": "bg-warning/10 text-warning",
53
+ "outline-info": "bg-info/10 text-info",
54
+ "outline-success": "bg-success/10 text-success",
55
+ ghost: "bg-accent text-accent-foreground",
56
+ link: "bg-primary/10 text-primary",
57
+ transparent: "bg-muted text-foreground"
58
+ }, e = t, I = T(), o = s(() => {
59
+ const n = e.layout || I.layout;
60
+ return n === "tile" ? "tile" : n === "vertical" ? "vertical" : "horizontal";
61
+ }), h = s(() => o.value === "tile"), j = s(() => z[e.variant] ?? z.primary), b = s(() => ({
62
+ xs: "w-9 h-9",
63
+ sm: "w-10 h-10",
64
+ sm2: "w-11 h-11",
65
+ md: "w-12 h-12",
66
+ lg: "w-14 h-14",
67
+ xl: "w-16 h-16"
68
+ })[e.size]), r = s(() => e.textI18n ? M(e.textI18n) : e.text), B = A(), x = s(
69
+ () => e?.asIcon || e.icon && !r.value && !B.default
70
+ ), u = s(() => e.icon ? e.icon.startsWith("http://") || e.icon.startsWith("https://") || e.icon.startsWith("data:image/") ? !0 : [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".avif"].some((g) => e.icon.toLowerCase().endsWith(g)) : !1), R = s(() => {
71
+ const g = `inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer ${o.value === "tile" ? "flex-col gap-1.5 items-center" : o.value === "vertical" ? "flex-col gap-2" : e.description ? "gap-3" : "gap-2"} ${x.value ? "icon-only shrink-0" : ""}`, y = {
29
72
  primary: "bg-primary text-primary-foreground hover:bg-primary/90",
30
73
  "primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/15",
31
74
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
32
75
  danger: "bg-danger text-danger-fg hover:bg-danger/90",
33
- "danger-light": "bg-danger-light text-destructive hover:bg-danger/20 dark:hover:bg-danger/40",
76
+ "danger-light": "bg-danger-light text-danger hover:bg-danger/20 dark:hover:bg-danger/40",
34
77
  warning: "bg-warning text-warning-fg hover:bg-warning/80",
35
78
  "warning-light": "bg-warning-light text-warning-fg-light hover:bg-warning/25",
36
79
  info: "bg-info text-info-fg hover:bg-info/80",
@@ -47,21 +90,21 @@ const S = ["type", "disabled", "data-testid"], T = /* @__PURE__ */ k({
47
90
  ghost: "hover:bg-accent hover:text-accent-foreground text-foreground",
48
91
  link: "text-primary underline-offset-4 hover:underline",
49
92
  transparent: ""
50
- }, w = {
51
- xs: "h-6.5 px-2",
52
- sm: "h-7.5 px-3",
53
- sm2: "h-8 px-3",
54
- md: "h-9 px-4 py-2",
55
- lg: "h-10 px-4",
56
- xl: "h-12 px-10"
57
- }, y = {
93
+ }, d = {
94
+ xs: e.description ? "h-auto py-1.5 px-2" : "h-6.5 px-2",
95
+ sm: e.description ? "h-auto py-2 px-3" : "h-7.5 px-3",
96
+ sm2: e.description ? "h-auto py-2 px-3" : "h-8 px-3",
97
+ md: e.description ? "h-auto py-2.5 px-4" : "h-9 px-4 py-2",
98
+ lg: e.description ? "h-auto py-3 px-4" : "h-10 px-4",
99
+ xl: e.description ? "h-auto py-4 px-10" : "h-12 px-10"
100
+ }, V = {
58
101
  xs: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
59
102
  sm: "h-7.5 w-7.5 min-h-7.5 min-w-7.5",
60
103
  sm2: "h-8 w-8 min-h-8 min-w-8",
61
104
  md: "h-9 w-9 min-h-9 min-w-9",
62
105
  lg: "h-10 w-10 min-h-10 min-w-10",
63
106
  xl: "h-12 w-12 min-h-12 min-w-12"
64
- }, p = {
107
+ }, W = {
65
108
  none: "rounded-none",
66
109
  sm: "rounded-sm",
67
110
  sm2: "rounded-sm",
@@ -71,23 +114,37 @@ const S = ["type", "disabled", "data-testid"], T = /* @__PURE__ */ k({
71
114
  "2xl": "rounded-2xl",
72
115
  full: "rounded-full"
73
116
  };
74
- let C = i.value ? y[t.size] : w[t.size];
75
- return [
76
- n,
77
- a[t.variant],
78
- p[t.rounded],
79
- C,
80
- t.class
81
- ].join(" ");
82
- }), c = l(() => {
83
- const n = {
84
- xs: "w-3 h-3",
85
- sm: "w-4 h-4",
86
- sm2: "w-4 h-4",
87
- md: "w-4 h-4",
88
- lg: "w-4 h-4",
89
- xl: "w-4 h-4"
90
- }, a = {
117
+ let w = x.value ? V[e.size] : d[e.size];
118
+ o.value === "tile" ? w = {
119
+ xs: "h-auto p-0!",
120
+ sm: "h-auto p-0!",
121
+ sm2: "h-auto p-0!",
122
+ md: "h-auto p-0!",
123
+ lg: "h-auto p-0!",
124
+ xl: "h-auto p-0!"
125
+ }[e.size] : o.value === "vertical" && (w = {
126
+ xs: "h-auto py-1.5 px-2 min-w-16",
127
+ sm: "h-auto py-2 px-3 min-w-20",
128
+ sm2: "h-auto py-2 px-3 min-w-20",
129
+ md: "h-auto py-2.5 px-4 min-w-24",
130
+ lg: "h-auto py-3 px-4 min-w-28",
131
+ xl: "h-auto py-4 px-10 min-w-32"
132
+ }[e.size]);
133
+ const D = h.value ? "group text-foreground focus:outline-none focus-visible:outline-none active:scale-100!" : y[e.variant];
134
+ return [g, D, W[e.rounded], w, e.class].join(
135
+ " "
136
+ );
137
+ }), m = s(() => {
138
+ if (h.value && u.value)
139
+ return `${b.value} object-cover`;
140
+ const n = e.description && o.value === "horizontal", g = {
141
+ xs: n ? "w-3.5 h-3.5" : "w-3 h-3",
142
+ sm: n ? "w-5 h-5" : "w-4 h-4",
143
+ sm2: n ? "w-5 h-5" : "w-4 h-4",
144
+ md: n ? "w-5 h-5" : "w-4 h-4",
145
+ lg: n ? "w-5 h-5" : "w-4 h-4",
146
+ xl: n ? "w-5 h-5" : "w-4 h-4"
147
+ }, y = {
91
148
  xs: "w-3 h-3",
92
149
  sm: "w-4 h-4",
93
150
  sm2: "w-4 h-4",
@@ -95,43 +152,78 @@ const S = ["type", "disabled", "data-testid"], T = /* @__PURE__ */ k({
95
152
  lg: "w-4 h-4",
96
153
  xl: "w-4 h-4"
97
154
  };
98
- return i.value ? a[t.size] : n[t.size];
99
- });
100
- return (n, a) => $((o(), u("button", {
101
- type: e.type,
102
- class: s([v.value, "cursor-pointer"]),
103
- disabled: e.disabled || e.loading,
104
- "data-testid": n.$attrs["data-testid"] || (r.value ? `btn-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : e.icon ? `btn-${e.icon.replace(/[^a-zA-Z0-9]+/g, "-")}` : "button")
155
+ let d = x.value ? y[e.size] : g[e.size];
156
+ return u.value && (d += " object-cover"), h.value ? d += " scale-[1.45]!" : o.value === "vertical" && (d += " scale-[1.35]! mt-1"), d;
157
+ }), E = s(() => o.value === "vertical" ? "scale-[0.9]" : "");
158
+ return (n, g) => G((i(), l("button", {
159
+ type: t.type,
160
+ class: a([R.value, "cursor-pointer"]),
161
+ disabled: t.disabled || t.loading,
162
+ "data-testid": n.$attrs["data-testid"] || (r.value ? `btn-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : t.icon ? `btn-${t.icon.replace(/[^a-zA-Z0-9]+/g, "-")}` : "button")
105
163
  }, [
106
- e.loading ? (o(), d(g, {
107
- key: 0,
108
- icon: "lucide:loader-2",
109
- class: s(["animate-spin pointer-events-none", c.value])
110
- }, null, 8, ["class"])) : e.icon ? (o(), d(g, {
111
- key: 1,
112
- icon: e.icon,
113
- class: s(["pointer-events-none", [e.iconClass, c.value, i.value ? "mx-auto" : ""]])
114
- }, null, 8, ["icon", "class"])) : h("", !0),
115
- e.textClass ? (o(), u("span", {
116
- key: 2,
117
- class: s(e.textClass)
118
- }, [
119
- m(n.$slots, "default", {}, () => [
120
- b(f(r.value), 1)
121
- ])
122
- ], 2)) : m(n.$slots, "default", { key: 3 }, () => [
123
- b(f(r.value), 1)
124
- ]),
125
- e.iconRight && !e.loading ? (o(), d(g, {
126
- key: 4,
127
- icon: e.iconRight,
128
- class: s([[e.iconRightClass, c.value], "h-4 w-4 pointer-events-none"])
129
- }, null, 8, ["icon", "class"])) : h("", !0)
130
- ], 10, S)), [
131
- [B(I)]
164
+ h.value ? (i(), l(C, { key: 0 }, [
165
+ k("span", {
166
+ class: a(["inline-flex items-center justify-center shrink-0 transition-transform duration-150 ease-out group-active:scale-[0.92]", [
167
+ u.value ? "" : "rounded-full",
168
+ u.value ? "" : j.value,
169
+ u.value ? "" : b.value
170
+ ]])
171
+ }, [
172
+ t.loading ? (i(), f(p, {
173
+ key: 0,
174
+ icon: "lucide:loader-2",
175
+ class: a(["animate-spin pointer-events-none", [m.value, u.value ? b.value : ""]])
176
+ }, null, 8, ["class"])) : t.icon ? (i(), f(p, {
177
+ key: 1,
178
+ icon: t.icon,
179
+ class: a(["pointer-events-none", [t.iconClass, m.value]])
180
+ }, null, 8, ["icon", "class"])) : c("", !0)
181
+ ], 2),
182
+ r.value || n.$slots.default || e.description ? (i(), l("span", {
183
+ key: 0,
184
+ class: a(["flex flex-col items-center max-w-full", t.textClass])
185
+ }, [
186
+ r.value || n.$slots.default ? (i(), l("span", Z, [
187
+ S(n.$slots, "default", {}, () => [
188
+ $(v(r.value), 1)
189
+ ])
190
+ ])) : c("", !0),
191
+ e.description ? (i(), l("span", q, v(e.description), 1)) : c("", !0)
192
+ ], 2)) : c("", !0)
193
+ ], 64)) : (i(), l(C, { key: 1 }, [
194
+ t.loading ? (i(), f(p, {
195
+ key: 0,
196
+ icon: "lucide:loader-2",
197
+ class: a(["animate-spin pointer-events-none", m.value])
198
+ }, null, 8, ["class"])) : t.icon ? (i(), f(p, {
199
+ key: 1,
200
+ icon: t.icon,
201
+ class: a(["pointer-events-none", [t.iconClass, m.value, x.value ? "mx-auto" : ""]])
202
+ }, null, 8, ["icon", "class"])) : c("", !0),
203
+ r.value || n.$slots.default || e.description ? (i(), l("div", {
204
+ key: 2,
205
+ class: a(["flex flex-col justify-center", o.value === "vertical" ? "items-center text-center" : "items-start text-left"])
206
+ }, [
207
+ k("span", {
208
+ class: a([[t.textClass, E.value], "leading-tight"])
209
+ }, [
210
+ S(n.$slots, "default", {}, () => [
211
+ $(v(r.value), 1)
212
+ ])
213
+ ], 2),
214
+ e.description ? (i(), l("span", J, v(e.description), 1)) : c("", !0)
215
+ ], 2)) : c("", !0),
216
+ t.iconRight && !t.loading ? (i(), f(p, {
217
+ key: 3,
218
+ icon: t.iconRight,
219
+ class: a([[t.iconRightClass, m.value], "h-4 w-4 pointer-events-none"])
220
+ }, null, 8, ["icon", "class"])) : c("", !0)
221
+ ], 64))
222
+ ], 10, O)), [
223
+ [F(H), !h.value]
132
224
  ]);
133
225
  }
134
226
  });
135
227
  export {
136
- T as default
228
+ X as default
137
229
  };
@@ -93,12 +93,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
93
93
  loading: boolean;
94
94
  readonly: boolean;
95
95
  disabled: boolean;
96
+ layout: "default" | "grouped";
96
97
  direction: "ltr" | "rtl";
97
98
  selectable: boolean;
98
99
  options: (IDropdownOption | string | number)[];
99
100
  selectedIndex: number | null;
100
101
  maxHeight: string;
101
- layout: "default" | "grouped";
102
102
  hasMore: boolean;
103
103
  searchable: boolean;
104
104
  remote: boolean;
@@ -53,6 +53,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
53
53
  class: string;
54
54
  columns: number | string;
55
55
  loading: boolean;
56
+ layout: "default" | "grouped";
56
57
  direction: "ltr" | "rtl";
57
58
  selectable: boolean;
58
59
  options: (IDropdownOption | string | number)[];
@@ -62,7 +63,6 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
62
63
  nestedPosition: any;
63
64
  nestedOffset: [number, number];
64
65
  isCustomSlotMenu: boolean;
65
- layout: "default" | "grouped";
66
66
  hasMore: boolean;
67
67
  searchable: boolean;
68
68
  remote: boolean;
@@ -1,7 +1,7 @@
1
1
  import o from "./FormFields.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3e65ff52"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-330a03fe"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as y, Fragment as p, renderList as W, withMemo as X, unref as d, createBlock as b, withCtx as z, resolveDynamicComponent as B, createTextVNode as V, toDisplayString as F, createCommentVNode as l, createElementVNode as Y, createVNode as Z, markRaw as _ } from "vue";
1
+ import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as y, Fragment as p, renderList as W, withMemo as X, unref as d, createBlock as b, withCtx as D, resolveDynamicComponent as B, createTextVNode as V, toDisplayString as F, createCommentVNode as i, createElementVNode as Y, createVNode as Z, markRaw as _ } from "vue";
2
2
  import { isComponent as m, getNestedValue as w, resolveFieldType as ee } from "./utils/form.utils.js";
3
- import f from "../Label.vue.js";
3
+ import q from "../Label.vue.js";
4
4
  import te from "./FormField.vue.js";
5
5
  import { $t as ne } from "../../utils/i18n.js";
6
6
  const ae = {
@@ -34,8 +34,8 @@ const ae = {
34
34
  excludeTypes: { default: () => [] }
35
35
  },
36
36
  emits: ["change", "addonAction"],
37
- setup(a, { emit: q }) {
38
- const s = a, k = q, $ = K(() => {
37
+ setup(a, { emit: $ }) {
38
+ const s = a, k = $, f = K(() => {
39
39
  if (s.className) return s.className;
40
40
  }), r = (t) => ee(t, {
41
41
  values: s.values,
@@ -60,9 +60,9 @@ const ae = {
60
60
  g.value[t] = !1;
61
61
  }, L = (t) => {
62
62
  const n = x(t), e = r(t);
63
- let i = n != null && n !== "" && !(Array.isArray(n) && n.length === 0);
64
- const D = typeof n == "number" && !isNaN(n);
65
- return e === "dateRangePicker" && n && typeof n == "object" && (i = !!(n.startDate || n.endDate || n.start || n.end)), T(t) || e === "number" ? g.value[t.name] || i || D : i || D;
63
+ let l = n != null && n !== "" && !(Array.isArray(n) && n.length === 0);
64
+ const z = typeof n == "number" && !isNaN(n);
65
+ return e === "dateRangePicker" && n && typeof n == "object" && (l = !!(n.startDate || n.endDate || n.start || n.end)), T(t) || e === "number" ? g.value[t.name] || l || z : l || z;
66
66
  }, T = (t) => {
67
67
  const n = r(t) || "text";
68
68
  return ["text", "email", "password", "tel", "url", "search", "textarea"].includes(n);
@@ -87,7 +87,7 @@ const ae = {
87
87
  return n;
88
88
  };
89
89
  return (t, n) => (o(), u("div", {
90
- class: y(["grid", a.variant === "floating" ? "gap-5 mt-1" : "gap-4", $.value])
90
+ class: y(["grid", a.variant === "floating" ? "gap-5 mt-1" : "gap-4", f.value])
91
91
  }, [
92
92
  (o(!0), u(p, null, W(a.schema, (e) => (o(), u(p, {
93
93
  key: e.name
@@ -113,23 +113,27 @@ const ae = {
113
113
  key: 0,
114
114
  class: y(["max-md:col-span-full! form-field-item", P(e)])
115
115
  }, [
116
- c(e) && r(e) !== "switch" && r(e) !== "check" && r(e) !== "customFields" && r(e) !== "choiceBox" && !A(e) ? (o(), b(f, {
116
+ c(e) && r(e) !== "switch" && r(e) !== "check" && r(e) !== "customFields" && r(e) !== "choiceBox" && !A(e) ? (o(), b(q, {
117
117
  key: 0,
118
+ size: "md",
118
119
  for: e.name,
119
- class: "mb-2 block -text-fs-2! font-medium"
120
+ class: "mb-2.5 block font-medium"
120
121
  }, {
121
- default: z(() => [
122
+ default: D(() => [
122
123
  d(m)(c(e)) ? (o(), b(B(R(c(e))), { key: 0 })) : (o(), u(p, { key: 1 }, [
123
124
  V(F(c(e)) + " ", 1),
124
- e.required && a.showRequiredAsterisk ? (o(), u("span", ae, "*")) : l("", !0)
125
+ e.required && a.showRequiredAsterisk ? (o(), u("span", ae, "*")) : i("", !0)
125
126
  ], 64))
126
127
  ]),
127
128
  _: 2
128
- }, 1032, ["for"])) : l("", !0),
129
+ }, 1032, ["for"])) : i("", !0),
129
130
  Y("div", {
130
- class: y(["relative", r(e) === "check" || r(e) === "switch" && e.props?.switchVariant === "basic" ? "w-auto" : "w-full"]),
131
- onFocusin: (i) => M(e.name),
132
- onFocusout: (i) => O(e.name)
131
+ class: y([
132
+ "relative",
133
+ r(e) === "check" || r(e) === "switch" && e.props?.switchVariant === "basic" ? "w-auto" : "w-full"
134
+ ]),
135
+ onFocusin: (l) => M(e.name),
136
+ onFocusout: (l) => O(e.name)
133
137
  }, [
134
138
  A(e) && U(e) && !T(e) ? (o(), u("label", {
135
139
  key: 0,
@@ -141,9 +145,9 @@ const ae = {
141
145
  }, [
142
146
  d(m)(c(e)) ? (o(), b(B(R(c(e))), { key: 0 })) : (o(), u(p, { key: 1 }, [
143
147
  V(F(c(e)) + " ", 1),
144
- e.required ? (o(), u("span", oe, "*")) : l("", !0)
148
+ e.required ? (o(), u("span", oe, "*")) : i("", !0)
145
149
  ], 64))
146
- ], 10, re)) : l("", !0),
150
+ ], 10, re)) : i("", !0),
147
151
  Z(te, {
148
152
  field: s.variant === "floating" ? {
149
153
  ...e,
@@ -164,24 +168,24 @@ const ae = {
164
168
  error: v(e),
165
169
  isUpdate: a.isUpdate,
166
170
  loading: a.fieldLoading[e.name],
167
- onChange: (i) => j(e, i),
171
+ onChange: (l) => j(e, l),
168
172
  onAddonChange: S,
169
173
  onAddonAction: H
170
174
  }, null, 8, ["field", "value", "floatingActive", "label", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading", "onChange"])
171
175
  ], 42, se),
172
- r(e) === "check" || r(e) === "switch" && e.props?.switchVariant === "basic" ? (o(), b(f, {
176
+ r(e) === "check" || r(e) === "switch" && e.props?.switchVariant === "basic" ? (o(), b(q, {
173
177
  key: 1,
174
178
  for: e.name,
175
179
  class: "ml-2 text-sm font-medium cursor-pointer"
176
180
  }, {
177
- default: z(() => [
181
+ default: D(() => [
178
182
  V(F(c(e)) + " ", 1),
179
- e.required ? (o(), u("span", ue, "*")) : l("", !0)
183
+ e.required ? (o(), u("span", ue, "*")) : i("", !0)
180
184
  ]),
181
185
  _: 2
182
- }, 1032, ["for"])) : l("", !0),
183
- v(e) ? (o(), u("p", ce, F(v(e)), 1)) : l("", !0)
184
- ], 2)), n, 0) : l("", !0)
186
+ }, 1032, ["for"])) : i("", !0),
187
+ v(e) ? (o(), u("p", ce, F(v(e)), 1)) : i("", !0)
188
+ ], 2)), n, 0) : i("", !0)
185
189
  ], 64))), 128))
186
190
  ], 2));
187
191
  }
@@ -41,7 +41,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
41
41
  setup(t, { emit: D }) {
42
42
  const e = t, c = D, a = d(() => e.labelI18n ? E(e.labelI18n) : e.label), S = d(
43
43
  () => e.placeholderI18n ? E(e.placeholderI18n) : e.placeholder
44
- ), y = Z(), m = v(null), x = v(!1), h = v(!1), H = d(() => e.type === "password" && x.value ? "text" : e.type), k = d(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), $ = d(() => b.value || k.value || h.value), p = d(() => !!e.addonLeft || !!y["addon-left"]), V = d(() => !!e.addonRight || !!y["addon-right"]), U = d(() => [
44
+ ), x = Z(), m = v(null), y = v(!1), h = v(!1), H = d(() => e.type === "password" && y.value ? "text" : e.type), k = d(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), $ = d(() => b.value || k.value || h.value), p = d(() => !!e.addonLeft || !!x["addon-left"]), V = d(() => !!e.addonRight || !!x["addon-right"]), U = d(() => [
45
45
  "relative w-full",
46
46
  e.class,
47
47
  e.labelPosition === "left" ? "flex items-center gap-4" : "",
@@ -97,7 +97,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
97
97
  "z-10"
98
98
  ].join(" ");
99
99
  }, q = d(() => {
100
- const l = !!y["addon-left"];
100
+ const l = !!x["addon-left"];
101
101
  return [
102
102
  "flex items-center justify-center whitespace-nowrap",
103
103
  l ? `border-none ${P("left")}` : `bg-muted border border-input border-r-0! px-3 text-muted-foreground ${{
@@ -114,7 +114,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
114
114
  e.disabled ? "opacity-50 cursor-not-allowed" : ""
115
115
  ].join(" ");
116
116
  }), G = d(() => {
117
- const l = !!y["addon-right"];
117
+ const l = !!x["addon-right"];
118
118
  return [
119
119
  "flex items-center justify-center whitespace-nowrap",
120
120
  l ? `border-none ${P("right")}` : `bg-muted border border-input border-l-0! px-3 text-muted-foreground ${{
@@ -137,7 +137,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
137
137
  const n = l.target;
138
138
  c("change", n.value);
139
139
  }, O = () => {
140
- e.disabled || e.readonly || (x.value = !x.value);
140
+ e.disabled || e.readonly || (y.value = !y.value);
141
141
  }, Q = () => {
142
142
  e.disabled || e.readonly || (c("update:modelValue", ""), B(() => {
143
143
  m.value?.focus();
@@ -162,6 +162,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
162
162
  }, [
163
163
  a.value && t.variant !== "floating" ? (r(), j(te, {
164
164
  key: 0,
165
+ size: "xs",
165
166
  for: a.value,
166
167
  class: u(["mb-1.5", t.labelPosition !== "top" ? "mb-0" : ""].join(" "))
167
168
  }, {
@@ -265,7 +266,7 @@ const ne = ["for"], oe = ["type", "value", "placeholder", "disabled", "readonly"
265
266
  onClick: O
266
267
  }, [
267
268
  C(g, {
268
- icon: x.value ? "lucide:eye-off" : "lucide:eye",
269
+ icon: y.value ? "lucide:eye-off" : "lucide:eye",
269
270
  class: "h-4 w-4"
270
271
  }, null, 8, ["icon"])
271
272
  ])) : i("", !0),
@@ -1,6 +1,8 @@
1
- interface Props {
1
+ export type LabelSize = 'xs' | 'sm' | 'md' | 'lg';
2
+ export interface LabelProps {
2
3
  for?: string;
3
4
  class?: string;
5
+ size?: LabelSize;
4
6
  }
5
7
  declare function __VLS_template(): {
6
8
  attrs: Partial<{}>;
@@ -11,8 +13,9 @@ declare function __VLS_template(): {
11
13
  rootEl: HTMLLabelElement;
12
14
  };
13
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
16
+ declare const __VLS_component: import('vue').DefineComponent<LabelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LabelProps> & Readonly<{}>, {
15
17
  class: string;
18
+ size: LabelSize;
16
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLLabelElement>;
17
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
21
  export default _default;
@@ -1,23 +1,30 @@
1
- import { defineComponent as r, computed as a, openBlock as l, createElementBlock as n, normalizeClass as c, renderSlot as d } from "vue";
2
- const p = ["for"], u = /* @__PURE__ */ r({
1
+ import { defineComponent as a, computed as l, openBlock as r, createElementBlock as n, normalizeClass as c, renderSlot as d } from "vue";
2
+ const f = ["for"], m = /* @__PURE__ */ a({
3
3
  __name: "Label",
4
4
  props: {
5
5
  for: {},
6
- class: { default: "" }
6
+ class: { default: "" },
7
+ size: { default: "md" }
7
8
  },
8
- setup(o) {
9
- const e = o, s = a(() => [
10
- "text-sm leading-none text-gray-800 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
9
+ setup(t) {
10
+ const e = t, o = l(() => [
11
+ {
12
+ xs: "-text-fs-3.5",
13
+ sm: "-text-fs-3",
14
+ md: "-text-fs-2",
15
+ lg: "text-base"
16
+ }[e.size],
17
+ "leading-none text-gray-800 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
11
18
  e.class
12
19
  ].join(" "));
13
- return (t, f) => (l(), n("label", {
20
+ return (s, i) => (r(), n("label", {
14
21
  for: e.for,
15
- class: c(s.value)
22
+ class: c(o.value)
16
23
  }, [
17
- d(t.$slots, "default")
18
- ], 10, p));
24
+ d(s.$slots, "default")
25
+ ], 10, f));
19
26
  }
20
27
  });
21
28
  export {
22
- u as default
29
+ m as default
23
30
  };
@@ -55,9 +55,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
55
55
  loading: boolean;
56
56
  readonly: boolean;
57
57
  disabled: boolean;
58
+ layout: "default" | "grouped";
58
59
  modelValue: any[];
59
60
  options: (IDropdownOption | string | number)[];
60
- layout: "default" | "grouped";
61
61
  hasMore: boolean;
62
62
  searchable: boolean;
63
63
  remote: boolean;
@@ -23,10 +23,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
23
23
  "onUpdate:modelValue"?: (val: number) => any;
24
24
  }>, {
25
25
  class: string;
26
+ layout: "horizontal" | "vertical";
26
27
  modelValue: number;
27
28
  min: number;
28
29
  max: number;
29
- layout: "horizontal" | "vertical";
30
30
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
31
31
  containerRef: HTMLDivElement;
32
32
  }, HTMLDivElement>;
@@ -1,7 +1,7 @@
1
1
  import o from "./Tabes.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-84e08076"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1e044fd1"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };