@okam/stack-ui 1.35.1 → 1.35.3
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/fields/SearchField/interface.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index103.js +1 -1
- package/index103.mjs +1 -1
- package/index105.js +1 -1
- package/index105.mjs +1 -1
- package/index106.js +1 -1
- package/index106.mjs +3 -3
- package/index107.js +1 -1
- package/index107.mjs +1 -1
- package/index112.js +1 -1
- package/index112.mjs +1 -1
- package/index115.js +1 -1
- package/index115.mjs +1 -1
- package/index122.js +1 -1
- package/index122.mjs +1 -1
- package/index123.js +1 -1
- package/index123.mjs +4 -4
- package/index124.js +1 -1
- package/index124.mjs +2 -2
- package/index139.js +1 -1
- package/index139.mjs +46 -12
- package/index140.js +1 -1
- package/index140.mjs +240 -11
- package/index141.js +2 -1
- package/index141.mjs +13 -57
- package/index142.js +1 -1
- package/index142.mjs +30 -46
- package/index143.js +1 -1
- package/index143.mjs +12 -241
- package/index144.js +1 -2
- package/index144.mjs +57 -13
- package/index145.js +1 -1
- package/index145.mjs +12 -30
- package/index167.js +1 -1
- package/index167.mjs +1 -1
- package/index18.js +1 -1
- package/index18.mjs +22 -22
- package/index195.js +1 -1
- package/index195.mjs +197 -134
- package/index196.js +1 -1
- package/index196.mjs +61 -194
- package/index197.js +1 -1
- package/index197.mjs +142 -21
- package/index198.js +1 -1
- package/index198.mjs +120 -45
- package/index199.js +1 -1
- package/index199.mjs +222 -46
- package/index200.js +1 -1
- package/index200.mjs +187 -94
- package/index201.js +1 -1
- package/index201.mjs +70 -72
- package/index202.js +1 -1
- package/index202.mjs +272 -61
- package/index203.js +1 -1
- package/index203.mjs +98 -7
- package/index204.js +1 -1
- package/index204.mjs +187 -10
- package/index205.js +1 -1
- package/index205.mjs +73 -192
- package/index206.js +1 -1
- package/index206.mjs +51 -57
- package/index207.js +1 -1
- package/index207.mjs +118 -135
- package/index208.js +1 -1
- package/index208.mjs +107 -115
- package/index209.js +1 -1
- package/index209.mjs +110 -212
- package/index210.js +1 -1
- package/index210.mjs +64 -182
- package/index211.js +1 -1
- package/index211.mjs +108 -67
- package/index212.js +1 -1
- package/index212.mjs +49 -276
- package/index213.js +1 -1
- package/index213.mjs +86 -91
- package/index214.js +1 -1
- package/index214.mjs +64 -182
- package/index215.js +1 -1
- package/index215.mjs +51 -79
- package/index216.js +1 -1
- package/index216.mjs +94 -53
- package/index217.js +5 -1
- package/index217.mjs +76 -122
- package/index218.js +1 -1
- package/index218.mjs +2014 -105
- package/index219.js +1 -1
- package/index219.mjs +57 -120
- package/index220.js +1 -1
- package/index220.mjs +186 -70
- package/index221.js +1 -1
- package/index221.mjs +137 -107
- package/index222.js +1 -1
- package/index222.mjs +197 -52
- package/index223.js +1 -1
- package/index223.mjs +22 -93
- package/index224.js +1 -1
- package/index224.mjs +46 -67
- package/index225.js +1 -1
- package/index225.mjs +47 -55
- package/index226.js +1 -1
- package/index226.mjs +96 -98
- package/index227.js +1 -5
- package/index227.mjs +72 -81
- package/index228.js +1 -1
- package/index228.mjs +58 -2015
- package/index229.js +1 -1
- package/index229.mjs +7 -59
- package/index230.js +1 -1
- package/index230.mjs +10 -187
- package/index233.js +1 -1
- package/index233.mjs +130 -4
- package/index234.js +1 -1
- package/index234.mjs +191 -5
- package/index235.js +1 -1
- package/index235.mjs +10 -5
- package/index236.js +1 -1
- package/index236.mjs +4 -5
- package/index237.js +1 -1
- package/index237.mjs +37 -5
- package/index238.js +1 -1
- package/index238.mjs +6 -5
- package/index239.js +1 -1
- package/index239.mjs +30 -5
- package/index240.js +1 -1
- package/index240.mjs +7 -5
- package/index241.js +1 -1
- package/index241.mjs +4 -4
- package/index242.js +1 -1
- package/index242.mjs +4 -4
- package/index243.js +1 -1
- package/index243.mjs +1 -1
- package/index244.js +1 -1
- package/index244.mjs +4 -4
- package/index245.js +1 -1
- package/index245.mjs +4 -4
- package/index246.js +1 -1
- package/index246.mjs +4 -4
- package/index247.js +1 -1
- package/index247.mjs +1 -1
- package/index248.js +1 -1
- package/index248.mjs +4 -4
- package/index249.js +1 -1
- package/index249.mjs +4 -4
- package/index250.js +1 -1
- package/index250.mjs +4 -4
- package/index251.js +1 -1
- package/index251.mjs +1 -1
- package/index252.js +1 -1
- package/index252.mjs +4 -4
- package/index253.js +1 -1
- package/index253.mjs +4 -4
- package/index254.js +1 -1
- package/index254.mjs +4 -4
- package/index255.js +1 -1
- package/index255.mjs +4 -4
- package/index256.js +1 -1
- package/index256.mjs +4 -4
- package/index257.js +1 -1
- package/index257.mjs +4 -4
- package/index258.js +1 -1
- package/index258.mjs +4 -4
- package/index259.js +1 -1
- package/index259.mjs +4 -4
- package/index260.js +1 -1
- package/index260.mjs +1 -1
- package/index261.js +1 -1
- package/index261.mjs +4 -4
- package/index262.js +1 -1
- package/index262.mjs +4 -4
- package/index263.js +1 -1
- package/index263.mjs +1 -1
- package/index264.js +1 -1
- package/index264.mjs +4 -4
- package/index265.js +1 -1
- package/index265.mjs +4 -4
- package/index266.js +1 -1
- package/index266.mjs +4 -4
- package/index267.js +1 -1
- package/index267.mjs +4 -130
- package/index268.js +1 -1
- package/index268.mjs +5 -191
- package/index269.js +1 -1
- package/index269.mjs +5 -10
- package/index270.js +1 -1
- package/index270.mjs +5 -4
- package/index271.js +1 -1
- package/index271.mjs +5 -37
- package/index272.js +1 -1
- package/index272.mjs +5 -6
- package/index273.js +1 -1
- package/index273.mjs +5 -30
- package/index274.js +1 -1
- package/index274.mjs +5 -7
- package/package.json +2 -28
package/index204.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const F=require("./index233.js"),y=require("./index236.js"),a=require("./index234.js");function K(P){let{swiper:i,extendParams:N,on:o}=P;N({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0}}),i.a11y={clicked:!1};let r=null,p,u,L=new Date().getTime();function f(e){const t=r;t.length!==0&&(t.innerHTML="",t.innerHTML=e)}function B(e){const t=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(e).replace(/x/g,t)}function g(e){e=a.m(e),e.forEach(t=>{t.setAttribute("tabIndex","0")})}function M(e){e=a.m(e),e.forEach(t=>{t.setAttribute("tabIndex","-1")})}function m(e,t){e=a.m(e),e.forEach(n=>{n.setAttribute("role",t)})}function x(e,t){e=a.m(e),e.forEach(n=>{n.setAttribute("aria-roledescription",t)})}function q(e,t){e=a.m(e),e.forEach(n=>{n.setAttribute("aria-controls",t)})}function E(e,t){e=a.m(e),e.forEach(n=>{n.setAttribute("aria-label",t)})}function O(e,t){e=a.m(e),e.forEach(n=>{n.setAttribute("id",t)})}function H(e,t){e=a.m(e),e.forEach(n=>{n.setAttribute("aria-live",t)})}function w(e){e=a.m(e),e.forEach(t=>{t.setAttribute("aria-disabled",!0)})}function A(e){e=a.m(e),e.forEach(t=>{t.setAttribute("aria-disabled",!1)})}function d(e){if(e.keyCode!==13&&e.keyCode!==32)return;const t=i.params.a11y,n=e.target;if(!(i.pagination&&i.pagination.el&&(n===i.pagination.el||i.pagination.el.contains(e.target))&&!e.target.matches(y.c(i.params.pagination.bulletClass)))){if(i.navigation&&i.navigation.prevEl&&i.navigation.nextEl){const s=a.m(i.navigation.prevEl);a.m(i.navigation.nextEl).includes(n)&&(i.isEnd&&!i.params.loop||i.slideNext(),i.isEnd?f(t.lastSlideMessage):f(t.nextSlideMessage)),s.includes(n)&&(i.isBeginning&&!i.params.loop||i.slidePrev(),i.isBeginning?f(t.firstSlideMessage):f(t.prevSlideMessage))}i.pagination&&n.matches(y.c(i.params.pagination.bulletClass))&&n.click()}}function G(){if(i.params.loop||i.params.rewind||!i.navigation)return;const{nextEl:e,prevEl:t}=i.navigation;t&&(i.isBeginning?(w(t),M(t)):(A(t),g(t))),e&&(i.isEnd?(w(e),M(e)):(A(e),g(e)))}function k(){return i.pagination&&i.pagination.bullets&&i.pagination.bullets.length}function C(){return k()&&i.params.pagination.clickable}function U(){const e=i.params.a11y;k()&&i.pagination.bullets.forEach(t=>{i.params.pagination.clickable&&(g(t),i.params.pagination.renderBullet||(m(t,"button"),E(t,e.paginationBulletMessage.replace(/\{\{index\}\}/,a.h(t)+1)))),t.matches(y.c(i.params.pagination.bulletActiveClass))?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")})}const S=(e,t,n)=>{g(e),e.tagName!=="BUTTON"&&(m(e,"button"),e.addEventListener("keydown",d)),E(e,n),q(e,t)},R=e=>{u&&u!==e.target&&!u.contains(e.target)&&(p=!0),i.a11y.clicked=!0},T=()=>{p=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.destroyed||(i.a11y.clicked=!1)})})},D=e=>{L=new Date().getTime()},h=e=>{if(i.a11y.clicked||!i.params.a11y.scrollOnFocus||new Date().getTime()-L<100)return;const t=e.target.closest(`.${i.params.slideClass}, swiper-slide`);if(!t||!i.slides.includes(t))return;u=t;const n=i.slides.indexOf(t)===i.activeIndex,s=i.params.watchSlidesProgress&&i.visibleSlides&&i.visibleSlides.includes(t);n||s||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(i.isHorizontal()?i.el.scrollLeft=0:i.el.scrollTop=0,requestAnimationFrame(()=>{p||(i.params.loop?i.slideToLoop(parseInt(t.getAttribute("data-swiper-slide-index")),0):i.slideTo(i.slides.indexOf(t),0),p=!1)}))},I=()=>{const e=i.params.a11y;e.itemRoleDescriptionMessage&&x(i.slides,e.itemRoleDescriptionMessage),e.slideRole&&m(i.slides,e.slideRole);const t=i.slides.length;e.slideLabelMessage&&i.slides.forEach((n,s)=>{const l=i.params.loop?parseInt(n.getAttribute("data-swiper-slide-index"),10):s,c=e.slideLabelMessage.replace(/\{\{index\}\}/,l+1).replace(/\{\{slidesLength\}\}/,t);E(n,c)})},V=()=>{const e=i.params.a11y;i.el.append(r);const t=i.el;e.containerRoleDescriptionMessage&&x(t,e.containerRoleDescriptionMessage),e.containerMessage&&E(t,e.containerMessage),e.containerRole&&m(t,e.containerRole);const n=i.wrapperEl,s=e.id||n.getAttribute("id")||`swiper-wrapper-${B(16)}`,l=i.params.autoplay&&i.params.autoplay.enabled?"off":"polite";O(n,s),H(n,l),I();let{nextEl:c,prevEl:v}=i.navigation?i.navigation:{};c=a.m(c),v=a.m(v),c&&c.forEach(b=>S(b,s,e.nextSlideMessage)),v&&v.forEach(b=>S(b,s,e.prevSlideMessage)),C()&&a.m(i.pagination.el).forEach(z=>{z.addEventListener("keydown",d)}),F.g().addEventListener("visibilitychange",D),i.el.addEventListener("focus",h,!0),i.el.addEventListener("focus",h,!0),i.el.addEventListener("pointerdown",R,!0),i.el.addEventListener("pointerup",T,!0)};function $(){r&&r.remove();let{nextEl:e,prevEl:t}=i.navigation?i.navigation:{};e=a.m(e),t=a.m(t),e&&e.forEach(s=>s.removeEventListener("keydown",d)),t&&t.forEach(s=>s.removeEventListener("keydown",d)),C()&&a.m(i.pagination.el).forEach(l=>{l.removeEventListener("keydown",d)}),F.g().removeEventListener("visibilitychange",D),i.el&&typeof i.el!="string"&&(i.el.removeEventListener("focus",h,!0),i.el.removeEventListener("pointerdown",R,!0),i.el.removeEventListener("pointerup",T,!0))}o("beforeInit",()=>{r=a.c("span",i.params.a11y.notificationClass),r.setAttribute("aria-live","assertive"),r.setAttribute("aria-atomic","true")}),o("afterInit",()=>{i.params.a11y.enabled&&V()}),o("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{i.params.a11y.enabled&&I()}),o("fromEdge toEdge afterInit lock unlock",()=>{i.params.a11y.enabled&&G()}),o("paginationUpdate",()=>{i.params.a11y.enabled&&U()}),o("destroy",()=>{i.params.a11y.enabled&&$()})}module.exports=K;
|
package/index204.mjs
CHANGED
|
@@ -1,14 +1,191 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { g as F } from "./index233.mjs";
|
|
2
|
+
import { c as y } from "./index236.mjs";
|
|
3
|
+
import { c as K, h as j, m as n } from "./index234.mjs";
|
|
4
|
+
function Y(P) {
|
|
5
|
+
let {
|
|
6
|
+
swiper: i,
|
|
7
|
+
extendParams: N,
|
|
8
|
+
on: o
|
|
9
|
+
} = P;
|
|
10
|
+
N({
|
|
11
|
+
a11y: {
|
|
12
|
+
enabled: !0,
|
|
13
|
+
notificationClass: "swiper-notification",
|
|
14
|
+
prevSlideMessage: "Previous slide",
|
|
15
|
+
nextSlideMessage: "Next slide",
|
|
16
|
+
firstSlideMessage: "This is the first slide",
|
|
17
|
+
lastSlideMessage: "This is the last slide",
|
|
18
|
+
paginationBulletMessage: "Go to slide {{index}}",
|
|
19
|
+
slideLabelMessage: "{{index}} / {{slidesLength}}",
|
|
20
|
+
containerMessage: null,
|
|
21
|
+
containerRoleDescriptionMessage: null,
|
|
22
|
+
containerRole: null,
|
|
23
|
+
itemRoleDescriptionMessage: null,
|
|
24
|
+
slideRole: "group",
|
|
25
|
+
id: null,
|
|
26
|
+
scrollOnFocus: !0
|
|
6
27
|
}
|
|
7
|
-
}),
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
28
|
+
}), i.a11y = {
|
|
29
|
+
clicked: !1
|
|
30
|
+
};
|
|
31
|
+
let r = null, p, f, L = (/* @__PURE__ */ new Date()).getTime();
|
|
32
|
+
function u(e) {
|
|
33
|
+
const t = r;
|
|
34
|
+
t.length !== 0 && (t.innerHTML = "", t.innerHTML = e);
|
|
35
|
+
}
|
|
36
|
+
function B(e) {
|
|
37
|
+
const t = () => Math.round(16 * Math.random()).toString(16);
|
|
38
|
+
return "x".repeat(e).replace(/x/g, t);
|
|
39
|
+
}
|
|
40
|
+
function g(e) {
|
|
41
|
+
e = n(e), e.forEach((t) => {
|
|
42
|
+
t.setAttribute("tabIndex", "0");
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function x(e) {
|
|
46
|
+
e = n(e), e.forEach((t) => {
|
|
47
|
+
t.setAttribute("tabIndex", "-1");
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function m(e, t) {
|
|
51
|
+
e = n(e), e.forEach((a) => {
|
|
52
|
+
a.setAttribute("role", t);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function M(e, t) {
|
|
56
|
+
e = n(e), e.forEach((a) => {
|
|
57
|
+
a.setAttribute("aria-roledescription", t);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function O(e, t) {
|
|
61
|
+
e = n(e), e.forEach((a) => {
|
|
62
|
+
a.setAttribute("aria-controls", t);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function E(e, t) {
|
|
66
|
+
e = n(e), e.forEach((a) => {
|
|
67
|
+
a.setAttribute("aria-label", t);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function H(e, t) {
|
|
71
|
+
e = n(e), e.forEach((a) => {
|
|
72
|
+
a.setAttribute("id", t);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function q(e, t) {
|
|
76
|
+
e = n(e), e.forEach((a) => {
|
|
77
|
+
a.setAttribute("aria-live", t);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function A(e) {
|
|
81
|
+
e = n(e), e.forEach((t) => {
|
|
82
|
+
t.setAttribute("aria-disabled", !0);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function w(e) {
|
|
86
|
+
e = n(e), e.forEach((t) => {
|
|
87
|
+
t.setAttribute("aria-disabled", !1);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function d(e) {
|
|
91
|
+
if (e.keyCode !== 13 && e.keyCode !== 32) return;
|
|
92
|
+
const t = i.params.a11y, a = e.target;
|
|
93
|
+
if (!(i.pagination && i.pagination.el && (a === i.pagination.el || i.pagination.el.contains(e.target)) && !e.target.matches(y(i.params.pagination.bulletClass)))) {
|
|
94
|
+
if (i.navigation && i.navigation.prevEl && i.navigation.nextEl) {
|
|
95
|
+
const s = n(i.navigation.prevEl);
|
|
96
|
+
n(i.navigation.nextEl).includes(a) && (i.isEnd && !i.params.loop || i.slideNext(), i.isEnd ? u(t.lastSlideMessage) : u(t.nextSlideMessage)), s.includes(a) && (i.isBeginning && !i.params.loop || i.slidePrev(), i.isBeginning ? u(t.firstSlideMessage) : u(t.prevSlideMessage));
|
|
97
|
+
}
|
|
98
|
+
i.pagination && a.matches(y(i.params.pagination.bulletClass)) && a.click();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function G() {
|
|
102
|
+
if (i.params.loop || i.params.rewind || !i.navigation) return;
|
|
103
|
+
const {
|
|
104
|
+
nextEl: e,
|
|
105
|
+
prevEl: t
|
|
106
|
+
} = i.navigation;
|
|
107
|
+
t && (i.isBeginning ? (A(t), x(t)) : (w(t), g(t))), e && (i.isEnd ? (A(e), x(e)) : (w(e), g(e)));
|
|
108
|
+
}
|
|
109
|
+
function k() {
|
|
110
|
+
return i.pagination && i.pagination.bullets && i.pagination.bullets.length;
|
|
111
|
+
}
|
|
112
|
+
function C() {
|
|
113
|
+
return k() && i.params.pagination.clickable;
|
|
114
|
+
}
|
|
115
|
+
function U() {
|
|
116
|
+
const e = i.params.a11y;
|
|
117
|
+
k() && i.pagination.bullets.forEach((t) => {
|
|
118
|
+
i.params.pagination.clickable && (g(t), i.params.pagination.renderBullet || (m(t, "button"), E(t, e.paginationBulletMessage.replace(/\{\{index\}\}/, j(t) + 1)))), t.matches(y(i.params.pagination.bulletActiveClass)) ? t.setAttribute("aria-current", "true") : t.removeAttribute("aria-current");
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
const S = (e, t, a) => {
|
|
122
|
+
g(e), e.tagName !== "BUTTON" && (m(e, "button"), e.addEventListener("keydown", d)), E(e, a), O(e, t);
|
|
123
|
+
}, R = (e) => {
|
|
124
|
+
f && f !== e.target && !f.contains(e.target) && (p = !0), i.a11y.clicked = !0;
|
|
125
|
+
}, T = () => {
|
|
126
|
+
p = !1, requestAnimationFrame(() => {
|
|
127
|
+
requestAnimationFrame(() => {
|
|
128
|
+
i.destroyed || (i.a11y.clicked = !1);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}, D = (e) => {
|
|
132
|
+
L = (/* @__PURE__ */ new Date()).getTime();
|
|
133
|
+
}, h = (e) => {
|
|
134
|
+
if (i.a11y.clicked || !i.params.a11y.scrollOnFocus || (/* @__PURE__ */ new Date()).getTime() - L < 100) return;
|
|
135
|
+
const t = e.target.closest(`.${i.params.slideClass}, swiper-slide`);
|
|
136
|
+
if (!t || !i.slides.includes(t)) return;
|
|
137
|
+
f = t;
|
|
138
|
+
const a = i.slides.indexOf(t) === i.activeIndex, s = i.params.watchSlidesProgress && i.visibleSlides && i.visibleSlides.includes(t);
|
|
139
|
+
a || s || e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents || (i.isHorizontal() ? i.el.scrollLeft = 0 : i.el.scrollTop = 0, requestAnimationFrame(() => {
|
|
140
|
+
p || (i.params.loop ? i.slideToLoop(parseInt(t.getAttribute("data-swiper-slide-index")), 0) : i.slideTo(i.slides.indexOf(t), 0), p = !1);
|
|
141
|
+
}));
|
|
142
|
+
}, I = () => {
|
|
143
|
+
const e = i.params.a11y;
|
|
144
|
+
e.itemRoleDescriptionMessage && M(i.slides, e.itemRoleDescriptionMessage), e.slideRole && m(i.slides, e.slideRole);
|
|
145
|
+
const t = i.slides.length;
|
|
146
|
+
e.slideLabelMessage && i.slides.forEach((a, s) => {
|
|
147
|
+
const l = i.params.loop ? parseInt(a.getAttribute("data-swiper-slide-index"), 10) : s, c = e.slideLabelMessage.replace(/\{\{index\}\}/, l + 1).replace(/\{\{slidesLength\}\}/, t);
|
|
148
|
+
E(a, c);
|
|
149
|
+
});
|
|
150
|
+
}, V = () => {
|
|
151
|
+
const e = i.params.a11y;
|
|
152
|
+
i.el.append(r);
|
|
153
|
+
const t = i.el;
|
|
154
|
+
e.containerRoleDescriptionMessage && M(t, e.containerRoleDescriptionMessage), e.containerMessage && E(t, e.containerMessage), e.containerRole && m(t, e.containerRole);
|
|
155
|
+
const a = i.wrapperEl, s = e.id || a.getAttribute("id") || `swiper-wrapper-${B(16)}`, l = i.params.autoplay && i.params.autoplay.enabled ? "off" : "polite";
|
|
156
|
+
H(a, s), q(a, l), I();
|
|
157
|
+
let {
|
|
158
|
+
nextEl: c,
|
|
159
|
+
prevEl: v
|
|
160
|
+
} = i.navigation ? i.navigation : {};
|
|
161
|
+
c = n(c), v = n(v), c && c.forEach((b) => S(b, s, e.nextSlideMessage)), v && v.forEach((b) => S(b, s, e.prevSlideMessage)), C() && n(i.pagination.el).forEach((z) => {
|
|
162
|
+
z.addEventListener("keydown", d);
|
|
163
|
+
}), F().addEventListener("visibilitychange", D), i.el.addEventListener("focus", h, !0), i.el.addEventListener("focus", h, !0), i.el.addEventListener("pointerdown", R, !0), i.el.addEventListener("pointerup", T, !0);
|
|
164
|
+
};
|
|
165
|
+
function $() {
|
|
166
|
+
r && r.remove();
|
|
167
|
+
let {
|
|
168
|
+
nextEl: e,
|
|
169
|
+
prevEl: t
|
|
170
|
+
} = i.navigation ? i.navigation : {};
|
|
171
|
+
e = n(e), t = n(t), e && e.forEach((s) => s.removeEventListener("keydown", d)), t && t.forEach((s) => s.removeEventListener("keydown", d)), C() && n(i.pagination.el).forEach((l) => {
|
|
172
|
+
l.removeEventListener("keydown", d);
|
|
173
|
+
}), F().removeEventListener("visibilitychange", D), i.el && typeof i.el != "string" && (i.el.removeEventListener("focus", h, !0), i.el.removeEventListener("pointerdown", R, !0), i.el.removeEventListener("pointerup", T, !0));
|
|
174
|
+
}
|
|
175
|
+
o("beforeInit", () => {
|
|
176
|
+
r = K("span", i.params.a11y.notificationClass), r.setAttribute("aria-live", "assertive"), r.setAttribute("aria-atomic", "true");
|
|
177
|
+
}), o("afterInit", () => {
|
|
178
|
+
i.params.a11y.enabled && V();
|
|
179
|
+
}), o("slidesLengthChange snapGridLengthChange slidesGridLengthChange", () => {
|
|
180
|
+
i.params.a11y.enabled && I();
|
|
181
|
+
}), o("fromEdge toEdge afterInit lock unlock", () => {
|
|
182
|
+
i.params.a11y.enabled && G();
|
|
183
|
+
}), o("paginationUpdate", () => {
|
|
184
|
+
i.params.a11y.enabled && U();
|
|
185
|
+
}), o("destroy", () => {
|
|
186
|
+
i.params.a11y.enabled && $();
|
|
187
|
+
});
|
|
11
188
|
}
|
|
12
189
|
export {
|
|
13
|
-
|
|
190
|
+
Y as default
|
|
14
191
|
};
|
package/index205.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const h=require("./index233.js");function $(w){let{swiper:e,extendParams:S,on:c}=w;S({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let d=!1,l={};const y=t=>t.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=t=>{const o=h.a();let r;t?r=new URL(t):r=o.location;const a=r.pathname.slice(1).split("/").filter(i=>i!==""),n=a.length,s=a[n-2],p=a[n-1];return{key:s,value:p}},m=(t,o)=>{const r=h.a();if(!d||!e.params.history.enabled)return;let a;e.params.url?a=new URL(e.params.url):a=r.location;const n=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${o}"]`):e.slides[o];let s=y(n.getAttribute("data-history"));if(e.params.history.root.length>0){let i=e.params.history.root;i[i.length-1]==="/"&&(i=i.slice(0,i.length-1)),s=`${i}/${t?`${t}/`:""}${s}`}else a.pathname.includes(t)||(s=`${t?`${t}/`:""}${s}`);e.params.history.keepQuery&&(s+=a.search);const p=r.history.state;p&&p.value===s||(e.params.history.replaceState?r.history.replaceState({value:s},null,s):r.history.pushState({value:s},null,s))},g=(t,o,r)=>{if(o)for(let a=0,n=e.slides.length;a<n;a+=1){const s=e.slides[a];if(y(s.getAttribute("data-history"))===o){const i=e.getSlideIndex(s);e.slideTo(i,t,r)}}else e.slideTo(0,t,r)},u=()=>{l=f(e.params.url),g(e.params.speed,l.value,!1)},v=()=>{const t=h.a();if(e.params.history){if(!t.history||!t.history.pushState){e.params.history.enabled=!1,e.params.hashNavigation.enabled=!0;return}if(d=!0,l=f(e.params.url),!l.key&&!l.value){e.params.history.replaceState||t.addEventListener("popstate",u);return}g(0,l.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",u)}},b=()=>{const t=h.a();e.params.history.replaceState||t.removeEventListener("popstate",u)};c("init",()=>{e.params.history.enabled&&v()}),c("destroy",()=>{e.params.history.enabled&&b()}),c("transitionEnd _freeModeNoMomentumRelease",()=>{d&&m(e.params.history.key,e.activeIndex)}),c("slideChange",()=>{d&&e.params.cssMode&&m(e.params.history.key,e.activeIndex)})}module.exports=$;
|
package/index205.mjs
CHANGED
|
@@ -1,206 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
function X(U) {
|
|
1
|
+
import { a as h } from "./index233.mjs";
|
|
2
|
+
function x(w) {
|
|
4
3
|
let {
|
|
5
4
|
swiper: e,
|
|
6
|
-
extendParams:
|
|
7
|
-
on:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
virtual: {
|
|
5
|
+
extendParams: S,
|
|
6
|
+
on: c
|
|
7
|
+
} = w;
|
|
8
|
+
S({
|
|
9
|
+
history: {
|
|
12
10
|
enabled: !1,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
renderExternalUpdate: !0,
|
|
18
|
-
addSlidesBefore: 0,
|
|
19
|
-
addSlidesAfter: 0
|
|
11
|
+
root: "",
|
|
12
|
+
replaceState: !1,
|
|
13
|
+
key: "slides",
|
|
14
|
+
keepQuery: !1
|
|
20
15
|
}
|
|
21
16
|
});
|
|
22
|
-
let
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
const $ = B.createElement("div");
|
|
33
|
-
function G(i, a) {
|
|
34
|
-
const r = e.params.virtual;
|
|
35
|
-
if (r.cache && e.virtual.cache[a])
|
|
36
|
-
return e.virtual.cache[a];
|
|
37
|
-
let s;
|
|
38
|
-
return r.renderSlide ? (s = r.renderSlide.call(e, i, a), typeof s == "string" && ($.innerHTML = s, s = $.children[0])) : e.isElement ? s = I("swiper-slide") : s = I("div", e.params.slideClass), s.setAttribute("data-swiper-slide-index", a), r.renderSlide || (s.innerHTML = i), r.cache && (e.virtual.cache[a] = s), s;
|
|
39
|
-
}
|
|
40
|
-
function o(i, a) {
|
|
41
|
-
const {
|
|
42
|
-
slidesPerView: r,
|
|
43
|
-
slidesPerGroup: s,
|
|
44
|
-
centeredSlides: d,
|
|
45
|
-
loop: n,
|
|
46
|
-
initialSlide: w
|
|
47
|
-
} = e.params;
|
|
48
|
-
if (a && !n && w > 0)
|
|
49
|
-
return;
|
|
50
|
-
const {
|
|
51
|
-
addSlidesBefore: m,
|
|
52
|
-
addSlidesAfter: g
|
|
53
|
-
} = e.params.virtual, {
|
|
54
|
-
from: P,
|
|
55
|
-
to: E,
|
|
56
|
-
slides: c,
|
|
57
|
-
slidesGrid: F,
|
|
58
|
-
offset: N
|
|
59
|
-
} = e.virtual;
|
|
60
|
-
e.params.cssMode || e.updateActiveIndex();
|
|
61
|
-
const b = e.activeIndex || 0;
|
|
62
|
-
let A;
|
|
63
|
-
e.rtlTranslate ? A = "right" : A = e.isHorizontal() ? "left" : "top";
|
|
64
|
-
let x, f;
|
|
65
|
-
d ? (x = Math.floor(r / 2) + s + g, f = Math.floor(r / 2) + s + m) : (x = r + (s - 1) + g, f = (n ? r : s) + m);
|
|
66
|
-
let u = b - f, p = b + x;
|
|
67
|
-
n || (u = Math.max(u, 0), p = Math.min(p, c.length - 1));
|
|
68
|
-
let h = (e.slidesGrid[u] || 0) - (e.slidesGrid[0] || 0);
|
|
69
|
-
n && b >= f ? (u -= f, d || (h += e.slidesGrid[0])) : n && b < f && (u = -f, d && (h += e.slidesGrid[0])), Object.assign(e.virtual, {
|
|
70
|
-
from: u,
|
|
71
|
-
to: p,
|
|
72
|
-
offset: h,
|
|
73
|
-
slidesGrid: e.slidesGrid,
|
|
74
|
-
slidesBefore: f,
|
|
75
|
-
slidesAfter: x
|
|
76
|
-
});
|
|
77
|
-
function j() {
|
|
78
|
-
e.updateSlides(), e.updateProgress(), e.updateSlidesClasses(), T("virtualUpdate");
|
|
79
|
-
}
|
|
80
|
-
if (P === u && E === p && !i) {
|
|
81
|
-
e.slidesGrid !== F && h !== N && e.slides.forEach((t) => {
|
|
82
|
-
t.style[A] = `${h - Math.abs(e.cssOverflowAdjustment())}px`;
|
|
83
|
-
}), e.updateProgress(), T("virtualUpdate");
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (e.params.virtual.renderExternal) {
|
|
87
|
-
e.params.virtual.renderExternal.call(e, {
|
|
88
|
-
offset: h,
|
|
89
|
-
from: u,
|
|
90
|
-
to: p,
|
|
91
|
-
slides: function() {
|
|
92
|
-
const l = [];
|
|
93
|
-
for (let v = u; v <= p; v += 1)
|
|
94
|
-
l.push(c[v]);
|
|
95
|
-
return l;
|
|
96
|
-
}()
|
|
97
|
-
}), e.params.virtual.renderExternalUpdate ? j() : T("virtualUpdate");
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
const S = [], O = [], y = (t) => {
|
|
101
|
-
let l = t;
|
|
102
|
-
return t < 0 ? l = c.length + t : l >= c.length && (l = l - c.length), l;
|
|
17
|
+
let d = !1, l = {};
|
|
18
|
+
const y = (t) => t.toString().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, ""), f = (t) => {
|
|
19
|
+
const o = h();
|
|
20
|
+
let r;
|
|
21
|
+
t ? r = new URL(t) : r = o.location;
|
|
22
|
+
const a = r.pathname.slice(1).split("/").filter((i) => i !== ""), n = a.length, s = a[n - 2], p = a[n - 1];
|
|
23
|
+
return {
|
|
24
|
+
key: s,
|
|
25
|
+
value: p
|
|
103
26
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
27
|
+
}, m = (t, o) => {
|
|
28
|
+
const r = h();
|
|
29
|
+
if (!d || !e.params.history.enabled) return;
|
|
30
|
+
let a;
|
|
31
|
+
e.params.url ? a = new URL(e.params.url) : a = r.location;
|
|
32
|
+
const n = e.virtual && e.params.virtual.enabled ? e.slidesEl.querySelector(`[data-swiper-slide-index="${o}"]`) : e.slides[o];
|
|
33
|
+
let s = y(n.getAttribute("data-history"));
|
|
34
|
+
if (e.params.history.root.length > 0) {
|
|
35
|
+
let i = e.params.history.root;
|
|
36
|
+
i[i.length - 1] === "/" && (i = i.slice(0, i.length - 1)), s = `${i}/${t ? `${t}/` : ""}${s}`;
|
|
37
|
+
} else a.pathname.includes(t) || (s = `${t ? `${t}/` : ""}${s}`);
|
|
38
|
+
e.params.history.keepQuery && (s += a.search);
|
|
39
|
+
const p = r.history.state;
|
|
40
|
+
p && p.value === s || (e.params.history.replaceState ? r.history.replaceState({
|
|
41
|
+
value: s
|
|
42
|
+
}, null, s) : r.history.pushState({
|
|
43
|
+
value: s
|
|
44
|
+
}, null, s));
|
|
45
|
+
}, g = (t, o, r) => {
|
|
46
|
+
if (o)
|
|
47
|
+
for (let a = 0, n = e.slides.length; a < n; a += 1) {
|
|
48
|
+
const s = e.slides[a];
|
|
49
|
+
if (y(s.getAttribute("data-history")) === o) {
|
|
50
|
+
const i = e.getSlideIndex(s);
|
|
51
|
+
e.slideTo(i, t, r);
|
|
115
52
|
}
|
|
116
|
-
const R = n ? -c.length : 0, _ = n ? c.length * 2 : c.length;
|
|
117
|
-
for (let t = R; t < _; t += 1)
|
|
118
|
-
if (t >= u && t <= p) {
|
|
119
|
-
const l = y(t);
|
|
120
|
-
typeof E > "u" || i ? O.push(l) : (t > E && O.push(l), t < P && S.push(l));
|
|
121
|
-
}
|
|
122
|
-
if (O.forEach((t) => {
|
|
123
|
-
e.slidesEl.append(G(c[t], t));
|
|
124
|
-
}), n)
|
|
125
|
-
for (let t = S.length - 1; t >= 0; t -= 1) {
|
|
126
|
-
const l = S[t];
|
|
127
|
-
e.slidesEl.prepend(G(c[l], l));
|
|
128
53
|
}
|
|
129
54
|
else
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
function L(i) {
|
|
146
|
-
const a = e.activeIndex;
|
|
147
|
-
let r = a + 1, s = 1;
|
|
148
|
-
if (Array.isArray(i)) {
|
|
149
|
-
for (let d = 0; d < i.length; d += 1)
|
|
150
|
-
i[d] && e.virtual.slides.unshift(i[d]);
|
|
151
|
-
r = a + i.length, s = i.length;
|
|
152
|
-
} else
|
|
153
|
-
e.virtual.slides.unshift(i);
|
|
154
|
-
if (e.params.virtual.cache) {
|
|
155
|
-
const d = e.virtual.cache, n = {};
|
|
156
|
-
Object.keys(d).forEach((w) => {
|
|
157
|
-
const m = d[w], g = m.getAttribute("data-swiper-slide-index");
|
|
158
|
-
g && m.setAttribute("data-swiper-slide-index", parseInt(g, 10) + s), n[parseInt(w, 10) + s] = m;
|
|
159
|
-
}), e.virtual.cache = n;
|
|
160
|
-
}
|
|
161
|
-
o(!0), e.slideTo(r, 0);
|
|
162
|
-
}
|
|
163
|
-
function V(i) {
|
|
164
|
-
if (typeof i > "u" || i === null) return;
|
|
165
|
-
let a = e.activeIndex;
|
|
166
|
-
if (Array.isArray(i))
|
|
167
|
-
for (let r = i.length - 1; r >= 0; r -= 1)
|
|
168
|
-
e.params.virtual.cache && (delete e.virtual.cache[i[r]], Object.keys(e.virtual.cache).forEach((s) => {
|
|
169
|
-
s > i && (e.virtual.cache[s - 1] = e.virtual.cache[s], e.virtual.cache[s - 1].setAttribute("data-swiper-slide-index", s - 1), delete e.virtual.cache[s]);
|
|
170
|
-
})), e.virtual.slides.splice(i[r], 1), i[r] < a && (a -= 1), a = Math.max(a, 0);
|
|
171
|
-
else
|
|
172
|
-
e.params.virtual.cache && (delete e.virtual.cache[i], Object.keys(e.virtual.cache).forEach((r) => {
|
|
173
|
-
r > i && (e.virtual.cache[r - 1] = e.virtual.cache[r], e.virtual.cache[r - 1].setAttribute("data-swiper-slide-index", r - 1), delete e.virtual.cache[r]);
|
|
174
|
-
})), e.virtual.slides.splice(i, 1), i < a && (a -= 1), a = Math.max(a, 0);
|
|
175
|
-
o(!0), e.slideTo(a, 0);
|
|
176
|
-
}
|
|
177
|
-
function D() {
|
|
178
|
-
e.virtual.slides = [], e.params.virtual.cache && (e.virtual.cache = {}), o(!0), e.slideTo(0, 0);
|
|
179
|
-
}
|
|
180
|
-
M("beforeInit", () => {
|
|
181
|
-
if (!e.params.virtual.enabled) return;
|
|
182
|
-
let i;
|
|
183
|
-
if (typeof e.passedParams.virtual.slides > "u") {
|
|
184
|
-
const a = [...e.slidesEl.children].filter((r) => r.matches(`.${e.params.slideClass}, swiper-slide`));
|
|
185
|
-
a && a.length && (e.virtual.slides = [...a], i = !0, a.forEach((r, s) => {
|
|
186
|
-
r.setAttribute("data-swiper-slide-index", s), e.virtual.cache[s] = r, r.remove();
|
|
187
|
-
}));
|
|
55
|
+
e.slideTo(0, t, r);
|
|
56
|
+
}, u = () => {
|
|
57
|
+
l = f(e.params.url), g(e.params.speed, l.value, !1);
|
|
58
|
+
}, v = () => {
|
|
59
|
+
const t = h();
|
|
60
|
+
if (e.params.history) {
|
|
61
|
+
if (!t.history || !t.history.pushState) {
|
|
62
|
+
e.params.history.enabled = !1, e.params.hashNavigation.enabled = !0;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (d = !0, l = f(e.params.url), !l.key && !l.value) {
|
|
66
|
+
e.params.history.replaceState || t.addEventListener("popstate", u);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
g(0, l.value, e.params.runCallbacksOnInit), e.params.history.replaceState || t.addEventListener("popstate", u);
|
|
188
70
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
e.params.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
update: o
|
|
71
|
+
}, b = () => {
|
|
72
|
+
const t = h();
|
|
73
|
+
e.params.history.replaceState || t.removeEventListener("popstate", u);
|
|
74
|
+
};
|
|
75
|
+
c("init", () => {
|
|
76
|
+
e.params.history.enabled && v();
|
|
77
|
+
}), c("destroy", () => {
|
|
78
|
+
e.params.history.enabled && b();
|
|
79
|
+
}), c("transitionEnd _freeModeNoMomentumRelease", () => {
|
|
80
|
+
d && m(e.params.history.key, e.activeIndex);
|
|
81
|
+
}), c("slideChange", () => {
|
|
82
|
+
d && e.params.cssMode && m(e.params.history.key, e.activeIndex);
|
|
202
83
|
});
|
|
203
84
|
}
|
|
204
85
|
export {
|
|
205
|
-
|
|
86
|
+
x as default
|
|
206
87
|
};
|
package/index206.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const p=require("./index233.js"),S=require("./index234.js");function x(u){let{swiper:e,extendParams:v,emit:l,on:n}=u,r=!1;const h=p.g(),i=p.a();v({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(a,t){if(e.virtual&&e.params.virtual.enabled){const s=e.slides.filter(f=>f.getAttribute("data-hash")===t)[0];return s?parseInt(s.getAttribute("data-swiper-slide-index"),10):0}return e.getSlideIndex(S.e(e.slidesEl,`.${e.params.slideClass}[data-hash="${t}"], swiper-slide[data-hash="${t}"]`)[0])}}});const o=()=>{l("hashChange");const a=h.location.hash.replace("#",""),t=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],s=t?t.getAttribute("data-hash"):"";if(a!==s){const d=e.params.hashNavigation.getSlideIndex(e,a);if(typeof d>"u"||Number.isNaN(d))return;e.slideTo(d)}},c=()=>{if(!r||!e.params.hashNavigation.enabled)return;const a=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],t=a?a.getAttribute("data-hash")||a.getAttribute("data-history"):"";e.params.hashNavigation.replaceState&&i.history&&i.history.replaceState?(i.history.replaceState(null,null,`#${t}`||""),l("hashSet")):(h.location.hash=t||"",l("hashSet"))},g=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;r=!0;const a=h.location.hash.replace("#","");if(a){const s=e.params.hashNavigation.getSlideIndex(e,a);e.slideTo(s||0,0,e.params.runCallbacksOnInit,!0)}e.params.hashNavigation.watchState&&i.addEventListener("hashchange",o)},m=()=>{e.params.hashNavigation.watchState&&i.removeEventListener("hashchange",o)};n("init",()=>{e.params.hashNavigation.enabled&&g()}),n("destroy",()=>{e.params.hashNavigation.enabled&&m()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{r&&c()}),n("slideChange",()=>{r&&e.params.cssMode&&c()})}module.exports=x;
|