@5ive-souls/controls 0.0.2 → 0.0.4
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/5ive-souls-controls-0.0.4.tgz +0 -0
- package/dist/Utilities-C0PUcYTL.js +157 -0
- package/dist/chunk-3-CMb_cR4A.js +11 -0
- package/dist/components/ClassNames.js +1 -1
- package/dist/components/EventCalender/Context/EventCalenderContext.js +5 -0
- package/dist/components/EventCalender/Context/EventCalenderProvider.js +34 -0
- package/dist/components/EventCalender/Context/EventProviderProps.js +0 -0
- package/dist/components/EventCalender/Context/index.js +6 -0
- package/dist/components/EventCalender/Day.js +12 -0
- package/dist/components/EventCalender/EventCalender.js +8 -0
- package/dist/components/EventCalender/EventList.js +12 -0
- package/dist/components/EventCalender/Month.js +48 -0
- package/dist/components/EventCalender/MonthPicker.js +65 -0
- package/dist/components/EventCalender/Utilities.js +8 -0
- package/dist/components/EventCalender/Week.js +10 -0
- package/dist/components/EventCalender/WeekdayLabel.js +32 -0
- package/dist/components/EventCalender/YearPicker.js +21 -0
- package/dist/components/EventCalender/index.js +4 -0
- package/dist/components/EventCalender/interfaces/CalenderItemProps.js +0 -0
- package/dist/components/EventCalender/interfaces/Event.js +0 -0
- package/dist/components/EventCalender/interfaces/EventCalenderProps.js +0 -0
- package/dist/components/EventCalender/interfaces/EventCalenderStrings.js +0 -0
- package/dist/components/EventCalender/interfaces/index.js +0 -0
- package/dist/components/FlexBox/FlexBox.js +5 -5
- package/dist/components/FlexBox/FlexBoxItem/FlexBoxItem.js +3 -3
- package/dist/components/Grid/Grid.js +30 -30
- package/dist/components/JumpList/JumpList.js +178 -0
- package/dist/components/JumpList/index.js +4 -0
- package/dist/components/Section/Section.js +750 -9
- package/dist/components/Section/SectionUtils.js +8 -5
- package/dist/components/Section/index.js +1 -1
- package/dist/components/Wizard/Wizard.js +16 -15
- package/dist/components/index.js +21 -19
- package/dist/main.d.ts +53 -0
- package/dist/main.js +21 -19
- package/package.json +1 -1
- package/dist/5ive-souls-controls-0.0.2.tgz +0 -0
- package/dist/Section-Br38kDAa.js +0 -754
|
@@ -1,12 +1,753 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "@fluentui/react-components";
|
|
3
|
-
import "react";
|
|
4
|
-
import "
|
|
5
|
-
import "../FlexBox/
|
|
1
|
+
import { jsxs as re, jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as ge, tokens as I, mergeClasses as q, Button as Te, Divider as be } from "@fluentui/react-components";
|
|
3
|
+
import * as p from "react";
|
|
4
|
+
import xe from "react";
|
|
5
|
+
import { FlexBox as ne } from "../FlexBox/FlexBox.js";
|
|
6
|
+
import { FlexBoxItem as U } from "../FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
6
7
|
import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
7
|
-
import "../ClassNames.js";
|
|
8
|
-
import "./SectionUtils.js";
|
|
9
|
-
import {
|
|
8
|
+
import { ClassNames as Q } from "../ClassNames.js";
|
|
9
|
+
import { SectionUtils as oe } from "./SectionUtils.js";
|
|
10
|
+
import { e as Ae, f as Pe } from "../../chunk-3-CMb_cR4A.js";
|
|
11
|
+
const we = {
|
|
12
|
+
durationUltraFast: 50,
|
|
13
|
+
durationFaster: 100,
|
|
14
|
+
durationFast: 150,
|
|
15
|
+
durationNormal: 200,
|
|
16
|
+
durationGentle: 250,
|
|
17
|
+
durationSlow: 300,
|
|
18
|
+
durationSlower: 400,
|
|
19
|
+
durationUltraSlow: 500
|
|
20
|
+
}, Ie = {
|
|
21
|
+
curveAccelerateMax: "cubic-bezier(0.9,0.1,1,0.2)",
|
|
22
|
+
curveAccelerateMid: "cubic-bezier(1,0,1,1)",
|
|
23
|
+
curveAccelerateMin: "cubic-bezier(0.8,0,0.78,1)",
|
|
24
|
+
curveDecelerateMax: "cubic-bezier(0.1,0.9,0.2,1)",
|
|
25
|
+
curveDecelerateMid: "cubic-bezier(0,0,0,1)",
|
|
26
|
+
curveDecelerateMin: "cubic-bezier(0.33,0,0.1,1)",
|
|
27
|
+
curveEasyEaseMax: "cubic-bezier(0.8,0,0.2,1)",
|
|
28
|
+
curveEasyEase: "cubic-bezier(0.33,0,0.67,1)",
|
|
29
|
+
curveLinear: "cubic-bezier(0,0,1,1)"
|
|
30
|
+
}, x = {
|
|
31
|
+
...we,
|
|
32
|
+
...Ie
|
|
33
|
+
}, ue = p.createContext(void 0), Ne = {
|
|
34
|
+
// eslint-disable-next-line @nx/workspace-no-restricted-globals -- expected ignore ( SSR friendly acquisition of globals )
|
|
35
|
+
targetDocument: typeof document == "object" ? document : void 0,
|
|
36
|
+
dir: "ltr"
|
|
37
|
+
};
|
|
38
|
+
ue.Provider;
|
|
39
|
+
function _e() {
|
|
40
|
+
var e;
|
|
41
|
+
return (e = p.useContext(ue)) !== null && e !== void 0 ? e : Ne;
|
|
42
|
+
}
|
|
43
|
+
function ke() {
|
|
44
|
+
return (
|
|
45
|
+
/* eslint-disable @nx/workspace-no-restricted-globals -- expected ignore ( SSR friendly acquisition of globals )*/
|
|
46
|
+
typeof window < "u" && !!(window.document && // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
47
|
+
window.document.createElement)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
const G = ke() ? p.useLayoutEffect : p.useEffect, Z = (e) => {
|
|
51
|
+
const n = p.useRef(() => {
|
|
52
|
+
throw new Error("Cannot call an event handler while rendering");
|
|
53
|
+
});
|
|
54
|
+
return G(() => {
|
|
55
|
+
n.current = e;
|
|
56
|
+
}, [
|
|
57
|
+
e
|
|
58
|
+
]), p.useCallback((...r) => {
|
|
59
|
+
const o = n.current;
|
|
60
|
+
return o(...r);
|
|
61
|
+
}, [
|
|
62
|
+
n
|
|
63
|
+
]);
|
|
64
|
+
};
|
|
65
|
+
function Oe() {
|
|
66
|
+
const e = p.useRef(!0);
|
|
67
|
+
return e.current ? (e.current = !1, !0) : e.current;
|
|
68
|
+
}
|
|
69
|
+
function De() {
|
|
70
|
+
return p.useReducer((e) => e + 1, 0)[1];
|
|
71
|
+
}
|
|
72
|
+
function ze(...e) {
|
|
73
|
+
"use no memo";
|
|
74
|
+
const n = p.useCallback(
|
|
75
|
+
(r) => {
|
|
76
|
+
n.current = r;
|
|
77
|
+
for (const o of e)
|
|
78
|
+
typeof o == "function" ? o(r) : o && (o.current = r);
|
|
79
|
+
},
|
|
80
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- already exhaustive
|
|
81
|
+
[
|
|
82
|
+
...e
|
|
83
|
+
]
|
|
84
|
+
);
|
|
85
|
+
return n;
|
|
86
|
+
}
|
|
87
|
+
function $e(e) {
|
|
88
|
+
if (e.playState === "running") {
|
|
89
|
+
var n;
|
|
90
|
+
if (e.overallProgress !== void 0) {
|
|
91
|
+
var r;
|
|
92
|
+
const l = (r = e.overallProgress) !== null && r !== void 0 ? r : 0;
|
|
93
|
+
return l > 0 && l < 1;
|
|
94
|
+
}
|
|
95
|
+
var o;
|
|
96
|
+
const u = Number((o = e.currentTime) !== null && o !== void 0 ? o : 0);
|
|
97
|
+
var i;
|
|
98
|
+
const d = Number((i = (n = e.effect) === null || n === void 0 ? void 0 : n.getTiming().duration) !== null && i !== void 0 ? i : 0);
|
|
99
|
+
return u > 0 && u < d;
|
|
100
|
+
}
|
|
101
|
+
return !1;
|
|
102
|
+
}
|
|
103
|
+
const Le = {
|
|
104
|
+
fill: "forwards"
|
|
105
|
+
}, Be = {
|
|
106
|
+
duration: 1
|
|
107
|
+
};
|
|
108
|
+
function le() {
|
|
109
|
+
var e;
|
|
110
|
+
const n = typeof window < "u" && typeof ((e = window.Animation) === null || e === void 0 ? void 0 : e.prototype.persist) == "function";
|
|
111
|
+
return p.useCallback((r, o, i) => {
|
|
112
|
+
const u = Array.isArray(o) ? o : [
|
|
113
|
+
o
|
|
114
|
+
], { isReducedMotion: d } = i, l = u.map((s) => {
|
|
115
|
+
const { keyframes: v, reducedMotion: f = Be, ...m } = s, { keyframes: C = v, ...R } = f, g = d ? C : v, b = {
|
|
116
|
+
...Le,
|
|
117
|
+
...m,
|
|
118
|
+
// Use reduced motion overrides (e.g. duration, easing) when reduced motion is enabled
|
|
119
|
+
...d && R
|
|
120
|
+
};
|
|
121
|
+
try {
|
|
122
|
+
const c = r.animate(g, b);
|
|
123
|
+
if (n)
|
|
124
|
+
c == null || c.persist();
|
|
125
|
+
else {
|
|
126
|
+
const S = g[g.length - 1];
|
|
127
|
+
var T;
|
|
128
|
+
Object.assign((T = r.style) !== null && T !== void 0 ? T : {}, S);
|
|
129
|
+
}
|
|
130
|
+
return c;
|
|
131
|
+
} catch {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
}).filter((s) => !!s);
|
|
135
|
+
return {
|
|
136
|
+
set playbackRate(s) {
|
|
137
|
+
l.forEach((v) => {
|
|
138
|
+
v.playbackRate = s;
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
setMotionEndCallbacks(s, v) {
|
|
142
|
+
const f = l.map((m) => new Promise((C, R) => {
|
|
143
|
+
m.onfinish = () => C(), m.oncancel = () => R();
|
|
144
|
+
}));
|
|
145
|
+
Promise.all(f).then(() => {
|
|
146
|
+
s();
|
|
147
|
+
}).catch(() => {
|
|
148
|
+
v();
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
isRunning() {
|
|
152
|
+
return l.some((s) => $e(s));
|
|
153
|
+
},
|
|
154
|
+
cancel: () => {
|
|
155
|
+
l.forEach((s) => {
|
|
156
|
+
s.cancel();
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
pause: () => {
|
|
160
|
+
l.forEach((s) => {
|
|
161
|
+
s.pause();
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
play: () => {
|
|
165
|
+
l.forEach((s) => {
|
|
166
|
+
s.play();
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
finish: () => {
|
|
170
|
+
l.forEach((s) => {
|
|
171
|
+
s.finish();
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
reverse: () => {
|
|
175
|
+
l.forEach((s) => {
|
|
176
|
+
s.reverse();
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}, [
|
|
181
|
+
n
|
|
182
|
+
]);
|
|
183
|
+
}
|
|
184
|
+
function Fe() {
|
|
185
|
+
const [e, n] = p.useState(0), r = p.useRef(), o = le();
|
|
186
|
+
return p.useEffect(() => {
|
|
187
|
+
if (e > 0) {
|
|
188
|
+
var i;
|
|
189
|
+
(i = r.current) === null || i === void 0 || i.call(r);
|
|
190
|
+
}
|
|
191
|
+
}, [
|
|
192
|
+
e
|
|
193
|
+
]), p.useCallback((i, u, d) => typeof i.animate == "function" ? o(i, u, d) : {
|
|
194
|
+
setMotionEndCallbacks(s) {
|
|
195
|
+
r.current = s, n((v) => v + 1);
|
|
196
|
+
},
|
|
197
|
+
set playbackRate(s) {
|
|
198
|
+
},
|
|
199
|
+
isRunning() {
|
|
200
|
+
return !1;
|
|
201
|
+
},
|
|
202
|
+
cancel() {
|
|
203
|
+
},
|
|
204
|
+
pause() {
|
|
205
|
+
},
|
|
206
|
+
play() {
|
|
207
|
+
},
|
|
208
|
+
finish() {
|
|
209
|
+
},
|
|
210
|
+
reverse() {
|
|
211
|
+
}
|
|
212
|
+
}, [
|
|
213
|
+
o
|
|
214
|
+
]);
|
|
215
|
+
}
|
|
216
|
+
function Ye() {
|
|
217
|
+
"use no memo";
|
|
218
|
+
return process.env.NODE_ENV === "test" ? Fe() : le();
|
|
219
|
+
}
|
|
220
|
+
function Ue(e) {
|
|
221
|
+
const n = p.useRef();
|
|
222
|
+
return p.useImperativeHandle(e, () => ({
|
|
223
|
+
setPlayState: (r) => {
|
|
224
|
+
if (r === "running") {
|
|
225
|
+
var o;
|
|
226
|
+
(o = n.current) === null || o === void 0 || o.play();
|
|
227
|
+
}
|
|
228
|
+
if (r === "paused") {
|
|
229
|
+
var i;
|
|
230
|
+
(i = n.current) === null || i === void 0 || i.pause();
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
setPlaybackRate: (r) => {
|
|
234
|
+
n.current && (n.current.playbackRate = r);
|
|
235
|
+
}
|
|
236
|
+
})), n;
|
|
237
|
+
}
|
|
238
|
+
const Ve = "screen and (prefers-reduced-motion: reduce)";
|
|
239
|
+
function je() {
|
|
240
|
+
const { targetDocument: e } = _e();
|
|
241
|
+
var n;
|
|
242
|
+
const r = (n = e == null ? void 0 : e.defaultView) !== null && n !== void 0 ? n : null, o = p.useRef(!1), i = p.useCallback(() => o.current, []);
|
|
243
|
+
return G(() => {
|
|
244
|
+
if (r === null || typeof r.matchMedia != "function")
|
|
245
|
+
return;
|
|
246
|
+
const u = r.matchMedia(Ve);
|
|
247
|
+
u.matches && (o.current = !0);
|
|
248
|
+
const d = (l) => {
|
|
249
|
+
o.current = l.matches;
|
|
250
|
+
};
|
|
251
|
+
return u.addEventListener("change", d), () => {
|
|
252
|
+
u.removeEventListener("change", d);
|
|
253
|
+
};
|
|
254
|
+
}, [
|
|
255
|
+
r
|
|
256
|
+
]), i;
|
|
257
|
+
}
|
|
258
|
+
var J = { exports: {} }, E = {};
|
|
259
|
+
/** @license React v17.0.2
|
|
260
|
+
* react-is.production.min.js
|
|
261
|
+
*
|
|
262
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the MIT license found in the
|
|
265
|
+
* LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/
|
|
267
|
+
var ie;
|
|
268
|
+
function qe() {
|
|
269
|
+
if (ie) return E;
|
|
270
|
+
ie = 1;
|
|
271
|
+
var e = 60103, n = 60106, r = 60107, o = 60108, i = 60114, u = 60109, d = 60110, l = 60112, s = 60113, v = 60120, f = 60115, m = 60116, C = 60121, R = 60122, g = 60117, b = 60129, T = 60131;
|
|
272
|
+
if (typeof Symbol == "function" && Symbol.for) {
|
|
273
|
+
var c = Symbol.for;
|
|
274
|
+
e = c("react.element"), n = c("react.portal"), r = c("react.fragment"), o = c("react.strict_mode"), i = c("react.profiler"), u = c("react.provider"), d = c("react.context"), l = c("react.forward_ref"), s = c("react.suspense"), v = c("react.suspense_list"), f = c("react.memo"), m = c("react.lazy"), C = c("react.block"), R = c("react.server.block"), g = c("react.fundamental"), b = c("react.debug_trace_mode"), T = c("react.legacy_hidden");
|
|
275
|
+
}
|
|
276
|
+
function S(t) {
|
|
277
|
+
if (typeof t == "object" && t !== null) {
|
|
278
|
+
var y = t.$$typeof;
|
|
279
|
+
switch (y) {
|
|
280
|
+
case e:
|
|
281
|
+
switch (t = t.type, t) {
|
|
282
|
+
case r:
|
|
283
|
+
case i:
|
|
284
|
+
case o:
|
|
285
|
+
case s:
|
|
286
|
+
case v:
|
|
287
|
+
return t;
|
|
288
|
+
default:
|
|
289
|
+
switch (t = t && t.$$typeof, t) {
|
|
290
|
+
case d:
|
|
291
|
+
case l:
|
|
292
|
+
case m:
|
|
293
|
+
case f:
|
|
294
|
+
case u:
|
|
295
|
+
return t;
|
|
296
|
+
default:
|
|
297
|
+
return y;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
case n:
|
|
301
|
+
return y;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
var P = u, M = e, $ = l, w = r, N = m, L = f, _ = n, k = i, O = o, D = s;
|
|
306
|
+
return E.ContextConsumer = d, E.ContextProvider = P, E.Element = M, E.ForwardRef = $, E.Fragment = w, E.Lazy = N, E.Memo = L, E.Portal = _, E.Profiler = k, E.StrictMode = O, E.Suspense = D, E.isAsyncMode = function() {
|
|
307
|
+
return !1;
|
|
308
|
+
}, E.isConcurrentMode = function() {
|
|
309
|
+
return !1;
|
|
310
|
+
}, E.isContextConsumer = function(t) {
|
|
311
|
+
return S(t) === d;
|
|
312
|
+
}, E.isContextProvider = function(t) {
|
|
313
|
+
return S(t) === u;
|
|
314
|
+
}, E.isElement = function(t) {
|
|
315
|
+
return typeof t == "object" && t !== null && t.$$typeof === e;
|
|
316
|
+
}, E.isForwardRef = function(t) {
|
|
317
|
+
return S(t) === l;
|
|
318
|
+
}, E.isFragment = function(t) {
|
|
319
|
+
return S(t) === r;
|
|
320
|
+
}, E.isLazy = function(t) {
|
|
321
|
+
return S(t) === m;
|
|
322
|
+
}, E.isMemo = function(t) {
|
|
323
|
+
return S(t) === f;
|
|
324
|
+
}, E.isPortal = function(t) {
|
|
325
|
+
return S(t) === n;
|
|
326
|
+
}, E.isProfiler = function(t) {
|
|
327
|
+
return S(t) === i;
|
|
328
|
+
}, E.isStrictMode = function(t) {
|
|
329
|
+
return S(t) === o;
|
|
330
|
+
}, E.isSuspense = function(t) {
|
|
331
|
+
return S(t) === s;
|
|
332
|
+
}, E.isValidElementType = function(t) {
|
|
333
|
+
return typeof t == "string" || typeof t == "function" || t === r || t === i || t === b || t === o || t === s || t === v || t === T || typeof t == "object" && t !== null && (t.$$typeof === m || t.$$typeof === f || t.$$typeof === u || t.$$typeof === d || t.$$typeof === l || t.$$typeof === g || t.$$typeof === C || t[0] === R);
|
|
334
|
+
}, E.typeOf = S, E;
|
|
335
|
+
}
|
|
336
|
+
var h = {};
|
|
337
|
+
/** @license React v17.0.2
|
|
338
|
+
* react-is.development.js
|
|
339
|
+
*
|
|
340
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the MIT license found in the
|
|
343
|
+
* LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/
|
|
345
|
+
var ae;
|
|
346
|
+
function Ge() {
|
|
347
|
+
return ae || (ae = 1, process.env.NODE_ENV !== "production" && function() {
|
|
348
|
+
var e = 60103, n = 60106, r = 60107, o = 60108, i = 60114, u = 60109, d = 60110, l = 60112, s = 60113, v = 60120, f = 60115, m = 60116, C = 60121, R = 60122, g = 60117, b = 60129, T = 60131;
|
|
349
|
+
if (typeof Symbol == "function" && Symbol.for) {
|
|
350
|
+
var c = Symbol.for;
|
|
351
|
+
e = c("react.element"), n = c("react.portal"), r = c("react.fragment"), o = c("react.strict_mode"), i = c("react.profiler"), u = c("react.provider"), d = c("react.context"), l = c("react.forward_ref"), s = c("react.suspense"), v = c("react.suspense_list"), f = c("react.memo"), m = c("react.lazy"), C = c("react.block"), R = c("react.server.block"), g = c("react.fundamental"), c("react.scope"), c("react.opaque.id"), b = c("react.debug_trace_mode"), c("react.offscreen"), T = c("react.legacy_hidden");
|
|
352
|
+
}
|
|
353
|
+
var S = !1;
|
|
354
|
+
function P(a) {
|
|
355
|
+
return !!(typeof a == "string" || typeof a == "function" || a === r || a === i || a === b || a === o || a === s || a === v || a === T || S || typeof a == "object" && a !== null && (a.$$typeof === m || a.$$typeof === f || a.$$typeof === u || a.$$typeof === d || a.$$typeof === l || a.$$typeof === g || a.$$typeof === C || a[0] === R));
|
|
356
|
+
}
|
|
357
|
+
function M(a) {
|
|
358
|
+
if (typeof a == "object" && a !== null) {
|
|
359
|
+
var X = a.$$typeof;
|
|
360
|
+
switch (X) {
|
|
361
|
+
case e:
|
|
362
|
+
var j = a.type;
|
|
363
|
+
switch (j) {
|
|
364
|
+
case r:
|
|
365
|
+
case i:
|
|
366
|
+
case o:
|
|
367
|
+
case s:
|
|
368
|
+
case v:
|
|
369
|
+
return j;
|
|
370
|
+
default:
|
|
371
|
+
var te = j && j.$$typeof;
|
|
372
|
+
switch (te) {
|
|
373
|
+
case d:
|
|
374
|
+
case l:
|
|
375
|
+
case m:
|
|
376
|
+
case f:
|
|
377
|
+
case u:
|
|
378
|
+
return te;
|
|
379
|
+
default:
|
|
380
|
+
return X;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
case n:
|
|
384
|
+
return X;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
var $ = d, w = u, N = e, L = l, _ = r, k = m, O = f, D = n, t = i, y = o, B = s, z = !1, F = !1;
|
|
389
|
+
function H(a) {
|
|
390
|
+
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
391
|
+
}
|
|
392
|
+
function Y(a) {
|
|
393
|
+
return F || (F = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
394
|
+
}
|
|
395
|
+
function V(a) {
|
|
396
|
+
return M(a) === d;
|
|
397
|
+
}
|
|
398
|
+
function K(a) {
|
|
399
|
+
return M(a) === u;
|
|
400
|
+
}
|
|
401
|
+
function pe(a) {
|
|
402
|
+
return typeof a == "object" && a !== null && a.$$typeof === e;
|
|
403
|
+
}
|
|
404
|
+
function ve(a) {
|
|
405
|
+
return M(a) === l;
|
|
406
|
+
}
|
|
407
|
+
function Ee(a) {
|
|
408
|
+
return M(a) === r;
|
|
409
|
+
}
|
|
410
|
+
function he(a) {
|
|
411
|
+
return M(a) === m;
|
|
412
|
+
}
|
|
413
|
+
function Ce(a) {
|
|
414
|
+
return M(a) === f;
|
|
415
|
+
}
|
|
416
|
+
function Re(a) {
|
|
417
|
+
return M(a) === n;
|
|
418
|
+
}
|
|
419
|
+
function Se(a) {
|
|
420
|
+
return M(a) === i;
|
|
421
|
+
}
|
|
422
|
+
function ye(a) {
|
|
423
|
+
return M(a) === o;
|
|
424
|
+
}
|
|
425
|
+
function Me(a) {
|
|
426
|
+
return M(a) === s;
|
|
427
|
+
}
|
|
428
|
+
h.ContextConsumer = $, h.ContextProvider = w, h.Element = N, h.ForwardRef = L, h.Fragment = _, h.Lazy = k, h.Memo = O, h.Portal = D, h.Profiler = t, h.StrictMode = y, h.Suspense = B, h.isAsyncMode = H, h.isConcurrentMode = Y, h.isContextConsumer = V, h.isContextProvider = K, h.isElement = pe, h.isForwardRef = ve, h.isFragment = Ee, h.isLazy = he, h.isMemo = Ce, h.isPortal = Re, h.isProfiler = Se, h.isStrictMode = ye, h.isSuspense = Me, h.isValidElementType = P, h.typeOf = M;
|
|
429
|
+
}()), h;
|
|
430
|
+
}
|
|
431
|
+
process.env.NODE_ENV === "production" ? J.exports = qe() : J.exports = Ge();
|
|
432
|
+
var We = J.exports;
|
|
433
|
+
function He(e) {
|
|
434
|
+
try {
|
|
435
|
+
const n = p.Children.only(e);
|
|
436
|
+
if (typeof n.type == "string" || We.isForwardRef(n))
|
|
437
|
+
return n;
|
|
438
|
+
} catch {
|
|
439
|
+
}
|
|
440
|
+
throw new Error([
|
|
441
|
+
"@fluentui/react-motion: Invalid child element.",
|
|
442
|
+
`
|
|
443
|
+
`,
|
|
444
|
+
"Motion factories require a single child element to be passed. ",
|
|
445
|
+
"That element element should support ref forwarding i.e. it should be either an intrinsic element (e.g. div) or a component that uses React.forwardRef()."
|
|
446
|
+
].join(""));
|
|
447
|
+
}
|
|
448
|
+
const de = p.createContext(void 0);
|
|
449
|
+
de.Provider;
|
|
450
|
+
const Ke = () => {
|
|
451
|
+
var e;
|
|
452
|
+
return (e = p.useContext(de)) !== null && e !== void 0 ? e : "default";
|
|
453
|
+
}, Xe = p.createContext(void 0);
|
|
454
|
+
function Qe(e = !1, n = !1) {
|
|
455
|
+
const r = p.useRef(n ? e : !0), o = De(), i = p.useCallback((u) => {
|
|
456
|
+
r.current !== u && (r.current = u, o());
|
|
457
|
+
}, [
|
|
458
|
+
o
|
|
459
|
+
]);
|
|
460
|
+
return p.useEffect(() => {
|
|
461
|
+
e && (r.current = e);
|
|
462
|
+
}), [
|
|
463
|
+
e || r.current,
|
|
464
|
+
i
|
|
465
|
+
];
|
|
466
|
+
}
|
|
467
|
+
const Ze = Symbol("MOTION_DEFINITION"), Je = Symbol.for("interruptablePresence");
|
|
468
|
+
function W(e) {
|
|
469
|
+
return Object.assign((n) => {
|
|
470
|
+
"use no memo";
|
|
471
|
+
const o = {
|
|
472
|
+
...p.useContext(Xe),
|
|
473
|
+
...n
|
|
474
|
+
}, i = Ke() === "skip", { appear: u, children: d, imperativeRef: l, onExit: s, onMotionFinish: v, onMotionStart: f, onMotionCancel: m, visible: C, unmountOnExit: R, ...g } = o, b = g, [T, c] = Qe(C, R), S = He(d), P = Ue(l), M = p.useRef(), $ = ze(M, S.ref), w = p.useRef({
|
|
475
|
+
appear: u,
|
|
476
|
+
params: b,
|
|
477
|
+
skipMotions: i
|
|
478
|
+
}), N = Ye(), L = Oe(), _ = je(), k = Z((t) => {
|
|
479
|
+
f == null || f(null, {
|
|
480
|
+
direction: t
|
|
481
|
+
});
|
|
482
|
+
}), O = Z((t) => {
|
|
483
|
+
v == null || v(null, {
|
|
484
|
+
direction: t
|
|
485
|
+
}), t === "exit" && R && (c(!1), s == null || s());
|
|
486
|
+
}), D = Z((t) => {
|
|
487
|
+
m == null || m(null, {
|
|
488
|
+
direction: t
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
return G(() => {
|
|
492
|
+
w.current = {
|
|
493
|
+
appear: u,
|
|
494
|
+
params: b,
|
|
495
|
+
skipMotions: i
|
|
496
|
+
};
|
|
497
|
+
}), G(
|
|
498
|
+
() => {
|
|
499
|
+
const t = M.current;
|
|
500
|
+
if (!t)
|
|
501
|
+
return;
|
|
502
|
+
let y;
|
|
503
|
+
function B() {
|
|
504
|
+
y && (F && y.isRunning() || (y.cancel(), P.current = void 0));
|
|
505
|
+
}
|
|
506
|
+
const z = typeof e == "function" ? e({
|
|
507
|
+
element: t,
|
|
508
|
+
...w.current.params
|
|
509
|
+
}) : e, F = z[Je];
|
|
510
|
+
if (F && (y = P.current, y && y.isRunning()))
|
|
511
|
+
return y.reverse(), B;
|
|
512
|
+
const H = C ? z.enter : z.exit, Y = C ? "enter" : "exit", V = !w.current.appear && L, K = w.current.skipMotions;
|
|
513
|
+
return V || k(Y), y = N(t, H, {
|
|
514
|
+
isReducedMotion: _()
|
|
515
|
+
}), V ? (y.finish(), B) : (P.current = y, y.setMotionEndCallbacks(() => O(Y), () => D(Y)), K && y.finish(), B);
|
|
516
|
+
},
|
|
517
|
+
// Excluding `isFirstMount` from deps to prevent re-triggering the animation on subsequent renders
|
|
518
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
519
|
+
[
|
|
520
|
+
N,
|
|
521
|
+
P,
|
|
522
|
+
_,
|
|
523
|
+
O,
|
|
524
|
+
k,
|
|
525
|
+
D,
|
|
526
|
+
C
|
|
527
|
+
]
|
|
528
|
+
), T ? p.cloneElement(S, {
|
|
529
|
+
ref: $
|
|
530
|
+
}) : null;
|
|
531
|
+
}, {
|
|
532
|
+
// Heads up!
|
|
533
|
+
// Always normalize it to a function to simplify types
|
|
534
|
+
[Ze]: typeof e == "function" ? e : () => e
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
const fe = (e, n) => {
|
|
538
|
+
const r = e === "horizontal" ? "maxWidth" : "maxHeight", o = e === "horizontal" ? "overflowX" : "overflowY", u = `${e === "horizontal" ? n.scrollWidth : n.scrollHeight}px`;
|
|
539
|
+
return {
|
|
540
|
+
sizeName: r,
|
|
541
|
+
overflowName: o,
|
|
542
|
+
toSize: u
|
|
543
|
+
};
|
|
544
|
+
}, et = ({ orientation: e, duration: n, easing: r, element: o, fromSize: i = "0" }) => {
|
|
545
|
+
const { sizeName: u, overflowName: d, toSize: l } = fe(e, o);
|
|
546
|
+
return {
|
|
547
|
+
keyframes: [
|
|
548
|
+
{
|
|
549
|
+
[u]: i,
|
|
550
|
+
[d]: "hidden"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
[u]: l,
|
|
554
|
+
offset: 0.9999,
|
|
555
|
+
[d]: "hidden"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
[u]: "unset",
|
|
559
|
+
[d]: "unset"
|
|
560
|
+
}
|
|
561
|
+
],
|
|
562
|
+
duration: n,
|
|
563
|
+
easing: r
|
|
564
|
+
};
|
|
565
|
+
}, tt = ({ orientation: e, duration: n, easing: r, element: o, delay: i = 0, fromSize: u = "0" }) => {
|
|
566
|
+
const { sizeName: d, overflowName: l, toSize: s } = fe(e, o);
|
|
567
|
+
return {
|
|
568
|
+
keyframes: [
|
|
569
|
+
{
|
|
570
|
+
[d]: s,
|
|
571
|
+
[l]: "hidden"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
[d]: u,
|
|
575
|
+
[l]: "hidden"
|
|
576
|
+
}
|
|
577
|
+
],
|
|
578
|
+
duration: n,
|
|
579
|
+
easing: r,
|
|
580
|
+
fill: "both",
|
|
581
|
+
delay: i
|
|
582
|
+
};
|
|
583
|
+
}, rt = (e) => e === "horizontal" ? {
|
|
584
|
+
paddingStart: "paddingInlineStart",
|
|
585
|
+
paddingEnd: "paddingInlineEnd",
|
|
586
|
+
marginStart: "marginInlineStart",
|
|
587
|
+
marginEnd: "marginInlineEnd"
|
|
588
|
+
} : {
|
|
589
|
+
paddingStart: "paddingBlockStart",
|
|
590
|
+
paddingEnd: "paddingBlockEnd",
|
|
591
|
+
marginStart: "marginBlockStart",
|
|
592
|
+
marginEnd: "marginBlockEnd"
|
|
593
|
+
}, ce = ({ direction: e, orientation: n, duration: r, easing: o, delay: i = 0 }) => {
|
|
594
|
+
const { paddingStart: u, paddingEnd: d, marginStart: l, marginEnd: s } = rt(n), v = e === "enter" ? 0 : 1, m = {
|
|
595
|
+
keyframes: [
|
|
596
|
+
{
|
|
597
|
+
[u]: "0",
|
|
598
|
+
[d]: "0",
|
|
599
|
+
[l]: "0",
|
|
600
|
+
[s]: "0",
|
|
601
|
+
offset: v
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
duration: r,
|
|
605
|
+
easing: o,
|
|
606
|
+
delay: i
|
|
607
|
+
};
|
|
608
|
+
return e === "exit" && (m.fill = "forwards"), m;
|
|
609
|
+
}, se = ({ direction: e, duration: n, easing: r = x.curveLinear, fromValue: o = 0 }) => {
|
|
610
|
+
const i = [
|
|
611
|
+
{
|
|
612
|
+
opacity: o
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
opacity: 1
|
|
616
|
+
}
|
|
617
|
+
];
|
|
618
|
+
return e === "exit" && i.reverse(), {
|
|
619
|
+
keyframes: i,
|
|
620
|
+
duration: n,
|
|
621
|
+
easing: r
|
|
622
|
+
};
|
|
623
|
+
}, me = ({
|
|
624
|
+
// enter
|
|
625
|
+
enterSizeDuration: e = x.durationNormal,
|
|
626
|
+
enterOpacityDuration: n = e,
|
|
627
|
+
enterEasing: r = x.curveEasyEaseMax,
|
|
628
|
+
enterDelay: o = 0,
|
|
629
|
+
// exit: durations and easing default to enter values for symmetry
|
|
630
|
+
exitSizeDuration: i = e,
|
|
631
|
+
exitOpacityDuration: u = n,
|
|
632
|
+
exitEasing: d = r,
|
|
633
|
+
exitDelay: l = 0
|
|
634
|
+
} = {}) => ({ element: s, animateOpacity: v = !0, orientation: f = "vertical" }) => {
|
|
635
|
+
const m = [
|
|
636
|
+
et({
|
|
637
|
+
orientation: f,
|
|
638
|
+
duration: e,
|
|
639
|
+
easing: r,
|
|
640
|
+
element: s
|
|
641
|
+
}),
|
|
642
|
+
ce({
|
|
643
|
+
direction: "enter",
|
|
644
|
+
orientation: f,
|
|
645
|
+
duration: e,
|
|
646
|
+
easing: r
|
|
647
|
+
})
|
|
648
|
+
];
|
|
649
|
+
v && m.push({
|
|
650
|
+
...se({
|
|
651
|
+
direction: "enter",
|
|
652
|
+
duration: n,
|
|
653
|
+
easing: r
|
|
654
|
+
}),
|
|
655
|
+
delay: o,
|
|
656
|
+
fill: "both"
|
|
657
|
+
});
|
|
658
|
+
const C = [];
|
|
659
|
+
return v && C.push(se({
|
|
660
|
+
direction: "exit",
|
|
661
|
+
duration: u,
|
|
662
|
+
easing: d
|
|
663
|
+
})), C.push(tt({
|
|
664
|
+
orientation: f,
|
|
665
|
+
duration: i,
|
|
666
|
+
easing: d,
|
|
667
|
+
element: s,
|
|
668
|
+
delay: l
|
|
669
|
+
}), ce({
|
|
670
|
+
direction: "exit",
|
|
671
|
+
orientation: f,
|
|
672
|
+
duration: i,
|
|
673
|
+
easing: d,
|
|
674
|
+
delay: l
|
|
675
|
+
})), {
|
|
676
|
+
enter: m,
|
|
677
|
+
exit: C
|
|
678
|
+
};
|
|
679
|
+
}, ee = ({ enterDuration: e = x.durationNormal, enterEasing: n = x.curveEasyEaseMax, exitDuration: r = e, exitEasing: o = n } = {}) => (
|
|
680
|
+
// Implement a regular collapse as a special case of the delayed collapse,
|
|
681
|
+
// where the delays are zero, and the size and opacity durations are equal.
|
|
682
|
+
me({
|
|
683
|
+
enterSizeDuration: e,
|
|
684
|
+
enterEasing: n,
|
|
685
|
+
exitSizeDuration: r,
|
|
686
|
+
exitEasing: o
|
|
687
|
+
})
|
|
688
|
+
), nt = W(ee());
|
|
689
|
+
W(ee({
|
|
690
|
+
enterDuration: x.durationFast
|
|
691
|
+
}));
|
|
692
|
+
W(ee({
|
|
693
|
+
enterDuration: x.durationSlower
|
|
694
|
+
}));
|
|
695
|
+
W(me({
|
|
696
|
+
enterSizeDuration: x.durationNormal,
|
|
697
|
+
enterOpacityDuration: x.durationSlower,
|
|
698
|
+
enterDelay: x.durationNormal,
|
|
699
|
+
exitDelay: x.durationSlower,
|
|
700
|
+
enterEasing: x.curveEasyEase
|
|
701
|
+
}));
|
|
702
|
+
const ot = ge({
|
|
703
|
+
root: {
|
|
704
|
+
backgroundColor: I.colorNeutralBackground1,
|
|
705
|
+
boxSizing: "border-box",
|
|
706
|
+
overflow: "hidden"
|
|
707
|
+
},
|
|
708
|
+
default: {
|
|
709
|
+
border: "1px solid " + I.colorNeutralForeground1,
|
|
710
|
+
borderRadius: I.borderRadiusMedium,
|
|
711
|
+
boxShadow: I.shadow16Brand,
|
|
712
|
+
transitionDuration: I.durationNormal,
|
|
713
|
+
transitionTimingFunction: "ease",
|
|
714
|
+
transitionProperty: "box-shadow, border",
|
|
715
|
+
":hover": {
|
|
716
|
+
boxShadow: I.shadow28Brand,
|
|
717
|
+
border: "1px solid " + I.colorBrandForeground2Hover
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
divider: {
|
|
721
|
+
flexGrow: 0
|
|
722
|
+
},
|
|
723
|
+
fill: {
|
|
724
|
+
height: "100%",
|
|
725
|
+
width: "100%"
|
|
726
|
+
},
|
|
727
|
+
content: {
|
|
728
|
+
boxSizing: "border-box"
|
|
729
|
+
}
|
|
730
|
+
}), it = (e) => {
|
|
731
|
+
var c;
|
|
732
|
+
const { children: n, icon: r, header: o, collapsible: i, className: u, fill: d, ref: l, id: s, appearance: v } = e, f = ot(), [m, C] = xe.useState(!0);
|
|
733
|
+
let R = q(Q.Section, f.root, u);
|
|
734
|
+
(d || (c = e.cellProps) != null && c.resizable) && (R = q(R, f.fill)), (v == null || v == "default") && (R = q(R, f.default));
|
|
735
|
+
const g = oe.buildSectionStyles(e), b = oe.buildSectionContentStyles(e);
|
|
736
|
+
m || (g.height = "fit-content");
|
|
737
|
+
const T = m ? /* @__PURE__ */ A(Ae, {}) : /* @__PURE__ */ A(Pe, {});
|
|
738
|
+
return /* @__PURE__ */ re(ne, { id: s, className: R, style: g, ref: l, role: e.role, children: [
|
|
739
|
+
/* @__PURE__ */ A(U, { className: Q.SectionHeader, children: /* @__PURE__ */ re(ne, { fill: !0, horizontal: !0, alignItems: "center", children: [
|
|
740
|
+
r && /* @__PURE__ */ A(U, { padding: 8, children: r }),
|
|
741
|
+
/* @__PURE__ */ A(U, { grow: 1, children: o && o }),
|
|
742
|
+
i && /* @__PURE__ */ A(U, { children: /* @__PURE__ */ A(Te, { appearance: "transparent", icon: T, onClick: () => {
|
|
743
|
+
C(!m);
|
|
744
|
+
} }) })
|
|
745
|
+
] }) }),
|
|
746
|
+
(r || o || i) && /* @__PURE__ */ A(be, { className: f.divider }),
|
|
747
|
+
/* @__PURE__ */ A(U, { className: Q.SectionContent, grow: 1, style: b, children: /* @__PURE__ */ A(nt, { visible: m, children: /* @__PURE__ */ A("div", { className: q(f.fill, f.content), children: n }) }) })
|
|
748
|
+
] });
|
|
749
|
+
};
|
|
750
|
+
it.displayName = "Section";
|
|
10
751
|
export {
|
|
11
|
-
|
|
752
|
+
it as Section
|
|
12
753
|
};
|