kku-ui 0.2.4 → 0.2.51
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/lib/es/components/foundations/icon/KIcon.interface.d.ts +2 -3
- package/lib/es/core/button/Button.interface.d.ts +4 -0
- package/lib/es/core/button/index.d.ts +1 -1
- package/lib/es/core/switch/Switch.interface.d.ts +6 -0
- package/lib/es/core/switch/index.d.ts +1 -1
- package/lib/es/core/text-field/TextField.interface.d.ts +4 -0
- package/lib/es/core/text-field/index.d.ts +1 -1
- package/lib/es/core/transition/Transition.interface.d.ts +9 -0
- package/lib/es/core/transition/index.d.ts +1 -1
- package/lib/es/index.js +358 -347
- package/lib/es/index.js.br +0 -0
- package/lib/es/index.js.gz +0 -0
- package/lib/index.css +1 -1
- package/package.json +1 -1
package/lib/es/index.js
CHANGED
|
@@ -48,15 +48,15 @@ var ne = {};
|
|
|
48
48
|
var bs;
|
|
49
49
|
function xa() {
|
|
50
50
|
return bs || (bs = 1, process.env.NODE_ENV !== "production" && function() {
|
|
51
|
-
function t(
|
|
52
|
-
if (
|
|
53
|
-
if (typeof
|
|
54
|
-
return
|
|
55
|
-
if (typeof
|
|
56
|
-
switch (
|
|
57
|
-
case
|
|
51
|
+
function t(y) {
|
|
52
|
+
if (y == null) return null;
|
|
53
|
+
if (typeof y == "function")
|
|
54
|
+
return y.$$typeof === N ? null : y.displayName || y.name || null;
|
|
55
|
+
if (typeof y == "string") return y;
|
|
56
|
+
switch (y) {
|
|
57
|
+
case x:
|
|
58
58
|
return "Fragment";
|
|
59
|
-
case
|
|
59
|
+
case v:
|
|
60
60
|
return "Profiler";
|
|
61
61
|
case w:
|
|
62
62
|
return "StrictMode";
|
|
@@ -67,126 +67,126 @@ function xa() {
|
|
|
67
67
|
case _:
|
|
68
68
|
return "Activity";
|
|
69
69
|
}
|
|
70
|
-
if (typeof
|
|
71
|
-
switch (typeof
|
|
70
|
+
if (typeof y == "object")
|
|
71
|
+
switch (typeof y.tag == "number" && console.error(
|
|
72
72
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
73
|
-
),
|
|
73
|
+
), y.$$typeof) {
|
|
74
74
|
case m:
|
|
75
75
|
return "Portal";
|
|
76
|
-
case
|
|
77
|
-
return (
|
|
78
|
-
case
|
|
79
|
-
return (
|
|
76
|
+
case g:
|
|
77
|
+
return (y.displayName || "Context") + ".Provider";
|
|
78
|
+
case C:
|
|
79
|
+
return (y._context.displayName || "Context") + ".Consumer";
|
|
80
80
|
case T:
|
|
81
|
-
var E =
|
|
82
|
-
return
|
|
81
|
+
var E = y.render;
|
|
82
|
+
return y = y.displayName, y || (y = E.displayName || E.name || "", y = y !== "" ? "ForwardRef(" + y + ")" : "ForwardRef"), y;
|
|
83
83
|
case M:
|
|
84
|
-
return E =
|
|
84
|
+
return E = y.displayName || null, E !== null ? E : t(y.type) || "Memo";
|
|
85
85
|
case j:
|
|
86
|
-
E =
|
|
86
|
+
E = y._payload, y = y._init;
|
|
87
87
|
try {
|
|
88
|
-
return t(
|
|
88
|
+
return t(y(E));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
|
-
function e(
|
|
95
|
-
return "" +
|
|
94
|
+
function e(y) {
|
|
95
|
+
return "" + y;
|
|
96
96
|
}
|
|
97
|
-
function n(
|
|
97
|
+
function n(y) {
|
|
98
98
|
try {
|
|
99
|
-
e(
|
|
99
|
+
e(y);
|
|
100
100
|
var E = !1;
|
|
101
101
|
} catch {
|
|
102
102
|
E = !0;
|
|
103
103
|
}
|
|
104
104
|
if (E) {
|
|
105
105
|
E = console;
|
|
106
|
-
var F = E.error, V = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
106
|
+
var F = E.error, V = typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object";
|
|
107
107
|
return F.call(
|
|
108
108
|
E,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
110
|
V
|
|
111
|
-
), e(
|
|
111
|
+
), e(y);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function s(
|
|
115
|
-
if (
|
|
116
|
-
if (typeof
|
|
114
|
+
function s(y) {
|
|
115
|
+
if (y === x) return "<>";
|
|
116
|
+
if (typeof y == "object" && y !== null && y.$$typeof === j)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
|
-
var E = t(
|
|
119
|
+
var E = t(y);
|
|
120
120
|
return E ? "<" + E + ">" : "<...>";
|
|
121
121
|
} catch {
|
|
122
122
|
return "<...>";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function i() {
|
|
126
|
-
var
|
|
127
|
-
return
|
|
126
|
+
var y = B.A;
|
|
127
|
+
return y === null ? null : y.getOwner();
|
|
128
128
|
}
|
|
129
129
|
function r() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
|
-
function o(
|
|
133
|
-
if (K.call(
|
|
134
|
-
var E = Object.getOwnPropertyDescriptor(
|
|
132
|
+
function o(y) {
|
|
133
|
+
if (K.call(y, "key")) {
|
|
134
|
+
var E = Object.getOwnPropertyDescriptor(y, "key").get;
|
|
135
135
|
if (E && E.isReactWarning) return !1;
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return y.key !== void 0;
|
|
138
138
|
}
|
|
139
|
-
function a(
|
|
139
|
+
function a(y, E) {
|
|
140
140
|
function F() {
|
|
141
141
|
D || (D = !0, console.error(
|
|
142
142
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
143
143
|
E
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
|
-
F.isReactWarning = !0, Object.defineProperty(
|
|
146
|
+
F.isReactWarning = !0, Object.defineProperty(y, "key", {
|
|
147
147
|
get: F,
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
function c() {
|
|
152
|
-
var
|
|
153
|
-
return O[
|
|
152
|
+
var y = t(this.type);
|
|
153
|
+
return O[y] || (O[y] = !0, console.error(
|
|
154
154
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
155
|
-
)),
|
|
155
|
+
)), y = this.props.ref, y !== void 0 ? y : null;
|
|
156
156
|
}
|
|
157
|
-
function u(
|
|
158
|
-
return F = nt.ref,
|
|
157
|
+
function u(y, E, F, V, it, nt, kt, jt) {
|
|
158
|
+
return F = nt.ref, y = {
|
|
159
159
|
$$typeof: p,
|
|
160
|
-
type:
|
|
160
|
+
type: y,
|
|
161
161
|
key: E,
|
|
162
162
|
props: nt,
|
|
163
163
|
_owner: it
|
|
164
|
-
}, (F !== void 0 ? F : null) !== null ? Object.defineProperty(
|
|
164
|
+
}, (F !== void 0 ? F : null) !== null ? Object.defineProperty(y, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
get: c
|
|
167
|
-
}) : Object.defineProperty(
|
|
167
|
+
}) : Object.defineProperty(y, "ref", { enumerable: !1, value: null }), y._store = {}, Object.defineProperty(y._store, "validated", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
170
170
|
writable: !0,
|
|
171
171
|
value: 0
|
|
172
|
-
}), Object.defineProperty(
|
|
172
|
+
}), Object.defineProperty(y, "_debugInfo", {
|
|
173
173
|
configurable: !1,
|
|
174
174
|
enumerable: !1,
|
|
175
175
|
writable: !0,
|
|
176
176
|
value: null
|
|
177
|
-
}), Object.defineProperty(
|
|
177
|
+
}), Object.defineProperty(y, "_debugStack", {
|
|
178
178
|
configurable: !1,
|
|
179
179
|
enumerable: !1,
|
|
180
180
|
writable: !0,
|
|
181
181
|
value: kt
|
|
182
|
-
}), Object.defineProperty(
|
|
182
|
+
}), Object.defineProperty(y, "_debugTask", {
|
|
183
183
|
configurable: !1,
|
|
184
184
|
enumerable: !1,
|
|
185
185
|
writable: !0,
|
|
186
186
|
value: jt
|
|
187
|
-
}), Object.freeze && (Object.freeze(
|
|
187
|
+
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
|
|
188
188
|
}
|
|
189
|
-
function d(
|
|
189
|
+
function d(y, E, F, V, it, nt, kt, jt) {
|
|
190
190
|
var X = E.children;
|
|
191
191
|
if (X !== void 0)
|
|
192
192
|
if (V)
|
|
@@ -200,7 +200,7 @@ function xa() {
|
|
|
200
200
|
);
|
|
201
201
|
else h(X);
|
|
202
202
|
if (K.call(E, "key")) {
|
|
203
|
-
X = t(
|
|
203
|
+
X = t(y);
|
|
204
204
|
var bt = Object.keys(E).filter(function(We) {
|
|
205
205
|
return We !== "key";
|
|
206
206
|
});
|
|
@@ -224,9 +224,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
224
224
|
} else F = E;
|
|
225
225
|
return X && a(
|
|
226
226
|
F,
|
|
227
|
-
typeof
|
|
227
|
+
typeof y == "function" ? y.displayName || y.name || "Unknown" : y
|
|
228
228
|
), u(
|
|
229
|
-
|
|
229
|
+
y,
|
|
230
230
|
X,
|
|
231
231
|
nt,
|
|
232
232
|
it,
|
|
@@ -236,44 +236,44 @@ React keys must be passed directly to JSX without using spread:
|
|
|
236
236
|
jt
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
|
-
function h(
|
|
240
|
-
typeof
|
|
239
|
+
function h(y) {
|
|
240
|
+
typeof y == "object" && y !== null && y.$$typeof === p && y._store && (y._store.validated = 1);
|
|
241
241
|
}
|
|
242
|
-
var f = ua, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"),
|
|
242
|
+
var f = ua, p = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), g = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), B = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, R = Array.isArray, G = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
f = {
|
|
246
|
-
"react-stack-bottom-frame": function(
|
|
247
|
-
return
|
|
246
|
+
"react-stack-bottom-frame": function(y) {
|
|
247
|
+
return y();
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
250
|
var D, O = {}, z = f["react-stack-bottom-frame"].bind(
|
|
251
251
|
f,
|
|
252
252
|
r
|
|
253
253
|
)(), Y = G(s(r)), lt = {};
|
|
254
|
-
ne.Fragment =
|
|
254
|
+
ne.Fragment = x, ne.jsx = function(y, E, F, V, it) {
|
|
255
255
|
var nt = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return d(
|
|
257
|
-
|
|
257
|
+
y,
|
|
258
258
|
E,
|
|
259
259
|
F,
|
|
260
260
|
!1,
|
|
261
261
|
V,
|
|
262
262
|
it,
|
|
263
263
|
nt ? Error("react-stack-top-frame") : z,
|
|
264
|
-
nt ? G(s(
|
|
264
|
+
nt ? G(s(y)) : Y
|
|
265
265
|
);
|
|
266
|
-
}, ne.jsxs = function(
|
|
266
|
+
}, ne.jsxs = function(y, E, F, V, it) {
|
|
267
267
|
var nt = 1e4 > B.recentlyCreatedOwnerStacks++;
|
|
268
268
|
return d(
|
|
269
|
-
|
|
269
|
+
y,
|
|
270
270
|
E,
|
|
271
271
|
F,
|
|
272
272
|
!0,
|
|
273
273
|
V,
|
|
274
274
|
it,
|
|
275
275
|
nt ? Error("react-stack-top-frame") : z,
|
|
276
|
-
nt ? G(s(
|
|
276
|
+
nt ? G(s(y)) : Y
|
|
277
277
|
);
|
|
278
278
|
};
|
|
279
279
|
}()), ne;
|
|
@@ -577,8 +577,8 @@ function Pa(t, e) {
|
|
|
577
577
|
* Schedule a process to run on the next frame.
|
|
578
578
|
*/
|
|
579
579
|
schedule: (h, f = !1, p = !1) => {
|
|
580
|
-
const
|
|
581
|
-
return f && o.add(h),
|
|
580
|
+
const x = p && i ? n : s;
|
|
581
|
+
return f && o.add(h), x.has(h) || x.add(h), h;
|
|
582
582
|
},
|
|
583
583
|
/**
|
|
584
584
|
* Cancel the provided callback from running on the next frame.
|
|
@@ -606,18 +606,18 @@ function wo(t, e) {
|
|
|
606
606
|
delta: 0,
|
|
607
607
|
timestamp: 0,
|
|
608
608
|
isProcessing: !1
|
|
609
|
-
}, r = () => n = !0, o = ke.reduce((
|
|
610
|
-
const
|
|
611
|
-
n = !1, Ct.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(
|
|
609
|
+
}, r = () => n = !0, o = ke.reduce((g, T) => (g[T] = Pa(r, e ? T : void 0), g), {}), { setup: a, read: c, resolveKeyframes: u, preUpdate: d, update: h, preRender: f, render: p, postRender: m } = o, x = () => {
|
|
610
|
+
const g = Ct.useManualTiming ? i.timestamp : performance.now();
|
|
611
|
+
n = !1, Ct.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, Aa), 1)), i.timestamp = g, i.isProcessing = !0, a.process(i), c.process(i), u.process(i), d.process(i), h.process(i), f.process(i), p.process(i), m.process(i), i.isProcessing = !1, n && e && (s = !1, t(x));
|
|
612
612
|
}, w = () => {
|
|
613
|
-
n = !0, s = !0, i.isProcessing || t(
|
|
613
|
+
n = !0, s = !0, i.isProcessing || t(x);
|
|
614
614
|
};
|
|
615
|
-
return { schedule: ke.reduce((
|
|
615
|
+
return { schedule: ke.reduce((g, T) => {
|
|
616
616
|
const k = o[T];
|
|
617
|
-
return
|
|
618
|
-
}, {}), cancel: (
|
|
617
|
+
return g[T] = (L, M = !1, j = !1) => (n || w(), k.schedule(L, M, j)), g;
|
|
618
|
+
}, {}), cancel: (g) => {
|
|
619
619
|
for (let T = 0; T < ke.length; T++)
|
|
620
|
-
o[ke[T]].cancel(
|
|
620
|
+
o[ke[T]].cancel(g);
|
|
621
621
|
}, state: i, steps: o };
|
|
622
622
|
}
|
|
623
623
|
const { schedule: W, cancel: St, state: et, steps: Ue } = /* @__PURE__ */ wo(typeof requestAnimationFrame < "u" ? requestAnimationFrame : dt, !0);
|
|
@@ -894,8 +894,8 @@ function i1({ duration: t = U.duration, bounce: e = U.bounce, velocity: n = U.ve
|
|
|
894
894
|
const d = u * o, h = d * t, f = d - n, p = an(u, o), m = Math.exp(-h);
|
|
895
895
|
return Ye - f / p * m;
|
|
896
896
|
}, r = (u) => {
|
|
897
|
-
const h = u * o * t, f = h * n + n, p = Math.pow(o, 2) * Math.pow(u, 2) * t, m = Math.exp(-h),
|
|
898
|
-
return (-i(u) + Ye > 0 ? -1 : 1) * ((f - p) * m) /
|
|
897
|
+
const h = u * o * t, f = h * n + n, p = Math.pow(o, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), x = an(Math.pow(u, 2), o);
|
|
898
|
+
return (-i(u) + Ye > 0 ? -1 : 1) * ((f - p) * m) / x;
|
|
899
899
|
}) : (i = (u) => {
|
|
900
900
|
const d = Math.exp(-u * t), h = (u - n) * t + 1;
|
|
901
901
|
return -Ye + d * h;
|
|
@@ -971,33 +971,33 @@ function Re(t = U.visualDuration, e = U.bounce) {
|
|
|
971
971
|
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: u, mass: d, duration: h, velocity: f, isResolvedFromDuration: p } = c1({
|
|
972
972
|
...n,
|
|
973
973
|
velocity: -/* @__PURE__ */ mt(n.velocity || 0)
|
|
974
|
-
}), m = f || 0,
|
|
975
|
-
s || (s =
|
|
976
|
-
let
|
|
977
|
-
if (
|
|
978
|
-
const k = an(
|
|
979
|
-
|
|
980
|
-
const M = Math.exp(-
|
|
981
|
-
return o - M * ((m +
|
|
974
|
+
}), m = f || 0, x = u / (2 * Math.sqrt(c * d)), w = o - r, v = /* @__PURE__ */ mt(Math.sqrt(c / d)), C = Math.abs(w) < 5;
|
|
975
|
+
s || (s = C ? U.restSpeed.granular : U.restSpeed.default), i || (i = C ? U.restDelta.granular : U.restDelta.default);
|
|
976
|
+
let g;
|
|
977
|
+
if (x < 1) {
|
|
978
|
+
const k = an(v, x);
|
|
979
|
+
g = (L) => {
|
|
980
|
+
const M = Math.exp(-x * v * L);
|
|
981
|
+
return o - M * ((m + x * v * w) / k * Math.sin(k * L) + w * Math.cos(k * L));
|
|
982
982
|
};
|
|
983
|
-
} else if (
|
|
984
|
-
|
|
983
|
+
} else if (x === 1)
|
|
984
|
+
g = (k) => o - Math.exp(-v * k) * (w + (m + v * w) * k);
|
|
985
985
|
else {
|
|
986
|
-
const k =
|
|
987
|
-
|
|
988
|
-
const M = Math.exp(-
|
|
989
|
-
return o - M * ((m +
|
|
986
|
+
const k = v * Math.sqrt(x * x - 1);
|
|
987
|
+
g = (L) => {
|
|
988
|
+
const M = Math.exp(-x * v * L), j = Math.min(k * L, 300);
|
|
989
|
+
return o - M * ((m + x * v * w) * Math.sinh(j) + k * w * Math.cosh(j)) / k;
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
992
|
const T = {
|
|
993
993
|
calculatedDuration: p && h || null,
|
|
994
994
|
next: (k) => {
|
|
995
|
-
const L =
|
|
995
|
+
const L = g(k);
|
|
996
996
|
if (p)
|
|
997
997
|
a.done = k >= h;
|
|
998
998
|
else {
|
|
999
999
|
let M = k === 0 ? m : 0;
|
|
1000
|
-
|
|
1000
|
+
x < 1 && (M = k === 0 ? /* @__PURE__ */ ft(m) : Vo(g, k, L));
|
|
1001
1001
|
const j = Math.abs(M) <= s, _ = Math.abs(o - L) <= i;
|
|
1002
1002
|
a.done = j && _;
|
|
1003
1003
|
}
|
|
@@ -1021,18 +1021,18 @@ function ln({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
1021
1021
|
done: !1,
|
|
1022
1022
|
value: h
|
|
1023
1023
|
}, p = (j) => a !== void 0 && j < a || c !== void 0 && j > c, m = (j) => a === void 0 ? c : c === void 0 || Math.abs(a - j) < Math.abs(c - j) ? a : c;
|
|
1024
|
-
let
|
|
1025
|
-
const w = h +
|
|
1026
|
-
|
|
1027
|
-
const
|
|
1028
|
-
const _ =
|
|
1029
|
-
f.done = Math.abs(_) <= u, f.value = f.done ?
|
|
1024
|
+
let x = n * e;
|
|
1025
|
+
const w = h + x, v = o === void 0 ? w : o(w);
|
|
1026
|
+
v !== w && (x = v - h);
|
|
1027
|
+
const C = (j) => -x * Math.exp(-j / s), g = (j) => v + C(j), T = (j) => {
|
|
1028
|
+
const _ = C(j), N = g(j);
|
|
1029
|
+
f.done = Math.abs(_) <= u, f.value = f.done ? v : N;
|
|
1030
1030
|
};
|
|
1031
1031
|
let k, L;
|
|
1032
1032
|
const M = (j) => {
|
|
1033
1033
|
p(f.value) && (k = j, L = Re({
|
|
1034
1034
|
keyframes: [f.value, m(f.value)],
|
|
1035
|
-
velocity: Vo(
|
|
1035
|
+
velocity: Vo(g, j, f.value),
|
|
1036
1036
|
// TODO: This should be passing * 1000
|
|
1037
1037
|
damping: i,
|
|
1038
1038
|
stiffness: r,
|
|
@@ -1185,22 +1185,22 @@ class Xn extends Yn {
|
|
|
1185
1185
|
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
|
|
1186
1186
|
if (this.startTime === null)
|
|
1187
1187
|
return s.next(0);
|
|
1188
|
-
const { delay: u = 0, keyframes: d, repeat: h, repeatType: f, repeatDelay: p, type: m, onUpdate:
|
|
1188
|
+
const { delay: u = 0, keyframes: d, repeat: h, repeatType: f, repeatDelay: p, type: m, onUpdate: x, finalKeyframe: w } = this.options;
|
|
1189
1189
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
1190
|
-
const
|
|
1191
|
-
this.currentTime = Math.max(
|
|
1192
|
-
let
|
|
1190
|
+
const v = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), C = this.playbackSpeed >= 0 ? v < 0 : v > i;
|
|
1191
|
+
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
1192
|
+
let g = this.currentTime, T = s;
|
|
1193
1193
|
if (h) {
|
|
1194
1194
|
const j = Math.min(this.currentTime, i) / a;
|
|
1195
1195
|
let _ = Math.floor(j), N = j % 1;
|
|
1196
|
-
!N && j >= 1 && (N = 1), N === 1 && _--, _ = Math.min(_, h + 1), !!(_ % 2) && (f === "reverse" ? (N = 1 - N, p && (N -= p / a)) : f === "mirror" && (T = o)),
|
|
1196
|
+
!N && j >= 1 && (N = 1), N === 1 && _--, _ = Math.min(_, h + 1), !!(_ % 2) && (f === "reverse" ? (N = 1 - N, p && (N -= p / a)) : f === "mirror" && (T = o)), g = xt(0, 1, N) * a;
|
|
1197
1197
|
}
|
|
1198
|
-
const k =
|
|
1198
|
+
const k = C ? { done: !1, value: d[0] } : T.next(g);
|
|
1199
1199
|
r && (k.value = r(k.value));
|
|
1200
1200
|
let { done: L } = k;
|
|
1201
|
-
!
|
|
1201
|
+
!C && c !== null && (L = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
1202
1202
|
const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && L);
|
|
1203
|
-
return M && m !== ln && (k.value = Gn(d, this.options, w, this.speed)),
|
|
1203
|
+
return M && m !== ln && (k.value = Gn(d, this.options, w, this.speed)), x && x(k.value), M && this.finish(), k;
|
|
1204
1204
|
}
|
|
1205
1205
|
/**
|
|
1206
1206
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -1672,7 +1672,7 @@ class U1 extends Yn {
|
|
|
1672
1672
|
element: d,
|
|
1673
1673
|
...h
|
|
1674
1674
|
}, p = d?.KeyframeResolver || qn;
|
|
1675
|
-
this.keyframeResolver = new p(a, (m,
|
|
1675
|
+
this.keyframeResolver = new p(a, (m, x, w) => this.onKeyframesResolved(m, x, f, !w), c, u, d), this.keyframeResolver?.scheduleResolve();
|
|
1676
1676
|
}
|
|
1677
1677
|
onKeyframesResolved(e, n, s, i) {
|
|
1678
1678
|
this.keyframeResolver = void 0;
|
|
@@ -2307,8 +2307,8 @@ function xl({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
|
2307
2307
|
r.current.dataset.motionPopId = i;
|
|
2308
2308
|
const m = document.createElement("style");
|
|
2309
2309
|
a && (m.nonce = a);
|
|
2310
|
-
const
|
|
2311
|
-
return
|
|
2310
|
+
const x = s ?? document.head;
|
|
2311
|
+
return x.appendChild(m), m.sheet && m.sheet.insertRule(`
|
|
2312
2312
|
[data-motion-pop-id="${i}"] {
|
|
2313
2313
|
position: absolute !important;
|
|
2314
2314
|
width: ${c}px !important;
|
|
@@ -2317,7 +2317,7 @@ function xl({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
|
2317
2317
|
top: ${d}px !important;
|
|
2318
2318
|
}
|
|
2319
2319
|
`), () => {
|
|
2320
|
-
|
|
2320
|
+
x.removeChild(m), x.contains(m) && x.removeChild(m);
|
|
2321
2321
|
};
|
|
2322
2322
|
}, [e]), l.jsx(yl, { isPresent: e, childRef: r, sizeRef: o, children: Ln.cloneElement(t, { ref: r }) });
|
|
2323
2323
|
}
|
|
@@ -2366,35 +2366,35 @@ function Gs(t) {
|
|
|
2366
2366
|
}), e;
|
|
2367
2367
|
}
|
|
2368
2368
|
const wl = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: a = "left", root: c }) => {
|
|
2369
|
-
const [u, d] = Xo(o), h = b(() => Gs(t), [t]), f = o && !u ? [] : h.map(be), p = J(!0), m = J(h),
|
|
2369
|
+
const [u, d] = Xo(o), h = b(() => Gs(t), [t]), f = o && !u ? [] : h.map(be), p = J(!0), m = J(h), x = Dn(() => /* @__PURE__ */ new Map()), [w, v] = at(h), [C, g] = at(h);
|
|
2370
2370
|
oo(() => {
|
|
2371
2371
|
p.current = !1, m.current = h;
|
|
2372
|
-
for (let L = 0; L <
|
|
2373
|
-
const M = be(
|
|
2374
|
-
f.includes(M) ?
|
|
2372
|
+
for (let L = 0; L < C.length; L++) {
|
|
2373
|
+
const M = be(C[L]);
|
|
2374
|
+
f.includes(M) ? x.delete(M) : x.get(M) !== !0 && x.set(M, !1);
|
|
2375
2375
|
}
|
|
2376
|
-
}, [
|
|
2376
|
+
}, [C, f.length, f.join("-")]);
|
|
2377
2377
|
const T = [];
|
|
2378
2378
|
if (h !== w) {
|
|
2379
2379
|
let L = [...h];
|
|
2380
|
-
for (let M = 0; M <
|
|
2381
|
-
const j =
|
|
2380
|
+
for (let M = 0; M < C.length; M++) {
|
|
2381
|
+
const j = C[M], _ = be(j);
|
|
2382
2382
|
f.includes(_) || (L.splice(M, 0, j), T.push(j));
|
|
2383
2383
|
}
|
|
2384
|
-
return r === "wait" && T.length && (L = T),
|
|
2384
|
+
return r === "wait" && T.length && (L = T), g(Gs(L)), v(h), null;
|
|
2385
2385
|
}
|
|
2386
|
-
process.env.NODE_ENV !== "production" && r === "wait" &&
|
|
2386
|
+
process.env.NODE_ENV !== "production" && r === "wait" && C.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
2387
2387
|
const { forceRender: k } = tt(Rn);
|
|
2388
|
-
return l.jsx(l.Fragment, { children:
|
|
2389
|
-
const M = be(L), j = o && !u ? !1 : h ===
|
|
2390
|
-
if (
|
|
2391
|
-
|
|
2388
|
+
return l.jsx(l.Fragment, { children: C.map((L) => {
|
|
2389
|
+
const M = be(L), j = o && !u ? !1 : h === C || f.includes(M), _ = () => {
|
|
2390
|
+
if (x.has(M))
|
|
2391
|
+
x.set(M, !0);
|
|
2392
2392
|
else
|
|
2393
2393
|
return;
|
|
2394
2394
|
let N = !0;
|
|
2395
|
-
|
|
2395
|
+
x.forEach((B) => {
|
|
2396
2396
|
B || (N = !1);
|
|
2397
|
-
}), N && (k?.(),
|
|
2397
|
+
}), N && (k?.(), g(m.current), o && d?.(), s && s());
|
|
2398
2398
|
};
|
|
2399
2399
|
return l.jsx(vl, { isPresent: j, initial: !p.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: r, root: c, onExitComplete: j ? void 0 : _, anchorX: a, children: L }, M);
|
|
2400
2400
|
}) });
|
|
@@ -2869,17 +2869,17 @@ function Jl(t, e, n, s) {
|
|
|
2869
2869
|
for (let p = 0; p < f.length; p++) {
|
|
2870
2870
|
const m = us(t, f[p]);
|
|
2871
2871
|
if (m) {
|
|
2872
|
-
const { transitionEnd:
|
|
2873
|
-
for (const
|
|
2874
|
-
let
|
|
2875
|
-
if (Array.isArray(
|
|
2876
|
-
const T = d ?
|
|
2877
|
-
|
|
2872
|
+
const { transitionEnd: x, transition: w, ...v } = m;
|
|
2873
|
+
for (const C in v) {
|
|
2874
|
+
let g = v[C];
|
|
2875
|
+
if (Array.isArray(g)) {
|
|
2876
|
+
const T = d ? g.length - 1 : 0;
|
|
2877
|
+
g = g[T];
|
|
2878
2878
|
}
|
|
2879
|
-
|
|
2879
|
+
g !== null && (i[C] = g);
|
|
2880
2880
|
}
|
|
2881
|
-
for (const
|
|
2882
|
-
i[
|
|
2881
|
+
for (const C in x)
|
|
2882
|
+
i[C] = x[C];
|
|
2883
2883
|
}
|
|
2884
2884
|
}
|
|
2885
2885
|
}
|
|
@@ -3036,15 +3036,15 @@ function dr(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3036
3036
|
}, m = h.get();
|
|
3037
3037
|
if (m !== void 0 && !h.isAnimating && !Array.isArray(f) && f === m && !p.velocity)
|
|
3038
3038
|
continue;
|
|
3039
|
-
let
|
|
3039
|
+
let x = !1;
|
|
3040
3040
|
if (window.MotionHandoffAnimation) {
|
|
3041
|
-
const
|
|
3042
|
-
if (
|
|
3043
|
-
const
|
|
3044
|
-
|
|
3041
|
+
const v = ur(t);
|
|
3042
|
+
if (v) {
|
|
3043
|
+
const C = window.MotionHandoffAnimation(v, d, W);
|
|
3044
|
+
C !== null && (p.startTime = C, x = !0);
|
|
3045
3045
|
}
|
|
3046
3046
|
}
|
|
3047
|
-
xn(t, d), h.start(hs(d, h, f, t.shouldReduceMotion && Fo.has(d) ? { type: !1 } : p, t,
|
|
3047
|
+
xn(t, d), h.start(hs(d, h, f, t.shouldReduceMotion && Fo.has(d) ? { type: !1 } : p, t, x));
|
|
3048
3048
|
const w = h.animation;
|
|
3049
3049
|
w && c.push(w);
|
|
3050
3050
|
}
|
|
@@ -3146,26 +3146,26 @@ function kc(t) {
|
|
|
3146
3146
|
const { props: u } = t, d = fr(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
|
|
3147
3147
|
let p = {}, m = 1 / 0;
|
|
3148
3148
|
for (let w = 0; w < Cc; w++) {
|
|
3149
|
-
const
|
|
3149
|
+
const v = vc[w], C = n[v], g = u[v] !== void 0 ? u[v] : d[v], T = he(g), k = v === c ? C.isActive : null;
|
|
3150
3150
|
k === !1 && (m = w);
|
|
3151
|
-
let L =
|
|
3152
|
-
if (L && s && t.manuallyAnimateOnMount && (L = !1),
|
|
3153
|
-
!
|
|
3154
|
-
!
|
|
3155
|
-
Ie(
|
|
3151
|
+
let L = g === d[v] && g !== u[v] && T;
|
|
3152
|
+
if (L && s && t.manuallyAnimateOnMount && (L = !1), C.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3153
|
+
!C.isActive && k === null || // If we didn't and don't have any defined prop for this animation type
|
|
3154
|
+
!g && !C.prevProp || // Or if the prop doesn't define an animation
|
|
3155
|
+
Ie(g) || typeof g == "boolean")
|
|
3156
3156
|
continue;
|
|
3157
|
-
const M = jc(
|
|
3157
|
+
const M = jc(C.prevProp, g);
|
|
3158
3158
|
let j = M || // If we're making this variant active, we want to always make it active
|
|
3159
|
-
|
|
3159
|
+
v === c && C.isActive && !L && T || // If we removed a higher-priority variant (i is in reverse order)
|
|
3160
3160
|
w > m && T, _ = !1;
|
|
3161
|
-
const N = Array.isArray(
|
|
3162
|
-
let B = N.reduce(i(
|
|
3161
|
+
const N = Array.isArray(g) ? g : [g];
|
|
3162
|
+
let B = N.reduce(i(v), {});
|
|
3163
3163
|
k === !1 && (B = {});
|
|
3164
|
-
const { prevResolvedValues: K = {} } =
|
|
3164
|
+
const { prevResolvedValues: K = {} } = C, R = {
|
|
3165
3165
|
...K,
|
|
3166
3166
|
...B
|
|
3167
3167
|
}, G = (z) => {
|
|
3168
|
-
j = !0, f.has(z) && (_ = !0, f.delete(z)),
|
|
3168
|
+
j = !0, f.has(z) && (_ = !0, f.delete(z)), C.needsAnimating[z] = !0;
|
|
3169
3169
|
const Y = t.getValue(z);
|
|
3170
3170
|
Y && (Y.liveStyle = !1);
|
|
3171
3171
|
};
|
|
@@ -3173,27 +3173,27 @@ function kc(t) {
|
|
|
3173
3173
|
const Y = B[z], lt = K[z];
|
|
3174
3174
|
if (p.hasOwnProperty(z))
|
|
3175
3175
|
continue;
|
|
3176
|
-
let
|
|
3177
|
-
yn(Y) && yn(lt) ?
|
|
3176
|
+
let y = !1;
|
|
3177
|
+
yn(Y) && yn(lt) ? y = !hr(Y, lt) : y = Y !== lt, y ? Y != null ? G(z) : f.add(z) : Y !== void 0 && f.has(z) ? G(z) : C.protectedKeys[z] = !0;
|
|
3178
3178
|
}
|
|
3179
|
-
|
|
3179
|
+
C.prevProp = g, C.prevResolvedValues = B, C.isActive && (p = { ...p, ...B }), s && t.blockInitialAnimation && (j = !1), j && (!(L && M) || _) && h.push(...N.map((z) => ({
|
|
3180
3180
|
animation: z,
|
|
3181
|
-
options: { type:
|
|
3181
|
+
options: { type: v }
|
|
3182
3182
|
})));
|
|
3183
3183
|
}
|
|
3184
3184
|
if (f.size) {
|
|
3185
3185
|
const w = {};
|
|
3186
3186
|
if (typeof u.initial != "boolean") {
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3187
|
+
const v = pe(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
3188
|
+
v && v.transition && (w.transition = v.transition);
|
|
3189
3189
|
}
|
|
3190
|
-
f.forEach((
|
|
3191
|
-
const
|
|
3192
|
-
|
|
3190
|
+
f.forEach((v) => {
|
|
3191
|
+
const C = t.getBaseTarget(v), g = t.getValue(v);
|
|
3192
|
+
g && (g.liveStyle = !0), w[v] = C ?? null;
|
|
3193
3193
|
}), h.push({ animation: w });
|
|
3194
3194
|
}
|
|
3195
|
-
let
|
|
3196
|
-
return s && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (
|
|
3195
|
+
let x = !!h.length;
|
|
3196
|
+
return s && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (x = !1), s = !1, x ? e(h) : Promise.resolve();
|
|
3197
3197
|
}
|
|
3198
3198
|
function a(c, u) {
|
|
3199
3199
|
if (n[c].isActive === u)
|
|
@@ -3451,19 +3451,19 @@ class wr {
|
|
|
3451
3451
|
const f = Qe(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, m = Oc(f.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
3452
3452
|
if (!p && !m)
|
|
3453
3453
|
return;
|
|
3454
|
-
const { point:
|
|
3455
|
-
this.history.push({ ...
|
|
3456
|
-
const { onStart:
|
|
3457
|
-
p || (
|
|
3454
|
+
const { point: x } = f, { timestamp: w } = et;
|
|
3455
|
+
this.history.push({ ...x, timestamp: w });
|
|
3456
|
+
const { onStart: v, onMove: C } = this.handlers;
|
|
3457
|
+
p || (v && v(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), C && C(this.lastMoveEvent, f);
|
|
3458
3458
|
}, this.handlePointerMove = (f, p) => {
|
|
3459
3459
|
this.lastMoveEvent = f, this.lastMoveEventInfo = Je(p, this.transformPagePoint), W.update(this.updatePoint, !0);
|
|
3460
3460
|
}, this.handlePointerUp = (f, p) => {
|
|
3461
3461
|
this.end();
|
|
3462
|
-
const { onEnd: m, onSessionEnd:
|
|
3462
|
+
const { onEnd: m, onSessionEnd: x, resumeAnimation: w } = this.handlers;
|
|
3463
3463
|
if (this.dragSnapToOrigin && w && w(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3464
3464
|
return;
|
|
3465
|
-
const
|
|
3466
|
-
this.startEvent && m && m(f,
|
|
3465
|
+
const v = Qe(f.type === "pointercancel" ? this.lastMoveEventInfo : Je(p, this.transformPagePoint), this.history);
|
|
3466
|
+
this.startEvent && m && m(f, v), x && x(f, v);
|
|
3467
3467
|
}, !ns(e))
|
|
3468
3468
|
return;
|
|
3469
3469
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = o, this.contextWindow = i || window;
|
|
@@ -3580,33 +3580,33 @@ class Yc {
|
|
|
3580
3580
|
const { dragSnapToOrigin: f } = this.getProps();
|
|
3581
3581
|
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(ve(h).point);
|
|
3582
3582
|
}, o = (h, f) => {
|
|
3583
|
-
const { drag: p, dragPropagation: m, onDragStart:
|
|
3583
|
+
const { drag: p, dragPropagation: m, onDragStart: x } = this.getProps();
|
|
3584
3584
|
if (p && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = ll(p), !this.openDragLock))
|
|
3585
3585
|
return;
|
|
3586
|
-
this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ut((
|
|
3587
|
-
let
|
|
3588
|
-
if (gt.test(
|
|
3589
|
-
const { projection:
|
|
3590
|
-
if (
|
|
3591
|
-
const T =
|
|
3592
|
-
T && (
|
|
3586
|
+
this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ut((v) => {
|
|
3587
|
+
let C = this.getAxisMotionValue(v).get() || 0;
|
|
3588
|
+
if (gt.test(C)) {
|
|
3589
|
+
const { projection: g } = this.visualElement;
|
|
3590
|
+
if (g && g.layout) {
|
|
3591
|
+
const T = g.layout.layoutBox[v];
|
|
3592
|
+
T && (C = ot(T) * (parseFloat(C) / 100));
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
|
-
this.originPoint[
|
|
3596
|
-
}),
|
|
3595
|
+
this.originPoint[v] = C;
|
|
3596
|
+
}), x && W.postRender(() => x(h, f)), xn(this.visualElement, "transform");
|
|
3597
3597
|
const { animationState: w } = this.visualElement;
|
|
3598
3598
|
w && w.setActive("whileDrag", !0);
|
|
3599
3599
|
}, a = (h, f) => {
|
|
3600
3600
|
this.latestPointerEvent = h, this.latestPanInfo = f;
|
|
3601
|
-
const { dragPropagation: p, dragDirectionLock: m, onDirectionLock:
|
|
3601
|
+
const { dragPropagation: p, dragDirectionLock: m, onDirectionLock: x, onDrag: w } = this.getProps();
|
|
3602
3602
|
if (!p && !this.openDragLock)
|
|
3603
3603
|
return;
|
|
3604
|
-
const { offset:
|
|
3604
|
+
const { offset: v } = f;
|
|
3605
3605
|
if (m && this.currentDirection === null) {
|
|
3606
|
-
this.currentDirection = Xc(
|
|
3606
|
+
this.currentDirection = Xc(v), this.currentDirection !== null && x && x(this.currentDirection);
|
|
3607
3607
|
return;
|
|
3608
3608
|
}
|
|
3609
|
-
this.updateAxis("x", f.point,
|
|
3609
|
+
this.updateAxis("x", f.point, v), this.updateAxis("y", f.point, v), this.visualElement.render(), w && w(h, f);
|
|
3610
3610
|
}, c = (h, f) => {
|
|
3611
3611
|
this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
3612
3612
|
}, u = () => ut((h) => this.getAnimationState(h) === "paused" && this.getAxisMotionValue(h).animation?.play()), { dragSnapToOrigin: d } = this.getProps();
|
|
@@ -4170,15 +4170,15 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4170
4170
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4171
4171
|
return;
|
|
4172
4172
|
}
|
|
4173
|
-
const m = this.options.transition || u.getDefaultTransition() || A0, { onLayoutAnimationStart:
|
|
4174
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
4173
|
+
const m = this.options.transition || u.getDefaultTransition() || A0, { onLayoutAnimationStart: x, onLayoutAnimationComplete: w } = u.getProps(), v = !this.targetLayout || !Mr(this.targetLayout, p), C = !h && f;
|
|
4174
|
+
if (this.options.layoutRoot || this.resumeFrom || C || h && (v || !this.currentAnimation)) {
|
|
4175
4175
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
4176
|
-
const
|
|
4176
|
+
const g = {
|
|
4177
4177
|
...Qn(m, "layout"),
|
|
4178
|
-
onPlay:
|
|
4178
|
+
onPlay: x,
|
|
4179
4179
|
onComplete: w
|
|
4180
4180
|
};
|
|
4181
|
-
(u.shouldReduceMotion || this.options.layoutRoot) && (
|
|
4181
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (g.delay = 0, g.type = !1), this.startAnimation(g), this.setAnimationOrigin(d, C);
|
|
4182
4182
|
} else
|
|
4183
4183
|
h || Di(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4184
4184
|
this.targetLayout = p;
|
|
@@ -4427,12 +4427,12 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4427
4427
|
setAnimationOrigin(o, a = !1) {
|
|
4428
4428
|
const c = this.snapshot, u = c ? c.latestValues : {}, d = { ...this.latestValues }, h = zt();
|
|
4429
4429
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4430
|
-
const f = q(), p = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0,
|
|
4430
|
+
const f = q(), p = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, x = p !== m, w = this.getStack(), v = !w || w.members.length <= 1, C = !!(x && !v && this.options.crossfade === !0 && !this.path.some(P0));
|
|
4431
4431
|
this.animationProgress = 0;
|
|
4432
|
-
let
|
|
4432
|
+
let g;
|
|
4433
4433
|
this.mixTargetDelta = (T) => {
|
|
4434
4434
|
const k = T / 1e3;
|
|
4435
|
-
Ei(h.x, o.x, k), Ei(h.y, o.y, k), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (le(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), S0(this.relativeTarget, this.relativeTargetOrigin, f, k),
|
|
4435
|
+
Ei(h.x, o.x, k), Ei(h.y, o.y, k), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (le(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), S0(this.relativeTarget, this.relativeTargetOrigin, f, k), g && f0(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = q()), ct(g, this.relativeTarget)), x && (this.animationValues = d, a0(d, u, this.latestValues, k, C, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = k;
|
|
4436
4436
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4437
4437
|
}
|
|
4438
4438
|
startAnimation(o) {
|
|
@@ -4551,13 +4551,13 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4551
4551
|
for (const m in fe) {
|
|
4552
4552
|
if (d[m] === void 0)
|
|
4553
4553
|
continue;
|
|
4554
|
-
const { correct:
|
|
4554
|
+
const { correct: x, applyTo: w, isCSSVariable: v } = fe[m], C = h === "none" ? d[m] : x(d[m], u);
|
|
4555
4555
|
if (w) {
|
|
4556
|
-
const
|
|
4557
|
-
for (let T = 0; T <
|
|
4558
|
-
o[w[T]] =
|
|
4556
|
+
const g = w.length;
|
|
4557
|
+
for (let T = 0; T < g; T++)
|
|
4558
|
+
o[w[T]] = C;
|
|
4559
4559
|
} else
|
|
4560
|
-
|
|
4560
|
+
v ? this.options.visualElement.renderState.vars[m] = C : o[m] = C;
|
|
4561
4561
|
}
|
|
4562
4562
|
this.options.layoutId && (o.pointerEvents = u === this ? Se(a?.pointerEvents) || "" : "none");
|
|
4563
4563
|
}
|
|
@@ -5211,11 +5211,11 @@ const Nr = Z((t, e) => {
|
|
|
5211
5211
|
style: f,
|
|
5212
5212
|
onClick: p,
|
|
5213
5213
|
onMouseDown: m,
|
|
5214
|
-
onMouseLeave:
|
|
5214
|
+
onMouseLeave: x,
|
|
5215
5215
|
onMouseUp: w,
|
|
5216
|
-
onKeyDown:
|
|
5217
|
-
onKeyUp:
|
|
5218
|
-
...
|
|
5216
|
+
onKeyDown: v,
|
|
5217
|
+
onKeyUp: C,
|
|
5218
|
+
...g
|
|
5219
5219
|
} = t, T = J(null), k = Tn(T), L = b(() => c === "plain", [c]);
|
|
5220
5220
|
pt(e, () => ({
|
|
5221
5221
|
focus() {
|
|
@@ -5238,19 +5238,19 @@ const Nr = Z((t, e) => {
|
|
|
5238
5238
|
}, [k, L, m]), B = S((D) => {
|
|
5239
5239
|
w?.(D), L || k.remove();
|
|
5240
5240
|
}, [k, L, w]), K = S((D) => {
|
|
5241
|
-
if (
|
|
5241
|
+
if (x?.(D), !T?.current)
|
|
5242
5242
|
throw Error("Invalid rootRef.");
|
|
5243
5243
|
L || k.remove();
|
|
5244
|
-
}, [k, L,
|
|
5245
|
-
|
|
5246
|
-
}, [k,
|
|
5247
|
-
|
|
5248
|
-
}, [k,
|
|
5244
|
+
}, [k, L, x]), R = S((D) => {
|
|
5245
|
+
v?.(D), L || k?.register(D);
|
|
5246
|
+
}, [k, v]), G = S((D) => {
|
|
5247
|
+
C?.(D), L || Mt(D, () => k.remove());
|
|
5248
|
+
}, [k, C]);
|
|
5249
5249
|
return /* @__PURE__ */ l.jsx(
|
|
5250
5250
|
Ji,
|
|
5251
5251
|
{
|
|
5252
5252
|
ref: T,
|
|
5253
|
-
...
|
|
5253
|
+
...g,
|
|
5254
5254
|
type: n,
|
|
5255
5255
|
label: i,
|
|
5256
5256
|
className: M,
|
|
@@ -5290,7 +5290,7 @@ const Ir = ({ multiple: t, className: e, variant: n = "outlined", children: s, .
|
|
|
5290
5290
|
return e && p.push(e), p.join(" ");
|
|
5291
5291
|
}, [e]), d = S(
|
|
5292
5292
|
(p) => {
|
|
5293
|
-
t ? c((m) => m.includes(p) ? m.filter((
|
|
5293
|
+
t ? c((m) => m.includes(p) ? m.filter((x) => x !== p) : [...m, p]) : o((m) => m === p ? null : p);
|
|
5294
5294
|
},
|
|
5295
5295
|
[t]
|
|
5296
5296
|
), h = S(
|
|
@@ -5298,18 +5298,18 @@ const Ir = ({ multiple: t, className: e, variant: n = "outlined", children: s, .
|
|
|
5298
5298
|
[t, r, a]
|
|
5299
5299
|
), f = b(() => At.toArray(s).map((p, m) => {
|
|
5300
5300
|
if (!yt(p) || p.type !== fs) return null;
|
|
5301
|
-
const
|
|
5302
|
-
d(m), w.props.onClick?.(
|
|
5303
|
-
},
|
|
5304
|
-
w.props.onKeyDown?.(
|
|
5301
|
+
const x = h(m), w = p, v = (g) => {
|
|
5302
|
+
d(m), w.props.onClick?.(g);
|
|
5303
|
+
}, C = (g) => {
|
|
5304
|
+
w.props.onKeyDown?.(g), Mt(g, () => d(m));
|
|
5305
5305
|
};
|
|
5306
5306
|
return _e(w, {
|
|
5307
5307
|
...w.props,
|
|
5308
5308
|
variant: n,
|
|
5309
|
-
className:
|
|
5309
|
+
className: x ? "k-button--selected" : void 0,
|
|
5310
5310
|
key: p.key ?? `k-button--${m}`,
|
|
5311
|
-
onClick:
|
|
5312
|
-
onKeyDown:
|
|
5311
|
+
onClick: v,
|
|
5312
|
+
onKeyDown: C
|
|
5313
5313
|
});
|
|
5314
5314
|
}), [s, n, h, d]);
|
|
5315
5315
|
return /* @__PURE__ */ l.jsx("div", { ...i, className: u, role: "group", children: f });
|
|
@@ -5356,35 +5356,35 @@ const zr = Z((t, e) => {
|
|
|
5356
5356
|
onMouseDown: f,
|
|
5357
5357
|
onMouseLeave: p,
|
|
5358
5358
|
onMouseUp: m,
|
|
5359
|
-
onKeyDown:
|
|
5359
|
+
onKeyDown: x,
|
|
5360
5360
|
onKeyUp: w,
|
|
5361
|
-
...
|
|
5362
|
-
} = t,
|
|
5363
|
-
pt(e, () =>
|
|
5361
|
+
...v
|
|
5362
|
+
} = t, C = J(null), g = Tn(C);
|
|
5363
|
+
pt(e, () => C.current, []);
|
|
5364
5364
|
const T = b(() => {
|
|
5365
5365
|
const O = ["k-menu-item", `k-menu-item--${r}`];
|
|
5366
5366
|
return s && O.push(s), d && O.push("k-menu-item--disabled"), O.join(" ");
|
|
5367
5367
|
}, [s, r]), k = b(() => ({ ...i }), [i]), L = S((O) => {
|
|
5368
5368
|
d || h?.(O);
|
|
5369
5369
|
}, [d, h]), M = S((O) => {
|
|
5370
|
-
f?.(O), d ||
|
|
5371
|
-
}, [
|
|
5372
|
-
m?.(O),
|
|
5373
|
-
}, [
|
|
5374
|
-
p?.(O),
|
|
5375
|
-
}, [
|
|
5376
|
-
|
|
5370
|
+
f?.(O), d || g?.register(O);
|
|
5371
|
+
}, [g, f]), j = S((O) => {
|
|
5372
|
+
m?.(O), g.remove();
|
|
5373
|
+
}, [g, m]), _ = S((O) => {
|
|
5374
|
+
p?.(O), g.remove();
|
|
5375
|
+
}, [g, p]), N = S((O) => {
|
|
5376
|
+
x?.(O), g?.register(O), Mt(O, () => {
|
|
5377
5377
|
h?.();
|
|
5378
5378
|
});
|
|
5379
|
-
}, [
|
|
5380
|
-
w?.(O), Mt(O, () =>
|
|
5381
|
-
}, [
|
|
5379
|
+
}, [g, x]), B = S((O) => {
|
|
5380
|
+
w?.(O), Mt(O, () => g.remove());
|
|
5381
|
+
}, [g, w]), K = b(() => o ? /* @__PURE__ */ l.jsx("span", { className: "k-menu-item__left-content", children: o }) : null, [o]), R = b(() => /* @__PURE__ */ l.jsx("div", { className: "k-menu-item__label", children: a }), [a]), G = b(() => c ? /* @__PURE__ */ l.jsx("span", { className: "k-menu-item__right-content", children: c }) : null, [c]), D = b(() => u ? /* @__PURE__ */ l.jsx("span", { className: "k-menu-item__shortcut", children: u }) : null, [u]);
|
|
5382
5382
|
return /* @__PURE__ */ l.jsxs(
|
|
5383
5383
|
to,
|
|
5384
5384
|
{
|
|
5385
5385
|
as: "li",
|
|
5386
|
-
ref:
|
|
5387
|
-
...
|
|
5386
|
+
ref: C,
|
|
5387
|
+
...v,
|
|
5388
5388
|
className: T,
|
|
5389
5389
|
style: k,
|
|
5390
5390
|
disabled: d,
|
|
@@ -5476,29 +5476,29 @@ const Gr = Z((t, e) => {
|
|
|
5476
5476
|
onFocus: u,
|
|
5477
5477
|
onBlur: d,
|
|
5478
5478
|
...h
|
|
5479
|
-
} = t, { id: f, triggerRef: p, contentRef: m, trigger:
|
|
5479
|
+
} = t, { id: f, triggerRef: p, contentRef: m, trigger: x, open: w, onOpen: v, onClose: C, onFocusContent: g } = Zr(), T = b(() => r ? -1 : 0, [r]);
|
|
5480
5480
|
pt(e, () => p.current, []);
|
|
5481
5481
|
const k = b(() => {
|
|
5482
5482
|
const R = ["k-dropdown__trigger"];
|
|
5483
5483
|
return s && R.push(s), r && R.push("k-dropdown__trigger--disabled"), R.join(" ");
|
|
5484
5484
|
}, [s, r]), L = S((R) => {
|
|
5485
|
-
i?.(R),
|
|
5486
|
-
}, [w, i,
|
|
5487
|
-
o?.(R),
|
|
5488
|
-
}, [
|
|
5489
|
-
a?.(R),
|
|
5490
|
-
}, [
|
|
5485
|
+
i?.(R), x === "click" && !r && (w ? C() : v());
|
|
5486
|
+
}, [w, i, x, r]), M = S((R) => {
|
|
5487
|
+
o?.(R), x === "hover" && !r && v();
|
|
5488
|
+
}, [x, o, r]), j = S((R) => {
|
|
5489
|
+
a?.(R), x === "hover" && C();
|
|
5490
|
+
}, [x, a]), _ = S((R) => {
|
|
5491
5491
|
if (c?.(R), r)
|
|
5492
5492
|
return;
|
|
5493
|
-
Mt(R,
|
|
5494
|
-
const G =
|
|
5495
|
-
(G || D) && (R.preventDefault(),
|
|
5496
|
-
}, [c,
|
|
5497
|
-
u?.(R),
|
|
5498
|
-
}, [u,
|
|
5499
|
-
d?.(R),
|
|
5500
|
-
}, [d,
|
|
5501
|
-
return ma(m,
|
|
5493
|
+
Mt(R, v);
|
|
5494
|
+
const G = x === "hover" && R.key === "Tab" && !R.shiftKey, D = x === "click" && w && R.key === "Tab" && !R.shiftKey;
|
|
5495
|
+
(G || D) && (R.preventDefault(), g());
|
|
5496
|
+
}, [c, x, w, r]), N = S((R) => {
|
|
5497
|
+
u?.(R), x === "hover" && !r && v();
|
|
5498
|
+
}, [u, x, r]), B = S((R) => {
|
|
5499
|
+
d?.(R), x === "hover" && C();
|
|
5500
|
+
}, [d, x]), K = b(() => At.map(n, (R) => yt(R) ? _e(R, { tabIndex: -1 }) : R), [n]);
|
|
5501
|
+
return ma(m, C, p), // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex,jsx-a11y/no-static-element-interactions
|
|
5502
5502
|
/* @__PURE__ */ l.jsx(
|
|
5503
5503
|
"div",
|
|
5504
5504
|
{
|
|
@@ -5523,7 +5523,7 @@ const Gr = Z((t, e) => {
|
|
|
5523
5523
|
}), gs = I(Gr);
|
|
5524
5524
|
gs.displayName = "Dropdown.Trigger";
|
|
5525
5525
|
Gr.displayName = "Dropdown.Trigger";
|
|
5526
|
-
const c2 =
|
|
5526
|
+
const c2 = 160, Yr = Z((t, e) => {
|
|
5527
5527
|
const {
|
|
5528
5528
|
className: n,
|
|
5529
5529
|
style: s,
|
|
@@ -5538,41 +5538,41 @@ const c2 = 240, Yr = Z((t, e) => {
|
|
|
5538
5538
|
gap: f = 2,
|
|
5539
5539
|
offset: p,
|
|
5540
5540
|
container: m,
|
|
5541
|
-
zIndex:
|
|
5541
|
+
zIndex: x,
|
|
5542
5542
|
...w
|
|
5543
|
-
} = t, { open:
|
|
5544
|
-
triggerRef:
|
|
5545
|
-
contentRef:
|
|
5543
|
+
} = t, { open: v, triggerRef: C, contentRef: g, position: T, onOpen: k, onClose: L, onBlurContent: M, trigger: j } = Zr(), { top: _, left: N } = ga({
|
|
5544
|
+
triggerRef: C,
|
|
5545
|
+
contentRef: g,
|
|
5546
5546
|
position: T,
|
|
5547
5547
|
offset: p,
|
|
5548
|
-
open:
|
|
5548
|
+
open: v,
|
|
5549
5549
|
gap: f
|
|
5550
5550
|
}), B = Mn(m);
|
|
5551
|
-
Ui(L), pt(e, () =>
|
|
5551
|
+
Ui(L), pt(e, () => g.current);
|
|
5552
5552
|
const K = b(() => {
|
|
5553
|
-
const
|
|
5554
|
-
return n &&
|
|
5555
|
-
}, [n]), R = b(() => ({ ...s, position: "fixed", top: _, left: N, zIndex:
|
|
5556
|
-
r?.(
|
|
5557
|
-
}, [r, h]), D = S((
|
|
5558
|
-
o?.(
|
|
5559
|
-
}, [j, o]), O = S((
|
|
5560
|
-
a?.(
|
|
5561
|
-
}, [j, a]), z = S((
|
|
5562
|
-
Mt(
|
|
5563
|
-
}, [d]), Y = S((
|
|
5564
|
-
c?.(
|
|
5565
|
-
}, [c, j]), lt = S((
|
|
5566
|
-
u?.(
|
|
5553
|
+
const y = ["k-dropdown__content"];
|
|
5554
|
+
return n && y.push(n), y.join(" ");
|
|
5555
|
+
}, [n]), R = b(() => ({ ...s, position: "fixed", top: _, left: N, zIndex: x }), [s, _, N, x]), G = S((y) => {
|
|
5556
|
+
r?.(y), h && L();
|
|
5557
|
+
}, [r, h]), D = S((y) => {
|
|
5558
|
+
o?.(y), j === "hover" && k();
|
|
5559
|
+
}, [j, o]), O = S((y) => {
|
|
5560
|
+
a?.(y), j === "hover" && L();
|
|
5561
|
+
}, [j, a]), z = S((y) => {
|
|
5562
|
+
Mt(y, L), y.key === "Tab" && y.shiftKey && M(y);
|
|
5563
|
+
}, [d]), Y = S((y) => {
|
|
5564
|
+
c?.(y), j === "hover" && k();
|
|
5565
|
+
}, [c, j]), lt = S((y) => {
|
|
5566
|
+
u?.(y), j === "hover" && L();
|
|
5567
5567
|
}, [u, j]);
|
|
5568
5568
|
if (Tt(() => {
|
|
5569
|
-
}, [
|
|
5569
|
+
}, [v]), !!B)
|
|
5570
5570
|
return Sn(
|
|
5571
5571
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
5572
5572
|
/* @__PURE__ */ l.jsx(
|
|
5573
5573
|
"div",
|
|
5574
5574
|
{
|
|
5575
|
-
ref:
|
|
5575
|
+
ref: g,
|
|
5576
5576
|
...w,
|
|
5577
5577
|
className: K,
|
|
5578
5578
|
style: R,
|
|
@@ -5585,7 +5585,7 @@ const c2 = 240, Yr = Z((t, e) => {
|
|
|
5585
5585
|
children: /* @__PURE__ */ l.jsx(
|
|
5586
5586
|
Fe,
|
|
5587
5587
|
{
|
|
5588
|
-
isOpen:
|
|
5588
|
+
isOpen: v,
|
|
5589
5589
|
initial: { opacity: 0 },
|
|
5590
5590
|
animate: { opacity: 1 },
|
|
5591
5591
|
exit: { opacity: 0 },
|
|
@@ -5610,19 +5610,19 @@ const Xr = Z((t, e) => {
|
|
|
5610
5610
|
onDropdownOpen: a,
|
|
5611
5611
|
onDropdownClose: c,
|
|
5612
5612
|
...u
|
|
5613
|
-
} = t, d = n || "div", [h, f] = at(!1), p = J(null), m = J(null),
|
|
5613
|
+
} = t, d = n || "div", [h, f] = at(!1), p = J(null), m = J(null), x = `k-dropdown-${Yt()}`, w = b(() => {
|
|
5614
5614
|
const j = ["k-dropdown"];
|
|
5615
5615
|
return o && j.push(o), j.join(" ");
|
|
5616
|
-
}, [o]),
|
|
5616
|
+
}, [o]), v = S(() => {
|
|
5617
5617
|
f(!0), a?.();
|
|
5618
|
-
}, [a]),
|
|
5618
|
+
}, [a]), C = S(() => {
|
|
5619
5619
|
f(!1), c?.();
|
|
5620
5620
|
}, [c]);
|
|
5621
5621
|
pt(e, () => ({
|
|
5622
|
-
onOpen:
|
|
5623
|
-
onClose:
|
|
5622
|
+
onOpen: v,
|
|
5623
|
+
onClose: C
|
|
5624
5624
|
}));
|
|
5625
|
-
const { Trigger:
|
|
5625
|
+
const { Trigger: g, Content: T } = b(() => {
|
|
5626
5626
|
const j = At.toArray(r), _ = j.find(
|
|
5627
5627
|
(B) => yt(B) && B.type === gs
|
|
5628
5628
|
), N = j.find(
|
|
@@ -5642,12 +5642,12 @@ const Xr = Z((t, e) => {
|
|
|
5642
5642
|
}, []), M = b(
|
|
5643
5643
|
() => ({
|
|
5644
5644
|
open: h,
|
|
5645
|
-
onOpen:
|
|
5646
|
-
onClose:
|
|
5645
|
+
onOpen: v,
|
|
5646
|
+
onClose: C,
|
|
5647
5647
|
onFocusContent: k,
|
|
5648
5648
|
onBlurContent: L,
|
|
5649
5649
|
triggerRef: p,
|
|
5650
|
-
id:
|
|
5650
|
+
id: x,
|
|
5651
5651
|
contentRef: m,
|
|
5652
5652
|
trigger: s,
|
|
5653
5653
|
position: i
|
|
@@ -5655,7 +5655,7 @@ const Xr = Z((t, e) => {
|
|
|
5655
5655
|
[h, s, i]
|
|
5656
5656
|
);
|
|
5657
5657
|
return /* @__PURE__ */ l.jsx(d, { ...u, ...u, className: w, children: /* @__PURE__ */ l.jsxs(Hr, { value: M, children: [
|
|
5658
|
-
|
|
5658
|
+
g,
|
|
5659
5659
|
T
|
|
5660
5660
|
] }) });
|
|
5661
5661
|
}), Ht = I(Xr);
|
|
@@ -5768,8 +5768,8 @@ const na = (t) => {
|
|
|
5768
5768
|
overlayClosable: f,
|
|
5769
5769
|
escClosable: p = !1,
|
|
5770
5770
|
children: m,
|
|
5771
|
-
container:
|
|
5772
|
-
} = t, w = Mn(
|
|
5771
|
+
container: x
|
|
5772
|
+
} = t, w = Mn(x), [v, C] = at(null), g = b(() => h2[u], [u]);
|
|
5773
5773
|
if (r === void 0 && typeof o != "function")
|
|
5774
5774
|
throw new Error('You must provide at least one of "setIsOpen" or "onClose".');
|
|
5775
5775
|
const T = b(() => ({ ...c, width: n, height: s }), [c, n, s]), k = b(() => {
|
|
@@ -5786,9 +5786,9 @@ const na = (t) => {
|
|
|
5786
5786
|
}), { modalHeader: K, modalContent: R, modalFooter: G };
|
|
5787
5787
|
}, [m]), B = b(() => ({
|
|
5788
5788
|
isOpen: e,
|
|
5789
|
-
title:
|
|
5790
|
-
setTitle:
|
|
5791
|
-
}), [e,
|
|
5789
|
+
title: v,
|
|
5790
|
+
setTitle: C
|
|
5791
|
+
}), [e, v]);
|
|
5792
5792
|
return Ui(() => {
|
|
5793
5793
|
p && L();
|
|
5794
5794
|
}), w ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
@@ -5799,10 +5799,10 @@ const na = (t) => {
|
|
|
5799
5799
|
isOpen: e,
|
|
5800
5800
|
className: k,
|
|
5801
5801
|
style: T,
|
|
5802
|
-
...
|
|
5802
|
+
...g,
|
|
5803
5803
|
role: "dialog",
|
|
5804
5804
|
"aria-modal": "true",
|
|
5805
|
-
"aria-label":
|
|
5805
|
+
"aria-label": v ?? void 0,
|
|
5806
5806
|
children: [
|
|
5807
5807
|
j,
|
|
5808
5808
|
_,
|
|
@@ -5838,28 +5838,28 @@ const M2 = ["medium", "small", "large"], Ki = {
|
|
|
5838
5838
|
onKeyDown: u,
|
|
5839
5839
|
container: d,
|
|
5840
5840
|
...h
|
|
5841
|
-
} = t, f = Mn(d), p = b(() => c ? 0 : void 0, [c]), m = b(() => c ? { role: "button", "aria-label": "backdrop" } : { role: r, "aria-label": h["aria-label"] }, [c, r]),
|
|
5841
|
+
} = t, f = Mn(d), p = b(() => c ? 0 : void 0, [c]), m = b(() => c ? { role: "button", "aria-label": "backdrop" } : { role: r, "aria-label": h["aria-label"] }, [c, r]), x = b(() => {
|
|
5842
5842
|
const k = ["k-backdrop__container"];
|
|
5843
5843
|
return n && k.push(n), k.join(" ");
|
|
5844
|
-
}, [n]), w = b(() => ({ ...s, opacity: o, zIndex: a }), [s, o, a]),
|
|
5844
|
+
}, [n]), w = b(() => ({ ...s, opacity: o, zIndex: a }), [s, o, a]), v = b(() => typeof o == "number" ? { ...Ki, animate: { opacity: o, zIndex: a } } : Ki, [o, a]), C = S((k) => {
|
|
5845
5845
|
c?.(k);
|
|
5846
|
-
}, [c]),
|
|
5846
|
+
}, [c]), g = S((k) => {
|
|
5847
5847
|
Mt(k, () => {
|
|
5848
5848
|
c?.();
|
|
5849
5849
|
}), u?.(k);
|
|
5850
5850
|
}, [u]), T = b(() => i ? {} : { role: "presentation" }, [i]);
|
|
5851
5851
|
return f ? Sn(
|
|
5852
|
-
/* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs(Fe, { as: "div", isOpen: e, className: "k-backdrop", ...
|
|
5852
|
+
/* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs(Fe, { as: "div", isOpen: e, className: "k-backdrop", ...v, ...T, children: [
|
|
5853
5853
|
/* @__PURE__ */ l.jsx(
|
|
5854
5854
|
"div",
|
|
5855
5855
|
{
|
|
5856
5856
|
...m,
|
|
5857
|
-
className:
|
|
5857
|
+
className: x,
|
|
5858
5858
|
style: w,
|
|
5859
5859
|
...h,
|
|
5860
5860
|
tabIndex: p,
|
|
5861
|
-
onClick:
|
|
5862
|
-
onKeyDown:
|
|
5861
|
+
onClick: C,
|
|
5862
|
+
onKeyDown: g
|
|
5863
5863
|
}
|
|
5864
5864
|
),
|
|
5865
5865
|
i
|
|
@@ -6968,46 +6968,57 @@ const P = "currentColor", p2 = {
|
|
|
6968
6968
|
}, m2 = (t, e) => {
|
|
6969
6969
|
const n = p2[t](e);
|
|
6970
6970
|
return n || null;
|
|
6971
|
-
}, ra = Z((
|
|
6972
|
-
const {
|
|
6971
|
+
}, ra = Z((t, e) => {
|
|
6972
|
+
const {
|
|
6973
|
+
id: n,
|
|
6974
|
+
className: s,
|
|
6975
|
+
style: i,
|
|
6976
|
+
icon: r,
|
|
6977
|
+
size: o = "medium",
|
|
6978
|
+
onClick: a,
|
|
6979
|
+
color: c,
|
|
6980
|
+
disabled: u,
|
|
6981
|
+
...d
|
|
6982
|
+
} = t, h = J(null), f = `k-icon-${Yt()}`, p = b(() => a ? 0 : void 0, [a]);
|
|
6973
6983
|
if (!r)
|
|
6974
6984
|
throw Error("Error: icon is required and must be provided.");
|
|
6975
6985
|
pt(e, () => ({
|
|
6976
6986
|
click: () => {
|
|
6977
|
-
|
|
6987
|
+
h.current?.click();
|
|
6978
6988
|
}
|
|
6979
6989
|
}));
|
|
6980
|
-
const
|
|
6981
|
-
const
|
|
6982
|
-
return s &&
|
|
6983
|
-
}, [s, u, o, r, a]),
|
|
6984
|
-
const
|
|
6985
|
-
return typeof o == "number" && (
|
|
6986
|
-
}, [o]),
|
|
6987
|
-
const
|
|
6988
|
-
if (!
|
|
6990
|
+
const m = b(() => {
|
|
6991
|
+
const g = [];
|
|
6992
|
+
return s && g.push(s), typeof o == "string" && g.push(`k-icon--${o}`), a && g.push("k-icon--clickable"), u && g.push(`k-icon--${u}`), g.join(" ");
|
|
6993
|
+
}, [s, u, o, r, a]), x = b(() => {
|
|
6994
|
+
const g = { ...i };
|
|
6995
|
+
return typeof o == "number" && (g.width = o, g.height = o, g.fontSize = o), g;
|
|
6996
|
+
}, [o]), w = b(() => {
|
|
6997
|
+
const g = m2(r, c);
|
|
6998
|
+
if (!g)
|
|
6989
6999
|
throw Error(`Not Found icon. icon: ${r}`);
|
|
6990
|
-
return
|
|
6991
|
-
}, [r, c]),
|
|
6992
|
-
u || a?.(
|
|
6993
|
-
}, [a, u]), C = S((
|
|
6994
|
-
(
|
|
7000
|
+
return g;
|
|
7001
|
+
}, [r, c]), v = S((g) => {
|
|
7002
|
+
u || a?.(g);
|
|
7003
|
+
}, [a, u]), C = S((g) => {
|
|
7004
|
+
(g.key === "enter" || g.key === " ") && (u || a?.(g));
|
|
6995
7005
|
}, [u, a]);
|
|
6996
7006
|
return (
|
|
6997
7007
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
6998
7008
|
/* @__PURE__ */ l.jsx(
|
|
6999
7009
|
"span",
|
|
7000
7010
|
{
|
|
7001
|
-
ref:
|
|
7002
|
-
id: n ||
|
|
7003
|
-
className: `k-icon ${
|
|
7004
|
-
style:
|
|
7011
|
+
ref: h,
|
|
7012
|
+
id: n || f,
|
|
7013
|
+
className: `k-icon ${m}`,
|
|
7014
|
+
style: x,
|
|
7005
7015
|
role: a ? "button" : "img",
|
|
7006
|
-
tabIndex:
|
|
7016
|
+
tabIndex: p,
|
|
7007
7017
|
"aria-label": `${r} icon`,
|
|
7008
|
-
onClick:
|
|
7018
|
+
onClick: v,
|
|
7009
7019
|
onKeyDown: C,
|
|
7010
|
-
|
|
7020
|
+
...d,
|
|
7021
|
+
children: w
|
|
7011
7022
|
}
|
|
7012
7023
|
)
|
|
7013
7024
|
);
|
|
@@ -7029,20 +7040,20 @@ const g2 = ["xsmall", "small", "medium", "large", "xlarge"], S2 = Object.values(
|
|
|
7029
7040
|
size: f,
|
|
7030
7041
|
disabled: p,
|
|
7031
7042
|
onChange: m,
|
|
7032
|
-
...
|
|
7033
|
-
} = t, w = b(() => o.find((it) => it.value === r)?.label || null, [r, o]), [
|
|
7043
|
+
...x
|
|
7044
|
+
} = t, w = b(() => o.find((it) => it.value === r)?.label || null, [r, o]), [v, C] = at(!1), g = J(null), T = J(null), [k, L] = at("auto"), [M, j] = at(null), _ = b(() => M ? -16 : 4, [M]), N = Tn(g), B = b(() => {
|
|
7034
7045
|
const V = ["k-select"];
|
|
7035
7046
|
return n && V.push(n), f && V.push(`k-select--${f}`), p && V.push("k-select--disabled"), M && V.push("k-select--error"), V.join(" ");
|
|
7036
7047
|
}, [n, f, M, p]), K = b(() => {
|
|
7037
7048
|
const V = ["k-select__fieldset__container__icon"];
|
|
7038
|
-
return
|
|
7039
|
-
}, [
|
|
7040
|
-
const V =
|
|
7049
|
+
return v && V.push("k-select__fieldset__container__icon--open"), V.join(" ");
|
|
7050
|
+
}, [v]), R = b(() => !f || f === "medium" ? "medium" : "small", [f]), G = S(() => {
|
|
7051
|
+
const V = g.current?.getBoundingClientRect().width;
|
|
7041
7052
|
L(V ? V + 2 : "auto");
|
|
7042
7053
|
}, []), D = S(() => {
|
|
7043
|
-
|
|
7054
|
+
C(!0);
|
|
7044
7055
|
}, []), O = S(() => {
|
|
7045
|
-
|
|
7056
|
+
C(!1);
|
|
7046
7057
|
}, []), z = S(async (V) => {
|
|
7047
7058
|
if (!s)
|
|
7048
7059
|
return console.warn("not found rules."), !0;
|
|
@@ -7057,7 +7068,7 @@ const g2 = ["xsmall", "small", "medium", "large", "xlarge"], S2 = Object.values(
|
|
|
7057
7068
|
m(V), i && z(V);
|
|
7058
7069
|
}, [m, i, z]), lt = S((V) => {
|
|
7059
7070
|
p || N?.register(V);
|
|
7060
|
-
}, [p]),
|
|
7071
|
+
}, [p]), y = S(() => {
|
|
7061
7072
|
p || N.remove();
|
|
7062
7073
|
}, [p]), E = S(() => {
|
|
7063
7074
|
p || N.remove();
|
|
@@ -7081,7 +7092,7 @@ const g2 = ["xsmall", "small", "medium", "large", "xlarge"], S2 = Object.values(
|
|
|
7081
7092
|
className: B,
|
|
7082
7093
|
trigger: "click",
|
|
7083
7094
|
position: "bottom-start",
|
|
7084
|
-
...
|
|
7095
|
+
...x,
|
|
7085
7096
|
onDropdownOpen: D,
|
|
7086
7097
|
onDropdownClose: O,
|
|
7087
7098
|
"aria-disabled": p,
|
|
@@ -7095,10 +7106,10 @@ const g2 = ["xsmall", "small", "medium", "large", "xlarge"], S2 = Object.values(
|
|
|
7095
7106
|
/* @__PURE__ */ l.jsxs(
|
|
7096
7107
|
"div",
|
|
7097
7108
|
{
|
|
7098
|
-
ref:
|
|
7109
|
+
ref: g,
|
|
7099
7110
|
className: "k-select__fieldset__container",
|
|
7100
7111
|
onMouseDown: lt,
|
|
7101
|
-
onMouseUp:
|
|
7112
|
+
onMouseUp: y,
|
|
7102
7113
|
onMouseLeave: E,
|
|
7103
7114
|
children: [
|
|
7104
7115
|
w && /* @__PURE__ */ l.jsx("span", { className: "k-select__fieldset__container__value", children: w }),
|
|
@@ -7144,11 +7155,11 @@ const la = Z((t, e) => {
|
|
|
7144
7155
|
onChange: f,
|
|
7145
7156
|
onFocus: p,
|
|
7146
7157
|
onBlur: m,
|
|
7147
|
-
onKeyDown:
|
|
7158
|
+
onKeyDown: x,
|
|
7148
7159
|
autoCapitalize: w,
|
|
7149
|
-
autoCorrect:
|
|
7150
|
-
autoComplete:
|
|
7151
|
-
leftContent:
|
|
7160
|
+
autoCorrect: v,
|
|
7161
|
+
autoComplete: C,
|
|
7162
|
+
leftContent: g,
|
|
7152
7163
|
rightContent: T,
|
|
7153
7164
|
label: k,
|
|
7154
7165
|
width: L,
|
|
@@ -7158,7 +7169,7 @@ const la = Z((t, e) => {
|
|
|
7158
7169
|
rules: N,
|
|
7159
7170
|
validateOnChange: B,
|
|
7160
7171
|
...K
|
|
7161
|
-
} = t, R = J(null), [G, D] = at(!1), [O, z] = at(!1), [Y, lt] = at(null),
|
|
7172
|
+
} = t, R = J(null), [G, D] = at(!1), [O, z] = at(!1), [Y, lt] = at(null), y = b(() => r === "password", [r]), E = b(() => r === "password" && O ? "text" : r, [r, O]), F = b(() => {
|
|
7162
7173
|
const $ = ["k-text-field", `k-text-field--${j}`];
|
|
7163
7174
|
return _ && $.push(_), c && $.push("k-text-field--disabled"), G && $.push("k-text-field--focus"), u && $.push("k-text-field--readOnly"), r === "password" && $.push("k-text-field--password"), typeof Y == "string" && $.push("k-text-field--error"), $.join(" ");
|
|
7164
7175
|
}, [_, c, u, r, Y, j, G]), V = b(() => {
|
|
@@ -7181,8 +7192,8 @@ const la = Z((t, e) => {
|
|
|
7181
7192
|
}, [p]), bt = S(($) => {
|
|
7182
7193
|
D(!1), m?.($);
|
|
7183
7194
|
}, [m]), te = S(($) => {
|
|
7184
|
-
|
|
7185
|
-
}, [
|
|
7195
|
+
x?.($);
|
|
7196
|
+
}, [x]), We = S(() => {
|
|
7186
7197
|
z(($) => !$);
|
|
7187
7198
|
}, [r]);
|
|
7188
7199
|
return pt(e, () => ({
|
|
@@ -7190,14 +7201,14 @@ const la = Z((t, e) => {
|
|
|
7190
7201
|
focus: () => R.current?.focus(),
|
|
7191
7202
|
blur: () => R.current?.blur(),
|
|
7192
7203
|
onValidate: () => kt()
|
|
7193
|
-
})), /* @__PURE__ */ l.jsxs("div", { className: F, children: [
|
|
7194
|
-
/* @__PURE__ */ l.jsxs("fieldset", { className: "k-text-field__fieldset",
|
|
7204
|
+
})), /* @__PURE__ */ l.jsxs("div", { className: F, style: it, children: [
|
|
7205
|
+
/* @__PURE__ */ l.jsxs("fieldset", { className: "k-text-field__fieldset", children: [
|
|
7195
7206
|
/* @__PURE__ */ l.jsx("legend", { className: "k-text-field__fieldset__legend", children: /* @__PURE__ */ l.jsxs("label", { htmlFor: s, className: V, children: [
|
|
7196
7207
|
k,
|
|
7197
7208
|
k && d && /* @__PURE__ */ l.jsx("span", { className: "k-text-field__fieldset__legend__label__required", children: "*" })
|
|
7198
7209
|
] }) }),
|
|
7199
7210
|
/* @__PURE__ */ l.jsxs("div", { className: "k-text-field__fieldset__container", children: [
|
|
7200
|
-
|
|
7211
|
+
g && /* @__PURE__ */ l.jsx("div", { className: "k-text-field__fieldset__container__left", children: g }),
|
|
7201
7212
|
/* @__PURE__ */ l.jsx(
|
|
7202
7213
|
io,
|
|
7203
7214
|
{
|
|
@@ -7215,17 +7226,17 @@ const la = Z((t, e) => {
|
|
|
7215
7226
|
onFocus: X,
|
|
7216
7227
|
onBlur: bt,
|
|
7217
7228
|
onKeyDown: te,
|
|
7218
|
-
autoComplete:
|
|
7219
|
-
autoCorrect:
|
|
7229
|
+
autoComplete: C,
|
|
7230
|
+
autoCorrect: v,
|
|
7220
7231
|
autoCapitalize: w,
|
|
7221
7232
|
style: nt,
|
|
7222
7233
|
...K
|
|
7223
7234
|
}
|
|
7224
7235
|
),
|
|
7225
|
-
|
|
7236
|
+
y && /* @__PURE__ */ l.jsx(
|
|
7226
7237
|
Ce,
|
|
7227
7238
|
{
|
|
7228
|
-
icon:
|
|
7239
|
+
icon: y ? "visibility" : "visibility_off",
|
|
7229
7240
|
size: 18,
|
|
7230
7241
|
onClick: We,
|
|
7231
7242
|
disabled: c,
|