@okam/stack-ui 1.35.0 → 1.35.2
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/components/fields/Select/Select.d.ts +1 -1
- package/index125.js +1 -1
- package/index125.mjs +9 -9
- package/index141.js +1 -1
- package/index141.mjs +23 -23
- package/index142.js +1 -1
- package/index142.mjs +3 -3
- package/index147.js +1 -1
- package/index147.mjs +1 -1
- package/index152.js +1 -1
- package/index152.mjs +1 -1
- package/index16.js +1 -1
- package/index16.mjs +133 -131
- package/index178.js +1 -1
- package/index178.mjs +122 -201
- package/index179.js +1 -1
- package/index179.mjs +130 -60
- package/index18.js +1 -1
- package/index18.mjs +22 -22
- package/index180.js +1 -1
- package/index180.mjs +44 -143
- package/index181.js +1 -1
- package/index181.mjs +14 -124
- package/index182.js +1 -1
- package/index182.mjs +87 -216
- package/index183.js +1 -1
- package/index183.mjs +102 -186
- package/index184.js +1 -1
- package/index184.mjs +4 -69
- package/index185.js +1 -1
- package/index185.mjs +3 -279
- package/index186.js +1 -1
- package/index186.mjs +119 -92
- package/index187.js +1 -1
- package/index187.mjs +23 -182
- package/index188.js +1 -1
- package/index188.mjs +51 -84
- package/index189.js +1 -1
- package/index189.mjs +44 -58
- package/index190.js +1 -1
- package/index190.mjs +35 -124
- package/index191.js +1 -1
- package/index191.mjs +110 -113
- package/index192.js +1 -1
- package/index192.mjs +74 -119
- package/index193.js +1 -1
- package/index193.mjs +101 -72
- package/index194.js +1 -1
- package/index194.mjs +98 -111
- package/index195.js +1 -1
- package/index195.mjs +197 -46
- package/index196.js +1 -1
- package/index196.mjs +57 -86
- package/index197.js +1 -1
- package/index197.mjs +138 -65
- package/index198.js +1 -1
- package/index198.mjs +121 -53
- package/index199.js +1 -1
- package/index199.mjs +218 -93
- package/index200.js +1 -5
- package/index200.mjs +187 -77
- package/index201.js +1 -1
- package/index201.mjs +60 -2016
- package/index202.js +1 -1
- package/index202.mjs +277 -57
- package/index203.js +1 -1
- package/index203.mjs +95 -185
- package/index204.js +1 -1
- package/index204.mjs +179 -115
- package/index205.js +1 -1
- package/index205.mjs +81 -131
- package/index206.js +1 -1
- package/index206.mjs +58 -44
- package/index207.js +1 -1
- package/index207.mjs +126 -14
- package/index208.js +1 -1
- package/index208.mjs +113 -92
- package/index209.js +1 -1
- package/index209.mjs +119 -103
- package/index210.js +1 -1
- package/index210.mjs +72 -4
- package/index211.js +1 -1
- package/index211.mjs +110 -3
- package/index212.js +1 -1
- package/index212.mjs +51 -124
- package/index213.js +1 -1
- package/index213.mjs +93 -29
- package/index214.js +1 -1
- package/index214.mjs +70 -51
- package/index215.js +1 -1
- package/index215.mjs +56 -44
- package/index216.js +1 -1
- package/index216.mjs +98 -36
- package/index217.js +5 -1
- package/index217.mjs +78 -111
- package/index218.js +1 -1
- package/index218.mjs +2021 -73
- package/index219.js +1 -1
- package/index219.mjs +57 -99
- package/index220.js +1 -1
- package/index220.mjs +189 -98
- package/index232.js +1 -1
- package/index232.mjs +4 -130
- package/index233.js +1 -1
- package/index233.mjs +123 -183
- package/index234.js +1 -1
- package/index234.mjs +189 -8
- package/index235.js +1 -1
- package/index235.mjs +9 -3
- package/index236.js +1 -1
- package/index236.mjs +3 -36
- package/index237.js +1 -1
- package/index237.mjs +36 -5
- package/index238.js +1 -1
- package/index238.mjs +5 -29
- package/index239.js +1 -1
- package/index239.mjs +29 -6
- package/index240.js +1 -1
- package/index240.mjs +6 -4
- package/package.json +2 -29
package/index18.mjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import { useSearchField as
|
|
5
|
-
import { useSearchFieldState as
|
|
3
|
+
import k from "react";
|
|
4
|
+
import { useSearchField as w, FocusRing as v } from "react-aria";
|
|
5
|
+
import { useSearchFieldState as x } from "react-stately";
|
|
6
6
|
import t from "./index67.mjs";
|
|
7
|
-
import { useUserQueryValHook as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
const { setUserSearchQuery: u } =
|
|
14
|
-
u(
|
|
15
|
-
const m =
|
|
16
|
-
return /* @__PURE__ */ h("div", { className:
|
|
7
|
+
import { useUserQueryValHook as C } from "./index73.mjs";
|
|
8
|
+
import F from "./index6.mjs";
|
|
9
|
+
import R from "./index48.mjs";
|
|
10
|
+
import B from "./index110.mjs";
|
|
11
|
+
import M from "./index3.mjs";
|
|
12
|
+
const z = (a) => {
|
|
13
|
+
const { setUserSearchQuery: u } = C(), { label: i, themeName: r = "search", tokens: p, customTheme: s, disabled: c, errorMessage: n, placeholder: d, icon: f } = a, l = x(a);
|
|
14
|
+
u(l.value);
|
|
15
|
+
const m = k.useRef(null), { labelProps: b, inputProps: g, errorMessageProps: T, clearButtonProps: N } = w(a, l, m), o = { ...p, isError: n != null }, S = t(`${r}.wrapper`, o, s), y = t(`${r}.input`, o, s), P = t(`${r}.label`, o, s), $ = t(`${r}.container`, o, s);
|
|
16
|
+
return /* @__PURE__ */ h("div", { className: S, "aria-disabled": c, children: [
|
|
17
17
|
i && // eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
18
|
-
/* @__PURE__ */ e("label", { ...
|
|
19
|
-
/* @__PURE__ */ h("div", { className:
|
|
20
|
-
/* @__PURE__ */ e("input", { ref: m, ...
|
|
21
|
-
/* @__PURE__ */ e(
|
|
22
|
-
|
|
18
|
+
/* @__PURE__ */ e("label", { ...b, className: P, children: i }),
|
|
19
|
+
/* @__PURE__ */ h("div", { className: $, children: [
|
|
20
|
+
/* @__PURE__ */ e("input", { ref: m, ...g, placeholder: d, className: y, disabled: c }),
|
|
21
|
+
/* @__PURE__ */ e(v, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ e(
|
|
22
|
+
F,
|
|
23
23
|
{
|
|
24
|
-
handlePress:
|
|
24
|
+
handlePress: N.onPress,
|
|
25
25
|
tokens: { isIconOnly: !0, buttonStyle: "hollow" },
|
|
26
26
|
themeName: `${r}.icon`,
|
|
27
27
|
"aria-label": "clear",
|
|
28
|
-
children:
|
|
28
|
+
children: f ?? (l.value === "" ? /* @__PURE__ */ e(B, { width: "16", height: "16" }) : /* @__PURE__ */ e(R, { width: "16", height: "16" }))
|
|
29
29
|
}
|
|
30
30
|
) })
|
|
31
31
|
] }),
|
|
32
|
-
|
|
32
|
+
n && /* @__PURE__ */ e(M, { themeName: `${r}.errorMessage`, tokens: o, ...T, children: n })
|
|
33
33
|
] });
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
z as default
|
|
37
37
|
};
|
package/index180.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index183.js"),u=require("./index194.js");function d(e,t){return t=l.toCalendar(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function $(e,t){var a,r,i,n;return(n=(i=(a=e.isEqual)===null||a===void 0?void 0:a.call(e,t))!==null&&i!==void 0?i:(r=t.isEqual)===null||r===void 0?void 0:r.call(t,e))!==null&&n!==void 0?n:e.identifier===t.identifier}function s(e,t,a){let r=e.calendar.toJulianDay(e),i=g(t),n=Math.ceil(r+1-i)%7;return n<0&&(n+=7),n}function m(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function v(e,t){return o(e)-o(t)}function o(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let c=null;function p(){return c==null&&(c=new Intl.DateTimeFormat().resolvedOptions().timeZone),c}const f=new Map;function y(e){if(Intl.Locale){let a=f.get(e);return a||(a=new Intl.Locale(e).maximize().region,a&&f.set(e,a)),a}let t=e.split("-")[1];return t==="u"?void 0:t}function g(e){let t=y(e);return t&&u.weekStartData[t]||0}exports.compareDate=m;exports.compareTime=v;exports.getDayOfWeek=s;exports.getLocalTimeZone=p;exports.isEqualCalendar=$;exports.isSameDay=d;
|
package/index180.mjs
CHANGED
|
@@ -1,146 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
function O() {
|
|
41
|
-
e.enabled && (e.mouseEntered = !1);
|
|
42
|
-
}
|
|
43
|
-
function y(t) {
|
|
44
|
-
return e.params.mousewheel.thresholdDelta && t.delta < e.params.mousewheel.thresholdDelta || e.params.mousewheel.thresholdTime && T() - w < e.params.mousewheel.thresholdTime ? !1 : t.delta >= 6 && T() - w < 60 ? !0 : (t.direction < 0 ? (!e.isEnd || e.params.loop) && !e.animating && (e.slideNext(), g("scroll", t.raw)) : (!e.isBeginning || e.params.loop) && !e.animating && (e.slidePrev(), g("scroll", t.raw)), w = new L.Date().getTime(), !1);
|
|
45
|
-
}
|
|
46
|
-
function A(t) {
|
|
47
|
-
const s = e.params.mousewheel;
|
|
48
|
-
if (t.direction < 0) {
|
|
49
|
-
if (e.isEnd && !e.params.loop && s.releaseOnEdges)
|
|
50
|
-
return !0;
|
|
51
|
-
} else if (e.isBeginning && !e.params.loop && s.releaseOnEdges)
|
|
52
|
-
return !0;
|
|
53
|
-
return !1;
|
|
54
|
-
}
|
|
55
|
-
function E(t) {
|
|
56
|
-
let s = t, b = !0;
|
|
57
|
-
if (!e.enabled || t.target.closest(`.${e.params.mousewheel.noMousewheelClass}`)) return;
|
|
58
|
-
const f = e.params.mousewheel;
|
|
59
|
-
e.params.cssMode && s.preventDefault();
|
|
60
|
-
let o = e.el;
|
|
61
|
-
e.params.mousewheel.eventsTarget !== "container" && (o = document.querySelector(e.params.mousewheel.eventsTarget));
|
|
62
|
-
const r = o && o.contains(s.target);
|
|
63
|
-
if (!e.mouseEntered && !r && !f.releaseOnEdges) return !0;
|
|
64
|
-
s.originalEvent && (s = s.originalEvent);
|
|
65
|
-
let a = 0;
|
|
66
|
-
const l = e.rtlTranslate ? -1 : 1, d = _(s);
|
|
67
|
-
if (f.forceToAxis)
|
|
68
|
-
if (e.isHorizontal())
|
|
69
|
-
if (Math.abs(d.pixelX) > Math.abs(d.pixelY)) a = -d.pixelX * l;
|
|
70
|
-
else return !0;
|
|
71
|
-
else if (Math.abs(d.pixelY) > Math.abs(d.pixelX)) a = -d.pixelY;
|
|
72
|
-
else return !0;
|
|
73
|
-
else
|
|
74
|
-
a = Math.abs(d.pixelX) > Math.abs(d.pixelY) ? -d.pixelX * l : -d.pixelY;
|
|
75
|
-
if (a === 0) return !0;
|
|
76
|
-
f.invert && (a = -a);
|
|
77
|
-
let h = e.getTranslate() + a * f.sensitivity;
|
|
78
|
-
if (h >= e.minTranslate() && (h = e.minTranslate()), h <= e.maxTranslate() && (h = e.maxTranslate()), b = e.params.loop ? !0 : !(h === e.minTranslate() || h === e.maxTranslate()), b && e.params.nested && s.stopPropagation(), !e.params.freeMode || !e.params.freeMode.enabled) {
|
|
79
|
-
const n = {
|
|
80
|
-
time: T(),
|
|
81
|
-
delta: Math.abs(a),
|
|
82
|
-
direction: Math.sign(a),
|
|
83
|
-
raw: t
|
|
84
|
-
};
|
|
85
|
-
i.length >= 2 && i.shift();
|
|
86
|
-
const m = i.length ? i[i.length - 1] : void 0;
|
|
87
|
-
if (i.push(n), m ? (n.direction !== m.direction || n.delta > m.delta || n.time > m.time + 150) && y(n) : y(n), A(n))
|
|
88
|
-
return !0;
|
|
89
|
-
} else {
|
|
90
|
-
const n = {
|
|
91
|
-
time: T(),
|
|
92
|
-
delta: Math.abs(a),
|
|
93
|
-
direction: Math.sign(a)
|
|
94
|
-
}, m = u && n.time < u.time + 500 && n.delta <= u.delta && n.direction === u.direction;
|
|
95
|
-
if (!m) {
|
|
96
|
-
u = void 0;
|
|
97
|
-
let p = e.getTranslate() + a * f.sensitivity;
|
|
98
|
-
const C = e.isBeginning, B = e.isEnd;
|
|
99
|
-
if (p >= e.minTranslate() && (p = e.minTranslate()), p <= e.maxTranslate() && (p = e.maxTranslate()), e.setTransition(0), e.setTranslate(p), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses(), (!C && e.isBeginning || !B && e.isEnd) && e.updateSlidesClasses(), e.params.loop && e.loopFix({
|
|
100
|
-
direction: n.direction < 0 ? "next" : "prev",
|
|
101
|
-
byMousewheel: !0
|
|
102
|
-
}), e.params.freeMode.sticky) {
|
|
103
|
-
clearTimeout(c), c = void 0, i.length >= 15 && i.shift();
|
|
104
|
-
const M = i.length ? i[i.length - 1] : void 0, H = i[0];
|
|
105
|
-
if (i.push(n), M && (n.delta > M.delta || n.direction !== M.direction))
|
|
106
|
-
i.splice(0);
|
|
107
|
-
else if (i.length >= 15 && n.time - H.time < 500 && H.delta - n.delta >= 1 && n.delta <= 6) {
|
|
108
|
-
const X = a > 0 ? 0.8 : 0.2;
|
|
109
|
-
u = n, i.splice(0), c = P(() => {
|
|
110
|
-
e.destroyed || !e.params || e.slideToClosest(e.params.speed, !0, void 0, X);
|
|
111
|
-
}, 0);
|
|
112
|
-
}
|
|
113
|
-
c || (c = P(() => {
|
|
114
|
-
if (e.destroyed || !e.params) return;
|
|
115
|
-
const X = 0.5;
|
|
116
|
-
u = n, i.splice(0), e.slideToClosest(e.params.speed, !0, void 0, X);
|
|
117
|
-
}, 500));
|
|
118
|
-
}
|
|
119
|
-
if (m || g("scroll", s), e.params.autoplay && e.params.autoplayDisableOnInteraction && e.autoplay.stop(), f.releaseOnEdges && (p === e.minTranslate() || p === e.maxTranslate()))
|
|
120
|
-
return !0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return s.preventDefault ? s.preventDefault() : s.returnValue = !1, !1;
|
|
124
|
-
}
|
|
125
|
-
function D(t) {
|
|
126
|
-
let s = e.el;
|
|
127
|
-
e.params.mousewheel.eventsTarget !== "container" && (s = document.querySelector(e.params.mousewheel.eventsTarget)), s[t]("mouseenter", G), s[t]("mouseleave", O), s[t]("wheel", E);
|
|
128
|
-
}
|
|
129
|
-
function v() {
|
|
130
|
-
return e.params.cssMode ? (e.wrapperEl.removeEventListener("wheel", E), !0) : e.mousewheel.enabled ? !1 : (D("addEventListener"), e.mousewheel.enabled = !0, !0);
|
|
131
|
-
}
|
|
132
|
-
function x() {
|
|
133
|
-
return e.params.cssMode ? (e.wrapperEl.addEventListener(event, E), !0) : e.mousewheel.enabled ? (D("removeEventListener"), e.mousewheel.enabled = !1, !0) : !1;
|
|
134
|
-
}
|
|
135
|
-
I("init", () => {
|
|
136
|
-
!e.params.mousewheel.enabled && e.params.cssMode && x(), e.params.mousewheel.enabled && v();
|
|
137
|
-
}), I("destroy", () => {
|
|
138
|
-
e.params.cssMode && v(), e.mousewheel.enabled && x();
|
|
139
|
-
}), Object.assign(e.mousewheel, {
|
|
140
|
-
enable: v,
|
|
141
|
-
disable: x
|
|
142
|
-
});
|
|
1
|
+
import { toCalendar as l } from "./index183.mjs";
|
|
2
|
+
import { weekStartData as u } from "./index194.mjs";
|
|
3
|
+
function p(e, a) {
|
|
4
|
+
return a = l(a, e.calendar), e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
|
|
5
|
+
}
|
|
6
|
+
function v(e, a) {
|
|
7
|
+
var t, r, i, n;
|
|
8
|
+
return (n = (i = (t = e.isEqual) === null || t === void 0 ? void 0 : t.call(e, a)) !== null && i !== void 0 ? i : (r = a.isEqual) === null || r === void 0 ? void 0 : r.call(a, e)) !== null && n !== void 0 ? n : e.identifier === a.identifier;
|
|
9
|
+
}
|
|
10
|
+
function y(e, a, t) {
|
|
11
|
+
let r = e.calendar.toJulianDay(e), i = d(a), n = Math.ceil(r + 1 - i) % 7;
|
|
12
|
+
return n < 0 && (n += 7), n;
|
|
13
|
+
}
|
|
14
|
+
function g(e, a) {
|
|
15
|
+
return e.calendar.toJulianDay(e) - a.calendar.toJulianDay(a);
|
|
16
|
+
}
|
|
17
|
+
function x(e, a) {
|
|
18
|
+
return c(e) - c(a);
|
|
19
|
+
}
|
|
20
|
+
function c(e) {
|
|
21
|
+
return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
|
|
22
|
+
}
|
|
23
|
+
let f = null;
|
|
24
|
+
function D() {
|
|
25
|
+
return f == null && (f = new Intl.DateTimeFormat().resolvedOptions().timeZone), f;
|
|
26
|
+
}
|
|
27
|
+
const o = /* @__PURE__ */ new Map();
|
|
28
|
+
function $(e) {
|
|
29
|
+
if (Intl.Locale) {
|
|
30
|
+
let t = o.get(e);
|
|
31
|
+
return t || (t = new Intl.Locale(e).maximize().region, t && o.set(e, t)), t;
|
|
32
|
+
}
|
|
33
|
+
let a = e.split("-")[1];
|
|
34
|
+
return a === "u" ? void 0 : a;
|
|
35
|
+
}
|
|
36
|
+
function d(e) {
|
|
37
|
+
let a = $(e);
|
|
38
|
+
return a && u[a] || 0;
|
|
143
39
|
}
|
|
144
40
|
export {
|
|
145
|
-
|
|
41
|
+
g as compareDate,
|
|
42
|
+
x as compareTime,
|
|
43
|
+
y as getDayOfWeek,
|
|
44
|
+
D as getLocalTimeZone,
|
|
45
|
+
v as isEqualCalendar,
|
|
46
|
+
p as isSameDay
|
|
146
47
|
};
|
package/index181.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index183.js"),o=require("./index182.js");function e(r){return`${String(r.hour).padStart(2,"0")}:${String(r.minute).padStart(2,"0")}:${String(r.second).padStart(2,"0")}${r.millisecond?String(r.millisecond/1e3).slice(1):""}`}function n(r){let a=i.toCalendar(r,new o.GregorianCalendar),t;return a.era==="BC"?t=a.year===1?"0000":"-"+String(Math.abs(1-a.year)).padStart(6,"00"):t=String(a.year).padStart(4,"0"),`${t}-${String(a.month).padStart(2,"0")}-${String(a.day).padStart(2,"0")}`}function d(r){return`${n(r)}T${e(r)}`}exports.dateTimeToString=d;exports.dateToString=n;exports.timeToString=e;
|
package/index181.mjs
CHANGED
|
@@ -1,127 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
nextEl: null,
|
|
13
|
-
prevEl: null,
|
|
14
|
-
hideOnClick: !1,
|
|
15
|
-
disabledClass: "swiper-button-disabled",
|
|
16
|
-
hiddenClass: "swiper-button-hidden",
|
|
17
|
-
lockClass: "swiper-button-lock",
|
|
18
|
-
navigationDisabledClass: "swiper-navigation-disabled"
|
|
19
|
-
}
|
|
20
|
-
}), a.navigation = {
|
|
21
|
-
nextEl: null,
|
|
22
|
-
prevEl: null
|
|
23
|
-
};
|
|
24
|
-
function u(i) {
|
|
25
|
-
let n;
|
|
26
|
-
return i && typeof i == "string" && a.isElement && (n = a.el.querySelector(i) || a.hostEl.querySelector(i), n) ? n : (i && (typeof i == "string" && (n = [...document.querySelectorAll(i)]), a.params.uniqueNavElements && typeof i == "string" && n && n.length > 1 && a.el.querySelectorAll(i).length === 1 ? n = a.el.querySelector(i) : n && n.length === 1 && (n = n[0])), i && !n ? i : n);
|
|
27
|
-
}
|
|
28
|
-
function f(i, n) {
|
|
29
|
-
const t = a.params.navigation;
|
|
30
|
-
i = l(i), i.forEach((e) => {
|
|
31
|
-
e && (e.classList[n ? "add" : "remove"](...t.disabledClass.split(" ")), e.tagName === "BUTTON" && (e.disabled = n), a.params.watchOverflow && a.enabled && e.classList[a.isLocked ? "add" : "remove"](t.lockClass));
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function d() {
|
|
35
|
-
const {
|
|
36
|
-
nextEl: i,
|
|
37
|
-
prevEl: n
|
|
38
|
-
} = a.navigation;
|
|
39
|
-
if (a.params.loop) {
|
|
40
|
-
f(n, !1), f(i, !1);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
f(n, a.isBeginning && !a.params.rewind), f(i, a.isEnd && !a.params.rewind);
|
|
44
|
-
}
|
|
45
|
-
function E(i) {
|
|
46
|
-
i.preventDefault(), !(a.isBeginning && !a.params.loop && !a.params.rewind) && (a.slidePrev(), g("navigationPrev"));
|
|
47
|
-
}
|
|
48
|
-
function h(i) {
|
|
49
|
-
i.preventDefault(), !(a.isEnd && !a.params.loop && !a.params.rewind) && (a.slideNext(), g("navigationNext"));
|
|
50
|
-
}
|
|
51
|
-
function v() {
|
|
52
|
-
const i = a.params.navigation;
|
|
53
|
-
if (a.params.navigation = w(a, a.originalParams.navigation, a.params.navigation, {
|
|
54
|
-
nextEl: "swiper-button-next",
|
|
55
|
-
prevEl: "swiper-button-prev"
|
|
56
|
-
}), !(i.nextEl || i.prevEl)) return;
|
|
57
|
-
let n = u(i.nextEl), t = u(i.prevEl);
|
|
58
|
-
Object.assign(a.navigation, {
|
|
59
|
-
nextEl: n,
|
|
60
|
-
prevEl: t
|
|
61
|
-
}), n = l(n), t = l(t);
|
|
62
|
-
const e = (s, p) => {
|
|
63
|
-
s && s.addEventListener("click", p === "next" ? h : E), !a.enabled && s && s.classList.add(...i.lockClass.split(" "));
|
|
64
|
-
};
|
|
65
|
-
n.forEach((s) => e(s, "next")), t.forEach((s) => e(s, "prev"));
|
|
66
|
-
}
|
|
67
|
-
function m() {
|
|
68
|
-
let {
|
|
69
|
-
nextEl: i,
|
|
70
|
-
prevEl: n
|
|
71
|
-
} = a.navigation;
|
|
72
|
-
i = l(i), n = l(n);
|
|
73
|
-
const t = (e, s) => {
|
|
74
|
-
e.removeEventListener("click", s === "next" ? h : E), e.classList.remove(...a.params.navigation.disabledClass.split(" "));
|
|
75
|
-
};
|
|
76
|
-
i.forEach((e) => t(e, "next")), n.forEach((e) => t(e, "prev"));
|
|
77
|
-
}
|
|
78
|
-
c("init", () => {
|
|
79
|
-
a.params.navigation.enabled === !1 ? b() : (v(), d());
|
|
80
|
-
}), c("toEdge fromEdge lock unlock", () => {
|
|
81
|
-
d();
|
|
82
|
-
}), c("destroy", () => {
|
|
83
|
-
m();
|
|
84
|
-
}), c("enable disable", () => {
|
|
85
|
-
let {
|
|
86
|
-
nextEl: i,
|
|
87
|
-
prevEl: n
|
|
88
|
-
} = a.navigation;
|
|
89
|
-
if (i = l(i), n = l(n), a.enabled) {
|
|
90
|
-
d();
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
[...i, ...n].filter((t) => !!t).forEach((t) => t.classList.add(a.params.navigation.lockClass));
|
|
94
|
-
}), c("click", (i, n) => {
|
|
95
|
-
let {
|
|
96
|
-
nextEl: t,
|
|
97
|
-
prevEl: e
|
|
98
|
-
} = a.navigation;
|
|
99
|
-
t = l(t), e = l(e);
|
|
100
|
-
const s = n.target;
|
|
101
|
-
let p = e.includes(s) || t.includes(s);
|
|
102
|
-
if (a.isElement && !p) {
|
|
103
|
-
const o = n.path || n.composedPath && n.composedPath();
|
|
104
|
-
o && (p = o.find((r) => t.includes(r) || e.includes(r)));
|
|
105
|
-
}
|
|
106
|
-
if (a.params.navigation.hideOnClick && !p) {
|
|
107
|
-
if (a.pagination && a.params.pagination && a.params.pagination.clickable && (a.pagination.el === s || a.pagination.el.contains(s))) return;
|
|
108
|
-
let o;
|
|
109
|
-
t.length ? o = t[0].classList.contains(a.params.navigation.hiddenClass) : e.length && (o = e[0].classList.contains(a.params.navigation.hiddenClass)), g(o === !0 ? "navigationShow" : "navigationHide"), [...t, ...e].filter((r) => !!r).forEach((r) => r.classList.toggle(a.params.navigation.hiddenClass));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
const k = () => {
|
|
113
|
-
a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")), v(), d();
|
|
114
|
-
}, b = () => {
|
|
115
|
-
a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")), m();
|
|
116
|
-
};
|
|
117
|
-
Object.assign(a.navigation, {
|
|
118
|
-
enable: k,
|
|
119
|
-
disable: b,
|
|
120
|
-
update: d,
|
|
121
|
-
init: v,
|
|
122
|
-
destroy: m
|
|
123
|
-
});
|
|
1
|
+
import { toCalendar as e } from "./index183.mjs";
|
|
2
|
+
import { GregorianCalendar as n } from "./index182.mjs";
|
|
3
|
+
function o(a) {
|
|
4
|
+
return `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}:${String(a.second).padStart(2, "0")}${a.millisecond ? String(a.millisecond / 1e3).slice(1) : ""}`;
|
|
5
|
+
}
|
|
6
|
+
function $(a) {
|
|
7
|
+
let r = e(a, new n()), t;
|
|
8
|
+
return r.era === "BC" ? t = r.year === 1 ? "0000" : "-" + String(Math.abs(1 - r.year)).padStart(6, "00") : t = String(r.year).padStart(4, "0"), `${t}-${String(r.month).padStart(2, "0")}-${String(r.day).padStart(2, "0")}`;
|
|
9
|
+
}
|
|
10
|
+
function c(a) {
|
|
11
|
+
return `${$(a)}T${o(a)}`;
|
|
124
12
|
}
|
|
125
13
|
export {
|
|
126
|
-
|
|
14
|
+
c as dateTimeToString,
|
|
15
|
+
$ as dateToString,
|
|
16
|
+
o as timeToString
|
|
127
17
|
};
|
package/index182.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("./index178.js"),b=require("./index185.js"),y=1721426;function l(r,e,t,f){e=g(r,e);let a=e-1,n=-2;return t<=2?n=0:d(e)&&(n=-1),y-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*t-362)/12+n+f)}function d(r){return r%4===0&&(r%100!==0||r%400===0)}function g(r,e){return r==="BC"?1-e:e}function M(r){let e="AD";return r<=0&&(e="BC",r=1-r),[e,r]}const q={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class B{fromJulianDay(e){let t=e,f=t-y,a=Math.floor(f/146097),n=b.mod(f,146097),c=Math.floor(n/36524),s=b.mod(n,36524),D=Math.floor(s/1461),p=b.mod(s,1461),$=Math.floor(p/365),C=a*400+c*100+D*4+$+(c!==4&&$!==4?1:0),[i,o]=M(C),m=t-l(i,o,1,1),u=2;t<l(i,o,3,1)?u=0:d(o)&&(u=1);let h=Math.floor(((m+u)*12+373)/367),x=t-l(i,o,h,1)+1;return new Y.CalendarDate(i,o,h,x)}toJulianDay(e){return l(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return q[d(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return d(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}exports.GregorianCalendar=B;exports.fromExtendedYear=M;exports.getExtendedYear=g;exports.gregorianToJulianDay=l;exports.isLeapYear=d;
|