@amateescu/portal-ui-components 0.0.47 → 0.0.49
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/Box-DU079Glg.js +57 -0
- package/dist/{Button-Bx3LbSbV.js → Button-BgsadnaR.js} +13 -13
- package/dist/{ButtonBase-DV7q7wxh.js → ButtonBase-ugYh038t.js} +8 -8
- package/dist/{CheckBox-YBX2j1qt.js → CheckBox-D9YmAV-l.js} +1 -1
- package/dist/{CircularProgress-BXi3nXc9.js → CircularProgress-D1FWO7Cz.js} +1 -1
- package/dist/{Clear-Bz9hw2Wj.js → Clear-B32X2R1T.js} +1 -1
- package/dist/Close-IqnCWZPM.js +8 -0
- package/dist/{DefaultPropsProvider-ByENA_w0.js → DefaultPropsProvider-BQx1AiAq.js} +20 -19
- package/dist/ExpandMore-CHNJSd5N.js +8 -0
- package/dist/ListItem-1DiNy9oq.js +422 -0
- package/dist/ListItemText-VX0lo95z.js +434 -0
- package/dist/Modal-BnD35xWv.js +1325 -0
- package/dist/{Search-D_9Ptbky.js → Search-DnJ3yLMg.js} +1 -1
- package/dist/assets/PassportDateRangeWrapper.css +1 -1
- package/dist/assets/PassportFilter.css +1 -0
- package/dist/assets/PassportFilterDrawer.css +1 -0
- package/dist/assets/PassportFilterFreeTextFilter.css +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.js +8 -60
- package/dist/components/Login/Login.js +1 -1
- package/dist/components/PassportButton/PassportButton.js +1 -1
- package/dist/components/PassportDatePicker/PassportDatePicker.js +21 -20
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.js +298 -291
- package/dist/components/PassportDatesFilter/PassportDatesFilter.js +24 -26
- package/dist/components/PassportFilter/PassportFilter.d.ts +5 -0
- package/dist/components/PassportFilter/PassportFilter.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilter.js +154 -0
- package/dist/components/PassportFilter/PassportFilter.stories.d.ts +13 -0
- package/dist/components/PassportFilter/PassportFilter.stories.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilter.types.d.ts +61 -0
- package/dist/components/PassportFilter/PassportFilter.types.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilter.types.js +5 -0
- package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.d.ts +5 -0
- package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.js +756 -0
- package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.types.d.ts +28 -0
- package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.types.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterDrawer/PassportFilterDrawer.types.js +1 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.d.ts +4 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.js +94 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.types.d.ts +16 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.types.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextButtons/PassportFilterFreeTextButtons.types.js +1 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.d.ts +4 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.js +736 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.types.d.ts +37 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.types.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterFreeTextFilter/PassportFilterFreeTextFilter.types.js +1 -0
- package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.d.ts +4 -0
- package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.js +180 -0
- package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.types.d.ts +17 -0
- package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.types.d.ts.map +1 -0
- package/dist/components/PassportFilter/PassportFilterSelectionList/PassportFilterSelectionList.types.js +1 -0
- package/dist/components/PassportInput/PassportInput.js +2 -2
- package/dist/components/PassportMultiSelect/PassportMultiSelect.js +1 -1
- package/dist/components/PassportPagination/PassportPagination.js +96 -94
- package/dist/components/PassportSearchableMultiSelect/PassportSearchableMultiSelect.js +1 -1
- package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.js +1 -1
- package/dist/components/PassportTreeSelect/PassportTreeSelect.js +82 -79
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/{createSvgIcon-D5xeIEZ_.js → createSvgIcon-Crk7qT6j.js} +1 -1
- package/dist/{extendSxProp-BtJlbIOl.js → extendSxProp-BHclE0DL.js} +1 -1
- package/dist/getReactElementRef-CIbXfZbo.js +45 -0
- package/dist/index-DfCFE9GG.js +9 -0
- package/dist/listItemButtonClasses-BLTBU8Yh.js +476 -0
- package/dist/listItemIconClasses-B_UAYnw7.js +9 -0
- package/dist/listItemTextClasses-D5in-Wsc.js +9 -0
- package/dist/main.js +41 -37
- package/dist/portal-utils/arrays.d.ts +2 -0
- package/dist/portal-utils/arrays.d.ts.map +1 -0
- package/dist/portal-utils/arrays.js +10 -0
- package/dist/portal-utils/index.d.ts +1 -0
- package/dist/portal-utils/index.d.ts.map +1 -1
- package/dist/portal-utils/index.js +17 -15
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/useControlled-D1L5tREc.js +31 -0
- package/dist/useFormControl-Ivp9nwoj.js +53 -0
- package/dist/{useMobilePicker-CFsW9hUG.js → useMobilePicker-BombQ5QA.js} +5381 -7587
- package/dist/useSlot-B1oIMjd_.js +126 -0
- package/dist/useTheme-9dlwNzrD.js +10 -0
- package/dist/{useTheme-Cz8ZipjJ.js → useTheme-Dxbczges.js} +3 -3
- package/dist/useThemeProps-j6Er0aGl.js +27 -0
- package/dist/{useFormControl-MVwkyimi.js → utils-6k-H8qFR.js} +155 -231
- package/package.json +1 -1
- package/dist/useSlot-Bm5YJQBR.js +0 -160
|
@@ -1,171 +1,126 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { c as y, P as s } from "./DefaultPropsProvider-BQx1AiAq.js";
|
|
2
|
+
import { _ as C, b as R, T as O } from "./ButtonBase-ugYh038t.js";
|
|
2
3
|
import v from "react";
|
|
3
|
-
import { r as M, n as O, T as D, c as y, P as a } from "./DefaultPropsProvider-ByENA_w0.js";
|
|
4
|
-
import { u as R } from "./useTheme-Cz8ZipjJ.js";
|
|
5
|
-
import { b as I, _ as k, T as S, u as L } from "./ButtonBase-DV7q7wxh.js";
|
|
6
4
|
import N from "react-dom";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
theme: i,
|
|
11
|
-
name: u,
|
|
12
|
-
props: n
|
|
13
|
-
} = s;
|
|
14
|
-
return !i || !i.components || !i.components[u] || !i.components[u].defaultProps ? n : M(i.components[u].defaultProps, n);
|
|
15
|
-
}
|
|
16
|
-
function G({
|
|
17
|
-
props: s,
|
|
18
|
-
name: i,
|
|
19
|
-
defaultTheme: u,
|
|
20
|
-
themeId: n
|
|
21
|
-
}) {
|
|
22
|
-
let e = R(u);
|
|
23
|
-
return e = e[n] || e, U({
|
|
24
|
-
theme: e,
|
|
25
|
-
name: i,
|
|
26
|
-
props: s
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function J() {
|
|
30
|
-
const s = R(O);
|
|
31
|
-
return process.env.NODE_ENV !== "production" && b.useDebugValue(s), s[D] || s;
|
|
32
|
-
}
|
|
33
|
-
function K({
|
|
34
|
-
props: s,
|
|
35
|
-
name: i
|
|
36
|
-
}) {
|
|
37
|
-
return G({
|
|
38
|
-
props: s,
|
|
39
|
-
name: i,
|
|
40
|
-
defaultTheme: O,
|
|
41
|
-
themeId: D
|
|
42
|
-
});
|
|
5
|
+
function A(o, u) {
|
|
6
|
+
const a = o.charCodeAt(2);
|
|
7
|
+
return o[0] === "o" && o[1] === "n" && a >= 65 && a <= 90 && typeof u == "function";
|
|
43
8
|
}
|
|
44
|
-
function
|
|
45
|
-
if (
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
return s[0] === "o" && s[1] === "n" && u >= 65 && u <= 90 && typeof i == "function";
|
|
53
|
-
}
|
|
54
|
-
function Y(s, i) {
|
|
55
|
-
if (!s)
|
|
56
|
-
return i;
|
|
57
|
-
function u(r, o) {
|
|
58
|
-
const p = {};
|
|
59
|
-
return Object.keys(o).forEach((c) => {
|
|
60
|
-
V(c, o[c]) && typeof r[c] == "function" && (p[c] = (...f) => {
|
|
61
|
-
r[c](...f), o[c](...f);
|
|
9
|
+
function U(o, u) {
|
|
10
|
+
if (!o)
|
|
11
|
+
return u;
|
|
12
|
+
function a(n, r) {
|
|
13
|
+
const c = {};
|
|
14
|
+
return Object.keys(r).forEach((f) => {
|
|
15
|
+
A(f, r[f]) && typeof n[f] == "function" && (c[f] = (...p) => {
|
|
16
|
+
n[f](...p), r[f](...p);
|
|
62
17
|
});
|
|
63
|
-
}),
|
|
18
|
+
}), c;
|
|
64
19
|
}
|
|
65
|
-
if (typeof
|
|
66
|
-
return (
|
|
67
|
-
const
|
|
68
|
-
...
|
|
69
|
-
...
|
|
70
|
-
}) :
|
|
20
|
+
if (typeof o == "function" || typeof u == "function")
|
|
21
|
+
return (n) => {
|
|
22
|
+
const r = typeof u == "function" ? u(n) : u, c = typeof o == "function" ? o({
|
|
23
|
+
...n,
|
|
24
|
+
...r
|
|
25
|
+
}) : o, f = y(n?.className, r?.className, c?.className), p = a(c, r);
|
|
71
26
|
return {
|
|
72
|
-
...
|
|
27
|
+
...r,
|
|
28
|
+
...c,
|
|
73
29
|
...p,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
className: c
|
|
30
|
+
...!!f && {
|
|
31
|
+
className: f
|
|
77
32
|
},
|
|
78
|
-
...
|
|
33
|
+
...r?.style && c?.style && {
|
|
79
34
|
style: {
|
|
80
|
-
...
|
|
81
|
-
...
|
|
35
|
+
...r.style,
|
|
36
|
+
...c.style
|
|
82
37
|
}
|
|
83
38
|
},
|
|
84
|
-
...
|
|
85
|
-
sx: [...Array.isArray(
|
|
39
|
+
...r?.sx && c?.sx && {
|
|
40
|
+
sx: [...Array.isArray(r.sx) ? r.sx : [r.sx], ...Array.isArray(c.sx) ? c.sx : [c.sx]]
|
|
86
41
|
}
|
|
87
42
|
};
|
|
88
43
|
};
|
|
89
|
-
const
|
|
44
|
+
const i = u, e = a(o, i), t = y(i?.className, o?.className);
|
|
90
45
|
return {
|
|
91
|
-
...
|
|
92
|
-
...
|
|
46
|
+
...u,
|
|
47
|
+
...o,
|
|
93
48
|
...e,
|
|
94
49
|
...!!t && {
|
|
95
50
|
className: t
|
|
96
51
|
},
|
|
97
|
-
...
|
|
52
|
+
...i?.style && o?.style && {
|
|
98
53
|
style: {
|
|
99
|
-
...
|
|
100
|
-
...
|
|
54
|
+
...i.style,
|
|
55
|
+
...o.style
|
|
101
56
|
}
|
|
102
57
|
},
|
|
103
|
-
...
|
|
104
|
-
sx: [...Array.isArray(
|
|
58
|
+
...i?.sx && o?.sx && {
|
|
59
|
+
sx: [...Array.isArray(i.sx) ? i.sx : [i.sx], ...Array.isArray(o.sx) ? o.sx : [o.sx]]
|
|
105
60
|
}
|
|
106
61
|
};
|
|
107
62
|
}
|
|
108
|
-
const
|
|
63
|
+
const T = {
|
|
109
64
|
disabled: !1
|
|
110
65
|
};
|
|
111
|
-
var
|
|
112
|
-
enter:
|
|
113
|
-
exit:
|
|
114
|
-
appear:
|
|
115
|
-
}).isRequired]) : null,
|
|
116
|
-
enter:
|
|
117
|
-
exit:
|
|
118
|
-
active:
|
|
119
|
-
}),
|
|
120
|
-
enter:
|
|
121
|
-
enterDone:
|
|
122
|
-
enterActive:
|
|
123
|
-
exit:
|
|
124
|
-
exitDone:
|
|
125
|
-
exitActive:
|
|
126
|
-
})]) : null,
|
|
127
|
-
return
|
|
128
|
-
}, x = "unmounted", d = "exited",
|
|
129
|
-
|
|
130
|
-
function i
|
|
66
|
+
var M = process.env.NODE_ENV !== "production" ? s.oneOfType([s.number, s.shape({
|
|
67
|
+
enter: s.number,
|
|
68
|
+
exit: s.number,
|
|
69
|
+
appear: s.number
|
|
70
|
+
}).isRequired]) : null, G = process.env.NODE_ENV !== "production" ? s.oneOfType([s.string, s.shape({
|
|
71
|
+
enter: s.string,
|
|
72
|
+
exit: s.string,
|
|
73
|
+
active: s.string
|
|
74
|
+
}), s.shape({
|
|
75
|
+
enter: s.string,
|
|
76
|
+
enterDone: s.string,
|
|
77
|
+
enterActive: s.string,
|
|
78
|
+
exit: s.string,
|
|
79
|
+
exitDone: s.string,
|
|
80
|
+
exitActive: s.string
|
|
81
|
+
})]) : null, L = function(u) {
|
|
82
|
+
return u.scrollTop;
|
|
83
|
+
}, x = "unmounted", d = "exited", E = "entering", m = "entered", b = "exiting", l = /* @__PURE__ */ (function(o) {
|
|
84
|
+
C(u, o);
|
|
85
|
+
function u(i, e) {
|
|
131
86
|
var t;
|
|
132
|
-
t =
|
|
133
|
-
var
|
|
134
|
-
return t.appearStatus = null,
|
|
135
|
-
status:
|
|
87
|
+
t = o.call(this, i, e) || this;
|
|
88
|
+
var n = e, r = n && !n.isMounting ? i.enter : i.appear, c;
|
|
89
|
+
return t.appearStatus = null, i.in ? r ? (c = d, t.appearStatus = E) : c = m : i.unmountOnExit || i.mountOnEnter ? c = x : c = d, t.state = {
|
|
90
|
+
status: c
|
|
136
91
|
}, t.nextCallback = null, t;
|
|
137
92
|
}
|
|
138
|
-
|
|
139
|
-
var
|
|
140
|
-
return
|
|
93
|
+
u.getDerivedStateFromProps = function(e, t) {
|
|
94
|
+
var n = e.in;
|
|
95
|
+
return n && t.status === x ? {
|
|
141
96
|
status: d
|
|
142
97
|
} : null;
|
|
143
98
|
};
|
|
144
|
-
var
|
|
145
|
-
return
|
|
99
|
+
var a = u.prototype;
|
|
100
|
+
return a.componentDidMount = function() {
|
|
146
101
|
this.updateStatus(!0, this.appearStatus);
|
|
147
|
-
},
|
|
102
|
+
}, a.componentDidUpdate = function(e) {
|
|
148
103
|
var t = null;
|
|
149
104
|
if (e !== this.props) {
|
|
150
|
-
var
|
|
151
|
-
this.props.in ?
|
|
105
|
+
var n = this.state.status;
|
|
106
|
+
this.props.in ? n !== E && n !== m && (t = E) : (n === E || n === m) && (t = b);
|
|
152
107
|
}
|
|
153
108
|
this.updateStatus(!1, t);
|
|
154
|
-
},
|
|
109
|
+
}, a.componentWillUnmount = function() {
|
|
155
110
|
this.cancelNextCallback();
|
|
156
|
-
},
|
|
157
|
-
var e = this.props.timeout, t,
|
|
158
|
-
return t =
|
|
111
|
+
}, a.getTimeouts = function() {
|
|
112
|
+
var e = this.props.timeout, t, n, r;
|
|
113
|
+
return t = n = r = e, e != null && typeof e != "number" && (t = e.exit, n = e.enter, r = e.appear !== void 0 ? e.appear : n), {
|
|
159
114
|
exit: t,
|
|
160
|
-
enter:
|
|
161
|
-
appear:
|
|
115
|
+
enter: n,
|
|
116
|
+
appear: r
|
|
162
117
|
};
|
|
163
|
-
},
|
|
118
|
+
}, a.updateStatus = function(e, t) {
|
|
164
119
|
if (e === void 0 && (e = !1), t !== null)
|
|
165
|
-
if (this.cancelNextCallback(), t ===
|
|
120
|
+
if (this.cancelNextCallback(), t === E) {
|
|
166
121
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
167
|
-
var
|
|
168
|
-
|
|
122
|
+
var n = this.props.nodeRef ? this.props.nodeRef.current : N.findDOMNode(this);
|
|
123
|
+
n && L(n);
|
|
169
124
|
}
|
|
170
125
|
this.performEnter(e);
|
|
171
126
|
} else
|
|
@@ -173,87 +128,87 @@ var q = process.env.NODE_ENV !== "production" ? a.oneOfType([a.number, a.shape({
|
|
|
173
128
|
else this.props.unmountOnExit && this.state.status === d && this.setState({
|
|
174
129
|
status: x
|
|
175
130
|
});
|
|
176
|
-
},
|
|
177
|
-
var t = this,
|
|
178
|
-
if (!e && !
|
|
131
|
+
}, a.performEnter = function(e) {
|
|
132
|
+
var t = this, n = this.props.enter, r = this.context ? this.context.isMounting : e, c = this.props.nodeRef ? [r] : [N.findDOMNode(this), r], f = c[0], p = c[1], g = this.getTimeouts(), D = r ? g.appear : g.enter;
|
|
133
|
+
if (!e && !n || T.disabled) {
|
|
179
134
|
this.safeSetState({
|
|
180
|
-
status:
|
|
135
|
+
status: m
|
|
181
136
|
}, function() {
|
|
182
|
-
t.props.onEntered(
|
|
137
|
+
t.props.onEntered(f);
|
|
183
138
|
});
|
|
184
139
|
return;
|
|
185
140
|
}
|
|
186
|
-
this.props.onEnter(
|
|
187
|
-
status:
|
|
141
|
+
this.props.onEnter(f, p), this.safeSetState({
|
|
142
|
+
status: E
|
|
188
143
|
}, function() {
|
|
189
|
-
t.props.onEntering(
|
|
144
|
+
t.props.onEntering(f, p), t.onTransitionEnd(D, function() {
|
|
190
145
|
t.safeSetState({
|
|
191
|
-
status:
|
|
146
|
+
status: m
|
|
192
147
|
}, function() {
|
|
193
|
-
t.props.onEntered(
|
|
148
|
+
t.props.onEntered(f, p);
|
|
194
149
|
});
|
|
195
150
|
});
|
|
196
151
|
});
|
|
197
|
-
},
|
|
198
|
-
var e = this, t = this.props.exit,
|
|
199
|
-
if (!t ||
|
|
152
|
+
}, a.performExit = function() {
|
|
153
|
+
var e = this, t = this.props.exit, n = this.getTimeouts(), r = this.props.nodeRef ? void 0 : N.findDOMNode(this);
|
|
154
|
+
if (!t || T.disabled) {
|
|
200
155
|
this.safeSetState({
|
|
201
156
|
status: d
|
|
202
157
|
}, function() {
|
|
203
|
-
e.props.onExited(
|
|
158
|
+
e.props.onExited(r);
|
|
204
159
|
});
|
|
205
160
|
return;
|
|
206
161
|
}
|
|
207
|
-
this.props.onExit(
|
|
208
|
-
status:
|
|
162
|
+
this.props.onExit(r), this.safeSetState({
|
|
163
|
+
status: b
|
|
209
164
|
}, function() {
|
|
210
|
-
e.props.onExiting(
|
|
165
|
+
e.props.onExiting(r), e.onTransitionEnd(n.exit, function() {
|
|
211
166
|
e.safeSetState({
|
|
212
167
|
status: d
|
|
213
168
|
}, function() {
|
|
214
|
-
e.props.onExited(
|
|
169
|
+
e.props.onExited(r);
|
|
215
170
|
});
|
|
216
171
|
});
|
|
217
172
|
});
|
|
218
|
-
},
|
|
173
|
+
}, a.cancelNextCallback = function() {
|
|
219
174
|
this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
220
|
-
},
|
|
175
|
+
}, a.safeSetState = function(e, t) {
|
|
221
176
|
t = this.setNextCallback(t), this.setState(e, t);
|
|
222
|
-
},
|
|
223
|
-
var t = this,
|
|
224
|
-
return this.nextCallback = function(
|
|
225
|
-
|
|
177
|
+
}, a.setNextCallback = function(e) {
|
|
178
|
+
var t = this, n = !0;
|
|
179
|
+
return this.nextCallback = function(r) {
|
|
180
|
+
n && (n = !1, t.nextCallback = null, e(r));
|
|
226
181
|
}, this.nextCallback.cancel = function() {
|
|
227
|
-
|
|
182
|
+
n = !1;
|
|
228
183
|
}, this.nextCallback;
|
|
229
|
-
},
|
|
184
|
+
}, a.onTransitionEnd = function(e, t) {
|
|
230
185
|
this.setNextCallback(t);
|
|
231
|
-
var
|
|
232
|
-
if (!
|
|
186
|
+
var n = this.props.nodeRef ? this.props.nodeRef.current : N.findDOMNode(this), r = e == null && !this.props.addEndListener;
|
|
187
|
+
if (!n || r) {
|
|
233
188
|
setTimeout(this.nextCallback, 0);
|
|
234
189
|
return;
|
|
235
190
|
}
|
|
236
191
|
if (this.props.addEndListener) {
|
|
237
|
-
var
|
|
238
|
-
this.props.addEndListener(
|
|
192
|
+
var c = this.props.nodeRef ? [this.nextCallback] : [n, this.nextCallback], f = c[0], p = c[1];
|
|
193
|
+
this.props.addEndListener(f, p);
|
|
239
194
|
}
|
|
240
195
|
e != null && setTimeout(this.nextCallback, e);
|
|
241
|
-
},
|
|
196
|
+
}, a.render = function() {
|
|
242
197
|
var e = this.state.status;
|
|
243
198
|
if (e === x)
|
|
244
199
|
return null;
|
|
245
|
-
var t = this.props,
|
|
200
|
+
var t = this.props, n = t.children;
|
|
246
201
|
t.in, t.mountOnEnter, t.unmountOnExit, t.appear, t.enter, t.exit, t.timeout, t.addEndListener, t.onEnter, t.onEntering, t.onEntered, t.onExit, t.onExiting, t.onExited, t.nodeRef;
|
|
247
|
-
var
|
|
202
|
+
var r = R(t, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
248
203
|
return (
|
|
249
204
|
// allows for nested Transitions
|
|
250
|
-
/* @__PURE__ */ v.createElement(
|
|
205
|
+
/* @__PURE__ */ v.createElement(O.Provider, {
|
|
251
206
|
value: null
|
|
252
|
-
}, typeof
|
|
207
|
+
}, typeof n == "function" ? n(e, r) : v.cloneElement(v.Children.only(n), r))
|
|
253
208
|
);
|
|
254
|
-
},
|
|
209
|
+
}, u;
|
|
255
210
|
})(v.Component);
|
|
256
|
-
l.contextType =
|
|
211
|
+
l.contextType = O;
|
|
257
212
|
l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
258
213
|
/**
|
|
259
214
|
* A React reference to DOM element that need to transition:
|
|
@@ -266,10 +221,10 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
266
221
|
* (see
|
|
267
222
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
268
223
|
*/
|
|
269
|
-
nodeRef:
|
|
270
|
-
current: typeof Element > "u" ?
|
|
271
|
-
var
|
|
272
|
-
return
|
|
224
|
+
nodeRef: s.shape({
|
|
225
|
+
current: typeof Element > "u" ? s.any : function(o, u, a, i, e, t) {
|
|
226
|
+
var n = o[u];
|
|
227
|
+
return s.instanceOf(n && "ownerDocument" in n ? n.ownerDocument.defaultView.Element : Element)(o, u, a, i, e, t);
|
|
273
228
|
}
|
|
274
229
|
}),
|
|
275
230
|
/**
|
|
@@ -286,23 +241,23 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
286
241
|
* </Transition>
|
|
287
242
|
* ```
|
|
288
243
|
*/
|
|
289
|
-
children:
|
|
244
|
+
children: s.oneOfType([s.func.isRequired, s.element.isRequired]).isRequired,
|
|
290
245
|
/**
|
|
291
246
|
* Show the component; triggers the enter or exit states
|
|
292
247
|
*/
|
|
293
|
-
in:
|
|
248
|
+
in: s.bool,
|
|
294
249
|
/**
|
|
295
250
|
* By default the child component is mounted immediately along with
|
|
296
251
|
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
297
252
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
298
253
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
299
254
|
*/
|
|
300
|
-
mountOnEnter:
|
|
255
|
+
mountOnEnter: s.bool,
|
|
301
256
|
/**
|
|
302
257
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
303
258
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
304
259
|
*/
|
|
305
|
-
unmountOnExit:
|
|
260
|
+
unmountOnExit: s.bool,
|
|
306
261
|
/**
|
|
307
262
|
* By default the child component does not perform the enter transition when
|
|
308
263
|
* it first mounts, regardless of the value of `in`. If you want this
|
|
@@ -314,15 +269,15 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
314
269
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
315
270
|
* > differently.
|
|
316
271
|
*/
|
|
317
|
-
appear:
|
|
272
|
+
appear: s.bool,
|
|
318
273
|
/**
|
|
319
274
|
* Enable or disable enter transitions.
|
|
320
275
|
*/
|
|
321
|
-
enter:
|
|
276
|
+
enter: s.bool,
|
|
322
277
|
/**
|
|
323
278
|
* Enable or disable exit transitions.
|
|
324
279
|
*/
|
|
325
|
-
exit:
|
|
280
|
+
exit: s.bool,
|
|
326
281
|
/**
|
|
327
282
|
* The duration of the transition, in milliseconds.
|
|
328
283
|
* Required unless `addEndListener` is provided.
|
|
@@ -349,12 +304,12 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
349
304
|
*
|
|
350
305
|
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
351
306
|
*/
|
|
352
|
-
timeout: function(
|
|
353
|
-
var
|
|
354
|
-
|
|
355
|
-
for (var
|
|
307
|
+
timeout: function(u) {
|
|
308
|
+
var a = M;
|
|
309
|
+
u.addEndListener || (a = a.isRequired);
|
|
310
|
+
for (var i = arguments.length, e = new Array(i > 1 ? i - 1 : 0), t = 1; t < i; t++)
|
|
356
311
|
e[t - 1] = arguments[t];
|
|
357
|
-
return
|
|
312
|
+
return a.apply(void 0, [u].concat(e));
|
|
358
313
|
},
|
|
359
314
|
/**
|
|
360
315
|
* Add a custom transition end trigger. Called with the transitioning
|
|
@@ -370,7 +325,7 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
370
325
|
* }}
|
|
371
326
|
* ```
|
|
372
327
|
*/
|
|
373
|
-
addEndListener:
|
|
328
|
+
addEndListener: s.func,
|
|
374
329
|
/**
|
|
375
330
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
376
331
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -379,7 +334,7 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
379
334
|
*
|
|
380
335
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
381
336
|
*/
|
|
382
|
-
onEnter:
|
|
337
|
+
onEnter: s.func,
|
|
383
338
|
/**
|
|
384
339
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
385
340
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -388,7 +343,7 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
388
343
|
*
|
|
389
344
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
390
345
|
*/
|
|
391
|
-
onEntering:
|
|
346
|
+
onEntering: s.func,
|
|
392
347
|
/**
|
|
393
348
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
394
349
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -397,7 +352,7 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
397
352
|
*
|
|
398
353
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
399
354
|
*/
|
|
400
|
-
onEntered:
|
|
355
|
+
onEntered: s.func,
|
|
401
356
|
/**
|
|
402
357
|
* Callback fired before the "exiting" status is applied.
|
|
403
358
|
*
|
|
@@ -405,7 +360,7 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
405
360
|
*
|
|
406
361
|
* @type Function(node: HtmlElement) -> void
|
|
407
362
|
*/
|
|
408
|
-
onExit:
|
|
363
|
+
onExit: s.func,
|
|
409
364
|
/**
|
|
410
365
|
* Callback fired after the "exiting" status is applied.
|
|
411
366
|
*
|
|
@@ -413,7 +368,7 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
413
368
|
*
|
|
414
369
|
* @type Function(node: HtmlElement) -> void
|
|
415
370
|
*/
|
|
416
|
-
onExiting:
|
|
371
|
+
onExiting: s.func,
|
|
417
372
|
/**
|
|
418
373
|
* Callback fired after the "exited" status is applied.
|
|
419
374
|
*
|
|
@@ -421,7 +376,7 @@ l.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
421
376
|
*
|
|
422
377
|
* @type Function(node: HtmlElement) -> void
|
|
423
378
|
*/
|
|
424
|
-
onExited:
|
|
379
|
+
onExited: s.func
|
|
425
380
|
} : {};
|
|
426
381
|
function h() {
|
|
427
382
|
}
|
|
@@ -441,58 +396,27 @@ l.defaultProps = {
|
|
|
441
396
|
};
|
|
442
397
|
l.UNMOUNTED = x;
|
|
443
398
|
l.EXITED = d;
|
|
444
|
-
l.ENTERING =
|
|
445
|
-
l.ENTERED =
|
|
446
|
-
l.EXITING =
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
elementType: i,
|
|
450
|
-
externalSlotProps: u,
|
|
451
|
-
ownerState: n,
|
|
452
|
-
skipResolvingSlotProps: e = !1,
|
|
453
|
-
...t
|
|
454
|
-
} = s, r = e ? {} : F(u, n), {
|
|
455
|
-
props: o,
|
|
456
|
-
internalRef: p
|
|
457
|
-
} = w({
|
|
458
|
-
...t,
|
|
459
|
-
externalSlotProps: r
|
|
460
|
-
}), c = L(p, r?.ref, s.additionalProps?.ref);
|
|
461
|
-
return P(i, {
|
|
462
|
-
...o,
|
|
463
|
-
ref: c
|
|
464
|
-
}, n);
|
|
465
|
-
}
|
|
466
|
-
const et = (s) => s.scrollTop;
|
|
467
|
-
function nt(s, i) {
|
|
399
|
+
l.ENTERING = E;
|
|
400
|
+
l.ENTERED = m;
|
|
401
|
+
l.EXITING = b;
|
|
402
|
+
const q = (o) => o.scrollTop;
|
|
403
|
+
function w(o, u) {
|
|
468
404
|
const {
|
|
469
|
-
timeout:
|
|
470
|
-
easing:
|
|
405
|
+
timeout: a,
|
|
406
|
+
easing: i,
|
|
471
407
|
style: e = {}
|
|
472
|
-
} =
|
|
408
|
+
} = o;
|
|
473
409
|
return {
|
|
474
|
-
duration: e.transitionDuration ?? (typeof
|
|
475
|
-
easing: e.transitionTimingFunction ?? (typeof
|
|
410
|
+
duration: e.transitionDuration ?? (typeof a == "number" ? a : a[u.mode] || 0),
|
|
411
|
+
easing: e.transitionTimingFunction ?? (typeof i == "object" ? i[u.mode] : i),
|
|
476
412
|
delay: e.transitionDelay
|
|
477
413
|
};
|
|
478
414
|
}
|
|
479
|
-
const _ = /* @__PURE__ */ b.createContext(void 0);
|
|
480
|
-
process.env.NODE_ENV !== "production" && (_.displayName = "FormControlContext");
|
|
481
|
-
function rt() {
|
|
482
|
-
return b.useContext(_);
|
|
483
|
-
}
|
|
484
415
|
export {
|
|
485
|
-
_ as F,
|
|
486
416
|
l as T,
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
H as f,
|
|
493
|
-
nt as g,
|
|
494
|
-
Z as h,
|
|
495
|
-
Y as m,
|
|
496
|
-
et as r,
|
|
497
|
-
K as u
|
|
417
|
+
G as c,
|
|
418
|
+
L as f,
|
|
419
|
+
w as g,
|
|
420
|
+
U as m,
|
|
421
|
+
q as r
|
|
498
422
|
};
|