@okam/stack-ui 1.32.2 → 1.32.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/components/fields/TextInputField/index.d.ts +1 -1
- package/components/fields/TextInputField/interface.d.ts +1 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +145 -144
- package/index101.js +1 -1
- package/index101.mjs +1 -1
- package/index102.js +1 -1
- package/index102.mjs +3 -3
- package/index103.js +1 -1
- package/index103.mjs +1 -1
- package/index115.js +1 -1
- package/index115.mjs +2 -2
- package/index118.js +1 -1
- package/index118.mjs +3 -3
- package/index119.js +1 -1
- package/index119.mjs +3 -3
- package/index120.js +1 -1
- package/index120.mjs +2 -2
- package/index122.js +1 -1
- package/index122.mjs +2 -2
- package/index123.js +1 -1
- package/index123.mjs +8 -8
- package/index124.js +1 -1
- package/index124.mjs +1 -1
- package/index125.js +1 -1
- package/index125.mjs +1 -1
- package/index139.js +1 -1
- package/index139.mjs +52 -46
- package/index140.js +1 -1
- package/index140.mjs +46 -241
- package/index141.js +1 -2
- package/index141.mjs +241 -13
- package/index142.js +2 -1
- package/index142.mjs +12 -29
- package/index143.js +1 -1
- package/index143.mjs +30 -52
- package/index144.js +1 -1
- package/index144.mjs +23 -21
- package/index145.js +1 -1
- package/index145.mjs +113 -38
- package/index146.js +1 -1
- package/index146.mjs +22 -25
- package/index147.js +1 -1
- package/index147.mjs +35 -251
- package/index148.js +1 -1
- package/index148.mjs +25 -106
- package/index149.js +1 -1
- package/index149.mjs +242 -320
- package/index150.js +1 -1
- package/index150.mjs +105 -23
- package/index151.js +1 -1
- package/index151.mjs +323 -104
- package/index153.js +1 -1
- package/index153.mjs +1 -1
- package/index154.js +1 -1
- package/index154.mjs +1 -1
- package/index155.js +1 -1
- package/index155.mjs +1 -1
- package/index158.js +1 -1
- package/index158.mjs +3 -3
- package/index159.js +1 -1
- package/index159.mjs +2 -2
- package/index160.js +1 -1
- package/index160.mjs +9 -9
- package/index167.js +1 -1
- package/index167.mjs +1 -1
- package/index169.js +1 -1
- package/index169.mjs +3 -3
- package/index170.js +1 -1
- package/index170.mjs +1 -1
- package/index171.js +1 -1
- package/index171.mjs +1 -1
- package/index173.js +1 -1
- package/index173.mjs +1 -1
- package/index175.js +1 -1
- package/index175.mjs +1 -1
- package/index176.js +1 -1
- package/index176.mjs +1 -1
- package/index177.js +1 -1
- package/index177.mjs +1 -1
- package/index178.js +1 -1
- package/index178.mjs +4 -4
- package/index179.js +1 -1
- package/index179.mjs +1 -1
- package/index184.js +1 -1
- package/index184.mjs +1 -1
- package/index185.js +1 -1
- package/index185.mjs +197 -205
- package/index186.js +1 -1
- package/index186.mjs +64 -24
- package/index187.js +1 -1
- package/index187.mjs +143 -4
- package/index188.js +1 -1
- package/index188.mjs +124 -3
- package/index189.js +1 -1
- package/index189.mjs +215 -116
- package/index190.js +1 -1
- package/index190.mjs +184 -23
- package/index191.js +1 -1
- package/index191.mjs +69 -51
- package/index192.js +1 -1
- package/index192.mjs +278 -43
- package/index193.js +1 -1
- package/index193.mjs +92 -31
- package/index194.js +1 -1
- package/index194.mjs +184 -109
- package/index195.js +1 -1
- package/index195.mjs +84 -77
- package/index196.js +1 -1
- package/index196.mjs +58 -101
- package/index197.js +1 -1
- package/index197.mjs +127 -98
- package/index198.js +1 -1
- package/index198.mjs +114 -70
- package/index199.js +1 -1
- package/index199.mjs +118 -91
- package/index200.js +1 -1
- package/index200.mjs +69 -152
- package/index201.js +1 -1
- package/index201.mjs +111 -72
- package/index202.js +1 -1
- package/index202.mjs +51 -41
- package/index203.js +1 -1
- package/index203.mjs +93 -5
- package/index204.js +1 -1
- package/index204.mjs +69 -60
- package/index205.js +1 -1
- package/index205.mjs +55 -58
- package/index206.js +1 -1
- package/index206.mjs +92 -196
- package/index207.js +5 -1
- package/index207.mjs +75 -59
- package/index208.js +1 -1
- package/index208.mjs +2008 -126
- package/index209.js +1 -1
- package/index209.mjs +56 -121
- package/index210.js +1 -1
- package/index210.mjs +185 -221
- package/index211.js +1 -1
- package/index211.mjs +206 -185
- package/index212.js +1 -1
- package/index212.mjs +24 -69
- package/index213.js +1 -1
- package/index213.mjs +4 -279
- package/index214.js +1 -1
- package/index214.mjs +3 -98
- package/index215.js +1 -1
- package/index215.mjs +116 -179
- package/index216.js +1 -1
- package/index216.mjs +29 -84
- package/index217.js +1 -1
- package/index217.mjs +51 -58
- package/index218.js +1 -1
- package/index218.mjs +43 -125
- package/index219.js +1 -1
- package/index219.mjs +33 -112
- package/index22.js +1 -1
- package/index22.mjs +109 -102
- package/index220.js +1 -1
- package/index220.mjs +110 -119
- package/index221.js +1 -1
- package/index221.mjs +77 -72
- package/index222.js +1 -1
- package/index222.mjs +96 -105
- package/index223.js +1 -1
- package/index223.mjs +98 -53
- package/index224.js +1 -1
- package/index224.mjs +68 -89
- package/index225.js +1 -1
- package/index225.mjs +93 -68
- package/index226.js +1 -1
- package/index226.mjs +151 -52
- package/index227.js +1 -1
- package/index227.mjs +72 -100
- package/index228.js +1 -5
- package/index228.mjs +40 -78
- package/index229.js +1 -1
- package/index229.mjs +5 -2025
- package/index230.js +1 -1
- package/index230.mjs +61 -59
- package/index231.js +1 -1
- package/index231.mjs +58 -187
- package/index269.js +1 -1
- package/index269.mjs +130 -4
- package/index270.js +1 -1
- package/index270.mjs +184 -42
- package/index271.js +1 -1
- package/index271.mjs +9 -9
- package/index272.js +1 -1
- package/index272.mjs +4 -16
- package/index273.js +1 -1
- package/index273.mjs +37 -16
- package/index274.js +1 -1
- package/index274.mjs +6 -16
- package/index275.js +1 -1
- package/index275.mjs +30 -16
- package/index276.js +1 -1
- package/index276.mjs +7 -16
- package/index277.js +1 -1
- package/index277.mjs +141 -16
- package/index278.js +1 -1
- package/index278.mjs +198 -16
- package/index279.js +1 -1
- package/index279.mjs +23 -16
- package/index280.js +1 -1
- package/index280.mjs +29 -16
- package/index281.js +1 -1
- package/index281.mjs +47 -16
- package/index282.js +1 -1
- package/index282.mjs +49 -16
- package/index283.js +1 -1
- package/index283.mjs +101 -16
- package/index284.js +1 -1
- package/index284.mjs +6 -16
- package/index285.js +1 -1
- package/index285.mjs +71 -15
- package/index286.js +1 -1
- package/index286.mjs +59 -16
- package/index287.js +1 -1
- package/index287.mjs +8 -16
- package/index288.js +1 -1
- package/index288.mjs +12 -16
- package/index289.js +1 -1
- package/index289.mjs +48 -16
- package/index290.js +1 -1
- package/index290.mjs +25 -16
- package/index291.js +1 -1
- package/index291.mjs +6 -16
- package/index292.js +1 -1
- package/index292.mjs +15 -16
- package/index293.js +1 -1
- package/index293.mjs +25 -16
- package/index294.js +1 -1
- package/index294.mjs +29 -16
- package/index295.js +1 -1
- package/index295.mjs +32 -16
- package/index296.js +1 -1
- package/index296.mjs +10 -16
- package/index297.js +1 -1
- package/index297.mjs +10 -16
- package/index298.js +1 -1
- package/index298.mjs +6 -16
- package/index299.js +1 -1
- package/index299.mjs +8 -16
- package/index300.js +1 -1
- package/index300.mjs +14 -16
- package/index301.js +1 -1
- package/index301.mjs +9 -16
- package/index302.js +1 -1
- package/index302.mjs +5 -16
- package/index303.js +1 -1
- package/index303.mjs +49 -16
- package/index304.js +1 -1
- package/index304.mjs +12 -12
- package/index305.js +1 -1
- package/index305.mjs +12 -12
- package/index306.js +1 -1
- package/index306.mjs +15 -130
- package/index307.js +1 -1
- package/index307.mjs +16 -191
- package/index308.js +1 -1
- package/index308.mjs +16 -10
- package/index309.js +1 -1
- package/index309.mjs +16 -4
- package/index310.js +1 -1
- package/index310.mjs +16 -37
- package/index311.js +1 -1
- package/index311.mjs +16 -6
- package/index312.js +1 -1
- package/index312.mjs +16 -30
- package/index313.js +1 -1
- package/index313.mjs +16 -7
- package/index314.js +1 -1
- package/index314.mjs +16 -141
- package/index315.js +1 -1
- package/index315.mjs +16 -198
- package/index316.js +1 -1
- package/index316.mjs +16 -23
- package/index317.js +1 -1
- package/index317.mjs +16 -29
- package/index318.js +1 -1
- package/index318.mjs +16 -47
- package/index319.js +1 -1
- package/index319.mjs +16 -49
- package/index320.js +1 -1
- package/index320.mjs +16 -101
- package/index321.js +1 -1
- package/index321.mjs +16 -6
- package/index322.js +1 -1
- package/index322.mjs +15 -71
- package/index323.js +1 -1
- package/index323.mjs +16 -59
- package/index324.js +1 -1
- package/index324.mjs +16 -8
- package/index325.js +1 -1
- package/index325.mjs +16 -12
- package/index326.js +1 -1
- package/index326.mjs +16 -48
- package/index327.js +1 -1
- package/index327.mjs +16 -25
- package/index328.js +1 -1
- package/index328.mjs +16 -6
- package/index329.js +1 -1
- package/index329.mjs +16 -15
- package/index330.js +1 -1
- package/index330.mjs +16 -25
- package/index331.js +1 -1
- package/index331.mjs +16 -29
- package/index332.js +1 -1
- package/index332.mjs +16 -32
- package/index333.js +1 -1
- package/index333.mjs +16 -10
- package/index334.js +1 -1
- package/index334.mjs +16 -6
- package/index335.js +1 -1
- package/index335.mjs +16 -8
- package/index336.js +1 -1
- package/index336.mjs +16 -14
- package/index337.js +1 -1
- package/index337.mjs +16 -9
- package/index340.js +1 -1
- package/index340.mjs +1 -1
- package/index341.js +1 -1
- package/index341.mjs +2 -2
- package/index344.js +1 -1
- package/index344.mjs +1 -1
- package/index345.js +1 -1
- package/index345.mjs +71 -117
- package/index346.js +1 -1
- package/index346.mjs +117 -71
- package/package.json +1 -1
package/index199.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const m=require("./index270.js");function k(y){let{swiper:e,extendParams:g,emit:u,once:x}=y;g({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function S(){if(e.params.cssMode)return;const n=e.getTranslate();e.setTranslate(n),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function E(){if(e.params.cssMode)return;const{touchEventsData:n,touches:c}=e;n.velocities.length===0&&n.velocities.push({position:c[e.isHorizontal()?"startX":"startY"],time:n.touchStartTime}),n.velocities.push({position:c[e.isHorizontal()?"currentX":"currentY"],time:m.d()})}function B(n){let{currentPos:c}=n;if(e.params.cssMode)return;const{params:i,wrapperEl:p,rtlTranslate:M,snapGrid:a,touchEventsData:r}=e,b=m.d()-r.touchStartTime;if(c<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(c>-e.maxTranslate()){e.slides.length<a.length?e.slideTo(a.length-1):e.slideTo(e.slides.length-1);return}if(i.freeMode.momentum){if(r.velocities.length>1){const o=r.velocities.pop(),s=r.velocities.pop(),D=o.position-s.position,h=o.time-s.time;e.velocity=D/h,e.velocity/=2,Math.abs(e.velocity)<i.freeMode.minimumVelocity&&(e.velocity=0),(h>150||m.d()-o.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=i.freeMode.momentumVelocityRatio,r.velocities.length=0;let l=1e3*i.freeMode.momentumRatio;const w=e.velocity*l;let t=e.translate+w;M&&(t=-t);let T=!1,d;const f=Math.abs(e.velocity)*20*i.freeMode.momentumBounceRatio;let v;if(t<e.maxTranslate())i.freeMode.momentumBounce?(t+e.maxTranslate()<-f&&(t=e.maxTranslate()-f),d=e.maxTranslate(),T=!0,r.allowMomentumBounce=!0):t=e.maxTranslate(),i.loop&&i.centeredSlides&&(v=!0);else if(t>e.minTranslate())i.freeMode.momentumBounce?(t-e.minTranslate()>f&&(t=e.minTranslate()+f),d=e.minTranslate(),T=!0,r.allowMomentumBounce=!0):t=e.minTranslate(),i.loop&&i.centeredSlides&&(v=!0);else if(i.freeMode.sticky){let o;for(let s=0;s<a.length;s+=1)if(a[s]>-t){o=s;break}Math.abs(a[o]-t)<Math.abs(a[o-1]-t)||e.swipeDirection==="next"?t=a[o]:t=a[o-1],t=-t}if(v&&x("transitionEnd",()=>{e.loopFix()}),e.velocity!==0){if(M?l=Math.abs((-t-e.translate)/e.velocity):l=Math.abs((t-e.translate)/e.velocity),i.freeMode.sticky){const o=Math.abs((M?-t:t)-e.translate),s=e.slidesSizesGrid[e.activeIndex];o<s?l=i.speed:o<2*s?l=i.speed*1.5:l=i.speed*2.5}}else if(i.freeMode.sticky){e.slideToClosest();return}i.freeMode.momentumBounce&&T?(e.updateProgress(d),e.setTransition(l),e.setTranslate(t),e.transitionStart(!0,e.swipeDirection),e.animating=!0,m.k(p,()=>{!e||e.destroyed||!r.allowMomentumBounce||(u("momentumBounce"),e.setTransition(i.speed),setTimeout(()=>{e.setTranslate(d),m.k(p,()=>{!e||e.destroyed||e.transitionEnd()})},0))})):e.velocity?(u("_freeModeNoMomentumRelease"),e.updateProgress(t),e.setTransition(l),e.setTranslate(t),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,m.k(p,()=>{!e||e.destroyed||e.transitionEnd()}))):e.updateProgress(t),e.updateActiveIndex(),e.updateSlidesClasses()}else if(i.freeMode.sticky){e.slideToClosest();return}else i.freeMode&&u("_freeModeNoMomentumRelease");(!i.freeMode.momentum||b>=i.longSwipesMs)&&(u("_freeModeStaticRelease"),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}Object.assign(e,{freeMode:{onTouchStart:S,onTouchMove:E,onTouchEnd:B}})}module.exports=k;
|
package/index199.mjs
CHANGED
|
@@ -1,98 +1,125 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
day: "numeric",
|
|
21
|
-
era: d(r) || d(t),
|
|
22
|
-
timeZone: e.timeZone
|
|
23
|
-
}), n = "anchorDate" in e ? e.anchorDate : null;
|
|
24
|
-
return R(() => {
|
|
25
|
-
if (!n && r && t)
|
|
26
|
-
if (c(r, t)) {
|
|
27
|
-
let f = o.format(r.toDate(e.timeZone));
|
|
28
|
-
return a.format("selectedDateDescription", {
|
|
29
|
-
date: f
|
|
30
|
-
});
|
|
31
|
-
} else {
|
|
32
|
-
let f = g(o, a, r, t, e.timeZone);
|
|
33
|
-
return a.format("selectedRangeDescription", {
|
|
34
|
-
dateRange: f
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return "";
|
|
38
|
-
}, [
|
|
39
|
-
r,
|
|
40
|
-
t,
|
|
41
|
-
n,
|
|
42
|
-
e.timeZone,
|
|
43
|
-
a,
|
|
44
|
-
o
|
|
45
|
-
]);
|
|
46
|
-
}
|
|
47
|
-
function _(e, a, r, t) {
|
|
48
|
-
let i = h(b(s), "@react-aria/calendar"), o = d(e) || d(a), n = m({
|
|
49
|
-
month: "long",
|
|
50
|
-
year: "numeric",
|
|
51
|
-
era: o,
|
|
52
|
-
calendar: e.calendar.identifier,
|
|
53
|
-
timeZone: r
|
|
54
|
-
}), f = m({
|
|
55
|
-
month: "long",
|
|
56
|
-
year: "numeric",
|
|
57
|
-
day: "numeric",
|
|
58
|
-
era: o,
|
|
59
|
-
calendar: e.calendar.identifier,
|
|
60
|
-
timeZone: r
|
|
1
|
+
import { d as v, k as h } from "./index270.mjs";
|
|
2
|
+
function z(g) {
|
|
3
|
+
let {
|
|
4
|
+
swiper: e,
|
|
5
|
+
extendParams: x,
|
|
6
|
+
emit: c,
|
|
7
|
+
once: S
|
|
8
|
+
} = g;
|
|
9
|
+
x({
|
|
10
|
+
freeMode: {
|
|
11
|
+
enabled: !1,
|
|
12
|
+
momentum: !0,
|
|
13
|
+
momentumRatio: 1,
|
|
14
|
+
momentumBounce: !0,
|
|
15
|
+
momentumBounceRatio: 1,
|
|
16
|
+
momentumVelocityRatio: 1,
|
|
17
|
+
sticky: !1,
|
|
18
|
+
minimumVelocity: 0.02
|
|
19
|
+
}
|
|
61
20
|
});
|
|
62
|
-
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
21
|
+
function E() {
|
|
22
|
+
if (e.params.cssMode) return;
|
|
23
|
+
const s = e.getTranslate();
|
|
24
|
+
e.setTranslate(s), e.setTransition(0), e.touchEventsData.velocities.length = 0, e.freeMode.onTouchEnd({
|
|
25
|
+
currentPos: e.rtl ? e.translate : -e.translate
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function B() {
|
|
29
|
+
if (e.params.cssMode) return;
|
|
30
|
+
const {
|
|
31
|
+
touchEventsData: s,
|
|
32
|
+
touches: m
|
|
33
|
+
} = e;
|
|
34
|
+
s.velocities.length === 0 && s.velocities.push({
|
|
35
|
+
position: m[e.isHorizontal() ? "startX" : "startY"],
|
|
36
|
+
time: s.touchStartTime
|
|
37
|
+
}), s.velocities.push({
|
|
38
|
+
position: m[e.isHorizontal() ? "currentX" : "currentY"],
|
|
39
|
+
time: v()
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function b(s) {
|
|
43
|
+
let {
|
|
44
|
+
currentPos: m
|
|
45
|
+
} = s;
|
|
46
|
+
if (e.params.cssMode) return;
|
|
47
|
+
const {
|
|
48
|
+
params: o,
|
|
49
|
+
wrapperEl: f,
|
|
50
|
+
rtlTranslate: p,
|
|
51
|
+
snapGrid: a,
|
|
52
|
+
touchEventsData: r
|
|
53
|
+
} = e, w = v() - r.touchStartTime;
|
|
54
|
+
if (m < -e.minTranslate()) {
|
|
55
|
+
e.slideTo(e.activeIndex);
|
|
56
|
+
return;
|
|
66
57
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
58
|
+
if (m > -e.maxTranslate()) {
|
|
59
|
+
e.slides.length < a.length ? e.slideTo(a.length - 1) : e.slideTo(e.slides.length - 1);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (o.freeMode.momentum) {
|
|
63
|
+
if (r.velocities.length > 1) {
|
|
64
|
+
const i = r.velocities.pop(), n = r.velocities.pop(), P = i.position - n.position, y = i.time - n.time;
|
|
65
|
+
e.velocity = P / y, e.velocity /= 2, Math.abs(e.velocity) < o.freeMode.minimumVelocity && (e.velocity = 0), (y > 150 || v() - i.time > 300) && (e.velocity = 0);
|
|
66
|
+
} else
|
|
67
|
+
e.velocity = 0;
|
|
68
|
+
e.velocity *= o.freeMode.momentumVelocityRatio, r.velocities.length = 0;
|
|
69
|
+
let l = 1e3 * o.freeMode.momentumRatio;
|
|
70
|
+
const D = e.velocity * l;
|
|
71
|
+
let t = e.translate + D;
|
|
72
|
+
p && (t = -t);
|
|
73
|
+
let M = !1, u;
|
|
74
|
+
const d = Math.abs(e.velocity) * 20 * o.freeMode.momentumBounceRatio;
|
|
75
|
+
let T;
|
|
76
|
+
if (t < e.maxTranslate())
|
|
77
|
+
o.freeMode.momentumBounce ? (t + e.maxTranslate() < -d && (t = e.maxTranslate() - d), u = e.maxTranslate(), M = !0, r.allowMomentumBounce = !0) : t = e.maxTranslate(), o.loop && o.centeredSlides && (T = !0);
|
|
78
|
+
else if (t > e.minTranslate())
|
|
79
|
+
o.freeMode.momentumBounce ? (t - e.minTranslate() > d && (t = e.minTranslate() + d), u = e.minTranslate(), M = !0, r.allowMomentumBounce = !0) : t = e.minTranslate(), o.loop && o.centeredSlides && (T = !0);
|
|
80
|
+
else if (o.freeMode.sticky) {
|
|
81
|
+
let i;
|
|
82
|
+
for (let n = 0; n < a.length; n += 1)
|
|
83
|
+
if (a[n] > -t) {
|
|
84
|
+
i = n;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
Math.abs(a[i] - t) < Math.abs(a[i - 1] - t) || e.swipeDirection === "next" ? t = a[i] : t = a[i - 1], t = -t;
|
|
88
|
+
}
|
|
89
|
+
if (T && S("transitionEnd", () => {
|
|
90
|
+
e.loopFix();
|
|
91
|
+
}), e.velocity !== 0) {
|
|
92
|
+
if (p ? l = Math.abs((-t - e.translate) / e.velocity) : l = Math.abs((t - e.translate) / e.velocity), o.freeMode.sticky) {
|
|
93
|
+
const i = Math.abs((p ? -t : t) - e.translate), n = e.slidesSizesGrid[e.activeIndex];
|
|
94
|
+
i < n ? l = o.speed : i < 2 * n ? l = o.speed * 1.5 : l = o.speed * 2.5;
|
|
95
|
+
}
|
|
96
|
+
} else if (o.freeMode.sticky) {
|
|
97
|
+
e.slideToClosest();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
o.freeMode.momentumBounce && M ? (e.updateProgress(u), e.setTransition(l), e.setTranslate(t), e.transitionStart(!0, e.swipeDirection), e.animating = !0, h(f, () => {
|
|
101
|
+
!e || e.destroyed || !r.allowMomentumBounce || (c("momentumBounce"), e.setTransition(o.speed), setTimeout(() => {
|
|
102
|
+
e.setTranslate(u), h(f, () => {
|
|
103
|
+
!e || e.destroyed || e.transitionEnd();
|
|
104
|
+
});
|
|
105
|
+
}, 0));
|
|
106
|
+
})) : e.velocity ? (c("_freeModeNoMomentumRelease"), e.updateProgress(t), e.setTransition(l), e.setTranslate(t), e.transitionStart(!0, e.swipeDirection), e.animating || (e.animating = !0, h(f, () => {
|
|
107
|
+
!e || e.destroyed || e.transitionEnd();
|
|
108
|
+
}))) : e.updateProgress(t), e.updateActiveIndex(), e.updateSlidesClasses();
|
|
109
|
+
} else if (o.freeMode.sticky) {
|
|
110
|
+
e.slideToClosest();
|
|
111
|
+
return;
|
|
112
|
+
} else o.freeMode && c("_freeModeNoMomentumRelease");
|
|
113
|
+
(!o.freeMode.momentum || w >= o.longSwipesMs) && (c("_freeModeStaticRelease"), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses());
|
|
84
114
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
115
|
+
Object.assign(e, {
|
|
116
|
+
freeMode: {
|
|
117
|
+
onTouchStart: E,
|
|
118
|
+
onTouchMove: B,
|
|
119
|
+
onTouchEnd: b
|
|
120
|
+
}
|
|
91
121
|
});
|
|
92
122
|
}
|
|
93
123
|
export {
|
|
94
|
-
|
|
95
|
-
k as hookData,
|
|
96
|
-
D as useSelectedDateDescription,
|
|
97
|
-
_ as useVisibleRangeDescription
|
|
124
|
+
z as default
|
|
98
125
|
};
|
package/index200.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";function B(x){let{swiper:e,extendParams:C,on:w}=x;C({grid:{rows:1,fill:"column"}});let c,h,f,g;const M=()=>{let t=e.params.spaceBetween;return typeof t=="string"&&t.indexOf("%")>=0?t=parseFloat(t.replace("%",""))/100*e.size:typeof t=="string"&&(t=parseFloat(t)),t},L=t=>{const{slidesPerView:s}=e.params,{rows:i,fill:a}=e.params.grid,l=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:t.length;f=Math.floor(l/i),Math.floor(l/i)===l/i?c=l:c=Math.ceil(l/i)*i,s!=="auto"&&a==="row"&&(c=Math.max(c,s*i)),h=c/i},y=()=>{e.slides&&e.slides.forEach(t=>{t.swiperSlideGridSet&&(t.style.height="",t.style[e.getDirectionLabel("margin-top")]="")})},$=(t,s,i)=>{const{slidesPerGroup:a}=e.params,l=M(),{rows:r,fill:u}=e.params.grid,d=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:i.length;let p,n,o;if(u==="row"&&a>1){const m=Math.floor(t/(a*r)),S=t-r*a*m,v=m===0?a:Math.min(Math.ceil((d-m*r*a)/r),a);o=Math.floor(S/v),n=S-o*v+m*a,p=n+o*c/r,s.style.order=p}else u==="column"?(n=Math.floor(t/r),o=t-n*r,(n>f||n===f&&o===r-1)&&(o+=1,o>=r&&(o=0,n+=1))):(o=Math.floor(t/h),n=t-o*h);s.row=o,s.column=n,s.style.height=`calc((100% - ${(r-1)*l}px) / ${r})`,s.style[e.getDirectionLabel("margin-top")]=o!==0?l&&`${l}px`:"",s.swiperSlideGridSet=!0},z=(t,s)=>{const{centeredSlides:i,roundLengths:a}=e.params,l=M(),{rows:r}=e.params.grid;if(e.virtualSize=(t+l)*c,e.virtualSize=Math.ceil(e.virtualSize/r)-l,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+l}px`),i){const u=[];for(let d=0;d<s.length;d+=1){let p=s[d];a&&(p=Math.floor(p)),s[d]<e.virtualSize+s[0]&&u.push(p)}s.splice(0,s.length),s.push(...u)}},I=()=>{g=e.params.grid&&e.params.grid.rows>1},b=()=>{const{params:t,el:s}=e,i=t.grid&&t.grid.rows>1;g&&!i?(s.classList.remove(`${t.containerModifierClass}grid`,`${t.containerModifierClass}grid-column`),f=1,e.emitContainerClasses()):!g&&i&&(s.classList.add(`${t.containerModifierClass}grid`),t.grid.fill==="column"&&s.classList.add(`${t.containerModifierClass}grid-column`),e.emitContainerClasses()),g=i};w("init",I),w("update",b),e.grid={initSlides:L,unsetSlides:y,updateSlide:$,updateWrapperSize:z}}module.exports=B;
|
package/index200.mjs
CHANGED
|
@@ -1,158 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { usePress as W } from "./index160.mjs";
|
|
12
|
-
import { useLocalizedStringFormatter as G, useDateFormatter as S } from "@react-aria/i18n";
|
|
13
|
-
import { useMemo as b, useRef as $, useEffect as H } from "react";
|
|
14
|
-
function J(t) {
|
|
15
|
-
return t && t.__esModule ? t.default : t;
|
|
16
|
-
}
|
|
17
|
-
function de(t, e, l) {
|
|
18
|
-
let { date: r, isDisabled: d } = t, { errorMessageId: I, selectedDateDescription: y } = V.get(e), n = G(J(A), "@react-aria/calendar"), P = S({
|
|
19
|
-
weekday: "long",
|
|
20
|
-
day: "numeric",
|
|
21
|
-
month: "long",
|
|
22
|
-
year: "numeric",
|
|
23
|
-
era: Z(r),
|
|
24
|
-
timeZone: e.timeZone
|
|
25
|
-
}), c = e.isSelected(r), m = e.isCellFocused(r);
|
|
26
|
-
d = d || e.isCellDisabled(r);
|
|
27
|
-
let x = e.isCellUnavailable(r), u = !d && !x, f = e.isValueInvalid && !!("highlightedRange" in e ? !e.anchorDate && e.highlightedRange && r.compare(e.highlightedRange.start) >= 0 && r.compare(e.highlightedRange.end) <= 0 : e.value && a(e.value, r));
|
|
28
|
-
f && (c = !0), r = z(r, U);
|
|
29
|
-
let g = b(() => r.toDate(e.timeZone), [
|
|
30
|
-
r,
|
|
31
|
-
e.timeZone
|
|
32
|
-
]), R = k(r, e.timeZone), T = b(() => {
|
|
33
|
-
let i = "";
|
|
34
|
-
return "highlightedRange" in e && e.value && !e.anchorDate && (a(r, e.value.start) || a(r, e.value.end)) && (i = y + ", "), i += P.format(g), R ? i = n.format(c ? "todayDateSelected" : "todayDate", {
|
|
35
|
-
date: i
|
|
36
|
-
}) : c && (i = n.format("dateSelected", {
|
|
37
|
-
date: i
|
|
38
|
-
})), e.minValue && a(r, e.minValue) ? i += ", " + n.format("minimumDate") : e.maxValue && a(r, e.maxValue) && (i += ", " + n.format("maximumDate")), i;
|
|
39
|
-
}, [
|
|
40
|
-
P,
|
|
41
|
-
g,
|
|
42
|
-
n,
|
|
43
|
-
c,
|
|
44
|
-
R,
|
|
45
|
-
r,
|
|
46
|
-
e,
|
|
47
|
-
y
|
|
48
|
-
]), D = "";
|
|
49
|
-
"anchorDate" in e && m && !e.isReadOnly && u && (e.anchorDate ? D = n.format("finishRangeSelectionPrompt") : D = n.format("startRangeSelectionPrompt"));
|
|
50
|
-
let C = j(D), h = $(!1), p = $(!1), s = $(void 0), { pressProps: E, isPressed: O } = W({
|
|
51
|
-
// When dragging to select a range, we don't want dragging over the original anchor
|
|
52
|
-
// again to trigger onPressStart. Cancel presses immediately when the pointer exits.
|
|
53
|
-
shouldCancelOnPointerExit: "anchorDate" in e && !!e.anchorDate,
|
|
54
|
-
preventFocusOnPress: !0,
|
|
55
|
-
isDisabled: !u || e.isReadOnly,
|
|
56
|
-
onPressStart(i) {
|
|
57
|
-
if (e.isReadOnly) {
|
|
58
|
-
e.setFocusedDate(r);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if ("highlightedRange" in e && !e.anchorDate && (i.pointerType === "mouse" || i.pointerType === "touch")) {
|
|
62
|
-
if (e.highlightedRange && !f) {
|
|
63
|
-
if (a(r, e.highlightedRange.start)) {
|
|
64
|
-
e.setAnchorDate(e.highlightedRange.end), e.setFocusedDate(r), e.setDragging(!0), p.current = !0;
|
|
65
|
-
return;
|
|
66
|
-
} else if (a(r, e.highlightedRange.end)) {
|
|
67
|
-
e.setAnchorDate(e.highlightedRange.start), e.setFocusedDate(r), e.setDragging(!0), p.current = !0;
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
let o = () => {
|
|
72
|
-
e.setDragging(!0), s.current = void 0, e.selectDate(r), e.setFocusedDate(r), h.current = !0;
|
|
73
|
-
};
|
|
74
|
-
i.pointerType === "touch" ? s.current = setTimeout(o, 200) : o();
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
onPressEnd() {
|
|
78
|
-
p.current = !1, h.current = !1, clearTimeout(s.current), s.current = void 0;
|
|
79
|
-
},
|
|
80
|
-
onPress() {
|
|
81
|
-
!("anchorDate" in e) && !e.isReadOnly && (e.selectDate(r), e.setFocusedDate(r));
|
|
82
|
-
},
|
|
83
|
-
onPressUp(i) {
|
|
84
|
-
if (!e.isReadOnly && ("anchorDate" in e && s.current && (e.selectDate(r), e.setFocusedDate(r)), "anchorDate" in e))
|
|
85
|
-
if (p.current)
|
|
86
|
-
e.setAnchorDate(r);
|
|
87
|
-
else if (e.anchorDate && !h.current)
|
|
88
|
-
e.selectDate(r), e.setFocusedDate(r);
|
|
89
|
-
else if (i.pointerType === "keyboard" && !e.anchorDate) {
|
|
90
|
-
e.selectDate(r);
|
|
91
|
-
let o = r.add({
|
|
92
|
-
days: 1
|
|
93
|
-
});
|
|
94
|
-
e.isInvalid(o) && (o = r.subtract({
|
|
95
|
-
days: 1
|
|
96
|
-
})), e.isInvalid(o) || e.setFocusedDate(o);
|
|
97
|
-
} else i.pointerType === "virtual" && (e.selectDate(r), e.setFocusedDate(r));
|
|
1
|
+
function B(x) {
|
|
2
|
+
let {
|
|
3
|
+
swiper: e,
|
|
4
|
+
extendParams: C,
|
|
5
|
+
on: w
|
|
6
|
+
} = x;
|
|
7
|
+
C({
|
|
8
|
+
grid: {
|
|
9
|
+
rows: 1,
|
|
10
|
+
fill: "column"
|
|
98
11
|
}
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
onContextMenu(i) {
|
|
143
|
-
i.preventDefault();
|
|
12
|
+
});
|
|
13
|
+
let c, h, f, g;
|
|
14
|
+
const M = () => {
|
|
15
|
+
let t = e.params.spaceBetween;
|
|
16
|
+
return typeof t == "string" && t.indexOf("%") >= 0 ? t = parseFloat(t.replace("%", "")) / 100 * e.size : typeof t == "string" && (t = parseFloat(t)), t;
|
|
17
|
+
}, L = (t) => {
|
|
18
|
+
const {
|
|
19
|
+
slidesPerView: s
|
|
20
|
+
} = e.params, {
|
|
21
|
+
rows: i,
|
|
22
|
+
fill: a
|
|
23
|
+
} = e.params.grid, l = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : t.length;
|
|
24
|
+
f = Math.floor(l / i), Math.floor(l / i) === l / i ? c = l : c = Math.ceil(l / i) * i, s !== "auto" && a === "row" && (c = Math.max(c, s * i)), h = c / i;
|
|
25
|
+
}, y = () => {
|
|
26
|
+
e.slides && e.slides.forEach((t) => {
|
|
27
|
+
t.swiperSlideGridSet && (t.style.height = "", t.style[e.getDirectionLabel("margin-top")] = "");
|
|
28
|
+
});
|
|
29
|
+
}, $ = (t, s, i) => {
|
|
30
|
+
const {
|
|
31
|
+
slidesPerGroup: a
|
|
32
|
+
} = e.params, l = M(), {
|
|
33
|
+
rows: r,
|
|
34
|
+
fill: u
|
|
35
|
+
} = e.params.grid, d = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : i.length;
|
|
36
|
+
let p, n, o;
|
|
37
|
+
if (u === "row" && a > 1) {
|
|
38
|
+
const m = Math.floor(t / (a * r)), S = t - r * a * m, v = m === 0 ? a : Math.min(Math.ceil((d - m * r * a) / r), a);
|
|
39
|
+
o = Math.floor(S / v), n = S - o * v + m * a, p = n + o * c / r, s.style.order = p;
|
|
40
|
+
} else u === "column" ? (n = Math.floor(t / r), o = t - n * r, (n > f || n === f && o === r - 1) && (o += 1, o >= r && (o = 0, n += 1))) : (o = Math.floor(t / h), n = t - o * h);
|
|
41
|
+
s.row = o, s.column = n, s.style.height = `calc((100% - ${(r - 1) * l}px) / ${r})`, s.style[e.getDirectionLabel("margin-top")] = o !== 0 ? l && `${l}px` : "", s.swiperSlideGridSet = !0;
|
|
42
|
+
}, z = (t, s) => {
|
|
43
|
+
const {
|
|
44
|
+
centeredSlides: i,
|
|
45
|
+
roundLengths: a
|
|
46
|
+
} = e.params, l = M(), {
|
|
47
|
+
rows: r
|
|
48
|
+
} = e.params.grid;
|
|
49
|
+
if (e.virtualSize = (t + l) * c, e.virtualSize = Math.ceil(e.virtualSize / r) - l, e.params.cssMode || (e.wrapperEl.style[e.getDirectionLabel("width")] = `${e.virtualSize + l}px`), i) {
|
|
50
|
+
const u = [];
|
|
51
|
+
for (let d = 0; d < s.length; d += 1) {
|
|
52
|
+
let p = s[d];
|
|
53
|
+
a && (p = Math.floor(p)), s[d] < e.virtualSize + s[0] && u.push(p);
|
|
144
54
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
55
|
+
s.splice(0, s.length), s.push(...u);
|
|
56
|
+
}
|
|
57
|
+
}, I = () => {
|
|
58
|
+
g = e.params.grid && e.params.grid.rows > 1;
|
|
59
|
+
}, b = () => {
|
|
60
|
+
const {
|
|
61
|
+
params: t,
|
|
62
|
+
el: s
|
|
63
|
+
} = e, i = t.grid && t.grid.rows > 1;
|
|
64
|
+
g && !i ? (s.classList.remove(`${t.containerModifierClass}grid`, `${t.containerModifierClass}grid-column`), f = 1, e.emitContainerClasses()) : !g && i && (s.classList.add(`${t.containerModifierClass}grid`), t.grid.fill === "column" && s.classList.add(`${t.containerModifierClass}grid-column`), e.emitContainerClasses()), g = i;
|
|
65
|
+
};
|
|
66
|
+
w("init", I), w("update", b), e.grid = {
|
|
67
|
+
initSlides: L,
|
|
68
|
+
unsetSlides: y,
|
|
69
|
+
updateSlide: $,
|
|
70
|
+
updateWrapperSize: z
|
|
154
71
|
};
|
|
155
72
|
}
|
|
156
73
|
export {
|
|
157
|
-
|
|
74
|
+
B as default
|
|
158
75
|
};
|
package/index201.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=
|
|
1
|
+
"use strict";function a(o){const e=this,{params:t,slidesEl:p}=e;t.loop&&e.loopDestroy();const f=n=>{if(typeof n=="string"){const i=document.createElement("div");i.innerHTML=n,p.append(i.children[0]),i.innerHTML=""}else p.append(n)};if(typeof o=="object"&&"length"in o)for(let n=0;n<o.length;n+=1)o[n]&&f(o[n]);else f(o);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update()}function m(o){const e=this,{params:t,activeIndex:p,slidesEl:f}=e;t.loop&&e.loopDestroy();let n=p+1;const i=l=>{if(typeof l=="string"){const c=document.createElement("div");c.innerHTML=l,f.prepend(c.children[0]),c.innerHTML=""}else f.prepend(l)};if(typeof o=="object"&&"length"in o){for(let l=0;l<o.length;l+=1)o[l]&&i(o[l]);n=p+o.length}else i(o);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),e.slideTo(n,0,!1)}function h(o,e){const t=this,{params:p,activeIndex:f,slidesEl:n}=t;let i=f;p.loop&&(i-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());const l=t.slides.length;if(o<=0){t.prependSlide(e);return}if(o>=l){t.appendSlide(e);return}let c=i>o?i+1:i;const s=[];for(let r=l-1;r>=o;r-=1){const d=t.slides[r];d.remove(),s.unshift(d)}if(typeof e=="object"&&"length"in e){for(let r=0;r<e.length;r+=1)e[r]&&n.append(e[r]);c=i>o?i+e.length:i}else n.append(e);for(let r=0;r<s.length;r+=1)n.append(s[r]);t.recalcSlides(),p.loop&&t.loopCreate(),(!p.observer||t.isElement)&&t.update(),p.loop?t.slideTo(c+t.loopedSlides,0,!1):t.slideTo(c,0,!1)}function v(o){const e=this,{params:t,activeIndex:p}=e;let f=p;t.loop&&(f-=e.loopedSlides,e.loopDestroy());let n=f,i;if(typeof o=="object"&&"length"in o){for(let l=0;l<o.length;l+=1)i=o[l],e.slides[i]&&e.slides[i].remove(),i<n&&(n-=1);n=Math.max(n,0)}else i=o,e.slides[i]&&e.slides[i].remove(),i<n&&(n-=1),n=Math.max(n,0);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),t.loop?e.slideTo(n+e.loopedSlides,0,!1):e.slideTo(n,0,!1)}function S(){const o=this,e=[];for(let t=0;t<o.slides.length;t+=1)e.push(t);o.removeSlide(e)}function u(o){let{swiper:e}=o;Object.assign(e,{appendSlide:a.bind(e),prependSlide:m.bind(e),addSlide:h.bind(e),removeSlide:v.bind(e),removeAllSlides:S.bind(e)})}module.exports=u;
|