vlite3 1.4.31 → 1.4.33
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 +4 -3
- package/components/CategoryManager/CategoryNode.vue.js +30 -30
- package/components/CategoryMenu/CategoryMenu.vue.js +9 -11
- package/components/Chart/GanttChart.vue.d.ts +18 -2
- package/components/Chart/GanttChart.vue.js +1 -1
- package/components/Chart/GanttChart.vue2.js +1347 -604
- package/components/Chart/GanttChartConnectorRouting.d.ts +83 -0
- package/components/Chart/GanttChartConnectorRouting.js +405 -0
- 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 +109 -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 +92 -2
- package/components/Chart/types.js +8 -0
- package/components/ColorPicker/ColorIro.vue2.js +155 -0
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.d.ts +5 -0
- package/components/ColorPicker/ColorPicker.vue.js +111 -65
- package/components/ColorPicker/constants.d.ts +2 -0
- package/components/ColorPicker/constants.js +4 -0
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/Dropdown/Dropdown.vue.js +100 -97
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/AccordionView.vue.js +5 -220
- package/components/Form/AccordionView.vue3.js +250 -0
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +309 -280
- package/components/Form/FormField.vue.js +177 -197
- 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 +7 -7
- 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/Kanban/Kanban.vue.d.ts +16 -2
- package/components/Kanban/Kanban.vue.js +2 -2
- package/components/Kanban/Kanban.vue2.js +150 -86
- package/components/Kanban/types.d.ts +37 -0
- package/components/NavbarCommandPalette.vue.js +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 +19 -18
- 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.js +1 -1
- package/components/Tabes/Tabes.vue2.js +215 -193
- package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
- package/components/Tabes/TabesMarkerGeometry.js +21 -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/ToastNotification.vue.js +1 -1
- package/components/ToastNotification.vue2.js +3 -3
- package/components/index.d.ts +3 -2
- package/composables/useKeyStroke.d.ts +18 -0
- package/composables/useKeyStroke.js +103 -77
- package/composables/useTheme.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +380 -350
- package/package.json +12 -4
- package/style.css +1 -1
- package/utils/environment.d.ts +29 -0
- package/utils/environment.js +4 -0
- package/utils/functions.js +14 -13
- package/components/ColorPicker/ColorIro.vue.js +0 -141
- package/components/Form/AccordionView.vue2.js +0 -4
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import { getActiveMarkerKey as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
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({
|
|
9
10
|
__name: "Tabes",
|
|
10
11
|
props: {
|
|
11
12
|
options: {},
|
|
@@ -19,105 +20,126 @@ const ke = ["dir"], Ce = ["data-variant"], ze = ["aria-selected", "aria-expanded
|
|
|
19
20
|
direction: { default: "ltr" }
|
|
20
21
|
},
|
|
21
22
|
emits: ["update:modelValue", "change", "menu-select", "menu-open", "menu-close"],
|
|
22
|
-
setup(
|
|
23
|
-
const n =
|
|
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 = () => {
|
|
24
27
|
if (!u.value) return;
|
|
25
|
-
const { scrollLeft:
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (!
|
|
35
|
-
const e =
|
|
36
|
-
|
|
37
|
-
|
|
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
|
+
),
|
|
38
48
|
behavior: "smooth"
|
|
39
|
-
}) :
|
|
40
|
-
left:
|
|
49
|
+
}) : a.right > o.right - g && t.scrollBy({
|
|
50
|
+
left: ne(
|
|
51
|
+
t,
|
|
52
|
+
a.right - o.right + g
|
|
53
|
+
),
|
|
41
54
|
behavior: "smooth"
|
|
42
55
|
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
t ? y.value.set(a, t) : y.value.delete(a);
|
|
47
|
-
}, R = g({
|
|
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({
|
|
48
59
|
width: "0px",
|
|
49
60
|
height: "0px",
|
|
50
61
|
transform: "translate(0px, 0px)",
|
|
51
62
|
opacity: 0
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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();
|
|
57
73
|
return;
|
|
58
74
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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)`,
|
|
64
83
|
opacity: 1
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
})));
|
|
88
|
+
};
|
|
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
|
+
}));
|
|
68
98
|
};
|
|
69
|
-
|
|
70
|
-
d(), i();
|
|
71
|
-
}), p(
|
|
99
|
+
_(u, () => i()), _(k, () => i()), p(
|
|
72
100
|
() => n.modelValue,
|
|
73
|
-
|
|
74
|
-
await d(), I();
|
|
75
|
-
}
|
|
101
|
+
() => i({ ensureVisible: !0 })
|
|
76
102
|
), p(
|
|
77
103
|
() => n.options,
|
|
78
|
-
|
|
79
|
-
await d(), i();
|
|
80
|
-
},
|
|
81
|
-
{ deep: !0 }
|
|
104
|
+
() => i()
|
|
82
105
|
), p(
|
|
83
106
|
() => n.size,
|
|
84
|
-
|
|
85
|
-
await d(), i();
|
|
86
|
-
}
|
|
107
|
+
() => i()
|
|
87
108
|
), p(
|
|
88
109
|
() => n.block,
|
|
89
|
-
|
|
90
|
-
await d(), i();
|
|
91
|
-
}
|
|
110
|
+
() => i()
|
|
92
111
|
), p(
|
|
93
112
|
() => n.wrap,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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();
|
|
99
121
|
});
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
return n.block ||
|
|
103
|
-
}),
|
|
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(() => [
|
|
104
126
|
"absolute top-0 bottom-0 z-20 flex items-center pointer-events-none transition-opacity duration-200",
|
|
105
127
|
n.variant === "line" ? "pb-[10px]" : ""
|
|
106
|
-
]),
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
if (
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
const
|
|
118
|
-
return (n.block || n.wrap) && !
|
|
119
|
-
}),
|
|
120
|
-
const
|
|
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 = {
|
|
121
143
|
surface: "bg-secondary/80 p-1",
|
|
122
144
|
primary: "bg-secondary p-1",
|
|
123
145
|
secondary: "bg-secondary p-1",
|
|
@@ -125,52 +147,52 @@ const ke = ["dir"], Ce = ["data-variant"], ze = ["aria-selected", "aria-expanded
|
|
|
125
147
|
success: "bg-success/10 p-1",
|
|
126
148
|
outline: "bg-transparent border border-border p-1",
|
|
127
149
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
128
|
-
},
|
|
129
|
-
return [`${n.block ||
|
|
130
|
-
}),
|
|
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 = {
|
|
131
153
|
sm: "text-xs px-2.5 py-1",
|
|
132
154
|
md: "-text-fs-2 px-3 py-1",
|
|
133
155
|
lg: "-text-fs-1 px-4 py-1"
|
|
134
|
-
},
|
|
135
|
-
const
|
|
136
|
-
return [
|
|
137
|
-
}),
|
|
138
|
-
const
|
|
139
|
-
let
|
|
140
|
-
if (
|
|
141
|
-
if (
|
|
142
|
-
|
|
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";
|
|
143
165
|
else
|
|
144
166
|
switch (n.variant) {
|
|
145
167
|
case "surface":
|
|
146
|
-
|
|
168
|
+
a = n.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
|
|
147
169
|
break;
|
|
148
170
|
case "primary":
|
|
149
|
-
|
|
171
|
+
a = n.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
|
|
150
172
|
break;
|
|
151
173
|
case "secondary":
|
|
152
|
-
|
|
174
|
+
a = n.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
|
|
153
175
|
break;
|
|
154
176
|
case "danger":
|
|
155
|
-
|
|
177
|
+
a = n.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
|
|
156
178
|
break;
|
|
157
179
|
case "success":
|
|
158
|
-
|
|
180
|
+
a = n.wrap ? "text-success-fg bg-success" : "text-success-fg";
|
|
159
181
|
break;
|
|
160
182
|
case "outline":
|
|
161
|
-
|
|
183
|
+
a = n.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
|
|
162
184
|
break;
|
|
163
185
|
default:
|
|
164
|
-
|
|
186
|
+
a = "text-foreground";
|
|
165
187
|
}
|
|
166
188
|
else
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
return [
|
|
170
|
-
},
|
|
171
|
-
const
|
|
172
|
-
return n.variant === "line" ? `${
|
|
173
|
-
}),
|
|
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 = () => ({
|
|
174
196
|
surface: "bg-[#ffff] dark:bg-[#0B0B0B]",
|
|
175
197
|
primary: "bg-primary",
|
|
176
198
|
secondary: "bg-secondary-foreground",
|
|
@@ -178,175 +200,175 @@ const ke = ["dir"], Ce = ["data-variant"], ze = ["aria-selected", "aria-expanded
|
|
|
178
200
|
success: "bg-success",
|
|
179
201
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
180
202
|
line: "bg-primary"
|
|
181
|
-
})[n.variant],
|
|
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) => [
|
|
182
204
|
n.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5",
|
|
183
205
|
"opacity-70 shrink-0 transition-transform duration-200",
|
|
184
|
-
|
|
206
|
+
e ? "rotate-180" : ""
|
|
185
207
|
].join(" ");
|
|
186
|
-
return (
|
|
187
|
-
class:
|
|
188
|
-
dir:
|
|
208
|
+
return (e, r) => (f(), $("div", {
|
|
209
|
+
class: l([ie.value, "group"]),
|
|
210
|
+
dir: s.direction
|
|
189
211
|
}, [
|
|
190
|
-
|
|
212
|
+
M(y(re, {
|
|
191
213
|
direction: "left",
|
|
192
|
-
color:
|
|
214
|
+
color: G.value,
|
|
193
215
|
coverage: "100px",
|
|
194
216
|
blur: "40px",
|
|
195
217
|
easing: "smooth",
|
|
196
218
|
tintOpacity: 1,
|
|
197
|
-
class:
|
|
219
|
+
class: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-l-lg"])
|
|
198
220
|
}, null, 8, ["color", "class"]), [
|
|
199
|
-
[
|
|
221
|
+
[L, C.value]
|
|
200
222
|
]),
|
|
201
|
-
|
|
202
|
-
class:
|
|
223
|
+
M(c("div", {
|
|
224
|
+
class: l(["left-0 pl-1", N.value])
|
|
203
225
|
}, [
|
|
204
226
|
c("button", {
|
|
205
|
-
onClick:
|
|
227
|
+
onClick: r[0] || (r[0] = (t) => q(-200)),
|
|
206
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",
|
|
207
229
|
"aria-label": "Scroll left"
|
|
208
230
|
}, [
|
|
209
|
-
|
|
231
|
+
y(w, {
|
|
210
232
|
icon: "lucide:chevron-left",
|
|
211
233
|
class: "w-5 h-5"
|
|
212
234
|
})
|
|
213
235
|
])
|
|
214
236
|
], 2), [
|
|
215
|
-
[
|
|
237
|
+
[L, C.value]
|
|
216
238
|
]),
|
|
217
239
|
c("div", {
|
|
218
240
|
ref_key: "scrollRef",
|
|
219
241
|
ref: u,
|
|
220
|
-
class: "flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
|
|
221
|
-
onScroll:
|
|
242
|
+
class: "tabes-scroll flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
|
|
243
|
+
onScroll: se
|
|
222
244
|
}, [
|
|
223
245
|
c("div", {
|
|
224
246
|
ref_key: "containerRef",
|
|
225
|
-
ref:
|
|
226
|
-
class:
|
|
247
|
+
ref: k,
|
|
248
|
+
class: l([be.value, "tabes-container"]),
|
|
227
249
|
role: "tablist",
|
|
228
250
|
"data-variant": n.variant,
|
|
229
251
|
"data-tabes": ""
|
|
230
252
|
}, [
|
|
231
|
-
|
|
253
|
+
s.modelValue !== void 0 && !s.wrap ? (f(), $("div", {
|
|
232
254
|
key: 0,
|
|
233
|
-
class:
|
|
234
|
-
style:
|
|
235
|
-
}, null, 6)) :
|
|
236
|
-
(
|
|
237
|
-
key:
|
|
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
|
|
238
260
|
}, [
|
|
239
|
-
|
|
261
|
+
X(ee)(t) ? (f(), A(Fe, {
|
|
240
262
|
key: 0,
|
|
241
|
-
options:
|
|
242
|
-
selected:
|
|
243
|
-
disabled:
|
|
244
|
-
direction:
|
|
245
|
-
position:
|
|
246
|
-
offset:
|
|
247
|
-
searchable:
|
|
248
|
-
"close-on-select":
|
|
249
|
-
"max-height":
|
|
250
|
-
"min-width":
|
|
251
|
-
width:
|
|
252
|
-
"menu-id":
|
|
253
|
-
teleport:
|
|
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,
|
|
254
276
|
"show-selected-label": !1,
|
|
255
277
|
"show-selected-icon": !1,
|
|
256
278
|
"toggle-selection": !1,
|
|
257
279
|
selectable: !0,
|
|
258
|
-
class:
|
|
259
|
-
onOnSelect: (
|
|
260
|
-
onOnOpen: () =>
|
|
261
|
-
onOnClose: () =>
|
|
280
|
+
class: l(["tabes-menu", "inline-flex!", me.value]),
|
|
281
|
+
onOnSelect: (a) => ue(t, a),
|
|
282
|
+
onOnOpen: () => de(t),
|
|
283
|
+
onOnClose: () => fe(t)
|
|
262
284
|
}, {
|
|
263
|
-
trigger:
|
|
285
|
+
trigger: Y(({ isOpen: a }) => [
|
|
264
286
|
c("button", {
|
|
265
287
|
ref_for: !0,
|
|
266
|
-
ref: (
|
|
288
|
+
ref: (o) => W(o, t.value),
|
|
267
289
|
type: "button",
|
|
268
290
|
role: "tab",
|
|
269
291
|
"data-tabes-item": "",
|
|
270
292
|
"data-tabes-menu-trigger": "",
|
|
271
|
-
"aria-selected":
|
|
293
|
+
"aria-selected": X(te)(t, s.modelValue),
|
|
272
294
|
"aria-haspopup": !0,
|
|
273
|
-
"aria-expanded":
|
|
274
|
-
disabled:
|
|
275
|
-
class:
|
|
295
|
+
"aria-expanded": a,
|
|
296
|
+
disabled: t.disabled,
|
|
297
|
+
class: l([Q(t), K[n.size], "w-full"])
|
|
276
298
|
}, [
|
|
277
|
-
|
|
299
|
+
t.icon ? (f(), A(w, {
|
|
278
300
|
key: 0,
|
|
279
|
-
icon:
|
|
280
|
-
class:
|
|
281
|
-
}, null, 8, ["icon", "class"])) :
|
|
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),
|
|
282
304
|
c("span", {
|
|
283
|
-
class:
|
|
284
|
-
},
|
|
285
|
-
|
|
305
|
+
class: l(["whitespace-nowrap z-20 relative", s.textClass])
|
|
306
|
+
}, Z(U(t)), 3),
|
|
307
|
+
y(w, {
|
|
286
308
|
icon: "lucide:chevron-down",
|
|
287
|
-
class:
|
|
309
|
+
class: l(we(a)),
|
|
288
310
|
"aria-hidden": "true"
|
|
289
311
|
}, null, 8, ["class"])
|
|
290
|
-
], 10,
|
|
312
|
+
], 10, je)
|
|
291
313
|
]),
|
|
292
314
|
_: 2
|
|
293
|
-
}, 1032, ["options", "selected", "disabled", "direction", "position", "offset", "searchable", "close-on-select", "max-height", "min-width", "width", "menu-id", "teleport", "class", "onOnSelect", "onOnOpen", "onOnClose"])) : (
|
|
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({
|
|
294
316
|
key: 1,
|
|
295
317
|
ref_for: !0,
|
|
296
|
-
ref: (
|
|
318
|
+
ref: (a) => W(a, t.value),
|
|
297
319
|
role: "tab",
|
|
298
320
|
"data-tabes-item": "",
|
|
299
|
-
"aria-selected":
|
|
300
|
-
disabled:
|
|
301
|
-
class: [
|
|
302
|
-
}, { ref_for: !0 },
|
|
303
|
-
onClick: (
|
|
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)
|
|
304
326
|
}), {
|
|
305
|
-
default:
|
|
306
|
-
|
|
327
|
+
default: Y(() => [
|
|
328
|
+
t.icon ? (f(), A(w, {
|
|
307
329
|
key: 0,
|
|
308
|
-
icon:
|
|
309
|
-
class:
|
|
310
|
-
}, null, 8, ["icon", "class"])) :
|
|
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),
|
|
311
333
|
c("span", {
|
|
312
|
-
class:
|
|
313
|
-
},
|
|
334
|
+
class: l(["whitespace-nowrap z-20 relative", s.textClass])
|
|
335
|
+
}, Z(U(t)), 3)
|
|
314
336
|
]),
|
|
315
337
|
_: 2
|
|
316
|
-
}, 1040, ["aria-selected", "disabled", "class", "onClick"]))
|
|
338
|
+
}, 1040, ["aria-selected", "disabled", "class", "onClick"])), r, 1)
|
|
317
339
|
], 64))), 128))
|
|
318
|
-
], 10,
|
|
340
|
+
], 10, Te)
|
|
319
341
|
], 544),
|
|
320
|
-
|
|
342
|
+
M(y(re, {
|
|
321
343
|
direction: "right",
|
|
322
|
-
color:
|
|
344
|
+
color: G.value,
|
|
323
345
|
coverage: "100px",
|
|
324
346
|
blur: "40",
|
|
325
347
|
easing: "smooth",
|
|
326
348
|
tintOpacity: 1,
|
|
327
|
-
class:
|
|
349
|
+
class: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-r-lg"])
|
|
328
350
|
}, null, 8, ["color", "class"]), [
|
|
329
|
-
[
|
|
351
|
+
[L, V.value]
|
|
330
352
|
]),
|
|
331
|
-
|
|
332
|
-
class:
|
|
353
|
+
M(c("div", {
|
|
354
|
+
class: l(["right-0 pr-1", N.value])
|
|
333
355
|
}, [
|
|
334
356
|
c("button", {
|
|
335
|
-
onClick:
|
|
357
|
+
onClick: r[2] || (r[2] = (t) => q(200)),
|
|
336
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",
|
|
337
359
|
"aria-label": "Scroll right"
|
|
338
360
|
}, [
|
|
339
|
-
|
|
361
|
+
y(w, {
|
|
340
362
|
icon: "lucide:chevron-right",
|
|
341
363
|
class: "w-5 h-5"
|
|
342
364
|
})
|
|
343
365
|
])
|
|
344
366
|
], 2), [
|
|
345
|
-
[
|
|
367
|
+
[L, V.value]
|
|
346
368
|
])
|
|
347
|
-
], 10,
|
|
369
|
+
], 10, Ee));
|
|
348
370
|
}
|
|
349
371
|
});
|
|
350
372
|
export {
|
|
351
|
-
|
|
373
|
+
Qe as default
|
|
352
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
|
+
};
|
|
@@ -14,8 +14,10 @@ declare const __VLS_component: import('vue').DefineComponent<ThemeProviderProps,
|
|
|
14
14
|
borderRadius: number;
|
|
15
15
|
bgColor: string;
|
|
16
16
|
primaryColor: string;
|
|
17
|
+
surfaceColor: string;
|
|
17
18
|
footerBgColor: string;
|
|
18
19
|
baseFontSize: number;
|
|
20
|
+
scaleSpacingWithBaseFontSize: boolean;
|
|
19
21
|
headingScale: number;
|
|
20
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
21
23
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|