@boxcustodia/library 0.0.7 → 0.0.8
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/dist/index.d.ts +6 -1
- package/dist/index.es100.js +4 -4
- package/dist/index.es101.js +4 -14
- package/dist/index.es102.js +3 -4
- package/dist/index.es103.js +14 -57
- package/dist/index.es104.js +5 -29
- package/dist/index.es105.js +57 -12
- package/dist/index.es106.js +29 -11
- package/dist/index.es111.js +243 -1046
- package/dist/index.es112.js +12 -4
- package/dist/index.es113.js +11 -4
- package/dist/index.es114.js +7 -7
- package/dist/index.es117.js +14 -14
- package/dist/index.es118.js +813 -55
- package/dist/index.es119.js +9 -822
- package/dist/index.es120.js +5 -3
- package/dist/index.es121.js +64 -11
- package/dist/index.es122.js +88 -11
- package/dist/index.es123.js +11 -88
- package/dist/index.es124.js +4 -216
- package/dist/index.es127.js +5 -5
- package/dist/index.es128.js +216 -4
- package/dist/index.es129.js +2 -2
- package/dist/index.es134.js +1 -1
- package/dist/index.es137.js +20 -11
- package/dist/index.es138.js +37 -205
- package/dist/index.es139.js +10 -10
- package/dist/index.es140.js +11 -20
- package/dist/index.es141.js +205 -37
- package/dist/index.es142.js +10 -10
- package/dist/index.es143.js +5 -6
- package/dist/index.es144.js +2 -65
- package/dist/index.es145.js +44 -11
- package/dist/index.es146.js +5 -123
- package/dist/index.es147.js +58 -128
- package/dist/index.es148.js +11 -14
- package/dist/index.es149.js +122 -30
- package/dist/index.es150.js +134 -14
- package/dist/index.es151.js +12 -7
- package/dist/index.es152.js +32 -49
- package/dist/index.es153.js +14 -5
- package/dist/index.es154.js +9 -2
- package/dist/index.es155.js +48 -648
- package/dist/index.es156.js +5 -5
- package/dist/index.es157.js +649 -3
- package/dist/index.es158.js +4 -4
- package/dist/index.es159.js +3 -45
- package/dist/index.es160.js +45 -7
- package/dist/index.es161.js +7 -5
- package/dist/index.es162.js +6 -28
- package/dist/index.es163.js +27 -43
- package/dist/index.es164.js +3 -3
- package/dist/index.es166.js +5 -5
- package/dist/index.es168.js +2 -2
- package/dist/index.es179.js +1 -1
- package/dist/index.es180.js +1 -1
- package/dist/index.es181.js +2 -2
- package/dist/index.es182.js +1 -1
- package/dist/index.es184.js +1 -1
- package/dist/index.es207.js +1 -1
- package/dist/index.es240.js +1 -1
- package/dist/index.es241.js +24 -177
- package/dist/index.es242.js +5 -5
- package/dist/index.es243.js +2 -2
- package/dist/index.es246.js +1 -1
- package/dist/index.es247.js +1 -1
- package/dist/index.es248.js +3 -3
- package/dist/index.es249.js +178 -2
- package/dist/index.es250.js +25 -397
- package/dist/index.es251.js +4 -722
- package/dist/index.es252.js +7 -282
- package/dist/index.es253.js +13 -60
- package/dist/index.es254.js +13 -9
- package/dist/index.es255.js +134 -28
- package/dist/index.es256.js +32 -199
- package/dist/index.es257.js +462 -25
- package/dist/index.es258.js +131 -4
- package/dist/index.es259.js +27 -8
- package/dist/index.es260.js +4 -13
- package/dist/index.es261.js +26 -13
- package/dist/index.es262.js +7 -134
- package/dist/index.es263.js +11 -31
- package/dist/index.es264.js +26 -460
- package/dist/index.es265.js +47 -130
- package/dist/index.es266.js +31 -27
- package/dist/index.es267.js +43 -4
- package/dist/index.es268.js +158 -26
- package/dist/index.es269.js +32 -6
- package/dist/index.es27.js +1 -1
- package/dist/index.es270.js +2 -12
- package/dist/index.es271.js +77 -26
- package/dist/index.es272.js +18 -48
- package/dist/index.es273.js +2 -31
- package/dist/index.es274.js +397 -43
- package/dist/index.es275.js +715 -151
- package/dist/index.es276.js +278 -29
- package/dist/index.es277.js +61 -2
- package/dist/index.es278.js +8 -78
- package/dist/index.es279.js +28 -18
- package/dist/index.es28.js +3 -3
- package/dist/index.es280.js +199 -25
- package/dist/index.es281.js +15 -16
- package/dist/index.es282.js +3 -8
- package/dist/index.es283.js +16 -4
- package/dist/index.es284.js +8 -14
- package/dist/index.es285.js +4 -15
- package/dist/index.es286.js +14 -15
- package/dist/index.es287.js +15 -3
- package/dist/index.es29.js +6 -6
- package/dist/index.es31.js +2 -2
- package/dist/index.es32.js +2 -2
- package/dist/index.es322.js +3 -3
- package/dist/index.es323.js +3 -3
- package/dist/index.es325.js +1 -1
- package/dist/index.es326.js +5 -5
- package/dist/index.es327.js +1 -1
- package/dist/index.es336.js +6 -2
- package/dist/index.es337.js +34 -2
- package/dist/index.es338.js +26 -6
- package/dist/index.es339.js +18 -34
- package/dist/index.es34.js +5 -5
- package/dist/index.es340.js +4 -25
- package/dist/index.es341.js +231 -18
- package/dist/index.es342.js +100 -5
- package/dist/index.es343.js +26 -229
- package/dist/index.es344.js +35 -80
- package/dist/index.es345.js +2 -28
- package/dist/index.es346.js +2 -55
- package/dist/index.es347.js +334 -2
- package/dist/index.es348.js +31 -106
- package/dist/index.es349.js +16 -75
- package/dist/index.es35.js +2 -2
- package/dist/index.es350.js +29 -35
- package/dist/index.es351.js +3 -64
- package/dist/index.es352.js +107 -34
- package/dist/index.es353.js +71 -60
- package/dist/index.es354.js +34 -111
- package/dist/index.es355.js +60 -90
- package/dist/index.es356.js +32 -41
- package/dist/index.es357.js +66 -3
- package/dist/index.es358.js +113 -3
- package/dist/index.es359.js +94 -3
- package/dist/index.es360.js +43 -3
- package/dist/index.es361.js +2 -2
- package/dist/index.es362.js +2 -2
- package/dist/index.es363.js +2 -2
- package/dist/index.es364.js +2 -2
- package/dist/index.es365.js +2 -2
- package/dist/index.es366.js +4 -241
- package/dist/index.es367.js +4 -384
- package/dist/index.es368.js +4 -169
- package/dist/index.es369.js +4 -153
- package/dist/index.es370.js +187 -88
- package/dist/index.es371.js +384 -4
- package/dist/index.es372.js +169 -4
- package/dist/index.es373.js +153 -4
- package/dist/index.es374.js +142 -4
- package/dist/index.es375.js +2 -2
- package/dist/index.es376.js +2 -2
- package/dist/index.es377.js +2 -334
- package/dist/index.es378.js +2 -31
- package/dist/index.es379.js +2 -17
- package/dist/index.es38.js +51 -46
- package/dist/index.es380.js +2 -29
- package/dist/index.es381.js +2 -2
- package/dist/index.es382.js +1 -1
- package/dist/index.es384.js +1 -1
- package/dist/index.es385.js +1 -1
- package/dist/index.es39.js +2 -2
- package/dist/index.es394.js +68 -5
- package/dist/index.es395.js +31 -3
- package/dist/index.es396.js +16 -24
- package/dist/index.es397.js +141 -110
- package/dist/index.es398.js +113 -15
- package/dist/index.es399.js +5 -6
- package/dist/index.es40.js +3 -3
- package/dist/index.es400.js +3 -2
- package/dist/index.es401.js +23 -7
- package/dist/index.es402.js +108 -325
- package/dist/index.es403.js +15 -49
- package/dist/index.es404.js +518 -3
- package/dist/index.es405.js +113 -505
- package/dist/index.es406.js +120 -121
- package/dist/index.es407.js +5 -125
- package/dist/index.es408.js +2 -68
- package/dist/index.es409.js +8 -31
- package/dist/index.es41.js +1 -1
- package/dist/index.es410.js +327 -16
- package/dist/index.es411.js +48 -139
- package/dist/index.es412.js +4 -114
- package/dist/index.es416.js +1 -1
- package/dist/index.es418.js +1 -1
- package/dist/index.es419.js +4 -4
- package/dist/index.es42.js +1 -1
- package/dist/index.es437.js +21 -271
- package/dist/index.es438.js +10 -79
- package/dist/index.es439.js +31 -164
- package/dist/index.es44.js +1 -1
- package/dist/index.es440.js +29 -24
- package/dist/index.es441.js +11 -10
- package/dist/index.es442.js +274 -32
- package/dist/index.es443.js +79 -29
- package/dist/index.es444.js +165 -11
- package/dist/index.es448.js +2 -2
- package/dist/index.es45.js +1 -1
- package/dist/index.es454.js +1 -1
- package/dist/index.es455.js +1 -1
- package/dist/index.es461.js +1 -1
- package/dist/index.es476.js +1 -1
- package/dist/index.es477.js +1 -1
- package/dist/index.es50.js +2 -2
- package/dist/index.es51.js +1 -1
- package/dist/index.es52.js +4 -4
- package/dist/index.es55.js +1 -1
- package/dist/index.es56.js +1 -1
- package/dist/index.es57.js +2 -2
- package/dist/index.es59.js +2 -2
- package/dist/index.es62.js +1 -1
- package/dist/index.es63.js +1 -1
- package/dist/index.es65.js +2 -2
- package/dist/index.es66.js +2 -2
- package/dist/index.es754.js +13 -21
- package/dist/index.es755.js +18 -79
- package/dist/index.es756.js +82 -13
- package/dist/index.es757.js +14 -2
- package/dist/index.es758.js +60 -2
- package/dist/index.es759.js +2 -14
- package/dist/index.es760.js +2 -60
- package/dist/index.es768.js +2 -5
- package/dist/index.es769.js +2 -17
- package/dist/index.es770.js +5 -2
- package/dist/index.es771.js +17 -2
- package/dist/index.es772.js +1 -1
- package/dist/index.es773.js +2 -2
- package/dist/index.es78.js +1 -1
- package/dist/index.es781.js +1 -1
- package/dist/index.es784.js +1 -1
- package/dist/index.es787.js +56 -26
- package/dist/index.es788.js +10 -3
- package/dist/index.es789.js +14 -57
- package/dist/index.es79.js +1 -1
- package/dist/index.es790.js +3 -6
- package/dist/index.es791.js +28 -15
- package/dist/index.es792.js +3 -7
- package/dist/index.es808.js +1 -1
- package/dist/index.es811.js +5 -5
- package/dist/index.es812.js +2 -2
- package/dist/index.es813.js +1 -1
- package/dist/index.es815.js +2 -2
- package/dist/index.es827.js +64 -15
- package/dist/index.es828.js +11 -7
- package/dist/index.es829.js +38 -61
- package/dist/index.es830.js +54 -7
- package/dist/index.es831.js +16 -40
- package/dist/index.es832.js +17 -57
- package/dist/index.es833.js +7 -20
- package/dist/index.es834.js +1 -1
- package/dist/index.es86.js +55 -33
- package/dist/index.es87.js +53 -44
- package/dist/index.es88.js +89 -29
- package/dist/index.es89.js +37 -30
- package/dist/index.es90.js +24 -9
- package/dist/index.es91.js +30 -55
- package/dist/index.es92.js +31 -53
- package/dist/index.es93.js +46 -90
- package/dist/index.es94.js +29 -36
- package/dist/index.es95.js +29 -23
- package/dist/index.es96.js +9 -30
- package/dist/index.es97.js +12 -259
- package/dist/index.es98.js +1062 -12
- package/dist/index.es99.js +2 -2
- package/package.json +1 -1
package/dist/index.es141.js
CHANGED
|
@@ -1,39 +1,207 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import C from "./index.es175.js";
|
|
2
|
+
import x from "./index.es324.js";
|
|
3
|
+
import N from "./index.es325.js";
|
|
4
|
+
import v from "./index.es326.js";
|
|
5
|
+
import A from "./index.es327.js";
|
|
6
|
+
import _ from "./index.es328.js";
|
|
7
|
+
import c from "react";
|
|
8
|
+
import E from "./index.es329.js";
|
|
9
|
+
import { classNamesShape as $ } from "./index.es330.js";
|
|
10
|
+
import { forceReflow as S } from "./index.es331.js";
|
|
11
|
+
var T = function(i, p) {
|
|
12
|
+
return i && p && p.split(" ").forEach(function(s) {
|
|
13
|
+
return A(i, s);
|
|
14
|
+
});
|
|
15
|
+
}, d = function(i, p) {
|
|
16
|
+
return i && p && p.split(" ").forEach(function(s) {
|
|
17
|
+
return _(i, s);
|
|
18
|
+
});
|
|
19
|
+
}, g = /* @__PURE__ */ function(u) {
|
|
20
|
+
N(i, u);
|
|
21
|
+
function i() {
|
|
22
|
+
for (var s, t = arguments.length, a = new Array(t), o = 0; o < t; o++)
|
|
23
|
+
a[o] = arguments[o];
|
|
24
|
+
return s = u.call.apply(u, [this].concat(a)) || this, s.appliedClasses = {
|
|
25
|
+
appear: {},
|
|
26
|
+
enter: {},
|
|
27
|
+
exit: {}
|
|
28
|
+
}, s.onEnter = function(e, r) {
|
|
29
|
+
var n = s.resolveArguments(e, r), l = n[0], m = n[1];
|
|
30
|
+
s.removeClasses(l, "exit"), s.addClass(l, m ? "appear" : "enter", "base"), s.props.onEnter && s.props.onEnter(e, r);
|
|
31
|
+
}, s.onEntering = function(e, r) {
|
|
32
|
+
var n = s.resolveArguments(e, r), l = n[0], m = n[1], f = m ? "appear" : "enter";
|
|
33
|
+
s.addClass(l, f, "active"), s.props.onEntering && s.props.onEntering(e, r);
|
|
34
|
+
}, s.onEntered = function(e, r) {
|
|
35
|
+
var n = s.resolveArguments(e, r), l = n[0], m = n[1], f = m ? "appear" : "enter";
|
|
36
|
+
s.removeClasses(l, f), s.addClass(l, f, "done"), s.props.onEntered && s.props.onEntered(e, r);
|
|
37
|
+
}, s.onExit = function(e) {
|
|
38
|
+
var r = s.resolveArguments(e), n = r[0];
|
|
39
|
+
s.removeClasses(n, "appear"), s.removeClasses(n, "enter"), s.addClass(n, "exit", "base"), s.props.onExit && s.props.onExit(e);
|
|
40
|
+
}, s.onExiting = function(e) {
|
|
41
|
+
var r = s.resolveArguments(e), n = r[0];
|
|
42
|
+
s.addClass(n, "exit", "active"), s.props.onExiting && s.props.onExiting(e);
|
|
43
|
+
}, s.onExited = function(e) {
|
|
44
|
+
var r = s.resolveArguments(e), n = r[0];
|
|
45
|
+
s.removeClasses(n, "exit"), s.addClass(n, "exit", "done"), s.props.onExited && s.props.onExited(e);
|
|
46
|
+
}, s.resolveArguments = function(e, r) {
|
|
47
|
+
return s.props.nodeRef ? [s.props.nodeRef.current, e] : [e, r];
|
|
48
|
+
}, s.getClassNames = function(e) {
|
|
49
|
+
var r = s.props.classNames, n = typeof r == "string", l = n && r ? r + "-" : "", m = n ? "" + l + e : r[e], f = n ? m + "-active" : r[e + "Active"], h = n ? m + "-done" : r[e + "Done"];
|
|
50
|
+
return {
|
|
51
|
+
baseClassName: m,
|
|
52
|
+
activeClassName: f,
|
|
53
|
+
doneClassName: h
|
|
54
|
+
};
|
|
55
|
+
}, s;
|
|
56
|
+
}
|
|
57
|
+
var p = i.prototype;
|
|
58
|
+
return p.addClass = function(t, a, o) {
|
|
59
|
+
var e = this.getClassNames(a)[o + "ClassName"], r = this.getClassNames("enter"), n = r.doneClassName;
|
|
60
|
+
a === "appear" && o === "done" && n && (e += " " + n), o === "active" && t && S(t), e && (this.appliedClasses[a][o] = e, T(t, e));
|
|
61
|
+
}, p.removeClasses = function(t, a) {
|
|
62
|
+
var o = this.appliedClasses[a], e = o.base, r = o.active, n = o.done;
|
|
63
|
+
this.appliedClasses[a] = {}, e && d(t, e), r && d(t, r), n && d(t, n);
|
|
64
|
+
}, p.render = function() {
|
|
65
|
+
var t = this.props;
|
|
66
|
+
t.classNames;
|
|
67
|
+
var a = x(t, ["classNames"]);
|
|
68
|
+
return /* @__PURE__ */ c.createElement(E, C({}, a, {
|
|
69
|
+
onEnter: this.onEnter,
|
|
70
|
+
onEntered: this.onEntered,
|
|
71
|
+
onEntering: this.onEntering,
|
|
72
|
+
onExit: this.onExit,
|
|
73
|
+
onExiting: this.onExiting,
|
|
74
|
+
onExited: this.onExited
|
|
75
|
+
}));
|
|
76
|
+
}, i;
|
|
77
|
+
}(c.Component);
|
|
78
|
+
g.defaultProps = {
|
|
79
|
+
classNames: ""
|
|
80
|
+
};
|
|
81
|
+
g.propTypes = process.env.NODE_ENV !== "production" ? C({}, E.propTypes, {
|
|
82
|
+
/**
|
|
83
|
+
* The animation classNames applied to the component as it appears, enters,
|
|
84
|
+
* exits or has finished the transition. A single name can be provided, which
|
|
85
|
+
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
|
|
86
|
+
*
|
|
87
|
+
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
|
|
88
|
+
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
|
|
89
|
+
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
|
|
90
|
+
*
|
|
91
|
+
* A few details to note about how these classes are applied:
|
|
92
|
+
*
|
|
93
|
+
* 1. They are _joined_ with the ones that are already defined on the child
|
|
94
|
+
* component, so if you want to add some base styles, you can use
|
|
95
|
+
* `className` without worrying that it will be overridden.
|
|
96
|
+
*
|
|
97
|
+
* 2. If the transition component mounts with `in={false}`, no classes are
|
|
98
|
+
* applied yet. You might be expecting `*-exit-done`, but if you think
|
|
99
|
+
* about it, a component cannot finish exiting if it hasn't entered yet.
|
|
100
|
+
*
|
|
101
|
+
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
|
|
102
|
+
* allows you to define different behavior for when appearing is done and
|
|
103
|
+
* when regular entering is done, using selectors like
|
|
104
|
+
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
|
|
105
|
+
* an epic entrance animation when element first appears in the DOM using
|
|
106
|
+
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
|
107
|
+
* simply use `fade-enter-done` for defining both cases.
|
|
108
|
+
*
|
|
109
|
+
* Each individual classNames can also be specified independently like:
|
|
110
|
+
*
|
|
111
|
+
* ```js
|
|
112
|
+
* classNames={{
|
|
113
|
+
* appear: 'my-appear',
|
|
114
|
+
* appearActive: 'my-active-appear',
|
|
115
|
+
* appearDone: 'my-done-appear',
|
|
116
|
+
* enter: 'my-enter',
|
|
117
|
+
* enterActive: 'my-active-enter',
|
|
118
|
+
* enterDone: 'my-done-enter',
|
|
119
|
+
* exit: 'my-exit',
|
|
120
|
+
* exitActive: 'my-active-exit',
|
|
121
|
+
* exitDone: 'my-done-exit',
|
|
122
|
+
* }}
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* If you want to set these classes using CSS Modules:
|
|
126
|
+
*
|
|
127
|
+
* ```js
|
|
128
|
+
* import styles from './styles.css';
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* you might want to use camelCase in your CSS file, that way could simply
|
|
132
|
+
* spread them instead of listing them one by one:
|
|
133
|
+
*
|
|
134
|
+
* ```js
|
|
135
|
+
* classNames={{ ...styles }}
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* @type {string | {
|
|
139
|
+
* appear?: string,
|
|
140
|
+
* appearActive?: string,
|
|
141
|
+
* appearDone?: string,
|
|
142
|
+
* enter?: string,
|
|
143
|
+
* enterActive?: string,
|
|
144
|
+
* enterDone?: string,
|
|
145
|
+
* exit?: string,
|
|
146
|
+
* exitActive?: string,
|
|
147
|
+
* exitDone?: string,
|
|
148
|
+
* }}
|
|
149
|
+
*/
|
|
150
|
+
classNames: $,
|
|
151
|
+
/**
|
|
152
|
+
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
|
153
|
+
* applied.
|
|
154
|
+
*
|
|
155
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
156
|
+
*
|
|
157
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
158
|
+
*/
|
|
159
|
+
onEnter: v.func,
|
|
160
|
+
/**
|
|
161
|
+
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
162
|
+
* 'appear-active' class is applied.
|
|
163
|
+
*
|
|
164
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
165
|
+
*
|
|
166
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
167
|
+
*/
|
|
168
|
+
onEntering: v.func,
|
|
169
|
+
/**
|
|
170
|
+
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
171
|
+
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
172
|
+
*
|
|
173
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
174
|
+
*
|
|
175
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
176
|
+
*/
|
|
177
|
+
onEntered: v.func,
|
|
178
|
+
/**
|
|
179
|
+
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
180
|
+
* applied.
|
|
181
|
+
*
|
|
182
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
183
|
+
*
|
|
184
|
+
* @type Function(node: HtmlElement)
|
|
185
|
+
*/
|
|
186
|
+
onExit: v.func,
|
|
187
|
+
/**
|
|
188
|
+
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
189
|
+
*
|
|
190
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
191
|
+
*
|
|
192
|
+
* @type Function(node: HtmlElement)
|
|
193
|
+
*/
|
|
194
|
+
onExiting: v.func,
|
|
195
|
+
/**
|
|
196
|
+
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
197
|
+
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
198
|
+
*
|
|
199
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
200
|
+
*
|
|
201
|
+
* @type Function(node: HtmlElement)
|
|
202
|
+
*/
|
|
203
|
+
onExited: v.func
|
|
204
|
+
}) : {};
|
|
37
205
|
export {
|
|
38
|
-
|
|
206
|
+
g as default
|
|
39
207
|
};
|
package/dist/index.es142.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
function o(t) {
|
|
3
|
+
const e = r.useRef(t);
|
|
4
|
+
return r.useEffect(() => {
|
|
5
|
+
e.current = t;
|
|
6
|
+
}), r.useMemo(() => (...n) => {
|
|
7
|
+
var u;
|
|
8
|
+
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
|
9
|
+
}, []);
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
o as useCallbackRef
|
|
13
13
|
};
|
package/dist/index.es143.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return c == null ? void 0 : c(s);
|
|
5
|
-
};
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
4
|
}
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
o as commonjsGlobal,
|
|
7
|
+
l as getDefaultExportFromCjs
|
|
9
8
|
};
|
package/dist/index.es144.js
CHANGED
|
@@ -1,67 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { j as C } from "./index.es82.js";
|
|
3
|
-
function $(e, c) {
|
|
4
|
-
const o = u.createContext(c);
|
|
5
|
-
function a(r) {
|
|
6
|
-
const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
|
|
7
|
-
return /* @__PURE__ */ C.jsx(o.Provider, { value: s, children: t });
|
|
8
|
-
}
|
|
9
|
-
function i(r) {
|
|
10
|
-
const t = u.useContext(o);
|
|
11
|
-
if (t) return t;
|
|
12
|
-
if (c !== void 0) return c;
|
|
13
|
-
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
|
14
|
-
}
|
|
15
|
-
return a.displayName = e + "Provider", [a, i];
|
|
16
|
-
}
|
|
17
|
-
function j(e, c = []) {
|
|
18
|
-
let o = [];
|
|
19
|
-
function a(r, t) {
|
|
20
|
-
const n = u.createContext(t), s = o.length;
|
|
21
|
-
o = [...o, t];
|
|
22
|
-
function d(m) {
|
|
23
|
-
const { scope: x, children: f, ...p } = m, S = (x == null ? void 0 : x[e][s]) || n, h = u.useMemo(() => p, Object.values(p));
|
|
24
|
-
return /* @__PURE__ */ C.jsx(S.Provider, { value: h, children: f });
|
|
25
|
-
}
|
|
26
|
-
function v(m, x) {
|
|
27
|
-
const f = (x == null ? void 0 : x[e][s]) || n, p = u.useContext(f);
|
|
28
|
-
if (p) return p;
|
|
29
|
-
if (t !== void 0) return t;
|
|
30
|
-
throw new Error(`\`${m}\` must be used within \`${r}\``);
|
|
31
|
-
}
|
|
32
|
-
return d.displayName = r + "Provider", [d, v];
|
|
33
|
-
}
|
|
34
|
-
const i = () => {
|
|
35
|
-
const r = o.map((t) => u.createContext(t));
|
|
36
|
-
return function(n) {
|
|
37
|
-
const s = (n == null ? void 0 : n[e]) || r;
|
|
38
|
-
return u.useMemo(
|
|
39
|
-
() => ({ [`__scope${e}`]: { ...n, [e]: s } }),
|
|
40
|
-
[n, s]
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
return i.scopeName = e, [a, P(i, ...c)];
|
|
45
|
-
}
|
|
46
|
-
function P(...e) {
|
|
47
|
-
const c = e[0];
|
|
48
|
-
if (e.length === 1) return c;
|
|
49
|
-
const o = () => {
|
|
50
|
-
const a = e.map((i) => ({
|
|
51
|
-
useScope: i(),
|
|
52
|
-
scopeName: i.scopeName
|
|
53
|
-
}));
|
|
54
|
-
return function(r) {
|
|
55
|
-
const t = a.reduce((n, { useScope: s, scopeName: d }) => {
|
|
56
|
-
const m = s(r)[`__scope${d}`];
|
|
57
|
-
return { ...n, ...m };
|
|
58
|
-
}, {});
|
|
59
|
-
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
return o.scopeName = c.scopeName, o;
|
|
63
|
-
}
|
|
1
|
+
var o = { exports: {} };
|
|
64
2
|
export {
|
|
65
|
-
|
|
66
|
-
j as createContextScope
|
|
3
|
+
o as __module
|
|
67
4
|
};
|
package/dist/index.es145.js
CHANGED
|
@@ -1,13 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { validateFieldsNatively as v, toNestErrors as d } from "./index.es241.js";
|
|
2
|
+
import { appendErrors as h } from "./index.es98.js";
|
|
3
|
+
var m = function(t, u) {
|
|
4
|
+
for (var o = {}; t.length; ) {
|
|
5
|
+
var r = t[0], c = r.code, n = r.message, e = r.path.join(".");
|
|
6
|
+
if (!o[e]) if ("unionErrors" in r) {
|
|
7
|
+
var s = r.unionErrors[0].errors[0];
|
|
8
|
+
o[e] = { message: s.message, type: s.code };
|
|
9
|
+
} else o[e] = { message: n, type: c };
|
|
10
|
+
if ("unionErrors" in r && r.unionErrors.forEach(function(f) {
|
|
11
|
+
return f.errors.forEach(function(l) {
|
|
12
|
+
return t.push(l);
|
|
13
|
+
});
|
|
14
|
+
}), u) {
|
|
15
|
+
var i = o[e].types, a = i && i[r.code];
|
|
16
|
+
o[e] = h(e, u, o, c, a ? [].concat(a, r.message) : r.message);
|
|
17
|
+
}
|
|
18
|
+
t.shift();
|
|
19
|
+
}
|
|
20
|
+
return o;
|
|
21
|
+
}, E = function(t, u, o) {
|
|
22
|
+
return o === void 0 && (o = {}), function(r, c, n) {
|
|
23
|
+
try {
|
|
24
|
+
return Promise.resolve(function(e, s) {
|
|
25
|
+
try {
|
|
26
|
+
var i = Promise.resolve(t[o.mode === "sync" ? "parse" : "parseAsync"](r, u)).then(function(a) {
|
|
27
|
+
return n.shouldUseNativeValidation && v({}, n), { errors: {}, values: o.raw ? r : a };
|
|
28
|
+
});
|
|
29
|
+
} catch (a) {
|
|
30
|
+
return s(a);
|
|
31
|
+
}
|
|
32
|
+
return i && i.then ? i.then(void 0, s) : i;
|
|
33
|
+
}(0, function(e) {
|
|
34
|
+
if (function(s) {
|
|
35
|
+
return Array.isArray(s == null ? void 0 : s.errors);
|
|
36
|
+
}(e)) return { values: {}, errors: d(m(e.errors, !n.shouldUseNativeValidation && n.criteriaMode === "all"), n) };
|
|
37
|
+
throw e;
|
|
38
|
+
}));
|
|
39
|
+
} catch (e) {
|
|
40
|
+
return Promise.reject(e);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
11
44
|
export {
|
|
12
|
-
|
|
45
|
+
E as zodResolver
|
|
13
46
|
};
|
package/dist/index.es146.js
CHANGED
|
@@ -1,127 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useCallbackRef as w } from "./index.es139.js";
|
|
6
|
-
import { useEscapeKeydown as U } from "./index.es240.js";
|
|
7
|
-
import { j as x } from "./index.es82.js";
|
|
8
|
-
var j = "DismissableLayer", p = "dismissableLayer.update", z = "dismissableLayer.pointerDownOutside", H = "dismissableLayer.focusOutside", L, T = n.createContext({
|
|
9
|
-
layers: /* @__PURE__ */ new Set(),
|
|
10
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
11
|
-
branches: /* @__PURE__ */ new Set()
|
|
12
|
-
}), M = n.forwardRef(
|
|
13
|
-
(r, e) => {
|
|
14
|
-
const {
|
|
15
|
-
disableOutsidePointerEvents: i = !1,
|
|
16
|
-
onEscapeKeyDown: o,
|
|
17
|
-
onPointerDownOutside: t,
|
|
18
|
-
onFocusOutside: a,
|
|
19
|
-
onInteractOutside: l,
|
|
20
|
-
onDismiss: d,
|
|
21
|
-
...v
|
|
22
|
-
} = r, c = n.useContext(T), [u, S] = n.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = n.useState({}), W = g(e, (s) => S(s)), y = Array.from(c.layers), [A] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), N = y.indexOf(A), b = u ? y.indexOf(u) : -1, I = c.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= N, _ = q((s) => {
|
|
23
|
-
const E = s.target, C = [...c.branches].some((h) => h.contains(E));
|
|
24
|
-
!P || C || (t == null || t(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
25
|
-
}, f), D = G((s) => {
|
|
26
|
-
const E = s.target;
|
|
27
|
-
[...c.branches].some((h) => h.contains(E)) || (a == null || a(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
28
|
-
}, f);
|
|
29
|
-
return U((s) => {
|
|
30
|
-
b === c.layers.size - 1 && (o == null || o(s), !s.defaultPrevented && d && (s.preventDefault(), d()));
|
|
31
|
-
}, f), n.useEffect(() => {
|
|
32
|
-
if (u)
|
|
33
|
-
return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), O(), () => {
|
|
34
|
-
i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
|
|
35
|
-
};
|
|
36
|
-
}, [u, f, i, c]), n.useEffect(() => () => {
|
|
37
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
|
|
38
|
-
}, [u, c]), n.useEffect(() => {
|
|
39
|
-
const s = () => F({});
|
|
40
|
-
return document.addEventListener(p, s), () => document.removeEventListener(p, s);
|
|
41
|
-
}, []), /* @__PURE__ */ x.jsx(
|
|
42
|
-
R.div,
|
|
43
|
-
{
|
|
44
|
-
...v,
|
|
45
|
-
ref: W,
|
|
46
|
-
style: {
|
|
47
|
-
pointerEvents: I ? P ? "auto" : "none" : void 0,
|
|
48
|
-
...r.style
|
|
49
|
-
},
|
|
50
|
-
onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
|
|
51
|
-
onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
|
|
52
|
-
onPointerDownCapture: m(
|
|
53
|
-
r.onPointerDownCapture,
|
|
54
|
-
_.onPointerDownCapture
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
M.displayName = j;
|
|
61
|
-
var X = "DismissableLayerBranch", Y = n.forwardRef((r, e) => {
|
|
62
|
-
const i = n.useContext(T), o = n.useRef(null), t = g(e, o);
|
|
63
|
-
return n.useEffect(() => {
|
|
64
|
-
const a = o.current;
|
|
65
|
-
if (a)
|
|
66
|
-
return i.branches.add(a), () => {
|
|
67
|
-
i.branches.delete(a);
|
|
68
|
-
};
|
|
69
|
-
}, [i.branches]), /* @__PURE__ */ x.jsx(R.div, { ...r, ref: t });
|
|
70
|
-
});
|
|
71
|
-
Y.displayName = X;
|
|
72
|
-
function q(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
73
|
-
const i = w(r), o = n.useRef(!1), t = n.useRef(() => {
|
|
74
|
-
});
|
|
75
|
-
return n.useEffect(() => {
|
|
76
|
-
const a = (d) => {
|
|
77
|
-
if (d.target && !o.current) {
|
|
78
|
-
let v = function() {
|
|
79
|
-
B(
|
|
80
|
-
z,
|
|
81
|
-
i,
|
|
82
|
-
c,
|
|
83
|
-
{ discrete: !0 }
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
const c = { originalEvent: d };
|
|
87
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = v, e.addEventListener("click", t.current, { once: !0 })) : v();
|
|
88
|
-
} else
|
|
89
|
-
e.removeEventListener("click", t.current);
|
|
90
|
-
o.current = !1;
|
|
91
|
-
}, l = window.setTimeout(() => {
|
|
92
|
-
e.addEventListener("pointerdown", a);
|
|
93
|
-
}, 0);
|
|
94
|
-
return () => {
|
|
95
|
-
window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", t.current);
|
|
96
|
-
};
|
|
97
|
-
}, [e, i]), {
|
|
98
|
-
// ensures we check React component tree (not just DOM tree)
|
|
99
|
-
onPointerDownCapture: () => o.current = !0
|
|
1
|
+
function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
|
|
2
|
+
return function(s) {
|
|
3
|
+
if (f == null || f(s), p === !1 || !s.defaultPrevented)
|
|
4
|
+
return c == null ? void 0 : c(s);
|
|
100
5
|
};
|
|
101
6
|
}
|
|
102
|
-
function G(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
103
|
-
const i = w(r), o = n.useRef(!1);
|
|
104
|
-
return n.useEffect(() => {
|
|
105
|
-
const t = (a) => {
|
|
106
|
-
a.target && !o.current && B(H, i, { originalEvent: a }, {
|
|
107
|
-
discrete: !1
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
|
|
111
|
-
}, [e, i]), {
|
|
112
|
-
onFocusCapture: () => o.current = !0,
|
|
113
|
-
onBlurCapture: () => o.current = !1
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function O() {
|
|
117
|
-
const r = new CustomEvent(p);
|
|
118
|
-
document.dispatchEvent(r);
|
|
119
|
-
}
|
|
120
|
-
function B(r, e, i, { discrete: o }) {
|
|
121
|
-
const t = i.originalEvent.target, a = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: i });
|
|
122
|
-
e && t.addEventListener(r, e, { once: !0 }), o ? k(t, a) : t.dispatchEvent(a);
|
|
123
|
-
}
|
|
124
7
|
export {
|
|
125
|
-
|
|
126
|
-
Y as DismissableLayerBranch
|
|
8
|
+
h as composeEventHandlers
|
|
127
9
|
};
|