@okam/stack-ui 1.32.1 → 1.32.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/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +53 -55
- 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/index110.js +1 -1
- package/index110.mjs +5 -5
- package/index111.js +1 -1
- package/index111.mjs +2 -2
- package/index112.js +1 -1
- package/index112.mjs +1 -1
- package/index113.js +1 -1
- package/index113.mjs +2 -2
- package/index115.js +1 -1
- package/index115.mjs +4 -4
- package/index116.js +1 -1
- package/index116.mjs +2 -2
- package/index120.js +1 -1
- package/index120.mjs +4 -4
- package/index121.js +1 -1
- package/index121.mjs +2 -2
- package/index124.js +1 -1
- package/index124.mjs +1 -1
- package/index125.js +1 -1
- package/index125.mjs +3 -3
- package/index126.js +1 -1
- package/index126.mjs +3 -3
- package/index130.js +1 -1
- package/index130.mjs +2 -2
- package/index133.js +1 -1
- package/index133.mjs +1 -1
- package/index138.js +1 -1
- package/index138.mjs +12 -46
- package/index139.js +1 -1
- package/index139.mjs +46 -241
- package/index140.js +1 -2
- package/index140.mjs +241 -13
- package/index141.js +2 -1
- package/index141.mjs +12 -29
- package/index142.js +1 -1
- package/index142.mjs +30 -52
- package/index143.js +1 -1
- package/index143.mjs +52 -12
- package/index145.js +1 -1
- package/index145.mjs +1 -1
- package/index147.js +1 -1
- package/index147.mjs +2 -2
- package/index148.js +1 -1
- package/index148.mjs +3 -3
- package/index149.js +1 -1
- package/index149.mjs +3 -3
- package/index150.js +1 -1
- package/index150.mjs +1 -1
- package/index151.js +1 -1
- package/index151.mjs +3 -3
- package/index152.js +1 -1
- package/index152.mjs +20 -106
- package/index153.js +1 -1
- package/index153.mjs +107 -83
- package/index154.js +1 -1
- package/index154.mjs +83 -26
- package/index155.js +1 -1
- package/index155.mjs +25 -20
- package/index156.js +1 -1
- package/index156.mjs +123 -17
- package/index157.js +1 -1
- package/index157.mjs +24 -122
- package/index158.js +1 -1
- package/index158.mjs +17 -71
- package/index159.js +1 -1
- package/index159.mjs +62 -338
- package/index160.js +1 -1
- package/index160.mjs +346 -42
- package/index161.js +1 -1
- package/index161.mjs +43 -29
- package/index162.js +1 -1
- package/index162.mjs +28 -24
- package/index164.js +1 -1
- package/index164.mjs +2 -2
- package/index167.js +1 -1
- package/index167.mjs +3 -3
- package/index169.js +1 -1
- package/index169.mjs +1 -1
- package/index170.js +1 -1
- package/index170.mjs +1 -1
- package/index171.js +1 -1
- package/index171.mjs +1 -1
- package/index178.js +1 -1
- package/index178.mjs +1 -1
- package/index180.js +1 -1
- package/index180.mjs +2 -2
- package/index182.js +1 -1
- package/index182.mjs +1 -1
- package/index198.js +1 -1
- package/index198.mjs +70 -201
- package/index199.js +1 -1
- package/index199.mjs +91 -60
- package/index200.js +1 -1
- package/index200.mjs +151 -139
- package/index201.js +1 -1
- package/index201.mjs +72 -125
- package/index202.js +1 -1
- package/index202.mjs +38 -220
- package/index203.js +1 -1
- package/index203.mjs +5 -190
- package/index204.js +1 -1
- package/index204.mjs +60 -68
- package/index205.js +1 -1
- package/index205.mjs +53 -273
- package/index206.js +1 -1
- package/index206.mjs +191 -86
- package/index207.js +1 -1
- package/index207.mjs +56 -180
- package/index208.js +1 -1
- package/index208.mjs +134 -75
- package/index209.js +1 -1
- package/index209.mjs +118 -52
- package/index210.js +1 -1
- package/index210.mjs +214 -116
- package/index211.js +1 -1
- package/index211.mjs +181 -107
- package/index212.js +1 -1
- package/index212.mjs +61 -114
- package/index213.js +1 -1
- package/index213.mjs +272 -65
- package/index214.js +1 -1
- package/index214.mjs +93 -105
- package/index215.js +1 -1
- package/index215.mjs +183 -47
- package/index216.js +1 -1
- package/index216.mjs +77 -86
- package/index217.js +1 -1
- package/index217.mjs +53 -65
- package/index218.js +1 -1
- package/index218.mjs +122 -52
- package/index219.js +1 -1
- package/index219.mjs +111 -94
- package/index220.js +1 -5
- package/index220.mjs +117 -75
- package/index221.js +1 -1
- package/index221.mjs +63 -2016
- package/index222.js +1 -1
- package/index222.mjs +105 -54
- package/index223.js +1 -1
- package/index223.mjs +50 -186
- package/index224.js +1 -1
- package/index224.mjs +89 -68
- package/index225.js +1 -1
- package/index225.mjs +68 -93
- package/index226.js +1 -1
- package/index226.mjs +52 -151
- package/index227.js +1 -1
- package/index227.mjs +100 -72
- package/index228.js +5 -1
- package/index228.mjs +78 -40
- package/index229.js +1 -1
- package/index229.mjs +2025 -5
- package/index230.js +1 -1
- package/index230.mjs +59 -61
- package/index231.js +1 -1
- package/index231.mjs +187 -58
- package/index270.js +1 -1
- package/index270.mjs +44 -126
- package/index271.js +1 -1
- package/index271.mjs +9 -190
- package/index272.js +1 -1
- package/index272.mjs +16 -10
- package/index273.js +1 -1
- package/index273.mjs +16 -4
- package/index274.js +1 -1
- package/index274.mjs +16 -37
- package/index275.js +1 -1
- package/index275.mjs +16 -6
- package/index276.js +1 -1
- package/index276.mjs +16 -30
- package/index277.js +1 -1
- package/index277.mjs +16 -7
- package/index278.js +1 -1
- package/index278.mjs +16 -49
- package/index279.js +1 -1
- package/index279.mjs +16 -10
- package/index280.js +1 -1
- package/index280.mjs +15 -15
- package/index281.js +1 -1
- package/index281.mjs +15 -15
- package/index282.js +1 -1
- package/index282.mjs +12 -12
- package/index283.js +1 -1
- package/index283.mjs +15 -15
- package/index284.js +1 -1
- package/index284.mjs +15 -15
- package/index285.js +1 -1
- package/index285.mjs +15 -15
- package/index286.js +1 -1
- package/index286.mjs +15 -15
- package/index287.js +1 -1
- package/index287.mjs +15 -15
- package/index288.js +1 -1
- package/index288.mjs +15 -15
- package/index289.js +1 -1
- package/index289.mjs +15 -15
- package/index290.js +1 -1
- package/index290.mjs +12 -12
- package/index291.js +1 -1
- package/index291.mjs +15 -15
- package/index292.js +1 -1
- package/index292.mjs +15 -15
- package/index293.js +1 -1
- package/index293.mjs +15 -15
- package/index294.js +1 -1
- package/index294.mjs +12 -12
- package/index295.js +1 -1
- package/index295.mjs +15 -15
- package/index296.js +1 -1
- package/index296.mjs +15 -15
- package/index297.js +1 -1
- package/index297.mjs +15 -15
- package/index298.js +1 -1
- package/index298.mjs +12 -12
- package/index299.js +1 -1
- package/index299.mjs +15 -15
- package/index300.js +1 -1
- package/index300.mjs +15 -15
- package/index301.js +1 -1
- package/index301.mjs +15 -15
- package/index302.js +1 -1
- package/index302.mjs +12 -12
- package/index303.js +1 -1
- package/index303.mjs +15 -15
- package/index304.js +1 -1
- package/index304.mjs +15 -15
- package/index305.js +1 -1
- package/index305.mjs +12 -12
- package/index306.js +1 -1
- package/index306.mjs +130 -15
- package/index307.js +1 -1
- package/index307.mjs +191 -16
- package/index308.js +1 -1
- package/index308.mjs +10 -16
- package/index309.js +1 -1
- package/index309.mjs +4 -16
- package/index310.js +1 -1
- package/index310.mjs +37 -16
- package/index311.js +1 -1
- package/index311.mjs +6 -16
- package/index312.js +1 -1
- package/index312.mjs +30 -16
- package/index313.js +1 -1
- package/index313.mjs +7 -16
- package/index315.js +1 -1
- package/index315.mjs +1 -1
- package/index318.js +1 -1
- package/index318.mjs +1 -1
- package/index325.js +1 -1
- package/index325.mjs +1 -1
- package/index330.js +1 -1
- package/index330.mjs +1 -1
- package/index338.js +1 -1
- package/index338.mjs +4 -7
- package/index339.js +1 -1
- package/index339.mjs +6 -68
- package/index340.js +1 -1
- package/index340.mjs +65 -27
- package/index341.js +1 -1
- package/index341.mjs +30 -6
- package/index342.js +1 -1
- package/index342.mjs +6 -6
- package/index343.js +1 -1
- package/index343.mjs +6 -20
- package/index344.js +1 -1
- package/index344.mjs +20 -3
- package/index99.js +1 -1
- package/index99.mjs +1 -1
- package/package.json +1 -1
package/index140.mjs
CHANGED
|
@@ -1,15 +1,243 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import a, { forwardRef as W, useState as P, useRef as u, useEffect as _, useLayoutEffect as Q, createContext as q, useContext as X } from "react";
|
|
2
|
+
import { S as Y } from "./index229.mjs";
|
|
3
|
+
import { g as Z, m as ee, a as re, u as te } from "./index230.mjs";
|
|
4
|
+
import { d as D, w as ne, n as se, b as ae, a as ie, e as F, u as oe } from "./index231.mjs";
|
|
5
|
+
function k() {
|
|
6
|
+
return k = Object.assign ? Object.assign.bind() : function(n) {
|
|
7
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
8
|
+
var s = arguments[r];
|
|
9
|
+
for (var t in s)
|
|
10
|
+
Object.prototype.hasOwnProperty.call(s, t) && (n[t] = s[t]);
|
|
11
|
+
}
|
|
12
|
+
return n;
|
|
13
|
+
}, k.apply(this, arguments);
|
|
14
|
+
}
|
|
15
|
+
function H(n) {
|
|
16
|
+
return n.type && n.type.displayName && n.type.displayName.includes("SwiperSlide");
|
|
17
|
+
}
|
|
18
|
+
function U(n) {
|
|
19
|
+
const r = [];
|
|
20
|
+
return a.Children.toArray(n).forEach((s) => {
|
|
21
|
+
H(s) ? r.push(s) : s.props && s.props.children && U(s.props.children).forEach((t) => r.push(t));
|
|
22
|
+
}), r;
|
|
23
|
+
}
|
|
24
|
+
function le(n) {
|
|
25
|
+
const r = [], s = {
|
|
26
|
+
"container-start": [],
|
|
27
|
+
"container-end": [],
|
|
28
|
+
"wrapper-start": [],
|
|
29
|
+
"wrapper-end": []
|
|
30
|
+
};
|
|
31
|
+
return a.Children.toArray(n).forEach((t) => {
|
|
32
|
+
if (H(t))
|
|
33
|
+
r.push(t);
|
|
34
|
+
else if (t.props && t.props.slot && s[t.props.slot])
|
|
35
|
+
s[t.props.slot].push(t);
|
|
36
|
+
else if (t.props && t.props.children) {
|
|
37
|
+
const p = U(t.props.children);
|
|
38
|
+
p.length > 0 ? p.forEach((l) => r.push(l)) : s["container-end"].push(t);
|
|
39
|
+
} else
|
|
40
|
+
s["container-end"].push(t);
|
|
41
|
+
}), {
|
|
42
|
+
slides: r,
|
|
43
|
+
slots: s
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function ce(n, r, s) {
|
|
47
|
+
if (!s) return null;
|
|
48
|
+
const t = (o) => {
|
|
49
|
+
let i = o;
|
|
50
|
+
return o < 0 ? i = r.length + o : i >= r.length && (i = i - r.length), i;
|
|
51
|
+
}, p = n.isHorizontal() ? {
|
|
52
|
+
[n.rtlTranslate ? "right" : "left"]: `${s.offset}px`
|
|
53
|
+
} : {
|
|
54
|
+
top: `${s.offset}px`
|
|
55
|
+
}, {
|
|
56
|
+
from: l,
|
|
57
|
+
to: d
|
|
58
|
+
} = s, S = n.params.loop ? -r.length : 0, h = n.params.loop ? r.length * 2 : r.length, g = [];
|
|
59
|
+
for (let o = S; o < h; o += 1)
|
|
60
|
+
o >= l && o <= d && g.push(r[t(o)]);
|
|
61
|
+
return g.map((o, i) => /* @__PURE__ */ a.cloneElement(o, {
|
|
62
|
+
swiper: n,
|
|
63
|
+
style: p,
|
|
64
|
+
key: o.props.virtualIndex || o.key || `slide-${i}`
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function O(n, r) {
|
|
68
|
+
return typeof window > "u" ? _(n, r) : Q(n, r);
|
|
69
|
+
}
|
|
70
|
+
const B = /* @__PURE__ */ q(null), ge = () => X(B), ue = /* @__PURE__ */ q(null), pe = /* @__PURE__ */ W(function(n, r) {
|
|
71
|
+
let {
|
|
72
|
+
className: s,
|
|
73
|
+
tag: t = "div",
|
|
74
|
+
wrapperTag: p = "div",
|
|
75
|
+
children: l,
|
|
76
|
+
onSwiper: d,
|
|
77
|
+
...S
|
|
78
|
+
} = n === void 0 ? {} : n, h = !1;
|
|
79
|
+
const [g, o] = P("swiper"), [i, m] = P(null), [C, R] = P(!1), z = u(!1), w = u(null), e = u(null), x = u(null), $ = u(null), I = u(null), b = u(null), N = u(null), L = u(null), {
|
|
80
|
+
params: f,
|
|
81
|
+
passedParams: T,
|
|
82
|
+
rest: G,
|
|
83
|
+
events: v
|
|
84
|
+
} = Z(S), {
|
|
85
|
+
slides: y,
|
|
86
|
+
slots: j
|
|
87
|
+
} = le(l), A = () => {
|
|
88
|
+
R(!C);
|
|
89
|
+
};
|
|
90
|
+
Object.assign(f.on, {
|
|
91
|
+
_containerClasses(c, E) {
|
|
92
|
+
o(E);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const V = () => {
|
|
96
|
+
Object.assign(f.on, v), h = !0;
|
|
97
|
+
const c = {
|
|
98
|
+
...f
|
|
99
|
+
};
|
|
100
|
+
if (delete c.wrapperClass, e.current = new Y(c), e.current.virtual && e.current.params.virtual.enabled) {
|
|
101
|
+
e.current.virtual.slides = y;
|
|
102
|
+
const E = {
|
|
103
|
+
cache: !1,
|
|
104
|
+
slides: y,
|
|
105
|
+
renderExternal: m,
|
|
106
|
+
renderExternalUpdate: !1
|
|
107
|
+
};
|
|
108
|
+
F(e.current.params.virtual, E), F(e.current.originalParams.virtual, E);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
w.current || V(), e.current && e.current.on("_beforeBreakpoint", A);
|
|
112
|
+
const J = () => {
|
|
113
|
+
h || !v || !e.current || Object.keys(v).forEach((c) => {
|
|
114
|
+
e.current.on(c, v[c]);
|
|
115
|
+
});
|
|
116
|
+
}, K = () => {
|
|
117
|
+
!v || !e.current || Object.keys(v).forEach((c) => {
|
|
118
|
+
e.current.off(c, v[c]);
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
_(() => () => {
|
|
122
|
+
e.current && e.current.off("_beforeBreakpoint", A);
|
|
123
|
+
}), _(() => {
|
|
124
|
+
!z.current && e.current && (e.current.emitSlidesClasses(), z.current = !0);
|
|
125
|
+
}), O(() => {
|
|
126
|
+
if (r && (r.current = w.current), !!w.current)
|
|
127
|
+
return e.current.destroyed && V(), ee({
|
|
128
|
+
el: w.current,
|
|
129
|
+
nextEl: I.current,
|
|
130
|
+
prevEl: b.current,
|
|
131
|
+
paginationEl: N.current,
|
|
132
|
+
scrollbarEl: L.current,
|
|
133
|
+
swiper: e.current
|
|
134
|
+
}, f), d && !e.current.destroyed && d(e.current), () => {
|
|
135
|
+
e.current && !e.current.destroyed && e.current.destroy(!0, !1);
|
|
136
|
+
};
|
|
137
|
+
}, []), O(() => {
|
|
138
|
+
J();
|
|
139
|
+
const c = re(T, x.current, y, $.current, (E) => E.key);
|
|
140
|
+
return x.current = T, $.current = y, c.length && e.current && !e.current.destroyed && oe({
|
|
141
|
+
swiper: e.current,
|
|
142
|
+
slides: y,
|
|
143
|
+
passedParams: T,
|
|
144
|
+
changedParams: c,
|
|
145
|
+
nextEl: I.current,
|
|
146
|
+
prevEl: b.current,
|
|
147
|
+
scrollbarEl: L.current,
|
|
148
|
+
paginationEl: N.current
|
|
149
|
+
}), () => {
|
|
150
|
+
K();
|
|
151
|
+
};
|
|
152
|
+
}), O(() => {
|
|
153
|
+
te(e.current);
|
|
154
|
+
}, [i]);
|
|
155
|
+
function M() {
|
|
156
|
+
return f.virtual ? ce(e.current, y, i) : y.map((c, E) => /* @__PURE__ */ a.cloneElement(c, {
|
|
157
|
+
swiper: e.current,
|
|
158
|
+
swiperSlideIndex: E
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
return /* @__PURE__ */ a.createElement(t, k({
|
|
162
|
+
ref: w,
|
|
163
|
+
className: D(`${g}${s ? ` ${s}` : ""}`)
|
|
164
|
+
}, G), /* @__PURE__ */ a.createElement(ue.Provider, {
|
|
165
|
+
value: e.current
|
|
166
|
+
}, j["container-start"], /* @__PURE__ */ a.createElement(p, {
|
|
167
|
+
className: ne(f.wrapperClass)
|
|
168
|
+
}, j["wrapper-start"], M(), j["wrapper-end"]), se(f) && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", {
|
|
169
|
+
ref: b,
|
|
170
|
+
className: "swiper-button-prev"
|
|
171
|
+
}), /* @__PURE__ */ a.createElement("div", {
|
|
172
|
+
ref: I,
|
|
173
|
+
className: "swiper-button-next"
|
|
174
|
+
})), ae(f) && /* @__PURE__ */ a.createElement("div", {
|
|
175
|
+
ref: L,
|
|
176
|
+
className: "swiper-scrollbar"
|
|
177
|
+
}), ie(f) && /* @__PURE__ */ a.createElement("div", {
|
|
178
|
+
ref: N,
|
|
179
|
+
className: "swiper-pagination"
|
|
180
|
+
}), j["container-end"]));
|
|
181
|
+
});
|
|
182
|
+
pe.displayName = "Swiper";
|
|
183
|
+
const de = /* @__PURE__ */ W(function(n, r) {
|
|
184
|
+
let {
|
|
185
|
+
tag: s = "div",
|
|
186
|
+
children: t,
|
|
187
|
+
className: p = "",
|
|
188
|
+
swiper: l,
|
|
189
|
+
zoom: d,
|
|
190
|
+
lazy: S,
|
|
191
|
+
virtualIndex: h,
|
|
192
|
+
swiperSlideIndex: g,
|
|
193
|
+
...o
|
|
194
|
+
} = n === void 0 ? {} : n;
|
|
195
|
+
const i = u(null), [m, C] = P("swiper-slide"), [R, z] = P(!1);
|
|
196
|
+
function w(I, b, N) {
|
|
197
|
+
b === i.current && C(N);
|
|
198
|
+
}
|
|
199
|
+
O(() => {
|
|
200
|
+
if (typeof g < "u" && (i.current.swiperSlideIndex = g), r && (r.current = i.current), !(!i.current || !l)) {
|
|
201
|
+
if (l.destroyed) {
|
|
202
|
+
m !== "swiper-slide" && C("swiper-slide");
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
return l.on("_slideClass", w), () => {
|
|
206
|
+
l && l.off("_slideClass", w);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}), O(() => {
|
|
210
|
+
l && i.current && !l.destroyed && C(l.getSlideClasses(i.current));
|
|
211
|
+
}, [l]);
|
|
212
|
+
const e = {
|
|
213
|
+
isActive: m.indexOf("swiper-slide-active") >= 0,
|
|
214
|
+
isVisible: m.indexOf("swiper-slide-visible") >= 0,
|
|
215
|
+
isPrev: m.indexOf("swiper-slide-prev") >= 0,
|
|
216
|
+
isNext: m.indexOf("swiper-slide-next") >= 0
|
|
217
|
+
}, x = () => typeof t == "function" ? t(e) : t, $ = () => {
|
|
218
|
+
z(!0);
|
|
219
|
+
};
|
|
220
|
+
return /* @__PURE__ */ a.createElement(s, k({
|
|
221
|
+
ref: i,
|
|
222
|
+
className: D(`${m}${p ? ` ${p}` : ""}`),
|
|
223
|
+
"data-swiper-slide-index": h,
|
|
224
|
+
onLoad: $
|
|
225
|
+
}, o), d && /* @__PURE__ */ a.createElement(B.Provider, {
|
|
226
|
+
value: e
|
|
227
|
+
}, /* @__PURE__ */ a.createElement("div", {
|
|
228
|
+
className: "swiper-zoom-container",
|
|
229
|
+
"data-swiper-zoom": typeof d == "number" ? d : void 0
|
|
230
|
+
}, x(), S && !R && /* @__PURE__ */ a.createElement("div", {
|
|
231
|
+
className: "swiper-lazy-preloader"
|
|
232
|
+
}))), !d && /* @__PURE__ */ a.createElement(B.Provider, {
|
|
233
|
+
value: e
|
|
234
|
+
}, x(), S && !R && /* @__PURE__ */ a.createElement("div", {
|
|
235
|
+
className: "swiper-lazy-preloader"
|
|
236
|
+
})));
|
|
237
|
+
});
|
|
238
|
+
de.displayName = "SwiperSlide";
|
|
13
239
|
export {
|
|
14
|
-
|
|
240
|
+
pe as Swiper,
|
|
241
|
+
de as SwiperSlide,
|
|
242
|
+
ge as useSwiperSlide
|
|
15
243
|
};
|
package/index141.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";const n=require("react/jsx-runtime"),d=require("./index140.js"),a=require("./index25.js"),m=require("./index3.js"),h=r=>{const{themeName:e,title:t,tokens:c,id:o,children:l}=r,{isActive:u,isVisible:i}=d.useSwiperSlide(),s={...c,isActive:u,isVisible:i};return n.jsxs(a.default,{themeName:`${e}.container`,tokens:s,...i?{}:{inert:"true"},children:[t&&n.jsx(m.default,{themeName:`${e}.title`,tokens:s,id:o,children:t}),l]})};module.exports=h;
|
package/index141.mjs
CHANGED
|
@@ -1,32 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}), v = o[t], n = t === p, { title: r, id: x } = v, a = r && r.length > 0;
|
|
13
|
-
return /* @__PURE__ */ h(
|
|
14
|
-
g,
|
|
15
|
-
{
|
|
16
|
-
as: "button",
|
|
17
|
-
tabIndex: 0,
|
|
18
|
-
role: "button",
|
|
19
|
-
"aria-current": n ? "true" : "false",
|
|
20
|
-
"aria-disabled": n,
|
|
21
|
-
"aria-label": a ? void 0 : `${t + 1} / ${o.length}`,
|
|
22
|
-
"aria-labelledby": a ? x : void 0,
|
|
23
|
-
...b,
|
|
24
|
-
...f,
|
|
25
|
-
themeName: `${l}.bullet`,
|
|
26
|
-
tokens: { ...u, active: n }
|
|
27
|
-
}
|
|
28
|
-
);
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useSwiperSlide as d } from "./index140.mjs";
|
|
4
|
+
import p from "./index25.mjs";
|
|
5
|
+
import h from "./index3.mjs";
|
|
6
|
+
const S = (r) => {
|
|
7
|
+
const { themeName: e, title: t, tokens: s, id: n, children: m } = r, { isActive: l, isVisible: o } = d(), i = { ...s, isActive: l, isVisible: o };
|
|
8
|
+
return /* @__PURE__ */ c(p, { themeName: `${e}.container`, tokens: i, ...o ? {} : { inert: "true" }, children: [
|
|
9
|
+
t && /* @__PURE__ */ a(h, { themeName: `${e}.title`, tokens: i, id: n, children: t }),
|
|
10
|
+
m
|
|
11
|
+
] });
|
|
29
12
|
};
|
|
30
13
|
export {
|
|
31
|
-
|
|
14
|
+
S as default
|
|
32
15
|
};
|
package/index142.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const P=require("react/jsx-runtime"),o=require("react-aria"),k=require("./index71.js"),m=require("./index6.js"),w=d=>{const{themeName:l,tokens:c,slides:i,activeIndex:x,index:t}=d,{controller:e}=k.useSwiperController(),s=o.useFocusManager(),p=t===0?i.length-1:t-1,b=t===i.length-1?0:t+1,{keyboardProps:v}=o.useKeyboard({onKeyUp:n=>{n.key==="ArrowLeft"&&(n.preventDefault(),s==null||s.focusPrevious({wrap:!0}),e==null||e.slideTo(p)),n.key==="ArrowRight"&&(n.preventDefault(),s==null||s.focusNext({wrap:!0}),e==null||e.slideTo(b))}}),{pressProps:h}=o.usePress({onPress:()=>e==null?void 0:e.slideTo(t)}),f=i[t],r=t===x,{title:a,id:y}=f,u=a&&a.length>0;return P.jsx(m.default,{as:"button",tabIndex:0,role:"button","aria-current":r?"true":"false","aria-disabled":r,"aria-label":u?void 0:`${t+1} / ${i.length}`,"aria-labelledby":u?y:void 0,...v,...h,themeName:`${l}.bullet`,tokens:{...c,active:r}})};module.exports=w;
|
package/index142.mjs
CHANGED
|
@@ -1,54 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
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
|
-
if (n)
|
|
31
|
-
return n.forEach((e) => e(t)), t;
|
|
32
|
-
let f = d.get(t);
|
|
33
|
-
return f ? (f.forEach((e) => e(r)), r) : t;
|
|
34
|
-
}
|
|
35
|
-
function v(r = []) {
|
|
36
|
-
let t = m(), [n, f] = o(t), e = l(() => {
|
|
37
|
-
f(function* () {
|
|
38
|
-
yield t, yield document.getElementById(t) ? t : void 0;
|
|
39
|
-
});
|
|
40
|
-
}, [
|
|
41
|
-
t,
|
|
42
|
-
f
|
|
43
|
-
]);
|
|
44
|
-
return a(e, [
|
|
45
|
-
t,
|
|
46
|
-
e,
|
|
47
|
-
...r
|
|
48
|
-
]), n;
|
|
49
|
-
}
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { useFocusManager as y, useKeyboard as P, usePress as k } from "react-aria";
|
|
3
|
+
import { useSwiperController as w } from "./index71.mjs";
|
|
4
|
+
import g from "./index6.mjs";
|
|
5
|
+
const N = (d) => {
|
|
6
|
+
const { themeName: l, tokens: u, slides: o, activeIndex: p, index: t } = d, { controller: e } = w(), s = y(), m = t === 0 ? o.length - 1 : t - 1, c = t === o.length - 1 ? 0 : t + 1, { keyboardProps: b } = P({
|
|
7
|
+
onKeyUp: (i) => {
|
|
8
|
+
i.key === "ArrowLeft" && (i.preventDefault(), s == null || s.focusPrevious({ wrap: !0 }), e == null || e.slideTo(m)), i.key === "ArrowRight" && (i.preventDefault(), s == null || s.focusNext({ wrap: !0 }), e == null || e.slideTo(c));
|
|
9
|
+
}
|
|
10
|
+
}), { pressProps: f } = k({
|
|
11
|
+
onPress: () => e == null ? void 0 : e.slideTo(t)
|
|
12
|
+
}), v = o[t], n = t === p, { title: r, id: x } = v, a = r && r.length > 0;
|
|
13
|
+
return /* @__PURE__ */ h(
|
|
14
|
+
g,
|
|
15
|
+
{
|
|
16
|
+
as: "button",
|
|
17
|
+
tabIndex: 0,
|
|
18
|
+
role: "button",
|
|
19
|
+
"aria-current": n ? "true" : "false",
|
|
20
|
+
"aria-disabled": n,
|
|
21
|
+
"aria-label": a ? void 0 : `${t + 1} / ${o.length}`,
|
|
22
|
+
"aria-labelledby": a ? x : void 0,
|
|
23
|
+
...b,
|
|
24
|
+
...f,
|
|
25
|
+
themeName: `${l}.bullet`,
|
|
26
|
+
tokens: { ...u, active: n }
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
50
30
|
export {
|
|
51
|
-
|
|
52
|
-
m as useId,
|
|
53
|
-
v as useSlotId
|
|
31
|
+
N as default
|
|
54
32
|
};
|
package/index143.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index172.js"),a=require("./index327.js"),f=require("react"),i=require("./index326.js");let b=!!(typeof window<"u"&&window.document&&window.document.createElement),n=new Map;function o(u){let[t,c]=f.useState(u),r=f.useRef(null),e=i.useSSRSafeId(t),s=f.useCallback(l=>{r.current=l},[]);return b&&(n.has(e)&&!n.get(e).includes(s)?n.set(e,[...n.get(e),s]):n.set(e,[s])),d.useLayoutEffect(()=>{let l=e;return()=>{n.delete(l)}},[e]),f.useEffect(()=>{let l=r.current;l&&(r.current=null,c(l))}),e}function $(u,t){if(u===t)return u;let c=n.get(u);if(c)return c.forEach(e=>e(t)),t;let r=n.get(t);return r?(r.forEach(e=>e(u)),u):t}function I(u=[]){let t=o(),[c,r]=a.useValueEffect(t),e=f.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return d.useLayoutEffect(e,[t,e,...u]),c}exports.mergeIds=$;exports.useId=o;exports.useSlotId=I;
|
package/index143.mjs
CHANGED
|
@@ -1,14 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import l from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return
|
|
11
|
-
|
|
1
|
+
import { useLayoutEffect as a } from "./index172.mjs";
|
|
2
|
+
import { useValueEffect as o } from "./index327.mjs";
|
|
3
|
+
import { useState as s, useRef as $, useCallback as l, useEffect as b } from "react";
|
|
4
|
+
import { useSSRSafeId as p } from "./index326.mjs";
|
|
5
|
+
let i = !!(typeof window < "u" && window.document && window.document.createElement), d = /* @__PURE__ */ new Map();
|
|
6
|
+
function m(r) {
|
|
7
|
+
let [t, n] = s(r), f = $(null), e = p(t), c = l((u) => {
|
|
8
|
+
f.current = u;
|
|
9
|
+
}, []);
|
|
10
|
+
return i && (d.has(e) && !d.get(e).includes(c) ? d.set(e, [
|
|
11
|
+
...d.get(e),
|
|
12
|
+
c
|
|
13
|
+
]) : d.set(e, [
|
|
14
|
+
c
|
|
15
|
+
])), a(() => {
|
|
16
|
+
let u = e;
|
|
17
|
+
return () => {
|
|
18
|
+
d.delete(u);
|
|
19
|
+
};
|
|
20
|
+
}, [
|
|
21
|
+
e
|
|
22
|
+
]), b(() => {
|
|
23
|
+
let u = f.current;
|
|
24
|
+
u && (f.current = null, n(u));
|
|
25
|
+
}), e;
|
|
26
|
+
}
|
|
27
|
+
function g(r, t) {
|
|
28
|
+
if (r === t) return r;
|
|
29
|
+
let n = d.get(r);
|
|
30
|
+
if (n)
|
|
31
|
+
return n.forEach((e) => e(t)), t;
|
|
32
|
+
let f = d.get(t);
|
|
33
|
+
return f ? (f.forEach((e) => e(r)), r) : t;
|
|
34
|
+
}
|
|
35
|
+
function v(r = []) {
|
|
36
|
+
let t = m(), [n, f] = o(t), e = l(() => {
|
|
37
|
+
f(function* () {
|
|
38
|
+
yield t, yield document.getElementById(t) ? t : void 0;
|
|
39
|
+
});
|
|
40
|
+
}, [
|
|
41
|
+
t,
|
|
42
|
+
f
|
|
43
|
+
]);
|
|
44
|
+
return a(e, [
|
|
45
|
+
t,
|
|
46
|
+
e,
|
|
47
|
+
...r
|
|
48
|
+
]), n;
|
|
49
|
+
}
|
|
12
50
|
export {
|
|
13
|
-
|
|
51
|
+
g as mergeIds,
|
|
52
|
+
m as useId,
|
|
53
|
+
v as useSlotId
|
|
14
54
|
};
|
package/index145.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index323.js"),P=require("./index314.js"),y=require("./index318.js"),f=require("./index320.js"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index323.js"),P=require("./index314.js"),y=require("./index318.js"),f=require("./index320.js"),v=require("./index158.js"),b=require("./index172.js");function m(i,e){let{triggerRef:l,popoverRef:r,isNonModal:s,isKeyboardDismissDisabled:n,shouldCloseOnInteractOutside:a,...o}=i,{overlayProps:t,underlayProps:u}=y.useOverlay({isOpen:e.isOpen&&!o["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!s,isKeyboardDismissDisabled:n,shouldCloseOnInteractOutside:a},r),{overlayProps:p,arrowProps:d,placement:c}=P.useOverlayPosition({...o,targetRef:l,overlayRef:r,isOpen:e.isOpen,onClose:s?e.close:void 0});return f.usePreventScroll({isDisabled:s||!e.isOpen}),b.useLayoutEffect(()=>{if(e.isOpen&&!s&&r.current)return O.ariaHideOutside([r.current])},[s,e.isOpen,r]),{popoverProps:v.mergeProps(t,p),arrowProps:d,underlayProps:u,placement:c}}exports.usePopover=m;
|
package/index145.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { ariaHideOutside as u } from "./index323.mjs";
|
|
|
2
2
|
import { useOverlayPosition as $ } from "./index314.mjs";
|
|
3
3
|
import { useOverlay as m } from "./index318.mjs";
|
|
4
4
|
import { usePreventScroll as O } from "./index320.mjs";
|
|
5
|
-
import { mergeProps as b } from "./
|
|
5
|
+
import { mergeProps as b } from "./index158.mjs";
|
|
6
6
|
import { useLayoutEffect as P } from "./index172.mjs";
|
|
7
7
|
function R(a, e) {
|
|
8
8
|
let { triggerRef: i, popoverRef: r, isNonModal: o, isKeyboardDismissDisabled: p, shouldCloseOnInteractOutside: d, ...s } = a, { overlayProps: l, underlayProps: t } = m({
|
package/index147.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./index148.js"),A=require("./index168.js"),G=require("./index169.js"),J=require("./index170.js"),Q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./index148.js"),A=require("./index168.js"),G=require("./index169.js"),J=require("./index170.js"),Q=require("./index143.js"),X=require("./index158.js"),Y=require("./index171.js"),g=require("./index172.js"),ee=require("./index173.js"),R=require("./index174.js"),P=require("./index175.js"),re=require("./index176.js"),te=require("./index177.js"),u=require("react"),p=require("@react-aria/i18n"),ae=require("./index178.js");function ie(r,t,n){let l=u.useRef(""),{locale:x}=p.useLocale(),M=A.useDisplayNames(),{ariaLabel:D,ariaLabelledBy:V,ariaDescribedBy:w,focusManager:c}=z.hookData.get(t),f=r.isPlaceholder?"":r.text,h=u.useMemo(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),T=p.useDateFormatter({month:"long",timeZone:h.timeZone}),k=p.useDateFormatter({hour:"numeric",hour12:h.hour12,timeZone:h.timeZone});if(r.type==="month"&&!r.isPlaceholder){let e=T.format(t.dateValue);f=e!==f?`${f} – ${e}`:e}else r.type==="hour"&&!r.isPlaceholder&&(f=k.format(t.dateValue));let{spinButtonProps:I}=ae.useSpinButton({value:r.value,textValue:f,minValue:r.minValue,maxValue:r.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!r.isEditable,isRequired:t.isRequired,onIncrement:()=>{l.current="",t.increment(r.type)},onDecrement:()=>{l.current="",t.decrement(r.type)},onIncrementPage:()=>{l.current="",t.incrementPage(r.type)},onDecrementPage:()=>{l.current="",t.decrementPage(r.type)},onIncrementToMax:()=>{l.current="",r.maxValue!==void 0&&t.setSegment(r.type,r.maxValue)},onDecrementToMin:()=>{l.current="",r.minValue!==void 0&&t.setSegment(r.type,r.minValue)}}),d=u.useMemo(()=>new te.NumberParser(x,{maximumFractionDigits:0}),[x]),S=()=>{if(r.text===r.placeholder&&c.focusPrevious(),d.isValidPartialNumber(r.text)&&!t.isReadOnly&&!r.isPlaceholder){let e=r.text.slice(0,-1),a=d.parse(e);e=a===0?"":e,e.length===0||a===0?t.clearSegment(r.type):t.setSegment(r.type,a),l.current=e}else r.type==="dayPeriod"&&t.clearSegment(r.type)},O=e=>{if(e.key==="a"&&(R.isMac()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),S();break}},{startsWith:m}=p.useFilter({sensitivity:"base"}),y=p.useDateFormatter({hour:"numeric",hour12:!0}),q=u.useMemo(()=>{let e=new Date;return e.setHours(0),y.formatToParts(e).find(a=>a.type==="dayPeriod").value},[y]),C=u.useMemo(()=>{let e=new Date;return e.setHours(12),y.formatToParts(e).find(a=>a.type==="dayPeriod").value},[y]),F=p.useDateFormatter({year:"numeric",era:"narrow",timeZone:"UTC"}),$=u.useMemo(()=>{if(r.type!=="era")return[];let e=J.toCalendar(new G.CalendarDate(1,1,1),t.calendar),a=t.calendar.getEras().map(o=>{let b=e.set({year:1,month:1,day:1,era:o}).toDate("UTC"),_=F.formatToParts(b).find(j=>j.type==="era").value;return{era:o,formatted:_}}),i=ne(a.map(o=>o.formatted));if(i)for(let o of a)o.formatted=o.formatted.slice(i);return a},[F,t.calendar,r.type]),N=e=>{if(t.isDisabled||t.isReadOnly)return;let a=l.current+e;switch(r.type){case"dayPeriod":if(m(q,e))t.setSegment("dayPeriod",0);else if(m(C,e))t.setSegment("dayPeriod",12);else break;c.focusNext();break;case"era":{let i=$.find(o=>m(o.formatted,e));i&&(t.setSegment("era",i.era),c.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!d.isValidPartialNumber(a))return;let i=d.parse(a),o=i,b=r.minValue===0;if(r.type==="hour"&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":i>11&&(o=d.parse(e));break;case"h12":b=!1,i>12&&(o=d.parse(e));break}r.value!==void 0&&r.value>=12&&i>1&&(i+=12)}else r.maxValue!==void 0&&i>r.maxValue&&(o=d.parse(e));if(isNaN(i))return;let v=o!==0||b;v&&t.setSegment(r.type,o),r.maxValue!==void 0&&(+(i+"0")>r.maxValue||a.length>=String(r.maxValue).length)?(l.current="",v&&c.focusNext()):l.current=a;break}}},L=()=>{l.current="",n.current&&re.scrollIntoViewport(n.current,{containingElement:ee.getScrollParent(n.current)});let e=window.getSelection();e==null||e.collapse(n.current)},B=u.useRef(typeof document<"u"?document:null);P.useEvent(B,"selectionchange",()=>{var e;let a=window.getSelection();a!=null&&a.anchorNode&&(!((e=n.current)===null||e===void 0)&&e.contains(a==null?void 0:a.anchorNode))&&a.collapse(n.current)});let E=u.useRef("");P.useEvent(n,"beforeinput",e=>{if(n.current)switch(e.preventDefault(),e.inputType){case"deleteContentBackward":case"deleteContentForward":d.isValidPartialNumber(r.text)&&!t.isReadOnly&&S();break;case"insertCompositionText":E.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:e.data!=null&&N(e.data);break}}),P.useEvent(n,"input",e=>{let{inputType:a,data:i}=e;switch(a){case"insertCompositionText":n.current&&(n.current.textContent=E.current),i!=null&&(m(q,i)||m(C,i))&&N(i);break}}),g.useLayoutEffect(()=>{let e=n.current;return()=>{document.activeElement===e&&(c.focusPrevious()||c.focusNext())}},[n,c]);let K=R.isIOS()||r.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},Z=u.useMemo(()=>t.segments.find(e=>e.isEditable),[t.segments]);r!==Z&&!t.isInvalid&&(w=void 0);let H=Q.useId(),s=!t.isDisabled&&!t.isReadOnly&&r.isEditable,W=r.type==="literal"?"":M.of(r.type),U=Y.useLabels({"aria-label":`${W}${D?`, ${D}`:""}${V?", ":""}`,"aria-labelledby":V});return r.type==="literal"?{segmentProps:{"aria-hidden":!0}}:{segmentProps:X.mergeProps(I,U,{id:H,...K,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":w,"aria-readonly":t.isReadOnly||!r.isEditable?"true":void 0,"data-placeholder":r.isPlaceholder||void 0,contentEditable:s,suppressContentEditableWarning:s,spellCheck:s?"false":void 0,autoCorrect:s?"off":void 0,[parseInt(u.version,10)>=17?"enterKeyHint":"enterkeyhint"]:s?"next":void 0,inputMode:t.isDisabled||r.type==="dayPeriod"||r.type==="era"||!s?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:O,onFocus:L,style:{caretColor:"transparent"},onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}function ne(r){r.sort();let t=r[0],n=r[r.length-1];for(let l=0;l<t.length;l++)if(t[l]!==n[l])return l;return 0}exports.useDateSegment=ie;
|
package/index147.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { hookData as z } from "./index148.mjs";
|
|
|
2
2
|
import { useDisplayNames as A } from "./index168.mjs";
|
|
3
3
|
import { CalendarDate as G } from "./index169.mjs";
|
|
4
4
|
import { toCalendar as J } from "./index170.mjs";
|
|
5
|
-
import { useId as Q } from "./
|
|
6
|
-
import { mergeProps as X } from "./
|
|
5
|
+
import { useId as Q } from "./index143.mjs";
|
|
6
|
+
import { mergeProps as X } from "./index158.mjs";
|
|
7
7
|
import { useLabels as Y } from "./index171.mjs";
|
|
8
8
|
import { useLayoutEffect as g } from "./index172.mjs";
|
|
9
9
|
import { getScrollParent as ee } from "./index173.mjs";
|
package/index148.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index163.js"),K=require("./index164.js"),V=require("@react-aria/focus"),D=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./index163.js"),K=require("./index164.js"),V=require("@react-aria/focus"),D=require("./index158.js"),E=require("./index165.js"),O=require("./index166.js"),C=require("./index179.js"),l=require("react"),G=require("./index167.js"),I=require("./index162.js"),j=require("./index159.js"),L=require("@react-aria/i18n");function T(e){return e&&e.__esModule?e.default:e}const F=new WeakMap,t="__role_"+Date.now(),h="__focusManager_"+Date.now();function U(e,i,s){var u;let{isInvalid:f,validationErrors:b,validationDetails:M}=i.displayValidation,{labelProps:v,fieldProps:c,descriptionProps:p,errorMessageProps:q}=G.useField({...e,labelElementType:"span",isInvalid:f,errorMessage:e.errorMessage||b}),P=l.useRef(null),{focusWithinProps:_}=I.useFocusWithin({...e,onFocusWithin(r){var o;P.current=i.value,(o=e.onFocus)===null||o===void 0||o.call(e,r)},onBlurWithin:r=>{var o;i.confirmPlaceholder(),i.value!==P.current&&i.commitValidation(),(o=e.onBlur)===null||o===void 0||o.call(e,r)},onFocusWithinChange:e.onFocusChange}),$=L.useLocalizedStringFormatter(T(w),"@react-aria/datepicker"),B=i.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",R=i.maxGranularity==="hour"?"time":"date",W=i.value?$.format(B,{[R]:i.formatValue({month:"long"})}):"",x=O.useDescription(W),m=e[t]==="presentation"?c["aria-describedby"]:[x["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,g=e[h],n=l.useMemo(()=>g||V.createFocusManager(s),[g,s]),S=K.useDatePickerGroup(i,s,e[t]==="presentation");F.set(i,{ariaLabel:e["aria-label"],ariaLabelledBy:[v.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:m,focusManager:n});let y=l.useRef(e.autoFocus),d;e[t]==="presentation"?d={role:"presentation"}:d=D.mergeProps(c,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":m}),l.useEffect(()=>{y.current&&n.focusFirst(),y.current=!1},[n]),C.useFormReset(e.inputRef,i.value,i.setValue),j.useFormValidation({...e,focus(){n.focusFirst()}},i,e.inputRef);let a={type:"hidden",name:e.name,value:((u=i.value)===null||u===void 0?void 0:u.toString())||"",disabled:e.isDisabled};e.validationBehavior==="native"&&(a.type="text",a.hidden=!0,a.required=e.isRequired,a.onChange=()=>{});let k=E.filterDOMProps(e);return{labelProps:{...v,onClick:()=>{n.focusFirst()}},fieldProps:D.mergeProps(k,d,S,_,{onKeyDown(r){e.onKeyDown&&e.onKeyDown(r)},onKeyUp(r){e.onKeyUp&&e.onKeyUp(r)}}),inputProps:a,descriptionProps:p,errorMessageProps:q,isInvalid:f,validationErrors:b,validationDetails:M}}exports.focusManagerSymbol=h;exports.hookData=F;exports.roleSymbol=t;exports.useDateField=U;
|
package/index148.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import R from "./index163.mjs";
|
|
2
2
|
import { useDatePickerGroup as k } from "./index164.mjs";
|
|
3
3
|
import { createFocusManager as E } from "@react-aria/focus";
|
|
4
|
-
import { mergeProps as P } from "./
|
|
4
|
+
import { mergeProps as P } from "./index158.mjs";
|
|
5
5
|
import { filterDOMProps as V } from "./index165.mjs";
|
|
6
6
|
import { useDescription as C } from "./index166.mjs";
|
|
7
7
|
import { useFormReset as I } from "./index179.mjs";
|
|
8
8
|
import { useRef as g, useMemo as S, useEffect as G } from "react";
|
|
9
9
|
import { useField as L } from "./index167.mjs";
|
|
10
|
-
import { useFocusWithin as O } from "./
|
|
11
|
-
import { useFormValidation as U } from "./
|
|
10
|
+
import { useFocusWithin as O } from "./index162.mjs";
|
|
11
|
+
import { useFormValidation as U } from "./index159.mjs";
|
|
12
12
|
import { useLocalizedStringFormatter as j } from "@react-aria/i18n";
|
|
13
13
|
function q(e) {
|
|
14
14
|
return e && e.__esModule ? e.default : e;
|
package/index149.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index180.js"),te=require("./index183.js"),le=require("./index184.js"),J=require("./index170.js"),Q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index180.js"),te=require("./index183.js"),le=require("./index184.js"),J=require("./index170.js"),Q=require("./index153.js"),E=require("./index181.js"),re=require("./index156.js"),ne=require("./index157.js"),s=require("react"),k={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},W={year:5,month:2,day:7,hour:2,minute:15,second:15},ie={dayperiod:"dayPeriod"};function ue(a){let{locale:l,createCalendar:i,hideTimeZone:d,isDisabled:y=!1,isReadOnly:v=!1,isRequired:I=!1,minValue:R,maxValue:T,isDateUnavailable:_}=a,V=a.value||a.defaultValue||a.placeholderValue||null,[h,g]=m.useDefaultProps(V,a.granularity),Z=g||"UTC";if(V&&!(h in V))throw new Error("Invalid granularity "+h+" for value "+V.toString());let K=s.useMemo(()=>new E.DateFormatter(l),[l]),u=s.useMemo(()=>i(K.resolvedOptions().calendar),[i,K]);var C;let[O,j]=ne.useControlledState(a.value,(C=a.defaultValue)!==null&&C!==void 0?C:null,a.onChange),S=s.useMemo(()=>{var e;return(e=m.convertValue(O,u))!==null&&e!==void 0?e:null},[O,u]),[L,w]=s.useState(()=>m.createPlaceholderDate(a.placeholderValue,h,u,g)),X=S||L,U=u.identifier==="gregory"&&X.era==="BC",M=s.useMemo(()=>{var e;return{granularity:h,maxGranularity:(e=a.maxGranularity)!==null&&e!==void 0?e:"year",timeZone:g,hideTimeZone:d,hourCycle:a.hourCycle,showEra:U,shouldForceLeadingZeros:a.shouldForceLeadingZeros}},[a.maxGranularity,h,a.hourCycle,a.shouldForceLeadingZeros,g,d,U]),Y=s.useMemo(()=>m.getFormatOptions({},M),[M]),D=s.useMemo(()=>new E.DateFormatter(l,Y),[l,Y]),x=s.useMemo(()=>D.resolvedOptions(),[D]),c=s.useMemo(()=>D.formatToParts(new Date).filter(e=>k[e.type]).reduce((e,r)=>(e[r.type]=!0,e),{}),[D]),[t,P]=s.useState(()=>a.value||a.defaultValue?{...c}:{}),q=s.useRef(null),A=s.useRef(u.identifier);s.useEffect(()=>{u.identifier!==A.current&&(A.current=u.identifier,w(e=>Object.keys(t).length>0?J.toCalendar(e,u):m.createPlaceholderDate(a.placeholderValue,h,u,g)))},[u,h,t,g,a.placeholderValue]),O&&Object.keys(t).length<Object.keys(c).length&&(t={...c},P(t)),O==null&&Object.keys(t).length===Object.keys(c).length&&(t={},P(t),w(m.createPlaceholderDate(a.placeholderValue,h,u,g)));let n=S&&Object.keys(t).length>=Object.keys(c).length?S:L,b=e=>{if(a.isDisabled||a.isReadOnly)return;let r=Object.keys(t),o=Object.keys(c);e==null?(j(null),w(m.createPlaceholderDate(a.placeholderValue,h,u,g)),P({})):r.length>=o.length||r.length===o.length-1&&c.dayPeriod&&!t.dayPeriod&&q.current!=="dayPeriod"?(e=J.toCalendar(e,(V==null?void 0:V.calendar)||new le.GregorianCalendar),j(e)):w(e),q.current=null},$=s.useMemo(()=>n.toDate(Z),[n,Z]),p=s.useMemo(()=>D.formatToParts($).map(e=>{let r=k[e.type];e.type==="era"&&u.getEras().length===1&&(r=!1);let o=k[e.type]&&!t[e.type],f=k[e.type]?te.getPlaceholder(e.type,e.value,l):null;return{type:ie[e.type]||e.type,text:o?f:e.value,...oe(n,e.type,x),isPlaceholder:o,placeholder:f,isEditable:r}}),[$,t,D,x,n,u,l]);c.era&&t.year&&!t.era?(t.era=!0,P({...t})):!c.era&&t.era&&(delete t.era,P({...t}));let B=e=>{t[e]=!0,e==="year"&&c.era&&(t.era=!0),P({...t})},F=(e,r)=>{if(t[e])b(se(n,e,r,x));else{B(e);let o=Object.keys(t),f=Object.keys(c);(o.length>=f.length||o.length===f.length-1&&c.dayPeriod&&!t.dayPeriod)&&b(n)}},ee=s.useMemo(()=>m.getValidationResult(O,R,T,_,M),[O,R,T,_,M]),N=re.useFormValidationState({...a,value:O,builtinValidation:ee}),z=N.displayValidation.isInvalid,ae=a.validationState||(z?"invalid":null);var G;return{...N,value:S,dateValue:$,calendar:u,setValue:b,segments:p,dateFormatter:D,validationState:ae,isInvalid:z,granularity:h,maxGranularity:(G=a.maxGranularity)!==null&&G!==void 0?G:"year",isDisabled:y,isReadOnly:v,isRequired:I,increment(e){F(e,1)},decrement(e){F(e,-1)},incrementPage(e){F(e,W[e]||1)},decrementPage(e){F(e,-(W[e]||1))},setSegment(e,r){B(e),b(ce(n,e,r,x))},confirmPlaceholder(){if(a.isDisabled||a.isReadOnly)return;let e=Object.keys(t),r=Object.keys(c);e.length===r.length-1&&c.dayPeriod&&!t.dayPeriod&&(t={...c},P(t),b(n.copy()))},clearSegment(e){delete t[e],q.current=e,P({...t});let r=m.createPlaceholderDate(a.placeholderValue,h,u,g),o=n;if(e==="dayPeriod"&&"hour"in n&&"hour"in r){let f=n.hour>=12,H=r.hour>=12;f&&!H?o=n.set({hour:n.hour-12}):!f&&H&&(o=n.set({hour:n.hour+12}))}else e in n&&(o=n.set({[e]:r[e]}));j(null),b(o)},formatValue(e){if(!S)return"";let r=m.getFormatOptions(e,M);return new E.DateFormatter(l,r).format($)},getDateFormatter(e,r){let o={...M,...r},f=m.getFormatOptions({},o);return new E.DateFormatter(e,f)}}}function oe(a,l,i){switch(l){case"era":{let d=a.calendar.getEras();return{value:d.indexOf(a.era),minValue:0,maxValue:d.length-1}}case"year":return{value:a.year,minValue:1,maxValue:a.calendar.getYearsInEra(a)};case"month":return{value:a.month,minValue:Q.getMinimumMonthInYear(a),maxValue:a.calendar.getMonthsInYear(a)};case"day":return{value:a.day,minValue:Q.getMinimumDayInMonth(a),maxValue:a.calendar.getDaysInMonth(a)}}if("hour"in a)switch(l){case"dayPeriod":return{value:a.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(i.hour12){let d=a.hour>=12;return{value:a.hour,minValue:d?12:0,maxValue:d?23:11}}return{value:a.hour,minValue:0,maxValue:23};case"minute":return{value:a.minute,minValue:0,maxValue:59};case"second":return{value:a.second,minValue:0,maxValue:59}}return{}}function se(a,l,i,d){switch(l){case"era":case"year":case"month":case"day":return a.cycle(l,i,{round:l==="year"})}if("hour"in a)switch(l){case"dayPeriod":{let y=a.hour,v=y>=12;return a.set({hour:v?y-12:y+12})}case"hour":case"minute":case"second":return a.cycle(l,i,{round:l!=="hour",hourCycle:d.hour12?12:24})}throw new Error("Unknown segment: "+l)}function ce(a,l,i,d){switch(l){case"day":case"month":case"year":case"era":return a.set({[l]:i})}if("hour"in a&&typeof i=="number")switch(l){case"dayPeriod":{let y=a.hour,v=y>=12;return i>=12===v?a:a.set({hour:v?y-12:y+12})}case"hour":if(d.hour12){let v=a.hour>=12;!v&&i===12&&(i=0),v&&i<12&&(i+=12)}case"minute":case"second":return a.set({[l]:i})}throw new Error("Unknown segment: "+l)}exports.useDateFieldState=ue;
|
package/index149.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { useDefaultProps as re, convertValue as ie, createPlaceholderDate as w,
|
|
|
2
2
|
import { getPlaceholder as ue } from "./index183.mjs";
|
|
3
3
|
import { GregorianCalendar as oe } from "./index184.mjs";
|
|
4
4
|
import { toCalendar as Q } from "./index170.mjs";
|
|
5
|
-
import { getMinimumDayInMonth as ce, getMinimumMonthInYear as de } from "./
|
|
5
|
+
import { getMinimumDayInMonth as ce, getMinimumMonthInYear as de } from "./index153.mjs";
|
|
6
6
|
import { DateFormatter as k } from "./index181.mjs";
|
|
7
|
-
import { useFormValidationState as se } from "./
|
|
8
|
-
import { useControlledState as fe } from "./
|
|
7
|
+
import { useFormValidationState as se } from "./index156.mjs";
|
|
8
|
+
import { useControlledState as fe } from "./index157.mjs";
|
|
9
9
|
import { useMemo as f, useState as W, useRef as X, useEffect as he } from "react";
|
|
10
10
|
const j = {
|
|
11
11
|
year: !0,
|