vlite3 1.2.8 → 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.
- package/components/Button.vue.d.ts +5 -1
- package/components/Button.vue.js +164 -72
- package/components/CategoryManager/CategoryManager.vue.js +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Dropdown/Dropdown.vue.d.ts +3 -3
- package/components/Dropdown/Dropdown.vue.js +14 -14
- package/components/Dropdown/DropdownGroupedLayout.vue.js +12 -12
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +2 -2
- package/components/Dropdown/DropdownMenu.vue2.js +1 -1
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +29 -25
- package/components/ImportData/ImportStep2.vue.js +0 -1
- package/components/Input.vue.js +6 -5
- package/components/Label.vue.d.ts +5 -2
- package/components/Label.vue.js +18 -11
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Splitter/Splitter.vue.d.ts +1 -1
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +53 -51
- package/components/Workbook/Sheet.vue.js +61 -57
- package/components/Workbook/Workbook.vue.js +2 -2
- package/components/Workbook/Workbook.vue2.js +25 -25
- package/components/Workbook/WorkbookAddButton.vue.js +9 -8
- package/directives/vRipple.d.ts +3 -1
- package/directives/vRipple.js +11 -11
- package/package.json +1 -1
- package/style.css +22 -3
- package/types/button.d.ts +2 -0
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -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
|
|
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
|
|
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:
|
|
38
|
-
const s = a, 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
|
|
64
|
-
const
|
|
65
|
-
return e === "dateRangePicker" && n && typeof n == "object" && (
|
|
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",
|
|
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(
|
|
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
|
|
120
|
+
class: "mb-2.5 block font-medium"
|
|
120
121
|
}, {
|
|
121
|
-
default:
|
|
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, "*")) :
|
|
125
|
+
e.required && a.showRequiredAsterisk ? (o(), u("span", ae, "*")) : i("", !0)
|
|
125
126
|
], 64))
|
|
126
127
|
]),
|
|
127
128
|
_: 2
|
|
128
|
-
}, 1032, ["for"])) :
|
|
129
|
+
}, 1032, ["for"])) : i("", !0),
|
|
129
130
|
Y("div", {
|
|
130
|
-
class: y([
|
|
131
|
-
|
|
132
|
-
|
|
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, "*")) :
|
|
148
|
+
e.required ? (o(), u("span", oe, "*")) : i("", !0)
|
|
145
149
|
], 64))
|
|
146
|
-
], 10, re)) :
|
|
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: (
|
|
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(
|
|
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:
|
|
181
|
+
default: D(() => [
|
|
178
182
|
V(F(c(e)) + " ", 1),
|
|
179
|
-
e.required ? (o(), u("span", ue, "*")) :
|
|
183
|
+
e.required ? (o(), u("span", ue, "*")) : i("", !0)
|
|
180
184
|
]),
|
|
181
185
|
_: 2
|
|
182
|
-
}, 1032, ["for"])) :
|
|
183
|
-
v(e) ? (o(), u("p", ce, F(v(e)), 1)) :
|
|
184
|
-
], 2)), n, 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
|
}
|
|
@@ -79,7 +79,6 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
|
|
|
79
79
|
options: D(),
|
|
80
80
|
selected: l.mappings[t],
|
|
81
81
|
placeholder: "Select Field",
|
|
82
|
-
variant: "outline",
|
|
83
82
|
showCaret: "",
|
|
84
83
|
"btn-props": { class: "w-full justify-between" },
|
|
85
84
|
onOnSelect: (p) => (l.mappings[t] = p.value, v("update:mappings", { ...l.mappings }))
|
package/components/Input.vue.js
CHANGED
|
@@ -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
|
-
),
|
|
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 = !!
|
|
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 = !!
|
|
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 || (
|
|
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:
|
|
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
|
-
|
|
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<
|
|
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;
|
package/components/Label.vue.js
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
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(
|
|
9
|
-
const e =
|
|
10
|
-
|
|
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 (
|
|
20
|
+
return (s, i) => (r(), n("label", {
|
|
14
21
|
for: e.for,
|
|
15
|
-
class: c(
|
|
22
|
+
class: c(o.value)
|
|
16
23
|
}, [
|
|
17
|
-
d(
|
|
18
|
-
], 10,
|
|
24
|
+
d(s.$slots, "default")
|
|
25
|
+
], 10, f));
|
|
19
26
|
}
|
|
20
27
|
});
|
|
21
28
|
export {
|
|
22
|
-
|
|
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
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1e044fd1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as T, ref as u, watch as l, onMounted as D, computed as p, openBlock as i, createElementBlock as v, normalizeClass as d, normalizeStyle as N, createCommentVNode as x, Fragment as O, renderList as P, createBlock as h, resolveDynamicComponent as F, mergeProps as _, withCtx as q, createElementVNode as G, toDisplayString as H, nextTick as J } from "vue";
|
|
2
|
+
import { useResizeObserver as K } from "@vueuse/core";
|
|
3
|
+
import Q from "../Icon.vue.js";
|
|
4
|
+
import { $t as U } from "../../utils/i18n.js";
|
|
5
|
+
const ee = /* @__PURE__ */ T({
|
|
6
6
|
__name: "Tabes",
|
|
7
7
|
props: {
|
|
8
8
|
options: {},
|
|
@@ -15,33 +15,35 @@ const Z = /* @__PURE__ */ E({
|
|
|
15
15
|
tabClass: {}
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue", "change"],
|
|
18
|
-
setup(s, { emit:
|
|
19
|
-
const r = s,
|
|
20
|
-
e ?
|
|
21
|
-
},
|
|
18
|
+
setup(s, { emit: C }) {
|
|
19
|
+
const r = s, y = C, f = u(null), b = u(/* @__PURE__ */ new Map()), k = (e, n) => {
|
|
20
|
+
e ? b.value.set(n, e) : b.value.delete(n);
|
|
21
|
+
}, m = u({
|
|
22
22
|
width: "0px",
|
|
23
23
|
height: "0px",
|
|
24
24
|
transform: "translate(0px, 0px)",
|
|
25
25
|
opacity: 0
|
|
26
|
-
}), o = async () => {
|
|
27
|
-
await
|
|
28
|
-
const e =
|
|
26
|
+
}), g = u(!1), o = async () => {
|
|
27
|
+
await J();
|
|
28
|
+
const e = f.value, n = b.value.get(r.modelValue);
|
|
29
29
|
if (!e || !n) {
|
|
30
|
-
|
|
30
|
+
m.value.opacity = 0;
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
const t = e.getBoundingClientRect(), a = n.getBoundingClientRect(), c = a.left - t.left,
|
|
34
|
-
|
|
35
|
-
width: `${
|
|
36
|
-
height: `${
|
|
37
|
-
transform: `translate(${c}px, ${
|
|
33
|
+
const t = e.getBoundingClientRect(), a = n.getBoundingClientRect(), c = a.left - t.left, j = a.top - t.top, A = a.width, E = a.height;
|
|
34
|
+
m.value = {
|
|
35
|
+
width: `${A}px`,
|
|
36
|
+
height: `${E}px`,
|
|
37
|
+
transform: `translate(${c}px, ${j}px)`,
|
|
38
38
|
opacity: 1
|
|
39
|
-
}
|
|
39
|
+
}, g.value || setTimeout(() => {
|
|
40
|
+
g.value = !0;
|
|
41
|
+
}, 50);
|
|
40
42
|
};
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
e.disabled || (
|
|
44
|
-
},
|
|
43
|
+
K(f, o), l(() => r.modelValue, o), l(() => r.options, o, { deep: !0 }), l(() => r.size, o), l(() => r.block, o), l(() => r.wrap, o), D(o);
|
|
44
|
+
const w = (e) => {
|
|
45
|
+
e.disabled || (y("update:modelValue", e.value), y("change", e.value));
|
|
46
|
+
}, z = p(() => {
|
|
45
47
|
const e = r.variant === "line", n = {
|
|
46
48
|
surface: "bg-secondary/80 p-1",
|
|
47
49
|
primary: "bg-secondary p-1",
|
|
@@ -52,14 +54,14 @@ const Z = /* @__PURE__ */ E({
|
|
|
52
54
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
53
55
|
}, t = r.wrap && !e ? "flex-wrap" : "";
|
|
54
56
|
return [`${r.block || e ? "flex w-full" : "inline-flex"} rounded-lg relative isolate ${t}`, n[r.variant]];
|
|
55
|
-
}),
|
|
57
|
+
}), $ = {
|
|
56
58
|
sm: "text-xs px-2.5 py-1",
|
|
57
59
|
md: "-text-fs-2 px-3 py-1",
|
|
58
60
|
lg: "-text-fs-1 px-4 py-1"
|
|
59
|
-
},
|
|
61
|
+
}, V = p(() => {
|
|
60
62
|
const e = r.variant === "line", n = e ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none focus-visible:ring-2 focus-visible:ring-primary/50 pb-2 border-b-2 border-transparent hover:text-foreground" : "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-primary/50", t = (r.block || r.wrap) && !e ? "flex-1" : "";
|
|
61
63
|
return [n, t];
|
|
62
|
-
}),
|
|
64
|
+
}), R = (e) => {
|
|
63
65
|
const n = e.value === r.modelValue, t = r.variant === "line";
|
|
64
66
|
let a = "";
|
|
65
67
|
if (n)
|
|
@@ -91,11 +93,11 @@ const Z = /* @__PURE__ */ E({
|
|
|
91
93
|
else
|
|
92
94
|
a = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
93
95
|
const c = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
94
|
-
return [
|
|
95
|
-
},
|
|
96
|
-
const
|
|
97
|
-
return r.variant === "line" ? `${
|
|
98
|
-
}),
|
|
96
|
+
return [V.value, a, r?.tabClass, c].join(" ");
|
|
97
|
+
}, B = p(() => {
|
|
98
|
+
const n = `absolute left-0 top-0 z-0 pointer-events-none ${g.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
|
|
99
|
+
return r.variant === "line" ? `${n} !h-[2px] !top-auto bottom-0` : `${n} rounded-md shadow-sm`;
|
|
100
|
+
}), S = () => ({
|
|
99
101
|
surface: "bg-background",
|
|
100
102
|
primary: "bg-primary",
|
|
101
103
|
secondary: "bg-secondary-foreground",
|
|
@@ -103,39 +105,39 @@ const Z = /* @__PURE__ */ E({
|
|
|
103
105
|
success: "bg-success",
|
|
104
106
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
105
107
|
line: "bg-primary"
|
|
106
|
-
})[r.variant],
|
|
107
|
-
return (e, n) => (i(),
|
|
108
|
+
})[r.variant], I = (e) => e.labelI18n ? U(e.labelI18n) : e.label, L = (e) => e.to ? "router-link" : e.href ? "a" : "button", M = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" };
|
|
109
|
+
return (e, n) => (i(), v("div", {
|
|
108
110
|
ref_key: "containerRef",
|
|
109
|
-
ref:
|
|
110
|
-
class:
|
|
111
|
+
ref: f,
|
|
112
|
+
class: d(z.value),
|
|
111
113
|
role: "tablist",
|
|
112
114
|
"data-tabes": ""
|
|
113
115
|
}, [
|
|
114
|
-
s.modelValue !== void 0 && !s.wrap ? (i(),
|
|
116
|
+
s.modelValue !== void 0 && !s.wrap ? (i(), v("div", {
|
|
115
117
|
key: 0,
|
|
116
|
-
class:
|
|
117
|
-
style: N(
|
|
118
|
-
}, null, 6)) :
|
|
119
|
-
(i(!0),
|
|
118
|
+
class: d([B.value, S()]),
|
|
119
|
+
style: N(m.value)
|
|
120
|
+
}, null, 6)) : x("", !0),
|
|
121
|
+
(i(!0), v(O, null, P(s.options, (t) => (i(), h(F(L(t)), _({
|
|
120
122
|
key: t.value,
|
|
121
123
|
ref_for: !0,
|
|
122
124
|
ref: (a) => k(a?.$el || a, t.value),
|
|
123
125
|
role: "tab",
|
|
124
126
|
"aria-selected": s.modelValue === t.value,
|
|
125
127
|
disabled: t.disabled,
|
|
126
|
-
class: [
|
|
127
|
-
}, { ref_for: !0 },
|
|
128
|
-
onClick: (a) =>
|
|
128
|
+
class: [R(t), $[r.size]]
|
|
129
|
+
}, { ref_for: !0 }, M(t), {
|
|
130
|
+
onClick: (a) => w(t)
|
|
129
131
|
}), {
|
|
130
|
-
default:
|
|
131
|
-
t.icon ? (i(),
|
|
132
|
+
default: q(() => [
|
|
133
|
+
t.icon ? (i(), h(Q, {
|
|
132
134
|
key: 0,
|
|
133
135
|
icon: t.icon,
|
|
134
|
-
class:
|
|
135
|
-
}, null, 8, ["icon", "class"])) :
|
|
136
|
-
|
|
137
|
-
class:
|
|
138
|
-
},
|
|
136
|
+
class: d(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
137
|
+
}, null, 8, ["icon", "class"])) : x("", !0),
|
|
138
|
+
G("span", {
|
|
139
|
+
class: d(["whitespace-nowrap z-20 relative", s.textClass])
|
|
140
|
+
}, H(I(t)), 3)
|
|
139
141
|
]),
|
|
140
142
|
_: 2
|
|
141
143
|
}, 1040, ["aria-selected", "disabled", "class", "onClick"]))), 128))
|
|
@@ -143,5 +145,5 @@ const Z = /* @__PURE__ */ E({
|
|
|
143
145
|
}
|
|
144
146
|
});
|
|
145
147
|
export {
|
|
146
|
-
|
|
148
|
+
ee as default
|
|
147
149
|
};
|