vlite3 1.4.30 → 1.4.32
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/Accordion/Accordion.vue.js +19 -16
- package/components/Accordion/AccordionContent.vue.js +2 -2
- package/components/Accordion/AccordionItem.vue.js +38 -36
- package/components/CategoryManager/CategoryManager.vue2.js +3 -2
- package/components/Chart/GanttChart.vue.d.ts +13 -1
- package/components/Chart/GanttChart.vue.js +2 -2
- package/components/Chart/GanttChart.vue2.js +1185 -607
- package/components/Chart/GanttChartDateUtils.d.ts +38 -0
- package/components/Chart/GanttChartDateUtils.js +79 -0
- package/components/Chart/GanttChartDependencyUtils.d.ts +92 -0
- package/components/Chart/GanttChartDependencyUtils.js +113 -0
- package/components/Chart/GanttChartResizePreviewUtils.d.ts +52 -0
- package/components/Chart/GanttChartResizePreviewUtils.js +53 -0
- package/components/Chart/GanttChartTooltipUtils.d.ts +41 -0
- package/components/Chart/GanttChartTooltipUtils.js +63 -0
- package/components/Chart/index.d.ts +3 -1
- package/components/Chart/types.d.ts +76 -1
- package/components/Chart/types.js +8 -0
- package/components/FilePicker/FilePickerDropzone.vue.js +1 -1
- package/components/FilePicker/index.vue.js +2 -4
- package/components/Form/AccordionView.vue2.js +5 -2
- package/components/Form/AccordionView.vue3.js +250 -0
- package/components/Form/Form.vue.d.ts +0 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +415 -354
- package/components/Form/FormField.vue.js +175 -196
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +60 -60
- package/components/Form/FormSkeleton.vue.js +50 -35
- package/components/Form/TableView.vue.js +59 -43
- package/components/Form/composables/useForm.js +159 -148
- package/components/Form/index.vue2.js +8 -8
- package/components/Form/utils/form.utils.d.ts +2 -0
- package/components/Form/utils/form.utils.js +17 -13
- package/components/GoogleMap.vue.d.ts +1 -1
- package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +189 -0
- package/components/PanZoomViewport/PanZoomViewport.vue.js +7 -0
- package/components/PanZoomViewport/PanZoomViewport.vue2.js +536 -0
- package/components/PanZoomViewport/index.d.ts +2 -0
- package/components/PanZoomViewport/types.d.ts +121 -0
- package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +3 -0
- package/components/ScaleGenerator/ScaleGenerator.vue.js +5 -108
- package/components/ScaleGenerator/ScaleGenerator.vue2.js +143 -2
- package/components/ScaleGenerator/types.d.ts +2 -0
- package/components/Screen/ScreenFilter.vue.js +18 -17
- package/components/SeoProvider/SeoProvider.vue.d.ts +4 -1
- package/components/SeoProvider/SeoProvider.vue.js +39 -33
- package/components/SeoProvider/domAdapter.d.ts +1 -4
- package/components/SeoProvider/domAdapter.js +71 -58
- package/components/SeoProvider/index.d.ts +5 -2
- package/components/SeoProvider/normalizeSeo.d.ts +10 -49
- package/components/SeoProvider/normalizeSeo.js +246 -182
- package/components/SeoProvider/plainText.d.ts +8 -0
- package/components/SeoProvider/plainText.js +117 -0
- package/components/SeoProvider/seoUrl.d.ts +13 -0
- package/components/SeoProvider/seoUrl.js +25 -0
- package/components/SeoProvider/structuredData.d.ts +100 -0
- package/components/SeoProvider/structuredData.js +33 -0
- package/components/SeoProvider/types.d.ts +47 -109
- package/components/Tabes/Tabes.vue.d.ts +10 -1
- package/components/Tabes/Tabes.vue.js +1 -1
- package/components/Tabes/Tabes.vue2.js +271 -170
- package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
- package/components/Tabes/TabesMarkerGeometry.js +21 -0
- package/components/Tabes/tabes.utils.d.ts +14 -0
- package/components/Tabes/tabes.utils.js +26 -0
- package/components/Tabes/types.d.ts +32 -0
- package/components/ThemeProvider/ThemeProvider.vue.d.ts +2 -0
- package/components/ThemeProvider/ThemeProvider.vue.js +29 -23
- package/components/ThemeProvider/index.d.ts +1 -1
- package/components/ThemeProvider/themeVars.d.ts +9 -13
- package/components/ThemeProvider/themeVars.js +173 -125
- package/components/ThemeProvider/types.d.ts +10 -0
- package/components/index.d.ts +2 -1
- package/index.d.ts +1 -0
- package/index.js +415 -387
- package/package.json +3 -2
- package/style.css +1 -1
- package/components/Form/AccordionView.vue.js +0 -222
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as Ce, ref as h, computed as d, watch as p, onMounted as Ve, onBeforeUnmount as ze, openBlock as f, createElementBlock as $, normalizeClass as l, withDirectives as M, createVNode as y, vShow as L, createElementVNode as c, normalizeStyle as Se, createCommentVNode as E, Fragment as J, renderList as Be, unref as X, createBlock as A, withCtx as Y, toDisplayString as Z, withMemo as $e, resolveDynamicComponent as Me, mergeProps as Le, nextTick as Ae } from "vue";
|
|
2
|
+
import { useResizeObserver as _ } from "@vueuse/core";
|
|
3
|
+
import { getActiveMarkerKey as Oe, isMenuTab as ee, isTabActive as te } from "./tabes.utils.js";
|
|
4
|
+
import { measureTabesMarkerGeometry as Re, toTabesLocalScrollDelta as ne } from "./TabesMarkerGeometry.js";
|
|
5
|
+
import w from "../Icon.vue.js";
|
|
6
|
+
import re from "../FadeOverlay/FadeOverlay.vue.js";
|
|
7
|
+
import Fe from "../Dropdown/Dropdown.vue.js";
|
|
8
|
+
import { $t as Ie } from "../../utils/i18n.js";
|
|
9
|
+
const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded", "disabled"], Qe = /* @__PURE__ */ Ce({
|
|
7
10
|
__name: "Tabes",
|
|
8
11
|
props: {
|
|
9
12
|
options: {},
|
|
@@ -13,95 +16,130 @@ const ce = ["data-variant"], me = /* @__PURE__ */ Y({
|
|
|
13
16
|
block: { type: Boolean, default: !1 },
|
|
14
17
|
textClass: {},
|
|
15
18
|
wrap: { type: Boolean, default: !1 },
|
|
16
|
-
tabClass: {}
|
|
19
|
+
tabClass: {},
|
|
20
|
+
direction: { default: "ltr" }
|
|
17
21
|
},
|
|
18
|
-
emits: ["update:modelValue", "change"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
emits: ["update:modelValue", "change", "menu-select", "menu-open", "menu-close"],
|
|
23
|
+
setup(s, { emit: ae }) {
|
|
24
|
+
const n = s, m = ae, k = h(null), u = h(null), v = /* @__PURE__ */ new Map(), C = h(!1), V = h(!1);
|
|
25
|
+
let O = 0, T = 0, z = !1, S = !1, R = 0;
|
|
26
|
+
const j = () => {
|
|
27
|
+
if (!u.value) return;
|
|
28
|
+
const { scrollLeft: e, scrollWidth: r, clientWidth: t } = u.value, a = e > 1, o = Math.ceil(e + t) < r - 1;
|
|
29
|
+
C.value !== a && (C.value = a), V.value !== o && (V.value = o);
|
|
30
|
+
}, se = () => {
|
|
31
|
+
S || (S = !0, T = requestAnimationFrame(() => {
|
|
32
|
+
S = !1, j();
|
|
33
|
+
}));
|
|
34
|
+
}, q = (e) => {
|
|
35
|
+
u.value && u.value.scrollBy({ left: e, behavior: "smooth" });
|
|
36
|
+
}, D = d(() => Oe(n.options, n.modelValue)), oe = () => {
|
|
37
|
+
if (!u.value || !k.value) return;
|
|
38
|
+
const e = D.value;
|
|
39
|
+
if (e === void 0) return;
|
|
40
|
+
const r = v.get(e);
|
|
41
|
+
if (!r) return;
|
|
42
|
+
const t = u.value, a = r.getBoundingClientRect(), o = t.getBoundingClientRect(), g = 40;
|
|
43
|
+
a.left < o.left + g ? t.scrollBy({
|
|
44
|
+
left: ne(
|
|
45
|
+
t,
|
|
46
|
+
a.left - o.left - g
|
|
47
|
+
),
|
|
33
48
|
behavior: "smooth"
|
|
34
|
-
}) :
|
|
35
|
-
left:
|
|
49
|
+
}) : a.right > o.right - g && t.scrollBy({
|
|
50
|
+
left: ne(
|
|
51
|
+
t,
|
|
52
|
+
a.right - o.right + g
|
|
53
|
+
),
|
|
36
54
|
behavior: "smooth"
|
|
37
55
|
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
e ? p.value.set(a, e) : p.value.delete(a);
|
|
42
|
-
}, k = d({
|
|
56
|
+
}, W = (e, r) => {
|
|
57
|
+
e instanceof HTMLElement ? v.set(r, e) : e && typeof e == "object" && "$el" in e && e.$el instanceof HTMLElement ? v.set(r, e.$el) : v.delete(r);
|
|
58
|
+
}, b = h({
|
|
43
59
|
width: "0px",
|
|
44
60
|
height: "0px",
|
|
45
61
|
transform: "translate(0px, 0px)",
|
|
46
62
|
opacity: 0
|
|
47
|
-
}),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
63
|
+
}), F = h(!1), P = () => {
|
|
64
|
+
b.value.opacity !== 0 && (b.value = {
|
|
65
|
+
...b.value,
|
|
66
|
+
opacity: 0
|
|
67
|
+
});
|
|
68
|
+
}, le = async () => {
|
|
69
|
+
await Ae();
|
|
70
|
+
const e = k.value, r = D.value, t = r !== void 0 ? v.get(r) : void 0;
|
|
71
|
+
if (!e || !t) {
|
|
72
|
+
P();
|
|
52
73
|
return;
|
|
53
74
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
75
|
+
if (e.offsetWidth <= 0 || t.offsetWidth <= 0) {
|
|
76
|
+
P();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const { width: a, height: o, left: g, top: ke } = Re(e, t), x = {
|
|
80
|
+
width: `${a}px`,
|
|
81
|
+
height: `${o}px`,
|
|
82
|
+
transform: `translate(${g}px, ${ke}px)`,
|
|
59
83
|
opacity: 1
|
|
60
|
-
}, B.value
|
|
61
|
-
|
|
62
|
-
|
|
84
|
+
}, B = b.value;
|
|
85
|
+
B.width === x.width && B.height === x.height && B.transform === x.transform && B.opacity === x.opacity || (b.value = x, F.value || (cancelAnimationFrame(R), R = requestAnimationFrame(() => {
|
|
86
|
+
F.value = !0;
|
|
87
|
+
})));
|
|
63
88
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{
|
|
77
|
-
),
|
|
78
|
-
() =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
() =>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
),
|
|
93
|
-
|
|
89
|
+
let I = !1;
|
|
90
|
+
const H = async (e) => {
|
|
91
|
+
await le(), j(), e?.ensureVisible && oe();
|
|
92
|
+
}, i = (e) => {
|
|
93
|
+
e?.ensureVisible && (I = !0), !z && (z = !0, cancelAnimationFrame(O), O = requestAnimationFrame(() => {
|
|
94
|
+
z = !1;
|
|
95
|
+
const r = I;
|
|
96
|
+
I = !1, H({ ensureVisible: r });
|
|
97
|
+
}));
|
|
98
|
+
};
|
|
99
|
+
_(u, () => i()), _(k, () => i()), p(
|
|
100
|
+
() => n.modelValue,
|
|
101
|
+
() => i({ ensureVisible: !0 })
|
|
102
|
+
), p(
|
|
103
|
+
() => n.options,
|
|
104
|
+
() => i()
|
|
105
|
+
), p(
|
|
106
|
+
() => n.size,
|
|
107
|
+
() => i()
|
|
108
|
+
), p(
|
|
109
|
+
() => n.block,
|
|
110
|
+
() => i()
|
|
111
|
+
), p(
|
|
112
|
+
() => n.wrap,
|
|
113
|
+
() => i()
|
|
114
|
+
), p(
|
|
115
|
+
() => n.variant,
|
|
116
|
+
() => i()
|
|
117
|
+
), Ve(() => {
|
|
118
|
+
H({ ensureVisible: !0 });
|
|
119
|
+
}), ze(() => {
|
|
120
|
+
cancelAnimationFrame(O), cancelAnimationFrame(T), cancelAnimationFrame(R), z = !1, S = !1, v.clear();
|
|
94
121
|
});
|
|
95
|
-
const
|
|
96
|
-
const e =
|
|
97
|
-
return
|
|
98
|
-
}),
|
|
122
|
+
const ie = d(() => {
|
|
123
|
+
const e = n.variant === "line";
|
|
124
|
+
return n.block || e ? "flex w-full relative" : "inline-flex max-w-full relative";
|
|
125
|
+
}), N = d(() => [
|
|
99
126
|
"absolute top-0 bottom-0 z-20 flex items-center pointer-events-none transition-opacity duration-200",
|
|
100
|
-
|
|
101
|
-
]),
|
|
102
|
-
e.disabled || (
|
|
103
|
-
},
|
|
104
|
-
|
|
127
|
+
n.variant === "line" ? "pb-[10px]" : ""
|
|
128
|
+
]), ce = (e) => {
|
|
129
|
+
e.disabled || ee(e) || (m("update:modelValue", e.value), m("change", e.value));
|
|
130
|
+
}, ue = (e, r) => {
|
|
131
|
+
if (e.disabled) return;
|
|
132
|
+
const t = r.value;
|
|
133
|
+
t != null && (m("update:modelValue", t), m("change", t), m("menu-select", { value: t, option: r.option, tab: e }));
|
|
134
|
+
}, de = (e) => {
|
|
135
|
+
m("menu-open", e);
|
|
136
|
+
}, fe = (e) => {
|
|
137
|
+
m("menu-close", e), i();
|
|
138
|
+
}, me = d(() => {
|
|
139
|
+
const e = n.variant === "line";
|
|
140
|
+
return (n.block || n.wrap) && !e ? "flex-1 min-w-max" : "shrink-0";
|
|
141
|
+
}), ve = (e) => e.dropdown?.direction ?? n.direction, be = d(() => {
|
|
142
|
+
const e = n.variant === "line", r = {
|
|
105
143
|
surface: "bg-secondary/80 p-1",
|
|
106
144
|
primary: "bg-secondary p-1",
|
|
107
145
|
secondary: "bg-secondary p-1",
|
|
@@ -109,52 +147,52 @@ const ce = ["data-variant"], me = /* @__PURE__ */ Y({
|
|
|
109
147
|
success: "bg-success/10 p-1",
|
|
110
148
|
outline: "bg-transparent border border-border p-1",
|
|
111
149
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
112
|
-
},
|
|
113
|
-
return [`${
|
|
114
|
-
}),
|
|
150
|
+
}, t = n.wrap && !e ? "flex-wrap" : "";
|
|
151
|
+
return [`${n.block || e ? "flex min-w-full w-max" : "inline-flex"} rounded-lg relative isolate ${t}`, r[n.variant]];
|
|
152
|
+
}), G = d(() => n.variant === "surface" || n.variant === "primary" || n.variant === "secondary" ? "var(--color-secondary)" : n.variant === "danger" ? "color-mix(in srgb, var(--color-danger) 10%, transparent)" : n.variant === "success" ? "color-mix(in srgb, var(--color-success) 10%, transparent)" : "var(--color-background)"), K = {
|
|
115
153
|
sm: "text-xs px-2.5 py-1",
|
|
116
154
|
md: "-text-fs-2 px-3 py-1",
|
|
117
155
|
lg: "-text-fs-1 px-4 py-1"
|
|
118
|
-
},
|
|
119
|
-
const e =
|
|
120
|
-
return [
|
|
121
|
-
}),
|
|
122
|
-
const
|
|
123
|
-
let
|
|
124
|
-
if (
|
|
125
|
-
if (
|
|
126
|
-
|
|
156
|
+
}, ge = d(() => {
|
|
157
|
+
const e = n.variant === "line", r = 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 pb-3 border-b-2 border-transparent hover:text-foreground shrink-0" : "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 shrink-0", t = (n.block || n.wrap) && !e ? "flex-1" : "";
|
|
158
|
+
return [r, t];
|
|
159
|
+
}), Q = (e) => {
|
|
160
|
+
const r = te(e, n.modelValue), t = n.variant === "line";
|
|
161
|
+
let a = "";
|
|
162
|
+
if (r)
|
|
163
|
+
if (t)
|
|
164
|
+
a = n.wrap ? "text-primary !border-primary" : "text-primary";
|
|
127
165
|
else
|
|
128
|
-
switch (
|
|
166
|
+
switch (n.variant) {
|
|
129
167
|
case "surface":
|
|
130
|
-
|
|
168
|
+
a = n.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
|
|
131
169
|
break;
|
|
132
170
|
case "primary":
|
|
133
|
-
|
|
171
|
+
a = n.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
|
|
134
172
|
break;
|
|
135
173
|
case "secondary":
|
|
136
|
-
|
|
174
|
+
a = n.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
|
|
137
175
|
break;
|
|
138
176
|
case "danger":
|
|
139
|
-
|
|
177
|
+
a = n.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
|
|
140
178
|
break;
|
|
141
179
|
case "success":
|
|
142
|
-
|
|
180
|
+
a = n.wrap ? "text-success-fg bg-success" : "text-success-fg";
|
|
143
181
|
break;
|
|
144
182
|
case "outline":
|
|
145
|
-
|
|
183
|
+
a = n.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
|
|
146
184
|
break;
|
|
147
185
|
default:
|
|
148
|
-
|
|
186
|
+
a = "text-foreground";
|
|
149
187
|
}
|
|
150
188
|
else
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
return [
|
|
154
|
-
},
|
|
155
|
-
const
|
|
156
|
-
return
|
|
157
|
-
}),
|
|
189
|
+
a = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
190
|
+
const o = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
191
|
+
return [ge.value, a, n?.tabClass, o].join(" ");
|
|
192
|
+
}, he = d(() => {
|
|
193
|
+
const r = `absolute left-0 top-0 z-0 pointer-events-none ${F.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
|
|
194
|
+
return n.variant === "line" ? `${r} !h-[2px] !top-auto bottom-0` : `${r} rounded-md shadow-sm`;
|
|
195
|
+
}), pe = () => ({
|
|
158
196
|
surface: "bg-[#ffff] dark:bg-[#0B0B0B]",
|
|
159
197
|
primary: "bg-primary",
|
|
160
198
|
secondary: "bg-secondary-foreground",
|
|
@@ -162,112 +200,175 @@ const ce = ["data-variant"], me = /* @__PURE__ */ Y({
|
|
|
162
200
|
success: "bg-success",
|
|
163
201
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
164
202
|
line: "bg-primary"
|
|
165
|
-
})[
|
|
166
|
-
|
|
167
|
-
|
|
203
|
+
})[n.variant], U = (e) => e.labelI18n ? Ie(e.labelI18n) : e.label, xe = (e) => e.to ? "router-link" : e.href ? "a" : "button", ye = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, we = (e) => [
|
|
204
|
+
n.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5",
|
|
205
|
+
"opacity-70 shrink-0 transition-transform duration-200",
|
|
206
|
+
e ? "rotate-180" : ""
|
|
207
|
+
].join(" ");
|
|
208
|
+
return (e, r) => (f(), $("div", {
|
|
209
|
+
class: l([ie.value, "group"]),
|
|
210
|
+
dir: s.direction
|
|
168
211
|
}, [
|
|
169
|
-
|
|
212
|
+
M(y(re, {
|
|
170
213
|
direction: "left",
|
|
171
|
-
color:
|
|
214
|
+
color: G.value,
|
|
172
215
|
coverage: "100px",
|
|
173
216
|
blur: "40px",
|
|
174
217
|
easing: "smooth",
|
|
175
218
|
tintOpacity: 1,
|
|
176
|
-
class: l(["z-10 pointer-events-none",
|
|
219
|
+
class: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-l-lg"])
|
|
177
220
|
}, null, 8, ["color", "class"]), [
|
|
178
|
-
[
|
|
221
|
+
[L, C.value]
|
|
179
222
|
]),
|
|
180
|
-
|
|
181
|
-
class: l(["left-0 pl-1",
|
|
223
|
+
M(c("div", {
|
|
224
|
+
class: l(["left-0 pl-1", N.value])
|
|
182
225
|
}, [
|
|
183
|
-
|
|
184
|
-
onClick:
|
|
226
|
+
c("button", {
|
|
227
|
+
onClick: r[0] || (r[0] = (t) => q(-200)),
|
|
185
228
|
class: "pointer-events-auto h-full px-1 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors focus:outline-none",
|
|
186
229
|
"aria-label": "Scroll left"
|
|
187
230
|
}, [
|
|
188
|
-
y(
|
|
231
|
+
y(w, {
|
|
189
232
|
icon: "lucide:chevron-left",
|
|
190
233
|
class: "w-5 h-5"
|
|
191
234
|
})
|
|
192
235
|
])
|
|
193
236
|
], 2), [
|
|
194
|
-
[
|
|
237
|
+
[L, C.value]
|
|
195
238
|
]),
|
|
196
|
-
|
|
239
|
+
c("div", {
|
|
197
240
|
ref_key: "scrollRef",
|
|
198
|
-
ref:
|
|
199
|
-
class: "flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
|
|
200
|
-
onScroll:
|
|
241
|
+
ref: u,
|
|
242
|
+
class: "tabes-scroll flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
|
|
243
|
+
onScroll: se
|
|
201
244
|
}, [
|
|
202
|
-
|
|
245
|
+
c("div", {
|
|
203
246
|
ref_key: "containerRef",
|
|
204
|
-
ref:
|
|
205
|
-
class: l([
|
|
247
|
+
ref: k,
|
|
248
|
+
class: l([be.value, "tabes-container"]),
|
|
206
249
|
role: "tablist",
|
|
207
|
-
"data-variant":
|
|
250
|
+
"data-variant": n.variant,
|
|
208
251
|
"data-tabes": ""
|
|
209
252
|
}, [
|
|
210
|
-
|
|
253
|
+
s.modelValue !== void 0 && !s.wrap ? (f(), $("div", {
|
|
211
254
|
key: 0,
|
|
212
|
-
class: l([
|
|
213
|
-
style:
|
|
214
|
-
}, null, 6)) :
|
|
215
|
-
(
|
|
216
|
-
key:
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
255
|
+
class: l(["tabes-marker", [he.value, pe()]]),
|
|
256
|
+
style: Se(b.value)
|
|
257
|
+
}, null, 6)) : E("", !0),
|
|
258
|
+
(f(!0), $(J, null, Be(s.options, (t) => (f(), $(J, {
|
|
259
|
+
key: t.value
|
|
260
|
+
}, [
|
|
261
|
+
X(ee)(t) ? (f(), A(Fe, {
|
|
262
|
+
key: 0,
|
|
263
|
+
options: t.menu,
|
|
264
|
+
selected: s.modelValue,
|
|
265
|
+
disabled: t.disabled,
|
|
266
|
+
direction: ve(t),
|
|
267
|
+
position: t.dropdown?.position,
|
|
268
|
+
offset: t.dropdown?.offset ?? [0, 8],
|
|
269
|
+
searchable: t.dropdown?.searchable ?? !1,
|
|
270
|
+
"close-on-select": t.dropdown?.closeOnSelect ?? !0,
|
|
271
|
+
"max-height": t.dropdown?.maxHeight ?? "300px",
|
|
272
|
+
"min-width": t.dropdown?.minWidth ?? "160px",
|
|
273
|
+
width: t.dropdown?.width,
|
|
274
|
+
"menu-id": t.dropdown?.menuId ?? `tabes-menu-${t.value}`,
|
|
275
|
+
teleport: t.dropdown?.teleport ?? !0,
|
|
276
|
+
"show-selected-label": !1,
|
|
277
|
+
"show-selected-icon": !1,
|
|
278
|
+
"toggle-selection": !1,
|
|
279
|
+
selectable: !0,
|
|
280
|
+
class: l(["tabes-menu", "inline-flex!", me.value]),
|
|
281
|
+
onOnSelect: (a) => ue(t, a),
|
|
282
|
+
onOnOpen: () => de(t),
|
|
283
|
+
onOnClose: () => fe(t)
|
|
284
|
+
}, {
|
|
285
|
+
trigger: Y(({ isOpen: a }) => [
|
|
286
|
+
c("button", {
|
|
287
|
+
ref_for: !0,
|
|
288
|
+
ref: (o) => W(o, t.value),
|
|
289
|
+
type: "button",
|
|
290
|
+
role: "tab",
|
|
291
|
+
"data-tabes-item": "",
|
|
292
|
+
"data-tabes-menu-trigger": "",
|
|
293
|
+
"aria-selected": X(te)(t, s.modelValue),
|
|
294
|
+
"aria-haspopup": !0,
|
|
295
|
+
"aria-expanded": a,
|
|
296
|
+
disabled: t.disabled,
|
|
297
|
+
class: l([Q(t), K[n.size], "w-full"])
|
|
298
|
+
}, [
|
|
299
|
+
t.icon ? (f(), A(w, {
|
|
300
|
+
key: 0,
|
|
301
|
+
icon: t.icon,
|
|
302
|
+
class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
303
|
+
}, null, 8, ["icon", "class"])) : E("", !0),
|
|
304
|
+
c("span", {
|
|
305
|
+
class: l(["whitespace-nowrap z-20 relative", s.textClass])
|
|
306
|
+
}, Z(U(t)), 3),
|
|
307
|
+
y(w, {
|
|
308
|
+
icon: "lucide:chevron-down",
|
|
309
|
+
class: l(we(a)),
|
|
310
|
+
"aria-hidden": "true"
|
|
311
|
+
}, null, 8, ["class"])
|
|
312
|
+
], 10, je)
|
|
313
|
+
]),
|
|
314
|
+
_: 2
|
|
315
|
+
}, 1032, ["options", "selected", "disabled", "direction", "position", "offset", "searchable", "close-on-select", "max-height", "min-width", "width", "menu-id", "teleport", "class", "onOnSelect", "onOnOpen", "onOnClose"])) : $e([t, s.modelValue === t.value, s.size, s.variant, s.block, s.wrap, s.tabClass, s.textClass], () => (f(), A(Me(xe(t)), Le({
|
|
316
|
+
key: 1,
|
|
317
|
+
ref_for: !0,
|
|
318
|
+
ref: (a) => W(a, t.value),
|
|
319
|
+
role: "tab",
|
|
320
|
+
"data-tabes-item": "",
|
|
321
|
+
"aria-selected": s.modelValue === t.value,
|
|
322
|
+
disabled: t.disabled,
|
|
323
|
+
class: [Q(t), K[n.size]]
|
|
324
|
+
}, { ref_for: !0 }, ye(t), {
|
|
325
|
+
onClick: (a) => ce(t)
|
|
326
|
+
}), {
|
|
327
|
+
default: Y(() => [
|
|
328
|
+
t.icon ? (f(), A(w, {
|
|
329
|
+
key: 0,
|
|
330
|
+
icon: t.icon,
|
|
331
|
+
class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
332
|
+
}, null, 8, ["icon", "class"])) : E("", !0),
|
|
333
|
+
c("span", {
|
|
334
|
+
class: l(["whitespace-nowrap z-20 relative", s.textClass])
|
|
335
|
+
}, Z(U(t)), 3)
|
|
336
|
+
]),
|
|
337
|
+
_: 2
|
|
338
|
+
}, 1040, ["aria-selected", "disabled", "class", "onClick"])), r, 1)
|
|
339
|
+
], 64))), 128))
|
|
340
|
+
], 10, Te)
|
|
240
341
|
], 544),
|
|
241
|
-
|
|
342
|
+
M(y(re, {
|
|
242
343
|
direction: "right",
|
|
243
|
-
color:
|
|
344
|
+
color: G.value,
|
|
244
345
|
coverage: "100px",
|
|
245
346
|
blur: "40",
|
|
246
347
|
easing: "smooth",
|
|
247
348
|
tintOpacity: 1,
|
|
248
|
-
class: l(["z-10 pointer-events-none",
|
|
349
|
+
class: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-r-lg"])
|
|
249
350
|
}, null, 8, ["color", "class"]), [
|
|
250
|
-
[
|
|
351
|
+
[L, V.value]
|
|
251
352
|
]),
|
|
252
|
-
|
|
253
|
-
class: l(["right-0 pr-1",
|
|
353
|
+
M(c("div", {
|
|
354
|
+
class: l(["right-0 pr-1", N.value])
|
|
254
355
|
}, [
|
|
255
|
-
|
|
256
|
-
onClick:
|
|
356
|
+
c("button", {
|
|
357
|
+
onClick: r[2] || (r[2] = (t) => q(200)),
|
|
257
358
|
class: "pointer-events-auto h-full px-1 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors focus:outline-none",
|
|
258
359
|
"aria-label": "Scroll right"
|
|
259
360
|
}, [
|
|
260
|
-
y(
|
|
361
|
+
y(w, {
|
|
261
362
|
icon: "lucide:chevron-right",
|
|
262
363
|
class: "w-5 h-5"
|
|
263
364
|
})
|
|
264
365
|
])
|
|
265
366
|
], 2), [
|
|
266
|
-
[
|
|
367
|
+
[L, V.value]
|
|
267
368
|
])
|
|
268
|
-
],
|
|
369
|
+
], 10, Ee));
|
|
269
370
|
}
|
|
270
371
|
});
|
|
271
372
|
export {
|
|
272
|
-
|
|
373
|
+
Qe as default
|
|
273
374
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local-coordinate geometry helpers for the Tabes active marker.
|
|
3
|
+
*
|
|
4
|
+
* Ancestor CSS transforms (e.g. ScaleGenerator's `transform: scale(...)`)
|
|
5
|
+
* affect `getBoundingClientRect()` but not layout sizes (`offsetWidth`).
|
|
6
|
+
* Feeding visual rect sizes into local CSS `width` / `translate` would
|
|
7
|
+
* double-apply the scale. These helpers normalize measurements into the
|
|
8
|
+
* container's own CSS pixel space.
|
|
9
|
+
*/
|
|
10
|
+
export interface TabesMarkerGeometry {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
left: number;
|
|
14
|
+
top: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the horizontal transform scale currently applied to `element`
|
|
18
|
+
* (visual width ÷ layout width). `1` when unscaled or zero-sized.
|
|
19
|
+
*/
|
|
20
|
+
export declare const getTabesElementScaleX: (element: HTMLElement) => number;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the vertical transform scale currently applied to `element`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const getTabesElementScaleY: (element: HTMLElement) => number;
|
|
25
|
+
/**
|
|
26
|
+
* Measure active-tab marker geometry in `container`'s local CSS coordinates.
|
|
27
|
+
* Width/height use layout sizes; left/top normalize visual deltas by scale.
|
|
28
|
+
*/
|
|
29
|
+
export declare const measureTabesMarkerGeometry: (container: HTMLElement, activeElement: HTMLElement) => TabesMarkerGeometry;
|
|
30
|
+
/**
|
|
31
|
+
* Convert a visual (viewport) horizontal delta into a local `scrollLeft` delta
|
|
32
|
+
* for `scrollContainer`, accounting for ancestor CSS scale transforms.
|
|
33
|
+
*/
|
|
34
|
+
export declare const toTabesLocalScrollDelta: (scrollContainer: HTMLElement, visualDelta: number) => number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const s = (t, e) => {
|
|
2
|
+
if (e <= 0) return 1;
|
|
3
|
+
const o = t / e;
|
|
4
|
+
return o > 1e-3 ? o : 1;
|
|
5
|
+
}, i = (t) => {
|
|
6
|
+
const e = t.getBoundingClientRect();
|
|
7
|
+
return s(e.width, t.offsetWidth);
|
|
8
|
+
}, r = (t, e) => {
|
|
9
|
+
const o = t.getBoundingClientRect(), c = e.getBoundingClientRect(), n = s(o.width, t.offsetWidth), f = s(o.height, t.offsetHeight);
|
|
10
|
+
return {
|
|
11
|
+
width: e.offsetWidth,
|
|
12
|
+
height: e.offsetHeight,
|
|
13
|
+
left: (c.left - o.left) / n,
|
|
14
|
+
top: (c.top - o.top) / f
|
|
15
|
+
};
|
|
16
|
+
}, h = (t, e) => e / i(t);
|
|
17
|
+
export {
|
|
18
|
+
i as getTabesElementScaleX,
|
|
19
|
+
r as measureTabesMarkerGeometry,
|
|
20
|
+
h as toTabesLocalScrollDelta
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IDropdownOption } from '../../types';
|
|
2
|
+
import { TabesOption } from './types';
|
|
3
|
+
/** Whether the tab option is a dropdown menu trigger */
|
|
4
|
+
export declare function isMenuTab(option: TabesOption): boolean;
|
|
5
|
+
export declare function getMenuOptionValue(option: IDropdownOption): string | number | undefined;
|
|
6
|
+
/** Recursively check if a menu tree contains the given value */
|
|
7
|
+
export declare function menuContainsValue(menu: IDropdownOption[] | undefined, value: string | number): boolean;
|
|
8
|
+
/** Whether a tab (standard or menu parent) should appear active for the current modelValue */
|
|
9
|
+
export declare function isTabActive(option: TabesOption, modelValue: string | number): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve which tab option value should own the animated marker.
|
|
12
|
+
* For menu tabs, returns the parent tab's value when a child is selected.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getActiveMarkerKey(options: TabesOption[], modelValue: string | number): string | number | undefined;
|