evo-vue-carousel 1.1.2 → 1.1.4
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/dist/evo-vue-carousel.js +226 -185
- package/dist/main.css +1 -1
- package/package.json +17 -17
package/dist/evo-vue-carousel.js
CHANGED
|
@@ -123,24 +123,22 @@ function unrefElement(e) {
|
|
|
123
123
|
return t?.$el ?? t;
|
|
124
124
|
}
|
|
125
125
|
function useEventListener(...e) {
|
|
126
|
-
let t =
|
|
127
|
-
t.forEach((e) => e()), t.length = 0;
|
|
128
|
-
}, r = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), a = computed(() => {
|
|
126
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = computed(() => {
|
|
129
127
|
let t = toArray$1(toValue(e[0])).filter((e) => e != null);
|
|
130
128
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
toArray$1(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
});
|
|
130
|
+
return watchImmediate(() => [
|
|
131
|
+
n.value?.map((e) => unrefElement(e)) ?? [defaultWindow].filter((e) => e != null),
|
|
132
|
+
toArray$1(toValue(n.value ? e[1] : e[0])),
|
|
133
|
+
toArray$1(unref(n.value ? e[2] : e[1])),
|
|
134
|
+
toValue(n.value ? e[3] : e[2])
|
|
135
|
+
], ([e, n, r, a], s, c) => {
|
|
136
|
+
if (!e?.length || !n?.length || !r?.length) return;
|
|
137
|
+
let l = isObject$1(a) ? { ...a } : a, u = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, l))));
|
|
138
|
+
c(() => {
|
|
139
|
+
u.forEach((e) => e());
|
|
140
|
+
});
|
|
140
141
|
}, { flush: "post" });
|
|
141
|
-
return tryOnScopeDispose(n), () => {
|
|
142
|
-
s(), n();
|
|
143
|
-
};
|
|
144
142
|
}
|
|
145
143
|
function useMounted() {
|
|
146
144
|
let e = shallowRef(!1), t = getCurrentInstance();
|
|
@@ -154,7 +152,7 @@ function useSupported(e) {
|
|
|
154
152
|
return computed(() => (t.value, !!e()));
|
|
155
153
|
}
|
|
156
154
|
function useMutationObserver(e, t, n = {}) {
|
|
157
|
-
let { window: r = defaultWindow
|
|
155
|
+
let { window: r = defaultWindow, ...a } = n, s, l = /* @__PURE__ */ useSupported(() => r && "MutationObserver" in r), u = () => {
|
|
158
156
|
s &&= (s.disconnect(), void 0);
|
|
159
157
|
}, d = watch(computed(() => {
|
|
160
158
|
let t = toArray$1(toValue(e)).map(unrefElement).filter(notNullish);
|
|
@@ -217,7 +215,7 @@ function useMediaQuery(e, t = {}) {
|
|
|
217
215
|
}, { passive: !0 }), computed(() => u.value);
|
|
218
216
|
}
|
|
219
217
|
function useResizeObserver(e, t, n = {}) {
|
|
220
|
-
let { window: r = defaultWindow
|
|
218
|
+
let { window: r = defaultWindow, ...a } = n, s, l = /* @__PURE__ */ useSupported(() => r && "ResizeObserver" in r), u = () => {
|
|
221
219
|
s &&= (s.disconnect(), void 0);
|
|
222
220
|
}, d = watch(computed(() => {
|
|
223
221
|
let t = toValue(e);
|
|
@@ -353,6 +351,12 @@ function debounce(e, t, { signal: n, edges: r } = {}) {
|
|
|
353
351
|
function identity(e) {
|
|
354
352
|
return e;
|
|
355
353
|
}
|
|
354
|
+
function range(e, t, n = 1) {
|
|
355
|
+
if (t ?? (t = e, e = 0), !Number.isInteger(n) || n === 0) throw Error("The step value must be a non-zero integer.");
|
|
356
|
+
let r = Math.max(Math.ceil((t - e) / n), 0), a = Array(r);
|
|
357
|
+
for (let t = 0; t < r; t++) a[t] = e + t * n;
|
|
358
|
+
return a;
|
|
359
|
+
}
|
|
356
360
|
function isPrimitive(e) {
|
|
357
361
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
358
362
|
}
|
|
@@ -951,7 +955,7 @@ function isObjectMatch(e, t, n, r) {
|
|
|
951
955
|
if (t instanceof Map) return isMapMatch(e, t, n, r);
|
|
952
956
|
if (t instanceof Set) return isSetMatch(e, t, n, r);
|
|
953
957
|
let a = Object.keys(t);
|
|
954
|
-
if (e == null) return a.length === 0;
|
|
958
|
+
if (e == null || isPrimitive(e)) return a.length === 0;
|
|
955
959
|
if (a.length === 0) return !0;
|
|
956
960
|
if (r?.has(t)) return r.get(t) === e;
|
|
957
961
|
r?.set(t, e);
|
|
@@ -1082,119 +1086,148 @@ function slice(e, t, n) {
|
|
|
1082
1086
|
for (let n = 0; n < a; ++n) s[n] = e[t + n];
|
|
1083
1087
|
return s;
|
|
1084
1088
|
}
|
|
1085
|
-
var
|
|
1089
|
+
var concatArrays = (e, t) => {
|
|
1090
|
+
let n = Array(e.length + t.length);
|
|
1091
|
+
for (let t = 0; t < e.length; t++) n[t] = e[t];
|
|
1092
|
+
for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
|
|
1093
|
+
return n;
|
|
1094
|
+
}, createClassValidatorObject = (e, t) => ({
|
|
1095
|
+
classGroupId: e,
|
|
1096
|
+
validator: t
|
|
1097
|
+
}), createClassPartObject = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
|
|
1098
|
+
nextPart: e,
|
|
1099
|
+
validators: t,
|
|
1100
|
+
classGroupId: n
|
|
1101
|
+
}), CLASS_PART_SEPARATOR = "-", EMPTY_CONFLICTS = [], ARBITRARY_PROPERTY_PREFIX = "arbitrary..", createClassGroupUtils = (e) => {
|
|
1086
1102
|
let t = createClassMap(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
|
|
1087
1103
|
return {
|
|
1088
1104
|
getClassGroupId: (e) => {
|
|
1105
|
+
if (e.startsWith("[") && e.endsWith("]")) return getGroupIdForArbitraryProperty(e);
|
|
1089
1106
|
let n = e.split(CLASS_PART_SEPARATOR);
|
|
1090
|
-
return n[0] === "" && n.length
|
|
1107
|
+
return getGroupRecursive(n, n[0] === "" && n.length > 1 ? 1 : 0, t);
|
|
1091
1108
|
},
|
|
1092
1109
|
getConflictingClassGroupIds: (e, t) => {
|
|
1093
|
-
|
|
1094
|
-
|
|
1110
|
+
if (t) {
|
|
1111
|
+
let t = r[e], a = n[e];
|
|
1112
|
+
return t ? a ? concatArrays(a, t) : t : a || EMPTY_CONFLICTS;
|
|
1113
|
+
}
|
|
1114
|
+
return n[e] || EMPTY_CONFLICTS;
|
|
1095
1115
|
}
|
|
1096
1116
|
};
|
|
1097
|
-
}, getGroupRecursive = (e, t) => {
|
|
1098
|
-
if (e.length === 0) return
|
|
1099
|
-
let
|
|
1100
|
-
if (a)
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
return t.validators.find(({ validator: e }) => e(s))?.classGroupId;
|
|
1104
|
-
}, arbitraryPropertyRegex = /^\[(.+)\]$/, getGroupIdForArbitraryProperty = (e) => {
|
|
1105
|
-
if (arbitraryPropertyRegex.test(e)) {
|
|
1106
|
-
let t = arbitraryPropertyRegex.exec(e)[1], n = t?.substring(0, t.indexOf(":"));
|
|
1107
|
-
if (n) return "arbitrary.." + n;
|
|
1117
|
+
}, getGroupRecursive = (e, t, n) => {
|
|
1118
|
+
if (e.length - t === 0) return n.classGroupId;
|
|
1119
|
+
let r = e[t], a = n.nextPart.get(r);
|
|
1120
|
+
if (a) {
|
|
1121
|
+
let n = getGroupRecursive(e, t + 1, a);
|
|
1122
|
+
if (n) return n;
|
|
1108
1123
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1124
|
+
let s = n.validators;
|
|
1125
|
+
if (s === null) return;
|
|
1126
|
+
let c = t === 0 ? e.join(CLASS_PART_SEPARATOR) : e.slice(t).join(CLASS_PART_SEPARATOR), l = s.length;
|
|
1127
|
+
for (let e = 0; e < l; e++) {
|
|
1128
|
+
let t = s[e];
|
|
1129
|
+
if (t.validator(c)) return t.classGroupId;
|
|
1130
|
+
}
|
|
1131
|
+
}, getGroupIdForArbitraryProperty = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
1132
|
+
let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
|
|
1133
|
+
return r ? ARBITRARY_PROPERTY_PREFIX + r : void 0;
|
|
1134
|
+
})(), createClassMap = (e) => {
|
|
1135
|
+
let { theme: t, classGroups: n } = e;
|
|
1136
|
+
return processClassGroups(n, t);
|
|
1137
|
+
}, processClassGroups = (e, t) => {
|
|
1138
|
+
let n = createClassPartObject();
|
|
1139
|
+
for (let r in e) {
|
|
1140
|
+
let a = e[r];
|
|
1141
|
+
processClassesRecursively(a, n, r, t);
|
|
1142
|
+
}
|
|
1143
|
+
return n;
|
|
1116
1144
|
}, processClassesRecursively = (e, t, n, r) => {
|
|
1117
|
-
e.
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1145
|
+
let a = e.length;
|
|
1146
|
+
for (let s = 0; s < a; s++) {
|
|
1147
|
+
let a = e[s];
|
|
1148
|
+
processClassDefinition(a, t, n, r);
|
|
1149
|
+
}
|
|
1150
|
+
}, processClassDefinition = (e, t, n, r) => {
|
|
1151
|
+
if (typeof e == "string") {
|
|
1152
|
+
processStringDefinition(e, t, n);
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
if (typeof e == "function") {
|
|
1156
|
+
processFunctionDefinition(e, t, n, r);
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
processObjectDefinition(e, t, n, r);
|
|
1160
|
+
}, processStringDefinition = (e, t, n) => {
|
|
1161
|
+
let r = e === "" ? t : getPart(t, e);
|
|
1162
|
+
r.classGroupId = n;
|
|
1163
|
+
}, processFunctionDefinition = (e, t, n, r) => {
|
|
1164
|
+
if (isThemeGetter(e)) {
|
|
1165
|
+
processClassesRecursively(e(r), t, n, r);
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
t.validators === null && (t.validators = []), t.validators.push(createClassValidatorObject(n, e));
|
|
1169
|
+
}, processObjectDefinition = (e, t, n, r) => {
|
|
1170
|
+
let a = Object.entries(e), s = a.length;
|
|
1171
|
+
for (let e = 0; e < s; e++) {
|
|
1172
|
+
let [s, c] = a[e];
|
|
1173
|
+
processClassesRecursively(c, getPart(t, s), n, r);
|
|
1174
|
+
}
|
|
1138
1175
|
}, getPart = (e, t) => {
|
|
1139
|
-
let n = e;
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}, isThemeGetter = (e) => e.isThemeGetter, createLruCache = (e) => {
|
|
1176
|
+
let n = e, r = t.split(CLASS_PART_SEPARATOR), a = r.length;
|
|
1177
|
+
for (let e = 0; e < a; e++) {
|
|
1178
|
+
let t = r[e], a = n.nextPart.get(t);
|
|
1179
|
+
a || (a = createClassPartObject(), n.nextPart.set(t, a)), n = a;
|
|
1180
|
+
}
|
|
1181
|
+
return n;
|
|
1182
|
+
}, isThemeGetter = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, createLruCache = (e) => {
|
|
1147
1183
|
if (e < 1) return {
|
|
1148
1184
|
get: () => void 0,
|
|
1149
1185
|
set: () => {}
|
|
1150
1186
|
};
|
|
1151
|
-
let t = 0, n =
|
|
1152
|
-
n
|
|
1187
|
+
let t = 0, n = Object.create(null), r = Object.create(null), a = (a, s) => {
|
|
1188
|
+
n[a] = s, t++, t > e && (t = 0, r = n, n = Object.create(null));
|
|
1153
1189
|
};
|
|
1154
1190
|
return {
|
|
1155
1191
|
get(e) {
|
|
1156
|
-
let t = n
|
|
1192
|
+
let t = n[e];
|
|
1157
1193
|
if (t !== void 0) return t;
|
|
1158
|
-
if ((t = r
|
|
1194
|
+
if ((t = r[e]) !== void 0) return a(e, t), t;
|
|
1159
1195
|
},
|
|
1160
1196
|
set(e, t) {
|
|
1161
|
-
|
|
1197
|
+
e in n ? n[e] = t : a(e, t);
|
|
1162
1198
|
}
|
|
1163
1199
|
};
|
|
1164
|
-
}, IMPORTANT_MODIFIER = "!", MODIFIER_SEPARATOR = ":",
|
|
1200
|
+
}, IMPORTANT_MODIFIER = "!", MODIFIER_SEPARATOR = ":", EMPTY_MODIFIERS = [], createResultObject = (e, t, n, r, a) => ({
|
|
1201
|
+
modifiers: e,
|
|
1202
|
+
hasImportantModifier: t,
|
|
1203
|
+
baseClassName: n,
|
|
1204
|
+
maybePostfixModifierPosition: r,
|
|
1205
|
+
isExternal: a
|
|
1206
|
+
}), createParseClassName = (e) => {
|
|
1165
1207
|
let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
|
|
1166
|
-
let t = [], n = 0, r = 0, a = 0, s;
|
|
1167
|
-
for (let
|
|
1168
|
-
let
|
|
1208
|
+
let t = [], n = 0, r = 0, a = 0, s, c = e.length;
|
|
1209
|
+
for (let l = 0; l < c; l++) {
|
|
1210
|
+
let c = e[l];
|
|
1169
1211
|
if (n === 0 && r === 0) {
|
|
1170
|
-
if (
|
|
1171
|
-
t.push(e.slice(a,
|
|
1212
|
+
if (c === MODIFIER_SEPARATOR) {
|
|
1213
|
+
t.push(e.slice(a, l)), a = l + 1;
|
|
1172
1214
|
continue;
|
|
1173
1215
|
}
|
|
1174
|
-
if (
|
|
1175
|
-
s =
|
|
1216
|
+
if (c === "/") {
|
|
1217
|
+
s = l;
|
|
1176
1218
|
continue;
|
|
1177
1219
|
}
|
|
1178
1220
|
}
|
|
1179
|
-
|
|
1221
|
+
c === "[" ? n++ : c === "]" ? n-- : c === "(" ? r++ : c === ")" && r--;
|
|
1180
1222
|
}
|
|
1181
|
-
let
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
baseClassName: l,
|
|
1186
|
-
maybePostfixModifierPosition: s && s > a ? s - a : void 0
|
|
1187
|
-
};
|
|
1223
|
+
let l = t.length === 0 ? e : e.slice(a), u = l, d = !1;
|
|
1224
|
+
l.endsWith(IMPORTANT_MODIFIER) ? (u = l.slice(0, -1), d = !0) : l.startsWith(IMPORTANT_MODIFIER) && (u = l.slice(1), d = !0);
|
|
1225
|
+
let p = s && s > a ? s - a : void 0;
|
|
1226
|
+
return createResultObject(t, d, u, p);
|
|
1188
1227
|
};
|
|
1189
1228
|
if (t) {
|
|
1190
1229
|
let e = t + MODIFIER_SEPARATOR, n = r;
|
|
1191
|
-
r = (t) => t.startsWith(e) ? n(t.
|
|
1192
|
-
isExternal: !0,
|
|
1193
|
-
modifiers: [],
|
|
1194
|
-
hasImportantModifier: !1,
|
|
1195
|
-
baseClassName: t,
|
|
1196
|
-
maybePostfixModifierPosition: void 0
|
|
1197
|
-
};
|
|
1230
|
+
r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : createResultObject(EMPTY_MODIFIERS, !1, t, void 0, !0);
|
|
1198
1231
|
}
|
|
1199
1232
|
if (n) {
|
|
1200
1233
|
let e = r;
|
|
@@ -1204,14 +1237,17 @@ var CLASS_PART_SEPARATOR = "-", createClassGroupUtils = (e) => {
|
|
|
1204
1237
|
});
|
|
1205
1238
|
}
|
|
1206
1239
|
return r;
|
|
1207
|
-
},
|
|
1208
|
-
let t =
|
|
1209
|
-
return (e) => {
|
|
1210
|
-
|
|
1240
|
+
}, createSortModifiers = (e) => {
|
|
1241
|
+
let t = /* @__PURE__ */ new Map();
|
|
1242
|
+
return e.orderSensitiveModifiers.forEach((e, n) => {
|
|
1243
|
+
t.set(e, 1e6 + n);
|
|
1244
|
+
}), (e) => {
|
|
1211
1245
|
let n = [], r = [];
|
|
1212
|
-
|
|
1213
|
-
e[0] === "["
|
|
1214
|
-
|
|
1246
|
+
for (let a = 0; a < e.length; a++) {
|
|
1247
|
+
let s = e[a], c = s[0] === "[", l = t.has(s);
|
|
1248
|
+
c || l ? (r.length > 0 && (r.sort(), n.push(...r), r = []), n.push(s)) : r.push(s);
|
|
1249
|
+
}
|
|
1250
|
+
return r.length > 0 && (r.sort(), n.push(...r)), n;
|
|
1215
1251
|
};
|
|
1216
1252
|
}, createConfigUtils = (e) => ({
|
|
1217
1253
|
cache: createLruCache(e.cacheSize),
|
|
@@ -1238,8 +1274,8 @@ var CLASS_PART_SEPARATOR = "-", createClassGroupUtils = (e) => {
|
|
|
1238
1274
|
}
|
|
1239
1275
|
x = !1;
|
|
1240
1276
|
}
|
|
1241
|
-
let w = s(p).join(":"), T = m ? w + IMPORTANT_MODIFIER : w, E = T + C;
|
|
1242
|
-
if (c.
|
|
1277
|
+
let w = p.length === 0 ? "" : p.length === 1 ? p[0] : s(p).join(":"), T = m ? w + IMPORTANT_MODIFIER : w, E = T + C;
|
|
1278
|
+
if (c.indexOf(E) > -1) continue;
|
|
1243
1279
|
c.push(E);
|
|
1244
1280
|
let D = a(C, x);
|
|
1245
1281
|
for (let e = 0; e < D.length; ++e) {
|
|
@@ -1249,35 +1285,25 @@ var CLASS_PART_SEPARATOR = "-", createClassGroupUtils = (e) => {
|
|
|
1249
1285
|
u = t + (u.length > 0 ? " " + u : u);
|
|
1250
1286
|
}
|
|
1251
1287
|
return u;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
}
|
|
1258
|
-
var toValue$1 = (e) => {
|
|
1288
|
+
}, twJoin = (...e) => {
|
|
1289
|
+
let t = 0, n, r, a = "";
|
|
1290
|
+
for (; t < e.length;) (n = e[t++]) && (r = toValue$1(n)) && (a && (a += " "), a += r);
|
|
1291
|
+
return a;
|
|
1292
|
+
}, toValue$1 = (e) => {
|
|
1259
1293
|
if (typeof e == "string") return e;
|
|
1260
1294
|
let t, n = "";
|
|
1261
1295
|
for (let r = 0; r < e.length; r++) e[r] && (t = toValue$1(e[r])) && (n && (n += " "), n += t);
|
|
1262
1296
|
return n;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
let n, r, a, s = c;
|
|
1266
|
-
function c(c) {
|
|
1267
|
-
return n = createConfigUtils(t.reduce((e, t) => t(e), e())), r = n.cache.get, a = n.cache.set, s = l, l(c);
|
|
1268
|
-
}
|
|
1269
|
-
function l(e) {
|
|
1297
|
+
}, createTailwindMerge = (e, ...t) => {
|
|
1298
|
+
let n, r, a, s, c = (c) => (n = createConfigUtils(t.reduce((e, t) => t(e), e())), r = n.cache.get, a = n.cache.set, s = l, l(c)), l = (e) => {
|
|
1270
1299
|
let t = r(e);
|
|
1271
1300
|
if (t) return t;
|
|
1272
1301
|
let s = mergeClassList(e, n);
|
|
1273
1302
|
return a(e, s), s;
|
|
1274
|
-
}
|
|
1275
|
-
return function() {
|
|
1276
|
-
return s(twJoin.apply(null, arguments));
|
|
1277
1303
|
};
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
let t = (t) => t[e] ||
|
|
1304
|
+
return s = c, (...e) => s(twJoin(...e));
|
|
1305
|
+
}, fallbackThemeArr = [], fromTheme = (e) => {
|
|
1306
|
+
let t = (t) => t[e] || fallbackThemeArr;
|
|
1281
1307
|
return t.isThemeGetter = !0, t;
|
|
1282
1308
|
}, arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i, fractionRegex = /^\d+\/\d+$/, tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, isFraction = (e) => fractionRegex.test(e), isNumber = (e) => !!e && !Number.isNaN(Number(e)), isInteger = (e) => !!e && Number.isInteger(Number(e)), isPercent = (e) => e.endsWith("%") && isNumber(e.slice(0, -1)), isTshirtSize = (e) => tshirtUnitRegex.test(e), isAny = () => !0, isLengthOnly = (e) => lengthUnitRegex.test(e) && !colorFunctionRegex.test(e), isNever = () => !1, isShadow = (e) => shadowRegex.test(e), isImage = (e) => imageRegex.test(e), isAnyNonArbitrary = (e) => !isArbitraryValue(e) && !isArbitraryVariable(e), isArbitrarySize = (e) => getIsArbitraryValue(e, isLabelSize, isNever), isArbitraryValue = (e) => arbitraryValueRegex.test(e), isArbitraryLength = (e) => getIsArbitraryValue(e, isLabelLength, isLengthOnly), isArbitraryNumber = (e) => getIsArbitraryValue(e, isLabelNumber, isNumber), isArbitraryPosition = (e) => getIsArbitraryValue(e, isLabelPosition, isNever), isArbitraryImage = (e) => getIsArbitraryValue(e, isLabelImage, isImage), isArbitraryShadow = (e) => getIsArbitraryValue(e, isLabelShadow, isShadow), isArbitraryVariable = (e) => arbitraryVariableRegex.test(e), isArbitraryVariableLength = (e) => getIsArbitraryVariable(e, isLabelLength), isArbitraryVariableFamilyName = (e) => getIsArbitraryVariable(e, isLabelFamilyName), isArbitraryVariablePosition = (e) => getIsArbitraryVariable(e, isLabelPosition), isArbitraryVariableSize = (e) => getIsArbitraryVariable(e, isLabelSize), isArbitraryVariableImage = (e) => getIsArbitraryVariable(e, isLabelImage), isArbitraryVariableShadow = (e) => getIsArbitraryVariable(e, isLabelShadow, !0), getIsArbitraryValue = (e, t, n) => {
|
|
1283
1309
|
let r = arbitraryValueRegex.exec(e);
|
|
@@ -1402,13 +1428,13 @@ var fromTheme = (e) => {
|
|
|
1402
1428
|
isArbitraryVariablePosition,
|
|
1403
1429
|
isArbitraryPosition,
|
|
1404
1430
|
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
1405
|
-
],
|
|
1431
|
+
], yi = () => ["no-repeat", { repeat: [
|
|
1406
1432
|
"",
|
|
1407
1433
|
"x",
|
|
1408
1434
|
"y",
|
|
1409
1435
|
"space",
|
|
1410
1436
|
"round"
|
|
1411
|
-
] }],
|
|
1437
|
+
] }], bi = () => [
|
|
1412
1438
|
"auto",
|
|
1413
1439
|
"cover",
|
|
1414
1440
|
"contain",
|
|
@@ -1436,7 +1462,7 @@ var fromTheme = (e) => {
|
|
|
1436
1462
|
"dashed",
|
|
1437
1463
|
"dotted",
|
|
1438
1464
|
"double"
|
|
1439
|
-
],
|
|
1465
|
+
], xi = () => [
|
|
1440
1466
|
"normal",
|
|
1441
1467
|
"multiply",
|
|
1442
1468
|
"screen",
|
|
@@ -1458,7 +1484,7 @@ var fromTheme = (e) => {
|
|
|
1458
1484
|
isPercent,
|
|
1459
1485
|
isArbitraryVariablePosition,
|
|
1460
1486
|
isArbitraryPosition
|
|
1461
|
-
],
|
|
1487
|
+
], Si = () => [
|
|
1462
1488
|
"",
|
|
1463
1489
|
"none",
|
|
1464
1490
|
x,
|
|
@@ -1959,8 +1985,8 @@ var fromTheme = (e) => {
|
|
|
1959
1985
|
"content"
|
|
1960
1986
|
] }],
|
|
1961
1987
|
"bg-position": [{ bg: W() }],
|
|
1962
|
-
"bg-repeat": [{ bg:
|
|
1963
|
-
"bg-size": [{ bg:
|
|
1988
|
+
"bg-repeat": [{ bg: yi() }],
|
|
1989
|
+
"bg-size": [{ bg: bi() }],
|
|
1964
1990
|
"bg-image": [{ bg: [
|
|
1965
1991
|
"none",
|
|
1966
1992
|
{
|
|
@@ -2100,11 +2126,11 @@ var fromTheme = (e) => {
|
|
|
2100
2126
|
isArbitraryValue
|
|
2101
2127
|
] }],
|
|
2102
2128
|
"mix-blend": [{ "mix-blend": [
|
|
2103
|
-
...
|
|
2129
|
+
...xi(),
|
|
2104
2130
|
"plus-darker",
|
|
2105
2131
|
"plus-lighter"
|
|
2106
2132
|
] }],
|
|
2107
|
-
"bg-blend": [{ "bg-blend":
|
|
2133
|
+
"bg-blend": [{ "bg-blend": xi() }],
|
|
2108
2134
|
"mask-clip": [{ "mask-clip": [
|
|
2109
2135
|
"border",
|
|
2110
2136
|
"padding",
|
|
@@ -2178,8 +2204,8 @@ var fromTheme = (e) => {
|
|
|
2178
2204
|
"view"
|
|
2179
2205
|
] }],
|
|
2180
2206
|
"mask-position": [{ mask: W() }],
|
|
2181
|
-
"mask-repeat": [{ mask:
|
|
2182
|
-
"mask-size": [{ mask:
|
|
2207
|
+
"mask-repeat": [{ mask: yi() }],
|
|
2208
|
+
"mask-size": [{ mask: bi() }],
|
|
2183
2209
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
2184
2210
|
"mask-image": [{ mask: [
|
|
2185
2211
|
"none",
|
|
@@ -2192,7 +2218,7 @@ var fromTheme = (e) => {
|
|
|
2192
2218
|
isArbitraryVariable,
|
|
2193
2219
|
isArbitraryValue
|
|
2194
2220
|
] }],
|
|
2195
|
-
blur: [{ blur:
|
|
2221
|
+
blur: [{ blur: Si() }],
|
|
2196
2222
|
brightness: [{ brightness: [
|
|
2197
2223
|
isNumber,
|
|
2198
2224
|
isArbitraryVariable,
|
|
@@ -2245,7 +2271,7 @@ var fromTheme = (e) => {
|
|
|
2245
2271
|
isArbitraryVariable,
|
|
2246
2272
|
isArbitraryValue
|
|
2247
2273
|
] }],
|
|
2248
|
-
"backdrop-blur": [{ "backdrop-blur":
|
|
2274
|
+
"backdrop-blur": [{ "backdrop-blur": Si() }],
|
|
2249
2275
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
2250
2276
|
isNumber,
|
|
2251
2277
|
isArbitraryVariable,
|
|
@@ -3092,10 +3118,16 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3092
3118
|
}
|
|
3093
3119
|
return r ?? e;
|
|
3094
3120
|
}, Slide_default = {
|
|
3095
|
-
props: {
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3121
|
+
props: {
|
|
3122
|
+
isClone: {
|
|
3123
|
+
type: Boolean,
|
|
3124
|
+
default: !1
|
|
3125
|
+
},
|
|
3126
|
+
isVisible: {
|
|
3127
|
+
type: Boolean,
|
|
3128
|
+
default: !1
|
|
3129
|
+
}
|
|
3130
|
+
},
|
|
3099
3131
|
setup(e, { slots: t }) {
|
|
3100
3132
|
let n = ref(null), r = useId(), a = getCurrentInstance(), { width: s, height: c, stop: l } = useElementSize(n), { registerSlide: u, updateSlide: d, unregisterSlide: p } = useRegisterSlideClient();
|
|
3101
3133
|
return e.isClone === !1 ? u(r, a) : l(), onUnmounted(() => {
|
|
@@ -3107,10 +3139,10 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3107
3139
|
});
|
|
3108
3140
|
}), () => h("div", {
|
|
3109
3141
|
ref: n,
|
|
3110
|
-
role: "
|
|
3142
|
+
role: "listitem",
|
|
3111
3143
|
"aria-roledescription": "slide",
|
|
3112
|
-
"aria-hidden": e.
|
|
3113
|
-
tabindex: e.
|
|
3144
|
+
"aria-hidden": !e.isVisible,
|
|
3145
|
+
tabindex: e.isVisible ? void 0 : -1
|
|
3114
3146
|
}, t.default());
|
|
3115
3147
|
}
|
|
3116
3148
|
}, __plugin_vue_export_helper_default = (e, t) => {
|
|
@@ -3130,33 +3162,33 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3130
3162
|
}
|
|
3131
3163
|
},
|
|
3132
3164
|
setup(e) {
|
|
3133
|
-
useCssVars((e) => ({
|
|
3165
|
+
useCssVars((e) => ({ v0b0e0d5c: B.value }));
|
|
3134
3166
|
let t = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, n = Object.freeze({
|
|
3135
3167
|
element: !0,
|
|
3136
3168
|
component: !0,
|
|
3137
3169
|
static: !0,
|
|
3138
3170
|
comment: !1,
|
|
3139
3171
|
text: !1
|
|
3140
|
-
}), r = e, { config: a, currentIndex: s, setCurrentIndex: l, isHovered: u, isNavigating: p, setIsNavigating: m, pauseAutoplay: b, resumeAutoplay: x, autoplayIsActive: C } = useCarouselClient(), T = ref(!0), E = (e, t) => e / t * 100, D = computed(() => ({
|
|
3141
|
-
transform: `translate3d(${
|
|
3142
|
-
transitionDuration: `${E(
|
|
3143
|
-
})),
|
|
3144
|
-
let t = parseFloat(
|
|
3145
|
-
return (t + a.value.gap) *
|
|
3146
|
-
},
|
|
3172
|
+
}), r = e, { config: a, currentIndex: s, setCurrentIndex: l, isHovered: u, isNavigating: p, setIsNavigating: m, pauseAutoplay: b, resumeAutoplay: x, autoplayIsActive: C } = useCarouselClient(), T = ref(!0), E = (e, t) => e / t * 100, D = ref(0), O = ref(0), k = ref(0), j = computed(() => range(k.value + 1, k.value + 1 + a.value.perPage)), N = computed(() => ({
|
|
3173
|
+
transform: `translate3d(${D.value}px, 0, 0)`,
|
|
3174
|
+
transitionDuration: `${E(V.value, a.value.transitionSpeed)}ms`
|
|
3175
|
+
})), P = (e) => {
|
|
3176
|
+
let t = parseFloat(B.value);
|
|
3177
|
+
return k.value = a.value.wrap ? r.totalSlides + e : e, (t + a.value.gap) * k.value * -1;
|
|
3178
|
+
}, F = ref(null), { width: L, height: R } = useElementSize(F), B = computed(() => {
|
|
3147
3179
|
let e = a.value.gap > 0 ? a.value.gap * (a.value.perPage - 1) : 0;
|
|
3148
|
-
return (
|
|
3149
|
-
})
|
|
3180
|
+
return (L.value - e) / a.value.perPage + "px";
|
|
3181
|
+
});
|
|
3150
3182
|
watch(() => r.isInit, async (e) => {
|
|
3151
|
-
e && (
|
|
3183
|
+
e && (D.value = P(s.value), await nextFrame(2), T.value = !1);
|
|
3152
3184
|
});
|
|
3153
|
-
let
|
|
3185
|
+
let V = computed(() => Math.abs(D.value - O.value));
|
|
3154
3186
|
watch(s, (e) => {
|
|
3155
|
-
p.value === !1 && (
|
|
3187
|
+
p.value === !1 && (O.value = D.value), D.value = P(e), t && U();
|
|
3156
3188
|
});
|
|
3157
|
-
let
|
|
3189
|
+
let H = () => {
|
|
3158
3190
|
m(!0);
|
|
3159
|
-
},
|
|
3191
|
+
}, U = async () => {
|
|
3160
3192
|
T.value = !0, await nextFrame();
|
|
3161
3193
|
let e = r.totalSlides;
|
|
3162
3194
|
l(loopedValue(s.value, 0, e)), await nextFrame(), T.value = !1, m(!1);
|
|
@@ -3164,7 +3196,7 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3164
3196
|
watch(u, (e) => {
|
|
3165
3197
|
a.value.pauseOnHover === !0 && (e ? b() : x());
|
|
3166
3198
|
});
|
|
3167
|
-
let
|
|
3199
|
+
let W = (e, t) => (t === "prefix" ? 0 : t === "suffix" ? r.totalSlides * 2 : r.totalSlides) + e, G = {
|
|
3168
3200
|
props: { gap: {
|
|
3169
3201
|
type: Number,
|
|
3170
3202
|
default: 0
|
|
@@ -3172,20 +3204,25 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3172
3204
|
setup(e, { slots: t }) {
|
|
3173
3205
|
let r = () => t.default?.() || [], s = (t) => {
|
|
3174
3206
|
let a = 0, s = t ? `_${t}` : "";
|
|
3175
|
-
return replaceChildren(r(), (n) =>
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
"evo-vue-carousel__slide-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3207
|
+
return replaceChildren(r(), (n) => {
|
|
3208
|
+
a++;
|
|
3209
|
+
let r = W(a, t);
|
|
3210
|
+
return h(Slide_default, {
|
|
3211
|
+
class: normalizeClass(["evo-vue-carousel__slide shrink-0 grow-0", {
|
|
3212
|
+
"evo-vue-carousel__slide-clone": !!t,
|
|
3213
|
+
"evo-vue-carousel__slide-prefix": t === "prefix",
|
|
3214
|
+
"evo-vue-carousel__slide-suffix": t === "suffix"
|
|
3215
|
+
}]),
|
|
3216
|
+
style: {
|
|
3217
|
+
flexBasis: "var(--slide-width, 0px)",
|
|
3218
|
+
marginRight: `${e.gap}px`
|
|
3219
|
+
},
|
|
3220
|
+
ariaLabel: `Slide ${a}`,
|
|
3221
|
+
key: `slide_${a}${s}`,
|
|
3222
|
+
isClone: !!t,
|
|
3223
|
+
isVisible: j.value.includes(r)
|
|
3224
|
+
}, { default: () => [n] });
|
|
3225
|
+
}, n);
|
|
3189
3226
|
};
|
|
3190
3227
|
return () => h("div", {
|
|
3191
3228
|
class: normalizeClass([
|
|
@@ -3197,27 +3234,28 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3197
3234
|
T.value ? "transition-none" : "transition-all motion-reduce:transition-none",
|
|
3198
3235
|
a.value.slideTransitionTimingClass
|
|
3199
3236
|
]),
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3237
|
+
role: "list",
|
|
3238
|
+
style: N.value,
|
|
3239
|
+
onTransitionstart: H,
|
|
3240
|
+
onTransitionend: U
|
|
3203
3241
|
}, a.value.wrap ? concat(s("prefix"), s(), s("suffix")) : s());
|
|
3204
3242
|
}
|
|
3205
3243
|
};
|
|
3206
3244
|
return (e, t) => (openBlock(), createElementBlock("div", {
|
|
3207
3245
|
ref_key: "viewportRef",
|
|
3208
|
-
ref:
|
|
3246
|
+
ref: F,
|
|
3209
3247
|
class: "evo-vue-carousel__viewport evo-vue-carousel__viewport--slider relative flex w-full h-full max-h-full overflow-hidden",
|
|
3210
|
-
"data-width": unref(
|
|
3211
|
-
"data-height": unref(
|
|
3248
|
+
"data-width": unref(L),
|
|
3249
|
+
"data-height": unref(R)
|
|
3212
3250
|
}, [createVNode(unref(S), {
|
|
3213
3251
|
slots: e.$slots,
|
|
3214
3252
|
only: "default"
|
|
3215
3253
|
}, {
|
|
3216
|
-
default: withCtx(() => [createVNode(
|
|
3254
|
+
default: withCtx(() => [createVNode(G, { gap: unref(a).gap }, null, 8, ["gap"])]),
|
|
3217
3255
|
_: 1
|
|
3218
3256
|
}, 8, ["slots"])], 8, _hoisted_1$1));
|
|
3219
3257
|
}
|
|
3220
|
-
}, [["__scopeId", "data-v-
|
|
3258
|
+
}, [["__scopeId", "data-v-06f26dae"]]), _hoisted_1 = ["data-height"], Gallery_default = {
|
|
3221
3259
|
__name: "Gallery",
|
|
3222
3260
|
props: {
|
|
3223
3261
|
totalSlides: {
|
|
@@ -3248,11 +3286,14 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3248
3286
|
let n = 0, r = replaceChildren(e, (e) => {
|
|
3249
3287
|
let t = h(Slide_default, {
|
|
3250
3288
|
class: normalizeClass(["evo-vue-carousel__slide evo-vue-carousel__slide--visible w-full h-full", { hidden: l.value.includes(n) === !1 }]),
|
|
3251
|
-
role: "
|
|
3289
|
+
role: "listitem"
|
|
3252
3290
|
}, { default: () => [e] });
|
|
3253
3291
|
return n++, t;
|
|
3254
3292
|
}, COMPONENTS_AND_ELEMENTS), c = concat(slice(r, s.value), slice(r, 0, s.value));
|
|
3255
|
-
return h("div", {
|
|
3293
|
+
return h("div", {
|
|
3294
|
+
role: "list",
|
|
3295
|
+
class: normalizeClass(["flex h-full overflow-hidden"])
|
|
3296
|
+
}, c);
|
|
3256
3297
|
};
|
|
3257
3298
|
} };
|
|
3258
3299
|
return (e, t) => (openBlock(), createElementBlock("div", {
|
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.evo-vue-carousel__pagination{pointer-events:none}.evo-vue-carousel__pagination>*{pointer-events:auto}.evo-vue-carousel__navigation{pointer-events:none}.evo-vue-carousel__navigation>*{pointer-events:auto}.evo-vue-carousel__viewport-track[data-v-
|
|
1
|
+
.evo-vue-carousel__pagination{pointer-events:none}.evo-vue-carousel__pagination>*{pointer-events:auto}.evo-vue-carousel__navigation{pointer-events:none}.evo-vue-carousel__navigation>*{pointer-events:auto}.evo-vue-carousel__viewport-track[data-v-06f26dae]{--slide-width:var(--v0b0e0d5c)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evo-vue-carousel",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"files": [
|
|
@@ -31,29 +31,29 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@evomark/vue-forward-slots": "^6.2.2",
|
|
33
33
|
"@skirtle/vue-vnode-utils": "^0.2.0",
|
|
34
|
-
"@vueuse/core": "^14.
|
|
35
|
-
"es-toolkit": "^1.
|
|
34
|
+
"@vueuse/core": "^14.1.0",
|
|
35
|
+
"es-toolkit": "^1.43.0",
|
|
36
36
|
"vue3-icon": "^3.0.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@eslint/js": "^9.39.
|
|
39
|
+
"@eslint/js": "^9.39.2",
|
|
40
40
|
"@testing-library/vue": "^8.1.0",
|
|
41
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
41
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
42
42
|
"@vue/test-utils": "^2.4.6",
|
|
43
|
-
"eslint": "^9.39.
|
|
43
|
+
"eslint": "^9.39.2",
|
|
44
44
|
"eslint-config-prettier": "^10.1.8",
|
|
45
|
-
"eslint-plugin-jsdoc": "^
|
|
46
|
-
"eslint-plugin-vue": "^10.
|
|
47
|
-
"globals": "^
|
|
48
|
-
"jsdom": "^27.
|
|
49
|
-
"prettier": "^3.
|
|
50
|
-
"tailwind-merge": "^3.
|
|
51
|
-
"tailwindcss": "^4.1.
|
|
52
|
-
"vite": "npm:rolldown-vite@^7.
|
|
45
|
+
"eslint-plugin-jsdoc": "^62.0.0",
|
|
46
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
47
|
+
"globals": "^17.0.0",
|
|
48
|
+
"jsdom": "^27.4.0",
|
|
49
|
+
"prettier": "^3.7.4",
|
|
50
|
+
"tailwind-merge": "^3.4.0",
|
|
51
|
+
"tailwindcss": "^4.1.18",
|
|
52
|
+
"vite": "npm:rolldown-vite@^7.3.1",
|
|
53
53
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
54
|
-
"vitest": "^4.0.
|
|
54
|
+
"vitest": "^4.0.17",
|
|
55
55
|
"vitest-axe": "^0.1.0",
|
|
56
|
-
"vue": "^3.5.
|
|
56
|
+
"vue": "^3.5.26",
|
|
57
57
|
"vue-eslint-parser": "^10.2.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
@@ -61,4 +61,4 @@
|
|
|
61
61
|
"vue": "^3.4.38"
|
|
62
62
|
},
|
|
63
63
|
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
|
|
64
|
-
}
|
|
64
|
+
}
|