@okam/stack-ui 1.30.0 → 1.30.1
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/Popover/index.d.ts +3 -1
- package/index.js +1 -1
- package/index10.js +1 -1
- package/index10.mjs +1 -0
- package/index102.js +1 -1
- package/index102.mjs +3 -3
- package/index103.js +1 -1
- package/index103.mjs +1 -1
- package/index110.js +1 -1
- package/index110.mjs +2 -2
- package/index116.js +1 -1
- package/index116.mjs +9 -9
- package/index117.js +1 -1
- package/index117.mjs +9 -9
- package/index121.js +1 -1
- package/index121.mjs +2 -2
- package/index127.js +1 -1
- package/index127.mjs +46 -12
- package/index128.js +1 -1
- package/index128.mjs +241 -46
- package/index129.js +2 -1
- package/index129.mjs +13 -241
- package/index13.js +1 -1
- package/index13.mjs +9 -8
- package/index130.js +1 -2
- package/index130.mjs +29 -12
- package/index131.js +1 -1
- package/index131.mjs +11 -29
- package/index132.js +1 -1
- package/index132.mjs +2 -2
- package/index135.js +1 -1
- package/index135.mjs +196 -58
- package/index136.js +1 -1
- package/index136.mjs +60 -90
- package/index137.js +1 -1
- package/index137.mjs +140 -32
- package/index138.js +1 -1
- package/index138.mjs +114 -116
- package/index139.js +1 -1
- package/index139.mjs +217 -27
- package/index140.js +1 -1
- package/index140.mjs +188 -122
- package/index141.js +1 -1
- package/index141.mjs +67 -132
- package/index142.js +1 -1
- package/index142.mjs +258 -14
- package/index143.js +1 -1
- package/index143.mjs +92 -90
- package/index144.js +1 -1
- package/index144.mjs +172 -104
- package/index145.js +1 -1
- package/index145.mjs +84 -5
- package/index146.js +1 -1
- package/index146.mjs +58 -3
- package/index147.js +1 -1
- package/index147.mjs +123 -122
- package/index148.js +1 -1
- package/index148.mjs +113 -26
- package/index149.js +1 -1
- package/index149.mjs +119 -48
- package/index150.js +1 -1
- package/index150.mjs +72 -44
- package/index151.js +1 -1
- package/index151.mjs +107 -34
- package/index152.js +1 -1
- package/index152.mjs +50 -111
- package/index153.js +1 -1
- package/index153.mjs +93 -77
- package/index154.js +1 -1
- package/index154.mjs +70 -101
- package/index155.js +1 -1
- package/index155.mjs +57 -98
- package/index156.js +1 -1
- package/index156.mjs +92 -192
- package/index157.js +5 -1
- package/index157.mjs +75 -59
- package/index158.js +1 -1
- package/index158.mjs +1995 -125
- package/index159.js +1 -1
- package/index159.mjs +56 -116
- package/index160.js +1 -1
- package/index160.mjs +185 -214
- package/index161.js +1 -1
- package/index161.mjs +58 -187
- package/index162.js +1 -1
- package/index162.mjs +89 -64
- package/index163.js +1 -1
- package/index163.mjs +32 -257
- package/index164.js +1 -1
- package/index164.mjs +117 -93
- package/index165.js +1 -1
- package/index165.mjs +27 -174
- package/index166.js +1 -1
- package/index166.mjs +123 -83
- package/index167.js +1 -1
- package/index167.mjs +132 -56
- package/index168.js +1 -1
- package/index168.mjs +14 -126
- package/index169.js +1 -1
- package/index169.mjs +92 -113
- package/index170.js +1 -1
- package/index170.mjs +103 -119
- package/index171.js +1 -1
- package/index171.mjs +5 -72
- package/index172.js +1 -1
- package/index172.mjs +3 -110
- package/index173.js +1 -1
- package/index173.mjs +124 -51
- package/index174.js +1 -1
- package/index174.mjs +29 -93
- package/index175.js +1 -1
- package/index175.mjs +51 -70
- package/index176.js +1 -1
- package/index176.mjs +44 -56
- package/index177.js +1 -1
- package/index177.mjs +36 -98
- package/index178.js +1 -5
- package/index178.mjs +111 -78
- package/index179.js +1 -1
- package/index179.mjs +74 -2008
- package/index180.js +1 -1
- package/index180.mjs +99 -57
- package/index181.js +1 -1
- package/index181.mjs +98 -189
- package/index182.js +1 -1
- package/index182.mjs +130 -5
- package/index183.js +1 -1
- package/index183.mjs +172 -123
- package/index184.js +1 -1
- package/index184.mjs +8 -178
- package/index185.js +1 -1
- package/index185.mjs +3 -9
- package/index186.js +1 -1
- package/index186.mjs +36 -3
- package/index187.js +1 -1
- package/index187.mjs +5 -36
- package/index188.js +1 -1
- package/index188.mjs +29 -5
- package/index189.js +1 -1
- package/index189.mjs +6 -29
- package/index190.js +1 -1
- package/index190.mjs +5 -6
- package/index191.js +1 -1
- package/index191.mjs +1 -1
- package/index2.js +1 -1
- package/index2.mjs +44 -43
- package/index23.js +1 -1
- package/index23.mjs +39 -38
- package/index24.js +1 -1
- package/index24.mjs +40 -39
- package/index6.js +1 -1
- package/index6.mjs +34 -34
- package/index88.js +1 -1
- package/index88.mjs +16 -13
- package/index98.js +1 -1
- package/index98.mjs +3 -3
- package/index99.js +1 -1
- package/index99.mjs +1 -1
- package/package.json +1 -1
- package/theme/DatePicker/index.d.ts +3 -2
package/index160.mjs
CHANGED
|
@@ -1,220 +1,191 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const z = [
|
|
2
|
+
"eventsPrefix",
|
|
3
|
+
"injectStyles",
|
|
4
|
+
"injectStylesUrls",
|
|
5
|
+
"modules",
|
|
6
|
+
"init",
|
|
7
|
+
"_direction",
|
|
8
|
+
"oneWayMovement",
|
|
9
|
+
"swiperElementNodeName",
|
|
10
|
+
"touchEventsTarget",
|
|
11
|
+
"initialSlide",
|
|
12
|
+
"_speed",
|
|
13
|
+
"cssMode",
|
|
14
|
+
"updateOnWindowResize",
|
|
15
|
+
"resizeObserver",
|
|
16
|
+
"nested",
|
|
17
|
+
"focusableElements",
|
|
18
|
+
"_enabled",
|
|
19
|
+
"_width",
|
|
20
|
+
"_height",
|
|
21
|
+
"preventInteractionOnTransition",
|
|
22
|
+
"userAgent",
|
|
23
|
+
"url",
|
|
24
|
+
"_edgeSwipeDetection",
|
|
25
|
+
"_edgeSwipeThreshold",
|
|
26
|
+
"_freeMode",
|
|
27
|
+
"_autoHeight",
|
|
28
|
+
"setWrapperSize",
|
|
29
|
+
"virtualTranslate",
|
|
30
|
+
"_effect",
|
|
31
|
+
"breakpoints",
|
|
32
|
+
"breakpointsBase",
|
|
33
|
+
"_spaceBetween",
|
|
34
|
+
"_slidesPerView",
|
|
35
|
+
"maxBackfaceHiddenSlides",
|
|
36
|
+
"_grid",
|
|
37
|
+
"_slidesPerGroup",
|
|
38
|
+
"_slidesPerGroupSkip",
|
|
39
|
+
"_slidesPerGroupAuto",
|
|
40
|
+
"_centeredSlides",
|
|
41
|
+
"_centeredSlidesBounds",
|
|
42
|
+
"_slidesOffsetBefore",
|
|
43
|
+
"_slidesOffsetAfter",
|
|
44
|
+
"normalizeSlideIndex",
|
|
45
|
+
"_centerInsufficientSlides",
|
|
46
|
+
"_watchOverflow",
|
|
47
|
+
"roundLengths",
|
|
48
|
+
"touchRatio",
|
|
49
|
+
"touchAngle",
|
|
50
|
+
"simulateTouch",
|
|
51
|
+
"_shortSwipes",
|
|
52
|
+
"_longSwipes",
|
|
53
|
+
"longSwipesRatio",
|
|
54
|
+
"longSwipesMs",
|
|
55
|
+
"_followFinger",
|
|
56
|
+
"allowTouchMove",
|
|
57
|
+
"_threshold",
|
|
58
|
+
"touchMoveStopPropagation",
|
|
59
|
+
"touchStartPreventDefault",
|
|
60
|
+
"touchStartForcePreventDefault",
|
|
61
|
+
"touchReleaseOnEdges",
|
|
62
|
+
"uniqueNavElements",
|
|
63
|
+
"_resistance",
|
|
64
|
+
"_resistanceRatio",
|
|
65
|
+
"_watchSlidesProgress",
|
|
66
|
+
"_grabCursor",
|
|
67
|
+
"preventClicks",
|
|
68
|
+
"preventClicksPropagation",
|
|
69
|
+
"_slideToClickedSlide",
|
|
70
|
+
"_loop",
|
|
71
|
+
"loopAdditionalSlides",
|
|
72
|
+
"loopAddBlankSlides",
|
|
73
|
+
"loopPreventsSliding",
|
|
74
|
+
"_rewind",
|
|
75
|
+
"_allowSlidePrev",
|
|
76
|
+
"_allowSlideNext",
|
|
77
|
+
"_swipeHandler",
|
|
78
|
+
"_noSwiping",
|
|
79
|
+
"noSwipingClass",
|
|
80
|
+
"noSwipingSelector",
|
|
81
|
+
"passiveListeners",
|
|
82
|
+
"containerModifierClass",
|
|
83
|
+
"slideClass",
|
|
84
|
+
"slideActiveClass",
|
|
85
|
+
"slideVisibleClass",
|
|
86
|
+
"slideFullyVisibleClass",
|
|
87
|
+
"slideNextClass",
|
|
88
|
+
"slidePrevClass",
|
|
89
|
+
"slideBlankClass",
|
|
90
|
+
"wrapperClass",
|
|
91
|
+
"lazyPreloaderClass",
|
|
92
|
+
"lazyPreloadPrevNext",
|
|
93
|
+
"runCallbacksOnInit",
|
|
94
|
+
"observer",
|
|
95
|
+
"observeParents",
|
|
96
|
+
"observeSlideChildren",
|
|
97
|
+
// modules
|
|
98
|
+
"a11y",
|
|
99
|
+
"_autoplay",
|
|
100
|
+
"_controller",
|
|
101
|
+
"coverflowEffect",
|
|
102
|
+
"cubeEffect",
|
|
103
|
+
"fadeEffect",
|
|
104
|
+
"flipEffect",
|
|
105
|
+
"creativeEffect",
|
|
106
|
+
"cardsEffect",
|
|
107
|
+
"hashNavigation",
|
|
108
|
+
"history",
|
|
109
|
+
"keyboard",
|
|
110
|
+
"mousewheel",
|
|
111
|
+
"_navigation",
|
|
112
|
+
"_pagination",
|
|
113
|
+
"parallax",
|
|
114
|
+
"_scrollbar",
|
|
115
|
+
"_thumbs",
|
|
116
|
+
"virtual",
|
|
117
|
+
"zoom",
|
|
118
|
+
"control"
|
|
119
|
+
];
|
|
120
|
+
function b(n) {
|
|
121
|
+
return typeof n == "object" && n !== null && n.constructor && Object.prototype.toString.call(n).slice(8, -1) === "Object" && !n.__swiper__;
|
|
122
|
+
}
|
|
123
|
+
function j(n, i) {
|
|
124
|
+
const r = ["__proto__", "constructor", "prototype"];
|
|
125
|
+
Object.keys(i).filter((e) => r.indexOf(e) < 0).forEach((e) => {
|
|
126
|
+
typeof n[e] > "u" ? n[e] = i[e] : b(i[e]) && b(n[e]) && Object.keys(i[e]).length > 0 ? i[e].__swiper__ ? n[e] = i[e] : j(n[e], i[e]) : n[e] = i[e];
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function M(n) {
|
|
130
|
+
return n === void 0 && (n = {}), n.navigation && typeof n.navigation.nextEl > "u" && typeof n.navigation.prevEl > "u";
|
|
131
|
+
}
|
|
132
|
+
function B(n) {
|
|
133
|
+
return n === void 0 && (n = {}), n.pagination && typeof n.pagination.el > "u";
|
|
134
|
+
}
|
|
135
|
+
function I(n) {
|
|
136
|
+
return n === void 0 && (n = {}), n.scrollbar && typeof n.scrollbar.el > "u";
|
|
137
|
+
}
|
|
138
|
+
function L(n) {
|
|
139
|
+
n === void 0 && (n = "");
|
|
140
|
+
const i = n.split(" ").map((e) => e.trim()).filter((e) => !!e), r = [];
|
|
141
|
+
return i.forEach((e) => {
|
|
142
|
+
r.indexOf(e) < 0 && r.push(e);
|
|
143
|
+
}), r.join(" ");
|
|
144
|
+
}
|
|
145
|
+
function N(n) {
|
|
146
|
+
return n === void 0 && (n = ""), n ? n.includes("swiper-wrapper") ? n : `swiper-wrapper ${n}` : "swiper-wrapper";
|
|
147
|
+
}
|
|
148
|
+
function A(n) {
|
|
5
149
|
let {
|
|
6
|
-
swiper:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
formatFractionCurrent: (a) => a,
|
|
28
|
-
formatFractionTotal: (a) => a,
|
|
29
|
-
bulletClass: `${d}-bullet`,
|
|
30
|
-
bulletActiveClass: `${d}-bullet-active`,
|
|
31
|
-
modifierClass: `${d}-`,
|
|
32
|
-
currentClass: `${d}-current`,
|
|
33
|
-
totalClass: `${d}-total`,
|
|
34
|
-
hiddenClass: `${d}-hidden`,
|
|
35
|
-
progressbarFillClass: `${d}-progressbar-fill`,
|
|
36
|
-
progressbarOppositeClass: `${d}-progressbar-opposite`,
|
|
37
|
-
clickableClass: `${d}-clickable`,
|
|
38
|
-
lockClass: `${d}-lock`,
|
|
39
|
-
horizontalClass: `${d}-horizontal`,
|
|
40
|
-
verticalClass: `${d}-vertical`,
|
|
41
|
-
paginationDisabledClass: `${d}-disabled`
|
|
42
|
-
}
|
|
43
|
-
}), e.pagination = {
|
|
44
|
-
el: null,
|
|
45
|
-
bullets: []
|
|
150
|
+
swiper: i,
|
|
151
|
+
slides: r,
|
|
152
|
+
passedParams: e,
|
|
153
|
+
changedParams: o,
|
|
154
|
+
nextEl: s,
|
|
155
|
+
prevEl: a,
|
|
156
|
+
scrollbarEl: d,
|
|
157
|
+
paginationEl: c
|
|
158
|
+
} = n;
|
|
159
|
+
const h = o.filter((t) => t !== "children" && t !== "direction" && t !== "wrapperClass"), {
|
|
160
|
+
params: l,
|
|
161
|
+
pagination: p,
|
|
162
|
+
navigation: f,
|
|
163
|
+
scrollbar: v,
|
|
164
|
+
virtual: u,
|
|
165
|
+
thumbs: E
|
|
166
|
+
} = i;
|
|
167
|
+
let S, _, x, C, P, m, O, g;
|
|
168
|
+
o.includes("thumbs") && e.thumbs && e.thumbs.swiper && l.thumbs && !l.thumbs.swiper && (S = !0), o.includes("controller") && e.controller && e.controller.control && l.controller && !l.controller.control && (_ = !0), o.includes("pagination") && e.pagination && (e.pagination.el || c) && (l.pagination || l.pagination === !1) && p && !p.el && (x = !0), o.includes("scrollbar") && e.scrollbar && (e.scrollbar.el || d) && (l.scrollbar || l.scrollbar === !1) && v && !v.el && (C = !0), o.includes("navigation") && e.navigation && (e.navigation.prevEl || a) && (e.navigation.nextEl || s) && (l.navigation || l.navigation === !1) && f && !f.prevEl && !f.nextEl && (P = !0);
|
|
169
|
+
const T = (t) => {
|
|
170
|
+
i[t] && (i[t].destroy(), t === "navigation" ? (i.isElement && (i[t].prevEl.remove(), i[t].nextEl.remove()), l[t].prevEl = void 0, l[t].nextEl = void 0, i[t].prevEl = void 0, i[t].nextEl = void 0) : (i.isElement && i[t].el.remove(), l[t].el = void 0, i[t].el = void 0));
|
|
46
171
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
bulletActiveClass: t
|
|
54
|
-
} = e.params.pagination;
|
|
55
|
-
a && (a = a[`${s === "prev" ? "previous" : "next"}ElementSibling`], a && (a.classList.add(`${t}-${s}`), a = a[`${s === "prev" ? "previous" : "next"}ElementSibling`], a && a.classList.add(`${t}-${s}-${s}`)));
|
|
56
|
-
}
|
|
57
|
-
function I(a) {
|
|
58
|
-
const s = a.target.closest($(e.params.pagination.bulletClass));
|
|
59
|
-
if (!s)
|
|
60
|
-
return;
|
|
61
|
-
a.preventDefault();
|
|
62
|
-
const t = P(s) * e.params.slidesPerGroup;
|
|
63
|
-
if (e.params.loop) {
|
|
64
|
-
if (e.realIndex === t) return;
|
|
65
|
-
e.slideToLoop(t);
|
|
66
|
-
} else
|
|
67
|
-
e.slideTo(t);
|
|
68
|
-
}
|
|
69
|
-
function h() {
|
|
70
|
-
const a = e.rtl, s = e.params.pagination;
|
|
71
|
-
if (k()) return;
|
|
72
|
-
let t = e.pagination.el;
|
|
73
|
-
t = m(t);
|
|
74
|
-
let i, p;
|
|
75
|
-
const C = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, z = e.params.loop ? Math.ceil(C / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
76
|
-
if (e.params.loop ? (p = e.previousRealIndex || 0, i = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (i = e.snapIndex, p = e.previousSnapIndex) : (p = e.previousIndex || 0, i = e.activeIndex || 0), s.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
|
|
77
|
-
const l = e.pagination.bullets;
|
|
78
|
-
let f, c, L;
|
|
79
|
-
if (s.dynamicBullets && (b = F(l[0], e.isHorizontal() ? "width" : "height"), t.forEach((n) => {
|
|
80
|
-
n.style[e.isHorizontal() ? "width" : "height"] = `${b * (s.dynamicMainBullets + 4)}px`;
|
|
81
|
-
}), s.dynamicMainBullets > 1 && p !== void 0 && (u += i - (p || 0), u > s.dynamicMainBullets - 1 ? u = s.dynamicMainBullets - 1 : u < 0 && (u = 0)), f = Math.max(i - u, 0), c = f + (Math.min(l.length, s.dynamicMainBullets) - 1), L = (c + f) / 2), l.forEach((n) => {
|
|
82
|
-
const r = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((o) => `${s.bulletActiveClass}${o}`)].map((o) => typeof o == "string" && o.includes(" ") ? o.split(" ") : o).flat();
|
|
83
|
-
n.classList.remove(...r);
|
|
84
|
-
}), t.length > 1)
|
|
85
|
-
l.forEach((n) => {
|
|
86
|
-
const r = P(n);
|
|
87
|
-
r === i ? n.classList.add(...s.bulletActiveClass.split(" ")) : e.isElement && n.setAttribute("part", "bullet"), s.dynamicBullets && (r >= f && r <= c && n.classList.add(...`${s.bulletActiveClass}-main`.split(" ")), r === f && x(n, "prev"), r === c && x(n, "next"));
|
|
88
|
-
});
|
|
89
|
-
else {
|
|
90
|
-
const n = l[i];
|
|
91
|
-
if (n && n.classList.add(...s.bulletActiveClass.split(" ")), e.isElement && l.forEach((r, o) => {
|
|
92
|
-
r.setAttribute("part", o === i ? "bullet-active" : "bullet");
|
|
93
|
-
}), s.dynamicBullets) {
|
|
94
|
-
const r = l[f], o = l[c];
|
|
95
|
-
for (let y = f; y <= c; y += 1)
|
|
96
|
-
l[y] && l[y].classList.add(...`${s.bulletActiveClass}-main`.split(" "));
|
|
97
|
-
x(r, "prev"), x(o, "next");
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (s.dynamicBullets) {
|
|
101
|
-
const n = Math.min(l.length, s.dynamicMainBullets + 4), r = (b * n - b) / 2 - L * b, o = a ? "right" : "left";
|
|
102
|
-
l.forEach((y) => {
|
|
103
|
-
y.style[e.isHorizontal() ? o : "top"] = `${r}px`;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
t.forEach((l, f) => {
|
|
108
|
-
if (s.type === "fraction" && (l.querySelectorAll($(s.currentClass)).forEach((c) => {
|
|
109
|
-
c.textContent = s.formatFractionCurrent(i + 1);
|
|
110
|
-
}), l.querySelectorAll($(s.totalClass)).forEach((c) => {
|
|
111
|
-
c.textContent = s.formatFractionTotal(z);
|
|
112
|
-
})), s.type === "progressbar") {
|
|
113
|
-
let c;
|
|
114
|
-
s.progressbarOpposite ? c = e.isHorizontal() ? "vertical" : "horizontal" : c = e.isHorizontal() ? "horizontal" : "vertical";
|
|
115
|
-
const L = (i + 1) / z;
|
|
116
|
-
let n = 1, r = 1;
|
|
117
|
-
c === "horizontal" ? n = L : r = L, l.querySelectorAll($(s.progressbarFillClass)).forEach((o) => {
|
|
118
|
-
o.style.transform = `translate3d(0,0,0) scaleX(${n}) scaleY(${r})`, o.style.transitionDuration = `${e.params.speed}ms`;
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
s.type === "custom" && s.renderCustom ? (l.innerHTML = s.renderCustom(e, i + 1, z), f === 0 && v("paginationRender", l)) : (f === 0 && v("paginationRender", l), v("paginationUpdate", l)), e.params.watchOverflow && e.enabled && l.classList[e.isLocked ? "add" : "remove"](s.lockClass);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
function B() {
|
|
125
|
-
const a = e.params.pagination;
|
|
126
|
-
if (k()) return;
|
|
127
|
-
const s = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
|
|
128
|
-
let t = e.pagination.el;
|
|
129
|
-
t = m(t);
|
|
130
|
-
let i = "";
|
|
131
|
-
if (a.type === "bullets") {
|
|
132
|
-
let p = e.params.loop ? Math.ceil(s / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
133
|
-
e.params.freeMode && e.params.freeMode.enabled && p > s && (p = s);
|
|
134
|
-
for (let C = 0; C < p; C += 1)
|
|
135
|
-
a.renderBullet ? i += a.renderBullet.call(e, C, a.bulletClass) : i += `<${a.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${a.bulletClass}"></${a.bulletElement}>`;
|
|
136
|
-
}
|
|
137
|
-
a.type === "fraction" && (a.renderFraction ? i = a.renderFraction.call(e, a.currentClass, a.totalClass) : i = `<span class="${a.currentClass}"></span> / <span class="${a.totalClass}"></span>`), a.type === "progressbar" && (a.renderProgressbar ? i = a.renderProgressbar.call(e, a.progressbarFillClass) : i = `<span class="${a.progressbarFillClass}"></span>`), e.pagination.bullets = [], t.forEach((p) => {
|
|
138
|
-
a.type !== "custom" && (p.innerHTML = i || ""), a.type === "bullets" && e.pagination.bullets.push(...p.querySelectorAll($(a.bulletClass)));
|
|
139
|
-
}), a.type !== "custom" && v("paginationRender", t[0]);
|
|
140
|
-
}
|
|
141
|
-
function A() {
|
|
142
|
-
e.params.pagination = w(e, e.originalParams.pagination, e.params.pagination, {
|
|
143
|
-
el: "swiper-pagination"
|
|
144
|
-
});
|
|
145
|
-
const a = e.params.pagination;
|
|
146
|
-
if (!a.el) return;
|
|
147
|
-
let s;
|
|
148
|
-
typeof a.el == "string" && e.isElement && (s = e.el.querySelector(a.el)), !s && typeof a.el == "string" && (s = [...document.querySelectorAll(a.el)]), s || (s = a.el), !(!s || s.length === 0) && (e.params.uniqueNavElements && typeof a.el == "string" && Array.isArray(s) && s.length > 1 && (s = [...e.el.querySelectorAll(a.el)], s.length > 1 && (s = s.filter((t) => E(t, ".swiper")[0] === e.el)[0])), Array.isArray(s) && s.length === 1 && (s = s[0]), Object.assign(e.pagination, {
|
|
149
|
-
el: s
|
|
150
|
-
}), s = m(s), s.forEach((t) => {
|
|
151
|
-
a.type === "bullets" && a.clickable && t.classList.add(...(a.clickableClass || "").split(" ")), t.classList.add(a.modifierClass + a.type), t.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.type === "bullets" && a.dynamicBullets && (t.classList.add(`${a.modifierClass}${a.type}-dynamic`), u = 0, a.dynamicMainBullets < 1 && (a.dynamicMainBullets = 1)), a.type === "progressbar" && a.progressbarOpposite && t.classList.add(a.progressbarOppositeClass), a.clickable && t.addEventListener("click", I), e.enabled || t.classList.add(a.lockClass);
|
|
152
|
-
}));
|
|
153
|
-
}
|
|
154
|
-
function M() {
|
|
155
|
-
const a = e.params.pagination;
|
|
156
|
-
if (k()) return;
|
|
157
|
-
let s = e.pagination.el;
|
|
158
|
-
s && (s = m(s), s.forEach((t) => {
|
|
159
|
-
t.classList.remove(a.hiddenClass), t.classList.remove(a.modifierClass + a.type), t.classList.remove(e.isHorizontal() ? a.horizontalClass : a.verticalClass), a.clickable && (t.classList.remove(...(a.clickableClass || "").split(" ")), t.removeEventListener("click", I));
|
|
160
|
-
})), e.pagination.bullets && e.pagination.bullets.forEach((t) => t.classList.remove(...a.bulletActiveClass.split(" ")));
|
|
161
|
-
}
|
|
162
|
-
g("changeDirection", () => {
|
|
163
|
-
if (!e.pagination || !e.pagination.el) return;
|
|
164
|
-
const a = e.params.pagination;
|
|
165
|
-
let {
|
|
166
|
-
el: s
|
|
167
|
-
} = e.pagination;
|
|
168
|
-
s = m(s), s.forEach((t) => {
|
|
169
|
-
t.classList.remove(a.horizontalClass, a.verticalClass), t.classList.add(e.isHorizontal() ? a.horizontalClass : a.verticalClass);
|
|
170
|
-
});
|
|
171
|
-
}), g("init", () => {
|
|
172
|
-
e.params.pagination.enabled === !1 ? S() : (A(), B(), h());
|
|
173
|
-
}), g("activeIndexChange", () => {
|
|
174
|
-
typeof e.snapIndex > "u" && h();
|
|
175
|
-
}), g("snapIndexChange", () => {
|
|
176
|
-
h();
|
|
177
|
-
}), g("snapGridLengthChange", () => {
|
|
178
|
-
B(), h();
|
|
179
|
-
}), g("destroy", () => {
|
|
180
|
-
M();
|
|
181
|
-
}), g("enable disable", () => {
|
|
182
|
-
let {
|
|
183
|
-
el: a
|
|
184
|
-
} = e.pagination;
|
|
185
|
-
a && (a = m(a), a.forEach((s) => s.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
|
|
186
|
-
}), g("lock unlock", () => {
|
|
187
|
-
h();
|
|
188
|
-
}), g("click", (a, s) => {
|
|
189
|
-
const t = s.target, i = m(e.pagination.el);
|
|
190
|
-
if (e.params.pagination.el && e.params.pagination.hideOnClick && i && i.length > 0 && !t.classList.contains(e.params.pagination.bulletClass)) {
|
|
191
|
-
if (e.navigation && (e.navigation.nextEl && t === e.navigation.nextEl || e.navigation.prevEl && t === e.navigation.prevEl)) return;
|
|
192
|
-
const p = i[0].classList.contains(e.params.pagination.hiddenClass);
|
|
193
|
-
v(p === !0 ? "paginationShow" : "paginationHide"), i.forEach((C) => C.classList.toggle(e.params.pagination.hiddenClass));
|
|
172
|
+
o.includes("loop") && i.isElement && (l.loop && !e.loop ? m = !0 : !l.loop && e.loop ? O = !0 : g = !0), h.forEach((t) => {
|
|
173
|
+
if (b(l[t]) && b(e[t]))
|
|
174
|
+
Object.assign(l[t], e[t]), (t === "navigation" || t === "pagination" || t === "scrollbar") && "enabled" in e[t] && !e[t].enabled && T(t);
|
|
175
|
+
else {
|
|
176
|
+
const w = e[t];
|
|
177
|
+
(w === !0 || w === !1) && (t === "navigation" || t === "pagination" || t === "scrollbar") ? w === !1 && T(t) : l[t] = e[t];
|
|
194
178
|
}
|
|
195
|
-
});
|
|
196
|
-
const O = () => {
|
|
197
|
-
e.el.classList.remove(e.params.pagination.paginationDisabledClass);
|
|
198
|
-
let {
|
|
199
|
-
el: a
|
|
200
|
-
} = e.pagination;
|
|
201
|
-
a && (a = m(a), a.forEach((s) => s.classList.remove(e.params.pagination.paginationDisabledClass))), A(), B(), h();
|
|
202
|
-
}, S = () => {
|
|
203
|
-
e.el.classList.add(e.params.pagination.paginationDisabledClass);
|
|
204
|
-
let {
|
|
205
|
-
el: a
|
|
206
|
-
} = e.pagination;
|
|
207
|
-
a && (a = m(a), a.forEach((s) => s.classList.add(e.params.pagination.paginationDisabledClass))), M();
|
|
208
|
-
};
|
|
209
|
-
Object.assign(e.pagination, {
|
|
210
|
-
enable: O,
|
|
211
|
-
disable: S,
|
|
212
|
-
render: B,
|
|
213
|
-
update: h,
|
|
214
|
-
init: A,
|
|
215
|
-
destroy: M
|
|
216
|
-
});
|
|
179
|
+
}), h.includes("controller") && !_ && i.controller && i.controller.control && l.controller && l.controller.control && (i.controller.control = l.controller.control), o.includes("children") && r && u && l.virtual.enabled ? (u.slides = r, u.update(!0)) : o.includes("virtual") && u && l.virtual.enabled && (r && (u.slides = r), u.update(!0)), o.includes("children") && r && l.loop && (g = !0), S && E.init() && E.update(!0), _ && (i.controller.control = l.controller.control), x && (i.isElement && (!c || typeof c == "string") && (c = document.createElement("div"), c.classList.add("swiper-pagination"), c.part.add("pagination"), i.el.appendChild(c)), c && (l.pagination.el = c), p.init(), p.render(), p.update()), C && (i.isElement && (!d || typeof d == "string") && (d = document.createElement("div"), d.classList.add("swiper-scrollbar"), d.part.add("scrollbar"), i.el.appendChild(d)), d && (l.scrollbar.el = d), v.init(), v.updateSize(), v.setTranslate()), P && (i.isElement && ((!s || typeof s == "string") && (s = document.createElement("div"), s.classList.add("swiper-button-next"), s.innerHTML = i.hostEl.constructor.nextButtonSvg, s.part.add("button-next"), i.el.appendChild(s)), (!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-button-prev"), a.innerHTML = i.hostEl.constructor.prevButtonSvg, a.part.add("button-prev"), i.el.appendChild(a))), s && (l.navigation.nextEl = s), a && (l.navigation.prevEl = a), f.init(), f.update()), o.includes("allowSlideNext") && (i.allowSlideNext = e.allowSlideNext), o.includes("allowSlidePrev") && (i.allowSlidePrev = e.allowSlidePrev), o.includes("direction") && i.changeDirection(e.direction, !1), (m || g) && i.loopDestroy(), (O || g) && i.loopCreate(), i.update();
|
|
217
180
|
}
|
|
218
181
|
export {
|
|
219
|
-
|
|
182
|
+
B as a,
|
|
183
|
+
I as b,
|
|
184
|
+
L as d,
|
|
185
|
+
j as e,
|
|
186
|
+
b as i,
|
|
187
|
+
M as n,
|
|
188
|
+
z as p,
|
|
189
|
+
A as u,
|
|
190
|
+
N as w
|
|
220
191
|
};
|
package/index161.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@react-aria/utils"),O=require("@react-aria/focus"),m=require("./index191.js");function S(s,o){let{elementType:r="button",isDisabled:e,onPress:l,onPressStart:u,onPressEnd:P,onPressUp:p,onPressChange:c,preventFocusOnPress:b,allowFocusWhenDisabled:f,onClick:i,href:g,target:h,rel:y,type:d="button"}=s,n;r==="button"?n={type:d,disabled:e}:n={role:"button",tabIndex:e?void 0:0,href:r==="a"&&e?void 0:g,target:r==="a"?h:void 0,type:r==="input"?d:void 0,disabled:r==="input"?e:void 0,"aria-disabled":!e||r==="input"?void 0:e,rel:r==="a"?y:void 0};let{pressProps:C,isPressed:x}=m.usePress({onPressStart:u,onPressEnd:P,onPressChange:c,onPress:l,onPressUp:p,isDisabled:e,preventFocusOnPress:b,ref:o}),{focusableProps:t}=O.useFocusable(s,o);f&&(t.tabIndex=e?-1:t.tabIndex);let D=a.mergeProps(t,C,a.filterDOMProps(s,{labelable:!0}));return{isPressed:x,buttonProps:a.mergeProps(n,D,{"aria-haspopup":s["aria-haspopup"],"aria-expanded":s["aria-expanded"],"aria-controls":s["aria-controls"],"aria-pressed":s["aria-pressed"],onClick:F=>{i&&(i(F),console.warn("onClick is deprecated, please use onPress"))}})}}exports.useButton=S;
|